circuit-json 0.0.336 → 0.0.338
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 +188 -2
- package/dist/index.mjs +399 -382
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2195,258 +2195,273 @@ var pcb_silkscreen_oval = z98.object({
|
|
|
2195
2195
|
}).describe("Defines a silkscreen oval on the PCB");
|
|
2196
2196
|
expectTypesMatch(true);
|
|
2197
2197
|
|
|
2198
|
-
// src/pcb/
|
|
2198
|
+
// src/pcb/pcb_silkscreen_pill.ts
|
|
2199
2199
|
import { z as z99 } from "zod";
|
|
2200
|
-
var
|
|
2201
|
-
type: z99.literal("
|
|
2200
|
+
var pcb_silkscreen_pill = z99.object({
|
|
2201
|
+
type: z99.literal("pcb_silkscreen_pill"),
|
|
2202
|
+
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
2203
|
+
pcb_component_id: z99.string(),
|
|
2204
|
+
pcb_group_id: z99.string().optional(),
|
|
2205
|
+
subcircuit_id: z99.string().optional(),
|
|
2206
|
+
center: point,
|
|
2207
|
+
width: length,
|
|
2208
|
+
height: length,
|
|
2209
|
+
layer: layer_ref
|
|
2210
|
+
}).describe("Defines a silkscreen pill on the PCB");
|
|
2211
|
+
expectTypesMatch(true);
|
|
2212
|
+
|
|
2213
|
+
// src/pcb/pcb_fabrication_note_text.ts
|
|
2214
|
+
import { z as z100 } from "zod";
|
|
2215
|
+
var pcb_fabrication_note_text = z100.object({
|
|
2216
|
+
type: z100.literal("pcb_fabrication_note_text"),
|
|
2202
2217
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
2203
2218
|
"pcb_fabrication_note_text"
|
|
2204
2219
|
),
|
|
2205
|
-
subcircuit_id:
|
|
2206
|
-
pcb_group_id:
|
|
2207
|
-
font:
|
|
2220
|
+
subcircuit_id: z100.string().optional(),
|
|
2221
|
+
pcb_group_id: z100.string().optional(),
|
|
2222
|
+
font: z100.literal("tscircuit2024").default("tscircuit2024"),
|
|
2208
2223
|
font_size: distance.default("1mm"),
|
|
2209
|
-
pcb_component_id:
|
|
2210
|
-
text:
|
|
2224
|
+
pcb_component_id: z100.string(),
|
|
2225
|
+
text: z100.string(),
|
|
2211
2226
|
layer: visible_layer,
|
|
2212
2227
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2213
|
-
anchor_alignment:
|
|
2214
|
-
color:
|
|
2228
|
+
anchor_alignment: z100.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2229
|
+
color: z100.string().optional()
|
|
2215
2230
|
}).describe(
|
|
2216
2231
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2217
2232
|
);
|
|
2218
2233
|
expectTypesMatch(true);
|
|
2219
2234
|
|
|
2220
2235
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
2221
|
-
import { z as
|
|
2222
|
-
var pcb_fabrication_note_path =
|
|
2223
|
-
type:
|
|
2236
|
+
import { z as z101 } from "zod";
|
|
2237
|
+
var pcb_fabrication_note_path = z101.object({
|
|
2238
|
+
type: z101.literal("pcb_fabrication_note_path"),
|
|
2224
2239
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
2225
2240
|
"pcb_fabrication_note_path"
|
|
2226
2241
|
),
|
|
2227
|
-
pcb_component_id:
|
|
2228
|
-
subcircuit_id:
|
|
2242
|
+
pcb_component_id: z101.string(),
|
|
2243
|
+
subcircuit_id: z101.string().optional(),
|
|
2229
2244
|
layer: layer_ref,
|
|
2230
|
-
route:
|
|
2245
|
+
route: z101.array(point),
|
|
2231
2246
|
stroke_width: length,
|
|
2232
|
-
color:
|
|
2247
|
+
color: z101.string().optional()
|
|
2233
2248
|
}).describe(
|
|
2234
2249
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
2235
2250
|
);
|
|
2236
2251
|
expectTypesMatch(true);
|
|
2237
2252
|
|
|
2238
2253
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
2239
|
-
import { z as
|
|
2240
|
-
var pcb_fabrication_note_rect =
|
|
2241
|
-
type:
|
|
2254
|
+
import { z as z102 } from "zod";
|
|
2255
|
+
var pcb_fabrication_note_rect = z102.object({
|
|
2256
|
+
type: z102.literal("pcb_fabrication_note_rect"),
|
|
2242
2257
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
2243
2258
|
"pcb_fabrication_note_rect"
|
|
2244
2259
|
),
|
|
2245
|
-
pcb_component_id:
|
|
2246
|
-
pcb_group_id:
|
|
2247
|
-
subcircuit_id:
|
|
2260
|
+
pcb_component_id: z102.string(),
|
|
2261
|
+
pcb_group_id: z102.string().optional(),
|
|
2262
|
+
subcircuit_id: z102.string().optional(),
|
|
2248
2263
|
center: point,
|
|
2249
2264
|
width: length,
|
|
2250
2265
|
height: length,
|
|
2251
2266
|
layer: visible_layer,
|
|
2252
2267
|
stroke_width: length.default("0.1mm"),
|
|
2253
2268
|
corner_radius: length.optional(),
|
|
2254
|
-
is_filled:
|
|
2255
|
-
has_stroke:
|
|
2256
|
-
is_stroke_dashed:
|
|
2257
|
-
color:
|
|
2269
|
+
is_filled: z102.boolean().optional(),
|
|
2270
|
+
has_stroke: z102.boolean().optional(),
|
|
2271
|
+
is_stroke_dashed: z102.boolean().optional(),
|
|
2272
|
+
color: z102.string().optional()
|
|
2258
2273
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
2259
2274
|
expectTypesMatch(true);
|
|
2260
2275
|
|
|
2261
2276
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
2262
|
-
import { z as
|
|
2263
|
-
var pcb_fabrication_note_dimension =
|
|
2264
|
-
type:
|
|
2277
|
+
import { z as z103 } from "zod";
|
|
2278
|
+
var pcb_fabrication_note_dimension = z103.object({
|
|
2279
|
+
type: z103.literal("pcb_fabrication_note_dimension"),
|
|
2265
2280
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
2266
2281
|
"pcb_fabrication_note_dimension"
|
|
2267
2282
|
),
|
|
2268
|
-
pcb_component_id:
|
|
2269
|
-
pcb_group_id:
|
|
2270
|
-
subcircuit_id:
|
|
2283
|
+
pcb_component_id: z103.string(),
|
|
2284
|
+
pcb_group_id: z103.string().optional(),
|
|
2285
|
+
subcircuit_id: z103.string().optional(),
|
|
2271
2286
|
layer: visible_layer,
|
|
2272
2287
|
from: point,
|
|
2273
2288
|
to: point,
|
|
2274
|
-
text:
|
|
2275
|
-
text_ccw_rotation:
|
|
2289
|
+
text: z103.string().optional(),
|
|
2290
|
+
text_ccw_rotation: z103.number().optional(),
|
|
2276
2291
|
offset: length.optional(),
|
|
2277
2292
|
offset_distance: length.optional(),
|
|
2278
|
-
offset_direction:
|
|
2279
|
-
x:
|
|
2280
|
-
y:
|
|
2293
|
+
offset_direction: z103.object({
|
|
2294
|
+
x: z103.number(),
|
|
2295
|
+
y: z103.number()
|
|
2281
2296
|
}).optional(),
|
|
2282
|
-
font:
|
|
2297
|
+
font: z103.literal("tscircuit2024").default("tscircuit2024"),
|
|
2283
2298
|
font_size: length.default("1mm"),
|
|
2284
|
-
color:
|
|
2299
|
+
color: z103.string().optional(),
|
|
2285
2300
|
arrow_size: length.default("1mm")
|
|
2286
2301
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
2287
2302
|
expectTypesMatch(true);
|
|
2288
2303
|
|
|
2289
2304
|
// src/pcb/pcb_note_text.ts
|
|
2290
|
-
import { z as z103 } from "zod";
|
|
2291
|
-
var pcb_note_text = z103.object({
|
|
2292
|
-
type: z103.literal("pcb_note_text"),
|
|
2293
|
-
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2294
|
-
pcb_component_id: z103.string().optional(),
|
|
2295
|
-
pcb_group_id: z103.string().optional(),
|
|
2296
|
-
subcircuit_id: z103.string().optional(),
|
|
2297
|
-
name: z103.string().optional(),
|
|
2298
|
-
font: z103.literal("tscircuit2024").default("tscircuit2024"),
|
|
2299
|
-
font_size: distance.default("1mm"),
|
|
2300
|
-
text: z103.string().optional(),
|
|
2301
|
-
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2302
|
-
anchor_alignment: z103.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2303
|
-
color: z103.string().optional()
|
|
2304
|
-
}).describe("Defines a documentation note in text on the PCB");
|
|
2305
|
-
expectTypesMatch(true);
|
|
2306
|
-
|
|
2307
|
-
// src/pcb/pcb_note_rect.ts
|
|
2308
2305
|
import { z as z104 } from "zod";
|
|
2309
|
-
var
|
|
2310
|
-
type: z104.literal("
|
|
2311
|
-
|
|
2306
|
+
var pcb_note_text = z104.object({
|
|
2307
|
+
type: z104.literal("pcb_note_text"),
|
|
2308
|
+
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2312
2309
|
pcb_component_id: z104.string().optional(),
|
|
2313
2310
|
pcb_group_id: z104.string().optional(),
|
|
2314
2311
|
subcircuit_id: z104.string().optional(),
|
|
2315
2312
|
name: z104.string().optional(),
|
|
2313
|
+
font: z104.literal("tscircuit2024").default("tscircuit2024"),
|
|
2314
|
+
font_size: distance.default("1mm"),
|
|
2316
2315
|
text: z104.string().optional(),
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
height: length,
|
|
2320
|
-
stroke_width: length.default("0.1mm"),
|
|
2321
|
-
corner_radius: length.optional(),
|
|
2322
|
-
is_filled: z104.boolean().optional(),
|
|
2323
|
-
has_stroke: z104.boolean().optional(),
|
|
2324
|
-
is_stroke_dashed: z104.boolean().optional(),
|
|
2316
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2317
|
+
anchor_alignment: z104.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2325
2318
|
color: z104.string().optional()
|
|
2326
|
-
}).describe("Defines a
|
|
2319
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
2327
2320
|
expectTypesMatch(true);
|
|
2328
2321
|
|
|
2329
|
-
// src/pcb/
|
|
2322
|
+
// src/pcb/pcb_note_rect.ts
|
|
2330
2323
|
import { z as z105 } from "zod";
|
|
2331
|
-
var
|
|
2332
|
-
type: z105.literal("
|
|
2333
|
-
|
|
2324
|
+
var pcb_note_rect = z105.object({
|
|
2325
|
+
type: z105.literal("pcb_note_rect"),
|
|
2326
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
2334
2327
|
pcb_component_id: z105.string().optional(),
|
|
2335
2328
|
pcb_group_id: z105.string().optional(),
|
|
2336
2329
|
subcircuit_id: z105.string().optional(),
|
|
2337
2330
|
name: z105.string().optional(),
|
|
2338
2331
|
text: z105.string().optional(),
|
|
2339
|
-
|
|
2332
|
+
center: point,
|
|
2333
|
+
width: length,
|
|
2334
|
+
height: length,
|
|
2340
2335
|
stroke_width: length.default("0.1mm"),
|
|
2336
|
+
corner_radius: length.optional(),
|
|
2337
|
+
is_filled: z105.boolean().optional(),
|
|
2338
|
+
has_stroke: z105.boolean().optional(),
|
|
2339
|
+
is_stroke_dashed: z105.boolean().optional(),
|
|
2341
2340
|
color: z105.string().optional()
|
|
2342
|
-
}).describe("Defines a
|
|
2341
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
2343
2342
|
expectTypesMatch(true);
|
|
2344
2343
|
|
|
2345
|
-
// src/pcb/
|
|
2344
|
+
// src/pcb/pcb_note_path.ts
|
|
2346
2345
|
import { z as z106 } from "zod";
|
|
2347
|
-
var
|
|
2348
|
-
type: z106.literal("
|
|
2349
|
-
|
|
2346
|
+
var pcb_note_path = z106.object({
|
|
2347
|
+
type: z106.literal("pcb_note_path"),
|
|
2348
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
2350
2349
|
pcb_component_id: z106.string().optional(),
|
|
2351
2350
|
pcb_group_id: z106.string().optional(),
|
|
2352
2351
|
subcircuit_id: z106.string().optional(),
|
|
2353
2352
|
name: z106.string().optional(),
|
|
2354
2353
|
text: z106.string().optional(),
|
|
2354
|
+
route: z106.array(point),
|
|
2355
|
+
stroke_width: length.default("0.1mm"),
|
|
2356
|
+
color: z106.string().optional()
|
|
2357
|
+
}).describe("Defines a polyline documentation note on the PCB");
|
|
2358
|
+
expectTypesMatch(true);
|
|
2359
|
+
|
|
2360
|
+
// src/pcb/pcb_note_line.ts
|
|
2361
|
+
import { z as z107 } from "zod";
|
|
2362
|
+
var pcb_note_line = z107.object({
|
|
2363
|
+
type: z107.literal("pcb_note_line"),
|
|
2364
|
+
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
2365
|
+
pcb_component_id: z107.string().optional(),
|
|
2366
|
+
pcb_group_id: z107.string().optional(),
|
|
2367
|
+
subcircuit_id: z107.string().optional(),
|
|
2368
|
+
name: z107.string().optional(),
|
|
2369
|
+
text: z107.string().optional(),
|
|
2355
2370
|
x1: distance,
|
|
2356
2371
|
y1: distance,
|
|
2357
2372
|
x2: distance,
|
|
2358
2373
|
y2: distance,
|
|
2359
2374
|
stroke_width: distance.default("0.1mm"),
|
|
2360
|
-
color:
|
|
2361
|
-
is_dashed:
|
|
2375
|
+
color: z107.string().optional(),
|
|
2376
|
+
is_dashed: z107.boolean().optional()
|
|
2362
2377
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
2363
2378
|
expectTypesMatch(true);
|
|
2364
2379
|
|
|
2365
2380
|
// src/pcb/pcb_note_dimension.ts
|
|
2366
|
-
import { z as
|
|
2367
|
-
var pcb_note_dimension =
|
|
2368
|
-
type:
|
|
2381
|
+
import { z as z108 } from "zod";
|
|
2382
|
+
var pcb_note_dimension = z108.object({
|
|
2383
|
+
type: z108.literal("pcb_note_dimension"),
|
|
2369
2384
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
2370
|
-
pcb_component_id:
|
|
2371
|
-
pcb_group_id:
|
|
2372
|
-
subcircuit_id:
|
|
2373
|
-
name:
|
|
2385
|
+
pcb_component_id: z108.string().optional(),
|
|
2386
|
+
pcb_group_id: z108.string().optional(),
|
|
2387
|
+
subcircuit_id: z108.string().optional(),
|
|
2388
|
+
name: z108.string().optional(),
|
|
2374
2389
|
from: point,
|
|
2375
2390
|
to: point,
|
|
2376
|
-
text:
|
|
2377
|
-
text_ccw_rotation:
|
|
2391
|
+
text: z108.string().optional(),
|
|
2392
|
+
text_ccw_rotation: z108.number().optional(),
|
|
2378
2393
|
offset_distance: length.optional(),
|
|
2379
|
-
offset_direction:
|
|
2380
|
-
x:
|
|
2381
|
-
y:
|
|
2394
|
+
offset_direction: z108.object({
|
|
2395
|
+
x: z108.number(),
|
|
2396
|
+
y: z108.number()
|
|
2382
2397
|
}).optional(),
|
|
2383
|
-
font:
|
|
2398
|
+
font: z108.literal("tscircuit2024").default("tscircuit2024"),
|
|
2384
2399
|
font_size: length.default("1mm"),
|
|
2385
|
-
color:
|
|
2400
|
+
color: z108.string().optional(),
|
|
2386
2401
|
arrow_size: length.default("1mm")
|
|
2387
2402
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
2388
2403
|
expectTypesMatch(true);
|
|
2389
2404
|
|
|
2390
2405
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
2391
|
-
import { z as
|
|
2392
|
-
var pcb_footprint_overlap_error =
|
|
2393
|
-
type:
|
|
2406
|
+
import { z as z109 } from "zod";
|
|
2407
|
+
var pcb_footprint_overlap_error = z109.object({
|
|
2408
|
+
type: z109.literal("pcb_footprint_overlap_error"),
|
|
2394
2409
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2395
|
-
error_type:
|
|
2396
|
-
message:
|
|
2397
|
-
pcb_smtpad_ids:
|
|
2398
|
-
pcb_plated_hole_ids:
|
|
2399
|
-
pcb_hole_ids:
|
|
2400
|
-
pcb_keepout_ids:
|
|
2410
|
+
error_type: z109.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
2411
|
+
message: z109.string(),
|
|
2412
|
+
pcb_smtpad_ids: z109.array(z109.string()).optional(),
|
|
2413
|
+
pcb_plated_hole_ids: z109.array(z109.string()).optional(),
|
|
2414
|
+
pcb_hole_ids: z109.array(z109.string()).optional(),
|
|
2415
|
+
pcb_keepout_ids: z109.array(z109.string()).optional()
|
|
2401
2416
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
2402
2417
|
expectTypesMatch(
|
|
2403
2418
|
true
|
|
2404
2419
|
);
|
|
2405
2420
|
|
|
2406
2421
|
// src/pcb/pcb_keepout.ts
|
|
2407
|
-
import { z as
|
|
2408
|
-
var pcb_keepout =
|
|
2409
|
-
type:
|
|
2410
|
-
shape:
|
|
2411
|
-
pcb_group_id:
|
|
2412
|
-
subcircuit_id:
|
|
2422
|
+
import { z as z110 } from "zod";
|
|
2423
|
+
var pcb_keepout = z110.object({
|
|
2424
|
+
type: z110.literal("pcb_keepout"),
|
|
2425
|
+
shape: z110.literal("rect"),
|
|
2426
|
+
pcb_group_id: z110.string().optional(),
|
|
2427
|
+
subcircuit_id: z110.string().optional(),
|
|
2413
2428
|
center: point,
|
|
2414
2429
|
width: distance,
|
|
2415
2430
|
height: distance,
|
|
2416
|
-
pcb_keepout_id:
|
|
2417
|
-
layers:
|
|
2431
|
+
pcb_keepout_id: z110.string(),
|
|
2432
|
+
layers: z110.array(z110.string()),
|
|
2418
2433
|
// Specify layers where the keepout applies
|
|
2419
|
-
description:
|
|
2434
|
+
description: z110.string().optional()
|
|
2420
2435
|
// Optional description of the keepout
|
|
2421
2436
|
}).or(
|
|
2422
|
-
|
|
2423
|
-
type:
|
|
2424
|
-
shape:
|
|
2425
|
-
pcb_group_id:
|
|
2426
|
-
subcircuit_id:
|
|
2437
|
+
z110.object({
|
|
2438
|
+
type: z110.literal("pcb_keepout"),
|
|
2439
|
+
shape: z110.literal("circle"),
|
|
2440
|
+
pcb_group_id: z110.string().optional(),
|
|
2441
|
+
subcircuit_id: z110.string().optional(),
|
|
2427
2442
|
center: point,
|
|
2428
2443
|
radius: distance,
|
|
2429
|
-
pcb_keepout_id:
|
|
2430
|
-
layers:
|
|
2444
|
+
pcb_keepout_id: z110.string(),
|
|
2445
|
+
layers: z110.array(z110.string()),
|
|
2431
2446
|
// Specify layers where the keepout applies
|
|
2432
|
-
description:
|
|
2447
|
+
description: z110.string().optional()
|
|
2433
2448
|
// Optional description of the keepout
|
|
2434
2449
|
})
|
|
2435
2450
|
);
|
|
2436
2451
|
expectTypesMatch(true);
|
|
2437
2452
|
|
|
2438
2453
|
// src/pcb/pcb_cutout.ts
|
|
2439
|
-
import { z as
|
|
2440
|
-
var pcb_cutout_base =
|
|
2441
|
-
type:
|
|
2454
|
+
import { z as z111 } from "zod";
|
|
2455
|
+
var pcb_cutout_base = z111.object({
|
|
2456
|
+
type: z111.literal("pcb_cutout"),
|
|
2442
2457
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
2443
|
-
pcb_group_id:
|
|
2444
|
-
subcircuit_id:
|
|
2445
|
-
pcb_board_id:
|
|
2446
|
-
pcb_panel_id:
|
|
2458
|
+
pcb_group_id: z111.string().optional(),
|
|
2459
|
+
subcircuit_id: z111.string().optional(),
|
|
2460
|
+
pcb_board_id: z111.string().optional(),
|
|
2461
|
+
pcb_panel_id: z111.string().optional()
|
|
2447
2462
|
});
|
|
2448
2463
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
2449
|
-
shape:
|
|
2464
|
+
shape: z111.literal("rect"),
|
|
2450
2465
|
center: point,
|
|
2451
2466
|
width: length,
|
|
2452
2467
|
height: length,
|
|
@@ -2455,26 +2470,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
2455
2470
|
});
|
|
2456
2471
|
expectTypesMatch(true);
|
|
2457
2472
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
2458
|
-
shape:
|
|
2473
|
+
shape: z111.literal("circle"),
|
|
2459
2474
|
center: point,
|
|
2460
2475
|
radius: length
|
|
2461
2476
|
});
|
|
2462
2477
|
expectTypesMatch(true);
|
|
2463
2478
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
2464
|
-
shape:
|
|
2465
|
-
points:
|
|
2479
|
+
shape: z111.literal("polygon"),
|
|
2480
|
+
points: z111.array(point)
|
|
2466
2481
|
});
|
|
2467
2482
|
expectTypesMatch(true);
|
|
2468
2483
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
2469
|
-
shape:
|
|
2470
|
-
route:
|
|
2484
|
+
shape: z111.literal("path"),
|
|
2485
|
+
route: z111.array(point),
|
|
2471
2486
|
slot_width: length,
|
|
2472
2487
|
slot_length: length.optional(),
|
|
2473
2488
|
space_between_slots: length.optional(),
|
|
2474
2489
|
slot_corner_radius: length.optional()
|
|
2475
2490
|
});
|
|
2476
2491
|
expectTypesMatch(true);
|
|
2477
|
-
var pcb_cutout =
|
|
2492
|
+
var pcb_cutout = z111.discriminatedUnion("shape", [
|
|
2478
2493
|
pcb_cutout_rect,
|
|
2479
2494
|
pcb_cutout_circle,
|
|
2480
2495
|
pcb_cutout_polygon,
|
|
@@ -2483,130 +2498,130 @@ var pcb_cutout = z110.discriminatedUnion("shape", [
|
|
|
2483
2498
|
expectTypesMatch(true);
|
|
2484
2499
|
|
|
2485
2500
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
2486
|
-
import { z as
|
|
2487
|
-
var pcb_missing_footprint_error =
|
|
2488
|
-
type:
|
|
2501
|
+
import { z as z112 } from "zod";
|
|
2502
|
+
var pcb_missing_footprint_error = z112.object({
|
|
2503
|
+
type: z112.literal("pcb_missing_footprint_error"),
|
|
2489
2504
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
2490
2505
|
"pcb_missing_footprint_error"
|
|
2491
2506
|
),
|
|
2492
|
-
pcb_group_id:
|
|
2493
|
-
subcircuit_id:
|
|
2494
|
-
error_type:
|
|
2495
|
-
source_component_id:
|
|
2496
|
-
message:
|
|
2507
|
+
pcb_group_id: z112.string().optional(),
|
|
2508
|
+
subcircuit_id: z112.string().optional(),
|
|
2509
|
+
error_type: z112.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
2510
|
+
source_component_id: z112.string(),
|
|
2511
|
+
message: z112.string()
|
|
2497
2512
|
}).describe("Defines a missing footprint error on the PCB");
|
|
2498
2513
|
expectTypesMatch(
|
|
2499
2514
|
true
|
|
2500
2515
|
);
|
|
2501
2516
|
|
|
2502
2517
|
// src/pcb/external_footprint_load_error.ts
|
|
2503
|
-
import { z as
|
|
2504
|
-
var external_footprint_load_error =
|
|
2505
|
-
type:
|
|
2518
|
+
import { z as z113 } from "zod";
|
|
2519
|
+
var external_footprint_load_error = z113.object({
|
|
2520
|
+
type: z113.literal("external_footprint_load_error"),
|
|
2506
2521
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2507
2522
|
"external_footprint_load_error"
|
|
2508
2523
|
),
|
|
2509
|
-
pcb_component_id:
|
|
2510
|
-
source_component_id:
|
|
2511
|
-
pcb_group_id:
|
|
2512
|
-
subcircuit_id:
|
|
2513
|
-
footprinter_string:
|
|
2514
|
-
error_type:
|
|
2515
|
-
message:
|
|
2524
|
+
pcb_component_id: z113.string(),
|
|
2525
|
+
source_component_id: z113.string(),
|
|
2526
|
+
pcb_group_id: z113.string().optional(),
|
|
2527
|
+
subcircuit_id: z113.string().optional(),
|
|
2528
|
+
footprinter_string: z113.string().optional(),
|
|
2529
|
+
error_type: z113.literal("external_footprint_load_error").default("external_footprint_load_error"),
|
|
2530
|
+
message: z113.string()
|
|
2516
2531
|
}).describe("Defines an error when an external footprint fails to load");
|
|
2517
2532
|
expectTypesMatch(true);
|
|
2518
2533
|
|
|
2519
2534
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
2520
|
-
import { z as
|
|
2521
|
-
var circuit_json_footprint_load_error =
|
|
2522
|
-
type:
|
|
2535
|
+
import { z as z114 } from "zod";
|
|
2536
|
+
var circuit_json_footprint_load_error = z114.object({
|
|
2537
|
+
type: z114.literal("circuit_json_footprint_load_error"),
|
|
2523
2538
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2524
2539
|
"circuit_json_footprint_load_error"
|
|
2525
2540
|
),
|
|
2526
|
-
pcb_component_id:
|
|
2527
|
-
source_component_id:
|
|
2528
|
-
pcb_group_id:
|
|
2529
|
-
subcircuit_id:
|
|
2530
|
-
error_type:
|
|
2531
|
-
message:
|
|
2532
|
-
circuit_json:
|
|
2541
|
+
pcb_component_id: z114.string(),
|
|
2542
|
+
source_component_id: z114.string(),
|
|
2543
|
+
pcb_group_id: z114.string().optional(),
|
|
2544
|
+
subcircuit_id: z114.string().optional(),
|
|
2545
|
+
error_type: z114.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
2546
|
+
message: z114.string(),
|
|
2547
|
+
circuit_json: z114.array(z114.any()).optional()
|
|
2533
2548
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
2534
2549
|
expectTypesMatch(true);
|
|
2535
2550
|
|
|
2536
2551
|
// src/pcb/pcb_group.ts
|
|
2537
|
-
import { z as
|
|
2538
|
-
var pcb_group =
|
|
2539
|
-
type:
|
|
2552
|
+
import { z as z115 } from "zod";
|
|
2553
|
+
var pcb_group = z115.object({
|
|
2554
|
+
type: z115.literal("pcb_group"),
|
|
2540
2555
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
2541
|
-
source_group_id:
|
|
2542
|
-
is_subcircuit:
|
|
2543
|
-
subcircuit_id:
|
|
2556
|
+
source_group_id: z115.string(),
|
|
2557
|
+
is_subcircuit: z115.boolean().optional(),
|
|
2558
|
+
subcircuit_id: z115.string().optional(),
|
|
2544
2559
|
width: length.optional(),
|
|
2545
2560
|
height: length.optional(),
|
|
2546
2561
|
center: point,
|
|
2547
|
-
display_offset_x:
|
|
2562
|
+
display_offset_x: z115.string().optional().describe(
|
|
2548
2563
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
2549
2564
|
),
|
|
2550
|
-
display_offset_y:
|
|
2565
|
+
display_offset_y: z115.string().optional().describe(
|
|
2551
2566
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
2552
2567
|
),
|
|
2553
|
-
outline:
|
|
2568
|
+
outline: z115.array(point).optional(),
|
|
2554
2569
|
anchor_position: point.optional(),
|
|
2555
2570
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
2556
|
-
position_mode:
|
|
2557
|
-
positioned_relative_to_pcb_group_id:
|
|
2558
|
-
positioned_relative_to_pcb_board_id:
|
|
2559
|
-
pcb_component_ids:
|
|
2560
|
-
child_layout_mode:
|
|
2561
|
-
name:
|
|
2562
|
-
description:
|
|
2563
|
-
layout_mode:
|
|
2564
|
-
autorouter_configuration:
|
|
2571
|
+
position_mode: z115.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
2572
|
+
positioned_relative_to_pcb_group_id: z115.string().optional(),
|
|
2573
|
+
positioned_relative_to_pcb_board_id: z115.string().optional(),
|
|
2574
|
+
pcb_component_ids: z115.array(z115.string()),
|
|
2575
|
+
child_layout_mode: z115.enum(["packed", "none"]).optional(),
|
|
2576
|
+
name: z115.string().optional(),
|
|
2577
|
+
description: z115.string().optional(),
|
|
2578
|
+
layout_mode: z115.string().optional(),
|
|
2579
|
+
autorouter_configuration: z115.object({
|
|
2565
2580
|
trace_clearance: length
|
|
2566
2581
|
}).optional(),
|
|
2567
|
-
autorouter_used_string:
|
|
2582
|
+
autorouter_used_string: z115.string().optional()
|
|
2568
2583
|
}).describe("Defines a group of components on the PCB");
|
|
2569
2584
|
expectTypesMatch(true);
|
|
2570
2585
|
|
|
2571
2586
|
// src/pcb/pcb_autorouting_error.ts
|
|
2572
|
-
import { z as
|
|
2573
|
-
var pcb_autorouting_error =
|
|
2574
|
-
type:
|
|
2587
|
+
import { z as z116 } from "zod";
|
|
2588
|
+
var pcb_autorouting_error = z116.object({
|
|
2589
|
+
type: z116.literal("pcb_autorouting_error"),
|
|
2575
2590
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
2576
|
-
error_type:
|
|
2577
|
-
message:
|
|
2578
|
-
subcircuit_id:
|
|
2591
|
+
error_type: z116.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
2592
|
+
message: z116.string(),
|
|
2593
|
+
subcircuit_id: z116.string().optional()
|
|
2579
2594
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
2580
2595
|
expectTypesMatch(true);
|
|
2581
2596
|
|
|
2582
2597
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
2583
|
-
import { z as
|
|
2584
|
-
var pcb_manual_edit_conflict_warning =
|
|
2585
|
-
type:
|
|
2598
|
+
import { z as z117 } from "zod";
|
|
2599
|
+
var pcb_manual_edit_conflict_warning = z117.object({
|
|
2600
|
+
type: z117.literal("pcb_manual_edit_conflict_warning"),
|
|
2586
2601
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
2587
2602
|
"pcb_manual_edit_conflict_warning"
|
|
2588
2603
|
),
|
|
2589
|
-
warning_type:
|
|
2590
|
-
message:
|
|
2591
|
-
pcb_component_id:
|
|
2592
|
-
pcb_group_id:
|
|
2593
|
-
subcircuit_id:
|
|
2594
|
-
source_component_id:
|
|
2604
|
+
warning_type: z117.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
2605
|
+
message: z117.string(),
|
|
2606
|
+
pcb_component_id: z117.string(),
|
|
2607
|
+
pcb_group_id: z117.string().optional(),
|
|
2608
|
+
subcircuit_id: z117.string().optional(),
|
|
2609
|
+
source_component_id: z117.string()
|
|
2595
2610
|
}).describe(
|
|
2596
2611
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
2597
2612
|
);
|
|
2598
2613
|
expectTypesMatch(true);
|
|
2599
2614
|
|
|
2600
2615
|
// src/pcb/pcb_breakout_point.ts
|
|
2601
|
-
import { z as
|
|
2602
|
-
var pcb_breakout_point =
|
|
2603
|
-
type:
|
|
2616
|
+
import { z as z118 } from "zod";
|
|
2617
|
+
var pcb_breakout_point = z118.object({
|
|
2618
|
+
type: z118.literal("pcb_breakout_point"),
|
|
2604
2619
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
2605
|
-
pcb_group_id:
|
|
2606
|
-
subcircuit_id:
|
|
2607
|
-
source_trace_id:
|
|
2608
|
-
source_port_id:
|
|
2609
|
-
source_net_id:
|
|
2620
|
+
pcb_group_id: z118.string(),
|
|
2621
|
+
subcircuit_id: z118.string().optional(),
|
|
2622
|
+
source_trace_id: z118.string().optional(),
|
|
2623
|
+
source_port_id: z118.string().optional(),
|
|
2624
|
+
source_net_id: z118.string().optional(),
|
|
2610
2625
|
x: distance,
|
|
2611
2626
|
y: distance
|
|
2612
2627
|
}).describe(
|
|
@@ -2615,61 +2630,61 @@ var pcb_breakout_point = z117.object({
|
|
|
2615
2630
|
expectTypesMatch(true);
|
|
2616
2631
|
|
|
2617
2632
|
// src/pcb/pcb_ground_plane.ts
|
|
2618
|
-
import { z as
|
|
2619
|
-
var pcb_ground_plane =
|
|
2620
|
-
type:
|
|
2633
|
+
import { z as z119 } from "zod";
|
|
2634
|
+
var pcb_ground_plane = z119.object({
|
|
2635
|
+
type: z119.literal("pcb_ground_plane"),
|
|
2621
2636
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
2622
|
-
source_pcb_ground_plane_id:
|
|
2623
|
-
source_net_id:
|
|
2624
|
-
pcb_group_id:
|
|
2625
|
-
subcircuit_id:
|
|
2637
|
+
source_pcb_ground_plane_id: z119.string(),
|
|
2638
|
+
source_net_id: z119.string(),
|
|
2639
|
+
pcb_group_id: z119.string().optional(),
|
|
2640
|
+
subcircuit_id: z119.string().optional()
|
|
2626
2641
|
}).describe("Defines a ground plane on the PCB");
|
|
2627
2642
|
expectTypesMatch(true);
|
|
2628
2643
|
|
|
2629
2644
|
// src/pcb/pcb_ground_plane_region.ts
|
|
2630
|
-
import { z as
|
|
2631
|
-
var pcb_ground_plane_region =
|
|
2632
|
-
type:
|
|
2645
|
+
import { z as z120 } from "zod";
|
|
2646
|
+
var pcb_ground_plane_region = z120.object({
|
|
2647
|
+
type: z120.literal("pcb_ground_plane_region"),
|
|
2633
2648
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
2634
2649
|
"pcb_ground_plane_region"
|
|
2635
2650
|
),
|
|
2636
|
-
pcb_ground_plane_id:
|
|
2637
|
-
pcb_group_id:
|
|
2638
|
-
subcircuit_id:
|
|
2651
|
+
pcb_ground_plane_id: z120.string(),
|
|
2652
|
+
pcb_group_id: z120.string().optional(),
|
|
2653
|
+
subcircuit_id: z120.string().optional(),
|
|
2639
2654
|
layer: layer_ref,
|
|
2640
|
-
points:
|
|
2655
|
+
points: z120.array(point)
|
|
2641
2656
|
}).describe("Defines a polygon region of a ground plane");
|
|
2642
2657
|
expectTypesMatch(true);
|
|
2643
2658
|
|
|
2644
2659
|
// src/pcb/pcb_thermal_spoke.ts
|
|
2645
|
-
import { z as
|
|
2646
|
-
var pcb_thermal_spoke =
|
|
2647
|
-
type:
|
|
2660
|
+
import { z as z121 } from "zod";
|
|
2661
|
+
var pcb_thermal_spoke = z121.object({
|
|
2662
|
+
type: z121.literal("pcb_thermal_spoke"),
|
|
2648
2663
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
2649
|
-
pcb_ground_plane_id:
|
|
2650
|
-
shape:
|
|
2651
|
-
spoke_count:
|
|
2664
|
+
pcb_ground_plane_id: z121.string(),
|
|
2665
|
+
shape: z121.string(),
|
|
2666
|
+
spoke_count: z121.number(),
|
|
2652
2667
|
spoke_thickness: distance,
|
|
2653
2668
|
spoke_inner_diameter: distance,
|
|
2654
2669
|
spoke_outer_diameter: distance,
|
|
2655
|
-
pcb_plated_hole_id:
|
|
2656
|
-
subcircuit_id:
|
|
2670
|
+
pcb_plated_hole_id: z121.string().optional(),
|
|
2671
|
+
subcircuit_id: z121.string().optional()
|
|
2657
2672
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
2658
2673
|
expectTypesMatch(true);
|
|
2659
2674
|
|
|
2660
2675
|
// src/pcb/pcb_copper_pour.ts
|
|
2661
|
-
import { z as
|
|
2662
|
-
var pcb_copper_pour_base =
|
|
2663
|
-
type:
|
|
2676
|
+
import { z as z122 } from "zod";
|
|
2677
|
+
var pcb_copper_pour_base = z122.object({
|
|
2678
|
+
type: z122.literal("pcb_copper_pour"),
|
|
2664
2679
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
2665
|
-
pcb_group_id:
|
|
2666
|
-
subcircuit_id:
|
|
2680
|
+
pcb_group_id: z122.string().optional(),
|
|
2681
|
+
subcircuit_id: z122.string().optional(),
|
|
2667
2682
|
layer: layer_ref,
|
|
2668
|
-
source_net_id:
|
|
2669
|
-
covered_with_solder_mask:
|
|
2683
|
+
source_net_id: z122.string().optional(),
|
|
2684
|
+
covered_with_solder_mask: z122.boolean().optional().default(true)
|
|
2670
2685
|
});
|
|
2671
2686
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
2672
|
-
shape:
|
|
2687
|
+
shape: z122.literal("rect"),
|
|
2673
2688
|
center: point,
|
|
2674
2689
|
width: length,
|
|
2675
2690
|
height: length,
|
|
@@ -2677,16 +2692,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
2677
2692
|
});
|
|
2678
2693
|
expectTypesMatch(true);
|
|
2679
2694
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
2680
|
-
shape:
|
|
2695
|
+
shape: z122.literal("brep"),
|
|
2681
2696
|
brep_shape
|
|
2682
2697
|
});
|
|
2683
2698
|
expectTypesMatch(true);
|
|
2684
2699
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
2685
|
-
shape:
|
|
2686
|
-
points:
|
|
2700
|
+
shape: z122.literal("polygon"),
|
|
2701
|
+
points: z122.array(point)
|
|
2687
2702
|
});
|
|
2688
2703
|
expectTypesMatch(true);
|
|
2689
|
-
var pcb_copper_pour =
|
|
2704
|
+
var pcb_copper_pour = z122.discriminatedUnion("shape", [
|
|
2690
2705
|
pcb_copper_pour_rect,
|
|
2691
2706
|
pcb_copper_pour_brep,
|
|
2692
2707
|
pcb_copper_pour_polygon
|
|
@@ -2694,148 +2709,148 @@ var pcb_copper_pour = z121.discriminatedUnion("shape", [
|
|
|
2694
2709
|
expectTypesMatch(true);
|
|
2695
2710
|
|
|
2696
2711
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
2697
|
-
import { z as
|
|
2698
|
-
var pcb_component_outside_board_error =
|
|
2699
|
-
type:
|
|
2712
|
+
import { z as z123 } from "zod";
|
|
2713
|
+
var pcb_component_outside_board_error = z123.object({
|
|
2714
|
+
type: z123.literal("pcb_component_outside_board_error"),
|
|
2700
2715
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
2701
2716
|
"pcb_component_outside_board_error"
|
|
2702
2717
|
),
|
|
2703
|
-
error_type:
|
|
2704
|
-
message:
|
|
2705
|
-
pcb_component_id:
|
|
2706
|
-
pcb_board_id:
|
|
2718
|
+
error_type: z123.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
2719
|
+
message: z123.string(),
|
|
2720
|
+
pcb_component_id: z123.string(),
|
|
2721
|
+
pcb_board_id: z123.string(),
|
|
2707
2722
|
component_center: point,
|
|
2708
|
-
component_bounds:
|
|
2709
|
-
min_x:
|
|
2710
|
-
max_x:
|
|
2711
|
-
min_y:
|
|
2712
|
-
max_y:
|
|
2723
|
+
component_bounds: z123.object({
|
|
2724
|
+
min_x: z123.number(),
|
|
2725
|
+
max_x: z123.number(),
|
|
2726
|
+
min_y: z123.number(),
|
|
2727
|
+
max_y: z123.number()
|
|
2713
2728
|
}),
|
|
2714
|
-
subcircuit_id:
|
|
2715
|
-
source_component_id:
|
|
2729
|
+
subcircuit_id: z123.string().optional(),
|
|
2730
|
+
source_component_id: z123.string().optional()
|
|
2716
2731
|
}).describe(
|
|
2717
2732
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
2718
2733
|
);
|
|
2719
2734
|
expectTypesMatch(true);
|
|
2720
2735
|
|
|
2721
2736
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
2722
|
-
import { z as
|
|
2723
|
-
var pcb_component_invalid_layer_error =
|
|
2724
|
-
type:
|
|
2737
|
+
import { z as z124 } from "zod";
|
|
2738
|
+
var pcb_component_invalid_layer_error = z124.object({
|
|
2739
|
+
type: z124.literal("pcb_component_invalid_layer_error"),
|
|
2725
2740
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
2726
2741
|
"pcb_component_invalid_layer_error"
|
|
2727
2742
|
),
|
|
2728
|
-
error_type:
|
|
2729
|
-
message:
|
|
2730
|
-
pcb_component_id:
|
|
2731
|
-
source_component_id:
|
|
2743
|
+
error_type: z124.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
2744
|
+
message: z124.string(),
|
|
2745
|
+
pcb_component_id: z124.string().optional(),
|
|
2746
|
+
source_component_id: z124.string(),
|
|
2732
2747
|
layer: layer_ref,
|
|
2733
|
-
subcircuit_id:
|
|
2748
|
+
subcircuit_id: z124.string().optional()
|
|
2734
2749
|
}).describe(
|
|
2735
2750
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
2736
2751
|
);
|
|
2737
2752
|
expectTypesMatch(true);
|
|
2738
2753
|
|
|
2739
2754
|
// src/pcb/pcb_via_clearance_error.ts
|
|
2740
|
-
import { z as
|
|
2741
|
-
var pcb_via_clearance_error =
|
|
2742
|
-
type:
|
|
2755
|
+
import { z as z125 } from "zod";
|
|
2756
|
+
var pcb_via_clearance_error = z125.object({
|
|
2757
|
+
type: z125.literal("pcb_via_clearance_error"),
|
|
2743
2758
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2744
|
-
error_type:
|
|
2745
|
-
message:
|
|
2746
|
-
pcb_via_ids:
|
|
2759
|
+
error_type: z125.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
2760
|
+
message: z125.string(),
|
|
2761
|
+
pcb_via_ids: z125.array(z125.string()).min(2),
|
|
2747
2762
|
minimum_clearance: distance.optional(),
|
|
2748
2763
|
actual_clearance: distance.optional(),
|
|
2749
|
-
pcb_center:
|
|
2750
|
-
x:
|
|
2751
|
-
y:
|
|
2764
|
+
pcb_center: z125.object({
|
|
2765
|
+
x: z125.number().optional(),
|
|
2766
|
+
y: z125.number().optional()
|
|
2752
2767
|
}).optional(),
|
|
2753
|
-
subcircuit_id:
|
|
2768
|
+
subcircuit_id: z125.string().optional()
|
|
2754
2769
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
2755
2770
|
expectTypesMatch(true);
|
|
2756
2771
|
|
|
2757
2772
|
// src/pcb/pcb_courtyard_rect.ts
|
|
2758
|
-
import { z as
|
|
2759
|
-
var pcb_courtyard_rect =
|
|
2760
|
-
type:
|
|
2773
|
+
import { z as z126 } from "zod";
|
|
2774
|
+
var pcb_courtyard_rect = z126.object({
|
|
2775
|
+
type: z126.literal("pcb_courtyard_rect"),
|
|
2761
2776
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
2762
|
-
pcb_component_id:
|
|
2763
|
-
pcb_group_id:
|
|
2764
|
-
subcircuit_id:
|
|
2777
|
+
pcb_component_id: z126.string(),
|
|
2778
|
+
pcb_group_id: z126.string().optional(),
|
|
2779
|
+
subcircuit_id: z126.string().optional(),
|
|
2765
2780
|
center: point,
|
|
2766
2781
|
width: length,
|
|
2767
2782
|
height: length,
|
|
2768
2783
|
layer: visible_layer,
|
|
2769
|
-
color:
|
|
2784
|
+
color: z126.string().optional()
|
|
2770
2785
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
2771
2786
|
expectTypesMatch(true);
|
|
2772
2787
|
|
|
2773
2788
|
// src/pcb/pcb_courtyard_outline.ts
|
|
2774
|
-
import { z as
|
|
2775
|
-
var pcb_courtyard_outline =
|
|
2776
|
-
type:
|
|
2789
|
+
import { z as z127 } from "zod";
|
|
2790
|
+
var pcb_courtyard_outline = z127.object({
|
|
2791
|
+
type: z127.literal("pcb_courtyard_outline"),
|
|
2777
2792
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
2778
2793
|
"pcb_courtyard_outline"
|
|
2779
2794
|
),
|
|
2780
|
-
pcb_component_id:
|
|
2781
|
-
pcb_group_id:
|
|
2782
|
-
subcircuit_id:
|
|
2795
|
+
pcb_component_id: z127.string(),
|
|
2796
|
+
pcb_group_id: z127.string().optional(),
|
|
2797
|
+
subcircuit_id: z127.string().optional(),
|
|
2783
2798
|
layer: visible_layer,
|
|
2784
|
-
outline:
|
|
2799
|
+
outline: z127.array(point).min(2),
|
|
2785
2800
|
stroke_width: length.default("0.1mm"),
|
|
2786
|
-
is_closed:
|
|
2787
|
-
is_stroke_dashed:
|
|
2788
|
-
color:
|
|
2801
|
+
is_closed: z127.boolean().optional(),
|
|
2802
|
+
is_stroke_dashed: z127.boolean().optional(),
|
|
2803
|
+
color: z127.string().optional()
|
|
2789
2804
|
}).describe("Defines a courtyard outline on the PCB");
|
|
2790
2805
|
expectTypesMatch(true);
|
|
2791
2806
|
|
|
2792
2807
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
2793
|
-
import { z as
|
|
2794
|
-
var pcb_courtyard_polygon =
|
|
2795
|
-
type:
|
|
2808
|
+
import { z as z128 } from "zod";
|
|
2809
|
+
var pcb_courtyard_polygon = z128.object({
|
|
2810
|
+
type: z128.literal("pcb_courtyard_polygon"),
|
|
2796
2811
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
2797
2812
|
"pcb_courtyard_polygon"
|
|
2798
2813
|
),
|
|
2799
|
-
pcb_component_id:
|
|
2800
|
-
pcb_group_id:
|
|
2801
|
-
subcircuit_id:
|
|
2814
|
+
pcb_component_id: z128.string(),
|
|
2815
|
+
pcb_group_id: z128.string().optional(),
|
|
2816
|
+
subcircuit_id: z128.string().optional(),
|
|
2802
2817
|
layer: visible_layer,
|
|
2803
|
-
points:
|
|
2804
|
-
color:
|
|
2818
|
+
points: z128.array(point).min(3),
|
|
2819
|
+
color: z128.string().optional()
|
|
2805
2820
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
2806
2821
|
expectTypesMatch(true);
|
|
2807
2822
|
|
|
2808
2823
|
// src/cad/cad_component.ts
|
|
2809
|
-
import { z as
|
|
2810
|
-
var cad_component =
|
|
2811
|
-
type:
|
|
2812
|
-
cad_component_id:
|
|
2813
|
-
pcb_component_id:
|
|
2814
|
-
source_component_id:
|
|
2824
|
+
import { z as z129 } from "zod";
|
|
2825
|
+
var cad_component = z129.object({
|
|
2826
|
+
type: z129.literal("cad_component"),
|
|
2827
|
+
cad_component_id: z129.string(),
|
|
2828
|
+
pcb_component_id: z129.string(),
|
|
2829
|
+
source_component_id: z129.string(),
|
|
2815
2830
|
position: point3,
|
|
2816
2831
|
rotation: point3.optional(),
|
|
2817
2832
|
size: point3.optional(),
|
|
2818
2833
|
layer: layer_ref.optional(),
|
|
2819
|
-
subcircuit_id:
|
|
2834
|
+
subcircuit_id: z129.string().optional(),
|
|
2820
2835
|
// These are all ways to generate/load the 3d model
|
|
2821
|
-
footprinter_string:
|
|
2822
|
-
model_obj_url:
|
|
2823
|
-
model_stl_url:
|
|
2824
|
-
model_3mf_url:
|
|
2825
|
-
model_gltf_url:
|
|
2826
|
-
model_glb_url:
|
|
2827
|
-
model_step_url:
|
|
2828
|
-
model_wrl_url:
|
|
2829
|
-
model_unit_to_mm_scale_factor:
|
|
2830
|
-
model_jscad:
|
|
2831
|
-
show_as_translucent_model:
|
|
2836
|
+
footprinter_string: z129.string().optional(),
|
|
2837
|
+
model_obj_url: z129.string().optional(),
|
|
2838
|
+
model_stl_url: z129.string().optional(),
|
|
2839
|
+
model_3mf_url: z129.string().optional(),
|
|
2840
|
+
model_gltf_url: z129.string().optional(),
|
|
2841
|
+
model_glb_url: z129.string().optional(),
|
|
2842
|
+
model_step_url: z129.string().optional(),
|
|
2843
|
+
model_wrl_url: z129.string().optional(),
|
|
2844
|
+
model_unit_to_mm_scale_factor: z129.number().optional(),
|
|
2845
|
+
model_jscad: z129.any().optional(),
|
|
2846
|
+
show_as_translucent_model: z129.boolean().optional()
|
|
2832
2847
|
}).describe("Defines a component on the PCB");
|
|
2833
2848
|
expectTypesMatch(true);
|
|
2834
2849
|
|
|
2835
2850
|
// src/simulation/simulation_voltage_source.ts
|
|
2836
|
-
import { z as
|
|
2837
|
-
var wave_shape =
|
|
2838
|
-
var percentage =
|
|
2851
|
+
import { z as z130 } from "zod";
|
|
2852
|
+
var wave_shape = z130.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
2853
|
+
var percentage = z130.union([z130.string(), z130.number()]).transform((val) => {
|
|
2839
2854
|
if (typeof val === "string") {
|
|
2840
2855
|
if (val.endsWith("%")) {
|
|
2841
2856
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -2844,30 +2859,30 @@ var percentage = z129.union([z129.string(), z129.number()]).transform((val) => {
|
|
|
2844
2859
|
}
|
|
2845
2860
|
return val;
|
|
2846
2861
|
}).pipe(
|
|
2847
|
-
|
|
2862
|
+
z130.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
2848
2863
|
);
|
|
2849
|
-
var simulation_dc_voltage_source =
|
|
2850
|
-
type:
|
|
2864
|
+
var simulation_dc_voltage_source = z130.object({
|
|
2865
|
+
type: z130.literal("simulation_voltage_source"),
|
|
2851
2866
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2852
2867
|
"simulation_voltage_source"
|
|
2853
2868
|
),
|
|
2854
|
-
is_dc_source:
|
|
2855
|
-
positive_source_port_id:
|
|
2856
|
-
negative_source_port_id:
|
|
2857
|
-
positive_source_net_id:
|
|
2858
|
-
negative_source_net_id:
|
|
2869
|
+
is_dc_source: z130.literal(true).optional().default(true),
|
|
2870
|
+
positive_source_port_id: z130.string().optional(),
|
|
2871
|
+
negative_source_port_id: z130.string().optional(),
|
|
2872
|
+
positive_source_net_id: z130.string().optional(),
|
|
2873
|
+
negative_source_net_id: z130.string().optional(),
|
|
2859
2874
|
voltage
|
|
2860
2875
|
}).describe("Defines a DC voltage source for simulation");
|
|
2861
|
-
var simulation_ac_voltage_source =
|
|
2862
|
-
type:
|
|
2876
|
+
var simulation_ac_voltage_source = z130.object({
|
|
2877
|
+
type: z130.literal("simulation_voltage_source"),
|
|
2863
2878
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2864
2879
|
"simulation_voltage_source"
|
|
2865
2880
|
),
|
|
2866
|
-
is_dc_source:
|
|
2867
|
-
terminal1_source_port_id:
|
|
2868
|
-
terminal2_source_port_id:
|
|
2869
|
-
terminal1_source_net_id:
|
|
2870
|
-
terminal2_source_net_id:
|
|
2881
|
+
is_dc_source: z130.literal(false),
|
|
2882
|
+
terminal1_source_port_id: z130.string().optional(),
|
|
2883
|
+
terminal2_source_port_id: z130.string().optional(),
|
|
2884
|
+
terminal1_source_net_id: z130.string().optional(),
|
|
2885
|
+
terminal2_source_net_id: z130.string().optional(),
|
|
2871
2886
|
voltage: voltage.optional(),
|
|
2872
2887
|
frequency: frequency.optional(),
|
|
2873
2888
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -2875,25 +2890,25 @@ var simulation_ac_voltage_source = z129.object({
|
|
|
2875
2890
|
phase: rotation.optional(),
|
|
2876
2891
|
duty_cycle: percentage.optional()
|
|
2877
2892
|
}).describe("Defines an AC voltage source for simulation");
|
|
2878
|
-
var simulation_voltage_source =
|
|
2893
|
+
var simulation_voltage_source = z130.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
2879
2894
|
expectTypesMatch(true);
|
|
2880
2895
|
expectTypesMatch(true);
|
|
2881
2896
|
expectTypesMatch(true);
|
|
2882
2897
|
|
|
2883
2898
|
// src/simulation/simulation_experiment.ts
|
|
2884
|
-
import { z as
|
|
2885
|
-
var experiment_type =
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2899
|
+
import { z as z131 } from "zod";
|
|
2900
|
+
var experiment_type = z131.union([
|
|
2901
|
+
z131.literal("spice_dc_sweep"),
|
|
2902
|
+
z131.literal("spice_dc_operating_point"),
|
|
2903
|
+
z131.literal("spice_transient_analysis"),
|
|
2904
|
+
z131.literal("spice_ac_analysis")
|
|
2890
2905
|
]);
|
|
2891
|
-
var simulation_experiment =
|
|
2892
|
-
type:
|
|
2906
|
+
var simulation_experiment = z131.object({
|
|
2907
|
+
type: z131.literal("simulation_experiment"),
|
|
2893
2908
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
2894
2909
|
"simulation_experiment"
|
|
2895
2910
|
),
|
|
2896
|
-
name:
|
|
2911
|
+
name: z131.string(),
|
|
2897
2912
|
experiment_type,
|
|
2898
2913
|
time_per_step: duration_ms.optional(),
|
|
2899
2914
|
start_time_ms: ms.optional(),
|
|
@@ -2902,53 +2917,53 @@ var simulation_experiment = z130.object({
|
|
|
2902
2917
|
expectTypesMatch(true);
|
|
2903
2918
|
|
|
2904
2919
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
2905
|
-
import { z as
|
|
2906
|
-
var simulation_transient_voltage_graph =
|
|
2907
|
-
type:
|
|
2920
|
+
import { z as z132 } from "zod";
|
|
2921
|
+
var simulation_transient_voltage_graph = z132.object({
|
|
2922
|
+
type: z132.literal("simulation_transient_voltage_graph"),
|
|
2908
2923
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
2909
2924
|
"simulation_transient_voltage_graph"
|
|
2910
2925
|
),
|
|
2911
|
-
simulation_experiment_id:
|
|
2912
|
-
timestamps_ms:
|
|
2913
|
-
voltage_levels:
|
|
2914
|
-
source_component_id:
|
|
2915
|
-
subcircuit_connectivity_map_key:
|
|
2926
|
+
simulation_experiment_id: z132.string(),
|
|
2927
|
+
timestamps_ms: z132.array(z132.number()).optional(),
|
|
2928
|
+
voltage_levels: z132.array(z132.number()),
|
|
2929
|
+
source_component_id: z132.string().optional(),
|
|
2930
|
+
subcircuit_connectivity_map_key: z132.string().optional(),
|
|
2916
2931
|
time_per_step: duration_ms,
|
|
2917
2932
|
start_time_ms: ms,
|
|
2918
2933
|
end_time_ms: ms,
|
|
2919
|
-
name:
|
|
2920
|
-
color:
|
|
2934
|
+
name: z132.string().optional(),
|
|
2935
|
+
color: z132.string().optional()
|
|
2921
2936
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
2922
2937
|
expectTypesMatch(true);
|
|
2923
2938
|
|
|
2924
2939
|
// src/simulation/simulation_switch.ts
|
|
2925
|
-
import { z as
|
|
2926
|
-
var simulation_switch =
|
|
2927
|
-
type:
|
|
2940
|
+
import { z as z133 } from "zod";
|
|
2941
|
+
var simulation_switch = z133.object({
|
|
2942
|
+
type: z133.literal("simulation_switch"),
|
|
2928
2943
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
2929
|
-
source_component_id:
|
|
2944
|
+
source_component_id: z133.string().optional(),
|
|
2930
2945
|
closes_at: ms.optional(),
|
|
2931
2946
|
opens_at: ms.optional(),
|
|
2932
|
-
starts_closed:
|
|
2947
|
+
starts_closed: z133.boolean().optional(),
|
|
2933
2948
|
switching_frequency: frequency.optional()
|
|
2934
2949
|
}).describe("Defines a switch for simulation timing control");
|
|
2935
2950
|
expectTypesMatch(true);
|
|
2936
2951
|
|
|
2937
2952
|
// src/simulation/simulation_voltage_probe.ts
|
|
2938
|
-
import { z as
|
|
2939
|
-
var simulation_voltage_probe =
|
|
2940
|
-
type:
|
|
2953
|
+
import { z as z134 } from "zod";
|
|
2954
|
+
var simulation_voltage_probe = z134.object({
|
|
2955
|
+
type: z134.literal("simulation_voltage_probe"),
|
|
2941
2956
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
2942
2957
|
"simulation_voltage_probe"
|
|
2943
2958
|
),
|
|
2944
|
-
source_component_id:
|
|
2945
|
-
name:
|
|
2946
|
-
signal_input_source_port_id:
|
|
2947
|
-
signal_input_source_net_id:
|
|
2948
|
-
reference_input_source_port_id:
|
|
2949
|
-
reference_input_source_net_id:
|
|
2950
|
-
subcircuit_id:
|
|
2951
|
-
color:
|
|
2959
|
+
source_component_id: z134.string().optional(),
|
|
2960
|
+
name: z134.string().optional(),
|
|
2961
|
+
signal_input_source_port_id: z134.string().optional(),
|
|
2962
|
+
signal_input_source_net_id: z134.string().optional(),
|
|
2963
|
+
reference_input_source_port_id: z134.string().optional(),
|
|
2964
|
+
reference_input_source_net_id: z134.string().optional(),
|
|
2965
|
+
subcircuit_id: z134.string().optional(),
|
|
2966
|
+
color: z134.string().optional()
|
|
2952
2967
|
}).describe(
|
|
2953
2968
|
"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."
|
|
2954
2969
|
).superRefine((data, ctx) => {
|
|
@@ -2958,20 +2973,20 @@ var simulation_voltage_probe = z133.object({
|
|
|
2958
2973
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
2959
2974
|
if (has_ports && has_nets) {
|
|
2960
2975
|
ctx.addIssue({
|
|
2961
|
-
code:
|
|
2976
|
+
code: z134.ZodIssueCode.custom,
|
|
2962
2977
|
message: "Cannot mix port and net connections in a differential probe."
|
|
2963
2978
|
});
|
|
2964
2979
|
} else if (has_ports) {
|
|
2965
2980
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
2966
2981
|
ctx.addIssue({
|
|
2967
|
-
code:
|
|
2982
|
+
code: z134.ZodIssueCode.custom,
|
|
2968
2983
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
2969
2984
|
});
|
|
2970
2985
|
}
|
|
2971
2986
|
} else if (has_nets) {
|
|
2972
2987
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
2973
2988
|
ctx.addIssue({
|
|
2974
|
-
code:
|
|
2989
|
+
code: z134.ZodIssueCode.custom,
|
|
2975
2990
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
2976
2991
|
});
|
|
2977
2992
|
}
|
|
@@ -2979,7 +2994,7 @@ var simulation_voltage_probe = z133.object({
|
|
|
2979
2994
|
} else {
|
|
2980
2995
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
2981
2996
|
ctx.addIssue({
|
|
2982
|
-
code:
|
|
2997
|
+
code: z134.ZodIssueCode.custom,
|
|
2983
2998
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
2984
2999
|
});
|
|
2985
3000
|
}
|
|
@@ -2988,22 +3003,22 @@ var simulation_voltage_probe = z133.object({
|
|
|
2988
3003
|
expectTypesMatch(true);
|
|
2989
3004
|
|
|
2990
3005
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
2991
|
-
import { z as
|
|
2992
|
-
var simulation_unknown_experiment_error =
|
|
2993
|
-
type:
|
|
3006
|
+
import { z as z135 } from "zod";
|
|
3007
|
+
var simulation_unknown_experiment_error = z135.object({
|
|
3008
|
+
type: z135.literal("simulation_unknown_experiment_error"),
|
|
2994
3009
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
2995
3010
|
"simulation_unknown_experiment_error"
|
|
2996
3011
|
),
|
|
2997
|
-
error_type:
|
|
2998
|
-
message:
|
|
2999
|
-
simulation_experiment_id:
|
|
3000
|
-
subcircuit_id:
|
|
3012
|
+
error_type: z135.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
3013
|
+
message: z135.string(),
|
|
3014
|
+
simulation_experiment_id: z135.string().optional(),
|
|
3015
|
+
subcircuit_id: z135.string().optional()
|
|
3001
3016
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
3002
3017
|
expectTypesMatch(true);
|
|
3003
3018
|
|
|
3004
3019
|
// src/any_circuit_element.ts
|
|
3005
|
-
import { z as
|
|
3006
|
-
var any_circuit_element =
|
|
3020
|
+
import { z as z136 } from "zod";
|
|
3021
|
+
var any_circuit_element = z136.union([
|
|
3007
3022
|
source_trace,
|
|
3008
3023
|
source_port,
|
|
3009
3024
|
source_component_internal_connection,
|
|
@@ -3057,6 +3072,7 @@ var any_circuit_element = z135.union([
|
|
|
3057
3072
|
pcb_silkscreen_line,
|
|
3058
3073
|
pcb_silkscreen_path,
|
|
3059
3074
|
pcb_silkscreen_text,
|
|
3075
|
+
pcb_silkscreen_pill,
|
|
3060
3076
|
pcb_copper_text,
|
|
3061
3077
|
pcb_silkscreen_rect,
|
|
3062
3078
|
pcb_silkscreen_circle,
|
|
@@ -3198,6 +3214,7 @@ export {
|
|
|
3198
3214
|
pcb_silkscreen_line,
|
|
3199
3215
|
pcb_silkscreen_oval,
|
|
3200
3216
|
pcb_silkscreen_path,
|
|
3217
|
+
pcb_silkscreen_pill,
|
|
3201
3218
|
pcb_silkscreen_rect,
|
|
3202
3219
|
pcb_silkscreen_text,
|
|
3203
3220
|
pcb_smtpad,
|