@tscircuit/props 0.0.676 → 0.0.678
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -0
- package/dist/index.d.ts +770 -175
- package/dist/index.js +1297 -1220
- package/dist/index.js.map +1 -1
- package/lib/assembly/index.ts +3 -0
- package/lib/assembly/motor.ts +57 -0
- package/lib/components/board.ts +25 -0
- package/lib/components/pcb-soldermask-opening.ts +56 -0
- package/lib/index.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -184,17 +184,45 @@ var assemblyDeviceProps = z8.object({
|
|
|
184
184
|
);
|
|
185
185
|
expectTypesMatch(true);
|
|
186
186
|
|
|
187
|
-
// lib/assembly/
|
|
187
|
+
// lib/assembly/motor.ts
|
|
188
188
|
import { z as z9 } from "zod";
|
|
189
|
-
var
|
|
189
|
+
var assemblyMotorProps = z9.object({
|
|
190
|
+
name: z9.string().refine((value) => value.trim().length > 0, {
|
|
191
|
+
message: "name cannot be empty"
|
|
192
|
+
}),
|
|
193
|
+
displayName: z9.string().optional(),
|
|
194
|
+
standard: z9.enum(["nema8", "nema17", "nema23"]).optional(),
|
|
195
|
+
model: z9.string().trim().min(1).optional(),
|
|
196
|
+
shaftFacingDirection: cadModelAxisDirection.default("z+")
|
|
197
|
+
}).superRefine((motor, context) => {
|
|
198
|
+
if (motor.standard === void 0 && motor.model === void 0) {
|
|
199
|
+
context.addIssue({
|
|
200
|
+
code: z9.ZodIssueCode.custom,
|
|
201
|
+
message: "Provide standard or model",
|
|
202
|
+
path: ["standard"]
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
if (motor.standard !== void 0 && motor.model !== void 0) {
|
|
206
|
+
context.addIssue({
|
|
207
|
+
code: z9.ZodIssueCode.custom,
|
|
208
|
+
message: "Provide either standard or model, not both",
|
|
209
|
+
path: ["model"]
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
expectTypesMatch(true);
|
|
214
|
+
|
|
215
|
+
// lib/assembly/screen.ts
|
|
216
|
+
import { z as z10 } from "zod";
|
|
217
|
+
var nonemptyString = (fieldName) => z10.string().refine((value) => value.trim().length > 0, {
|
|
190
218
|
message: `${fieldName} cannot be empty`
|
|
191
219
|
});
|
|
192
220
|
var positiveDistance = (fieldName) => distance.refine((value) => Number.isFinite(value) && value > 0, {
|
|
193
221
|
message: `${fieldName} must be a positive finite distance`
|
|
194
222
|
});
|
|
195
|
-
var assemblyScreenProps =
|
|
223
|
+
var assemblyScreenProps = z10.object({
|
|
196
224
|
name: nonemptyString("name"),
|
|
197
|
-
model:
|
|
225
|
+
model: z10.string().trim().min(1).optional(),
|
|
198
226
|
modelUrl: url.refine((value) => value.trim().length > 0, {
|
|
199
227
|
message: "modelUrl cannot be empty"
|
|
200
228
|
}).optional(),
|
|
@@ -205,14 +233,14 @@ var assemblyScreenProps = z9.object({
|
|
|
205
233
|
}).superRefine((screen, context) => {
|
|
206
234
|
if (screen.model !== void 0 && (screen.modelUrl !== void 0 || screen.cadModel !== void 0)) {
|
|
207
235
|
context.addIssue({
|
|
208
|
-
code:
|
|
236
|
+
code: z10.ZodIssueCode.custom,
|
|
209
237
|
message: "Provide only one of model, modelUrl, or cadModel",
|
|
210
238
|
path: ["model"]
|
|
211
239
|
});
|
|
212
240
|
}
|
|
213
241
|
if (screen.modelUrl !== void 0 && screen.cadModel !== void 0) {
|
|
214
242
|
context.addIssue({
|
|
215
|
-
code:
|
|
243
|
+
code: z10.ZodIssueCode.custom,
|
|
216
244
|
message: "Provide either modelUrl or cadModel, not both",
|
|
217
245
|
path: ["modelUrl"]
|
|
218
246
|
});
|
|
@@ -221,7 +249,7 @@ var assemblyScreenProps = z9.object({
|
|
|
221
249
|
const hasHeight = screen.height !== void 0;
|
|
222
250
|
if (hasWidth !== hasHeight) {
|
|
223
251
|
context.addIssue({
|
|
224
|
-
code:
|
|
252
|
+
code: z10.ZodIssueCode.custom,
|
|
225
253
|
message: "width and height must be provided together",
|
|
226
254
|
path: hasWidth ? ["height"] : ["width"]
|
|
227
255
|
});
|
|
@@ -229,7 +257,7 @@ var assemblyScreenProps = z9.object({
|
|
|
229
257
|
}
|
|
230
258
|
if (!hasWidth && screen.cadModel === void 0 && screen.modelUrl === void 0 && screen.model === void 0) {
|
|
231
259
|
context.addIssue({
|
|
232
|
-
code:
|
|
260
|
+
code: z10.ZodIssueCode.custom,
|
|
233
261
|
message: "provide width and height, model, cadModel, or modelUrl",
|
|
234
262
|
path: []
|
|
235
263
|
});
|
|
@@ -240,22 +268,23 @@ expectTypesMatch(true);
|
|
|
240
268
|
// lib/assembly/index.ts
|
|
241
269
|
var assemblyProps = {
|
|
242
270
|
device: assemblyDeviceProps,
|
|
271
|
+
motor: assemblyMotorProps,
|
|
243
272
|
screen: assemblyScreenProps,
|
|
244
273
|
subassembly: assemblySubassemblyProps,
|
|
245
274
|
cadassembly: assemblyCadAssemblyProps
|
|
246
275
|
};
|
|
247
276
|
|
|
248
277
|
// lib/enclosure/cutout-aperture.ts
|
|
249
|
-
import { z as
|
|
278
|
+
import { z as z11 } from "zod";
|
|
250
279
|
var enclosureCutoutApertureShapes = ["pill", "rect", "circle"];
|
|
251
|
-
var cutoutApertureBaseProps =
|
|
280
|
+
var cutoutApertureBaseProps = z11.object({
|
|
252
281
|
margin: distance.optional(),
|
|
253
282
|
widthDimensionOffset: distance.optional(),
|
|
254
283
|
heightDimensionOffset: distance.optional(),
|
|
255
284
|
depth: distance.optional()
|
|
256
285
|
});
|
|
257
286
|
var apertureOnlyProps = cutoutApertureBaseProps.shape;
|
|
258
|
-
var enclosureCutoutApertureProps =
|
|
287
|
+
var enclosureCutoutApertureProps = z11.discriminatedUnion("shape", [
|
|
259
288
|
pillShapeProps.extend(apertureOnlyProps),
|
|
260
289
|
rectShapeProps.extend(apertureOnlyProps),
|
|
261
290
|
circleShapeProps.extend(apertureOnlyProps)
|
|
@@ -263,10 +292,10 @@ var enclosureCutoutApertureProps = z10.discriminatedUnion("shape", [
|
|
|
263
292
|
expectTypesMatch(true);
|
|
264
293
|
|
|
265
294
|
// lib/enclosure/fdm/box.ts
|
|
266
|
-
import { z as
|
|
267
|
-
var enclosureFdmBoxProps =
|
|
268
|
-
name:
|
|
269
|
-
boardRef:
|
|
295
|
+
import { z as z12 } from "zod";
|
|
296
|
+
var enclosureFdmBoxProps = z12.object({
|
|
297
|
+
name: z12.string().optional(),
|
|
298
|
+
boardRef: z12.string().min(1),
|
|
270
299
|
width: distance.optional(),
|
|
271
300
|
height: distance.optional(),
|
|
272
301
|
depth: distance.optional(),
|
|
@@ -277,8 +306,8 @@ var enclosureFdmBoxProps = z11.object({
|
|
|
277
306
|
standoffHeight: distance.optional(),
|
|
278
307
|
topHeadroom: distance.optional(),
|
|
279
308
|
lidLipDepth: distance.optional(),
|
|
280
|
-
disableCutouts:
|
|
281
|
-
showHiddenEdges:
|
|
309
|
+
disableCutouts: z12.boolean().optional(),
|
|
310
|
+
showHiddenEdges: z12.boolean().optional()
|
|
282
311
|
});
|
|
283
312
|
expectTypesMatch(true);
|
|
284
313
|
|
|
@@ -291,8 +320,8 @@ var enclosureProps = {
|
|
|
291
320
|
};
|
|
292
321
|
|
|
293
322
|
// lib/common/portHints.ts
|
|
294
|
-
import { z as
|
|
295
|
-
var portHints =
|
|
323
|
+
import { z as z13 } from "zod";
|
|
324
|
+
var portHints = z13.array(z13.string().or(z13.number()));
|
|
296
325
|
expectTypesMatch(true);
|
|
297
326
|
|
|
298
327
|
// lib/common/layout.ts
|
|
@@ -302,20 +331,20 @@ import {
|
|
|
302
331
|
rotation as rotation2,
|
|
303
332
|
supplier_name
|
|
304
333
|
} from "circuit-json";
|
|
305
|
-
import { z as
|
|
334
|
+
import { z as z23 } from "zod";
|
|
306
335
|
|
|
307
336
|
// lib/common/footprintProp.ts
|
|
308
|
-
import { z as
|
|
309
|
-
var footprintProp =
|
|
337
|
+
import { z as z14 } from "zod";
|
|
338
|
+
var footprintProp = z14.custom((v) => true);
|
|
310
339
|
|
|
311
340
|
// lib/common/kicadFootprintMetadata.ts
|
|
312
341
|
import { distance as distance4, rotation } from "circuit-json";
|
|
313
|
-
import { z as
|
|
342
|
+
import { z as z16 } from "zod";
|
|
314
343
|
|
|
315
344
|
// lib/common/point.ts
|
|
316
345
|
import { distance as distance3 } from "circuit-json";
|
|
317
|
-
import { z as
|
|
318
|
-
var point =
|
|
346
|
+
import { z as z15 } from "zod";
|
|
347
|
+
var point = z15.object({
|
|
319
348
|
x: distance3,
|
|
320
349
|
y: distance3
|
|
321
350
|
});
|
|
@@ -325,25 +354,25 @@ var kicadAt = point.extend({
|
|
|
325
354
|
rotation: rotation.optional()
|
|
326
355
|
});
|
|
327
356
|
expectTypesMatch(true);
|
|
328
|
-
var kicadFont =
|
|
357
|
+
var kicadFont = z16.object({
|
|
329
358
|
size: point.optional(),
|
|
330
359
|
thickness: distance4.optional()
|
|
331
360
|
});
|
|
332
361
|
expectTypesMatch(true);
|
|
333
|
-
var kicadEffects =
|
|
362
|
+
var kicadEffects = z16.object({
|
|
334
363
|
font: kicadFont.optional()
|
|
335
364
|
});
|
|
336
365
|
expectTypesMatch(true);
|
|
337
|
-
var kicadProperty =
|
|
338
|
-
value:
|
|
366
|
+
var kicadProperty = z16.object({
|
|
367
|
+
value: z16.string(),
|
|
339
368
|
at: kicadAt.optional(),
|
|
340
|
-
layer:
|
|
341
|
-
uuid:
|
|
342
|
-
hide:
|
|
369
|
+
layer: z16.string().optional(),
|
|
370
|
+
uuid: z16.string().optional(),
|
|
371
|
+
hide: z16.boolean().optional(),
|
|
343
372
|
effects: kicadEffects.optional()
|
|
344
373
|
});
|
|
345
374
|
expectTypesMatch(true);
|
|
346
|
-
var kicadFootprintProperties =
|
|
375
|
+
var kicadFootprintProperties = z16.object({
|
|
347
376
|
Reference: kicadProperty.optional(),
|
|
348
377
|
Value: kicadProperty.optional(),
|
|
349
378
|
Datasheet: kicadProperty.optional(),
|
|
@@ -352,74 +381,74 @@ var kicadFootprintProperties = z15.object({
|
|
|
352
381
|
expectTypesMatch(
|
|
353
382
|
true
|
|
354
383
|
);
|
|
355
|
-
var kicadFootprintAttributes =
|
|
356
|
-
through_hole:
|
|
357
|
-
smd:
|
|
358
|
-
exclude_from_pos_files:
|
|
359
|
-
exclude_from_bom:
|
|
384
|
+
var kicadFootprintAttributes = z16.object({
|
|
385
|
+
through_hole: z16.boolean().optional(),
|
|
386
|
+
smd: z16.boolean().optional(),
|
|
387
|
+
exclude_from_pos_files: z16.boolean().optional(),
|
|
388
|
+
exclude_from_bom: z16.boolean().optional()
|
|
360
389
|
});
|
|
361
390
|
expectTypesMatch(
|
|
362
391
|
true
|
|
363
392
|
);
|
|
364
|
-
var kicadFootprintPad =
|
|
365
|
-
name:
|
|
366
|
-
type:
|
|
367
|
-
shape:
|
|
393
|
+
var kicadFootprintPad = z16.object({
|
|
394
|
+
name: z16.string(),
|
|
395
|
+
type: z16.string(),
|
|
396
|
+
shape: z16.string().optional(),
|
|
368
397
|
at: kicadAt.optional(),
|
|
369
398
|
size: point.optional(),
|
|
370
399
|
drill: distance4.optional(),
|
|
371
|
-
layers:
|
|
372
|
-
removeUnusedLayers:
|
|
373
|
-
uuid:
|
|
400
|
+
layers: z16.array(z16.string()).optional(),
|
|
401
|
+
removeUnusedLayers: z16.boolean().optional(),
|
|
402
|
+
uuid: z16.string().optional()
|
|
374
403
|
});
|
|
375
404
|
expectTypesMatch(true);
|
|
376
|
-
var kicadFootprintModel =
|
|
377
|
-
path:
|
|
405
|
+
var kicadFootprintModel = z16.object({
|
|
406
|
+
path: z16.string(),
|
|
378
407
|
offset: point3.optional(),
|
|
379
408
|
scale: point3.optional(),
|
|
380
409
|
rotate: point3.optional()
|
|
381
410
|
});
|
|
382
411
|
expectTypesMatch(true);
|
|
383
|
-
var kicadFootprintMetadata =
|
|
384
|
-
footprintName:
|
|
385
|
-
version:
|
|
386
|
-
generator:
|
|
387
|
-
generatorVersion:
|
|
388
|
-
layer:
|
|
412
|
+
var kicadFootprintMetadata = z16.object({
|
|
413
|
+
footprintName: z16.string().optional(),
|
|
414
|
+
version: z16.union([z16.number(), z16.string()]).optional(),
|
|
415
|
+
generator: z16.string().optional(),
|
|
416
|
+
generatorVersion: z16.union([z16.number(), z16.string()]).optional(),
|
|
417
|
+
layer: z16.string().optional(),
|
|
389
418
|
properties: kicadFootprintProperties.optional(),
|
|
390
419
|
attributes: kicadFootprintAttributes.optional(),
|
|
391
|
-
pads:
|
|
392
|
-
embeddedFonts:
|
|
420
|
+
pads: z16.array(kicadFootprintPad).optional(),
|
|
421
|
+
embeddedFonts: z16.boolean().optional(),
|
|
393
422
|
model: kicadFootprintModel.optional()
|
|
394
423
|
});
|
|
395
424
|
expectTypesMatch(true);
|
|
396
425
|
|
|
397
426
|
// lib/common/kicadSymbolMetadata.ts
|
|
398
427
|
import { distance as distance5 } from "circuit-json";
|
|
399
|
-
import { z as
|
|
400
|
-
var kicadSymbolPinNumbers =
|
|
401
|
-
hide:
|
|
428
|
+
import { z as z17 } from "zod";
|
|
429
|
+
var kicadSymbolPinNumbers = z17.object({
|
|
430
|
+
hide: z17.boolean().optional()
|
|
402
431
|
});
|
|
403
432
|
expectTypesMatch(true);
|
|
404
|
-
var kicadSymbolPinNames =
|
|
433
|
+
var kicadSymbolPinNames = z17.object({
|
|
405
434
|
offset: distance5.optional(),
|
|
406
|
-
hide:
|
|
435
|
+
hide: z17.boolean().optional()
|
|
407
436
|
});
|
|
408
437
|
expectTypesMatch(true);
|
|
409
|
-
var kicadSymbolEffects =
|
|
438
|
+
var kicadSymbolEffects = z17.object({
|
|
410
439
|
font: kicadFont.optional(),
|
|
411
|
-
justify:
|
|
412
|
-
hide:
|
|
440
|
+
justify: z17.union([z17.string(), z17.array(z17.string())]).optional(),
|
|
441
|
+
hide: z17.boolean().optional()
|
|
413
442
|
});
|
|
414
443
|
expectTypesMatch(true);
|
|
415
|
-
var kicadSymbolProperty =
|
|
416
|
-
value:
|
|
417
|
-
id:
|
|
444
|
+
var kicadSymbolProperty = z17.object({
|
|
445
|
+
value: z17.string(),
|
|
446
|
+
id: z17.union([z17.number(), z17.string()]).optional(),
|
|
418
447
|
at: kicadAt.optional(),
|
|
419
448
|
effects: kicadSymbolEffects.optional()
|
|
420
449
|
});
|
|
421
450
|
expectTypesMatch(true);
|
|
422
|
-
var kicadSymbolProperties =
|
|
451
|
+
var kicadSymbolProperties = z17.object({
|
|
423
452
|
Reference: kicadSymbolProperty.optional(),
|
|
424
453
|
Value: kicadSymbolProperty.optional(),
|
|
425
454
|
Footprint: kicadSymbolProperty.optional(),
|
|
@@ -429,55 +458,55 @@ var kicadSymbolProperties = z16.object({
|
|
|
429
458
|
ki_fp_filters: kicadSymbolProperty.optional()
|
|
430
459
|
});
|
|
431
460
|
expectTypesMatch(true);
|
|
432
|
-
var kicadSymbolMetadata =
|
|
433
|
-
symbolName:
|
|
434
|
-
extends:
|
|
461
|
+
var kicadSymbolMetadata = z17.object({
|
|
462
|
+
symbolName: z17.string().optional(),
|
|
463
|
+
extends: z17.string().optional(),
|
|
435
464
|
pinNumbers: kicadSymbolPinNumbers.optional(),
|
|
436
465
|
pinNames: kicadSymbolPinNames.optional(),
|
|
437
|
-
excludeFromSim:
|
|
438
|
-
inBom:
|
|
439
|
-
onBoard:
|
|
466
|
+
excludeFromSim: z17.boolean().optional(),
|
|
467
|
+
inBom: z17.boolean().optional(),
|
|
468
|
+
onBoard: z17.boolean().optional(),
|
|
440
469
|
properties: kicadSymbolProperties.optional(),
|
|
441
|
-
embeddedFonts:
|
|
470
|
+
embeddedFonts: z17.boolean().optional()
|
|
442
471
|
});
|
|
443
472
|
expectTypesMatch(true);
|
|
444
473
|
|
|
445
474
|
// lib/common/pcbStyle.ts
|
|
446
475
|
import { distance as distance6 } from "circuit-json";
|
|
447
|
-
import { z as
|
|
448
|
-
var pcbStyle =
|
|
476
|
+
import { z as z18 } from "zod";
|
|
477
|
+
var pcbStyle = z18.object({
|
|
449
478
|
silkscreenFontSize: distance6.optional(),
|
|
450
479
|
viaPadDiameter: distance6.optional(),
|
|
451
480
|
viaHoleDiameter: distance6.optional(),
|
|
452
|
-
silkscreenTextPosition:
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
offsetX:
|
|
456
|
-
offsetY:
|
|
481
|
+
silkscreenTextPosition: z18.union([
|
|
482
|
+
z18.enum(["centered", "outside", "none"]),
|
|
483
|
+
z18.object({
|
|
484
|
+
offsetX: z18.number(),
|
|
485
|
+
offsetY: z18.number()
|
|
457
486
|
})
|
|
458
487
|
]).optional(),
|
|
459
|
-
silkscreenTextVisibility:
|
|
488
|
+
silkscreenTextVisibility: z18.enum(["hidden", "visible", "inherit"]).optional()
|
|
460
489
|
});
|
|
461
490
|
expectTypesMatch(true);
|
|
462
491
|
|
|
463
492
|
// lib/common/pcbSx.ts
|
|
464
493
|
import { length as length2 } from "circuit-json";
|
|
465
|
-
import { z as
|
|
466
|
-
var pcbSxValue =
|
|
494
|
+
import { z as z19 } from "zod";
|
|
495
|
+
var pcbSxValue = z19.object({
|
|
467
496
|
fontSize: length2.optional(),
|
|
468
497
|
pcbX: pcbCoordinate.optional(),
|
|
469
498
|
pcbY: pcbCoordinate.optional(),
|
|
470
|
-
visibility:
|
|
499
|
+
visibility: z19.enum(["hidden", "visible", "inherit"]).optional()
|
|
471
500
|
});
|
|
472
|
-
var pcbSx =
|
|
473
|
-
|
|
501
|
+
var pcbSx = z19.record(
|
|
502
|
+
z19.string(),
|
|
474
503
|
pcbSxValue
|
|
475
504
|
);
|
|
476
505
|
expectTypesMatch(true);
|
|
477
506
|
|
|
478
507
|
// lib/common/pinAttributeMap.ts
|
|
479
|
-
import { z as
|
|
480
|
-
var pinCapability =
|
|
508
|
+
import { z as z20 } from "zod";
|
|
509
|
+
var pinCapability = z20.enum([
|
|
481
510
|
"i2c_sda",
|
|
482
511
|
"i2c_scl",
|
|
483
512
|
"spi_cs",
|
|
@@ -487,61 +516,61 @@ var pinCapability = z19.enum([
|
|
|
487
516
|
"uart_tx",
|
|
488
517
|
"uart_rx"
|
|
489
518
|
]);
|
|
490
|
-
var pinAttributeMap =
|
|
491
|
-
isInput:
|
|
492
|
-
isOutput:
|
|
493
|
-
isBidirectional:
|
|
494
|
-
isPassive:
|
|
495
|
-
canUseTriState:
|
|
496
|
-
isUsingTriState:
|
|
497
|
-
canUseOpenCollector:
|
|
498
|
-
isUsingOpenCollector:
|
|
499
|
-
canUseOpenEmitter:
|
|
500
|
-
isUsingOpenEmitter:
|
|
501
|
-
capabilities:
|
|
502
|
-
activeCapabilities:
|
|
519
|
+
var pinAttributeMap = z20.object({
|
|
520
|
+
isInput: z20.boolean().optional(),
|
|
521
|
+
isOutput: z20.boolean().optional(),
|
|
522
|
+
isBidirectional: z20.boolean().optional(),
|
|
523
|
+
isPassive: z20.boolean().optional(),
|
|
524
|
+
canUseTriState: z20.boolean().optional(),
|
|
525
|
+
isUsingTriState: z20.boolean().optional(),
|
|
526
|
+
canUseOpenCollector: z20.boolean().optional(),
|
|
527
|
+
isUsingOpenCollector: z20.boolean().optional(),
|
|
528
|
+
canUseOpenEmitter: z20.boolean().optional(),
|
|
529
|
+
isUsingOpenEmitter: z20.boolean().optional(),
|
|
530
|
+
capabilities: z20.array(pinCapability).optional(),
|
|
531
|
+
activeCapabilities: z20.array(pinCapability).optional(),
|
|
503
532
|
activeCapability: pinCapability.optional(),
|
|
504
|
-
providesPower:
|
|
505
|
-
requiresPower:
|
|
506
|
-
providesGround:
|
|
507
|
-
requiresGround:
|
|
508
|
-
providesVoltage:
|
|
509
|
-
requiresVoltage:
|
|
510
|
-
doNotConnect:
|
|
511
|
-
includeInBoardPinout:
|
|
512
|
-
highlightColor:
|
|
513
|
-
mustBeConnected:
|
|
514
|
-
canUseInternalPullup:
|
|
515
|
-
isUsingInternalPullup:
|
|
516
|
-
needsExternalPullup:
|
|
517
|
-
canUseInternalPulldown:
|
|
518
|
-
isUsingInternalPulldown:
|
|
519
|
-
needsExternalPulldown:
|
|
520
|
-
canUseOpenDrain:
|
|
521
|
-
isUsingOpenDrain:
|
|
522
|
-
canUsePushPull:
|
|
523
|
-
isUsingPushPull:
|
|
524
|
-
shouldHaveDecouplingCapacitor:
|
|
525
|
-
recommendedDecouplingCapacitorCapacitance:
|
|
526
|
-
isGpio:
|
|
533
|
+
providesPower: z20.boolean().optional(),
|
|
534
|
+
requiresPower: z20.boolean().optional(),
|
|
535
|
+
providesGround: z20.boolean().optional(),
|
|
536
|
+
requiresGround: z20.boolean().optional(),
|
|
537
|
+
providesVoltage: z20.union([z20.string(), z20.number()]).optional(),
|
|
538
|
+
requiresVoltage: z20.union([z20.string(), z20.number()]).optional(),
|
|
539
|
+
doNotConnect: z20.boolean().optional(),
|
|
540
|
+
includeInBoardPinout: z20.boolean().optional(),
|
|
541
|
+
highlightColor: z20.string().optional(),
|
|
542
|
+
mustBeConnected: z20.boolean().optional(),
|
|
543
|
+
canUseInternalPullup: z20.boolean().optional(),
|
|
544
|
+
isUsingInternalPullup: z20.boolean().optional(),
|
|
545
|
+
needsExternalPullup: z20.boolean().optional(),
|
|
546
|
+
canUseInternalPulldown: z20.boolean().optional(),
|
|
547
|
+
isUsingInternalPulldown: z20.boolean().optional(),
|
|
548
|
+
needsExternalPulldown: z20.boolean().optional(),
|
|
549
|
+
canUseOpenDrain: z20.boolean().optional(),
|
|
550
|
+
isUsingOpenDrain: z20.boolean().optional(),
|
|
551
|
+
canUsePushPull: z20.boolean().optional(),
|
|
552
|
+
isUsingPushPull: z20.boolean().optional(),
|
|
553
|
+
shouldHaveDecouplingCapacitor: z20.boolean().optional(),
|
|
554
|
+
recommendedDecouplingCapacitorCapacitance: z20.union([z20.string(), z20.number()]).optional(),
|
|
555
|
+
isGpio: z20.boolean().optional()
|
|
527
556
|
});
|
|
528
557
|
expectTypesMatch(true);
|
|
529
558
|
|
|
530
559
|
// lib/common/schStyle.ts
|
|
531
560
|
import { distance as distance7 } from "circuit-json";
|
|
532
|
-
import { z as
|
|
533
|
-
var schStyle =
|
|
534
|
-
defaultPassiveSize:
|
|
535
|
-
defaultCapacitorOrientation:
|
|
561
|
+
import { z as z21 } from "zod";
|
|
562
|
+
var schStyle = z21.object({
|
|
563
|
+
defaultPassiveSize: z21.union([z21.enum(["xs", "sm", "md"]), distance7]).optional(),
|
|
564
|
+
defaultCapacitorOrientation: z21.enum(["vertical", "none"]).optional()
|
|
536
565
|
});
|
|
537
566
|
expectTypesMatch(true);
|
|
538
567
|
|
|
539
568
|
// lib/common/symbolProp.ts
|
|
540
|
-
import { z as
|
|
541
|
-
var symbolProp =
|
|
569
|
+
import { z as z22 } from "zod";
|
|
570
|
+
var symbolProp = z22.custom((v) => true);
|
|
542
571
|
|
|
543
572
|
// lib/common/layout.ts
|
|
544
|
-
var pcbLayoutProps =
|
|
573
|
+
var pcbLayoutProps = z23.object({
|
|
545
574
|
pcbX: pcbCoordinate.optional(),
|
|
546
575
|
pcbY: pcbCoordinate.optional(),
|
|
547
576
|
pcbLeftEdgeX: pcbCoordinate.optional(),
|
|
@@ -551,14 +580,14 @@ var pcbLayoutProps = z22.object({
|
|
|
551
580
|
pcbOffsetX: distance8.optional(),
|
|
552
581
|
pcbOffsetY: distance8.optional(),
|
|
553
582
|
pcbRotation: rotation2.optional(),
|
|
554
|
-
pcbPositionAnchor:
|
|
555
|
-
pcbPositionMode:
|
|
583
|
+
pcbPositionAnchor: z23.string().optional(),
|
|
584
|
+
pcbPositionMode: z23.enum([
|
|
556
585
|
"relative_to_group_anchor",
|
|
557
586
|
"auto",
|
|
558
587
|
"relative_to_board_anchor",
|
|
559
588
|
"relative_to_component_anchor"
|
|
560
589
|
]).optional(),
|
|
561
|
-
shouldBeOnEdgeOfBoard:
|
|
590
|
+
shouldBeOnEdgeOfBoard: z23.boolean().optional(),
|
|
562
591
|
layer: layer_ref.optional(),
|
|
563
592
|
pcbMarginTop: distance8.optional(),
|
|
564
593
|
pcbMarginRight: distance8.optional(),
|
|
@@ -568,11 +597,11 @@ var pcbLayoutProps = z22.object({
|
|
|
568
597
|
pcbMarginY: distance8.optional(),
|
|
569
598
|
pcbStyle: pcbStyle.optional(),
|
|
570
599
|
pcbSx: pcbSx.optional(),
|
|
571
|
-
pcbRelative:
|
|
572
|
-
relative:
|
|
600
|
+
pcbRelative: z23.boolean().optional(),
|
|
601
|
+
relative: z23.boolean().optional()
|
|
573
602
|
});
|
|
574
603
|
expectTypesMatch(true);
|
|
575
|
-
var commonLayoutProps =
|
|
604
|
+
var commonLayoutProps = z23.object({
|
|
576
605
|
pcbX: pcbCoordinate.optional(),
|
|
577
606
|
pcbY: pcbCoordinate.optional(),
|
|
578
607
|
pcbLeftEdgeX: pcbCoordinate.optional(),
|
|
@@ -582,14 +611,14 @@ var commonLayoutProps = z22.object({
|
|
|
582
611
|
pcbOffsetX: distance8.optional(),
|
|
583
612
|
pcbOffsetY: distance8.optional(),
|
|
584
613
|
pcbRotation: rotation2.optional(),
|
|
585
|
-
pcbPositionAnchor:
|
|
586
|
-
pcbPositionMode:
|
|
614
|
+
pcbPositionAnchor: z23.string().optional(),
|
|
615
|
+
pcbPositionMode: z23.enum([
|
|
587
616
|
"relative_to_group_anchor",
|
|
588
617
|
"auto",
|
|
589
618
|
"relative_to_board_anchor",
|
|
590
619
|
"relative_to_component_anchor"
|
|
591
620
|
]).optional(),
|
|
592
|
-
shouldBeOnEdgeOfBoard:
|
|
621
|
+
shouldBeOnEdgeOfBoard: z23.boolean().optional(),
|
|
593
622
|
pcbMarginTop: distance8.optional(),
|
|
594
623
|
pcbMarginRight: distance8.optional(),
|
|
595
624
|
pcbMarginBottom: distance8.optional(),
|
|
@@ -611,44 +640,44 @@ var commonLayoutProps = z22.object({
|
|
|
611
640
|
footprint: footprintProp.optional(),
|
|
612
641
|
symbol: symbolProp.optional(),
|
|
613
642
|
schStyle: schStyle.optional(),
|
|
614
|
-
relative:
|
|
615
|
-
schRelative:
|
|
616
|
-
pcbRelative:
|
|
643
|
+
relative: z23.boolean().optional(),
|
|
644
|
+
schRelative: z23.boolean().optional(),
|
|
645
|
+
pcbRelative: z23.boolean().optional()
|
|
617
646
|
});
|
|
618
647
|
expectTypesMatch(true);
|
|
619
|
-
var supplierProps =
|
|
620
|
-
supplierPartNumbers:
|
|
648
|
+
var supplierProps = z23.object({
|
|
649
|
+
supplierPartNumbers: z23.record(supplier_name, z23.array(z23.string())).optional()
|
|
621
650
|
});
|
|
622
651
|
expectTypesMatch(true);
|
|
623
652
|
var commonComponentProps = commonLayoutProps.merge(supplierProps).extend({
|
|
624
|
-
key:
|
|
625
|
-
name:
|
|
626
|
-
displayName:
|
|
627
|
-
schSectionName:
|
|
653
|
+
key: z23.any().optional(),
|
|
654
|
+
name: z23.string(),
|
|
655
|
+
displayName: z23.string().optional(),
|
|
656
|
+
schSectionName: z23.string().optional().describe(
|
|
628
657
|
'This component will be drawn as part of this section e.g. "Power"'
|
|
629
658
|
),
|
|
630
|
-
schSheetName:
|
|
659
|
+
schSheetName: z23.string().optional().describe(
|
|
631
660
|
'This component will be drawn as part of this sheet e.g. "Main"'
|
|
632
661
|
),
|
|
633
662
|
datasheetUrl: url.optional(),
|
|
634
663
|
cadModel: cadModelProp.optional(),
|
|
635
664
|
kicadFootprintMetadata: kicadFootprintMetadata.optional(),
|
|
636
665
|
kicadSymbolMetadata: kicadSymbolMetadata.optional(),
|
|
637
|
-
children:
|
|
638
|
-
symbolName:
|
|
639
|
-
doNotPlace:
|
|
640
|
-
allowOffBoard:
|
|
666
|
+
children: z23.any().optional(),
|
|
667
|
+
symbolName: z23.string().optional(),
|
|
668
|
+
doNotPlace: z23.boolean().optional(),
|
|
669
|
+
allowOffBoard: z23.boolean().optional().describe(
|
|
641
670
|
"Allows the PCB component to hang off the board (e.g. for USB ports or displays)"
|
|
642
671
|
),
|
|
643
|
-
obstructsWithinBounds:
|
|
672
|
+
obstructsWithinBounds: z23.boolean().optional().describe(
|
|
644
673
|
"Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath"
|
|
645
674
|
),
|
|
646
|
-
showAsTranslucentModel:
|
|
675
|
+
showAsTranslucentModel: z23.boolean().optional().describe(
|
|
647
676
|
"Whether to show this component's CAD model as translucent in the 3D viewer."
|
|
648
677
|
),
|
|
649
|
-
pinAttributes:
|
|
650
|
-
mfn:
|
|
651
|
-
manufacturerPartNumber:
|
|
678
|
+
pinAttributes: z23.record(z23.string(), pinAttributeMap).optional(),
|
|
679
|
+
mfn: z23.string().describe("Manufacturer Part Number").optional(),
|
|
680
|
+
manufacturerPartNumber: z23.string().optional()
|
|
652
681
|
});
|
|
653
682
|
expectTypesMatch(true);
|
|
654
683
|
var componentProps = commonComponentProps;
|
|
@@ -663,13 +692,13 @@ var lrPolarPins = [
|
|
|
663
692
|
"cathode",
|
|
664
693
|
"neg"
|
|
665
694
|
];
|
|
666
|
-
var distanceOrMultiplier = distance8.or(
|
|
695
|
+
var distanceOrMultiplier = distance8.or(z23.enum(["2x", "3x", "4x"]));
|
|
667
696
|
|
|
668
697
|
// lib/common/pcbPath.ts
|
|
669
698
|
import { layer_ref as layer_ref2 } from "circuit-json";
|
|
670
|
-
import { z as
|
|
699
|
+
import { z as z24 } from "zod";
|
|
671
700
|
var basePcbPathPoint = point.extend({
|
|
672
|
-
via:
|
|
701
|
+
via: z24.boolean().optional(),
|
|
673
702
|
fromLayer: layer_ref2.optional(),
|
|
674
703
|
toLayer: layer_ref2.optional()
|
|
675
704
|
});
|
|
@@ -677,20 +706,20 @@ var pcbPathPoint = basePcbPathPoint.superRefine((value, ctx) => {
|
|
|
677
706
|
if (value.via) {
|
|
678
707
|
if (!value.toLayer) {
|
|
679
708
|
ctx.addIssue({
|
|
680
|
-
code:
|
|
709
|
+
code: z24.ZodIssueCode.custom,
|
|
681
710
|
message: "toLayer is required when via is true",
|
|
682
711
|
path: ["toLayer"]
|
|
683
712
|
});
|
|
684
713
|
}
|
|
685
714
|
} else if (value.fromLayer || value.toLayer) {
|
|
686
715
|
ctx.addIssue({
|
|
687
|
-
code:
|
|
716
|
+
code: z24.ZodIssueCode.custom,
|
|
688
717
|
message: "fromLayer/toLayer are only allowed when via is true",
|
|
689
718
|
path: ["via"]
|
|
690
719
|
});
|
|
691
720
|
}
|
|
692
721
|
});
|
|
693
|
-
var pcbPath =
|
|
722
|
+
var pcbPath = z24.array(z24.union([pcbPathPoint, z24.string()]));
|
|
694
723
|
expectTypesMatch(true);
|
|
695
724
|
expectTypesMatch(true);
|
|
696
725
|
|
|
@@ -16158,8 +16187,8 @@ var footprinterStringExamples = [
|
|
|
16158
16187
|
];
|
|
16159
16188
|
|
|
16160
16189
|
// lib/common/schematicOrientation.ts
|
|
16161
|
-
import { z as
|
|
16162
|
-
var schematicOrientation =
|
|
16190
|
+
import { z as z25 } from "zod";
|
|
16191
|
+
var schematicOrientation = z25.enum([
|
|
16163
16192
|
"vertical",
|
|
16164
16193
|
"horizontal",
|
|
16165
16194
|
"pos_top",
|
|
@@ -16178,32 +16207,32 @@ expectTypesMatch(
|
|
|
16178
16207
|
);
|
|
16179
16208
|
|
|
16180
16209
|
// lib/common/schematicPinDefinitions.ts
|
|
16181
|
-
import { z as
|
|
16182
|
-
var explicitPinSideDefinition =
|
|
16183
|
-
pins:
|
|
16184
|
-
direction:
|
|
16185
|
-
|
|
16186
|
-
|
|
16187
|
-
|
|
16188
|
-
|
|
16210
|
+
import { z as z26 } from "zod";
|
|
16211
|
+
var explicitPinSideDefinition = z26.object({
|
|
16212
|
+
pins: z26.array(z26.union([z26.number(), z26.string()])),
|
|
16213
|
+
direction: z26.union([
|
|
16214
|
+
z26.literal("top-to-bottom"),
|
|
16215
|
+
z26.literal("left-to-right"),
|
|
16216
|
+
z26.literal("bottom-to-top"),
|
|
16217
|
+
z26.literal("right-to-left")
|
|
16189
16218
|
])
|
|
16190
16219
|
});
|
|
16191
|
-
var pinSideDefinitionInput =
|
|
16192
|
-
var pinSideDefinitionWithDefaultDirection = (direction2) =>
|
|
16220
|
+
var pinSideDefinitionInput = z26.array(z26.union([z26.number(), z26.string()]));
|
|
16221
|
+
var pinSideDefinitionWithDefaultDirection = (direction2) => z26.union([explicitPinSideDefinition, pinSideDefinitionInput]).transform(
|
|
16193
16222
|
(value) => Array.isArray(value) ? {
|
|
16194
16223
|
pins: value,
|
|
16195
16224
|
direction: direction2
|
|
16196
16225
|
} : value
|
|
16197
16226
|
);
|
|
16198
|
-
var schematicPortArrangement =
|
|
16199
|
-
leftSize:
|
|
16200
|
-
topSize:
|
|
16201
|
-
rightSize:
|
|
16202
|
-
bottomSize:
|
|
16203
|
-
leftPinCount:
|
|
16204
|
-
rightPinCount:
|
|
16205
|
-
topPinCount:
|
|
16206
|
-
bottomPinCount:
|
|
16227
|
+
var schematicPortArrangement = z26.object({
|
|
16228
|
+
leftSize: z26.number().optional().describe("@deprecated, use leftPinCount"),
|
|
16229
|
+
topSize: z26.number().optional().describe("@deprecated, use topPinCount"),
|
|
16230
|
+
rightSize: z26.number().optional().describe("@deprecated, use rightPinCount"),
|
|
16231
|
+
bottomSize: z26.number().optional().describe("@deprecated, use bottomPinCount"),
|
|
16232
|
+
leftPinCount: z26.number().optional(),
|
|
16233
|
+
rightPinCount: z26.number().optional(),
|
|
16234
|
+
topPinCount: z26.number().optional(),
|
|
16235
|
+
bottomPinCount: z26.number().optional(),
|
|
16207
16236
|
leftSide: pinSideDefinitionWithDefaultDirection("top-to-bottom").optional(),
|
|
16208
16237
|
rightSide: pinSideDefinitionWithDefaultDirection("top-to-bottom").optional(),
|
|
16209
16238
|
topSide: pinSideDefinitionWithDefaultDirection("left-to-right").optional(),
|
|
@@ -16214,9 +16243,9 @@ expectTypesMatch(true);
|
|
|
16214
16243
|
|
|
16215
16244
|
// lib/common/schematicPinStyle.ts
|
|
16216
16245
|
import { distance as distance9 } from "circuit-json";
|
|
16217
|
-
import { z as
|
|
16218
|
-
var schematicPinStyle =
|
|
16219
|
-
|
|
16246
|
+
import { z as z27 } from "zod";
|
|
16247
|
+
var schematicPinStyle = z27.record(
|
|
16248
|
+
z27.object({
|
|
16220
16249
|
marginLeft: distance9.optional(),
|
|
16221
16250
|
marginRight: distance9.optional(),
|
|
16222
16251
|
marginTop: distance9.optional(),
|
|
@@ -16230,17 +16259,17 @@ var schematicPinStyle = z26.record(
|
|
|
16230
16259
|
expectTypesMatch(true);
|
|
16231
16260
|
|
|
16232
16261
|
// lib/common/schematicPinLabel.ts
|
|
16233
|
-
import { z as
|
|
16234
|
-
var schematicPinLabel =
|
|
16262
|
+
import { z as z28 } from "zod";
|
|
16263
|
+
var schematicPinLabel = z28.string().regex(/^[A-Za-z0-9_]+$/);
|
|
16235
16264
|
|
|
16236
16265
|
// lib/common/schematicSize.ts
|
|
16237
16266
|
import { distance as distance10 } from "circuit-json";
|
|
16238
|
-
import { z as
|
|
16239
|
-
var schematicSymbolSize =
|
|
16267
|
+
import { z as z29 } from "zod";
|
|
16268
|
+
var schematicSymbolSize = z29.enum(["xs", "sm", "default", "md"]).or(distance10.pipe(z29.number().finite())).describe("distance between pin1 and pin2 of the schematic symbol");
|
|
16240
16269
|
|
|
16241
16270
|
// lib/common/kicadPinMetadata.ts
|
|
16242
|
-
import { z as
|
|
16243
|
-
var kicadPinElectricalType =
|
|
16271
|
+
import { z as z30 } from "zod";
|
|
16272
|
+
var kicadPinElectricalType = z30.enum([
|
|
16244
16273
|
"input",
|
|
16245
16274
|
"output",
|
|
16246
16275
|
"bidirectional",
|
|
@@ -16254,7 +16283,7 @@ var kicadPinElectricalType = z29.enum([
|
|
|
16254
16283
|
"open_emitter",
|
|
16255
16284
|
"no_connect"
|
|
16256
16285
|
]);
|
|
16257
|
-
var kicadPinGraphicStyle =
|
|
16286
|
+
var kicadPinGraphicStyle = z30.enum([
|
|
16258
16287
|
"line",
|
|
16259
16288
|
"inverted",
|
|
16260
16289
|
"clock",
|
|
@@ -16265,7 +16294,7 @@ var kicadPinGraphicStyle = z29.enum([
|
|
|
16265
16294
|
"falling_edge_clock",
|
|
16266
16295
|
"nonlogic"
|
|
16267
16296
|
]);
|
|
16268
|
-
var kicadPinMetadata =
|
|
16297
|
+
var kicadPinMetadata = z30.object({
|
|
16269
16298
|
electricalType: kicadPinElectricalType.optional(),
|
|
16270
16299
|
graphicStyle: kicadPinGraphicStyle.optional(),
|
|
16271
16300
|
pinLength: distance.optional(),
|
|
@@ -16275,14 +16304,14 @@ var kicadPinMetadata = z29.object({
|
|
|
16275
16304
|
expectTypesMatch(true);
|
|
16276
16305
|
|
|
16277
16306
|
// lib/customDrc.ts
|
|
16278
|
-
import { z as
|
|
16279
|
-
var customDrcCheckFn =
|
|
16307
|
+
import { z as z31 } from "zod";
|
|
16308
|
+
var customDrcCheckFn = z31.custom(
|
|
16280
16309
|
(value) => typeof value === "function"
|
|
16281
16310
|
);
|
|
16282
16311
|
|
|
16283
16312
|
// lib/common/ninePointAnchor.ts
|
|
16284
|
-
import { z as
|
|
16285
|
-
var ninePointAnchor =
|
|
16313
|
+
import { z as z32 } from "zod";
|
|
16314
|
+
var ninePointAnchor = z32.enum([
|
|
16286
16315
|
"top_left",
|
|
16287
16316
|
"top_center",
|
|
16288
16317
|
"top_right",
|
|
@@ -16295,47 +16324,47 @@ var ninePointAnchor = z31.enum([
|
|
|
16295
16324
|
]);
|
|
16296
16325
|
|
|
16297
16326
|
// lib/components/board.ts
|
|
16298
|
-
import { z as
|
|
16327
|
+
import { z as z46 } from "zod";
|
|
16299
16328
|
|
|
16300
16329
|
// lib/components/group.ts
|
|
16301
16330
|
import {
|
|
16302
16331
|
length as length3,
|
|
16303
16332
|
distance as distance11
|
|
16304
16333
|
} from "circuit-json";
|
|
16305
|
-
import { z as
|
|
16334
|
+
import { z as z45 } from "zod";
|
|
16306
16335
|
|
|
16307
16336
|
// lib/manual-edits/manual-edit-events/base_manual_edit_event.ts
|
|
16308
|
-
import { z as
|
|
16309
|
-
var base_manual_edit_event =
|
|
16310
|
-
edit_event_id:
|
|
16311
|
-
in_progress:
|
|
16312
|
-
created_at:
|
|
16337
|
+
import { z as z33 } from "zod";
|
|
16338
|
+
var base_manual_edit_event = z33.object({
|
|
16339
|
+
edit_event_id: z33.string(),
|
|
16340
|
+
in_progress: z33.boolean().optional(),
|
|
16341
|
+
created_at: z33.number()
|
|
16313
16342
|
});
|
|
16314
16343
|
expectTypesMatch(
|
|
16315
16344
|
true
|
|
16316
16345
|
);
|
|
16317
16346
|
|
|
16318
16347
|
// lib/manual-edits/manual-edit-events/edit_pcb_component_location_event.ts
|
|
16319
|
-
import { z as
|
|
16348
|
+
import { z as z34 } from "zod";
|
|
16320
16349
|
var edit_pcb_component_location_event = base_manual_edit_event.extend({
|
|
16321
|
-
pcb_edit_event_type:
|
|
16322
|
-
edit_event_type:
|
|
16323
|
-
pcb_component_id:
|
|
16324
|
-
original_center:
|
|
16325
|
-
new_center:
|
|
16350
|
+
pcb_edit_event_type: z34.literal("edit_component_location").describe("deprecated"),
|
|
16351
|
+
edit_event_type: z34.literal("edit_pcb_component_location"),
|
|
16352
|
+
pcb_component_id: z34.string(),
|
|
16353
|
+
original_center: z34.object({ x: z34.number(), y: z34.number() }),
|
|
16354
|
+
new_center: z34.object({ x: z34.number(), y: z34.number() })
|
|
16326
16355
|
});
|
|
16327
16356
|
var edit_component_location_event = edit_pcb_component_location_event;
|
|
16328
16357
|
expectTypesMatch(true);
|
|
16329
16358
|
|
|
16330
16359
|
// lib/manual-edits/manual-edit-events/edit_trace_hint_event.ts
|
|
16331
|
-
import { z as
|
|
16360
|
+
import { z as z35 } from "zod";
|
|
16332
16361
|
var edit_trace_hint_event = base_manual_edit_event.extend({
|
|
16333
|
-
pcb_edit_event_type:
|
|
16334
|
-
edit_event_type:
|
|
16335
|
-
pcb_port_id:
|
|
16336
|
-
pcb_trace_hint_id:
|
|
16337
|
-
route:
|
|
16338
|
-
|
|
16362
|
+
pcb_edit_event_type: z35.literal("edit_trace_hint").describe("deprecated"),
|
|
16363
|
+
edit_event_type: z35.literal("edit_pcb_trace_hint").optional(),
|
|
16364
|
+
pcb_port_id: z35.string(),
|
|
16365
|
+
pcb_trace_hint_id: z35.string().optional(),
|
|
16366
|
+
route: z35.array(
|
|
16367
|
+
z35.object({ x: z35.number(), y: z35.number(), via: z35.boolean().optional() })
|
|
16339
16368
|
)
|
|
16340
16369
|
});
|
|
16341
16370
|
expectTypesMatch(
|
|
@@ -16343,38 +16372,38 @@ expectTypesMatch(
|
|
|
16343
16372
|
);
|
|
16344
16373
|
|
|
16345
16374
|
// lib/manual-edits/manual-edit-events/edit_schematic_component_location_event.ts
|
|
16346
|
-
import { z as
|
|
16375
|
+
import { z as z36 } from "zod";
|
|
16347
16376
|
var edit_schematic_component_location_event = base_manual_edit_event.extend({
|
|
16348
|
-
edit_event_type:
|
|
16349
|
-
schematic_component_id:
|
|
16350
|
-
original_center:
|
|
16351
|
-
new_center:
|
|
16377
|
+
edit_event_type: z36.literal("edit_schematic_component_location"),
|
|
16378
|
+
schematic_component_id: z36.string(),
|
|
16379
|
+
original_center: z36.object({ x: z36.number(), y: z36.number() }),
|
|
16380
|
+
new_center: z36.object({ x: z36.number(), y: z36.number() })
|
|
16352
16381
|
});
|
|
16353
16382
|
expectTypesMatch(true);
|
|
16354
16383
|
|
|
16355
16384
|
// lib/manual-edits/manual-edit-events/edit_pcb_group_location_event.ts
|
|
16356
|
-
import { z as
|
|
16385
|
+
import { z as z37 } from "zod";
|
|
16357
16386
|
var edit_pcb_group_location_event = base_manual_edit_event.extend({
|
|
16358
|
-
edit_event_type:
|
|
16359
|
-
pcb_group_id:
|
|
16360
|
-
original_center:
|
|
16361
|
-
new_center:
|
|
16387
|
+
edit_event_type: z37.literal("edit_pcb_group_location"),
|
|
16388
|
+
pcb_group_id: z37.string(),
|
|
16389
|
+
original_center: z37.object({ x: z37.number(), y: z37.number() }),
|
|
16390
|
+
new_center: z37.object({ x: z37.number(), y: z37.number() })
|
|
16362
16391
|
});
|
|
16363
16392
|
expectTypesMatch(true);
|
|
16364
16393
|
|
|
16365
16394
|
// lib/manual-edits/manual-edit-events/edit_schematic_group_location_event.ts
|
|
16366
|
-
import { z as
|
|
16395
|
+
import { z as z38 } from "zod";
|
|
16367
16396
|
var edit_schematic_group_location_event = base_manual_edit_event.extend({
|
|
16368
|
-
edit_event_type:
|
|
16369
|
-
schematic_group_id:
|
|
16370
|
-
original_center:
|
|
16371
|
-
new_center:
|
|
16397
|
+
edit_event_type: z38.literal("edit_schematic_group_location"),
|
|
16398
|
+
schematic_group_id: z38.string(),
|
|
16399
|
+
original_center: z38.object({ x: z38.number(), y: z38.number() }),
|
|
16400
|
+
new_center: z38.object({ x: z38.number(), y: z38.number() })
|
|
16372
16401
|
});
|
|
16373
16402
|
expectTypesMatch(true);
|
|
16374
16403
|
|
|
16375
16404
|
// lib/manual-edits/manual_edit_event.ts
|
|
16376
|
-
import { z as
|
|
16377
|
-
var manual_edit_event =
|
|
16405
|
+
import { z as z39 } from "zod";
|
|
16406
|
+
var manual_edit_event = z39.union([
|
|
16378
16407
|
edit_pcb_component_location_event,
|
|
16379
16408
|
edit_trace_hint_event,
|
|
16380
16409
|
edit_schematic_component_location_event
|
|
@@ -16382,33 +16411,33 @@ var manual_edit_event = z38.union([
|
|
|
16382
16411
|
expectTypesMatch(true);
|
|
16383
16412
|
|
|
16384
16413
|
// lib/manual-edits/manual_edits_file.ts
|
|
16385
|
-
import { z as
|
|
16414
|
+
import { z as z43 } from "zod";
|
|
16386
16415
|
|
|
16387
16416
|
// lib/manual-edits/manual_pcb_placement.ts
|
|
16388
|
-
import { z as
|
|
16417
|
+
import { z as z40 } from "zod";
|
|
16389
16418
|
import { point as point2 } from "circuit-json";
|
|
16390
|
-
var manual_pcb_placement =
|
|
16391
|
-
selector:
|
|
16392
|
-
relative_to:
|
|
16419
|
+
var manual_pcb_placement = z40.object({
|
|
16420
|
+
selector: z40.string(),
|
|
16421
|
+
relative_to: z40.string().optional().default("group_center").describe("Can be a selector or 'group_center'"),
|
|
16393
16422
|
center: point2
|
|
16394
16423
|
});
|
|
16395
16424
|
expectTypesMatch(true);
|
|
16396
16425
|
|
|
16397
16426
|
// lib/manual-edits/manual_trace_hint.ts
|
|
16398
|
-
import { z as
|
|
16427
|
+
import { z as z41 } from "zod";
|
|
16399
16428
|
import { route_hint_point } from "circuit-json";
|
|
16400
|
-
var manual_trace_hint =
|
|
16401
|
-
pcb_port_selector:
|
|
16402
|
-
offsets:
|
|
16429
|
+
var manual_trace_hint = z41.object({
|
|
16430
|
+
pcb_port_selector: z41.string(),
|
|
16431
|
+
offsets: z41.array(route_hint_point)
|
|
16403
16432
|
});
|
|
16404
16433
|
expectTypesMatch(true);
|
|
16405
16434
|
|
|
16406
16435
|
// lib/manual-edits/manual_schematic_placement.ts
|
|
16407
|
-
import { z as
|
|
16436
|
+
import { z as z42 } from "zod";
|
|
16408
16437
|
import { point as point4 } from "circuit-json";
|
|
16409
|
-
var manual_schematic_placement =
|
|
16410
|
-
selector:
|
|
16411
|
-
relative_to:
|
|
16438
|
+
var manual_schematic_placement = z42.object({
|
|
16439
|
+
selector: z42.string(),
|
|
16440
|
+
relative_to: z42.string().optional().default("group_center").describe("Can be a selector or 'group_center'"),
|
|
16412
16441
|
center: point4
|
|
16413
16442
|
});
|
|
16414
16443
|
expectTypesMatch(
|
|
@@ -16416,37 +16445,37 @@ expectTypesMatch(
|
|
|
16416
16445
|
);
|
|
16417
16446
|
|
|
16418
16447
|
// lib/manual-edits/manual_edits_file.ts
|
|
16419
|
-
var manual_edits_file =
|
|
16420
|
-
pcb_placements:
|
|
16421
|
-
manual_trace_hints:
|
|
16422
|
-
schematic_placements:
|
|
16448
|
+
var manual_edits_file = z43.object({
|
|
16449
|
+
pcb_placements: z43.array(manual_pcb_placement).optional(),
|
|
16450
|
+
manual_trace_hints: z43.array(manual_trace_hint).optional(),
|
|
16451
|
+
schematic_placements: z43.array(manual_schematic_placement).optional()
|
|
16423
16452
|
});
|
|
16424
16453
|
expectTypesMatch(true);
|
|
16425
16454
|
|
|
16426
16455
|
// lib/common/connectionsProp.ts
|
|
16427
|
-
import { z as
|
|
16428
|
-
var connectionTarget =
|
|
16456
|
+
import { z as z44 } from "zod";
|
|
16457
|
+
var connectionTarget = z44.string().or(z44.array(z44.string()).readonly()).or(z44.array(z44.string()));
|
|
16429
16458
|
var createConnectionsProp = (labels) => {
|
|
16430
|
-
return
|
|
16459
|
+
return z44.record(z44.enum(labels), connectionTarget);
|
|
16431
16460
|
};
|
|
16432
16461
|
|
|
16433
16462
|
// lib/components/group.ts
|
|
16434
|
-
var layoutConfig =
|
|
16435
|
-
layoutMode:
|
|
16436
|
-
position:
|
|
16437
|
-
grid:
|
|
16438
|
-
gridCols:
|
|
16439
|
-
gridRows:
|
|
16440
|
-
gridTemplateRows:
|
|
16441
|
-
gridTemplateColumns:
|
|
16442
|
-
gridTemplate:
|
|
16443
|
-
gridGap:
|
|
16444
|
-
gridRowGap:
|
|
16445
|
-
gridColumnGap:
|
|
16446
|
-
flex:
|
|
16447
|
-
flexDirection:
|
|
16448
|
-
alignItems:
|
|
16449
|
-
justifyContent:
|
|
16463
|
+
var layoutConfig = z45.object({
|
|
16464
|
+
layoutMode: z45.enum(["grid", "flex", "match-adapt", "relative", "none"]).optional(),
|
|
16465
|
+
position: z45.enum(["absolute", "relative"]).optional(),
|
|
16466
|
+
grid: z45.boolean().optional(),
|
|
16467
|
+
gridCols: z45.number().or(z45.string()).optional(),
|
|
16468
|
+
gridRows: z45.number().or(z45.string()).optional(),
|
|
16469
|
+
gridTemplateRows: z45.string().optional(),
|
|
16470
|
+
gridTemplateColumns: z45.string().optional(),
|
|
16471
|
+
gridTemplate: z45.string().optional(),
|
|
16472
|
+
gridGap: z45.number().or(z45.string()).optional(),
|
|
16473
|
+
gridRowGap: z45.number().or(z45.string()).optional(),
|
|
16474
|
+
gridColumnGap: z45.number().or(z45.string()).optional(),
|
|
16475
|
+
flex: z45.boolean().or(z45.string()).optional(),
|
|
16476
|
+
flexDirection: z45.enum(["row", "column"]).optional(),
|
|
16477
|
+
alignItems: z45.enum(["start", "center", "end", "stretch"]).optional(),
|
|
16478
|
+
justifyContent: z45.enum([
|
|
16450
16479
|
"start",
|
|
16451
16480
|
"center",
|
|
16452
16481
|
"end",
|
|
@@ -16455,16 +16484,16 @@ var layoutConfig = z44.object({
|
|
|
16455
16484
|
"space-around",
|
|
16456
16485
|
"space-evenly"
|
|
16457
16486
|
]).optional(),
|
|
16458
|
-
flexRow:
|
|
16459
|
-
flexColumn:
|
|
16460
|
-
gap:
|
|
16461
|
-
pack:
|
|
16462
|
-
packOrderStrategy:
|
|
16487
|
+
flexRow: z45.boolean().optional(),
|
|
16488
|
+
flexColumn: z45.boolean().optional(),
|
|
16489
|
+
gap: z45.number().or(z45.string()).optional(),
|
|
16490
|
+
pack: z45.boolean().optional().describe("Pack the contents of this group using a packing strategy"),
|
|
16491
|
+
packOrderStrategy: z45.enum([
|
|
16463
16492
|
"largest_to_smallest",
|
|
16464
16493
|
"first_to_last",
|
|
16465
16494
|
"highest_to_lowest_pin_count"
|
|
16466
16495
|
]).optional(),
|
|
16467
|
-
packPlacementStrategy:
|
|
16496
|
+
packPlacementStrategy: z45.enum(["shortest_connection_along_outline"]).optional(),
|
|
16468
16497
|
padding: length3.optional(),
|
|
16469
16498
|
paddingLeft: length3.optional(),
|
|
16470
16499
|
paddingRight: length3.optional(),
|
|
@@ -16474,17 +16503,17 @@ var layoutConfig = z44.object({
|
|
|
16474
16503
|
paddingY: length3.optional(),
|
|
16475
16504
|
width: length3.optional(),
|
|
16476
16505
|
height: length3.optional(),
|
|
16477
|
-
matchAdapt:
|
|
16478
|
-
matchAdaptTemplate:
|
|
16506
|
+
matchAdapt: z45.boolean().optional(),
|
|
16507
|
+
matchAdaptTemplate: z45.any().optional()
|
|
16479
16508
|
});
|
|
16480
16509
|
expectTypesMatch(true);
|
|
16481
|
-
var border =
|
|
16510
|
+
var border = z45.object({
|
|
16482
16511
|
strokeWidth: length3.optional(),
|
|
16483
|
-
dashed:
|
|
16484
|
-
solid:
|
|
16512
|
+
dashed: z45.boolean().optional(),
|
|
16513
|
+
solid: z45.boolean().optional()
|
|
16485
16514
|
});
|
|
16486
|
-
var pcbAnchorAlignmentAutocomplete =
|
|
16487
|
-
var routingTolerances =
|
|
16515
|
+
var pcbAnchorAlignmentAutocomplete = z45.custom((value) => typeof value === "string");
|
|
16516
|
+
var routingTolerances = z45.object({
|
|
16488
16517
|
minTraceWidth: length3.optional(),
|
|
16489
16518
|
minViaHoleEdgeToViaHoleEdgeClearance: length3.optional(),
|
|
16490
16519
|
minViaEdgeToPadEdgeClearance: length3.optional(),
|
|
@@ -16498,25 +16527,25 @@ var routingTolerances = z44.object({
|
|
|
16498
16527
|
minViaHoleDiameter: length3.optional(),
|
|
16499
16528
|
minViaPadDiameter: length3.optional()
|
|
16500
16529
|
});
|
|
16501
|
-
var autorouterConfig =
|
|
16530
|
+
var autorouterConfig = z45.object({
|
|
16502
16531
|
serverUrl: url.optional(),
|
|
16503
|
-
inputFormat:
|
|
16504
|
-
serverMode:
|
|
16505
|
-
serverCacheEnabled:
|
|
16506
|
-
cache:
|
|
16532
|
+
inputFormat: z45.enum(["simplified", "circuit-json"]).optional(),
|
|
16533
|
+
serverMode: z45.enum(["job", "solve-endpoint"]).optional(),
|
|
16534
|
+
serverCacheEnabled: z45.boolean().optional(),
|
|
16535
|
+
cache: z45.custom((v) => true).optional(),
|
|
16507
16536
|
traceClearance: length3.optional(),
|
|
16508
|
-
availableJumperTypes:
|
|
16509
|
-
allowViaInPad:
|
|
16537
|
+
availableJumperTypes: z45.array(z45.enum(["1206x4", "0603"])).optional(),
|
|
16538
|
+
allowViaInPad: z45.boolean().optional().describe(
|
|
16510
16539
|
"Allows the autorouter to place vias inside connected pads. Omitted or false keeps via-in-pad routing disabled."
|
|
16511
16540
|
),
|
|
16512
|
-
groupMode:
|
|
16513
|
-
algorithmFn:
|
|
16541
|
+
groupMode: z45.enum(["sequential_trace", "subcircuit", "sequential-trace"]).optional(),
|
|
16542
|
+
algorithmFn: z45.custom(
|
|
16514
16543
|
(v) => typeof v === "function" || v === void 0
|
|
16515
16544
|
).optional(),
|
|
16516
|
-
implicitBreakoutPointSolverFn:
|
|
16545
|
+
implicitBreakoutPointSolverFn: z45.custom(
|
|
16517
16546
|
(value) => typeof value === "function" || value === void 0
|
|
16518
16547
|
).optional(),
|
|
16519
|
-
preset:
|
|
16548
|
+
preset: z45.enum([
|
|
16520
16549
|
"sequential_trace",
|
|
16521
16550
|
"subcircuit",
|
|
16522
16551
|
"default",
|
|
@@ -16541,39 +16570,39 @@ var autorouterConfig = z44.object({
|
|
|
16541
16570
|
]).transform(
|
|
16542
16571
|
(preset) => preset === "single_layer_routing" ? "bus_lanes" : preset
|
|
16543
16572
|
).optional(),
|
|
16544
|
-
local:
|
|
16573
|
+
local: z45.boolean().optional()
|
|
16545
16574
|
});
|
|
16546
|
-
var autorouterPreset =
|
|
16547
|
-
|
|
16548
|
-
|
|
16549
|
-
|
|
16550
|
-
|
|
16551
|
-
|
|
16552
|
-
|
|
16553
|
-
|
|
16554
|
-
|
|
16555
|
-
|
|
16556
|
-
|
|
16557
|
-
|
|
16558
|
-
|
|
16575
|
+
var autorouterPreset = z45.union([
|
|
16576
|
+
z45.literal("sequential_trace"),
|
|
16577
|
+
z45.literal("subcircuit"),
|
|
16578
|
+
z45.literal("default"),
|
|
16579
|
+
z45.literal("auto"),
|
|
16580
|
+
z45.literal("auto_local"),
|
|
16581
|
+
z45.literal("auto_cloud"),
|
|
16582
|
+
z45.literal("auto_jumper"),
|
|
16583
|
+
z45.literal("tscircuit_beta"),
|
|
16584
|
+
z45.literal("krt"),
|
|
16585
|
+
z45.literal("freerouting"),
|
|
16586
|
+
z45.literal("simplify"),
|
|
16587
|
+
z45.literal("laser_prefab"),
|
|
16559
16588
|
// Prefabricated PCB with laser copper ablation
|
|
16560
|
-
|
|
16561
|
-
|
|
16562
|
-
|
|
16563
|
-
|
|
16564
|
-
|
|
16565
|
-
|
|
16566
|
-
|
|
16567
|
-
|
|
16568
|
-
|
|
16589
|
+
z45.literal("single_layer_fanout"),
|
|
16590
|
+
z45.literal("fanout"),
|
|
16591
|
+
z45.literal("dogbone"),
|
|
16592
|
+
z45.literal("bus_lanes"),
|
|
16593
|
+
z45.literal("single_layer_routing").transform(() => "bus_lanes"),
|
|
16594
|
+
z45.literal("auto-jumper"),
|
|
16595
|
+
z45.literal("sequential-trace"),
|
|
16596
|
+
z45.literal("auto-local"),
|
|
16597
|
+
z45.literal("auto-cloud")
|
|
16569
16598
|
]);
|
|
16570
|
-
var autorouterString =
|
|
16571
|
-
var autorouterProp =
|
|
16599
|
+
var autorouterString = z45.string();
|
|
16600
|
+
var autorouterProp = z45.union([
|
|
16572
16601
|
autorouterConfig,
|
|
16573
16602
|
autorouterPreset,
|
|
16574
16603
|
autorouterString
|
|
16575
16604
|
]);
|
|
16576
|
-
var autorouterEffortLevel =
|
|
16605
|
+
var autorouterEffortLevel = z45.enum([
|
|
16577
16606
|
"1x",
|
|
16578
16607
|
"1.5x",
|
|
16579
16608
|
"2x",
|
|
@@ -16581,12 +16610,12 @@ var autorouterEffortLevel = z44.enum([
|
|
|
16581
16610
|
"10x",
|
|
16582
16611
|
"100x"
|
|
16583
16612
|
]);
|
|
16584
|
-
var preflightRoutingCheckPolicy =
|
|
16613
|
+
var preflightRoutingCheckPolicy = z45.enum([
|
|
16585
16614
|
"none",
|
|
16586
16615
|
"basic",
|
|
16587
16616
|
"conservative"
|
|
16588
16617
|
]);
|
|
16589
|
-
var knownAutorouterVersion =
|
|
16618
|
+
var knownAutorouterVersion = z45.enum([
|
|
16590
16619
|
"beta_pipeline1",
|
|
16591
16620
|
"beta_pipeline3",
|
|
16592
16621
|
"beta_pipeline4",
|
|
@@ -16595,7 +16624,7 @@ var knownAutorouterVersion = z44.enum([
|
|
|
16595
16624
|
"beta_pipeline9",
|
|
16596
16625
|
"latest"
|
|
16597
16626
|
]);
|
|
16598
|
-
var autorouterVersion =
|
|
16627
|
+
var autorouterVersion = z45.custom(
|
|
16599
16628
|
(value) => typeof value === "string"
|
|
16600
16629
|
).transform((value) => {
|
|
16601
16630
|
const parsedAutorouterVersion = knownAutorouterVersion.safeParse(value);
|
|
@@ -16606,33 +16635,33 @@ var autorouterVersion = z44.custom(
|
|
|
16606
16635
|
return "latest";
|
|
16607
16636
|
});
|
|
16608
16637
|
var baseGroupProps = commonLayoutProps.extend({
|
|
16609
|
-
name:
|
|
16610
|
-
children:
|
|
16611
|
-
schTitle:
|
|
16612
|
-
schSheetName:
|
|
16613
|
-
key:
|
|
16614
|
-
showAsSchematicBox:
|
|
16615
|
-
connections:
|
|
16638
|
+
name: z45.string().optional(),
|
|
16639
|
+
children: z45.any().optional(),
|
|
16640
|
+
schTitle: z45.string().optional(),
|
|
16641
|
+
schSheetName: z45.string().optional().describe('This group will be drawn as part of this sheet e.g. "Main"'),
|
|
16642
|
+
key: z45.any().optional(),
|
|
16643
|
+
showAsSchematicBox: z45.boolean().optional(),
|
|
16644
|
+
connections: z45.record(z45.string(), connectionTarget.optional()).optional(),
|
|
16616
16645
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
16617
16646
|
schPinSpacing: length3.optional(),
|
|
16618
16647
|
schPinStyle: schematicPinStyle.optional(),
|
|
16619
16648
|
...layoutConfig.shape,
|
|
16620
16649
|
grid: layoutConfig.shape.grid.describe("@deprecated use pcbGrid"),
|
|
16621
16650
|
flex: layoutConfig.shape.flex.describe("@deprecated use pcbFlex"),
|
|
16622
|
-
pcbGrid:
|
|
16623
|
-
pcbGridCols:
|
|
16624
|
-
pcbGridRows:
|
|
16625
|
-
pcbGridTemplateRows:
|
|
16626
|
-
pcbGridTemplateColumns:
|
|
16627
|
-
pcbGridTemplate:
|
|
16628
|
-
pcbGridGap:
|
|
16629
|
-
pcbGridRowGap:
|
|
16630
|
-
pcbGridColumnGap:
|
|
16631
|
-
pcbFlex:
|
|
16632
|
-
pcbFlexGap:
|
|
16633
|
-
pcbFlexDirection:
|
|
16634
|
-
pcbAlignItems:
|
|
16635
|
-
pcbJustifyContent:
|
|
16651
|
+
pcbGrid: z45.boolean().optional(),
|
|
16652
|
+
pcbGridCols: z45.number().or(z45.string()).optional(),
|
|
16653
|
+
pcbGridRows: z45.number().or(z45.string()).optional(),
|
|
16654
|
+
pcbGridTemplateRows: z45.string().optional(),
|
|
16655
|
+
pcbGridTemplateColumns: z45.string().optional(),
|
|
16656
|
+
pcbGridTemplate: z45.string().optional(),
|
|
16657
|
+
pcbGridGap: z45.number().or(z45.string()).optional(),
|
|
16658
|
+
pcbGridRowGap: z45.number().or(z45.string()).optional(),
|
|
16659
|
+
pcbGridColumnGap: z45.number().or(z45.string()).optional(),
|
|
16660
|
+
pcbFlex: z45.boolean().or(z45.string()).optional(),
|
|
16661
|
+
pcbFlexGap: z45.number().or(z45.string()).optional(),
|
|
16662
|
+
pcbFlexDirection: z45.enum(["row", "column"]).optional(),
|
|
16663
|
+
pcbAlignItems: z45.enum(["start", "center", "end", "stretch"]).optional(),
|
|
16664
|
+
pcbJustifyContent: z45.enum([
|
|
16636
16665
|
"start",
|
|
16637
16666
|
"center",
|
|
16638
16667
|
"end",
|
|
@@ -16641,25 +16670,25 @@ var baseGroupProps = commonLayoutProps.extend({
|
|
|
16641
16670
|
"space-around",
|
|
16642
16671
|
"space-evenly"
|
|
16643
16672
|
]).optional(),
|
|
16644
|
-
pcbFlexRow:
|
|
16645
|
-
pcbFlexColumn:
|
|
16646
|
-
pcbGap:
|
|
16647
|
-
pcbPack:
|
|
16648
|
-
pcbPackGap:
|
|
16649
|
-
schGrid:
|
|
16650
|
-
schGridCols:
|
|
16651
|
-
schGridRows:
|
|
16652
|
-
schGridTemplateRows:
|
|
16653
|
-
schGridTemplateColumns:
|
|
16654
|
-
schGridTemplate:
|
|
16655
|
-
schGridGap:
|
|
16656
|
-
schGridRowGap:
|
|
16657
|
-
schGridColumnGap:
|
|
16658
|
-
schFlex:
|
|
16659
|
-
schFlexGap:
|
|
16660
|
-
schFlexDirection:
|
|
16661
|
-
schAlignItems:
|
|
16662
|
-
schJustifyContent:
|
|
16673
|
+
pcbFlexRow: z45.boolean().optional(),
|
|
16674
|
+
pcbFlexColumn: z45.boolean().optional(),
|
|
16675
|
+
pcbGap: z45.number().or(z45.string()).optional(),
|
|
16676
|
+
pcbPack: z45.boolean().optional(),
|
|
16677
|
+
pcbPackGap: z45.number().or(z45.string()).optional(),
|
|
16678
|
+
schGrid: z45.boolean().optional(),
|
|
16679
|
+
schGridCols: z45.number().or(z45.string()).optional(),
|
|
16680
|
+
schGridRows: z45.number().or(z45.string()).optional(),
|
|
16681
|
+
schGridTemplateRows: z45.string().optional(),
|
|
16682
|
+
schGridTemplateColumns: z45.string().optional(),
|
|
16683
|
+
schGridTemplate: z45.string().optional(),
|
|
16684
|
+
schGridGap: z45.number().or(z45.string()).optional(),
|
|
16685
|
+
schGridRowGap: z45.number().or(z45.string()).optional(),
|
|
16686
|
+
schGridColumnGap: z45.number().or(z45.string()).optional(),
|
|
16687
|
+
schFlex: z45.boolean().or(z45.string()).optional(),
|
|
16688
|
+
schFlexGap: z45.number().or(z45.string()).optional(),
|
|
16689
|
+
schFlexDirection: z45.enum(["row", "column"]).optional(),
|
|
16690
|
+
schAlignItems: z45.enum(["start", "center", "end", "stretch"]).optional(),
|
|
16691
|
+
schJustifyContent: z45.enum([
|
|
16663
16692
|
"start",
|
|
16664
16693
|
"center",
|
|
16665
16694
|
"end",
|
|
@@ -16668,11 +16697,11 @@ var baseGroupProps = commonLayoutProps.extend({
|
|
|
16668
16697
|
"space-around",
|
|
16669
16698
|
"space-evenly"
|
|
16670
16699
|
]).optional(),
|
|
16671
|
-
schFlexRow:
|
|
16672
|
-
schFlexColumn:
|
|
16673
|
-
schGap:
|
|
16674
|
-
schPack:
|
|
16675
|
-
schMatchAdapt:
|
|
16700
|
+
schFlexRow: z45.boolean().optional(),
|
|
16701
|
+
schFlexColumn: z45.boolean().optional(),
|
|
16702
|
+
schGap: z45.number().or(z45.string()).optional(),
|
|
16703
|
+
schPack: z45.boolean().optional(),
|
|
16704
|
+
schMatchAdapt: z45.boolean().optional(),
|
|
16676
16705
|
pcbWidth: length3.optional(),
|
|
16677
16706
|
pcbHeight: length3.optional(),
|
|
16678
16707
|
minTraceWidth: length3.optional(),
|
|
@@ -16695,42 +16724,42 @@ var baseGroupProps = commonLayoutProps.extend({
|
|
|
16695
16724
|
pcbPaddingBottom: length3.optional(),
|
|
16696
16725
|
pcbAnchorAlignment: pcbAnchorAlignmentAutocomplete.optional()
|
|
16697
16726
|
});
|
|
16698
|
-
var partsEngine =
|
|
16727
|
+
var partsEngine = z45.custom((v) => "findPart" in v);
|
|
16699
16728
|
var subcircuitGroupProps = baseGroupProps.extend({
|
|
16700
16729
|
manualEdits: manual_edits_file.optional(),
|
|
16701
|
-
schAutoLayoutEnabled:
|
|
16702
|
-
schTraceAutoLabelEnabled:
|
|
16730
|
+
schAutoLayoutEnabled: z45.boolean().optional(),
|
|
16731
|
+
schTraceAutoLabelEnabled: z45.boolean().optional(),
|
|
16703
16732
|
schMaxTraceDistance: distance11.optional(),
|
|
16704
|
-
routingDisabled:
|
|
16705
|
-
placementDrcChecksDisabled:
|
|
16706
|
-
bomDisabled:
|
|
16733
|
+
routingDisabled: z45.boolean().optional(),
|
|
16734
|
+
placementDrcChecksDisabled: z45.boolean().optional(),
|
|
16735
|
+
bomDisabled: z45.boolean().optional(),
|
|
16707
16736
|
defaultTraceWidth: length3.optional(),
|
|
16708
16737
|
...routingTolerances.shape,
|
|
16709
16738
|
nominalTraceWidth: length3.optional(),
|
|
16710
16739
|
partsEngine: partsEngine.optional(),
|
|
16711
|
-
_subcircuitCachingEnabled:
|
|
16712
|
-
pcbRouteCache:
|
|
16740
|
+
_subcircuitCachingEnabled: z45.boolean().optional(),
|
|
16741
|
+
pcbRouteCache: z45.custom((v) => true).optional(),
|
|
16713
16742
|
autorouter: autorouterProp.optional(),
|
|
16714
16743
|
preflightRoutingCheckPolicy: preflightRoutingCheckPolicy.optional(),
|
|
16715
16744
|
autorouterEffortLevel: autorouterEffortLevel.optional(),
|
|
16716
16745
|
autorouterVersion: autorouterVersion.optional(),
|
|
16717
|
-
square:
|
|
16718
|
-
emptyArea:
|
|
16719
|
-
filledArea:
|
|
16746
|
+
square: z45.boolean().optional(),
|
|
16747
|
+
emptyArea: z45.string().optional(),
|
|
16748
|
+
filledArea: z45.string().optional(),
|
|
16720
16749
|
width: distance11.optional(),
|
|
16721
16750
|
height: distance11.optional(),
|
|
16722
|
-
outline:
|
|
16751
|
+
outline: z45.array(point).optional(),
|
|
16723
16752
|
outlineOffsetX: distance11.optional(),
|
|
16724
16753
|
outlineOffsetY: distance11.optional(),
|
|
16725
|
-
circuitJson:
|
|
16726
|
-
exposedNets:
|
|
16727
|
-
exposeNets:
|
|
16754
|
+
circuitJson: z45.array(z45.any()).optional(),
|
|
16755
|
+
exposedNets: z45.array(z45.string()).optional(),
|
|
16756
|
+
exposeNets: z45.boolean().optional()
|
|
16728
16757
|
});
|
|
16729
16758
|
var subcircuitGroupPropsWithBool = subcircuitGroupProps.extend({
|
|
16730
|
-
subcircuit:
|
|
16759
|
+
subcircuit: z45.literal(true)
|
|
16731
16760
|
});
|
|
16732
|
-
var groupProps =
|
|
16733
|
-
baseGroupProps.extend({ subcircuit:
|
|
16761
|
+
var groupProps = z45.discriminatedUnion("subcircuit", [
|
|
16762
|
+
baseGroupProps.extend({ subcircuit: z45.literal(false).optional() }),
|
|
16734
16763
|
subcircuitGroupPropsWithBool
|
|
16735
16764
|
]);
|
|
16736
16765
|
expectTypesMatch(true);
|
|
@@ -16740,25 +16769,25 @@ expectTypesMatch(true);
|
|
|
16740
16769
|
expectTypesMatch(true);
|
|
16741
16770
|
|
|
16742
16771
|
// lib/components/board.ts
|
|
16743
|
-
var boardColor =
|
|
16744
|
-
var boardOutlinePoint =
|
|
16772
|
+
var boardColor = z46.custom((value) => typeof value === "string");
|
|
16773
|
+
var boardOutlinePoint = z46.object({
|
|
16745
16774
|
...point.shape,
|
|
16746
|
-
isCastellatedHole:
|
|
16775
|
+
isCastellatedHole: z46.boolean().optional(),
|
|
16747
16776
|
holeDiameter: distance.optional(),
|
|
16748
16777
|
padDiameter: distance.optional(),
|
|
16749
|
-
connectsTo:
|
|
16778
|
+
connectsTo: z46.string().or(z46.array(z46.string())).optional()
|
|
16750
16779
|
}).superRefine((outlinePoint, ctx) => {
|
|
16751
16780
|
if (outlinePoint.isCastellatedHole) {
|
|
16752
16781
|
if (outlinePoint.holeDiameter === void 0) {
|
|
16753
16782
|
ctx.addIssue({
|
|
16754
|
-
code:
|
|
16783
|
+
code: z46.ZodIssueCode.custom,
|
|
16755
16784
|
path: ["holeDiameter"],
|
|
16756
16785
|
message: "holeDiameter is required for a castellated hole"
|
|
16757
16786
|
});
|
|
16758
16787
|
}
|
|
16759
16788
|
if (outlinePoint.padDiameter === void 0) {
|
|
16760
16789
|
ctx.addIssue({
|
|
16761
|
-
code:
|
|
16790
|
+
code: z46.ZodIssueCode.custom,
|
|
16762
16791
|
path: ["padDiameter"],
|
|
16763
16792
|
message: "padDiameter is required for a castellated hole"
|
|
16764
16793
|
});
|
|
@@ -16767,14 +16796,20 @@ var boardOutlinePoint = z45.object({
|
|
|
16767
16796
|
}
|
|
16768
16797
|
if (outlinePoint.holeDiameter !== void 0 || outlinePoint.padDiameter !== void 0 || outlinePoint.connectsTo !== void 0) {
|
|
16769
16798
|
ctx.addIssue({
|
|
16770
|
-
code:
|
|
16799
|
+
code: z46.ZodIssueCode.custom,
|
|
16771
16800
|
path: ["isCastellatedHole"],
|
|
16772
16801
|
message: "isCastellatedHole must be true when castellated hole props are provided"
|
|
16773
16802
|
});
|
|
16774
16803
|
}
|
|
16775
16804
|
});
|
|
16776
16805
|
var boardProps = subcircuitGroupProps.omit({ connections: true }).extend({
|
|
16777
|
-
|
|
16806
|
+
mountedTo: z46.string().trim().min(1).optional().describe(
|
|
16807
|
+
'Assembly mounting target, such as "NEMA17.backface". Trimmed; omitted leaves the board unattached. The target face is resolved by the consumer.'
|
|
16808
|
+
),
|
|
16809
|
+
mountGap: distance.pipe(z46.number().nonnegative().finite()).optional().describe(
|
|
16810
|
+
"Nonnegative finite clearance between the target mounting face and the nearest PCB surface, in millimeters or a unit string, parsed to mm. Omitted leaves the gap unset; only meaningful when mountedTo is supplied."
|
|
16811
|
+
),
|
|
16812
|
+
fabricatorPreset: z46.enum([
|
|
16778
16813
|
"jlcpcb_economy",
|
|
16779
16814
|
"jlcpcb_standard",
|
|
16780
16815
|
"jlcpcb_economy_20260912",
|
|
@@ -16782,24 +16817,24 @@ var boardProps = subcircuitGroupProps.omit({ connections: true }).extend({
|
|
|
16782
16817
|
]).optional().describe(
|
|
16783
16818
|
"Fabricator preset, preserved as supplied. Omitted leaves the preset unset."
|
|
16784
16819
|
),
|
|
16785
|
-
material:
|
|
16786
|
-
layers:
|
|
16787
|
-
|
|
16788
|
-
|
|
16789
|
-
|
|
16790
|
-
|
|
16791
|
-
|
|
16792
|
-
|
|
16820
|
+
material: z46.enum(["fr4", "fr1", "flex"]).default("fr4"),
|
|
16821
|
+
layers: z46.union([
|
|
16822
|
+
z46.literal(1),
|
|
16823
|
+
z46.literal(2),
|
|
16824
|
+
z46.literal(4),
|
|
16825
|
+
z46.literal(6),
|
|
16826
|
+
z46.literal(8),
|
|
16827
|
+
z46.literal(10)
|
|
16793
16828
|
]).default(2),
|
|
16794
|
-
allowBlindAndBuriedVias:
|
|
16829
|
+
allowBlindAndBuriedVias: z46.boolean().default(false).describe(
|
|
16795
16830
|
"Whether the autorouter may generate blind and buried vias. Defaults to false, which restricts newly generated vias to the full board stack."
|
|
16796
16831
|
),
|
|
16797
|
-
routeRemaining:
|
|
16832
|
+
routeRemaining: z46.boolean().optional().describe(
|
|
16798
16833
|
"Whether to route remaining unrouted connections after explicit routing phases. Boolean values are preserved; omitted leaves the setting unset. No aliases or prop conflicts are introduced, and existing boards require no migration."
|
|
16799
16834
|
),
|
|
16800
|
-
defaultViaTenting:
|
|
16801
|
-
|
|
16802
|
-
|
|
16835
|
+
defaultViaTenting: z46.union([
|
|
16836
|
+
z46.boolean(),
|
|
16837
|
+
z46.enum([
|
|
16803
16838
|
"both_sides",
|
|
16804
16839
|
"top_and_bottom_tented",
|
|
16805
16840
|
"top_tented",
|
|
@@ -16818,89 +16853,129 @@ var boardProps = subcircuitGroupProps.omit({ connections: true }).extend({
|
|
|
16818
16853
|
boardAnchorPosition: point.optional(),
|
|
16819
16854
|
anchorAlignment: ninePointAnchor.optional(),
|
|
16820
16855
|
boardAnchorAlignment: ninePointAnchor.optional().describe("Prefer using anchorAlignment when possible"),
|
|
16821
|
-
outline:
|
|
16822
|
-
title:
|
|
16856
|
+
outline: z46.array(boardOutlinePoint).optional(),
|
|
16857
|
+
title: z46.string().optional(),
|
|
16823
16858
|
solderMaskColor: boardColor.optional(),
|
|
16824
16859
|
topSolderMaskColor: boardColor.optional(),
|
|
16825
16860
|
bottomSolderMaskColor: boardColor.optional(),
|
|
16826
16861
|
silkscreenColor: boardColor.optional(),
|
|
16827
16862
|
topSilkscreenColor: boardColor.optional(),
|
|
16828
16863
|
bottomSilkscreenColor: boardColor.optional(),
|
|
16829
|
-
doubleSidedAssembly:
|
|
16830
|
-
isViaInPadAllowed:
|
|
16864
|
+
doubleSidedAssembly: z46.boolean().optional().default(false),
|
|
16865
|
+
isViaInPadAllowed: z46.boolean().optional().describe(
|
|
16831
16866
|
"Allows intentional via-in-pad designs to pass DRC. Omitted or false keeps via-in-pad disallowed."
|
|
16832
16867
|
),
|
|
16833
|
-
automaticPoursEnabled:
|
|
16868
|
+
automaticPoursEnabled: z46.boolean().default(false).describe(
|
|
16834
16869
|
"Whether implicit copper pours should be generated automatically. Defaults to false."
|
|
16835
16870
|
),
|
|
16836
|
-
enableViaStitching:
|
|
16871
|
+
enableViaStitching: z46.boolean().default(false).describe(
|
|
16837
16872
|
"Whether to stitch copper pours on the same net across layers with vias. Defaults to false."
|
|
16838
16873
|
),
|
|
16839
|
-
viaStitchPitch: distance.pipe(
|
|
16874
|
+
viaStitchPitch: distance.pipe(z46.number().positive().finite()).optional().describe(
|
|
16840
16875
|
"Positive center-to-center stitching via spacing in millimeters or a unit string, parsed to millimeters. Omitted uses the solver default. Does not enable stitching by itself."
|
|
16841
16876
|
),
|
|
16842
|
-
schematicDisabled:
|
|
16877
|
+
schematicDisabled: z46.boolean().optional()
|
|
16843
16878
|
});
|
|
16844
16879
|
expectTypesMatch(true);
|
|
16845
16880
|
expectTypesMatch(true);
|
|
16846
16881
|
|
|
16847
16882
|
// lib/components/pcb-bend.ts
|
|
16848
16883
|
import { rotation as rotation3 } from "circuit-json";
|
|
16849
|
-
import { z as
|
|
16850
|
-
var finiteDistance = distance.pipe(
|
|
16851
|
-
var pcbBendProps =
|
|
16852
|
-
name:
|
|
16884
|
+
import { z as z47 } from "zod";
|
|
16885
|
+
var finiteDistance = distance.pipe(z47.number().finite());
|
|
16886
|
+
var pcbBendProps = z47.object({
|
|
16887
|
+
name: z47.string().optional(),
|
|
16853
16888
|
x1: finiteDistance,
|
|
16854
16889
|
y1: finiteDistance,
|
|
16855
16890
|
x2: finiteDistance,
|
|
16856
16891
|
y2: finiteDistance,
|
|
16857
|
-
bendAngle: rotation3.pipe(
|
|
16858
|
-
bendRadius: distance.pipe(
|
|
16859
|
-
bendSide:
|
|
16892
|
+
bendAngle: rotation3.pipe(z47.number().finite()),
|
|
16893
|
+
bendRadius: distance.pipe(z47.number().finite().positive()),
|
|
16894
|
+
bendSide: z47.enum(["left", "right"])
|
|
16860
16895
|
}).refine(({ x1, y1, x2, y2 }) => x1 !== x2 || y1 !== y2, {
|
|
16861
16896
|
message: "Bend centerline endpoints must be distinct",
|
|
16862
16897
|
path: ["x2"]
|
|
16863
16898
|
});
|
|
16864
16899
|
expectTypesMatch(true);
|
|
16865
16900
|
|
|
16901
|
+
// lib/components/pcb-soldermask-opening.ts
|
|
16902
|
+
import { z as z48 } from "zod";
|
|
16903
|
+
var finiteDistance2 = distance.pipe(z48.number().finite());
|
|
16904
|
+
var positiveDistance2 = distance.pipe(z48.number().finite().positive());
|
|
16905
|
+
var openingBaseProps = pcbLayoutProps.omit({ layer: true }).extend({
|
|
16906
|
+
name: z48.string().optional(),
|
|
16907
|
+
/** Face whose solder mask or flex coverlay is removed. Required. */
|
|
16908
|
+
layer: z48.enum(["top", "bottom"])
|
|
16909
|
+
});
|
|
16910
|
+
var pcbSoldermaskOpeningProps = z48.discriminatedUnion("shape", [
|
|
16911
|
+
openingBaseProps.extend({
|
|
16912
|
+
shape: z48.literal("rect"),
|
|
16913
|
+
width: positiveDistance2,
|
|
16914
|
+
height: positiveDistance2,
|
|
16915
|
+
radius: z48.never().optional(),
|
|
16916
|
+
points: z48.never().optional()
|
|
16917
|
+
}),
|
|
16918
|
+
openingBaseProps.extend({
|
|
16919
|
+
shape: z48.literal("circle"),
|
|
16920
|
+
radius: positiveDistance2,
|
|
16921
|
+
width: z48.never().optional(),
|
|
16922
|
+
height: z48.never().optional(),
|
|
16923
|
+
points: z48.never().optional()
|
|
16924
|
+
}),
|
|
16925
|
+
openingBaseProps.extend({
|
|
16926
|
+
shape: z48.literal("polygon"),
|
|
16927
|
+
/** Local vertices; pcbX/pcbY/pcbRotation place the implicitly closed boundary. */
|
|
16928
|
+
points: z48.array(z48.object({ x: finiteDistance2, y: finiteDistance2 })).min(3).refine((points) => {
|
|
16929
|
+
const twiceArea = points.reduce((sum, point8, index) => {
|
|
16930
|
+
const next = points[(index + 1) % points.length];
|
|
16931
|
+
return sum + point8.x * next.y - next.x * point8.y;
|
|
16932
|
+
}, 0);
|
|
16933
|
+
return Number.isFinite(twiceArea) && twiceArea !== 0;
|
|
16934
|
+
}, "Solder-mask opening must enclose a nonzero area"),
|
|
16935
|
+
width: z48.never().optional(),
|
|
16936
|
+
height: z48.never().optional(),
|
|
16937
|
+
radius: z48.never().optional()
|
|
16938
|
+
})
|
|
16939
|
+
]);
|
|
16940
|
+
|
|
16866
16941
|
// lib/components/pcb-stiffener.ts
|
|
16867
|
-
import { z as
|
|
16868
|
-
var
|
|
16869
|
-
var
|
|
16942
|
+
import { z as z49 } from "zod";
|
|
16943
|
+
var positiveDistance3 = distance.pipe(z49.number().finite().positive());
|
|
16944
|
+
var finiteDistance3 = distance.pipe(z49.number().finite());
|
|
16870
16945
|
var stiffenerBaseProps = pcbLayoutProps.omit({ layer: true }).extend({
|
|
16871
|
-
name:
|
|
16946
|
+
name: z49.string().optional(),
|
|
16872
16947
|
/** Board attachment face, not a copper-layer assignment. Required. */
|
|
16873
|
-
layer:
|
|
16874
|
-
material:
|
|
16948
|
+
layer: z49.enum(["top", "bottom"]),
|
|
16949
|
+
material: z49.enum(["fr4", "polyimide", "stainless_steel", "aluminum"]),
|
|
16875
16950
|
/** Stiffener material thickness only, excluding PCB and adhesive. */
|
|
16876
|
-
thickness:
|
|
16951
|
+
thickness: positiveDistance3,
|
|
16877
16952
|
/** Nonnegative adhesive thickness; omission means unspecified, not zero. */
|
|
16878
|
-
adhesiveThickness: distance.pipe(
|
|
16953
|
+
adhesiveThickness: distance.pipe(z49.number().finite().nonnegative()).optional()
|
|
16879
16954
|
});
|
|
16880
|
-
var pcbStiffenerProps =
|
|
16955
|
+
var pcbStiffenerProps = z49.discriminatedUnion("shape", [
|
|
16881
16956
|
stiffenerBaseProps.extend({
|
|
16882
|
-
shape:
|
|
16883
|
-
width:
|
|
16884
|
-
height:
|
|
16885
|
-
outline:
|
|
16957
|
+
shape: z49.literal("rect"),
|
|
16958
|
+
width: positiveDistance3,
|
|
16959
|
+
height: positiveDistance3,
|
|
16960
|
+
outline: z49.never().optional()
|
|
16886
16961
|
}),
|
|
16887
16962
|
stiffenerBaseProps.extend({
|
|
16888
|
-
shape:
|
|
16963
|
+
shape: z49.literal("polygon"),
|
|
16889
16964
|
/** Local vertices transformed by pcbX/pcbY/pcbRotation; implicitly closed. */
|
|
16890
|
-
outline:
|
|
16965
|
+
outline: z49.array(z49.object({ x: finiteDistance3, y: finiteDistance3 })).min(3).refine((points) => {
|
|
16891
16966
|
const twiceArea = points.reduce((sum, p, i) => {
|
|
16892
16967
|
const next = points[(i + 1) % points.length];
|
|
16893
16968
|
return sum + p.x * next.y - next.x * p.y;
|
|
16894
16969
|
}, 0);
|
|
16895
16970
|
return Number.isFinite(twiceArea) && twiceArea !== 0;
|
|
16896
16971
|
}, "Stiffener outline must enclose a nonzero area"),
|
|
16897
|
-
width:
|
|
16898
|
-
height:
|
|
16972
|
+
width: z49.never().optional(),
|
|
16973
|
+
height: z49.never().optional()
|
|
16899
16974
|
})
|
|
16900
16975
|
]);
|
|
16901
16976
|
|
|
16902
16977
|
// lib/components/panel.ts
|
|
16903
|
-
import { z as
|
|
16978
|
+
import { z as z50 } from "zod";
|
|
16904
16979
|
var panelProps = baseGroupProps.omit({
|
|
16905
16980
|
width: true,
|
|
16906
16981
|
height: true,
|
|
@@ -16909,25 +16984,25 @@ var panelProps = baseGroupProps.omit({
|
|
|
16909
16984
|
}).extend({
|
|
16910
16985
|
width: distance.optional(),
|
|
16911
16986
|
height: distance.optional(),
|
|
16912
|
-
children:
|
|
16987
|
+
children: z50.any().optional(),
|
|
16913
16988
|
anchorAlignment: ninePointAnchor.optional(),
|
|
16914
|
-
noSolderMask:
|
|
16915
|
-
panelizationMethod:
|
|
16989
|
+
noSolderMask: z50.boolean().optional(),
|
|
16990
|
+
panelizationMethod: z50.enum(["tab-routing", "outline_routing", "none"]).optional(),
|
|
16916
16991
|
boardGap: distance.optional(),
|
|
16917
|
-
layoutMode:
|
|
16918
|
-
row:
|
|
16919
|
-
col:
|
|
16992
|
+
layoutMode: z50.enum(["grid", "pack", "none"]).optional(),
|
|
16993
|
+
row: z50.number().optional(),
|
|
16994
|
+
col: z50.number().optional(),
|
|
16920
16995
|
cellWidth: distance.optional(),
|
|
16921
16996
|
cellHeight: distance.optional(),
|
|
16922
16997
|
tabWidth: distance.optional(),
|
|
16923
16998
|
tabLength: distance.optional(),
|
|
16924
|
-
mouseBites:
|
|
16999
|
+
mouseBites: z50.boolean().optional(),
|
|
16925
17000
|
edgePadding: distance.optional(),
|
|
16926
17001
|
edgePaddingLeft: distance.optional(),
|
|
16927
17002
|
edgePaddingRight: distance.optional(),
|
|
16928
17003
|
edgePaddingTop: distance.optional(),
|
|
16929
17004
|
edgePaddingBottom: distance.optional(),
|
|
16930
|
-
_subcircuitCachingEnabled:
|
|
17005
|
+
_subcircuitCachingEnabled: z50.boolean().optional()
|
|
16931
17006
|
});
|
|
16932
17007
|
expectTypesMatch(true);
|
|
16933
17008
|
|
|
@@ -16938,34 +17013,34 @@ expectTypesMatch(true);
|
|
|
16938
17013
|
|
|
16939
17014
|
// lib/common/fanoutTracePath.ts
|
|
16940
17015
|
import { layer_ref as layer_ref5 } from "circuit-json";
|
|
16941
|
-
import { z as
|
|
17016
|
+
import { z as z52 } from "zod";
|
|
16942
17017
|
var coordinate = distance.refine(Number.isFinite, "Coordinate must be finite");
|
|
16943
|
-
var
|
|
17018
|
+
var positiveDistance4 = distance.refine(
|
|
16944
17019
|
(value) => Number.isFinite(value) && value > 0,
|
|
16945
17020
|
"Distance must be positive and finite"
|
|
16946
17021
|
);
|
|
16947
|
-
var routePoint =
|
|
16948
|
-
|
|
16949
|
-
route_type:
|
|
17022
|
+
var routePoint = z52.discriminatedUnion("route_type", [
|
|
17023
|
+
z52.object({
|
|
17024
|
+
route_type: z52.literal("wire"),
|
|
16950
17025
|
x: coordinate,
|
|
16951
17026
|
y: coordinate,
|
|
16952
|
-
width:
|
|
16953
|
-
width_interpolation_mode:
|
|
17027
|
+
width: positiveDistance4,
|
|
17028
|
+
width_interpolation_mode: z52.enum(["linear", "quadratic"]).optional().describe("Interpolate width from this point to the next wire point."),
|
|
16954
17029
|
layer: layer_ref5
|
|
16955
17030
|
}),
|
|
16956
|
-
|
|
16957
|
-
route_type:
|
|
17031
|
+
z52.object({
|
|
17032
|
+
route_type: z52.literal("via"),
|
|
16958
17033
|
x: coordinate,
|
|
16959
17034
|
y: coordinate,
|
|
16960
17035
|
from_layer: layer_ref5,
|
|
16961
17036
|
to_layer: layer_ref5,
|
|
16962
|
-
via_diameter:
|
|
16963
|
-
via_hole_diameter:
|
|
17037
|
+
via_diameter: positiveDistance4.optional(),
|
|
17038
|
+
via_hole_diameter: positiveDistance4.optional()
|
|
16964
17039
|
})
|
|
16965
17040
|
]);
|
|
16966
|
-
var fanoutTracePath =
|
|
16967
|
-
connection:
|
|
16968
|
-
route:
|
|
17041
|
+
var fanoutTracePath = z52.object({
|
|
17042
|
+
connection: z52.string().min(1),
|
|
17043
|
+
route: z52.array(routePoint).min(2).superRefine((route, ctx) => {
|
|
16969
17044
|
const first = route[0];
|
|
16970
17045
|
let layer = first?.route_type === "via" ? first.from_layer : first?.layer;
|
|
16971
17046
|
for (const [index, point8] of route.entries()) {
|
|
@@ -16992,16 +17067,16 @@ var fanoutTracePath = z50.object({
|
|
|
16992
17067
|
|
|
16993
17068
|
// lib/common/fanoutProps.ts
|
|
16994
17069
|
import { layer_ref as layer_ref6 } from "circuit-json";
|
|
16995
|
-
import { z as
|
|
17070
|
+
import { z as z54 } from "zod";
|
|
16996
17071
|
|
|
16997
17072
|
// lib/common/fanoutBoundaryPadding.ts
|
|
16998
|
-
import { z as
|
|
17073
|
+
import { z as z53 } from "zod";
|
|
16999
17074
|
var nonnegativeDistance = distance.refine((value) => value >= 0, {
|
|
17000
17075
|
message: "Fanout boundary padding cannot be negative"
|
|
17001
17076
|
});
|
|
17002
|
-
var fanoutBoundaryPadding =
|
|
17077
|
+
var fanoutBoundaryPadding = z53.union([
|
|
17003
17078
|
nonnegativeDistance,
|
|
17004
|
-
|
|
17079
|
+
z53.object({
|
|
17005
17080
|
top: nonnegativeDistance.optional(),
|
|
17006
17081
|
right: nonnegativeDistance.optional(),
|
|
17007
17082
|
bottom: nonnegativeDistance.optional(),
|
|
@@ -17028,32 +17103,32 @@ var canonicalBusFanoutDirectionValues = [
|
|
|
17028
17103
|
"leftside_top",
|
|
17029
17104
|
"center"
|
|
17030
17105
|
];
|
|
17031
|
-
var canonicalBusFanoutDirection =
|
|
17106
|
+
var canonicalBusFanoutDirection = z54.enum(
|
|
17032
17107
|
canonicalBusFanoutDirectionValues
|
|
17033
17108
|
);
|
|
17034
|
-
var busFanoutDirection =
|
|
17109
|
+
var busFanoutDirection = z54.union([
|
|
17035
17110
|
ninePointAnchor,
|
|
17036
17111
|
canonicalBusFanoutDirection,
|
|
17037
|
-
|
|
17038
|
-
direction:
|
|
17112
|
+
z54.object({
|
|
17113
|
+
direction: z54.union([ninePointAnchor, canonicalBusFanoutDirection])
|
|
17039
17114
|
})
|
|
17040
17115
|
]);
|
|
17041
|
-
var fanoutProps =
|
|
17042
|
-
busFanoutDirections:
|
|
17116
|
+
var fanoutProps = z54.object({
|
|
17117
|
+
busFanoutDirections: z54.record(busFanoutDirection).optional(),
|
|
17043
17118
|
fanoutBoundaryPadding: fanoutBoundaryPadding.optional(),
|
|
17044
|
-
fanoutRoutingLayers:
|
|
17045
|
-
fanoutPourNetMap:
|
|
17119
|
+
fanoutRoutingLayers: z54.array(layer_ref6).min(1).optional(),
|
|
17120
|
+
fanoutPourNetMap: z54.record(layer_ref6, z54.union([z54.string(), z54.array(z54.string()).min(1)])).optional()
|
|
17046
17121
|
});
|
|
17047
17122
|
expectTypesMatch(true);
|
|
17048
17123
|
|
|
17049
17124
|
// lib/components/breakout.ts
|
|
17050
|
-
import { z as
|
|
17125
|
+
import { z as z55 } from "zod";
|
|
17051
17126
|
var nonnegativeFanoutMargin = distance.refine((value) => value >= 0, {
|
|
17052
17127
|
message: "Fanout margin cannot be negative"
|
|
17053
17128
|
});
|
|
17054
17129
|
var breakoutProps = subcircuitGroupProps.extend({
|
|
17055
17130
|
autorouter: autorouterProp.default("fanout"),
|
|
17056
|
-
pcbTracePaths:
|
|
17131
|
+
pcbTracePaths: z55.array(fanoutTracePath).optional(),
|
|
17057
17132
|
padding: distance.optional(),
|
|
17058
17133
|
paddingLeft: distance.optional(),
|
|
17059
17134
|
paddingRight: distance.optional(),
|
|
@@ -17067,41 +17142,41 @@ expectTypesMatch(true);
|
|
|
17067
17142
|
// lib/components/chip.ts
|
|
17068
17143
|
import { distance as distance12, supplier_name as supplier_name2 } from "circuit-json";
|
|
17069
17144
|
import { isValidElement } from "react";
|
|
17070
|
-
import { z as
|
|
17071
|
-
var connectionTarget2 =
|
|
17072
|
-
var noConnectProp =
|
|
17073
|
-
var connectionsProp =
|
|
17074
|
-
var spicemodelElement =
|
|
17145
|
+
import { z as z56 } from "zod";
|
|
17146
|
+
var connectionTarget2 = z56.string().or(z56.array(z56.string()).readonly()).or(z56.array(z56.string()));
|
|
17147
|
+
var noConnectProp = z56.array(schematicPinLabel).readonly().or(z56.array(schematicPinLabel));
|
|
17148
|
+
var connectionsProp = z56.custom().pipe(z56.record(z56.string(), connectionTarget2));
|
|
17149
|
+
var spicemodelElement = z56.custom(
|
|
17075
17150
|
(v) => !!v && typeof v === "object" && "type" in v && "props" in v
|
|
17076
17151
|
);
|
|
17077
|
-
var internalCircuitElement =
|
|
17152
|
+
var internalCircuitElement = z56.custom(
|
|
17078
17153
|
(value) => isValidElement(value) && value.type === "internalcircuit"
|
|
17079
17154
|
);
|
|
17080
|
-
var pinLabelsProp =
|
|
17155
|
+
var pinLabelsProp = z56.record(
|
|
17081
17156
|
schematicPinLabel,
|
|
17082
|
-
schematicPinLabel.or(
|
|
17157
|
+
schematicPinLabel.or(z56.array(schematicPinLabel).readonly()).or(z56.array(schematicPinLabel))
|
|
17083
17158
|
);
|
|
17084
17159
|
expectTypesMatch(true);
|
|
17085
|
-
var pinCompatibleVariant =
|
|
17086
|
-
manufacturerPartNumber:
|
|
17087
|
-
supplierPartNumber:
|
|
17160
|
+
var pinCompatibleVariant = z56.object({
|
|
17161
|
+
manufacturerPartNumber: z56.string().optional(),
|
|
17162
|
+
supplierPartNumber: z56.record(supplier_name2, z56.array(z56.string())).optional()
|
|
17088
17163
|
});
|
|
17089
17164
|
var chipProps = commonComponentProps.extend({
|
|
17090
|
-
manufacturerPartNumber:
|
|
17165
|
+
manufacturerPartNumber: z56.string().optional(),
|
|
17091
17166
|
pinLabels: pinLabelsProp.optional(),
|
|
17092
|
-
showPinAliases:
|
|
17093
|
-
pcbPinLabels:
|
|
17094
|
-
internallyConnectedPins:
|
|
17095
|
-
externallyConnectedPins:
|
|
17167
|
+
showPinAliases: z56.boolean().optional(),
|
|
17168
|
+
pcbPinLabels: z56.record(z56.string(), z56.string()).optional(),
|
|
17169
|
+
internallyConnectedPins: z56.array(z56.array(z56.union([z56.string(), z56.number()]))).optional(),
|
|
17170
|
+
externallyConnectedPins: z56.array(z56.array(z56.string())).optional(),
|
|
17096
17171
|
schPinArrangement: schematicPortArrangement.optional(),
|
|
17097
17172
|
schPortArrangement: schematicPortArrangement.optional(),
|
|
17098
|
-
pinCompatibleVariants:
|
|
17173
|
+
pinCompatibleVariants: z56.array(pinCompatibleVariant).optional(),
|
|
17099
17174
|
schPinStyle: schematicPinStyle.optional(),
|
|
17100
17175
|
schPinSpacing: distance12.optional(),
|
|
17101
17176
|
schWidth: distance12.optional(),
|
|
17102
17177
|
schHeight: distance12.optional(),
|
|
17103
|
-
noSchematicRepresentation:
|
|
17104
|
-
schShowInternalCircuit:
|
|
17178
|
+
noSchematicRepresentation: z56.boolean().optional(),
|
|
17179
|
+
schShowInternalCircuit: z56.boolean().optional().default(false),
|
|
17105
17180
|
noConnect: noConnectProp.optional(),
|
|
17106
17181
|
connections: connectionsProp.optional(),
|
|
17107
17182
|
spiceModel: spicemodelElement.optional(),
|
|
@@ -17116,38 +17191,38 @@ expectTypesMatch(true);
|
|
|
17116
17191
|
|
|
17117
17192
|
// lib/components/jumper.ts
|
|
17118
17193
|
import { distance as distance13 } from "circuit-json";
|
|
17119
|
-
import { z as
|
|
17194
|
+
import { z as z57 } from "zod";
|
|
17120
17195
|
var jumperProps = commonComponentProps.extend({
|
|
17121
|
-
manufacturerPartNumber:
|
|
17122
|
-
pinLabels:
|
|
17123
|
-
|
|
17124
|
-
schematicPinLabel.or(
|
|
17196
|
+
manufacturerPartNumber: z57.string().optional(),
|
|
17197
|
+
pinLabels: z57.record(
|
|
17198
|
+
z57.number().or(schematicPinLabel),
|
|
17199
|
+
schematicPinLabel.or(z57.array(schematicPinLabel))
|
|
17125
17200
|
).optional(),
|
|
17126
17201
|
schPinStyle: schematicPinStyle.optional(),
|
|
17127
17202
|
schPinSpacing: distance13.optional(),
|
|
17128
17203
|
schWidth: distance13.optional(),
|
|
17129
17204
|
schHeight: distance13.optional(),
|
|
17130
|
-
schDirection:
|
|
17205
|
+
schDirection: z57.enum(["left", "right"]).optional(),
|
|
17131
17206
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
17132
17207
|
schPortArrangement: schematicPortArrangement.optional(),
|
|
17133
|
-
pcbPinLabels:
|
|
17134
|
-
pinCount:
|
|
17135
|
-
internallyConnectedPins:
|
|
17136
|
-
connections:
|
|
17208
|
+
pcbPinLabels: z57.record(z57.string(), z57.string()).optional(),
|
|
17209
|
+
pinCount: z57.union([z57.literal(2), z57.literal(3)]).optional(),
|
|
17210
|
+
internallyConnectedPins: z57.array(z57.array(z57.union([z57.string(), z57.number()]))).optional(),
|
|
17211
|
+
connections: z57.custom().pipe(z57.record(z57.string(), connectionTarget)).optional()
|
|
17137
17212
|
});
|
|
17138
17213
|
expectTypesMatch(true);
|
|
17139
17214
|
|
|
17140
17215
|
// lib/components/solderjumper.ts
|
|
17141
|
-
import { z as
|
|
17216
|
+
import { z as z58 } from "zod";
|
|
17142
17217
|
var solderjumperProps = jumperProps.extend({
|
|
17143
|
-
bridgedPins:
|
|
17144
|
-
bridged:
|
|
17218
|
+
bridgedPins: z58.array(z58.array(z58.string())).optional(),
|
|
17219
|
+
bridged: z58.boolean().optional()
|
|
17145
17220
|
});
|
|
17146
17221
|
expectTypesMatch(true);
|
|
17147
17222
|
|
|
17148
17223
|
// lib/components/connector.ts
|
|
17149
|
-
import { z as
|
|
17150
|
-
var connectorStandard =
|
|
17224
|
+
import { z as z59 } from "zod";
|
|
17225
|
+
var connectorStandard = z59.enum([
|
|
17151
17226
|
"usb_c",
|
|
17152
17227
|
"m2",
|
|
17153
17228
|
"jst_sh",
|
|
@@ -17159,43 +17234,43 @@ var connectorStandard = z57.enum([
|
|
|
17159
17234
|
]);
|
|
17160
17235
|
var connectorProps = chipProps.extend({
|
|
17161
17236
|
standard: connectorStandard.optional(),
|
|
17162
|
-
pinCount:
|
|
17237
|
+
pinCount: z59.number().int().positive().optional()
|
|
17163
17238
|
});
|
|
17164
17239
|
expectTypesMatch(true);
|
|
17165
17240
|
|
|
17166
17241
|
// lib/components/interconnect.ts
|
|
17167
|
-
import { z as
|
|
17242
|
+
import { z as z60 } from "zod";
|
|
17168
17243
|
var interconnectProps = commonComponentProps.extend({
|
|
17169
|
-
standard:
|
|
17170
|
-
pinLabels:
|
|
17171
|
-
|
|
17172
|
-
schematicPinLabel.or(
|
|
17244
|
+
standard: z60.enum(["TSC0001_36P_XALT_2025_11", "0805", "0603", "1206"]).optional(),
|
|
17245
|
+
pinLabels: z60.record(
|
|
17246
|
+
z60.number().or(schematicPinLabel),
|
|
17247
|
+
schematicPinLabel.or(z60.array(schematicPinLabel))
|
|
17173
17248
|
).optional(),
|
|
17174
|
-
internallyConnectedPins:
|
|
17249
|
+
internallyConnectedPins: z60.array(z60.array(z60.union([z60.string(), z60.number()]))).optional()
|
|
17175
17250
|
});
|
|
17176
17251
|
expectTypesMatch(true);
|
|
17177
17252
|
|
|
17178
17253
|
// lib/components/fuse.ts
|
|
17179
|
-
import { z as
|
|
17254
|
+
import { z as z61 } from "zod";
|
|
17180
17255
|
var fusePinLabels = ["pin1", "pin2"];
|
|
17181
17256
|
var fuseProps = commonComponentProps.extend({
|
|
17182
|
-
currentRating:
|
|
17183
|
-
voltageRating:
|
|
17184
|
-
schShowRatings:
|
|
17257
|
+
currentRating: z61.union([z61.number(), z61.string()]),
|
|
17258
|
+
voltageRating: z61.union([z61.number(), z61.string()]).optional(),
|
|
17259
|
+
schShowRatings: z61.boolean().optional(),
|
|
17185
17260
|
schOrientation: schematicOrientation.optional(),
|
|
17186
|
-
connections:
|
|
17187
|
-
|
|
17188
|
-
|
|
17189
|
-
|
|
17190
|
-
|
|
17191
|
-
|
|
17261
|
+
connections: z61.record(
|
|
17262
|
+
z61.string(),
|
|
17263
|
+
z61.union([
|
|
17264
|
+
z61.string(),
|
|
17265
|
+
z61.array(z61.string()).readonly(),
|
|
17266
|
+
z61.array(z61.string())
|
|
17192
17267
|
])
|
|
17193
17268
|
).optional()
|
|
17194
17269
|
});
|
|
17195
17270
|
|
|
17196
17271
|
// lib/components/platedhole.ts
|
|
17197
17272
|
import { distance as distance14 } from "circuit-json";
|
|
17198
|
-
import { z as
|
|
17273
|
+
import { z as z62 } from "zod";
|
|
17199
17274
|
var DEFAULT_PIN_HEADER_HOLE_DIAMETER = "0.04in";
|
|
17200
17275
|
var DEFAULT_PIN_HEADER_OUTER_DIAMETER = "0.1in";
|
|
17201
17276
|
var inferPlatedHoleShapeAndDefaults = (rawProps) => {
|
|
@@ -17227,26 +17302,26 @@ var inferPlatedHoleShapeAndDefaults = (rawProps) => {
|
|
|
17227
17302
|
props.outerDiameter = DEFAULT_PIN_HEADER_OUTER_DIAMETER;
|
|
17228
17303
|
return props;
|
|
17229
17304
|
};
|
|
17230
|
-
var distanceHiddenUndefined =
|
|
17305
|
+
var distanceHiddenUndefined = z62.custom().transform((a) => {
|
|
17231
17306
|
if (a === void 0) return void 0;
|
|
17232
17307
|
return distance14.parse(a);
|
|
17233
17308
|
});
|
|
17234
|
-
var platedHolePropsByShape =
|
|
17309
|
+
var platedHolePropsByShape = z62.discriminatedUnion("shape", [
|
|
17235
17310
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
17236
|
-
name:
|
|
17237
|
-
connectsTo:
|
|
17238
|
-
shape:
|
|
17311
|
+
name: z62.string().optional(),
|
|
17312
|
+
connectsTo: z62.string().or(z62.array(z62.string())).optional(),
|
|
17313
|
+
shape: z62.literal("circle"),
|
|
17239
17314
|
holeDiameter: distance14,
|
|
17240
17315
|
outerDiameter: distance14,
|
|
17241
17316
|
padDiameter: distance14.optional().describe("Diameter of the copper pad"),
|
|
17242
17317
|
portHints: portHints.optional(),
|
|
17243
17318
|
solderMaskMargin: distance14.optional(),
|
|
17244
|
-
coveredWithSolderMask:
|
|
17319
|
+
coveredWithSolderMask: z62.boolean().optional()
|
|
17245
17320
|
}),
|
|
17246
17321
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
17247
|
-
name:
|
|
17248
|
-
connectsTo:
|
|
17249
|
-
shape:
|
|
17322
|
+
name: z62.string().optional(),
|
|
17323
|
+
connectsTo: z62.string().or(z62.array(z62.string())).optional(),
|
|
17324
|
+
shape: z62.literal("oval"),
|
|
17250
17325
|
outerWidth: distance14,
|
|
17251
17326
|
outerHeight: distance14,
|
|
17252
17327
|
holeWidth: distanceHiddenUndefined,
|
|
@@ -17255,13 +17330,13 @@ var platedHolePropsByShape = z60.discriminatedUnion("shape", [
|
|
|
17255
17330
|
innerHeight: distance14.optional().describe("DEPRECATED use holeHeight"),
|
|
17256
17331
|
portHints: portHints.optional(),
|
|
17257
17332
|
solderMaskMargin: distance14.optional(),
|
|
17258
|
-
coveredWithSolderMask:
|
|
17333
|
+
coveredWithSolderMask: z62.boolean().optional()
|
|
17259
17334
|
}),
|
|
17260
17335
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
17261
|
-
name:
|
|
17262
|
-
connectsTo:
|
|
17263
|
-
shape:
|
|
17264
|
-
rectPad:
|
|
17336
|
+
name: z62.string().optional(),
|
|
17337
|
+
connectsTo: z62.string().or(z62.array(z62.string())).optional(),
|
|
17338
|
+
shape: z62.literal("pill"),
|
|
17339
|
+
rectPad: z62.boolean().optional(),
|
|
17265
17340
|
outerWidth: distance14,
|
|
17266
17341
|
outerHeight: distance14,
|
|
17267
17342
|
holeWidth: distanceHiddenUndefined,
|
|
@@ -17272,30 +17347,30 @@ var platedHolePropsByShape = z60.discriminatedUnion("shape", [
|
|
|
17272
17347
|
holeOffsetX: distance14.optional(),
|
|
17273
17348
|
holeOffsetY: distance14.optional(),
|
|
17274
17349
|
solderMaskMargin: distance14.optional(),
|
|
17275
|
-
coveredWithSolderMask:
|
|
17350
|
+
coveredWithSolderMask: z62.boolean().optional()
|
|
17276
17351
|
}),
|
|
17277
17352
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
17278
|
-
name:
|
|
17279
|
-
connectsTo:
|
|
17280
|
-
shape:
|
|
17353
|
+
name: z62.string().optional(),
|
|
17354
|
+
connectsTo: z62.string().or(z62.array(z62.string())).optional(),
|
|
17355
|
+
shape: z62.literal("circular_hole_with_rect_pad"),
|
|
17281
17356
|
holeDiameter: distance14,
|
|
17282
17357
|
rectPadWidth: distance14,
|
|
17283
17358
|
rectPadHeight: distance14,
|
|
17284
17359
|
rectBorderRadius: distance14.optional(),
|
|
17285
|
-
holeShape:
|
|
17286
|
-
padShape:
|
|
17360
|
+
holeShape: z62.literal("circle").optional(),
|
|
17361
|
+
padShape: z62.literal("rect").optional(),
|
|
17287
17362
|
portHints: portHints.optional(),
|
|
17288
17363
|
holeOffsetX: distance14.optional(),
|
|
17289
17364
|
holeOffsetY: distance14.optional(),
|
|
17290
17365
|
solderMaskMargin: distance14.optional(),
|
|
17291
|
-
coveredWithSolderMask:
|
|
17366
|
+
coveredWithSolderMask: z62.boolean().optional()
|
|
17292
17367
|
}),
|
|
17293
17368
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
17294
|
-
name:
|
|
17295
|
-
connectsTo:
|
|
17296
|
-
shape:
|
|
17297
|
-
holeShape:
|
|
17298
|
-
padShape:
|
|
17369
|
+
name: z62.string().optional(),
|
|
17370
|
+
connectsTo: z62.string().or(z62.array(z62.string())).optional(),
|
|
17371
|
+
shape: z62.literal("pill_hole_with_rect_pad"),
|
|
17372
|
+
holeShape: z62.literal("pill").optional(),
|
|
17373
|
+
padShape: z62.literal("rect").optional(),
|
|
17299
17374
|
holeWidth: distance14,
|
|
17300
17375
|
holeHeight: distance14,
|
|
17301
17376
|
rectPadWidth: distance14,
|
|
@@ -17305,22 +17380,22 @@ var platedHolePropsByShape = z60.discriminatedUnion("shape", [
|
|
|
17305
17380
|
holeOffsetX: distance14.optional(),
|
|
17306
17381
|
holeOffsetY: distance14.optional(),
|
|
17307
17382
|
solderMaskMargin: distance14.optional(),
|
|
17308
|
-
coveredWithSolderMask:
|
|
17383
|
+
coveredWithSolderMask: z62.boolean().optional()
|
|
17309
17384
|
}),
|
|
17310
17385
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
17311
|
-
name:
|
|
17312
|
-
connectsTo:
|
|
17313
|
-
shape:
|
|
17314
|
-
holeShape:
|
|
17386
|
+
name: z62.string().optional(),
|
|
17387
|
+
connectsTo: z62.string().or(z62.array(z62.string())).optional(),
|
|
17388
|
+
shape: z62.literal("hole_with_polygon_pad"),
|
|
17389
|
+
holeShape: z62.enum(["circle", "oval", "pill", "rotated_pill"]),
|
|
17315
17390
|
holeDiameter: distance14.optional(),
|
|
17316
17391
|
holeWidth: distance14.optional(),
|
|
17317
17392
|
holeHeight: distance14.optional(),
|
|
17318
|
-
padOutline:
|
|
17393
|
+
padOutline: z62.array(point),
|
|
17319
17394
|
holeOffsetX: distance14,
|
|
17320
17395
|
holeOffsetY: distance14,
|
|
17321
17396
|
portHints: portHints.optional(),
|
|
17322
17397
|
solderMaskMargin: distance14.optional(),
|
|
17323
|
-
coveredWithSolderMask:
|
|
17398
|
+
coveredWithSolderMask: z62.boolean().optional()
|
|
17324
17399
|
})
|
|
17325
17400
|
]).transform((a) => {
|
|
17326
17401
|
if ("innerWidth" in a && a.innerWidth !== void 0) {
|
|
@@ -17331,7 +17406,7 @@ var platedHolePropsByShape = z60.discriminatedUnion("shape", [
|
|
|
17331
17406
|
}
|
|
17332
17407
|
return a;
|
|
17333
17408
|
});
|
|
17334
|
-
var platedHoleProps =
|
|
17409
|
+
var platedHoleProps = z62.preprocess(
|
|
17335
17410
|
inferPlatedHoleShapeAndDefaults,
|
|
17336
17411
|
platedHolePropsByShape
|
|
17337
17412
|
);
|
|
@@ -17339,7 +17414,7 @@ expectTypesMatch(true);
|
|
|
17339
17414
|
|
|
17340
17415
|
// lib/components/resistor.ts
|
|
17341
17416
|
import { resistance } from "circuit-json";
|
|
17342
|
-
import { z as
|
|
17417
|
+
import { z as z63 } from "zod";
|
|
17343
17418
|
var resistorPinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
17344
17419
|
var resistorImperialFootprintNames = /* @__PURE__ */ new Set([
|
|
17345
17420
|
"01005",
|
|
@@ -17363,7 +17438,7 @@ var resistorFootprintProp = footprintProp.optional().transform(mapResistorFootpr
|
|
|
17363
17438
|
var resistorProps = commonComponentProps.extend({
|
|
17364
17439
|
footprint: resistorFootprintProp,
|
|
17365
17440
|
resistance,
|
|
17366
|
-
tolerance:
|
|
17441
|
+
tolerance: z63.union([z63.string(), z63.number()]).transform((val) => {
|
|
17367
17442
|
if (typeof val === "string") {
|
|
17368
17443
|
if (val.endsWith("%")) {
|
|
17369
17444
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -17372,12 +17447,12 @@ var resistorProps = commonComponentProps.extend({
|
|
|
17372
17447
|
}
|
|
17373
17448
|
return val;
|
|
17374
17449
|
}).pipe(
|
|
17375
|
-
|
|
17450
|
+
z63.number().min(0, "Tolerance must be non-negative").max(1, "Tolerance cannot be greater than 100%")
|
|
17376
17451
|
).optional(),
|
|
17377
|
-
pullupFor:
|
|
17378
|
-
pullupTo:
|
|
17379
|
-
pulldownFor:
|
|
17380
|
-
pulldownTo:
|
|
17452
|
+
pullupFor: z63.string().optional(),
|
|
17453
|
+
pullupTo: z63.string().optional(),
|
|
17454
|
+
pulldownFor: z63.string().optional(),
|
|
17455
|
+
pulldownTo: z63.string().optional(),
|
|
17381
17456
|
schOrientation: schematicOrientation.optional(),
|
|
17382
17457
|
schSize: schematicSymbolSize.optional(),
|
|
17383
17458
|
connections: createConnectionsProp(resistorPinLabels).optional()
|
|
@@ -17387,18 +17462,18 @@ expectTypesMatch(true);
|
|
|
17387
17462
|
|
|
17388
17463
|
// lib/components/potentiometer.ts
|
|
17389
17464
|
import { resistance as resistance2 } from "circuit-json";
|
|
17390
|
-
import { z as
|
|
17465
|
+
import { z as z64 } from "zod";
|
|
17391
17466
|
var potentiometerPinLabels = ["pin1", "pin2", "pin3"];
|
|
17392
17467
|
var potentiometerProps = commonComponentProps.extend({
|
|
17393
17468
|
maxResistance: resistance2,
|
|
17394
|
-
pinVariant:
|
|
17469
|
+
pinVariant: z64.enum(["two_pin", "three_pin"]).optional(),
|
|
17395
17470
|
connections: createConnectionsProp(potentiometerPinLabels).optional()
|
|
17396
17471
|
});
|
|
17397
17472
|
expectTypesMatch(true);
|
|
17398
17473
|
|
|
17399
17474
|
// lib/components/crystal.ts
|
|
17400
17475
|
import { capacitance, distance as distance15, frequency } from "circuit-json";
|
|
17401
|
-
import { z as
|
|
17476
|
+
import { z as z65 } from "zod";
|
|
17402
17477
|
var crystalPins = [
|
|
17403
17478
|
"pin1",
|
|
17404
17479
|
"left",
|
|
@@ -17411,9 +17486,9 @@ var crystalProps = commonComponentProps.extend({
|
|
|
17411
17486
|
frequency,
|
|
17412
17487
|
loadCapacitance: capacitance,
|
|
17413
17488
|
maxTraceLength: distance15.optional(),
|
|
17414
|
-
manufacturerPartNumber:
|
|
17415
|
-
mpn:
|
|
17416
|
-
pinVariant:
|
|
17489
|
+
manufacturerPartNumber: z65.string().optional(),
|
|
17490
|
+
mpn: z65.string().optional(),
|
|
17491
|
+
pinVariant: z65.enum(["two_pin", "four_pin"]).optional(),
|
|
17417
17492
|
schOrientation: schematicOrientation.optional(),
|
|
17418
17493
|
connections: createConnectionsProp(crystalPins).optional()
|
|
17419
17494
|
});
|
|
@@ -17421,34 +17496,34 @@ expectTypesMatch(true);
|
|
|
17421
17496
|
|
|
17422
17497
|
// lib/components/resonator.ts
|
|
17423
17498
|
import { frequency as frequency2, capacitance as capacitance2 } from "circuit-json";
|
|
17424
|
-
import { z as
|
|
17499
|
+
import { z as z66 } from "zod";
|
|
17425
17500
|
var resonatorProps = commonComponentProps.extend({
|
|
17426
17501
|
frequency: frequency2,
|
|
17427
17502
|
loadCapacitance: capacitance2,
|
|
17428
|
-
pinVariant:
|
|
17503
|
+
pinVariant: z66.enum(["no_ground", "ground_pin", "two_ground_pins"]).optional()
|
|
17429
17504
|
});
|
|
17430
17505
|
expectTypesMatch(true);
|
|
17431
17506
|
|
|
17432
17507
|
// lib/components/stampboard.ts
|
|
17433
17508
|
import { distance as distance16 } from "circuit-json";
|
|
17434
|
-
import { z as
|
|
17509
|
+
import { z as z67 } from "zod";
|
|
17435
17510
|
var stampboardProps = boardProps.extend({
|
|
17436
|
-
leftPinCount:
|
|
17437
|
-
rightPinCount:
|
|
17438
|
-
topPinCount:
|
|
17439
|
-
bottomPinCount:
|
|
17440
|
-
leftPins:
|
|
17441
|
-
rightPins:
|
|
17442
|
-
topPins:
|
|
17443
|
-
bottomPins:
|
|
17511
|
+
leftPinCount: z67.number().optional(),
|
|
17512
|
+
rightPinCount: z67.number().optional(),
|
|
17513
|
+
topPinCount: z67.number().optional(),
|
|
17514
|
+
bottomPinCount: z67.number().optional(),
|
|
17515
|
+
leftPins: z67.array(z67.string()).optional(),
|
|
17516
|
+
rightPins: z67.array(z67.string()).optional(),
|
|
17517
|
+
topPins: z67.array(z67.string()).optional(),
|
|
17518
|
+
bottomPins: z67.array(z67.string()).optional(),
|
|
17444
17519
|
pinPitch: distance16.optional(),
|
|
17445
|
-
innerHoles:
|
|
17520
|
+
innerHoles: z67.boolean().optional()
|
|
17446
17521
|
});
|
|
17447
17522
|
expectTypesMatch(true);
|
|
17448
17523
|
|
|
17449
17524
|
// lib/components/capacitor.ts
|
|
17450
17525
|
import { capacitance as capacitance3, distance as distance17, voltage } from "circuit-json";
|
|
17451
|
-
import { z as
|
|
17526
|
+
import { z as z68 } from "zod";
|
|
17452
17527
|
var capacitorPinLabels = [
|
|
17453
17528
|
"pin1",
|
|
17454
17529
|
"pin2",
|
|
@@ -17460,12 +17535,12 @@ var capacitorPinLabels = [
|
|
|
17460
17535
|
var capacitorProps = commonComponentProps.extend({
|
|
17461
17536
|
capacitance: capacitance3,
|
|
17462
17537
|
maxVoltageRating: voltage.optional(),
|
|
17463
|
-
schShowRatings:
|
|
17464
|
-
polarized:
|
|
17465
|
-
decouplingFor:
|
|
17466
|
-
decouplingTo:
|
|
17467
|
-
bypassFor:
|
|
17468
|
-
bypassTo:
|
|
17538
|
+
schShowRatings: z68.boolean().optional().default(false),
|
|
17539
|
+
polarized: z68.boolean().optional().default(false),
|
|
17540
|
+
decouplingFor: z68.string().optional(),
|
|
17541
|
+
decouplingTo: z68.string().optional(),
|
|
17542
|
+
bypassFor: z68.string().optional(),
|
|
17543
|
+
bypassTo: z68.string().optional(),
|
|
17469
17544
|
maxDecouplingTraceLength: distance17.optional(),
|
|
17470
17545
|
schOrientation: schematicOrientation.optional(),
|
|
17471
17546
|
schSize: schematicSymbolSize.optional(),
|
|
@@ -17476,14 +17551,14 @@ expectTypesMatch(true);
|
|
|
17476
17551
|
|
|
17477
17552
|
// lib/components/net.ts
|
|
17478
17553
|
import { distance as distance18 } from "circuit-json";
|
|
17479
|
-
import { z as
|
|
17480
|
-
var netProps =
|
|
17481
|
-
name:
|
|
17482
|
-
connectsTo:
|
|
17483
|
-
routingPhaseIndex:
|
|
17484
|
-
highlightColor:
|
|
17485
|
-
isPowerNet:
|
|
17486
|
-
isGroundNet:
|
|
17554
|
+
import { z as z69 } from "zod";
|
|
17555
|
+
var netProps = z69.object({
|
|
17556
|
+
name: z69.string(),
|
|
17557
|
+
connectsTo: z69.string().or(z69.array(z69.string())).optional(),
|
|
17558
|
+
routingPhaseIndex: z69.number().nullable().optional(),
|
|
17559
|
+
highlightColor: z69.string().optional(),
|
|
17560
|
+
isPowerNet: z69.boolean().optional(),
|
|
17561
|
+
isGroundNet: z69.boolean().optional(),
|
|
17487
17562
|
nominalTraceWidth: distance18.optional()
|
|
17488
17563
|
});
|
|
17489
17564
|
expectTypesMatch(true);
|
|
@@ -17497,55 +17572,55 @@ var fiducialProps = commonComponentProps.extend({
|
|
|
17497
17572
|
expectTypesMatch(true);
|
|
17498
17573
|
|
|
17499
17574
|
// lib/components/constrainedlayout.ts
|
|
17500
|
-
import { z as
|
|
17501
|
-
var constrainedLayoutProps =
|
|
17502
|
-
name:
|
|
17503
|
-
pcbOnly:
|
|
17504
|
-
schOnly:
|
|
17575
|
+
import { z as z71 } from "zod";
|
|
17576
|
+
var constrainedLayoutProps = z71.object({
|
|
17577
|
+
name: z71.string().optional(),
|
|
17578
|
+
pcbOnly: z71.boolean().optional(),
|
|
17579
|
+
schOnly: z71.boolean().optional()
|
|
17505
17580
|
});
|
|
17506
17581
|
expectTypesMatch(true);
|
|
17507
17582
|
|
|
17508
17583
|
// lib/components/constraint.ts
|
|
17509
|
-
import { z as
|
|
17510
|
-
var pcbXDistConstraintProps =
|
|
17511
|
-
pcb:
|
|
17584
|
+
import { z as z72 } from "zod";
|
|
17585
|
+
var pcbXDistConstraintProps = z72.object({
|
|
17586
|
+
pcb: z72.literal(true).optional(),
|
|
17512
17587
|
xDist: distance,
|
|
17513
|
-
left:
|
|
17514
|
-
right:
|
|
17515
|
-
edgeToEdge:
|
|
17516
|
-
centerToCenter:
|
|
17588
|
+
left: z72.string(),
|
|
17589
|
+
right: z72.string(),
|
|
17590
|
+
edgeToEdge: z72.literal(true).optional(),
|
|
17591
|
+
centerToCenter: z72.literal(true).optional()
|
|
17517
17592
|
});
|
|
17518
17593
|
expectTypesMatch(
|
|
17519
17594
|
true
|
|
17520
17595
|
);
|
|
17521
|
-
var pcbYDistConstraintProps =
|
|
17522
|
-
pcb:
|
|
17596
|
+
var pcbYDistConstraintProps = z72.object({
|
|
17597
|
+
pcb: z72.literal(true).optional(),
|
|
17523
17598
|
yDist: distance,
|
|
17524
|
-
top:
|
|
17525
|
-
bottom:
|
|
17526
|
-
edgeToEdge:
|
|
17527
|
-
centerToCenter:
|
|
17599
|
+
top: z72.string(),
|
|
17600
|
+
bottom: z72.string(),
|
|
17601
|
+
edgeToEdge: z72.literal(true).optional(),
|
|
17602
|
+
centerToCenter: z72.literal(true).optional()
|
|
17528
17603
|
});
|
|
17529
17604
|
expectTypesMatch(
|
|
17530
17605
|
true
|
|
17531
17606
|
);
|
|
17532
|
-
var pcbSameYConstraintProps =
|
|
17533
|
-
pcb:
|
|
17534
|
-
sameY:
|
|
17535
|
-
for:
|
|
17607
|
+
var pcbSameYConstraintProps = z72.object({
|
|
17608
|
+
pcb: z72.literal(true).optional(),
|
|
17609
|
+
sameY: z72.literal(true).optional(),
|
|
17610
|
+
for: z72.array(z72.string())
|
|
17536
17611
|
});
|
|
17537
17612
|
expectTypesMatch(
|
|
17538
17613
|
true
|
|
17539
17614
|
);
|
|
17540
|
-
var pcbSameXConstraintProps =
|
|
17541
|
-
pcb:
|
|
17542
|
-
sameX:
|
|
17543
|
-
for:
|
|
17615
|
+
var pcbSameXConstraintProps = z72.object({
|
|
17616
|
+
pcb: z72.literal(true).optional(),
|
|
17617
|
+
sameX: z72.literal(true).optional(),
|
|
17618
|
+
for: z72.array(z72.string())
|
|
17544
17619
|
});
|
|
17545
17620
|
expectTypesMatch(
|
|
17546
17621
|
true
|
|
17547
17622
|
);
|
|
17548
|
-
var constraintProps =
|
|
17623
|
+
var constraintProps = z72.union([
|
|
17549
17624
|
pcbXDistConstraintProps,
|
|
17550
17625
|
pcbYDistConstraintProps,
|
|
17551
17626
|
pcbSameYConstraintProps,
|
|
@@ -17554,13 +17629,13 @@ var constraintProps = z70.union([
|
|
|
17554
17629
|
expectTypesMatch(true);
|
|
17555
17630
|
|
|
17556
17631
|
// lib/components/cutout.ts
|
|
17557
|
-
import { z as
|
|
17632
|
+
import { z as z73 } from "zod";
|
|
17558
17633
|
var rectCutoutProps = pcbLayoutProps.omit({
|
|
17559
17634
|
layer: true,
|
|
17560
17635
|
pcbRotation: true
|
|
17561
17636
|
}).extend({
|
|
17562
|
-
name:
|
|
17563
|
-
shape:
|
|
17637
|
+
name: z73.string().optional(),
|
|
17638
|
+
shape: z73.literal("rect"),
|
|
17564
17639
|
width: distance,
|
|
17565
17640
|
height: distance
|
|
17566
17641
|
});
|
|
@@ -17569,8 +17644,8 @@ var circleCutoutProps = pcbLayoutProps.omit({
|
|
|
17569
17644
|
layer: true,
|
|
17570
17645
|
pcbRotation: true
|
|
17571
17646
|
}).extend({
|
|
17572
|
-
name:
|
|
17573
|
-
shape:
|
|
17647
|
+
name: z73.string().optional(),
|
|
17648
|
+
shape: z73.literal("circle"),
|
|
17574
17649
|
radius: distance
|
|
17575
17650
|
});
|
|
17576
17651
|
expectTypesMatch(true);
|
|
@@ -17578,36 +17653,36 @@ var polygonCutoutProps = pcbLayoutProps.omit({
|
|
|
17578
17653
|
layer: true,
|
|
17579
17654
|
pcbRotation: true
|
|
17580
17655
|
}).extend({
|
|
17581
|
-
name:
|
|
17582
|
-
shape:
|
|
17583
|
-
points:
|
|
17656
|
+
name: z73.string().optional(),
|
|
17657
|
+
shape: z73.literal("polygon"),
|
|
17658
|
+
points: z73.array(point)
|
|
17584
17659
|
});
|
|
17585
17660
|
expectTypesMatch(true);
|
|
17586
|
-
var cutoutProps =
|
|
17661
|
+
var cutoutProps = z73.discriminatedUnion("shape", [
|
|
17587
17662
|
rectCutoutProps,
|
|
17588
17663
|
circleCutoutProps,
|
|
17589
17664
|
polygonCutoutProps
|
|
17590
17665
|
]);
|
|
17591
17666
|
|
|
17592
17667
|
// lib/components/drc-check.ts
|
|
17593
|
-
import { z as
|
|
17594
|
-
var drcCheckProps =
|
|
17595
|
-
name:
|
|
17668
|
+
import { z as z74 } from "zod";
|
|
17669
|
+
var drcCheckProps = z74.object({
|
|
17670
|
+
name: z74.string().optional(),
|
|
17596
17671
|
checkFn: customDrcCheckFn
|
|
17597
17672
|
});
|
|
17598
17673
|
expectTypesMatch(true);
|
|
17599
17674
|
|
|
17600
17675
|
// lib/components/smtpad.ts
|
|
17601
|
-
import { z as
|
|
17676
|
+
import { z as z75 } from "zod";
|
|
17602
17677
|
var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17603
|
-
name:
|
|
17604
|
-
shape:
|
|
17678
|
+
name: z75.string().optional(),
|
|
17679
|
+
shape: z75.literal("rect"),
|
|
17605
17680
|
width: distance,
|
|
17606
17681
|
height: distance,
|
|
17607
17682
|
rectBorderRadius: distance.optional(),
|
|
17608
17683
|
cornerRadius: distance.optional(),
|
|
17609
17684
|
portHints: portHints.optional(),
|
|
17610
|
-
coveredWithSolderMask:
|
|
17685
|
+
coveredWithSolderMask: z75.boolean().optional(),
|
|
17611
17686
|
solderMaskMargin: distance.optional(),
|
|
17612
17687
|
solderMaskMarginLeft: distance.optional(),
|
|
17613
17688
|
solderMaskMarginRight: distance.optional(),
|
|
@@ -17617,14 +17692,14 @@ var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
17617
17692
|
});
|
|
17618
17693
|
expectTypesMatch(true);
|
|
17619
17694
|
var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17620
|
-
name:
|
|
17621
|
-
shape:
|
|
17695
|
+
name: z75.string().optional(),
|
|
17696
|
+
shape: z75.literal("rotated_rect"),
|
|
17622
17697
|
width: distance,
|
|
17623
17698
|
height: distance,
|
|
17624
|
-
ccwRotation:
|
|
17699
|
+
ccwRotation: z75.number(),
|
|
17625
17700
|
cornerRadius: distance.optional(),
|
|
17626
17701
|
portHints: portHints.optional(),
|
|
17627
|
-
coveredWithSolderMask:
|
|
17702
|
+
coveredWithSolderMask: z75.boolean().optional(),
|
|
17628
17703
|
solderMaskMargin: distance.optional(),
|
|
17629
17704
|
solderMaskMarginLeft: distance.optional(),
|
|
17630
17705
|
solderMaskMarginRight: distance.optional(),
|
|
@@ -17634,51 +17709,51 @@ var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
17634
17709
|
});
|
|
17635
17710
|
expectTypesMatch(true);
|
|
17636
17711
|
var circleSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17637
|
-
name:
|
|
17638
|
-
shape:
|
|
17712
|
+
name: z75.string().optional(),
|
|
17713
|
+
shape: z75.literal("circle"),
|
|
17639
17714
|
radius: distance,
|
|
17640
17715
|
portHints: portHints.optional(),
|
|
17641
|
-
coveredWithSolderMask:
|
|
17716
|
+
coveredWithSolderMask: z75.boolean().optional(),
|
|
17642
17717
|
solderMaskMargin: distance.optional(),
|
|
17643
17718
|
solderPasteMargin: distance.optional()
|
|
17644
17719
|
});
|
|
17645
17720
|
expectTypesMatch(true);
|
|
17646
17721
|
var pillSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17647
|
-
name:
|
|
17648
|
-
shape:
|
|
17722
|
+
name: z75.string().optional(),
|
|
17723
|
+
shape: z75.literal("pill"),
|
|
17649
17724
|
width: distance,
|
|
17650
17725
|
height: distance,
|
|
17651
17726
|
radius: distance,
|
|
17652
17727
|
portHints: portHints.optional(),
|
|
17653
|
-
coveredWithSolderMask:
|
|
17728
|
+
coveredWithSolderMask: z75.boolean().optional(),
|
|
17654
17729
|
solderMaskMargin: distance.optional(),
|
|
17655
17730
|
solderPasteMargin: distance.optional()
|
|
17656
17731
|
});
|
|
17657
17732
|
expectTypesMatch(true);
|
|
17658
17733
|
var rotatedPillSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17659
|
-
name:
|
|
17660
|
-
shape:
|
|
17734
|
+
name: z75.string().optional(),
|
|
17735
|
+
shape: z75.literal("rotated_pill"),
|
|
17661
17736
|
width: distance,
|
|
17662
17737
|
height: distance,
|
|
17663
17738
|
radius: distance,
|
|
17664
|
-
ccwRotation:
|
|
17739
|
+
ccwRotation: z75.number(),
|
|
17665
17740
|
portHints: portHints.optional(),
|
|
17666
|
-
coveredWithSolderMask:
|
|
17741
|
+
coveredWithSolderMask: z75.boolean().optional(),
|
|
17667
17742
|
solderMaskMargin: distance.optional(),
|
|
17668
17743
|
solderPasteMargin: distance.optional()
|
|
17669
17744
|
});
|
|
17670
17745
|
expectTypesMatch(true);
|
|
17671
17746
|
var polygonSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17672
|
-
name:
|
|
17673
|
-
shape:
|
|
17674
|
-
points:
|
|
17747
|
+
name: z75.string().optional(),
|
|
17748
|
+
shape: z75.literal("polygon"),
|
|
17749
|
+
points: z75.array(point),
|
|
17675
17750
|
portHints: portHints.optional(),
|
|
17676
|
-
coveredWithSolderMask:
|
|
17751
|
+
coveredWithSolderMask: z75.boolean().optional(),
|
|
17677
17752
|
solderMaskMargin: distance.optional(),
|
|
17678
17753
|
solderPasteMargin: distance.optional()
|
|
17679
17754
|
});
|
|
17680
17755
|
expectTypesMatch(true);
|
|
17681
|
-
var smtPadProps =
|
|
17756
|
+
var smtPadProps = z75.discriminatedUnion("shape", [
|
|
17682
17757
|
circleSmtPadProps,
|
|
17683
17758
|
rectSmtPadProps,
|
|
17684
17759
|
rotatedRectSmtPadProps,
|
|
@@ -17689,63 +17764,63 @@ var smtPadProps = z73.discriminatedUnion("shape", [
|
|
|
17689
17764
|
expectTypesMatch(true);
|
|
17690
17765
|
|
|
17691
17766
|
// lib/components/solderpaste.ts
|
|
17692
|
-
import { z as
|
|
17767
|
+
import { z as z76 } from "zod";
|
|
17693
17768
|
var rectSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17694
|
-
shape:
|
|
17769
|
+
shape: z76.literal("rect"),
|
|
17695
17770
|
width: distance,
|
|
17696
17771
|
height: distance
|
|
17697
17772
|
});
|
|
17698
17773
|
expectTypesMatch(true);
|
|
17699
17774
|
var circleSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17700
|
-
shape:
|
|
17775
|
+
shape: z76.literal("circle"),
|
|
17701
17776
|
radius: distance
|
|
17702
17777
|
});
|
|
17703
17778
|
expectTypesMatch(true);
|
|
17704
|
-
var solderPasteProps =
|
|
17779
|
+
var solderPasteProps = z76.union([
|
|
17705
17780
|
circleSolderPasteProps,
|
|
17706
17781
|
rectSolderPasteProps
|
|
17707
17782
|
]);
|
|
17708
17783
|
expectTypesMatch(true);
|
|
17709
17784
|
|
|
17710
17785
|
// lib/components/hole.ts
|
|
17711
|
-
import { z as
|
|
17786
|
+
import { z as z77 } from "zod";
|
|
17712
17787
|
var circleHoleProps = pcbLayoutProps.extend({
|
|
17713
|
-
name:
|
|
17714
|
-
shape:
|
|
17788
|
+
name: z77.string().optional(),
|
|
17789
|
+
shape: z77.literal("circle").optional(),
|
|
17715
17790
|
diameter: distance.optional(),
|
|
17716
17791
|
radius: distance.optional(),
|
|
17717
17792
|
solderMaskMargin: distance.optional(),
|
|
17718
|
-
coveredWithSolderMask:
|
|
17793
|
+
coveredWithSolderMask: z77.boolean().optional()
|
|
17719
17794
|
}).transform((d) => ({
|
|
17720
17795
|
...d,
|
|
17721
17796
|
diameter: d.diameter ?? 2 * d.radius,
|
|
17722
17797
|
radius: d.radius ?? d.diameter / 2
|
|
17723
17798
|
}));
|
|
17724
17799
|
var pillHoleProps = pcbLayoutProps.extend({
|
|
17725
|
-
name:
|
|
17726
|
-
shape:
|
|
17800
|
+
name: z77.string().optional(),
|
|
17801
|
+
shape: z77.literal("pill"),
|
|
17727
17802
|
width: distance,
|
|
17728
17803
|
height: distance,
|
|
17729
17804
|
solderMaskMargin: distance.optional(),
|
|
17730
|
-
coveredWithSolderMask:
|
|
17805
|
+
coveredWithSolderMask: z77.boolean().optional()
|
|
17731
17806
|
});
|
|
17732
17807
|
var ovalHoleProps = pcbLayoutProps.extend({
|
|
17733
|
-
name:
|
|
17734
|
-
shape:
|
|
17808
|
+
name: z77.string().optional(),
|
|
17809
|
+
shape: z77.literal("oval"),
|
|
17735
17810
|
width: distance,
|
|
17736
17811
|
height: distance,
|
|
17737
17812
|
solderMaskMargin: distance.optional(),
|
|
17738
|
-
coveredWithSolderMask:
|
|
17813
|
+
coveredWithSolderMask: z77.boolean().optional()
|
|
17739
17814
|
});
|
|
17740
17815
|
var rectHoleProps = pcbLayoutProps.extend({
|
|
17741
|
-
name:
|
|
17742
|
-
shape:
|
|
17816
|
+
name: z77.string().optional(),
|
|
17817
|
+
shape: z77.literal("rect"),
|
|
17743
17818
|
width: distance,
|
|
17744
17819
|
height: distance,
|
|
17745
17820
|
solderMaskMargin: distance.optional(),
|
|
17746
|
-
coveredWithSolderMask:
|
|
17821
|
+
coveredWithSolderMask: z77.boolean().optional()
|
|
17747
17822
|
});
|
|
17748
|
-
var holeProps =
|
|
17823
|
+
var holeProps = z77.union([
|
|
17749
17824
|
circleHoleProps,
|
|
17750
17825
|
pillHoleProps,
|
|
17751
17826
|
ovalHoleProps,
|
|
@@ -17754,7 +17829,7 @@ var holeProps = z75.union([
|
|
|
17754
17829
|
expectTypesMatch(true);
|
|
17755
17830
|
|
|
17756
17831
|
// lib/components/antenna.ts
|
|
17757
|
-
import { z as
|
|
17832
|
+
import { z as z78 } from "zod";
|
|
17758
17833
|
var antennaShapes = [
|
|
17759
17834
|
"2.4ghz_quarter_wave_monopole",
|
|
17760
17835
|
"2.4ghz_meandered_monopole",
|
|
@@ -17762,7 +17837,7 @@ var antennaShapes = [
|
|
|
17762
17837
|
"2.4ghz_meandered_inverted_f",
|
|
17763
17838
|
"2.4ghz_folded_dipole"
|
|
17764
17839
|
];
|
|
17765
|
-
var antennaShape =
|
|
17840
|
+
var antennaShape = z78.enum(antennaShapes);
|
|
17766
17841
|
var antennaFrequencyBands = [
|
|
17767
17842
|
"2.4ghz",
|
|
17768
17843
|
"5ghz",
|
|
@@ -17770,7 +17845,7 @@ var antennaFrequencyBands = [
|
|
|
17770
17845
|
"dual_band_2.4ghz_5ghz",
|
|
17771
17846
|
"tri_band_2.4ghz_5ghz_6ghz"
|
|
17772
17847
|
];
|
|
17773
|
-
var antennaFrequencyBand =
|
|
17848
|
+
var antennaFrequencyBand = z78.enum(antennaFrequencyBands);
|
|
17774
17849
|
var antennaProps = commonComponentProps.extend({
|
|
17775
17850
|
antennaShape: antennaShape.optional(),
|
|
17776
17851
|
frequencyBand: antennaFrequencyBand.optional(),
|
|
@@ -17780,39 +17855,39 @@ expectTypesMatch(true);
|
|
|
17780
17855
|
|
|
17781
17856
|
// lib/components/trace.ts
|
|
17782
17857
|
import { distance as distance19, route_hint_point as route_hint_point2 } from "circuit-json";
|
|
17783
|
-
import { z as
|
|
17784
|
-
var portRef =
|
|
17785
|
-
|
|
17786
|
-
|
|
17858
|
+
import { z as z79 } from "zod";
|
|
17859
|
+
var portRef = z79.union([
|
|
17860
|
+
z79.string(),
|
|
17861
|
+
z79.custom(
|
|
17787
17862
|
(v) => typeof v === "object" && v !== null && "getPortSelector" in v && typeof v.getPortSelector === "function"
|
|
17788
17863
|
)
|
|
17789
17864
|
]);
|
|
17790
|
-
var baseTraceProps =
|
|
17791
|
-
key:
|
|
17792
|
-
name:
|
|
17793
|
-
displayName:
|
|
17865
|
+
var baseTraceProps = z79.object({
|
|
17866
|
+
key: z79.string().optional(),
|
|
17867
|
+
name: z79.string().optional(),
|
|
17868
|
+
displayName: z79.string().optional(),
|
|
17794
17869
|
thickness: distance19.optional(),
|
|
17795
17870
|
width: distance19.optional().describe("Alias for trace thickness"),
|
|
17796
|
-
schematicRouteHints:
|
|
17797
|
-
pcbRouteHints:
|
|
17798
|
-
pcbTeardrops:
|
|
17799
|
-
pcbTeardropStart:
|
|
17800
|
-
pcbTeardropEnd:
|
|
17801
|
-
pcbPathRelativeTo:
|
|
17871
|
+
schematicRouteHints: z79.array(point).optional(),
|
|
17872
|
+
pcbRouteHints: z79.array(route_hint_point2).optional(),
|
|
17873
|
+
pcbTeardrops: z79.boolean().optional().describe("Enable PCB trace teardrops."),
|
|
17874
|
+
pcbTeardropStart: z79.boolean().optional().describe("Teardrop at the start (from) of trace"),
|
|
17875
|
+
pcbTeardropEnd: z79.boolean().optional().describe("Teardrop at the end (to) of trace"),
|
|
17876
|
+
pcbPathRelativeTo: z79.string().optional(),
|
|
17802
17877
|
pcbPath: pcbPath.optional(),
|
|
17803
|
-
pcbPaths:
|
|
17804
|
-
routingPhaseIndex:
|
|
17805
|
-
pcbStraightLine:
|
|
17806
|
-
schDisplayLabel:
|
|
17807
|
-
schStroke:
|
|
17808
|
-
highlightColor:
|
|
17878
|
+
pcbPaths: z79.array(pcbPath).optional(),
|
|
17879
|
+
routingPhaseIndex: z79.number().nullable().optional(),
|
|
17880
|
+
pcbStraightLine: z79.boolean().optional().describe("Draw a straight pcb trace between the connected points"),
|
|
17881
|
+
schDisplayLabel: z79.string().optional(),
|
|
17882
|
+
schStroke: z79.string().optional(),
|
|
17883
|
+
highlightColor: z79.string().optional(),
|
|
17809
17884
|
maxLength: distance19.optional(),
|
|
17810
|
-
maxViaCount:
|
|
17811
|
-
connectsTo:
|
|
17885
|
+
maxViaCount: z79.number().int().nonnegative().optional().describe("Maximum number of vias allowed in the PCB trace route"),
|
|
17886
|
+
connectsTo: z79.string().or(z79.array(z79.string())).optional()
|
|
17812
17887
|
});
|
|
17813
|
-
var traceProps =
|
|
17888
|
+
var traceProps = z79.union([
|
|
17814
17889
|
baseTraceProps.extend({
|
|
17815
|
-
path:
|
|
17890
|
+
path: z79.array(portRef)
|
|
17816
17891
|
}),
|
|
17817
17892
|
baseTraceProps.extend({
|
|
17818
17893
|
from: portRef,
|
|
@@ -17830,31 +17905,31 @@ import {
|
|
|
17830
17905
|
layer_ref as layer_ref7,
|
|
17831
17906
|
resistance as resistance3
|
|
17832
17907
|
} from "circuit-json";
|
|
17833
|
-
import { z as
|
|
17834
|
-
var busProps =
|
|
17835
|
-
name:
|
|
17836
|
-
connections:
|
|
17837
|
-
routingPhaseIndex:
|
|
17838
|
-
maxLengthSkew: distance20.pipe(
|
|
17839
|
-
targetImpedance: resistance3.pipe(
|
|
17840
|
-
pcbTraceWidth: distance20.pipe(
|
|
17841
|
-
pcbAllowedLayers:
|
|
17908
|
+
import { z as z80 } from "zod";
|
|
17909
|
+
var busProps = z80.object({
|
|
17910
|
+
name: z80.string().optional(),
|
|
17911
|
+
connections: z80.array(z80.string()).min(1),
|
|
17912
|
+
routingPhaseIndex: z80.number().nullable().optional(),
|
|
17913
|
+
maxLengthSkew: distance20.pipe(z80.number().min(0).finite()).optional(),
|
|
17914
|
+
targetImpedance: resistance3.pipe(z80.number().positive().finite()).optional(),
|
|
17915
|
+
pcbTraceWidth: distance20.pipe(z80.number().positive().finite()).optional(),
|
|
17916
|
+
pcbAllowedLayers: z80.array(layer_ref7).min(1).optional(),
|
|
17842
17917
|
preferredLayer: layer_ref7.optional(),
|
|
17843
|
-
preferredLayers:
|
|
17918
|
+
preferredLayers: z80.array(layer_ref7).min(1).optional()
|
|
17844
17919
|
});
|
|
17845
17920
|
expectTypesMatch(true);
|
|
17846
17921
|
|
|
17847
17922
|
// lib/components/differentialpair.ts
|
|
17848
17923
|
import { distance as distance21, resistance as resistance4 } from "circuit-json";
|
|
17849
|
-
import { z as
|
|
17850
|
-
var differentialPairProps =
|
|
17851
|
-
name:
|
|
17852
|
-
positiveConnection:
|
|
17853
|
-
negativeConnection:
|
|
17854
|
-
maxLengthSkew: distance21.pipe(
|
|
17855
|
-
targetDifferentialImpedance: resistance4.pipe(
|
|
17856
|
-
pcbTraceGap: distance21.pipe(
|
|
17857
|
-
maxUncoupledLength: distance21.pipe(
|
|
17924
|
+
import { z as z81 } from "zod";
|
|
17925
|
+
var differentialPairProps = z81.object({
|
|
17926
|
+
name: z81.string().optional(),
|
|
17927
|
+
positiveConnection: z81.string(),
|
|
17928
|
+
negativeConnection: z81.string(),
|
|
17929
|
+
maxLengthSkew: distance21.pipe(z81.number().min(0).finite()).optional(),
|
|
17930
|
+
targetDifferentialImpedance: resistance4.pipe(z81.number().positive().finite()).optional(),
|
|
17931
|
+
pcbTraceGap: distance21.pipe(z81.number().positive().finite()).optional(),
|
|
17932
|
+
maxUncoupledLength: distance21.pipe(z81.number().min(0).finite()).optional()
|
|
17858
17933
|
});
|
|
17859
17934
|
expectTypesMatch(true);
|
|
17860
17935
|
|
|
@@ -17862,8 +17937,8 @@ expectTypesMatch(true);
|
|
|
17862
17937
|
import {
|
|
17863
17938
|
layer_ref as layer_ref8
|
|
17864
17939
|
} from "circuit-json";
|
|
17865
|
-
import { z as
|
|
17866
|
-
var footprintInsertionDirection =
|
|
17940
|
+
import { z as z82 } from "zod";
|
|
17941
|
+
var footprintInsertionDirection = z82.enum([
|
|
17867
17942
|
"from_left",
|
|
17868
17943
|
"from_right",
|
|
17869
17944
|
"from_top",
|
|
@@ -17881,11 +17956,11 @@ var footprintInsertionDirection = z80.enum([
|
|
|
17881
17956
|
"from_back"
|
|
17882
17957
|
]);
|
|
17883
17958
|
expectTypesMatch(true);
|
|
17884
|
-
var footprintProps =
|
|
17885
|
-
children:
|
|
17886
|
-
name:
|
|
17959
|
+
var footprintProps = z82.object({
|
|
17960
|
+
children: z82.any().optional(),
|
|
17961
|
+
name: z82.string().optional(),
|
|
17887
17962
|
originalLayer: layer_ref8.default("top").optional(),
|
|
17888
|
-
circuitJson:
|
|
17963
|
+
circuitJson: z82.array(z82.any()).optional(),
|
|
17889
17964
|
src: footprintProp.describe("Can be a footprint or kicad string").optional(),
|
|
17890
17965
|
insertionDirection: footprintInsertionDirection.optional().describe(
|
|
17891
17966
|
"Direction a cable or mating part is attached from, named for the side of the footprint it approaches from, in its unrotated orientation."
|
|
@@ -17897,19 +17972,19 @@ var footprintProps = z80.object({
|
|
|
17897
17972
|
expectTypesMatch(true);
|
|
17898
17973
|
|
|
17899
17974
|
// lib/components/symbol.ts
|
|
17900
|
-
import { z as
|
|
17901
|
-
var symbolProps =
|
|
17902
|
-
originalFacingDirection:
|
|
17975
|
+
import { z as z83 } from "zod";
|
|
17976
|
+
var symbolProps = z83.object({
|
|
17977
|
+
originalFacingDirection: z83.enum(["up", "down", "left", "right"]).default("right").optional(),
|
|
17903
17978
|
width: distance.optional(),
|
|
17904
17979
|
height: distance.optional(),
|
|
17905
|
-
name:
|
|
17980
|
+
name: z83.string().optional()
|
|
17906
17981
|
});
|
|
17907
17982
|
expectTypesMatch(true);
|
|
17908
17983
|
|
|
17909
17984
|
// lib/components/battery.ts
|
|
17910
17985
|
import { voltage as voltage2 } from "circuit-json";
|
|
17911
|
-
import { z as
|
|
17912
|
-
var capacity =
|
|
17986
|
+
import { z as z84 } from "zod";
|
|
17987
|
+
var capacity = z84.number().or(z84.string().endsWith("mAh")).transform((v) => {
|
|
17913
17988
|
if (typeof v === "string") {
|
|
17914
17989
|
const valString = v.replace("mAh", "");
|
|
17915
17990
|
const num = Number.parseFloat(valString);
|
|
@@ -17924,14 +17999,14 @@ var batteryPins = lrPolarPins;
|
|
|
17924
17999
|
var batteryProps = commonComponentProps.extend({
|
|
17925
18000
|
capacity: capacity.optional(),
|
|
17926
18001
|
voltage: voltage2.optional(),
|
|
17927
|
-
standard:
|
|
18002
|
+
standard: z84.enum(["AA", "AAA", "9V", "CR2032", "18650", "C"]).optional(),
|
|
17928
18003
|
schOrientation: schematicOrientation.optional(),
|
|
17929
18004
|
connections: createConnectionsProp(batteryPins).optional()
|
|
17930
18005
|
});
|
|
17931
18006
|
expectTypesMatch(true);
|
|
17932
18007
|
|
|
17933
18008
|
// lib/components/mountedboard.ts
|
|
17934
|
-
import { z as
|
|
18009
|
+
import { z as z85 } from "zod";
|
|
17935
18010
|
var mountedboardProps = subcircuitGroupProps.extend({
|
|
17936
18011
|
manufacturerPartNumber: chipProps.shape.manufacturerPartNumber,
|
|
17937
18012
|
pinLabels: chipProps.shape.pinLabels,
|
|
@@ -17943,7 +18018,7 @@ var mountedboardProps = subcircuitGroupProps.extend({
|
|
|
17943
18018
|
internallyConnectedPins: chipProps.shape.internallyConnectedPins,
|
|
17944
18019
|
externallyConnectedPins: chipProps.shape.externallyConnectedPins,
|
|
17945
18020
|
boardToBoardDistance: distance.optional(),
|
|
17946
|
-
mountOrientation:
|
|
18021
|
+
mountOrientation: z85.enum(["faceDown", "faceUp"]).optional()
|
|
17947
18022
|
});
|
|
17948
18023
|
expectTypesMatch(true);
|
|
17949
18024
|
|
|
@@ -17951,40 +18026,40 @@ expectTypesMatch(true);
|
|
|
17951
18026
|
import { distance as distance22 } from "circuit-json";
|
|
17952
18027
|
|
|
17953
18028
|
// lib/common/pcbOrientation.ts
|
|
17954
|
-
import { z as
|
|
17955
|
-
var pcbOrientation =
|
|
18029
|
+
import { z as z86 } from "zod";
|
|
18030
|
+
var pcbOrientation = z86.enum(["vertical", "horizontal"]).describe(
|
|
17956
18031
|
"vertical means pins go 1->2 downward and horizontal means pins go 1->2 rightward"
|
|
17957
18032
|
);
|
|
17958
18033
|
expectTypesMatch(true);
|
|
17959
18034
|
|
|
17960
18035
|
// lib/components/pin-header.ts
|
|
17961
|
-
import { z as
|
|
18036
|
+
import { z as z87 } from "zod";
|
|
17962
18037
|
var pinHeaderProps = commonComponentProps.extend({
|
|
17963
|
-
pinCount:
|
|
18038
|
+
pinCount: z87.number(),
|
|
17964
18039
|
pitch: distance22.optional(),
|
|
17965
|
-
schFacingDirection:
|
|
17966
|
-
gender:
|
|
17967
|
-
showSilkscreenPinLabels:
|
|
17968
|
-
pcbPinLabels:
|
|
17969
|
-
doubleRow:
|
|
17970
|
-
rightAngle:
|
|
18040
|
+
schFacingDirection: z87.enum(["up", "down", "left", "right"]).optional(),
|
|
18041
|
+
gender: z87.enum(["male", "female", "unpopulated"]).optional().default("male"),
|
|
18042
|
+
showSilkscreenPinLabels: z87.boolean().optional(),
|
|
18043
|
+
pcbPinLabels: z87.record(z87.string(), z87.string()).optional(),
|
|
18044
|
+
doubleRow: z87.boolean().optional(),
|
|
18045
|
+
rightAngle: z87.boolean().optional(),
|
|
17971
18046
|
pcbOrientation: pcbOrientation.optional(),
|
|
17972
18047
|
holeDiameter: distance22.optional(),
|
|
17973
18048
|
platedDiameter: distance22.optional(),
|
|
17974
|
-
pinLabels:
|
|
17975
|
-
connections:
|
|
17976
|
-
facingDirection:
|
|
18049
|
+
pinLabels: z87.record(z87.string(), schematicPinLabel).or(z87.array(schematicPinLabel)).optional(),
|
|
18050
|
+
connections: z87.custom().pipe(z87.record(z87.string(), connectionTarget)).optional(),
|
|
18051
|
+
facingDirection: z87.enum(["left", "right"]).optional(),
|
|
17977
18052
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
17978
18053
|
schPinStyle: schematicPinStyle.optional(),
|
|
17979
18054
|
schPinSpacing: distance22.optional(),
|
|
17980
18055
|
schWidth: distance22.optional(),
|
|
17981
18056
|
schHeight: distance22.optional(),
|
|
17982
|
-
connectsFromAbove:
|
|
17983
|
-
connectsFromBelow:
|
|
18057
|
+
connectsFromAbove: z87.boolean().optional(),
|
|
18058
|
+
connectsFromBelow: z87.boolean().optional()
|
|
17984
18059
|
}).superRefine((props, ctx) => {
|
|
17985
18060
|
if (props.connectsFromAbove && props.connectsFromBelow) {
|
|
17986
18061
|
ctx.addIssue({
|
|
17987
|
-
code:
|
|
18062
|
+
code: z87.ZodIssueCode.custom,
|
|
17988
18063
|
message: "connectsFromAbove and connectsFromBelow are opposites; set at most one"
|
|
17989
18064
|
});
|
|
17990
18065
|
}
|
|
@@ -17995,30 +18070,30 @@ var pinHeaderProps = commonComponentProps.extend({
|
|
|
17995
18070
|
expectTypesMatch(true);
|
|
17996
18071
|
|
|
17997
18072
|
// lib/components/netalias.ts
|
|
17998
|
-
import { z as
|
|
18073
|
+
import { z as z88 } from "zod";
|
|
17999
18074
|
import { rotation as rotation4 } from "circuit-json";
|
|
18000
|
-
var netAliasProps =
|
|
18001
|
-
net:
|
|
18002
|
-
connection:
|
|
18075
|
+
var netAliasProps = z88.object({
|
|
18076
|
+
net: z88.string().optional(),
|
|
18077
|
+
connection: z88.string().optional(),
|
|
18003
18078
|
schX: distance.optional(),
|
|
18004
18079
|
schY: distance.optional(),
|
|
18005
18080
|
schRotation: rotation4.optional(),
|
|
18006
|
-
anchorSide:
|
|
18081
|
+
anchorSide: z88.enum(["left", "top", "right", "bottom"]).optional()
|
|
18007
18082
|
});
|
|
18008
18083
|
expectTypesMatch(true);
|
|
18009
18084
|
|
|
18010
18085
|
// lib/components/netlabel.ts
|
|
18011
|
-
import { z as
|
|
18086
|
+
import { z as z89 } from "zod";
|
|
18012
18087
|
import { rotation as rotation5 } from "circuit-json";
|
|
18013
|
-
var netLabelProps =
|
|
18014
|
-
net:
|
|
18015
|
-
connection:
|
|
18016
|
-
connectsTo:
|
|
18017
|
-
inline:
|
|
18088
|
+
var netLabelProps = z89.object({
|
|
18089
|
+
net: z89.string().optional(),
|
|
18090
|
+
connection: z89.string().optional(),
|
|
18091
|
+
connectsTo: z89.string().or(z89.array(z89.string())).optional(),
|
|
18092
|
+
inline: z89.boolean().optional(),
|
|
18018
18093
|
schX: distance.optional(),
|
|
18019
18094
|
schY: distance.optional(),
|
|
18020
18095
|
schRotation: rotation5.optional(),
|
|
18021
|
-
anchorSide:
|
|
18096
|
+
anchorSide: z89.enum(["left", "top", "right", "bottom"]).optional()
|
|
18022
18097
|
});
|
|
18023
18098
|
expectTypesMatch(true);
|
|
18024
18099
|
|
|
@@ -18033,32 +18108,32 @@ expectTypesMatch(true);
|
|
|
18033
18108
|
|
|
18034
18109
|
// lib/components/analogsimulation.ts
|
|
18035
18110
|
import { ms } from "circuit-json";
|
|
18036
|
-
import { z as
|
|
18037
|
-
var spiceEngine =
|
|
18111
|
+
import { z as z91 } from "zod";
|
|
18112
|
+
var spiceEngine = z91.custom(
|
|
18038
18113
|
(value) => typeof value === "string"
|
|
18039
18114
|
);
|
|
18040
|
-
var spiceOptions =
|
|
18041
|
-
method:
|
|
18042
|
-
reltol:
|
|
18043
|
-
abstol:
|
|
18044
|
-
vntol:
|
|
18115
|
+
var spiceOptions = z91.object({
|
|
18116
|
+
method: z91.enum(["trap", "gear"]).optional(),
|
|
18117
|
+
reltol: z91.union([z91.number(), z91.string()]).optional(),
|
|
18118
|
+
abstol: z91.union([z91.number(), z91.string()]).optional(),
|
|
18119
|
+
vntol: z91.union([z91.number(), z91.string()]).optional()
|
|
18045
18120
|
});
|
|
18046
18121
|
var analogAnalysisSimulationBaseProps = {
|
|
18047
|
-
name:
|
|
18122
|
+
name: z91.string().optional(),
|
|
18048
18123
|
spiceEngine: spiceEngine.optional(),
|
|
18049
18124
|
spiceOptions: spiceOptions.optional(),
|
|
18050
|
-
graphIndependentAxes:
|
|
18051
|
-
children:
|
|
18125
|
+
graphIndependentAxes: z91.boolean().optional(),
|
|
18126
|
+
children: z91.custom().optional()
|
|
18052
18127
|
};
|
|
18053
|
-
var analogSimulationProps =
|
|
18054
|
-
name:
|
|
18055
|
-
simulationType:
|
|
18128
|
+
var analogSimulationProps = z91.object({
|
|
18129
|
+
name: z91.string().optional(),
|
|
18130
|
+
simulationType: z91.literal("spice_transient_analysis").default("spice_transient_analysis"),
|
|
18056
18131
|
duration: ms.optional(),
|
|
18057
18132
|
startTime: ms.optional(),
|
|
18058
18133
|
timePerStep: ms.optional(),
|
|
18059
18134
|
spiceEngine: spiceEngine.optional(),
|
|
18060
18135
|
spiceOptions: spiceOptions.optional(),
|
|
18061
|
-
graphIndependentAxes:
|
|
18136
|
+
graphIndependentAxes: z91.boolean().optional()
|
|
18062
18137
|
});
|
|
18063
18138
|
expectTypesMatch(
|
|
18064
18139
|
true
|
|
@@ -18066,12 +18141,12 @@ expectTypesMatch(
|
|
|
18066
18141
|
|
|
18067
18142
|
// lib/components/analogtransientsimulation.ts
|
|
18068
18143
|
import { ms as ms2 } from "circuit-json";
|
|
18069
|
-
import { z as
|
|
18144
|
+
import { z as z92 } from "zod";
|
|
18070
18145
|
var positiveMilliseconds = ms2.refine(
|
|
18071
18146
|
(milliseconds) => milliseconds > 0,
|
|
18072
18147
|
"Time must be positive"
|
|
18073
18148
|
);
|
|
18074
|
-
var analogTransientSimulationProps =
|
|
18149
|
+
var analogTransientSimulationProps = z92.object({
|
|
18075
18150
|
...analogAnalysisSimulationBaseProps,
|
|
18076
18151
|
duration: positiveMilliseconds.default("10ms"),
|
|
18077
18152
|
startTime: ms2.default("0ms"),
|
|
@@ -18079,7 +18154,7 @@ var analogTransientSimulationProps = z90.object({
|
|
|
18079
18154
|
}).superRefine((simulation, context) => {
|
|
18080
18155
|
if (simulation.startTime < 0 || simulation.startTime > simulation.duration) {
|
|
18081
18156
|
context.addIssue({
|
|
18082
|
-
code:
|
|
18157
|
+
code: z92.ZodIssueCode.custom,
|
|
18083
18158
|
path: ["startTime"],
|
|
18084
18159
|
message: "startTime must be between zero and duration"
|
|
18085
18160
|
});
|
|
@@ -18088,19 +18163,19 @@ var analogTransientSimulationProps = z90.object({
|
|
|
18088
18163
|
expectTypesMatch(true);
|
|
18089
18164
|
|
|
18090
18165
|
// lib/components/analogdcoperatingpointsimulation.ts
|
|
18091
|
-
import { z as
|
|
18092
|
-
var analogDcOperatingPointSimulationProps =
|
|
18166
|
+
import { z as z93 } from "zod";
|
|
18167
|
+
var analogDcOperatingPointSimulationProps = z93.object({
|
|
18093
18168
|
...analogAnalysisSimulationBaseProps
|
|
18094
18169
|
});
|
|
18095
18170
|
expectTypesMatch(true);
|
|
18096
18171
|
|
|
18097
18172
|
// lib/components/analogdcsweepsimulation.ts
|
|
18098
18173
|
import { current, voltage as voltage3 } from "circuit-json";
|
|
18099
|
-
import { z as
|
|
18100
|
-
var dcSweepQuantity =
|
|
18101
|
-
var analogDcSweepSimulationProps =
|
|
18174
|
+
import { z as z94 } from "zod";
|
|
18175
|
+
var dcSweepQuantity = z94.union([voltage3, current]);
|
|
18176
|
+
var analogDcSweepSimulationProps = z94.object({
|
|
18102
18177
|
...analogAnalysisSimulationBaseProps,
|
|
18103
|
-
sweepSource:
|
|
18178
|
+
sweepSource: z94.string().min(1),
|
|
18104
18179
|
sweepStart: dcSweepQuantity,
|
|
18105
18180
|
sweepStop: dcSweepQuantity,
|
|
18106
18181
|
sweepStep: dcSweepQuantity.refine(
|
|
@@ -18110,7 +18185,7 @@ var analogDcSweepSimulationProps = z92.object({
|
|
|
18110
18185
|
}).superRefine((simulation, context) => {
|
|
18111
18186
|
if (Math.sign(simulation.sweepStop - simulation.sweepStart) !== Math.sign(simulation.sweepStep)) {
|
|
18112
18187
|
context.addIssue({
|
|
18113
|
-
code:
|
|
18188
|
+
code: z94.ZodIssueCode.custom,
|
|
18114
18189
|
path: ["sweepStep"],
|
|
18115
18190
|
message: "sweepStep must move from sweepStart toward sweepStop"
|
|
18116
18191
|
});
|
|
@@ -18120,10 +18195,10 @@ expectTypesMatch(true);
|
|
|
18120
18195
|
|
|
18121
18196
|
// lib/components/analogacsweepsimulation.ts
|
|
18122
18197
|
import { frequency as frequency3 } from "circuit-json";
|
|
18123
|
-
import { z as
|
|
18124
|
-
var analogAcSweepSimulationProps =
|
|
18198
|
+
import { z as z95 } from "zod";
|
|
18199
|
+
var analogAcSweepSimulationProps = z95.object({
|
|
18125
18200
|
...analogAnalysisSimulationBaseProps,
|
|
18126
|
-
sweepType:
|
|
18201
|
+
sweepType: z95.enum(["linear", "decade", "octave"]),
|
|
18127
18202
|
startFrequency: frequency3.refine(
|
|
18128
18203
|
(startFrequencyHz) => startFrequencyHz > 0,
|
|
18129
18204
|
"startFrequency must be positive"
|
|
@@ -18132,12 +18207,12 @@ var analogAcSweepSimulationProps = z93.object({
|
|
|
18132
18207
|
(stopFrequencyHz) => stopFrequencyHz > 0,
|
|
18133
18208
|
"stopFrequency must be positive"
|
|
18134
18209
|
),
|
|
18135
|
-
samplesPerInterval:
|
|
18136
|
-
sampleCount:
|
|
18210
|
+
samplesPerInterval: z95.number().int().positive().optional(),
|
|
18211
|
+
sampleCount: z95.number().int().positive().optional()
|
|
18137
18212
|
}).superRefine((simulation, context) => {
|
|
18138
18213
|
if (simulation.stopFrequency <= simulation.startFrequency) {
|
|
18139
18214
|
context.addIssue({
|
|
18140
|
-
code:
|
|
18215
|
+
code: z95.ZodIssueCode.custom,
|
|
18141
18216
|
path: ["stopFrequency"],
|
|
18142
18217
|
message: "stopFrequency must be greater than startFrequency"
|
|
18143
18218
|
});
|
|
@@ -18145,14 +18220,14 @@ var analogAcSweepSimulationProps = z93.object({
|
|
|
18145
18220
|
if (simulation.sweepType === "linear") {
|
|
18146
18221
|
if (simulation.sampleCount === void 0) {
|
|
18147
18222
|
context.addIssue({
|
|
18148
|
-
code:
|
|
18223
|
+
code: z95.ZodIssueCode.custom,
|
|
18149
18224
|
path: ["sampleCount"],
|
|
18150
18225
|
message: "sampleCount is required for a linear AC sweep"
|
|
18151
18226
|
});
|
|
18152
18227
|
}
|
|
18153
18228
|
if (simulation.samplesPerInterval !== void 0) {
|
|
18154
18229
|
context.addIssue({
|
|
18155
|
-
code:
|
|
18230
|
+
code: z95.ZodIssueCode.custom,
|
|
18156
18231
|
path: ["samplesPerInterval"],
|
|
18157
18232
|
message: "samplesPerInterval is only valid for decade or octave sweeps"
|
|
18158
18233
|
});
|
|
@@ -18161,14 +18236,14 @@ var analogAcSweepSimulationProps = z93.object({
|
|
|
18161
18236
|
}
|
|
18162
18237
|
if (simulation.samplesPerInterval === void 0) {
|
|
18163
18238
|
context.addIssue({
|
|
18164
|
-
code:
|
|
18239
|
+
code: z95.ZodIssueCode.custom,
|
|
18165
18240
|
path: ["samplesPerInterval"],
|
|
18166
18241
|
message: "samplesPerInterval is required for decade or octave sweeps"
|
|
18167
18242
|
});
|
|
18168
18243
|
}
|
|
18169
18244
|
if (simulation.sampleCount !== void 0) {
|
|
18170
18245
|
context.addIssue({
|
|
18171
|
-
code:
|
|
18246
|
+
code: z95.ZodIssueCode.custom,
|
|
18172
18247
|
path: ["sampleCount"],
|
|
18173
18248
|
message: "sampleCount is only valid for a linear sweep"
|
|
18174
18249
|
});
|
|
@@ -18184,43 +18259,43 @@ import {
|
|
|
18184
18259
|
resistance as resistance5,
|
|
18185
18260
|
voltage as voltage4
|
|
18186
18261
|
} from "circuit-json";
|
|
18187
|
-
import { z as
|
|
18188
|
-
var resistanceSweepQuantity = resistance5.pipe(
|
|
18189
|
-
var capacitanceSweepQuantity = capacitance4.pipe(
|
|
18190
|
-
var inductanceSweepQuantity = inductance.pipe(
|
|
18191
|
-
var voltageSweepQuantity = voltage4.pipe(
|
|
18192
|
-
var currentSweepQuantity = current2.pipe(
|
|
18262
|
+
import { z as z96 } from "zod";
|
|
18263
|
+
var resistanceSweepQuantity = resistance5.pipe(z96.number());
|
|
18264
|
+
var capacitanceSweepQuantity = capacitance4.pipe(z96.number());
|
|
18265
|
+
var inductanceSweepQuantity = inductance.pipe(z96.number());
|
|
18266
|
+
var voltageSweepQuantity = voltage4.pipe(z96.number());
|
|
18267
|
+
var currentSweepQuantity = current2.pipe(z96.number());
|
|
18193
18268
|
var createAnalogSweepCoordinateProps = (sweepQuantity) => ({
|
|
18194
|
-
name:
|
|
18195
|
-
values:
|
|
18269
|
+
name: z96.string().optional(),
|
|
18270
|
+
values: z96.array(sweepQuantity).min(1).optional(),
|
|
18196
18271
|
start: sweepQuantity.optional(),
|
|
18197
18272
|
stop: sweepQuantity.optional(),
|
|
18198
18273
|
step: sweepQuantity.optional()
|
|
18199
18274
|
});
|
|
18200
|
-
var analogResistanceSweepParameterProps =
|
|
18275
|
+
var analogResistanceSweepParameterProps = z96.object({
|
|
18201
18276
|
...createAnalogSweepCoordinateProps(resistanceSweepQuantity),
|
|
18202
|
-
parameterType:
|
|
18203
|
-
resistorRef:
|
|
18277
|
+
parameterType: z96.literal("resistance"),
|
|
18278
|
+
resistorRef: z96.string().min(1)
|
|
18204
18279
|
}).strict();
|
|
18205
|
-
var analogCapacitanceSweepParameterProps =
|
|
18280
|
+
var analogCapacitanceSweepParameterProps = z96.object({
|
|
18206
18281
|
...createAnalogSweepCoordinateProps(capacitanceSweepQuantity),
|
|
18207
|
-
parameterType:
|
|
18208
|
-
capacitorRef:
|
|
18282
|
+
parameterType: z96.literal("capacitance"),
|
|
18283
|
+
capacitorRef: z96.string().min(1)
|
|
18209
18284
|
}).strict();
|
|
18210
|
-
var analogInductanceSweepParameterProps =
|
|
18285
|
+
var analogInductanceSweepParameterProps = z96.object({
|
|
18211
18286
|
...createAnalogSweepCoordinateProps(inductanceSweepQuantity),
|
|
18212
|
-
parameterType:
|
|
18213
|
-
inductorRef:
|
|
18287
|
+
parameterType: z96.literal("inductance"),
|
|
18288
|
+
inductorRef: z96.string().min(1)
|
|
18214
18289
|
}).strict();
|
|
18215
|
-
var analogVoltageSweepParameterProps =
|
|
18290
|
+
var analogVoltageSweepParameterProps = z96.object({
|
|
18216
18291
|
...createAnalogSweepCoordinateProps(voltageSweepQuantity),
|
|
18217
|
-
parameterType:
|
|
18218
|
-
net:
|
|
18292
|
+
parameterType: z96.literal("voltage"),
|
|
18293
|
+
net: z96.string().min(1)
|
|
18219
18294
|
}).strict();
|
|
18220
|
-
var analogCurrentSweepParameterProps =
|
|
18295
|
+
var analogCurrentSweepParameterProps = z96.object({
|
|
18221
18296
|
...createAnalogSweepCoordinateProps(currentSweepQuantity),
|
|
18222
|
-
parameterType:
|
|
18223
|
-
currentSourceRef:
|
|
18297
|
+
parameterType: z96.literal("current"),
|
|
18298
|
+
currentSourceRef: z96.string().min(1)
|
|
18224
18299
|
}).strict();
|
|
18225
18300
|
var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
|
|
18226
18301
|
const hasExplicitSweepCoordinates = sweepCoordinates.values !== void 0;
|
|
@@ -18232,34 +18307,34 @@ var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
|
|
|
18232
18307
|
const hasRangeCoordinates = rangeCoordinateCount > 0;
|
|
18233
18308
|
if (hasExplicitSweepCoordinates === hasRangeCoordinates) {
|
|
18234
18309
|
context.addIssue({
|
|
18235
|
-
code:
|
|
18310
|
+
code: z96.ZodIssueCode.custom,
|
|
18236
18311
|
message: "Provide either values or start/stop/step"
|
|
18237
18312
|
});
|
|
18238
18313
|
return;
|
|
18239
18314
|
}
|
|
18240
18315
|
if (rangeCoordinateCount !== 0 && rangeCoordinateCount !== 3) {
|
|
18241
18316
|
context.addIssue({
|
|
18242
|
-
code:
|
|
18317
|
+
code: z96.ZodIssueCode.custom,
|
|
18243
18318
|
message: "start, stop, and step must be provided together"
|
|
18244
18319
|
});
|
|
18245
18320
|
return;
|
|
18246
18321
|
}
|
|
18247
18322
|
if (sweepCoordinates.step === 0) {
|
|
18248
18323
|
context.addIssue({
|
|
18249
|
-
code:
|
|
18324
|
+
code: z96.ZodIssueCode.custom,
|
|
18250
18325
|
path: ["step"],
|
|
18251
18326
|
message: "step must be nonzero"
|
|
18252
18327
|
});
|
|
18253
18328
|
}
|
|
18254
18329
|
if (sweepCoordinates.start !== void 0 && sweepCoordinates.stop !== void 0 && sweepCoordinates.step !== void 0 && Math.sign(sweepCoordinates.stop - sweepCoordinates.start) !== Math.sign(sweepCoordinates.step)) {
|
|
18255
18330
|
context.addIssue({
|
|
18256
|
-
code:
|
|
18331
|
+
code: z96.ZodIssueCode.custom,
|
|
18257
18332
|
path: ["step"],
|
|
18258
18333
|
message: "step must move from start toward stop"
|
|
18259
18334
|
});
|
|
18260
18335
|
}
|
|
18261
18336
|
};
|
|
18262
|
-
var analogSweepParameterProps =
|
|
18337
|
+
var analogSweepParameterProps = z96.discriminatedUnion("parameterType", [
|
|
18263
18338
|
analogResistanceSweepParameterProps,
|
|
18264
18339
|
analogCapacitanceSweepParameterProps,
|
|
18265
18340
|
analogInductanceSweepParameterProps,
|
|
@@ -18274,26 +18349,26 @@ expectTypesMatch(true);
|
|
|
18274
18349
|
expectTypesMatch(true);
|
|
18275
18350
|
|
|
18276
18351
|
// lib/components/autoroutingphase.ts
|
|
18277
|
-
import { z as
|
|
18278
|
-
var autoroutingPhaseProps =
|
|
18279
|
-
key:
|
|
18280
|
-
name:
|
|
18352
|
+
import { z as z97 } from "zod";
|
|
18353
|
+
var autoroutingPhaseProps = z97.object({
|
|
18354
|
+
key: z97.any().optional(),
|
|
18355
|
+
name: z97.string().optional(),
|
|
18281
18356
|
autorouter: autorouterProp.optional(),
|
|
18282
18357
|
algorithmFn: autorouterConfig.shape.algorithmFn,
|
|
18283
18358
|
preflightRoutingCheckPolicy: preflightRoutingCheckPolicy.optional(),
|
|
18284
|
-
phaseIndex:
|
|
18285
|
-
pcbTracePaths:
|
|
18359
|
+
phaseIndex: z97.number().optional(),
|
|
18360
|
+
pcbTracePaths: z97.array(fanoutTracePath).optional(),
|
|
18286
18361
|
...routingTolerances.shape,
|
|
18287
|
-
region:
|
|
18288
|
-
shape:
|
|
18289
|
-
minX:
|
|
18290
|
-
maxX:
|
|
18291
|
-
minY:
|
|
18292
|
-
maxY:
|
|
18362
|
+
region: z97.object({
|
|
18363
|
+
shape: z97.literal("rect").optional(),
|
|
18364
|
+
minX: z97.number(),
|
|
18365
|
+
maxX: z97.number(),
|
|
18366
|
+
minY: z97.number(),
|
|
18367
|
+
maxY: z97.number()
|
|
18293
18368
|
}).optional(),
|
|
18294
|
-
connection:
|
|
18295
|
-
connections:
|
|
18296
|
-
reroute:
|
|
18369
|
+
connection: z97.string().optional(),
|
|
18370
|
+
connections: z97.array(z97.string()).optional(),
|
|
18371
|
+
reroute: z97.boolean().optional(),
|
|
18297
18372
|
...fanoutProps.shape
|
|
18298
18373
|
}).superRefine((value, ctx) => {
|
|
18299
18374
|
const isSimplifyAutorouter = value.autorouter === "simplify" || typeof value.autorouter === "object" && value.autorouter?.preset === "simplify";
|
|
@@ -18304,7 +18379,7 @@ var autoroutingPhaseProps = z95.object({
|
|
|
18304
18379
|
}
|
|
18305
18380
|
if (value.reroute !== void 0 && !(isSimplifyAutorouter && value.reroute === true) && value.region === void 0 && value.connection === void 0 && value.connections === void 0) {
|
|
18306
18381
|
ctx.addIssue({
|
|
18307
|
-
code:
|
|
18382
|
+
code: z97.ZodIssueCode.custom,
|
|
18308
18383
|
message: "region, connection, or connections is required when reroute is provided",
|
|
18309
18384
|
path: ["region"]
|
|
18310
18385
|
});
|
|
@@ -18313,15 +18388,15 @@ var autoroutingPhaseProps = z95.object({
|
|
|
18313
18388
|
expectTypesMatch(true);
|
|
18314
18389
|
|
|
18315
18390
|
// lib/components/spicemodel.ts
|
|
18316
|
-
import { z as
|
|
18317
|
-
var spicemodelProps =
|
|
18318
|
-
source:
|
|
18319
|
-
spicePinMapping:
|
|
18391
|
+
import { z as z98 } from "zod";
|
|
18392
|
+
var spicemodelProps = z98.object({
|
|
18393
|
+
source: z98.string(),
|
|
18394
|
+
spicePinMapping: z98.record(z98.string(), z98.string()).optional()
|
|
18320
18395
|
});
|
|
18321
18396
|
expectTypesMatch(true);
|
|
18322
18397
|
|
|
18323
18398
|
// lib/components/transistor.ts
|
|
18324
|
-
import { z as
|
|
18399
|
+
import { z as z99 } from "zod";
|
|
18325
18400
|
var transistorPinsLabels = [
|
|
18326
18401
|
"pin1",
|
|
18327
18402
|
"pin2",
|
|
@@ -18334,7 +18409,7 @@ var transistorPinsLabels = [
|
|
|
18334
18409
|
"drain"
|
|
18335
18410
|
];
|
|
18336
18411
|
var transistorProps = commonComponentProps.extend({
|
|
18337
|
-
type:
|
|
18412
|
+
type: z99.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
|
|
18338
18413
|
connections: createConnectionsProp(transistorPinsLabels).optional()
|
|
18339
18414
|
});
|
|
18340
18415
|
var transistorPins = [
|
|
@@ -18348,7 +18423,7 @@ var transistorPins = [
|
|
|
18348
18423
|
expectTypesMatch(true);
|
|
18349
18424
|
|
|
18350
18425
|
// lib/components/mosfet.ts
|
|
18351
|
-
import { z as
|
|
18426
|
+
import { z as z100 } from "zod";
|
|
18352
18427
|
var mosfetPins = [
|
|
18353
18428
|
"pin1",
|
|
18354
18429
|
"drain",
|
|
@@ -18358,11 +18433,11 @@ var mosfetPins = [
|
|
|
18358
18433
|
"gate"
|
|
18359
18434
|
];
|
|
18360
18435
|
var mosfetProps = commonComponentProps.extend({
|
|
18361
|
-
channelType:
|
|
18362
|
-
mosfetMode:
|
|
18363
|
-
symbolDrainSide:
|
|
18364
|
-
symbolSourceSide:
|
|
18365
|
-
symbolGateSide:
|
|
18436
|
+
channelType: z100.enum(["n", "p"]),
|
|
18437
|
+
mosfetMode: z100.enum(["enhancement", "depletion"]),
|
|
18438
|
+
symbolDrainSide: z100.enum(["left", "right", "top", "bottom"]).optional(),
|
|
18439
|
+
symbolSourceSide: z100.enum(["left", "right", "top", "bottom"]).optional(),
|
|
18440
|
+
symbolGateSide: z100.enum(["left", "right", "top", "bottom"]).optional(),
|
|
18366
18441
|
connections: createConnectionsProp(mosfetPins).optional()
|
|
18367
18442
|
});
|
|
18368
18443
|
expectTypesMatch(true);
|
|
@@ -18384,29 +18459,29 @@ expectTypesMatch(true);
|
|
|
18384
18459
|
|
|
18385
18460
|
// lib/components/inductor.ts
|
|
18386
18461
|
import { inductance as inductance2 } from "circuit-json";
|
|
18387
|
-
import { z as
|
|
18462
|
+
import { z as z102 } from "zod";
|
|
18388
18463
|
var inductorPins = lrPins;
|
|
18389
18464
|
var inductorProps = commonComponentProps.extend({
|
|
18390
18465
|
inductance: inductance2,
|
|
18391
|
-
maxCurrentRating:
|
|
18466
|
+
maxCurrentRating: z102.union([z102.string(), z102.number()]).optional(),
|
|
18392
18467
|
schOrientation: schematicOrientation.optional(),
|
|
18393
18468
|
connections: createConnectionsProp(inductorPins).optional()
|
|
18394
18469
|
});
|
|
18395
18470
|
expectTypesMatch(true);
|
|
18396
18471
|
|
|
18397
18472
|
// lib/components/internal-circuit.ts
|
|
18398
|
-
import { z as
|
|
18399
|
-
var internalCircuitProps =
|
|
18400
|
-
children:
|
|
18473
|
+
import { z as z103 } from "zod";
|
|
18474
|
+
var internalCircuitProps = z103.object({
|
|
18475
|
+
children: z103.custom().optional()
|
|
18401
18476
|
});
|
|
18402
18477
|
expectTypesMatch(
|
|
18403
18478
|
true
|
|
18404
18479
|
);
|
|
18405
18480
|
|
|
18406
18481
|
// lib/components/diode.ts
|
|
18407
|
-
import { z as
|
|
18482
|
+
import { z as z104 } from "zod";
|
|
18408
18483
|
var diodePins = lrPolarPins;
|
|
18409
|
-
var diodeConnectionKeys =
|
|
18484
|
+
var diodeConnectionKeys = z104.enum([
|
|
18410
18485
|
"anode",
|
|
18411
18486
|
"cathode",
|
|
18412
18487
|
"pin1",
|
|
@@ -18414,13 +18489,13 @@ var diodeConnectionKeys = z102.enum([
|
|
|
18414
18489
|
"pos",
|
|
18415
18490
|
"neg"
|
|
18416
18491
|
]);
|
|
18417
|
-
var connectionTarget3 =
|
|
18418
|
-
var connectionsProp2 =
|
|
18419
|
-
var diodePinLabelsProp =
|
|
18420
|
-
|
|
18421
|
-
schematicPinLabel.or(
|
|
18492
|
+
var connectionTarget3 = z104.string().or(z104.array(z104.string()).readonly()).or(z104.array(z104.string()));
|
|
18493
|
+
var connectionsProp2 = z104.record(diodeConnectionKeys, connectionTarget3);
|
|
18494
|
+
var diodePinLabelsProp = z104.record(
|
|
18495
|
+
z104.enum(diodePins),
|
|
18496
|
+
schematicPinLabel.or(z104.array(schematicPinLabel).readonly()).or(z104.array(schematicPinLabel))
|
|
18422
18497
|
);
|
|
18423
|
-
var diodeVariant =
|
|
18498
|
+
var diodeVariant = z104.enum([
|
|
18424
18499
|
"standard",
|
|
18425
18500
|
"schottky",
|
|
18426
18501
|
"zener",
|
|
@@ -18431,12 +18506,12 @@ var diodeVariant = z102.enum([
|
|
|
18431
18506
|
var diodeProps = commonComponentProps.extend({
|
|
18432
18507
|
connections: connectionsProp2.optional(),
|
|
18433
18508
|
variant: diodeVariant.optional().default("standard"),
|
|
18434
|
-
standard:
|
|
18435
|
-
schottky:
|
|
18436
|
-
zener:
|
|
18437
|
-
avalanche:
|
|
18438
|
-
photo:
|
|
18439
|
-
tvs:
|
|
18509
|
+
standard: z104.boolean().optional(),
|
|
18510
|
+
schottky: z104.boolean().optional(),
|
|
18511
|
+
zener: z104.boolean().optional(),
|
|
18512
|
+
avalanche: z104.boolean().optional(),
|
|
18513
|
+
photo: z104.boolean().optional(),
|
|
18514
|
+
tvs: z104.boolean().optional(),
|
|
18440
18515
|
schOrientation: schematicOrientation.optional(),
|
|
18441
18516
|
schSize: schematicSymbolSize.optional(),
|
|
18442
18517
|
pinLabels: diodePinLabelsProp.optional()
|
|
@@ -18451,11 +18526,11 @@ var diodeProps = commonComponentProps.extend({
|
|
|
18451
18526
|
].filter(Boolean).length;
|
|
18452
18527
|
if (enabledFlags > 1) {
|
|
18453
18528
|
ctx.addIssue({
|
|
18454
|
-
code:
|
|
18529
|
+
code: z104.ZodIssueCode.custom,
|
|
18455
18530
|
message: "Exactly one diode variant must be enabled",
|
|
18456
18531
|
path: []
|
|
18457
18532
|
});
|
|
18458
|
-
return
|
|
18533
|
+
return z104.INVALID;
|
|
18459
18534
|
}
|
|
18460
18535
|
}).transform((data) => {
|
|
18461
18536
|
const result = {
|
|
@@ -18501,18 +18576,18 @@ var diodeProps = commonComponentProps.extend({
|
|
|
18501
18576
|
expectTypesMatch(true);
|
|
18502
18577
|
|
|
18503
18578
|
// lib/components/led.ts
|
|
18504
|
-
import { z as
|
|
18505
|
-
var legacyNumericLedPinLabelsProp =
|
|
18506
|
-
|
|
18507
|
-
schematicPinLabel.or(
|
|
18579
|
+
import { z as z105 } from "zod";
|
|
18580
|
+
var legacyNumericLedPinLabelsProp = z105.record(
|
|
18581
|
+
z105.enum(["1", "2"]),
|
|
18582
|
+
schematicPinLabel.or(z105.array(schematicPinLabel).readonly()).or(z105.array(schematicPinLabel))
|
|
18508
18583
|
).transform((pinLabels) => ({
|
|
18509
18584
|
...pinLabels["1"] === void 0 ? {} : { pin1: pinLabels["1"] },
|
|
18510
18585
|
...pinLabels["2"] === void 0 ? {} : { pin2: pinLabels["2"] }
|
|
18511
18586
|
}));
|
|
18512
18587
|
var ledProps = commonComponentProps.extend({
|
|
18513
|
-
color:
|
|
18514
|
-
wavelength:
|
|
18515
|
-
schDisplayValue:
|
|
18588
|
+
color: z105.string().optional(),
|
|
18589
|
+
wavelength: z105.string().optional(),
|
|
18590
|
+
schDisplayValue: z105.string().optional(),
|
|
18516
18591
|
schOrientation: schematicOrientation.optional(),
|
|
18517
18592
|
/** Select a compact schematic symbol; omitted, default, and md retain the standard symbol. */
|
|
18518
18593
|
schSize: schematicSymbolSize.optional(),
|
|
@@ -18520,28 +18595,28 @@ var ledProps = commonComponentProps.extend({
|
|
|
18520
18595
|
// wrappers, then normalized to the canonical pin1/pin2 representation.
|
|
18521
18596
|
pinLabels: diodePinLabelsProp.or(legacyNumericLedPinLabelsProp).optional(),
|
|
18522
18597
|
connections: createConnectionsProp(lrPolarPins).optional(),
|
|
18523
|
-
laser:
|
|
18598
|
+
laser: z105.boolean().optional()
|
|
18524
18599
|
});
|
|
18525
18600
|
var ledPins = lrPolarPins;
|
|
18526
18601
|
|
|
18527
18602
|
// lib/components/switch.ts
|
|
18528
18603
|
import { ms as ms3, frequency as frequency4 } from "circuit-json";
|
|
18529
|
-
import { z as
|
|
18604
|
+
import { z as z106 } from "zod";
|
|
18530
18605
|
var switchProps = commonComponentProps.extend({
|
|
18531
|
-
type:
|
|
18532
|
-
isNormallyClosed:
|
|
18533
|
-
spst:
|
|
18534
|
-
spdt:
|
|
18535
|
-
dpst:
|
|
18536
|
-
dpdt:
|
|
18606
|
+
type: z106.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
|
|
18607
|
+
isNormallyClosed: z106.boolean().optional().default(false),
|
|
18608
|
+
spst: z106.boolean().optional(),
|
|
18609
|
+
spdt: z106.boolean().optional(),
|
|
18610
|
+
dpst: z106.boolean().optional(),
|
|
18611
|
+
dpdt: z106.boolean().optional(),
|
|
18537
18612
|
pinLabels: pinLabelsProp.optional(),
|
|
18538
18613
|
noConnect: noConnectProp.optional(),
|
|
18539
18614
|
simSwitchFrequency: frequency4.optional(),
|
|
18540
18615
|
simCloseAt: ms3.optional(),
|
|
18541
18616
|
simOpenAt: ms3.optional(),
|
|
18542
|
-
simStartClosed:
|
|
18543
|
-
simStartOpen:
|
|
18544
|
-
connections:
|
|
18617
|
+
simStartClosed: z106.boolean().optional(),
|
|
18618
|
+
simStartOpen: z106.boolean().optional(),
|
|
18619
|
+
connections: z106.custom().pipe(z106.record(z106.string(), connectionTarget)).optional()
|
|
18545
18620
|
}).transform((props) => {
|
|
18546
18621
|
const updatedProps = { ...props };
|
|
18547
18622
|
if (updatedProps.dpdt) {
|
|
@@ -18573,33 +18648,33 @@ expectTypesMatch(true);
|
|
|
18573
18648
|
|
|
18574
18649
|
// lib/components/fabrication-note-text.ts
|
|
18575
18650
|
import { length as length4 } from "circuit-json";
|
|
18576
|
-
import { z as
|
|
18651
|
+
import { z as z107 } from "zod";
|
|
18577
18652
|
var fabricationNoteTextProps = pcbLayoutProps.extend({
|
|
18578
|
-
text:
|
|
18579
|
-
anchorAlignment:
|
|
18580
|
-
font:
|
|
18653
|
+
text: z107.string(),
|
|
18654
|
+
anchorAlignment: z107.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
18655
|
+
font: z107.enum(["tscircuit2024"]).optional(),
|
|
18581
18656
|
fontSize: length4.optional(),
|
|
18582
|
-
color:
|
|
18657
|
+
color: z107.string().optional()
|
|
18583
18658
|
});
|
|
18584
18659
|
expectTypesMatch(true);
|
|
18585
18660
|
|
|
18586
18661
|
// lib/components/fabrication-note-rect.ts
|
|
18587
18662
|
import { distance as distance23 } from "circuit-json";
|
|
18588
|
-
import { z as
|
|
18663
|
+
import { z as z108 } from "zod";
|
|
18589
18664
|
var fabricationNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18590
18665
|
width: distance23,
|
|
18591
18666
|
height: distance23,
|
|
18592
18667
|
strokeWidth: distance23.optional(),
|
|
18593
|
-
isFilled:
|
|
18594
|
-
hasStroke:
|
|
18595
|
-
isStrokeDashed:
|
|
18596
|
-
color:
|
|
18668
|
+
isFilled: z108.boolean().optional(),
|
|
18669
|
+
hasStroke: z108.boolean().optional(),
|
|
18670
|
+
isStrokeDashed: z108.boolean().optional(),
|
|
18671
|
+
color: z108.string().optional(),
|
|
18597
18672
|
cornerRadius: distance23.optional()
|
|
18598
18673
|
});
|
|
18599
18674
|
|
|
18600
18675
|
// lib/components/fabrication-note-path.ts
|
|
18601
18676
|
import { length as length5, route_hint_point as route_hint_point3 } from "circuit-json";
|
|
18602
|
-
import { z as
|
|
18677
|
+
import { z as z109 } from "zod";
|
|
18603
18678
|
var fabricationNotePathProps = pcbLayoutProps.omit({
|
|
18604
18679
|
pcbLeftEdgeX: true,
|
|
18605
18680
|
pcbRightEdgeX: true,
|
|
@@ -18611,15 +18686,15 @@ var fabricationNotePathProps = pcbLayoutProps.omit({
|
|
|
18611
18686
|
pcbOffsetY: true,
|
|
18612
18687
|
pcbRotation: true
|
|
18613
18688
|
}).extend({
|
|
18614
|
-
route:
|
|
18689
|
+
route: z109.array(route_hint_point3),
|
|
18615
18690
|
strokeWidth: length5.optional(),
|
|
18616
|
-
color:
|
|
18691
|
+
color: z109.string().optional()
|
|
18617
18692
|
});
|
|
18618
18693
|
|
|
18619
18694
|
// lib/components/fabrication-note-dimension.ts
|
|
18620
18695
|
import { distance as distance24, length as length6 } from "circuit-json";
|
|
18621
|
-
import { z as
|
|
18622
|
-
var dimensionTarget =
|
|
18696
|
+
import { z as z110 } from "zod";
|
|
18697
|
+
var dimensionTarget = z110.union([z110.string(), point]);
|
|
18623
18698
|
var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
18624
18699
|
pcbLeftEdgeX: true,
|
|
18625
18700
|
pcbRightEdgeX: true,
|
|
@@ -18633,44 +18708,44 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
18633
18708
|
}).extend({
|
|
18634
18709
|
from: dimensionTarget,
|
|
18635
18710
|
to: dimensionTarget,
|
|
18636
|
-
text:
|
|
18711
|
+
text: z110.string().optional(),
|
|
18637
18712
|
offset: distance24.optional(),
|
|
18638
|
-
offsetDirection:
|
|
18639
|
-
font:
|
|
18713
|
+
offsetDirection: z110.object({ x: z110.number().finite(), y: z110.number().finite() }).optional(),
|
|
18714
|
+
font: z110.enum(["tscircuit2024"]).optional(),
|
|
18640
18715
|
fontSize: length6.optional(),
|
|
18641
|
-
color:
|
|
18716
|
+
color: z110.string().optional(),
|
|
18642
18717
|
arrowSize: distance24.optional(),
|
|
18643
|
-
units:
|
|
18644
|
-
outerEdgeToEdge:
|
|
18645
|
-
centerToCenter:
|
|
18646
|
-
innerEdgeToEdge:
|
|
18718
|
+
units: z110.enum(["in", "mm"]).optional(),
|
|
18719
|
+
outerEdgeToEdge: z110.literal(true).optional(),
|
|
18720
|
+
centerToCenter: z110.literal(true).optional(),
|
|
18721
|
+
innerEdgeToEdge: z110.literal(true).optional()
|
|
18647
18722
|
});
|
|
18648
18723
|
expectTypesMatch(true);
|
|
18649
18724
|
|
|
18650
18725
|
// lib/components/pcb-trace.ts
|
|
18651
18726
|
import { distance as distance25, route_hint_point as route_hint_point4 } from "circuit-json";
|
|
18652
|
-
import { z as
|
|
18653
|
-
var pcbTraceProps =
|
|
18654
|
-
layer:
|
|
18727
|
+
import { z as z111 } from "zod";
|
|
18728
|
+
var pcbTraceProps = z111.object({
|
|
18729
|
+
layer: z111.string().optional(),
|
|
18655
18730
|
thickness: distance25.optional(),
|
|
18656
|
-
route:
|
|
18731
|
+
route: z111.array(route_hint_point4)
|
|
18657
18732
|
});
|
|
18658
18733
|
|
|
18659
18734
|
// lib/components/via.ts
|
|
18660
18735
|
import { distance as distance26, layer_ref as layer_ref9 } from "circuit-json";
|
|
18661
|
-
import { z as
|
|
18736
|
+
import { z as z112 } from "zod";
|
|
18662
18737
|
var viaProps = commonLayoutProps.extend({
|
|
18663
|
-
name:
|
|
18738
|
+
name: z112.string().optional(),
|
|
18664
18739
|
fromLayer: layer_ref9.optional(),
|
|
18665
18740
|
toLayer: layer_ref9.optional(),
|
|
18666
18741
|
holeDiameter: distance26.optional(),
|
|
18667
18742
|
outerDiameter: distance26.optional(),
|
|
18668
|
-
layers:
|
|
18669
|
-
connectsTo:
|
|
18670
|
-
netIsAssignable:
|
|
18671
|
-
tented:
|
|
18672
|
-
|
|
18673
|
-
|
|
18743
|
+
layers: z112.array(layer_ref9).optional(),
|
|
18744
|
+
connectsTo: z112.string().or(z112.array(z112.string())).optional(),
|
|
18745
|
+
netIsAssignable: z112.boolean().optional(),
|
|
18746
|
+
tented: z112.union([
|
|
18747
|
+
z112.boolean(),
|
|
18748
|
+
z112.enum([
|
|
18674
18749
|
"both_sides",
|
|
18675
18750
|
"top_and_bottom_tented",
|
|
18676
18751
|
"top_tented",
|
|
@@ -18689,15 +18764,15 @@ expectTypesMatch(true);
|
|
|
18689
18764
|
|
|
18690
18765
|
// lib/components/testpoint.ts
|
|
18691
18766
|
import { distance as distance27 } from "circuit-json";
|
|
18692
|
-
import { z as
|
|
18767
|
+
import { z as z113 } from "zod";
|
|
18693
18768
|
var testpointPins = ["pin1"];
|
|
18694
|
-
var testpointConnectionsProp =
|
|
18769
|
+
var testpointConnectionsProp = z113.object({
|
|
18695
18770
|
pin1: connectionTarget
|
|
18696
18771
|
}).strict();
|
|
18697
18772
|
var testpointProps = commonComponentProps.extend({
|
|
18698
18773
|
connections: testpointConnectionsProp.optional(),
|
|
18699
|
-
footprintVariant:
|
|
18700
|
-
padShape:
|
|
18774
|
+
footprintVariant: z113.enum(["pad", "through_hole"]).optional(),
|
|
18775
|
+
padShape: z113.enum(["rect", "circle"]).optional().default("circle"),
|
|
18701
18776
|
padDiameter: distance27.optional(),
|
|
18702
18777
|
holeDiameter: distance27.optional(),
|
|
18703
18778
|
width: distance27.optional(),
|
|
@@ -18709,42 +18784,42 @@ var testpointProps = commonComponentProps.extend({
|
|
|
18709
18784
|
expectTypesMatch(true);
|
|
18710
18785
|
|
|
18711
18786
|
// lib/components/breakoutpoint.ts
|
|
18712
|
-
import { z as
|
|
18787
|
+
import { z as z114 } from "zod";
|
|
18713
18788
|
var breakoutPointProps = pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
18714
|
-
connection:
|
|
18789
|
+
connection: z114.string()
|
|
18715
18790
|
});
|
|
18716
18791
|
expectTypesMatch(true);
|
|
18717
18792
|
|
|
18718
18793
|
// lib/components/pcb-keepout.ts
|
|
18719
18794
|
import { distance as distance28, layer_ref as layer_ref10 } from "circuit-json";
|
|
18720
|
-
import { z as
|
|
18721
|
-
var pcbKeepoutProps =
|
|
18795
|
+
import { z as z115 } from "zod";
|
|
18796
|
+
var pcbKeepoutProps = z115.union([
|
|
18722
18797
|
pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18723
|
-
shape:
|
|
18798
|
+
shape: z115.literal("circle"),
|
|
18724
18799
|
radius: distance28,
|
|
18725
|
-
layers:
|
|
18800
|
+
layers: z115.array(layer_ref10).optional(),
|
|
18726
18801
|
/** Report keepout violations as warnings when true. Omit for normal enforcement. */
|
|
18727
|
-
warningOnly:
|
|
18802
|
+
warningOnly: z115.boolean().optional(),
|
|
18728
18803
|
/** Allow trace crossings without keepout diagnostics. False or omitted retains enforcement; copper pours remain excluded. */
|
|
18729
|
-
allowTraces:
|
|
18804
|
+
allowTraces: z115.boolean().optional(),
|
|
18730
18805
|
/** Allow components and their pads/plated holes without keepout diagnostics. False or omitted retains enforcement; copper pours remain excluded. */
|
|
18731
|
-
allowPlacements:
|
|
18732
|
-
excludeRefs:
|
|
18806
|
+
allowPlacements: z115.boolean().optional(),
|
|
18807
|
+
excludeRefs: z115.array(z115.string()).optional().describe(
|
|
18733
18808
|
'Component selectors excluded from the keepout, such as ".ANT1"'
|
|
18734
18809
|
)
|
|
18735
18810
|
}),
|
|
18736
18811
|
pcbLayoutProps.extend({
|
|
18737
|
-
shape:
|
|
18812
|
+
shape: z115.literal("rect"),
|
|
18738
18813
|
width: distance28,
|
|
18739
18814
|
height: distance28,
|
|
18740
|
-
layers:
|
|
18815
|
+
layers: z115.array(layer_ref10).optional(),
|
|
18741
18816
|
/** Report keepout violations as warnings when true. Omit for normal enforcement. */
|
|
18742
|
-
warningOnly:
|
|
18817
|
+
warningOnly: z115.boolean().optional(),
|
|
18743
18818
|
/** Allow trace crossings without keepout diagnostics. False or omitted retains enforcement; copper pours remain excluded. */
|
|
18744
|
-
allowTraces:
|
|
18819
|
+
allowTraces: z115.boolean().optional(),
|
|
18745
18820
|
/** Allow components and their pads/plated holes without keepout diagnostics. False or omitted retains enforcement; copper pours remain excluded. */
|
|
18746
|
-
allowPlacements:
|
|
18747
|
-
excludeRefs:
|
|
18821
|
+
allowPlacements: z115.boolean().optional(),
|
|
18822
|
+
excludeRefs: z115.array(z115.string()).optional().describe(
|
|
18748
18823
|
'Component selectors excluded from the keepout, such as ".ANT1"'
|
|
18749
18824
|
)
|
|
18750
18825
|
})
|
|
@@ -18752,20 +18827,20 @@ var pcbKeepoutProps = z113.union([
|
|
|
18752
18827
|
|
|
18753
18828
|
// lib/components/courtyard-rect.ts
|
|
18754
18829
|
import { distance as distance29 } from "circuit-json";
|
|
18755
|
-
import { z as
|
|
18830
|
+
import { z as z116 } from "zod";
|
|
18756
18831
|
var courtyardRectProps = pcbLayoutProps.extend({
|
|
18757
18832
|
width: distance29,
|
|
18758
18833
|
height: distance29,
|
|
18759
18834
|
strokeWidth: distance29.optional(),
|
|
18760
|
-
isFilled:
|
|
18761
|
-
hasStroke:
|
|
18762
|
-
isStrokeDashed:
|
|
18763
|
-
color:
|
|
18835
|
+
isFilled: z116.boolean().optional(),
|
|
18836
|
+
hasStroke: z116.boolean().optional(),
|
|
18837
|
+
isStrokeDashed: z116.boolean().optional(),
|
|
18838
|
+
color: z116.string().optional()
|
|
18764
18839
|
});
|
|
18765
18840
|
|
|
18766
18841
|
// lib/components/courtyard-outline.ts
|
|
18767
18842
|
import { length as length7 } from "circuit-json";
|
|
18768
|
-
import { z as
|
|
18843
|
+
import { z as z117 } from "zod";
|
|
18769
18844
|
var courtyardOutlineProps = pcbLayoutProps.omit({
|
|
18770
18845
|
pcbLeftEdgeX: true,
|
|
18771
18846
|
pcbRightEdgeX: true,
|
|
@@ -18777,11 +18852,11 @@ var courtyardOutlineProps = pcbLayoutProps.omit({
|
|
|
18777
18852
|
pcbOffsetY: true,
|
|
18778
18853
|
pcbRotation: true
|
|
18779
18854
|
}).extend({
|
|
18780
|
-
outline:
|
|
18855
|
+
outline: z117.array(point),
|
|
18781
18856
|
strokeWidth: length7.optional(),
|
|
18782
|
-
isClosed:
|
|
18783
|
-
isStrokeDashed:
|
|
18784
|
-
color:
|
|
18857
|
+
isClosed: z117.boolean().optional(),
|
|
18858
|
+
isStrokeDashed: z117.boolean().optional(),
|
|
18859
|
+
color: z117.string().optional()
|
|
18785
18860
|
});
|
|
18786
18861
|
|
|
18787
18862
|
// lib/components/courtyard-circle.ts
|
|
@@ -18801,13 +18876,13 @@ var courtyardPillProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
18801
18876
|
});
|
|
18802
18877
|
|
|
18803
18878
|
// lib/components/copper-pour.ts
|
|
18804
|
-
import { z as
|
|
18879
|
+
import { z as z120 } from "zod";
|
|
18805
18880
|
import { layer_ref as layer_ref11 } from "circuit-json";
|
|
18806
|
-
var copperPourProps =
|
|
18807
|
-
name:
|
|
18881
|
+
var copperPourProps = z120.object({
|
|
18882
|
+
name: z120.string().optional(),
|
|
18808
18883
|
layer: layer_ref11,
|
|
18809
|
-
connectsTo:
|
|
18810
|
-
unbroken:
|
|
18884
|
+
connectsTo: z120.string(),
|
|
18885
|
+
unbroken: z120.boolean().optional().describe(
|
|
18811
18886
|
"Reserves the pour region during autorouting so unrelated traces do not split it. Vias may still cross the region using antipads."
|
|
18812
18887
|
),
|
|
18813
18888
|
padMargin: distance.optional(),
|
|
@@ -18815,24 +18890,24 @@ var copperPourProps = z118.object({
|
|
|
18815
18890
|
clearance: distance.optional(),
|
|
18816
18891
|
boardEdgeMargin: distance.optional(),
|
|
18817
18892
|
cutoutMargin: distance.optional(),
|
|
18818
|
-
useThermalReliefs:
|
|
18819
|
-
outline:
|
|
18820
|
-
coveredWithSolderMask:
|
|
18893
|
+
useThermalReliefs: z120.boolean().optional(),
|
|
18894
|
+
outline: z120.array(point).optional(),
|
|
18895
|
+
coveredWithSolderMask: z120.boolean().optional().default(true)
|
|
18821
18896
|
});
|
|
18822
18897
|
expectTypesMatch(true);
|
|
18823
18898
|
|
|
18824
18899
|
// lib/components/cadassembly.ts
|
|
18825
18900
|
import { layer_ref as layer_ref12 } from "circuit-json";
|
|
18826
|
-
import { z as
|
|
18827
|
-
var cadassemblyProps =
|
|
18901
|
+
import { z as z121 } from "zod";
|
|
18902
|
+
var cadassemblyProps = z121.object({
|
|
18828
18903
|
originalLayer: layer_ref12.default("top").optional(),
|
|
18829
|
-
children:
|
|
18904
|
+
children: z121.any().optional()
|
|
18830
18905
|
});
|
|
18831
18906
|
expectTypesMatch(true);
|
|
18832
18907
|
|
|
18833
18908
|
// lib/components/cadmodel.ts
|
|
18834
|
-
import { z as
|
|
18835
|
-
var pcbPosition =
|
|
18909
|
+
import { z as z122 } from "zod";
|
|
18910
|
+
var pcbPosition = z122.object({
|
|
18836
18911
|
pcbX: pcbCoordinate.optional(),
|
|
18837
18912
|
pcbY: pcbCoordinate.optional(),
|
|
18838
18913
|
pcbLeftEdgeX: pcbCoordinate.optional(),
|
|
@@ -18849,7 +18924,7 @@ var cadModelBaseWithUrl = cadModelBase.extend({
|
|
|
18849
18924
|
});
|
|
18850
18925
|
var cadModelObject = cadModelBaseWithUrl.merge(pcbPosition);
|
|
18851
18926
|
expectTypesMatch(true);
|
|
18852
|
-
var cadmodelProps =
|
|
18927
|
+
var cadmodelProps = z122.union([z122.null(), url, cadModelObject]);
|
|
18853
18928
|
|
|
18854
18929
|
// lib/components/power-source.ts
|
|
18855
18930
|
import { voltage as voltage5 } from "circuit-json";
|
|
@@ -18859,9 +18934,9 @@ var powerSourceProps = commonComponentProps.extend({
|
|
|
18859
18934
|
|
|
18860
18935
|
// lib/components/voltagesource.ts
|
|
18861
18936
|
import { frequency as frequency5, ms as ms4, rotation as rotation6, voltage as voltage6 } from "circuit-json";
|
|
18862
|
-
import { z as
|
|
18937
|
+
import { z as z123 } from "zod";
|
|
18863
18938
|
var voltageSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
18864
|
-
var percentage =
|
|
18939
|
+
var percentage = z123.union([z123.string(), z123.number()]).transform((val) => {
|
|
18865
18940
|
if (typeof val === "string") {
|
|
18866
18941
|
if (val.endsWith("%")) {
|
|
18867
18942
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -18870,13 +18945,13 @@ var percentage = z121.union([z121.string(), z121.number()]).transform((val) => {
|
|
|
18870
18945
|
}
|
|
18871
18946
|
return val;
|
|
18872
18947
|
}).pipe(
|
|
18873
|
-
|
|
18948
|
+
z123.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
18874
18949
|
);
|
|
18875
18950
|
var voltageSourceProps = commonComponentProps.extend({
|
|
18876
18951
|
voltage: voltage6.optional(),
|
|
18877
18952
|
frequency: frequency5.optional(),
|
|
18878
18953
|
peakToPeakVoltage: voltage6.optional(),
|
|
18879
|
-
waveShape:
|
|
18954
|
+
waveShape: z123.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
18880
18955
|
phase: rotation6.optional(),
|
|
18881
18956
|
dutyCycle: percentage.optional(),
|
|
18882
18957
|
pulseDelay: ms4.optional(),
|
|
@@ -18893,9 +18968,9 @@ expectTypesMatch(true);
|
|
|
18893
18968
|
|
|
18894
18969
|
// lib/components/currentsource.ts
|
|
18895
18970
|
import { frequency as frequency6, rotation as rotation7, current as current3 } from "circuit-json";
|
|
18896
|
-
import { z as
|
|
18971
|
+
import { z as z124 } from "zod";
|
|
18897
18972
|
var currentSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
18898
|
-
var percentage2 =
|
|
18973
|
+
var percentage2 = z124.union([z124.string(), z124.number()]).transform((val) => {
|
|
18899
18974
|
if (typeof val === "string") {
|
|
18900
18975
|
if (val.endsWith("%")) {
|
|
18901
18976
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -18904,13 +18979,13 @@ var percentage2 = z122.union([z122.string(), z122.number()]).transform((val) =>
|
|
|
18904
18979
|
}
|
|
18905
18980
|
return val;
|
|
18906
18981
|
}).pipe(
|
|
18907
|
-
|
|
18982
|
+
z124.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
18908
18983
|
);
|
|
18909
18984
|
var currentSourceProps = commonComponentProps.extend({
|
|
18910
18985
|
current: current3.optional(),
|
|
18911
18986
|
frequency: frequency6.optional(),
|
|
18912
18987
|
peakToPeakCurrent: current3.optional(),
|
|
18913
|
-
waveShape:
|
|
18988
|
+
waveShape: z124.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
18914
18989
|
phase: rotation7.optional(),
|
|
18915
18990
|
dutyCycle: percentage2.optional(),
|
|
18916
18991
|
acMagnitude: current3.optional(),
|
|
@@ -18921,21 +18996,21 @@ var currentSourcePins = lrPolarPins;
|
|
|
18921
18996
|
expectTypesMatch(true);
|
|
18922
18997
|
|
|
18923
18998
|
// lib/components/voltageprobe.ts
|
|
18924
|
-
import { z as
|
|
18999
|
+
import { z as z125 } from "zod";
|
|
18925
19000
|
var voltageProbeProps = commonComponentProps.omit({ name: true }).extend({
|
|
18926
|
-
name:
|
|
18927
|
-
connectsTo:
|
|
18928
|
-
referenceTo:
|
|
18929
|
-
color:
|
|
18930
|
-
graphDisplayName:
|
|
18931
|
-
graphCenter:
|
|
18932
|
-
graphVerticalOffset:
|
|
18933
|
-
graphVoltagePerDiv:
|
|
19001
|
+
name: z125.string().optional(),
|
|
19002
|
+
connectsTo: z125.string(),
|
|
19003
|
+
referenceTo: z125.string().optional(),
|
|
19004
|
+
color: z125.string().optional(),
|
|
19005
|
+
graphDisplayName: z125.string().optional(),
|
|
19006
|
+
graphCenter: z125.number().optional(),
|
|
19007
|
+
graphVerticalOffset: z125.number().or(z125.string()).optional(),
|
|
19008
|
+
graphVoltagePerDiv: z125.number().or(z125.string()).optional()
|
|
18934
19009
|
});
|
|
18935
19010
|
expectTypesMatch(true);
|
|
18936
19011
|
|
|
18937
19012
|
// lib/components/ammeter.ts
|
|
18938
|
-
import { z as
|
|
19013
|
+
import { z as z126 } from "zod";
|
|
18939
19014
|
var ammeterPinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
18940
19015
|
var hasAmmeterConnectionPair = (connections) => {
|
|
18941
19016
|
return connections.pos !== void 0 && connections.neg !== void 0 || connections.pin1 !== void 0 && connections.pin2 !== void 0;
|
|
@@ -18945,64 +19020,64 @@ var ammeterProps = commonComponentProps.extend({
|
|
|
18945
19020
|
hasAmmeterConnectionPair,
|
|
18946
19021
|
"Ammeter connections must include either pos/neg or pin1/pin2"
|
|
18947
19022
|
),
|
|
18948
|
-
color:
|
|
18949
|
-
graphDisplayName:
|
|
18950
|
-
graphCenter:
|
|
18951
|
-
graphVerticalOffset:
|
|
18952
|
-
graphCurrentPerDiv:
|
|
19023
|
+
color: z126.string().optional(),
|
|
19024
|
+
graphDisplayName: z126.string().optional(),
|
|
19025
|
+
graphCenter: z126.number().optional(),
|
|
19026
|
+
graphVerticalOffset: z126.number().or(z126.string()).optional(),
|
|
19027
|
+
graphCurrentPerDiv: z126.number().or(z126.string()).optional()
|
|
18953
19028
|
});
|
|
18954
19029
|
var ammeterPins = ammeterPinLabels;
|
|
18955
19030
|
expectTypesMatch(true);
|
|
18956
19031
|
|
|
18957
19032
|
// lib/components/schematic-arc.ts
|
|
18958
19033
|
import { distance as distance32, point as point5, rotation as rotation8 } from "circuit-json";
|
|
18959
|
-
import { z as
|
|
18960
|
-
var schematicArcProps =
|
|
19034
|
+
import { z as z127 } from "zod";
|
|
19035
|
+
var schematicArcProps = z127.object({
|
|
18961
19036
|
center: point5,
|
|
18962
19037
|
radius: distance32,
|
|
18963
19038
|
startAngleDegrees: rotation8,
|
|
18964
19039
|
endAngleDegrees: rotation8,
|
|
18965
|
-
direction:
|
|
19040
|
+
direction: z127.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
18966
19041
|
strokeWidth: distance32.optional(),
|
|
18967
|
-
color:
|
|
18968
|
-
isDashed:
|
|
19042
|
+
color: z127.string().optional(),
|
|
19043
|
+
isDashed: z127.boolean().optional().default(false)
|
|
18969
19044
|
});
|
|
18970
19045
|
expectTypesMatch(true);
|
|
18971
19046
|
|
|
18972
19047
|
// lib/components/toolingrail.ts
|
|
18973
|
-
import { z as
|
|
18974
|
-
var toolingrailProps =
|
|
18975
|
-
children:
|
|
19048
|
+
import { z as z128 } from "zod";
|
|
19049
|
+
var toolingrailProps = z128.object({
|
|
19050
|
+
children: z128.any().optional()
|
|
18976
19051
|
});
|
|
18977
19052
|
expectTypesMatch(true);
|
|
18978
19053
|
|
|
18979
19054
|
// lib/components/schematic-box.ts
|
|
18980
19055
|
import { distance as distance33 } from "circuit-json";
|
|
18981
|
-
import { z as
|
|
18982
|
-
var schematicBoxProps =
|
|
18983
|
-
name:
|
|
18984
|
-
chipRef:
|
|
19056
|
+
import { z as z129 } from "zod";
|
|
19057
|
+
var schematicBoxProps = z129.object({
|
|
19058
|
+
name: z129.string().optional(),
|
|
19059
|
+
chipRef: z129.string().optional(),
|
|
18985
19060
|
pinLabels: pinLabelsProp.optional(),
|
|
18986
19061
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
18987
19062
|
schPinStyle: schematicPinStyle.optional(),
|
|
18988
19063
|
schX: distance33.optional(),
|
|
18989
19064
|
schY: distance33.optional(),
|
|
18990
|
-
schSectionName:
|
|
18991
|
-
schSheetName:
|
|
19065
|
+
schSectionName: z129.string().optional(),
|
|
19066
|
+
schSheetName: z129.string().optional(),
|
|
18992
19067
|
width: distance33.optional(),
|
|
18993
19068
|
height: distance33.optional(),
|
|
18994
|
-
overlay:
|
|
19069
|
+
overlay: z129.array(z129.string()).optional(),
|
|
18995
19070
|
padding: distance33.optional(),
|
|
18996
19071
|
paddingLeft: distance33.optional(),
|
|
18997
19072
|
paddingRight: distance33.optional(),
|
|
18998
19073
|
paddingTop: distance33.optional(),
|
|
18999
19074
|
paddingBottom: distance33.optional(),
|
|
19000
|
-
title:
|
|
19075
|
+
title: z129.string().optional(),
|
|
19001
19076
|
titleAlignment: ninePointAnchor.default("top_left"),
|
|
19002
|
-
titleColor:
|
|
19077
|
+
titleColor: z129.string().optional(),
|
|
19003
19078
|
titleFontSize: distance33.optional(),
|
|
19004
|
-
titleInside:
|
|
19005
|
-
strokeStyle:
|
|
19079
|
+
titleInside: z129.boolean().default(false),
|
|
19080
|
+
strokeStyle: z129.enum(["solid", "dashed"]).default("solid")
|
|
19006
19081
|
}).refine(
|
|
19007
19082
|
(elm) => elm.width !== void 0 && elm.height !== void 0 || Array.isArray(elm.overlay) && elm.overlay.length > 0,
|
|
19008
19083
|
{
|
|
@@ -19018,21 +19093,21 @@ expectTypesMatch(true);
|
|
|
19018
19093
|
|
|
19019
19094
|
// lib/components/schematic-symbol.ts
|
|
19020
19095
|
import { rotation as rotation9 } from "circuit-json";
|
|
19021
|
-
import { z as
|
|
19022
|
-
var schematicSymbolConnections =
|
|
19096
|
+
import { z as z130 } from "zod";
|
|
19097
|
+
var schematicSymbolConnections = z130.custom().pipe(z130.record(z130.string(), connectionTarget)).refine((value) => Object.keys(value).length > 0, {
|
|
19023
19098
|
message: "connections must map at least one schematic symbol port"
|
|
19024
19099
|
});
|
|
19025
|
-
var schematicSymbolProps =
|
|
19026
|
-
name:
|
|
19027
|
-
displayName:
|
|
19028
|
-
chipRef:
|
|
19029
|
-
symbolName:
|
|
19100
|
+
var schematicSymbolProps = z130.object({
|
|
19101
|
+
name: z130.string().min(1),
|
|
19102
|
+
displayName: z130.string().optional(),
|
|
19103
|
+
chipRef: z130.string().min(1).optional(),
|
|
19104
|
+
symbolName: z130.string().min(1),
|
|
19030
19105
|
connections: schematicSymbolConnections.optional(),
|
|
19031
19106
|
schX: distance.optional(),
|
|
19032
19107
|
schY: distance.optional(),
|
|
19033
19108
|
schRotation: rotation9.optional(),
|
|
19034
|
-
schSectionName:
|
|
19035
|
-
schSheetName:
|
|
19109
|
+
schSectionName: z130.string().optional(),
|
|
19110
|
+
schSheetName: z130.string().optional()
|
|
19036
19111
|
});
|
|
19037
19112
|
expectTypesMatch(
|
|
19038
19113
|
true
|
|
@@ -19040,15 +19115,15 @@ expectTypesMatch(
|
|
|
19040
19115
|
|
|
19041
19116
|
// lib/components/schematic-circle.ts
|
|
19042
19117
|
import { distance as distance34, point as point6 } from "circuit-json";
|
|
19043
|
-
import { z as
|
|
19044
|
-
var schematicCircleProps =
|
|
19118
|
+
import { z as z131 } from "zod";
|
|
19119
|
+
var schematicCircleProps = z131.object({
|
|
19045
19120
|
center: point6,
|
|
19046
19121
|
radius: distance34,
|
|
19047
19122
|
strokeWidth: distance34.optional(),
|
|
19048
|
-
color:
|
|
19049
|
-
isFilled:
|
|
19050
|
-
fillColor:
|
|
19051
|
-
isDashed:
|
|
19123
|
+
color: z131.string().optional(),
|
|
19124
|
+
isFilled: z131.boolean().optional().default(false),
|
|
19125
|
+
fillColor: z131.string().optional(),
|
|
19126
|
+
isDashed: z131.boolean().optional().default(false)
|
|
19052
19127
|
});
|
|
19053
19128
|
expectTypesMatch(
|
|
19054
19129
|
true
|
|
@@ -19056,32 +19131,32 @@ expectTypesMatch(
|
|
|
19056
19131
|
|
|
19057
19132
|
// lib/components/schematic-rect.ts
|
|
19058
19133
|
import { distance as distance35, rotation as rotation10 } from "circuit-json";
|
|
19059
|
-
import { z as
|
|
19060
|
-
var schematicRectProps =
|
|
19134
|
+
import { z as z132 } from "zod";
|
|
19135
|
+
var schematicRectProps = z132.object({
|
|
19061
19136
|
schX: distance35.optional(),
|
|
19062
19137
|
schY: distance35.optional(),
|
|
19063
19138
|
width: distance35,
|
|
19064
19139
|
height: distance35,
|
|
19065
19140
|
rotation: rotation10.default(0),
|
|
19066
19141
|
strokeWidth: distance35.optional(),
|
|
19067
|
-
color:
|
|
19068
|
-
isFilled:
|
|
19069
|
-
fillColor:
|
|
19070
|
-
isDashed:
|
|
19142
|
+
color: z132.string().optional(),
|
|
19143
|
+
isFilled: z132.boolean().optional().default(false),
|
|
19144
|
+
fillColor: z132.string().optional(),
|
|
19145
|
+
isDashed: z132.boolean().optional().default(false)
|
|
19071
19146
|
});
|
|
19072
19147
|
expectTypesMatch(true);
|
|
19073
19148
|
|
|
19074
19149
|
// lib/components/schematic-line.ts
|
|
19075
19150
|
import { distance as distance36 } from "circuit-json";
|
|
19076
|
-
import { z as
|
|
19077
|
-
var schematicLineProps =
|
|
19151
|
+
import { z as z133 } from "zod";
|
|
19152
|
+
var schematicLineProps = z133.object({
|
|
19078
19153
|
x1: distance36,
|
|
19079
19154
|
y1: distance36,
|
|
19080
19155
|
x2: distance36,
|
|
19081
19156
|
y2: distance36,
|
|
19082
19157
|
strokeWidth: distance36.optional(),
|
|
19083
|
-
color:
|
|
19084
|
-
isDashed:
|
|
19158
|
+
color: z133.string().optional(),
|
|
19159
|
+
isDashed: z133.boolean().optional().default(false),
|
|
19085
19160
|
dashLength: distance36.optional(),
|
|
19086
19161
|
dashGap: distance36.optional()
|
|
19087
19162
|
});
|
|
@@ -19089,11 +19164,11 @@ expectTypesMatch(true);
|
|
|
19089
19164
|
|
|
19090
19165
|
// lib/components/schematic-text.ts
|
|
19091
19166
|
import { distance as distance37, rotation as rotation11 } from "circuit-json";
|
|
19092
|
-
import { z as
|
|
19167
|
+
import { z as z135 } from "zod";
|
|
19093
19168
|
|
|
19094
19169
|
// lib/common/fivePointAnchor.ts
|
|
19095
|
-
import { z as
|
|
19096
|
-
var fivePointAnchor =
|
|
19170
|
+
import { z as z134 } from "zod";
|
|
19171
|
+
var fivePointAnchor = z134.enum([
|
|
19097
19172
|
"center",
|
|
19098
19173
|
"left",
|
|
19099
19174
|
"right",
|
|
@@ -19102,39 +19177,39 @@ var fivePointAnchor = z132.enum([
|
|
|
19102
19177
|
]);
|
|
19103
19178
|
|
|
19104
19179
|
// lib/components/schematic-text.ts
|
|
19105
|
-
var schematicTextProps =
|
|
19180
|
+
var schematicTextProps = z135.object({
|
|
19106
19181
|
schX: distance37.optional(),
|
|
19107
19182
|
schY: distance37.optional(),
|
|
19108
|
-
text:
|
|
19109
|
-
fontSize:
|
|
19110
|
-
anchor:
|
|
19111
|
-
color:
|
|
19183
|
+
text: z135.string(),
|
|
19184
|
+
fontSize: z135.number().default(1),
|
|
19185
|
+
anchor: z135.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
19186
|
+
color: z135.string().default("#000000"),
|
|
19112
19187
|
schRotation: rotation11.default(0)
|
|
19113
19188
|
});
|
|
19114
19189
|
expectTypesMatch(true);
|
|
19115
19190
|
|
|
19116
19191
|
// lib/components/schematic-path.ts
|
|
19117
19192
|
import { distance as distance38, point as point7 } from "circuit-json";
|
|
19118
|
-
import { z as
|
|
19119
|
-
var schematicPathProps =
|
|
19120
|
-
points:
|
|
19121
|
-
svgPath:
|
|
19193
|
+
import { z as z136 } from "zod";
|
|
19194
|
+
var schematicPathProps = z136.object({
|
|
19195
|
+
points: z136.array(point7).optional(),
|
|
19196
|
+
svgPath: z136.string().optional(),
|
|
19122
19197
|
strokeWidth: distance38.optional(),
|
|
19123
|
-
strokeColor:
|
|
19198
|
+
strokeColor: z136.string().optional(),
|
|
19124
19199
|
dashLength: distance38.optional(),
|
|
19125
19200
|
dashGap: distance38.optional(),
|
|
19126
|
-
isFilled:
|
|
19127
|
-
fillColor:
|
|
19201
|
+
isFilled: z136.boolean().optional().default(false),
|
|
19202
|
+
fillColor: z136.string().optional()
|
|
19128
19203
|
});
|
|
19129
19204
|
expectTypesMatch(true);
|
|
19130
19205
|
|
|
19131
19206
|
// lib/components/schematic-table.ts
|
|
19132
19207
|
import { distance as distance39 } from "circuit-json";
|
|
19133
|
-
import { z as
|
|
19134
|
-
var schematicTableProps =
|
|
19208
|
+
import { z as z137 } from "zod";
|
|
19209
|
+
var schematicTableProps = z137.object({
|
|
19135
19210
|
schX: distance39.optional(),
|
|
19136
19211
|
schY: distance39.optional(),
|
|
19137
|
-
children:
|
|
19212
|
+
children: z137.any().optional(),
|
|
19138
19213
|
cellPadding: distance39.optional(),
|
|
19139
19214
|
borderWidth: distance39.optional(),
|
|
19140
19215
|
anchor: ninePointAnchor.optional(),
|
|
@@ -19144,34 +19219,34 @@ expectTypesMatch(true);
|
|
|
19144
19219
|
|
|
19145
19220
|
// lib/components/schematic-row.ts
|
|
19146
19221
|
import { distance as distance40 } from "circuit-json";
|
|
19147
|
-
import { z as
|
|
19148
|
-
var schematicRowProps =
|
|
19149
|
-
children:
|
|
19222
|
+
import { z as z138 } from "zod";
|
|
19223
|
+
var schematicRowProps = z138.object({
|
|
19224
|
+
children: z138.any().optional(),
|
|
19150
19225
|
height: distance40.optional()
|
|
19151
19226
|
});
|
|
19152
19227
|
expectTypesMatch(true);
|
|
19153
19228
|
|
|
19154
19229
|
// lib/components/schematic-cell.ts
|
|
19155
19230
|
import { distance as distance41 } from "circuit-json";
|
|
19156
|
-
import { z as
|
|
19157
|
-
var schematicCellProps =
|
|
19158
|
-
children:
|
|
19159
|
-
horizontalAlign:
|
|
19160
|
-
verticalAlign:
|
|
19231
|
+
import { z as z139 } from "zod";
|
|
19232
|
+
var schematicCellProps = z139.object({
|
|
19233
|
+
children: z139.string().optional(),
|
|
19234
|
+
horizontalAlign: z139.enum(["left", "center", "right"]).optional(),
|
|
19235
|
+
verticalAlign: z139.enum(["top", "middle", "bottom"]).optional(),
|
|
19161
19236
|
fontSize: distance41.optional(),
|
|
19162
|
-
rowSpan:
|
|
19163
|
-
colSpan:
|
|
19237
|
+
rowSpan: z139.number().optional(),
|
|
19238
|
+
colSpan: z139.number().optional(),
|
|
19164
19239
|
width: distance41.optional(),
|
|
19165
|
-
text:
|
|
19240
|
+
text: z139.string().optional()
|
|
19166
19241
|
});
|
|
19167
19242
|
expectTypesMatch(true);
|
|
19168
19243
|
|
|
19169
19244
|
// lib/components/schematic-section.ts
|
|
19170
19245
|
import { distance as distance42 } from "circuit-json";
|
|
19171
|
-
import { z as
|
|
19172
|
-
var schematicSectionProps =
|
|
19173
|
-
displayName:
|
|
19174
|
-
name:
|
|
19246
|
+
import { z as z140 } from "zod";
|
|
19247
|
+
var schematicSectionProps = z140.object({
|
|
19248
|
+
displayName: z140.string().optional(),
|
|
19249
|
+
name: z140.string(),
|
|
19175
19250
|
sectionTitleFontSize: distance42.optional()
|
|
19176
19251
|
});
|
|
19177
19252
|
expectTypesMatch(
|
|
@@ -19179,38 +19254,38 @@ expectTypesMatch(
|
|
|
19179
19254
|
);
|
|
19180
19255
|
|
|
19181
19256
|
// lib/components/schematic-sheet.ts
|
|
19182
|
-
import { z as
|
|
19257
|
+
import { z as z141 } from "zod";
|
|
19183
19258
|
import { distance as distance43 } from "circuit-json";
|
|
19184
|
-
var schematicSheetProps =
|
|
19185
|
-
name:
|
|
19186
|
-
displayName:
|
|
19187
|
-
sheetIndex:
|
|
19188
|
-
sheetSize:
|
|
19189
|
-
sheetWidth: distance43.pipe(
|
|
19190
|
-
sheetHeight: distance43.pipe(
|
|
19191
|
-
children:
|
|
19259
|
+
var schematicSheetProps = z141.object({
|
|
19260
|
+
name: z141.string().optional(),
|
|
19261
|
+
displayName: z141.string().optional(),
|
|
19262
|
+
sheetIndex: z141.number().optional(),
|
|
19263
|
+
sheetSize: z141.enum(["A4", "ANSI_B"]).default("A4"),
|
|
19264
|
+
sheetWidth: distance43.pipe(z141.number().positive()).optional(),
|
|
19265
|
+
sheetHeight: distance43.pipe(z141.number().positive()).optional(),
|
|
19266
|
+
children: z141.any().optional()
|
|
19192
19267
|
});
|
|
19193
19268
|
expectTypesMatch(true);
|
|
19194
19269
|
|
|
19195
19270
|
// lib/components/schematic-graphic.ts
|
|
19196
|
-
import { z as
|
|
19271
|
+
import { z as z142 } from "zod";
|
|
19197
19272
|
var nonemptyUrl = url.refine((value) => value.trim().length > 0, {
|
|
19198
19273
|
message: "imageUrl cannot be empty"
|
|
19199
19274
|
});
|
|
19200
|
-
var
|
|
19275
|
+
var positiveDistance5 = (fieldName) => distance.refine((value) => Number.isFinite(value) && value > 0, {
|
|
19201
19276
|
message: `${fieldName} must be a positive finite distance`
|
|
19202
19277
|
});
|
|
19203
|
-
var schematicGraphicProps =
|
|
19278
|
+
var schematicGraphicProps = z142.object({
|
|
19204
19279
|
imageUrl: nonemptyUrl.optional(),
|
|
19205
|
-
svgContent:
|
|
19280
|
+
svgContent: z142.string().refine((value) => value.trim().length > 0, {
|
|
19206
19281
|
message: "svgContent cannot be empty"
|
|
19207
19282
|
}).optional(),
|
|
19208
|
-
width:
|
|
19209
|
-
height:
|
|
19283
|
+
width: positiveDistance5("width").optional(),
|
|
19284
|
+
height: positiveDistance5("height").optional()
|
|
19210
19285
|
}).superRefine(({ imageUrl, svgContent }, ctx) => {
|
|
19211
19286
|
if (imageUrl === void 0 && svgContent === void 0) {
|
|
19212
19287
|
ctx.addIssue({
|
|
19213
|
-
code:
|
|
19288
|
+
code: z142.ZodIssueCode.custom,
|
|
19214
19289
|
message: "At least one of imageUrl or svgContent is required"
|
|
19215
19290
|
});
|
|
19216
19291
|
}
|
|
@@ -19221,40 +19296,40 @@ expectTypesMatch(
|
|
|
19221
19296
|
|
|
19222
19297
|
// lib/components/copper-text.ts
|
|
19223
19298
|
import { layer_ref as layer_ref13, length as length8 } from "circuit-json";
|
|
19224
|
-
import { z as
|
|
19299
|
+
import { z as z143 } from "zod";
|
|
19225
19300
|
var copperTextProps = pcbLayoutProps.extend({
|
|
19226
|
-
text:
|
|
19301
|
+
text: z143.string(),
|
|
19227
19302
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
19228
|
-
font:
|
|
19303
|
+
font: z143.enum(["tscircuit2024"]).optional(),
|
|
19229
19304
|
fontSize: length8.optional(),
|
|
19230
|
-
layers:
|
|
19231
|
-
knockout:
|
|
19232
|
-
mirrored:
|
|
19305
|
+
layers: z143.array(layer_ref13).optional(),
|
|
19306
|
+
knockout: z143.boolean().optional(),
|
|
19307
|
+
mirrored: z143.boolean().optional()
|
|
19233
19308
|
});
|
|
19234
19309
|
|
|
19235
19310
|
// lib/components/silkscreen-text.ts
|
|
19236
19311
|
import { layer_ref as layer_ref14, length as length9 } from "circuit-json";
|
|
19237
|
-
import { z as
|
|
19312
|
+
import { z as z144 } from "zod";
|
|
19238
19313
|
var silkscreenTextProps = pcbLayoutProps.extend({
|
|
19239
|
-
text:
|
|
19314
|
+
text: z144.string(),
|
|
19240
19315
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
19241
|
-
font:
|
|
19316
|
+
font: z144.enum(["tscircuit2024"]).optional(),
|
|
19242
19317
|
fontSize: length9.optional(),
|
|
19243
19318
|
/**
|
|
19244
19319
|
* If true, text will knock out underlying silkscreen
|
|
19245
19320
|
*/
|
|
19246
|
-
isKnockout:
|
|
19321
|
+
isKnockout: z144.boolean().optional(),
|
|
19247
19322
|
knockoutPadding: length9.optional(),
|
|
19248
19323
|
knockoutPaddingLeft: length9.optional(),
|
|
19249
19324
|
knockoutPaddingRight: length9.optional(),
|
|
19250
19325
|
knockoutPaddingTop: length9.optional(),
|
|
19251
19326
|
knockoutPaddingBottom: length9.optional(),
|
|
19252
|
-
layers:
|
|
19327
|
+
layers: z144.array(layer_ref14).optional()
|
|
19253
19328
|
});
|
|
19254
19329
|
|
|
19255
19330
|
// lib/components/silkscreen-path.ts
|
|
19256
19331
|
import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
|
|
19257
|
-
import { z as
|
|
19332
|
+
import { z as z145 } from "zod";
|
|
19258
19333
|
var silkscreenPathProps = pcbLayoutProps.omit({
|
|
19259
19334
|
pcbLeftEdgeX: true,
|
|
19260
19335
|
pcbRightEdgeX: true,
|
|
@@ -19266,7 +19341,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
|
|
|
19266
19341
|
pcbOffsetY: true,
|
|
19267
19342
|
pcbRotation: true
|
|
19268
19343
|
}).extend({
|
|
19269
|
-
route:
|
|
19344
|
+
route: z145.array(route_hint_point5),
|
|
19270
19345
|
strokeWidth: length10.optional()
|
|
19271
19346
|
});
|
|
19272
19347
|
|
|
@@ -19288,10 +19363,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({
|
|
|
19288
19363
|
|
|
19289
19364
|
// lib/components/silkscreen-rect.ts
|
|
19290
19365
|
import { distance as distance45 } from "circuit-json";
|
|
19291
|
-
import { z as
|
|
19366
|
+
import { z as z146 } from "zod";
|
|
19292
19367
|
var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
19293
|
-
filled:
|
|
19294
|
-
stroke:
|
|
19368
|
+
filled: z146.boolean().default(true).optional(),
|
|
19369
|
+
stroke: z146.enum(["dashed", "solid", "none"]).optional(),
|
|
19295
19370
|
strokeWidth: distance45.optional(),
|
|
19296
19371
|
width: distance45,
|
|
19297
19372
|
height: distance45,
|
|
@@ -19300,10 +19375,10 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
19300
19375
|
|
|
19301
19376
|
// lib/components/silkscreen-circle.ts
|
|
19302
19377
|
import { distance as distance46 } from "circuit-json";
|
|
19303
|
-
import { z as
|
|
19378
|
+
import { z as z147 } from "zod";
|
|
19304
19379
|
var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
19305
|
-
isFilled:
|
|
19306
|
-
isOutline:
|
|
19380
|
+
isFilled: z147.boolean().optional(),
|
|
19381
|
+
isOutline: z147.boolean().optional(),
|
|
19307
19382
|
strokeWidth: distance46.optional(),
|
|
19308
19383
|
radius: distance46
|
|
19309
19384
|
});
|
|
@@ -19321,69 +19396,69 @@ expectTypesMatch(true);
|
|
|
19321
19396
|
|
|
19322
19397
|
// lib/components/trace-hint.ts
|
|
19323
19398
|
import { distance as distance47, layer_ref as layer_ref15, route_hint_point as route_hint_point6 } from "circuit-json";
|
|
19324
|
-
import { z as
|
|
19325
|
-
var routeHintPointProps =
|
|
19399
|
+
import { z as z149 } from "zod";
|
|
19400
|
+
var routeHintPointProps = z149.object({
|
|
19326
19401
|
x: distance47,
|
|
19327
19402
|
y: distance47,
|
|
19328
|
-
via:
|
|
19403
|
+
via: z149.boolean().optional(),
|
|
19329
19404
|
toLayer: layer_ref15.optional()
|
|
19330
19405
|
});
|
|
19331
|
-
var traceHintProps =
|
|
19332
|
-
for:
|
|
19406
|
+
var traceHintProps = z149.object({
|
|
19407
|
+
for: z149.string().optional().describe(
|
|
19333
19408
|
"Selector for the port you're targeting, not required if you're inside a trace"
|
|
19334
19409
|
),
|
|
19335
|
-
order:
|
|
19410
|
+
order: z149.number().optional(),
|
|
19336
19411
|
offset: route_hint_point6.or(routeHintPointProps).optional(),
|
|
19337
|
-
offsets:
|
|
19338
|
-
traceWidth:
|
|
19412
|
+
offsets: z149.array(route_hint_point6).or(z149.array(routeHintPointProps)).optional(),
|
|
19413
|
+
traceWidth: z149.number().optional()
|
|
19339
19414
|
});
|
|
19340
19415
|
|
|
19341
19416
|
// lib/components/port.ts
|
|
19342
19417
|
import { distance as distance48 } from "circuit-json";
|
|
19343
|
-
import { z as
|
|
19418
|
+
import { z as z150 } from "zod";
|
|
19344
19419
|
var portProps = commonLayoutProps.extend({
|
|
19345
|
-
name:
|
|
19346
|
-
pinNumber:
|
|
19347
|
-
schStemLength:
|
|
19348
|
-
schPinLabelFontSize:
|
|
19420
|
+
name: z150.string().optional(),
|
|
19421
|
+
pinNumber: z150.number().optional(),
|
|
19422
|
+
schStemLength: z150.number().optional(),
|
|
19423
|
+
schPinLabelFontSize: z150.enum(["default", "sm"]).or(
|
|
19349
19424
|
distance48.refine((value) => Number.isFinite(value) && value > 0, {
|
|
19350
19425
|
message: "Schematic pin-label font size must be positive and finite"
|
|
19351
19426
|
})
|
|
19352
19427
|
).optional(),
|
|
19353
|
-
aliases:
|
|
19354
|
-
layer:
|
|
19355
|
-
layers:
|
|
19356
|
-
schX:
|
|
19357
|
-
schY:
|
|
19428
|
+
aliases: z150.array(z150.string()).optional(),
|
|
19429
|
+
layer: z150.string().optional(),
|
|
19430
|
+
layers: z150.array(z150.string()).optional(),
|
|
19431
|
+
schX: z150.number().optional(),
|
|
19432
|
+
schY: z150.number().optional(),
|
|
19358
19433
|
direction: direction.optional(),
|
|
19359
|
-
connectsTo:
|
|
19434
|
+
connectsTo: z150.string().or(z150.array(z150.string())).optional(),
|
|
19360
19435
|
kicadPinMetadata: kicadPinMetadata.optional(),
|
|
19361
|
-
hasInversionCircle:
|
|
19436
|
+
hasInversionCircle: z150.boolean().optional()
|
|
19362
19437
|
});
|
|
19363
19438
|
|
|
19364
19439
|
// lib/components/pcb-note-text.ts
|
|
19365
19440
|
import { length as length11 } from "circuit-json";
|
|
19366
|
-
import { z as
|
|
19441
|
+
import { z as z151 } from "zod";
|
|
19367
19442
|
var pcbNoteTextProps = pcbLayoutProps.extend({
|
|
19368
|
-
text:
|
|
19369
|
-
anchorAlignment:
|
|
19370
|
-
font:
|
|
19443
|
+
text: z151.string(),
|
|
19444
|
+
anchorAlignment: z151.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
19445
|
+
font: z151.enum(["tscircuit2024"]).optional(),
|
|
19371
19446
|
fontSize: length11.optional(),
|
|
19372
|
-
color:
|
|
19447
|
+
color: z151.string().optional()
|
|
19373
19448
|
});
|
|
19374
19449
|
expectTypesMatch(true);
|
|
19375
19450
|
|
|
19376
19451
|
// lib/components/pcb-note-rect.ts
|
|
19377
19452
|
import { distance as distance49 } from "circuit-json";
|
|
19378
|
-
import { z as
|
|
19453
|
+
import { z as z152 } from "zod";
|
|
19379
19454
|
var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
19380
19455
|
width: distance49,
|
|
19381
19456
|
height: distance49,
|
|
19382
19457
|
strokeWidth: distance49.optional(),
|
|
19383
|
-
isFilled:
|
|
19384
|
-
hasStroke:
|
|
19385
|
-
isStrokeDashed:
|
|
19386
|
-
color:
|
|
19458
|
+
isFilled: z152.boolean().optional(),
|
|
19459
|
+
hasStroke: z152.boolean().optional(),
|
|
19460
|
+
isStrokeDashed: z152.boolean().optional(),
|
|
19461
|
+
color: z152.string().optional(),
|
|
19387
19462
|
cornerRadius: distance49.optional()
|
|
19388
19463
|
});
|
|
19389
19464
|
expectTypesMatch(true);
|
|
@@ -19393,7 +19468,7 @@ import {
|
|
|
19393
19468
|
length as length12,
|
|
19394
19469
|
route_hint_point as route_hint_point7
|
|
19395
19470
|
} from "circuit-json";
|
|
19396
|
-
import { z as
|
|
19471
|
+
import { z as z153 } from "zod";
|
|
19397
19472
|
var pcbNotePathProps = pcbLayoutProps.omit({
|
|
19398
19473
|
pcbLeftEdgeX: true,
|
|
19399
19474
|
pcbRightEdgeX: true,
|
|
@@ -19405,15 +19480,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
|
|
|
19405
19480
|
pcbOffsetY: true,
|
|
19406
19481
|
pcbRotation: true
|
|
19407
19482
|
}).extend({
|
|
19408
|
-
route:
|
|
19483
|
+
route: z153.array(route_hint_point7),
|
|
19409
19484
|
strokeWidth: length12.optional(),
|
|
19410
|
-
color:
|
|
19485
|
+
color: z153.string().optional()
|
|
19411
19486
|
});
|
|
19412
19487
|
expectTypesMatch(true);
|
|
19413
19488
|
|
|
19414
19489
|
// lib/components/pcb-note-line.ts
|
|
19415
19490
|
import { distance as distance50 } from "circuit-json";
|
|
19416
|
-
import { z as
|
|
19491
|
+
import { z as z154 } from "zod";
|
|
19417
19492
|
var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
19418
19493
|
pcbLeftEdgeX: true,
|
|
19419
19494
|
pcbRightEdgeX: true,
|
|
@@ -19430,15 +19505,15 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
|
19430
19505
|
x2: distance50,
|
|
19431
19506
|
y2: distance50,
|
|
19432
19507
|
strokeWidth: distance50.optional(),
|
|
19433
|
-
color:
|
|
19434
|
-
isDashed:
|
|
19508
|
+
color: z154.string().optional(),
|
|
19509
|
+
isDashed: z154.boolean().optional()
|
|
19435
19510
|
});
|
|
19436
19511
|
expectTypesMatch(true);
|
|
19437
19512
|
|
|
19438
19513
|
// lib/components/pcb-note-dimension.ts
|
|
19439
19514
|
import { distance as distance51, length as length13 } from "circuit-json";
|
|
19440
|
-
import { z as
|
|
19441
|
-
var dimensionTarget2 =
|
|
19515
|
+
import { z as z155 } from "zod";
|
|
19516
|
+
var dimensionTarget2 = z155.union([z155.string(), point]);
|
|
19442
19517
|
var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
19443
19518
|
pcbLeftEdgeX: true,
|
|
19444
19519
|
pcbRightEdgeX: true,
|
|
@@ -19452,114 +19527,114 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
19452
19527
|
}).extend({
|
|
19453
19528
|
from: dimensionTarget2,
|
|
19454
19529
|
to: dimensionTarget2,
|
|
19455
|
-
text:
|
|
19530
|
+
text: z155.string().optional(),
|
|
19456
19531
|
offset: distance51.optional(),
|
|
19457
|
-
offsetDirection:
|
|
19458
|
-
font:
|
|
19532
|
+
offsetDirection: z155.object({ x: z155.number().finite(), y: z155.number().finite() }).optional(),
|
|
19533
|
+
font: z155.enum(["tscircuit2024"]).optional(),
|
|
19459
19534
|
fontSize: length13.optional(),
|
|
19460
|
-
color:
|
|
19535
|
+
color: z155.string().optional(),
|
|
19461
19536
|
arrowSize: distance51.optional(),
|
|
19462
|
-
units:
|
|
19463
|
-
outerEdgeToEdge:
|
|
19464
|
-
centerToCenter:
|
|
19465
|
-
innerEdgeToEdge:
|
|
19537
|
+
units: z155.enum(["in", "mm"]).optional(),
|
|
19538
|
+
outerEdgeToEdge: z155.literal(true).optional(),
|
|
19539
|
+
centerToCenter: z155.literal(true).optional(),
|
|
19540
|
+
innerEdgeToEdge: z155.literal(true).optional()
|
|
19466
19541
|
});
|
|
19467
19542
|
expectTypesMatch(
|
|
19468
19543
|
true
|
|
19469
19544
|
);
|
|
19470
19545
|
|
|
19471
19546
|
// lib/platformConfig.ts
|
|
19472
|
-
import { z as
|
|
19473
|
-
var unvalidatedCircuitJson =
|
|
19474
|
-
var footprintLibraryResult =
|
|
19475
|
-
footprintCircuitJson:
|
|
19547
|
+
import { z as z156 } from "zod";
|
|
19548
|
+
var unvalidatedCircuitJson = z156.array(z156.any()).describe("Circuit JSON");
|
|
19549
|
+
var footprintLibraryResult = z156.object({
|
|
19550
|
+
footprintCircuitJson: z156.array(z156.any()),
|
|
19476
19551
|
cadModel: cadModelProp.optional()
|
|
19477
19552
|
});
|
|
19478
|
-
var pathToCircuitJsonFn =
|
|
19479
|
-
|
|
19480
|
-
|
|
19481
|
-
|
|
19482
|
-
).returns(
|
|
19553
|
+
var pathToCircuitJsonFn = z156.function().args(z156.string()).returns(z156.promise(footprintLibraryResult)).or(
|
|
19554
|
+
z156.function().args(
|
|
19555
|
+
z156.string(),
|
|
19556
|
+
z156.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
|
|
19557
|
+
).returns(z156.promise(footprintLibraryResult))
|
|
19483
19558
|
).describe("A function that takes a path and returns Circuit JSON");
|
|
19484
|
-
var footprintFileParserEntry =
|
|
19485
|
-
loadFromUrl:
|
|
19559
|
+
var footprintFileParserEntry = z156.object({
|
|
19560
|
+
loadFromUrl: z156.function().args(z156.string()).returns(z156.promise(footprintLibraryResult)).describe(
|
|
19486
19561
|
"A function that takes a footprint file URL and returns Circuit JSON"
|
|
19487
19562
|
)
|
|
19488
19563
|
});
|
|
19489
|
-
var spiceEngineSimulationResult =
|
|
19490
|
-
engineVersionString:
|
|
19564
|
+
var spiceEngineSimulationResult = z156.object({
|
|
19565
|
+
engineVersionString: z156.string().optional(),
|
|
19491
19566
|
simulationResultCircuitJson: unvalidatedCircuitJson
|
|
19492
19567
|
});
|
|
19493
|
-
var spiceEngineZod =
|
|
19494
|
-
simulate:
|
|
19568
|
+
var spiceEngineZod = z156.object({
|
|
19569
|
+
simulate: z156.function().args(z156.string()).returns(z156.promise(spiceEngineSimulationResult)).describe(
|
|
19495
19570
|
"A function that takes a SPICE string and returns a simulation result"
|
|
19496
19571
|
)
|
|
19497
19572
|
});
|
|
19498
|
-
var defaultSpiceEngine =
|
|
19573
|
+
var defaultSpiceEngine = z156.custom(
|
|
19499
19574
|
(value) => typeof value === "string"
|
|
19500
19575
|
);
|
|
19501
|
-
var autorouterInstance =
|
|
19502
|
-
run:
|
|
19503
|
-
getOutputSimpleRouteJson:
|
|
19576
|
+
var autorouterInstance = z156.object({
|
|
19577
|
+
run: z156.function().args().returns(z156.promise(z156.unknown())).describe("Run the autorouter"),
|
|
19578
|
+
getOutputSimpleRouteJson: z156.function().args().returns(z156.promise(z156.any())).describe("Get the resulting SimpleRouteJson")
|
|
19504
19579
|
});
|
|
19505
|
-
var autorouterDefinition =
|
|
19506
|
-
createAutorouter:
|
|
19580
|
+
var autorouterDefinition = z156.object({
|
|
19581
|
+
createAutorouter: z156.function().args(z156.any(), z156.any().optional()).returns(z156.union([autorouterInstance, z156.promise(autorouterInstance)])).describe("Create an autorouter instance")
|
|
19507
19582
|
});
|
|
19508
|
-
var platformFetch =
|
|
19509
|
-
var localCacheEngine =
|
|
19583
|
+
var platformFetch = z156.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
|
|
19584
|
+
var localCacheEngine = z156.custom(
|
|
19510
19585
|
(value) => typeof value === "object" && value !== null && "getItem" in value && typeof value.getItem === "function" && "setItem" in value && typeof value.setItem === "function"
|
|
19511
19586
|
);
|
|
19512
|
-
var fabricatorEngine =
|
|
19587
|
+
var fabricatorEngine = z156.custom(
|
|
19513
19588
|
(value) => typeof value === "object" && value !== null && "runDrcChecks" in value && typeof value.runDrcChecks === "function"
|
|
19514
19589
|
);
|
|
19515
|
-
var platformConfig =
|
|
19590
|
+
var platformConfig = z156.object({
|
|
19516
19591
|
partsEngine: partsEngine.optional(),
|
|
19517
19592
|
fabricatorEngine: fabricatorEngine.optional(),
|
|
19518
19593
|
autorouter: autorouterProp.optional(),
|
|
19519
|
-
autorouterMap:
|
|
19520
|
-
allowLegacyAutorouters:
|
|
19594
|
+
autorouterMap: z156.record(z156.string(), autorouterDefinition).optional(),
|
|
19595
|
+
allowLegacyAutorouters: z156.boolean().optional(),
|
|
19521
19596
|
registryApiUrl: url.optional(),
|
|
19522
19597
|
cloudAutorouterUrl: url.optional(),
|
|
19523
|
-
projectName:
|
|
19598
|
+
projectName: z156.string().optional(),
|
|
19524
19599
|
projectBaseUrl: url.optional(),
|
|
19525
|
-
version:
|
|
19600
|
+
version: z156.string().optional(),
|
|
19526
19601
|
url: url.optional(),
|
|
19527
|
-
printBoardInformationToSilkscreen:
|
|
19528
|
-
includeBoardFiles:
|
|
19602
|
+
printBoardInformationToSilkscreen: z156.boolean().optional(),
|
|
19603
|
+
includeBoardFiles: z156.array(z156.string()).describe(
|
|
19529
19604
|
'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
|
|
19530
19605
|
).optional(),
|
|
19531
|
-
snapshotsDir:
|
|
19606
|
+
snapshotsDir: z156.string().describe(
|
|
19532
19607
|
'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
|
|
19533
19608
|
).optional(),
|
|
19534
19609
|
defaultSpiceEngine: defaultSpiceEngine.optional(),
|
|
19535
|
-
unitPreference:
|
|
19610
|
+
unitPreference: z156.enum(["mm", "in", "mil"]).optional(),
|
|
19536
19611
|
localCacheEngine: localCacheEngine.optional(),
|
|
19537
|
-
useCloudAutorouter:
|
|
19538
|
-
enablePartOrientationAnalysis:
|
|
19539
|
-
pcbPackSolverTimeoutMs:
|
|
19540
|
-
pcbDisabled:
|
|
19541
|
-
routingDisabled:
|
|
19542
|
-
schematicDisabled:
|
|
19543
|
-
partsEngineDisabled:
|
|
19544
|
-
analogSimulationDisabled:
|
|
19545
|
-
drcChecksDisabled:
|
|
19546
|
-
netlistDrcChecksDisabled:
|
|
19547
|
-
routingDrcChecksDisabled:
|
|
19548
|
-
placementDrcChecksDisabled:
|
|
19549
|
-
pinSpecificationDrcChecksDisabled:
|
|
19550
|
-
spiceEngineMap:
|
|
19551
|
-
footprintLibraryMap:
|
|
19552
|
-
|
|
19553
|
-
|
|
19612
|
+
useCloudAutorouter: z156.boolean().optional(),
|
|
19613
|
+
enablePartOrientationAnalysis: z156.boolean().optional(),
|
|
19614
|
+
pcbPackSolverTimeoutMs: z156.number().finite().positive().optional(),
|
|
19615
|
+
pcbDisabled: z156.boolean().optional(),
|
|
19616
|
+
routingDisabled: z156.boolean().optional(),
|
|
19617
|
+
schematicDisabled: z156.boolean().optional(),
|
|
19618
|
+
partsEngineDisabled: z156.boolean().optional(),
|
|
19619
|
+
analogSimulationDisabled: z156.boolean().optional(),
|
|
19620
|
+
drcChecksDisabled: z156.boolean().optional(),
|
|
19621
|
+
netlistDrcChecksDisabled: z156.boolean().optional(),
|
|
19622
|
+
routingDrcChecksDisabled: z156.boolean().optional(),
|
|
19623
|
+
placementDrcChecksDisabled: z156.boolean().optional(),
|
|
19624
|
+
pinSpecificationDrcChecksDisabled: z156.boolean().optional(),
|
|
19625
|
+
spiceEngineMap: z156.record(z156.string(), spiceEngineZod).optional(),
|
|
19626
|
+
footprintLibraryMap: z156.record(
|
|
19627
|
+
z156.string(),
|
|
19628
|
+
z156.union([
|
|
19554
19629
|
pathToCircuitJsonFn,
|
|
19555
|
-
|
|
19556
|
-
|
|
19557
|
-
|
|
19630
|
+
z156.record(
|
|
19631
|
+
z156.string(),
|
|
19632
|
+
z156.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
|
|
19558
19633
|
)
|
|
19559
19634
|
])
|
|
19560
19635
|
).optional(),
|
|
19561
|
-
footprintFileParserMap:
|
|
19562
|
-
resolveProjectStaticFileImportUrl:
|
|
19636
|
+
footprintFileParserMap: z156.record(z156.string(), footprintFileParserEntry).optional(),
|
|
19637
|
+
resolveProjectStaticFileImportUrl: z156.function().args(z156.string()).returns(z156.promise(z156.string())).describe(
|
|
19563
19638
|
"A function that returns a string URL for static files for the project"
|
|
19564
19639
|
).optional(),
|
|
19565
19640
|
platformFetch: platformFetch.optional()
|
|
@@ -19606,6 +19681,7 @@ export {
|
|
|
19606
19681
|
antennaShapes,
|
|
19607
19682
|
assemblyCadAssemblyProps,
|
|
19608
19683
|
assemblyDeviceProps,
|
|
19684
|
+
assemblyMotorProps,
|
|
19609
19685
|
assemblyProps,
|
|
19610
19686
|
assemblyScreenProps,
|
|
19611
19687
|
assemblySubassemblyProps,
|
|
@@ -19767,6 +19843,7 @@ export {
|
|
|
19767
19843
|
pcbPathPoint,
|
|
19768
19844
|
pcbSameXConstraintProps,
|
|
19769
19845
|
pcbSameYConstraintProps,
|
|
19846
|
+
pcbSoldermaskOpeningProps,
|
|
19770
19847
|
pcbStiffenerProps,
|
|
19771
19848
|
pcbStyle,
|
|
19772
19849
|
pcbSx,
|