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