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