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