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