@tscircuit/props 0.0.574 → 0.0.576
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/dist/index.d.ts +48 -2
- package/dist/index.js +399 -382
- package/dist/index.js.map +1 -1
- package/lib/components/differentialpair.ts +26 -0
- package/lib/components/netlabel.ts +17 -9
- package/lib/index.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17253,10 +17253,20 @@ var traceProps = z64.union([
|
|
|
17253
17253
|
})
|
|
17254
17254
|
]);
|
|
17255
17255
|
|
|
17256
|
+
// lib/components/differentialpair.ts
|
|
17257
|
+
import { z as z65 } from "zod";
|
|
17258
|
+
var differentialPairProps = z65.object({
|
|
17259
|
+
name: z65.string().optional(),
|
|
17260
|
+
positiveConnection: z65.string(),
|
|
17261
|
+
negativeConnection: z65.string(),
|
|
17262
|
+
maxLengthSkew: z65.number().min(0).max(1).optional()
|
|
17263
|
+
});
|
|
17264
|
+
expectTypesMatch(true);
|
|
17265
|
+
|
|
17256
17266
|
// lib/components/footprint.ts
|
|
17257
17267
|
import { layer_ref as layer_ref5 } from "circuit-json";
|
|
17258
|
-
import { z as
|
|
17259
|
-
var footprintInsertionDirection =
|
|
17268
|
+
import { z as z66 } from "zod";
|
|
17269
|
+
var footprintInsertionDirection = z66.enum([
|
|
17260
17270
|
"from_above",
|
|
17261
17271
|
"from_left",
|
|
17262
17272
|
"from_right",
|
|
@@ -17264,11 +17274,11 @@ var footprintInsertionDirection = z65.enum([
|
|
|
17264
17274
|
"from_back"
|
|
17265
17275
|
]);
|
|
17266
17276
|
expectTypesMatch(true);
|
|
17267
|
-
var footprintProps =
|
|
17268
|
-
children:
|
|
17269
|
-
name:
|
|
17277
|
+
var footprintProps = z66.object({
|
|
17278
|
+
children: z66.any().optional(),
|
|
17279
|
+
name: z66.string().optional(),
|
|
17270
17280
|
originalLayer: layer_ref5.default("top").optional(),
|
|
17271
|
-
circuitJson:
|
|
17281
|
+
circuitJson: z66.array(z66.any()).optional(),
|
|
17272
17282
|
src: footprintProp.describe("Can be a footprint or kicad string").optional(),
|
|
17273
17283
|
insertionDirection: footprintInsertionDirection.optional().describe(
|
|
17274
17284
|
"Direction a cable or mating part is inserted into this footprint in its unrotated orientation."
|
|
@@ -17277,19 +17287,19 @@ var footprintProps = z65.object({
|
|
|
17277
17287
|
expectTypesMatch(true);
|
|
17278
17288
|
|
|
17279
17289
|
// lib/components/symbol.ts
|
|
17280
|
-
import { z as
|
|
17281
|
-
var symbolProps =
|
|
17282
|
-
originalFacingDirection:
|
|
17290
|
+
import { z as z67 } from "zod";
|
|
17291
|
+
var symbolProps = z67.object({
|
|
17292
|
+
originalFacingDirection: z67.enum(["up", "down", "left", "right"]).default("right").optional(),
|
|
17283
17293
|
width: distance.optional(),
|
|
17284
17294
|
height: distance.optional(),
|
|
17285
|
-
name:
|
|
17295
|
+
name: z67.string().optional()
|
|
17286
17296
|
});
|
|
17287
17297
|
expectTypesMatch(true);
|
|
17288
17298
|
|
|
17289
17299
|
// lib/components/battery.ts
|
|
17290
17300
|
import { voltage as voltage2 } from "circuit-json";
|
|
17291
|
-
import { z as
|
|
17292
|
-
var capacity =
|
|
17301
|
+
import { z as z68 } from "zod";
|
|
17302
|
+
var capacity = z68.number().or(z68.string().endsWith("mAh")).transform((v) => {
|
|
17293
17303
|
if (typeof v === "string") {
|
|
17294
17304
|
const valString = v.replace("mAh", "");
|
|
17295
17305
|
const num = Number.parseFloat(valString);
|
|
@@ -17303,14 +17313,14 @@ var capacity = z67.number().or(z67.string().endsWith("mAh")).transform((v) => {
|
|
|
17303
17313
|
var batteryProps = commonComponentProps.extend({
|
|
17304
17314
|
capacity: capacity.optional(),
|
|
17305
17315
|
voltage: voltage2.optional(),
|
|
17306
|
-
standard:
|
|
17316
|
+
standard: z68.enum(["AA", "AAA", "9V", "CR2032", "18650", "C"]).optional(),
|
|
17307
17317
|
schOrientation: schematicOrientation.optional()
|
|
17308
17318
|
});
|
|
17309
17319
|
var batteryPins = lrPolarPins;
|
|
17310
17320
|
expectTypesMatch(true);
|
|
17311
17321
|
|
|
17312
17322
|
// lib/components/mountedboard.ts
|
|
17313
|
-
import { z as
|
|
17323
|
+
import { z as z69 } from "zod";
|
|
17314
17324
|
var mountedboardProps = subcircuitGroupProps.extend({
|
|
17315
17325
|
manufacturerPartNumber: chipProps.shape.manufacturerPartNumber,
|
|
17316
17326
|
pinLabels: chipProps.shape.pinLabels,
|
|
@@ -17322,7 +17332,7 @@ var mountedboardProps = subcircuitGroupProps.extend({
|
|
|
17322
17332
|
internallyConnectedPins: chipProps.shape.internallyConnectedPins,
|
|
17323
17333
|
externallyConnectedPins: chipProps.shape.externallyConnectedPins,
|
|
17324
17334
|
boardToBoardDistance: distance.optional(),
|
|
17325
|
-
mountOrientation:
|
|
17335
|
+
mountOrientation: z69.enum(["faceDown", "faceUp"]).optional()
|
|
17326
17336
|
});
|
|
17327
17337
|
expectTypesMatch(true);
|
|
17328
17338
|
|
|
@@ -17330,29 +17340,29 @@ expectTypesMatch(true);
|
|
|
17330
17340
|
import { distance as distance20 } from "circuit-json";
|
|
17331
17341
|
|
|
17332
17342
|
// lib/common/pcbOrientation.ts
|
|
17333
|
-
import { z as
|
|
17334
|
-
var pcbOrientation =
|
|
17343
|
+
import { z as z70 } from "zod";
|
|
17344
|
+
var pcbOrientation = z70.enum(["vertical", "horizontal"]).describe(
|
|
17335
17345
|
"vertical means pins go 1->2 downward and horizontal means pins go 1->2 rightward"
|
|
17336
17346
|
);
|
|
17337
17347
|
expectTypesMatch(true);
|
|
17338
17348
|
|
|
17339
17349
|
// lib/components/pin-header.ts
|
|
17340
|
-
import { z as
|
|
17350
|
+
import { z as z71 } from "zod";
|
|
17341
17351
|
var pinHeaderProps = commonComponentProps.extend({
|
|
17342
|
-
pinCount:
|
|
17352
|
+
pinCount: z71.number(),
|
|
17343
17353
|
pitch: distance20.optional(),
|
|
17344
|
-
schFacingDirection:
|
|
17345
|
-
gender:
|
|
17346
|
-
showSilkscreenPinLabels:
|
|
17347
|
-
pcbPinLabels:
|
|
17348
|
-
doubleRow:
|
|
17349
|
-
rightAngle:
|
|
17354
|
+
schFacingDirection: z71.enum(["up", "down", "left", "right"]).optional(),
|
|
17355
|
+
gender: z71.enum(["male", "female", "unpopulated"]).optional().default("male"),
|
|
17356
|
+
showSilkscreenPinLabels: z71.boolean().optional(),
|
|
17357
|
+
pcbPinLabels: z71.record(z71.string(), z71.string()).optional(),
|
|
17358
|
+
doubleRow: z71.boolean().optional(),
|
|
17359
|
+
rightAngle: z71.boolean().optional(),
|
|
17350
17360
|
pcbOrientation: pcbOrientation.optional(),
|
|
17351
17361
|
holeDiameter: distance20.optional(),
|
|
17352
17362
|
platedDiameter: distance20.optional(),
|
|
17353
|
-
pinLabels:
|
|
17354
|
-
connections:
|
|
17355
|
-
facingDirection:
|
|
17363
|
+
pinLabels: z71.record(z71.string(), schematicPinLabel).or(z71.array(schematicPinLabel)).optional(),
|
|
17364
|
+
connections: z71.custom().pipe(z71.record(z71.string(), connectionTarget)).optional(),
|
|
17365
|
+
facingDirection: z71.enum(["left", "right"]).optional(),
|
|
17356
17366
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
17357
17367
|
schPinStyle: schematicPinStyle.optional(),
|
|
17358
17368
|
schPinSpacing: distance20.optional(),
|
|
@@ -17362,30 +17372,36 @@ var pinHeaderProps = commonComponentProps.extend({
|
|
|
17362
17372
|
expectTypesMatch(true);
|
|
17363
17373
|
|
|
17364
17374
|
// lib/components/netalias.ts
|
|
17365
|
-
import { z as
|
|
17375
|
+
import { z as z72 } from "zod";
|
|
17366
17376
|
import { rotation as rotation3 } from "circuit-json";
|
|
17367
|
-
var netAliasProps =
|
|
17368
|
-
net:
|
|
17369
|
-
connection:
|
|
17377
|
+
var netAliasProps = z72.object({
|
|
17378
|
+
net: z72.string().optional(),
|
|
17379
|
+
connection: z72.string().optional(),
|
|
17370
17380
|
schX: distance.optional(),
|
|
17371
17381
|
schY: distance.optional(),
|
|
17372
17382
|
schRotation: rotation3.optional(),
|
|
17373
|
-
anchorSide:
|
|
17383
|
+
anchorSide: z72.enum(["left", "top", "right", "bottom"]).optional()
|
|
17374
17384
|
});
|
|
17375
17385
|
expectTypesMatch(true);
|
|
17376
17386
|
|
|
17377
17387
|
// lib/components/netlabel.ts
|
|
17378
|
-
import { z as
|
|
17388
|
+
import { z as z73 } from "zod";
|
|
17379
17389
|
import { rotation as rotation4 } from "circuit-json";
|
|
17380
|
-
var netLabelProps =
|
|
17381
|
-
net:
|
|
17382
|
-
connection:
|
|
17383
|
-
connectsTo:
|
|
17390
|
+
var netLabelProps = z73.object({
|
|
17391
|
+
net: z73.string().optional(),
|
|
17392
|
+
connection: z73.string().optional(),
|
|
17393
|
+
connectsTo: z73.string().or(z73.array(z73.string())).optional(),
|
|
17384
17394
|
schX: distance.optional(),
|
|
17385
17395
|
schY: distance.optional(),
|
|
17386
17396
|
schRotation: rotation4.optional(),
|
|
17387
|
-
anchorSide:
|
|
17388
|
-
})
|
|
17397
|
+
anchorSide: z73.enum(["left", "top", "right", "bottom"]).optional()
|
|
17398
|
+
}).refine(
|
|
17399
|
+
(props) => props.net === void 0 || props.connection === void 0,
|
|
17400
|
+
{
|
|
17401
|
+
message: "net and connection cannot be provided together",
|
|
17402
|
+
path: ["connection"]
|
|
17403
|
+
}
|
|
17404
|
+
);
|
|
17389
17405
|
expectTypesMatch(true);
|
|
17390
17406
|
|
|
17391
17407
|
// lib/components/push-button.ts
|
|
@@ -17399,52 +17415,52 @@ expectTypesMatch(true);
|
|
|
17399
17415
|
|
|
17400
17416
|
// lib/components/analogsimulation.ts
|
|
17401
17417
|
import { ms } from "circuit-json";
|
|
17402
|
-
import { z as
|
|
17403
|
-
var spiceEngine =
|
|
17418
|
+
import { z as z75 } from "zod";
|
|
17419
|
+
var spiceEngine = z75.custom(
|
|
17404
17420
|
(value) => typeof value === "string"
|
|
17405
17421
|
);
|
|
17406
|
-
var spiceOptions =
|
|
17407
|
-
method:
|
|
17408
|
-
reltol:
|
|
17409
|
-
abstol:
|
|
17410
|
-
vntol:
|
|
17422
|
+
var spiceOptions = z75.object({
|
|
17423
|
+
method: z75.enum(["trap", "gear"]).optional(),
|
|
17424
|
+
reltol: z75.union([z75.number(), z75.string()]).optional(),
|
|
17425
|
+
abstol: z75.union([z75.number(), z75.string()]).optional(),
|
|
17426
|
+
vntol: z75.union([z75.number(), z75.string()]).optional()
|
|
17411
17427
|
});
|
|
17412
|
-
var analogSimulationProps =
|
|
17413
|
-
name:
|
|
17414
|
-
simulationType:
|
|
17428
|
+
var analogSimulationProps = z75.object({
|
|
17429
|
+
name: z75.string().optional(),
|
|
17430
|
+
simulationType: z75.literal("spice_transient_analysis").default("spice_transient_analysis"),
|
|
17415
17431
|
duration: ms.optional(),
|
|
17416
17432
|
startTime: ms.optional(),
|
|
17417
17433
|
timePerStep: ms.optional(),
|
|
17418
17434
|
spiceEngine: spiceEngine.optional(),
|
|
17419
17435
|
spiceOptions: spiceOptions.optional(),
|
|
17420
|
-
graphIndependentAxes:
|
|
17436
|
+
graphIndependentAxes: z75.boolean().optional()
|
|
17421
17437
|
});
|
|
17422
17438
|
expectTypesMatch(
|
|
17423
17439
|
true
|
|
17424
17440
|
);
|
|
17425
17441
|
|
|
17426
17442
|
// lib/components/autoroutingphase.ts
|
|
17427
|
-
import { z as
|
|
17428
|
-
var autoroutingPhaseProps =
|
|
17429
|
-
key:
|
|
17430
|
-
name:
|
|
17443
|
+
import { z as z76 } from "zod";
|
|
17444
|
+
var autoroutingPhaseProps = z76.object({
|
|
17445
|
+
key: z76.any().optional(),
|
|
17446
|
+
name: z76.string().optional(),
|
|
17431
17447
|
autorouter: autorouterProp.optional(),
|
|
17432
|
-
phaseIndex:
|
|
17448
|
+
phaseIndex: z76.number().optional(),
|
|
17433
17449
|
...routingTolerances.shape,
|
|
17434
|
-
region:
|
|
17435
|
-
shape:
|
|
17436
|
-
minX:
|
|
17437
|
-
maxX:
|
|
17438
|
-
minY:
|
|
17439
|
-
maxY:
|
|
17450
|
+
region: z76.object({
|
|
17451
|
+
shape: z76.literal("rect").optional(),
|
|
17452
|
+
minX: z76.number(),
|
|
17453
|
+
maxX: z76.number(),
|
|
17454
|
+
minY: z76.number(),
|
|
17455
|
+
maxY: z76.number()
|
|
17440
17456
|
}).optional(),
|
|
17441
|
-
connection:
|
|
17442
|
-
connections:
|
|
17443
|
-
reroute:
|
|
17457
|
+
connection: z76.string().optional(),
|
|
17458
|
+
connections: z76.array(z76.string()).optional(),
|
|
17459
|
+
reroute: z76.boolean().optional()
|
|
17444
17460
|
}).superRefine((value, ctx) => {
|
|
17445
17461
|
if (value.reroute !== void 0 && value.region === void 0 && value.connection === void 0 && value.connections === void 0) {
|
|
17446
17462
|
ctx.addIssue({
|
|
17447
|
-
code:
|
|
17463
|
+
code: z76.ZodIssueCode.custom,
|
|
17448
17464
|
message: "region, connection, or connections is required when reroute is provided",
|
|
17449
17465
|
path: ["region"]
|
|
17450
17466
|
});
|
|
@@ -17453,15 +17469,15 @@ var autoroutingPhaseProps = z75.object({
|
|
|
17453
17469
|
expectTypesMatch(true);
|
|
17454
17470
|
|
|
17455
17471
|
// lib/components/spicemodel.ts
|
|
17456
|
-
import { z as
|
|
17457
|
-
var spicemodelProps =
|
|
17458
|
-
source:
|
|
17459
|
-
spicePinMapping:
|
|
17472
|
+
import { z as z77 } from "zod";
|
|
17473
|
+
var spicemodelProps = z77.object({
|
|
17474
|
+
source: z77.string(),
|
|
17475
|
+
spicePinMapping: z77.record(z77.string(), z77.string()).optional()
|
|
17460
17476
|
});
|
|
17461
17477
|
expectTypesMatch(true);
|
|
17462
17478
|
|
|
17463
17479
|
// lib/components/transistor.ts
|
|
17464
|
-
import { z as
|
|
17480
|
+
import { z as z78 } from "zod";
|
|
17465
17481
|
var transistorPinsLabels = [
|
|
17466
17482
|
"pin1",
|
|
17467
17483
|
"pin2",
|
|
@@ -17474,7 +17490,7 @@ var transistorPinsLabels = [
|
|
|
17474
17490
|
"drain"
|
|
17475
17491
|
];
|
|
17476
17492
|
var transistorProps = commonComponentProps.extend({
|
|
17477
|
-
type:
|
|
17493
|
+
type: z78.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
|
|
17478
17494
|
connections: createConnectionsProp(transistorPinsLabels).optional()
|
|
17479
17495
|
});
|
|
17480
17496
|
var transistorPins = [
|
|
@@ -17488,7 +17504,7 @@ var transistorPins = [
|
|
|
17488
17504
|
expectTypesMatch(true);
|
|
17489
17505
|
|
|
17490
17506
|
// lib/components/mosfet.ts
|
|
17491
|
-
import { z as
|
|
17507
|
+
import { z as z79 } from "zod";
|
|
17492
17508
|
var mosfetPins = [
|
|
17493
17509
|
"pin1",
|
|
17494
17510
|
"drain",
|
|
@@ -17498,11 +17514,11 @@ var mosfetPins = [
|
|
|
17498
17514
|
"gate"
|
|
17499
17515
|
];
|
|
17500
17516
|
var mosfetProps = commonComponentProps.extend({
|
|
17501
|
-
channelType:
|
|
17502
|
-
mosfetMode:
|
|
17503
|
-
symbolDrainSide:
|
|
17504
|
-
symbolSourceSide:
|
|
17505
|
-
symbolGateSide:
|
|
17517
|
+
channelType: z79.enum(["n", "p"]),
|
|
17518
|
+
mosfetMode: z79.enum(["enhancement", "depletion"]),
|
|
17519
|
+
symbolDrainSide: z79.enum(["left", "right", "top", "bottom"]).optional(),
|
|
17520
|
+
symbolSourceSide: z79.enum(["left", "right", "top", "bottom"]).optional(),
|
|
17521
|
+
symbolGateSide: z79.enum(["left", "right", "top", "bottom"]).optional(),
|
|
17506
17522
|
connections: createConnectionsProp(mosfetPins).optional()
|
|
17507
17523
|
});
|
|
17508
17524
|
expectTypesMatch(true);
|
|
@@ -17524,20 +17540,20 @@ expectTypesMatch(true);
|
|
|
17524
17540
|
|
|
17525
17541
|
// lib/components/inductor.ts
|
|
17526
17542
|
import { inductance } from "circuit-json";
|
|
17527
|
-
import { z as
|
|
17543
|
+
import { z as z81 } from "zod";
|
|
17528
17544
|
var inductorPins = lrPins;
|
|
17529
17545
|
var inductorProps = commonComponentProps.extend({
|
|
17530
17546
|
inductance,
|
|
17531
|
-
maxCurrentRating:
|
|
17547
|
+
maxCurrentRating: z81.union([z81.string(), z81.number()]).optional(),
|
|
17532
17548
|
schOrientation: schematicOrientation.optional(),
|
|
17533
17549
|
connections: createConnectionsProp(inductorPins).optional()
|
|
17534
17550
|
});
|
|
17535
17551
|
expectTypesMatch(true);
|
|
17536
17552
|
|
|
17537
17553
|
// lib/components/diode.ts
|
|
17538
|
-
import { z as
|
|
17554
|
+
import { z as z82 } from "zod";
|
|
17539
17555
|
var diodePins = lrPolarPins;
|
|
17540
|
-
var diodeConnectionKeys =
|
|
17556
|
+
var diodeConnectionKeys = z82.enum([
|
|
17541
17557
|
"anode",
|
|
17542
17558
|
"cathode",
|
|
17543
17559
|
"pin1",
|
|
@@ -17545,13 +17561,13 @@ var diodeConnectionKeys = z81.enum([
|
|
|
17545
17561
|
"pos",
|
|
17546
17562
|
"neg"
|
|
17547
17563
|
]);
|
|
17548
|
-
var connectionTarget3 =
|
|
17549
|
-
var connectionsProp2 =
|
|
17550
|
-
var diodePinLabelsProp =
|
|
17551
|
-
|
|
17552
|
-
schematicPinLabel.or(
|
|
17564
|
+
var connectionTarget3 = z82.string().or(z82.array(z82.string()).readonly()).or(z82.array(z82.string()));
|
|
17565
|
+
var connectionsProp2 = z82.record(diodeConnectionKeys, connectionTarget3);
|
|
17566
|
+
var diodePinLabelsProp = z82.record(
|
|
17567
|
+
z82.enum(diodePins),
|
|
17568
|
+
schematicPinLabel.or(z82.array(schematicPinLabel).readonly()).or(z82.array(schematicPinLabel))
|
|
17553
17569
|
);
|
|
17554
|
-
var diodeVariant =
|
|
17570
|
+
var diodeVariant = z82.enum([
|
|
17555
17571
|
"standard",
|
|
17556
17572
|
"schottky",
|
|
17557
17573
|
"zener",
|
|
@@ -17562,12 +17578,12 @@ var diodeVariant = z81.enum([
|
|
|
17562
17578
|
var diodeProps = commonComponentProps.extend({
|
|
17563
17579
|
connections: connectionsProp2.optional(),
|
|
17564
17580
|
variant: diodeVariant.optional().default("standard"),
|
|
17565
|
-
standard:
|
|
17566
|
-
schottky:
|
|
17567
|
-
zener:
|
|
17568
|
-
avalanche:
|
|
17569
|
-
photo:
|
|
17570
|
-
tvs:
|
|
17581
|
+
standard: z82.boolean().optional(),
|
|
17582
|
+
schottky: z82.boolean().optional(),
|
|
17583
|
+
zener: z82.boolean().optional(),
|
|
17584
|
+
avalanche: z82.boolean().optional(),
|
|
17585
|
+
photo: z82.boolean().optional(),
|
|
17586
|
+
tvs: z82.boolean().optional(),
|
|
17571
17587
|
schOrientation: schematicOrientation.optional(),
|
|
17572
17588
|
pinLabels: diodePinLabelsProp.optional()
|
|
17573
17589
|
}).superRefine((data, ctx) => {
|
|
@@ -17581,11 +17597,11 @@ var diodeProps = commonComponentProps.extend({
|
|
|
17581
17597
|
].filter(Boolean).length;
|
|
17582
17598
|
if (enabledFlags > 1) {
|
|
17583
17599
|
ctx.addIssue({
|
|
17584
|
-
code:
|
|
17600
|
+
code: z82.ZodIssueCode.custom,
|
|
17585
17601
|
message: "Exactly one diode variant must be enabled",
|
|
17586
17602
|
path: []
|
|
17587
17603
|
});
|
|
17588
|
-
return
|
|
17604
|
+
return z82.INVALID;
|
|
17589
17605
|
}
|
|
17590
17606
|
}).transform((data) => {
|
|
17591
17607
|
const result = {
|
|
@@ -17631,34 +17647,34 @@ var diodeProps = commonComponentProps.extend({
|
|
|
17631
17647
|
expectTypesMatch(true);
|
|
17632
17648
|
|
|
17633
17649
|
// lib/components/led.ts
|
|
17634
|
-
import { z as
|
|
17650
|
+
import { z as z83 } from "zod";
|
|
17635
17651
|
var ledProps = commonComponentProps.extend({
|
|
17636
|
-
color:
|
|
17637
|
-
wavelength:
|
|
17638
|
-
schDisplayValue:
|
|
17652
|
+
color: z83.string().optional(),
|
|
17653
|
+
wavelength: z83.string().optional(),
|
|
17654
|
+
schDisplayValue: z83.string().optional(),
|
|
17639
17655
|
schOrientation: schematicOrientation.optional(),
|
|
17640
17656
|
connections: createConnectionsProp(lrPolarPins).optional(),
|
|
17641
|
-
laser:
|
|
17657
|
+
laser: z83.boolean().optional()
|
|
17642
17658
|
});
|
|
17643
17659
|
var ledPins = lrPolarPins;
|
|
17644
17660
|
|
|
17645
17661
|
// lib/components/switch.ts
|
|
17646
17662
|
import { ms as ms2, frequency as frequency3 } from "circuit-json";
|
|
17647
|
-
import { z as
|
|
17663
|
+
import { z as z84 } from "zod";
|
|
17648
17664
|
var switchProps = commonComponentProps.extend({
|
|
17649
|
-
type:
|
|
17650
|
-
isNormallyClosed:
|
|
17651
|
-
spst:
|
|
17652
|
-
spdt:
|
|
17653
|
-
dpst:
|
|
17654
|
-
dpdt:
|
|
17665
|
+
type: z84.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
|
|
17666
|
+
isNormallyClosed: z84.boolean().optional().default(false),
|
|
17667
|
+
spst: z84.boolean().optional(),
|
|
17668
|
+
spdt: z84.boolean().optional(),
|
|
17669
|
+
dpst: z84.boolean().optional(),
|
|
17670
|
+
dpdt: z84.boolean().optional(),
|
|
17655
17671
|
pinLabels: pinLabelsProp.optional(),
|
|
17656
17672
|
simSwitchFrequency: frequency3.optional(),
|
|
17657
17673
|
simCloseAt: ms2.optional(),
|
|
17658
17674
|
simOpenAt: ms2.optional(),
|
|
17659
|
-
simStartClosed:
|
|
17660
|
-
simStartOpen:
|
|
17661
|
-
connections:
|
|
17675
|
+
simStartClosed: z84.boolean().optional(),
|
|
17676
|
+
simStartOpen: z84.boolean().optional(),
|
|
17677
|
+
connections: z84.custom().pipe(z84.record(z84.string(), connectionTarget)).optional()
|
|
17662
17678
|
}).transform((props) => {
|
|
17663
17679
|
const updatedProps = { ...props };
|
|
17664
17680
|
if (updatedProps.dpdt) {
|
|
@@ -17690,33 +17706,33 @@ expectTypesMatch(true);
|
|
|
17690
17706
|
|
|
17691
17707
|
// lib/components/fabrication-note-text.ts
|
|
17692
17708
|
import { length as length4 } from "circuit-json";
|
|
17693
|
-
import { z as
|
|
17709
|
+
import { z as z85 } from "zod";
|
|
17694
17710
|
var fabricationNoteTextProps = pcbLayoutProps.extend({
|
|
17695
|
-
text:
|
|
17696
|
-
anchorAlignment:
|
|
17697
|
-
font:
|
|
17711
|
+
text: z85.string(),
|
|
17712
|
+
anchorAlignment: z85.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
17713
|
+
font: z85.enum(["tscircuit2024"]).optional(),
|
|
17698
17714
|
fontSize: length4.optional(),
|
|
17699
|
-
color:
|
|
17715
|
+
color: z85.string().optional()
|
|
17700
17716
|
});
|
|
17701
17717
|
expectTypesMatch(true);
|
|
17702
17718
|
|
|
17703
17719
|
// lib/components/fabrication-note-rect.ts
|
|
17704
17720
|
import { distance as distance21 } from "circuit-json";
|
|
17705
|
-
import { z as
|
|
17721
|
+
import { z as z86 } from "zod";
|
|
17706
17722
|
var fabricationNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17707
17723
|
width: distance21,
|
|
17708
17724
|
height: distance21,
|
|
17709
17725
|
strokeWidth: distance21.optional(),
|
|
17710
|
-
isFilled:
|
|
17711
|
-
hasStroke:
|
|
17712
|
-
isStrokeDashed:
|
|
17713
|
-
color:
|
|
17726
|
+
isFilled: z86.boolean().optional(),
|
|
17727
|
+
hasStroke: z86.boolean().optional(),
|
|
17728
|
+
isStrokeDashed: z86.boolean().optional(),
|
|
17729
|
+
color: z86.string().optional(),
|
|
17714
17730
|
cornerRadius: distance21.optional()
|
|
17715
17731
|
});
|
|
17716
17732
|
|
|
17717
17733
|
// lib/components/fabrication-note-path.ts
|
|
17718
17734
|
import { length as length5, route_hint_point as route_hint_point3 } from "circuit-json";
|
|
17719
|
-
import { z as
|
|
17735
|
+
import { z as z87 } from "zod";
|
|
17720
17736
|
var fabricationNotePathProps = pcbLayoutProps.omit({
|
|
17721
17737
|
pcbLeftEdgeX: true,
|
|
17722
17738
|
pcbRightEdgeX: true,
|
|
@@ -17728,15 +17744,15 @@ var fabricationNotePathProps = pcbLayoutProps.omit({
|
|
|
17728
17744
|
pcbOffsetY: true,
|
|
17729
17745
|
pcbRotation: true
|
|
17730
17746
|
}).extend({
|
|
17731
|
-
route:
|
|
17747
|
+
route: z87.array(route_hint_point3),
|
|
17732
17748
|
strokeWidth: length5.optional(),
|
|
17733
|
-
color:
|
|
17749
|
+
color: z87.string().optional()
|
|
17734
17750
|
});
|
|
17735
17751
|
|
|
17736
17752
|
// lib/components/fabrication-note-dimension.ts
|
|
17737
17753
|
import { distance as distance22, length as length6 } from "circuit-json";
|
|
17738
|
-
import { z as
|
|
17739
|
-
var dimensionTarget =
|
|
17754
|
+
import { z as z88 } from "zod";
|
|
17755
|
+
var dimensionTarget = z88.union([z88.string(), point]);
|
|
17740
17756
|
var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
17741
17757
|
pcbLeftEdgeX: true,
|
|
17742
17758
|
pcbRightEdgeX: true,
|
|
@@ -17750,54 +17766,54 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
17750
17766
|
}).extend({
|
|
17751
17767
|
from: dimensionTarget,
|
|
17752
17768
|
to: dimensionTarget,
|
|
17753
|
-
text:
|
|
17769
|
+
text: z88.string().optional(),
|
|
17754
17770
|
offset: distance22.optional(),
|
|
17755
|
-
font:
|
|
17771
|
+
font: z88.enum(["tscircuit2024"]).optional(),
|
|
17756
17772
|
fontSize: length6.optional(),
|
|
17757
|
-
color:
|
|
17773
|
+
color: z88.string().optional(),
|
|
17758
17774
|
arrowSize: distance22.optional(),
|
|
17759
|
-
units:
|
|
17760
|
-
outerEdgeToEdge:
|
|
17761
|
-
centerToCenter:
|
|
17762
|
-
innerEdgeToEdge:
|
|
17775
|
+
units: z88.enum(["in", "mm"]).optional(),
|
|
17776
|
+
outerEdgeToEdge: z88.literal(true).optional(),
|
|
17777
|
+
centerToCenter: z88.literal(true).optional(),
|
|
17778
|
+
innerEdgeToEdge: z88.literal(true).optional()
|
|
17763
17779
|
});
|
|
17764
17780
|
expectTypesMatch(true);
|
|
17765
17781
|
|
|
17766
17782
|
// lib/components/pcb-trace.ts
|
|
17767
17783
|
import { distance as distance23, route_hint_point as route_hint_point4 } from "circuit-json";
|
|
17768
|
-
import { z as
|
|
17769
|
-
var pcbTraceProps =
|
|
17770
|
-
layer:
|
|
17784
|
+
import { z as z89 } from "zod";
|
|
17785
|
+
var pcbTraceProps = z89.object({
|
|
17786
|
+
layer: z89.string().optional(),
|
|
17771
17787
|
thickness: distance23.optional(),
|
|
17772
|
-
route:
|
|
17788
|
+
route: z89.array(route_hint_point4)
|
|
17773
17789
|
});
|
|
17774
17790
|
|
|
17775
17791
|
// lib/components/via.ts
|
|
17776
17792
|
import { distance as distance24, layer_ref as layer_ref6 } from "circuit-json";
|
|
17777
|
-
import { z as
|
|
17793
|
+
import { z as z90 } from "zod";
|
|
17778
17794
|
var viaProps = commonLayoutProps.extend({
|
|
17779
|
-
name:
|
|
17795
|
+
name: z90.string().optional(),
|
|
17780
17796
|
fromLayer: layer_ref6.optional(),
|
|
17781
17797
|
toLayer: layer_ref6.optional(),
|
|
17782
17798
|
holeDiameter: distance24.optional(),
|
|
17783
17799
|
outerDiameter: distance24.optional(),
|
|
17784
|
-
layers:
|
|
17785
|
-
connectsTo:
|
|
17786
|
-
netIsAssignable:
|
|
17800
|
+
layers: z90.array(layer_ref6).optional(),
|
|
17801
|
+
connectsTo: z90.string().or(z90.array(z90.string())).optional(),
|
|
17802
|
+
netIsAssignable: z90.boolean().optional()
|
|
17787
17803
|
});
|
|
17788
17804
|
expectTypesMatch(true);
|
|
17789
17805
|
|
|
17790
17806
|
// lib/components/testpoint.ts
|
|
17791
17807
|
import { distance as distance25 } from "circuit-json";
|
|
17792
|
-
import { z as
|
|
17808
|
+
import { z as z91 } from "zod";
|
|
17793
17809
|
var testpointPins = ["pin1"];
|
|
17794
|
-
var testpointConnectionsProp =
|
|
17810
|
+
var testpointConnectionsProp = z91.object({
|
|
17795
17811
|
pin1: connectionTarget
|
|
17796
17812
|
}).strict();
|
|
17797
17813
|
var testpointProps = commonComponentProps.extend({
|
|
17798
17814
|
connections: testpointConnectionsProp.optional(),
|
|
17799
|
-
footprintVariant:
|
|
17800
|
-
padShape:
|
|
17815
|
+
footprintVariant: z91.enum(["pad", "through_hole"]).optional(),
|
|
17816
|
+
padShape: z91.enum(["rect", "circle"]).optional().default("circle"),
|
|
17801
17817
|
padDiameter: distance25.optional(),
|
|
17802
17818
|
holeDiameter: distance25.optional(),
|
|
17803
17819
|
width: distance25.optional(),
|
|
@@ -17809,45 +17825,45 @@ var testpointProps = commonComponentProps.extend({
|
|
|
17809
17825
|
expectTypesMatch(true);
|
|
17810
17826
|
|
|
17811
17827
|
// lib/components/breakoutpoint.ts
|
|
17812
|
-
import { z as
|
|
17828
|
+
import { z as z92 } from "zod";
|
|
17813
17829
|
var breakoutPointProps = pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
17814
|
-
connection:
|
|
17830
|
+
connection: z92.string()
|
|
17815
17831
|
});
|
|
17816
17832
|
expectTypesMatch(true);
|
|
17817
17833
|
|
|
17818
17834
|
// lib/components/pcb-keepout.ts
|
|
17819
17835
|
import { distance as distance26, layer_ref as layer_ref7 } from "circuit-json";
|
|
17820
|
-
import { z as
|
|
17821
|
-
var pcbKeepoutProps =
|
|
17836
|
+
import { z as z93 } from "zod";
|
|
17837
|
+
var pcbKeepoutProps = z93.union([
|
|
17822
17838
|
pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17823
|
-
shape:
|
|
17839
|
+
shape: z93.literal("circle"),
|
|
17824
17840
|
radius: distance26,
|
|
17825
|
-
layers:
|
|
17841
|
+
layers: z93.array(layer_ref7).optional()
|
|
17826
17842
|
}),
|
|
17827
17843
|
pcbLayoutProps.extend({
|
|
17828
|
-
shape:
|
|
17844
|
+
shape: z93.literal("rect"),
|
|
17829
17845
|
width: distance26,
|
|
17830
17846
|
height: distance26,
|
|
17831
|
-
layers:
|
|
17847
|
+
layers: z93.array(layer_ref7).optional()
|
|
17832
17848
|
})
|
|
17833
17849
|
]);
|
|
17834
17850
|
|
|
17835
17851
|
// lib/components/courtyard-rect.ts
|
|
17836
17852
|
import { distance as distance27 } from "circuit-json";
|
|
17837
|
-
import { z as
|
|
17853
|
+
import { z as z94 } from "zod";
|
|
17838
17854
|
var courtyardRectProps = pcbLayoutProps.extend({
|
|
17839
17855
|
width: distance27,
|
|
17840
17856
|
height: distance27,
|
|
17841
17857
|
strokeWidth: distance27.optional(),
|
|
17842
|
-
isFilled:
|
|
17843
|
-
hasStroke:
|
|
17844
|
-
isStrokeDashed:
|
|
17845
|
-
color:
|
|
17858
|
+
isFilled: z94.boolean().optional(),
|
|
17859
|
+
hasStroke: z94.boolean().optional(),
|
|
17860
|
+
isStrokeDashed: z94.boolean().optional(),
|
|
17861
|
+
color: z94.string().optional()
|
|
17846
17862
|
});
|
|
17847
17863
|
|
|
17848
17864
|
// lib/components/courtyard-outline.ts
|
|
17849
17865
|
import { length as length7 } from "circuit-json";
|
|
17850
|
-
import { z as
|
|
17866
|
+
import { z as z95 } from "zod";
|
|
17851
17867
|
var courtyardOutlineProps = pcbLayoutProps.omit({
|
|
17852
17868
|
pcbLeftEdgeX: true,
|
|
17853
17869
|
pcbRightEdgeX: true,
|
|
@@ -17859,11 +17875,11 @@ var courtyardOutlineProps = pcbLayoutProps.omit({
|
|
|
17859
17875
|
pcbOffsetY: true,
|
|
17860
17876
|
pcbRotation: true
|
|
17861
17877
|
}).extend({
|
|
17862
|
-
outline:
|
|
17878
|
+
outline: z95.array(point),
|
|
17863
17879
|
strokeWidth: length7.optional(),
|
|
17864
|
-
isClosed:
|
|
17865
|
-
isStrokeDashed:
|
|
17866
|
-
color:
|
|
17880
|
+
isClosed: z95.boolean().optional(),
|
|
17881
|
+
isStrokeDashed: z95.boolean().optional(),
|
|
17882
|
+
color: z95.string().optional()
|
|
17867
17883
|
});
|
|
17868
17884
|
|
|
17869
17885
|
// lib/components/courtyard-circle.ts
|
|
@@ -17883,35 +17899,35 @@ var courtyardPillProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
17883
17899
|
});
|
|
17884
17900
|
|
|
17885
17901
|
// lib/components/copper-pour.ts
|
|
17886
|
-
import { z as
|
|
17902
|
+
import { z as z98 } from "zod";
|
|
17887
17903
|
import { layer_ref as layer_ref8 } from "circuit-json";
|
|
17888
|
-
var copperPourProps =
|
|
17889
|
-
name:
|
|
17904
|
+
var copperPourProps = z98.object({
|
|
17905
|
+
name: z98.string().optional(),
|
|
17890
17906
|
layer: layer_ref8,
|
|
17891
|
-
connectsTo:
|
|
17892
|
-
unbroken:
|
|
17907
|
+
connectsTo: z98.string(),
|
|
17908
|
+
unbroken: z98.boolean().optional(),
|
|
17893
17909
|
padMargin: distance.optional(),
|
|
17894
17910
|
traceMargin: distance.optional(),
|
|
17895
17911
|
clearance: distance.optional(),
|
|
17896
17912
|
boardEdgeMargin: distance.optional(),
|
|
17897
17913
|
cutoutMargin: distance.optional(),
|
|
17898
|
-
outline:
|
|
17899
|
-
coveredWithSolderMask:
|
|
17914
|
+
outline: z98.array(point).optional(),
|
|
17915
|
+
coveredWithSolderMask: z98.boolean().optional().default(true)
|
|
17900
17916
|
});
|
|
17901
17917
|
expectTypesMatch(true);
|
|
17902
17918
|
|
|
17903
17919
|
// lib/components/cadassembly.ts
|
|
17904
17920
|
import { layer_ref as layer_ref9 } from "circuit-json";
|
|
17905
|
-
import { z as
|
|
17906
|
-
var cadassemblyProps =
|
|
17921
|
+
import { z as z99 } from "zod";
|
|
17922
|
+
var cadassemblyProps = z99.object({
|
|
17907
17923
|
originalLayer: layer_ref9.default("top").optional(),
|
|
17908
|
-
children:
|
|
17924
|
+
children: z99.any().optional()
|
|
17909
17925
|
});
|
|
17910
17926
|
expectTypesMatch(true);
|
|
17911
17927
|
|
|
17912
17928
|
// lib/components/cadmodel.ts
|
|
17913
|
-
import { z as
|
|
17914
|
-
var pcbPosition =
|
|
17929
|
+
import { z as z100 } from "zod";
|
|
17930
|
+
var pcbPosition = z100.object({
|
|
17915
17931
|
pcbX: pcbCoordinate.optional(),
|
|
17916
17932
|
pcbY: pcbCoordinate.optional(),
|
|
17917
17933
|
pcbLeftEdgeX: pcbCoordinate.optional(),
|
|
@@ -17928,7 +17944,7 @@ var cadModelBaseWithUrl = cadModelBase.extend({
|
|
|
17928
17944
|
});
|
|
17929
17945
|
var cadModelObject = cadModelBaseWithUrl.merge(pcbPosition);
|
|
17930
17946
|
expectTypesMatch(true);
|
|
17931
|
-
var cadmodelProps =
|
|
17947
|
+
var cadmodelProps = z100.union([z100.null(), url, cadModelObject]);
|
|
17932
17948
|
|
|
17933
17949
|
// lib/components/power-source.ts
|
|
17934
17950
|
import { voltage as voltage3 } from "circuit-json";
|
|
@@ -17938,9 +17954,9 @@ var powerSourceProps = commonComponentProps.extend({
|
|
|
17938
17954
|
|
|
17939
17955
|
// lib/components/voltagesource.ts
|
|
17940
17956
|
import { frequency as frequency4, ms as ms3, rotation as rotation5, voltage as voltage4 } from "circuit-json";
|
|
17941
|
-
import { z as
|
|
17957
|
+
import { z as z101 } from "zod";
|
|
17942
17958
|
var voltageSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
17943
|
-
var percentage =
|
|
17959
|
+
var percentage = z101.union([z101.string(), z101.number()]).transform((val) => {
|
|
17944
17960
|
if (typeof val === "string") {
|
|
17945
17961
|
if (val.endsWith("%")) {
|
|
17946
17962
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -17949,13 +17965,13 @@ var percentage = z100.union([z100.string(), z100.number()]).transform((val) => {
|
|
|
17949
17965
|
}
|
|
17950
17966
|
return val;
|
|
17951
17967
|
}).pipe(
|
|
17952
|
-
|
|
17968
|
+
z101.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
17953
17969
|
);
|
|
17954
17970
|
var voltageSourceProps = commonComponentProps.extend({
|
|
17955
17971
|
voltage: voltage4.optional(),
|
|
17956
17972
|
frequency: frequency4.optional(),
|
|
17957
17973
|
peakToPeakVoltage: voltage4.optional(),
|
|
17958
|
-
waveShape:
|
|
17974
|
+
waveShape: z101.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
17959
17975
|
phase: rotation5.optional(),
|
|
17960
17976
|
dutyCycle: percentage.optional(),
|
|
17961
17977
|
pulseDelay: ms3.optional(),
|
|
@@ -17970,9 +17986,9 @@ expectTypesMatch(true);
|
|
|
17970
17986
|
|
|
17971
17987
|
// lib/components/currentsource.ts
|
|
17972
17988
|
import { frequency as frequency5, rotation as rotation6, current } from "circuit-json";
|
|
17973
|
-
import { z as
|
|
17989
|
+
import { z as z102 } from "zod";
|
|
17974
17990
|
var currentSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
17975
|
-
var percentage2 =
|
|
17991
|
+
var percentage2 = z102.union([z102.string(), z102.number()]).transform((val) => {
|
|
17976
17992
|
if (typeof val === "string") {
|
|
17977
17993
|
if (val.endsWith("%")) {
|
|
17978
17994
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -17981,13 +17997,13 @@ var percentage2 = z101.union([z101.string(), z101.number()]).transform((val) =>
|
|
|
17981
17997
|
}
|
|
17982
17998
|
return val;
|
|
17983
17999
|
}).pipe(
|
|
17984
|
-
|
|
18000
|
+
z102.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
17985
18001
|
);
|
|
17986
18002
|
var currentSourceProps = commonComponentProps.extend({
|
|
17987
18003
|
current: current.optional(),
|
|
17988
18004
|
frequency: frequency5.optional(),
|
|
17989
18005
|
peakToPeakCurrent: current.optional(),
|
|
17990
|
-
waveShape:
|
|
18006
|
+
waveShape: z102.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
17991
18007
|
phase: rotation6.optional(),
|
|
17992
18008
|
dutyCycle: percentage2.optional(),
|
|
17993
18009
|
connections: createConnectionsProp(currentSourcePinLabels).optional()
|
|
@@ -17996,21 +18012,21 @@ var currentSourcePins = lrPolarPins;
|
|
|
17996
18012
|
expectTypesMatch(true);
|
|
17997
18013
|
|
|
17998
18014
|
// lib/components/voltageprobe.ts
|
|
17999
|
-
import { z as
|
|
18015
|
+
import { z as z103 } from "zod";
|
|
18000
18016
|
var voltageProbeProps = commonComponentProps.omit({ name: true }).extend({
|
|
18001
|
-
name:
|
|
18002
|
-
connectsTo:
|
|
18003
|
-
referenceTo:
|
|
18004
|
-
color:
|
|
18005
|
-
graphDisplayName:
|
|
18006
|
-
graphCenter:
|
|
18007
|
-
graphVerticalOffset:
|
|
18008
|
-
graphVoltagePerDiv:
|
|
18017
|
+
name: z103.string().optional(),
|
|
18018
|
+
connectsTo: z103.string(),
|
|
18019
|
+
referenceTo: z103.string().optional(),
|
|
18020
|
+
color: z103.string().optional(),
|
|
18021
|
+
graphDisplayName: z103.string().optional(),
|
|
18022
|
+
graphCenter: z103.number().optional(),
|
|
18023
|
+
graphVerticalOffset: z103.number().or(z103.string()).optional(),
|
|
18024
|
+
graphVoltagePerDiv: z103.number().or(z103.string()).optional()
|
|
18009
18025
|
});
|
|
18010
18026
|
expectTypesMatch(true);
|
|
18011
18027
|
|
|
18012
18028
|
// lib/components/ammeter.ts
|
|
18013
|
-
import { z as
|
|
18029
|
+
import { z as z104 } from "zod";
|
|
18014
18030
|
var ammeterPinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
18015
18031
|
var hasAmmeterConnectionPair = (connections) => {
|
|
18016
18032
|
return connections.pos !== void 0 && connections.neg !== void 0 || connections.pin1 !== void 0 && connections.pin2 !== void 0;
|
|
@@ -18020,57 +18036,57 @@ var ammeterProps = commonComponentProps.extend({
|
|
|
18020
18036
|
hasAmmeterConnectionPair,
|
|
18021
18037
|
"Ammeter connections must include either pos/neg or pin1/pin2"
|
|
18022
18038
|
),
|
|
18023
|
-
color:
|
|
18024
|
-
graphDisplayName:
|
|
18025
|
-
graphCenter:
|
|
18026
|
-
graphVerticalOffset:
|
|
18027
|
-
graphCurrentPerDiv:
|
|
18039
|
+
color: z104.string().optional(),
|
|
18040
|
+
graphDisplayName: z104.string().optional(),
|
|
18041
|
+
graphCenter: z104.number().optional(),
|
|
18042
|
+
graphVerticalOffset: z104.number().or(z104.string()).optional(),
|
|
18043
|
+
graphCurrentPerDiv: z104.number().or(z104.string()).optional()
|
|
18028
18044
|
});
|
|
18029
18045
|
var ammeterPins = ammeterPinLabels;
|
|
18030
18046
|
expectTypesMatch(true);
|
|
18031
18047
|
|
|
18032
18048
|
// lib/components/schematic-arc.ts
|
|
18033
18049
|
import { distance as distance30, point as point5, rotation as rotation7 } from "circuit-json";
|
|
18034
|
-
import { z as
|
|
18035
|
-
var schematicArcProps =
|
|
18050
|
+
import { z as z105 } from "zod";
|
|
18051
|
+
var schematicArcProps = z105.object({
|
|
18036
18052
|
center: point5,
|
|
18037
18053
|
radius: distance30,
|
|
18038
18054
|
startAngleDegrees: rotation7,
|
|
18039
18055
|
endAngleDegrees: rotation7,
|
|
18040
|
-
direction:
|
|
18056
|
+
direction: z105.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
18041
18057
|
strokeWidth: distance30.optional(),
|
|
18042
|
-
color:
|
|
18043
|
-
isDashed:
|
|
18058
|
+
color: z105.string().optional(),
|
|
18059
|
+
isDashed: z105.boolean().optional().default(false)
|
|
18044
18060
|
});
|
|
18045
18061
|
expectTypesMatch(true);
|
|
18046
18062
|
|
|
18047
18063
|
// lib/components/toolingrail.ts
|
|
18048
|
-
import { z as
|
|
18049
|
-
var toolingrailProps =
|
|
18050
|
-
children:
|
|
18064
|
+
import { z as z106 } from "zod";
|
|
18065
|
+
var toolingrailProps = z106.object({
|
|
18066
|
+
children: z106.any().optional()
|
|
18051
18067
|
});
|
|
18052
18068
|
expectTypesMatch(true);
|
|
18053
18069
|
|
|
18054
18070
|
// lib/components/schematic-box.ts
|
|
18055
18071
|
import { distance as distance31 } from "circuit-json";
|
|
18056
|
-
import { z as
|
|
18057
|
-
var schematicBoxProps =
|
|
18072
|
+
import { z as z107 } from "zod";
|
|
18073
|
+
var schematicBoxProps = z107.object({
|
|
18058
18074
|
schX: distance31.optional(),
|
|
18059
18075
|
schY: distance31.optional(),
|
|
18060
18076
|
width: distance31.optional(),
|
|
18061
18077
|
height: distance31.optional(),
|
|
18062
|
-
overlay:
|
|
18078
|
+
overlay: z107.array(z107.string()).optional(),
|
|
18063
18079
|
padding: distance31.optional(),
|
|
18064
18080
|
paddingLeft: distance31.optional(),
|
|
18065
18081
|
paddingRight: distance31.optional(),
|
|
18066
18082
|
paddingTop: distance31.optional(),
|
|
18067
18083
|
paddingBottom: distance31.optional(),
|
|
18068
|
-
title:
|
|
18084
|
+
title: z107.string().optional(),
|
|
18069
18085
|
titleAlignment: ninePointAnchor.default("top_left"),
|
|
18070
|
-
titleColor:
|
|
18086
|
+
titleColor: z107.string().optional(),
|
|
18071
18087
|
titleFontSize: distance31.optional(),
|
|
18072
|
-
titleInside:
|
|
18073
|
-
strokeStyle:
|
|
18088
|
+
titleInside: z107.boolean().default(false),
|
|
18089
|
+
strokeStyle: z107.enum(["solid", "dashed"]).default("solid")
|
|
18074
18090
|
}).refine(
|
|
18075
18091
|
(elm) => elm.width !== void 0 && elm.height !== void 0 || Array.isArray(elm.overlay) && elm.overlay.length > 0,
|
|
18076
18092
|
{
|
|
@@ -18086,15 +18102,15 @@ expectTypesMatch(true);
|
|
|
18086
18102
|
|
|
18087
18103
|
// lib/components/schematic-circle.ts
|
|
18088
18104
|
import { distance as distance32, point as point6 } from "circuit-json";
|
|
18089
|
-
import { z as
|
|
18090
|
-
var schematicCircleProps =
|
|
18105
|
+
import { z as z108 } from "zod";
|
|
18106
|
+
var schematicCircleProps = z108.object({
|
|
18091
18107
|
center: point6,
|
|
18092
18108
|
radius: distance32,
|
|
18093
18109
|
strokeWidth: distance32.optional(),
|
|
18094
|
-
color:
|
|
18095
|
-
isFilled:
|
|
18096
|
-
fillColor:
|
|
18097
|
-
isDashed:
|
|
18110
|
+
color: z108.string().optional(),
|
|
18111
|
+
isFilled: z108.boolean().optional().default(false),
|
|
18112
|
+
fillColor: z108.string().optional(),
|
|
18113
|
+
isDashed: z108.boolean().optional().default(false)
|
|
18098
18114
|
});
|
|
18099
18115
|
expectTypesMatch(
|
|
18100
18116
|
true
|
|
@@ -18102,32 +18118,32 @@ expectTypesMatch(
|
|
|
18102
18118
|
|
|
18103
18119
|
// lib/components/schematic-rect.ts
|
|
18104
18120
|
import { distance as distance33, rotation as rotation8 } from "circuit-json";
|
|
18105
|
-
import { z as
|
|
18106
|
-
var schematicRectProps =
|
|
18121
|
+
import { z as z109 } from "zod";
|
|
18122
|
+
var schematicRectProps = z109.object({
|
|
18107
18123
|
schX: distance33.optional(),
|
|
18108
18124
|
schY: distance33.optional(),
|
|
18109
18125
|
width: distance33,
|
|
18110
18126
|
height: distance33,
|
|
18111
18127
|
rotation: rotation8.default(0),
|
|
18112
18128
|
strokeWidth: distance33.optional(),
|
|
18113
|
-
color:
|
|
18114
|
-
isFilled:
|
|
18115
|
-
fillColor:
|
|
18116
|
-
isDashed:
|
|
18129
|
+
color: z109.string().optional(),
|
|
18130
|
+
isFilled: z109.boolean().optional().default(false),
|
|
18131
|
+
fillColor: z109.string().optional(),
|
|
18132
|
+
isDashed: z109.boolean().optional().default(false)
|
|
18117
18133
|
});
|
|
18118
18134
|
expectTypesMatch(true);
|
|
18119
18135
|
|
|
18120
18136
|
// lib/components/schematic-line.ts
|
|
18121
18137
|
import { distance as distance34 } from "circuit-json";
|
|
18122
|
-
import { z as
|
|
18123
|
-
var schematicLineProps =
|
|
18138
|
+
import { z as z110 } from "zod";
|
|
18139
|
+
var schematicLineProps = z110.object({
|
|
18124
18140
|
x1: distance34,
|
|
18125
18141
|
y1: distance34,
|
|
18126
18142
|
x2: distance34,
|
|
18127
18143
|
y2: distance34,
|
|
18128
18144
|
strokeWidth: distance34.optional(),
|
|
18129
|
-
color:
|
|
18130
|
-
isDashed:
|
|
18145
|
+
color: z110.string().optional(),
|
|
18146
|
+
isDashed: z110.boolean().optional().default(false),
|
|
18131
18147
|
dashLength: distance34.optional(),
|
|
18132
18148
|
dashGap: distance34.optional()
|
|
18133
18149
|
});
|
|
@@ -18135,11 +18151,11 @@ expectTypesMatch(true);
|
|
|
18135
18151
|
|
|
18136
18152
|
// lib/components/schematic-text.ts
|
|
18137
18153
|
import { distance as distance35, rotation as rotation9 } from "circuit-json";
|
|
18138
|
-
import { z as
|
|
18154
|
+
import { z as z112 } from "zod";
|
|
18139
18155
|
|
|
18140
18156
|
// lib/common/fivePointAnchor.ts
|
|
18141
|
-
import { z as
|
|
18142
|
-
var fivePointAnchor =
|
|
18157
|
+
import { z as z111 } from "zod";
|
|
18158
|
+
var fivePointAnchor = z111.enum([
|
|
18143
18159
|
"center",
|
|
18144
18160
|
"left",
|
|
18145
18161
|
"right",
|
|
@@ -18148,39 +18164,39 @@ var fivePointAnchor = z110.enum([
|
|
|
18148
18164
|
]);
|
|
18149
18165
|
|
|
18150
18166
|
// lib/components/schematic-text.ts
|
|
18151
|
-
var schematicTextProps =
|
|
18167
|
+
var schematicTextProps = z112.object({
|
|
18152
18168
|
schX: distance35.optional(),
|
|
18153
18169
|
schY: distance35.optional(),
|
|
18154
|
-
text:
|
|
18155
|
-
fontSize:
|
|
18156
|
-
anchor:
|
|
18157
|
-
color:
|
|
18170
|
+
text: z112.string(),
|
|
18171
|
+
fontSize: z112.number().default(1),
|
|
18172
|
+
anchor: z112.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
18173
|
+
color: z112.string().default("#000000"),
|
|
18158
18174
|
schRotation: rotation9.default(0)
|
|
18159
18175
|
});
|
|
18160
18176
|
expectTypesMatch(true);
|
|
18161
18177
|
|
|
18162
18178
|
// lib/components/schematic-path.ts
|
|
18163
18179
|
import { distance as distance36, point as point7 } from "circuit-json";
|
|
18164
|
-
import { z as
|
|
18165
|
-
var schematicPathProps =
|
|
18166
|
-
points:
|
|
18167
|
-
svgPath:
|
|
18180
|
+
import { z as z113 } from "zod";
|
|
18181
|
+
var schematicPathProps = z113.object({
|
|
18182
|
+
points: z113.array(point7).optional(),
|
|
18183
|
+
svgPath: z113.string().optional(),
|
|
18168
18184
|
strokeWidth: distance36.optional(),
|
|
18169
|
-
strokeColor:
|
|
18185
|
+
strokeColor: z113.string().optional(),
|
|
18170
18186
|
dashLength: distance36.optional(),
|
|
18171
18187
|
dashGap: distance36.optional(),
|
|
18172
|
-
isFilled:
|
|
18173
|
-
fillColor:
|
|
18188
|
+
isFilled: z113.boolean().optional().default(false),
|
|
18189
|
+
fillColor: z113.string().optional()
|
|
18174
18190
|
});
|
|
18175
18191
|
expectTypesMatch(true);
|
|
18176
18192
|
|
|
18177
18193
|
// lib/components/schematic-table.ts
|
|
18178
18194
|
import { distance as distance37 } from "circuit-json";
|
|
18179
|
-
import { z as
|
|
18180
|
-
var schematicTableProps =
|
|
18195
|
+
import { z as z114 } from "zod";
|
|
18196
|
+
var schematicTableProps = z114.object({
|
|
18181
18197
|
schX: distance37.optional(),
|
|
18182
18198
|
schY: distance37.optional(),
|
|
18183
|
-
children:
|
|
18199
|
+
children: z114.any().optional(),
|
|
18184
18200
|
cellPadding: distance37.optional(),
|
|
18185
18201
|
borderWidth: distance37.optional(),
|
|
18186
18202
|
anchor: ninePointAnchor.optional(),
|
|
@@ -18190,34 +18206,34 @@ expectTypesMatch(true);
|
|
|
18190
18206
|
|
|
18191
18207
|
// lib/components/schematic-row.ts
|
|
18192
18208
|
import { distance as distance38 } from "circuit-json";
|
|
18193
|
-
import { z as
|
|
18194
|
-
var schematicRowProps =
|
|
18195
|
-
children:
|
|
18209
|
+
import { z as z115 } from "zod";
|
|
18210
|
+
var schematicRowProps = z115.object({
|
|
18211
|
+
children: z115.any().optional(),
|
|
18196
18212
|
height: distance38.optional()
|
|
18197
18213
|
});
|
|
18198
18214
|
expectTypesMatch(true);
|
|
18199
18215
|
|
|
18200
18216
|
// lib/components/schematic-cell.ts
|
|
18201
18217
|
import { distance as distance39 } from "circuit-json";
|
|
18202
|
-
import { z as
|
|
18203
|
-
var schematicCellProps =
|
|
18204
|
-
children:
|
|
18205
|
-
horizontalAlign:
|
|
18206
|
-
verticalAlign:
|
|
18218
|
+
import { z as z116 } from "zod";
|
|
18219
|
+
var schematicCellProps = z116.object({
|
|
18220
|
+
children: z116.string().optional(),
|
|
18221
|
+
horizontalAlign: z116.enum(["left", "center", "right"]).optional(),
|
|
18222
|
+
verticalAlign: z116.enum(["top", "middle", "bottom"]).optional(),
|
|
18207
18223
|
fontSize: distance39.optional(),
|
|
18208
|
-
rowSpan:
|
|
18209
|
-
colSpan:
|
|
18224
|
+
rowSpan: z116.number().optional(),
|
|
18225
|
+
colSpan: z116.number().optional(),
|
|
18210
18226
|
width: distance39.optional(),
|
|
18211
|
-
text:
|
|
18227
|
+
text: z116.string().optional()
|
|
18212
18228
|
});
|
|
18213
18229
|
expectTypesMatch(true);
|
|
18214
18230
|
|
|
18215
18231
|
// lib/components/schematic-section.ts
|
|
18216
18232
|
import { distance as distance40 } from "circuit-json";
|
|
18217
|
-
import { z as
|
|
18218
|
-
var schematicSectionProps =
|
|
18219
|
-
displayName:
|
|
18220
|
-
name:
|
|
18233
|
+
import { z as z117 } from "zod";
|
|
18234
|
+
var schematicSectionProps = z117.object({
|
|
18235
|
+
displayName: z117.string().optional(),
|
|
18236
|
+
name: z117.string(),
|
|
18221
18237
|
sectionTitleFontSize: distance40.optional()
|
|
18222
18238
|
});
|
|
18223
18239
|
expectTypesMatch(
|
|
@@ -18225,51 +18241,51 @@ expectTypesMatch(
|
|
|
18225
18241
|
);
|
|
18226
18242
|
|
|
18227
18243
|
// lib/components/schematic-sheet.ts
|
|
18228
|
-
import { z as
|
|
18229
|
-
var schematicSheetProps =
|
|
18230
|
-
name:
|
|
18231
|
-
displayName:
|
|
18232
|
-
sheetIndex:
|
|
18233
|
-
children:
|
|
18244
|
+
import { z as z118 } from "zod";
|
|
18245
|
+
var schematicSheetProps = z118.object({
|
|
18246
|
+
name: z118.string(),
|
|
18247
|
+
displayName: z118.string(),
|
|
18248
|
+
sheetIndex: z118.number().optional(),
|
|
18249
|
+
children: z118.any().optional()
|
|
18234
18250
|
});
|
|
18235
18251
|
expectTypesMatch(true);
|
|
18236
18252
|
|
|
18237
18253
|
// lib/components/copper-text.ts
|
|
18238
18254
|
import { layer_ref as layer_ref10, length as length8 } from "circuit-json";
|
|
18239
|
-
import { z as
|
|
18255
|
+
import { z as z119 } from "zod";
|
|
18240
18256
|
var copperTextProps = pcbLayoutProps.extend({
|
|
18241
|
-
text:
|
|
18257
|
+
text: z119.string(),
|
|
18242
18258
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
18243
|
-
font:
|
|
18259
|
+
font: z119.enum(["tscircuit2024"]).optional(),
|
|
18244
18260
|
fontSize: length8.optional(),
|
|
18245
|
-
layers:
|
|
18246
|
-
knockout:
|
|
18247
|
-
mirrored:
|
|
18261
|
+
layers: z119.array(layer_ref10).optional(),
|
|
18262
|
+
knockout: z119.boolean().optional(),
|
|
18263
|
+
mirrored: z119.boolean().optional()
|
|
18248
18264
|
});
|
|
18249
18265
|
|
|
18250
18266
|
// lib/components/silkscreen-text.ts
|
|
18251
18267
|
import { layer_ref as layer_ref11, length as length9 } from "circuit-json";
|
|
18252
|
-
import { z as
|
|
18268
|
+
import { z as z120 } from "zod";
|
|
18253
18269
|
var silkscreenTextProps = pcbLayoutProps.extend({
|
|
18254
|
-
text:
|
|
18270
|
+
text: z120.string(),
|
|
18255
18271
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
18256
|
-
font:
|
|
18272
|
+
font: z120.enum(["tscircuit2024"]).optional(),
|
|
18257
18273
|
fontSize: length9.optional(),
|
|
18258
18274
|
/**
|
|
18259
18275
|
* If true, text will knock out underlying silkscreen
|
|
18260
18276
|
*/
|
|
18261
|
-
isKnockout:
|
|
18277
|
+
isKnockout: z120.boolean().optional(),
|
|
18262
18278
|
knockoutPadding: length9.optional(),
|
|
18263
18279
|
knockoutPaddingLeft: length9.optional(),
|
|
18264
18280
|
knockoutPaddingRight: length9.optional(),
|
|
18265
18281
|
knockoutPaddingTop: length9.optional(),
|
|
18266
18282
|
knockoutPaddingBottom: length9.optional(),
|
|
18267
|
-
layers:
|
|
18283
|
+
layers: z120.array(layer_ref11).optional()
|
|
18268
18284
|
});
|
|
18269
18285
|
|
|
18270
18286
|
// lib/components/silkscreen-path.ts
|
|
18271
18287
|
import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
|
|
18272
|
-
import { z as
|
|
18288
|
+
import { z as z121 } from "zod";
|
|
18273
18289
|
var silkscreenPathProps = pcbLayoutProps.omit({
|
|
18274
18290
|
pcbLeftEdgeX: true,
|
|
18275
18291
|
pcbRightEdgeX: true,
|
|
@@ -18281,7 +18297,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
|
|
|
18281
18297
|
pcbOffsetY: true,
|
|
18282
18298
|
pcbRotation: true
|
|
18283
18299
|
}).extend({
|
|
18284
|
-
route:
|
|
18300
|
+
route: z121.array(route_hint_point5),
|
|
18285
18301
|
strokeWidth: length10.optional()
|
|
18286
18302
|
});
|
|
18287
18303
|
|
|
@@ -18303,10 +18319,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({
|
|
|
18303
18319
|
|
|
18304
18320
|
// lib/components/silkscreen-rect.ts
|
|
18305
18321
|
import { distance as distance42 } from "circuit-json";
|
|
18306
|
-
import { z as
|
|
18322
|
+
import { z as z122 } from "zod";
|
|
18307
18323
|
var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18308
|
-
filled:
|
|
18309
|
-
stroke:
|
|
18324
|
+
filled: z122.boolean().default(true).optional(),
|
|
18325
|
+
stroke: z122.enum(["dashed", "solid", "none"]).optional(),
|
|
18310
18326
|
strokeWidth: distance42.optional(),
|
|
18311
18327
|
width: distance42,
|
|
18312
18328
|
height: distance42,
|
|
@@ -18315,10 +18331,10 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
18315
18331
|
|
|
18316
18332
|
// lib/components/silkscreen-circle.ts
|
|
18317
18333
|
import { distance as distance43 } from "circuit-json";
|
|
18318
|
-
import { z as
|
|
18334
|
+
import { z as z123 } from "zod";
|
|
18319
18335
|
var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18320
|
-
isFilled:
|
|
18321
|
-
isOutline:
|
|
18336
|
+
isFilled: z123.boolean().optional(),
|
|
18337
|
+
isOutline: z123.boolean().optional(),
|
|
18322
18338
|
strokeWidth: distance43.optional(),
|
|
18323
18339
|
radius: distance43
|
|
18324
18340
|
});
|
|
@@ -18336,63 +18352,63 @@ expectTypesMatch(true);
|
|
|
18336
18352
|
|
|
18337
18353
|
// lib/components/trace-hint.ts
|
|
18338
18354
|
import { distance as distance44, layer_ref as layer_ref12, route_hint_point as route_hint_point6 } from "circuit-json";
|
|
18339
|
-
import { z as
|
|
18340
|
-
var routeHintPointProps =
|
|
18355
|
+
import { z as z125 } from "zod";
|
|
18356
|
+
var routeHintPointProps = z125.object({
|
|
18341
18357
|
x: distance44,
|
|
18342
18358
|
y: distance44,
|
|
18343
|
-
via:
|
|
18359
|
+
via: z125.boolean().optional(),
|
|
18344
18360
|
toLayer: layer_ref12.optional()
|
|
18345
18361
|
});
|
|
18346
|
-
var traceHintProps =
|
|
18347
|
-
for:
|
|
18362
|
+
var traceHintProps = z125.object({
|
|
18363
|
+
for: z125.string().optional().describe(
|
|
18348
18364
|
"Selector for the port you're targeting, not required if you're inside a trace"
|
|
18349
18365
|
),
|
|
18350
|
-
order:
|
|
18366
|
+
order: z125.number().optional(),
|
|
18351
18367
|
offset: route_hint_point6.or(routeHintPointProps).optional(),
|
|
18352
|
-
offsets:
|
|
18353
|
-
traceWidth:
|
|
18368
|
+
offsets: z125.array(route_hint_point6).or(z125.array(routeHintPointProps)).optional(),
|
|
18369
|
+
traceWidth: z125.number().optional()
|
|
18354
18370
|
});
|
|
18355
18371
|
|
|
18356
18372
|
// lib/components/port.ts
|
|
18357
|
-
import { z as
|
|
18373
|
+
import { z as z126 } from "zod";
|
|
18358
18374
|
var portProps = commonLayoutProps.extend({
|
|
18359
|
-
name:
|
|
18360
|
-
pinNumber:
|
|
18361
|
-
schStemLength:
|
|
18362
|
-
aliases:
|
|
18363
|
-
layer:
|
|
18364
|
-
layers:
|
|
18365
|
-
schX:
|
|
18366
|
-
schY:
|
|
18375
|
+
name: z126.string().optional(),
|
|
18376
|
+
pinNumber: z126.number().optional(),
|
|
18377
|
+
schStemLength: z126.number().optional(),
|
|
18378
|
+
aliases: z126.array(z126.string()).optional(),
|
|
18379
|
+
layer: z126.string().optional(),
|
|
18380
|
+
layers: z126.array(z126.string()).optional(),
|
|
18381
|
+
schX: z126.number().optional(),
|
|
18382
|
+
schY: z126.number().optional(),
|
|
18367
18383
|
direction: direction.optional(),
|
|
18368
|
-
connectsTo:
|
|
18384
|
+
connectsTo: z126.string().or(z126.array(z126.string())).optional(),
|
|
18369
18385
|
kicadPinMetadata: kicadPinMetadata.optional(),
|
|
18370
|
-
hasInversionCircle:
|
|
18386
|
+
hasInversionCircle: z126.boolean().optional()
|
|
18371
18387
|
});
|
|
18372
18388
|
|
|
18373
18389
|
// lib/components/pcb-note-text.ts
|
|
18374
18390
|
import { length as length11 } from "circuit-json";
|
|
18375
|
-
import { z as
|
|
18391
|
+
import { z as z127 } from "zod";
|
|
18376
18392
|
var pcbNoteTextProps = pcbLayoutProps.extend({
|
|
18377
|
-
text:
|
|
18378
|
-
anchorAlignment:
|
|
18379
|
-
font:
|
|
18393
|
+
text: z127.string(),
|
|
18394
|
+
anchorAlignment: z127.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
18395
|
+
font: z127.enum(["tscircuit2024"]).optional(),
|
|
18380
18396
|
fontSize: length11.optional(),
|
|
18381
|
-
color:
|
|
18397
|
+
color: z127.string().optional()
|
|
18382
18398
|
});
|
|
18383
18399
|
expectTypesMatch(true);
|
|
18384
18400
|
|
|
18385
18401
|
// lib/components/pcb-note-rect.ts
|
|
18386
18402
|
import { distance as distance45 } from "circuit-json";
|
|
18387
|
-
import { z as
|
|
18403
|
+
import { z as z128 } from "zod";
|
|
18388
18404
|
var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18389
18405
|
width: distance45,
|
|
18390
18406
|
height: distance45,
|
|
18391
18407
|
strokeWidth: distance45.optional(),
|
|
18392
|
-
isFilled:
|
|
18393
|
-
hasStroke:
|
|
18394
|
-
isStrokeDashed:
|
|
18395
|
-
color:
|
|
18408
|
+
isFilled: z128.boolean().optional(),
|
|
18409
|
+
hasStroke: z128.boolean().optional(),
|
|
18410
|
+
isStrokeDashed: z128.boolean().optional(),
|
|
18411
|
+
color: z128.string().optional(),
|
|
18396
18412
|
cornerRadius: distance45.optional()
|
|
18397
18413
|
});
|
|
18398
18414
|
expectTypesMatch(true);
|
|
@@ -18402,7 +18418,7 @@ import {
|
|
|
18402
18418
|
length as length12,
|
|
18403
18419
|
route_hint_point as route_hint_point7
|
|
18404
18420
|
} from "circuit-json";
|
|
18405
|
-
import { z as
|
|
18421
|
+
import { z as z129 } from "zod";
|
|
18406
18422
|
var pcbNotePathProps = pcbLayoutProps.omit({
|
|
18407
18423
|
pcbLeftEdgeX: true,
|
|
18408
18424
|
pcbRightEdgeX: true,
|
|
@@ -18414,15 +18430,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
|
|
|
18414
18430
|
pcbOffsetY: true,
|
|
18415
18431
|
pcbRotation: true
|
|
18416
18432
|
}).extend({
|
|
18417
|
-
route:
|
|
18433
|
+
route: z129.array(route_hint_point7),
|
|
18418
18434
|
strokeWidth: length12.optional(),
|
|
18419
|
-
color:
|
|
18435
|
+
color: z129.string().optional()
|
|
18420
18436
|
});
|
|
18421
18437
|
expectTypesMatch(true);
|
|
18422
18438
|
|
|
18423
18439
|
// lib/components/pcb-note-line.ts
|
|
18424
18440
|
import { distance as distance46 } from "circuit-json";
|
|
18425
|
-
import { z as
|
|
18441
|
+
import { z as z130 } from "zod";
|
|
18426
18442
|
var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
18427
18443
|
pcbLeftEdgeX: true,
|
|
18428
18444
|
pcbRightEdgeX: true,
|
|
@@ -18439,15 +18455,15 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
|
18439
18455
|
x2: distance46,
|
|
18440
18456
|
y2: distance46,
|
|
18441
18457
|
strokeWidth: distance46.optional(),
|
|
18442
|
-
color:
|
|
18443
|
-
isDashed:
|
|
18458
|
+
color: z130.string().optional(),
|
|
18459
|
+
isDashed: z130.boolean().optional()
|
|
18444
18460
|
});
|
|
18445
18461
|
expectTypesMatch(true);
|
|
18446
18462
|
|
|
18447
18463
|
// lib/components/pcb-note-dimension.ts
|
|
18448
18464
|
import { distance as distance47, length as length13 } from "circuit-json";
|
|
18449
|
-
import { z as
|
|
18450
|
-
var dimensionTarget2 =
|
|
18465
|
+
import { z as z131 } from "zod";
|
|
18466
|
+
var dimensionTarget2 = z131.union([z131.string(), point]);
|
|
18451
18467
|
var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
18452
18468
|
pcbLeftEdgeX: true,
|
|
18453
18469
|
pcbRightEdgeX: true,
|
|
@@ -18461,101 +18477,101 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
18461
18477
|
}).extend({
|
|
18462
18478
|
from: dimensionTarget2,
|
|
18463
18479
|
to: dimensionTarget2,
|
|
18464
|
-
text:
|
|
18480
|
+
text: z131.string().optional(),
|
|
18465
18481
|
offset: distance47.optional(),
|
|
18466
|
-
font:
|
|
18482
|
+
font: z131.enum(["tscircuit2024"]).optional(),
|
|
18467
18483
|
fontSize: length13.optional(),
|
|
18468
|
-
color:
|
|
18484
|
+
color: z131.string().optional(),
|
|
18469
18485
|
arrowSize: distance47.optional(),
|
|
18470
|
-
units:
|
|
18471
|
-
outerEdgeToEdge:
|
|
18472
|
-
centerToCenter:
|
|
18473
|
-
innerEdgeToEdge:
|
|
18486
|
+
units: z131.enum(["in", "mm"]).optional(),
|
|
18487
|
+
outerEdgeToEdge: z131.literal(true).optional(),
|
|
18488
|
+
centerToCenter: z131.literal(true).optional(),
|
|
18489
|
+
innerEdgeToEdge: z131.literal(true).optional()
|
|
18474
18490
|
});
|
|
18475
18491
|
expectTypesMatch(
|
|
18476
18492
|
true
|
|
18477
18493
|
);
|
|
18478
18494
|
|
|
18479
18495
|
// lib/platformConfig.ts
|
|
18480
|
-
import { z as
|
|
18481
|
-
var unvalidatedCircuitJson =
|
|
18482
|
-
var footprintLibraryResult =
|
|
18483
|
-
footprintCircuitJson:
|
|
18496
|
+
import { z as z132 } from "zod";
|
|
18497
|
+
var unvalidatedCircuitJson = z132.array(z132.any()).describe("Circuit JSON");
|
|
18498
|
+
var footprintLibraryResult = z132.object({
|
|
18499
|
+
footprintCircuitJson: z132.array(z132.any()),
|
|
18484
18500
|
cadModel: cadModelProp.optional()
|
|
18485
18501
|
});
|
|
18486
|
-
var pathToCircuitJsonFn =
|
|
18487
|
-
|
|
18488
|
-
|
|
18489
|
-
|
|
18490
|
-
).returns(
|
|
18502
|
+
var pathToCircuitJsonFn = z132.function().args(z132.string()).returns(z132.promise(footprintLibraryResult)).or(
|
|
18503
|
+
z132.function().args(
|
|
18504
|
+
z132.string(),
|
|
18505
|
+
z132.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
|
|
18506
|
+
).returns(z132.promise(footprintLibraryResult))
|
|
18491
18507
|
).describe("A function that takes a path and returns Circuit JSON");
|
|
18492
|
-
var footprintFileParserEntry =
|
|
18493
|
-
loadFromUrl:
|
|
18508
|
+
var footprintFileParserEntry = z132.object({
|
|
18509
|
+
loadFromUrl: z132.function().args(z132.string()).returns(z132.promise(footprintLibraryResult)).describe(
|
|
18494
18510
|
"A function that takes a footprint file URL and returns Circuit JSON"
|
|
18495
18511
|
)
|
|
18496
18512
|
});
|
|
18497
|
-
var spiceEngineSimulationResult =
|
|
18498
|
-
engineVersionString:
|
|
18513
|
+
var spiceEngineSimulationResult = z132.object({
|
|
18514
|
+
engineVersionString: z132.string().optional(),
|
|
18499
18515
|
simulationResultCircuitJson: unvalidatedCircuitJson
|
|
18500
18516
|
});
|
|
18501
|
-
var spiceEngineZod =
|
|
18502
|
-
simulate:
|
|
18517
|
+
var spiceEngineZod = z132.object({
|
|
18518
|
+
simulate: z132.function().args(z132.string()).returns(z132.promise(spiceEngineSimulationResult)).describe(
|
|
18503
18519
|
"A function that takes a SPICE string and returns a simulation result"
|
|
18504
18520
|
)
|
|
18505
18521
|
});
|
|
18506
|
-
var defaultSpiceEngine =
|
|
18522
|
+
var defaultSpiceEngine = z132.custom(
|
|
18507
18523
|
(value) => typeof value === "string"
|
|
18508
18524
|
);
|
|
18509
|
-
var autorouterInstance =
|
|
18510
|
-
run:
|
|
18511
|
-
getOutputSimpleRouteJson:
|
|
18525
|
+
var autorouterInstance = z132.object({
|
|
18526
|
+
run: z132.function().args().returns(z132.promise(z132.unknown())).describe("Run the autorouter"),
|
|
18527
|
+
getOutputSimpleRouteJson: z132.function().args().returns(z132.promise(z132.any())).describe("Get the resulting SimpleRouteJson")
|
|
18512
18528
|
});
|
|
18513
|
-
var autorouterDefinition =
|
|
18514
|
-
createAutorouter:
|
|
18529
|
+
var autorouterDefinition = z132.object({
|
|
18530
|
+
createAutorouter: z132.function().args(z132.any(), z132.any().optional()).returns(z132.union([autorouterInstance, z132.promise(autorouterInstance)])).describe("Create an autorouter instance")
|
|
18515
18531
|
});
|
|
18516
|
-
var platformFetch =
|
|
18517
|
-
var platformConfig =
|
|
18532
|
+
var platformFetch = z132.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
|
|
18533
|
+
var platformConfig = z132.object({
|
|
18518
18534
|
partsEngine: partsEngine.optional(),
|
|
18519
18535
|
autorouter: autorouterProp.optional(),
|
|
18520
|
-
autorouterMap:
|
|
18536
|
+
autorouterMap: z132.record(z132.string(), autorouterDefinition).optional(),
|
|
18521
18537
|
registryApiUrl: url.optional(),
|
|
18522
18538
|
cloudAutorouterUrl: url.optional(),
|
|
18523
|
-
projectName:
|
|
18539
|
+
projectName: z132.string().optional(),
|
|
18524
18540
|
projectBaseUrl: url.optional(),
|
|
18525
|
-
version:
|
|
18541
|
+
version: z132.string().optional(),
|
|
18526
18542
|
url: url.optional(),
|
|
18527
|
-
printBoardInformationToSilkscreen:
|
|
18528
|
-
includeBoardFiles:
|
|
18543
|
+
printBoardInformationToSilkscreen: z132.boolean().optional(),
|
|
18544
|
+
includeBoardFiles: z132.array(z132.string()).describe(
|
|
18529
18545
|
'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
|
|
18530
18546
|
).optional(),
|
|
18531
|
-
snapshotsDir:
|
|
18547
|
+
snapshotsDir: z132.string().describe(
|
|
18532
18548
|
'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
|
|
18533
18549
|
).optional(),
|
|
18534
18550
|
defaultSpiceEngine: defaultSpiceEngine.optional(),
|
|
18535
|
-
unitPreference:
|
|
18536
|
-
localCacheEngine:
|
|
18537
|
-
pcbDisabled:
|
|
18538
|
-
routingDisabled:
|
|
18539
|
-
schematicDisabled:
|
|
18540
|
-
partsEngineDisabled:
|
|
18541
|
-
drcChecksDisabled:
|
|
18542
|
-
netlistDrcChecksDisabled:
|
|
18543
|
-
routingDrcChecksDisabled:
|
|
18544
|
-
placementDrcChecksDisabled:
|
|
18545
|
-
pinSpecificationDrcChecksDisabled:
|
|
18546
|
-
spiceEngineMap:
|
|
18547
|
-
footprintLibraryMap:
|
|
18548
|
-
|
|
18549
|
-
|
|
18551
|
+
unitPreference: z132.enum(["mm", "in", "mil"]).optional(),
|
|
18552
|
+
localCacheEngine: z132.any().optional(),
|
|
18553
|
+
pcbDisabled: z132.boolean().optional(),
|
|
18554
|
+
routingDisabled: z132.boolean().optional(),
|
|
18555
|
+
schematicDisabled: z132.boolean().optional(),
|
|
18556
|
+
partsEngineDisabled: z132.boolean().optional(),
|
|
18557
|
+
drcChecksDisabled: z132.boolean().optional(),
|
|
18558
|
+
netlistDrcChecksDisabled: z132.boolean().optional(),
|
|
18559
|
+
routingDrcChecksDisabled: z132.boolean().optional(),
|
|
18560
|
+
placementDrcChecksDisabled: z132.boolean().optional(),
|
|
18561
|
+
pinSpecificationDrcChecksDisabled: z132.boolean().optional(),
|
|
18562
|
+
spiceEngineMap: z132.record(z132.string(), spiceEngineZod).optional(),
|
|
18563
|
+
footprintLibraryMap: z132.record(
|
|
18564
|
+
z132.string(),
|
|
18565
|
+
z132.union([
|
|
18550
18566
|
pathToCircuitJsonFn,
|
|
18551
|
-
|
|
18552
|
-
|
|
18553
|
-
|
|
18567
|
+
z132.record(
|
|
18568
|
+
z132.string(),
|
|
18569
|
+
z132.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
|
|
18554
18570
|
)
|
|
18555
18571
|
])
|
|
18556
18572
|
).optional(),
|
|
18557
|
-
footprintFileParserMap:
|
|
18558
|
-
resolveProjectStaticFileImportUrl:
|
|
18573
|
+
footprintFileParserMap: z132.record(z132.string(), footprintFileParserEntry).optional(),
|
|
18574
|
+
resolveProjectStaticFileImportUrl: z132.function().args(z132.string()).returns(z132.promise(z132.string())).describe(
|
|
18559
18575
|
"A function that returns a string URL for static files for the project"
|
|
18560
18576
|
).optional(),
|
|
18561
18577
|
platformFetch: platformFetch.optional()
|
|
@@ -18634,6 +18650,7 @@ export {
|
|
|
18634
18650
|
currentSourceProps,
|
|
18635
18651
|
customDrcCheckFn,
|
|
18636
18652
|
cutoutProps,
|
|
18653
|
+
differentialPairProps,
|
|
18637
18654
|
diodePins,
|
|
18638
18655
|
diodeProps,
|
|
18639
18656
|
direction,
|