@tscircuit/props 0.0.644 → 0.0.646

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