@tscircuit/props 0.0.644 → 0.0.645

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",
@@ -16425,36 +16461,36 @@ var autorouterConfig = z42.object({
16425
16461
  "auto-local",
16426
16462
  "auto-cloud"
16427
16463
  ]).optional(),
16428
- local: z42.boolean().optional()
16464
+ local: z43.boolean().optional()
16429
16465
  });
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"),
16466
+ var autorouterPreset = z43.union([
16467
+ z43.literal("sequential_trace"),
16468
+ z43.literal("subcircuit"),
16469
+ z43.literal("default"),
16470
+ z43.literal("auto"),
16471
+ z43.literal("auto_local"),
16472
+ z43.literal("auto_cloud"),
16473
+ z43.literal("auto_jumper"),
16474
+ z43.literal("tscircuit_beta"),
16475
+ z43.literal("krt"),
16476
+ z43.literal("freerouting"),
16477
+ z43.literal("laser_prefab"),
16442
16478
  // 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")
16479
+ z43.literal("single_layer_fanout"),
16480
+ z43.literal("fanout"),
16481
+ z43.literal("auto-jumper"),
16482
+ z43.literal("sequential-trace"),
16483
+ z43.literal("auto-local"),
16484
+ z43.literal("auto-cloud")
16449
16485
  ]);
