@tscircuit/props 0.0.684 → 0.0.685

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