circuit-json 0.0.408 → 0.0.409
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +191 -29
- package/dist/index.mjs +582 -564
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2321,84 +2321,100 @@ var pcb_trace = z99.object({
|
|
|
2321
2321
|
expectTypesMatch(true);
|
|
2322
2322
|
expectTypesMatch(true);
|
|
2323
2323
|
|
|
2324
|
-
// src/pcb/
|
|
2324
|
+
// src/pcb/pcb_trace_warning.ts
|
|
2325
2325
|
import { z as z100 } from "zod";
|
|
2326
|
-
var
|
|
2327
|
-
type: z100.literal("
|
|
2328
|
-
|
|
2329
|
-
|
|
2326
|
+
var pcb_trace_warning = z100.object({
|
|
2327
|
+
type: z100.literal("pcb_trace_warning"),
|
|
2328
|
+
pcb_trace_warning_id: getZodPrefixedIdWithDefault("pcb_trace_warning"),
|
|
2329
|
+
warning_type: z100.literal("pcb_trace_warning").default("pcb_trace_warning"),
|
|
2330
|
+
message: z100.string(),
|
|
2330
2331
|
center: point.optional(),
|
|
2331
2332
|
pcb_trace_id: z100.string(),
|
|
2332
2333
|
source_trace_id: z100.string(),
|
|
2333
2334
|
pcb_component_ids: z100.array(z100.string()),
|
|
2334
2335
|
pcb_port_ids: z100.array(z100.string()),
|
|
2335
2336
|
subcircuit_id: z100.string().optional()
|
|
2337
|
+
}).describe("Defines a trace warning on the PCB");
|
|
2338
|
+
expectTypesMatch(true);
|
|
2339
|
+
|
|
2340
|
+
// src/pcb/pcb_trace_error.ts
|
|
2341
|
+
import { z as z101 } from "zod";
|
|
2342
|
+
var pcb_trace_error = base_circuit_json_error.extend({
|
|
2343
|
+
type: z101.literal("pcb_trace_error"),
|
|
2344
|
+
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
2345
|
+
error_type: z101.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
2346
|
+
center: point.optional(),
|
|
2347
|
+
pcb_trace_id: z101.string(),
|
|
2348
|
+
source_trace_id: z101.string(),
|
|
2349
|
+
pcb_component_ids: z101.array(z101.string()),
|
|
2350
|
+
pcb_port_ids: z101.array(z101.string()),
|
|
2351
|
+
subcircuit_id: z101.string().optional()
|
|
2336
2352
|
}).describe("Defines a trace error on the PCB");
|
|
2337
2353
|
expectTypesMatch(true);
|
|
2338
2354
|
|
|
2339
2355
|
// src/pcb/pcb_trace_missing_error.ts
|
|
2340
|
-
import { z as
|
|
2356
|
+
import { z as z102 } from "zod";
|
|
2341
2357
|
var pcb_trace_missing_error = base_circuit_json_error.extend({
|
|
2342
|
-
type:
|
|
2358
|
+
type: z102.literal("pcb_trace_missing_error"),
|
|
2343
2359
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
2344
2360
|
"pcb_trace_missing_error"
|
|
2345
2361
|
),
|
|
2346
|
-
error_type:
|
|
2362
|
+
error_type: z102.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
2347
2363
|
center: point.optional(),
|
|
2348
|
-
source_trace_id:
|
|
2349
|
-
pcb_component_ids:
|
|
2350
|
-
pcb_port_ids:
|
|
2351
|
-
subcircuit_id:
|
|
2364
|
+
source_trace_id: z102.string(),
|
|
2365
|
+
pcb_component_ids: z102.array(z102.string()),
|
|
2366
|
+
pcb_port_ids: z102.array(z102.string()),
|
|
2367
|
+
subcircuit_id: z102.string().optional()
|
|
2352
2368
|
}).describe(
|
|
2353
2369
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
2354
2370
|
);
|
|
2355
2371
|
expectTypesMatch(true);
|
|
2356
2372
|
|
|
2357
2373
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
2358
|
-
import { z as
|
|
2374
|
+
import { z as z103 } from "zod";
|
|
2359
2375
|
var pcb_port_not_matched_error = base_circuit_json_error.extend({
|
|
2360
|
-
type:
|
|
2376
|
+
type: z103.literal("pcb_port_not_matched_error"),
|
|
2361
2377
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2362
|
-
error_type:
|
|
2363
|
-
pcb_component_ids:
|
|
2364
|
-
subcircuit_id:
|
|
2378
|
+
error_type: z103.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
2379
|
+
pcb_component_ids: z103.array(z103.string()),
|
|
2380
|
+
subcircuit_id: z103.string().optional()
|
|
2365
2381
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
2366
2382
|
expectTypesMatch(true);
|
|
2367
2383
|
|
|
2368
2384
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
2369
|
-
import { z as
|
|
2385
|
+
import { z as z104 } from "zod";
|
|
2370
2386
|
var pcb_port_not_connected_error = base_circuit_json_error.extend({
|
|
2371
|
-
type:
|
|
2387
|
+
type: z104.literal("pcb_port_not_connected_error"),
|
|
2372
2388
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
2373
2389
|
"pcb_port_not_connected_error"
|
|
2374
2390
|
),
|
|
2375
|
-
error_type:
|
|
2376
|
-
pcb_port_ids:
|
|
2377
|
-
pcb_component_ids:
|
|
2378
|
-
subcircuit_id:
|
|
2391
|
+
error_type: z104.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
2392
|
+
pcb_port_ids: z104.array(z104.string()),
|
|
2393
|
+
pcb_component_ids: z104.array(z104.string()),
|
|
2394
|
+
subcircuit_id: z104.string().optional()
|
|
2379
2395
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
2380
2396
|
expectTypesMatch(
|
|
2381
2397
|
true
|
|
2382
2398
|
);
|
|
2383
2399
|
|
|
2384
2400
|
// src/pcb/pcb_net.ts
|
|
2385
|
-
import { z as
|
|
2386
|
-
var pcb_net =
|
|
2387
|
-
type:
|
|
2401
|
+
import { z as z105 } from "zod";
|
|
2402
|
+
var pcb_net = z105.object({
|
|
2403
|
+
type: z105.literal("pcb_net"),
|
|
2388
2404
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
2389
|
-
source_net_id:
|
|
2390
|
-
highlight_color:
|
|
2405
|
+
source_net_id: z105.string().optional(),
|
|
2406
|
+
highlight_color: z105.string().optional()
|
|
2391
2407
|
}).describe("Defines a net on the PCB");
|
|
2392
2408
|
expectTypesMatch(true);
|
|
2393
2409
|
|
|
2394
2410
|
// src/pcb/pcb_via.ts
|
|
2395
|
-
import { z as
|
|
2396
|
-
var pcb_via =
|
|
2397
|
-
type:
|
|
2411
|
+
import { z as z106 } from "zod";
|
|
2412
|
+
var pcb_via = z106.object({
|
|
2413
|
+
type: z106.literal("pcb_via"),
|
|
2398
2414
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
2399
|
-
pcb_group_id:
|
|
2400
|
-
subcircuit_id:
|
|
2401
|
-
subcircuit_connectivity_map_key:
|
|
2415
|
+
pcb_group_id: z106.string().optional(),
|
|
2416
|
+
subcircuit_id: z106.string().optional(),
|
|
2417
|
+
subcircuit_connectivity_map_key: z106.string().optional(),
|
|
2402
2418
|
x: distance,
|
|
2403
2419
|
y: distance,
|
|
2404
2420
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -2407,101 +2423,101 @@ var pcb_via = z105.object({
|
|
|
2407
2423
|
from_layer: layer_ref.optional(),
|
|
2408
2424
|
/** @deprecated */
|
|
2409
2425
|
to_layer: layer_ref.optional(),
|
|
2410
|
-
layers:
|
|
2411
|
-
pcb_trace_id:
|
|
2412
|
-
net_is_assignable:
|
|
2413
|
-
net_assigned:
|
|
2414
|
-
is_tented:
|
|
2426
|
+
layers: z106.array(layer_ref),
|
|
2427
|
+
pcb_trace_id: z106.string().optional(),
|
|
2428
|
+
net_is_assignable: z106.boolean().optional(),
|
|
2429
|
+
net_assigned: z106.boolean().optional(),
|
|
2430
|
+
is_tented: z106.boolean().optional()
|
|
2415
2431
|
}).describe("Defines a via on the PCB");
|
|
2416
2432
|
expectTypesMatch(true);
|
|
2417
2433
|
|
|
2418
2434
|
// src/pcb/pcb_board.ts
|
|
2419
|
-
import { z as
|
|
2420
|
-
var pcb_board =
|
|
2421
|
-
type:
|
|
2435
|
+
import { z as z107 } from "zod";
|
|
2436
|
+
var pcb_board = z107.object({
|
|
2437
|
+
type: z107.literal("pcb_board"),
|
|
2422
2438
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
2423
|
-
pcb_panel_id:
|
|
2424
|
-
carrier_pcb_board_id:
|
|
2425
|
-
is_subcircuit:
|
|
2426
|
-
subcircuit_id:
|
|
2427
|
-
is_mounted_to_carrier_board:
|
|
2439
|
+
pcb_panel_id: z107.string().optional(),
|
|
2440
|
+
carrier_pcb_board_id: z107.string().optional(),
|
|
2441
|
+
is_subcircuit: z107.boolean().optional(),
|
|
2442
|
+
subcircuit_id: z107.string().optional(),
|
|
2443
|
+
is_mounted_to_carrier_board: z107.boolean().optional(),
|
|
2428
2444
|
width: length.optional(),
|
|
2429
2445
|
height: length.optional(),
|
|
2430
2446
|
center: point,
|
|
2431
|
-
display_offset_x:
|
|
2447
|
+
display_offset_x: z107.string().optional().describe(
|
|
2432
2448
|
"How to display the x offset for this board, usually corresponding with how the user specified it"
|
|
2433
2449
|
),
|
|
2434
|
-
display_offset_y:
|
|
2450
|
+
display_offset_y: z107.string().optional().describe(
|
|
2435
2451
|
"How to display the y offset for this board, usually corresponding with how the user specified it"
|
|
2436
2452
|
),
|
|
2437
2453
|
thickness: length.optional().default(1.4),
|
|
2438
|
-
num_layers:
|
|
2439
|
-
outline:
|
|
2440
|
-
shape:
|
|
2441
|
-
material:
|
|
2454
|
+
num_layers: z107.number().optional().default(4),
|
|
2455
|
+
outline: z107.array(point).optional(),
|
|
2456
|
+
shape: z107.enum(["rect", "polygon"]).optional(),
|
|
2457
|
+
material: z107.enum(["fr4", "fr1"]).default("fr4"),
|
|
2442
2458
|
anchor_position: point.optional(),
|
|
2443
2459
|
anchor_alignment: ninePointAnchor.optional(),
|
|
2444
|
-
position_mode:
|
|
2460
|
+
position_mode: z107.enum(["relative_to_panel_anchor", "none"]).optional()
|
|
2445
2461
|
}).describe("Defines the board outline of the PCB");
|
|
2446
2462
|
expectTypesMatch(true);
|
|
2447
2463
|
|
|
2448
2464
|
// src/pcb/pcb_panel.ts
|
|
2449
|
-
import { z as
|
|
2450
|
-
var pcb_panel =
|
|
2451
|
-
type:
|
|
2465
|
+
import { z as z108 } from "zod";
|
|
2466
|
+
var pcb_panel = z108.object({
|
|
2467
|
+
type: z108.literal("pcb_panel"),
|
|
2452
2468
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
2453
2469
|
width: length,
|
|
2454
2470
|
height: length,
|
|
2455
2471
|
center: point,
|
|
2456
2472
|
thickness: length.optional().default(1.4),
|
|
2457
|
-
covered_with_solder_mask:
|
|
2473
|
+
covered_with_solder_mask: z108.boolean().optional().default(true)
|
|
2458
2474
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
2459
2475
|
expectTypesMatch(true);
|
|
2460
2476
|
|
|
2461
2477
|
// src/pcb/pcb_placement_error.ts
|
|
2462
|
-
import { z as
|
|
2478
|
+
import { z as z109 } from "zod";
|
|
2463
2479
|
var pcb_placement_error = base_circuit_json_error.extend({
|
|
2464
|
-
type:
|
|
2480
|
+
type: z109.literal("pcb_placement_error"),
|
|
2465
2481
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
2466
|
-
error_type:
|
|
2467
|
-
subcircuit_id:
|
|
2482
|
+
error_type: z109.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
2483
|
+
subcircuit_id: z109.string().optional()
|
|
2468
2484
|
}).describe("Defines a placement error on the PCB");
|
|
2469
2485
|
expectTypesMatch(true);
|
|
2470
2486
|
|
|
2471
2487
|
// src/pcb/pcb_panelization_placement_error.ts
|
|
2472
|
-
import { z as
|
|
2488
|
+
import { z as z110 } from "zod";
|
|
2473
2489
|
var pcb_panelization_placement_error = base_circuit_json_error.extend({
|
|
2474
|
-
type:
|
|
2490
|
+
type: z110.literal("pcb_panelization_placement_error"),
|
|
2475
2491
|
pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
|
|
2476
2492
|
"pcb_panelization_placement_error"
|
|
2477
2493
|
),
|
|
2478
|
-
error_type:
|
|
2479
|
-
pcb_panel_id:
|
|
2480
|
-
pcb_board_id:
|
|
2481
|
-
subcircuit_id:
|
|
2494
|
+
error_type: z110.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
|
|
2495
|
+
pcb_panel_id: z110.string().optional(),
|
|
2496
|
+
pcb_board_id: z110.string().optional(),
|
|
2497
|
+
subcircuit_id: z110.string().optional()
|
|
2482
2498
|
}).describe("Defines a panelization placement error on the PCB");
|
|
2483
2499
|
expectTypesMatch(true);
|
|
2484
2500
|
|
|
2485
2501
|
// src/pcb/pcb_trace_hint.ts
|
|
2486
|
-
import { z as
|
|
2487
|
-
var pcb_trace_hint =
|
|
2488
|
-
type:
|
|
2502
|
+
import { z as z111 } from "zod";
|
|
2503
|
+
var pcb_trace_hint = z111.object({
|
|
2504
|
+
type: z111.literal("pcb_trace_hint"),
|
|
2489
2505
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
2490
|
-
pcb_port_id:
|
|
2491
|
-
pcb_component_id:
|
|
2492
|
-
route:
|
|
2493
|
-
subcircuit_id:
|
|
2506
|
+
pcb_port_id: z111.string(),
|
|
2507
|
+
pcb_component_id: z111.string(),
|
|
2508
|
+
route: z111.array(route_hint_point),
|
|
2509
|
+
subcircuit_id: z111.string().optional()
|
|
2494
2510
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
2495
2511
|
expectTypesMatch(true);
|
|
2496
2512
|
|
|
2497
2513
|
// src/pcb/pcb_silkscreen_line.ts
|
|
2498
|
-
import { z as
|
|
2499
|
-
var pcb_silkscreen_line =
|
|
2500
|
-
type:
|
|
2514
|
+
import { z as z112 } from "zod";
|
|
2515
|
+
var pcb_silkscreen_line = z112.object({
|
|
2516
|
+
type: z112.literal("pcb_silkscreen_line"),
|
|
2501
2517
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
2502
|
-
pcb_component_id:
|
|
2503
|
-
pcb_group_id:
|
|
2504
|
-
subcircuit_id:
|
|
2518
|
+
pcb_component_id: z112.string(),
|
|
2519
|
+
pcb_group_id: z112.string().optional(),
|
|
2520
|
+
subcircuit_id: z112.string().optional(),
|
|
2505
2521
|
stroke_width: distance.default("0.1mm"),
|
|
2506
2522
|
x1: distance,
|
|
2507
2523
|
y1: distance,
|
|
@@ -2512,32 +2528,32 @@ var pcb_silkscreen_line = z111.object({
|
|
|
2512
2528
|
expectTypesMatch(true);
|
|
2513
2529
|
|
|
2514
2530
|
// src/pcb/pcb_silkscreen_path.ts
|
|
2515
|
-
import { z as
|
|
2516
|
-
var pcb_silkscreen_path =
|
|
2517
|
-
type:
|
|
2531
|
+
import { z as z113 } from "zod";
|
|
2532
|
+
var pcb_silkscreen_path = z113.object({
|
|
2533
|
+
type: z113.literal("pcb_silkscreen_path"),
|
|
2518
2534
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
2519
|
-
pcb_component_id:
|
|
2520
|
-
pcb_group_id:
|
|
2521
|
-
subcircuit_id:
|
|
2535
|
+
pcb_component_id: z113.string(),
|
|
2536
|
+
pcb_group_id: z113.string().optional(),
|
|
2537
|
+
subcircuit_id: z113.string().optional(),
|
|
2522
2538
|
layer: visible_layer,
|
|
2523
|
-
route:
|
|
2539
|
+
route: z113.array(point),
|
|
2524
2540
|
stroke_width: length
|
|
2525
2541
|
}).describe("Defines a silkscreen path on the PCB");
|
|
2526
2542
|
expectTypesMatch(true);
|
|
2527
2543
|
|
|
2528
2544
|
// src/pcb/pcb_silkscreen_text.ts
|
|
2529
|
-
import { z as
|
|
2530
|
-
var pcb_silkscreen_text =
|
|
2531
|
-
type:
|
|
2545
|
+
import { z as z114 } from "zod";
|
|
2546
|
+
var pcb_silkscreen_text = z114.object({
|
|
2547
|
+
type: z114.literal("pcb_silkscreen_text"),
|
|
2532
2548
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
2533
|
-
pcb_group_id:
|
|
2534
|
-
subcircuit_id:
|
|
2535
|
-
font:
|
|
2549
|
+
pcb_group_id: z114.string().optional(),
|
|
2550
|
+
subcircuit_id: z114.string().optional(),
|
|
2551
|
+
font: z114.literal("tscircuit2024").default("tscircuit2024"),
|
|
2536
2552
|
font_size: distance.default("0.2mm"),
|
|
2537
|
-
pcb_component_id:
|
|
2538
|
-
text:
|
|
2539
|
-
is_knockout:
|
|
2540
|
-
knockout_padding:
|
|
2553
|
+
pcb_component_id: z114.string(),
|
|
2554
|
+
text: z114.string(),
|
|
2555
|
+
is_knockout: z114.boolean().default(false).optional(),
|
|
2556
|
+
knockout_padding: z114.object({
|
|
2541
2557
|
left: length,
|
|
2542
2558
|
top: length,
|
|
2543
2559
|
bottom: length,
|
|
@@ -2548,27 +2564,27 @@ var pcb_silkscreen_text = z113.object({
|
|
|
2548
2564
|
bottom: "0.2mm",
|
|
2549
2565
|
right: "0.2mm"
|
|
2550
2566
|
}).optional(),
|
|
2551
|
-
ccw_rotation:
|
|
2567
|
+
ccw_rotation: z114.number().optional(),
|
|
2552
2568
|
layer: layer_ref,
|
|
2553
|
-
is_mirrored:
|
|
2569
|
+
is_mirrored: z114.boolean().default(false).optional(),
|
|
2554
2570
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2555
2571
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2556
2572
|
}).describe("Defines silkscreen text on the PCB");
|
|
2557
2573
|
expectTypesMatch(true);
|
|
2558
2574
|
|
|
2559
2575
|
// src/pcb/pcb_copper_text.ts
|
|
2560
|
-
import { z as
|
|
2561
|
-
var pcb_copper_text =
|
|
2562
|
-
type:
|
|
2576
|
+
import { z as z115 } from "zod";
|
|
2577
|
+
var pcb_copper_text = z115.object({
|
|
2578
|
+
type: z115.literal("pcb_copper_text"),
|
|
2563
2579
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
2564
|
-
pcb_group_id:
|
|
2565
|
-
subcircuit_id:
|
|
2566
|
-
font:
|
|
2580
|
+
pcb_group_id: z115.string().optional(),
|
|
2581
|
+
subcircuit_id: z115.string().optional(),
|
|
2582
|
+
font: z115.literal("tscircuit2024").default("tscircuit2024"),
|
|
2567
2583
|
font_size: distance.default("0.2mm"),
|
|
2568
|
-
pcb_component_id:
|
|
2569
|
-
text:
|
|
2570
|
-
is_knockout:
|
|
2571
|
-
knockout_padding:
|
|
2584
|
+
pcb_component_id: z115.string(),
|
|
2585
|
+
text: z115.string(),
|
|
2586
|
+
is_knockout: z115.boolean().default(false).optional(),
|
|
2587
|
+
knockout_padding: z115.object({
|
|
2572
2588
|
left: length,
|
|
2573
2589
|
top: length,
|
|
2574
2590
|
bottom: length,
|
|
@@ -2579,61 +2595,61 @@ var pcb_copper_text = z114.object({
|
|
|
2579
2595
|
bottom: "0.2mm",
|
|
2580
2596
|
right: "0.2mm"
|
|
2581
2597
|
}).optional(),
|
|
2582
|
-
ccw_rotation:
|
|
2598
|
+
ccw_rotation: z115.number().optional(),
|
|
2583
2599
|
layer: layer_ref,
|
|
2584
|
-
is_mirrored:
|
|
2600
|
+
is_mirrored: z115.boolean().default(false).optional(),
|
|
2585
2601
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2586
2602
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2587
2603
|
}).describe("Defines copper text on the PCB");
|
|
2588
2604
|
expectTypesMatch(true);
|
|
2589
2605
|
|
|
2590
2606
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
2591
|
-
import { z as
|
|
2592
|
-
var pcb_silkscreen_rect =
|
|
2593
|
-
type:
|
|
2607
|
+
import { z as z116 } from "zod";
|
|
2608
|
+
var pcb_silkscreen_rect = z116.object({
|
|
2609
|
+
type: z116.literal("pcb_silkscreen_rect"),
|
|
2594
2610
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
2595
|
-
pcb_component_id:
|
|
2596
|
-
pcb_group_id:
|
|
2597
|
-
subcircuit_id:
|
|
2611
|
+
pcb_component_id: z116.string(),
|
|
2612
|
+
pcb_group_id: z116.string().optional(),
|
|
2613
|
+
subcircuit_id: z116.string().optional(),
|
|
2598
2614
|
center: point,
|
|
2599
2615
|
width: length,
|
|
2600
2616
|
height: length,
|
|
2601
2617
|
layer: layer_ref,
|
|
2602
2618
|
stroke_width: length.default("1mm"),
|
|
2603
2619
|
corner_radius: length.optional(),
|
|
2604
|
-
is_filled:
|
|
2605
|
-
has_stroke:
|
|
2606
|
-
is_stroke_dashed:
|
|
2607
|
-
ccw_rotation:
|
|
2620
|
+
is_filled: z116.boolean().default(true).optional(),
|
|
2621
|
+
has_stroke: z116.boolean().optional(),
|
|
2622
|
+
is_stroke_dashed: z116.boolean().optional(),
|
|
2623
|
+
ccw_rotation: z116.number().optional()
|
|
2608
2624
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
2609
2625
|
expectTypesMatch(true);
|
|
2610
2626
|
|
|
2611
2627
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
2612
|
-
import { z as
|
|
2613
|
-
var pcb_silkscreen_circle =
|
|
2614
|
-
type:
|
|
2628
|
+
import { z as z117 } from "zod";
|
|
2629
|
+
var pcb_silkscreen_circle = z117.object({
|
|
2630
|
+
type: z117.literal("pcb_silkscreen_circle"),
|
|
2615
2631
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
2616
2632
|
"pcb_silkscreen_circle"
|
|
2617
2633
|
),
|
|
2618
|
-
pcb_component_id:
|
|
2619
|
-
pcb_group_id:
|
|
2620
|
-
subcircuit_id:
|
|
2634
|
+
pcb_component_id: z117.string(),
|
|
2635
|
+
pcb_group_id: z117.string().optional(),
|
|
2636
|
+
subcircuit_id: z117.string().optional(),
|
|
2621
2637
|
center: point,
|
|
2622
2638
|
radius: length,
|
|
2623
2639
|
layer: visible_layer,
|
|
2624
2640
|
stroke_width: length.default("1mm"),
|
|
2625
|
-
is_filled:
|
|
2641
|
+
is_filled: z117.boolean().optional()
|
|
2626
2642
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
2627
2643
|
expectTypesMatch(true);
|
|
2628
2644
|
|
|
2629
2645
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
2630
|
-
import { z as
|
|
2631
|
-
var pcb_silkscreen_oval =
|
|
2632
|
-
type:
|
|
2646
|
+
import { z as z118 } from "zod";
|
|
2647
|
+
var pcb_silkscreen_oval = z118.object({
|
|
2648
|
+
type: z118.literal("pcb_silkscreen_oval"),
|
|
2633
2649
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
2634
|
-
pcb_component_id:
|
|
2635
|
-
pcb_group_id:
|
|
2636
|
-
subcircuit_id:
|
|
2650
|
+
pcb_component_id: z118.string(),
|
|
2651
|
+
pcb_group_id: z118.string().optional(),
|
|
2652
|
+
subcircuit_id: z118.string().optional(),
|
|
2637
2653
|
center: point,
|
|
2638
2654
|
radius_x: distance,
|
|
2639
2655
|
radius_y: distance,
|
|
@@ -2643,240 +2659,240 @@ var pcb_silkscreen_oval = z117.object({
|
|
|
2643
2659
|
expectTypesMatch(true);
|
|
2644
2660
|
|
|
2645
2661
|
// src/pcb/pcb_silkscreen_pill.ts
|
|
2646
|
-
import { z as
|
|
2647
|
-
var pcb_silkscreen_pill =
|
|
2648
|
-
type:
|
|
2662
|
+
import { z as z119 } from "zod";
|
|
2663
|
+
var pcb_silkscreen_pill = z119.object({
|
|
2664
|
+
type: z119.literal("pcb_silkscreen_pill"),
|
|
2649
2665
|
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
2650
|
-
pcb_component_id:
|
|
2651
|
-
pcb_group_id:
|
|
2652
|
-
subcircuit_id:
|
|
2666
|
+
pcb_component_id: z119.string(),
|
|
2667
|
+
pcb_group_id: z119.string().optional(),
|
|
2668
|
+
subcircuit_id: z119.string().optional(),
|
|
2653
2669
|
center: point,
|
|
2654
2670
|
width: length,
|
|
2655
2671
|
height: length,
|
|
2656
2672
|
layer: layer_ref,
|
|
2657
|
-
ccw_rotation:
|
|
2673
|
+
ccw_rotation: z119.number().optional()
|
|
2658
2674
|
}).describe("Defines a silkscreen pill on the PCB");
|
|
2659
2675
|
expectTypesMatch(true);
|
|
2660
2676
|
|
|
2661
2677
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
2662
|
-
import { z as
|
|
2663
|
-
var pcb_fabrication_note_text =
|
|
2664
|
-
type:
|
|
2678
|
+
import { z as z120 } from "zod";
|
|
2679
|
+
var pcb_fabrication_note_text = z120.object({
|
|
2680
|
+
type: z120.literal("pcb_fabrication_note_text"),
|
|
2665
2681
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
2666
2682
|
"pcb_fabrication_note_text"
|
|
2667
2683
|
),
|
|
2668
|
-
subcircuit_id:
|
|
2669
|
-
pcb_group_id:
|
|
2670
|
-
font:
|
|
2684
|
+
subcircuit_id: z120.string().optional(),
|
|
2685
|
+
pcb_group_id: z120.string().optional(),
|
|
2686
|
+
font: z120.literal("tscircuit2024").default("tscircuit2024"),
|
|
2671
2687
|
font_size: distance.default("1mm"),
|
|
2672
|
-
pcb_component_id:
|
|
2673
|
-
text:
|
|
2688
|
+
pcb_component_id: z120.string(),
|
|
2689
|
+
text: z120.string(),
|
|
2674
2690
|
layer: visible_layer,
|
|
2675
2691
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2676
|
-
anchor_alignment:
|
|
2677
|
-
color:
|
|
2692
|
+
anchor_alignment: z120.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2693
|
+
color: z120.string().optional()
|
|
2678
2694
|
}).describe(
|
|
2679
2695
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2680
2696
|
);
|
|
2681
2697
|
expectTypesMatch(true);
|
|
2682
2698
|
|
|
2683
2699
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
2684
|
-
import { z as
|
|
2685
|
-
var pcb_fabrication_note_path =
|
|
2686
|
-
type:
|
|
2700
|
+
import { z as z121 } from "zod";
|
|
2701
|
+
var pcb_fabrication_note_path = z121.object({
|
|
2702
|
+
type: z121.literal("pcb_fabrication_note_path"),
|
|
2687
2703
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
2688
2704
|
"pcb_fabrication_note_path"
|
|
2689
2705
|
),
|
|
2690
|
-
pcb_component_id:
|
|
2691
|
-
subcircuit_id:
|
|
2706
|
+
pcb_component_id: z121.string(),
|
|
2707
|
+
subcircuit_id: z121.string().optional(),
|
|
2692
2708
|
layer: layer_ref,
|
|
2693
|
-
route:
|
|
2709
|
+
route: z121.array(point),
|
|
2694
2710
|
stroke_width: length,
|
|
2695
|
-
color:
|
|
2711
|
+
color: z121.string().optional()
|
|
2696
2712
|
}).describe(
|
|
2697
2713
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
2698
2714
|
);
|
|
2699
2715
|
expectTypesMatch(true);
|
|
2700
2716
|
|
|
2701
2717
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
2702
|
-
import { z as
|
|
2703
|
-
var pcb_fabrication_note_rect =
|
|
2704
|
-
type:
|
|
2718
|
+
import { z as z122 } from "zod";
|
|
2719
|
+
var pcb_fabrication_note_rect = z122.object({
|
|
2720
|
+
type: z122.literal("pcb_fabrication_note_rect"),
|
|
2705
2721
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
2706
2722
|
"pcb_fabrication_note_rect"
|
|
2707
2723
|
),
|
|
2708
|
-
pcb_component_id:
|
|
2709
|
-
pcb_group_id:
|
|
2710
|
-
subcircuit_id:
|
|
2724
|
+
pcb_component_id: z122.string(),
|
|
2725
|
+
pcb_group_id: z122.string().optional(),
|
|
2726
|
+
subcircuit_id: z122.string().optional(),
|
|
2711
2727
|
center: point,
|
|
2712
2728
|
width: length,
|
|
2713
2729
|
height: length,
|
|
2714
2730
|
layer: visible_layer,
|
|
2715
2731
|
stroke_width: length.default("0.1mm"),
|
|
2716
2732
|
corner_radius: length.optional(),
|
|
2717
|
-
is_filled:
|
|
2718
|
-
has_stroke:
|
|
2719
|
-
is_stroke_dashed:
|
|
2720
|
-
color:
|
|
2733
|
+
is_filled: z122.boolean().optional(),
|
|
2734
|
+
has_stroke: z122.boolean().optional(),
|
|
2735
|
+
is_stroke_dashed: z122.boolean().optional(),
|
|
2736
|
+
color: z122.string().optional()
|
|
2721
2737
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
2722
2738
|
expectTypesMatch(true);
|
|
2723
2739
|
|
|
2724
2740
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
2725
|
-
import { z as
|
|
2726
|
-
var pcb_fabrication_note_dimension =
|
|
2727
|
-
type:
|
|
2741
|
+
import { z as z123 } from "zod";
|
|
2742
|
+
var pcb_fabrication_note_dimension = z123.object({
|
|
2743
|
+
type: z123.literal("pcb_fabrication_note_dimension"),
|
|
2728
2744
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
2729
2745
|
"pcb_fabrication_note_dimension"
|
|
2730
2746
|
),
|
|
2731
|
-
pcb_component_id:
|
|
2732
|
-
pcb_group_id:
|
|
2733
|
-
subcircuit_id:
|
|
2747
|
+
pcb_component_id: z123.string(),
|
|
2748
|
+
pcb_group_id: z123.string().optional(),
|
|
2749
|
+
subcircuit_id: z123.string().optional(),
|
|
2734
2750
|
layer: visible_layer,
|
|
2735
2751
|
from: point,
|
|
2736
2752
|
to: point,
|
|
2737
|
-
text:
|
|
2738
|
-
text_ccw_rotation:
|
|
2753
|
+
text: z123.string().optional(),
|
|
2754
|
+
text_ccw_rotation: z123.number().optional(),
|
|
2739
2755
|
offset: length.optional(),
|
|
2740
2756
|
offset_distance: length.optional(),
|
|
2741
|
-
offset_direction:
|
|
2742
|
-
x:
|
|
2743
|
-
y:
|
|
2757
|
+
offset_direction: z123.object({
|
|
2758
|
+
x: z123.number(),
|
|
2759
|
+
y: z123.number()
|
|
2744
2760
|
}).optional(),
|
|
2745
|
-
font:
|
|
2761
|
+
font: z123.literal("tscircuit2024").default("tscircuit2024"),
|
|
2746
2762
|
font_size: length.default("1mm"),
|
|
2747
|
-
color:
|
|
2763
|
+
color: z123.string().optional(),
|
|
2748
2764
|
arrow_size: length.default("1mm")
|
|
2749
2765
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
2750
2766
|
expectTypesMatch(true);
|
|
2751
2767
|
|
|
2752
2768
|
// src/pcb/pcb_note_text.ts
|
|
2753
|
-
import { z as z123 } from "zod";
|
|
2754
|
-
var pcb_note_text = z123.object({
|
|
2755
|
-
type: z123.literal("pcb_note_text"),
|
|
2756
|
-
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2757
|
-
pcb_component_id: z123.string().optional(),
|
|
2758
|
-
pcb_group_id: z123.string().optional(),
|
|
2759
|
-
subcircuit_id: z123.string().optional(),
|
|
2760
|
-
name: z123.string().optional(),
|
|
2761
|
-
font: z123.literal("tscircuit2024").default("tscircuit2024"),
|
|
2762
|
-
font_size: distance.default("1mm"),
|
|
2763
|
-
text: z123.string().optional(),
|
|
2764
|
-
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2765
|
-
anchor_alignment: z123.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2766
|
-
layer: visible_layer.default("top"),
|
|
2767
|
-
color: z123.string().optional()
|
|
2768
|
-
}).describe("Defines a documentation note in text on the PCB");
|
|
2769
|
-
expectTypesMatch(true);
|
|
2770
|
-
|
|
2771
|
-
// src/pcb/pcb_note_rect.ts
|
|
2772
2769
|
import { z as z124 } from "zod";
|
|
2773
|
-
var
|
|
2774
|
-
type: z124.literal("
|
|
2775
|
-
|
|
2770
|
+
var pcb_note_text = z124.object({
|
|
2771
|
+
type: z124.literal("pcb_note_text"),
|
|
2772
|
+
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2776
2773
|
pcb_component_id: z124.string().optional(),
|
|
2777
2774
|
pcb_group_id: z124.string().optional(),
|
|
2778
2775
|
subcircuit_id: z124.string().optional(),
|
|
2779
2776
|
name: z124.string().optional(),
|
|
2777
|
+
font: z124.literal("tscircuit2024").default("tscircuit2024"),
|
|
2778
|
+
font_size: distance.default("1mm"),
|
|
2780
2779
|
text: z124.string().optional(),
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
height: length,
|
|
2780
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2781
|
+
anchor_alignment: z124.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2784
2782
|
layer: visible_layer.default("top"),
|
|
2785
|
-
stroke_width: length.default("0.1mm"),
|
|
2786
|
-
corner_radius: length.optional(),
|
|
2787
|
-
is_filled: z124.boolean().optional(),
|
|
2788
|
-
has_stroke: z124.boolean().optional(),
|
|
2789
|
-
is_stroke_dashed: z124.boolean().optional(),
|
|
2790
2783
|
color: z124.string().optional()
|
|
2791
|
-
}).describe("Defines a
|
|
2784
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
2792
2785
|
expectTypesMatch(true);
|
|
2793
2786
|
|
|
2794
|
-
// src/pcb/
|
|
2787
|
+
// src/pcb/pcb_note_rect.ts
|
|
2795
2788
|
import { z as z125 } from "zod";
|
|
2796
|
-
var
|
|
2797
|
-
type: z125.literal("
|
|
2798
|
-
|
|
2789
|
+
var pcb_note_rect = z125.object({
|
|
2790
|
+
type: z125.literal("pcb_note_rect"),
|
|
2791
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
2799
2792
|
pcb_component_id: z125.string().optional(),
|
|
2800
2793
|
pcb_group_id: z125.string().optional(),
|
|
2801
2794
|
subcircuit_id: z125.string().optional(),
|
|
2802
2795
|
name: z125.string().optional(),
|
|
2803
2796
|
text: z125.string().optional(),
|
|
2804
|
-
|
|
2797
|
+
center: point,
|
|
2798
|
+
width: length,
|
|
2799
|
+
height: length,
|
|
2805
2800
|
layer: visible_layer.default("top"),
|
|
2806
2801
|
stroke_width: length.default("0.1mm"),
|
|
2802
|
+
corner_radius: length.optional(),
|
|
2803
|
+
is_filled: z125.boolean().optional(),
|
|
2804
|
+
has_stroke: z125.boolean().optional(),
|
|
2805
|
+
is_stroke_dashed: z125.boolean().optional(),
|
|
2807
2806
|
color: z125.string().optional()
|
|
2808
|
-
}).describe("Defines a
|
|
2807
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
2809
2808
|
expectTypesMatch(true);
|
|
2810
2809
|
|
|
2811
|
-
// src/pcb/
|
|
2810
|
+
// src/pcb/pcb_note_path.ts
|
|
2812
2811
|
import { z as z126 } from "zod";
|
|
2813
|
-
var
|
|
2814
|
-
type: z126.literal("
|
|
2815
|
-
|
|
2812
|
+
var pcb_note_path = z126.object({
|
|
2813
|
+
type: z126.literal("pcb_note_path"),
|
|
2814
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
2816
2815
|
pcb_component_id: z126.string().optional(),
|
|
2817
2816
|
pcb_group_id: z126.string().optional(),
|
|
2818
2817
|
subcircuit_id: z126.string().optional(),
|
|
2819
2818
|
name: z126.string().optional(),
|
|
2820
2819
|
text: z126.string().optional(),
|
|
2820
|
+
route: z126.array(point),
|
|
2821
|
+
layer: visible_layer.default("top"),
|
|
2822
|
+
stroke_width: length.default("0.1mm"),
|
|
2823
|
+
color: z126.string().optional()
|
|
2824
|
+
}).describe("Defines a polyline documentation note on the PCB");
|
|
2825
|
+
expectTypesMatch(true);
|
|
2826
|
+
|
|
2827
|
+
// src/pcb/pcb_note_line.ts
|
|
2828
|
+
import { z as z127 } from "zod";
|
|
2829
|
+
var pcb_note_line = z127.object({
|
|
2830
|
+
type: z127.literal("pcb_note_line"),
|
|
2831
|
+
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
2832
|
+
pcb_component_id: z127.string().optional(),
|
|
2833
|
+
pcb_group_id: z127.string().optional(),
|
|
2834
|
+
subcircuit_id: z127.string().optional(),
|
|
2835
|
+
name: z127.string().optional(),
|
|
2836
|
+
text: z127.string().optional(),
|
|
2821
2837
|
x1: distance,
|
|
2822
2838
|
y1: distance,
|
|
2823
2839
|
x2: distance,
|
|
2824
2840
|
y2: distance,
|
|
2825
2841
|
layer: visible_layer.default("top"),
|
|
2826
2842
|
stroke_width: distance.default("0.1mm"),
|
|
2827
|
-
color:
|
|
2828
|
-
is_dashed:
|
|
2843
|
+
color: z127.string().optional(),
|
|
2844
|
+
is_dashed: z127.boolean().optional()
|
|
2829
2845
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
2830
2846
|
expectTypesMatch(true);
|
|
2831
2847
|
|
|
2832
2848
|
// src/pcb/pcb_note_dimension.ts
|
|
2833
|
-
import { z as
|
|
2834
|
-
var pcb_note_dimension =
|
|
2835
|
-
type:
|
|
2849
|
+
import { z as z128 } from "zod";
|
|
2850
|
+
var pcb_note_dimension = z128.object({
|
|
2851
|
+
type: z128.literal("pcb_note_dimension"),
|
|
2836
2852
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
2837
|
-
pcb_component_id:
|
|
2838
|
-
pcb_group_id:
|
|
2839
|
-
subcircuit_id:
|
|
2840
|
-
name:
|
|
2853
|
+
pcb_component_id: z128.string().optional(),
|
|
2854
|
+
pcb_group_id: z128.string().optional(),
|
|
2855
|
+
subcircuit_id: z128.string().optional(),
|
|
2856
|
+
name: z128.string().optional(),
|
|
2841
2857
|
from: point,
|
|
2842
2858
|
to: point,
|
|
2843
|
-
text:
|
|
2844
|
-
text_ccw_rotation:
|
|
2859
|
+
text: z128.string().optional(),
|
|
2860
|
+
text_ccw_rotation: z128.number().optional(),
|
|
2845
2861
|
offset_distance: length.optional(),
|
|
2846
|
-
offset_direction:
|
|
2847
|
-
x:
|
|
2848
|
-
y:
|
|
2862
|
+
offset_direction: z128.object({
|
|
2863
|
+
x: z128.number(),
|
|
2864
|
+
y: z128.number()
|
|
2849
2865
|
}).optional(),
|
|
2850
|
-
font:
|
|
2866
|
+
font: z128.literal("tscircuit2024").default("tscircuit2024"),
|
|
2851
2867
|
font_size: length.default("1mm"),
|
|
2852
2868
|
layer: visible_layer.default("top"),
|
|
2853
|
-
color:
|
|
2869
|
+
color: z128.string().optional(),
|
|
2854
2870
|
arrow_size: length.default("1mm")
|
|
2855
2871
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
2856
2872
|
expectTypesMatch(true);
|
|
2857
2873
|
|
|
2858
2874
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
2859
|
-
import { z as
|
|
2875
|
+
import { z as z129 } from "zod";
|
|
2860
2876
|
var pcb_footprint_overlap_error = base_circuit_json_error.extend({
|
|
2861
|
-
type:
|
|
2877
|
+
type: z129.literal("pcb_footprint_overlap_error"),
|
|
2862
2878
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2863
|
-
error_type:
|
|
2864
|
-
pcb_smtpad_ids:
|
|
2865
|
-
pcb_plated_hole_ids:
|
|
2866
|
-
pcb_hole_ids:
|
|
2867
|
-
pcb_keepout_ids:
|
|
2879
|
+
error_type: z129.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
2880
|
+
pcb_smtpad_ids: z129.array(z129.string()).optional(),
|
|
2881
|
+
pcb_plated_hole_ids: z129.array(z129.string()).optional(),
|
|
2882
|
+
pcb_hole_ids: z129.array(z129.string()).optional(),
|
|
2883
|
+
pcb_keepout_ids: z129.array(z129.string()).optional()
|
|
2868
2884
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
2869
2885
|
expectTypesMatch(
|
|
2870
2886
|
true
|
|
2871
2887
|
);
|
|
2872
2888
|
|
|
2873
2889
|
// src/pcb/pcb_courtyard_overlap_error.ts
|
|
2874
|
-
import { z as
|
|
2890
|
+
import { z as z130 } from "zod";
|
|
2875
2891
|
var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
|
|
2876
|
-
type:
|
|
2892
|
+
type: z130.literal("pcb_courtyard_overlap_error"),
|
|
2877
2893
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2878
|
-
error_type:
|
|
2879
|
-
pcb_component_ids:
|
|
2894
|
+
error_type: z130.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
|
|
2895
|
+
pcb_component_ids: z130.tuple([z130.string(), z130.string()])
|
|
2880
2896
|
}).describe(
|
|
2881
2897
|
"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
|
|
2882
2898
|
);
|
|
@@ -2885,49 +2901,49 @@ expectTypesMatch(
|
|
|
2885
2901
|
);
|
|
2886
2902
|
|
|
2887
2903
|
// src/pcb/pcb_keepout.ts
|
|
2888
|
-
import { z as
|
|
2889
|
-
var pcb_keepout =
|
|
2890
|
-
type:
|
|
2891
|
-
shape:
|
|
2892
|
-
pcb_group_id:
|
|
2893
|
-
subcircuit_id:
|
|
2904
|
+
import { z as z131 } from "zod";
|
|
2905
|
+
var pcb_keepout = z131.object({
|
|
2906
|
+
type: z131.literal("pcb_keepout"),
|
|
2907
|
+
shape: z131.literal("rect"),
|
|
2908
|
+
pcb_group_id: z131.string().optional(),
|
|
2909
|
+
subcircuit_id: z131.string().optional(),
|
|
2894
2910
|
center: point,
|
|
2895
2911
|
width: distance,
|
|
2896
2912
|
height: distance,
|
|
2897
|
-
pcb_keepout_id:
|
|
2898
|
-
layers:
|
|
2913
|
+
pcb_keepout_id: z131.string(),
|
|
2914
|
+
layers: z131.array(z131.string()),
|
|
2899
2915
|
// Specify layers where the keepout applies
|
|
2900
|
-
description:
|
|
2916
|
+
description: z131.string().optional()
|
|
2901
2917
|
// Optional description of the keepout
|
|
2902
2918
|
}).or(
|
|
2903
|
-
|
|
2904
|
-
type:
|
|
2905
|
-
shape:
|
|
2906
|
-
pcb_group_id:
|
|
2907
|
-
subcircuit_id:
|
|
2919
|
+
z131.object({
|
|
2920
|
+
type: z131.literal("pcb_keepout"),
|
|
2921
|
+
shape: z131.literal("circle"),
|
|
2922
|
+
pcb_group_id: z131.string().optional(),
|
|
2923
|
+
subcircuit_id: z131.string().optional(),
|
|
2908
2924
|
center: point,
|
|
2909
2925
|
radius: distance,
|
|
2910
|
-
pcb_keepout_id:
|
|
2911
|
-
layers:
|
|
2926
|
+
pcb_keepout_id: z131.string(),
|
|
2927
|
+
layers: z131.array(z131.string()),
|
|
2912
2928
|
// Specify layers where the keepout applies
|
|
2913
|
-
description:
|
|
2929
|
+
description: z131.string().optional()
|
|
2914
2930
|
// Optional description of the keepout
|
|
2915
2931
|
})
|
|
2916
2932
|
);
|
|
2917
2933
|
expectTypesMatch(true);
|
|
2918
2934
|
|
|
2919
2935
|
// src/pcb/pcb_cutout.ts
|
|
2920
|
-
import { z as
|
|
2921
|
-
var pcb_cutout_base =
|
|
2922
|
-
type:
|
|
2936
|
+
import { z as z132 } from "zod";
|
|
2937
|
+
var pcb_cutout_base = z132.object({
|
|
2938
|
+
type: z132.literal("pcb_cutout"),
|
|
2923
2939
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
2924
|
-
pcb_group_id:
|
|
2925
|
-
subcircuit_id:
|
|
2926
|
-
pcb_board_id:
|
|
2927
|
-
pcb_panel_id:
|
|
2940
|
+
pcb_group_id: z132.string().optional(),
|
|
2941
|
+
subcircuit_id: z132.string().optional(),
|
|
2942
|
+
pcb_board_id: z132.string().optional(),
|
|
2943
|
+
pcb_panel_id: z132.string().optional()
|
|
2928
2944
|
});
|
|
2929
2945
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
2930
|
-
shape:
|
|
2946
|
+
shape: z132.literal("rect"),
|
|
2931
2947
|
center: point,
|
|
2932
2948
|
width: length,
|
|
2933
2949
|
height: length,
|
|
@@ -2936,26 +2952,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
2936
2952
|
});
|
|
2937
2953
|
expectTypesMatch(true);
|
|
2938
2954
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
2939
|
-
shape:
|
|
2955
|
+
shape: z132.literal("circle"),
|
|
2940
2956
|
center: point,
|
|
2941
2957
|
radius: length
|
|
2942
2958
|
});
|
|
2943
2959
|
expectTypesMatch(true);
|
|
2944
2960
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
2945
|
-
shape:
|
|
2946
|
-
points:
|
|
2961
|
+
shape: z132.literal("polygon"),
|
|
2962
|
+
points: z132.array(point)
|
|
2947
2963
|
});
|
|
2948
2964
|
expectTypesMatch(true);
|
|
2949
2965
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
2950
|
-
shape:
|
|
2951
|
-
route:
|
|
2966
|
+
shape: z132.literal("path"),
|
|
2967
|
+
route: z132.array(point),
|
|
2952
2968
|
slot_width: length,
|
|
2953
2969
|
slot_length: length.optional(),
|
|
2954
2970
|
space_between_slots: length.optional(),
|
|
2955
2971
|
slot_corner_radius: length.optional()
|
|
2956
2972
|
});
|
|
2957
2973
|
expectTypesMatch(true);
|
|
2958
|
-
var pcb_cutout =
|
|
2974
|
+
var pcb_cutout = z132.discriminatedUnion("shape", [
|
|
2959
2975
|
pcb_cutout_rect,
|
|
2960
2976
|
pcb_cutout_circle,
|
|
2961
2977
|
pcb_cutout_polygon,
|
|
@@ -2964,147 +2980,147 @@ var pcb_cutout = z131.discriminatedUnion("shape", [
|
|
|
2964
2980
|
expectTypesMatch(true);
|
|
2965
2981
|
|
|
2966
2982
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
2967
|
-
import { z as
|
|
2983
|
+
import { z as z133 } from "zod";
|
|
2968
2984
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
2969
|
-
type:
|
|
2985
|
+
type: z133.literal("pcb_missing_footprint_error"),
|
|
2970
2986
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
2971
2987
|
"pcb_missing_footprint_error"
|
|
2972
2988
|
),
|
|
2973
|
-
pcb_group_id:
|
|
2974
|
-
subcircuit_id:
|
|
2975
|
-
error_type:
|
|
2976
|
-
source_component_id:
|
|
2989
|
+
pcb_group_id: z133.string().optional(),
|
|
2990
|
+
subcircuit_id: z133.string().optional(),
|
|
2991
|
+
error_type: z133.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
2992
|
+
source_component_id: z133.string()
|
|
2977
2993
|
}).describe("Defines a missing footprint error on the PCB");
|
|
2978
2994
|
expectTypesMatch(
|
|
2979
2995
|
true
|
|
2980
2996
|
);
|
|
2981
2997
|
|
|
2982
2998
|
// src/pcb/external_footprint_load_error.ts
|
|
2983
|
-
import { z as
|
|
2999
|
+
import { z as z134 } from "zod";
|
|
2984
3000
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
2985
|
-
type:
|
|
3001
|
+
type: z134.literal("external_footprint_load_error"),
|
|
2986
3002
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2987
3003
|
"external_footprint_load_error"
|
|
2988
3004
|
),
|
|
2989
|
-
pcb_component_id:
|
|
2990
|
-
source_component_id:
|
|
2991
|
-
pcb_group_id:
|
|
2992
|
-
subcircuit_id:
|
|
2993
|
-
footprinter_string:
|
|
2994
|
-
error_type:
|
|
3005
|
+
pcb_component_id: z134.string(),
|
|
3006
|
+
source_component_id: z134.string(),
|
|
3007
|
+
pcb_group_id: z134.string().optional(),
|
|
3008
|
+
subcircuit_id: z134.string().optional(),
|
|
3009
|
+
footprinter_string: z134.string().optional(),
|
|
3010
|
+
error_type: z134.literal("external_footprint_load_error").default("external_footprint_load_error")
|
|
2995
3011
|
}).describe("Defines an error when an external footprint fails to load");
|
|
2996
3012
|
expectTypesMatch(true);
|
|
2997
3013
|
|
|
2998
3014
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
2999
|
-
import { z as
|
|
3015
|
+
import { z as z135 } from "zod";
|
|
3000
3016
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
3001
|
-
type:
|
|
3017
|
+
type: z135.literal("circuit_json_footprint_load_error"),
|
|
3002
3018
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3003
3019
|
"circuit_json_footprint_load_error"
|
|
3004
3020
|
),
|
|
3005
|
-
pcb_component_id:
|
|
3006
|
-
source_component_id:
|
|
3007
|
-
pcb_group_id:
|
|
3008
|
-
subcircuit_id:
|
|
3009
|
-
error_type:
|
|
3010
|
-
circuit_json:
|
|
3021
|
+
pcb_component_id: z135.string(),
|
|
3022
|
+
source_component_id: z135.string(),
|
|
3023
|
+
pcb_group_id: z135.string().optional(),
|
|
3024
|
+
subcircuit_id: z135.string().optional(),
|
|
3025
|
+
error_type: z135.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
3026
|
+
circuit_json: z135.array(z135.any()).optional()
|
|
3011
3027
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
3012
3028
|
expectTypesMatch(true);
|
|
3013
3029
|
|
|
3014
3030
|
// src/pcb/pcb_group.ts
|
|
3015
|
-
import { z as
|
|
3016
|
-
var pcb_group =
|
|
3017
|
-
type:
|
|
3031
|
+
import { z as z136 } from "zod";
|
|
3032
|
+
var pcb_group = z136.object({
|
|
3033
|
+
type: z136.literal("pcb_group"),
|
|
3018
3034
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
3019
|
-
source_group_id:
|
|
3020
|
-
is_subcircuit:
|
|
3021
|
-
subcircuit_id:
|
|
3035
|
+
source_group_id: z136.string(),
|
|
3036
|
+
is_subcircuit: z136.boolean().optional(),
|
|
3037
|
+
subcircuit_id: z136.string().optional(),
|
|
3022
3038
|
width: length.optional(),
|
|
3023
3039
|
height: length.optional(),
|
|
3024
3040
|
center: point,
|
|
3025
|
-
display_offset_x:
|
|
3041
|
+
display_offset_x: z136.string().optional().describe(
|
|
3026
3042
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
3027
3043
|
),
|
|
3028
|
-
display_offset_y:
|
|
3044
|
+
display_offset_y: z136.string().optional().describe(
|
|
3029
3045
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
3030
3046
|
),
|
|
3031
|
-
outline:
|
|
3047
|
+
outline: z136.array(point).optional(),
|
|
3032
3048
|
anchor_position: point.optional(),
|
|
3033
3049
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
3034
|
-
position_mode:
|
|
3035
|
-
positioned_relative_to_pcb_group_id:
|
|
3036
|
-
positioned_relative_to_pcb_board_id:
|
|
3037
|
-
pcb_component_ids:
|
|
3038
|
-
child_layout_mode:
|
|
3039
|
-
name:
|
|
3040
|
-
description:
|
|
3041
|
-
layout_mode:
|
|
3042
|
-
autorouter_configuration:
|
|
3050
|
+
position_mode: z136.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
3051
|
+
positioned_relative_to_pcb_group_id: z136.string().optional(),
|
|
3052
|
+
positioned_relative_to_pcb_board_id: z136.string().optional(),
|
|
3053
|
+
pcb_component_ids: z136.array(z136.string()),
|
|
3054
|
+
child_layout_mode: z136.enum(["packed", "none"]).optional(),
|
|
3055
|
+
name: z136.string().optional(),
|
|
3056
|
+
description: z136.string().optional(),
|
|
3057
|
+
layout_mode: z136.string().optional(),
|
|
3058
|
+
autorouter_configuration: z136.object({
|
|
3043
3059
|
trace_clearance: length
|
|
3044
3060
|
}).optional(),
|
|
3045
|
-
autorouter_used_string:
|
|
3061
|
+
autorouter_used_string: z136.string().optional()
|
|
3046
3062
|
}).describe("Defines a group of components on the PCB");
|
|
3047
3063
|
expectTypesMatch(true);
|
|
3048
3064
|
|
|
3049
3065
|
// src/pcb/pcb_autorouting_error.ts
|
|
3050
|
-
import { z as
|
|
3066
|
+
import { z as z137 } from "zod";
|
|
3051
3067
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
3052
|
-
type:
|
|
3068
|
+
type: z137.literal("pcb_autorouting_error"),
|
|
3053
3069
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
3054
|
-
error_type:
|
|
3055
|
-
subcircuit_id:
|
|
3070
|
+
error_type: z137.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
3071
|
+
subcircuit_id: z137.string().optional()
|
|
3056
3072
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
3057
3073
|
expectTypesMatch(true);
|
|
3058
3074
|
|
|
3059
3075
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
3060
|
-
import { z as
|
|
3061
|
-
var pcb_manual_edit_conflict_warning =
|
|
3062
|
-
type:
|
|
3076
|
+
import { z as z138 } from "zod";
|
|
3077
|
+
var pcb_manual_edit_conflict_warning = z138.object({
|
|
3078
|
+
type: z138.literal("pcb_manual_edit_conflict_warning"),
|
|
3063
3079
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
3064
3080
|
"pcb_manual_edit_conflict_warning"
|
|
3065
3081
|
),
|
|
3066
|
-
warning_type:
|
|
3067
|
-
message:
|
|
3068
|
-
pcb_component_id:
|
|
3069
|
-
pcb_group_id:
|
|
3070
|
-
subcircuit_id:
|
|
3071
|
-
source_component_id:
|
|
3082
|
+
warning_type: z138.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
3083
|
+
message: z138.string(),
|
|
3084
|
+
pcb_component_id: z138.string(),
|
|
3085
|
+
pcb_group_id: z138.string().optional(),
|
|
3086
|
+
subcircuit_id: z138.string().optional(),
|
|
3087
|
+
source_component_id: z138.string()
|
|
3072
3088
|
}).describe(
|
|
3073
3089
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
3074
3090
|
);
|
|
3075
3091
|
expectTypesMatch(true);
|
|
3076
3092
|
|
|
3077
3093
|
// src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts
|
|
3078
|
-
import { z as
|
|
3079
|
-
var connectorOrientationDirection =
|
|
3080
|
-
var pcb_connector_not_in_accessible_orientation_warning =
|
|
3081
|
-
type:
|
|
3094
|
+
import { z as z139 } from "zod";
|
|
3095
|
+
var connectorOrientationDirection = z139.enum(["x-", "x+", "y+", "y-"]);
|
|
3096
|
+
var pcb_connector_not_in_accessible_orientation_warning = z139.object({
|
|
3097
|
+
type: z139.literal("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3082
3098
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
3083
3099
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
3084
3100
|
),
|
|
3085
|
-
warning_type:
|
|
3086
|
-
message:
|
|
3087
|
-
pcb_component_id:
|
|
3088
|
-
source_component_id:
|
|
3089
|
-
pcb_board_id:
|
|
3101
|
+
warning_type: z139.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3102
|
+
message: z139.string(),
|
|
3103
|
+
pcb_component_id: z139.string(),
|
|
3104
|
+
source_component_id: z139.string().optional(),
|
|
3105
|
+
pcb_board_id: z139.string().optional(),
|
|
3090
3106
|
facing_direction: connectorOrientationDirection,
|
|
3091
3107
|
recommended_facing_direction: connectorOrientationDirection,
|
|
3092
|
-
subcircuit_id:
|
|
3108
|
+
subcircuit_id: z139.string().optional()
|
|
3093
3109
|
}).describe(
|
|
3094
3110
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
3095
3111
|
);
|
|
3096
3112
|
expectTypesMatch(true);
|
|
3097
3113
|
|
|
3098
3114
|
// src/pcb/pcb_breakout_point.ts
|
|
3099
|
-
import { z as
|
|
3100
|
-
var pcb_breakout_point =
|
|
3101
|
-
type:
|
|
3115
|
+
import { z as z140 } from "zod";
|
|
3116
|
+
var pcb_breakout_point = z140.object({
|
|
3117
|
+
type: z140.literal("pcb_breakout_point"),
|
|
3102
3118
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
3103
|
-
pcb_group_id:
|
|
3104
|
-
subcircuit_id:
|
|
3105
|
-
source_trace_id:
|
|
3106
|
-
source_port_id:
|
|
3107
|
-
source_net_id:
|
|
3119
|
+
pcb_group_id: z140.string(),
|
|
3120
|
+
subcircuit_id: z140.string().optional(),
|
|
3121
|
+
source_trace_id: z140.string().optional(),
|
|
3122
|
+
source_port_id: z140.string().optional(),
|
|
3123
|
+
source_net_id: z140.string().optional(),
|
|
3108
3124
|
x: distance,
|
|
3109
3125
|
y: distance
|
|
3110
3126
|
}).describe(
|
|
@@ -3113,61 +3129,61 @@ var pcb_breakout_point = z139.object({
|
|
|
3113
3129
|
expectTypesMatch(true);
|
|
3114
3130
|
|
|
3115
3131
|
// src/pcb/pcb_ground_plane.ts
|
|
3116
|
-
import { z as
|
|
3117
|
-
var pcb_ground_plane =
|
|
3118
|
-
type:
|
|
3132
|
+
import { z as z141 } from "zod";
|
|
3133
|
+
var pcb_ground_plane = z141.object({
|
|
3134
|
+
type: z141.literal("pcb_ground_plane"),
|
|
3119
3135
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
3120
|
-
source_pcb_ground_plane_id:
|
|
3121
|
-
source_net_id:
|
|
3122
|
-
pcb_group_id:
|
|
3123
|
-
subcircuit_id:
|
|
3136
|
+
source_pcb_ground_plane_id: z141.string(),
|
|
3137
|
+
source_net_id: z141.string(),
|
|
3138
|
+
pcb_group_id: z141.string().optional(),
|
|
3139
|
+
subcircuit_id: z141.string().optional()
|
|
3124
3140
|
}).describe("Defines a ground plane on the PCB");
|
|
3125
3141
|
expectTypesMatch(true);
|
|
3126
3142
|
|
|
3127
3143
|
// src/pcb/pcb_ground_plane_region.ts
|
|
3128
|
-
import { z as
|
|
3129
|
-
var pcb_ground_plane_region =
|
|
3130
|
-
type:
|
|
3144
|
+
import { z as z142 } from "zod";
|
|
3145
|
+
var pcb_ground_plane_region = z142.object({
|
|
3146
|
+
type: z142.literal("pcb_ground_plane_region"),
|
|
3131
3147
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
3132
3148
|
"pcb_ground_plane_region"
|
|
3133
3149
|
),
|
|
3134
|
-
pcb_ground_plane_id:
|
|
3135
|
-
pcb_group_id:
|
|
3136
|
-
subcircuit_id:
|
|
3150
|
+
pcb_ground_plane_id: z142.string(),
|
|
3151
|
+
pcb_group_id: z142.string().optional(),
|
|
3152
|
+
subcircuit_id: z142.string().optional(),
|
|
3137
3153
|
layer: layer_ref,
|
|
3138
|
-
points:
|
|
3154
|
+
points: z142.array(point)
|
|
3139
3155
|
}).describe("Defines a polygon region of a ground plane");
|
|
3140
3156
|
expectTypesMatch(true);
|
|
3141
3157
|
|
|
3142
3158
|
// src/pcb/pcb_thermal_spoke.ts
|
|
3143
|
-
import { z as
|
|
3144
|
-
var pcb_thermal_spoke =
|
|
3145
|
-
type:
|
|
3159
|
+
import { z as z143 } from "zod";
|
|
3160
|
+
var pcb_thermal_spoke = z143.object({
|
|
3161
|
+
type: z143.literal("pcb_thermal_spoke"),
|
|
3146
3162
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
3147
|
-
pcb_ground_plane_id:
|
|
3148
|
-
shape:
|
|
3149
|
-
spoke_count:
|
|
3163
|
+
pcb_ground_plane_id: z143.string(),
|
|
3164
|
+
shape: z143.string(),
|
|
3165
|
+
spoke_count: z143.number(),
|
|
3150
3166
|
spoke_thickness: distance,
|
|
3151
3167
|
spoke_inner_diameter: distance,
|
|
3152
3168
|
spoke_outer_diameter: distance,
|
|
3153
|
-
pcb_plated_hole_id:
|
|
3154
|
-
subcircuit_id:
|
|
3169
|
+
pcb_plated_hole_id: z143.string().optional(),
|
|
3170
|
+
subcircuit_id: z143.string().optional()
|
|
3155
3171
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
3156
3172
|
expectTypesMatch(true);
|
|
3157
3173
|
|
|
3158
3174
|
// src/pcb/pcb_copper_pour.ts
|
|
3159
|
-
import { z as
|
|
3160
|
-
var pcb_copper_pour_base =
|
|
3161
|
-
type:
|
|
3175
|
+
import { z as z144 } from "zod";
|
|
3176
|
+
var pcb_copper_pour_base = z144.object({
|
|
3177
|
+
type: z144.literal("pcb_copper_pour"),
|
|
3162
3178
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
3163
|
-
pcb_group_id:
|
|
3164
|
-
subcircuit_id:
|
|
3179
|
+
pcb_group_id: z144.string().optional(),
|
|
3180
|
+
subcircuit_id: z144.string().optional(),
|
|
3165
3181
|
layer: layer_ref,
|
|
3166
|
-
source_net_id:
|
|
3167
|
-
covered_with_solder_mask:
|
|
3182
|
+
source_net_id: z144.string().optional(),
|
|
3183
|
+
covered_with_solder_mask: z144.boolean().optional().default(true)
|
|
3168
3184
|
});
|
|
3169
3185
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
3170
|
-
shape:
|
|
3186
|
+
shape: z144.literal("rect"),
|
|
3171
3187
|
center: point,
|
|
3172
3188
|
width: length,
|
|
3173
3189
|
height: length,
|
|
@@ -3175,16 +3191,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
3175
3191
|
});
|
|
3176
3192
|
expectTypesMatch(true);
|
|
3177
3193
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
3178
|
-
shape:
|
|
3194
|
+
shape: z144.literal("brep"),
|
|
3179
3195
|
brep_shape
|
|
3180
3196
|
});
|
|
3181
3197
|
expectTypesMatch(true);
|
|
3182
3198
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
3183
|
-
shape:
|
|
3184
|
-
points:
|
|
3199
|
+
shape: z144.literal("polygon"),
|
|
3200
|
+
points: z144.array(point)
|
|
3185
3201
|
});
|
|
3186
3202
|
expectTypesMatch(true);
|
|
3187
|
-
var pcb_copper_pour =
|
|
3203
|
+
var pcb_copper_pour = z144.discriminatedUnion("shape", [
|
|
3188
3204
|
pcb_copper_pour_rect,
|
|
3189
3205
|
pcb_copper_pour_brep,
|
|
3190
3206
|
pcb_copper_pour_polygon
|
|
@@ -3192,149 +3208,149 @@ var pcb_copper_pour = z143.discriminatedUnion("shape", [
|
|
|
3192
3208
|
expectTypesMatch(true);
|
|
3193
3209
|
|
|
3194
3210
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
3195
|
-
import { z as
|
|
3211
|
+
import { z as z145 } from "zod";
|
|
3196
3212
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
3197
|
-
type:
|
|
3213
|
+
type: z145.literal("pcb_component_outside_board_error"),
|
|
3198
3214
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
3199
3215
|
"pcb_component_outside_board_error"
|
|
3200
3216
|
),
|
|
3201
|
-
error_type:
|
|
3202
|
-
pcb_component_id:
|
|
3203
|
-
pcb_board_id:
|
|
3217
|
+
error_type: z145.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
3218
|
+
pcb_component_id: z145.string(),
|
|
3219
|
+
pcb_board_id: z145.string(),
|
|
3204
3220
|
component_center: point,
|
|
3205
|
-
component_bounds:
|
|
3206
|
-
min_x:
|
|
3207
|
-
max_x:
|
|
3208
|
-
min_y:
|
|
3209
|
-
max_y:
|
|
3221
|
+
component_bounds: z145.object({
|
|
3222
|
+
min_x: z145.number(),
|
|
3223
|
+
max_x: z145.number(),
|
|
3224
|
+
min_y: z145.number(),
|
|
3225
|
+
max_y: z145.number()
|
|
3210
3226
|
}),
|
|
3211
|
-
subcircuit_id:
|
|
3212
|
-
source_component_id:
|
|
3227
|
+
subcircuit_id: z145.string().optional(),
|
|
3228
|
+
source_component_id: z145.string().optional()
|
|
3213
3229
|
}).describe(
|
|
3214
3230
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
3215
3231
|
);
|
|
3216
3232
|
expectTypesMatch(true);
|
|
3217
3233
|
|
|
3218
3234
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
3219
|
-
import { z as
|
|
3235
|
+
import { z as z146 } from "zod";
|
|
3220
3236
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
3221
|
-
type:
|
|
3237
|
+
type: z146.literal("pcb_component_not_on_board_edge_error"),
|
|
3222
3238
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
3223
3239
|
"pcb_component_not_on_board_edge_error"
|
|
3224
3240
|
),
|
|
3225
|
-
error_type:
|
|
3226
|
-
pcb_component_id:
|
|
3227
|
-
pcb_board_id:
|
|
3241
|
+
error_type: z146.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
3242
|
+
pcb_component_id: z146.string(),
|
|
3243
|
+
pcb_board_id: z146.string(),
|
|
3228
3244
|
component_center: point,
|
|
3229
|
-
pad_to_nearest_board_edge_distance:
|
|
3230
|
-
source_component_id:
|
|
3231
|
-
subcircuit_id:
|
|
3245
|
+
pad_to_nearest_board_edge_distance: z146.number(),
|
|
3246
|
+
source_component_id: z146.string().optional(),
|
|
3247
|
+
subcircuit_id: z146.string().optional()
|
|
3232
3248
|
}).describe(
|
|
3233
3249
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
3234
3250
|
);
|
|
3235
3251
|
expectTypesMatch(true);
|
|
3236
3252
|
|
|
3237
3253
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
3238
|
-
import { z as
|
|
3254
|
+
import { z as z147 } from "zod";
|
|
3239
3255
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
3240
|
-
type:
|
|
3256
|
+
type: z147.literal("pcb_component_invalid_layer_error"),
|
|
3241
3257
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
3242
3258
|
"pcb_component_invalid_layer_error"
|
|
3243
3259
|
),
|
|
3244
|
-
error_type:
|
|
3245
|
-
pcb_component_id:
|
|
3246
|
-
source_component_id:
|
|
3260
|
+
error_type: z147.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
3261
|
+
pcb_component_id: z147.string().optional(),
|
|
3262
|
+
source_component_id: z147.string(),
|
|
3247
3263
|
layer: layer_ref,
|
|
3248
|
-
subcircuit_id:
|
|
3264
|
+
subcircuit_id: z147.string().optional()
|
|
3249
3265
|
}).describe(
|
|
3250
3266
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
3251
3267
|
);
|
|
3252
3268
|
expectTypesMatch(true);
|
|
3253
3269
|
|
|
3254
3270
|
// src/pcb/pcb_via_clearance_error.ts
|
|
3255
|
-
import { z as
|
|
3271
|
+
import { z as z148 } from "zod";
|
|
3256
3272
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
3257
|
-
type:
|
|
3273
|
+
type: z148.literal("pcb_via_clearance_error"),
|
|
3258
3274
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3259
|
-
error_type:
|
|
3260
|
-
pcb_via_ids:
|
|
3275
|
+
error_type: z148.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
3276
|
+
pcb_via_ids: z148.array(z148.string()).min(2),
|
|
3261
3277
|
minimum_clearance: distance.optional(),
|
|
3262
3278
|
actual_clearance: distance.optional(),
|
|
3263
|
-
pcb_center:
|
|
3264
|
-
x:
|
|
3265
|
-
y:
|
|
3279
|
+
pcb_center: z148.object({
|
|
3280
|
+
x: z148.number().optional(),
|
|
3281
|
+
y: z148.number().optional()
|
|
3266
3282
|
}).optional(),
|
|
3267
|
-
subcircuit_id:
|
|
3283
|
+
subcircuit_id: z148.string().optional()
|
|
3268
3284
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
3269
3285
|
expectTypesMatch(true);
|
|
3270
3286
|
|
|
3271
3287
|
// src/pcb/pcb_courtyard_rect.ts
|
|
3272
|
-
import { z as
|
|
3273
|
-
var pcb_courtyard_rect =
|
|
3274
|
-
type:
|
|
3288
|
+
import { z as z149 } from "zod";
|
|
3289
|
+
var pcb_courtyard_rect = z149.object({
|
|
3290
|
+
type: z149.literal("pcb_courtyard_rect"),
|
|
3275
3291
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
3276
|
-
pcb_component_id:
|
|
3277
|
-
pcb_group_id:
|
|
3278
|
-
subcircuit_id:
|
|
3292
|
+
pcb_component_id: z149.string(),
|
|
3293
|
+
pcb_group_id: z149.string().optional(),
|
|
3294
|
+
subcircuit_id: z149.string().optional(),
|
|
3279
3295
|
center: point,
|
|
3280
3296
|
width: length,
|
|
3281
3297
|
height: length,
|
|
3282
3298
|
layer: visible_layer,
|
|
3283
3299
|
ccw_rotation: rotation.optional(),
|
|
3284
|
-
color:
|
|
3300
|
+
color: z149.string().optional()
|
|
3285
3301
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
3286
3302
|
expectTypesMatch(true);
|
|
3287
3303
|
|
|
3288
3304
|
// src/pcb/pcb_courtyard_outline.ts
|
|
3289
|
-
import { z as
|
|
3290
|
-
var pcb_courtyard_outline =
|
|
3291
|
-
type:
|
|
3305
|
+
import { z as z150 } from "zod";
|
|
3306
|
+
var pcb_courtyard_outline = z150.object({
|
|
3307
|
+
type: z150.literal("pcb_courtyard_outline"),
|
|
3292
3308
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
3293
3309
|
"pcb_courtyard_outline"
|
|
3294
3310
|
),
|
|
3295
|
-
pcb_component_id:
|
|
3296
|
-
pcb_group_id:
|
|
3297
|
-
subcircuit_id:
|
|
3311
|
+
pcb_component_id: z150.string(),
|
|
3312
|
+
pcb_group_id: z150.string().optional(),
|
|
3313
|
+
subcircuit_id: z150.string().optional(),
|
|
3298
3314
|
layer: visible_layer,
|
|
3299
|
-
outline:
|
|
3315
|
+
outline: z150.array(point).min(2)
|
|
3300
3316
|
}).describe("Defines a courtyard outline on the PCB");
|
|
3301
3317
|
expectTypesMatch(true);
|
|
3302
3318
|
|
|
3303
3319
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
3304
|
-
import { z as
|
|
3305
|
-
var pcb_courtyard_polygon =
|
|
3306
|
-
type:
|
|
3320
|
+
import { z as z151 } from "zod";
|
|
3321
|
+
var pcb_courtyard_polygon = z151.object({
|
|
3322
|
+
type: z151.literal("pcb_courtyard_polygon"),
|
|
3307
3323
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
3308
3324
|
"pcb_courtyard_polygon"
|
|
3309
3325
|
),
|
|
3310
|
-
pcb_component_id:
|
|
3311
|
-
pcb_group_id:
|
|
3312
|
-
subcircuit_id:
|
|
3326
|
+
pcb_component_id: z151.string(),
|
|
3327
|
+
pcb_group_id: z151.string().optional(),
|
|
3328
|
+
subcircuit_id: z151.string().optional(),
|
|
3313
3329
|
layer: visible_layer,
|
|
3314
|
-
points:
|
|
3315
|
-
color:
|
|
3330
|
+
points: z151.array(point).min(3),
|
|
3331
|
+
color: z151.string().optional()
|
|
3316
3332
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
3317
3333
|
expectTypesMatch(true);
|
|
3318
3334
|
|
|
3319
3335
|
// src/pcb/pcb_courtyard_circle.ts
|
|
3320
|
-
import { z as
|
|
3321
|
-
var pcb_courtyard_circle =
|
|
3322
|
-
type:
|
|
3336
|
+
import { z as z152 } from "zod";
|
|
3337
|
+
var pcb_courtyard_circle = z152.object({
|
|
3338
|
+
type: z152.literal("pcb_courtyard_circle"),
|
|
3323
3339
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
3324
3340
|
"pcb_courtyard_circle"
|
|
3325
3341
|
),
|
|
3326
|
-
pcb_component_id:
|
|
3327
|
-
pcb_group_id:
|
|
3328
|
-
subcircuit_id:
|
|
3342
|
+
pcb_component_id: z152.string(),
|
|
3343
|
+
pcb_group_id: z152.string().optional(),
|
|
3344
|
+
subcircuit_id: z152.string().optional(),
|
|
3329
3345
|
center: point,
|
|
3330
3346
|
radius: length,
|
|
3331
3347
|
layer: visible_layer,
|
|
3332
|
-
color:
|
|
3348
|
+
color: z152.string().optional()
|
|
3333
3349
|
}).describe("Defines a courtyard circle on the PCB");
|
|
3334
3350
|
expectTypesMatch(true);
|
|
3335
3351
|
|
|
3336
3352
|
// src/cad/cad_component.ts
|
|
3337
|
-
import { z as
|
|
3353
|
+
import { z as z153 } from "zod";
|
|
3338
3354
|
|
|
3339
3355
|
// src/cad/cad_model_conventions.ts
|
|
3340
3356
|
var cad_model_formats = [
|
|
@@ -3365,48 +3381,48 @@ var cadModelDefaultDirectionMap = {
|
|
|
3365
3381
|
};
|
|
3366
3382
|
|
|
3367
3383
|
// src/cad/cad_component.ts
|
|
3368
|
-
var cad_component =
|
|
3369
|
-
type:
|
|
3370
|
-
cad_component_id:
|
|
3371
|
-
pcb_component_id:
|
|
3372
|
-
source_component_id:
|
|
3384
|
+
var cad_component = z153.object({
|
|
3385
|
+
type: z153.literal("cad_component"),
|
|
3386
|
+
cad_component_id: z153.string(),
|
|
3387
|
+
pcb_component_id: z153.string(),
|
|
3388
|
+
source_component_id: z153.string(),
|
|
3373
3389
|
position: point3,
|
|
3374
3390
|
rotation: point3.optional(),
|
|
3375
3391
|
size: point3.optional(),
|
|
3376
3392
|
layer: layer_ref.optional(),
|
|
3377
|
-
subcircuit_id:
|
|
3393
|
+
subcircuit_id: z153.string().optional(),
|
|
3378
3394
|
// These are all ways to generate/load the 3d model
|
|
3379
|
-
footprinter_string:
|
|
3380
|
-
model_obj_url:
|
|
3381
|
-
model_stl_url:
|
|
3382
|
-
model_3mf_url:
|
|
3383
|
-
model_gltf_url:
|
|
3384
|
-
model_glb_url:
|
|
3385
|
-
model_step_url:
|
|
3386
|
-
model_wrl_url:
|
|
3395
|
+
footprinter_string: z153.string().optional(),
|
|
3396
|
+
model_obj_url: z153.string().optional(),
|
|
3397
|
+
model_stl_url: z153.string().optional(),
|
|
3398
|
+
model_3mf_url: z153.string().optional(),
|
|
3399
|
+
model_gltf_url: z153.string().optional(),
|
|
3400
|
+
model_glb_url: z153.string().optional(),
|
|
3401
|
+
model_step_url: z153.string().optional(),
|
|
3402
|
+
model_wrl_url: z153.string().optional(),
|
|
3387
3403
|
model_asset: asset.optional(),
|
|
3388
|
-
model_unit_to_mm_scale_factor:
|
|
3389
|
-
model_board_normal_direction:
|
|
3404
|
+
model_unit_to_mm_scale_factor: z153.number().optional(),
|
|
3405
|
+
model_board_normal_direction: z153.enum(cad_model_axis_directions).optional().describe(
|
|
3390
3406
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
3391
3407
|
),
|
|
3392
3408
|
model_origin_position: point3.optional(),
|
|
3393
|
-
model_origin_alignment:
|
|
3409
|
+
model_origin_alignment: z153.enum([
|
|
3394
3410
|
"unknown",
|
|
3395
3411
|
"center",
|
|
3396
3412
|
"center_of_component_on_board_surface",
|
|
3397
3413
|
"bottom_center_of_component"
|
|
3398
3414
|
]).optional(),
|
|
3399
|
-
model_object_fit:
|
|
3400
|
-
model_jscad:
|
|
3401
|
-
show_as_translucent_model:
|
|
3402
|
-
anchor_alignment:
|
|
3415
|
+
model_object_fit: z153.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
3416
|
+
model_jscad: z153.any().optional(),
|
|
3417
|
+
show_as_translucent_model: z153.boolean().optional(),
|
|
3418
|
+
anchor_alignment: z153.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
3403
3419
|
}).describe("Defines a component on the PCB");
|
|
3404
3420
|
expectTypesMatch(true);
|
|
3405
3421
|
|
|
3406
3422
|
// src/simulation/simulation_voltage_source.ts
|
|
3407
|
-
import { z as
|
|
3408
|
-
var wave_shape =
|
|
3409
|
-
var percentage =
|
|
3423
|
+
import { z as z154 } from "zod";
|
|
3424
|
+
var wave_shape = z154.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
3425
|
+
var percentage = z154.union([z154.string(), z154.number()]).transform((val) => {
|
|
3410
3426
|
if (typeof val === "string") {
|
|
3411
3427
|
if (val.endsWith("%")) {
|
|
3412
3428
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3415,30 +3431,30 @@ var percentage = z153.union([z153.string(), z153.number()]).transform((val) => {
|
|
|
3415
3431
|
}
|
|
3416
3432
|
return val;
|
|
3417
3433
|
}).pipe(
|
|
3418
|
-
|
|
3434
|
+
z154.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3419
3435
|
);
|
|
3420
|
-
var simulation_dc_voltage_source =
|
|
3421
|
-
type:
|
|
3436
|
+
var simulation_dc_voltage_source = z154.object({
|
|
3437
|
+
type: z154.literal("simulation_voltage_source"),
|
|
3422
3438
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3423
3439
|
"simulation_voltage_source"
|
|
3424
3440
|
),
|
|
3425
|
-
is_dc_source:
|
|
3426
|
-
positive_source_port_id:
|
|
3427
|
-
negative_source_port_id:
|
|
3428
|
-
positive_source_net_id:
|
|
3429
|
-
negative_source_net_id:
|
|
3441
|
+
is_dc_source: z154.literal(true).optional().default(true),
|
|
3442
|
+
positive_source_port_id: z154.string().optional(),
|
|
3443
|
+
negative_source_port_id: z154.string().optional(),
|
|
3444
|
+
positive_source_net_id: z154.string().optional(),
|
|
3445
|
+
negative_source_net_id: z154.string().optional(),
|
|
3430
3446
|
voltage
|
|
3431
3447
|
}).describe("Defines a DC voltage source for simulation");
|
|
3432
|
-
var simulation_ac_voltage_source =
|
|
3433
|
-
type:
|
|
3448
|
+
var simulation_ac_voltage_source = z154.object({
|
|
3449
|
+
type: z154.literal("simulation_voltage_source"),
|
|
3434
3450
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3435
3451
|
"simulation_voltage_source"
|
|
3436
3452
|
),
|
|
3437
|
-
is_dc_source:
|
|
3438
|
-
terminal1_source_port_id:
|
|
3439
|
-
terminal2_source_port_id:
|
|
3440
|
-
terminal1_source_net_id:
|
|
3441
|
-
terminal2_source_net_id:
|
|
3453
|
+
is_dc_source: z154.literal(false),
|
|
3454
|
+
terminal1_source_port_id: z154.string().optional(),
|
|
3455
|
+
terminal2_source_port_id: z154.string().optional(),
|
|
3456
|
+
terminal1_source_net_id: z154.string().optional(),
|
|
3457
|
+
terminal2_source_net_id: z154.string().optional(),
|
|
3442
3458
|
voltage: voltage.optional(),
|
|
3443
3459
|
frequency: frequency.optional(),
|
|
3444
3460
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -3446,14 +3462,14 @@ var simulation_ac_voltage_source = z153.object({
|
|
|
3446
3462
|
phase: rotation.optional(),
|
|
3447
3463
|
duty_cycle: percentage.optional()
|
|
3448
3464
|
}).describe("Defines an AC voltage source for simulation");
|
|
3449
|
-
var simulation_voltage_source =
|
|
3465
|
+
var simulation_voltage_source = z154.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
3450
3466
|
expectTypesMatch(true);
|
|
3451
3467
|
expectTypesMatch(true);
|
|
3452
3468
|
expectTypesMatch(true);
|
|
3453
3469
|
|
|
3454
3470
|
// src/simulation/simulation_current_source.ts
|
|
3455
|
-
import { z as
|
|
3456
|
-
var percentage2 =
|
|
3471
|
+
import { z as z155 } from "zod";
|
|
3472
|
+
var percentage2 = z155.union([z155.string(), z155.number()]).transform((val) => {
|
|
3457
3473
|
if (typeof val === "string") {
|
|
3458
3474
|
if (val.endsWith("%")) {
|
|
3459
3475
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3462,30 +3478,30 @@ var percentage2 = z154.union([z154.string(), z154.number()]).transform((val) =>
|
|
|
3462
3478
|
}
|
|
3463
3479
|
return val;
|
|
3464
3480
|
}).pipe(
|
|
3465
|
-
|
|
3481
|
+
z155.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3466
3482
|
);
|
|
3467
|
-
var simulation_dc_current_source =
|
|
3468
|
-
type:
|
|
3483
|
+
var simulation_dc_current_source = z155.object({
|
|
3484
|
+
type: z155.literal("simulation_current_source"),
|
|
3469
3485
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3470
3486
|
"simulation_current_source"
|
|
3471
3487
|
),
|
|
3472
|
-
is_dc_source:
|
|
3473
|
-
positive_source_port_id:
|
|
3474
|
-
negative_source_port_id:
|
|
3475
|
-
positive_source_net_id:
|
|
3476
|
-
negative_source_net_id:
|
|
3488
|
+
is_dc_source: z155.literal(true).optional().default(true),
|
|
3489
|
+
positive_source_port_id: z155.string().optional(),
|
|
3490
|
+
negative_source_port_id: z155.string().optional(),
|
|
3491
|
+
positive_source_net_id: z155.string().optional(),
|
|
3492
|
+
negative_source_net_id: z155.string().optional(),
|
|
3477
3493
|
current
|
|
3478
3494
|
}).describe("Defines a DC current source for simulation");
|
|
3479
|
-
var simulation_ac_current_source =
|
|
3480
|
-
type:
|
|
3495
|
+
var simulation_ac_current_source = z155.object({
|
|
3496
|
+
type: z155.literal("simulation_current_source"),
|
|
3481
3497
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3482
3498
|
"simulation_current_source"
|
|
3483
3499
|
),
|
|
3484
|
-
is_dc_source:
|
|
3485
|
-
terminal1_source_port_id:
|
|
3486
|
-
terminal2_source_port_id:
|
|
3487
|
-
terminal1_source_net_id:
|
|
3488
|
-
terminal2_source_net_id:
|
|
3500
|
+
is_dc_source: z155.literal(false),
|
|
3501
|
+
terminal1_source_port_id: z155.string().optional(),
|
|
3502
|
+
terminal2_source_port_id: z155.string().optional(),
|
|
3503
|
+
terminal1_source_net_id: z155.string().optional(),
|
|
3504
|
+
terminal2_source_net_id: z155.string().optional(),
|
|
3489
3505
|
current: current.optional(),
|
|
3490
3506
|
frequency: frequency.optional(),
|
|
3491
3507
|
peak_to_peak_current: current.optional(),
|
|
@@ -3493,25 +3509,25 @@ var simulation_ac_current_source = z154.object({
|
|
|
3493
3509
|
phase: rotation.optional(),
|
|
3494
3510
|
duty_cycle: percentage2.optional()
|
|
3495
3511
|
}).describe("Defines an AC current source for simulation");
|
|
3496
|
-
var simulation_current_source =
|
|
3512
|
+
var simulation_current_source = z155.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
3497
3513
|
expectTypesMatch(true);
|
|
3498
3514
|
expectTypesMatch(true);
|
|
3499
3515
|
expectTypesMatch(true);
|
|
3500
3516
|
|
|
3501
3517
|
// src/simulation/simulation_experiment.ts
|
|
3502
|
-
import { z as
|
|
3503
|
-
var experiment_type =
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3518
|
+
import { z as z156 } from "zod";
|
|
3519
|
+
var experiment_type = z156.union([
|
|
3520
|
+
z156.literal("spice_dc_sweep"),
|
|
3521
|
+
z156.literal("spice_dc_operating_point"),
|
|
3522
|
+
z156.literal("spice_transient_analysis"),
|
|
3523
|
+
z156.literal("spice_ac_analysis")
|
|
3508
3524
|
]);
|
|
3509
|
-
var simulation_experiment =
|
|
3510
|
-
type:
|
|
3525
|
+
var simulation_experiment = z156.object({
|
|
3526
|
+
type: z156.literal("simulation_experiment"),
|
|
3511
3527
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
3512
3528
|
"simulation_experiment"
|
|
3513
3529
|
),
|
|
3514
|
-
name:
|
|
3530
|
+
name: z156.string(),
|
|
3515
3531
|
experiment_type,
|
|
3516
3532
|
time_per_step: duration_ms.optional(),
|
|
3517
3533
|
start_time_ms: ms.optional(),
|
|
@@ -3520,53 +3536,53 @@ var simulation_experiment = z155.object({
|
|
|
3520
3536
|
expectTypesMatch(true);
|
|
3521
3537
|
|
|
3522
3538
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
3523
|
-
import { z as
|
|
3524
|
-
var simulation_transient_voltage_graph =
|
|
3525
|
-
type:
|
|
3539
|
+
import { z as z157 } from "zod";
|
|
3540
|
+
var simulation_transient_voltage_graph = z157.object({
|
|
3541
|
+
type: z157.literal("simulation_transient_voltage_graph"),
|
|
3526
3542
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
3527
3543
|
"simulation_transient_voltage_graph"
|
|
3528
3544
|
),
|
|
3529
|
-
simulation_experiment_id:
|
|
3530
|
-
timestamps_ms:
|
|
3531
|
-
voltage_levels:
|
|
3532
|
-
source_component_id:
|
|
3533
|
-
subcircuit_connectivity_map_key:
|
|
3545
|
+
simulation_experiment_id: z157.string(),
|
|
3546
|
+
timestamps_ms: z157.array(z157.number()).optional(),
|
|
3547
|
+
voltage_levels: z157.array(z157.number()),
|
|
3548
|
+
source_component_id: z157.string().optional(),
|
|
3549
|
+
subcircuit_connectivity_map_key: z157.string().optional(),
|
|
3534
3550
|
time_per_step: duration_ms,
|
|
3535
3551
|
start_time_ms: ms,
|
|
3536
3552
|
end_time_ms: ms,
|
|
3537
|
-
name:
|
|
3538
|
-
color:
|
|
3553
|
+
name: z157.string().optional(),
|
|
3554
|
+
color: z157.string().optional()
|
|
3539
3555
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
3540
3556
|
expectTypesMatch(true);
|
|
3541
3557
|
|
|
3542
3558
|
// src/simulation/simulation_switch.ts
|
|
3543
|
-
import { z as
|
|
3544
|
-
var simulation_switch =
|
|
3545
|
-
type:
|
|
3559
|
+
import { z as z158 } from "zod";
|
|
3560
|
+
var simulation_switch = z158.object({
|
|
3561
|
+
type: z158.literal("simulation_switch"),
|
|
3546
3562
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
3547
|
-
source_component_id:
|
|
3563
|
+
source_component_id: z158.string().optional(),
|
|
3548
3564
|
closes_at: ms.optional(),
|
|
3549
3565
|
opens_at: ms.optional(),
|
|
3550
|
-
starts_closed:
|
|
3566
|
+
starts_closed: z158.boolean().optional(),
|
|
3551
3567
|
switching_frequency: frequency.optional()
|
|
3552
3568
|
}).describe("Defines a switch for simulation timing control");
|
|
3553
3569
|
expectTypesMatch(true);
|
|
3554
3570
|
|
|
3555
3571
|
// src/simulation/simulation_voltage_probe.ts
|
|
3556
|
-
import { z as
|
|
3557
|
-
var simulation_voltage_probe =
|
|
3558
|
-
type:
|
|
3572
|
+
import { z as z159 } from "zod";
|
|
3573
|
+
var simulation_voltage_probe = z159.object({
|
|
3574
|
+
type: z159.literal("simulation_voltage_probe"),
|
|
3559
3575
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
3560
3576
|
"simulation_voltage_probe"
|
|
3561
3577
|
),
|
|
3562
|
-
source_component_id:
|
|
3563
|
-
name:
|
|
3564
|
-
signal_input_source_port_id:
|
|
3565
|
-
signal_input_source_net_id:
|
|
3566
|
-
reference_input_source_port_id:
|
|
3567
|
-
reference_input_source_net_id:
|
|
3568
|
-
subcircuit_id:
|
|
3569
|
-
color:
|
|
3578
|
+
source_component_id: z159.string().optional(),
|
|
3579
|
+
name: z159.string().optional(),
|
|
3580
|
+
signal_input_source_port_id: z159.string().optional(),
|
|
3581
|
+
signal_input_source_net_id: z159.string().optional(),
|
|
3582
|
+
reference_input_source_port_id: z159.string().optional(),
|
|
3583
|
+
reference_input_source_net_id: z159.string().optional(),
|
|
3584
|
+
subcircuit_id: z159.string().optional(),
|
|
3585
|
+
color: z159.string().optional()
|
|
3570
3586
|
}).describe(
|
|
3571
3587
|
"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."
|
|
3572
3588
|
).superRefine((data, ctx) => {
|
|
@@ -3576,20 +3592,20 @@ var simulation_voltage_probe = z158.object({
|
|
|
3576
3592
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
3577
3593
|
if (has_ports && has_nets) {
|
|
3578
3594
|
ctx.addIssue({
|
|
3579
|
-
code:
|
|
3595
|
+
code: z159.ZodIssueCode.custom,
|
|
3580
3596
|
message: "Cannot mix port and net connections in a differential probe."
|
|
3581
3597
|
});
|
|
3582
3598
|
} else if (has_ports) {
|
|
3583
3599
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
3584
3600
|
ctx.addIssue({
|
|
3585
|
-
code:
|
|
3601
|
+
code: z159.ZodIssueCode.custom,
|
|
3586
3602
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
3587
3603
|
});
|
|
3588
3604
|
}
|
|
3589
3605
|
} else if (has_nets) {
|
|
3590
3606
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
3591
3607
|
ctx.addIssue({
|
|
3592
|
-
code:
|
|
3608
|
+
code: z159.ZodIssueCode.custom,
|
|
3593
3609
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
3594
3610
|
});
|
|
3595
3611
|
}
|
|
@@ -3597,7 +3613,7 @@ var simulation_voltage_probe = z158.object({
|
|
|
3597
3613
|
} else {
|
|
3598
3614
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
3599
3615
|
ctx.addIssue({
|
|
3600
|
-
code:
|
|
3616
|
+
code: z159.ZodIssueCode.custom,
|
|
3601
3617
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
3602
3618
|
});
|
|
3603
3619
|
}
|
|
@@ -3606,35 +3622,35 @@ var simulation_voltage_probe = z158.object({
|
|
|
3606
3622
|
expectTypesMatch(true);
|
|
3607
3623
|
|
|
3608
3624
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
3609
|
-
import { z as
|
|
3625
|
+
import { z as z160 } from "zod";
|
|
3610
3626
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
3611
|
-
type:
|
|
3627
|
+
type: z160.literal("simulation_unknown_experiment_error"),
|
|
3612
3628
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
3613
3629
|
"simulation_unknown_experiment_error"
|
|
3614
3630
|
),
|
|
3615
|
-
error_type:
|
|
3616
|
-
simulation_experiment_id:
|
|
3617
|
-
subcircuit_id:
|
|
3631
|
+
error_type: z160.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
3632
|
+
simulation_experiment_id: z160.string().optional(),
|
|
3633
|
+
subcircuit_id: z160.string().optional()
|
|
3618
3634
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
3619
3635
|
expectTypesMatch(true);
|
|
3620
3636
|
|
|
3621
3637
|
// src/simulation/simulation_op_amp.ts
|
|
3622
|
-
import { z as
|
|
3623
|
-
var simulation_op_amp =
|
|
3624
|
-
type:
|
|
3638
|
+
import { z as z161 } from "zod";
|
|
3639
|
+
var simulation_op_amp = z161.object({
|
|
3640
|
+
type: z161.literal("simulation_op_amp"),
|
|
3625
3641
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
3626
|
-
source_component_id:
|
|
3627
|
-
inverting_input_source_port_id:
|
|
3628
|
-
non_inverting_input_source_port_id:
|
|
3629
|
-
output_source_port_id:
|
|
3630
|
-
positive_supply_source_port_id:
|
|
3631
|
-
negative_supply_source_port_id:
|
|
3642
|
+
source_component_id: z161.string().optional(),
|
|
3643
|
+
inverting_input_source_port_id: z161.string(),
|
|
3644
|
+
non_inverting_input_source_port_id: z161.string(),
|
|
3645
|
+
output_source_port_id: z161.string(),
|
|
3646
|
+
positive_supply_source_port_id: z161.string(),
|
|
3647
|
+
negative_supply_source_port_id: z161.string()
|
|
3632
3648
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
3633
3649
|
expectTypesMatch(true);
|
|
3634
3650
|
|
|
3635
3651
|
// src/any_circuit_element.ts
|
|
3636
|
-
import { z as
|
|
3637
|
-
var any_circuit_element =
|
|
3652
|
+
import { z as z162 } from "zod";
|
|
3653
|
+
var any_circuit_element = z162.union([
|
|
3638
3654
|
source_trace,
|
|
3639
3655
|
source_port,
|
|
3640
3656
|
source_component_internal_connection,
|
|
@@ -3687,6 +3703,7 @@ var any_circuit_element = z161.union([
|
|
|
3687
3703
|
pcb_net,
|
|
3688
3704
|
pcb_text,
|
|
3689
3705
|
pcb_trace,
|
|
3706
|
+
pcb_trace_warning,
|
|
3690
3707
|
pcb_via,
|
|
3691
3708
|
pcb_smtpad,
|
|
3692
3709
|
pcb_solder_paste,
|
|
@@ -3887,6 +3904,7 @@ export {
|
|
|
3887
3904
|
pcb_trace_route_point,
|
|
3888
3905
|
pcb_trace_route_point_via,
|
|
3889
3906
|
pcb_trace_route_point_wire,
|
|
3907
|
+
pcb_trace_warning,
|
|
3890
3908
|
pcb_via,
|
|
3891
3909
|
pcb_via_clearance_error,
|
|
3892
3910
|
point,
|