16450
- var autorouterString = z42.string();
16451
- var autorouterProp = z42.union([
16486
+ var autorouterString = z43.string();
16487
+ var autorouterProp = z43.union([
16452
16488
  autorouterConfig,
16453
16489
  autorouterPreset,
16454
16490
  autorouterString
16455
16491
  ]);
16456
- var autorouterEffortLevel = z42.enum(["1x", "2x", "5x", "10x", "100x"]);
16457
- var knownAutorouterVersion = z42.enum([
16492
+ var autorouterEffortLevel = z43.enum(["1x", "2x", "5x", "10x", "100x"]);
16493
+ var knownAutorouterVersion = z43.enum([
16458
16494
  "beta_pipeline1",
16459
16495
  "beta_pipeline3",
16460
16496
  "beta_pipeline4",
@@ -16463,7 +16499,7 @@ var knownAutorouterVersion = z42.enum([
16463
16499
  "beta_pipeline9",
16464
16500
  "latest"
16465
16501
  ]);
16466
- var autorouterVersion = z42.custom(
16502
+ var autorouterVersion = z43.custom(
16467
16503
  (value) => typeof value === "string"
16468
16504
  ).transform((value) => {
16469
16505
  const parsedAutorouterVersion = knownAutorouterVersion.safeParse(value);
@@ -16474,33 +16510,33 @@ var autorouterVersion = z42.custom(
16474
16510
  return "latest";
16475
16511
  });
16476
16512
  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(),
16513
+ name: z43.string().optional(),
16514
+ children: z43.any().optional(),
16515
+ schTitle: z43.string().optional(),
16516
+ schSheetName: z43.string().optional().describe('This group will be drawn as part of this sheet e.g. "Main"'),
16517
+ key: z43.any().optional(),
16518
+ showAsSchematicBox: z43.boolean().optional(),
16519
+ connections: z43.record(z43.string(), connectionTarget.optional()).optional(),
16484
16520
  schPinArrangement: schematicPinArrangement.optional(),
16485
16521
  schPinSpacing: length3.optional(),
16486
16522
  schPinStyle: schematicPinStyle.optional(),
16487
16523
  ...layoutConfig.shape,
16488
16524
  grid: layoutConfig.shape.grid.describe("@deprecated use pcbGrid"),
16489
16525
  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([
16526
+ pcbGrid: z43.boolean().optional(),
16527
+ pcbGridCols: z43.number().or(z43.string()).optional(),
16528
+ pcbGridRows: z43.number().or(z43.string()).optional(),
16529
+ pcbGridTemplateRows: z43.string().optional(),
16530
+ pcbGridTemplateColumns: z43.string().optional(),
16531
+ pcbGridTemplate: z43.string().optional(),
16532
+ pcbGridGap: z43.number().or(z43.string()).optional(),
16533
+ pcbGridRowGap: z43.number().or(z43.string()).optional(),
16534
+ pcbGridColumnGap: z43.number().or(z43.string()).optional(),
16535
+ pcbFlex: z43.boolean().or(z43.string()).optional(),
16536
+ pcbFlexGap: z43.number().or(z43.string()).optional(),
16537
+ pcbFlexDirection: z43.enum(["row", "column"]).optional(),
16538
+ pcbAlignItems: z43.enum(["start", "center", "end", "stretch"]).optional(),
16539
+ pcbJustifyContent: z43.enum([
16504
16540
  "start",
16505
16541
  "center",
16506
16542
  "end",
@@ -16509,25 +16545,25 @@ var baseGroupProps = commonLayoutProps.extend({
16509
16545
  "space-around",
16510
16546
  "space-evenly"
16511
16547
  ]).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([
16548
+ pcbFlexRow: z43.boolean().optional(),
16549
+ pcbFlexColumn: z43.boolean().optional(),
16550
+ pcbGap: z43.number().or(z43.string()).optional(),
16551
+ pcbPack: z43.boolean().optional(),
16552
+ pcbPackGap: z43.number().or(z43.string()).optional(),
16553
+ schGrid: z43.boolean().optional(),
16554
+ schGridCols: z43.number().or(z43.string()).optional(),
16555
+ schGridRows: z43.number().or(z43.string()).optional(),
16556
+ schGridTemplateRows: z43.string().optional(),
16557
+ schGridTemplateColumns: z43.string().optional(),
16558
+ schGridTemplate: z43.string().optional(),
16559
+ schGridGap: z43.number().or(z43.string()).optional(),
16560
+ schGridRowGap: z43.number().or(z43.string()).optional(),
16561
+ schGridColumnGap: z43.number().or(z43.string()).optional(),
16562
+ schFlex: z43.boolean().or(z43.string()).optional(),
16563
+ schFlexGap: z43.number().or(z43.string()).optional(),
16564
+ schFlexDirection: z43.enum(["row", "column"]).optional(),
16565
+ schAlignItems: z43.enum(["start", "center", "end", "stretch"]).optional(),
16566
+ schJustifyContent: z43.enum([
16531
16567
  "start",
16532
16568
  "center",
16533
16569
  "end",
@@ -16536,11 +16572,11 @@ var baseGroupProps = commonLayoutProps.extend({
16536
16572
  "space-around",
16537
16573
  "space-evenly"
16538
16574
  ]).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(),
16575
+ schFlexRow: z43.boolean().optional(),
16576
+ schFlexColumn: z43.boolean().optional(),
16577
+ schGap: z43.number().or(z43.string()).optional(),
16578
+ schPack: z43.boolean().optional(),
16579
+ schMatchAdapt: z43.boolean().optional(),
16544
16580
  pcbWidth: length3.optional(),
16545
16581
  pcbHeight: length3.optional(),
16546
16582
  minTraceWidth: length3.optional(),
@@ -16563,41 +16599,41 @@ var baseGroupProps = commonLayoutProps.extend({
16563
16599
  pcbPaddingBottom: length3.optional(),
16564
16600
  pcbAnchorAlignment: pcbAnchorAlignmentAutocomplete.optional()
16565
16601
  });
16566
- var partsEngine = z42.custom((v) => "findPart" in v);
16602
+ var partsEngine = z43.custom((v) => "findPart" in v);
16567
16603
  var subcircuitGroupProps = baseGroupProps.extend({
16568
16604
  manualEdits: manual_edits_file.optional(),
16569
- schAutoLayoutEnabled: z42.boolean().optional(),
16570
- schTraceAutoLabelEnabled: z42.boolean().optional(),
16605
+ schAutoLayoutEnabled: z43.boolean().optional(),
16606
+ schTraceAutoLabelEnabled: z43.boolean().optional(),
16571
16607
  schMaxTraceDistance: distance11.optional(),
16572
- routingDisabled: z42.boolean().optional(),
16573
- placementDrcChecksDisabled: z42.boolean().optional(),
16574
- bomDisabled: z42.boolean().optional(),
16608
+ routingDisabled: z43.boolean().optional(),
16609
+ placementDrcChecksDisabled: z43.boolean().optional(),
16610
+ bomDisabled: z43.boolean().optional(),
16575
16611
  defaultTraceWidth: length3.optional(),
16576
16612
  ...routingTolerances.shape,
16577
16613
  nominalTraceWidth: length3.optional(),
16578
16614
  partsEngine: partsEngine.optional(),
16579
- _subcircuitCachingEnabled: z42.boolean().optional(),
16580
- pcbRouteCache: z42.custom((v) => true).optional(),
16615
+ _subcircuitCachingEnabled: z43.boolean().optional(),
16616
+ pcbRouteCache: z43.custom((v) => true).optional(),
16581
16617
  autorouter: autorouterProp.optional(),
16582
16618
  autorouterEffortLevel: autorouterEffortLevel.optional(),
16583
16619
  autorouterVersion: autorouterVersion.optional(),
16584
- square: z42.boolean().optional(),
16585
- emptyArea: z42.string().optional(),
16586
- filledArea: z42.string().optional(),
16620
+ square: z43.boolean().optional(),
16621
+ emptyArea: z43.string().optional(),
16622
+ filledArea: z43.string().optional(),
16587
16623
  width: distance11.optional(),
16588
16624
  height: distance11.optional(),
16589
- outline: z42.array(point).optional(),
16625
+ outline: z43.array(point).optional(),
16590
16626
  outlineOffsetX: distance11.optional(),
16591
16627
  outlineOffsetY: distance11.optional(),
16592
- circuitJson: z42.array(z42.any()).optional(),
16593
- exposedNets: z42.array(z42.string()).optional(),
16594
- exposeNets: z42.boolean().optional()
16628
+ circuitJson: z43.array(z43.any()).optional(),
16629
+ exposedNets: z43.array(z43.string()).optional(),
16630
+ exposeNets: z43.boolean().optional()
16595
16631
  });
16596
16632
  var subcircuitGroupPropsWithBool = subcircuitGroupProps.extend({
16597
- subcircuit: z42.literal(true)
16633
+ subcircuit: z43.literal(true)
16598
16634
  });
16599
- var groupProps = z42.discriminatedUnion("subcircuit", [
16600
- baseGroupProps.extend({ subcircuit: z42.literal(false).optional() }),
16635
+ var groupProps = z43.discriminatedUnion("subcircuit", [
16636
+ baseGroupProps.extend({ subcircuit: z43.literal(false).optional() }),
16601
16637
  subcircuitGroupPropsWithBool
16602
16638
  ]);
16603
16639
  expectTypesMatch(true);
@@ -16607,25 +16643,25 @@ expectTypesMatch(true);
16607
16643
  expectTypesMatch(true);
16608
16644
 
16609
16645
  // lib/components/board.ts
16610
- var boardColor = z43.custom((value) => typeof value === "string");
16611
- var boardOutlinePoint = z43.object({
16646
+ var boardColor = z44.custom((value) => typeof value === "string");
16647
+ var boardOutlinePoint = z44.object({
16612
16648
  ...point.shape,
16613
- isCastellatedHole: z43.boolean().optional(),
16649
+ isCastellatedHole: z44.boolean().optional(),
16614
16650
  holeDiameter: distance.optional(),
16615
16651
  padDiameter: distance.optional(),
16616
- connectsTo: z43.string().or(z43.array(z43.string())).optional()
16652
+ connectsTo: z44.string().or(z44.array(z44.string())).optional()
16617
16653
  }).superRefine((outlinePoint, ctx) => {
16618
16654
  if (outlinePoint.isCastellatedHole) {
16619
16655
  if (outlinePoint.holeDiameter === void 0) {
16620
16656
  ctx.addIssue({
16621
- code: z43.ZodIssueCode.custom,
16657
+ code: z44.ZodIssueCode.custom,
16622
16658
  path: ["holeDiameter"],
16623
16659
  message: "holeDiameter is required for a castellated hole"
16624
16660
  });
16625
16661
  }
16626
16662
  if (outlinePoint.padDiameter === void 0) {
16627
16663
  ctx.addIssue({
16628
- code: z43.ZodIssueCode.custom,
16664
+ code: z44.ZodIssueCode.custom,
16629
16665
  path: ["padDiameter"],
16630
16666
  message: "padDiameter is required for a castellated hole"
16631
16667
  });
@@ -16634,23 +16670,23 @@ var boardOutlinePoint = z43.object({
16634
16670
  }
16635
16671
  if (outlinePoint.holeDiameter !== void 0 || outlinePoint.padDiameter !== void 0 || outlinePoint.connectsTo !== void 0) {
16636
16672
  ctx.addIssue({
16637
- code: z43.ZodIssueCode.custom,
16673
+ code: z44.ZodIssueCode.custom,
16638
16674
  path: ["isCastellatedHole"],
16639
16675
  message: "isCastellatedHole must be true when castellated hole props are provided"
16640
16676
  });
16641
16677
  }
16642
16678
  });
16643
16679
  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)
16680
+ material: z44.enum(["fr4", "fr1", "flex"]).default("fr4"),
16681
+ layers: z44.union([
16682
+ z44.literal(1),
16683
+ z44.literal(2),
16684
+ z44.literal(4),
16685
+ z44.literal(6),
16686
+ z44.literal(8),
16687
+ z44.literal(10)
16652
16688
  ]).default(2),
16653
- allowBlindAndBuriedVias: z43.boolean().default(false).describe(
16689
+ allowBlindAndBuriedVias: z44.boolean().default(false).describe(
16654
16690
  "Whether the autorouter may generate blind and buried vias. Defaults to false, which restricts newly generated vias to the full board stack."
16655
16691
  ),
16656
16692
  borderRadius: distance.optional(),
@@ -16658,28 +16694,28 @@ var boardProps = subcircuitGroupProps.omit({ connections: true }).extend({
16658
16694
  boardAnchorPosition: point.optional(),
16659
16695
  anchorAlignment: ninePointAnchor.optional(),
16660
16696
  boardAnchorAlignment: ninePointAnchor.optional().describe("Prefer using anchorAlignment when possible"),
16661
- outline: z43.array(boardOutlinePoint).optional(),
16662
- title: z43.string().optional(),
16697
+ outline: z44.array(boardOutlinePoint).optional(),
16698
+ title: z44.string().optional(),
16663
16699
  solderMaskColor: boardColor.optional(),
16664
16700
  topSolderMaskColor: boardColor.optional(),
16665
16701
  bottomSolderMaskColor: boardColor.optional(),
16666
16702
  silkscreenColor: boardColor.optional(),
16667
16703
  topSilkscreenColor: boardColor.optional(),
16668
16704
  bottomSilkscreenColor: boardColor.optional(),
16669
- doubleSidedAssembly: z43.boolean().optional().default(false),
16670
- isViaInPadAllowed: z43.boolean().optional().describe(
16705
+ doubleSidedAssembly: z44.boolean().optional().default(false),
16706
+ isViaInPadAllowed: z44.boolean().optional().describe(
16671
16707
  "Allows intentional via-in-pad designs to pass DRC. Omitted or false keeps via-in-pad disallowed."
16672
16708
  ),
16673
- automaticPoursEnabled: z43.boolean().default(false).describe(
16709
+ automaticPoursEnabled: z44.boolean().default(false).describe(
16674
16710
  "Whether implicit copper pours should be generated automatically. Defaults to false."
16675
16711
  ),
16676
- schematicDisabled: z43.boolean().optional()
16712
+ schematicDisabled: z44.boolean().optional()
16677
16713
  });
16678
16714
  expectTypesMatch(true);
16679
16715
  expectTypesMatch(true);
16680
16716
 
16681
16717
  // lib/components/panel.ts
16682
- import { z as z44 } from "zod";
16718
+ import { z as z45 } from "zod";
16683
16719
  var panelProps = baseGroupProps.omit({
16684
16720
  width: true,
16685
16721
  height: true,
@@ -16688,25 +16724,25 @@ var panelProps = baseGroupProps.omit({
16688
16724
  }).extend({
16689
16725
  width: distance.optional(),
16690
16726
  height: distance.optional(),
16691
- children: z44.any().optional(),
16727
+ children: z45.any().optional(),
16692
16728
  anchorAlignment: ninePointAnchor.optional(),
16693
- noSolderMask: z44.boolean().optional(),
16694
- panelizationMethod: z44.enum(["tab-routing", "outline_routing", "none"]).optional(),
16729
+ noSolderMask: z45.boolean().optional(),
16730
+ panelizationMethod: z45.enum(["tab-routing", "outline_routing", "none"]).optional(),
16695
16731
  boardGap: distance.optional(),
16696
- layoutMode: z44.enum(["grid", "pack", "none"]).optional(),
16697
- row: z44.number().optional(),
16698
- col: z44.number().optional(),
16732
+ layoutMode: z45.enum(["grid", "pack", "none"]).optional(),
16733
+ row: z45.number().optional(),
16734
+ col: z45.number().optional(),
16699
16735
  cellWidth: distance.optional(),
16700
16736
  cellHeight: distance.optional(),
16701
16737
  tabWidth: distance.optional(),
16702
16738
  tabLength: distance.optional(),
16703
- mouseBites: z44.boolean().optional(),
16739
+ mouseBites: z45.boolean().optional(),
16704
16740
  edgePadding: distance.optional(),
16705
16741
  edgePaddingLeft: distance.optional(),
16706
16742
  edgePaddingRight: distance.optional(),
16707
16743
  edgePaddingTop: distance.optional(),
16708
16744
  edgePaddingBottom: distance.optional(),
16709
- _subcircuitCachingEnabled: z44.boolean().optional()
16745
+ _subcircuitCachingEnabled: z45.boolean().optional()
16710
16746
  });
16711
16747
  expectTypesMatch(true);
16712
16748
 
@@ -16717,16 +16753,16 @@ expectTypesMatch(true);
16717
16753
 
16718
16754
  // lib/common/fanoutProps.ts
16719
16755
  import { layer_ref as layer_ref5 } from "circuit-json";
16720
- import { z as z47 } from "zod";
16756
+ import { z as z48 } from "zod";
16721
16757
 
16722
16758
  // lib/common/fanoutBoundaryPadding.ts
16723
- import { z as z46 } from "zod";
16759
+ import { z as z47 } from "zod";
16724
16760
  var nonnegativeDistance = distance.refine((value) => value >= 0, {
16725
16761
  message: "Fanout boundary padding cannot be negative"
16726
16762
  });
16727
- var fanoutBoundaryPadding = z46.union([
16763
+ var fanoutBoundaryPadding = z47.union([
16728
16764
  nonnegativeDistance,
16729
- z46.object({
16765
+ z47.object({
16730
16766
  top: nonnegativeDistance.optional(),
16731
16767
  right: nonnegativeDistance.optional(),
16732
16768
  bottom: nonnegativeDistance.optional(),
@@ -16753,21 +16789,21 @@ var canonicalBusFanoutDirectionValues = [
16753
16789
  "leftside_top",
16754
16790
  "center"
16755
16791
  ];
16756
- var canonicalBusFanoutDirection = z47.enum(
16792
+ var canonicalBusFanoutDirection = z48.enum(
16757
16793
  canonicalBusFanoutDirectionValues
16758
16794
  );
16759
- var busFanoutDirection = z47.union([
16795
+ var busFanoutDirection = z48.union([
16760
16796
  ninePointAnchor,
16761
16797
  canonicalBusFanoutDirection,
16762
- z47.object({
16763
- direction: z47.union([ninePointAnchor, canonicalBusFanoutDirection])
16798
+ z48.object({
16799
+ direction: z48.union([ninePointAnchor, canonicalBusFanoutDirection])
16764
16800
  })
16765
16801
  ]);
16766
- var fanoutProps = z47.object({
16767
- busFanoutDirections: z47.record(busFanoutDirection).optional(),
16802
+ var fanoutProps = z48.object({
16803
+ busFanoutDirections: z48.record(busFanoutDirection).optional(),
16768
16804
  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()
16805
+ fanoutRoutingLayers: z48.array(layer_ref5).min(1).optional(),
16806
+ fanoutPourNetMap: z48.record(layer_ref5, z48.union([z48.string(), z48.array(z48.string()).min(1)])).optional()
16771
16807
  });
16772
16808
  expectTypesMatch(true);
16773
16809
 
@@ -16791,41 +16827,41 @@ expectTypesMatch(true);
16791
16827
  // lib/components/chip.ts
16792
16828
  import { distance as distance12, supplier_name as supplier_name2 } from "circuit-json";
16793
16829
  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(
16830
+ import { z as z50 } from "zod";
16831
+ var connectionTarget2 = z50.string().or(z50.array(z50.string()).readonly()).or(z50.array(z50.string()));
16832
+ var noConnectProp = z50.array(schematicPinLabel).readonly().or(z50.array(schematicPinLabel));
16833
+ var connectionsProp = z50.custom().pipe(z50.record(z50.string(), connectionTarget2));
16834
+ var spicemodelElement = z50.custom(
16799
16835
  (v) => !!v && typeof v === "object" && "type" in v && "props" in v
16800
16836
  );
16801
- var internalCircuitElement = z49.custom(
16837
+ var internalCircuitElement = z50.custom(
16802
16838
  (value) => isValidElement(value) && value.type === "internalcircuit"
16803
16839
  );
16804
- var pinLabelsProp = z49.record(
16840
+ var pinLabelsProp = z50.record(
16805
16841
  schematicPinLabel,
16806
- schematicPinLabel.or(z49.array(schematicPinLabel).readonly()).or(z49.array(schematicPinLabel))
16842
+ schematicPinLabel.or(z50.array(schematicPinLabel).readonly()).or(z50.array(schematicPinLabel))
16807
16843
  );
16808
16844
  expectTypesMatch(true);
16809
- var pinCompatibleVariant = z49.object({
16810
- manufacturerPartNumber: z49.string().optional(),
16811
- supplierPartNumber: z49.record(supplier_name2, z49.array(z49.string())).optional()
16845
+ var pinCompatibleVariant = z50.object({
16846
+ manufacturerPartNumber: z50.string().optional(),
16847
+ supplierPartNumber: z50.record(supplier_name2, z50.array(z50.string())).optional()
16812
16848
  });
16813
16849
  var chipProps = commonComponentProps.extend({
16814
- manufacturerPartNumber: z49.string().optional(),
16850
+ manufacturerPartNumber: z50.string().optional(),
16815
16851
  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(),
16852
+ showPinAliases: z50.boolean().optional(),
16853
+ pcbPinLabels: z50.record(z50.string(), z50.string()).optional(),
16854
+ internallyConnectedPins: z50.array(z50.array(z50.union([z50.string(), z50.number()]))).optional(),
16855
+ externallyConnectedPins: z50.array(z50.array(z50.string())).optional(),
16820
16856
  schPinArrangement: schematicPortArrangement.optional(),
16821
16857
  schPortArrangement: schematicPortArrangement.optional(),
16822
- pinCompatibleVariants: z49.array(pinCompatibleVariant).optional(),
16858
+ pinCompatibleVariants: z50.array(pinCompatibleVariant).optional(),
16823
16859
  schPinStyle: schematicPinStyle.optional(),
16824
16860
  schPinSpacing: distance12.optional(),
16825
16861
  schWidth: distance12.optional(),
16826
16862
  schHeight: distance12.optional(),
16827
- noSchematicRepresentation: z49.boolean().optional(),
16828
- schShowInternalCircuit: z49.boolean().optional().default(false),
16863
+ noSchematicRepresentation: z50.boolean().optional(),
16864
+ schShowInternalCircuit: z50.boolean().optional().default(false),
16829
16865
  noConnect: noConnectProp.optional(),
16830
16866
  connections: connectionsProp.optional(),
16831
16867
  spiceModel: spicemodelElement.optional(),
@@ -16840,38 +16876,38 @@ expectTypesMatch(true);
16840
16876
 
16841
16877
  // lib/components/jumper.ts
16842
16878
  import { distance as distance13 } from "circuit-json";
16843
- import { z as z50 } from "zod";
16879
+ import { z as z51 } from "zod";
16844
16880
  var jumperProps = commonComponentProps.extend({
16845
- manufacturerPartNumber: z50.string().optional(),
16846
- pinLabels: z50.record(
16847
- z50.number().or(schematicPinLabel),
16848
- schematicPinLabel.or(z50.array(schematicPinLabel))
16881
+ manufacturerPartNumber: z51.string().optional(),
16882
+ pinLabels: z51.record(
16883
+ z51.number().or(schematicPinLabel),
16884
+ schematicPinLabel.or(z51.array(schematicPinLabel))
16849
16885
  ).optional(),
16850
16886
  schPinStyle: schematicPinStyle.optional(),
16851
16887
  schPinSpacing: distance13.optional(),
16852
16888
  schWidth: distance13.optional(),
16853
16889
  schHeight: distance13.optional(),
16854
- schDirection: z50.enum(["left", "right"]).optional(),
16890
+ schDirection: z51.enum(["left", "right"]).optional(),
16855
16891
  schPinArrangement: schematicPinArrangement.optional(),
16856
16892
  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()
16893
+ pcbPinLabels: z51.record(z51.string(), z51.string()).optional(),
16894
+ pinCount: z51.union([z51.literal(2), z51.literal(3)]).optional(),
16895
+ internallyConnectedPins: z51.array(z51.array(z51.union([z51.string(), z51.number()]))).optional(),
16896
+ connections: z51.custom().pipe(z51.record(z51.string(), connectionTarget)).optional()
16861
16897
  });
16862
16898
  expectTypesMatch(true);
16863
16899
 
16864
16900
  // lib/components/solderjumper.ts
16865
- import { z as z51 } from "zod";
16901
+ import { z as z52 } from "zod";
16866
16902
  var solderjumperProps = jumperProps.extend({
16867
- bridgedPins: z51.array(z51.array(z51.string())).optional(),
16868
- bridged: z51.boolean().optional()
16903
+ bridgedPins: z52.array(z52.array(z52.string())).optional(),
16904
+ bridged: z52.boolean().optional()
16869
16905
  });
16870
16906
  expectTypesMatch(true);
16871
16907
 
16872
16908
  // lib/components/connector.ts
16873
- import { z as z52 } from "zod";
16874
- var connectorStandard = z52.enum([
16909
+ import { z as z53 } from "zod";
16910
+ var connectorStandard = z53.enum([
16875
16911
  "usb_c",
16876
16912
  "m2",
16877
16913
  "jst_sh",
@@ -16883,43 +16919,43 @@ var connectorStandard = z52.enum([
16883
16919
  ]);
16884
16920
  var connectorProps = chipProps.extend({
16885
16921
  standard: connectorStandard.optional(),
16886
- pinCount: z52.number().int().positive().optional()
16922
+ pinCount: z53.number().int().positive().optional()
16887
16923
  });
16888
16924
  expectTypesMatch(true);
16889
16925
 
16890
16926
  // lib/components/interconnect.ts
16891
- import { z as z53 } from "zod";
16927
+ import { z as z54 } from "zod";
16892
16928
  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))
16929
+ standard: z54.enum(["TSC0001_36P_XALT_2025_11", "0805", "0603", "1206"]).optional(),
16930
+ pinLabels: z54.record(
16931
+ z54.number().or(schematicPinLabel),
16932
+ schematicPinLabel.or(z54.array(schematicPinLabel))
16897
16933
  ).optional(),
16898
- internallyConnectedPins: z53.array(z53.array(z53.union([z53.string(), z53.number()]))).optional()
16934
+ internallyConnectedPins: z54.array(z54.array(z54.union([z54.string(), z54.number()]))).optional()
16899
16935
  });
16900
16936
  expectTypesMatch(true);
16901
16937
 
16902
16938
  // lib/components/fuse.ts
16903
- import { z as z54 } from "zod";
16939
+ import { z as z55 } from "zod";
16904
16940
  var fusePinLabels = ["pin1", "pin2"];
16905
16941
  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(),
16942
+ currentRating: z55.union([z55.number(), z55.string()]),
16943
+ voltageRating: z55.union([z55.number(), z55.string()]).optional(),
16944
+ schShowRatings: z55.boolean().optional(),
16909
16945
  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())
16946
+ connections: z55.record(
16947
+ z55.string(),
16948
+ z55.union([
16949
+ z55.string(),
16950
+ z55.array(z55.string()).readonly(),
16951
+ z55.array(z55.string())
16916
16952
  ])
16917
16953
  ).optional()
16918
16954
  });
16919
16955
 
16920
16956
  // lib/components/platedhole.ts
16921
16957
  import { distance as distance14 } from "circuit-json";
16922
- import { z as z55 } from "zod";
16958
+ import { z as z56 } from "zod";
16923
16959
  var DEFAULT_PIN_HEADER_HOLE_DIAMETER = "0.04in";
16924
16960
  var DEFAULT_PIN_HEADER_OUTER_DIAMETER = "0.1in";
16925
16961
  var inferPlatedHoleShapeAndDefaults = (rawProps) => {
@@ -16951,26 +16987,26 @@ var inferPlatedHoleShapeAndDefaults = (rawProps) => {
16951
16987
  props.outerDiameter = DEFAULT_PIN_HEADER_OUTER_DIAMETER;
16952
16988
  return props;
16953
16989
  };
16954
- var distanceHiddenUndefined = z55.custom().transform((a) => {
16990
+ var distanceHiddenUndefined = z56.custom().transform((a) => {
16955
16991
  if (a === void 0) return void 0;
16956
16992
  return distance14.parse(a);
16957
16993
  });
16958
- var platedHolePropsByShape = z55.discriminatedUnion("shape", [
16994
+ var platedHolePropsByShape = z56.discriminatedUnion("shape", [
16959
16995
  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"),
16996
+ name: z56.string().optional(),
16997
+ connectsTo: z56.string().or(z56.array(z56.string())).optional(),
16998
+ shape: z56.literal("circle"),
16963
16999
  holeDiameter: distance14,
16964
17000
  outerDiameter: distance14,
16965
17001
  padDiameter: distance14.optional().describe("Diameter of the copper pad"),
16966
17002
  portHints: portHints.optional(),
16967
17003
  solderMaskMargin: distance14.optional(),
16968
- coveredWithSolderMask: z55.boolean().optional()
17004
+ coveredWithSolderMask: z56.boolean().optional()
16969
17005
  }),
16970
17006
  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"),
17007
+ name: z56.string().optional(),
17008
+ connectsTo: z56.string().or(z56.array(z56.string())).optional(),
17009
+ shape: z56.literal("oval"),
16974
17010
  outerWidth: distance14,
16975
17011
  outerHeight: distance14,
16976
17012
  holeWidth: distanceHiddenUndefined,
@@ -16979,13 +17015,13 @@ var platedHolePropsByShape = z55.discriminatedUnion("shape", [
16979
17015
  innerHeight: distance14.optional().describe("DEPRECATED use holeHeight"),
16980
17016
  portHints: portHints.optional(),
16981
17017
  solderMaskMargin: distance14.optional(),
16982
- coveredWithSolderMask: z55.boolean().optional()
17018
+ coveredWithSolderMask: z56.boolean().optional()
16983
17019
  }),
16984
17020
  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(),
17021
+ name: z56.string().optional(),
17022
+ connectsTo: z56.string().or(z56.array(z56.string())).optional(),
17023
+ shape: z56.literal("pill"),
17024
+ rectPad: z56.boolean().optional(),
16989
17025
  outerWidth: distance14,
16990
17026
  outerHeight: distance14,
16991
17027
  holeWidth: distanceHiddenUndefined,
@@ -16996,30 +17032,30 @@ var platedHolePropsByShape = z55.discriminatedUnion("shape", [
16996
17032
  holeOffsetX: distance14.optional(),
16997
17033
  holeOffsetY: distance14.optional(),
16998
17034
  solderMaskMargin: distance14.optional(),
16999
- coveredWithSolderMask: z55.boolean().optional()
17035
+ coveredWithSolderMask: z56.boolean().optional()
17000
17036
  }),
17001
17037
  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"),
17038
+ name: z56.string().optional(),
17039
+ connectsTo: z56.string().or(z56.array(z56.string())).optional(),
17040
+ shape: z56.literal("circular_hole_with_rect_pad"),
17005
17041
  holeDiameter: distance14,
17006
17042
  rectPadWidth: distance14,
17007
17043
  rectPadHeight: distance14,
17008
17044
  rectBorderRadius: distance14.optional(),
17009
- holeShape: z55.literal("circle").optional(),
17010
- padShape: z55.literal("rect").optional(),
17045
+ holeShape: z56.literal("circle").optional(),
17046
+ padShape: z56.literal("rect").optional(),
17011
17047
  portHints: portHints.optional(),
17012
17048
  holeOffsetX: distance14.optional(),
17013
17049
  holeOffsetY: distance14.optional(),
17014
17050
  solderMaskMargin: distance14.optional(),
17015
- coveredWithSolderMask: z55.boolean().optional()
17051
+ coveredWithSolderMask: z56.boolean().optional()
17016
17052
  }),
17017
17053
  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(),
17054
+ name: z56.string().optional(),
17055
+ connectsTo: z56.string().or(z56.array(z56.string())).optional(),
17056
+ shape: z56.literal("pill_hole_with_rect_pad"),
17057
+ holeShape: z56.literal("pill").optional(),
17058
+ padShape: z56.literal("rect").optional(),
17023
17059
  holeWidth: distance14,
17024
17060
  holeHeight: distance14,
17025
17061
  rectPadWidth: distance14,
@@ -17029,22 +17065,22 @@ var platedHolePropsByShape = z55.discriminatedUnion("shape", [
17029
17065
  holeOffsetX: distance14.optional(),
17030
17066
  holeOffsetY: distance14.optional(),
17031
17067
  solderMaskMargin: distance14.optional(),
17032
- coveredWithSolderMask: z55.boolean().optional()
17068
+ coveredWithSolderMask: z56.boolean().optional()
17033
17069
  }),
17034
17070
  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"]),
17071
+ name: z56.string().optional(),
17072
+ connectsTo: z56.string().or(z56.array(z56.string())).optional(),
17073
+ shape: z56.literal("hole_with_polygon_pad"),
17074
+ holeShape: z56.enum(["circle", "oval", "pill", "rotated_pill"]),
17039
17075
  holeDiameter: distance14.optional(),
17040
17076
  holeWidth: distance14.optional(),
17041
17077
  holeHeight: distance14.optional(),
17042
- padOutline: z55.array(point),
17078
+ padOutline: z56.array(point),
17043
17079
  holeOffsetX: distance14,
17044
17080
  holeOffsetY: distance14,
17045
17081
  portHints: portHints.optional(),
17046
17082
  solderMaskMargin: distance14.optional(),
17047
- coveredWithSolderMask: z55.boolean().optional()
17083
+ coveredWithSolderMask: z56.boolean().optional()
17048
17084
  })
17049
17085
  ]).transform((a) => {
17050
17086
  if ("innerWidth" in a && a.innerWidth !== void 0) {
@@ -17055,7 +17091,7 @@ var platedHolePropsByShape = z55.discriminatedUnion("shape", [
17055
17091
  }
17056
17092
  return a;
17057
17093
  });
17058
- var platedHoleProps = z55.preprocess(
17094
+ var platedHoleProps = z56.preprocess(
17059
17095
  inferPlatedHoleShapeAndDefaults,
17060
17096
  platedHolePropsByShape
17061
17097
  );
@@ -17063,7 +17099,7 @@ expectTypesMatch(true);
17063
17099
 
17064
17100
  // lib/components/resistor.ts
17065
17101
  import { resistance } from "circuit-json";
17066
- import { z as z56 } from "zod";
17102
+ import { z as z57 } from "zod";
17067
17103
  var resistorPinLabels = ["pin1", "pin2", "pos", "neg"];
17068
17104
  var resistorImperialFootprintNames = /* @__PURE__ */ new Set([
17069
17105
  "01005",
@@ -17087,7 +17123,7 @@ var resistorFootprintProp = footprintProp.optional().transform(mapResistorFootpr
17087
17123
  var resistorProps = commonComponentProps.extend({
17088
17124
  footprint: resistorFootprintProp,
17089
17125
  resistance,
17090
- tolerance: z56.union([z56.string(), z56.number()]).transform((val) => {
17126
+ tolerance: z57.union([z57.string(), z57.number()]).transform((val) => {
17091
17127
  if (typeof val === "string") {
17092
17128
  if (val.endsWith("%")) {
17093
17129
  return parseFloat(val.slice(0, -1)) / 100;
@@ -17096,12 +17132,12 @@ var resistorProps = commonComponentProps.extend({
17096
17132
  }
17097
17133
  return val;
17098
17134
  }).pipe(
17099
- z56.number().min(0, "Tolerance must be non-negative").max(1, "Tolerance cannot be greater than 100%")
17135
+ z57.number().min(0, "Tolerance must be non-negative").max(1, "Tolerance cannot be greater than 100%")
17100
17136
  ).optional(),
17101
- pullupFor: z56.string().optional(),
17102
- pullupTo: z56.string().optional(),
17103
- pulldownFor: z56.string().optional(),
17104
- pulldownTo: z56.string().optional(),
17137
+ pullupFor: z57.string().optional(),
17138
+ pullupTo: z57.string().optional(),
17139
+ pulldownFor: z57.string().optional(),
17140
+ pulldownTo: z57.string().optional(),
17105
17141
  schOrientation: schematicOrientation.optional(),
17106
17142
  schSize: schematicSymbolSize.optional(),
17107
17143
  connections: createConnectionsProp(resistorPinLabels).optional()
@@ -17111,18 +17147,18 @@ expectTypesMatch(true);
17111
17147
 
17112
17148
  // lib/components/potentiometer.ts
17113
17149
  import { resistance as resistance2 } from "circuit-json";
17114
- import { z as z57 } from "zod";
17150
+ import { z as z58 } from "zod";
17115
17151
  var potentiometerPinLabels = ["pin1", "pin2", "pin3"];
17116
17152
  var potentiometerProps = commonComponentProps.extend({
17117
17153
  maxResistance: resistance2,
17118
- pinVariant: z57.enum(["two_pin", "three_pin"]).optional(),
17154
+ pinVariant: z58.enum(["two_pin", "three_pin"]).optional(),
17119
17155
  connections: createConnectionsProp(potentiometerPinLabels).optional()
17120
17156
  });
17121
17157
  expectTypesMatch(true);
17122
17158
 
17123
17159
  // lib/components/crystal.ts
17124
17160
  import { capacitance, distance as distance15, frequency } from "circuit-json";
17125
- import { z as z58 } from "zod";
17161
+ import { z as z59 } from "zod";
17126
17162
  var crystalPins = [
17127
17163
  "pin1",
17128
17164
  "left",
@@ -17135,9 +17171,9 @@ var crystalProps = commonComponentProps.extend({
17135
17171
  frequency,
17136
17172
  loadCapacitance: capacitance,
17137
17173
  maxTraceLength: distance15.optional(),
17138
- manufacturerPartNumber: z58.string().optional(),
17139
- mpn: z58.string().optional(),
17140
- pinVariant: z58.enum(["two_pin", "four_pin"]).optional(),
17174
+ manufacturerPartNumber: z59.string().optional(),
17175
+ mpn: z59.string().optional(),
17176
+ pinVariant: z59.enum(["two_pin", "four_pin"]).optional(),
17141
17177
  schOrientation: schematicOrientation.optional(),
17142
17178
  connections: createConnectionsProp(crystalPins).optional()
17143
17179
  });
@@ -17145,34 +17181,34 @@ expectTypesMatch(true);
17145
17181
 
17146
17182
  // lib/components/resonator.ts
17147
17183
  import { frequency as frequency2, capacitance as capacitance2 } from "circuit-json";
17148
- import { z as z59 } from "zod";
17184
+ import { z as z60 } from "zod";
17149
17185
  var resonatorProps = commonComponentProps.extend({
17150
17186
  frequency: frequency2,
17151
17187
  loadCapacitance: capacitance2,
17152
- pinVariant: z59.enum(["no_ground", "ground_pin", "two_ground_pins"]).optional()
17188
+ pinVariant: z60.enum(["no_ground", "ground_pin", "two_ground_pins"]).optional()
17153
17189
  });
17154
17190
  expectTypesMatch(true);
17155
17191
 
17156
17192
  // lib/components/stampboard.ts
17157
17193
  import { distance as distance16 } from "circuit-json";
17158
- import { z as z60 } from "zod";
17194
+ import { z as z61 } from "zod";
17159
17195
  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(),
17196
+ leftPinCount: z61.number().optional(),
17197
+ rightPinCount: z61.number().optional(),
17198
+ topPinCount: z61.number().optional(),
17199
+ bottomPinCount: z61.number().optional(),
17200
+ leftPins: z61.array(z61.string()).optional(),
17201
+ rightPins: z61.array(z61.string()).optional(),
17202
+ topPins: z61.array(z61.string()).optional(),
17203
+ bottomPins: z61.array(z61.string()).optional(),
17168
17204
  pinPitch: distance16.optional(),
17169
- innerHoles: z60.boolean().optional()
17205
+ innerHoles: z61.boolean().optional()
17170
17206
  });
17171
17207
  expectTypesMatch(true);
17172
17208
 
17173
17209
  // lib/components/capacitor.ts
17174
17210
  import { capacitance as capacitance3, distance as distance17, voltage } from "circuit-json";
17175
- import { z as z61 } from "zod";
17211
+ import { z as z62 } from "zod";
17176
17212
  var capacitorPinLabels = [
17177
17213
  "pin1",
17178
17214
  "pin2",
@@ -17184,12 +17220,12 @@ var capacitorPinLabels = [
17184
17220
  var capacitorProps = commonComponentProps.extend({
17185
17221
  capacitance: capacitance3,
17186
17222
  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(),
17223
+ schShowRatings: z62.boolean().optional().default(false),
17224
+ polarized: z62.boolean().optional().default(false),
17225
+ decouplingFor: z62.string().optional(),
17226
+ decouplingTo: z62.string().optional(),
17227
+ bypassFor: z62.string().optional(),
17228
+ bypassTo: z62.string().optional(),
17193
17229
  maxDecouplingTraceLength: distance17.optional(),
17194
17230
  schOrientation: schematicOrientation.optional(),
17195
17231
  schSize: schematicSymbolSize.optional(),
@@ -17200,14 +17236,14 @@ expectTypesMatch(true);
17200
17236
 
17201
17237
  // lib/components/net.ts
17202
17238
  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(),
17239
+ import { z as z63 } from "zod";
17240
+ var netProps = z63.object({
17241
+ name: z63.string(),
17242
+ connectsTo: z63.string().or(z63.array(z63.string())).optional(),
17243
+ routingPhaseIndex: z63.number().nullable().optional(),
17244
+ highlightColor: z63.string().optional(),
17245
+ isPowerNet: z63.boolean().optional(),
17246
+ isGroundNet: z63.boolean().optional(),
17211
17247
  nominalTraceWidth: distance18.optional()
17212
17248
  });
17213
17249
  expectTypesMatch(true);
@@ -17221,55 +17257,55 @@ var fiducialProps = commonComponentProps.extend({
17221
17257
  expectTypesMatch(true);
17222
17258
 
17223
17259
  // 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()
17260
+ import { z as z65 } from "zod";
17261
+ var constrainedLayoutProps = z65.object({
17262
+ name: z65.string().optional(),
17263
+ pcbOnly: z65.boolean().optional(),
17264
+ schOnly: z65.boolean().optional()
17229
17265
  });
17230
17266
  expectTypesMatch(true);
17231
17267
 
17232
17268
  // lib/components/constraint.ts
17233
- import { z as z65 } from "zod";
17234
- var pcbXDistConstraintProps = z65.object({
17235
- pcb: z65.literal(true).optional(),
17269
+ import { z as z66 } from "zod";
17270
+ var pcbXDistConstraintProps = z66.object({
17271
+ pcb: z66.literal(true).optional(),
17236
17272
  xDist: distance,
17237
- left: z65.string(),
17238
- right: z65.string(),
17239
- edgeToEdge: z65.literal(true).optional(),
17240
- centerToCenter: z65.literal(true).optional()
17273
+ left: z66.string(),
17274
+ right: z66.string(),
17275
+ edgeToEdge: z66.literal(true).optional(),
17276
+ centerToCenter: z66.literal(true).optional()
17241
17277
  });
17242
17278
  expectTypesMatch(
17243
17279
  true
17244
17280
  );
17245
- var pcbYDistConstraintProps = z65.object({
17246
- pcb: z65.literal(true).optional(),
17281
+ var pcbYDistConstraintProps = z66.object({
17282
+ pcb: z66.literal(true).optional(),
17247
17283
  yDist: distance,
17248
- top: z65.string(),
17249
- bottom: z65.string(),
17250
- edgeToEdge: z65.literal(true).optional(),
17251
- centerToCenter: z65.literal(true).optional()
17284
+ top: z66.string(),
17285
+ bottom: z66.string(),
17286
+ edgeToEdge: z66.literal(true).optional(),
17287
+ centerToCenter: z66.literal(true).optional()
17252
17288
  });
17253
17289
  expectTypesMatch(
17254
17290
  true
17255
17291
  );
17256
- var pcbSameYConstraintProps = z65.object({
17257
- pcb: z65.literal(true).optional(),
17258
- sameY: z65.literal(true).optional(),
17259
- for: z65.array(z65.string())
17292
+ var pcbSameYConstraintProps = z66.object({
17293
+ pcb: z66.literal(true).optional(),
17294
+ sameY: z66.literal(true).optional(),
17295
+ for: z66.array(z66.string())
17260
17296
  });
17261
17297
  expectTypesMatch(
17262
17298
  true
17263
17299
  );
17264
- var pcbSameXConstraintProps = z65.object({
17265
- pcb: z65.literal(true).optional(),
17266
- sameX: z65.literal(true).optional(),
17267
- for: z65.array(z65.string())
17300
+ var pcbSameXConstraintProps = z66.object({
17301
+ pcb: z66.literal(true).optional(),
17302
+ sameX: z66.literal(true).optional(),
17303
+ for: z66.array(z66.string())
17268
17304
  });
17269
17305
  expectTypesMatch(
17270
17306
  true
17271
17307
  );
17272
- var constraintProps = z65.union([
17308
+ var constraintProps = z66.union([
17273
17309
  pcbXDistConstraintProps,
17274
17310
  pcbYDistConstraintProps,
17275
17311
  pcbSameYConstraintProps,
@@ -17278,13 +17314,13 @@ var constraintProps = z65.union([
17278
17314
  expectTypesMatch(true);
17279
17315
 
17280
17316
  // lib/components/cutout.ts
17281
- import { z as z66 } from "zod";
17317
+ import { z as z67 } from "zod";
17282
17318
  var rectCutoutProps = pcbLayoutProps.omit({
17283
17319
  layer: true,
17284
17320
  pcbRotation: true
17285
17321
  }).extend({
17286
- name: z66.string().optional(),
17287
- shape: z66.literal("rect"),
17322
+ name: z67.string().optional(),
17323
+ shape: z67.literal("rect"),
17288
17324
  width: distance,
17289
17325
  height: distance
17290
17326
  });
@@ -17293,8 +17329,8 @@ var circleCutoutProps = pcbLayoutProps.omit({
17293
17329
  layer: true,
17294
17330
  pcbRotation: true
17295
17331
  }).extend({
17296
- name: z66.string().optional(),
17297
- shape: z66.literal("circle"),
17332
+ name: z67.string().optional(),
17333
+ shape: z67.literal("circle"),
17298
17334
  radius: distance
17299
17335
  });
17300
17336
  expectTypesMatch(true);
@@ -17302,36 +17338,36 @@ var polygonCutoutProps = pcbLayoutProps.omit({
17302
17338
  layer: true,
17303
17339
  pcbRotation: true
17304
17340
  }).extend({
17305
- name: z66.string().optional(),
17306
- shape: z66.literal("polygon"),
17307
- points: z66.array(point)
17341
+ name: z67.string().optional(),
17342
+ shape: z67.literal("polygon"),
17343
+ points: z67.array(point)
17308
17344
  });
17309
17345
  expectTypesMatch(true);
17310
- var cutoutProps = z66.discriminatedUnion("shape", [
17346
+ var cutoutProps = z67.discriminatedUnion("shape", [
17311
17347
  rectCutoutProps,
17312
17348
  circleCutoutProps,
17313
17349
  polygonCutoutProps
17314
17350
  ]);
17315
17351
 
17316
17352
  // lib/components/drc-check.ts
17317
- import { z as z67 } from "zod";
17318
- var drcCheckProps = z67.object({
17319
- name: z67.string().optional(),
17353
+ import { z as z68 } from "zod";
17354
+ var drcCheckProps = z68.object({
17355
+ name: z68.string().optional(),
17320
17356
  checkFn: customDrcCheckFn
17321
17357
  });
17322
17358
  expectTypesMatch(true);
17323
17359
 
17324
17360
  // lib/components/smtpad.ts
17325
- import { z as z68 } from "zod";
17361
+ import { z as z69 } from "zod";
17326
17362
  var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17327
- name: z68.string().optional(),
17328
- shape: z68.literal("rect"),
17363
+ name: z69.string().optional(),
17364
+ shape: z69.literal("rect"),
17329
17365
  width: distance,
17330
17366
  height: distance,
17331
17367
  rectBorderRadius: distance.optional(),
17332
17368
  cornerRadius: distance.optional(),
17333
17369
  portHints: portHints.optional(),
17334
- coveredWithSolderMask: z68.boolean().optional(),
17370
+ coveredWithSolderMask: z69.boolean().optional(),
17335
17371
  solderMaskMargin: distance.optional(),
17336
17372
  solderMaskMarginLeft: distance.optional(),
17337
17373
  solderMaskMarginRight: distance.optional(),
@@ -17341,14 +17377,14 @@ var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17341
17377
  });
17342
17378
  expectTypesMatch(true);
17343
17379
  var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17344
- name: z68.string().optional(),
17345
- shape: z68.literal("rotated_rect"),
17380
+ name: z69.string().optional(),
17381
+ shape: z69.literal("rotated_rect"),
17346
17382
  width: distance,
17347
17383
  height: distance,
17348
- ccwRotation: z68.number(),
17384
+ ccwRotation: z69.number(),
17349
17385
  cornerRadius: distance.optional(),
17350
17386
  portHints: portHints.optional(),
17351
- coveredWithSolderMask: z68.boolean().optional(),
17387
+ coveredWithSolderMask: z69.boolean().optional(),
17352
17388
  solderMaskMargin: distance.optional(),
17353
17389
  solderMaskMarginLeft: distance.optional(),
17354
17390
  solderMaskMarginRight: distance.optional(),
@@ -17358,51 +17394,51 @@ var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17358
17394
  });
17359
17395
  expectTypesMatch(true);
17360
17396
  var circleSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17361
- name: z68.string().optional(),
17362
- shape: z68.literal("circle"),
17397
+ name: z69.string().optional(),
17398
+ shape: z69.literal("circle"),
17363
17399
  radius: distance,
17364
17400
  portHints: portHints.optional(),
17365
- coveredWithSolderMask: z68.boolean().optional(),
17401
+ coveredWithSolderMask: z69.boolean().optional(),
17366
17402
  solderMaskMargin: distance.optional(),
17367
17403
  solderPasteMargin: distance.optional()
17368
17404
  });
17369
17405
  expectTypesMatch(true);
17370
17406
  var pillSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17371
- name: z68.string().optional(),
17372
- shape: z68.literal("pill"),
17407
+ name: z69.string().optional(),
17408
+ shape: z69.literal("pill"),
17373
17409
  width: distance,
17374
17410
  height: distance,
17375
17411
  radius: distance,
17376
17412
  portHints: portHints.optional(),
17377
- coveredWithSolderMask: z68.boolean().optional(),
17413
+ coveredWithSolderMask: z69.boolean().optional(),
17378
17414
  solderMaskMargin: distance.optional(),
17379
17415
  solderPasteMargin: distance.optional()
17380
17416
  });
17381
17417
  expectTypesMatch(true);
17382
17418
  var rotatedPillSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17383
- name: z68.string().optional(),
17384
- shape: z68.literal("rotated_pill"),
17419
+ name: z69.string().optional(),
17420
+ shape: z69.literal("rotated_pill"),
17385
17421
  width: distance,
17386
17422
  height: distance,
17387
17423
  radius: distance,
17388
- ccwRotation: z68.number(),
17424
+ ccwRotation: z69.number(),
17389
17425
  portHints: portHints.optional(),
17390
- coveredWithSolderMask: z68.boolean().optional(),
17426
+ coveredWithSolderMask: z69.boolean().optional(),
17391
17427
  solderMaskMargin: distance.optional(),
17392
17428
  solderPasteMargin: distance.optional()
17393
17429
  });
17394
17430
  expectTypesMatch(true);
17395
17431
  var polygonSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17396
- name: z68.string().optional(),
17397
- shape: z68.literal("polygon"),
17398
- points: z68.array(point),
17432
+ name: z69.string().optional(),
17433
+ shape: z69.literal("polygon"),
17434
+ points: z69.array(point),
17399
17435
  portHints: portHints.optional(),
17400
- coveredWithSolderMask: z68.boolean().optional(),
17436
+ coveredWithSolderMask: z69.boolean().optional(),
17401
17437
  solderMaskMargin: distance.optional(),
17402
17438
  solderPasteMargin: distance.optional()
17403
17439
  });
17404
17440
  expectTypesMatch(true);
17405
- var smtPadProps = z68.discriminatedUnion("shape", [
17441
+ var smtPadProps = z69.discriminatedUnion("shape", [
17406
17442
  circleSmtPadProps,
17407
17443
  rectSmtPadProps,
17408
17444
  rotatedRectSmtPadProps,
@@ -17413,63 +17449,63 @@ var smtPadProps = z68.discriminatedUnion("shape", [
17413
17449
  expectTypesMatch(true);
17414
17450
 
17415
17451
  // lib/components/solderpaste.ts
17416
- import { z as z69 } from "zod";
17452
+ import { z as z70 } from "zod";
17417
17453
  var rectSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17418
- shape: z69.literal("rect"),
17454
+ shape: z70.literal("rect"),
17419
17455
  width: distance,
17420
17456
  height: distance
17421
17457
  });
17422
17458
  expectTypesMatch(true);
17423
17459
  var circleSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17424
- shape: z69.literal("circle"),
17460
+ shape: z70.literal("circle"),
17425
17461
  radius: distance
17426
17462
  });
17427
17463
  expectTypesMatch(true);
17428
- var solderPasteProps = z69.union([
17464
+ var solderPasteProps = z70.union([
17429
17465
  circleSolderPasteProps,
17430
17466
  rectSolderPasteProps
17431
17467
  ]);
17432
17468
  expectTypesMatch(true);
17433
17469
 
17434
17470
  // lib/components/hole.ts
17435
- import { z as z70 } from "zod";
17471
+ import { z as z71 } from "zod";
17436
17472
  var circleHoleProps = pcbLayoutProps.extend({
17437
- name: z70.string().optional(),
17438
- shape: z70.literal("circle").optional(),
17473
+ name: z71.string().optional(),
17474
+ shape: z71.literal("circle").optional(),
17439
17475
  diameter: distance.optional(),
17440
17476
  radius: distance.optional(),
17441
17477
  solderMaskMargin: distance.optional(),
17442
- coveredWithSolderMask: z70.boolean().optional()
17478
+ coveredWithSolderMask: z71.boolean().optional()
17443
17479
  }).transform((d) => ({
17444
17480
  ...d,
17445
17481
  diameter: d.diameter ?? 2 * d.radius,
17446
17482
  radius: d.radius ?? d.diameter / 2
17447
17483
  }));
17448
17484
  var pillHoleProps = pcbLayoutProps.extend({
17449
- name: z70.string().optional(),
17450
- shape: z70.literal("pill"),
17485
+ name: z71.string().optional(),
17486
+ shape: z71.literal("pill"),
17451
17487
  width: distance,
17452
17488
  height: distance,
17453
17489
  solderMaskMargin: distance.optional(),
17454
- coveredWithSolderMask: z70.boolean().optional()
17490
+ coveredWithSolderMask: z71.boolean().optional()
17455
17491
  });
17456
17492
  var ovalHoleProps = pcbLayoutProps.extend({
17457
- name: z70.string().optional(),
17458
- shape: z70.literal("oval"),
17493
+ name: z71.string().optional(),
17494
+ shape: z71.literal("oval"),
17459
17495
  width: distance,
17460
17496
  height: distance,
17461
17497
  solderMaskMargin: distance.optional(),
17462
- coveredWithSolderMask: z70.boolean().optional()
17498
+ coveredWithSolderMask: z71.boolean().optional()
17463
17499
  });
17464
17500
  var rectHoleProps = pcbLayoutProps.extend({
17465
- name: z70.string().optional(),
17466
- shape: z70.literal("rect"),
17501
+ name: z71.string().optional(),
17502
+ shape: z71.literal("rect"),
17467
17503
  width: distance,
17468
17504
  height: distance,
17469
17505
  solderMaskMargin: distance.optional(),
17470
- coveredWithSolderMask: z70.boolean().optional()
17506
+ coveredWithSolderMask: z71.boolean().optional()
17471
17507
  });
17472
- var holeProps = z70.union([
17508
+ var holeProps = z71.union([
17473
17509
  circleHoleProps,
17474
17510
  pillHoleProps,
17475
17511
  ovalHoleProps,
@@ -17478,7 +17514,7 @@ var holeProps = z70.union([
17478
17514
  expectTypesMatch(true);
17479
17515
 
17480
17516
  // lib/components/antenna.ts
17481
- import { z as z71 } from "zod";
17517
+ import { z as z72 } from "zod";
17482
17518
  var antennaShapes = [
17483
17519
  "2.4ghz_quarter_wave_monopole",
17484
17520
  "2.4ghz_meandered_monopole",
@@ -17486,7 +17522,7 @@ var antennaShapes = [
17486
17522
  "2.4ghz_meandered_inverted_f",
17487
17523
  "2.4ghz_folded_dipole"
17488
17524
  ];
17489
- var antennaShape = z71.enum(antennaShapes);
17525
+ var antennaShape = z72.enum(antennaShapes);
17490
17526
  var antennaFrequencyBands = [
17491
17527
  "2.4ghz",
17492
17528
  "5ghz",
@@ -17494,7 +17530,7 @@ var antennaFrequencyBands = [
17494
17530
  "dual_band_2.4ghz_5ghz",
17495
17531
  "tri_band_2.4ghz_5ghz_6ghz"
17496
17532
  ];
17497
- var antennaFrequencyBand = z71.enum(antennaFrequencyBands);
17533
+ var antennaFrequencyBand = z72.enum(antennaFrequencyBands);
17498
17534
  var antennaProps = commonComponentProps.extend({
17499
17535
  antennaShape: antennaShape.optional(),
17500
17536
  frequencyBand: antennaFrequencyBand.optional(),
@@ -17504,36 +17540,36 @@ expectTypesMatch(true);
17504
17540
 
17505
17541
  // lib/components/trace.ts
17506
17542
  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(
17543
+ import { z as z73 } from "zod";
17544
+ var portRef = z73.union([
17545
+ z73.string(),
17546
+ z73.custom(
17511
17547
  (v) => typeof v === "object" && v !== null && "getPortSelector" in v && typeof v.getPortSelector === "function"
17512
17548
  )
17513
17549
  ]);
17514
- var baseTraceProps = z72.object({
17515
- key: z72.string().optional(),
17516
- name: z72.string().optional(),
17517
- displayName: z72.string().optional(),
17550
+ var baseTraceProps = z73.object({
17551
+ key: z73.string().optional(),
17552
+ name: z73.string().optional(),
17553
+ displayName: z73.string().optional(),
17518
17554
  thickness: distance19.optional(),
17519
17555
  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(),
17556
+ schematicRouteHints: z73.array(point).optional(),
17557
+ pcbRouteHints: z73.array(route_hint_point2).optional(),
17558
+ pcbPathRelativeTo: z73.string().optional(),
17523
17559
  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(),
17560
+ pcbPaths: z73.array(pcbPath).optional(),
17561
+ routingPhaseIndex: z73.number().nullable().optional(),
17562
+ pcbStraightLine: z73.boolean().optional().describe("Draw a straight pcb trace between the connected points"),
17563
+ schDisplayLabel: z73.string().optional(),
17564
+ schStroke: z73.string().optional(),
17565
+ highlightColor: z73.string().optional(),
17530
17566
  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()
17567
+ maxViaCount: z73.number().int().nonnegative().optional().describe("Maximum number of vias allowed in the PCB trace route"),
17568
+ connectsTo: z73.string().or(z73.array(z73.string())).optional()
17533
17569
  });
17534
- var traceProps = z72.union([
17570
+ var traceProps = z73.union([
17535
17571
  baseTraceProps.extend({
17536
- path: z72.array(portRef)
17572
+ path: z73.array(portRef)
17537
17573
  }),
17538
17574
  baseTraceProps.extend({
17539
17575
  from: portRef,
@@ -17551,31 +17587,31 @@ import {
17551
17587
  layer_ref as layer_ref6,
17552
17588
  resistance as resistance3
17553
17589
  } 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(),
17590
+ import { z as z74 } from "zod";
17591
+ var busProps = z74.object({
17592
+ name: z74.string().optional(),
17593
+ connections: z74.array(z74.string()).min(1),
17594
+ routingPhaseIndex: z74.number().nullable().optional(),
17595
+ maxLengthSkew: distance20.pipe(z74.number().min(0).finite()).optional(),
17596
+ targetImpedance: resistance3.pipe(z74.number().positive().finite()).optional(),
17597
+ pcbTraceWidth: distance20.pipe(z74.number().positive().finite()).optional(),
17598
+ pcbAllowedLayers: z74.array(layer_ref6).min(1).optional(),
17563
17599
  preferredLayer: layer_ref6.optional(),
17564
- preferredLayers: z73.array(layer_ref6).min(1).optional()
17600
+ preferredLayers: z74.array(layer_ref6).min(1).optional()
17565
17601
  });
17566
17602
  expectTypesMatch(true);
17567
17603
 
17568
17604
  // lib/components/differentialpair.ts
17569
17605
  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()
17606
+ import { z as z75 } from "zod";
17607
+ var differentialPairProps = z75.object({
17608
+ name: z75.string().optional(),
17609
+ positiveConnection: z75.string(),
17610
+ negativeConnection: z75.string(),
17611
+ maxLengthSkew: distance21.pipe(z75.number().min(0).finite()).optional(),
17612
+ targetDifferentialImpedance: resistance4.pipe(z75.number().positive().finite()).optional(),
17613
+ pcbTraceGap: distance21.pipe(z75.number().positive().finite()).optional(),
17614
+ maxUncoupledLength: distance21.pipe(z75.number().min(0).finite()).optional()
17579
17615
  });
17580
17616
  expectTypesMatch(true);
17581
17617
 
@@ -17583,8 +17619,8 @@ expectTypesMatch(true);
17583
17619
  import {
17584
17620
  layer_ref as layer_ref7
17585
17621
  } from "circuit-json";
17586
- import { z as z75 } from "zod";
17587
- var footprintInsertionDirection = z75.enum([
17622
+ import { z as z76 } from "zod";
17623
+ var footprintInsertionDirection = z76.enum([
17588
17624
  "from_left",
17589
17625
  "from_right",
17590
17626
  "from_top",
@@ -17602,11 +17638,11 @@ var footprintInsertionDirection = z75.enum([
17602
17638
  "from_back"
17603
17639
  ]);
17604
17640
  expectTypesMatch(true);
17605
- var footprintProps = z75.object({
17606
- children: z75.any().optional(),
17607
- name: z75.string().optional(),
17641
+ var footprintProps = z76.object({
17642
+ children: z76.any().optional(),
17643
+ name: z76.string().optional(),
17608
17644
  originalLayer: layer_ref7.default("top").optional(),
17609
- circuitJson: z75.array(z75.any()).optional(),
17645
+ circuitJson: z76.array(z76.any()).optional(),
17610
17646
  src: footprintProp.describe("Can be a footprint or kicad string").optional(),
17611
17647
  insertionDirection: footprintInsertionDirection.optional().describe(
17612
17648
  "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 +17654,19 @@ var footprintProps = z75.object({
17618
17654
  expectTypesMatch(true);
17619
17655
 
17620
17656
  // 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(),
17657
+ import { z as z77 } from "zod";
17658
+ var symbolProps = z77.object({
17659
+ originalFacingDirection: z77.enum(["up", "down", "left", "right"]).default("right").optional(),
17624
17660
  width: distance.optional(),
17625
17661
  height: distance.optional(),
17626
- name: z76.string().optional()
17662
+ name: z77.string().optional()
17627
17663
  });
17628
17664
  expectTypesMatch(true);
17629
17665
 
17630
17666
  // lib/components/battery.ts
17631
17667
  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) => {
17668
+ import { z as z78 } from "zod";
17669
+ var capacity = z78.number().or(z78.string().endsWith("mAh")).transform((v) => {
17634
17670
  if (typeof v === "string") {
17635
17671
  const valString = v.replace("mAh", "");
17636
17672
  const num = Number.parseFloat(valString);
@@ -17645,14 +17681,14 @@ var batteryPins = lrPolarPins;
17645
17681
  var batteryProps = commonComponentProps.extend({
17646
17682
  capacity: capacity.optional(),
17647
17683
  voltage: voltage2.optional(),
17648
- standard: z77.enum(["AA", "AAA", "9V", "CR2032", "18650", "C"]).optional(),
17684
+ standard: z78.enum(["AA", "AAA", "9V", "CR2032", "18650", "C"]).optional(),
17649
17685
  schOrientation: schematicOrientation.optional(),
17650
17686
  connections: createConnectionsProp(batteryPins).optional()
17651
17687
  });
17652
17688
  expectTypesMatch(true);
17653
17689
 
17654
17690
  // lib/components/mountedboard.ts
17655
- import { z as z78 } from "zod";
17691
+ import { z as z79 } from "zod";
17656
17692
  var mountedboardProps = subcircuitGroupProps.extend({
17657
17693
  manufacturerPartNumber: chipProps.shape.manufacturerPartNumber,
17658
17694
  pinLabels: chipProps.shape.pinLabels,
@@ -17664,7 +17700,7 @@ var mountedboardProps = subcircuitGroupProps.extend({
17664
17700
  internallyConnectedPins: chipProps.shape.internallyConnectedPins,
17665
17701
  externallyConnectedPins: chipProps.shape.externallyConnectedPins,
17666
17702
  boardToBoardDistance: distance.optional(),
17667
- mountOrientation: z78.enum(["faceDown", "faceUp"]).optional()
17703
+ mountOrientation: z79.enum(["faceDown", "faceUp"]).optional()
17668
17704
  });
17669
17705
  expectTypesMatch(true);
17670
17706
 
@@ -17672,40 +17708,40 @@ expectTypesMatch(true);
17672
17708
  import { distance as distance22 } from "circuit-json";
17673
17709
 
17674
17710
  // lib/common/pcbOrientation.ts
17675
- import { z as z79 } from "zod";
17676
- var pcbOrientation = z79.enum(["vertical", "horizontal"]).describe(
17711
+ import { z as z80 } from "zod";
17712
+ var pcbOrientation = z80.enum(["vertical", "horizontal"]).describe(
17677
17713
  "vertical means pins go 1->2 downward and horizontal means pins go 1->2 rightward"
17678
17714
  );
17679
17715
  expectTypesMatch(true);
17680
17716
 
17681
17717
  // lib/components/pin-header.ts
17682
- import { z as z80 } from "zod";
17718
+ import { z as z81 } from "zod";
17683
17719
  var pinHeaderProps = commonComponentProps.extend({
17684
- pinCount: z80.number(),
17720
+ pinCount: z81.number(),
17685
17721
  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(),
17722
+ schFacingDirection: z81.enum(["up", "down", "left", "right"]).optional(),
17723
+ gender: z81.enum(["male", "female", "unpopulated"]).optional().default("male"),
17724
+ showSilkscreenPinLabels: z81.boolean().optional(),
17725
+ pcbPinLabels: z81.record(z81.string(), z81.string()).optional(),
17726
+ doubleRow: z81.boolean().optional(),
17727
+ rightAngle: z81.boolean().optional(),
17692
17728
  pcbOrientation: pcbOrientation.optional(),
17693
17729
  holeDiameter: distance22.optional(),
17694
17730
  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(),
17731
+ pinLabels: z81.record(z81.string(), schematicPinLabel).or(z81.array(schematicPinLabel)).optional(),
17732
+ connections: z81.custom().pipe(z81.record(z81.string(), connectionTarget)).optional(),
17733
+ facingDirection: z81.enum(["left", "right"]).optional(),
17698
17734
  schPinArrangement: schematicPinArrangement.optional(),
17699
17735
  schPinStyle: schematicPinStyle.optional(),
17700
17736
  schPinSpacing: distance22.optional(),
17701
17737
  schWidth: distance22.optional(),
17702
17738
  schHeight: distance22.optional(),
17703
- connectsFromAbove: z80.boolean().optional(),
17704
- connectsFromBelow: z80.boolean().optional()
17739
+ connectsFromAbove: z81.boolean().optional(),
17740
+ connectsFromBelow: z81.boolean().optional()
17705
17741
  }).superRefine((props, ctx) => {
17706
17742
  if (props.connectsFromAbove && props.connectsFromBelow) {
17707
17743
  ctx.addIssue({
17708
- code: z80.ZodIssueCode.custom,
17744
+ code: z81.ZodIssueCode.custom,
17709
17745
  message: "connectsFromAbove and connectsFromBelow are opposites; set at most one"
17710
17746
  });
17711
17747
  }
@@ -17716,30 +17752,30 @@ var pinHeaderProps = commonComponentProps.extend({
17716
17752
  expectTypesMatch(true);
17717
17753
 
17718
17754
  // lib/components/netalias.ts
17719
- import { z as z81 } from "zod";
17755
+ import { z as z82 } from "zod";
17720
17756
  import { rotation as rotation3 } from "circuit-json";
17721
- var netAliasProps = z81.object({
17722
- net: z81.string().optional(),
17723
- connection: z81.string().optional(),
17757
+ var netAliasProps = z82.object({
17758
+ net: z82.string().optional(),
17759
+ connection: z82.string().optional(),
17724
17760
  schX: distance.optional(),
17725
17761
  schY: distance.optional(),
17726
17762
  schRotation: rotation3.optional(),
17727
- anchorSide: z81.enum(["left", "top", "right", "bottom"]).optional()
17763
+ anchorSide: z82.enum(["left", "top", "right", "bottom"]).optional()
17728
17764
  });
17729
17765
  expectTypesMatch(true);
17730
17766
 
17731
17767
  // lib/components/netlabel.ts
17732
- import { z as z82 } from "zod";
17768
+ import { z as z83 } from "zod";
17733
17769
  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(),
17770
+ var netLabelProps = z83.object({
17771
+ net: z83.string().optional(),
17772
+ connection: z83.string().optional(),
17773
+ connectsTo: z83.string().or(z83.array(z83.string())).optional(),
17774
+ inline: z83.boolean().optional(),
17739
17775
  schX: distance.optional(),
17740
17776
  schY: distance.optional(),
17741
17777
  schRotation: rotation4.optional(),
17742
- anchorSide: z82.enum(["left", "top", "right", "bottom"]).optional()
17778
+ anchorSide: z83.enum(["left", "top", "right", "bottom"]).optional()
17743
17779
  });
17744
17780
  expectTypesMatch(true);
17745
17781
 
@@ -17754,32 +17790,32 @@ expectTypesMatch(true);
17754
17790
 
17755
17791
  // lib/components/analogsimulation.ts
17756
17792
  import { ms } from "circuit-json";
17757
- import { z as z84 } from "zod";
17758
- var spiceEngine = z84.custom(
17793
+ import { z as z85 } from "zod";
17794
+ var spiceEngine = z85.custom(
17759
17795
  (value) => typeof value === "string"
17760
17796
  );
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()
17797
+ var spiceOptions = z85.object({
17798
+ method: z85.enum(["trap", "gear"]).optional(),
17799
+ reltol: z85.union([z85.number(), z85.string()]).optional(),
17800
+ abstol: z85.union([z85.number(), z85.string()]).optional(),
17801
+ vntol: z85.union([z85.number(), z85.string()]).optional()
17766
17802
  });
17767
17803
  var analogAnalysisSimulationBaseProps = {
17768
- name: z84.string().optional(),
17804
+ name: z85.string().optional(),
17769
17805
  spiceEngine: spiceEngine.optional(),
17770
17806
  spiceOptions: spiceOptions.optional(),
17771
- graphIndependentAxes: z84.boolean().optional(),
17772
- children: z84.custom().optional()
17807
+ graphIndependentAxes: z85.boolean().optional(),
17808
+ children: z85.custom().optional()
17773
17809
  };
17774
- var analogSimulationProps = z84.object({
17775
- name: z84.string().optional(),
17776
- simulationType: z84.literal("spice_transient_analysis").default("spice_transient_analysis"),
17810
+ var analogSimulationProps = z85.object({
17811
+ name: z85.string().optional(),
17812
+ simulationType: z85.literal("spice_transient_analysis").default("spice_transient_analysis"),
17777
17813
  duration: ms.optional(),
17778
17814
  startTime: ms.optional(),
17779
17815
  timePerStep: ms.optional(),
17780
17816
  spiceEngine: spiceEngine.optional(),
17781
17817
  spiceOptions: spiceOptions.optional(),
17782
- graphIndependentAxes: z84.boolean().optional()
17818
+ graphIndependentAxes: z85.boolean().optional()
17783
17819
  });
17784
17820
  expectTypesMatch(
17785
17821
  true
@@ -17787,12 +17823,12 @@ expectTypesMatch(
17787
17823
 
17788
17824
  // lib/components/analogtransientsimulation.ts
17789
17825
  import { ms as ms2 } from "circuit-json";
17790
- import { z as z85 } from "zod";
17826
+ import { z as z86 } from "zod";
17791
17827
  var positiveMilliseconds = ms2.refine(
17792
17828
  (milliseconds) => milliseconds > 0,
17793
17829
  "Time must be positive"
17794
17830
  );
17795
- var analogTransientSimulationProps = z85.object({
17831
+ var analogTransientSimulationProps = z86.object({
17796
17832
  ...analogAnalysisSimulationBaseProps,
17797
17833
  duration: positiveMilliseconds.default("10ms"),
17798
17834
  startTime: ms2.default("0ms"),
@@ -17800,7 +17836,7 @@ var analogTransientSimulationProps = z85.object({
17800
17836
  }).superRefine((simulation, context) => {
17801
17837
  if (simulation.startTime < 0 || simulation.startTime > simulation.duration) {
17802
17838
  context.addIssue({
17803
- code: z85.ZodIssueCode.custom,
17839
+ code: z86.ZodIssueCode.custom,
17804
17840
  path: ["startTime"],
17805
17841
  message: "startTime must be between zero and duration"
17806
17842
  });
@@ -17809,19 +17845,19 @@ var analogTransientSimulationProps = z85.object({
17809
17845
  expectTypesMatch(true);
17810
17846
 
17811
17847
  // lib/components/analogdcoperatingpointsimulation.ts
17812
- import { z as z86 } from "zod";
17813
- var analogDcOperatingPointSimulationProps = z86.object({
17848
+ import { z as z87 } from "zod";
17849
+ var analogDcOperatingPointSimulationProps = z87.object({
17814
17850
  ...analogAnalysisSimulationBaseProps
17815
17851
  });
17816
17852
  expectTypesMatch(true);
17817
17853
 
17818
17854
  // lib/components/analogdcsweepsimulation.ts
17819
17855
  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({
17856
+ import { z as z88 } from "zod";
17857
+ var dcSweepQuantity = z88.union([voltage3, current]);
17858
+ var analogDcSweepSimulationProps = z88.object({
17823
17859
  ...analogAnalysisSimulationBaseProps,
17824
- sweepSource: z87.string().min(1),
17860
+ sweepSource: z88.string().min(1),
17825
17861
  sweepStart: dcSweepQuantity,
17826
17862
  sweepStop: dcSweepQuantity,
17827
17863
  sweepStep: dcSweepQuantity.refine(
@@ -17831,7 +17867,7 @@ var analogDcSweepSimulationProps = z87.object({
17831
17867
  }).superRefine((simulation, context) => {
17832
17868
  if (Math.sign(simulation.sweepStop - simulation.sweepStart) !== Math.sign(simulation.sweepStep)) {
17833
17869
  context.addIssue({
17834
- code: z87.ZodIssueCode.custom,
17870
+ code: z88.ZodIssueCode.custom,
17835
17871
  path: ["sweepStep"],
17836
17872
  message: "sweepStep must move from sweepStart toward sweepStop"
17837
17873
  });
@@ -17841,10 +17877,10 @@ expectTypesMatch(true);
17841
17877
 
17842
17878
  // lib/components/analogacsweepsimulation.ts
17843
17879
  import { frequency as frequency3 } from "circuit-json";
17844
- import { z as z88 } from "zod";
17845
- var analogAcSweepSimulationProps = z88.object({
17880
+ import { z as z89 } from "zod";
17881
+ var analogAcSweepSimulationProps = z89.object({
17846
17882
  ...analogAnalysisSimulationBaseProps,
17847
- sweepType: z88.enum(["linear", "decade", "octave"]),
17883
+ sweepType: z89.enum(["linear", "decade", "octave"]),
17848
17884
  startFrequency: frequency3.refine(
17849
17885
  (startFrequencyHz) => startFrequencyHz > 0,
17850
17886
  "startFrequency must be positive"
@@ -17853,12 +17889,12 @@ var analogAcSweepSimulationProps = z88.object({
17853
17889
  (stopFrequencyHz) => stopFrequencyHz > 0,
17854
17890
  "stopFrequency must be positive"
17855
17891
  ),
17856
- samplesPerInterval: z88.number().int().positive().optional(),
17857
- sampleCount: z88.number().int().positive().optional()
17892
+ samplesPerInterval: z89.number().int().positive().optional(),
17893
+ sampleCount: z89.number().int().positive().optional()
17858
17894
  }).superRefine((simulation, context) => {
17859
17895
  if (simulation.stopFrequency <= simulation.startFrequency) {
17860
17896
  context.addIssue({
17861
- code: z88.ZodIssueCode.custom,
17897
+ code: z89.ZodIssueCode.custom,
17862
17898
  path: ["stopFrequency"],
17863
17899
  message: "stopFrequency must be greater than startFrequency"
17864
17900
  });
@@ -17866,14 +17902,14 @@ var analogAcSweepSimulationProps = z88.object({
17866
17902
  if (simulation.sweepType === "linear") {
17867
17903
  if (simulation.sampleCount === void 0) {
17868
17904
  context.addIssue({
17869
- code: z88.ZodIssueCode.custom,
17905
+ code: z89.ZodIssueCode.custom,
17870
17906
  path: ["sampleCount"],
17871
17907
  message: "sampleCount is required for a linear AC sweep"
17872
17908
  });
17873
17909
  }
17874
17910
  if (simulation.samplesPerInterval !== void 0) {
17875
17911
  context.addIssue({
17876
- code: z88.ZodIssueCode.custom,
17912
+ code: z89.ZodIssueCode.custom,
17877
17913
  path: ["samplesPerInterval"],
17878
17914
  message: "samplesPerInterval is only valid for decade or octave sweeps"
17879
17915
  });
@@ -17882,14 +17918,14 @@ var analogAcSweepSimulationProps = z88.object({
17882
17918
  }
17883
17919
  if (simulation.samplesPerInterval === void 0) {
17884
17920
  context.addIssue({
17885
- code: z88.ZodIssueCode.custom,
17921
+ code: z89.ZodIssueCode.custom,
17886
17922
  path: ["samplesPerInterval"],
17887
17923
  message: "samplesPerInterval is required for decade or octave sweeps"
17888
17924
  });
17889
17925
  }
17890
17926
  if (simulation.sampleCount !== void 0) {
17891
17927
  context.addIssue({
17892
- code: z88.ZodIssueCode.custom,
17928
+ code: z89.ZodIssueCode.custom,
17893
17929
  path: ["sampleCount"],
17894
17930
  message: "sampleCount is only valid for a linear sweep"
17895
17931
  });
@@ -17905,43 +17941,43 @@ import {
17905
17941
  resistance as resistance5,
17906
17942
  voltage as voltage4
17907
17943
  } 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());
17944
+ import { z as z90 } from "zod";
17945
+ var resistanceSweepQuantity = resistance5.pipe(z90.number());
17946
+ var capacitanceSweepQuantity = capacitance4.pipe(z90.number());
17947
+ var inductanceSweepQuantity = inductance.pipe(z90.number());
17948
+ var voltageSweepQuantity = voltage4.pipe(z90.number());
17949
+ var currentSweepQuantity = current2.pipe(z90.number());
17914
17950
  var createAnalogSweepCoordinateProps = (sweepQuantity) => ({
17915
- name: z89.string().optional(),
17916
- values: z89.array(sweepQuantity).min(1).optional(),
17951
+ name: z90.string().optional(),
17952
+ values: z90.array(sweepQuantity).min(1).optional(),
17917
17953
  start: sweepQuantity.optional(),
17918
17954
  stop: sweepQuantity.optional(),
17919
17955
  step: sweepQuantity.optional()
17920
17956
  });
17921
- var analogResistanceSweepParameterProps = z89.object({
17957
+ var analogResistanceSweepParameterProps = z90.object({
17922
17958
  ...createAnalogSweepCoordinateProps(resistanceSweepQuantity),
17923
- parameterType: z89.literal("resistance"),
17924
- resistorRef: z89.string().min(1)
17959
+ parameterType: z90.literal("resistance"),
17960
+ resistorRef: z90.string().min(1)
17925
17961
  }).strict();
17926
- var analogCapacitanceSweepParameterProps = z89.object({
17962
+ var analogCapacitanceSweepParameterProps = z90.object({
17927
17963
  ...createAnalogSweepCoordinateProps(capacitanceSweepQuantity),
17928
- parameterType: z89.literal("capacitance"),
17929
- capacitorRef: z89.string().min(1)
17964
+ parameterType: z90.literal("capacitance"),
17965
+ capacitorRef: z90.string().min(1)
17930
17966
  }).strict();
17931
- var analogInductanceSweepParameterProps = z89.object({
17967
+ var analogInductanceSweepParameterProps = z90.object({
17932
17968
  ...createAnalogSweepCoordinateProps(inductanceSweepQuantity),
17933
- parameterType: z89.literal("inductance"),
17934
- inductorRef: z89.string().min(1)
17969
+ parameterType: z90.literal("inductance"),
17970
+ inductorRef: z90.string().min(1)
17935
17971
  }).strict();
17936
- var analogVoltageSweepParameterProps = z89.object({
17972
+ var analogVoltageSweepParameterProps = z90.object({
17937
17973
  ...createAnalogSweepCoordinateProps(voltageSweepQuantity),
17938
- parameterType: z89.literal("voltage"),
17939
- net: z89.string().min(1)
17974
+ parameterType: z90.literal("voltage"),
17975
+ net: z90.string().min(1)
17940
17976
  }).strict();
17941
- var analogCurrentSweepParameterProps = z89.object({
17977
+ var analogCurrentSweepParameterProps = z90.object({
17942
17978
  ...createAnalogSweepCoordinateProps(currentSweepQuantity),
17943
- parameterType: z89.literal("current"),
17944
- currentSourceRef: z89.string().min(1)
17979
+ parameterType: z90.literal("current"),
17980
+ currentSourceRef: z90.string().min(1)
17945
17981
  }).strict();
17946
17982
  var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
17947
17983
  const hasExplicitSweepCoordinates = sweepCoordinates.values !== void 0;
@@ -17953,34 +17989,34 @@ var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
17953
17989
  const hasRangeCoordinates = rangeCoordinateCount > 0;
17954
17990
  if (hasExplicitSweepCoordinates === hasRangeCoordinates) {
17955
17991
  context.addIssue({
17956
- code: z89.ZodIssueCode.custom,
17992
+ code: z90.ZodIssueCode.custom,
17957
17993
  message: "Provide either values or start/stop/step"
17958
17994
  });
17959
17995
  return;
17960
17996
  }
17961
17997
  if (rangeCoordinateCount !== 0 && rangeCoordinateCount !== 3) {
17962
17998
  context.addIssue({
17963
- code: z89.ZodIssueCode.custom,
17999
+ code: z90.ZodIssueCode.custom,
17964
18000
  message: "start, stop, and step must be provided together"
17965
18001
  });
17966
18002
  return;
17967
18003
  }
17968
18004
  if (sweepCoordinates.step === 0) {
17969
18005
  context.addIssue({
17970
- code: z89.ZodIssueCode.custom,
18006
+ code: z90.ZodIssueCode.custom,
17971
18007
  path: ["step"],
17972
18008
  message: "step must be nonzero"
17973
18009
  });
17974
18010
  }
17975
18011
  if (sweepCoordinates.start !== void 0 && sweepCoordinates.stop !== void 0 && sweepCoordinates.step !== void 0 && Math.sign(sweepCoordinates.stop - sweepCoordinates.start) !== Math.sign(sweepCoordinates.step)) {
17976
18012
  context.addIssue({
17977
- code: z89.ZodIssueCode.custom,
18013
+ code: z90.ZodIssueCode.custom,
17978
18014
  path: ["step"],
17979
18015
  message: "step must move from start toward stop"
17980
18016
  });
17981
18017
  }
17982
18018
  };
17983
- var analogSweepParameterProps = z89.discriminatedUnion("parameterType", [
18019
+ var analogSweepParameterProps = z90.discriminatedUnion("parameterType", [
17984
18020
  analogResistanceSweepParameterProps,
17985
18021
  analogCapacitanceSweepParameterProps,
17986
18022
  analogInductanceSweepParameterProps,
@@ -17995,28 +18031,28 @@ expectTypesMatch(true);
17995
18031
  expectTypesMatch(true);
17996
18032
 
17997
18033
  // 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(),
18034
+ import { z as z91 } from "zod";
18035
+ var autoroutingPhaseProps = z91.object({
18036
+ key: z91.any().optional(),
18037
+ name: z91.string().optional(),
18002
18038
  autorouter: autorouterProp.optional(),
18003
- phaseIndex: z90.number().optional(),
18039
+ phaseIndex: z91.number().optional(),
18004
18040
  ...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()
18041
+ region: z91.object({
18042
+ shape: z91.literal("rect").optional(),
18043
+ minX: z91.number(),
18044
+ maxX: z91.number(),
18045
+ minY: z91.number(),
18046
+ maxY: z91.number()
18011
18047
  }).optional(),
18012
- connection: z90.string().optional(),
18013
- connections: z90.array(z90.string()).optional(),
18014
- reroute: z90.boolean().optional(),
18048
+ connection: z91.string().optional(),
18049
+ connections: z91.array(z91.string()).optional(),
18050
+ reroute: z91.boolean().optional(),
18015
18051
  ...fanoutProps.shape
18016
18052
  }).superRefine((value, ctx) => {
18017
18053
  if (value.reroute !== void 0 && value.region === void 0 && value.connection === void 0 && value.connections === void 0) {
18018
18054
  ctx.addIssue({
18019
- code: z90.ZodIssueCode.custom,
18055
+ code: z91.ZodIssueCode.custom,
18020
18056
  message: "region, connection, or connections is required when reroute is provided",
18021
18057
  path: ["region"]
18022
18058
  });
@@ -18025,15 +18061,15 @@ var autoroutingPhaseProps = z90.object({
18025
18061
  expectTypesMatch(true);
18026
18062
 
18027
18063
  // 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()
18064
+ import { z as z92 } from "zod";
18065
+ var spicemodelProps = z92.object({
18066
+ source: z92.string(),
18067
+ spicePinMapping: z92.record(z92.string(), z92.string()).optional()
18032
18068
  });
18033
18069
  expectTypesMatch(true);
18034
18070
 
18035
18071
  // lib/components/transistor.ts
18036
- import { z as z92 } from "zod";
18072
+ import { z as z93 } from "zod";
18037
18073
  var transistorPinsLabels = [
18038
18074
  "pin1",
18039
18075
  "pin2",
@@ -18046,7 +18082,7 @@ var transistorPinsLabels = [
18046
18082
  "drain"
18047
18083
  ];
18048
18084
  var transistorProps = commonComponentProps.extend({
18049
- type: z92.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
18085
+ type: z93.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
18050
18086
  connections: createConnectionsProp(transistorPinsLabels).optional()
18051
18087
  });
18052
18088
  var transistorPins = [
@@ -18060,7 +18096,7 @@ var transistorPins = [
18060
18096
  expectTypesMatch(true);
18061
18097
 
18062
18098
  // lib/components/mosfet.ts
18063
- import { z as z93 } from "zod";
18099
+ import { z as z94 } from "zod";
18064
18100
  var mosfetPins = [
18065
18101
  "pin1",
18066
18102
  "drain",
@@ -18070,11 +18106,11 @@ var mosfetPins = [
18070
18106
  "gate"
18071
18107
  ];
18072
18108
  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(),
18109
+ channelType: z94.enum(["n", "p"]),
18110
+ mosfetMode: z94.enum(["enhancement", "depletion"]),
18111
+ symbolDrainSide: z94.enum(["left", "right", "top", "bottom"]).optional(),
18112
+ symbolSourceSide: z94.enum(["left", "right", "top", "bottom"]).optional(),
18113
+ symbolGateSide: z94.enum(["left", "right", "top", "bottom"]).optional(),
18078
18114
  connections: createConnectionsProp(mosfetPins).optional()
18079
18115
  });
18080
18116
  expectTypesMatch(true);
@@ -18096,29 +18132,29 @@ expectTypesMatch(true);
18096
18132
 
18097
18133
  // lib/components/inductor.ts
18098
18134
  import { inductance as inductance2 } from "circuit-json";
18099
- import { z as z95 } from "zod";
18135
+ import { z as z96 } from "zod";
18100
18136
  var inductorPins = lrPins;
18101
18137
  var inductorProps = commonComponentProps.extend({
18102
18138
  inductance: inductance2,
18103
- maxCurrentRating: z95.union([z95.string(), z95.number()]).optional(),
18139
+ maxCurrentRating: z96.union([z96.string(), z96.number()]).optional(),
18104
18140
  schOrientation: schematicOrientation.optional(),
18105
18141
  connections: createConnectionsProp(inductorPins).optional()
18106
18142
  });
18107
18143
  expectTypesMatch(true);
18108
18144
 
18109
18145
  // lib/components/internal-circuit.ts
18110
- import { z as z96 } from "zod";
18111
- var internalCircuitProps = z96.object({
18112
- children: z96.custom().optional()
18146
+ import { z as z97 } from "zod";
18147
+ var internalCircuitProps = z97.object({
18148
+ children: z97.custom().optional()
18113
18149
  });
18114
18150
  expectTypesMatch(
18115
18151
  true
18116
18152
  );
18117
18153
 
18118
18154
  // lib/components/diode.ts
18119
- import { z as z97 } from "zod";
18155
+ import { z as z98 } from "zod";
18120
18156
  var diodePins = lrPolarPins;
18121
- var diodeConnectionKeys = z97.enum([
18157
+ var diodeConnectionKeys = z98.enum([
18122
18158
  "anode",
18123
18159
  "cathode",
18124
18160
  "pin1",
@@ -18126,13 +18162,13 @@ var diodeConnectionKeys = z97.enum([
18126
18162
  "pos",
18127
18163
  "neg"
18128
18164
  ]);
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))
18165
+ var connectionTarget3 = z98.string().or(z98.array(z98.string()).readonly()).or(z98.array(z98.string()));
18166
+ var connectionsProp2 = z98.record(diodeConnectionKeys, connectionTarget3);
18167
+ var diodePinLabelsProp = z98.record(
18168
+ z98.enum(diodePins),
18169
+ schematicPinLabel.or(z98.array(schematicPinLabel).readonly()).or(z98.array(schematicPinLabel))
18134
18170
  );
18135
- var diodeVariant = z97.enum([
18171
+ var diodeVariant = z98.enum([
18136
18172
  "standard",
18137
18173
  "schottky",
18138
18174
  "zener",
@@ -18143,12 +18179,12 @@ var diodeVariant = z97.enum([
18143
18179
  var diodeProps = commonComponentProps.extend({
18144
18180
  connections: connectionsProp2.optional(),
18145
18181
  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(),
18182
+ standard: z98.boolean().optional(),
18183
+ schottky: z98.boolean().optional(),
18184
+ zener: z98.boolean().optional(),
18185
+ avalanche: z98.boolean().optional(),
18186
+ photo: z98.boolean().optional(),
18187
+ tvs: z98.boolean().optional(),
18152
18188
  schOrientation: schematicOrientation.optional(),
18153
18189
  pinLabels: diodePinLabelsProp.optional()
18154
18190
  }).superRefine((data, ctx) => {
@@ -18162,11 +18198,11 @@ var diodeProps = commonComponentProps.extend({
18162
18198
  ].filter(Boolean).length;
18163
18199
  if (enabledFlags > 1) {
18164
18200
  ctx.addIssue({
18165
- code: z97.ZodIssueCode.custom,
18201
+ code: z98.ZodIssueCode.custom,
18166
18202
  message: "Exactly one diode variant must be enabled",
18167
18203
  path: []
18168
18204
  });
18169
- return z97.INVALID;
18205
+ return z98.INVALID;
18170
18206
  }
18171
18207
  }).transform((data) => {
18172
18208
  const result = {
@@ -18212,44 +18248,44 @@ var diodeProps = commonComponentProps.extend({
18212
18248
  expectTypesMatch(true);
18213
18249
 
18214
18250
  // 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))
18251
+ import { z as z99 } from "zod";
18252
+ var legacyNumericLedPinLabelsProp = z99.record(
18253
+ z99.enum(["1", "2"]),
18254
+ schematicPinLabel.or(z99.array(schematicPinLabel).readonly()).or(z99.array(schematicPinLabel))
18219
18255
  ).transform((pinLabels) => ({
18220
18256
  ...pinLabels["1"] === void 0 ? {} : { pin1: pinLabels["1"] },
18221
18257
  ...pinLabels["2"] === void 0 ? {} : { pin2: pinLabels["2"] }
18222
18258
  }));
18223
18259
  var ledProps = commonComponentProps.extend({
18224
- color: z98.string().optional(),
18225
- wavelength: z98.string().optional(),
18226
- schDisplayValue: z98.string().optional(),
18260
+ color: z99.string().optional(),
18261
+ wavelength: z99.string().optional(),
18262
+ schDisplayValue: z99.string().optional(),
18227
18263
  schOrientation: schematicOrientation.optional(),
18228
18264
  // Numeric keys are accepted for compatibility with legacy generated LED
18229
18265
  // wrappers, then normalized to the canonical pin1/pin2 representation.
18230
18266
  pinLabels: diodePinLabelsProp.or(legacyNumericLedPinLabelsProp).optional(),
18231
18267
  connections: createConnectionsProp(lrPolarPins).optional(),
18232
- laser: z98.boolean().optional()
18268
+ laser: z99.boolean().optional()
18233
18269
  });
18234
18270
  var ledPins = lrPolarPins;
18235
18271
 
18236
18272
  // lib/components/switch.ts
18237
18273
  import { ms as ms3, frequency as frequency4 } from "circuit-json";
18238
- import { z as z99 } from "zod";
18274
+ import { z as z100 } from "zod";
18239
18275
  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(),
18276
+ type: z100.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
18277
+ isNormallyClosed: z100.boolean().optional().default(false),
18278
+ spst: z100.boolean().optional(),
18279
+ spdt: z100.boolean().optional(),
18280
+ dpst: z100.boolean().optional(),
18281
+ dpdt: z100.boolean().optional(),
18246
18282
  pinLabels: pinLabelsProp.optional(),
18247
18283
  simSwitchFrequency: frequency4.optional(),
18248
18284
  simCloseAt: ms3.optional(),
18249
18285
  simOpenAt: ms3.optional(),
18250
- simStartClosed: z99.boolean().optional(),
18251
- simStartOpen: z99.boolean().optional(),
18252
- connections: z99.custom().pipe(z99.record(z99.string(), connectionTarget)).optional()
18286
+ simStartClosed: z100.boolean().optional(),
18287
+ simStartOpen: z100.boolean().optional(),
18288
+ connections: z100.custom().pipe(z100.record(z100.string(), connectionTarget)).optional()
18253
18289
  }).transform((props) => {
18254
18290
  const updatedProps = { ...props };
18255
18291
  if (updatedProps.dpdt) {
@@ -18281,33 +18317,33 @@ expectTypesMatch(true);
18281
18317
 
18282
18318
  // lib/components/fabrication-note-text.ts
18283
18319
  import { length as length4 } from "circuit-json";
18284
- import { z as z100 } from "zod";
18320
+ import { z as z101 } from "zod";
18285
18321
  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(),
18322
+ text: z101.string(),
18323
+ anchorAlignment: z101.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
18324
+ font: z101.enum(["tscircuit2024"]).optional(),
18289
18325
  fontSize: length4.optional(),
18290
- color: z100.string().optional()
18326
+ color: z101.string().optional()
18291
18327
  });
18292
18328
  expectTypesMatch(true);
18293
18329
 
18294
18330
  // lib/components/fabrication-note-rect.ts
18295
18331
  import { distance as distance23 } from "circuit-json";
18296
- import { z as z101 } from "zod";
18332
+ import { z as z102 } from "zod";
18297
18333
  var fabricationNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18298
18334
  width: distance23,
18299
18335
  height: distance23,
18300
18336
  strokeWidth: distance23.optional(),
18301
- isFilled: z101.boolean().optional(),
18302
- hasStroke: z101.boolean().optional(),
18303
- isStrokeDashed: z101.boolean().optional(),
18304
- color: z101.string().optional(),
18337
+ isFilled: z102.boolean().optional(),
18338
+ hasStroke: z102.boolean().optional(),
18339
+ isStrokeDashed: z102.boolean().optional(),
18340
+ color: z102.string().optional(),
18305
18341
  cornerRadius: distance23.optional()
18306
18342
  });
18307
18343
 
18308
18344
  // lib/components/fabrication-note-path.ts
18309
18345
  import { length as length5, route_hint_point as route_hint_point3 } from "circuit-json";
18310
- import { z as z102 } from "zod";
18346
+ import { z as z103 } from "zod";
18311
18347
  var fabricationNotePathProps = pcbLayoutProps.omit({
18312
18348
  pcbLeftEdgeX: true,
18313
18349
  pcbRightEdgeX: true,
@@ -18319,15 +18355,15 @@ var fabricationNotePathProps = pcbLayoutProps.omit({
18319
18355
  pcbOffsetY: true,
18320
18356
  pcbRotation: true
18321
18357
  }).extend({
18322
- route: z102.array(route_hint_point3),
18358
+ route: z103.array(route_hint_point3),
18323
18359
  strokeWidth: length5.optional(),
18324
- color: z102.string().optional()
18360
+ color: z103.string().optional()
18325
18361
  });
18326
18362
 
18327
18363
  // lib/components/fabrication-note-dimension.ts
18328
18364
  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]);
18365
+ import { z as z104 } from "zod";
18366
+ var dimensionTarget = z104.union([z104.string(), point]);
18331
18367
  var fabricationNoteDimensionProps = pcbLayoutProps.omit({
18332
18368
  pcbLeftEdgeX: true,
18333
18369
  pcbRightEdgeX: true,
@@ -18341,54 +18377,54 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
18341
18377
  }).extend({
18342
18378
  from: dimensionTarget,
18343
18379
  to: dimensionTarget,
18344
- text: z103.string().optional(),
18380
+ text: z104.string().optional(),
18345
18381
  offset: distance24.optional(),
18346
- font: z103.enum(["tscircuit2024"]).optional(),
18382
+ font: z104.enum(["tscircuit2024"]).optional(),
18347
18383
  fontSize: length6.optional(),
18348
- color: z103.string().optional(),
18384
+ color: z104.string().optional(),
18349
18385
  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()
18386
+ units: z104.enum(["in", "mm"]).optional(),
18387
+ outerEdgeToEdge: z104.literal(true).optional(),
18388
+ centerToCenter: z104.literal(true).optional(),
18389
+ innerEdgeToEdge: z104.literal(true).optional()
18354
18390
  });
18355
18391
  expectTypesMatch(true);
18356
18392
 
18357
18393
  // lib/components/pcb-trace.ts
18358
18394
  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(),
18395
+ import { z as z105 } from "zod";
18396
+ var pcbTraceProps = z105.object({
18397
+ layer: z105.string().optional(),
18362
18398
  thickness: distance25.optional(),
18363
- route: z104.array(route_hint_point4)
18399
+ route: z105.array(route_hint_point4)
18364
18400
  });
18365
18401
 
18366
18402
  // lib/components/via.ts
18367
18403
  import { distance as distance26, layer_ref as layer_ref8 } from "circuit-json";
18368
- import { z as z105 } from "zod";
18404
+ import { z as z106 } from "zod";
18369
18405
  var viaProps = commonLayoutProps.extend({
18370
- name: z105.string().optional(),
18406
+ name: z106.string().optional(),
18371
18407
  fromLayer: layer_ref8.optional(),
18372
18408
  toLayer: layer_ref8.optional(),
18373
18409
  holeDiameter: distance26.optional(),
18374
18410
  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()
18411
+ layers: z106.array(layer_ref8).optional(),
18412
+ connectsTo: z106.string().or(z106.array(z106.string())).optional(),
18413
+ netIsAssignable: z106.boolean().optional()
18378
18414
  });
18379
18415
  expectTypesMatch(true);
18380
18416
 
18381
18417
  // lib/components/testpoint.ts
18382
18418
  import { distance as distance27 } from "circuit-json";
18383
- import { z as z106 } from "zod";
18419
+ import { z as z107 } from "zod";
18384
18420
  var testpointPins = ["pin1"];
18385
- var testpointConnectionsProp = z106.object({
18421
+ var testpointConnectionsProp = z107.object({
18386
18422
  pin1: connectionTarget
18387
18423
  }).strict();
18388
18424
  var testpointProps = commonComponentProps.extend({
18389
18425
  connections: testpointConnectionsProp.optional(),
18390
- footprintVariant: z106.enum(["pad", "through_hole"]).optional(),
18391
- padShape: z106.enum(["rect", "circle"]).optional().default("circle"),
18426
+ footprintVariant: z107.enum(["pad", "through_hole"]).optional(),
18427
+ padShape: z107.enum(["rect", "circle"]).optional().default("circle"),
18392
18428
  padDiameter: distance27.optional(),
18393
18429
  holeDiameter: distance27.optional(),
18394
18430
  width: distance27.optional(),
@@ -18400,30 +18436,30 @@ var testpointProps = commonComponentProps.extend({
18400
18436
  expectTypesMatch(true);
18401
18437
 
18402
18438
  // lib/components/breakoutpoint.ts
18403
- import { z as z107 } from "zod";
18439
+ import { z as z108 } from "zod";
18404
18440
  var breakoutPointProps = pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
18405
- connection: z107.string()
18441
+ connection: z108.string()
18406
18442
  });
18407
18443
  expectTypesMatch(true);
18408
18444
 
18409
18445
  // lib/components/pcb-keepout.ts
18410
18446
  import { distance as distance28, layer_ref as layer_ref9 } from "circuit-json";
18411
- import { z as z108 } from "zod";
18412
- var pcbKeepoutProps = z108.union([
18447
+ import { z as z109 } from "zod";
18448
+ var pcbKeepoutProps = z109.union([
18413
18449
  pcbLayoutProps.omit({ pcbRotation: true }).extend({
18414
- shape: z108.literal("circle"),
18450
+ shape: z109.literal("circle"),
18415
18451
  radius: distance28,
18416
- layers: z108.array(layer_ref9).optional(),
18417
- excludeRefs: z108.array(z108.string()).optional().describe(
18452
+ layers: z109.array(layer_ref9).optional(),
18453
+ excludeRefs: z109.array(z109.string()).optional().describe(
18418
18454
  'Component selectors excluded from the keepout, such as ".ANT1"'
18419
18455
  )
18420
18456
  }),
18421
18457
  pcbLayoutProps.extend({
18422
- shape: z108.literal("rect"),
18458
+ shape: z109.literal("rect"),
18423
18459
  width: distance28,
18424
18460
  height: distance28,
18425
- layers: z108.array(layer_ref9).optional(),
18426
- excludeRefs: z108.array(z108.string()).optional().describe(
18461
+ layers: z109.array(layer_ref9).optional(),
18462
+ excludeRefs: z109.array(z109.string()).optional().describe(
18427
18463
  'Component selectors excluded from the keepout, such as ".ANT1"'
18428
18464
  )
18429
18465
  })
@@ -18431,20 +18467,20 @@ var pcbKeepoutProps = z108.union([
18431
18467
 
18432
18468
  // lib/components/courtyard-rect.ts
18433
18469
  import { distance as distance29 } from "circuit-json";
18434
- import { z as z109 } from "zod";
18470
+ import { z as z110 } from "zod";
18435
18471
  var courtyardRectProps = pcbLayoutProps.extend({
18436
18472
  width: distance29,
18437
18473
  height: distance29,
18438
18474
  strokeWidth: distance29.optional(),
18439
- isFilled: z109.boolean().optional(),
18440
- hasStroke: z109.boolean().optional(),
18441
- isStrokeDashed: z109.boolean().optional(),
18442
- color: z109.string().optional()
18475
+ isFilled: z110.boolean().optional(),
18476
+ hasStroke: z110.boolean().optional(),
18477
+ isStrokeDashed: z110.boolean().optional(),
18478
+ color: z110.string().optional()
18443
18479
  });
18444
18480
 
18445
18481
  // lib/components/courtyard-outline.ts
18446
18482
  import { length as length7 } from "circuit-json";
18447
- import { z as z110 } from "zod";
18483
+ import { z as z111 } from "zod";
18448
18484
  var courtyardOutlineProps = pcbLayoutProps.omit({
18449
18485
  pcbLeftEdgeX: true,
18450
18486
  pcbRightEdgeX: true,
@@ -18456,11 +18492,11 @@ var courtyardOutlineProps = pcbLayoutProps.omit({
18456
18492
  pcbOffsetY: true,
18457
18493
  pcbRotation: true
18458
18494
  }).extend({
18459
- outline: z110.array(point),
18495
+ outline: z111.array(point),
18460
18496
  strokeWidth: length7.optional(),
18461
- isClosed: z110.boolean().optional(),
18462
- isStrokeDashed: z110.boolean().optional(),
18463
- color: z110.string().optional()
18497
+ isClosed: z111.boolean().optional(),
18498
+ isStrokeDashed: z111.boolean().optional(),
18499
+ color: z111.string().optional()
18464
18500
  });
18465
18501
 
18466
18502
  // lib/components/courtyard-circle.ts
@@ -18480,13 +18516,13 @@ var courtyardPillProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18480
18516
  });
18481
18517
 
18482
18518
  // lib/components/copper-pour.ts
18483
- import { z as z113 } from "zod";
18519
+ import { z as z114 } from "zod";
18484
18520
  import { layer_ref as layer_ref10 } from "circuit-json";
18485
- var copperPourProps = z113.object({
18486
- name: z113.string().optional(),
18521
+ var copperPourProps = z114.object({
18522
+ name: z114.string().optional(),
18487
18523
  layer: layer_ref10,
18488
- connectsTo: z113.string(),
18489
- unbroken: z113.boolean().optional().describe(
18524
+ connectsTo: z114.string(),
18525
+ unbroken: z114.boolean().optional().describe(
18490
18526
  "Reserves the pour region during autorouting so unrelated traces do not split it. Vias may still cross the region using antipads."
18491
18527
  ),
18492
18528
  padMargin: distance.optional(),
@@ -18494,24 +18530,24 @@ var copperPourProps = z113.object({
18494
18530
  clearance: distance.optional(),
18495
18531
  boardEdgeMargin: distance.optional(),
18496
18532
  cutoutMargin: distance.optional(),
18497
- useThermalReliefs: z113.boolean().optional(),
18498
- outline: z113.array(point).optional(),
18499
- coveredWithSolderMask: z113.boolean().optional().default(true)
18533
+ useThermalReliefs: z114.boolean().optional(),
18534
+ outline: z114.array(point).optional(),
18535
+ coveredWithSolderMask: z114.boolean().optional().default(true)
18500
18536
  });
18501
18537
  expectTypesMatch(true);
18502
18538
 
18503
18539
  // lib/components/cadassembly.ts
18504
18540
  import { layer_ref as layer_ref11 } from "circuit-json";
18505
- import { z as z114 } from "zod";
18506
- var cadassemblyProps = z114.object({
18541
+ import { z as z115 } from "zod";
18542
+ var cadassemblyProps = z115.object({
18507
18543
  originalLayer: layer_ref11.default("top").optional(),
18508
- children: z114.any().optional()
18544
+ children: z115.any().optional()
18509
18545
  });
18510
18546
  expectTypesMatch(true);
18511
18547
 
18512
18548
  // lib/components/cadmodel.ts
18513
- import { z as z115 } from "zod";
18514
- var pcbPosition = z115.object({
18549
+ import { z as z116 } from "zod";
18550
+ var pcbPosition = z116.object({
18515
18551
  pcbX: pcbCoordinate.optional(),
18516
18552
  pcbY: pcbCoordinate.optional(),
18517
18553
  pcbLeftEdgeX: pcbCoordinate.optional(),
@@ -18528,7 +18564,7 @@ var cadModelBaseWithUrl = cadModelBase.extend({
18528
18564
  });
18529
18565
  var cadModelObject = cadModelBaseWithUrl.merge(pcbPosition);
18530
18566
  expectTypesMatch(true);
18531
- var cadmodelProps = z115.union([z115.null(), url, cadModelObject]);
18567
+ var cadmodelProps = z116.union([z116.null(), url, cadModelObject]);
18532
18568
 
18533
18569
  // lib/components/power-source.ts
18534
18570
  import { voltage as voltage5 } from "circuit-json";
@@ -18538,9 +18574,9 @@ var powerSourceProps = commonComponentProps.extend({
18538
18574
 
18539
18575
  // lib/components/voltagesource.ts
18540
18576
  import { frequency as frequency5, ms as ms4, rotation as rotation5, voltage as voltage6 } from "circuit-json";
18541
- import { z as z116 } from "zod";
18577
+ import { z as z117 } from "zod";
18542
18578
  var voltageSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
18543
- var percentage = z116.union([z116.string(), z116.number()]).transform((val) => {
18579
+ var percentage = z117.union([z117.string(), z117.number()]).transform((val) => {
18544
18580
  if (typeof val === "string") {
18545
18581
  if (val.endsWith("%")) {
18546
18582
  return parseFloat(val.slice(0, -1)) / 100;
@@ -18549,13 +18585,13 @@ var percentage = z116.union([z116.string(), z116.number()]).transform((val) => {
18549
18585
  }
18550
18586
  return val;
18551
18587
  }).pipe(
18552
- z116.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18588
+ z117.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18553
18589
  );
18554
18590
  var voltageSourceProps = commonComponentProps.extend({
18555
18591
  voltage: voltage6.optional(),
18556
18592
  frequency: frequency5.optional(),
18557
18593
  peakToPeakVoltage: voltage6.optional(),
18558
- waveShape: z116.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18594
+ waveShape: z117.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18559
18595
  phase: rotation5.optional(),
18560
18596
  dutyCycle: percentage.optional(),
18561
18597
  pulseDelay: ms4.optional(),
@@ -18572,9 +18608,9 @@ expectTypesMatch(true);
18572
18608
 
18573
18609
  // lib/components/currentsource.ts
18574
18610
  import { frequency as frequency6, rotation as rotation6, current as current3 } from "circuit-json";
18575
- import { z as z117 } from "zod";
18611
+ import { z as z118 } from "zod";
18576
18612
  var currentSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
18577
- var percentage2 = z117.union([z117.string(), z117.number()]).transform((val) => {
18613
+ var percentage2 = z118.union([z118.string(), z118.number()]).transform((val) => {
18578
18614
  if (typeof val === "string") {
18579
18615
  if (val.endsWith("%")) {
18580
18616
  return parseFloat(val.slice(0, -1)) / 100;
@@ -18583,13 +18619,13 @@ var percentage2 = z117.union([z117.string(), z117.number()]).transform((val) =>
18583
18619
  }
18584
18620
  return val;
18585
18621
  }).pipe(
18586
- z117.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18622
+ z118.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18587
18623
  );
18588
18624
  var currentSourceProps = commonComponentProps.extend({
18589
18625
  current: current3.optional(),
18590
18626
  frequency: frequency6.optional(),
18591
18627
  peakToPeakCurrent: current3.optional(),
18592
- waveShape: z117.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18628
+ waveShape: z118.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18593
18629
  phase: rotation6.optional(),
18594
18630
  dutyCycle: percentage2.optional(),
18595
18631
  acMagnitude: current3.optional(),
@@ -18600,21 +18636,21 @@ var currentSourcePins = lrPolarPins;
18600
18636
  expectTypesMatch(true);
18601
18637
 
18602
18638
  // lib/components/voltageprobe.ts
18603
- import { z as z118 } from "zod";
18639
+ import { z as z119 } from "zod";
18604
18640
  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()
18641
+ name: z119.string().optional(),
18642
+ connectsTo: z119.string(),
18643
+ referenceTo: z119.string().optional(),
18644
+ color: z119.string().optional(),
18645
+ graphDisplayName: z119.string().optional(),
18646
+ graphCenter: z119.number().optional(),
18647
+ graphVerticalOffset: z119.number().or(z119.string()).optional(),
18648
+ graphVoltagePerDiv: z119.number().or(z119.string()).optional()
18613
18649
  });
18614
18650
  expectTypesMatch(true);
18615
18651
 
18616
18652
  // lib/components/ammeter.ts
18617
- import { z as z119 } from "zod";
18653
+ import { z as z120 } from "zod";
18618
18654
  var ammeterPinLabels = ["pin1", "pin2", "pos", "neg"];
18619
18655
  var hasAmmeterConnectionPair = (connections) => {
18620
18656
  return connections.pos !== void 0 && connections.neg !== void 0 || connections.pin1 !== void 0 && connections.pin2 !== void 0;
@@ -18624,64 +18660,64 @@ var ammeterProps = commonComponentProps.extend({
18624
18660
  hasAmmeterConnectionPair,
18625
18661
  "Ammeter connections must include either pos/neg or pin1/pin2"
18626
18662
  ),
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()
18663
+ color: z120.string().optional(),
18664
+ graphDisplayName: z120.string().optional(),
18665
+ graphCenter: z120.number().optional(),
18666
+ graphVerticalOffset: z120.number().or(z120.string()).optional(),
18667
+ graphCurrentPerDiv: z120.number().or(z120.string()).optional()
18632
18668
  });
18633
18669
  var ammeterPins = ammeterPinLabels;
18634
18670
  expectTypesMatch(true);
18635
18671
 
18636
18672
  // lib/components/schematic-arc.ts
18637
18673
  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({
18674
+ import { z as z121 } from "zod";
18675
+ var schematicArcProps = z121.object({
18640
18676
  center: point5,
18641
18677
  radius: distance32,
18642
18678
  startAngleDegrees: rotation7,
18643
18679
  endAngleDegrees: rotation7,
18644
- direction: z120.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
18680
+ direction: z121.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
18645
18681
  strokeWidth: distance32.optional(),
18646
- color: z120.string().optional(),
18647
- isDashed: z120.boolean().optional().default(false)
18682
+ color: z121.string().optional(),
18683
+ isDashed: z121.boolean().optional().default(false)
18648
18684
  });
18649
18685
  expectTypesMatch(true);
18650
18686
 
18651
18687
  // lib/components/toolingrail.ts
18652
- import { z as z121 } from "zod";
18653
- var toolingrailProps = z121.object({
18654
- children: z121.any().optional()
18688
+ import { z as z122 } from "zod";
18689
+ var toolingrailProps = z122.object({
18690
+ children: z122.any().optional()
18655
18691
  });
18656
18692
  expectTypesMatch(true);
18657
18693
 
18658
18694
  // lib/components/schematic-box.ts
18659
18695
  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(),
18696
+ import { z as z123 } from "zod";
18697
+ var schematicBoxProps = z123.object({
18698
+ name: z123.string().optional(),
18699
+ chipRef: z123.string().optional(),
18664
18700
  pinLabels: pinLabelsProp.optional(),
18665
18701
  schPinArrangement: schematicPinArrangement.optional(),
18666
18702
  schPinStyle: schematicPinStyle.optional(),
18667
18703
  schX: distance33.optional(),
18668
18704
  schY: distance33.optional(),
18669
- schSectionName: z122.string().optional(),
18670
- schSheetName: z122.string().optional(),
18705
+ schSectionName: z123.string().optional(),
18706
+ schSheetName: z123.string().optional(),
18671
18707
  width: distance33.optional(),
18672
18708
  height: distance33.optional(),
18673
- overlay: z122.array(z122.string()).optional(),
18709
+ overlay: z123.array(z123.string()).optional(),
18674
18710
  padding: distance33.optional(),
18675
18711
  paddingLeft: distance33.optional(),
18676
18712
  paddingRight: distance33.optional(),
18677
18713
  paddingTop: distance33.optional(),
18678
18714
  paddingBottom: distance33.optional(),
18679
- title: z122.string().optional(),
18715
+ title: z123.string().optional(),
18680
18716
  titleAlignment: ninePointAnchor.default("top_left"),
18681
- titleColor: z122.string().optional(),
18717
+ titleColor: z123.string().optional(),
18682
18718
  titleFontSize: distance33.optional(),
18683
- titleInside: z122.boolean().default(false),
18684
- strokeStyle: z122.enum(["solid", "dashed"]).default("solid")
18719
+ titleInside: z123.boolean().default(false),
18720
+ strokeStyle: z123.enum(["solid", "dashed"]).default("solid")
18685
18721
  }).refine(
18686
18722
  (elm) => elm.width !== void 0 && elm.height !== void 0 || Array.isArray(elm.overlay) && elm.overlay.length > 0,
18687
18723
  {
@@ -18697,21 +18733,21 @@ expectTypesMatch(true);
18697
18733
 
18698
18734
  // lib/components/schematic-symbol.ts
18699
18735
  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, {
18736
+ import { z as z124 } from "zod";
18737
+ var schematicSymbolConnections = z124.custom().pipe(z124.record(z124.string(), connectionTarget)).refine((value) => Object.keys(value).length > 0, {
18702
18738
  message: "connections must map at least one schematic symbol port"
18703
18739
  });
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),
18740
+ var schematicSymbolProps = z124.object({
18741
+ name: z124.string().min(1),
18742
+ displayName: z124.string().optional(),
18743
+ chipRef: z124.string().min(1).optional(),
18744
+ symbolName: z124.string().min(1),
18709
18745
  connections: schematicSymbolConnections.optional(),
18710
18746
  schX: distance.optional(),
18711
18747
  schY: distance.optional(),
18712
18748
  schRotation: rotation8.optional(),
18713
- schSectionName: z123.string().optional(),
18714
- schSheetName: z123.string().optional()
18749
+ schSectionName: z124.string().optional(),
18750
+ schSheetName: z124.string().optional()
18715
18751
  });
18716
18752
  expectTypesMatch(
18717
18753
  true
@@ -18719,15 +18755,15 @@ expectTypesMatch(
18719
18755
 
18720
18756
  // lib/components/schematic-circle.ts
18721
18757
  import { distance as distance34, point as point6 } from "circuit-json";
18722
- import { z as z124 } from "zod";
18723
- var schematicCircleProps = z124.object({
18758
+ import { z as z125 } from "zod";
18759
+ var schematicCircleProps = z125.object({
18724
18760
  center: point6,
18725
18761
  radius: distance34,
18726
18762
  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)
18763
+ color: z125.string().optional(),
18764
+ isFilled: z125.boolean().optional().default(false),
18765
+ fillColor: z125.string().optional(),
18766
+ isDashed: z125.boolean().optional().default(false)
18731
18767
  });
18732
18768
  expectTypesMatch(
18733
18769
  true
@@ -18735,32 +18771,32 @@ expectTypesMatch(
18735
18771
 
18736
18772
  // lib/components/schematic-rect.ts
18737
18773
  import { distance as distance35, rotation as rotation9 } from "circuit-json";
18738
- import { z as z125 } from "zod";
18739
- var schematicRectProps = z125.object({
18774
+ import { z as z126 } from "zod";
18775
+ var schematicRectProps = z126.object({
18740
18776
  schX: distance35.optional(),
18741
18777
  schY: distance35.optional(),
18742
18778
  width: distance35,
18743
18779
  height: distance35,
18744
18780
  rotation: rotation9.default(0),
18745
18781
  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)
18782
+ color: z126.string().optional(),
18783
+ isFilled: z126.boolean().optional().default(false),
18784
+ fillColor: z126.string().optional(),
18785
+ isDashed: z126.boolean().optional().default(false)
18750
18786
  });
18751
18787
  expectTypesMatch(true);
18752
18788
 
18753
18789
  // lib/components/schematic-line.ts
18754
18790
  import { distance as distance36 } from "circuit-json";
18755
- import { z as z126 } from "zod";
18756
- var schematicLineProps = z126.object({
18791
+ import { z as z127 } from "zod";
18792
+ var schematicLineProps = z127.object({
18757
18793
  x1: distance36,
18758
18794
  y1: distance36,
18759
18795
  x2: distance36,
18760
18796
  y2: distance36,
18761
18797
  strokeWidth: distance36.optional(),
18762
- color: z126.string().optional(),
18763
- isDashed: z126.boolean().optional().default(false),
18798
+ color: z127.string().optional(),
18799
+ isDashed: z127.boolean().optional().default(false),
18764
18800
  dashLength: distance36.optional(),
18765
18801
  dashGap: distance36.optional()
18766
18802
  });
@@ -18768,11 +18804,11 @@ expectTypesMatch(true);
18768
18804
 
18769
18805
  // lib/components/schematic-text.ts
18770
18806
  import { distance as distance37, rotation as rotation10 } from "circuit-json";
18771
- import { z as z128 } from "zod";
18807
+ import { z as z129 } from "zod";
18772
18808
 
18773
18809
  // lib/common/fivePointAnchor.ts
18774
- import { z as z127 } from "zod";
18775
- var fivePointAnchor = z127.enum([
18810
+ import { z as z128 } from "zod";
18811
+ var fivePointAnchor = z128.enum([
18776
18812
  "center",
18777
18813
  "left",
18778
18814
  "right",
@@ -18781,39 +18817,39 @@ var fivePointAnchor = z127.enum([
18781
18817
  ]);
18782
18818
 
18783
18819
  // lib/components/schematic-text.ts
18784
- var schematicTextProps = z128.object({
18820
+ var schematicTextProps = z129.object({
18785
18821
  schX: distance37.optional(),
18786
18822
  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"),
18823
+ text: z129.string(),
18824
+ fontSize: z129.number().default(1),
18825
+ anchor: z129.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
18826
+ color: z129.string().default("#000000"),
18791
18827
  schRotation: rotation10.default(0)
18792
18828
  });
18793
18829
  expectTypesMatch(true);
18794
18830
 
18795
18831
  // lib/components/schematic-path.ts
18796
18832
  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(),
18833
+ import { z as z130 } from "zod";
18834
+ var schematicPathProps = z130.object({
18835
+ points: z130.array(point7).optional(),
18836
+ svgPath: z130.string().optional(),
18801
18837
  strokeWidth: distance38.optional(),
18802
- strokeColor: z129.string().optional(),
18838
+ strokeColor: z130.string().optional(),
18803
18839
  dashLength: distance38.optional(),
18804
18840
  dashGap: distance38.optional(),
18805
- isFilled: z129.boolean().optional().default(false),
18806
- fillColor: z129.string().optional()
18841
+ isFilled: z130.boolean().optional().default(false),
18842
+ fillColor: z130.string().optional()
18807
18843
  });
18808
18844
  expectTypesMatch(true);
18809
18845
 
18810
18846
  // lib/components/schematic-table.ts
18811
18847
  import { distance as distance39 } from "circuit-json";
18812
- import { z as z130 } from "zod";
18813
- var schematicTableProps = z130.object({
18848
+ import { z as z131 } from "zod";
18849
+ var schematicTableProps = z131.object({
18814
18850
  schX: distance39.optional(),
18815
18851
  schY: distance39.optional(),
18816
- children: z130.any().optional(),
18852
+ children: z131.any().optional(),
18817
18853
  cellPadding: distance39.optional(),
18818
18854
  borderWidth: distance39.optional(),
18819
18855
  anchor: ninePointAnchor.optional(),
@@ -18823,34 +18859,34 @@ expectTypesMatch(true);
18823
18859
 
18824
18860
  // lib/components/schematic-row.ts
18825
18861
  import { distance as distance40 } from "circuit-json";
18826
- import { z as z131 } from "zod";
18827
- var schematicRowProps = z131.object({
18828
- children: z131.any().optional(),
18862
+ import { z as z132 } from "zod";
18863
+ var schematicRowProps = z132.object({
18864
+ children: z132.any().optional(),
18829
18865
  height: distance40.optional()
18830
18866
  });
18831
18867
  expectTypesMatch(true);
18832
18868
 
18833
18869
  // lib/components/schematic-cell.ts
18834
18870
  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(),
18871
+ import { z as z133 } from "zod";
18872
+ var schematicCellProps = z133.object({
18873
+ children: z133.string().optional(),
18874
+ horizontalAlign: z133.enum(["left", "center", "right"]).optional(),
18875
+ verticalAlign: z133.enum(["top", "middle", "bottom"]).optional(),
18840
18876
  fontSize: distance41.optional(),
18841
- rowSpan: z132.number().optional(),
18842
- colSpan: z132.number().optional(),
18877
+ rowSpan: z133.number().optional(),
18878
+ colSpan: z133.number().optional(),
18843
18879
  width: distance41.optional(),
18844
- text: z132.string().optional()
18880
+ text: z133.string().optional()
18845
18881
  });
18846
18882
  expectTypesMatch(true);
18847
18883
 
18848
18884
  // lib/components/schematic-section.ts
18849
18885
  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(),
18886
+ import { z as z134 } from "zod";
18887
+ var schematicSectionProps = z134.object({
18888
+ displayName: z134.string().optional(),
18889
+ name: z134.string(),
18854
18890
  sectionTitleFontSize: distance42.optional()
18855
18891
  });
18856
18892
  expectTypesMatch(
@@ -18858,38 +18894,38 @@ expectTypesMatch(
18858
18894
  );
18859
18895
 
18860
18896
  // lib/components/schematic-sheet.ts
18861
- import { z as z134 } from "zod";
18897
+ import { z as z135 } from "zod";
18862
18898
  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()
18899
+ var schematicSheetProps = z135.object({
18900
+ name: z135.string().optional(),
18901
+ displayName: z135.string().optional(),
18902
+ sheetIndex: z135.number().optional(),
18903
+ sheetSize: z135.enum(["A4", "ANSI_B"]).default("A4"),
18904
+ sheetWidth: distance43.pipe(z135.number().positive()).optional(),
18905
+ sheetHeight: distance43.pipe(z135.number().positive()).optional(),
18906
+ children: z135.any().optional()
18871
18907
  });
18872
18908
  expectTypesMatch(true);
18873
18909
 
18874
18910
  // lib/components/schematic-graphic.ts
18875
- import { z as z135 } from "zod";
18911
+ import { z as z136 } from "zod";
18876
18912
  var nonemptyUrl = url.refine((value) => value.trim().length > 0, {
18877
18913
  message: "imageUrl cannot be empty"
18878
18914
  });
18879
- var positiveDistance = (fieldName) => distance.refine((value) => Number.isFinite(value) && value > 0, {
18915
+ var positiveDistance2 = (fieldName) => distance.refine((value) => Number.isFinite(value) && value > 0, {
18880
18916
  message: `${fieldName} must be a positive finite distance`
18881
18917
  });
18882
- var schematicGraphicProps = z135.object({
18918
+ var schematicGraphicProps = z136.object({
18883
18919
  imageUrl: nonemptyUrl.optional(),
18884
- svgContent: z135.string().refine((value) => value.trim().length > 0, {
18920
+ svgContent: z136.string().refine((value) => value.trim().length > 0, {
18885
18921
  message: "svgContent cannot be empty"
18886
18922
  }).optional(),
18887
- width: positiveDistance("width").optional(),
18888
- height: positiveDistance("height").optional()
18923
+ width: positiveDistance2("width").optional(),
18924
+ height: positiveDistance2("height").optional()
18889
18925
  }).superRefine(({ imageUrl, svgContent }, ctx) => {
18890
18926
  if (imageUrl === void 0 && svgContent === void 0) {
18891
18927
  ctx.addIssue({
18892
- code: z135.ZodIssueCode.custom,
18928
+ code: z136.ZodIssueCode.custom,
18893
18929
  message: "At least one of imageUrl or svgContent is required"
18894
18930
  });
18895
18931
  }
@@ -18900,40 +18936,40 @@ expectTypesMatch(
18900
18936
 
18901
18937
  // lib/components/copper-text.ts
18902
18938
  import { layer_ref as layer_ref12, length as length8 } from "circuit-json";
18903
- import { z as z136 } from "zod";
18939
+ import { z as z137 } from "zod";
18904
18940
  var copperTextProps = pcbLayoutProps.extend({
18905
- text: z136.string(),
18941
+ text: z137.string(),
18906
18942
  anchorAlignment: ninePointAnchor.default("center"),
18907
- font: z136.enum(["tscircuit2024"]).optional(),
18943
+ font: z137.enum(["tscircuit2024"]).optional(),
18908
18944
  fontSize: length8.optional(),
18909
- layers: z136.array(layer_ref12).optional(),
18910
- knockout: z136.boolean().optional(),
18911
- mirrored: z136.boolean().optional()
18945
+ layers: z137.array(layer_ref12).optional(),
18946
+ knockout: z137.boolean().optional(),
18947
+ mirrored: z137.boolean().optional()
18912
18948
  });
18913
18949
 
18914
18950
  // lib/components/silkscreen-text.ts
18915
18951
  import { layer_ref as layer_ref13, length as length9 } from "circuit-json";
18916
- import { z as z137 } from "zod";
18952
+ import { z as z138 } from "zod";
18917
18953
  var silkscreenTextProps = pcbLayoutProps.extend({
18918
- text: z137.string(),
18954
+ text: z138.string(),
18919
18955
  anchorAlignment: ninePointAnchor.default("center"),
18920
- font: z137.enum(["tscircuit2024"]).optional(),
18956
+ font: z138.enum(["tscircuit2024"]).optional(),
18921
18957
  fontSize: length9.optional(),
18922
18958
  /**
18923
18959
  * If true, text will knock out underlying silkscreen
18924
18960
  */
18925
- isKnockout: z137.boolean().optional(),
18961
+ isKnockout: z138.boolean().optional(),
18926
18962
  knockoutPadding: length9.optional(),
18927
18963
  knockoutPaddingLeft: length9.optional(),
18928
18964
  knockoutPaddingRight: length9.optional(),
18929
18965
  knockoutPaddingTop: length9.optional(),
18930
18966
  knockoutPaddingBottom: length9.optional(),
18931
- layers: z137.array(layer_ref13).optional()
18967
+ layers: z138.array(layer_ref13).optional()
18932
18968
  });
18933
18969
 
18934
18970
  // lib/components/silkscreen-path.ts
18935
18971
  import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
18936
- import { z as z138 } from "zod";
18972
+ import { z as z139 } from "zod";
18937
18973
  var silkscreenPathProps = pcbLayoutProps.omit({
18938
18974
  pcbLeftEdgeX: true,
18939
18975
  pcbRightEdgeX: true,
@@ -18945,7 +18981,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
18945
18981
  pcbOffsetY: true,
18946
18982
  pcbRotation: true
18947
18983
  }).extend({
18948
- route: z138.array(route_hint_point5),
18984
+ route: z139.array(route_hint_point5),
18949
18985
  strokeWidth: length10.optional()
18950
18986
  });
18951
18987
 
@@ -18967,10 +19003,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({
18967
19003
 
18968
19004
  // lib/components/silkscreen-rect.ts
18969
19005
  import { distance as distance45 } from "circuit-json";
18970
- import { z as z139 } from "zod";
19006
+ import { z as z140 } from "zod";
18971
19007
  var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18972
- filled: z139.boolean().default(true).optional(),
18973
- stroke: z139.enum(["dashed", "solid", "none"]).optional(),
19008
+ filled: z140.boolean().default(true).optional(),
19009
+ stroke: z140.enum(["dashed", "solid", "none"]).optional(),
18974
19010
  strokeWidth: distance45.optional(),
18975
19011
  width: distance45,
18976
19012
  height: distance45,
@@ -18979,10 +19015,10 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18979
19015
 
18980
19016
  // lib/components/silkscreen-circle.ts
18981
19017
  import { distance as distance46 } from "circuit-json";
18982
- import { z as z140 } from "zod";
19018
+ import { z as z141 } from "zod";
18983
19019
  var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18984
- isFilled: z140.boolean().optional(),
18985
- isOutline: z140.boolean().optional(),
19020
+ isFilled: z141.boolean().optional(),
19021
+ isOutline: z141.boolean().optional(),
18986
19022
  strokeWidth: distance46.optional(),
18987
19023
  radius: distance46
18988
19024
  });
@@ -19000,69 +19036,69 @@ expectTypesMatch(true);
19000
19036
 
19001
19037
  // lib/components/trace-hint.ts
19002
19038
  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({
19039
+ import { z as z143 } from "zod";
19040
+ var routeHintPointProps = z143.object({
19005
19041
  x: distance47,
19006
19042
  y: distance47,
19007
- via: z142.boolean().optional(),
19043
+ via: z143.boolean().optional(),
19008
19044
  toLayer: layer_ref14.optional()
19009
19045
  });
19010
- var traceHintProps = z142.object({
19011
- for: z142.string().optional().describe(
19046
+ var traceHintProps = z143.object({
19047
+ for: z143.string().optional().describe(
19012
19048
  "Selector for the port you're targeting, not required if you're inside a trace"
19013
19049
  ),
19014
- order: z142.number().optional(),
19050
+ order: z143.number().optional(),
19015
19051
  offset: route_hint_point6.or(routeHintPointProps).optional(),
19016
- offsets: z142.array(route_hint_point6).or(z142.array(routeHintPointProps)).optional(),
19017
- traceWidth: z142.number().optional()
19052
+ offsets: z143.array(route_hint_point6).or(z143.array(routeHintPointProps)).optional(),
19053
+ traceWidth: z143.number().optional()
19018
19054
  });
19019
19055
 
19020
19056
  // lib/components/port.ts
19021
19057
  import { distance as distance48 } from "circuit-json";
19022
- import { z as z143 } from "zod";
19058
+ import { z as z144 } from "zod";
19023
19059
  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(
19060
+ name: z144.string().optional(),
19061
+ pinNumber: z144.number().optional(),
19062
+ schStemLength: z144.number().optional(),
19063
+ schPinLabelFontSize: z144.enum(["default", "sm"]).or(
19028
19064
  distance48.refine((value) => Number.isFinite(value) && value > 0, {
19029
19065
  message: "Schematic pin-label font size must be positive and finite"
19030
19066
  })
19031
19067
  ).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(),
19068
+ aliases: z144.array(z144.string()).optional(),
19069
+ layer: z144.string().optional(),
19070
+ layers: z144.array(z144.string()).optional(),
19071
+ schX: z144.number().optional(),
19072
+ schY: z144.number().optional(),
19037
19073
  direction: direction.optional(),
19038
- connectsTo: z143.string().or(z143.array(z143.string())).optional(),
19074
+ connectsTo: z144.string().or(z144.array(z144.string())).optional(),
19039
19075
  kicadPinMetadata: kicadPinMetadata.optional(),
19040
- hasInversionCircle: z143.boolean().optional()
19076
+ hasInversionCircle: z144.boolean().optional()
19041
19077
  });
19042
19078
 
19043
19079
  // lib/components/pcb-note-text.ts
19044
19080
  import { length as length11 } from "circuit-json";
19045
- import { z as z144 } from "zod";
19081
+ import { z as z145 } from "zod";
19046
19082
  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(),
19083
+ text: z145.string(),
19084
+ anchorAlignment: z145.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
19085
+ font: z145.enum(["tscircuit2024"]).optional(),
19050
19086
  fontSize: length11.optional(),
19051
- color: z144.string().optional()
19087
+ color: z145.string().optional()
19052
19088
  });
19053
19089
  expectTypesMatch(true);
19054
19090
 
19055
19091
  // lib/components/pcb-note-rect.ts
19056
19092
  import { distance as distance49 } from "circuit-json";
19057
- import { z as z145 } from "zod";
19093
+ import { z as z146 } from "zod";
19058
19094
  var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
19059
19095
  width: distance49,
19060
19096
  height: distance49,
19061
19097
  strokeWidth: distance49.optional(),
19062
- isFilled: z145.boolean().optional(),
19063
- hasStroke: z145.boolean().optional(),
19064
- isStrokeDashed: z145.boolean().optional(),
19065
- color: z145.string().optional(),
19098
+ isFilled: z146.boolean().optional(),
19099
+ hasStroke: z146.boolean().optional(),
19100
+ isStrokeDashed: z146.boolean().optional(),
19101
+ color: z146.string().optional(),
19066
19102
  cornerRadius: distance49.optional()
19067
19103
  });
19068
19104
  expectTypesMatch(true);
@@ -19072,7 +19108,7 @@ import {
19072
19108
  length as length12,
19073
19109
  route_hint_point as route_hint_point7
19074
19110
  } from "circuit-json";
19075
- import { z as z146 } from "zod";
19111
+ import { z as z147 } from "zod";
19076
19112
  var pcbNotePathProps = pcbLayoutProps.omit({
19077
19113
  pcbLeftEdgeX: true,
19078
19114
  pcbRightEdgeX: true,
@@ -19084,15 +19120,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
19084
19120
  pcbOffsetY: true,
19085
19121
  pcbRotation: true
19086
19122
  }).extend({
19087
- route: z146.array(route_hint_point7),
19123
+ route: z147.array(route_hint_point7),
19088
19124
  strokeWidth: length12.optional(),
19089
- color: z146.string().optional()
19125
+ color: z147.string().optional()
19090
19126
  });
19091
19127
  expectTypesMatch(true);
19092
19128
 
19093
19129
  // lib/components/pcb-note-line.ts
19094
19130
  import { distance as distance50 } from "circuit-json";
19095
- import { z as z147 } from "zod";
19131
+ import { z as z148 } from "zod";
19096
19132
  var pcbNoteLineProps = pcbLayoutProps.omit({
19097
19133
  pcbLeftEdgeX: true,
19098
19134
  pcbRightEdgeX: true,
@@ -19109,15 +19145,15 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
19109
19145
  x2: distance50,
19110
19146
  y2: distance50,
19111
19147
  strokeWidth: distance50.optional(),
19112
- color: z147.string().optional(),
19113
- isDashed: z147.boolean().optional()
19148
+ color: z148.string().optional(),
19149
+ isDashed: z148.boolean().optional()
19114
19150
  });
19115
19151
  expectTypesMatch(true);
19116
19152
 
19117
19153
  // lib/components/pcb-note-dimension.ts
19118
19154
  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]);
19155
+ import { z as z149 } from "zod";
19156
+ var dimensionTarget2 = z149.union([z149.string(), point]);
19121
19157
  var pcbNoteDimensionProps = pcbLayoutProps.omit({
19122
19158
  pcbLeftEdgeX: true,
19123
19159
  pcbRightEdgeX: true,
@@ -19131,108 +19167,108 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
19131
19167
  }).extend({
19132
19168
  from: dimensionTarget2,
19133
19169
  to: dimensionTarget2,
19134
- text: z148.string().optional(),
19170
+ text: z149.string().optional(),
19135
19171
  offset: distance51.optional(),
19136
- font: z148.enum(["tscircuit2024"]).optional(),
19172
+ font: z149.enum(["tscircuit2024"]).optional(),
19137
19173
  fontSize: length13.optional(),
19138
- color: z148.string().optional(),
19174
+ color: z149.string().optional(),
19139
19175
  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()
19176
+ units: z149.enum(["in", "mm"]).optional(),
19177
+ outerEdgeToEdge: z149.literal(true).optional(),
19178
+ centerToCenter: z149.literal(true).optional(),
19179
+ innerEdgeToEdge: z149.literal(true).optional()
19144
19180
  });
19145
19181
  expectTypesMatch(
19146
19182
  true
19147
19183
  );
19148
19184
 
19149
19185
  // 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()),
19186
+ import { z as z150 } from "zod";
19187
+ var unvalidatedCircuitJson = z150.array(z150.any()).describe("Circuit JSON");
19188
+ var footprintLibraryResult = z150.object({
19189
+ footprintCircuitJson: z150.array(z150.any()),
19154
19190
  cadModel: cadModelProp.optional()
19155
19191
  });
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))
19192
+ var pathToCircuitJsonFn = z150.function().args(z150.string()).returns(z150.promise(footprintLibraryResult)).or(
19193
+ z150.function().args(
19194
+ z150.string(),
19195
+ z150.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
19196
+ ).returns(z150.promise(footprintLibraryResult))
19161
19197
  ).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(
19198
+ var footprintFileParserEntry = z150.object({
19199
+ loadFromUrl: z150.function().args(z150.string()).returns(z150.promise(footprintLibraryResult)).describe(
19164
19200
  "A function that takes a footprint file URL and returns Circuit JSON"
19165
19201
  )
19166
19202
  });
19167
- var spiceEngineSimulationResult = z149.object({
19168
- engineVersionString: z149.string().optional(),
19203
+ var spiceEngineSimulationResult = z150.object({
19204
+ engineVersionString: z150.string().optional(),
19169
19205
  simulationResultCircuitJson: unvalidatedCircuitJson
19170
19206
  });
19171
- var spiceEngineZod = z149.object({
19172
- simulate: z149.function().args(z149.string()).returns(z149.promise(spiceEngineSimulationResult)).describe(
19207
+ var spiceEngineZod = z150.object({
19208
+ simulate: z150.function().args(z150.string()).returns(z150.promise(spiceEngineSimulationResult)).describe(
19173
19209
  "A function that takes a SPICE string and returns a simulation result"
19174
19210
  )
19175
19211
  });
19176
- var defaultSpiceEngine = z149.custom(
19212
+ var defaultSpiceEngine = z150.custom(
19177
19213
  (value) => typeof value === "string"
19178
19214
  );
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")
19215
+ var autorouterInstance = z150.object({
19216
+ run: z150.function().args().returns(z150.promise(z150.unknown())).describe("Run the autorouter"),
19217
+ getOutputSimpleRouteJson: z150.function().args().returns(z150.promise(z150.any())).describe("Get the resulting SimpleRouteJson")
19182
19218
  });
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")
19219
+ var autorouterDefinition = z150.object({
19220
+ createAutorouter: z150.function().args(z150.any(), z150.any().optional()).returns(z150.union([autorouterInstance, z150.promise(autorouterInstance)])).describe("Create an autorouter instance")
19185
19221
  });
19186
- var platformFetch = z149.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
19187
- var localCacheEngine = z149.custom(
19222
+ var platformFetch = z150.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
19223
+ var localCacheEngine = z150.custom(
19188
19224
  (value) => typeof value === "object" && value !== null && "getItem" in value && typeof value.getItem === "function" && "setItem" in value && typeof value.setItem === "function"
19189
19225
  );
19190
- var platformConfig = z149.object({
19226
+ var platformConfig = z150.object({
19191
19227
  partsEngine: partsEngine.optional(),
19192
19228
  autorouter: autorouterProp.optional(),
19193
- autorouterMap: z149.record(z149.string(), autorouterDefinition).optional(),
19194
- allowLegacyAutorouters: z149.boolean().optional(),
19229
+ autorouterMap: z150.record(z150.string(), autorouterDefinition).optional(),
19230
+ allowLegacyAutorouters: z150.boolean().optional(),
19195
19231
  registryApiUrl: url.optional(),
19196
19232
  cloudAutorouterUrl: url.optional(),
19197
- projectName: z149.string().optional(),
19233
+ projectName: z150.string().optional(),
19198
19234
  projectBaseUrl: url.optional(),
19199
- version: z149.string().optional(),
19235
+ version: z150.string().optional(),
19200
19236
  url: url.optional(),
19201
- printBoardInformationToSilkscreen: z149.boolean().optional(),
19202
- includeBoardFiles: z149.array(z149.string()).describe(
19237
+ printBoardInformationToSilkscreen: z150.boolean().optional(),
19238
+ includeBoardFiles: z150.array(z150.string()).describe(
19203
19239
  'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
19204
19240
  ).optional(),
19205
- snapshotsDir: z149.string().describe(
19241
+ snapshotsDir: z150.string().describe(
19206
19242
  'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
19207
19243
  ).optional(),
19208
19244
  defaultSpiceEngine: defaultSpiceEngine.optional(),
19209
- unitPreference: z149.enum(["mm", "in", "mil"]).optional(),
19245
+ unitPreference: z150.enum(["mm", "in", "mil"]).optional(),
19210
19246
  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([
19247
+ enablePartOrientationAnalysis: z150.boolean().optional(),
19248
+ pcbPackSolverTimeoutMs: z150.number().finite().positive().optional(),
19249
+ pcbDisabled: z150.boolean().optional(),
19250
+ routingDisabled: z150.boolean().optional(),
19251
+ schematicDisabled: z150.boolean().optional(),
19252
+ partsEngineDisabled: z150.boolean().optional(),
19253
+ analogSimulationDisabled: z150.boolean().optional(),
19254
+ drcChecksDisabled: z150.boolean().optional(),
19255
+ netlistDrcChecksDisabled: z150.boolean().optional(),
19256
+ routingDrcChecksDisabled: z150.boolean().optional(),
19257
+ placementDrcChecksDisabled: z150.boolean().optional(),
19258
+ pinSpecificationDrcChecksDisabled: z150.boolean().optional(),
19259
+ spiceEngineMap: z150.record(z150.string(), spiceEngineZod).optional(),
19260
+ footprintLibraryMap: z150.record(
19261
+ z150.string(),
19262
+ z150.union([
19227
19263
  pathToCircuitJsonFn,
19228
- z149.record(
19229
- z149.string(),
19230
- z149.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
19264
+ z150.record(
19265
+ z150.string(),
19266
+ z150.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
19231
19267
  )
19232
19268
  ])
19233
19269
  ).optional(),
19234
- footprintFileParserMap: z149.record(z149.string(), footprintFileParserEntry).optional(),
19235
- resolveProjectStaticFileImportUrl: z149.function().args(z149.string()).returns(z149.promise(z149.string())).describe(
19270
+ footprintFileParserMap: z150.record(z150.string(), footprintFileParserEntry).optional(),
19271
+ resolveProjectStaticFileImportUrl: z150.function().args(z150.string()).returns(z150.promise(z150.string())).describe(
19236
19272
  "A function that returns a string URL for static files for the project"
19237
19273
  ).optional(),
19238
19274
  platformFetch: platformFetch.optional()
@@ -19279,6 +19315,7 @@ export {
19279
19315
  antennaShapes,
19280
19316
  assemblyDeviceProps,
19281
19317
  assemblyProps,
19318
+ assemblyScreenProps,
19282
19319
  autorouterConfig,
19283
19320
  autorouterEffortLevel,
19284
19321
  autorouterPreset,