@tscircuit/props 0.0.580 → 0.0.582

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
@@ -48,13 +48,25 @@ var commonShapeProps = z3.discriminatedUnion("shape", [
48
48
  ]);
49
49
  expectTypesMatch(true);
50
50
 
51
- // lib/enclosure/cutout-aperture.ts
51
+ // lib/assembly/device.ts
52
52
  import { z as z4 } from "zod";
53
+ var assemblyDeviceProps = z4.object({
54
+ name: z4.string().optional()
55
+ });
56
+ expectTypesMatch(true);
57
+
58
+ // lib/assembly/index.ts
59
+ var assemblyProps = {
60
+ device: assemblyDeviceProps
61
+ };
62
+
63
+ // lib/enclosure/cutout-aperture.ts
64
+ import { z as z5 } from "zod";
53
65
  var enclosureCutoutApertureShapes = ["pill", "rect", "circle"];
54
66
  var apertureOnlyProps = {
55
67
  margin: distance.optional()
56
68
  };
57
- var enclosureCutoutApertureProps = z4.discriminatedUnion("shape", [
69
+ var enclosureCutoutApertureProps = z5.discriminatedUnion("shape", [
58
70
  pillShapeProps.extend(apertureOnlyProps),
59
71
  rectShapeProps.extend(apertureOnlyProps),
60
72
  circleShapeProps.extend(apertureOnlyProps)
@@ -62,9 +74,9 @@ var enclosureCutoutApertureProps = z4.discriminatedUnion("shape", [
62
74
  expectTypesMatch(true);
63
75
 
64
76
  // lib/enclosure/fdm/box.ts
65
- import { z as z5 } from "zod";
66
- var enclosureFdmBoxProps = z5.object({
67
- boardRef: z5.string().min(1),
77
+ import { z as z6 } from "zod";
78
+ var enclosureFdmBoxProps = z6.object({
79
+ boardRef: z6.string().min(1),
68
80
  width: distance.optional(),
69
81
  height: distance.optional(),
70
82
  depth: distance.optional(),
@@ -81,8 +93,8 @@ var enclosureProps = {
81
93
  };
82
94
 
83
95
  // lib/common/portHints.ts
84
- import { z as z6 } from "zod";
85
- var portHints = z6.array(z6.string().or(z6.number()));
96
+ import { z as z7 } from "zod";
97
+ var portHints = z7.array(z7.string().or(z7.number()));
86
98
  expectTypesMatch(true);
87
99
 
88
100
  // lib/common/layout.ts
@@ -92,34 +104,34 @@ import {
92
104
  rotation as rotation2,
93
105
  supplier_name
94
106
  } from "circuit-json";
95
- import { z as z19 } from "zod";
107
+ import { z as z20 } from "zod";
96
108
 
97
109
  // lib/common/cadModel.ts
98
- import { z as z9 } from "zod";
110
+ import { z as z10 } from "zod";
99
111
 
100
112
  // lib/common/point3.ts
101
113
  import { distance as distance2 } from "circuit-json";
102
- import { z as z7 } from "zod";
103
- var point3 = z7.object({
114
+ import { z as z8 } from "zod";
115
+ var point3 = z8.object({
104
116
  x: distance2,
105
117
  y: distance2,
106
118
  z: distance2
107
119
  });
108
120
 
109
121
  // lib/common/url.ts
110
- import { z as z8 } from "zod";
111
- var url = z8.preprocess((value) => {
122
+ import { z as z9 } from "zod";
123
+ var url = z9.preprocess((value) => {
112
124
  if (value && typeof value === "object" && "default" in value) {
113
125
  return value.default;
114
126
  }
115
127
  return value;
116
- }, z8.string());
128
+ }, z9.string());
117
129
 
118
130
  // lib/common/cadModel.ts
119
- var rotationPoint3 = z9.object({
120
- x: z9.union([z9.number(), z9.string()]),
121
- y: z9.union([z9.number(), z9.string()]),
122
- z: z9.union([z9.number(), z9.string()])
131
+ var rotationPoint3 = z10.object({
132
+ x: z10.union([z10.number(), z10.string()]),
133
+ y: z10.union([z10.number(), z10.string()]),
134
+ z: z10.union([z10.number(), z10.string()])
123
135
  });
124
136
  var cadModelAxisDirections = [
125
137
  "x+",
@@ -129,17 +141,17 @@ var cadModelAxisDirections = [
129
141
  "z+",
130
142
  "z-"
131
143
  ];
132
- var cadModelAxisDirection = z9.enum(cadModelAxisDirections);
133
- var cadModelBase = z9.object({
134
- rotationOffset: z9.number().or(rotationPoint3).optional(),
144
+ var cadModelAxisDirection = z10.enum(cadModelAxisDirections);
145
+ var cadModelBase = z10.object({
146
+ rotationOffset: z10.number().or(rotationPoint3).optional(),
135
147
  positionOffset: point3.optional(),
136
148
  modelOriginPosition: point3.optional(),
137
149
  size: point3.optional(),
138
150
  modelUnitToMmScale: distance.optional(),
139
151
  modelBoardNormalDirection: cadModelAxisDirection.optional(),
140
- pcbRotationOffset: z9.number().optional(),
152
+ pcbRotationOffset: z10.number().optional(),
141
153
  zOffsetFromSurface: distance.optional(),
142
- showAsTranslucentModel: z9.boolean().optional(),
154
+ showAsTranslucentModel: z10.boolean().optional(),
143
155
  stepUrl: url.optional()
144
156
  });
145
157
  expectTypesMatch(true);
@@ -163,12 +175,12 @@ var cadModelWrl = cadModelBase.extend({
163
175
  wrlUrl: url
164
176
  });
165
177
  var cadModelJscad = cadModelBase.extend({
166
- jscad: z9.record(z9.any())
178
+ jscad: z10.record(z10.any())
167
179
  });
168
- var cadModelProp = z9.union([
169
- z9.null(),
180
+ var cadModelProp = z10.union([
181
+ z10.null(),
170
182
  url,
171
- z9.custom((v) => {
183
+ z10.custom((v) => {
172
184
  return v && typeof v === "object" && "type" in v && "props" in v;
173
185
  }),
174
186
  cadModelStl,
@@ -182,17 +194,17 @@ var cadModelProp = z9.union([
182
194
  expectTypesMatch(true);
183
195
 
184
196
  // lib/common/footprintProp.ts
185
- import { z as z10 } from "zod";
186
- var footprintProp = z10.custom((v) => true);
197
+ import { z as z11 } from "zod";
198
+ var footprintProp = z11.custom((v) => true);
187
199
 
188
200
  // lib/common/kicadFootprintMetadata.ts
189
201
  import { distance as distance4, rotation } from "circuit-json";
190
- import { z as z12 } from "zod";
202
+ import { z as z13 } from "zod";
191
203
 
192
204
  // lib/common/point.ts
193
205
  import { distance as distance3 } from "circuit-json";
194
- import { z as z11 } from "zod";
195
- var point = z11.object({
206
+ import { z as z12 } from "zod";
207
+ var point = z12.object({
196
208
  x: distance3,
197
209
  y: distance3
198
210
  });
@@ -202,25 +214,25 @@ var kicadAt = point.extend({
202
214
  rotation: rotation.optional()
203
215
  });
204
216
  expectTypesMatch(true);
205
- var kicadFont = z12.object({
217
+ var kicadFont = z13.object({
206
218
  size: point.optional(),
207
219
  thickness: distance4.optional()
208
220
  });
209
221
  expectTypesMatch(true);
210
- var kicadEffects = z12.object({
222
+ var kicadEffects = z13.object({
211
223
  font: kicadFont.optional()
212
224
  });
213
225
  expectTypesMatch(true);
214
- var kicadProperty = z12.object({
215
- value: z12.string(),
226
+ var kicadProperty = z13.object({
227
+ value: z13.string(),
216
228
  at: kicadAt.optional(),
217
- layer: z12.string().optional(),
218
- uuid: z12.string().optional(),
219
- hide: z12.boolean().optional(),
229
+ layer: z13.string().optional(),
230
+ uuid: z13.string().optional(),
231
+ hide: z13.boolean().optional(),
220
232
  effects: kicadEffects.optional()
221
233
  });
222
234
  expectTypesMatch(true);
223
- var kicadFootprintProperties = z12.object({
235
+ var kicadFootprintProperties = z13.object({
224
236
  Reference: kicadProperty.optional(),
225
237
  Value: kicadProperty.optional(),
226
238
  Datasheet: kicadProperty.optional(),
@@ -229,74 +241,74 @@ var kicadFootprintProperties = z12.object({
229
241
  expectTypesMatch(
230
242
  true
231
243
  );
232
- var kicadFootprintAttributes = z12.object({
233
- through_hole: z12.boolean().optional(),
234
- smd: z12.boolean().optional(),
235
- exclude_from_pos_files: z12.boolean().optional(),
236
- exclude_from_bom: z12.boolean().optional()
244
+ var kicadFootprintAttributes = z13.object({
245
+ through_hole: z13.boolean().optional(),
246
+ smd: z13.boolean().optional(),
247
+ exclude_from_pos_files: z13.boolean().optional(),
248
+ exclude_from_bom: z13.boolean().optional()
237
249
  });
238
250
  expectTypesMatch(
239
251
  true
240
252
  );
241
- var kicadFootprintPad = z12.object({
242
- name: z12.string(),
243
- type: z12.string(),
244
- shape: z12.string().optional(),
253
+ var kicadFootprintPad = z13.object({
254
+ name: z13.string(),
255
+ type: z13.string(),
256
+ shape: z13.string().optional(),
245
257
  at: kicadAt.optional(),
246
258
  size: point.optional(),
247
259
  drill: distance4.optional(),
248
- layers: z12.array(z12.string()).optional(),
249
- removeUnusedLayers: z12.boolean().optional(),
250
- uuid: z12.string().optional()
260
+ layers: z13.array(z13.string()).optional(),
261
+ removeUnusedLayers: z13.boolean().optional(),
262
+ uuid: z13.string().optional()
251
263
  });
252
264
  expectTypesMatch(true);
253
- var kicadFootprintModel = z12.object({
254
- path: z12.string(),
265
+ var kicadFootprintModel = z13.object({
266
+ path: z13.string(),
255
267
  offset: point3.optional(),
256
268
  scale: point3.optional(),
257
269
  rotate: point3.optional()
258
270
  });
259
271
  expectTypesMatch(true);
260
- var kicadFootprintMetadata = z12.object({
261
- footprintName: z12.string().optional(),
262
- version: z12.union([z12.number(), z12.string()]).optional(),
263
- generator: z12.string().optional(),
264
- generatorVersion: z12.union([z12.number(), z12.string()]).optional(),
265
- layer: z12.string().optional(),
272
+ var kicadFootprintMetadata = z13.object({
273
+ footprintName: z13.string().optional(),
274
+ version: z13.union([z13.number(), z13.string()]).optional(),
275
+ generator: z13.string().optional(),
276
+ generatorVersion: z13.union([z13.number(), z13.string()]).optional(),
277
+ layer: z13.string().optional(),
266
278
  properties: kicadFootprintProperties.optional(),
267
279
  attributes: kicadFootprintAttributes.optional(),
268
- pads: z12.array(kicadFootprintPad).optional(),
269
- embeddedFonts: z12.boolean().optional(),
280
+ pads: z13.array(kicadFootprintPad).optional(),
281
+ embeddedFonts: z13.boolean().optional(),
270
282
  model: kicadFootprintModel.optional()
271
283
  });
272
284
  expectTypesMatch(true);
273
285
 
274
286
  // lib/common/kicadSymbolMetadata.ts
275
287
  import { distance as distance5 } from "circuit-json";
276
- import { z as z13 } from "zod";
277
- var kicadSymbolPinNumbers = z13.object({
278
- hide: z13.boolean().optional()
288
+ import { z as z14 } from "zod";
289
+ var kicadSymbolPinNumbers = z14.object({
290
+ hide: z14.boolean().optional()
279
291
  });
280
292
  expectTypesMatch(true);
281
- var kicadSymbolPinNames = z13.object({
293
+ var kicadSymbolPinNames = z14.object({
282
294
  offset: distance5.optional(),
283
- hide: z13.boolean().optional()
295
+ hide: z14.boolean().optional()
284
296
  });
285
297
  expectTypesMatch(true);
286
- var kicadSymbolEffects = z13.object({
298
+ var kicadSymbolEffects = z14.object({
287
299
  font: kicadFont.optional(),
288
- justify: z13.union([z13.string(), z13.array(z13.string())]).optional(),
289
- hide: z13.boolean().optional()
300
+ justify: z14.union([z14.string(), z14.array(z14.string())]).optional(),
301
+ hide: z14.boolean().optional()
290
302
  });
291
303
  expectTypesMatch(true);
292
- var kicadSymbolProperty = z13.object({
293
- value: z13.string(),
294
- id: z13.union([z13.number(), z13.string()]).optional(),
304
+ var kicadSymbolProperty = z14.object({
305
+ value: z14.string(),
306
+ id: z14.union([z14.number(), z14.string()]).optional(),
295
307
  at: kicadAt.optional(),
296
308
  effects: kicadSymbolEffects.optional()
297
309
  });
298
310
  expectTypesMatch(true);
299
- var kicadSymbolProperties = z13.object({
311
+ var kicadSymbolProperties = z14.object({
300
312
  Reference: kicadSymbolProperty.optional(),
301
313
  Value: kicadSymbolProperty.optional(),
302
314
  Footprint: kicadSymbolProperty.optional(),
@@ -306,55 +318,55 @@ var kicadSymbolProperties = z13.object({
306
318
  ki_fp_filters: kicadSymbolProperty.optional()
307
319
  });
308
320
  expectTypesMatch(true);
309
- var kicadSymbolMetadata = z13.object({
310
- symbolName: z13.string().optional(),
311
- extends: z13.string().optional(),
321
+ var kicadSymbolMetadata = z14.object({
322
+ symbolName: z14.string().optional(),
323
+ extends: z14.string().optional(),
312
324
  pinNumbers: kicadSymbolPinNumbers.optional(),
313
325
  pinNames: kicadSymbolPinNames.optional(),
314
- excludeFromSim: z13.boolean().optional(),
315
- inBom: z13.boolean().optional(),
316
- onBoard: z13.boolean().optional(),
326
+ excludeFromSim: z14.boolean().optional(),
327
+ inBom: z14.boolean().optional(),
328
+ onBoard: z14.boolean().optional(),
317
329
  properties: kicadSymbolProperties.optional(),
318
- embeddedFonts: z13.boolean().optional()
330
+ embeddedFonts: z14.boolean().optional()
319
331
  });
320
332
  expectTypesMatch(true);
321
333
 
322
334
  // lib/common/pcbStyle.ts
323
335
  import { distance as distance6 } from "circuit-json";
324
- import { z as z14 } from "zod";
325
- var pcbStyle = z14.object({
336
+ import { z as z15 } from "zod";
337
+ var pcbStyle = z15.object({
326
338
  silkscreenFontSize: distance6.optional(),
327
339
  viaPadDiameter: distance6.optional(),
328
340
  viaHoleDiameter: distance6.optional(),
329
- silkscreenTextPosition: z14.union([
330
- z14.enum(["centered", "outside", "none"]),
331
- z14.object({
332
- offsetX: z14.number(),
333
- offsetY: z14.number()
341
+ silkscreenTextPosition: z15.union([
342
+ z15.enum(["centered", "outside", "none"]),
343
+ z15.object({
344
+ offsetX: z15.number(),
345
+ offsetY: z15.number()
334
346
  })
335
347
  ]).optional(),
336
- silkscreenTextVisibility: z14.enum(["hidden", "visible", "inherit"]).optional()
348
+ silkscreenTextVisibility: z15.enum(["hidden", "visible", "inherit"]).optional()
337
349
  });
338
350
  expectTypesMatch(true);
339
351
 
340
352
  // lib/common/pcbSx.ts
341
353
  import { length as length2 } from "circuit-json";
342
- import { z as z15 } from "zod";
343
- var pcbSxValue = z15.object({
354
+ import { z as z16 } from "zod";
355
+ var pcbSxValue = z16.object({
344
356
  fontSize: length2.optional(),
345
357
  pcbX: pcbCoordinate.optional(),
346
358
  pcbY: pcbCoordinate.optional(),
347
- visibility: z15.enum(["hidden", "visible", "inherit"]).optional()
359
+ visibility: z16.enum(["hidden", "visible", "inherit"]).optional()
348
360
  });
349
- var pcbSx = z15.record(
350
- z15.string(),
361
+ var pcbSx = z16.record(
362
+ z16.string(),
351
363
  pcbSxValue
352
364
  );
353
365
  expectTypesMatch(true);
354
366
 
355
367
  // lib/common/pinAttributeMap.ts
356
- import { z as z16 } from "zod";
357
- var pinCapability = z16.enum([
368
+ import { z as z17 } from "zod";
369
+ var pinCapability = z17.enum([
358
370
  "i2c_sda",
359
371
  "i2c_scl",
360
372
  "spi_cs",
@@ -364,51 +376,51 @@ var pinCapability = z16.enum([
364
376
  "uart_tx",
365
377
  "uart_rx"
366
378
  ]);
367
- var pinAttributeMap = z16.object({
368
- capabilities: z16.array(pinCapability).optional(),
369
- activeCapabilities: z16.array(pinCapability).optional(),
379
+ var pinAttributeMap = z17.object({
380
+ capabilities: z17.array(pinCapability).optional(),
381
+ activeCapabilities: z17.array(pinCapability).optional(),
370
382
  activeCapability: pinCapability.optional(),
371
- providesPower: z16.boolean().optional(),
372
- requiresPower: z16.boolean().optional(),
373
- providesGround: z16.boolean().optional(),
374
- requiresGround: z16.boolean().optional(),
375
- providesVoltage: z16.union([z16.string(), z16.number()]).optional(),
376
- requiresVoltage: z16.union([z16.string(), z16.number()]).optional(),
377
- doNotConnect: z16.boolean().optional(),
378
- includeInBoardPinout: z16.boolean().optional(),
379
- highlightColor: z16.string().optional(),
380
- mustBeConnected: z16.boolean().optional(),
381
- canUseInternalPullup: z16.boolean().optional(),
382
- isUsingInternalPullup: z16.boolean().optional(),
383
- needsExternalPullup: z16.boolean().optional(),
384
- canUseInternalPulldown: z16.boolean().optional(),
385
- isUsingInternalPulldown: z16.boolean().optional(),
386
- needsExternalPulldown: z16.boolean().optional(),
387
- canUseOpenDrain: z16.boolean().optional(),
388
- isUsingOpenDrain: z16.boolean().optional(),
389
- canUsePushPull: z16.boolean().optional(),
390
- isUsingPushPull: z16.boolean().optional(),
391
- shouldHaveDecouplingCapacitor: z16.boolean().optional(),
392
- recommendedDecouplingCapacitorCapacitance: z16.union([z16.string(), z16.number()]).optional(),
393
- isGpio: z16.boolean().optional()
383
+ providesPower: z17.boolean().optional(),
384
+ requiresPower: z17.boolean().optional(),
385
+ providesGround: z17.boolean().optional(),
386
+ requiresGround: z17.boolean().optional(),
387
+ providesVoltage: z17.union([z17.string(), z17.number()]).optional(),
388
+ requiresVoltage: z17.union([z17.string(), z17.number()]).optional(),
389
+ doNotConnect: z17.boolean().optional(),
390
+ includeInBoardPinout: z17.boolean().optional(),
391
+ highlightColor: z17.string().optional(),
392
+ mustBeConnected: z17.boolean().optional(),
393
+ canUseInternalPullup: z17.boolean().optional(),
394
+ isUsingInternalPullup: z17.boolean().optional(),
395
+ needsExternalPullup: z17.boolean().optional(),
396
+ canUseInternalPulldown: z17.boolean().optional(),
397
+ isUsingInternalPulldown: z17.boolean().optional(),
398
+ needsExternalPulldown: z17.boolean().optional(),
399
+ canUseOpenDrain: z17.boolean().optional(),
400
+ isUsingOpenDrain: z17.boolean().optional(),
401
+ canUsePushPull: z17.boolean().optional(),
402
+ isUsingPushPull: z17.boolean().optional(),
403
+ shouldHaveDecouplingCapacitor: z17.boolean().optional(),
404
+ recommendedDecouplingCapacitorCapacitance: z17.union([z17.string(), z17.number()]).optional(),
405
+ isGpio: z17.boolean().optional()
394
406
  });
395
407
  expectTypesMatch(true);
396
408
 
397
409
  // lib/common/schStyle.ts
398
410
  import { distance as distance7 } from "circuit-json";
399
- import { z as z17 } from "zod";
400
- var schStyle = z17.object({
401
- defaultPassiveSize: z17.union([z17.enum(["xs", "sm", "md"]), distance7]).optional(),
402
- defaultCapacitorOrientation: z17.enum(["vertical", "none"]).optional()
411
+ import { z as z18 } from "zod";
412
+ var schStyle = z18.object({
413
+ defaultPassiveSize: z18.union([z18.enum(["xs", "sm", "md"]), distance7]).optional(),
414
+ defaultCapacitorOrientation: z18.enum(["vertical", "none"]).optional()
403
415
  });
404
416
  expectTypesMatch(true);
405
417
 
406
418
  // lib/common/symbolProp.ts
407
- import { z as z18 } from "zod";
408
- var symbolProp = z18.custom((v) => true);
419
+ import { z as z19 } from "zod";
420
+ var symbolProp = z19.custom((v) => true);
409
421
 
410
422
  // lib/common/layout.ts
411
- var pcbLayoutProps = z19.object({
423
+ var pcbLayoutProps = z20.object({
412
424
  pcbX: pcbCoordinate.optional(),
413
425
  pcbY: pcbCoordinate.optional(),
414
426
  pcbLeftEdgeX: pcbCoordinate.optional(),
@@ -418,14 +430,14 @@ var pcbLayoutProps = z19.object({
418
430
  pcbOffsetX: distance8.optional(),
419
431
  pcbOffsetY: distance8.optional(),
420
432
  pcbRotation: rotation2.optional(),
421
- pcbPositionAnchor: z19.string().optional(),
422
- pcbPositionMode: z19.enum([
433
+ pcbPositionAnchor: z20.string().optional(),
434
+ pcbPositionMode: z20.enum([
423
435
  "relative_to_group_anchor",
424
436
  "auto",
425
437
  "relative_to_board_anchor",
426
438
  "relative_to_component_anchor"
427
439
  ]).optional(),
428
- shouldBeOnEdgeOfBoard: z19.boolean().optional(),
440
+ shouldBeOnEdgeOfBoard: z20.boolean().optional(),
429
441
  layer: layer_ref.optional(),
430
442
  pcbMarginTop: distance8.optional(),
431
443
  pcbMarginRight: distance8.optional(),
@@ -435,11 +447,11 @@ var pcbLayoutProps = z19.object({
435
447
  pcbMarginY: distance8.optional(),
436
448
  pcbStyle: pcbStyle.optional(),
437
449
  pcbSx: pcbSx.optional(),
438
- pcbRelative: z19.boolean().optional(),
439
- relative: z19.boolean().optional()
450
+ pcbRelative: z20.boolean().optional(),
451
+ relative: z20.boolean().optional()
440
452
  });
441
453
  expectTypesMatch(true);
442
- var commonLayoutProps = z19.object({
454
+ var commonLayoutProps = z20.object({
443
455
  pcbX: pcbCoordinate.optional(),
444
456
  pcbY: pcbCoordinate.optional(),
445
457
  pcbLeftEdgeX: pcbCoordinate.optional(),
@@ -449,14 +461,14 @@ var commonLayoutProps = z19.object({
449
461
  pcbOffsetX: distance8.optional(),
450
462
  pcbOffsetY: distance8.optional(),
451
463
  pcbRotation: rotation2.optional(),
452
- pcbPositionAnchor: z19.string().optional(),
453
- pcbPositionMode: z19.enum([
464
+ pcbPositionAnchor: z20.string().optional(),
465
+ pcbPositionMode: z20.enum([
454
466
  "relative_to_group_anchor",
455
467
  "auto",
456
468
  "relative_to_board_anchor",
457
469
  "relative_to_component_anchor"
458
470
  ]).optional(),
459
- shouldBeOnEdgeOfBoard: z19.boolean().optional(),
471
+ shouldBeOnEdgeOfBoard: z20.boolean().optional(),
460
472
  pcbMarginTop: distance8.optional(),
461
473
  pcbMarginRight: distance8.optional(),
462
474
  pcbMarginBottom: distance8.optional(),
@@ -478,44 +490,44 @@ var commonLayoutProps = z19.object({
478
490
  footprint: footprintProp.optional(),
479
491
  symbol: symbolProp.optional(),
480
492
  schStyle: schStyle.optional(),
481
- relative: z19.boolean().optional(),
482
- schRelative: z19.boolean().optional(),
483
- pcbRelative: z19.boolean().optional()
493
+ relative: z20.boolean().optional(),
494
+ schRelative: z20.boolean().optional(),
495
+ pcbRelative: z20.boolean().optional()
484
496
  });
485
497
  expectTypesMatch(true);
486
- var supplierProps = z19.object({
487
- supplierPartNumbers: z19.record(supplier_name, z19.array(z19.string())).optional()
498
+ var supplierProps = z20.object({
499
+ supplierPartNumbers: z20.record(supplier_name, z20.array(z20.string())).optional()
488
500
  });
489
501
  expectTypesMatch(true);
490
502
  var commonComponentProps = commonLayoutProps.merge(supplierProps).extend({
491
- key: z19.any().optional(),
492
- name: z19.string(),
493
- displayName: z19.string().optional(),
494
- schSectionName: z19.string().optional().describe(
503
+ key: z20.any().optional(),
504
+ name: z20.string(),
505
+ displayName: z20.string().optional(),
506
+ schSectionName: z20.string().optional().describe(
495
507
  'This component will be drawn as part of this section e.g. "Power"'
496
508
  ),
497
- schSheetName: z19.string().optional().describe(
509
+ schSheetName: z20.string().optional().describe(
498
510
  'This component will be drawn as part of this sheet e.g. "Main"'
499
511
  ),
500
512
  datasheetUrl: url.optional(),
501
513
  cadModel: cadModelProp.optional(),
502
514
  kicadFootprintMetadata: kicadFootprintMetadata.optional(),
503
515
  kicadSymbolMetadata: kicadSymbolMetadata.optional(),
504
- children: z19.any().optional(),
505
- symbolName: z19.string().optional(),
506
- doNotPlace: z19.boolean().optional(),
507
- allowOffBoard: z19.boolean().optional().describe(
516
+ children: z20.any().optional(),
517
+ symbolName: z20.string().optional(),
518
+ doNotPlace: z20.boolean().optional(),
519
+ allowOffBoard: z20.boolean().optional().describe(
508
520
  "Allows the PCB component to hang off the board (e.g. for USB ports or displays)"
509
521
  ),
510
- obstructsWithinBounds: z19.boolean().optional().describe(
522
+ obstructsWithinBounds: z20.boolean().optional().describe(
511
523
  "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"
512
524
  ),
513
- showAsTranslucentModel: z19.boolean().optional().describe(
525
+ showAsTranslucentModel: z20.boolean().optional().describe(
514
526
  "Whether to show this component's CAD model as translucent in the 3D viewer."
515
527
  ),
516
- pinAttributes: z19.record(z19.string(), pinAttributeMap).optional(),
517
- mfn: z19.string().describe("Manufacturer Part Number").optional(),
518
- manufacturerPartNumber: z19.string().optional()
528
+ pinAttributes: z20.record(z20.string(), pinAttributeMap).optional(),
529
+ mfn: z20.string().describe("Manufacturer Part Number").optional(),
530
+ manufacturerPartNumber: z20.string().optional()
519
531
  });
520
532
  expectTypesMatch(true);
521
533
  var componentProps = commonComponentProps;
@@ -530,7 +542,7 @@ var lrPolarPins = [
530
542
  "cathode",
531
543
  "neg"
532
544
  ];
533
- var distanceOrMultiplier = distance8.or(z19.enum(["2x", "3x", "4x"]));
545
+ var distanceOrMultiplier = distance8.or(z20.enum(["2x", "3x", "4x"]));
534
546
 
535
547
  // lib/generated/kicad-autocomplete.ts
536
548
  var kicadFootprintKeys = [
@@ -15996,8 +16008,8 @@ var footprinterStringExamples = [
15996
16008
  ];
15997
16009
 
15998
16010
  // lib/common/schematicOrientation.ts
15999
- import { z as z20 } from "zod";
16000
- var schematicOrientation = z20.enum([
16011
+ import { z as z21 } from "zod";
16012
+ var schematicOrientation = z21.enum([
16001
16013
  "vertical",
16002
16014
  "horizontal",
16003
16015
  "pos_top",
@@ -16016,32 +16028,32 @@ expectTypesMatch(
16016
16028
  );
16017
16029
 
16018
16030
  // lib/common/schematicPinDefinitions.ts
16019
- import { z as z21 } from "zod";
16020
- var explicitPinSideDefinition = z21.object({
16021
- pins: z21.array(z21.union([z21.number(), z21.string()])),
16022
- direction: z21.union([
16023
- z21.literal("top-to-bottom"),
16024
- z21.literal("left-to-right"),
16025
- z21.literal("bottom-to-top"),
16026
- z21.literal("right-to-left")
16031
+ import { z as z22 } from "zod";
16032
+ var explicitPinSideDefinition = z22.object({
16033
+ pins: z22.array(z22.union([z22.number(), z22.string()])),
16034
+ direction: z22.union([
16035
+ z22.literal("top-to-bottom"),
16036
+ z22.literal("left-to-right"),
16037
+ z22.literal("bottom-to-top"),
16038
+ z22.literal("right-to-left")
16027
16039
  ])
16028
16040
  });
16029
- var pinSideDefinitionInput = z21.array(z21.union([z21.number(), z21.string()]));
16030
- var pinSideDefinitionWithDefaultDirection = (direction2) => z21.union([explicitPinSideDefinition, pinSideDefinitionInput]).transform(
16041
+ var pinSideDefinitionInput = z22.array(z22.union([z22.number(), z22.string()]));
16042
+ var pinSideDefinitionWithDefaultDirection = (direction2) => z22.union([explicitPinSideDefinition, pinSideDefinitionInput]).transform(
16031
16043
  (value) => Array.isArray(value) ? {
16032
16044
  pins: value,
16033
16045
  direction: direction2
16034
16046
  } : value
16035
16047
  );
16036
- var schematicPortArrangement = z21.object({
16037
- leftSize: z21.number().optional().describe("@deprecated, use leftPinCount"),
16038
- topSize: z21.number().optional().describe("@deprecated, use topPinCount"),
16039
- rightSize: z21.number().optional().describe("@deprecated, use rightPinCount"),
16040
- bottomSize: z21.number().optional().describe("@deprecated, use bottomPinCount"),
16041
- leftPinCount: z21.number().optional(),
16042
- rightPinCount: z21.number().optional(),
16043
- topPinCount: z21.number().optional(),
16044
- bottomPinCount: z21.number().optional(),
16048
+ var schematicPortArrangement = z22.object({
16049
+ leftSize: z22.number().optional().describe("@deprecated, use leftPinCount"),
16050
+ topSize: z22.number().optional().describe("@deprecated, use topPinCount"),
16051
+ rightSize: z22.number().optional().describe("@deprecated, use rightPinCount"),
16052
+ bottomSize: z22.number().optional().describe("@deprecated, use bottomPinCount"),
16053
+ leftPinCount: z22.number().optional(),
16054
+ rightPinCount: z22.number().optional(),
16055
+ topPinCount: z22.number().optional(),
16056
+ bottomPinCount: z22.number().optional(),
16045
16057
  leftSide: pinSideDefinitionWithDefaultDirection("top-to-bottom").optional(),
16046
16058
  rightSide: pinSideDefinitionWithDefaultDirection("top-to-bottom").optional(),
16047
16059
  topSide: pinSideDefinitionWithDefaultDirection("left-to-right").optional(),
@@ -16052,9 +16064,9 @@ expectTypesMatch(true);
16052
16064
 
16053
16065
  // lib/common/schematicPinStyle.ts
16054
16066
  import { distance as distance9 } from "circuit-json";
16055
- import { z as z22 } from "zod";
16056
- var schematicPinStyle = z22.record(
16057
- z22.object({
16067
+ import { z as z23 } from "zod";
16068
+ var schematicPinStyle = z23.record(
16069
+ z23.object({
16058
16070
  marginLeft: distance9.optional(),
16059
16071
  marginRight: distance9.optional(),
16060
16072
  marginTop: distance9.optional(),
@@ -16068,17 +16080,17 @@ var schematicPinStyle = z22.record(
16068
16080
  expectTypesMatch(true);
16069
16081
 
16070
16082
  // lib/common/schematicPinLabel.ts
16071
- import { z as z23 } from "zod";
16072
- var schematicPinLabel = z23.string().regex(/^[A-Za-z0-9_]+$/);
16083
+ import { z as z24 } from "zod";
16084
+ var schematicPinLabel = z24.string().regex(/^[A-Za-z0-9_]+$/);
16073
16085
 
16074
16086
  // lib/common/schematicSize.ts
16075
16087
  import { distance as distance10 } from "circuit-json";
16076
- import { z as z24 } from "zod";
16077
- var schematicSymbolSize = distance10.or(z24.enum(["xs", "sm", "default", "md"])).describe("distance between pin1 and pin2 of the schematic symbol");
16088
+ import { z as z25 } from "zod";
16089
+ var schematicSymbolSize = distance10.or(z25.enum(["xs", "sm", "default", "md"])).describe("distance between pin1 and pin2 of the schematic symbol");
16078
16090
 
16079
16091
  // lib/common/kicadPinMetadata.ts
16080
- import { z as z25 } from "zod";
16081
- var kicadPinElectricalType = z25.enum([
16092
+ import { z as z26 } from "zod";
16093
+ var kicadPinElectricalType = z26.enum([
16082
16094
  "input",
16083
16095
  "output",
16084
16096
  "bidirectional",
@@ -16092,7 +16104,7 @@ var kicadPinElectricalType = z25.enum([
16092
16104
  "open_emitter",
16093
16105
  "no_connect"
16094
16106
  ]);
16095
- var kicadPinGraphicStyle = z25.enum([
16107
+ var kicadPinGraphicStyle = z26.enum([
16096
16108
  "line",
16097
16109
  "inverted",
16098
16110
  "clock",
@@ -16103,7 +16115,7 @@ var kicadPinGraphicStyle = z25.enum([
16103
16115
  "falling_edge_clock",
16104
16116
  "nonlogic"
16105
16117
  ]);
16106
- var kicadPinMetadata = z25.object({
16118
+ var kicadPinMetadata = z26.object({
16107
16119
  electricalType: kicadPinElectricalType.optional(),
16108
16120
  graphicStyle: kicadPinGraphicStyle.optional(),
16109
16121
  pinLength: distance.optional(),
@@ -16113,14 +16125,14 @@ var kicadPinMetadata = z25.object({
16113
16125
  expectTypesMatch(true);
16114
16126
 
16115
16127
  // lib/customDrc.ts
16116
- import { z as z26 } from "zod";
16117
- var customDrcCheckFn = z26.custom(
16128
+ import { z as z27 } from "zod";
16129
+ var customDrcCheckFn = z27.custom(
16118
16130
  (value) => typeof value === "function"
16119
16131
  );
16120
16132
 
16121
16133
  // lib/common/ninePointAnchor.ts
16122
- import { z as z27 } from "zod";
16123
- var ninePointAnchor = z27.enum([
16134
+ import { z as z28 } from "zod";
16135
+ var ninePointAnchor = z28.enum([
16124
16136
  "top_left",
16125
16137
  "top_center",
16126
16138
  "top_right",
@@ -16133,47 +16145,47 @@ var ninePointAnchor = z27.enum([
16133
16145
  ]);
16134
16146
 
16135
16147
  // lib/components/board.ts
16136
- import { z as z41 } from "zod";
16148
+ import { z as z42 } from "zod";
16137
16149
 
16138
16150
  // lib/components/group.ts
16139
16151
  import {
16140
16152
  length as length3,
16141
16153
  distance as distance11
16142
16154
  } from "circuit-json";
16143
- import { z as z40 } from "zod";
16155
+ import { z as z41 } from "zod";
16144
16156
 
16145
16157
  // lib/manual-edits/manual-edit-events/base_manual_edit_event.ts
16146
- import { z as z28 } from "zod";
16147
- var base_manual_edit_event = z28.object({
16148
- edit_event_id: z28.string(),
16149
- in_progress: z28.boolean().optional(),
16150
- created_at: z28.number()
16158
+ import { z as z29 } from "zod";
16159
+ var base_manual_edit_event = z29.object({
16160
+ edit_event_id: z29.string(),
16161
+ in_progress: z29.boolean().optional(),
16162
+ created_at: z29.number()
16151
16163
  });
16152
16164
  expectTypesMatch(
16153
16165
  true
16154
16166
  );
16155
16167
 
16156
16168
  // lib/manual-edits/manual-edit-events/edit_pcb_component_location_event.ts
16157
- import { z as z29 } from "zod";
16169
+ import { z as z30 } from "zod";
16158
16170
  var edit_pcb_component_location_event = base_manual_edit_event.extend({
16159
- pcb_edit_event_type: z29.literal("edit_component_location").describe("deprecated"),
16160
- edit_event_type: z29.literal("edit_pcb_component_location"),
16161
- pcb_component_id: z29.string(),
16162
- original_center: z29.object({ x: z29.number(), y: z29.number() }),
16163
- new_center: z29.object({ x: z29.number(), y: z29.number() })
16171
+ pcb_edit_event_type: z30.literal("edit_component_location").describe("deprecated"),
16172
+ edit_event_type: z30.literal("edit_pcb_component_location"),
16173
+ pcb_component_id: z30.string(),
16174
+ original_center: z30.object({ x: z30.number(), y: z30.number() }),
16175
+ new_center: z30.object({ x: z30.number(), y: z30.number() })
16164
16176
  });
16165
16177
  var edit_component_location_event = edit_pcb_component_location_event;
16166
16178
  expectTypesMatch(true);
16167
16179
 
16168
16180
  // lib/manual-edits/manual-edit-events/edit_trace_hint_event.ts
16169
- import { z as z30 } from "zod";
16181
+ import { z as z31 } from "zod";
16170
16182
  var edit_trace_hint_event = base_manual_edit_event.extend({
16171
- pcb_edit_event_type: z30.literal("edit_trace_hint").describe("deprecated"),
16172
- edit_event_type: z30.literal("edit_pcb_trace_hint").optional(),
16173
- pcb_port_id: z30.string(),
16174
- pcb_trace_hint_id: z30.string().optional(),
16175
- route: z30.array(
16176
- z30.object({ x: z30.number(), y: z30.number(), via: z30.boolean().optional() })
16183
+ pcb_edit_event_type: z31.literal("edit_trace_hint").describe("deprecated"),
16184
+ edit_event_type: z31.literal("edit_pcb_trace_hint").optional(),
16185
+ pcb_port_id: z31.string(),
16186
+ pcb_trace_hint_id: z31.string().optional(),
16187
+ route: z31.array(
16188
+ z31.object({ x: z31.number(), y: z31.number(), via: z31.boolean().optional() })
16177
16189
  )
16178
16190
  });
16179
16191
  expectTypesMatch(
@@ -16181,38 +16193,38 @@ expectTypesMatch(
16181
16193
  );
16182
16194
 
16183
16195
  // lib/manual-edits/manual-edit-events/edit_schematic_component_location_event.ts
16184
- import { z as z31 } from "zod";
16196
+ import { z as z32 } from "zod";
16185
16197
  var edit_schematic_component_location_event = base_manual_edit_event.extend({
16186
- edit_event_type: z31.literal("edit_schematic_component_location"),
16187
- schematic_component_id: z31.string(),
16188
- original_center: z31.object({ x: z31.number(), y: z31.number() }),
16189
- new_center: z31.object({ x: z31.number(), y: z31.number() })
16198
+ edit_event_type: z32.literal("edit_schematic_component_location"),
16199
+ schematic_component_id: z32.string(),
16200
+ original_center: z32.object({ x: z32.number(), y: z32.number() }),
16201
+ new_center: z32.object({ x: z32.number(), y: z32.number() })
16190
16202
  });
16191
16203
  expectTypesMatch(true);
16192
16204
 
16193
16205
  // lib/manual-edits/manual-edit-events/edit_pcb_group_location_event.ts
16194
- import { z as z32 } from "zod";
16206
+ import { z as z33 } from "zod";
16195
16207
  var edit_pcb_group_location_event = base_manual_edit_event.extend({
16196
- edit_event_type: z32.literal("edit_pcb_group_location"),
16197
- pcb_group_id: z32.string(),
16198
- original_center: z32.object({ x: z32.number(), y: z32.number() }),
16199
- new_center: z32.object({ x: z32.number(), y: z32.number() })
16208
+ edit_event_type: z33.literal("edit_pcb_group_location"),
16209
+ pcb_group_id: z33.string(),
16210
+ original_center: z33.object({ x: z33.number(), y: z33.number() }),
16211
+ new_center: z33.object({ x: z33.number(), y: z33.number() })
16200
16212
  });
16201
16213
  expectTypesMatch(true);
16202
16214
 
16203
16215
  // lib/manual-edits/manual-edit-events/edit_schematic_group_location_event.ts
16204
- import { z as z33 } from "zod";
16216
+ import { z as z34 } from "zod";
16205
16217
  var edit_schematic_group_location_event = base_manual_edit_event.extend({
16206
- edit_event_type: z33.literal("edit_schematic_group_location"),
16207
- schematic_group_id: z33.string(),
16208
- original_center: z33.object({ x: z33.number(), y: z33.number() }),
16209
- new_center: z33.object({ x: z33.number(), y: z33.number() })
16218
+ edit_event_type: z34.literal("edit_schematic_group_location"),
16219
+ schematic_group_id: z34.string(),
16220
+ original_center: z34.object({ x: z34.number(), y: z34.number() }),
16221
+ new_center: z34.object({ x: z34.number(), y: z34.number() })
16210
16222
  });
16211
16223
  expectTypesMatch(true);
16212
16224
 
16213
16225
  // lib/manual-edits/manual_edit_event.ts
16214
- import { z as z34 } from "zod";
16215
- var manual_edit_event = z34.union([
16226
+ import { z as z35 } from "zod";
16227
+ var manual_edit_event = z35.union([
16216
16228
  edit_pcb_component_location_event,
16217
16229
  edit_trace_hint_event,
16218
16230
  edit_schematic_component_location_event
@@ -16220,33 +16232,33 @@ var manual_edit_event = z34.union([
16220
16232
  expectTypesMatch(true);
16221
16233
 
16222
16234
  // lib/manual-edits/manual_edits_file.ts
16223
- import { z as z38 } from "zod";
16235
+ import { z as z39 } from "zod";
16224
16236
 
16225
16237
  // lib/manual-edits/manual_pcb_placement.ts
16226
- import { z as z35 } from "zod";
16238
+ import { z as z36 } from "zod";
16227
16239
  import { point as point2 } from "circuit-json";
16228
- var manual_pcb_placement = z35.object({
16229
- selector: z35.string(),
16230
- relative_to: z35.string().optional().default("group_center").describe("Can be a selector or 'group_center'"),
16240
+ var manual_pcb_placement = z36.object({
16241
+ selector: z36.string(),
16242
+ relative_to: z36.string().optional().default("group_center").describe("Can be a selector or 'group_center'"),
16231
16243
  center: point2
16232
16244
  });
16233
16245
  expectTypesMatch(true);
16234
16246
 
16235
16247
  // lib/manual-edits/manual_trace_hint.ts
16236
- import { z as z36 } from "zod";
16248
+ import { z as z37 } from "zod";
16237
16249
  import { route_hint_point } from "circuit-json";
16238
- var manual_trace_hint = z36.object({
16239
- pcb_port_selector: z36.string(),
16240
- offsets: z36.array(route_hint_point)
16250
+ var manual_trace_hint = z37.object({
16251
+ pcb_port_selector: z37.string(),
16252
+ offsets: z37.array(route_hint_point)
16241
16253
  });
16242
16254
  expectTypesMatch(true);
16243
16255
 
16244
16256
  // lib/manual-edits/manual_schematic_placement.ts
16245
- import { z as z37 } from "zod";
16257
+ import { z as z38 } from "zod";
16246
16258
  import { point as point4 } from "circuit-json";
16247
- var manual_schematic_placement = z37.object({
16248
- selector: z37.string(),
16249
- relative_to: z37.string().optional().default("group_center").describe("Can be a selector or 'group_center'"),
16259
+ var manual_schematic_placement = z38.object({
16260
+ selector: z38.string(),
16261
+ relative_to: z38.string().optional().default("group_center").describe("Can be a selector or 'group_center'"),
16250
16262
  center: point4
16251
16263
  });
16252
16264
  expectTypesMatch(
@@ -16254,37 +16266,37 @@ expectTypesMatch(
16254
16266
  );
16255
16267
 
16256
16268
  // lib/manual-edits/manual_edits_file.ts
16257
- var manual_edits_file = z38.object({
16258
- pcb_placements: z38.array(manual_pcb_placement).optional(),
16259
- manual_trace_hints: z38.array(manual_trace_hint).optional(),
16260
- schematic_placements: z38.array(manual_schematic_placement).optional()
16269
+ var manual_edits_file = z39.object({
16270
+ pcb_placements: z39.array(manual_pcb_placement).optional(),
16271
+ manual_trace_hints: z39.array(manual_trace_hint).optional(),
16272
+ schematic_placements: z39.array(manual_schematic_placement).optional()
16261
16273
  });
16262
16274
  expectTypesMatch(true);
16263
16275
 
16264
16276
  // lib/common/connectionsProp.ts
16265
- import { z as z39 } from "zod";
16266
- var connectionTarget = z39.string().or(z39.array(z39.string()).readonly()).or(z39.array(z39.string()));
16277
+ import { z as z40 } from "zod";
16278
+ var connectionTarget = z40.string().or(z40.array(z40.string()).readonly()).or(z40.array(z40.string()));
16267
16279
  var createConnectionsProp = (labels) => {
16268
- return z39.record(z39.enum(labels), connectionTarget);
16280
+ return z40.record(z40.enum(labels), connectionTarget);
16269
16281
  };
16270
16282
 
16271
16283
  // lib/components/group.ts
16272
- var layoutConfig = z40.object({
16273
- layoutMode: z40.enum(["grid", "flex", "match-adapt", "relative", "none"]).optional(),
16274
- position: z40.enum(["absolute", "relative"]).optional(),
16275
- grid: z40.boolean().optional(),
16276
- gridCols: z40.number().or(z40.string()).optional(),
16277
- gridRows: z40.number().or(z40.string()).optional(),
16278
- gridTemplateRows: z40.string().optional(),
16279
- gridTemplateColumns: z40.string().optional(),
16280
- gridTemplate: z40.string().optional(),
16281
- gridGap: z40.number().or(z40.string()).optional(),
16282
- gridRowGap: z40.number().or(z40.string()).optional(),
16283
- gridColumnGap: z40.number().or(z40.string()).optional(),
16284
- flex: z40.boolean().or(z40.string()).optional(),
16285
- flexDirection: z40.enum(["row", "column"]).optional(),
16286
- alignItems: z40.enum(["start", "center", "end", "stretch"]).optional(),
16287
- justifyContent: z40.enum([
16284
+ var layoutConfig = z41.object({
16285
+ layoutMode: z41.enum(["grid", "flex", "match-adapt", "relative", "none"]).optional(),
16286
+ position: z41.enum(["absolute", "relative"]).optional(),
16287
+ grid: z41.boolean().optional(),
16288
+ gridCols: z41.number().or(z41.string()).optional(),
16289
+ gridRows: z41.number().or(z41.string()).optional(),
16290
+ gridTemplateRows: z41.string().optional(),
16291
+ gridTemplateColumns: z41.string().optional(),
16292
+ gridTemplate: z41.string().optional(),
16293
+ gridGap: z41.number().or(z41.string()).optional(),
16294
+ gridRowGap: z41.number().or(z41.string()).optional(),
16295
+ gridColumnGap: z41.number().or(z41.string()).optional(),
16296
+ flex: z41.boolean().or(z41.string()).optional(),
16297
+ flexDirection: z41.enum(["row", "column"]).optional(),
16298
+ alignItems: z41.enum(["start", "center", "end", "stretch"]).optional(),
16299
+ justifyContent: z41.enum([
16288
16300
  "start",
16289
16301
  "center",
16290
16302
  "end",
@@ -16293,16 +16305,16 @@ var layoutConfig = z40.object({
16293
16305
  "space-around",
16294
16306
  "space-evenly"
16295
16307
  ]).optional(),
16296
- flexRow: z40.boolean().optional(),
16297
- flexColumn: z40.boolean().optional(),
16298
- gap: z40.number().or(z40.string()).optional(),
16299
- pack: z40.boolean().optional().describe("Pack the contents of this group using a packing strategy"),
16300
- packOrderStrategy: z40.enum([
16308
+ flexRow: z41.boolean().optional(),
16309
+ flexColumn: z41.boolean().optional(),
16310
+ gap: z41.number().or(z41.string()).optional(),
16311
+ pack: z41.boolean().optional().describe("Pack the contents of this group using a packing strategy"),
16312
+ packOrderStrategy: z41.enum([
16301
16313
  "largest_to_smallest",
16302
16314
  "first_to_last",
16303
16315
  "highest_to_lowest_pin_count"
16304
16316
  ]).optional(),
16305
- packPlacementStrategy: z40.enum(["shortest_connection_along_outline"]).optional(),
16317
+ packPlacementStrategy: z41.enum(["shortest_connection_along_outline"]).optional(),
16306
16318
  padding: length3.optional(),
16307
16319
  paddingLeft: length3.optional(),
16308
16320
  paddingRight: length3.optional(),
@@ -16312,17 +16324,17 @@ var layoutConfig = z40.object({
16312
16324
  paddingY: length3.optional(),
16313
16325
  width: length3.optional(),
16314
16326
  height: length3.optional(),
16315
- matchAdapt: z40.boolean().optional(),
16316
- matchAdaptTemplate: z40.any().optional()
16327
+ matchAdapt: z41.boolean().optional(),
16328
+ matchAdaptTemplate: z41.any().optional()
16317
16329
  });
16318
16330
  expectTypesMatch(true);
16319
- var border = z40.object({
16331
+ var border = z41.object({
16320
16332
  strokeWidth: length3.optional(),
16321
- dashed: z40.boolean().optional(),
16322
- solid: z40.boolean().optional()
16333
+ dashed: z41.boolean().optional(),
16334
+ solid: z41.boolean().optional()
16323
16335
  });
16324
- var pcbAnchorAlignmentAutocomplete = z40.custom((value) => typeof value === "string");
16325
- var routingTolerances = z40.object({
16336
+ var pcbAnchorAlignmentAutocomplete = z41.custom((value) => typeof value === "string");
16337
+ var routingTolerances = z41.object({
16326
16338
  minTraceWidth: length3.optional(),
16327
16339
  minViaHoleEdgeToViaHoleEdgeClearance: length3.optional(),
16328
16340
  minViaEdgeToPadEdgeClearance: length3.optional(),
@@ -16333,19 +16345,19 @@ var routingTolerances = z40.object({
16333
16345
  minViaHoleDiameter: length3.optional(),
16334
16346
  minViaPadDiameter: length3.optional()
16335
16347
  });
16336
- var autorouterConfig = z40.object({
16348
+ var autorouterConfig = z41.object({
16337
16349
  serverUrl: url.optional(),
16338
- inputFormat: z40.enum(["simplified", "circuit-json"]).optional(),
16339
- serverMode: z40.enum(["job", "solve-endpoint"]).optional(),
16340
- serverCacheEnabled: z40.boolean().optional(),
16341
- cache: z40.custom((v) => true).optional(),
16350
+ inputFormat: z41.enum(["simplified", "circuit-json"]).optional(),
16351
+ serverMode: z41.enum(["job", "solve-endpoint"]).optional(),
16352
+ serverCacheEnabled: z41.boolean().optional(),
16353
+ cache: z41.custom((v) => true).optional(),
16342
16354
  traceClearance: length3.optional(),
16343
- availableJumperTypes: z40.array(z40.enum(["1206x4", "0603"])).optional(),
16344
- groupMode: z40.enum(["sequential_trace", "subcircuit", "sequential-trace"]).optional(),
16345
- algorithmFn: z40.custom(
16355
+ availableJumperTypes: z41.array(z41.enum(["1206x4", "0603"])).optional(),
16356
+ groupMode: z41.enum(["sequential_trace", "subcircuit", "sequential-trace"]).optional(),
16357
+ algorithmFn: z41.custom(
16346
16358
  (v) => typeof v === "function" || v === void 0
16347
16359
  ).optional(),
16348
- preset: z40.enum([
16360
+ preset: z41.enum([
16349
16361
  "sequential_trace",
16350
16362
  "subcircuit",
16351
16363
  "default",
@@ -16362,61 +16374,61 @@ var autorouterConfig = z40.object({
16362
16374
  "auto-local",
16363
16375
  "auto-cloud"
16364
16376
  ]).optional(),
16365
- local: z40.boolean().optional()
16377
+ local: z41.boolean().optional()
16366
16378
  });
16367
- var autorouterPreset = z40.union([
16368
- z40.literal("sequential_trace"),
16369
- z40.literal("subcircuit"),
16370
- z40.literal("default"),
16371
- z40.literal("auto"),
16372
- z40.literal("auto_local"),
16373
- z40.literal("auto_cloud"),
16374
- z40.literal("auto_jumper"),
16375
- z40.literal("tscircuit_beta"),
16376
- z40.literal("krt"),
16377
- z40.literal("freerouting"),
16378
- z40.literal("laser_prefab"),
16379
+ var autorouterPreset = z41.union([
16380
+ z41.literal("sequential_trace"),
16381
+ z41.literal("subcircuit"),
16382
+ z41.literal("default"),
16383
+ z41.literal("auto"),
16384
+ z41.literal("auto_local"),
16385
+ z41.literal("auto_cloud"),
16386
+ z41.literal("auto_jumper"),
16387
+ z41.literal("tscircuit_beta"),
16388
+ z41.literal("krt"),
16389
+ z41.literal("freerouting"),
16390
+ z41.literal("laser_prefab"),
16379
16391
  // Prefabricated PCB with laser copper ablation
16380
- z40.literal("auto-jumper"),
16381
- z40.literal("sequential-trace"),
16382
- z40.literal("auto-local"),
16383
- z40.literal("auto-cloud")
16392
+ z41.literal("auto-jumper"),
16393
+ z41.literal("sequential-trace"),
16394
+ z41.literal("auto-local"),
16395
+ z41.literal("auto-cloud")
16384
16396
  ]);
16385
- var autorouterString = z40.string();
16386
- var autorouterProp = z40.union([
16397
+ var autorouterString = z41.string();
16398
+ var autorouterProp = z41.union([
16387
16399
  autorouterConfig,
16388
16400
  autorouterPreset,
16389
16401
  autorouterString
16390
16402
  ]);
16391
- var autorouterEffortLevel = z40.enum(["1x", "2x", "5x", "10x", "100x"]);
16403
+ var autorouterEffortLevel = z41.enum(["1x", "2x", "5x", "10x", "100x"]);
16392
16404
  var baseGroupProps = commonLayoutProps.extend({
16393
- name: z40.string().optional(),
16394
- children: z40.any().optional(),
16395
- schTitle: z40.string().optional(),
16396
- schSheetName: z40.string().optional().describe('This group will be drawn as part of this sheet e.g. "Main"'),
16397
- key: z40.any().optional(),
16398
- showAsSchematicBox: z40.boolean().optional(),
16399
- connections: z40.record(z40.string(), connectionTarget.optional()).optional(),
16405
+ name: z41.string().optional(),
16406
+ children: z41.any().optional(),
16407
+ schTitle: z41.string().optional(),
16408
+ schSheetName: z41.string().optional().describe('This group will be drawn as part of this sheet e.g. "Main"'),
16409
+ key: z41.any().optional(),
16410
+ showAsSchematicBox: z41.boolean().optional(),
16411
+ connections: z41.record(z41.string(), connectionTarget.optional()).optional(),
16400
16412
  schPinArrangement: schematicPinArrangement.optional(),
16401
16413
  schPinSpacing: length3.optional(),
16402
16414
  schPinStyle: schematicPinStyle.optional(),
16403
16415
  ...layoutConfig.shape,
16404
16416
  grid: layoutConfig.shape.grid.describe("@deprecated use pcbGrid"),
16405
16417
  flex: layoutConfig.shape.flex.describe("@deprecated use pcbFlex"),
16406
- pcbGrid: z40.boolean().optional(),
16407
- pcbGridCols: z40.number().or(z40.string()).optional(),
16408
- pcbGridRows: z40.number().or(z40.string()).optional(),
16409
- pcbGridTemplateRows: z40.string().optional(),
16410
- pcbGridTemplateColumns: z40.string().optional(),
16411
- pcbGridTemplate: z40.string().optional(),
16412
- pcbGridGap: z40.number().or(z40.string()).optional(),
16413
- pcbGridRowGap: z40.number().or(z40.string()).optional(),
16414
- pcbGridColumnGap: z40.number().or(z40.string()).optional(),
16415
- pcbFlex: z40.boolean().or(z40.string()).optional(),
16416
- pcbFlexGap: z40.number().or(z40.string()).optional(),
16417
- pcbFlexDirection: z40.enum(["row", "column"]).optional(),
16418
- pcbAlignItems: z40.enum(["start", "center", "end", "stretch"]).optional(),
16419
- pcbJustifyContent: z40.enum([
16418
+ pcbGrid: z41.boolean().optional(),
16419
+ pcbGridCols: z41.number().or(z41.string()).optional(),
16420
+ pcbGridRows: z41.number().or(z41.string()).optional(),
16421
+ pcbGridTemplateRows: z41.string().optional(),
16422
+ pcbGridTemplateColumns: z41.string().optional(),
16423
+ pcbGridTemplate: z41.string().optional(),
16424
+ pcbGridGap: z41.number().or(z41.string()).optional(),
16425
+ pcbGridRowGap: z41.number().or(z41.string()).optional(),
16426
+ pcbGridColumnGap: z41.number().or(z41.string()).optional(),
16427
+ pcbFlex: z41.boolean().or(z41.string()).optional(),
16428
+ pcbFlexGap: z41.number().or(z41.string()).optional(),
16429
+ pcbFlexDirection: z41.enum(["row", "column"]).optional(),
16430
+ pcbAlignItems: z41.enum(["start", "center", "end", "stretch"]).optional(),
16431
+ pcbJustifyContent: z41.enum([
16420
16432
  "start",
16421
16433
  "center",
16422
16434
  "end",
@@ -16425,25 +16437,25 @@ var baseGroupProps = commonLayoutProps.extend({
16425
16437
  "space-around",
16426
16438
  "space-evenly"
16427
16439
  ]).optional(),
16428
- pcbFlexRow: z40.boolean().optional(),
16429
- pcbFlexColumn: z40.boolean().optional(),
16430
- pcbGap: z40.number().or(z40.string()).optional(),
16431
- pcbPack: z40.boolean().optional(),
16432
- pcbPackGap: z40.number().or(z40.string()).optional(),
16433
- schGrid: z40.boolean().optional(),
16434
- schGridCols: z40.number().or(z40.string()).optional(),
16435
- schGridRows: z40.number().or(z40.string()).optional(),
16436
- schGridTemplateRows: z40.string().optional(),
16437
- schGridTemplateColumns: z40.string().optional(),
16438
- schGridTemplate: z40.string().optional(),
16439
- schGridGap: z40.number().or(z40.string()).optional(),
16440
- schGridRowGap: z40.number().or(z40.string()).optional(),
16441
- schGridColumnGap: z40.number().or(z40.string()).optional(),
16442
- schFlex: z40.boolean().or(z40.string()).optional(),
16443
- schFlexGap: z40.number().or(z40.string()).optional(),
16444
- schFlexDirection: z40.enum(["row", "column"]).optional(),
16445
- schAlignItems: z40.enum(["start", "center", "end", "stretch"]).optional(),
16446
- schJustifyContent: z40.enum([
16440
+ pcbFlexRow: z41.boolean().optional(),
16441
+ pcbFlexColumn: z41.boolean().optional(),
16442
+ pcbGap: z41.number().or(z41.string()).optional(),
16443
+ pcbPack: z41.boolean().optional(),
16444
+ pcbPackGap: z41.number().or(z41.string()).optional(),
16445
+ schGrid: z41.boolean().optional(),
16446
+ schGridCols: z41.number().or(z41.string()).optional(),
16447
+ schGridRows: z41.number().or(z41.string()).optional(),
16448
+ schGridTemplateRows: z41.string().optional(),
16449
+ schGridTemplateColumns: z41.string().optional(),
16450
+ schGridTemplate: z41.string().optional(),
16451
+ schGridGap: z41.number().or(z41.string()).optional(),
16452
+ schGridRowGap: z41.number().or(z41.string()).optional(),
16453
+ schGridColumnGap: z41.number().or(z41.string()).optional(),
16454
+ schFlex: z41.boolean().or(z41.string()).optional(),
16455
+ schFlexGap: z41.number().or(z41.string()).optional(),
16456
+ schFlexDirection: z41.enum(["row", "column"]).optional(),
16457
+ schAlignItems: z41.enum(["start", "center", "end", "stretch"]).optional(),
16458
+ schJustifyContent: z41.enum([
16447
16459
  "start",
16448
16460
  "center",
16449
16461
  "end",
@@ -16452,11 +16464,11 @@ var baseGroupProps = commonLayoutProps.extend({
16452
16464
  "space-around",
16453
16465
  "space-evenly"
16454
16466
  ]).optional(),
16455
- schFlexRow: z40.boolean().optional(),
16456
- schFlexColumn: z40.boolean().optional(),
16457
- schGap: z40.number().or(z40.string()).optional(),
16458
- schPack: z40.boolean().optional(),
16459
- schMatchAdapt: z40.boolean().optional(),
16467
+ schFlexRow: z41.boolean().optional(),
16468
+ schFlexColumn: z41.boolean().optional(),
16469
+ schGap: z41.number().or(z41.string()).optional(),
16470
+ schPack: z41.boolean().optional(),
16471
+ schMatchAdapt: z41.boolean().optional(),
16460
16472
  pcbWidth: length3.optional(),
16461
16473
  pcbHeight: length3.optional(),
16462
16474
  minTraceWidth: length3.optional(),
@@ -16479,40 +16491,40 @@ var baseGroupProps = commonLayoutProps.extend({
16479
16491
  pcbPaddingBottom: length3.optional(),
16480
16492
  pcbAnchorAlignment: pcbAnchorAlignmentAutocomplete.optional()
16481
16493
  });
16482
- var partsEngine = z40.custom((v) => "findPart" in v);
16494
+ var partsEngine = z41.custom((v) => "findPart" in v);
16483
16495
  var subcircuitGroupProps = baseGroupProps.extend({
16484
16496
  manualEdits: manual_edits_file.optional(),
16485
- schAutoLayoutEnabled: z40.boolean().optional(),
16486
- schTraceAutoLabelEnabled: z40.boolean().optional(),
16497
+ schAutoLayoutEnabled: z41.boolean().optional(),
16498
+ schTraceAutoLabelEnabled: z41.boolean().optional(),
16487
16499
  schMaxTraceDistance: distance11.optional(),
16488
- routingDisabled: z40.boolean().optional(),
16489
- bomDisabled: z40.boolean().optional(),
16500
+ routingDisabled: z41.boolean().optional(),
16501
+ bomDisabled: z41.boolean().optional(),
16490
16502
  defaultTraceWidth: length3.optional(),
16491
16503
  ...routingTolerances.shape,
16492
16504
  nominalTraceWidth: length3.optional(),
16493
16505
  partsEngine: partsEngine.optional(),
16494
- _subcircuitCachingEnabled: z40.boolean().optional(),
16495
- pcbRouteCache: z40.custom((v) => true).optional(),
16506
+ _subcircuitCachingEnabled: z41.boolean().optional(),
16507
+ pcbRouteCache: z41.custom((v) => true).optional(),
16496
16508
  autorouter: autorouterProp.optional(),
16497
16509
  autorouterEffortLevel: autorouterEffortLevel.optional(),
16498
- autorouterVersion: z40.enum(["v1", "v2", "v3", "v4", "v5", "v6", "latest"]).optional(),
16499
- square: z40.boolean().optional(),
16500
- emptyArea: z40.string().optional(),
16501
- filledArea: z40.string().optional(),
16510
+ autorouterVersion: z41.enum(["v1", "v2", "v3", "v4", "v5", "v6", "latest"]).optional(),
16511
+ square: z41.boolean().optional(),
16512
+ emptyArea: z41.string().optional(),
16513
+ filledArea: z41.string().optional(),
16502
16514
  width: distance11.optional(),
16503
16515
  height: distance11.optional(),
16504
- outline: z40.array(point).optional(),
16516
+ outline: z41.array(point).optional(),
16505
16517
  outlineOffsetX: distance11.optional(),
16506
16518
  outlineOffsetY: distance11.optional(),
16507
- circuitJson: z40.array(z40.any()).optional(),
16508
- exposedNets: z40.array(z40.string()).optional(),
16509
- exposeNets: z40.boolean().optional()
16519
+ circuitJson: z41.array(z41.any()).optional(),
16520
+ exposedNets: z41.array(z41.string()).optional(),
16521
+ exposeNets: z41.boolean().optional()
16510
16522
  });
16511
16523
  var subcircuitGroupPropsWithBool = subcircuitGroupProps.extend({
16512
- subcircuit: z40.literal(true)
16524
+ subcircuit: z41.literal(true)
16513
16525
  });
16514
- var groupProps = z40.discriminatedUnion("subcircuit", [
16515
- baseGroupProps.extend({ subcircuit: z40.literal(false).optional() }),
16526
+ var groupProps = z41.discriminatedUnion("subcircuit", [
16527
+ baseGroupProps.extend({ subcircuit: z41.literal(false).optional() }),
16516
16528
  subcircuitGroupPropsWithBool
16517
16529
  ]);
16518
16530
  expectTypesMatch(true);
@@ -16522,35 +16534,35 @@ expectTypesMatch(true);
16522
16534
  expectTypesMatch(true);
16523
16535
 
16524
16536
  // lib/components/board.ts
16525
- var boardColor = z41.custom((value) => typeof value === "string");
16537
+ var boardColor = z42.custom((value) => typeof value === "string");
16526
16538
  var boardProps = subcircuitGroupProps.omit({ connections: true }).extend({
16527
- material: z41.enum(["fr4", "fr1", "flex"]).default("fr4"),
16528
- layers: z41.union([
16529
- z41.literal(1),
16530
- z41.literal(2),
16531
- z41.literal(4),
16532
- z41.literal(6),
16533
- z41.literal(8)
16539
+ material: z42.enum(["fr4", "fr1", "flex"]).default("fr4"),
16540
+ layers: z42.union([
16541
+ z42.literal(1),
16542
+ z42.literal(2),
16543
+ z42.literal(4),
16544
+ z42.literal(6),
16545
+ z42.literal(8)
16534
16546
  ]).default(2),
16535
16547
  borderRadius: distance.optional(),
16536
16548
  thickness: distance.optional(),
16537
16549
  boardAnchorPosition: point.optional(),
16538
16550
  anchorAlignment: ninePointAnchor.optional(),
16539
16551
  boardAnchorAlignment: ninePointAnchor.optional().describe("Prefer using anchorAlignment when possible"),
16540
- title: z41.string().optional(),
16552
+ title: z42.string().optional(),
16541
16553
  solderMaskColor: boardColor.optional(),
16542
16554
  topSolderMaskColor: boardColor.optional(),
16543
16555
  bottomSolderMaskColor: boardColor.optional(),
16544
16556
  silkscreenColor: boardColor.optional(),
16545
16557
  topSilkscreenColor: boardColor.optional(),
16546
16558
  bottomSilkscreenColor: boardColor.optional(),
16547
- doubleSidedAssembly: z41.boolean().optional().default(false),
16548
- schematicDisabled: z41.boolean().optional()
16559
+ doubleSidedAssembly: z42.boolean().optional().default(false),
16560
+ schematicDisabled: z42.boolean().optional()
16549
16561
  });
16550
16562
  expectTypesMatch(true);
16551
16563
 
16552
16564
  // lib/components/panel.ts
16553
- import { z as z42 } from "zod";
16565
+ import { z as z43 } from "zod";
16554
16566
  var panelProps = baseGroupProps.omit({
16555
16567
  width: true,
16556
16568
  height: true,
@@ -16559,25 +16571,25 @@ var panelProps = baseGroupProps.omit({
16559
16571
  }).extend({
16560
16572
  width: distance.optional(),
16561
16573
  height: distance.optional(),
16562
- children: z42.any().optional(),
16574
+ children: z43.any().optional(),
16563
16575
  anchorAlignment: ninePointAnchor.optional(),
16564
- noSolderMask: z42.boolean().optional(),
16565
- panelizationMethod: z42.enum(["tab-routing", "none"]).optional(),
16576
+ noSolderMask: z43.boolean().optional(),
16577
+ panelizationMethod: z43.enum(["tab-routing", "none"]).optional(),
16566
16578
  boardGap: distance.optional(),
16567
- layoutMode: z42.enum(["grid", "pack", "none"]).optional(),
16568
- row: z42.number().optional(),
16569
- col: z42.number().optional(),
16579
+ layoutMode: z43.enum(["grid", "pack", "none"]).optional(),
16580
+ row: z43.number().optional(),
16581
+ col: z43.number().optional(),
16570
16582
  cellWidth: distance.optional(),
16571
16583
  cellHeight: distance.optional(),
16572
16584
  tabWidth: distance.optional(),
16573
16585
  tabLength: distance.optional(),
16574
- mouseBites: z42.boolean().optional(),
16586
+ mouseBites: z43.boolean().optional(),
16575
16587
  edgePadding: distance.optional(),
16576
16588
  edgePaddingLeft: distance.optional(),
16577
16589
  edgePaddingRight: distance.optional(),
16578
16590
  edgePaddingTop: distance.optional(),
16579
16591
  edgePaddingBottom: distance.optional(),
16580
- _subcircuitCachingEnabled: z42.boolean().optional()
16592
+ _subcircuitCachingEnabled: z43.boolean().optional()
16581
16593
  });
16582
16594
  expectTypesMatch(true);
16583
16595
 
@@ -16600,40 +16612,45 @@ expectTypesMatch(true);
16600
16612
 
16601
16613
  // lib/components/chip.ts
16602
16614
  import { distance as distance13, supplier_name as supplier_name2 } from "circuit-json";
16603
- import { z as z45 } from "zod";
16604
- var connectionTarget2 = z45.string().or(z45.array(z45.string()).readonly()).or(z45.array(z45.string()));
16605
- var noConnectProp = z45.array(schematicPinLabel).readonly().or(z45.array(schematicPinLabel));
16606
- var connectionsProp = z45.custom().pipe(z45.record(z45.string(), connectionTarget2));
16607
- var spicemodelElement = z45.custom(
16615
+ import { isValidElement } from "react";
16616
+ import { z as z46 } from "zod";
16617
+ var connectionTarget2 = z46.string().or(z46.array(z46.string()).readonly()).or(z46.array(z46.string()));
16618
+ var noConnectProp = z46.array(schematicPinLabel).readonly().or(z46.array(schematicPinLabel));
16619
+ var connectionsProp = z46.custom().pipe(z46.record(z46.string(), connectionTarget2));
16620
+ var spicemodelElement = z46.custom(
16608
16621
  (v) => !!v && typeof v === "object" && "type" in v && "props" in v
16609
16622
  );
16610
- var pinLabelsProp = z45.record(
16623
+ var internalCircuitElement = z46.custom(
16624
+ (value) => isValidElement(value) && value.type === "internalcircuit"
16625
+ );
16626
+ var pinLabelsProp = z46.record(
16611
16627
  schematicPinLabel,
16612
- schematicPinLabel.or(z45.array(schematicPinLabel).readonly()).or(z45.array(schematicPinLabel))
16628
+ schematicPinLabel.or(z46.array(schematicPinLabel).readonly()).or(z46.array(schematicPinLabel))
16613
16629
  );
16614
16630
  expectTypesMatch(true);
16615
- var pinCompatibleVariant = z45.object({
16616
- manufacturerPartNumber: z45.string().optional(),
16617
- supplierPartNumber: z45.record(supplier_name2, z45.array(z45.string())).optional()
16631
+ var pinCompatibleVariant = z46.object({
16632
+ manufacturerPartNumber: z46.string().optional(),
16633
+ supplierPartNumber: z46.record(supplier_name2, z46.array(z46.string())).optional()
16618
16634
  });
16619
16635
  var chipProps = commonComponentProps.extend({
16620
- manufacturerPartNumber: z45.string().optional(),
16636
+ manufacturerPartNumber: z46.string().optional(),
16621
16637
  pinLabels: pinLabelsProp.optional(),
16622
- showPinAliases: z45.boolean().optional(),
16623
- pcbPinLabels: z45.record(z45.string(), z45.string()).optional(),
16624
- internallyConnectedPins: z45.array(z45.array(z45.union([z45.string(), z45.number()]))).optional(),
16625
- externallyConnectedPins: z45.array(z45.array(z45.string())).optional(),
16638
+ showPinAliases: z46.boolean().optional(),
16639
+ pcbPinLabels: z46.record(z46.string(), z46.string()).optional(),
16640
+ internallyConnectedPins: z46.array(z46.array(z46.union([z46.string(), z46.number()]))).optional(),
16641
+ externallyConnectedPins: z46.array(z46.array(z46.string())).optional(),
16626
16642
  schPinArrangement: schematicPortArrangement.optional(),
16627
16643
  schPortArrangement: schematicPortArrangement.optional(),
16628
- pinCompatibleVariants: z45.array(pinCompatibleVariant).optional(),
16644
+ pinCompatibleVariants: z46.array(pinCompatibleVariant).optional(),
16629
16645
  schPinStyle: schematicPinStyle.optional(),
16630
16646
  schPinSpacing: distance13.optional(),
16631
16647
  schWidth: distance13.optional(),
16632
16648
  schHeight: distance13.optional(),
16633
- noSchematicRepresentation: z45.boolean().optional(),
16649
+ noSchematicRepresentation: z46.boolean().optional(),
16634
16650
  noConnect: noConnectProp.optional(),
16635
16651
  connections: connectionsProp.optional(),
16636
- spiceModel: spicemodelElement.optional()
16652
+ spiceModel: spicemodelElement.optional(),
16653
+ internalCircuit: internalCircuitElement.optional()
16637
16654
  });
16638
16655
  var bugProps = chipProps;
16639
16656
  expectTypesMatch(true);
@@ -16644,75 +16661,75 @@ expectTypesMatch(true);
16644
16661
 
16645
16662
  // lib/components/jumper.ts
16646
16663
  import { distance as distance14 } from "circuit-json";
16647
- import { z as z46 } from "zod";
16664
+ import { z as z47 } from "zod";
16648
16665
  var jumperProps = commonComponentProps.extend({
16649
- manufacturerPartNumber: z46.string().optional(),
16650
- pinLabels: z46.record(
16651
- z46.number().or(schematicPinLabel),
16652
- schematicPinLabel.or(z46.array(schematicPinLabel))
16666
+ manufacturerPartNumber: z47.string().optional(),
16667
+ pinLabels: z47.record(
16668
+ z47.number().or(schematicPinLabel),
16669
+ schematicPinLabel.or(z47.array(schematicPinLabel))
16653
16670
  ).optional(),
16654
16671
  schPinStyle: schematicPinStyle.optional(),
16655
16672
  schPinSpacing: distance14.optional(),
16656
16673
  schWidth: distance14.optional(),
16657
16674
  schHeight: distance14.optional(),
16658
- schDirection: z46.enum(["left", "right"]).optional(),
16675
+ schDirection: z47.enum(["left", "right"]).optional(),
16659
16676
  schPinArrangement: schematicPinArrangement.optional(),
16660
16677
  schPortArrangement: schematicPortArrangement.optional(),
16661
- pcbPinLabels: z46.record(z46.string(), z46.string()).optional(),
16662
- pinCount: z46.union([z46.literal(2), z46.literal(3)]).optional(),
16663
- internallyConnectedPins: z46.array(z46.array(z46.union([z46.string(), z46.number()]))).optional(),
16664
- connections: z46.custom().pipe(z46.record(z46.string(), connectionTarget)).optional()
16678
+ pcbPinLabels: z47.record(z47.string(), z47.string()).optional(),
16679
+ pinCount: z47.union([z47.literal(2), z47.literal(3)]).optional(),
16680
+ internallyConnectedPins: z47.array(z47.array(z47.union([z47.string(), z47.number()]))).optional(),
16681
+ connections: z47.custom().pipe(z47.record(z47.string(), connectionTarget)).optional()
16665
16682
  });
16666
16683
  expectTypesMatch(true);
16667
16684
 
16668
16685
  // lib/components/solderjumper.ts
16669
- import { z as z47 } from "zod";
16686
+ import { z as z48 } from "zod";
16670
16687
  var solderjumperProps = jumperProps.extend({
16671
- bridgedPins: z47.array(z47.array(z47.string())).optional(),
16672
- bridged: z47.boolean().optional()
16688
+ bridgedPins: z48.array(z48.array(z48.string())).optional(),
16689
+ bridged: z48.boolean().optional()
16673
16690
  });
16674
16691
  expectTypesMatch(true);
16675
16692
 
16676
16693
  // lib/components/connector.ts
16677
- import { z as z48 } from "zod";
16694
+ import { z as z49 } from "zod";
16678
16695
  var connectorProps = chipProps.extend({
16679
- standard: z48.enum(["usb_c", "m2"]).optional()
16696
+ standard: z49.enum(["usb_c", "m2"]).optional()
16680
16697
  });
16681
16698
  expectTypesMatch(true);
16682
16699
 
16683
16700
  // lib/components/interconnect.ts
16684
- import { z as z49 } from "zod";
16701
+ import { z as z50 } from "zod";
16685
16702
  var interconnectProps = commonComponentProps.extend({
16686
- standard: z49.enum(["TSC0001_36P_XALT_2025_11", "0805", "0603", "1206"]).optional(),
16687
- pinLabels: z49.record(
16688
- z49.number().or(schematicPinLabel),
16689
- schematicPinLabel.or(z49.array(schematicPinLabel))
16703
+ standard: z50.enum(["TSC0001_36P_XALT_2025_11", "0805", "0603", "1206"]).optional(),
16704
+ pinLabels: z50.record(
16705
+ z50.number().or(schematicPinLabel),
16706
+ schematicPinLabel.or(z50.array(schematicPinLabel))
16690
16707
  ).optional(),
16691
- internallyConnectedPins: z49.array(z49.array(z49.union([z49.string(), z49.number()]))).optional()
16708
+ internallyConnectedPins: z50.array(z50.array(z50.union([z50.string(), z50.number()]))).optional()
16692
16709
  });
16693
16710
  expectTypesMatch(true);
16694
16711
 
16695
16712
  // lib/components/fuse.ts
16696
- import { z as z50 } from "zod";
16713
+ import { z as z51 } from "zod";
16697
16714
  var fusePinLabels = ["pin1", "pin2"];
16698
16715
  var fuseProps = commonComponentProps.extend({
16699
- currentRating: z50.union([z50.number(), z50.string()]),
16700
- voltageRating: z50.union([z50.number(), z50.string()]).optional(),
16701
- schShowRatings: z50.boolean().optional(),
16716
+ currentRating: z51.union([z51.number(), z51.string()]),
16717
+ voltageRating: z51.union([z51.number(), z51.string()]).optional(),
16718
+ schShowRatings: z51.boolean().optional(),
16702
16719
  schOrientation: schematicOrientation.optional(),
16703
- connections: z50.record(
16704
- z50.string(),
16705
- z50.union([
16706
- z50.string(),
16707
- z50.array(z50.string()).readonly(),
16708
- z50.array(z50.string())
16720
+ connections: z51.record(
16721
+ z51.string(),
16722
+ z51.union([
16723
+ z51.string(),
16724
+ z51.array(z51.string()).readonly(),
16725
+ z51.array(z51.string())
16709
16726
  ])
16710
16727
  ).optional()
16711
16728
  });
16712
16729
 
16713
16730
  // lib/components/platedhole.ts
16714
16731
  import { distance as distance15 } from "circuit-json";
16715
- import { z as z51 } from "zod";
16732
+ import { z as z52 } from "zod";
16716
16733
  var DEFAULT_PIN_HEADER_HOLE_DIAMETER = "0.04in";
16717
16734
  var DEFAULT_PIN_HEADER_OUTER_DIAMETER = "0.1in";
16718
16735
  var inferPlatedHoleShapeAndDefaults = (rawProps) => {
@@ -16744,26 +16761,26 @@ var inferPlatedHoleShapeAndDefaults = (rawProps) => {
16744
16761
  props.outerDiameter = DEFAULT_PIN_HEADER_OUTER_DIAMETER;
16745
16762
  return props;
16746
16763
  };
16747
- var distanceHiddenUndefined = z51.custom().transform((a) => {
16764
+ var distanceHiddenUndefined = z52.custom().transform((a) => {
16748
16765
  if (a === void 0) return void 0;
16749
16766
  return distance15.parse(a);
16750
16767
  });
16751
- var platedHolePropsByShape = z51.discriminatedUnion("shape", [
16768
+ var platedHolePropsByShape = z52.discriminatedUnion("shape", [
16752
16769
  pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
16753
- name: z51.string().optional(),
16754
- connectsTo: z51.string().or(z51.array(z51.string())).optional(),
16755
- shape: z51.literal("circle"),
16770
+ name: z52.string().optional(),
16771
+ connectsTo: z52.string().or(z52.array(z52.string())).optional(),
16772
+ shape: z52.literal("circle"),
16756
16773
  holeDiameter: distance15,
16757
16774
  outerDiameter: distance15,
16758
16775
  padDiameter: distance15.optional().describe("Diameter of the copper pad"),
16759
16776
  portHints: portHints.optional(),
16760
16777
  solderMaskMargin: distance15.optional(),
16761
- coveredWithSolderMask: z51.boolean().optional()
16778
+ coveredWithSolderMask: z52.boolean().optional()
16762
16779
  }),
16763
16780
  pcbLayoutProps.omit({ layer: true }).extend({
16764
- name: z51.string().optional(),
16765
- connectsTo: z51.string().or(z51.array(z51.string())).optional(),
16766
- shape: z51.literal("oval"),
16781
+ name: z52.string().optional(),
16782
+ connectsTo: z52.string().or(z52.array(z52.string())).optional(),
16783
+ shape: z52.literal("oval"),
16767
16784
  outerWidth: distance15,
16768
16785
  outerHeight: distance15,
16769
16786
  holeWidth: distanceHiddenUndefined,
@@ -16772,13 +16789,13 @@ var platedHolePropsByShape = z51.discriminatedUnion("shape", [
16772
16789
  innerHeight: distance15.optional().describe("DEPRECATED use holeHeight"),
16773
16790
  portHints: portHints.optional(),
16774
16791
  solderMaskMargin: distance15.optional(),
16775
- coveredWithSolderMask: z51.boolean().optional()
16792
+ coveredWithSolderMask: z52.boolean().optional()
16776
16793
  }),
16777
16794
  pcbLayoutProps.omit({ layer: true }).extend({
16778
- name: z51.string().optional(),
16779
- connectsTo: z51.string().or(z51.array(z51.string())).optional(),
16780
- shape: z51.literal("pill"),
16781
- rectPad: z51.boolean().optional(),
16795
+ name: z52.string().optional(),
16796
+ connectsTo: z52.string().or(z52.array(z52.string())).optional(),
16797
+ shape: z52.literal("pill"),
16798
+ rectPad: z52.boolean().optional(),
16782
16799
  outerWidth: distance15,
16783
16800
  outerHeight: distance15,
16784
16801
  holeWidth: distanceHiddenUndefined,
@@ -16789,30 +16806,30 @@ var platedHolePropsByShape = z51.discriminatedUnion("shape", [
16789
16806
  holeOffsetX: distance15.optional(),
16790
16807
  holeOffsetY: distance15.optional(),
16791
16808
  solderMaskMargin: distance15.optional(),
16792
- coveredWithSolderMask: z51.boolean().optional()
16809
+ coveredWithSolderMask: z52.boolean().optional()
16793
16810
  }),
16794
16811
  pcbLayoutProps.omit({ layer: true }).extend({
16795
- name: z51.string().optional(),
16796
- connectsTo: z51.string().or(z51.array(z51.string())).optional(),
16797
- shape: z51.literal("circular_hole_with_rect_pad"),
16812
+ name: z52.string().optional(),
16813
+ connectsTo: z52.string().or(z52.array(z52.string())).optional(),
16814
+ shape: z52.literal("circular_hole_with_rect_pad"),
16798
16815
  holeDiameter: distance15,
16799
16816
  rectPadWidth: distance15,
16800
16817
  rectPadHeight: distance15,
16801
16818
  rectBorderRadius: distance15.optional(),
16802
- holeShape: z51.literal("circle").optional(),
16803
- padShape: z51.literal("rect").optional(),
16819
+ holeShape: z52.literal("circle").optional(),
16820
+ padShape: z52.literal("rect").optional(),
16804
16821
  portHints: portHints.optional(),
16805
16822
  holeOffsetX: distance15.optional(),
16806
16823
  holeOffsetY: distance15.optional(),
16807
16824
  solderMaskMargin: distance15.optional(),
16808
- coveredWithSolderMask: z51.boolean().optional()
16825
+ coveredWithSolderMask: z52.boolean().optional()
16809
16826
  }),
16810
16827
  pcbLayoutProps.omit({ layer: true }).extend({
16811
- name: z51.string().optional(),
16812
- connectsTo: z51.string().or(z51.array(z51.string())).optional(),
16813
- shape: z51.literal("pill_hole_with_rect_pad"),
16814
- holeShape: z51.literal("pill").optional(),
16815
- padShape: z51.literal("rect").optional(),
16828
+ name: z52.string().optional(),
16829
+ connectsTo: z52.string().or(z52.array(z52.string())).optional(),
16830
+ shape: z52.literal("pill_hole_with_rect_pad"),
16831
+ holeShape: z52.literal("pill").optional(),
16832
+ padShape: z52.literal("rect").optional(),
16816
16833
  holeWidth: distance15,
16817
16834
  holeHeight: distance15,
16818
16835
  rectPadWidth: distance15,
@@ -16822,22 +16839,22 @@ var platedHolePropsByShape = z51.discriminatedUnion("shape", [
16822
16839
  holeOffsetX: distance15.optional(),
16823
16840
  holeOffsetY: distance15.optional(),
16824
16841
  solderMaskMargin: distance15.optional(),
16825
- coveredWithSolderMask: z51.boolean().optional()
16842
+ coveredWithSolderMask: z52.boolean().optional()
16826
16843
  }),
16827
16844
  pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
16828
- name: z51.string().optional(),
16829
- connectsTo: z51.string().or(z51.array(z51.string())).optional(),
16830
- shape: z51.literal("hole_with_polygon_pad"),
16831
- holeShape: z51.enum(["circle", "oval", "pill", "rotated_pill"]),
16845
+ name: z52.string().optional(),
16846
+ connectsTo: z52.string().or(z52.array(z52.string())).optional(),
16847
+ shape: z52.literal("hole_with_polygon_pad"),
16848
+ holeShape: z52.enum(["circle", "oval", "pill", "rotated_pill"]),
16832
16849
  holeDiameter: distance15.optional(),
16833
16850
  holeWidth: distance15.optional(),
16834
16851
  holeHeight: distance15.optional(),
16835
- padOutline: z51.array(point),
16852
+ padOutline: z52.array(point),
16836
16853
  holeOffsetX: distance15,
16837
16854
  holeOffsetY: distance15,
16838
16855
  portHints: portHints.optional(),
16839
16856
  solderMaskMargin: distance15.optional(),
16840
- coveredWithSolderMask: z51.boolean().optional()
16857
+ coveredWithSolderMask: z52.boolean().optional()
16841
16858
  })
16842
16859
  ]).transform((a) => {
16843
16860
  if ("innerWidth" in a && a.innerWidth !== void 0) {
@@ -16848,7 +16865,7 @@ var platedHolePropsByShape = z51.discriminatedUnion("shape", [
16848
16865
  }
16849
16866
  return a;
16850
16867
  });
16851
- var platedHoleProps = z51.preprocess(
16868
+ var platedHoleProps = z52.preprocess(
16852
16869
  inferPlatedHoleShapeAndDefaults,
16853
16870
  platedHolePropsByShape
16854
16871
  );
@@ -16856,7 +16873,7 @@ expectTypesMatch(true);
16856
16873
 
16857
16874
  // lib/components/resistor.ts
16858
16875
  import { resistance } from "circuit-json";
16859
- import { z as z52 } from "zod";
16876
+ import { z as z53 } from "zod";
16860
16877
  var resistorPinLabels = ["pin1", "pin2", "pos", "neg"];
16861
16878
  var resistorImperialFootprintNames = /* @__PURE__ */ new Set([
16862
16879
  "01005",
@@ -16880,7 +16897,7 @@ var resistorFootprintProp = footprintProp.optional().transform(mapResistorFootpr
16880
16897
  var resistorProps = commonComponentProps.extend({
16881
16898
  footprint: resistorFootprintProp,
16882
16899
  resistance,
16883
- tolerance: z52.union([z52.string(), z52.number()]).transform((val) => {
16900
+ tolerance: z53.union([z53.string(), z53.number()]).transform((val) => {
16884
16901
  if (typeof val === "string") {
16885
16902
  if (val.endsWith("%")) {
16886
16903
  return parseFloat(val.slice(0, -1)) / 100;
@@ -16889,12 +16906,12 @@ var resistorProps = commonComponentProps.extend({
16889
16906
  }
16890
16907
  return val;
16891
16908
  }).pipe(
16892
- z52.number().min(0, "Tolerance must be non-negative").max(1, "Tolerance cannot be greater than 100%")
16909
+ z53.number().min(0, "Tolerance must be non-negative").max(1, "Tolerance cannot be greater than 100%")
16893
16910
  ).optional(),
16894
- pullupFor: z52.string().optional(),
16895
- pullupTo: z52.string().optional(),
16896
- pulldownFor: z52.string().optional(),
16897
- pulldownTo: z52.string().optional(),
16911
+ pullupFor: z53.string().optional(),
16912
+ pullupTo: z53.string().optional(),
16913
+ pulldownFor: z53.string().optional(),
16914
+ pulldownTo: z53.string().optional(),
16898
16915
  schOrientation: schematicOrientation.optional(),
16899
16916
  schSize: schematicSymbolSize.optional(),
16900
16917
  connections: createConnectionsProp(resistorPinLabels).optional()
@@ -16904,18 +16921,18 @@ expectTypesMatch(true);
16904
16921
 
16905
16922
  // lib/components/potentiometer.ts
16906
16923
  import { resistance as resistance2 } from "circuit-json";
16907
- import { z as z53 } from "zod";
16924
+ import { z as z54 } from "zod";
16908
16925
  var potentiometerPinLabels = ["pin1", "pin2", "pin3"];
16909
16926
  var potentiometerProps = commonComponentProps.extend({
16910
16927
  maxResistance: resistance2,
16911
- pinVariant: z53.enum(["two_pin", "three_pin"]).optional(),
16928
+ pinVariant: z54.enum(["two_pin", "three_pin"]).optional(),
16912
16929
  connections: createConnectionsProp(potentiometerPinLabels).optional()
16913
16930
  });
16914
16931
  expectTypesMatch(true);
16915
16932
 
16916
16933
  // lib/components/crystal.ts
16917
16934
  import { capacitance, distance as distance16, frequency } from "circuit-json";
16918
- import { z as z54 } from "zod";
16935
+ import { z as z55 } from "zod";
16919
16936
  var crystalPins = [
16920
16937
  "pin1",
16921
16938
  "left",
@@ -16928,9 +16945,9 @@ var crystalProps = commonComponentProps.extend({
16928
16945
  frequency,
16929
16946
  loadCapacitance: capacitance,
16930
16947
  maxTraceLength: distance16.optional(),
16931
- manufacturerPartNumber: z54.string().optional(),
16932
- mpn: z54.string().optional(),
16933
- pinVariant: z54.enum(["two_pin", "four_pin"]).optional(),
16948
+ manufacturerPartNumber: z55.string().optional(),
16949
+ mpn: z55.string().optional(),
16950
+ pinVariant: z55.enum(["two_pin", "four_pin"]).optional(),
16934
16951
  schOrientation: schematicOrientation.optional(),
16935
16952
  connections: createConnectionsProp(crystalPins).optional()
16936
16953
  });
@@ -16938,34 +16955,34 @@ expectTypesMatch(true);
16938
16955
 
16939
16956
  // lib/components/resonator.ts
16940
16957
  import { frequency as frequency2, capacitance as capacitance2 } from "circuit-json";
16941
- import { z as z55 } from "zod";
16958
+ import { z as z56 } from "zod";
16942
16959
  var resonatorProps = commonComponentProps.extend({
16943
16960
  frequency: frequency2,
16944
16961
  loadCapacitance: capacitance2,
16945
- pinVariant: z55.enum(["no_ground", "ground_pin", "two_ground_pins"]).optional()
16962
+ pinVariant: z56.enum(["no_ground", "ground_pin", "two_ground_pins"]).optional()
16946
16963
  });
16947
16964
  expectTypesMatch(true);
16948
16965
 
16949
16966
  // lib/components/stampboard.ts
16950
16967
  import { distance as distance17 } from "circuit-json";
16951
- import { z as z56 } from "zod";
16968
+ import { z as z57 } from "zod";
16952
16969
  var stampboardProps = boardProps.extend({
16953
- leftPinCount: z56.number().optional(),
16954
- rightPinCount: z56.number().optional(),
16955
- topPinCount: z56.number().optional(),
16956
- bottomPinCount: z56.number().optional(),
16957
- leftPins: z56.array(z56.string()).optional(),
16958
- rightPins: z56.array(z56.string()).optional(),
16959
- topPins: z56.array(z56.string()).optional(),
16960
- bottomPins: z56.array(z56.string()).optional(),
16970
+ leftPinCount: z57.number().optional(),
16971
+ rightPinCount: z57.number().optional(),
16972
+ topPinCount: z57.number().optional(),
16973
+ bottomPinCount: z57.number().optional(),
16974
+ leftPins: z57.array(z57.string()).optional(),
16975
+ rightPins: z57.array(z57.string()).optional(),
16976
+ topPins: z57.array(z57.string()).optional(),
16977
+ bottomPins: z57.array(z57.string()).optional(),
16961
16978
  pinPitch: distance17.optional(),
16962
- innerHoles: z56.boolean().optional()
16979
+ innerHoles: z57.boolean().optional()
16963
16980
  });
16964
16981
  expectTypesMatch(true);
16965
16982
 
16966
16983
  // lib/components/capacitor.ts
16967
16984
  import { capacitance as capacitance3, voltage } from "circuit-json";
16968
- import { z as z57 } from "zod";
16985
+ import { z as z58 } from "zod";
16969
16986
  var capacitorPinLabels = [
16970
16987
  "pin1",
16971
16988
  "pin2",
@@ -16977,13 +16994,13 @@ var capacitorPinLabels = [
16977
16994
  var capacitorProps = commonComponentProps.extend({
16978
16995
  capacitance: capacitance3,
16979
16996
  maxVoltageRating: voltage.optional(),
16980
- schShowRatings: z57.boolean().optional().default(false),
16981
- polarized: z57.boolean().optional().default(false),
16982
- decouplingFor: z57.string().optional(),
16983
- decouplingTo: z57.string().optional(),
16984
- bypassFor: z57.string().optional(),
16985
- bypassTo: z57.string().optional(),
16986
- maxDecouplingTraceLength: z57.number().optional(),
16997
+ schShowRatings: z58.boolean().optional().default(false),
16998
+ polarized: z58.boolean().optional().default(false),
16999
+ decouplingFor: z58.string().optional(),
17000
+ decouplingTo: z58.string().optional(),
17001
+ bypassFor: z58.string().optional(),
17002
+ bypassTo: z58.string().optional(),
17003
+ maxDecouplingTraceLength: z58.number().optional(),
16987
17004
  schOrientation: schematicOrientation.optional(),
16988
17005
  schSize: schematicSymbolSize.optional(),
16989
17006
  connections: createConnectionsProp(capacitorPinLabels).optional()
@@ -16993,14 +17010,14 @@ expectTypesMatch(true);
16993
17010
 
16994
17011
  // lib/components/net.ts
16995
17012
  import { distance as distance18 } from "circuit-json";
16996
- import { z as z58 } from "zod";
16997
- var netProps = z58.object({
16998
- name: z58.string(),
16999
- connectsTo: z58.string().or(z58.array(z58.string())).optional(),
17000
- routingPhaseIndex: z58.number().nullable().optional(),
17001
- highlightColor: z58.string().optional(),
17002
- isPowerNet: z58.boolean().optional(),
17003
- isGroundNet: z58.boolean().optional(),
17013
+ import { z as z59 } from "zod";
17014
+ var netProps = z59.object({
17015
+ name: z59.string(),
17016
+ connectsTo: z59.string().or(z59.array(z59.string())).optional(),
17017
+ routingPhaseIndex: z59.number().nullable().optional(),
17018
+ highlightColor: z59.string().optional(),
17019
+ isPowerNet: z59.boolean().optional(),
17020
+ isGroundNet: z59.boolean().optional(),
17004
17021
  nominalTraceWidth: distance18.optional()
17005
17022
  });
17006
17023
  expectTypesMatch(true);
@@ -17014,55 +17031,55 @@ var fiducialProps = commonComponentProps.extend({
17014
17031
  expectTypesMatch(true);
17015
17032
 
17016
17033
  // lib/components/constrainedlayout.ts
17017
- import { z as z60 } from "zod";
17018
- var constrainedLayoutProps = z60.object({
17019
- name: z60.string().optional(),
17020
- pcbOnly: z60.boolean().optional(),
17021
- schOnly: z60.boolean().optional()
17034
+ import { z as z61 } from "zod";
17035
+ var constrainedLayoutProps = z61.object({
17036
+ name: z61.string().optional(),
17037
+ pcbOnly: z61.boolean().optional(),
17038
+ schOnly: z61.boolean().optional()
17022
17039
  });
17023
17040
  expectTypesMatch(true);
17024
17041
 
17025
17042
  // lib/components/constraint.ts
17026
- import { z as z61 } from "zod";
17027
- var pcbXDistConstraintProps = z61.object({
17028
- pcb: z61.literal(true).optional(),
17043
+ import { z as z62 } from "zod";
17044
+ var pcbXDistConstraintProps = z62.object({
17045
+ pcb: z62.literal(true).optional(),
17029
17046
  xDist: distance,
17030
- left: z61.string(),
17031
- right: z61.string(),
17032
- edgeToEdge: z61.literal(true).optional(),
17033
- centerToCenter: z61.literal(true).optional()
17047
+ left: z62.string(),
17048
+ right: z62.string(),
17049
+ edgeToEdge: z62.literal(true).optional(),
17050
+ centerToCenter: z62.literal(true).optional()
17034
17051
  });
17035
17052
  expectTypesMatch(
17036
17053
  true
17037
17054
  );
17038
- var pcbYDistConstraintProps = z61.object({
17039
- pcb: z61.literal(true).optional(),
17055
+ var pcbYDistConstraintProps = z62.object({
17056
+ pcb: z62.literal(true).optional(),
17040
17057
  yDist: distance,
17041
- top: z61.string(),
17042
- bottom: z61.string(),
17043
- edgeToEdge: z61.literal(true).optional(),
17044
- centerToCenter: z61.literal(true).optional()
17058
+ top: z62.string(),
17059
+ bottom: z62.string(),
17060
+ edgeToEdge: z62.literal(true).optional(),
17061
+ centerToCenter: z62.literal(true).optional()
17045
17062
  });
17046
17063
  expectTypesMatch(
17047
17064
  true
17048
17065
  );
17049
- var pcbSameYConstraintProps = z61.object({
17050
- pcb: z61.literal(true).optional(),
17051
- sameY: z61.literal(true).optional(),
17052
- for: z61.array(z61.string())
17066
+ var pcbSameYConstraintProps = z62.object({
17067
+ pcb: z62.literal(true).optional(),
17068
+ sameY: z62.literal(true).optional(),
17069
+ for: z62.array(z62.string())
17053
17070
  });
17054
17071
  expectTypesMatch(
17055
17072
  true
17056
17073
  );
17057
- var pcbSameXConstraintProps = z61.object({
17058
- pcb: z61.literal(true).optional(),
17059
- sameX: z61.literal(true).optional(),
17060
- for: z61.array(z61.string())
17074
+ var pcbSameXConstraintProps = z62.object({
17075
+ pcb: z62.literal(true).optional(),
17076
+ sameX: z62.literal(true).optional(),
17077
+ for: z62.array(z62.string())
17061
17078
  });
17062
17079
  expectTypesMatch(
17063
17080
  true
17064
17081
  );
17065
- var constraintProps = z61.union([
17082
+ var constraintProps = z62.union([
17066
17083
  pcbXDistConstraintProps,
17067
17084
  pcbYDistConstraintProps,
17068
17085
  pcbSameYConstraintProps,
@@ -17071,13 +17088,13 @@ var constraintProps = z61.union([
17071
17088
  expectTypesMatch(true);
17072
17089
 
17073
17090
  // lib/components/cutout.ts
17074
- import { z as z62 } from "zod";
17091
+ import { z as z63 } from "zod";
17075
17092
  var rectCutoutProps = pcbLayoutProps.omit({
17076
17093
  layer: true,
17077
17094
  pcbRotation: true
17078
17095
  }).extend({
17079
- name: z62.string().optional(),
17080
- shape: z62.literal("rect"),
17096
+ name: z63.string().optional(),
17097
+ shape: z63.literal("rect"),
17081
17098
  width: distance,
17082
17099
  height: distance
17083
17100
  });
@@ -17086,8 +17103,8 @@ var circleCutoutProps = pcbLayoutProps.omit({
17086
17103
  layer: true,
17087
17104
  pcbRotation: true
17088
17105
  }).extend({
17089
- name: z62.string().optional(),
17090
- shape: z62.literal("circle"),
17106
+ name: z63.string().optional(),
17107
+ shape: z63.literal("circle"),
17091
17108
  radius: distance
17092
17109
  });
17093
17110
  expectTypesMatch(true);
@@ -17095,36 +17112,36 @@ var polygonCutoutProps = pcbLayoutProps.omit({
17095
17112
  layer: true,
17096
17113
  pcbRotation: true
17097
17114
  }).extend({
17098
- name: z62.string().optional(),
17099
- shape: z62.literal("polygon"),
17100
- points: z62.array(point)
17115
+ name: z63.string().optional(),
17116
+ shape: z63.literal("polygon"),
17117
+ points: z63.array(point)
17101
17118
  });
17102
17119
  expectTypesMatch(true);
17103
- var cutoutProps = z62.discriminatedUnion("shape", [
17120
+ var cutoutProps = z63.discriminatedUnion("shape", [
17104
17121
  rectCutoutProps,
17105
17122
  circleCutoutProps,
17106
17123
  polygonCutoutProps
17107
17124
  ]);
17108
17125
 
17109
17126
  // lib/components/drc-check.ts
17110
- import { z as z63 } from "zod";
17111
- var drcCheckProps = z63.object({
17112
- name: z63.string().optional(),
17127
+ import { z as z64 } from "zod";
17128
+ var drcCheckProps = z64.object({
17129
+ name: z64.string().optional(),
17113
17130
  checkFn: customDrcCheckFn
17114
17131
  });
17115
17132
  expectTypesMatch(true);
17116
17133
 
17117
17134
  // lib/components/smtpad.ts
17118
- import { z as z64 } from "zod";
17135
+ import { z as z65 } from "zod";
17119
17136
  var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17120
- name: z64.string().optional(),
17121
- shape: z64.literal("rect"),
17137
+ name: z65.string().optional(),
17138
+ shape: z65.literal("rect"),
17122
17139
  width: distance,
17123
17140
  height: distance,
17124
17141
  rectBorderRadius: distance.optional(),
17125
17142
  cornerRadius: distance.optional(),
17126
17143
  portHints: portHints.optional(),
17127
- coveredWithSolderMask: z64.boolean().optional(),
17144
+ coveredWithSolderMask: z65.boolean().optional(),
17128
17145
  solderMaskMargin: distance.optional(),
17129
17146
  solderMaskMarginLeft: distance.optional(),
17130
17147
  solderMaskMarginRight: distance.optional(),
@@ -17133,14 +17150,14 @@ var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17133
17150
  });
17134
17151
  expectTypesMatch(true);
17135
17152
  var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17136
- name: z64.string().optional(),
17137
- shape: z64.literal("rotated_rect"),
17153
+ name: z65.string().optional(),
17154
+ shape: z65.literal("rotated_rect"),
17138
17155
  width: distance,
17139
17156
  height: distance,
17140
- ccwRotation: z64.number(),
17157
+ ccwRotation: z65.number(),
17141
17158
  cornerRadius: distance.optional(),
17142
17159
  portHints: portHints.optional(),
17143
- coveredWithSolderMask: z64.boolean().optional(),
17160
+ coveredWithSolderMask: z65.boolean().optional(),
17144
17161
  solderMaskMargin: distance.optional(),
17145
17162
  solderMaskMarginLeft: distance.optional(),
17146
17163
  solderMaskMarginRight: distance.optional(),
@@ -17149,35 +17166,35 @@ var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17149
17166
  });
17150
17167
  expectTypesMatch(true);
17151
17168
  var circleSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17152
- name: z64.string().optional(),
17153
- shape: z64.literal("circle"),
17169
+ name: z65.string().optional(),
17170
+ shape: z65.literal("circle"),
17154
17171
  radius: distance,
17155
17172
  portHints: portHints.optional(),
17156
- coveredWithSolderMask: z64.boolean().optional(),
17173
+ coveredWithSolderMask: z65.boolean().optional(),
17157
17174
  solderMaskMargin: distance.optional()
17158
17175
  });
17159
17176
  expectTypesMatch(true);
17160
17177
  var pillSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17161
- name: z64.string().optional(),
17162
- shape: z64.literal("pill"),
17178
+ name: z65.string().optional(),
17179
+ shape: z65.literal("pill"),
17163
17180
  width: distance,
17164
17181
  height: distance,
17165
17182
  radius: distance,
17166
17183
  portHints: portHints.optional(),
17167
- coveredWithSolderMask: z64.boolean().optional(),
17184
+ coveredWithSolderMask: z65.boolean().optional(),
17168
17185
  solderMaskMargin: distance.optional()
17169
17186
  });
17170
17187
  expectTypesMatch(true);
17171
17188
  var polygonSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17172
- name: z64.string().optional(),
17173
- shape: z64.literal("polygon"),
17174
- points: z64.array(point),
17189
+ name: z65.string().optional(),
17190
+ shape: z65.literal("polygon"),
17191
+ points: z65.array(point),
17175
17192
  portHints: portHints.optional(),
17176
- coveredWithSolderMask: z64.boolean().optional(),
17193
+ coveredWithSolderMask: z65.boolean().optional(),
17177
17194
  solderMaskMargin: distance.optional()
17178
17195
  });
17179
17196
  expectTypesMatch(true);
17180
- var smtPadProps = z64.discriminatedUnion("shape", [
17197
+ var smtPadProps = z65.discriminatedUnion("shape", [
17181
17198
  circleSmtPadProps,
17182
17199
  rectSmtPadProps,
17183
17200
  rotatedRectSmtPadProps,
@@ -17187,63 +17204,63 @@ var smtPadProps = z64.discriminatedUnion("shape", [
17187
17204
  expectTypesMatch(true);
17188
17205
 
17189
17206
  // lib/components/solderpaste.ts
17190
- import { z as z65 } from "zod";
17207
+ import { z as z66 } from "zod";
17191
17208
  var rectSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17192
- shape: z65.literal("rect"),
17209
+ shape: z66.literal("rect"),
17193
17210
  width: distance,
17194
17211
  height: distance
17195
17212
  });
17196
17213
  expectTypesMatch(true);
17197
17214
  var circleSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17198
- shape: z65.literal("circle"),
17215
+ shape: z66.literal("circle"),
17199
17216
  radius: distance
17200
17217
  });
17201
17218
  expectTypesMatch(true);
17202
- var solderPasteProps = z65.union([
17219
+ var solderPasteProps = z66.union([
17203
17220
  circleSolderPasteProps,
17204
17221
  rectSolderPasteProps
17205
17222
  ]);
17206
17223
  expectTypesMatch(true);
17207
17224
 
17208
17225
  // lib/components/hole.ts
17209
- import { z as z66 } from "zod";
17226
+ import { z as z67 } from "zod";
17210
17227
  var circleHoleProps = pcbLayoutProps.extend({
17211
- name: z66.string().optional(),
17212
- shape: z66.literal("circle").optional(),
17228
+ name: z67.string().optional(),
17229
+ shape: z67.literal("circle").optional(),
17213
17230
  diameter: distance.optional(),
17214
17231
  radius: distance.optional(),
17215
17232
  solderMaskMargin: distance.optional(),
17216
- coveredWithSolderMask: z66.boolean().optional()
17233
+ coveredWithSolderMask: z67.boolean().optional()
17217
17234
  }).transform((d) => ({
17218
17235
  ...d,
17219
17236
  diameter: d.diameter ?? 2 * d.radius,
17220
17237
  radius: d.radius ?? d.diameter / 2
17221
17238
  }));
17222
17239
  var pillHoleProps = pcbLayoutProps.extend({
17223
- name: z66.string().optional(),
17224
- shape: z66.literal("pill"),
17240
+ name: z67.string().optional(),
17241
+ shape: z67.literal("pill"),
17225
17242
  width: distance,
17226
17243
  height: distance,
17227
17244
  solderMaskMargin: distance.optional(),
17228
- coveredWithSolderMask: z66.boolean().optional()
17245
+ coveredWithSolderMask: z67.boolean().optional()
17229
17246
  });
17230
17247
  var ovalHoleProps = pcbLayoutProps.extend({
17231
- name: z66.string().optional(),
17232
- shape: z66.literal("oval"),
17248
+ name: z67.string().optional(),
17249
+ shape: z67.literal("oval"),
17233
17250
  width: distance,
17234
17251
  height: distance,
17235
17252
  solderMaskMargin: distance.optional(),
17236
- coveredWithSolderMask: z66.boolean().optional()
17253
+ coveredWithSolderMask: z67.boolean().optional()
17237
17254
  });
17238
17255
  var rectHoleProps = pcbLayoutProps.extend({
17239
- name: z66.string().optional(),
17240
- shape: z66.literal("rect"),
17256
+ name: z67.string().optional(),
17257
+ shape: z67.literal("rect"),
17241
17258
  width: distance,
17242
17259
  height: distance,
17243
17260
  solderMaskMargin: distance.optional(),
17244
- coveredWithSolderMask: z66.boolean().optional()
17261
+ coveredWithSolderMask: z67.boolean().optional()
17245
17262
  });
17246
- var holeProps = z66.union([
17263
+ var holeProps = z67.union([
17247
17264
  circleHoleProps,
17248
17265
  pillHoleProps,
17249
17266
  ovalHoleProps,
@@ -17253,57 +17270,57 @@ expectTypesMatch(true);
17253
17270
 
17254
17271
  // lib/components/trace.ts
17255
17272
  import { distance as distance19, layer_ref as layer_ref4, route_hint_point as route_hint_point2 } from "circuit-json";
17256
- import { z as z67 } from "zod";
17257
- var portRef = z67.union([
17258
- z67.string(),
17259
- z67.custom(
17273
+ import { z as z68 } from "zod";
17274
+ var portRef = z68.union([
17275
+ z68.string(),
17276
+ z68.custom(
17260
17277
  (v) => typeof v === "object" && v !== null && "getPortSelector" in v && typeof v.getPortSelector === "function"
17261
17278
  )
17262
17279
  ]);
17263
17280
  var pcbPathPoint = point.extend({
17264
- via: z67.boolean().optional(),
17281
+ via: z68.boolean().optional(),
17265
17282
  fromLayer: layer_ref4.optional(),
17266
17283
  toLayer: layer_ref4.optional()
17267
17284
  }).superRefine((value, ctx) => {
17268
17285
  if (value.via) {
17269
17286
  if (!value.toLayer) {
17270
17287
  ctx.addIssue({
17271
- code: z67.ZodIssueCode.custom,
17288
+ code: z68.ZodIssueCode.custom,
17272
17289
  message: "toLayer is required when via is true",
17273
17290
  path: ["toLayer"]
17274
17291
  });
17275
17292
  }
17276
17293
  } else if (value.fromLayer || value.toLayer) {
17277
17294
  ctx.addIssue({
17278
- code: z67.ZodIssueCode.custom,
17295
+ code: z68.ZodIssueCode.custom,
17279
17296
  message: "fromLayer/toLayer are only allowed when via is true",
17280
17297
  path: ["via"]
17281
17298
  });
17282
17299
  }
17283
17300
  });
17284
- var pcbPath = z67.array(z67.union([pcbPathPoint, z67.string()]));
17285
- var baseTraceProps = z67.object({
17286
- key: z67.string().optional(),
17287
- name: z67.string().optional(),
17288
- displayName: z67.string().optional(),
17301
+ var pcbPath = z68.array(z68.union([pcbPathPoint, z68.string()]));
17302
+ var baseTraceProps = z68.object({
17303
+ key: z68.string().optional(),
17304
+ name: z68.string().optional(),
17305
+ displayName: z68.string().optional(),
17289
17306
  thickness: distance19.optional(),
17290
17307
  width: distance19.optional().describe("Alias for trace thickness"),
17291
- schematicRouteHints: z67.array(point).optional(),
17292
- pcbRouteHints: z67.array(route_hint_point2).optional(),
17293
- pcbPathRelativeTo: z67.string().optional(),
17308
+ schematicRouteHints: z68.array(point).optional(),
17309
+ pcbRouteHints: z68.array(route_hint_point2).optional(),
17310
+ pcbPathRelativeTo: z68.string().optional(),
17294
17311
  pcbPath: pcbPath.optional(),
17295
- pcbPaths: z67.array(pcbPath).optional(),
17296
- routingPhaseIndex: z67.number().nullable().optional(),
17297
- pcbStraightLine: z67.boolean().optional().describe("Draw a straight pcb trace between the connected points"),
17298
- schDisplayLabel: z67.string().optional(),
17299
- schStroke: z67.string().optional(),
17300
- highlightColor: z67.string().optional(),
17312
+ pcbPaths: z68.array(pcbPath).optional(),
17313
+ routingPhaseIndex: z68.number().nullable().optional(),
17314
+ pcbStraightLine: z68.boolean().optional().describe("Draw a straight pcb trace between the connected points"),
17315
+ schDisplayLabel: z68.string().optional(),
17316
+ schStroke: z68.string().optional(),
17317
+ highlightColor: z68.string().optional(),
17301
17318
  maxLength: distance19.optional(),
17302
- connectsTo: z67.string().or(z67.array(z67.string())).optional()
17319
+ connectsTo: z68.string().or(z68.array(z68.string())).optional()
17303
17320
  });
17304
- var traceProps = z67.union([
17321
+ var traceProps = z68.union([
17305
17322
  baseTraceProps.extend({
17306
- path: z67.array(portRef)
17323
+ path: z68.array(portRef)
17307
17324
  }),
17308
17325
  baseTraceProps.extend({
17309
17326
  from: portRef,
@@ -17316,19 +17333,19 @@ var traceProps = z67.union([
17316
17333
  ]);
17317
17334
 
17318
17335
  // lib/components/differentialpair.ts
17319
- import { z as z68 } from "zod";
17320
- var differentialPairProps = z68.object({
17321
- name: z68.string().optional(),
17322
- positiveConnection: z68.string(),
17323
- negativeConnection: z68.string(),
17324
- maxLengthSkew: z68.number().min(0).max(1).optional()
17336
+ import { z as z69 } from "zod";
17337
+ var differentialPairProps = z69.object({
17338
+ name: z69.string().optional(),
17339
+ positiveConnection: z69.string(),
17340
+ negativeConnection: z69.string(),
17341
+ maxLengthSkew: z69.number().min(0).max(1).optional()
17325
17342
  });
17326
17343
  expectTypesMatch(true);
17327
17344
 
17328
17345
  // lib/components/footprint.ts
17329
17346
  import { layer_ref as layer_ref5 } from "circuit-json";
17330
- import { z as z69 } from "zod";
17331
- var footprintInsertionDirection = z69.enum([
17347
+ import { z as z70 } from "zod";
17348
+ var footprintInsertionDirection = z70.enum([
17332
17349
  "from_above",
17333
17350
  "from_left",
17334
17351
  "from_right",
@@ -17336,11 +17353,11 @@ var footprintInsertionDirection = z69.enum([
17336
17353
  "from_back"
17337
17354
  ]);
17338
17355
  expectTypesMatch(true);
17339
- var footprintProps = z69.object({
17340
- children: z69.any().optional(),
17341
- name: z69.string().optional(),
17356
+ var footprintProps = z70.object({
17357
+ children: z70.any().optional(),
17358
+ name: z70.string().optional(),
17342
17359
  originalLayer: layer_ref5.default("top").optional(),
17343
- circuitJson: z69.array(z69.any()).optional(),
17360
+ circuitJson: z70.array(z70.any()).optional(),
17344
17361
  src: footprintProp.describe("Can be a footprint or kicad string").optional(),
17345
17362
  insertionDirection: footprintInsertionDirection.optional().describe(
17346
17363
  "Direction a cable or mating part is inserted into this footprint in its unrotated orientation."
@@ -17349,19 +17366,19 @@ var footprintProps = z69.object({
17349
17366
  expectTypesMatch(true);
17350
17367
 
17351
17368
  // lib/components/symbol.ts
17352
- import { z as z70 } from "zod";
17353
- var symbolProps = z70.object({
17354
- originalFacingDirection: z70.enum(["up", "down", "left", "right"]).default("right").optional(),
17369
+ import { z as z71 } from "zod";
17370
+ var symbolProps = z71.object({
17371
+ originalFacingDirection: z71.enum(["up", "down", "left", "right"]).default("right").optional(),
17355
17372
  width: distance.optional(),
17356
17373
  height: distance.optional(),
17357
- name: z70.string().optional()
17374
+ name: z71.string().optional()
17358
17375
  });
17359
17376
  expectTypesMatch(true);
17360
17377
 
17361
17378
  // lib/components/battery.ts
17362
17379
  import { voltage as voltage2 } from "circuit-json";
17363
- import { z as z71 } from "zod";
17364
- var capacity = z71.number().or(z71.string().endsWith("mAh")).transform((v) => {
17380
+ import { z as z72 } from "zod";
17381
+ var capacity = z72.number().or(z72.string().endsWith("mAh")).transform((v) => {
17365
17382
  if (typeof v === "string") {
17366
17383
  const valString = v.replace("mAh", "");
17367
17384
  const num = Number.parseFloat(valString);
@@ -17375,14 +17392,14 @@ var capacity = z71.number().or(z71.string().endsWith("mAh")).transform((v) => {
17375
17392
  var batteryProps = commonComponentProps.extend({
17376
17393
  capacity: capacity.optional(),
17377
17394
  voltage: voltage2.optional(),
17378
- standard: z71.enum(["AA", "AAA", "9V", "CR2032", "18650", "C"]).optional(),
17395
+ standard: z72.enum(["AA", "AAA", "9V", "CR2032", "18650", "C"]).optional(),
17379
17396
  schOrientation: schematicOrientation.optional()
17380
17397
  });
17381
17398
  var batteryPins = lrPolarPins;
17382
17399
  expectTypesMatch(true);
17383
17400
 
17384
17401
  // lib/components/mountedboard.ts
17385
- import { z as z72 } from "zod";
17402
+ import { z as z73 } from "zod";
17386
17403
  var mountedboardProps = subcircuitGroupProps.extend({
17387
17404
  manufacturerPartNumber: chipProps.shape.manufacturerPartNumber,
17388
17405
  pinLabels: chipProps.shape.pinLabels,
@@ -17394,7 +17411,7 @@ var mountedboardProps = subcircuitGroupProps.extend({
17394
17411
  internallyConnectedPins: chipProps.shape.internallyConnectedPins,
17395
17412
  externallyConnectedPins: chipProps.shape.externallyConnectedPins,
17396
17413
  boardToBoardDistance: distance.optional(),
17397
- mountOrientation: z72.enum(["faceDown", "faceUp"]).optional()
17414
+ mountOrientation: z73.enum(["faceDown", "faceUp"]).optional()
17398
17415
  });
17399
17416
  expectTypesMatch(true);
17400
17417
 
@@ -17402,29 +17419,29 @@ expectTypesMatch(true);
17402
17419
  import { distance as distance20 } from "circuit-json";
17403
17420
 
17404
17421
  // lib/common/pcbOrientation.ts
17405
- import { z as z73 } from "zod";
17406
- var pcbOrientation = z73.enum(["vertical", "horizontal"]).describe(
17422
+ import { z as z74 } from "zod";
17423
+ var pcbOrientation = z74.enum(["vertical", "horizontal"]).describe(
17407
17424
  "vertical means pins go 1->2 downward and horizontal means pins go 1->2 rightward"
17408
17425
  );
17409
17426
  expectTypesMatch(true);
17410
17427
 
17411
17428
  // lib/components/pin-header.ts
17412
- import { z as z74 } from "zod";
17429
+ import { z as z75 } from "zod";
17413
17430
  var pinHeaderProps = commonComponentProps.extend({
17414
- pinCount: z74.number(),
17431
+ pinCount: z75.number(),
17415
17432
  pitch: distance20.optional(),
17416
- schFacingDirection: z74.enum(["up", "down", "left", "right"]).optional(),
17417
- gender: z74.enum(["male", "female", "unpopulated"]).optional().default("male"),
17418
- showSilkscreenPinLabels: z74.boolean().optional(),
17419
- pcbPinLabels: z74.record(z74.string(), z74.string()).optional(),
17420
- doubleRow: z74.boolean().optional(),
17421
- rightAngle: z74.boolean().optional(),
17433
+ schFacingDirection: z75.enum(["up", "down", "left", "right"]).optional(),
17434
+ gender: z75.enum(["male", "female", "unpopulated"]).optional().default("male"),
17435
+ showSilkscreenPinLabels: z75.boolean().optional(),
17436
+ pcbPinLabels: z75.record(z75.string(), z75.string()).optional(),
17437
+ doubleRow: z75.boolean().optional(),
17438
+ rightAngle: z75.boolean().optional(),
17422
17439
  pcbOrientation: pcbOrientation.optional(),
17423
17440
  holeDiameter: distance20.optional(),
17424
17441
  platedDiameter: distance20.optional(),
17425
- pinLabels: z74.record(z74.string(), schematicPinLabel).or(z74.array(schematicPinLabel)).optional(),
17426
- connections: z74.custom().pipe(z74.record(z74.string(), connectionTarget)).optional(),
17427
- facingDirection: z74.enum(["left", "right"]).optional(),
17442
+ pinLabels: z75.record(z75.string(), schematicPinLabel).or(z75.array(schematicPinLabel)).optional(),
17443
+ connections: z75.custom().pipe(z75.record(z75.string(), connectionTarget)).optional(),
17444
+ facingDirection: z75.enum(["left", "right"]).optional(),
17428
17445
  schPinArrangement: schematicPinArrangement.optional(),
17429
17446
  schPinStyle: schematicPinStyle.optional(),
17430
17447
  schPinSpacing: distance20.optional(),
@@ -17434,29 +17451,29 @@ var pinHeaderProps = commonComponentProps.extend({
17434
17451
  expectTypesMatch(true);
17435
17452
 
17436
17453
  // lib/components/netalias.ts
17437
- import { z as z75 } from "zod";
17454
+ import { z as z76 } from "zod";
17438
17455
  import { rotation as rotation3 } from "circuit-json";
17439
- var netAliasProps = z75.object({
17440
- net: z75.string().optional(),
17441
- connection: z75.string().optional(),
17456
+ var netAliasProps = z76.object({
17457
+ net: z76.string().optional(),
17458
+ connection: z76.string().optional(),
17442
17459
  schX: distance.optional(),
17443
17460
  schY: distance.optional(),
17444
17461
  schRotation: rotation3.optional(),
17445
- anchorSide: z75.enum(["left", "top", "right", "bottom"]).optional()
17462
+ anchorSide: z76.enum(["left", "top", "right", "bottom"]).optional()
17446
17463
  });
17447
17464
  expectTypesMatch(true);
17448
17465
 
17449
17466
  // lib/components/netlabel.ts
17450
- import { z as z76 } from "zod";
17467
+ import { z as z77 } from "zod";
17451
17468
  import { rotation as rotation4 } from "circuit-json";
17452
- var netLabelProps = z76.object({
17453
- net: z76.string().optional(),
17454
- connection: z76.string().optional(),
17455
- connectsTo: z76.string().or(z76.array(z76.string())).optional(),
17469
+ var netLabelProps = z77.object({
17470
+ net: z77.string().optional(),
17471
+ connection: z77.string().optional(),
17472
+ connectsTo: z77.string().or(z77.array(z77.string())).optional(),
17456
17473
  schX: distance.optional(),
17457
17474
  schY: distance.optional(),
17458
17475
  schRotation: rotation4.optional(),
17459
- anchorSide: z76.enum(["left", "top", "right", "bottom"]).optional()
17476
+ anchorSide: z77.enum(["left", "top", "right", "bottom"]).optional()
17460
17477
  });
17461
17478
  expectTypesMatch(true);
17462
17479
 
@@ -17471,52 +17488,52 @@ expectTypesMatch(true);
17471
17488
 
17472
17489
  // lib/components/analogsimulation.ts
17473
17490
  import { ms } from "circuit-json";
17474
- import { z as z78 } from "zod";
17475
- var spiceEngine = z78.custom(
17491
+ import { z as z79 } from "zod";
17492
+ var spiceEngine = z79.custom(
17476
17493
  (value) => typeof value === "string"
17477
17494
  );
17478
- var spiceOptions = z78.object({
17479
- method: z78.enum(["trap", "gear"]).optional(),
17480
- reltol: z78.union([z78.number(), z78.string()]).optional(),
17481
- abstol: z78.union([z78.number(), z78.string()]).optional(),
17482
- vntol: z78.union([z78.number(), z78.string()]).optional()
17495
+ var spiceOptions = z79.object({
17496
+ method: z79.enum(["trap", "gear"]).optional(),
17497
+ reltol: z79.union([z79.number(), z79.string()]).optional(),
17498
+ abstol: z79.union([z79.number(), z79.string()]).optional(),
17499
+ vntol: z79.union([z79.number(), z79.string()]).optional()
17483
17500
  });
17484
- var analogSimulationProps = z78.object({
17485
- name: z78.string().optional(),
17486
- simulationType: z78.literal("spice_transient_analysis").default("spice_transient_analysis"),
17501
+ var analogSimulationProps = z79.object({
17502
+ name: z79.string().optional(),
17503
+ simulationType: z79.literal("spice_transient_analysis").default("spice_transient_analysis"),
17487
17504
  duration: ms.optional(),
17488
17505
  startTime: ms.optional(),
17489
17506
  timePerStep: ms.optional(),
17490
17507
  spiceEngine: spiceEngine.optional(),
17491
17508
  spiceOptions: spiceOptions.optional(),
17492
- graphIndependentAxes: z78.boolean().optional()
17509
+ graphIndependentAxes: z79.boolean().optional()
17493
17510
  });
17494
17511
  expectTypesMatch(
17495
17512
  true
17496
17513
  );
17497
17514
 
17498
17515
  // lib/components/autoroutingphase.ts
17499
- import { z as z79 } from "zod";
17500
- var autoroutingPhaseProps = z79.object({
17501
- key: z79.any().optional(),
17502
- name: z79.string().optional(),
17516
+ import { z as z80 } from "zod";
17517
+ var autoroutingPhaseProps = z80.object({
17518
+ key: z80.any().optional(),
17519
+ name: z80.string().optional(),
17503
17520
  autorouter: autorouterProp.optional(),
17504
- phaseIndex: z79.number().optional(),
17521
+ phaseIndex: z80.number().optional(),
17505
17522
  ...routingTolerances.shape,
17506
- region: z79.object({
17507
- shape: z79.literal("rect").optional(),
17508
- minX: z79.number(),
17509
- maxX: z79.number(),
17510
- minY: z79.number(),
17511
- maxY: z79.number()
17523
+ region: z80.object({
17524
+ shape: z80.literal("rect").optional(),
17525
+ minX: z80.number(),
17526
+ maxX: z80.number(),
17527
+ minY: z80.number(),
17528
+ maxY: z80.number()
17512
17529
  }).optional(),
17513
- connection: z79.string().optional(),
17514
- connections: z79.array(z79.string()).optional(),
17515
- reroute: z79.boolean().optional()
17530
+ connection: z80.string().optional(),
17531
+ connections: z80.array(z80.string()).optional(),
17532
+ reroute: z80.boolean().optional()
17516
17533
  }).superRefine((value, ctx) => {
17517
17534
  if (value.reroute !== void 0 && value.region === void 0 && value.connection === void 0 && value.connections === void 0) {
17518
17535
  ctx.addIssue({
17519
- code: z79.ZodIssueCode.custom,
17536
+ code: z80.ZodIssueCode.custom,
17520
17537
  message: "region, connection, or connections is required when reroute is provided",
17521
17538
  path: ["region"]
17522
17539
  });
@@ -17525,15 +17542,15 @@ var autoroutingPhaseProps = z79.object({
17525
17542
  expectTypesMatch(true);
17526
17543
 
17527
17544
  // lib/components/spicemodel.ts
17528
- import { z as z80 } from "zod";
17529
- var spicemodelProps = z80.object({
17530
- source: z80.string(),
17531
- spicePinMapping: z80.record(z80.string(), z80.string()).optional()
17545
+ import { z as z81 } from "zod";
17546
+ var spicemodelProps = z81.object({
17547
+ source: z81.string(),
17548
+ spicePinMapping: z81.record(z81.string(), z81.string()).optional()
17532
17549
  });
17533
17550
  expectTypesMatch(true);
17534
17551
 
17535
17552
  // lib/components/transistor.ts
17536
- import { z as z81 } from "zod";
17553
+ import { z as z82 } from "zod";
17537
17554
  var transistorPinsLabels = [
17538
17555
  "pin1",
17539
17556
  "pin2",
@@ -17546,7 +17563,7 @@ var transistorPinsLabels = [
17546
17563
  "drain"
17547
17564
  ];
17548
17565
  var transistorProps = commonComponentProps.extend({
17549
- type: z81.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
17566
+ type: z82.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
17550
17567
  connections: createConnectionsProp(transistorPinsLabels).optional()
17551
17568
  });
17552
17569
  var transistorPins = [
@@ -17560,7 +17577,7 @@ var transistorPins = [
17560
17577
  expectTypesMatch(true);
17561
17578
 
17562
17579
  // lib/components/mosfet.ts
17563
- import { z as z82 } from "zod";
17580
+ import { z as z83 } from "zod";
17564
17581
  var mosfetPins = [
17565
17582
  "pin1",
17566
17583
  "drain",
@@ -17570,11 +17587,11 @@ var mosfetPins = [
17570
17587
  "gate"
17571
17588
  ];
17572
17589
  var mosfetProps = commonComponentProps.extend({
17573
- channelType: z82.enum(["n", "p"]),
17574
- mosfetMode: z82.enum(["enhancement", "depletion"]),
17575
- symbolDrainSide: z82.enum(["left", "right", "top", "bottom"]).optional(),
17576
- symbolSourceSide: z82.enum(["left", "right", "top", "bottom"]).optional(),
17577
- symbolGateSide: z82.enum(["left", "right", "top", "bottom"]).optional(),
17590
+ channelType: z83.enum(["n", "p"]),
17591
+ mosfetMode: z83.enum(["enhancement", "depletion"]),
17592
+ symbolDrainSide: z83.enum(["left", "right", "top", "bottom"]).optional(),
17593
+ symbolSourceSide: z83.enum(["left", "right", "top", "bottom"]).optional(),
17594
+ symbolGateSide: z83.enum(["left", "right", "top", "bottom"]).optional(),
17578
17595
  connections: createConnectionsProp(mosfetPins).optional()
17579
17596
  });
17580
17597
  expectTypesMatch(true);
@@ -17596,20 +17613,29 @@ expectTypesMatch(true);
17596
17613
 
17597
17614
  // lib/components/inductor.ts
17598
17615
  import { inductance } from "circuit-json";
17599
- import { z as z84 } from "zod";
17616
+ import { z as z85 } from "zod";
17600
17617
  var inductorPins = lrPins;
17601
17618
  var inductorProps = commonComponentProps.extend({
17602
17619
  inductance,
17603
- maxCurrentRating: z84.union([z84.string(), z84.number()]).optional(),
17620
+ maxCurrentRating: z85.union([z85.string(), z85.number()]).optional(),
17604
17621
  schOrientation: schematicOrientation.optional(),
17605
17622
  connections: createConnectionsProp(inductorPins).optional()
17606
17623
  });
17607
17624
  expectTypesMatch(true);
17608
17625
 
17626
+ // lib/components/internal-circuit.ts
17627
+ import { z as z86 } from "zod";
17628
+ var internalCircuitProps = z86.object({
17629
+ children: z86.custom().optional()
17630
+ });
17631
+ expectTypesMatch(
17632
+ true
17633
+ );
17634
+
17609
17635
  // lib/components/diode.ts
17610
- import { z as z85 } from "zod";
17636
+ import { z as z87 } from "zod";
17611
17637
  var diodePins = lrPolarPins;
17612
- var diodeConnectionKeys = z85.enum([
17638
+ var diodeConnectionKeys = z87.enum([
17613
17639
  "anode",
17614
17640
  "cathode",
17615
17641
  "pin1",
@@ -17617,13 +17643,13 @@ var diodeConnectionKeys = z85.enum([
17617
17643
  "pos",
17618
17644
  "neg"
17619
17645
  ]);
17620
- var connectionTarget3 = z85.string().or(z85.array(z85.string()).readonly()).or(z85.array(z85.string()));
17621
- var connectionsProp2 = z85.record(diodeConnectionKeys, connectionTarget3);
17622
- var diodePinLabelsProp = z85.record(
17623
- z85.enum(diodePins),
17624
- schematicPinLabel.or(z85.array(schematicPinLabel).readonly()).or(z85.array(schematicPinLabel))
17646
+ var connectionTarget3 = z87.string().or(z87.array(z87.string()).readonly()).or(z87.array(z87.string()));
17647
+ var connectionsProp2 = z87.record(diodeConnectionKeys, connectionTarget3);
17648
+ var diodePinLabelsProp = z87.record(
17649
+ z87.enum(diodePins),
17650
+ schematicPinLabel.or(z87.array(schematicPinLabel).readonly()).or(z87.array(schematicPinLabel))
17625
17651
  );
17626
- var diodeVariant = z85.enum([
17652
+ var diodeVariant = z87.enum([
17627
17653
  "standard",
17628
17654
  "schottky",
17629
17655
  "zener",
@@ -17634,12 +17660,12 @@ var diodeVariant = z85.enum([
17634
17660
  var diodeProps = commonComponentProps.extend({
17635
17661
  connections: connectionsProp2.optional(),
17636
17662
  variant: diodeVariant.optional().default("standard"),
17637
- standard: z85.boolean().optional(),
17638
- schottky: z85.boolean().optional(),
17639
- zener: z85.boolean().optional(),
17640
- avalanche: z85.boolean().optional(),
17641
- photo: z85.boolean().optional(),
17642
- tvs: z85.boolean().optional(),
17663
+ standard: z87.boolean().optional(),
17664
+ schottky: z87.boolean().optional(),
17665
+ zener: z87.boolean().optional(),
17666
+ avalanche: z87.boolean().optional(),
17667
+ photo: z87.boolean().optional(),
17668
+ tvs: z87.boolean().optional(),
17643
17669
  schOrientation: schematicOrientation.optional(),
17644
17670
  pinLabels: diodePinLabelsProp.optional()
17645
17671
  }).superRefine((data, ctx) => {
@@ -17653,11 +17679,11 @@ var diodeProps = commonComponentProps.extend({
17653
17679
  ].filter(Boolean).length;
17654
17680
  if (enabledFlags > 1) {
17655
17681
  ctx.addIssue({
17656
- code: z85.ZodIssueCode.custom,
17682
+ code: z87.ZodIssueCode.custom,
17657
17683
  message: "Exactly one diode variant must be enabled",
17658
17684
  path: []
17659
17685
  });
17660
- return z85.INVALID;
17686
+ return z87.INVALID;
17661
17687
  }
17662
17688
  }).transform((data) => {
17663
17689
  const result = {
@@ -17703,34 +17729,34 @@ var diodeProps = commonComponentProps.extend({
17703
17729
  expectTypesMatch(true);
17704
17730
 
17705
17731
  // lib/components/led.ts
17706
- import { z as z86 } from "zod";
17732
+ import { z as z88 } from "zod";
17707
17733
  var ledProps = commonComponentProps.extend({
17708
- color: z86.string().optional(),
17709
- wavelength: z86.string().optional(),
17710
- schDisplayValue: z86.string().optional(),
17734
+ color: z88.string().optional(),
17735
+ wavelength: z88.string().optional(),
17736
+ schDisplayValue: z88.string().optional(),
17711
17737
  schOrientation: schematicOrientation.optional(),
17712
17738
  connections: createConnectionsProp(lrPolarPins).optional(),
17713
- laser: z86.boolean().optional()
17739
+ laser: z88.boolean().optional()
17714
17740
  });
17715
17741
  var ledPins = lrPolarPins;
17716
17742
 
17717
17743
  // lib/components/switch.ts
17718
17744
  import { ms as ms2, frequency as frequency3 } from "circuit-json";
17719
- import { z as z87 } from "zod";
17745
+ import { z as z89 } from "zod";
17720
17746
  var switchProps = commonComponentProps.extend({
17721
- type: z87.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
17722
- isNormallyClosed: z87.boolean().optional().default(false),
17723
- spst: z87.boolean().optional(),
17724
- spdt: z87.boolean().optional(),
17725
- dpst: z87.boolean().optional(),
17726
- dpdt: z87.boolean().optional(),
17747
+ type: z89.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
17748
+ isNormallyClosed: z89.boolean().optional().default(false),
17749
+ spst: z89.boolean().optional(),
17750
+ spdt: z89.boolean().optional(),
17751
+ dpst: z89.boolean().optional(),
17752
+ dpdt: z89.boolean().optional(),
17727
17753
  pinLabels: pinLabelsProp.optional(),
17728
17754
  simSwitchFrequency: frequency3.optional(),
17729
17755
  simCloseAt: ms2.optional(),
17730
17756
  simOpenAt: ms2.optional(),
17731
- simStartClosed: z87.boolean().optional(),
17732
- simStartOpen: z87.boolean().optional(),
17733
- connections: z87.custom().pipe(z87.record(z87.string(), connectionTarget)).optional()
17757
+ simStartClosed: z89.boolean().optional(),
17758
+ simStartOpen: z89.boolean().optional(),
17759
+ connections: z89.custom().pipe(z89.record(z89.string(), connectionTarget)).optional()
17734
17760
  }).transform((props) => {
17735
17761
  const updatedProps = { ...props };
17736
17762
  if (updatedProps.dpdt) {
@@ -17762,33 +17788,33 @@ expectTypesMatch(true);
17762
17788
 
17763
17789
  // lib/components/fabrication-note-text.ts
17764
17790
  import { length as length4 } from "circuit-json";
17765
- import { z as z88 } from "zod";
17791
+ import { z as z90 } from "zod";
17766
17792
  var fabricationNoteTextProps = pcbLayoutProps.extend({
17767
- text: z88.string(),
17768
- anchorAlignment: z88.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
17769
- font: z88.enum(["tscircuit2024"]).optional(),
17793
+ text: z90.string(),
17794
+ anchorAlignment: z90.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
17795
+ font: z90.enum(["tscircuit2024"]).optional(),
17770
17796
  fontSize: length4.optional(),
17771
- color: z88.string().optional()
17797
+ color: z90.string().optional()
17772
17798
  });
17773
17799
  expectTypesMatch(true);
17774
17800
 
17775
17801
  // lib/components/fabrication-note-rect.ts
17776
17802
  import { distance as distance21 } from "circuit-json";
17777
- import { z as z89 } from "zod";
17803
+ import { z as z91 } from "zod";
17778
17804
  var fabricationNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17779
17805
  width: distance21,
17780
17806
  height: distance21,
17781
17807
  strokeWidth: distance21.optional(),
17782
- isFilled: z89.boolean().optional(),
17783
- hasStroke: z89.boolean().optional(),
17784
- isStrokeDashed: z89.boolean().optional(),
17785
- color: z89.string().optional(),
17808
+ isFilled: z91.boolean().optional(),
17809
+ hasStroke: z91.boolean().optional(),
17810
+ isStrokeDashed: z91.boolean().optional(),
17811
+ color: z91.string().optional(),
17786
17812
  cornerRadius: distance21.optional()
17787
17813
  });
17788
17814
 
17789
17815
  // lib/components/fabrication-note-path.ts
17790
17816
  import { length as length5, route_hint_point as route_hint_point3 } from "circuit-json";
17791
- import { z as z90 } from "zod";
17817
+ import { z as z92 } from "zod";
17792
17818
  var fabricationNotePathProps = pcbLayoutProps.omit({
17793
17819
  pcbLeftEdgeX: true,
17794
17820
  pcbRightEdgeX: true,
@@ -17800,15 +17826,15 @@ var fabricationNotePathProps = pcbLayoutProps.omit({
17800
17826
  pcbOffsetY: true,
17801
17827
  pcbRotation: true
17802
17828
  }).extend({
17803
- route: z90.array(route_hint_point3),
17829
+ route: z92.array(route_hint_point3),
17804
17830
  strokeWidth: length5.optional(),
17805
- color: z90.string().optional()
17831
+ color: z92.string().optional()
17806
17832
  });
17807
17833
 
17808
17834
  // lib/components/fabrication-note-dimension.ts
17809
17835
  import { distance as distance22, length as length6 } from "circuit-json";
17810
- import { z as z91 } from "zod";
17811
- var dimensionTarget = z91.union([z91.string(), point]);
17836
+ import { z as z93 } from "zod";
17837
+ var dimensionTarget = z93.union([z93.string(), point]);
17812
17838
  var fabricationNoteDimensionProps = pcbLayoutProps.omit({
17813
17839
  pcbLeftEdgeX: true,
17814
17840
  pcbRightEdgeX: true,
@@ -17822,54 +17848,54 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
17822
17848
  }).extend({
17823
17849
  from: dimensionTarget,
17824
17850
  to: dimensionTarget,
17825
- text: z91.string().optional(),
17851
+ text: z93.string().optional(),
17826
17852
  offset: distance22.optional(),
17827
- font: z91.enum(["tscircuit2024"]).optional(),
17853
+ font: z93.enum(["tscircuit2024"]).optional(),
17828
17854
  fontSize: length6.optional(),
17829
- color: z91.string().optional(),
17855
+ color: z93.string().optional(),
17830
17856
  arrowSize: distance22.optional(),
17831
- units: z91.enum(["in", "mm"]).optional(),
17832
- outerEdgeToEdge: z91.literal(true).optional(),
17833
- centerToCenter: z91.literal(true).optional(),
17834
- innerEdgeToEdge: z91.literal(true).optional()
17857
+ units: z93.enum(["in", "mm"]).optional(),
17858
+ outerEdgeToEdge: z93.literal(true).optional(),
17859
+ centerToCenter: z93.literal(true).optional(),
17860
+ innerEdgeToEdge: z93.literal(true).optional()
17835
17861
  });
17836
17862
  expectTypesMatch(true);
17837
17863
 
17838
17864
  // lib/components/pcb-trace.ts
17839
17865
  import { distance as distance23, route_hint_point as route_hint_point4 } from "circuit-json";
17840
- import { z as z92 } from "zod";
17841
- var pcbTraceProps = z92.object({
17842
- layer: z92.string().optional(),
17866
+ import { z as z94 } from "zod";
17867
+ var pcbTraceProps = z94.object({
17868
+ layer: z94.string().optional(),
17843
17869
  thickness: distance23.optional(),
17844
- route: z92.array(route_hint_point4)
17870
+ route: z94.array(route_hint_point4)
17845
17871
  });
17846
17872
 
17847
17873
  // lib/components/via.ts
17848
17874
  import { distance as distance24, layer_ref as layer_ref6 } from "circuit-json";
17849
- import { z as z93 } from "zod";
17875
+ import { z as z95 } from "zod";
17850
17876
  var viaProps = commonLayoutProps.extend({
17851
- name: z93.string().optional(),
17877
+ name: z95.string().optional(),
17852
17878
  fromLayer: layer_ref6.optional(),
17853
17879
  toLayer: layer_ref6.optional(),
17854
17880
  holeDiameter: distance24.optional(),
17855
17881
  outerDiameter: distance24.optional(),
17856
- layers: z93.array(layer_ref6).optional(),
17857
- connectsTo: z93.string().or(z93.array(z93.string())).optional(),
17858
- netIsAssignable: z93.boolean().optional()
17882
+ layers: z95.array(layer_ref6).optional(),
17883
+ connectsTo: z95.string().or(z95.array(z95.string())).optional(),
17884
+ netIsAssignable: z95.boolean().optional()
17859
17885
  });
17860
17886
  expectTypesMatch(true);
17861
17887
 
17862
17888
  // lib/components/testpoint.ts
17863
17889
  import { distance as distance25 } from "circuit-json";
17864
- import { z as z94 } from "zod";
17890
+ import { z as z96 } from "zod";
17865
17891
  var testpointPins = ["pin1"];
17866
- var testpointConnectionsProp = z94.object({
17892
+ var testpointConnectionsProp = z96.object({
17867
17893
  pin1: connectionTarget
17868
17894
  }).strict();
17869
17895
  var testpointProps = commonComponentProps.extend({
17870
17896
  connections: testpointConnectionsProp.optional(),
17871
- footprintVariant: z94.enum(["pad", "through_hole"]).optional(),
17872
- padShape: z94.enum(["rect", "circle"]).optional().default("circle"),
17897
+ footprintVariant: z96.enum(["pad", "through_hole"]).optional(),
17898
+ padShape: z96.enum(["rect", "circle"]).optional().default("circle"),
17873
17899
  padDiameter: distance25.optional(),
17874
17900
  holeDiameter: distance25.optional(),
17875
17901
  width: distance25.optional(),
@@ -17881,45 +17907,45 @@ var testpointProps = commonComponentProps.extend({
17881
17907
  expectTypesMatch(true);
17882
17908
 
17883
17909
  // lib/components/breakoutpoint.ts
17884
- import { z as z95 } from "zod";
17910
+ import { z as z97 } from "zod";
17885
17911
  var breakoutPointProps = pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
17886
- connection: z95.string()
17912
+ connection: z97.string()
17887
17913
  });
17888
17914
  expectTypesMatch(true);
17889
17915
 
17890
17916
  // lib/components/pcb-keepout.ts
17891
17917
  import { distance as distance26, layer_ref as layer_ref7 } from "circuit-json";
17892
- import { z as z96 } from "zod";
17893
- var pcbKeepoutProps = z96.union([
17918
+ import { z as z98 } from "zod";
17919
+ var pcbKeepoutProps = z98.union([
17894
17920
  pcbLayoutProps.omit({ pcbRotation: true }).extend({
17895
- shape: z96.literal("circle"),
17921
+ shape: z98.literal("circle"),
17896
17922
  radius: distance26,
17897
- layers: z96.array(layer_ref7).optional()
17923
+ layers: z98.array(layer_ref7).optional()
17898
17924
  }),
17899
17925
  pcbLayoutProps.extend({
17900
- shape: z96.literal("rect"),
17926
+ shape: z98.literal("rect"),
17901
17927
  width: distance26,
17902
17928
  height: distance26,
17903
- layers: z96.array(layer_ref7).optional()
17929
+ layers: z98.array(layer_ref7).optional()
17904
17930
  })
17905
17931
  ]);
17906
17932
 
17907
17933
  // lib/components/courtyard-rect.ts
17908
17934
  import { distance as distance27 } from "circuit-json";
17909
- import { z as z97 } from "zod";
17935
+ import { z as z99 } from "zod";
17910
17936
  var courtyardRectProps = pcbLayoutProps.extend({
17911
17937
  width: distance27,
17912
17938
  height: distance27,
17913
17939
  strokeWidth: distance27.optional(),
17914
- isFilled: z97.boolean().optional(),
17915
- hasStroke: z97.boolean().optional(),
17916
- isStrokeDashed: z97.boolean().optional(),
17917
- color: z97.string().optional()
17940
+ isFilled: z99.boolean().optional(),
17941
+ hasStroke: z99.boolean().optional(),
17942
+ isStrokeDashed: z99.boolean().optional(),
17943
+ color: z99.string().optional()
17918
17944
  });
17919
17945
 
17920
17946
  // lib/components/courtyard-outline.ts
17921
17947
  import { length as length7 } from "circuit-json";
17922
- import { z as z98 } from "zod";
17948
+ import { z as z100 } from "zod";
17923
17949
  var courtyardOutlineProps = pcbLayoutProps.omit({
17924
17950
  pcbLeftEdgeX: true,
17925
17951
  pcbRightEdgeX: true,
@@ -17931,11 +17957,11 @@ var courtyardOutlineProps = pcbLayoutProps.omit({
17931
17957
  pcbOffsetY: true,
17932
17958
  pcbRotation: true
17933
17959
  }).extend({
17934
- outline: z98.array(point),
17960
+ outline: z100.array(point),
17935
17961
  strokeWidth: length7.optional(),
17936
- isClosed: z98.boolean().optional(),
17937
- isStrokeDashed: z98.boolean().optional(),
17938
- color: z98.string().optional()
17962
+ isClosed: z100.boolean().optional(),
17963
+ isStrokeDashed: z100.boolean().optional(),
17964
+ color: z100.string().optional()
17939
17965
  });
17940
17966
 
17941
17967
  // lib/components/courtyard-circle.ts
@@ -17955,35 +17981,35 @@ var courtyardPillProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17955
17981
  });
17956
17982
 
17957
17983
  // lib/components/copper-pour.ts
17958
- import { z as z101 } from "zod";
17984
+ import { z as z103 } from "zod";
17959
17985
  import { layer_ref as layer_ref8 } from "circuit-json";
17960
- var copperPourProps = z101.object({
17961
- name: z101.string().optional(),
17986
+ var copperPourProps = z103.object({
17987
+ name: z103.string().optional(),
17962
17988
  layer: layer_ref8,
17963
- connectsTo: z101.string(),
17964
- unbroken: z101.boolean().optional(),
17989
+ connectsTo: z103.string(),
17990
+ unbroken: z103.boolean().optional(),
17965
17991
  padMargin: distance.optional(),
17966
17992
  traceMargin: distance.optional(),
17967
17993
  clearance: distance.optional(),
17968
17994
  boardEdgeMargin: distance.optional(),
17969
17995
  cutoutMargin: distance.optional(),
17970
- outline: z101.array(point).optional(),
17971
- coveredWithSolderMask: z101.boolean().optional().default(true)
17996
+ outline: z103.array(point).optional(),
17997
+ coveredWithSolderMask: z103.boolean().optional().default(true)
17972
17998
  });
17973
17999
  expectTypesMatch(true);
17974
18000
 
17975
18001
  // lib/components/cadassembly.ts
17976
18002
  import { layer_ref as layer_ref9 } from "circuit-json";
17977
- import { z as z102 } from "zod";
17978
- var cadassemblyProps = z102.object({
18003
+ import { z as z104 } from "zod";
18004
+ var cadassemblyProps = z104.object({
17979
18005
  originalLayer: layer_ref9.default("top").optional(),
17980
- children: z102.any().optional()
18006
+ children: z104.any().optional()
17981
18007
  });
17982
18008
  expectTypesMatch(true);
17983
18009
 
17984
18010
  // lib/components/cadmodel.ts
17985
- import { z as z103 } from "zod";
17986
- var pcbPosition = z103.object({
18011
+ import { z as z105 } from "zod";
18012
+ var pcbPosition = z105.object({
17987
18013
  pcbX: pcbCoordinate.optional(),
17988
18014
  pcbY: pcbCoordinate.optional(),
17989
18015
  pcbLeftEdgeX: pcbCoordinate.optional(),
@@ -18000,7 +18026,7 @@ var cadModelBaseWithUrl = cadModelBase.extend({
18000
18026
  });
18001
18027
  var cadModelObject = cadModelBaseWithUrl.merge(pcbPosition);
18002
18028
  expectTypesMatch(true);
18003
- var cadmodelProps = z103.union([z103.null(), url, cadModelObject]);
18029
+ var cadmodelProps = z105.union([z105.null(), url, cadModelObject]);
18004
18030
 
18005
18031
  // lib/components/power-source.ts
18006
18032
  import { voltage as voltage3 } from "circuit-json";
@@ -18010,9 +18036,9 @@ var powerSourceProps = commonComponentProps.extend({
18010
18036
 
18011
18037
  // lib/components/voltagesource.ts
18012
18038
  import { frequency as frequency4, ms as ms3, rotation as rotation5, voltage as voltage4 } from "circuit-json";
18013
- import { z as z104 } from "zod";
18039
+ import { z as z106 } from "zod";
18014
18040
  var voltageSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
18015
- var percentage = z104.union([z104.string(), z104.number()]).transform((val) => {
18041
+ var percentage = z106.union([z106.string(), z106.number()]).transform((val) => {
18016
18042
  if (typeof val === "string") {
18017
18043
  if (val.endsWith("%")) {
18018
18044
  return parseFloat(val.slice(0, -1)) / 100;
@@ -18021,13 +18047,13 @@ var percentage = z104.union([z104.string(), z104.number()]).transform((val) => {
18021
18047
  }
18022
18048
  return val;
18023
18049
  }).pipe(
18024
- z104.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18050
+ z106.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18025
18051
  );
18026
18052
  var voltageSourceProps = commonComponentProps.extend({
18027
18053
  voltage: voltage4.optional(),
18028
18054
  frequency: frequency4.optional(),
18029
18055
  peakToPeakVoltage: voltage4.optional(),
18030
- waveShape: z104.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18056
+ waveShape: z106.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18031
18057
  phase: rotation5.optional(),
18032
18058
  dutyCycle: percentage.optional(),
18033
18059
  pulseDelay: ms3.optional(),
@@ -18042,9 +18068,9 @@ expectTypesMatch(true);
18042
18068
 
18043
18069
  // lib/components/currentsource.ts
18044
18070
  import { frequency as frequency5, rotation as rotation6, current } from "circuit-json";
18045
- import { z as z105 } from "zod";
18071
+ import { z as z107 } from "zod";
18046
18072
  var currentSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
18047
- var percentage2 = z105.union([z105.string(), z105.number()]).transform((val) => {
18073
+ var percentage2 = z107.union([z107.string(), z107.number()]).transform((val) => {
18048
18074
  if (typeof val === "string") {
18049
18075
  if (val.endsWith("%")) {
18050
18076
  return parseFloat(val.slice(0, -1)) / 100;
@@ -18053,13 +18079,13 @@ var percentage2 = z105.union([z105.string(), z105.number()]).transform((val) =>
18053
18079
  }
18054
18080
  return val;
18055
18081
  }).pipe(
18056
- z105.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18082
+ z107.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18057
18083
  );
18058
18084
  var currentSourceProps = commonComponentProps.extend({
18059
18085
  current: current.optional(),
18060
18086
  frequency: frequency5.optional(),
18061
18087
  peakToPeakCurrent: current.optional(),
18062
- waveShape: z105.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18088
+ waveShape: z107.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18063
18089
  phase: rotation6.optional(),
18064
18090
  dutyCycle: percentage2.optional(),
18065
18091
  connections: createConnectionsProp(currentSourcePinLabels).optional()
@@ -18068,21 +18094,21 @@ var currentSourcePins = lrPolarPins;
18068
18094
  expectTypesMatch(true);
18069
18095
 
18070
18096
  // lib/components/voltageprobe.ts
18071
- import { z as z106 } from "zod";
18097
+ import { z as z108 } from "zod";
18072
18098
  var voltageProbeProps = commonComponentProps.omit({ name: true }).extend({
18073
- name: z106.string().optional(),
18074
- connectsTo: z106.string(),
18075
- referenceTo: z106.string().optional(),
18076
- color: z106.string().optional(),
18077
- graphDisplayName: z106.string().optional(),
18078
- graphCenter: z106.number().optional(),
18079
- graphVerticalOffset: z106.number().or(z106.string()).optional(),
18080
- graphVoltagePerDiv: z106.number().or(z106.string()).optional()
18099
+ name: z108.string().optional(),
18100
+ connectsTo: z108.string(),
18101
+ referenceTo: z108.string().optional(),
18102
+ color: z108.string().optional(),
18103
+ graphDisplayName: z108.string().optional(),
18104
+ graphCenter: z108.number().optional(),
18105
+ graphVerticalOffset: z108.number().or(z108.string()).optional(),
18106
+ graphVoltagePerDiv: z108.number().or(z108.string()).optional()
18081
18107
  });
18082
18108
  expectTypesMatch(true);
18083
18109
 
18084
18110
  // lib/components/ammeter.ts
18085
- import { z as z107 } from "zod";
18111
+ import { z as z109 } from "zod";
18086
18112
  var ammeterPinLabels = ["pin1", "pin2", "pos", "neg"];
18087
18113
  var hasAmmeterConnectionPair = (connections) => {
18088
18114
  return connections.pos !== void 0 && connections.neg !== void 0 || connections.pin1 !== void 0 && connections.pin2 !== void 0;
@@ -18092,57 +18118,57 @@ var ammeterProps = commonComponentProps.extend({
18092
18118
  hasAmmeterConnectionPair,
18093
18119
  "Ammeter connections must include either pos/neg or pin1/pin2"
18094
18120
  ),
18095
- color: z107.string().optional(),
18096
- graphDisplayName: z107.string().optional(),
18097
- graphCenter: z107.number().optional(),
18098
- graphVerticalOffset: z107.number().or(z107.string()).optional(),
18099
- graphCurrentPerDiv: z107.number().or(z107.string()).optional()
18121
+ color: z109.string().optional(),
18122
+ graphDisplayName: z109.string().optional(),
18123
+ graphCenter: z109.number().optional(),
18124
+ graphVerticalOffset: z109.number().or(z109.string()).optional(),
18125
+ graphCurrentPerDiv: z109.number().or(z109.string()).optional()
18100
18126
  });
18101
18127
  var ammeterPins = ammeterPinLabels;
18102
18128
  expectTypesMatch(true);
18103
18129
 
18104
18130
  // lib/components/schematic-arc.ts
18105
18131
  import { distance as distance30, point as point5, rotation as rotation7 } from "circuit-json";
18106
- import { z as z108 } from "zod";
18107
- var schematicArcProps = z108.object({
18132
+ import { z as z110 } from "zod";
18133
+ var schematicArcProps = z110.object({
18108
18134
  center: point5,
18109
18135
  radius: distance30,
18110
18136
  startAngleDegrees: rotation7,
18111
18137
  endAngleDegrees: rotation7,
18112
- direction: z108.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
18138
+ direction: z110.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
18113
18139
  strokeWidth: distance30.optional(),
18114
- color: z108.string().optional(),
18115
- isDashed: z108.boolean().optional().default(false)
18140
+ color: z110.string().optional(),
18141
+ isDashed: z110.boolean().optional().default(false)
18116
18142
  });
18117
18143
  expectTypesMatch(true);
18118
18144
 
18119
18145
  // lib/components/toolingrail.ts
18120
- import { z as z109 } from "zod";
18121
- var toolingrailProps = z109.object({
18122
- children: z109.any().optional()
18146
+ import { z as z111 } from "zod";
18147
+ var toolingrailProps = z111.object({
18148
+ children: z111.any().optional()
18123
18149
  });
18124
18150
  expectTypesMatch(true);
18125
18151
 
18126
18152
  // lib/components/schematic-box.ts
18127
18153
  import { distance as distance31 } from "circuit-json";
18128
- import { z as z110 } from "zod";
18129
- var schematicBoxProps = z110.object({
18154
+ import { z as z112 } from "zod";
18155
+ var schematicBoxProps = z112.object({
18130
18156
  schX: distance31.optional(),
18131
18157
  schY: distance31.optional(),
18132
18158
  width: distance31.optional(),
18133
18159
  height: distance31.optional(),
18134
- overlay: z110.array(z110.string()).optional(),
18160
+ overlay: z112.array(z112.string()).optional(),
18135
18161
  padding: distance31.optional(),
18136
18162
  paddingLeft: distance31.optional(),
18137
18163
  paddingRight: distance31.optional(),
18138
18164
  paddingTop: distance31.optional(),
18139
18165
  paddingBottom: distance31.optional(),
18140
- title: z110.string().optional(),
18166
+ title: z112.string().optional(),
18141
18167
  titleAlignment: ninePointAnchor.default("top_left"),
18142
- titleColor: z110.string().optional(),
18168
+ titleColor: z112.string().optional(),
18143
18169
  titleFontSize: distance31.optional(),
18144
- titleInside: z110.boolean().default(false),
18145
- strokeStyle: z110.enum(["solid", "dashed"]).default("solid")
18170
+ titleInside: z112.boolean().default(false),
18171
+ strokeStyle: z112.enum(["solid", "dashed"]).default("solid")
18146
18172
  }).refine(
18147
18173
  (elm) => elm.width !== void 0 && elm.height !== void 0 || Array.isArray(elm.overlay) && elm.overlay.length > 0,
18148
18174
  {
@@ -18158,15 +18184,15 @@ expectTypesMatch(true);
18158
18184
 
18159
18185
  // lib/components/schematic-circle.ts
18160
18186
  import { distance as distance32, point as point6 } from "circuit-json";
18161
- import { z as z111 } from "zod";
18162
- var schematicCircleProps = z111.object({
18187
+ import { z as z113 } from "zod";
18188
+ var schematicCircleProps = z113.object({
18163
18189
  center: point6,
18164
18190
  radius: distance32,
18165
18191
  strokeWidth: distance32.optional(),
18166
- color: z111.string().optional(),
18167
- isFilled: z111.boolean().optional().default(false),
18168
- fillColor: z111.string().optional(),
18169
- isDashed: z111.boolean().optional().default(false)
18192
+ color: z113.string().optional(),
18193
+ isFilled: z113.boolean().optional().default(false),
18194
+ fillColor: z113.string().optional(),
18195
+ isDashed: z113.boolean().optional().default(false)
18170
18196
  });
18171
18197
  expectTypesMatch(
18172
18198
  true
@@ -18174,32 +18200,32 @@ expectTypesMatch(
18174
18200
 
18175
18201
  // lib/components/schematic-rect.ts
18176
18202
  import { distance as distance33, rotation as rotation8 } from "circuit-json";
18177
- import { z as z112 } from "zod";
18178
- var schematicRectProps = z112.object({
18203
+ import { z as z114 } from "zod";
18204
+ var schematicRectProps = z114.object({
18179
18205
  schX: distance33.optional(),
18180
18206
  schY: distance33.optional(),
18181
18207
  width: distance33,
18182
18208
  height: distance33,
18183
18209
  rotation: rotation8.default(0),
18184
18210
  strokeWidth: distance33.optional(),
18185
- color: z112.string().optional(),
18186
- isFilled: z112.boolean().optional().default(false),
18187
- fillColor: z112.string().optional(),
18188
- isDashed: z112.boolean().optional().default(false)
18211
+ color: z114.string().optional(),
18212
+ isFilled: z114.boolean().optional().default(false),
18213
+ fillColor: z114.string().optional(),
18214
+ isDashed: z114.boolean().optional().default(false)
18189
18215
  });
18190
18216
  expectTypesMatch(true);
18191
18217
 
18192
18218
  // lib/components/schematic-line.ts
18193
18219
  import { distance as distance34 } from "circuit-json";
18194
- import { z as z113 } from "zod";
18195
- var schematicLineProps = z113.object({
18220
+ import { z as z115 } from "zod";
18221
+ var schematicLineProps = z115.object({
18196
18222
  x1: distance34,
18197
18223
  y1: distance34,
18198
18224
  x2: distance34,
18199
18225
  y2: distance34,
18200
18226
  strokeWidth: distance34.optional(),
18201
- color: z113.string().optional(),
18202
- isDashed: z113.boolean().optional().default(false),
18227
+ color: z115.string().optional(),
18228
+ isDashed: z115.boolean().optional().default(false),
18203
18229
  dashLength: distance34.optional(),
18204
18230
  dashGap: distance34.optional()
18205
18231
  });
@@ -18207,11 +18233,11 @@ expectTypesMatch(true);
18207
18233
 
18208
18234
  // lib/components/schematic-text.ts
18209
18235
  import { distance as distance35, rotation as rotation9 } from "circuit-json";
18210
- import { z as z115 } from "zod";
18236
+ import { z as z117 } from "zod";
18211
18237
 
18212
18238
  // lib/common/fivePointAnchor.ts
18213
- import { z as z114 } from "zod";
18214
- var fivePointAnchor = z114.enum([
18239
+ import { z as z116 } from "zod";
18240
+ var fivePointAnchor = z116.enum([
18215
18241
  "center",
18216
18242
  "left",
18217
18243
  "right",
@@ -18220,39 +18246,39 @@ var fivePointAnchor = z114.enum([
18220
18246
  ]);
18221
18247
 
18222
18248
  // lib/components/schematic-text.ts
18223
- var schematicTextProps = z115.object({
18249
+ var schematicTextProps = z117.object({
18224
18250
  schX: distance35.optional(),
18225
18251
  schY: distance35.optional(),
18226
- text: z115.string(),
18227
- fontSize: z115.number().default(1),
18228
- anchor: z115.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
18229
- color: z115.string().default("#000000"),
18252
+ text: z117.string(),
18253
+ fontSize: z117.number().default(1),
18254
+ anchor: z117.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
18255
+ color: z117.string().default("#000000"),
18230
18256
  schRotation: rotation9.default(0)
18231
18257
  });
18232
18258
  expectTypesMatch(true);
18233
18259
 
18234
18260
  // lib/components/schematic-path.ts
18235
18261
  import { distance as distance36, point as point7 } from "circuit-json";
18236
- import { z as z116 } from "zod";
18237
- var schematicPathProps = z116.object({
18238
- points: z116.array(point7).optional(),
18239
- svgPath: z116.string().optional(),
18262
+ import { z as z118 } from "zod";
18263
+ var schematicPathProps = z118.object({
18264
+ points: z118.array(point7).optional(),
18265
+ svgPath: z118.string().optional(),
18240
18266
  strokeWidth: distance36.optional(),
18241
- strokeColor: z116.string().optional(),
18267
+ strokeColor: z118.string().optional(),
18242
18268
  dashLength: distance36.optional(),
18243
18269
  dashGap: distance36.optional(),
18244
- isFilled: z116.boolean().optional().default(false),
18245
- fillColor: z116.string().optional()
18270
+ isFilled: z118.boolean().optional().default(false),
18271
+ fillColor: z118.string().optional()
18246
18272
  });
18247
18273
  expectTypesMatch(true);
18248
18274
 
18249
18275
  // lib/components/schematic-table.ts
18250
18276
  import { distance as distance37 } from "circuit-json";
18251
- import { z as z117 } from "zod";
18252
- var schematicTableProps = z117.object({
18277
+ import { z as z119 } from "zod";
18278
+ var schematicTableProps = z119.object({
18253
18279
  schX: distance37.optional(),
18254
18280
  schY: distance37.optional(),
18255
- children: z117.any().optional(),
18281
+ children: z119.any().optional(),
18256
18282
  cellPadding: distance37.optional(),
18257
18283
  borderWidth: distance37.optional(),
18258
18284
  anchor: ninePointAnchor.optional(),
@@ -18262,34 +18288,34 @@ expectTypesMatch(true);
18262
18288
 
18263
18289
  // lib/components/schematic-row.ts
18264
18290
  import { distance as distance38 } from "circuit-json";
18265
- import { z as z118 } from "zod";
18266
- var schematicRowProps = z118.object({
18267
- children: z118.any().optional(),
18291
+ import { z as z120 } from "zod";
18292
+ var schematicRowProps = z120.object({
18293
+ children: z120.any().optional(),
18268
18294
  height: distance38.optional()
18269
18295
  });
18270
18296
  expectTypesMatch(true);
18271
18297
 
18272
18298
  // lib/components/schematic-cell.ts
18273
18299
  import { distance as distance39 } from "circuit-json";
18274
- import { z as z119 } from "zod";
18275
- var schematicCellProps = z119.object({
18276
- children: z119.string().optional(),
18277
- horizontalAlign: z119.enum(["left", "center", "right"]).optional(),
18278
- verticalAlign: z119.enum(["top", "middle", "bottom"]).optional(),
18300
+ import { z as z121 } from "zod";
18301
+ var schematicCellProps = z121.object({
18302
+ children: z121.string().optional(),
18303
+ horizontalAlign: z121.enum(["left", "center", "right"]).optional(),
18304
+ verticalAlign: z121.enum(["top", "middle", "bottom"]).optional(),
18279
18305
  fontSize: distance39.optional(),
18280
- rowSpan: z119.number().optional(),
18281
- colSpan: z119.number().optional(),
18306
+ rowSpan: z121.number().optional(),
18307
+ colSpan: z121.number().optional(),
18282
18308
  width: distance39.optional(),
18283
- text: z119.string().optional()
18309
+ text: z121.string().optional()
18284
18310
  });
18285
18311
  expectTypesMatch(true);
18286
18312
 
18287
18313
  // lib/components/schematic-section.ts
18288
18314
  import { distance as distance40 } from "circuit-json";
18289
- import { z as z120 } from "zod";
18290
- var schematicSectionProps = z120.object({
18291
- displayName: z120.string().optional(),
18292
- name: z120.string(),
18315
+ import { z as z122 } from "zod";
18316
+ var schematicSectionProps = z122.object({
18317
+ displayName: z122.string().optional(),
18318
+ name: z122.string(),
18293
18319
  sectionTitleFontSize: distance40.optional()
18294
18320
  });
18295
18321
  expectTypesMatch(
@@ -18297,51 +18323,51 @@ expectTypesMatch(
18297
18323
  );
18298
18324
 
18299
18325
  // lib/components/schematic-sheet.ts
18300
- import { z as z121 } from "zod";
18301
- var schematicSheetProps = z121.object({
18302
- name: z121.string(),
18303
- displayName: z121.string(),
18304
- sheetIndex: z121.number().optional(),
18305
- children: z121.any().optional()
18326
+ import { z as z123 } from "zod";
18327
+ var schematicSheetProps = z123.object({
18328
+ name: z123.string(),
18329
+ displayName: z123.string(),
18330
+ sheetIndex: z123.number().optional(),
18331
+ children: z123.any().optional()
18306
18332
  });
18307
18333
  expectTypesMatch(true);
18308
18334
 
18309
18335
  // lib/components/copper-text.ts
18310
18336
  import { layer_ref as layer_ref10, length as length8 } from "circuit-json";
18311
- import { z as z122 } from "zod";
18337
+ import { z as z124 } from "zod";
18312
18338
  var copperTextProps = pcbLayoutProps.extend({
18313
- text: z122.string(),
18339
+ text: z124.string(),
18314
18340
  anchorAlignment: ninePointAnchor.default("center"),
18315
- font: z122.enum(["tscircuit2024"]).optional(),
18341
+ font: z124.enum(["tscircuit2024"]).optional(),
18316
18342
  fontSize: length8.optional(),
18317
- layers: z122.array(layer_ref10).optional(),
18318
- knockout: z122.boolean().optional(),
18319
- mirrored: z122.boolean().optional()
18343
+ layers: z124.array(layer_ref10).optional(),
18344
+ knockout: z124.boolean().optional(),
18345
+ mirrored: z124.boolean().optional()
18320
18346
  });
18321
18347
 
18322
18348
  // lib/components/silkscreen-text.ts
18323
18349
  import { layer_ref as layer_ref11, length as length9 } from "circuit-json";
18324
- import { z as z123 } from "zod";
18350
+ import { z as z125 } from "zod";
18325
18351
  var silkscreenTextProps = pcbLayoutProps.extend({
18326
- text: z123.string(),
18352
+ text: z125.string(),
18327
18353
  anchorAlignment: ninePointAnchor.default("center"),
18328
- font: z123.enum(["tscircuit2024"]).optional(),
18354
+ font: z125.enum(["tscircuit2024"]).optional(),
18329
18355
  fontSize: length9.optional(),
18330
18356
  /**
18331
18357
  * If true, text will knock out underlying silkscreen
18332
18358
  */
18333
- isKnockout: z123.boolean().optional(),
18359
+ isKnockout: z125.boolean().optional(),
18334
18360
  knockoutPadding: length9.optional(),
18335
18361
  knockoutPaddingLeft: length9.optional(),
18336
18362
  knockoutPaddingRight: length9.optional(),
18337
18363
  knockoutPaddingTop: length9.optional(),
18338
18364
  knockoutPaddingBottom: length9.optional(),
18339
- layers: z123.array(layer_ref11).optional()
18365
+ layers: z125.array(layer_ref11).optional()
18340
18366
  });
18341
18367
 
18342
18368
  // lib/components/silkscreen-path.ts
18343
18369
  import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
18344
- import { z as z124 } from "zod";
18370
+ import { z as z126 } from "zod";
18345
18371
  var silkscreenPathProps = pcbLayoutProps.omit({
18346
18372
  pcbLeftEdgeX: true,
18347
18373
  pcbRightEdgeX: true,
@@ -18353,7 +18379,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
18353
18379
  pcbOffsetY: true,
18354
18380
  pcbRotation: true
18355
18381
  }).extend({
18356
- route: z124.array(route_hint_point5),
18382
+ route: z126.array(route_hint_point5),
18357
18383
  strokeWidth: length10.optional()
18358
18384
  });
18359
18385
 
@@ -18375,10 +18401,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({
18375
18401
 
18376
18402
  // lib/components/silkscreen-rect.ts
18377
18403
  import { distance as distance42 } from "circuit-json";
18378
- import { z as z125 } from "zod";
18404
+ import { z as z127 } from "zod";
18379
18405
  var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18380
- filled: z125.boolean().default(true).optional(),
18381
- stroke: z125.enum(["dashed", "solid", "none"]).optional(),
18406
+ filled: z127.boolean().default(true).optional(),
18407
+ stroke: z127.enum(["dashed", "solid", "none"]).optional(),
18382
18408
  strokeWidth: distance42.optional(),
18383
18409
  width: distance42,
18384
18410
  height: distance42,
@@ -18387,10 +18413,10 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18387
18413
 
18388
18414
  // lib/components/silkscreen-circle.ts
18389
18415
  import { distance as distance43 } from "circuit-json";
18390
- import { z as z126 } from "zod";
18416
+ import { z as z128 } from "zod";
18391
18417
  var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18392
- isFilled: z126.boolean().optional(),
18393
- isOutline: z126.boolean().optional(),
18418
+ isFilled: z128.boolean().optional(),
18419
+ isOutline: z128.boolean().optional(),
18394
18420
  strokeWidth: distance43.optional(),
18395
18421
  radius: distance43
18396
18422
  });
@@ -18408,63 +18434,63 @@ expectTypesMatch(true);
18408
18434
 
18409
18435
  // lib/components/trace-hint.ts
18410
18436
  import { distance as distance44, layer_ref as layer_ref12, route_hint_point as route_hint_point6 } from "circuit-json";
18411
- import { z as z128 } from "zod";
18412
- var routeHintPointProps = z128.object({
18437
+ import { z as z130 } from "zod";
18438
+ var routeHintPointProps = z130.object({
18413
18439
  x: distance44,
18414
18440
  y: distance44,
18415
- via: z128.boolean().optional(),
18441
+ via: z130.boolean().optional(),
18416
18442
  toLayer: layer_ref12.optional()
18417
18443
  });
18418
- var traceHintProps = z128.object({
18419
- for: z128.string().optional().describe(
18444
+ var traceHintProps = z130.object({
18445
+ for: z130.string().optional().describe(
18420
18446
  "Selector for the port you're targeting, not required if you're inside a trace"
18421
18447
  ),
18422
- order: z128.number().optional(),
18448
+ order: z130.number().optional(),
18423
18449
  offset: route_hint_point6.or(routeHintPointProps).optional(),
18424
- offsets: z128.array(route_hint_point6).or(z128.array(routeHintPointProps)).optional(),
18425
- traceWidth: z128.number().optional()
18450
+ offsets: z130.array(route_hint_point6).or(z130.array(routeHintPointProps)).optional(),
18451
+ traceWidth: z130.number().optional()
18426
18452
  });
18427
18453
 
18428
18454
  // lib/components/port.ts
18429
- import { z as z129 } from "zod";
18455
+ import { z as z131 } from "zod";
18430
18456
  var portProps = commonLayoutProps.extend({
18431
- name: z129.string().optional(),
18432
- pinNumber: z129.number().optional(),
18433
- schStemLength: z129.number().optional(),
18434
- aliases: z129.array(z129.string()).optional(),
18435
- layer: z129.string().optional(),
18436
- layers: z129.array(z129.string()).optional(),
18437
- schX: z129.number().optional(),
18438
- schY: z129.number().optional(),
18457
+ name: z131.string().optional(),
18458
+ pinNumber: z131.number().optional(),
18459
+ schStemLength: z131.number().optional(),
18460
+ aliases: z131.array(z131.string()).optional(),
18461
+ layer: z131.string().optional(),
18462
+ layers: z131.array(z131.string()).optional(),
18463
+ schX: z131.number().optional(),
18464
+ schY: z131.number().optional(),
18439
18465
  direction: direction.optional(),
18440
- connectsTo: z129.string().or(z129.array(z129.string())).optional(),
18466
+ connectsTo: z131.string().or(z131.array(z131.string())).optional(),
18441
18467
  kicadPinMetadata: kicadPinMetadata.optional(),
18442
- hasInversionCircle: z129.boolean().optional()
18468
+ hasInversionCircle: z131.boolean().optional()
18443
18469
  });
18444
18470
 
18445
18471
  // lib/components/pcb-note-text.ts
18446
18472
  import { length as length11 } from "circuit-json";
18447
- import { z as z130 } from "zod";
18473
+ import { z as z132 } from "zod";
18448
18474
  var pcbNoteTextProps = pcbLayoutProps.extend({
18449
- text: z130.string(),
18450
- anchorAlignment: z130.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
18451
- font: z130.enum(["tscircuit2024"]).optional(),
18475
+ text: z132.string(),
18476
+ anchorAlignment: z132.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
18477
+ font: z132.enum(["tscircuit2024"]).optional(),
18452
18478
  fontSize: length11.optional(),
18453
- color: z130.string().optional()
18479
+ color: z132.string().optional()
18454
18480
  });
18455
18481
  expectTypesMatch(true);
18456
18482
 
18457
18483
  // lib/components/pcb-note-rect.ts
18458
18484
  import { distance as distance45 } from "circuit-json";
18459
- import { z as z131 } from "zod";
18485
+ import { z as z133 } from "zod";
18460
18486
  var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18461
18487
  width: distance45,
18462
18488
  height: distance45,
18463
18489
  strokeWidth: distance45.optional(),
18464
- isFilled: z131.boolean().optional(),
18465
- hasStroke: z131.boolean().optional(),
18466
- isStrokeDashed: z131.boolean().optional(),
18467
- color: z131.string().optional(),
18490
+ isFilled: z133.boolean().optional(),
18491
+ hasStroke: z133.boolean().optional(),
18492
+ isStrokeDashed: z133.boolean().optional(),
18493
+ color: z133.string().optional(),
18468
18494
  cornerRadius: distance45.optional()
18469
18495
  });
18470
18496
  expectTypesMatch(true);
@@ -18474,7 +18500,7 @@ import {
18474
18500
  length as length12,
18475
18501
  route_hint_point as route_hint_point7
18476
18502
  } from "circuit-json";
18477
- import { z as z132 } from "zod";
18503
+ import { z as z134 } from "zod";
18478
18504
  var pcbNotePathProps = pcbLayoutProps.omit({
18479
18505
  pcbLeftEdgeX: true,
18480
18506
  pcbRightEdgeX: true,
@@ -18486,15 +18512,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
18486
18512
  pcbOffsetY: true,
18487
18513
  pcbRotation: true
18488
18514
  }).extend({
18489
- route: z132.array(route_hint_point7),
18515
+ route: z134.array(route_hint_point7),
18490
18516
  strokeWidth: length12.optional(),
18491
- color: z132.string().optional()
18517
+ color: z134.string().optional()
18492
18518
  });
18493
18519
  expectTypesMatch(true);
18494
18520
 
18495
18521
  // lib/components/pcb-note-line.ts
18496
18522
  import { distance as distance46 } from "circuit-json";
18497
- import { z as z133 } from "zod";
18523
+ import { z as z135 } from "zod";
18498
18524
  var pcbNoteLineProps = pcbLayoutProps.omit({
18499
18525
  pcbLeftEdgeX: true,
18500
18526
  pcbRightEdgeX: true,
@@ -18511,15 +18537,15 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
18511
18537
  x2: distance46,
18512
18538
  y2: distance46,
18513
18539
  strokeWidth: distance46.optional(),
18514
- color: z133.string().optional(),
18515
- isDashed: z133.boolean().optional()
18540
+ color: z135.string().optional(),
18541
+ isDashed: z135.boolean().optional()
18516
18542
  });
18517
18543
  expectTypesMatch(true);
18518
18544
 
18519
18545
  // lib/components/pcb-note-dimension.ts
18520
18546
  import { distance as distance47, length as length13 } from "circuit-json";
18521
- import { z as z134 } from "zod";
18522
- var dimensionTarget2 = z134.union([z134.string(), point]);
18547
+ import { z as z136 } from "zod";
18548
+ var dimensionTarget2 = z136.union([z136.string(), point]);
18523
18549
  var pcbNoteDimensionProps = pcbLayoutProps.omit({
18524
18550
  pcbLeftEdgeX: true,
18525
18551
  pcbRightEdgeX: true,
@@ -18533,101 +18559,101 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
18533
18559
  }).extend({
18534
18560
  from: dimensionTarget2,
18535
18561
  to: dimensionTarget2,
18536
- text: z134.string().optional(),
18562
+ text: z136.string().optional(),
18537
18563
  offset: distance47.optional(),
18538
- font: z134.enum(["tscircuit2024"]).optional(),
18564
+ font: z136.enum(["tscircuit2024"]).optional(),
18539
18565
  fontSize: length13.optional(),
18540
- color: z134.string().optional(),
18566
+ color: z136.string().optional(),
18541
18567
  arrowSize: distance47.optional(),
18542
- units: z134.enum(["in", "mm"]).optional(),
18543
- outerEdgeToEdge: z134.literal(true).optional(),
18544
- centerToCenter: z134.literal(true).optional(),
18545
- innerEdgeToEdge: z134.literal(true).optional()
18568
+ units: z136.enum(["in", "mm"]).optional(),
18569
+ outerEdgeToEdge: z136.literal(true).optional(),
18570
+ centerToCenter: z136.literal(true).optional(),
18571
+ innerEdgeToEdge: z136.literal(true).optional()
18546
18572
  });
18547
18573
  expectTypesMatch(
18548
18574
  true
18549
18575
  );
18550
18576
 
18551
18577
  // lib/platformConfig.ts
18552
- import { z as z135 } from "zod";
18553
- var unvalidatedCircuitJson = z135.array(z135.any()).describe("Circuit JSON");
18554
- var footprintLibraryResult = z135.object({
18555
- footprintCircuitJson: z135.array(z135.any()),
18578
+ import { z as z137 } from "zod";
18579
+ var unvalidatedCircuitJson = z137.array(z137.any()).describe("Circuit JSON");
18580
+ var footprintLibraryResult = z137.object({
18581
+ footprintCircuitJson: z137.array(z137.any()),
18556
18582
  cadModel: cadModelProp.optional()
18557
18583
  });
18558
- var pathToCircuitJsonFn = z135.function().args(z135.string()).returns(z135.promise(footprintLibraryResult)).or(
18559
- z135.function().args(
18560
- z135.string(),
18561
- z135.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
18562
- ).returns(z135.promise(footprintLibraryResult))
18584
+ var pathToCircuitJsonFn = z137.function().args(z137.string()).returns(z137.promise(footprintLibraryResult)).or(
18585
+ z137.function().args(
18586
+ z137.string(),
18587
+ z137.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
18588
+ ).returns(z137.promise(footprintLibraryResult))
18563
18589
  ).describe("A function that takes a path and returns Circuit JSON");
18564
- var footprintFileParserEntry = z135.object({
18565
- loadFromUrl: z135.function().args(z135.string()).returns(z135.promise(footprintLibraryResult)).describe(
18590
+ var footprintFileParserEntry = z137.object({
18591
+ loadFromUrl: z137.function().args(z137.string()).returns(z137.promise(footprintLibraryResult)).describe(
18566
18592
  "A function that takes a footprint file URL and returns Circuit JSON"
18567
18593
  )
18568
18594
  });
18569
- var spiceEngineSimulationResult = z135.object({
18570
- engineVersionString: z135.string().optional(),
18595
+ var spiceEngineSimulationResult = z137.object({
18596
+ engineVersionString: z137.string().optional(),
18571
18597
  simulationResultCircuitJson: unvalidatedCircuitJson
18572
18598
  });
18573
- var spiceEngineZod = z135.object({
18574
- simulate: z135.function().args(z135.string()).returns(z135.promise(spiceEngineSimulationResult)).describe(
18599
+ var spiceEngineZod = z137.object({
18600
+ simulate: z137.function().args(z137.string()).returns(z137.promise(spiceEngineSimulationResult)).describe(
18575
18601
  "A function that takes a SPICE string and returns a simulation result"
18576
18602
  )
18577
18603
  });
18578
- var defaultSpiceEngine = z135.custom(
18604
+ var defaultSpiceEngine = z137.custom(
18579
18605
  (value) => typeof value === "string"
18580
18606
  );
18581
- var autorouterInstance = z135.object({
18582
- run: z135.function().args().returns(z135.promise(z135.unknown())).describe("Run the autorouter"),
18583
- getOutputSimpleRouteJson: z135.function().args().returns(z135.promise(z135.any())).describe("Get the resulting SimpleRouteJson")
18607
+ var autorouterInstance = z137.object({
18608
+ run: z137.function().args().returns(z137.promise(z137.unknown())).describe("Run the autorouter"),
18609
+ getOutputSimpleRouteJson: z137.function().args().returns(z137.promise(z137.any())).describe("Get the resulting SimpleRouteJson")
18584
18610
  });
18585
- var autorouterDefinition = z135.object({
18586
- createAutorouter: z135.function().args(z135.any(), z135.any().optional()).returns(z135.union([autorouterInstance, z135.promise(autorouterInstance)])).describe("Create an autorouter instance")
18611
+ var autorouterDefinition = z137.object({
18612
+ createAutorouter: z137.function().args(z137.any(), z137.any().optional()).returns(z137.union([autorouterInstance, z137.promise(autorouterInstance)])).describe("Create an autorouter instance")
18587
18613
  });
18588
- var platformFetch = z135.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
18589
- var platformConfig = z135.object({
18614
+ var platformFetch = z137.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
18615
+ var platformConfig = z137.object({
18590
18616
  partsEngine: partsEngine.optional(),
18591
18617
  autorouter: autorouterProp.optional(),
18592
- autorouterMap: z135.record(z135.string(), autorouterDefinition).optional(),
18618
+ autorouterMap: z137.record(z137.string(), autorouterDefinition).optional(),
18593
18619
  registryApiUrl: url.optional(),
18594
18620
  cloudAutorouterUrl: url.optional(),
18595
- projectName: z135.string().optional(),
18621
+ projectName: z137.string().optional(),
18596
18622
  projectBaseUrl: url.optional(),
18597
- version: z135.string().optional(),
18623
+ version: z137.string().optional(),
18598
18624
  url: url.optional(),
18599
- printBoardInformationToSilkscreen: z135.boolean().optional(),
18600
- includeBoardFiles: z135.array(z135.string()).describe(
18625
+ printBoardInformationToSilkscreen: z137.boolean().optional(),
18626
+ includeBoardFiles: z137.array(z137.string()).describe(
18601
18627
  'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
18602
18628
  ).optional(),
18603
- snapshotsDir: z135.string().describe(
18629
+ snapshotsDir: z137.string().describe(
18604
18630
  'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
18605
18631
  ).optional(),
18606
18632
  defaultSpiceEngine: defaultSpiceEngine.optional(),
18607
- unitPreference: z135.enum(["mm", "in", "mil"]).optional(),
18608
- localCacheEngine: z135.any().optional(),
18609
- pcbDisabled: z135.boolean().optional(),
18610
- routingDisabled: z135.boolean().optional(),
18611
- schematicDisabled: z135.boolean().optional(),
18612
- partsEngineDisabled: z135.boolean().optional(),
18613
- drcChecksDisabled: z135.boolean().optional(),
18614
- netlistDrcChecksDisabled: z135.boolean().optional(),
18615
- routingDrcChecksDisabled: z135.boolean().optional(),
18616
- placementDrcChecksDisabled: z135.boolean().optional(),
18617
- pinSpecificationDrcChecksDisabled: z135.boolean().optional(),
18618
- spiceEngineMap: z135.record(z135.string(), spiceEngineZod).optional(),
18619
- footprintLibraryMap: z135.record(
18620
- z135.string(),
18621
- z135.union([
18633
+ unitPreference: z137.enum(["mm", "in", "mil"]).optional(),
18634
+ localCacheEngine: z137.any().optional(),
18635
+ pcbDisabled: z137.boolean().optional(),
18636
+ routingDisabled: z137.boolean().optional(),
18637
+ schematicDisabled: z137.boolean().optional(),
18638
+ partsEngineDisabled: z137.boolean().optional(),
18639
+ drcChecksDisabled: z137.boolean().optional(),
18640
+ netlistDrcChecksDisabled: z137.boolean().optional(),
18641
+ routingDrcChecksDisabled: z137.boolean().optional(),
18642
+ placementDrcChecksDisabled: z137.boolean().optional(),
18643
+ pinSpecificationDrcChecksDisabled: z137.boolean().optional(),
18644
+ spiceEngineMap: z137.record(z137.string(), spiceEngineZod).optional(),
18645
+ footprintLibraryMap: z137.record(
18646
+ z137.string(),
18647
+ z137.union([
18622
18648
  pathToCircuitJsonFn,
18623
- z135.record(
18624
- z135.string(),
18625
- z135.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
18649
+ z137.record(
18650
+ z137.string(),
18651
+ z137.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
18626
18652
  )
18627
18653
  ])
18628
18654
  ).optional(),
18629
- footprintFileParserMap: z135.record(z135.string(), footprintFileParserEntry).optional(),
18630
- resolveProjectStaticFileImportUrl: z135.function().args(z135.string()).returns(z135.promise(z135.string())).describe(
18655
+ footprintFileParserMap: z137.record(z137.string(), footprintFileParserEntry).optional(),
18656
+ resolveProjectStaticFileImportUrl: z137.function().args(z137.string()).returns(z137.promise(z137.string())).describe(
18631
18657
  "A function that returns a string URL for static files for the project"
18632
18658
  ).optional(),
18633
18659
  platformFetch: platformFetch.optional()
@@ -18653,6 +18679,8 @@ export {
18653
18679
  ammeterPins,
18654
18680
  ammeterProps,
18655
18681
  analogSimulationProps,
18682
+ assemblyDeviceProps,
18683
+ assemblyProps,
18656
18684
  autorouterConfig,
18657
18685
  autorouterEffortLevel,
18658
18686
  autorouterPreset,
@@ -18742,6 +18770,7 @@ export {
18742
18770
  inductorPins,
18743
18771
  inductorProps,
18744
18772
  interconnectProps,
18773
+ internalCircuitProps,
18745
18774
  jumperProps,
18746
18775
  kicadAt,
18747
18776
  kicadEffects,