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