@tscircuit/props 0.0.677 → 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 +11 -0
- package/dist/index.d.ts +185 -80
- package/dist/index.js +1264 -1228
- 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/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,45 +16853,45 @@ 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"]
|
|
@@ -16864,83 +16899,83 @@ var pcbBendProps = z46.object({
|
|
|
16864
16899
|
expectTypesMatch(true);
|
|
16865
16900
|
|
|
16866
16901
|
// lib/components/pcb-soldermask-opening.ts
|
|
16867
|
-
import { z as
|
|
16868
|
-
var finiteDistance2 = distance.pipe(
|
|
16869
|
-
var positiveDistance2 = distance.pipe(
|
|
16902
|
+
import { z as z48 } from "zod";
|
|
16903
|
+
var finiteDistance2 = distance.pipe(z48.number().finite());
|
|
16904
|
+
var positiveDistance2 = distance.pipe(z48.number().finite().positive());
|
|
16870
16905
|
var openingBaseProps = pcbLayoutProps.omit({ layer: true }).extend({
|
|
16871
|
-
name:
|
|
16906
|
+
name: z48.string().optional(),
|
|
16872
16907
|
/** Face whose solder mask or flex coverlay is removed. Required. */
|
|
16873
|
-
layer:
|
|
16908
|
+
layer: z48.enum(["top", "bottom"])
|
|
16874
16909
|
});
|
|
16875
|
-
var pcbSoldermaskOpeningProps =
|
|
16910
|
+
var pcbSoldermaskOpeningProps = z48.discriminatedUnion("shape", [
|
|
16876
16911
|
openingBaseProps.extend({
|
|
16877
|
-
shape:
|
|
16912
|
+
shape: z48.literal("rect"),
|
|
16878
16913
|
width: positiveDistance2,
|
|
16879
16914
|
height: positiveDistance2,
|
|
16880
|
-
radius:
|
|
16881
|
-
points:
|
|
16915
|
+
radius: z48.never().optional(),
|
|
16916
|
+
points: z48.never().optional()
|
|
16882
16917
|
}),
|
|
16883
16918
|
openingBaseProps.extend({
|
|
16884
|
-
shape:
|
|
16919
|
+
shape: z48.literal("circle"),
|
|
16885
16920
|
radius: positiveDistance2,
|
|
16886
|
-
width:
|
|
16887
|
-
height:
|
|
16888
|
-
points:
|
|
16921
|
+
width: z48.never().optional(),
|
|
16922
|
+
height: z48.never().optional(),
|
|
16923
|
+
points: z48.never().optional()
|
|
16889
16924
|
}),
|
|
16890
16925
|
openingBaseProps.extend({
|
|
16891
|
-
shape:
|
|
16926
|
+
shape: z48.literal("polygon"),
|
|
16892
16927
|
/** Local vertices; pcbX/pcbY/pcbRotation place the implicitly closed boundary. */
|
|
16893
|
-
points:
|
|
16928
|
+
points: z48.array(z48.object({ x: finiteDistance2, y: finiteDistance2 })).min(3).refine((points) => {
|
|
16894
16929
|
const twiceArea = points.reduce((sum, point8, index) => {
|
|
16895
16930
|
const next = points[(index + 1) % points.length];
|
|
16896
16931
|
return sum + point8.x * next.y - next.x * point8.y;
|
|
16897
16932
|
}, 0);
|
|
16898
16933
|
return Number.isFinite(twiceArea) && twiceArea !== 0;
|
|
16899
16934
|
}, "Solder-mask opening must enclose a nonzero area"),
|
|
16900
|
-
width:
|
|
16901
|
-
height:
|
|
16902
|
-
radius:
|
|
16935
|
+
width: z48.never().optional(),
|
|
16936
|
+
height: z48.never().optional(),
|
|
16937
|
+
radius: z48.never().optional()
|
|
16903
16938
|
})
|
|
16904
16939
|
]);
|
|
16905
16940
|
|
|
16906
16941
|
// lib/components/pcb-stiffener.ts
|
|
16907
|
-
import { z as
|
|
16908
|
-
var positiveDistance3 = distance.pipe(
|
|
16909
|
-
var finiteDistance3 = distance.pipe(
|
|
16942
|
+
import { z as z49 } from "zod";
|
|
16943
|
+
var positiveDistance3 = distance.pipe(z49.number().finite().positive());
|
|
16944
|
+
var finiteDistance3 = distance.pipe(z49.number().finite());
|
|
16910
16945
|
var stiffenerBaseProps = pcbLayoutProps.omit({ layer: true }).extend({
|
|
16911
|
-
name:
|
|
16946
|
+
name: z49.string().optional(),
|
|
16912
16947
|
/** Board attachment face, not a copper-layer assignment. Required. */
|
|
16913
|
-
layer:
|
|
16914
|
-
material:
|
|
16948
|
+
layer: z49.enum(["top", "bottom"]),
|
|
16949
|
+
material: z49.enum(["fr4", "polyimide", "stainless_steel", "aluminum"]),
|
|
16915
16950
|
/** Stiffener material thickness only, excluding PCB and adhesive. */
|
|
16916
16951
|
thickness: positiveDistance3,
|
|
16917
16952
|
/** Nonnegative adhesive thickness; omission means unspecified, not zero. */
|
|
16918
|
-
adhesiveThickness: distance.pipe(
|
|
16953
|
+
adhesiveThickness: distance.pipe(z49.number().finite().nonnegative()).optional()
|
|
16919
16954
|
});
|
|
16920
|
-
var pcbStiffenerProps =
|
|
16955
|
+
var pcbStiffenerProps = z49.discriminatedUnion("shape", [
|
|
16921
16956
|
stiffenerBaseProps.extend({
|
|
16922
|
-
shape:
|
|
16957
|
+
shape: z49.literal("rect"),
|
|
16923
16958
|
width: positiveDistance3,
|
|
16924
16959
|
height: positiveDistance3,
|
|
16925
|
-
outline:
|
|
16960
|
+
outline: z49.never().optional()
|
|
16926
16961
|
}),
|
|
16927
16962
|
stiffenerBaseProps.extend({
|
|
16928
|
-
shape:
|
|
16963
|
+
shape: z49.literal("polygon"),
|
|
16929
16964
|
/** Local vertices transformed by pcbX/pcbY/pcbRotation; implicitly closed. */
|
|
16930
|
-
outline:
|
|
16965
|
+
outline: z49.array(z49.object({ x: finiteDistance3, y: finiteDistance3 })).min(3).refine((points) => {
|
|
16931
16966
|
const twiceArea = points.reduce((sum, p, i) => {
|
|
16932
16967
|
const next = points[(i + 1) % points.length];
|
|
16933
16968
|
return sum + p.x * next.y - next.x * p.y;
|
|
16934
16969
|
}, 0);
|
|
16935
16970
|
return Number.isFinite(twiceArea) && twiceArea !== 0;
|
|
16936
16971
|
}, "Stiffener outline must enclose a nonzero area"),
|
|
16937
|
-
width:
|
|
16938
|
-
height:
|
|
16972
|
+
width: z49.never().optional(),
|
|
16973
|
+
height: z49.never().optional()
|
|
16939
16974
|
})
|
|
16940
16975
|
]);
|
|
16941
16976
|
|
|
16942
16977
|
// lib/components/panel.ts
|
|
16943
|
-
import { z as
|
|
16978
|
+
import { z as z50 } from "zod";
|
|
16944
16979
|
var panelProps = baseGroupProps.omit({
|
|
16945
16980
|
width: true,
|
|
16946
16981
|
height: true,
|
|
@@ -16949,25 +16984,25 @@ var panelProps = baseGroupProps.omit({
|
|
|
16949
16984
|
}).extend({
|
|
16950
16985
|
width: distance.optional(),
|
|
16951
16986
|
height: distance.optional(),
|
|
16952
|
-
children:
|
|
16987
|
+
children: z50.any().optional(),
|
|
16953
16988
|
anchorAlignment: ninePointAnchor.optional(),
|
|
16954
|
-
noSolderMask:
|
|
16955
|
-
panelizationMethod:
|
|
16989
|
+
noSolderMask: z50.boolean().optional(),
|
|
16990
|
+
panelizationMethod: z50.enum(["tab-routing", "outline_routing", "none"]).optional(),
|
|
16956
16991
|
boardGap: distance.optional(),
|
|
16957
|
-
layoutMode:
|
|
16958
|
-
row:
|
|
16959
|
-
col:
|
|
16992
|
+
layoutMode: z50.enum(["grid", "pack", "none"]).optional(),
|
|
16993
|
+
row: z50.number().optional(),
|
|
16994
|
+
col: z50.number().optional(),
|
|
16960
16995
|
cellWidth: distance.optional(),
|
|
16961
16996
|
cellHeight: distance.optional(),
|
|
16962
16997
|
tabWidth: distance.optional(),
|
|
16963
16998
|
tabLength: distance.optional(),
|
|
16964
|
-
mouseBites:
|
|
16999
|
+
mouseBites: z50.boolean().optional(),
|
|
16965
17000
|
edgePadding: distance.optional(),
|
|
16966
17001
|
edgePaddingLeft: distance.optional(),
|
|
16967
17002
|
edgePaddingRight: distance.optional(),
|
|
16968
17003
|
edgePaddingTop: distance.optional(),
|
|
16969
17004
|
edgePaddingBottom: distance.optional(),
|
|
16970
|
-
_subcircuitCachingEnabled:
|
|
17005
|
+
_subcircuitCachingEnabled: z50.boolean().optional()
|
|
16971
17006
|
});
|
|
16972
17007
|
expectTypesMatch(true);
|
|
16973
17008
|
|
|
@@ -16978,23 +17013,23 @@ expectTypesMatch(true);
|
|
|
16978
17013
|
|
|
16979
17014
|
// lib/common/fanoutTracePath.ts
|
|
16980
17015
|
import { layer_ref as layer_ref5 } from "circuit-json";
|
|
16981
|
-
import { z as
|
|
17016
|
+
import { z as z52 } from "zod";
|
|
16982
17017
|
var coordinate = distance.refine(Number.isFinite, "Coordinate must be finite");
|
|
16983
17018
|
var positiveDistance4 = distance.refine(
|
|
16984
17019
|
(value) => Number.isFinite(value) && value > 0,
|
|
16985
17020
|
"Distance must be positive and finite"
|
|
16986
17021
|
);
|
|
16987
|
-
var routePoint =
|
|
16988
|
-
|
|
16989
|
-
route_type:
|
|
17022
|
+
var routePoint = z52.discriminatedUnion("route_type", [
|
|
17023
|
+
z52.object({
|
|
17024
|
+
route_type: z52.literal("wire"),
|
|
16990
17025
|
x: coordinate,
|
|
16991
17026
|
y: coordinate,
|
|
16992
17027
|
width: positiveDistance4,
|
|
16993
|
-
width_interpolation_mode:
|
|
17028
|
+
width_interpolation_mode: z52.enum(["linear", "quadratic"]).optional().describe("Interpolate width from this point to the next wire point."),
|
|
16994
17029
|
layer: layer_ref5
|
|
16995
17030
|
}),
|
|
16996
|
-
|
|
16997
|
-
route_type:
|
|
17031
|
+
z52.object({
|
|
17032
|
+
route_type: z52.literal("via"),
|
|
16998
17033
|
x: coordinate,
|
|
16999
17034
|
y: coordinate,
|
|
17000
17035
|
from_layer: layer_ref5,
|
|
@@ -17003,9 +17038,9 @@ var routePoint = z51.discriminatedUnion("route_type", [
|
|
|
17003
17038
|
via_hole_diameter: positiveDistance4.optional()
|
|
17004
17039
|
})
|
|
17005
17040
|
]);
|
|
17006
|
-
var fanoutTracePath =
|
|
17007
|
-
connection:
|
|
17008
|
-
route:
|
|
17041
|
+
var fanoutTracePath = z52.object({
|
|
17042
|
+
connection: z52.string().min(1),
|
|
17043
|
+
route: z52.array(routePoint).min(2).superRefine((route, ctx) => {
|
|
17009
17044
|
const first = route[0];
|
|
17010
17045
|
let layer = first?.route_type === "via" ? first.from_layer : first?.layer;
|
|
17011
17046
|
for (const [index, point8] of route.entries()) {
|
|
@@ -17032,16 +17067,16 @@ var fanoutTracePath = z51.object({
|
|
|
17032
17067
|
|
|
17033
17068
|
// lib/common/fanoutProps.ts
|
|
17034
17069
|
import { layer_ref as layer_ref6 } from "circuit-json";
|
|
17035
|
-
import { z as
|
|
17070
|
+
import { z as z54 } from "zod";
|
|
17036
17071
|
|
|
17037
17072
|
// lib/common/fanoutBoundaryPadding.ts
|
|
17038
|
-
import { z as
|
|
17073
|
+
import { z as z53 } from "zod";
|
|
17039
17074
|
var nonnegativeDistance = distance.refine((value) => value >= 0, {
|
|
17040
17075
|
message: "Fanout boundary padding cannot be negative"
|
|
17041
17076
|
});
|
|
17042
|
-
var fanoutBoundaryPadding =
|
|
17077
|
+
var fanoutBoundaryPadding = z53.union([
|
|
17043
17078
|
nonnegativeDistance,
|
|
17044
|
-
|
|
17079
|
+
z53.object({
|
|
17045
17080
|
top: nonnegativeDistance.optional(),
|
|
17046
17081
|
right: nonnegativeDistance.optional(),
|
|
17047
17082
|
bottom: nonnegativeDistance.optional(),
|
|
@@ -17068,32 +17103,32 @@ var canonicalBusFanoutDirectionValues = [
|
|
|
17068
17103
|
"leftside_top",
|
|
17069
17104
|
"center"
|
|
17070
17105
|
];
|
|
17071
|
-
var canonicalBusFanoutDirection =
|
|
17106
|
+
var canonicalBusFanoutDirection = z54.enum(
|
|
17072
17107
|
canonicalBusFanoutDirectionValues
|
|
17073
17108
|
);
|
|
17074
|
-
var busFanoutDirection =
|
|
17109
|
+
var busFanoutDirection = z54.union([
|
|
17075
17110
|
ninePointAnchor,
|
|
17076
17111
|
canonicalBusFanoutDirection,
|
|
17077
|
-
|
|
17078
|
-
direction:
|
|
17112
|
+
z54.object({
|
|
17113
|
+
direction: z54.union([ninePointAnchor, canonicalBusFanoutDirection])
|
|
17079
17114
|
})
|
|
17080
17115
|
]);
|
|
17081
|
-
var fanoutProps =
|
|
17082
|
-
busFanoutDirections:
|
|
17116
|
+
var fanoutProps = z54.object({
|
|
17117
|
+
busFanoutDirections: z54.record(busFanoutDirection).optional(),
|
|
17083
17118
|
fanoutBoundaryPadding: fanoutBoundaryPadding.optional(),
|
|
17084
|
-
fanoutRoutingLayers:
|
|
17085
|
-
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()
|
|
17086
17121
|
});
|
|
17087
17122
|
expectTypesMatch(true);
|
|
17088
17123
|
|
|
17089
17124
|
// lib/components/breakout.ts
|
|
17090
|
-
import { z as
|
|
17125
|
+
import { z as z55 } from "zod";
|
|
17091
17126
|
var nonnegativeFanoutMargin = distance.refine((value) => value >= 0, {
|
|
17092
17127
|
message: "Fanout margin cannot be negative"
|
|
17093
17128
|
});
|
|
17094
17129
|
var breakoutProps = subcircuitGroupProps.extend({
|
|
17095
17130
|
autorouter: autorouterProp.default("fanout"),
|
|
17096
|
-
pcbTracePaths:
|
|
17131
|
+
pcbTracePaths: z55.array(fanoutTracePath).optional(),
|
|
17097
17132
|
padding: distance.optional(),
|
|
17098
17133
|
paddingLeft: distance.optional(),
|
|
17099
17134
|
paddingRight: distance.optional(),
|
|
@@ -17107,41 +17142,41 @@ expectTypesMatch(true);
|
|
|
17107
17142
|
// lib/components/chip.ts
|
|
17108
17143
|
import { distance as distance12, supplier_name as supplier_name2 } from "circuit-json";
|
|
17109
17144
|
import { isValidElement } from "react";
|
|
17110
|
-
import { z as
|
|
17111
|
-
var connectionTarget2 =
|
|
17112
|
-
var noConnectProp =
|
|
17113
|
-
var connectionsProp =
|
|
17114
|
-
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(
|
|
17115
17150
|
(v) => !!v && typeof v === "object" && "type" in v && "props" in v
|
|
17116
17151
|
);
|
|
17117
|
-
var internalCircuitElement =
|
|
17152
|
+
var internalCircuitElement = z56.custom(
|
|
17118
17153
|
(value) => isValidElement(value) && value.type === "internalcircuit"
|
|
17119
17154
|
);
|
|
17120
|
-
var pinLabelsProp =
|
|
17155
|
+
var pinLabelsProp = z56.record(
|
|
17121
17156
|
schematicPinLabel,
|
|
17122
|
-
schematicPinLabel.or(
|
|
17157
|
+
schematicPinLabel.or(z56.array(schematicPinLabel).readonly()).or(z56.array(schematicPinLabel))
|
|
17123
17158
|
);
|
|
17124
17159
|
expectTypesMatch(true);
|
|
17125
|
-
var pinCompatibleVariant =
|
|
17126
|
-
manufacturerPartNumber:
|
|
17127
|
-
supplierPartNumber:
|
|
17160
|
+
var pinCompatibleVariant = z56.object({
|
|
17161
|
+
manufacturerPartNumber: z56.string().optional(),
|
|
17162
|
+
supplierPartNumber: z56.record(supplier_name2, z56.array(z56.string())).optional()
|
|
17128
17163
|
});
|
|
17129
17164
|
var chipProps = commonComponentProps.extend({
|
|
17130
|
-
manufacturerPartNumber:
|
|
17165
|
+
manufacturerPartNumber: z56.string().optional(),
|
|
17131
17166
|
pinLabels: pinLabelsProp.optional(),
|
|
17132
|
-
showPinAliases:
|
|
17133
|
-
pcbPinLabels:
|
|
17134
|
-
internallyConnectedPins:
|
|
17135
|
-
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(),
|
|
17136
17171
|
schPinArrangement: schematicPortArrangement.optional(),
|
|
17137
17172
|
schPortArrangement: schematicPortArrangement.optional(),
|
|
17138
|
-
pinCompatibleVariants:
|
|
17173
|
+
pinCompatibleVariants: z56.array(pinCompatibleVariant).optional(),
|
|
17139
17174
|
schPinStyle: schematicPinStyle.optional(),
|
|
17140
17175
|
schPinSpacing: distance12.optional(),
|
|
17141
17176
|
schWidth: distance12.optional(),
|
|
17142
17177
|
schHeight: distance12.optional(),
|
|
17143
|
-
noSchematicRepresentation:
|
|
17144
|
-
schShowInternalCircuit:
|
|
17178
|
+
noSchematicRepresentation: z56.boolean().optional(),
|
|
17179
|
+
schShowInternalCircuit: z56.boolean().optional().default(false),
|
|
17145
17180
|
noConnect: noConnectProp.optional(),
|
|
17146
17181
|
connections: connectionsProp.optional(),
|
|
17147
17182
|
spiceModel: spicemodelElement.optional(),
|
|
@@ -17156,38 +17191,38 @@ expectTypesMatch(true);
|
|
|
17156
17191
|
|
|
17157
17192
|
// lib/components/jumper.ts
|
|
17158
17193
|
import { distance as distance13 } from "circuit-json";
|
|
17159
|
-
import { z as
|
|
17194
|
+
import { z as z57 } from "zod";
|
|
17160
17195
|
var jumperProps = commonComponentProps.extend({
|
|
17161
|
-
manufacturerPartNumber:
|
|
17162
|
-
pinLabels:
|
|
17163
|
-
|
|
17164
|
-
schematicPinLabel.or(
|
|
17196
|
+
manufacturerPartNumber: z57.string().optional(),
|
|
17197
|
+
pinLabels: z57.record(
|
|
17198
|
+
z57.number().or(schematicPinLabel),
|
|
17199
|
+
schematicPinLabel.or(z57.array(schematicPinLabel))
|
|
17165
17200
|
).optional(),
|
|
17166
17201
|
schPinStyle: schematicPinStyle.optional(),
|
|
17167
17202
|
schPinSpacing: distance13.optional(),
|
|
17168
17203
|
schWidth: distance13.optional(),
|
|
17169
17204
|
schHeight: distance13.optional(),
|
|
17170
|
-
schDirection:
|
|
17205
|
+
schDirection: z57.enum(["left", "right"]).optional(),
|
|
17171
17206
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
17172
17207
|
schPortArrangement: schematicPortArrangement.optional(),
|
|
17173
|
-
pcbPinLabels:
|
|
17174
|
-
pinCount:
|
|
17175
|
-
internallyConnectedPins:
|
|
17176
|
-
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()
|
|
17177
17212
|
});
|
|
17178
17213
|
expectTypesMatch(true);
|
|
17179
17214
|
|
|
17180
17215
|
// lib/components/solderjumper.ts
|
|
17181
|
-
import { z as
|
|
17216
|
+
import { z as z58 } from "zod";
|
|
17182
17217
|
var solderjumperProps = jumperProps.extend({
|
|
17183
|
-
bridgedPins:
|
|
17184
|
-
bridged:
|
|
17218
|
+
bridgedPins: z58.array(z58.array(z58.string())).optional(),
|
|
17219
|
+
bridged: z58.boolean().optional()
|
|
17185
17220
|
});
|
|
17186
17221
|
expectTypesMatch(true);
|
|
17187
17222
|
|
|
17188
17223
|
// lib/components/connector.ts
|
|
17189
|
-
import { z as
|
|
17190
|
-
var connectorStandard =
|
|
17224
|
+
import { z as z59 } from "zod";
|
|
17225
|
+
var connectorStandard = z59.enum([
|
|
17191
17226
|
"usb_c",
|
|
17192
17227
|
"m2",
|
|
17193
17228
|
"jst_sh",
|
|
@@ -17199,43 +17234,43 @@ var connectorStandard = z58.enum([
|
|
|
17199
17234
|
]);
|
|
17200
17235
|
var connectorProps = chipProps.extend({
|
|
17201
17236
|
standard: connectorStandard.optional(),
|
|
17202
|
-
pinCount:
|
|
17237
|
+
pinCount: z59.number().int().positive().optional()
|
|
17203
17238
|
});
|
|
17204
17239
|
expectTypesMatch(true);
|
|
17205
17240
|
|
|
17206
17241
|
// lib/components/interconnect.ts
|
|
17207
|
-
import { z as
|
|
17242
|
+
import { z as z60 } from "zod";
|
|
17208
17243
|
var interconnectProps = commonComponentProps.extend({
|
|
17209
|
-
standard:
|
|
17210
|
-
pinLabels:
|
|
17211
|
-
|
|
17212
|
-
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))
|
|
17213
17248
|
).optional(),
|
|
17214
|
-
internallyConnectedPins:
|
|
17249
|
+
internallyConnectedPins: z60.array(z60.array(z60.union([z60.string(), z60.number()]))).optional()
|
|
17215
17250
|
});
|
|
17216
17251
|
expectTypesMatch(true);
|
|
17217
17252
|
|
|
17218
17253
|
// lib/components/fuse.ts
|
|
17219
|
-
import { z as
|
|
17254
|
+
import { z as z61 } from "zod";
|
|
17220
17255
|
var fusePinLabels = ["pin1", "pin2"];
|
|
17221
17256
|
var fuseProps = commonComponentProps.extend({
|
|
17222
|
-
currentRating:
|
|
17223
|
-
voltageRating:
|
|
17224
|
-
schShowRatings:
|
|
17257
|
+
currentRating: z61.union([z61.number(), z61.string()]),
|
|
17258
|
+
voltageRating: z61.union([z61.number(), z61.string()]).optional(),
|
|
17259
|
+
schShowRatings: z61.boolean().optional(),
|
|
17225
17260
|
schOrientation: schematicOrientation.optional(),
|
|
17226
|
-
connections:
|
|
17227
|
-
|
|
17228
|
-
|
|
17229
|
-
|
|
17230
|
-
|
|
17231
|
-
|
|
17261
|
+
connections: z61.record(
|
|
17262
|
+
z61.string(),
|
|
17263
|
+
z61.union([
|
|
17264
|
+
z61.string(),
|
|
17265
|
+
z61.array(z61.string()).readonly(),
|
|
17266
|
+
z61.array(z61.string())
|
|
17232
17267
|
])
|
|
17233
17268
|
).optional()
|
|
17234
17269
|
});
|
|
17235
17270
|
|
|
17236
17271
|
// lib/components/platedhole.ts
|
|
17237
17272
|
import { distance as distance14 } from "circuit-json";
|
|
17238
|
-
import { z as
|
|
17273
|
+
import { z as z62 } from "zod";
|
|
17239
17274
|
var DEFAULT_PIN_HEADER_HOLE_DIAMETER = "0.04in";
|
|
17240
17275
|
var DEFAULT_PIN_HEADER_OUTER_DIAMETER = "0.1in";
|
|
17241
17276
|
var inferPlatedHoleShapeAndDefaults = (rawProps) => {
|
|
@@ -17267,26 +17302,26 @@ var inferPlatedHoleShapeAndDefaults = (rawProps) => {
|
|
|
17267
17302
|
props.outerDiameter = DEFAULT_PIN_HEADER_OUTER_DIAMETER;
|
|
17268
17303
|
return props;
|
|
17269
17304
|
};
|
|
17270
|
-
var distanceHiddenUndefined =
|
|
17305
|
+
var distanceHiddenUndefined = z62.custom().transform((a) => {
|
|
17271
17306
|
if (a === void 0) return void 0;
|
|
17272
17307
|
return distance14.parse(a);
|
|
17273
17308
|
});
|
|
17274
|
-
var platedHolePropsByShape =
|
|
17309
|
+
var platedHolePropsByShape = z62.discriminatedUnion("shape", [
|
|
17275
17310
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
17276
|
-
name:
|
|
17277
|
-
connectsTo:
|
|
17278
|
-
shape:
|
|
17311
|
+
name: z62.string().optional(),
|
|
17312
|
+
connectsTo: z62.string().or(z62.array(z62.string())).optional(),
|
|
17313
|
+
shape: z62.literal("circle"),
|
|
17279
17314
|
holeDiameter: distance14,
|
|
17280
17315
|
outerDiameter: distance14,
|
|
17281
17316
|
padDiameter: distance14.optional().describe("Diameter of the copper pad"),
|
|
17282
17317
|
portHints: portHints.optional(),
|
|
17283
17318
|
solderMaskMargin: distance14.optional(),
|
|
17284
|
-
coveredWithSolderMask:
|
|
17319
|
+
coveredWithSolderMask: z62.boolean().optional()
|
|
17285
17320
|
}),
|
|
17286
17321
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
17287
|
-
name:
|
|
17288
|
-
connectsTo:
|
|
17289
|
-
shape:
|
|
17322
|
+
name: z62.string().optional(),
|
|
17323
|
+
connectsTo: z62.string().or(z62.array(z62.string())).optional(),
|
|
17324
|
+
shape: z62.literal("oval"),
|
|
17290
17325
|
outerWidth: distance14,
|
|
17291
17326
|
outerHeight: distance14,
|
|
17292
17327
|
holeWidth: distanceHiddenUndefined,
|
|
@@ -17295,13 +17330,13 @@ var platedHolePropsByShape = z61.discriminatedUnion("shape", [
|
|
|
17295
17330
|
innerHeight: distance14.optional().describe("DEPRECATED use holeHeight"),
|
|
17296
17331
|
portHints: portHints.optional(),
|
|
17297
17332
|
solderMaskMargin: distance14.optional(),
|
|
17298
|
-
coveredWithSolderMask:
|
|
17333
|
+
coveredWithSolderMask: z62.boolean().optional()
|
|
17299
17334
|
}),
|
|
17300
17335
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
17301
|
-
name:
|
|
17302
|
-
connectsTo:
|
|
17303
|
-
shape:
|
|
17304
|
-
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(),
|
|
17305
17340
|
outerWidth: distance14,
|
|
17306
17341
|
outerHeight: distance14,
|
|
17307
17342
|
holeWidth: distanceHiddenUndefined,
|
|
@@ -17312,30 +17347,30 @@ var platedHolePropsByShape = z61.discriminatedUnion("shape", [
|
|
|
17312
17347
|
holeOffsetX: distance14.optional(),
|
|
17313
17348
|
holeOffsetY: distance14.optional(),
|
|
17314
17349
|
solderMaskMargin: distance14.optional(),
|
|
17315
|
-
coveredWithSolderMask:
|
|
17350
|
+
coveredWithSolderMask: z62.boolean().optional()
|
|
17316
17351
|
}),
|
|
17317
17352
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
17318
|
-
name:
|
|
17319
|
-
connectsTo:
|
|
17320
|
-
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"),
|
|
17321
17356
|
holeDiameter: distance14,
|
|
17322
17357
|
rectPadWidth: distance14,
|
|
17323
17358
|
rectPadHeight: distance14,
|
|
17324
17359
|
rectBorderRadius: distance14.optional(),
|
|
17325
|
-
holeShape:
|
|
17326
|
-
padShape:
|
|
17360
|
+
holeShape: z62.literal("circle").optional(),
|
|
17361
|
+
padShape: z62.literal("rect").optional(),
|
|
17327
17362
|
portHints: portHints.optional(),
|
|
17328
17363
|
holeOffsetX: distance14.optional(),
|
|
17329
17364
|
holeOffsetY: distance14.optional(),
|
|
17330
17365
|
solderMaskMargin: distance14.optional(),
|
|
17331
|
-
coveredWithSolderMask:
|
|
17366
|
+
coveredWithSolderMask: z62.boolean().optional()
|
|
17332
17367
|
}),
|
|
17333
17368
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
17334
|
-
name:
|
|
17335
|
-
connectsTo:
|
|
17336
|
-
shape:
|
|
17337
|
-
holeShape:
|
|
17338
|
-
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(),
|
|
17339
17374
|
holeWidth: distance14,
|
|
17340
17375
|
holeHeight: distance14,
|
|
17341
17376
|
rectPadWidth: distance14,
|
|
@@ -17345,22 +17380,22 @@ var platedHolePropsByShape = z61.discriminatedUnion("shape", [
|
|
|
17345
17380
|
holeOffsetX: distance14.optional(),
|
|
17346
17381
|
holeOffsetY: distance14.optional(),
|
|
17347
17382
|
solderMaskMargin: distance14.optional(),
|
|
17348
|
-
coveredWithSolderMask:
|
|
17383
|
+
coveredWithSolderMask: z62.boolean().optional()
|
|
17349
17384
|
}),
|
|
17350
17385
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
17351
|
-
name:
|
|
17352
|
-
connectsTo:
|
|
17353
|
-
shape:
|
|
17354
|
-
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"]),
|
|
17355
17390
|
holeDiameter: distance14.optional(),
|
|
17356
17391
|
holeWidth: distance14.optional(),
|
|
17357
17392
|
holeHeight: distance14.optional(),
|
|
17358
|
-
padOutline:
|
|
17393
|
+
padOutline: z62.array(point),
|
|
17359
17394
|
holeOffsetX: distance14,
|
|
17360
17395
|
holeOffsetY: distance14,
|
|
17361
17396
|
portHints: portHints.optional(),
|
|
17362
17397
|
solderMaskMargin: distance14.optional(),
|
|
17363
|
-
coveredWithSolderMask:
|
|
17398
|
+
coveredWithSolderMask: z62.boolean().optional()
|
|
17364
17399
|
})
|
|
17365
17400
|
]).transform((a) => {
|
|
17366
17401
|
if ("innerWidth" in a && a.innerWidth !== void 0) {
|
|
@@ -17371,7 +17406,7 @@ var platedHolePropsByShape = z61.discriminatedUnion("shape", [
|
|
|
17371
17406
|
}
|
|
17372
17407
|
return a;
|
|
17373
17408
|
});
|
|
17374
|
-
var platedHoleProps =
|
|
17409
|
+
var platedHoleProps = z62.preprocess(
|
|
17375
17410
|
inferPlatedHoleShapeAndDefaults,
|
|
17376
17411
|
platedHolePropsByShape
|
|
17377
17412
|
);
|
|
@@ -17379,7 +17414,7 @@ expectTypesMatch(true);
|
|
|
17379
17414
|
|
|
17380
17415
|
// lib/components/resistor.ts
|
|
17381
17416
|
import { resistance } from "circuit-json";
|
|
17382
|
-
import { z as
|
|
17417
|
+
import { z as z63 } from "zod";
|
|
17383
17418
|
var resistorPinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
17384
17419
|
var resistorImperialFootprintNames = /* @__PURE__ */ new Set([
|
|
17385
17420
|
"01005",
|
|
@@ -17403,7 +17438,7 @@ var resistorFootprintProp = footprintProp.optional().transform(mapResistorFootpr
|
|
|
17403
17438
|
var resistorProps = commonComponentProps.extend({
|
|
17404
17439
|
footprint: resistorFootprintProp,
|
|
17405
17440
|
resistance,
|
|
17406
|
-
tolerance:
|
|
17441
|
+
tolerance: z63.union([z63.string(), z63.number()]).transform((val) => {
|
|
17407
17442
|
if (typeof val === "string") {
|
|
17408
17443
|
if (val.endsWith("%")) {
|
|
17409
17444
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -17412,12 +17447,12 @@ var resistorProps = commonComponentProps.extend({
|
|
|
17412
17447
|
}
|
|
17413
17448
|
return val;
|
|
17414
17449
|
}).pipe(
|
|
17415
|
-
|
|
17450
|
+
z63.number().min(0, "Tolerance must be non-negative").max(1, "Tolerance cannot be greater than 100%")
|
|
17416
17451
|
).optional(),
|
|
17417
|
-
pullupFor:
|
|
17418
|
-
pullupTo:
|
|
17419
|
-
pulldownFor:
|
|
17420
|
-
pulldownTo:
|
|
17452
|
+
pullupFor: z63.string().optional(),
|
|
17453
|
+
pullupTo: z63.string().optional(),
|
|
17454
|
+
pulldownFor: z63.string().optional(),
|
|
17455
|
+
pulldownTo: z63.string().optional(),
|
|
17421
17456
|
schOrientation: schematicOrientation.optional(),
|
|
17422
17457
|
schSize: schematicSymbolSize.optional(),
|
|
17423
17458
|
connections: createConnectionsProp(resistorPinLabels).optional()
|
|
@@ -17427,18 +17462,18 @@ expectTypesMatch(true);
|
|
|
17427
17462
|
|
|
17428
17463
|
// lib/components/potentiometer.ts
|
|
17429
17464
|
import { resistance as resistance2 } from "circuit-json";
|
|
17430
|
-
import { z as
|
|
17465
|
+
import { z as z64 } from "zod";
|
|
17431
17466
|
var potentiometerPinLabels = ["pin1", "pin2", "pin3"];
|
|
17432
17467
|
var potentiometerProps = commonComponentProps.extend({
|
|
17433
17468
|
maxResistance: resistance2,
|
|
17434
|
-
pinVariant:
|
|
17469
|
+
pinVariant: z64.enum(["two_pin", "three_pin"]).optional(),
|
|
17435
17470
|
connections: createConnectionsProp(potentiometerPinLabels).optional()
|
|
17436
17471
|
});
|
|
17437
17472
|
expectTypesMatch(true);
|
|
17438
17473
|
|
|
17439
17474
|
// lib/components/crystal.ts
|
|
17440
17475
|
import { capacitance, distance as distance15, frequency } from "circuit-json";
|
|
17441
|
-
import { z as
|
|
17476
|
+
import { z as z65 } from "zod";
|
|
17442
17477
|
var crystalPins = [
|
|
17443
17478
|
"pin1",
|
|
17444
17479
|
"left",
|
|
@@ -17451,9 +17486,9 @@ var crystalProps = commonComponentProps.extend({
|
|
|
17451
17486
|
frequency,
|
|
17452
17487
|
loadCapacitance: capacitance,
|
|
17453
17488
|
maxTraceLength: distance15.optional(),
|
|
17454
|
-
manufacturerPartNumber:
|
|
17455
|
-
mpn:
|
|
17456
|
-
pinVariant:
|
|
17489
|
+
manufacturerPartNumber: z65.string().optional(),
|
|
17490
|
+
mpn: z65.string().optional(),
|
|
17491
|
+
pinVariant: z65.enum(["two_pin", "four_pin"]).optional(),
|
|
17457
17492
|
schOrientation: schematicOrientation.optional(),
|
|
17458
17493
|
connections: createConnectionsProp(crystalPins).optional()
|
|
17459
17494
|
});
|
|
@@ -17461,34 +17496,34 @@ expectTypesMatch(true);
|
|
|
17461
17496
|
|
|
17462
17497
|
// lib/components/resonator.ts
|
|
17463
17498
|
import { frequency as frequency2, capacitance as capacitance2 } from "circuit-json";
|
|
17464
|
-
import { z as
|
|
17499
|
+
import { z as z66 } from "zod";
|
|
17465
17500
|
var resonatorProps = commonComponentProps.extend({
|
|
17466
17501
|
frequency: frequency2,
|
|
17467
17502
|
loadCapacitance: capacitance2,
|
|
17468
|
-
pinVariant:
|
|
17503
|
+
pinVariant: z66.enum(["no_ground", "ground_pin", "two_ground_pins"]).optional()
|
|
17469
17504
|
});
|
|
17470
17505
|
expectTypesMatch(true);
|
|
17471
17506
|
|
|
17472
17507
|
// lib/components/stampboard.ts
|
|
17473
17508
|
import { distance as distance16 } from "circuit-json";
|
|
17474
|
-
import { z as
|
|
17509
|
+
import { z as z67 } from "zod";
|
|
17475
17510
|
var stampboardProps = boardProps.extend({
|
|
17476
|
-
leftPinCount:
|
|
17477
|
-
rightPinCount:
|
|
17478
|
-
topPinCount:
|
|
17479
|
-
bottomPinCount:
|
|
17480
|
-
leftPins:
|
|
17481
|
-
rightPins:
|
|
17482
|
-
topPins:
|
|
17483
|
-
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(),
|
|
17484
17519
|
pinPitch: distance16.optional(),
|
|
17485
|
-
innerHoles:
|
|
17520
|
+
innerHoles: z67.boolean().optional()
|
|
17486
17521
|
});
|
|
17487
17522
|
expectTypesMatch(true);
|
|
17488
17523
|
|
|
17489
17524
|
// lib/components/capacitor.ts
|
|
17490
17525
|
import { capacitance as capacitance3, distance as distance17, voltage } from "circuit-json";
|
|
17491
|
-
import { z as
|
|
17526
|
+
import { z as z68 } from "zod";
|
|
17492
17527
|
var capacitorPinLabels = [
|
|
17493
17528
|
"pin1",
|
|
17494
17529
|
"pin2",
|
|
@@ -17500,12 +17535,12 @@ var capacitorPinLabels = [
|
|
|
17500
17535
|
var capacitorProps = commonComponentProps.extend({
|
|
17501
17536
|
capacitance: capacitance3,
|
|
17502
17537
|
maxVoltageRating: voltage.optional(),
|
|
17503
|
-
schShowRatings:
|
|
17504
|
-
polarized:
|
|
17505
|
-
decouplingFor:
|
|
17506
|
-
decouplingTo:
|
|
17507
|
-
bypassFor:
|
|
17508
|
-
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(),
|
|
17509
17544
|
maxDecouplingTraceLength: distance17.optional(),
|
|
17510
17545
|
schOrientation: schematicOrientation.optional(),
|
|
17511
17546
|
schSize: schematicSymbolSize.optional(),
|
|
@@ -17516,14 +17551,14 @@ expectTypesMatch(true);
|
|
|
17516
17551
|
|
|
17517
17552
|
// lib/components/net.ts
|
|
17518
17553
|
import { distance as distance18 } from "circuit-json";
|
|
17519
|
-
import { z as
|
|
17520
|
-
var netProps =
|
|
17521
|
-
name:
|
|
17522
|
-
connectsTo:
|
|
17523
|
-
routingPhaseIndex:
|
|
17524
|
-
highlightColor:
|
|
17525
|
-
isPowerNet:
|
|
17526
|
-
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(),
|
|
17527
17562
|
nominalTraceWidth: distance18.optional()
|
|
17528
17563
|
});
|
|
17529
17564
|
expectTypesMatch(true);
|
|
@@ -17537,55 +17572,55 @@ var fiducialProps = commonComponentProps.extend({
|
|
|
17537
17572
|
expectTypesMatch(true);
|
|
17538
17573
|
|
|
17539
17574
|
// lib/components/constrainedlayout.ts
|
|
17540
|
-
import { z as
|
|
17541
|
-
var constrainedLayoutProps =
|
|
17542
|
-
name:
|
|
17543
|
-
pcbOnly:
|
|
17544
|
-
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()
|
|
17545
17580
|
});
|
|
17546
17581
|
expectTypesMatch(true);
|
|
17547
17582
|
|
|
17548
17583
|
// lib/components/constraint.ts
|
|
17549
|
-
import { z as
|
|
17550
|
-
var pcbXDistConstraintProps =
|
|
17551
|
-
pcb:
|
|
17584
|
+
import { z as z72 } from "zod";
|
|
17585
|
+
var pcbXDistConstraintProps = z72.object({
|
|
17586
|
+
pcb: z72.literal(true).optional(),
|
|
17552
17587
|
xDist: distance,
|
|
17553
|
-
left:
|
|
17554
|
-
right:
|
|
17555
|
-
edgeToEdge:
|
|
17556
|
-
centerToCenter:
|
|
17588
|
+
left: z72.string(),
|
|
17589
|
+
right: z72.string(),
|
|
17590
|
+
edgeToEdge: z72.literal(true).optional(),
|
|
17591
|
+
centerToCenter: z72.literal(true).optional()
|
|
17557
17592
|
});
|
|
17558
17593
|
expectTypesMatch(
|
|
17559
17594
|
true
|
|
17560
17595
|
);
|
|
17561
|
-
var pcbYDistConstraintProps =
|
|
17562
|
-
pcb:
|
|
17596
|
+
var pcbYDistConstraintProps = z72.object({
|
|
17597
|
+
pcb: z72.literal(true).optional(),
|
|
17563
17598
|
yDist: distance,
|
|
17564
|
-
top:
|
|
17565
|
-
bottom:
|
|
17566
|
-
edgeToEdge:
|
|
17567
|
-
centerToCenter:
|
|
17599
|
+
top: z72.string(),
|
|
17600
|
+
bottom: z72.string(),
|
|
17601
|
+
edgeToEdge: z72.literal(true).optional(),
|
|
17602
|
+
centerToCenter: z72.literal(true).optional()
|
|
17568
17603
|
});
|
|
17569
17604
|
expectTypesMatch(
|
|
17570
17605
|
true
|
|
17571
17606
|
);
|
|
17572
|
-
var pcbSameYConstraintProps =
|
|
17573
|
-
pcb:
|
|
17574
|
-
sameY:
|
|
17575
|
-
for:
|
|
17607
|
+
var pcbSameYConstraintProps = z72.object({
|
|
17608
|
+
pcb: z72.literal(true).optional(),
|
|
17609
|
+
sameY: z72.literal(true).optional(),
|
|
17610
|
+
for: z72.array(z72.string())
|
|
17576
17611
|
});
|
|
17577
17612
|
expectTypesMatch(
|
|
17578
17613
|
true
|
|
17579
17614
|
);
|
|
17580
|
-
var pcbSameXConstraintProps =
|
|
17581
|
-
pcb:
|
|
17582
|
-
sameX:
|
|
17583
|
-
for:
|
|
17615
|
+
var pcbSameXConstraintProps = z72.object({
|
|
17616
|
+
pcb: z72.literal(true).optional(),
|
|
17617
|
+
sameX: z72.literal(true).optional(),
|
|
17618
|
+
for: z72.array(z72.string())
|
|
17584
17619
|
});
|
|
17585
17620
|
expectTypesMatch(
|
|
17586
17621
|
true
|
|
17587
17622
|
);
|
|
17588
|
-
var constraintProps =
|
|
17623
|
+
var constraintProps = z72.union([
|
|
17589
17624
|
pcbXDistConstraintProps,
|
|
17590
17625
|
pcbYDistConstraintProps,
|
|
17591
17626
|
pcbSameYConstraintProps,
|
|
@@ -17594,13 +17629,13 @@ var constraintProps = z71.union([
|
|
|
17594
17629
|
expectTypesMatch(true);
|
|
17595
17630
|
|
|
17596
17631
|
// lib/components/cutout.ts
|
|
17597
|
-
import { z as
|
|
17632
|
+
import { z as z73 } from "zod";
|
|
17598
17633
|
var rectCutoutProps = pcbLayoutProps.omit({
|
|
17599
17634
|
layer: true,
|
|
17600
17635
|
pcbRotation: true
|
|
17601
17636
|
}).extend({
|
|
17602
|
-
name:
|
|
17603
|
-
shape:
|
|
17637
|
+
name: z73.string().optional(),
|
|
17638
|
+
shape: z73.literal("rect"),
|
|
17604
17639
|
width: distance,
|
|
17605
17640
|
height: distance
|
|
17606
17641
|
});
|
|
@@ -17609,8 +17644,8 @@ var circleCutoutProps = pcbLayoutProps.omit({
|
|
|
17609
17644
|
layer: true,
|
|
17610
17645
|
pcbRotation: true
|
|
17611
17646
|
}).extend({
|
|
17612
|
-
name:
|
|
17613
|
-
shape:
|
|
17647
|
+
name: z73.string().optional(),
|
|
17648
|
+
shape: z73.literal("circle"),
|
|
17614
17649
|
radius: distance
|
|
17615
17650
|
});
|
|
17616
17651
|
expectTypesMatch(true);
|
|
@@ -17618,36 +17653,36 @@ var polygonCutoutProps = pcbLayoutProps.omit({
|
|
|
17618
17653
|
layer: true,
|
|
17619
17654
|
pcbRotation: true
|
|
17620
17655
|
}).extend({
|
|
17621
|
-
name:
|
|
17622
|
-
shape:
|
|
17623
|
-
points:
|
|
17656
|
+
name: z73.string().optional(),
|
|
17657
|
+
shape: z73.literal("polygon"),
|
|
17658
|
+
points: z73.array(point)
|
|
17624
17659
|
});
|
|
17625
17660
|
expectTypesMatch(true);
|
|
17626
|
-
var cutoutProps =
|
|
17661
|
+
var cutoutProps = z73.discriminatedUnion("shape", [
|
|
17627
17662
|
rectCutoutProps,
|
|
17628
17663
|
circleCutoutProps,
|
|
17629
17664
|
polygonCutoutProps
|
|
17630
17665
|
]);
|
|
17631
17666
|
|
|
17632
17667
|
// lib/components/drc-check.ts
|
|
17633
|
-
import { z as
|
|
17634
|
-
var drcCheckProps =
|
|
17635
|
-
name:
|
|
17668
|
+
import { z as z74 } from "zod";
|
|
17669
|
+
var drcCheckProps = z74.object({
|
|
17670
|
+
name: z74.string().optional(),
|
|
17636
17671
|
checkFn: customDrcCheckFn
|
|
17637
17672
|
});
|
|
17638
17673
|
expectTypesMatch(true);
|
|
17639
17674
|
|
|
17640
17675
|
// lib/components/smtpad.ts
|
|
17641
|
-
import { z as
|
|
17676
|
+
import { z as z75 } from "zod";
|
|
17642
17677
|
var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17643
|
-
name:
|
|
17644
|
-
shape:
|
|
17678
|
+
name: z75.string().optional(),
|
|
17679
|
+
shape: z75.literal("rect"),
|
|
17645
17680
|
width: distance,
|
|
17646
17681
|
height: distance,
|
|
17647
17682
|
rectBorderRadius: distance.optional(),
|
|
17648
17683
|
cornerRadius: distance.optional(),
|
|
17649
17684
|
portHints: portHints.optional(),
|
|
17650
|
-
coveredWithSolderMask:
|
|
17685
|
+
coveredWithSolderMask: z75.boolean().optional(),
|
|
17651
17686
|
solderMaskMargin: distance.optional(),
|
|
17652
17687
|
solderMaskMarginLeft: distance.optional(),
|
|
17653
17688
|
solderMaskMarginRight: distance.optional(),
|
|
@@ -17657,14 +17692,14 @@ var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
17657
17692
|
});
|
|
17658
17693
|
expectTypesMatch(true);
|
|
17659
17694
|
var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17660
|
-
name:
|
|
17661
|
-
shape:
|
|
17695
|
+
name: z75.string().optional(),
|
|
17696
|
+
shape: z75.literal("rotated_rect"),
|
|
17662
17697
|
width: distance,
|
|
17663
17698
|
height: distance,
|
|
17664
|
-
ccwRotation:
|
|
17699
|
+
ccwRotation: z75.number(),
|
|
17665
17700
|
cornerRadius: distance.optional(),
|
|
17666
17701
|
portHints: portHints.optional(),
|
|
17667
|
-
coveredWithSolderMask:
|
|
17702
|
+
coveredWithSolderMask: z75.boolean().optional(),
|
|
17668
17703
|
solderMaskMargin: distance.optional(),
|
|
17669
17704
|
solderMaskMarginLeft: distance.optional(),
|
|
17670
17705
|
solderMaskMarginRight: distance.optional(),
|
|
@@ -17674,51 +17709,51 @@ var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
17674
17709
|
});
|
|
17675
17710
|
expectTypesMatch(true);
|
|
17676
17711
|
var circleSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17677
|
-
name:
|
|
17678
|
-
shape:
|
|
17712
|
+
name: z75.string().optional(),
|
|
17713
|
+
shape: z75.literal("circle"),
|
|
17679
17714
|
radius: distance,
|
|
17680
17715
|
portHints: portHints.optional(),
|
|
17681
|
-
coveredWithSolderMask:
|
|
17716
|
+
coveredWithSolderMask: z75.boolean().optional(),
|
|
17682
17717
|
solderMaskMargin: distance.optional(),
|
|
17683
17718
|
solderPasteMargin: distance.optional()
|
|
17684
17719
|
});
|
|
17685
17720
|
expectTypesMatch(true);
|
|
17686
17721
|
var pillSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17687
|
-
name:
|
|
17688
|
-
shape:
|
|
17722
|
+
name: z75.string().optional(),
|
|
17723
|
+
shape: z75.literal("pill"),
|
|
17689
17724
|
width: distance,
|
|
17690
17725
|
height: distance,
|
|
17691
17726
|
radius: distance,
|
|
17692
17727
|
portHints: portHints.optional(),
|
|
17693
|
-
coveredWithSolderMask:
|
|
17728
|
+
coveredWithSolderMask: z75.boolean().optional(),
|
|
17694
17729
|
solderMaskMargin: distance.optional(),
|
|
17695
17730
|
solderPasteMargin: distance.optional()
|
|
17696
17731
|
});
|
|
17697
17732
|
expectTypesMatch(true);
|
|
17698
17733
|
var rotatedPillSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17699
|
-
name:
|
|
17700
|
-
shape:
|
|
17734
|
+
name: z75.string().optional(),
|
|
17735
|
+
shape: z75.literal("rotated_pill"),
|
|
17701
17736
|
width: distance,
|
|
17702
17737
|
height: distance,
|
|
17703
17738
|
radius: distance,
|
|
17704
|
-
ccwRotation:
|
|
17739
|
+
ccwRotation: z75.number(),
|
|
17705
17740
|
portHints: portHints.optional(),
|
|
17706
|
-
coveredWithSolderMask:
|
|
17741
|
+
coveredWithSolderMask: z75.boolean().optional(),
|
|
17707
17742
|
solderMaskMargin: distance.optional(),
|
|
17708
17743
|
solderPasteMargin: distance.optional()
|
|
17709
17744
|
});
|
|
17710
17745
|
expectTypesMatch(true);
|
|
17711
17746
|
var polygonSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17712
|
-
name:
|
|
17713
|
-
shape:
|
|
17714
|
-
points:
|
|
17747
|
+
name: z75.string().optional(),
|
|
17748
|
+
shape: z75.literal("polygon"),
|
|
17749
|
+
points: z75.array(point),
|
|
17715
17750
|
portHints: portHints.optional(),
|
|
17716
|
-
coveredWithSolderMask:
|
|
17751
|
+
coveredWithSolderMask: z75.boolean().optional(),
|
|
17717
17752
|
solderMaskMargin: distance.optional(),
|
|
17718
17753
|
solderPasteMargin: distance.optional()
|
|
17719
17754
|
});
|
|
17720
17755
|
expectTypesMatch(true);
|
|
17721
|
-
var smtPadProps =
|
|
17756
|
+
var smtPadProps = z75.discriminatedUnion("shape", [
|
|
17722
17757
|
circleSmtPadProps,
|
|
17723
17758
|
rectSmtPadProps,
|
|
17724
17759
|
rotatedRectSmtPadProps,
|
|
@@ -17729,63 +17764,63 @@ var smtPadProps = z74.discriminatedUnion("shape", [
|
|
|
17729
17764
|
expectTypesMatch(true);
|
|
17730
17765
|
|
|
17731
17766
|
// lib/components/solderpaste.ts
|
|
17732
|
-
import { z as
|
|
17767
|
+
import { z as z76 } from "zod";
|
|
17733
17768
|
var rectSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17734
|
-
shape:
|
|
17769
|
+
shape: z76.literal("rect"),
|
|
17735
17770
|
width: distance,
|
|
17736
17771
|
height: distance
|
|
17737
17772
|
});
|
|
17738
17773
|
expectTypesMatch(true);
|
|
17739
17774
|
var circleSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17740
|
-
shape:
|
|
17775
|
+
shape: z76.literal("circle"),
|
|
17741
17776
|
radius: distance
|
|
17742
17777
|
});
|
|
17743
17778
|
expectTypesMatch(true);
|
|
17744
|
-
var solderPasteProps =
|
|
17779
|
+
var solderPasteProps = z76.union([
|
|
17745
17780
|
circleSolderPasteProps,
|
|
17746
17781
|
rectSolderPasteProps
|
|
17747
17782
|
]);
|
|
17748
17783
|
expectTypesMatch(true);
|
|
17749
17784
|
|
|
17750
17785
|
// lib/components/hole.ts
|
|
17751
|
-
import { z as
|
|
17786
|
+
import { z as z77 } from "zod";
|
|
17752
17787
|
var circleHoleProps = pcbLayoutProps.extend({
|
|
17753
|
-
name:
|
|
17754
|
-
shape:
|
|
17788
|
+
name: z77.string().optional(),
|
|
17789
|
+
shape: z77.literal("circle").optional(),
|
|
17755
17790
|
diameter: distance.optional(),
|
|
17756
17791
|
radius: distance.optional(),
|
|
17757
17792
|
solderMaskMargin: distance.optional(),
|
|
17758
|
-
coveredWithSolderMask:
|
|
17793
|
+
coveredWithSolderMask: z77.boolean().optional()
|
|
17759
17794
|
}).transform((d) => ({
|
|
17760
17795
|
...d,
|
|
17761
17796
|
diameter: d.diameter ?? 2 * d.radius,
|
|
17762
17797
|
radius: d.radius ?? d.diameter / 2
|
|
17763
17798
|
}));
|
|
17764
17799
|
var pillHoleProps = pcbLayoutProps.extend({
|
|
17765
|
-
name:
|
|
17766
|
-
shape:
|
|
17800
|
+
name: z77.string().optional(),
|
|
17801
|
+
shape: z77.literal("pill"),
|
|
17767
17802
|
width: distance,
|
|
17768
17803
|
height: distance,
|
|
17769
17804
|
solderMaskMargin: distance.optional(),
|
|
17770
|
-
coveredWithSolderMask:
|
|
17805
|
+
coveredWithSolderMask: z77.boolean().optional()
|
|
17771
17806
|
});
|
|
17772
17807
|
var ovalHoleProps = pcbLayoutProps.extend({
|
|
17773
|
-
name:
|
|
17774
|
-
shape:
|
|
17808
|
+
name: z77.string().optional(),
|
|
17809
|
+
shape: z77.literal("oval"),
|
|
17775
17810
|
width: distance,
|
|
17776
17811
|
height: distance,
|
|
17777
17812
|
solderMaskMargin: distance.optional(),
|
|
17778
|
-
coveredWithSolderMask:
|
|
17813
|
+
coveredWithSolderMask: z77.boolean().optional()
|
|
17779
17814
|
});
|
|
17780
17815
|
var rectHoleProps = pcbLayoutProps.extend({
|
|
17781
|
-
name:
|
|
17782
|
-
shape:
|
|
17816
|
+
name: z77.string().optional(),
|
|
17817
|
+
shape: z77.literal("rect"),
|
|
17783
17818
|
width: distance,
|
|
17784
17819
|
height: distance,
|
|
17785
17820
|
solderMaskMargin: distance.optional(),
|
|
17786
|
-
coveredWithSolderMask:
|
|
17821
|
+
coveredWithSolderMask: z77.boolean().optional()
|
|
17787
17822
|
});
|
|
17788
|
-
var holeProps =
|
|
17823
|
+
var holeProps = z77.union([
|
|
17789
17824
|
circleHoleProps,
|
|
17790
17825
|
pillHoleProps,
|
|
17791
17826
|
ovalHoleProps,
|
|
@@ -17794,7 +17829,7 @@ var holeProps = z76.union([
|
|
|
17794
17829
|
expectTypesMatch(true);
|
|
17795
17830
|
|
|
17796
17831
|
// lib/components/antenna.ts
|
|
17797
|
-
import { z as
|
|
17832
|
+
import { z as z78 } from "zod";
|
|
17798
17833
|
var antennaShapes = [
|
|
17799
17834
|
"2.4ghz_quarter_wave_monopole",
|
|
17800
17835
|
"2.4ghz_meandered_monopole",
|
|
@@ -17802,7 +17837,7 @@ var antennaShapes = [
|
|
|
17802
17837
|
"2.4ghz_meandered_inverted_f",
|
|
17803
17838
|
"2.4ghz_folded_dipole"
|
|
17804
17839
|
];
|
|
17805
|
-
var antennaShape =
|
|
17840
|
+
var antennaShape = z78.enum(antennaShapes);
|
|
17806
17841
|
var antennaFrequencyBands = [
|
|
17807
17842
|
"2.4ghz",
|
|
17808
17843
|
"5ghz",
|
|
@@ -17810,7 +17845,7 @@ var antennaFrequencyBands = [
|
|
|
17810
17845
|
"dual_band_2.4ghz_5ghz",
|
|
17811
17846
|
"tri_band_2.4ghz_5ghz_6ghz"
|
|
17812
17847
|
];
|
|
17813
|
-
var antennaFrequencyBand =
|
|
17848
|
+
var antennaFrequencyBand = z78.enum(antennaFrequencyBands);
|
|
17814
17849
|
var antennaProps = commonComponentProps.extend({
|
|
17815
17850
|
antennaShape: antennaShape.optional(),
|
|
17816
17851
|
frequencyBand: antennaFrequencyBand.optional(),
|
|
@@ -17820,39 +17855,39 @@ expectTypesMatch(true);
|
|
|
17820
17855
|
|
|
17821
17856
|
// lib/components/trace.ts
|
|
17822
17857
|
import { distance as distance19, route_hint_point as route_hint_point2 } from "circuit-json";
|
|
17823
|
-
import { z as
|
|
17824
|
-
var portRef =
|
|
17825
|
-
|
|
17826
|
-
|
|
17858
|
+
import { z as z79 } from "zod";
|
|
17859
|
+
var portRef = z79.union([
|
|
17860
|
+
z79.string(),
|
|
17861
|
+
z79.custom(
|
|
17827
17862
|
(v) => typeof v === "object" && v !== null && "getPortSelector" in v && typeof v.getPortSelector === "function"
|
|
17828
17863
|
)
|
|
17829
17864
|
]);
|
|
17830
|
-
var baseTraceProps =
|
|
17831
|
-
key:
|
|
17832
|
-
name:
|
|
17833
|
-
displayName:
|
|
17865
|
+
var baseTraceProps = z79.object({
|
|
17866
|
+
key: z79.string().optional(),
|
|
17867
|
+
name: z79.string().optional(),
|
|
17868
|
+
displayName: z79.string().optional(),
|
|
17834
17869
|
thickness: distance19.optional(),
|
|
17835
17870
|
width: distance19.optional().describe("Alias for trace thickness"),
|
|
17836
|
-
schematicRouteHints:
|
|
17837
|
-
pcbRouteHints:
|
|
17838
|
-
pcbTeardrops:
|
|
17839
|
-
pcbTeardropStart:
|
|
17840
|
-
pcbTeardropEnd:
|
|
17841
|
-
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(),
|
|
17842
17877
|
pcbPath: pcbPath.optional(),
|
|
17843
|
-
pcbPaths:
|
|
17844
|
-
routingPhaseIndex:
|
|
17845
|
-
pcbStraightLine:
|
|
17846
|
-
schDisplayLabel:
|
|
17847
|
-
schStroke:
|
|
17848
|
-
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(),
|
|
17849
17884
|
maxLength: distance19.optional(),
|
|
17850
|
-
maxViaCount:
|
|
17851
|
-
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()
|
|
17852
17887
|
});
|
|
17853
|
-
var traceProps =
|
|
17888
|
+
var traceProps = z79.union([
|
|
17854
17889
|
baseTraceProps.extend({
|
|
17855
|
-
path:
|
|
17890
|
+
path: z79.array(portRef)
|
|
17856
17891
|
}),
|
|
17857
17892
|
baseTraceProps.extend({
|
|
17858
17893
|
from: portRef,
|
|
@@ -17870,31 +17905,31 @@ import {
|
|
|
17870
17905
|
layer_ref as layer_ref7,
|
|
17871
17906
|
resistance as resistance3
|
|
17872
17907
|
} from "circuit-json";
|
|
17873
|
-
import { z as
|
|
17874
|
-
var busProps =
|
|
17875
|
-
name:
|
|
17876
|
-
connections:
|
|
17877
|
-
routingPhaseIndex:
|
|
17878
|
-
maxLengthSkew: distance20.pipe(
|
|
17879
|
-
targetImpedance: resistance3.pipe(
|
|
17880
|
-
pcbTraceWidth: distance20.pipe(
|
|
17881
|
-
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(),
|
|
17882
17917
|
preferredLayer: layer_ref7.optional(),
|
|
17883
|
-
preferredLayers:
|
|
17918
|
+
preferredLayers: z80.array(layer_ref7).min(1).optional()
|
|
17884
17919
|
});
|
|
17885
17920
|
expectTypesMatch(true);
|
|
17886
17921
|
|
|
17887
17922
|
// lib/components/differentialpair.ts
|
|
17888
17923
|
import { distance as distance21, resistance as resistance4 } from "circuit-json";
|
|
17889
|
-
import { z as
|
|
17890
|
-
var differentialPairProps =
|
|
17891
|
-
name:
|
|
17892
|
-
positiveConnection:
|
|
17893
|
-
negativeConnection:
|
|
17894
|
-
maxLengthSkew: distance21.pipe(
|
|
17895
|
-
targetDifferentialImpedance: resistance4.pipe(
|
|
17896
|
-
pcbTraceGap: distance21.pipe(
|
|
17897
|
-
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()
|
|
17898
17933
|
});
|
|
17899
17934
|
expectTypesMatch(true);
|
|
17900
17935
|
|
|
@@ -17902,8 +17937,8 @@ expectTypesMatch(true);
|
|
|
17902
17937
|
import {
|
|
17903
17938
|
layer_ref as layer_ref8
|
|
17904
17939
|
} from "circuit-json";
|
|
17905
|
-
import { z as
|
|
17906
|
-
var footprintInsertionDirection =
|
|
17940
|
+
import { z as z82 } from "zod";
|
|
17941
|
+
var footprintInsertionDirection = z82.enum([
|
|
17907
17942
|
"from_left",
|
|
17908
17943
|
"from_right",
|
|
17909
17944
|
"from_top",
|
|
@@ -17921,11 +17956,11 @@ var footprintInsertionDirection = z81.enum([
|
|
|
17921
17956
|
"from_back"
|
|
17922
17957
|
]);
|
|
17923
17958
|
expectTypesMatch(true);
|
|
17924
|
-
var footprintProps =
|
|
17925
|
-
children:
|
|
17926
|
-
name:
|
|
17959
|
+
var footprintProps = z82.object({
|
|
17960
|
+
children: z82.any().optional(),
|
|
17961
|
+
name: z82.string().optional(),
|
|
17927
17962
|
originalLayer: layer_ref8.default("top").optional(),
|
|
17928
|
-
circuitJson:
|
|
17963
|
+
circuitJson: z82.array(z82.any()).optional(),
|
|
17929
17964
|
src: footprintProp.describe("Can be a footprint or kicad string").optional(),
|
|
17930
17965
|
insertionDirection: footprintInsertionDirection.optional().describe(
|
|
17931
17966
|
"Direction a cable or mating part is attached from, named for the side of the footprint it approaches from, in its unrotated orientation."
|
|
@@ -17937,19 +17972,19 @@ var footprintProps = z81.object({
|
|
|
17937
17972
|
expectTypesMatch(true);
|
|
17938
17973
|
|
|
17939
17974
|
// lib/components/symbol.ts
|
|
17940
|
-
import { z as
|
|
17941
|
-
var symbolProps =
|
|
17942
|
-
originalFacingDirection:
|
|
17975
|
+
import { z as z83 } from "zod";
|
|
17976
|
+
var symbolProps = z83.object({
|
|
17977
|
+
originalFacingDirection: z83.enum(["up", "down", "left", "right"]).default("right").optional(),
|
|
17943
17978
|
width: distance.optional(),
|
|
17944
17979
|
height: distance.optional(),
|
|
17945
|
-
name:
|
|
17980
|
+
name: z83.string().optional()
|
|
17946
17981
|
});
|
|
17947
17982
|
expectTypesMatch(true);
|
|
17948
17983
|
|
|
17949
17984
|
// lib/components/battery.ts
|
|
17950
17985
|
import { voltage as voltage2 } from "circuit-json";
|
|
17951
|
-
import { z as
|
|
17952
|
-
var capacity =
|
|
17986
|
+
import { z as z84 } from "zod";
|
|
17987
|
+
var capacity = z84.number().or(z84.string().endsWith("mAh")).transform((v) => {
|
|
17953
17988
|
if (typeof v === "string") {
|
|
17954
17989
|
const valString = v.replace("mAh", "");
|
|
17955
17990
|
const num = Number.parseFloat(valString);
|
|
@@ -17964,14 +17999,14 @@ var batteryPins = lrPolarPins;
|
|
|
17964
17999
|
var batteryProps = commonComponentProps.extend({
|
|
17965
18000
|
capacity: capacity.optional(),
|
|
17966
18001
|
voltage: voltage2.optional(),
|
|
17967
|
-
standard:
|
|
18002
|
+
standard: z84.enum(["AA", "AAA", "9V", "CR2032", "18650", "C"]).optional(),
|
|
17968
18003
|
schOrientation: schematicOrientation.optional(),
|
|
17969
18004
|
connections: createConnectionsProp(batteryPins).optional()
|
|
17970
18005
|
});
|
|
17971
18006
|
expectTypesMatch(true);
|
|
17972
18007
|
|
|
17973
18008
|
// lib/components/mountedboard.ts
|
|
17974
|
-
import { z as
|
|
18009
|
+
import { z as z85 } from "zod";
|
|
17975
18010
|
var mountedboardProps = subcircuitGroupProps.extend({
|
|
17976
18011
|
manufacturerPartNumber: chipProps.shape.manufacturerPartNumber,
|
|
17977
18012
|
pinLabels: chipProps.shape.pinLabels,
|
|
@@ -17983,7 +18018,7 @@ var mountedboardProps = subcircuitGroupProps.extend({
|
|
|
17983
18018
|
internallyConnectedPins: chipProps.shape.internallyConnectedPins,
|
|
17984
18019
|
externallyConnectedPins: chipProps.shape.externallyConnectedPins,
|
|
17985
18020
|
boardToBoardDistance: distance.optional(),
|
|
17986
|
-
mountOrientation:
|
|
18021
|
+
mountOrientation: z85.enum(["faceDown", "faceUp"]).optional()
|
|
17987
18022
|
});
|
|
17988
18023
|
expectTypesMatch(true);
|
|
17989
18024
|
|
|
@@ -17991,40 +18026,40 @@ expectTypesMatch(true);
|
|
|
17991
18026
|
import { distance as distance22 } from "circuit-json";
|
|
17992
18027
|
|
|
17993
18028
|
// lib/common/pcbOrientation.ts
|
|
17994
|
-
import { z as
|
|
17995
|
-
var pcbOrientation =
|
|
18029
|
+
import { z as z86 } from "zod";
|
|
18030
|
+
var pcbOrientation = z86.enum(["vertical", "horizontal"]).describe(
|
|
17996
18031
|
"vertical means pins go 1->2 downward and horizontal means pins go 1->2 rightward"
|
|
17997
18032
|
);
|
|
17998
18033
|
expectTypesMatch(true);
|
|
17999
18034
|
|
|
18000
18035
|
// lib/components/pin-header.ts
|
|
18001
|
-
import { z as
|
|
18036
|
+
import { z as z87 } from "zod";
|
|
18002
18037
|
var pinHeaderProps = commonComponentProps.extend({
|
|
18003
|
-
pinCount:
|
|
18038
|
+
pinCount: z87.number(),
|
|
18004
18039
|
pitch: distance22.optional(),
|
|
18005
|
-
schFacingDirection:
|
|
18006
|
-
gender:
|
|
18007
|
-
showSilkscreenPinLabels:
|
|
18008
|
-
pcbPinLabels:
|
|
18009
|
-
doubleRow:
|
|
18010
|
-
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(),
|
|
18011
18046
|
pcbOrientation: pcbOrientation.optional(),
|
|
18012
18047
|
holeDiameter: distance22.optional(),
|
|
18013
18048
|
platedDiameter: distance22.optional(),
|
|
18014
|
-
pinLabels:
|
|
18015
|
-
connections:
|
|
18016
|
-
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(),
|
|
18017
18052
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
18018
18053
|
schPinStyle: schematicPinStyle.optional(),
|
|
18019
18054
|
schPinSpacing: distance22.optional(),
|
|
18020
18055
|
schWidth: distance22.optional(),
|
|
18021
18056
|
schHeight: distance22.optional(),
|
|
18022
|
-
connectsFromAbove:
|
|
18023
|
-
connectsFromBelow:
|
|
18057
|
+
connectsFromAbove: z87.boolean().optional(),
|
|
18058
|
+
connectsFromBelow: z87.boolean().optional()
|
|
18024
18059
|
}).superRefine((props, ctx) => {
|
|
18025
18060
|
if (props.connectsFromAbove && props.connectsFromBelow) {
|
|
18026
18061
|
ctx.addIssue({
|
|
18027
|
-
code:
|
|
18062
|
+
code: z87.ZodIssueCode.custom,
|
|
18028
18063
|
message: "connectsFromAbove and connectsFromBelow are opposites; set at most one"
|
|
18029
18064
|
});
|
|
18030
18065
|
}
|
|
@@ -18035,30 +18070,30 @@ var pinHeaderProps = commonComponentProps.extend({
|
|
|
18035
18070
|
expectTypesMatch(true);
|
|
18036
18071
|
|
|
18037
18072
|
// lib/components/netalias.ts
|
|
18038
|
-
import { z as
|
|
18073
|
+
import { z as z88 } from "zod";
|
|
18039
18074
|
import { rotation as rotation4 } from "circuit-json";
|
|
18040
|
-
var netAliasProps =
|
|
18041
|
-
net:
|
|
18042
|
-
connection:
|
|
18075
|
+
var netAliasProps = z88.object({
|
|
18076
|
+
net: z88.string().optional(),
|
|
18077
|
+
connection: z88.string().optional(),
|
|
18043
18078
|
schX: distance.optional(),
|
|
18044
18079
|
schY: distance.optional(),
|
|
18045
18080
|
schRotation: rotation4.optional(),
|
|
18046
|
-
anchorSide:
|
|
18081
|
+
anchorSide: z88.enum(["left", "top", "right", "bottom"]).optional()
|
|
18047
18082
|
});
|
|
18048
18083
|
expectTypesMatch(true);
|
|
18049
18084
|
|
|
18050
18085
|
// lib/components/netlabel.ts
|
|
18051
|
-
import { z as
|
|
18086
|
+
import { z as z89 } from "zod";
|
|
18052
18087
|
import { rotation as rotation5 } from "circuit-json";
|
|
18053
|
-
var netLabelProps =
|
|
18054
|
-
net:
|
|
18055
|
-
connection:
|
|
18056
|
-
connectsTo:
|
|
18057
|
-
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(),
|
|
18058
18093
|
schX: distance.optional(),
|
|
18059
18094
|
schY: distance.optional(),
|
|
18060
18095
|
schRotation: rotation5.optional(),
|
|
18061
|
-
anchorSide:
|
|
18096
|
+
anchorSide: z89.enum(["left", "top", "right", "bottom"]).optional()
|
|
18062
18097
|
});
|
|
18063
18098
|
expectTypesMatch(true);
|
|
18064
18099
|
|
|
@@ -18073,32 +18108,32 @@ expectTypesMatch(true);
|
|
|
18073
18108
|
|
|
18074
18109
|
// lib/components/analogsimulation.ts
|
|
18075
18110
|
import { ms } from "circuit-json";
|
|
18076
|
-
import { z as
|
|
18077
|
-
var spiceEngine =
|
|
18111
|
+
import { z as z91 } from "zod";
|
|
18112
|
+
var spiceEngine = z91.custom(
|
|
18078
18113
|
(value) => typeof value === "string"
|
|
18079
18114
|
);
|
|
18080
|
-
var spiceOptions =
|
|
18081
|
-
method:
|
|
18082
|
-
reltol:
|
|
18083
|
-
abstol:
|
|
18084
|
-
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()
|
|
18085
18120
|
});
|
|
18086
18121
|
var analogAnalysisSimulationBaseProps = {
|
|
18087
|
-
name:
|
|
18122
|
+
name: z91.string().optional(),
|
|
18088
18123
|
spiceEngine: spiceEngine.optional(),
|
|
18089
18124
|
spiceOptions: spiceOptions.optional(),
|
|
18090
|
-
graphIndependentAxes:
|
|
18091
|
-
children:
|
|
18125
|
+
graphIndependentAxes: z91.boolean().optional(),
|
|
18126
|
+
children: z91.custom().optional()
|
|
18092
18127
|
};
|
|
18093
|
-
var analogSimulationProps =
|
|
18094
|
-
name:
|
|
18095
|
-
simulationType:
|
|
18128
|
+
var analogSimulationProps = z91.object({
|
|
18129
|
+
name: z91.string().optional(),
|
|
18130
|
+
simulationType: z91.literal("spice_transient_analysis").default("spice_transient_analysis"),
|
|
18096
18131
|
duration: ms.optional(),
|
|
18097
18132
|
startTime: ms.optional(),
|
|
18098
18133
|
timePerStep: ms.optional(),
|
|
18099
18134
|
spiceEngine: spiceEngine.optional(),
|
|
18100
18135
|
spiceOptions: spiceOptions.optional(),
|
|
18101
|
-
graphIndependentAxes:
|
|
18136
|
+
graphIndependentAxes: z91.boolean().optional()
|
|
18102
18137
|
});
|
|
18103
18138
|
expectTypesMatch(
|
|
18104
18139
|
true
|
|
@@ -18106,12 +18141,12 @@ expectTypesMatch(
|
|
|
18106
18141
|
|
|
18107
18142
|
// lib/components/analogtransientsimulation.ts
|
|
18108
18143
|
import { ms as ms2 } from "circuit-json";
|
|
18109
|
-
import { z as
|
|
18144
|
+
import { z as z92 } from "zod";
|
|
18110
18145
|
var positiveMilliseconds = ms2.refine(
|
|
18111
18146
|
(milliseconds) => milliseconds > 0,
|
|
18112
18147
|
"Time must be positive"
|
|
18113
18148
|
);
|
|
18114
|
-
var analogTransientSimulationProps =
|
|
18149
|
+
var analogTransientSimulationProps = z92.object({
|
|
18115
18150
|
...analogAnalysisSimulationBaseProps,
|
|
18116
18151
|
duration: positiveMilliseconds.default("10ms"),
|
|
18117
18152
|
startTime: ms2.default("0ms"),
|
|
@@ -18119,7 +18154,7 @@ var analogTransientSimulationProps = z91.object({
|
|
|
18119
18154
|
}).superRefine((simulation, context) => {
|
|
18120
18155
|
if (simulation.startTime < 0 || simulation.startTime > simulation.duration) {
|
|
18121
18156
|
context.addIssue({
|
|
18122
|
-
code:
|
|
18157
|
+
code: z92.ZodIssueCode.custom,
|
|
18123
18158
|
path: ["startTime"],
|
|
18124
18159
|
message: "startTime must be between zero and duration"
|
|
18125
18160
|
});
|
|
@@ -18128,19 +18163,19 @@ var analogTransientSimulationProps = z91.object({
|
|
|
18128
18163
|
expectTypesMatch(true);
|
|
18129
18164
|
|
|
18130
18165
|
// lib/components/analogdcoperatingpointsimulation.ts
|
|
18131
|
-
import { z as
|
|
18132
|
-
var analogDcOperatingPointSimulationProps =
|
|
18166
|
+
import { z as z93 } from "zod";
|
|
18167
|
+
var analogDcOperatingPointSimulationProps = z93.object({
|
|
18133
18168
|
...analogAnalysisSimulationBaseProps
|
|
18134
18169
|
});
|
|
18135
18170
|
expectTypesMatch(true);
|
|
18136
18171
|
|
|
18137
18172
|
// lib/components/analogdcsweepsimulation.ts
|
|
18138
18173
|
import { current, voltage as voltage3 } from "circuit-json";
|
|
18139
|
-
import { z as
|
|
18140
|
-
var dcSweepQuantity =
|
|
18141
|
-
var analogDcSweepSimulationProps =
|
|
18174
|
+
import { z as z94 } from "zod";
|
|
18175
|
+
var dcSweepQuantity = z94.union([voltage3, current]);
|
|
18176
|
+
var analogDcSweepSimulationProps = z94.object({
|
|
18142
18177
|
...analogAnalysisSimulationBaseProps,
|
|
18143
|
-
sweepSource:
|
|
18178
|
+
sweepSource: z94.string().min(1),
|
|
18144
18179
|
sweepStart: dcSweepQuantity,
|
|
18145
18180
|
sweepStop: dcSweepQuantity,
|
|
18146
18181
|
sweepStep: dcSweepQuantity.refine(
|
|
@@ -18150,7 +18185,7 @@ var analogDcSweepSimulationProps = z93.object({
|
|
|
18150
18185
|
}).superRefine((simulation, context) => {
|
|
18151
18186
|
if (Math.sign(simulation.sweepStop - simulation.sweepStart) !== Math.sign(simulation.sweepStep)) {
|
|
18152
18187
|
context.addIssue({
|
|
18153
|
-
code:
|
|
18188
|
+
code: z94.ZodIssueCode.custom,
|
|
18154
18189
|
path: ["sweepStep"],
|
|
18155
18190
|
message: "sweepStep must move from sweepStart toward sweepStop"
|
|
18156
18191
|
});
|
|
@@ -18160,10 +18195,10 @@ expectTypesMatch(true);
|
|
|
18160
18195
|
|
|
18161
18196
|
// lib/components/analogacsweepsimulation.ts
|
|
18162
18197
|
import { frequency as frequency3 } from "circuit-json";
|
|
18163
|
-
import { z as
|
|
18164
|
-
var analogAcSweepSimulationProps =
|
|
18198
|
+
import { z as z95 } from "zod";
|
|
18199
|
+
var analogAcSweepSimulationProps = z95.object({
|
|
18165
18200
|
...analogAnalysisSimulationBaseProps,
|
|
18166
|
-
sweepType:
|
|
18201
|
+
sweepType: z95.enum(["linear", "decade", "octave"]),
|
|
18167
18202
|
startFrequency: frequency3.refine(
|
|
18168
18203
|
(startFrequencyHz) => startFrequencyHz > 0,
|
|
18169
18204
|
"startFrequency must be positive"
|
|
@@ -18172,12 +18207,12 @@ var analogAcSweepSimulationProps = z94.object({
|
|
|
18172
18207
|
(stopFrequencyHz) => stopFrequencyHz > 0,
|
|
18173
18208
|
"stopFrequency must be positive"
|
|
18174
18209
|
),
|
|
18175
|
-
samplesPerInterval:
|
|
18176
|
-
sampleCount:
|
|
18210
|
+
samplesPerInterval: z95.number().int().positive().optional(),
|
|
18211
|
+
sampleCount: z95.number().int().positive().optional()
|
|
18177
18212
|
}).superRefine((simulation, context) => {
|
|
18178
18213
|
if (simulation.stopFrequency <= simulation.startFrequency) {
|
|
18179
18214
|
context.addIssue({
|
|
18180
|
-
code:
|
|
18215
|
+
code: z95.ZodIssueCode.custom,
|
|
18181
18216
|
path: ["stopFrequency"],
|
|
18182
18217
|
message: "stopFrequency must be greater than startFrequency"
|
|
18183
18218
|
});
|
|
@@ -18185,14 +18220,14 @@ var analogAcSweepSimulationProps = z94.object({
|
|
|
18185
18220
|
if (simulation.sweepType === "linear") {
|
|
18186
18221
|
if (simulation.sampleCount === void 0) {
|
|
18187
18222
|
context.addIssue({
|
|
18188
|
-
code:
|
|
18223
|
+
code: z95.ZodIssueCode.custom,
|
|
18189
18224
|
path: ["sampleCount"],
|
|
18190
18225
|
message: "sampleCount is required for a linear AC sweep"
|
|
18191
18226
|
});
|
|
18192
18227
|
}
|
|
18193
18228
|
if (simulation.samplesPerInterval !== void 0) {
|
|
18194
18229
|
context.addIssue({
|
|
18195
|
-
code:
|
|
18230
|
+
code: z95.ZodIssueCode.custom,
|
|
18196
18231
|
path: ["samplesPerInterval"],
|
|
18197
18232
|
message: "samplesPerInterval is only valid for decade or octave sweeps"
|
|
18198
18233
|
});
|
|
@@ -18201,14 +18236,14 @@ var analogAcSweepSimulationProps = z94.object({
|
|
|
18201
18236
|
}
|
|
18202
18237
|
if (simulation.samplesPerInterval === void 0) {
|
|
18203
18238
|
context.addIssue({
|
|
18204
|
-
code:
|
|
18239
|
+
code: z95.ZodIssueCode.custom,
|
|
18205
18240
|
path: ["samplesPerInterval"],
|
|
18206
18241
|
message: "samplesPerInterval is required for decade or octave sweeps"
|
|
18207
18242
|
});
|
|
18208
18243
|
}
|
|
18209
18244
|
if (simulation.sampleCount !== void 0) {
|
|
18210
18245
|
context.addIssue({
|
|
18211
|
-
code:
|
|
18246
|
+
code: z95.ZodIssueCode.custom,
|
|
18212
18247
|
path: ["sampleCount"],
|
|
18213
18248
|
message: "sampleCount is only valid for a linear sweep"
|
|
18214
18249
|
});
|
|
@@ -18224,43 +18259,43 @@ import {
|
|
|
18224
18259
|
resistance as resistance5,
|
|
18225
18260
|
voltage as voltage4
|
|
18226
18261
|
} from "circuit-json";
|
|
18227
|
-
import { z as
|
|
18228
|
-
var resistanceSweepQuantity = resistance5.pipe(
|
|
18229
|
-
var capacitanceSweepQuantity = capacitance4.pipe(
|
|
18230
|
-
var inductanceSweepQuantity = inductance.pipe(
|
|
18231
|
-
var voltageSweepQuantity = voltage4.pipe(
|
|
18232
|
-
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());
|
|
18233
18268
|
var createAnalogSweepCoordinateProps = (sweepQuantity) => ({
|
|
18234
|
-
name:
|
|
18235
|
-
values:
|
|
18269
|
+
name: z96.string().optional(),
|
|
18270
|
+
values: z96.array(sweepQuantity).min(1).optional(),
|
|
18236
18271
|
start: sweepQuantity.optional(),
|
|
18237
18272
|
stop: sweepQuantity.optional(),
|
|
18238
18273
|
step: sweepQuantity.optional()
|
|
18239
18274
|
});
|
|
18240
|
-
var analogResistanceSweepParameterProps =
|
|
18275
|
+
var analogResistanceSweepParameterProps = z96.object({
|
|
18241
18276
|
...createAnalogSweepCoordinateProps(resistanceSweepQuantity),
|
|
18242
|
-
parameterType:
|
|
18243
|
-
resistorRef:
|
|
18277
|
+
parameterType: z96.literal("resistance"),
|
|
18278
|
+
resistorRef: z96.string().min(1)
|
|
18244
18279
|
}).strict();
|
|
18245
|
-
var analogCapacitanceSweepParameterProps =
|
|
18280
|
+
var analogCapacitanceSweepParameterProps = z96.object({
|
|
18246
18281
|
...createAnalogSweepCoordinateProps(capacitanceSweepQuantity),
|
|
18247
|
-
parameterType:
|
|
18248
|
-
capacitorRef:
|
|
18282
|
+
parameterType: z96.literal("capacitance"),
|
|
18283
|
+
capacitorRef: z96.string().min(1)
|
|
18249
18284
|
}).strict();
|
|
18250
|
-
var analogInductanceSweepParameterProps =
|
|
18285
|
+
var analogInductanceSweepParameterProps = z96.object({
|
|
18251
18286
|
...createAnalogSweepCoordinateProps(inductanceSweepQuantity),
|
|
18252
|
-
parameterType:
|
|
18253
|
-
inductorRef:
|
|
18287
|
+
parameterType: z96.literal("inductance"),
|
|
18288
|
+
inductorRef: z96.string().min(1)
|
|
18254
18289
|
}).strict();
|
|
18255
|
-
var analogVoltageSweepParameterProps =
|
|
18290
|
+
var analogVoltageSweepParameterProps = z96.object({
|
|
18256
18291
|
...createAnalogSweepCoordinateProps(voltageSweepQuantity),
|
|
18257
|
-
parameterType:
|
|
18258
|
-
net:
|
|
18292
|
+
parameterType: z96.literal("voltage"),
|
|
18293
|
+
net: z96.string().min(1)
|
|
18259
18294
|
}).strict();
|
|
18260
|
-
var analogCurrentSweepParameterProps =
|
|
18295
|
+
var analogCurrentSweepParameterProps = z96.object({
|
|
18261
18296
|
...createAnalogSweepCoordinateProps(currentSweepQuantity),
|
|
18262
|
-
parameterType:
|
|
18263
|
-
currentSourceRef:
|
|
18297
|
+
parameterType: z96.literal("current"),
|
|
18298
|
+
currentSourceRef: z96.string().min(1)
|
|
18264
18299
|
}).strict();
|
|
18265
18300
|
var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
|
|
18266
18301
|
const hasExplicitSweepCoordinates = sweepCoordinates.values !== void 0;
|
|
@@ -18272,34 +18307,34 @@ var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
|
|
|
18272
18307
|
const hasRangeCoordinates = rangeCoordinateCount > 0;
|
|
18273
18308
|
if (hasExplicitSweepCoordinates === hasRangeCoordinates) {
|
|
18274
18309
|
context.addIssue({
|
|
18275
|
-
code:
|
|
18310
|
+
code: z96.ZodIssueCode.custom,
|
|
18276
18311
|
message: "Provide either values or start/stop/step"
|
|
18277
18312
|
});
|
|
18278
18313
|
return;
|
|
18279
18314
|
}
|
|
18280
18315
|
if (rangeCoordinateCount !== 0 && rangeCoordinateCount !== 3) {
|
|
18281
18316
|
context.addIssue({
|
|
18282
|
-
code:
|
|
18317
|
+
code: z96.ZodIssueCode.custom,
|
|
18283
18318
|
message: "start, stop, and step must be provided together"
|
|
18284
18319
|
});
|
|
18285
18320
|
return;
|
|
18286
18321
|
}
|
|
18287
18322
|
if (sweepCoordinates.step === 0) {
|
|
18288
18323
|
context.addIssue({
|
|
18289
|
-
code:
|
|
18324
|
+
code: z96.ZodIssueCode.custom,
|
|
18290
18325
|
path: ["step"],
|
|
18291
18326
|
message: "step must be nonzero"
|
|
18292
18327
|
});
|
|
18293
18328
|
}
|
|
18294
18329
|
if (sweepCoordinates.start !== void 0 && sweepCoordinates.stop !== void 0 && sweepCoordinates.step !== void 0 && Math.sign(sweepCoordinates.stop - sweepCoordinates.start) !== Math.sign(sweepCoordinates.step)) {
|
|
18295
18330
|
context.addIssue({
|
|
18296
|
-
code:
|
|
18331
|
+
code: z96.ZodIssueCode.custom,
|
|
18297
18332
|
path: ["step"],
|
|
18298
18333
|
message: "step must move from start toward stop"
|
|
18299
18334
|
});
|
|
18300
18335
|
}
|
|
18301
18336
|
};
|
|
18302
|
-
var analogSweepParameterProps =
|
|
18337
|
+
var analogSweepParameterProps = z96.discriminatedUnion("parameterType", [
|
|
18303
18338
|
analogResistanceSweepParameterProps,
|
|
18304
18339
|
analogCapacitanceSweepParameterProps,
|
|
18305
18340
|
analogInductanceSweepParameterProps,
|
|
@@ -18314,26 +18349,26 @@ expectTypesMatch(true);
|
|
|
18314
18349
|
expectTypesMatch(true);
|
|
18315
18350
|
|
|
18316
18351
|
// lib/components/autoroutingphase.ts
|
|
18317
|
-
import { z as
|
|
18318
|
-
var autoroutingPhaseProps =
|
|
18319
|
-
key:
|
|
18320
|
-
name:
|
|
18352
|
+
import { z as z97 } from "zod";
|
|
18353
|
+
var autoroutingPhaseProps = z97.object({
|
|
18354
|
+
key: z97.any().optional(),
|
|
18355
|
+
name: z97.string().optional(),
|
|
18321
18356
|
autorouter: autorouterProp.optional(),
|
|
18322
18357
|
algorithmFn: autorouterConfig.shape.algorithmFn,
|
|
18323
18358
|
preflightRoutingCheckPolicy: preflightRoutingCheckPolicy.optional(),
|
|
18324
|
-
phaseIndex:
|
|
18325
|
-
pcbTracePaths:
|
|
18359
|
+
phaseIndex: z97.number().optional(),
|
|
18360
|
+
pcbTracePaths: z97.array(fanoutTracePath).optional(),
|
|
18326
18361
|
...routingTolerances.shape,
|
|
18327
|
-
region:
|
|
18328
|
-
shape:
|
|
18329
|
-
minX:
|
|
18330
|
-
maxX:
|
|
18331
|
-
minY:
|
|
18332
|
-
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()
|
|
18333
18368
|
}).optional(),
|
|
18334
|
-
connection:
|
|
18335
|
-
connections:
|
|
18336
|
-
reroute:
|
|
18369
|
+
connection: z97.string().optional(),
|
|
18370
|
+
connections: z97.array(z97.string()).optional(),
|
|
18371
|
+
reroute: z97.boolean().optional(),
|
|
18337
18372
|
...fanoutProps.shape
|
|
18338
18373
|
}).superRefine((value, ctx) => {
|
|
18339
18374
|
const isSimplifyAutorouter = value.autorouter === "simplify" || typeof value.autorouter === "object" && value.autorouter?.preset === "simplify";
|
|
@@ -18344,7 +18379,7 @@ var autoroutingPhaseProps = z96.object({
|
|
|
18344
18379
|
}
|
|
18345
18380
|
if (value.reroute !== void 0 && !(isSimplifyAutorouter && value.reroute === true) && value.region === void 0 && value.connection === void 0 && value.connections === void 0) {
|
|
18346
18381
|
ctx.addIssue({
|
|
18347
|
-
code:
|
|
18382
|
+
code: z97.ZodIssueCode.custom,
|
|
18348
18383
|
message: "region, connection, or connections is required when reroute is provided",
|
|
18349
18384
|
path: ["region"]
|
|
18350
18385
|
});
|
|
@@ -18353,15 +18388,15 @@ var autoroutingPhaseProps = z96.object({
|
|
|
18353
18388
|
expectTypesMatch(true);
|
|
18354
18389
|
|
|
18355
18390
|
// lib/components/spicemodel.ts
|
|
18356
|
-
import { z as
|
|
18357
|
-
var spicemodelProps =
|
|
18358
|
-
source:
|
|
18359
|
-
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()
|
|
18360
18395
|
});
|
|
18361
18396
|
expectTypesMatch(true);
|
|
18362
18397
|
|
|
18363
18398
|
// lib/components/transistor.ts
|
|
18364
|
-
import { z as
|
|
18399
|
+
import { z as z99 } from "zod";
|
|
18365
18400
|
var transistorPinsLabels = [
|
|
18366
18401
|
"pin1",
|
|
18367
18402
|
"pin2",
|
|
@@ -18374,7 +18409,7 @@ var transistorPinsLabels = [
|
|
|
18374
18409
|
"drain"
|
|
18375
18410
|
];
|
|
18376
18411
|
var transistorProps = commonComponentProps.extend({
|
|
18377
|
-
type:
|
|
18412
|
+
type: z99.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
|
|
18378
18413
|
connections: createConnectionsProp(transistorPinsLabels).optional()
|
|
18379
18414
|
});
|
|
18380
18415
|
var transistorPins = [
|
|
@@ -18388,7 +18423,7 @@ var transistorPins = [
|
|
|
18388
18423
|
expectTypesMatch(true);
|
|
18389
18424
|
|
|
18390
18425
|
// lib/components/mosfet.ts
|
|
18391
|
-
import { z as
|
|
18426
|
+
import { z as z100 } from "zod";
|
|
18392
18427
|
var mosfetPins = [
|
|
18393
18428
|
"pin1",
|
|
18394
18429
|
"drain",
|
|
@@ -18398,11 +18433,11 @@ var mosfetPins = [
|
|
|
18398
18433
|
"gate"
|
|
18399
18434
|
];
|
|
18400
18435
|
var mosfetProps = commonComponentProps.extend({
|
|
18401
|
-
channelType:
|
|
18402
|
-
mosfetMode:
|
|
18403
|
-
symbolDrainSide:
|
|
18404
|
-
symbolSourceSide:
|
|
18405
|
-
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(),
|
|
18406
18441
|
connections: createConnectionsProp(mosfetPins).optional()
|
|
18407
18442
|
});
|
|
18408
18443
|
expectTypesMatch(true);
|
|
@@ -18424,29 +18459,29 @@ expectTypesMatch(true);
|
|
|
18424
18459
|
|
|
18425
18460
|
// lib/components/inductor.ts
|
|
18426
18461
|
import { inductance as inductance2 } from "circuit-json";
|
|
18427
|
-
import { z as
|
|
18462
|
+
import { z as z102 } from "zod";
|
|
18428
18463
|
var inductorPins = lrPins;
|
|
18429
18464
|
var inductorProps = commonComponentProps.extend({
|
|
18430
18465
|
inductance: inductance2,
|
|
18431
|
-
maxCurrentRating:
|
|
18466
|
+
maxCurrentRating: z102.union([z102.string(), z102.number()]).optional(),
|
|
18432
18467
|
schOrientation: schematicOrientation.optional(),
|
|
18433
18468
|
connections: createConnectionsProp(inductorPins).optional()
|
|
18434
18469
|
});
|
|
18435
18470
|
expectTypesMatch(true);
|
|
18436
18471
|
|
|
18437
18472
|
// lib/components/internal-circuit.ts
|
|
18438
|
-
import { z as
|
|
18439
|
-
var internalCircuitProps =
|
|
18440
|
-
children:
|
|
18473
|
+
import { z as z103 } from "zod";
|
|
18474
|
+
var internalCircuitProps = z103.object({
|
|
18475
|
+
children: z103.custom().optional()
|
|
18441
18476
|
});
|
|
18442
18477
|
expectTypesMatch(
|
|
18443
18478
|
true
|
|
18444
18479
|
);
|
|
18445
18480
|
|
|
18446
18481
|
// lib/components/diode.ts
|
|
18447
|
-
import { z as
|
|
18482
|
+
import { z as z104 } from "zod";
|
|
18448
18483
|
var diodePins = lrPolarPins;
|
|
18449
|
-
var diodeConnectionKeys =
|
|
18484
|
+
var diodeConnectionKeys = z104.enum([
|
|
18450
18485
|
"anode",
|
|
18451
18486
|
"cathode",
|
|
18452
18487
|
"pin1",
|
|
@@ -18454,13 +18489,13 @@ var diodeConnectionKeys = z103.enum([
|
|
|
18454
18489
|
"pos",
|
|
18455
18490
|
"neg"
|
|
18456
18491
|
]);
|
|
18457
|
-
var connectionTarget3 =
|
|
18458
|
-
var connectionsProp2 =
|
|
18459
|
-
var diodePinLabelsProp =
|
|
18460
|
-
|
|
18461
|
-
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))
|
|
18462
18497
|
);
|
|
18463
|
-
var diodeVariant =
|
|
18498
|
+
var diodeVariant = z104.enum([
|
|
18464
18499
|
"standard",
|
|
18465
18500
|
"schottky",
|
|
18466
18501
|
"zener",
|
|
@@ -18471,12 +18506,12 @@ var diodeVariant = z103.enum([
|
|
|
18471
18506
|
var diodeProps = commonComponentProps.extend({
|
|
18472
18507
|
connections: connectionsProp2.optional(),
|
|
18473
18508
|
variant: diodeVariant.optional().default("standard"),
|
|
18474
|
-
standard:
|
|
18475
|
-
schottky:
|
|
18476
|
-
zener:
|
|
18477
|
-
avalanche:
|
|
18478
|
-
photo:
|
|
18479
|
-
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(),
|
|
18480
18515
|
schOrientation: schematicOrientation.optional(),
|
|
18481
18516
|
schSize: schematicSymbolSize.optional(),
|
|
18482
18517
|
pinLabels: diodePinLabelsProp.optional()
|
|
@@ -18491,11 +18526,11 @@ var diodeProps = commonComponentProps.extend({
|
|
|
18491
18526
|
].filter(Boolean).length;
|
|
18492
18527
|
if (enabledFlags > 1) {
|
|
18493
18528
|
ctx.addIssue({
|
|
18494
|
-
code:
|
|
18529
|
+
code: z104.ZodIssueCode.custom,
|
|
18495
18530
|
message: "Exactly one diode variant must be enabled",
|
|
18496
18531
|
path: []
|
|
18497
18532
|
});
|
|
18498
|
-
return
|
|
18533
|
+
return z104.INVALID;
|
|
18499
18534
|
}
|
|
18500
18535
|
}).transform((data) => {
|
|
18501
18536
|
const result = {
|
|
@@ -18541,18 +18576,18 @@ var diodeProps = commonComponentProps.extend({
|
|
|
18541
18576
|
expectTypesMatch(true);
|
|
18542
18577
|
|
|
18543
18578
|
// lib/components/led.ts
|
|
18544
|
-
import { z as
|
|
18545
|
-
var legacyNumericLedPinLabelsProp =
|
|
18546
|
-
|
|
18547
|
-
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))
|
|
18548
18583
|
).transform((pinLabels) => ({
|
|
18549
18584
|
...pinLabels["1"] === void 0 ? {} : { pin1: pinLabels["1"] },
|
|
18550
18585
|
...pinLabels["2"] === void 0 ? {} : { pin2: pinLabels["2"] }
|
|
18551
18586
|
}));
|
|
18552
18587
|
var ledProps = commonComponentProps.extend({
|
|
18553
|
-
color:
|
|
18554
|
-
wavelength:
|
|
18555
|
-
schDisplayValue:
|
|
18588
|
+
color: z105.string().optional(),
|
|
18589
|
+
wavelength: z105.string().optional(),
|
|
18590
|
+
schDisplayValue: z105.string().optional(),
|
|
18556
18591
|
schOrientation: schematicOrientation.optional(),
|
|
18557
18592
|
/** Select a compact schematic symbol; omitted, default, and md retain the standard symbol. */
|
|
18558
18593
|
schSize: schematicSymbolSize.optional(),
|
|
@@ -18560,28 +18595,28 @@ var ledProps = commonComponentProps.extend({
|
|
|
18560
18595
|
// wrappers, then normalized to the canonical pin1/pin2 representation.
|
|
18561
18596
|
pinLabels: diodePinLabelsProp.or(legacyNumericLedPinLabelsProp).optional(),
|
|
18562
18597
|
connections: createConnectionsProp(lrPolarPins).optional(),
|
|
18563
|
-
laser:
|
|
18598
|
+
laser: z105.boolean().optional()
|
|
18564
18599
|
});
|
|
18565
18600
|
var ledPins = lrPolarPins;
|
|
18566
18601
|
|
|
18567
18602
|
// lib/components/switch.ts
|
|
18568
18603
|
import { ms as ms3, frequency as frequency4 } from "circuit-json";
|
|
18569
|
-
import { z as
|
|
18604
|
+
import { z as z106 } from "zod";
|
|
18570
18605
|
var switchProps = commonComponentProps.extend({
|
|
18571
|
-
type:
|
|
18572
|
-
isNormallyClosed:
|
|
18573
|
-
spst:
|
|
18574
|
-
spdt:
|
|
18575
|
-
dpst:
|
|
18576
|
-
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(),
|
|
18577
18612
|
pinLabels: pinLabelsProp.optional(),
|
|
18578
18613
|
noConnect: noConnectProp.optional(),
|
|
18579
18614
|
simSwitchFrequency: frequency4.optional(),
|
|
18580
18615
|
simCloseAt: ms3.optional(),
|
|
18581
18616
|
simOpenAt: ms3.optional(),
|
|
18582
|
-
simStartClosed:
|
|
18583
|
-
simStartOpen:
|
|
18584
|
-
connections:
|
|
18617
|
+
simStartClosed: z106.boolean().optional(),
|
|
18618
|
+
simStartOpen: z106.boolean().optional(),
|
|
18619
|
+
connections: z106.custom().pipe(z106.record(z106.string(), connectionTarget)).optional()
|
|
18585
18620
|
}).transform((props) => {
|
|
18586
18621
|
const updatedProps = { ...props };
|
|
18587
18622
|
if (updatedProps.dpdt) {
|
|
@@ -18613,33 +18648,33 @@ expectTypesMatch(true);
|
|
|
18613
18648
|
|
|
18614
18649
|
// lib/components/fabrication-note-text.ts
|
|
18615
18650
|
import { length as length4 } from "circuit-json";
|
|
18616
|
-
import { z as
|
|
18651
|
+
import { z as z107 } from "zod";
|
|
18617
18652
|
var fabricationNoteTextProps = pcbLayoutProps.extend({
|
|
18618
|
-
text:
|
|
18619
|
-
anchorAlignment:
|
|
18620
|
-
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(),
|
|
18621
18656
|
fontSize: length4.optional(),
|
|
18622
|
-
color:
|
|
18657
|
+
color: z107.string().optional()
|
|
18623
18658
|
});
|
|
18624
18659
|
expectTypesMatch(true);
|
|
18625
18660
|
|
|
18626
18661
|
// lib/components/fabrication-note-rect.ts
|
|
18627
18662
|
import { distance as distance23 } from "circuit-json";
|
|
18628
|
-
import { z as
|
|
18663
|
+
import { z as z108 } from "zod";
|
|
18629
18664
|
var fabricationNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18630
18665
|
width: distance23,
|
|
18631
18666
|
height: distance23,
|
|
18632
18667
|
strokeWidth: distance23.optional(),
|
|
18633
|
-
isFilled:
|
|
18634
|
-
hasStroke:
|
|
18635
|
-
isStrokeDashed:
|
|
18636
|
-
color:
|
|
18668
|
+
isFilled: z108.boolean().optional(),
|
|
18669
|
+
hasStroke: z108.boolean().optional(),
|
|
18670
|
+
isStrokeDashed: z108.boolean().optional(),
|
|
18671
|
+
color: z108.string().optional(),
|
|
18637
18672
|
cornerRadius: distance23.optional()
|
|
18638
18673
|
});
|
|
18639
18674
|
|
|
18640
18675
|
// lib/components/fabrication-note-path.ts
|
|
18641
18676
|
import { length as length5, route_hint_point as route_hint_point3 } from "circuit-json";
|
|
18642
|
-
import { z as
|
|
18677
|
+
import { z as z109 } from "zod";
|
|
18643
18678
|
var fabricationNotePathProps = pcbLayoutProps.omit({
|
|
18644
18679
|
pcbLeftEdgeX: true,
|
|
18645
18680
|
pcbRightEdgeX: true,
|
|
@@ -18651,15 +18686,15 @@ var fabricationNotePathProps = pcbLayoutProps.omit({
|
|
|
18651
18686
|
pcbOffsetY: true,
|
|
18652
18687
|
pcbRotation: true
|
|
18653
18688
|
}).extend({
|
|
18654
|
-
route:
|
|
18689
|
+
route: z109.array(route_hint_point3),
|
|
18655
18690
|
strokeWidth: length5.optional(),
|
|
18656
|
-
color:
|
|
18691
|
+
color: z109.string().optional()
|
|
18657
18692
|
});
|
|
18658
18693
|
|
|
18659
18694
|
// lib/components/fabrication-note-dimension.ts
|
|
18660
18695
|
import { distance as distance24, length as length6 } from "circuit-json";
|
|
18661
|
-
import { z as
|
|
18662
|
-
var dimensionTarget =
|
|
18696
|
+
import { z as z110 } from "zod";
|
|
18697
|
+
var dimensionTarget = z110.union([z110.string(), point]);
|
|
18663
18698
|
var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
18664
18699
|
pcbLeftEdgeX: true,
|
|
18665
18700
|
pcbRightEdgeX: true,
|
|
@@ -18673,44 +18708,44 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
18673
18708
|
}).extend({
|
|
18674
18709
|
from: dimensionTarget,
|
|
18675
18710
|
to: dimensionTarget,
|
|
18676
|
-
text:
|
|
18711
|
+
text: z110.string().optional(),
|
|
18677
18712
|
offset: distance24.optional(),
|
|
18678
|
-
offsetDirection:
|
|
18679
|
-
font:
|
|
18713
|
+
offsetDirection: z110.object({ x: z110.number().finite(), y: z110.number().finite() }).optional(),
|
|
18714
|
+
font: z110.enum(["tscircuit2024"]).optional(),
|
|
18680
18715
|
fontSize: length6.optional(),
|
|
18681
|
-
color:
|
|
18716
|
+
color: z110.string().optional(),
|
|
18682
18717
|
arrowSize: distance24.optional(),
|
|
18683
|
-
units:
|
|
18684
|
-
outerEdgeToEdge:
|
|
18685
|
-
centerToCenter:
|
|
18686
|
-
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()
|
|
18687
18722
|
});
|
|
18688
18723
|
expectTypesMatch(true);
|
|
18689
18724
|
|
|
18690
18725
|
// lib/components/pcb-trace.ts
|
|
18691
18726
|
import { distance as distance25, route_hint_point as route_hint_point4 } from "circuit-json";
|
|
18692
|
-
import { z as
|
|
18693
|
-
var pcbTraceProps =
|
|
18694
|
-
layer:
|
|
18727
|
+
import { z as z111 } from "zod";
|
|
18728
|
+
var pcbTraceProps = z111.object({
|
|
18729
|
+
layer: z111.string().optional(),
|
|
18695
18730
|
thickness: distance25.optional(),
|
|
18696
|
-
route:
|
|
18731
|
+
route: z111.array(route_hint_point4)
|
|
18697
18732
|
});
|
|
18698
18733
|
|
|
18699
18734
|
// lib/components/via.ts
|
|
18700
18735
|
import { distance as distance26, layer_ref as layer_ref9 } from "circuit-json";
|
|
18701
|
-
import { z as
|
|
18736
|
+
import { z as z112 } from "zod";
|
|
18702
18737
|
var viaProps = commonLayoutProps.extend({
|
|
18703
|
-
name:
|
|
18738
|
+
name: z112.string().optional(),
|
|
18704
18739
|
fromLayer: layer_ref9.optional(),
|
|
18705
18740
|
toLayer: layer_ref9.optional(),
|
|
18706
18741
|
holeDiameter: distance26.optional(),
|
|
18707
18742
|
outerDiameter: distance26.optional(),
|
|
18708
|
-
layers:
|
|
18709
|
-
connectsTo:
|
|
18710
|
-
netIsAssignable:
|
|
18711
|
-
tented:
|
|
18712
|
-
|
|
18713
|
-
|
|
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([
|
|
18714
18749
|
"both_sides",
|
|
18715
18750
|
"top_and_bottom_tented",
|
|
18716
18751
|
"top_tented",
|
|
@@ -18729,15 +18764,15 @@ expectTypesMatch(true);
|
|
|
18729
18764
|
|
|
18730
18765
|
// lib/components/testpoint.ts
|
|
18731
18766
|
import { distance as distance27 } from "circuit-json";
|
|
18732
|
-
import { z as
|
|
18767
|
+
import { z as z113 } from "zod";
|
|
18733
18768
|
var testpointPins = ["pin1"];
|
|
18734
|
-
var testpointConnectionsProp =
|
|
18769
|
+
var testpointConnectionsProp = z113.object({
|
|
18735
18770
|
pin1: connectionTarget
|
|
18736
18771
|
}).strict();
|
|
18737
18772
|
var testpointProps = commonComponentProps.extend({
|
|
18738
18773
|
connections: testpointConnectionsProp.optional(),
|
|
18739
|
-
footprintVariant:
|
|
18740
|
-
padShape:
|
|
18774
|
+
footprintVariant: z113.enum(["pad", "through_hole"]).optional(),
|
|
18775
|
+
padShape: z113.enum(["rect", "circle"]).optional().default("circle"),
|
|
18741
18776
|
padDiameter: distance27.optional(),
|
|
18742
18777
|
holeDiameter: distance27.optional(),
|
|
18743
18778
|
width: distance27.optional(),
|
|
@@ -18749,42 +18784,42 @@ var testpointProps = commonComponentProps.extend({
|
|
|
18749
18784
|
expectTypesMatch(true);
|
|
18750
18785
|
|
|
18751
18786
|
// lib/components/breakoutpoint.ts
|
|
18752
|
-
import { z as
|
|
18787
|
+
import { z as z114 } from "zod";
|
|
18753
18788
|
var breakoutPointProps = pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
18754
|
-
connection:
|
|
18789
|
+
connection: z114.string()
|
|
18755
18790
|
});
|
|
18756
18791
|
expectTypesMatch(true);
|
|
18757
18792
|
|
|
18758
18793
|
// lib/components/pcb-keepout.ts
|
|
18759
18794
|
import { distance as distance28, layer_ref as layer_ref10 } from "circuit-json";
|
|
18760
|
-
import { z as
|
|
18761
|
-
var pcbKeepoutProps =
|
|
18795
|
+
import { z as z115 } from "zod";
|
|
18796
|
+
var pcbKeepoutProps = z115.union([
|
|
18762
18797
|
pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18763
|
-
shape:
|
|
18798
|
+
shape: z115.literal("circle"),
|
|
18764
18799
|
radius: distance28,
|
|
18765
|
-
layers:
|
|
18800
|
+
layers: z115.array(layer_ref10).optional(),
|
|
18766
18801
|
/** Report keepout violations as warnings when true. Omit for normal enforcement. */
|
|
18767
|
-
warningOnly:
|
|
18802
|
+
warningOnly: z115.boolean().optional(),
|
|
18768
18803
|
/** Allow trace crossings without keepout diagnostics. False or omitted retains enforcement; copper pours remain excluded. */
|
|
18769
|
-
allowTraces:
|
|
18804
|
+
allowTraces: z115.boolean().optional(),
|
|
18770
18805
|
/** Allow components and their pads/plated holes without keepout diagnostics. False or omitted retains enforcement; copper pours remain excluded. */
|
|
18771
|
-
allowPlacements:
|
|
18772
|
-
excludeRefs:
|
|
18806
|
+
allowPlacements: z115.boolean().optional(),
|
|
18807
|
+
excludeRefs: z115.array(z115.string()).optional().describe(
|
|
18773
18808
|
'Component selectors excluded from the keepout, such as ".ANT1"'
|
|
18774
18809
|
)
|
|
18775
18810
|
}),
|
|
18776
18811
|
pcbLayoutProps.extend({
|
|
18777
|
-
shape:
|
|
18812
|
+
shape: z115.literal("rect"),
|
|
18778
18813
|
width: distance28,
|
|
18779
18814
|
height: distance28,
|
|
18780
|
-
layers:
|
|
18815
|
+
layers: z115.array(layer_ref10).optional(),
|
|
18781
18816
|
/** Report keepout violations as warnings when true. Omit for normal enforcement. */
|
|
18782
|
-
warningOnly:
|
|
18817
|
+
warningOnly: z115.boolean().optional(),
|
|
18783
18818
|
/** Allow trace crossings without keepout diagnostics. False or omitted retains enforcement; copper pours remain excluded. */
|
|
18784
|
-
allowTraces:
|
|
18819
|
+
allowTraces: z115.boolean().optional(),
|
|
18785
18820
|
/** Allow components and their pads/plated holes without keepout diagnostics. False or omitted retains enforcement; copper pours remain excluded. */
|
|
18786
|
-
allowPlacements:
|
|
18787
|
-
excludeRefs:
|
|
18821
|
+
allowPlacements: z115.boolean().optional(),
|
|
18822
|
+
excludeRefs: z115.array(z115.string()).optional().describe(
|
|
18788
18823
|
'Component selectors excluded from the keepout, such as ".ANT1"'
|
|
18789
18824
|
)
|
|
18790
18825
|
})
|
|
@@ -18792,20 +18827,20 @@ var pcbKeepoutProps = z114.union([
|
|
|
18792
18827
|
|
|
18793
18828
|
// lib/components/courtyard-rect.ts
|
|
18794
18829
|
import { distance as distance29 } from "circuit-json";
|
|
18795
|
-
import { z as
|
|
18830
|
+
import { z as z116 } from "zod";
|
|
18796
18831
|
var courtyardRectProps = pcbLayoutProps.extend({
|
|
18797
18832
|
width: distance29,
|
|
18798
18833
|
height: distance29,
|
|
18799
18834
|
strokeWidth: distance29.optional(),
|
|
18800
|
-
isFilled:
|
|
18801
|
-
hasStroke:
|
|
18802
|
-
isStrokeDashed:
|
|
18803
|
-
color:
|
|
18835
|
+
isFilled: z116.boolean().optional(),
|
|
18836
|
+
hasStroke: z116.boolean().optional(),
|
|
18837
|
+
isStrokeDashed: z116.boolean().optional(),
|
|
18838
|
+
color: z116.string().optional()
|
|
18804
18839
|
});
|
|
18805
18840
|
|
|
18806
18841
|
// lib/components/courtyard-outline.ts
|
|
18807
18842
|
import { length as length7 } from "circuit-json";
|
|
18808
|
-
import { z as
|
|
18843
|
+
import { z as z117 } from "zod";
|
|
18809
18844
|
var courtyardOutlineProps = pcbLayoutProps.omit({
|
|
18810
18845
|
pcbLeftEdgeX: true,
|
|
18811
18846
|
pcbRightEdgeX: true,
|
|
@@ -18817,11 +18852,11 @@ var courtyardOutlineProps = pcbLayoutProps.omit({
|
|
|
18817
18852
|
pcbOffsetY: true,
|
|
18818
18853
|
pcbRotation: true
|
|
18819
18854
|
}).extend({
|
|
18820
|
-
outline:
|
|
18855
|
+
outline: z117.array(point),
|
|
18821
18856
|
strokeWidth: length7.optional(),
|
|
18822
|
-
isClosed:
|
|
18823
|
-
isStrokeDashed:
|
|
18824
|
-
color:
|
|
18857
|
+
isClosed: z117.boolean().optional(),
|
|
18858
|
+
isStrokeDashed: z117.boolean().optional(),
|
|
18859
|
+
color: z117.string().optional()
|
|
18825
18860
|
});
|
|
18826
18861
|
|
|
18827
18862
|
// lib/components/courtyard-circle.ts
|
|
@@ -18841,13 +18876,13 @@ var courtyardPillProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
18841
18876
|
});
|
|
18842
18877
|
|
|
18843
18878
|
// lib/components/copper-pour.ts
|
|
18844
|
-
import { z as
|
|
18879
|
+
import { z as z120 } from "zod";
|
|
18845
18880
|
import { layer_ref as layer_ref11 } from "circuit-json";
|
|
18846
|
-
var copperPourProps =
|
|
18847
|
-
name:
|
|
18881
|
+
var copperPourProps = z120.object({
|
|
18882
|
+
name: z120.string().optional(),
|
|
18848
18883
|
layer: layer_ref11,
|
|
18849
|
-
connectsTo:
|
|
18850
|
-
unbroken:
|
|
18884
|
+
connectsTo: z120.string(),
|
|
18885
|
+
unbroken: z120.boolean().optional().describe(
|
|
18851
18886
|
"Reserves the pour region during autorouting so unrelated traces do not split it. Vias may still cross the region using antipads."
|
|
18852
18887
|
),
|
|
18853
18888
|
padMargin: distance.optional(),
|
|
@@ -18855,24 +18890,24 @@ var copperPourProps = z119.object({
|
|
|
18855
18890
|
clearance: distance.optional(),
|
|
18856
18891
|
boardEdgeMargin: distance.optional(),
|
|
18857
18892
|
cutoutMargin: distance.optional(),
|
|
18858
|
-
useThermalReliefs:
|
|
18859
|
-
outline:
|
|
18860
|
-
coveredWithSolderMask:
|
|
18893
|
+
useThermalReliefs: z120.boolean().optional(),
|
|
18894
|
+
outline: z120.array(point).optional(),
|
|
18895
|
+
coveredWithSolderMask: z120.boolean().optional().default(true)
|
|
18861
18896
|
});
|
|
18862
18897
|
expectTypesMatch(true);
|
|
18863
18898
|
|
|
18864
18899
|
// lib/components/cadassembly.ts
|
|
18865
18900
|
import { layer_ref as layer_ref12 } from "circuit-json";
|
|
18866
|
-
import { z as
|
|
18867
|
-
var cadassemblyProps =
|
|
18901
|
+
import { z as z121 } from "zod";
|
|
18902
|
+
var cadassemblyProps = z121.object({
|
|
18868
18903
|
originalLayer: layer_ref12.default("top").optional(),
|
|
18869
|
-
children:
|
|
18904
|
+
children: z121.any().optional()
|
|
18870
18905
|
});
|
|
18871
18906
|
expectTypesMatch(true);
|
|
18872
18907
|
|
|
18873
18908
|
// lib/components/cadmodel.ts
|
|
18874
|
-
import { z as
|
|
18875
|
-
var pcbPosition =
|
|
18909
|
+
import { z as z122 } from "zod";
|
|
18910
|
+
var pcbPosition = z122.object({
|
|
18876
18911
|
pcbX: pcbCoordinate.optional(),
|
|
18877
18912
|
pcbY: pcbCoordinate.optional(),
|
|
18878
18913
|
pcbLeftEdgeX: pcbCoordinate.optional(),
|
|
@@ -18889,7 +18924,7 @@ var cadModelBaseWithUrl = cadModelBase.extend({
|
|
|
18889
18924
|
});
|
|
18890
18925
|
var cadModelObject = cadModelBaseWithUrl.merge(pcbPosition);
|
|
18891
18926
|
expectTypesMatch(true);
|
|
18892
|
-
var cadmodelProps =
|
|
18927
|
+
var cadmodelProps = z122.union([z122.null(), url, cadModelObject]);
|
|
18893
18928
|
|
|
18894
18929
|
// lib/components/power-source.ts
|
|
18895
18930
|
import { voltage as voltage5 } from "circuit-json";
|
|
@@ -18899,9 +18934,9 @@ var powerSourceProps = commonComponentProps.extend({
|
|
|
18899
18934
|
|
|
18900
18935
|
// lib/components/voltagesource.ts
|
|
18901
18936
|
import { frequency as frequency5, ms as ms4, rotation as rotation6, voltage as voltage6 } from "circuit-json";
|
|
18902
|
-
import { z as
|
|
18937
|
+
import { z as z123 } from "zod";
|
|
18903
18938
|
var voltageSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
18904
|
-
var percentage =
|
|
18939
|
+
var percentage = z123.union([z123.string(), z123.number()]).transform((val) => {
|
|
18905
18940
|
if (typeof val === "string") {
|
|
18906
18941
|
if (val.endsWith("%")) {
|
|
18907
18942
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -18910,13 +18945,13 @@ var percentage = z122.union([z122.string(), z122.number()]).transform((val) => {
|
|
|
18910
18945
|
}
|
|
18911
18946
|
return val;
|
|
18912
18947
|
}).pipe(
|
|
18913
|
-
|
|
18948
|
+
z123.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
18914
18949
|
);
|
|
18915
18950
|
var voltageSourceProps = commonComponentProps.extend({
|
|
18916
18951
|
voltage: voltage6.optional(),
|
|
18917
18952
|
frequency: frequency5.optional(),
|
|
18918
18953
|
peakToPeakVoltage: voltage6.optional(),
|
|
18919
|
-
waveShape:
|
|
18954
|
+
waveShape: z123.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
18920
18955
|
phase: rotation6.optional(),
|
|
18921
18956
|
dutyCycle: percentage.optional(),
|
|
18922
18957
|
pulseDelay: ms4.optional(),
|
|
@@ -18933,9 +18968,9 @@ expectTypesMatch(true);
|
|
|
18933
18968
|
|
|
18934
18969
|
// lib/components/currentsource.ts
|
|
18935
18970
|
import { frequency as frequency6, rotation as rotation7, current as current3 } from "circuit-json";
|
|
18936
|
-
import { z as
|
|
18971
|
+
import { z as z124 } from "zod";
|
|
18937
18972
|
var currentSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
18938
|
-
var percentage2 =
|
|
18973
|
+
var percentage2 = z124.union([z124.string(), z124.number()]).transform((val) => {
|
|
18939
18974
|
if (typeof val === "string") {
|
|
18940
18975
|
if (val.endsWith("%")) {
|
|
18941
18976
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -18944,13 +18979,13 @@ var percentage2 = z123.union([z123.string(), z123.number()]).transform((val) =>
|
|
|
18944
18979
|
}
|
|
18945
18980
|
return val;
|
|
18946
18981
|
}).pipe(
|
|
18947
|
-
|
|
18982
|
+
z124.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
18948
18983
|
);
|
|
18949
18984
|
var currentSourceProps = commonComponentProps.extend({
|
|
18950
18985
|
current: current3.optional(),
|
|
18951
18986
|
frequency: frequency6.optional(),
|
|
18952
18987
|
peakToPeakCurrent: current3.optional(),
|
|
18953
|
-
waveShape:
|
|
18988
|
+
waveShape: z124.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
18954
18989
|
phase: rotation7.optional(),
|
|
18955
18990
|
dutyCycle: percentage2.optional(),
|
|
18956
18991
|
acMagnitude: current3.optional(),
|
|
@@ -18961,21 +18996,21 @@ var currentSourcePins = lrPolarPins;
|
|
|
18961
18996
|
expectTypesMatch(true);
|
|
18962
18997
|
|
|
18963
18998
|
// lib/components/voltageprobe.ts
|
|
18964
|
-
import { z as
|
|
18999
|
+
import { z as z125 } from "zod";
|
|
18965
19000
|
var voltageProbeProps = commonComponentProps.omit({ name: true }).extend({
|
|
18966
|
-
name:
|
|
18967
|
-
connectsTo:
|
|
18968
|
-
referenceTo:
|
|
18969
|
-
color:
|
|
18970
|
-
graphDisplayName:
|
|
18971
|
-
graphCenter:
|
|
18972
|
-
graphVerticalOffset:
|
|
18973
|
-
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()
|
|
18974
19009
|
});
|
|
18975
19010
|
expectTypesMatch(true);
|
|
18976
19011
|
|
|
18977
19012
|
// lib/components/ammeter.ts
|
|
18978
|
-
import { z as
|
|
19013
|
+
import { z as z126 } from "zod";
|
|
18979
19014
|
var ammeterPinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
18980
19015
|
var hasAmmeterConnectionPair = (connections) => {
|
|
18981
19016
|
return connections.pos !== void 0 && connections.neg !== void 0 || connections.pin1 !== void 0 && connections.pin2 !== void 0;
|
|
@@ -18985,64 +19020,64 @@ var ammeterProps = commonComponentProps.extend({
|
|
|
18985
19020
|
hasAmmeterConnectionPair,
|
|
18986
19021
|
"Ammeter connections must include either pos/neg or pin1/pin2"
|
|
18987
19022
|
),
|
|
18988
|
-
color:
|
|
18989
|
-
graphDisplayName:
|
|
18990
|
-
graphCenter:
|
|
18991
|
-
graphVerticalOffset:
|
|
18992
|
-
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()
|
|
18993
19028
|
});
|
|
18994
19029
|
var ammeterPins = ammeterPinLabels;
|
|
18995
19030
|
expectTypesMatch(true);
|
|
18996
19031
|
|
|
18997
19032
|
// lib/components/schematic-arc.ts
|
|
18998
19033
|
import { distance as distance32, point as point5, rotation as rotation8 } from "circuit-json";
|
|
18999
|
-
import { z as
|
|
19000
|
-
var schematicArcProps =
|
|
19034
|
+
import { z as z127 } from "zod";
|
|
19035
|
+
var schematicArcProps = z127.object({
|
|
19001
19036
|
center: point5,
|
|
19002
19037
|
radius: distance32,
|
|
19003
19038
|
startAngleDegrees: rotation8,
|
|
19004
19039
|
endAngleDegrees: rotation8,
|
|
19005
|
-
direction:
|
|
19040
|
+
direction: z127.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
19006
19041
|
strokeWidth: distance32.optional(),
|
|
19007
|
-
color:
|
|
19008
|
-
isDashed:
|
|
19042
|
+
color: z127.string().optional(),
|
|
19043
|
+
isDashed: z127.boolean().optional().default(false)
|
|
19009
19044
|
});
|
|
19010
19045
|
expectTypesMatch(true);
|
|
19011
19046
|
|
|
19012
19047
|
// lib/components/toolingrail.ts
|
|
19013
|
-
import { z as
|
|
19014
|
-
var toolingrailProps =
|
|
19015
|
-
children:
|
|
19048
|
+
import { z as z128 } from "zod";
|
|
19049
|
+
var toolingrailProps = z128.object({
|
|
19050
|
+
children: z128.any().optional()
|
|
19016
19051
|
});
|
|
19017
19052
|
expectTypesMatch(true);
|
|
19018
19053
|
|
|
19019
19054
|
// lib/components/schematic-box.ts
|
|
19020
19055
|
import { distance as distance33 } from "circuit-json";
|
|
19021
|
-
import { z as
|
|
19022
|
-
var schematicBoxProps =
|
|
19023
|
-
name:
|
|
19024
|
-
chipRef:
|
|
19056
|
+
import { z as z129 } from "zod";
|
|
19057
|
+
var schematicBoxProps = z129.object({
|
|
19058
|
+
name: z129.string().optional(),
|
|
19059
|
+
chipRef: z129.string().optional(),
|
|
19025
19060
|
pinLabels: pinLabelsProp.optional(),
|
|
19026
19061
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
19027
19062
|
schPinStyle: schematicPinStyle.optional(),
|
|
19028
19063
|
schX: distance33.optional(),
|
|
19029
19064
|
schY: distance33.optional(),
|
|
19030
|
-
schSectionName:
|
|
19031
|
-
schSheetName:
|
|
19065
|
+
schSectionName: z129.string().optional(),
|
|
19066
|
+
schSheetName: z129.string().optional(),
|
|
19032
19067
|
width: distance33.optional(),
|
|
19033
19068
|
height: distance33.optional(),
|
|
19034
|
-
overlay:
|
|
19069
|
+
overlay: z129.array(z129.string()).optional(),
|
|
19035
19070
|
padding: distance33.optional(),
|
|
19036
19071
|
paddingLeft: distance33.optional(),
|
|
19037
19072
|
paddingRight: distance33.optional(),
|
|
19038
19073
|
paddingTop: distance33.optional(),
|
|
19039
19074
|
paddingBottom: distance33.optional(),
|
|
19040
|
-
title:
|
|
19075
|
+
title: z129.string().optional(),
|
|
19041
19076
|
titleAlignment: ninePointAnchor.default("top_left"),
|
|
19042
|
-
titleColor:
|
|
19077
|
+
titleColor: z129.string().optional(),
|
|
19043
19078
|
titleFontSize: distance33.optional(),
|
|
19044
|
-
titleInside:
|
|
19045
|
-
strokeStyle:
|
|
19079
|
+
titleInside: z129.boolean().default(false),
|
|
19080
|
+
strokeStyle: z129.enum(["solid", "dashed"]).default("solid")
|
|
19046
19081
|
}).refine(
|
|
19047
19082
|
(elm) => elm.width !== void 0 && elm.height !== void 0 || Array.isArray(elm.overlay) && elm.overlay.length > 0,
|
|
19048
19083
|
{
|
|
@@ -19058,21 +19093,21 @@ expectTypesMatch(true);
|
|
|
19058
19093
|
|
|
19059
19094
|
// lib/components/schematic-symbol.ts
|
|
19060
19095
|
import { rotation as rotation9 } from "circuit-json";
|
|
19061
|
-
import { z as
|
|
19062
|
-
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, {
|
|
19063
19098
|
message: "connections must map at least one schematic symbol port"
|
|
19064
19099
|
});
|
|
19065
|
-
var schematicSymbolProps =
|
|
19066
|
-
name:
|
|
19067
|
-
displayName:
|
|
19068
|
-
chipRef:
|
|
19069
|
-
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),
|
|
19070
19105
|
connections: schematicSymbolConnections.optional(),
|
|
19071
19106
|
schX: distance.optional(),
|
|
19072
19107
|
schY: distance.optional(),
|
|
19073
19108
|
schRotation: rotation9.optional(),
|
|
19074
|
-
schSectionName:
|
|
19075
|
-
schSheetName:
|
|
19109
|
+
schSectionName: z130.string().optional(),
|
|
19110
|
+
schSheetName: z130.string().optional()
|
|
19076
19111
|
});
|
|
19077
19112
|
expectTypesMatch(
|
|
19078
19113
|
true
|
|
@@ -19080,15 +19115,15 @@ expectTypesMatch(
|
|
|
19080
19115
|
|
|
19081
19116
|
// lib/components/schematic-circle.ts
|
|
19082
19117
|
import { distance as distance34, point as point6 } from "circuit-json";
|
|
19083
|
-
import { z as
|
|
19084
|
-
var schematicCircleProps =
|
|
19118
|
+
import { z as z131 } from "zod";
|
|
19119
|
+
var schematicCircleProps = z131.object({
|
|
19085
19120
|
center: point6,
|
|
19086
19121
|
radius: distance34,
|
|
19087
19122
|
strokeWidth: distance34.optional(),
|
|
19088
|
-
color:
|
|
19089
|
-
isFilled:
|
|
19090
|
-
fillColor:
|
|
19091
|
-
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)
|
|
19092
19127
|
});
|
|
19093
19128
|
expectTypesMatch(
|
|
19094
19129
|
true
|
|
@@ -19096,32 +19131,32 @@ expectTypesMatch(
|
|
|
19096
19131
|
|
|
19097
19132
|
// lib/components/schematic-rect.ts
|
|
19098
19133
|
import { distance as distance35, rotation as rotation10 } from "circuit-json";
|
|
19099
|
-
import { z as
|
|
19100
|
-
var schematicRectProps =
|
|
19134
|
+
import { z as z132 } from "zod";
|
|
19135
|
+
var schematicRectProps = z132.object({
|
|
19101
19136
|
schX: distance35.optional(),
|
|
19102
19137
|
schY: distance35.optional(),
|
|
19103
19138
|
width: distance35,
|
|
19104
19139
|
height: distance35,
|
|
19105
19140
|
rotation: rotation10.default(0),
|
|
19106
19141
|
strokeWidth: distance35.optional(),
|
|
19107
|
-
color:
|
|
19108
|
-
isFilled:
|
|
19109
|
-
fillColor:
|
|
19110
|
-
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)
|
|
19111
19146
|
});
|
|
19112
19147
|
expectTypesMatch(true);
|
|
19113
19148
|
|
|
19114
19149
|
// lib/components/schematic-line.ts
|
|
19115
19150
|
import { distance as distance36 } from "circuit-json";
|
|
19116
|
-
import { z as
|
|
19117
|
-
var schematicLineProps =
|
|
19151
|
+
import { z as z133 } from "zod";
|
|
19152
|
+
var schematicLineProps = z133.object({
|
|
19118
19153
|
x1: distance36,
|
|
19119
19154
|
y1: distance36,
|
|
19120
19155
|
x2: distance36,
|
|
19121
19156
|
y2: distance36,
|
|
19122
19157
|
strokeWidth: distance36.optional(),
|
|
19123
|
-
color:
|
|
19124
|
-
isDashed:
|
|
19158
|
+
color: z133.string().optional(),
|
|
19159
|
+
isDashed: z133.boolean().optional().default(false),
|
|
19125
19160
|
dashLength: distance36.optional(),
|
|
19126
19161
|
dashGap: distance36.optional()
|
|
19127
19162
|
});
|
|
@@ -19129,11 +19164,11 @@ expectTypesMatch(true);
|
|
|
19129
19164
|
|
|
19130
19165
|
// lib/components/schematic-text.ts
|
|
19131
19166
|
import { distance as distance37, rotation as rotation11 } from "circuit-json";
|
|
19132
|
-
import { z as
|
|
19167
|
+
import { z as z135 } from "zod";
|
|
19133
19168
|
|
|
19134
19169
|
// lib/common/fivePointAnchor.ts
|
|
19135
|
-
import { z as
|
|
19136
|
-
var fivePointAnchor =
|
|
19170
|
+
import { z as z134 } from "zod";
|
|
19171
|
+
var fivePointAnchor = z134.enum([
|
|
19137
19172
|
"center",
|
|
19138
19173
|
"left",
|
|
19139
19174
|
"right",
|
|
@@ -19142,39 +19177,39 @@ var fivePointAnchor = z133.enum([
|
|
|
19142
19177
|
]);
|
|
19143
19178
|
|
|
19144
19179
|
// lib/components/schematic-text.ts
|
|
19145
|
-
var schematicTextProps =
|
|
19180
|
+
var schematicTextProps = z135.object({
|
|
19146
19181
|
schX: distance37.optional(),
|
|
19147
19182
|
schY: distance37.optional(),
|
|
19148
|
-
text:
|
|
19149
|
-
fontSize:
|
|
19150
|
-
anchor:
|
|
19151
|
-
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"),
|
|
19152
19187
|
schRotation: rotation11.default(0)
|
|
19153
19188
|
});
|
|
19154
19189
|
expectTypesMatch(true);
|
|
19155
19190
|
|
|
19156
19191
|
// lib/components/schematic-path.ts
|
|
19157
19192
|
import { distance as distance38, point as point7 } from "circuit-json";
|
|
19158
|
-
import { z as
|
|
19159
|
-
var schematicPathProps =
|
|
19160
|
-
points:
|
|
19161
|
-
svgPath:
|
|
19193
|
+
import { z as z136 } from "zod";
|
|
19194
|
+
var schematicPathProps = z136.object({
|
|
19195
|
+
points: z136.array(point7).optional(),
|
|
19196
|
+
svgPath: z136.string().optional(),
|
|
19162
19197
|
strokeWidth: distance38.optional(),
|
|
19163
|
-
strokeColor:
|
|
19198
|
+
strokeColor: z136.string().optional(),
|
|
19164
19199
|
dashLength: distance38.optional(),
|
|
19165
19200
|
dashGap: distance38.optional(),
|
|
19166
|
-
isFilled:
|
|
19167
|
-
fillColor:
|
|
19201
|
+
isFilled: z136.boolean().optional().default(false),
|
|
19202
|
+
fillColor: z136.string().optional()
|
|
19168
19203
|
});
|
|
19169
19204
|
expectTypesMatch(true);
|
|
19170
19205
|
|
|
19171
19206
|
// lib/components/schematic-table.ts
|
|
19172
19207
|
import { distance as distance39 } from "circuit-json";
|
|
19173
|
-
import { z as
|
|
19174
|
-
var schematicTableProps =
|
|
19208
|
+
import { z as z137 } from "zod";
|
|
19209
|
+
var schematicTableProps = z137.object({
|
|
19175
19210
|
schX: distance39.optional(),
|
|
19176
19211
|
schY: distance39.optional(),
|
|
19177
|
-
children:
|
|
19212
|
+
children: z137.any().optional(),
|
|
19178
19213
|
cellPadding: distance39.optional(),
|
|
19179
19214
|
borderWidth: distance39.optional(),
|
|
19180
19215
|
anchor: ninePointAnchor.optional(),
|
|
@@ -19184,34 +19219,34 @@ expectTypesMatch(true);
|
|
|
19184
19219
|
|
|
19185
19220
|
// lib/components/schematic-row.ts
|
|
19186
19221
|
import { distance as distance40 } from "circuit-json";
|
|
19187
|
-
import { z as
|
|
19188
|
-
var schematicRowProps =
|
|
19189
|
-
children:
|
|
19222
|
+
import { z as z138 } from "zod";
|
|
19223
|
+
var schematicRowProps = z138.object({
|
|
19224
|
+
children: z138.any().optional(),
|
|
19190
19225
|
height: distance40.optional()
|
|
19191
19226
|
});
|
|
19192
19227
|
expectTypesMatch(true);
|
|
19193
19228
|
|
|
19194
19229
|
// lib/components/schematic-cell.ts
|
|
19195
19230
|
import { distance as distance41 } from "circuit-json";
|
|
19196
|
-
import { z as
|
|
19197
|
-
var schematicCellProps =
|
|
19198
|
-
children:
|
|
19199
|
-
horizontalAlign:
|
|
19200
|
-
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(),
|
|
19201
19236
|
fontSize: distance41.optional(),
|
|
19202
|
-
rowSpan:
|
|
19203
|
-
colSpan:
|
|
19237
|
+
rowSpan: z139.number().optional(),
|
|
19238
|
+
colSpan: z139.number().optional(),
|
|
19204
19239
|
width: distance41.optional(),
|
|
19205
|
-
text:
|
|
19240
|
+
text: z139.string().optional()
|
|
19206
19241
|
});
|
|
19207
19242
|
expectTypesMatch(true);
|
|
19208
19243
|
|
|
19209
19244
|
// lib/components/schematic-section.ts
|
|
19210
19245
|
import { distance as distance42 } from "circuit-json";
|
|
19211
|
-
import { z as
|
|
19212
|
-
var schematicSectionProps =
|
|
19213
|
-
displayName:
|
|
19214
|
-
name:
|
|
19246
|
+
import { z as z140 } from "zod";
|
|
19247
|
+
var schematicSectionProps = z140.object({
|
|
19248
|
+
displayName: z140.string().optional(),
|
|
19249
|
+
name: z140.string(),
|
|
19215
19250
|
sectionTitleFontSize: distance42.optional()
|
|
19216
19251
|
});
|
|
19217
19252
|
expectTypesMatch(
|
|
@@ -19219,30 +19254,30 @@ expectTypesMatch(
|
|
|
19219
19254
|
);
|
|
19220
19255
|
|
|
19221
19256
|
// lib/components/schematic-sheet.ts
|
|
19222
|
-
import { z as
|
|
19257
|
+
import { z as z141 } from "zod";
|
|
19223
19258
|
import { distance as distance43 } from "circuit-json";
|
|
19224
|
-
var schematicSheetProps =
|
|
19225
|
-
name:
|
|
19226
|
-
displayName:
|
|
19227
|
-
sheetIndex:
|
|
19228
|
-
sheetSize:
|
|
19229
|
-
sheetWidth: distance43.pipe(
|
|
19230
|
-
sheetHeight: distance43.pipe(
|
|
19231
|
-
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()
|
|
19232
19267
|
});
|
|
19233
19268
|
expectTypesMatch(true);
|
|
19234
19269
|
|
|
19235
19270
|
// lib/components/schematic-graphic.ts
|
|
19236
|
-
import { z as
|
|
19271
|
+
import { z as z142 } from "zod";
|
|
19237
19272
|
var nonemptyUrl = url.refine((value) => value.trim().length > 0, {
|
|
19238
19273
|
message: "imageUrl cannot be empty"
|
|
19239
19274
|
});
|
|
19240
19275
|
var positiveDistance5 = (fieldName) => distance.refine((value) => Number.isFinite(value) && value > 0, {
|
|
19241
19276
|
message: `${fieldName} must be a positive finite distance`
|
|
19242
19277
|
});
|
|
19243
|
-
var schematicGraphicProps =
|
|
19278
|
+
var schematicGraphicProps = z142.object({
|
|
19244
19279
|
imageUrl: nonemptyUrl.optional(),
|
|
19245
|
-
svgContent:
|
|
19280
|
+
svgContent: z142.string().refine((value) => value.trim().length > 0, {
|
|
19246
19281
|
message: "svgContent cannot be empty"
|
|
19247
19282
|
}).optional(),
|
|
19248
19283
|
width: positiveDistance5("width").optional(),
|
|
@@ -19250,7 +19285,7 @@ var schematicGraphicProps = z141.object({
|
|
|
19250
19285
|
}).superRefine(({ imageUrl, svgContent }, ctx) => {
|
|
19251
19286
|
if (imageUrl === void 0 && svgContent === void 0) {
|
|
19252
19287
|
ctx.addIssue({
|
|
19253
|
-
code:
|
|
19288
|
+
code: z142.ZodIssueCode.custom,
|
|
19254
19289
|
message: "At least one of imageUrl or svgContent is required"
|
|
19255
19290
|
});
|
|
19256
19291
|
}
|
|
@@ -19261,40 +19296,40 @@ expectTypesMatch(
|
|
|
19261
19296
|
|
|
19262
19297
|
// lib/components/copper-text.ts
|
|
19263
19298
|
import { layer_ref as layer_ref13, length as length8 } from "circuit-json";
|
|
19264
|
-
import { z as
|
|
19299
|
+
import { z as z143 } from "zod";
|
|
19265
19300
|
var copperTextProps = pcbLayoutProps.extend({
|
|
19266
|
-
text:
|
|
19301
|
+
text: z143.string(),
|
|
19267
19302
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
19268
|
-
font:
|
|
19303
|
+
font: z143.enum(["tscircuit2024"]).optional(),
|
|
19269
19304
|
fontSize: length8.optional(),
|
|
19270
|
-
layers:
|
|
19271
|
-
knockout:
|
|
19272
|
-
mirrored:
|
|
19305
|
+
layers: z143.array(layer_ref13).optional(),
|
|
19306
|
+
knockout: z143.boolean().optional(),
|
|
19307
|
+
mirrored: z143.boolean().optional()
|
|
19273
19308
|
});
|
|
19274
19309
|
|
|
19275
19310
|
// lib/components/silkscreen-text.ts
|
|
19276
19311
|
import { layer_ref as layer_ref14, length as length9 } from "circuit-json";
|
|
19277
|
-
import { z as
|
|
19312
|
+
import { z as z144 } from "zod";
|
|
19278
19313
|
var silkscreenTextProps = pcbLayoutProps.extend({
|
|
19279
|
-
text:
|
|
19314
|
+
text: z144.string(),
|
|
19280
19315
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
19281
|
-
font:
|
|
19316
|
+
font: z144.enum(["tscircuit2024"]).optional(),
|
|
19282
19317
|
fontSize: length9.optional(),
|
|
19283
19318
|
/**
|
|
19284
19319
|
* If true, text will knock out underlying silkscreen
|
|
19285
19320
|
*/
|
|
19286
|
-
isKnockout:
|
|
19321
|
+
isKnockout: z144.boolean().optional(),
|
|
19287
19322
|
knockoutPadding: length9.optional(),
|
|
19288
19323
|
knockoutPaddingLeft: length9.optional(),
|
|
19289
19324
|
knockoutPaddingRight: length9.optional(),
|
|
19290
19325
|
knockoutPaddingTop: length9.optional(),
|
|
19291
19326
|
knockoutPaddingBottom: length9.optional(),
|
|
19292
|
-
layers:
|
|
19327
|
+
layers: z144.array(layer_ref14).optional()
|
|
19293
19328
|
});
|
|
19294
19329
|
|
|
19295
19330
|
// lib/components/silkscreen-path.ts
|
|
19296
19331
|
import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
|
|
19297
|
-
import { z as
|
|
19332
|
+
import { z as z145 } from "zod";
|
|
19298
19333
|
var silkscreenPathProps = pcbLayoutProps.omit({
|
|
19299
19334
|
pcbLeftEdgeX: true,
|
|
19300
19335
|
pcbRightEdgeX: true,
|
|
@@ -19306,7 +19341,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
|
|
|
19306
19341
|
pcbOffsetY: true,
|
|
19307
19342
|
pcbRotation: true
|
|
19308
19343
|
}).extend({
|
|
19309
|
-
route:
|
|
19344
|
+
route: z145.array(route_hint_point5),
|
|
19310
19345
|
strokeWidth: length10.optional()
|
|
19311
19346
|
});
|
|
19312
19347
|
|
|
@@ -19328,10 +19363,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({
|
|
|
19328
19363
|
|
|
19329
19364
|
// lib/components/silkscreen-rect.ts
|
|
19330
19365
|
import { distance as distance45 } from "circuit-json";
|
|
19331
|
-
import { z as
|
|
19366
|
+
import { z as z146 } from "zod";
|
|
19332
19367
|
var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
19333
|
-
filled:
|
|
19334
|
-
stroke:
|
|
19368
|
+
filled: z146.boolean().default(true).optional(),
|
|
19369
|
+
stroke: z146.enum(["dashed", "solid", "none"]).optional(),
|
|
19335
19370
|
strokeWidth: distance45.optional(),
|
|
19336
19371
|
width: distance45,
|
|
19337
19372
|
height: distance45,
|
|
@@ -19340,10 +19375,10 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
19340
19375
|
|
|
19341
19376
|
// lib/components/silkscreen-circle.ts
|
|
19342
19377
|
import { distance as distance46 } from "circuit-json";
|
|
19343
|
-
import { z as
|
|
19378
|
+
import { z as z147 } from "zod";
|
|
19344
19379
|
var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
19345
|
-
isFilled:
|
|
19346
|
-
isOutline:
|
|
19380
|
+
isFilled: z147.boolean().optional(),
|
|
19381
|
+
isOutline: z147.boolean().optional(),
|
|
19347
19382
|
strokeWidth: distance46.optional(),
|
|
19348
19383
|
radius: distance46
|
|
19349
19384
|
});
|
|
@@ -19361,69 +19396,69 @@ expectTypesMatch(true);
|
|
|
19361
19396
|
|
|
19362
19397
|
// lib/components/trace-hint.ts
|
|
19363
19398
|
import { distance as distance47, layer_ref as layer_ref15, route_hint_point as route_hint_point6 } from "circuit-json";
|
|
19364
|
-
import { z as
|
|
19365
|
-
var routeHintPointProps =
|
|
19399
|
+
import { z as z149 } from "zod";
|
|
19400
|
+
var routeHintPointProps = z149.object({
|
|
19366
19401
|
x: distance47,
|
|
19367
19402
|
y: distance47,
|
|
19368
|
-
via:
|
|
19403
|
+
via: z149.boolean().optional(),
|
|
19369
19404
|
toLayer: layer_ref15.optional()
|
|
19370
19405
|
});
|
|
19371
|
-
var traceHintProps =
|
|
19372
|
-
for:
|
|
19406
|
+
var traceHintProps = z149.object({
|
|
19407
|
+
for: z149.string().optional().describe(
|
|
19373
19408
|
"Selector for the port you're targeting, not required if you're inside a trace"
|
|
19374
19409
|
),
|
|
19375
|
-
order:
|
|
19410
|
+
order: z149.number().optional(),
|
|
19376
19411
|
offset: route_hint_point6.or(routeHintPointProps).optional(),
|
|
19377
|
-
offsets:
|
|
19378
|
-
traceWidth:
|
|
19412
|
+
offsets: z149.array(route_hint_point6).or(z149.array(routeHintPointProps)).optional(),
|
|
19413
|
+
traceWidth: z149.number().optional()
|
|
19379
19414
|
});
|
|
19380
19415
|
|
|
19381
19416
|
// lib/components/port.ts
|
|
19382
19417
|
import { distance as distance48 } from "circuit-json";
|
|
19383
|
-
import { z as
|
|
19418
|
+
import { z as z150 } from "zod";
|
|
19384
19419
|
var portProps = commonLayoutProps.extend({
|
|
19385
|
-
name:
|
|
19386
|
-
pinNumber:
|
|
19387
|
-
schStemLength:
|
|
19388
|
-
schPinLabelFontSize:
|
|
19420
|
+
name: z150.string().optional(),
|
|
19421
|
+
pinNumber: z150.number().optional(),
|
|
19422
|
+
schStemLength: z150.number().optional(),
|
|
19423
|
+
schPinLabelFontSize: z150.enum(["default", "sm"]).or(
|
|
19389
19424
|
distance48.refine((value) => Number.isFinite(value) && value > 0, {
|
|
19390
19425
|
message: "Schematic pin-label font size must be positive and finite"
|
|
19391
19426
|
})
|
|
19392
19427
|
).optional(),
|
|
19393
|
-
aliases:
|
|
19394
|
-
layer:
|
|
19395
|
-
layers:
|
|
19396
|
-
schX:
|
|
19397
|
-
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(),
|
|
19398
19433
|
direction: direction.optional(),
|
|
19399
|
-
connectsTo:
|
|
19434
|
+
connectsTo: z150.string().or(z150.array(z150.string())).optional(),
|
|
19400
19435
|
kicadPinMetadata: kicadPinMetadata.optional(),
|
|
19401
|
-
hasInversionCircle:
|
|
19436
|
+
hasInversionCircle: z150.boolean().optional()
|
|
19402
19437
|
});
|
|
19403
19438
|
|
|
19404
19439
|
// lib/components/pcb-note-text.ts
|
|
19405
19440
|
import { length as length11 } from "circuit-json";
|
|
19406
|
-
import { z as
|
|
19441
|
+
import { z as z151 } from "zod";
|
|
19407
19442
|
var pcbNoteTextProps = pcbLayoutProps.extend({
|
|
19408
|
-
text:
|
|
19409
|
-
anchorAlignment:
|
|
19410
|
-
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(),
|
|
19411
19446
|
fontSize: length11.optional(),
|
|
19412
|
-
color:
|
|
19447
|
+
color: z151.string().optional()
|
|
19413
19448
|
});
|
|
19414
19449
|
expectTypesMatch(true);
|
|
19415
19450
|
|
|
19416
19451
|
// lib/components/pcb-note-rect.ts
|
|
19417
19452
|
import { distance as distance49 } from "circuit-json";
|
|
19418
|
-
import { z as
|
|
19453
|
+
import { z as z152 } from "zod";
|
|
19419
19454
|
var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
19420
19455
|
width: distance49,
|
|
19421
19456
|
height: distance49,
|
|
19422
19457
|
strokeWidth: distance49.optional(),
|
|
19423
|
-
isFilled:
|
|
19424
|
-
hasStroke:
|
|
19425
|
-
isStrokeDashed:
|
|
19426
|
-
color:
|
|
19458
|
+
isFilled: z152.boolean().optional(),
|
|
19459
|
+
hasStroke: z152.boolean().optional(),
|
|
19460
|
+
isStrokeDashed: z152.boolean().optional(),
|
|
19461
|
+
color: z152.string().optional(),
|
|
19427
19462
|
cornerRadius: distance49.optional()
|
|
19428
19463
|
});
|
|
19429
19464
|
expectTypesMatch(true);
|
|
@@ -19433,7 +19468,7 @@ import {
|
|
|
19433
19468
|
length as length12,
|
|
19434
19469
|
route_hint_point as route_hint_point7
|
|
19435
19470
|
} from "circuit-json";
|
|
19436
|
-
import { z as
|
|
19471
|
+
import { z as z153 } from "zod";
|
|
19437
19472
|
var pcbNotePathProps = pcbLayoutProps.omit({
|
|
19438
19473
|
pcbLeftEdgeX: true,
|
|
19439
19474
|
pcbRightEdgeX: true,
|
|
@@ -19445,15 +19480,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
|
|
|
19445
19480
|
pcbOffsetY: true,
|
|
19446
19481
|
pcbRotation: true
|
|
19447
19482
|
}).extend({
|
|
19448
|
-
route:
|
|
19483
|
+
route: z153.array(route_hint_point7),
|
|
19449
19484
|
strokeWidth: length12.optional(),
|
|
19450
|
-
color:
|
|
19485
|
+
color: z153.string().optional()
|
|
19451
19486
|
});
|
|
19452
19487
|
expectTypesMatch(true);
|
|
19453
19488
|
|
|
19454
19489
|
// lib/components/pcb-note-line.ts
|
|
19455
19490
|
import { distance as distance50 } from "circuit-json";
|
|
19456
|
-
import { z as
|
|
19491
|
+
import { z as z154 } from "zod";
|
|
19457
19492
|
var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
19458
19493
|
pcbLeftEdgeX: true,
|
|
19459
19494
|
pcbRightEdgeX: true,
|
|
@@ -19470,15 +19505,15 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
|
19470
19505
|
x2: distance50,
|
|
19471
19506
|
y2: distance50,
|
|
19472
19507
|
strokeWidth: distance50.optional(),
|
|
19473
|
-
color:
|
|
19474
|
-
isDashed:
|
|
19508
|
+
color: z154.string().optional(),
|
|
19509
|
+
isDashed: z154.boolean().optional()
|
|
19475
19510
|
});
|
|
19476
19511
|
expectTypesMatch(true);
|
|
19477
19512
|
|
|
19478
19513
|
// lib/components/pcb-note-dimension.ts
|
|
19479
19514
|
import { distance as distance51, length as length13 } from "circuit-json";
|
|
19480
|
-
import { z as
|
|
19481
|
-
var dimensionTarget2 =
|
|
19515
|
+
import { z as z155 } from "zod";
|
|
19516
|
+
var dimensionTarget2 = z155.union([z155.string(), point]);
|
|
19482
19517
|
var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
19483
19518
|
pcbLeftEdgeX: true,
|
|
19484
19519
|
pcbRightEdgeX: true,
|
|
@@ -19492,114 +19527,114 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
19492
19527
|
}).extend({
|
|
19493
19528
|
from: dimensionTarget2,
|
|
19494
19529
|
to: dimensionTarget2,
|
|
19495
|
-
text:
|
|
19530
|
+
text: z155.string().optional(),
|
|
19496
19531
|
offset: distance51.optional(),
|
|
19497
|
-
offsetDirection:
|
|
19498
|
-
font:
|
|
19532
|
+
offsetDirection: z155.object({ x: z155.number().finite(), y: z155.number().finite() }).optional(),
|
|
19533
|
+
font: z155.enum(["tscircuit2024"]).optional(),
|
|
19499
19534
|
fontSize: length13.optional(),
|
|
19500
|
-
color:
|
|
19535
|
+
color: z155.string().optional(),
|
|
19501
19536
|
arrowSize: distance51.optional(),
|
|
19502
|
-
units:
|
|
19503
|
-
outerEdgeToEdge:
|
|
19504
|
-
centerToCenter:
|
|
19505
|
-
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()
|
|
19506
19541
|
});
|
|
19507
19542
|
expectTypesMatch(
|
|
19508
19543
|
true
|
|
19509
19544
|
);
|
|
19510
19545
|
|
|
19511
19546
|
// lib/platformConfig.ts
|
|
19512
|
-
import { z as
|
|
19513
|
-
var unvalidatedCircuitJson =
|
|
19514
|
-
var footprintLibraryResult =
|
|
19515
|
-
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()),
|
|
19516
19551
|
cadModel: cadModelProp.optional()
|
|
19517
19552
|
});
|
|
19518
|
-
var pathToCircuitJsonFn =
|
|
19519
|
-
|
|
19520
|
-
|
|
19521
|
-
|
|
19522
|
-
).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))
|
|
19523
19558
|
).describe("A function that takes a path and returns Circuit JSON");
|
|
19524
|
-
var footprintFileParserEntry =
|
|
19525
|
-
loadFromUrl:
|
|
19559
|
+
var footprintFileParserEntry = z156.object({
|
|
19560
|
+
loadFromUrl: z156.function().args(z156.string()).returns(z156.promise(footprintLibraryResult)).describe(
|
|
19526
19561
|
"A function that takes a footprint file URL and returns Circuit JSON"
|
|
19527
19562
|
)
|
|
19528
19563
|
});
|
|
19529
|
-
var spiceEngineSimulationResult =
|
|
19530
|
-
engineVersionString:
|
|
19564
|
+
var spiceEngineSimulationResult = z156.object({
|
|
19565
|
+
engineVersionString: z156.string().optional(),
|
|
19531
19566
|
simulationResultCircuitJson: unvalidatedCircuitJson
|
|
19532
19567
|
});
|
|
19533
|
-
var spiceEngineZod =
|
|
19534
|
-
simulate:
|
|
19568
|
+
var spiceEngineZod = z156.object({
|
|
19569
|
+
simulate: z156.function().args(z156.string()).returns(z156.promise(spiceEngineSimulationResult)).describe(
|
|
19535
19570
|
"A function that takes a SPICE string and returns a simulation result"
|
|
19536
19571
|
)
|
|
19537
19572
|
});
|
|
19538
|
-
var defaultSpiceEngine =
|
|
19573
|
+
var defaultSpiceEngine = z156.custom(
|
|
19539
19574
|
(value) => typeof value === "string"
|
|
19540
19575
|
);
|
|
19541
|
-
var autorouterInstance =
|
|
19542
|
-
run:
|
|
19543
|
-
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")
|
|
19544
19579
|
});
|
|
19545
|
-
var autorouterDefinition =
|
|
19546
|
-
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")
|
|
19547
19582
|
});
|
|
19548
|
-
var platformFetch =
|
|
19549
|
-
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(
|
|
19550
19585
|
(value) => typeof value === "object" && value !== null && "getItem" in value && typeof value.getItem === "function" && "setItem" in value && typeof value.setItem === "function"
|
|
19551
19586
|
);
|
|
19552
|
-
var fabricatorEngine =
|
|
19587
|
+
var fabricatorEngine = z156.custom(
|
|
19553
19588
|
(value) => typeof value === "object" && value !== null && "runDrcChecks" in value && typeof value.runDrcChecks === "function"
|
|
19554
19589
|
);
|
|
19555
|
-
var platformConfig =
|
|
19590
|
+
var platformConfig = z156.object({
|
|
19556
19591
|
partsEngine: partsEngine.optional(),
|
|
19557
19592
|
fabricatorEngine: fabricatorEngine.optional(),
|
|
19558
19593
|
autorouter: autorouterProp.optional(),
|
|
19559
|
-
autorouterMap:
|
|
19560
|
-
allowLegacyAutorouters:
|
|
19594
|
+
autorouterMap: z156.record(z156.string(), autorouterDefinition).optional(),
|
|
19595
|
+
allowLegacyAutorouters: z156.boolean().optional(),
|
|
19561
19596
|
registryApiUrl: url.optional(),
|
|
19562
19597
|
cloudAutorouterUrl: url.optional(),
|
|
19563
|
-
projectName:
|
|
19598
|
+
projectName: z156.string().optional(),
|
|
19564
19599
|
projectBaseUrl: url.optional(),
|
|
19565
|
-
version:
|
|
19600
|
+
version: z156.string().optional(),
|
|
19566
19601
|
url: url.optional(),
|
|
19567
|
-
printBoardInformationToSilkscreen:
|
|
19568
|
-
includeBoardFiles:
|
|
19602
|
+
printBoardInformationToSilkscreen: z156.boolean().optional(),
|
|
19603
|
+
includeBoardFiles: z156.array(z156.string()).describe(
|
|
19569
19604
|
'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
|
|
19570
19605
|
).optional(),
|
|
19571
|
-
snapshotsDir:
|
|
19606
|
+
snapshotsDir: z156.string().describe(
|
|
19572
19607
|
'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
|
|
19573
19608
|
).optional(),
|
|
19574
19609
|
defaultSpiceEngine: defaultSpiceEngine.optional(),
|
|
19575
|
-
unitPreference:
|
|
19610
|
+
unitPreference: z156.enum(["mm", "in", "mil"]).optional(),
|
|
19576
19611
|
localCacheEngine: localCacheEngine.optional(),
|
|
19577
|
-
useCloudAutorouter:
|
|
19578
|
-
enablePartOrientationAnalysis:
|
|
19579
|
-
pcbPackSolverTimeoutMs:
|
|
19580
|
-
pcbDisabled:
|
|
19581
|
-
routingDisabled:
|
|
19582
|
-
schematicDisabled:
|
|
19583
|
-
partsEngineDisabled:
|
|
19584
|
-
analogSimulationDisabled:
|
|
19585
|
-
drcChecksDisabled:
|
|
19586
|
-
netlistDrcChecksDisabled:
|
|
19587
|
-
routingDrcChecksDisabled:
|
|
19588
|
-
placementDrcChecksDisabled:
|
|
19589
|
-
pinSpecificationDrcChecksDisabled:
|
|
19590
|
-
spiceEngineMap:
|
|
19591
|
-
footprintLibraryMap:
|
|
19592
|
-
|
|
19593
|
-
|
|
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([
|
|
19594
19629
|
pathToCircuitJsonFn,
|
|
19595
|
-
|
|
19596
|
-
|
|
19597
|
-
|
|
19630
|
+
z156.record(
|
|
19631
|
+
z156.string(),
|
|
19632
|
+
z156.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
|
|
19598
19633
|
)
|
|
19599
19634
|
])
|
|
19600
19635
|
).optional(),
|
|
19601
|
-
footprintFileParserMap:
|
|
19602
|
-
resolveProjectStaticFileImportUrl:
|
|
19636
|
+
footprintFileParserMap: z156.record(z156.string(), footprintFileParserEntry).optional(),
|
|
19637
|
+
resolveProjectStaticFileImportUrl: z156.function().args(z156.string()).returns(z156.promise(z156.string())).describe(
|
|
19603
19638
|
"A function that returns a string URL for static files for the project"
|
|
19604
19639
|
).optional(),
|
|
19605
19640
|
platformFetch: platformFetch.optional()
|
|
@@ -19646,6 +19681,7 @@ export {
|
|
|
19646
19681
|
antennaShapes,
|
|
19647
19682
|
assemblyCadAssemblyProps,
|
|
19648
19683
|
assemblyDeviceProps,
|
|
19684
|
+
assemblyMotorProps,
|
|
19649
19685
|
assemblyProps,
|
|
19650
19686
|
assemblyScreenProps,
|
|
19651
19687
|
assemblySubassemblyProps,
|