@tscircuit/props 0.0.592 → 0.0.593
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 +13 -0
- package/dist/index.d.ts +21 -1
- package/dist/index.js +462 -453
- package/dist/index.js.map +1 -1
- package/lib/components/bus.ts +20 -0
- package/lib/index.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17334,20 +17334,28 @@ var traceProps = z68.union([
|
|
|
17334
17334
|
})
|
|
17335
17335
|
]);
|
|
17336
17336
|
|
|
17337
|
-
// lib/components/
|
|
17337
|
+
// lib/components/bus.ts
|
|
17338
17338
|
import { z as z69 } from "zod";
|
|
17339
|
-
var
|
|
17339
|
+
var busProps = z69.object({
|
|
17340
17340
|
name: z69.string().optional(),
|
|
17341
|
-
|
|
17342
|
-
|
|
17343
|
-
|
|
17341
|
+
connections: z69.array(z69.string()).min(2)
|
|
17342
|
+
});
|
|
17343
|
+
expectTypesMatch(true);
|
|
17344
|
+
|
|
17345
|
+
// lib/components/differentialpair.ts
|
|
17346
|
+
import { z as z70 } from "zod";
|
|
17347
|
+
var differentialPairProps = z70.object({
|
|
17348
|
+
name: z70.string().optional(),
|
|
17349
|
+
positiveConnection: z70.string(),
|
|
17350
|
+
negativeConnection: z70.string(),
|
|
17351
|
+
maxLengthSkew: z70.number().min(0).finite().optional()
|
|
17344
17352
|
});
|
|
17345
17353
|
expectTypesMatch(true);
|
|
17346
17354
|
|
|
17347
17355
|
// lib/components/footprint.ts
|
|
17348
17356
|
import { layer_ref as layer_ref5 } from "circuit-json";
|
|
17349
|
-
import { z as
|
|
17350
|
-
var footprintInsertionDirection =
|
|
17357
|
+
import { z as z71 } from "zod";
|
|
17358
|
+
var footprintInsertionDirection = z71.enum([
|
|
17351
17359
|
"from_above",
|
|
17352
17360
|
"from_left",
|
|
17353
17361
|
"from_right",
|
|
@@ -17355,11 +17363,11 @@ var footprintInsertionDirection = z70.enum([
|
|
|
17355
17363
|
"from_back"
|
|
17356
17364
|
]);
|
|
17357
17365
|
expectTypesMatch(true);
|
|
17358
|
-
var footprintProps =
|
|
17359
|
-
children:
|
|
17360
|
-
name:
|
|
17366
|
+
var footprintProps = z71.object({
|
|
17367
|
+
children: z71.any().optional(),
|
|
17368
|
+
name: z71.string().optional(),
|
|
17361
17369
|
originalLayer: layer_ref5.default("top").optional(),
|
|
17362
|
-
circuitJson:
|
|
17370
|
+
circuitJson: z71.array(z71.any()).optional(),
|
|
17363
17371
|
src: footprintProp.describe("Can be a footprint or kicad string").optional(),
|
|
17364
17372
|
insertionDirection: footprintInsertionDirection.optional().describe(
|
|
17365
17373
|
"Direction a cable or mating part is inserted into this footprint in its unrotated orientation."
|
|
@@ -17368,19 +17376,19 @@ var footprintProps = z70.object({
|
|
|
17368
17376
|
expectTypesMatch(true);
|
|
17369
17377
|
|
|
17370
17378
|
// lib/components/symbol.ts
|
|
17371
|
-
import { z as
|
|
17372
|
-
var symbolProps =
|
|
17373
|
-
originalFacingDirection:
|
|
17379
|
+
import { z as z72 } from "zod";
|
|
17380
|
+
var symbolProps = z72.object({
|
|
17381
|
+
originalFacingDirection: z72.enum(["up", "down", "left", "right"]).default("right").optional(),
|
|
17374
17382
|
width: distance.optional(),
|
|
17375
17383
|
height: distance.optional(),
|
|
17376
|
-
name:
|
|
17384
|
+
name: z72.string().optional()
|
|
17377
17385
|
});
|
|
17378
17386
|
expectTypesMatch(true);
|
|
17379
17387
|
|
|
17380
17388
|
// lib/components/battery.ts
|
|
17381
17389
|
import { voltage as voltage2 } from "circuit-json";
|
|
17382
|
-
import { z as
|
|
17383
|
-
var capacity =
|
|
17390
|
+
import { z as z73 } from "zod";
|
|
17391
|
+
var capacity = z73.number().or(z73.string().endsWith("mAh")).transform((v) => {
|
|
17384
17392
|
if (typeof v === "string") {
|
|
17385
17393
|
const valString = v.replace("mAh", "");
|
|
17386
17394
|
const num = Number.parseFloat(valString);
|
|
@@ -17395,14 +17403,14 @@ var batteryPins = lrPolarPins;
|
|
|
17395
17403
|
var batteryProps = commonComponentProps.extend({
|
|
17396
17404
|
capacity: capacity.optional(),
|
|
17397
17405
|
voltage: voltage2.optional(),
|
|
17398
|
-
standard:
|
|
17406
|
+
standard: z73.enum(["AA", "AAA", "9V", "CR2032", "18650", "C"]).optional(),
|
|
17399
17407
|
schOrientation: schematicOrientation.optional(),
|
|
17400
17408
|
connections: createConnectionsProp(batteryPins).optional()
|
|
17401
17409
|
});
|
|
17402
17410
|
expectTypesMatch(true);
|
|
17403
17411
|
|
|
17404
17412
|
// lib/components/mountedboard.ts
|
|
17405
|
-
import { z as
|
|
17413
|
+
import { z as z74 } from "zod";
|
|
17406
17414
|
var mountedboardProps = subcircuitGroupProps.extend({
|
|
17407
17415
|
manufacturerPartNumber: chipProps.shape.manufacturerPartNumber,
|
|
17408
17416
|
pinLabels: chipProps.shape.pinLabels,
|
|
@@ -17414,7 +17422,7 @@ var mountedboardProps = subcircuitGroupProps.extend({
|
|
|
17414
17422
|
internallyConnectedPins: chipProps.shape.internallyConnectedPins,
|
|
17415
17423
|
externallyConnectedPins: chipProps.shape.externallyConnectedPins,
|
|
17416
17424
|
boardToBoardDistance: distance.optional(),
|
|
17417
|
-
mountOrientation:
|
|
17425
|
+
mountOrientation: z74.enum(["faceDown", "faceUp"]).optional()
|
|
17418
17426
|
});
|
|
17419
17427
|
expectTypesMatch(true);
|
|
17420
17428
|
|
|
@@ -17422,29 +17430,29 @@ expectTypesMatch(true);
|
|
|
17422
17430
|
import { distance as distance20 } from "circuit-json";
|
|
17423
17431
|
|
|
17424
17432
|
// lib/common/pcbOrientation.ts
|
|
17425
|
-
import { z as
|
|
17426
|
-
var pcbOrientation =
|
|
17433
|
+
import { z as z75 } from "zod";
|
|
17434
|
+
var pcbOrientation = z75.enum(["vertical", "horizontal"]).describe(
|
|
17427
17435
|
"vertical means pins go 1->2 downward and horizontal means pins go 1->2 rightward"
|
|
17428
17436
|
);
|
|
17429
17437
|
expectTypesMatch(true);
|
|
17430
17438
|
|
|
17431
17439
|
// lib/components/pin-header.ts
|
|
17432
|
-
import { z as
|
|
17440
|
+
import { z as z76 } from "zod";
|
|
17433
17441
|
var pinHeaderProps = commonComponentProps.extend({
|
|
17434
|
-
pinCount:
|
|
17442
|
+
pinCount: z76.number(),
|
|
17435
17443
|
pitch: distance20.optional(),
|
|
17436
|
-
schFacingDirection:
|
|
17437
|
-
gender:
|
|
17438
|
-
showSilkscreenPinLabels:
|
|
17439
|
-
pcbPinLabels:
|
|
17440
|
-
doubleRow:
|
|
17441
|
-
rightAngle:
|
|
17444
|
+
schFacingDirection: z76.enum(["up", "down", "left", "right"]).optional(),
|
|
17445
|
+
gender: z76.enum(["male", "female", "unpopulated"]).optional().default("male"),
|
|
17446
|
+
showSilkscreenPinLabels: z76.boolean().optional(),
|
|
17447
|
+
pcbPinLabels: z76.record(z76.string(), z76.string()).optional(),
|
|
17448
|
+
doubleRow: z76.boolean().optional(),
|
|
17449
|
+
rightAngle: z76.boolean().optional(),
|
|
17442
17450
|
pcbOrientation: pcbOrientation.optional(),
|
|
17443
17451
|
holeDiameter: distance20.optional(),
|
|
17444
17452
|
platedDiameter: distance20.optional(),
|
|
17445
|
-
pinLabels:
|
|
17446
|
-
connections:
|
|
17447
|
-
facingDirection:
|
|
17453
|
+
pinLabels: z76.record(z76.string(), schematicPinLabel).or(z76.array(schematicPinLabel)).optional(),
|
|
17454
|
+
connections: z76.custom().pipe(z76.record(z76.string(), connectionTarget)).optional(),
|
|
17455
|
+
facingDirection: z76.enum(["left", "right"]).optional(),
|
|
17448
17456
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
17449
17457
|
schPinStyle: schematicPinStyle.optional(),
|
|
17450
17458
|
schPinSpacing: distance20.optional(),
|
|
@@ -17454,29 +17462,29 @@ var pinHeaderProps = commonComponentProps.extend({
|
|
|
17454
17462
|
expectTypesMatch(true);
|
|
17455
17463
|
|
|
17456
17464
|
// lib/components/netalias.ts
|
|
17457
|
-
import { z as
|
|
17465
|
+
import { z as z77 } from "zod";
|
|
17458
17466
|
import { rotation as rotation3 } from "circuit-json";
|
|
17459
|
-
var netAliasProps =
|
|
17460
|
-
net:
|
|
17461
|
-
connection:
|
|
17467
|
+
var netAliasProps = z77.object({
|
|
17468
|
+
net: z77.string().optional(),
|
|
17469
|
+
connection: z77.string().optional(),
|
|
17462
17470
|
schX: distance.optional(),
|
|
17463
17471
|
schY: distance.optional(),
|
|
17464
17472
|
schRotation: rotation3.optional(),
|
|
17465
|
-
anchorSide:
|
|
17473
|
+
anchorSide: z77.enum(["left", "top", "right", "bottom"]).optional()
|
|
17466
17474
|
});
|
|
17467
17475
|
expectTypesMatch(true);
|
|
17468
17476
|
|
|
17469
17477
|
// lib/components/netlabel.ts
|
|
17470
|
-
import { z as
|
|
17478
|
+
import { z as z78 } from "zod";
|
|
17471
17479
|
import { rotation as rotation4 } from "circuit-json";
|
|
17472
|
-
var netLabelProps =
|
|
17473
|
-
net:
|
|
17474
|
-
connection:
|
|
17475
|
-
connectsTo:
|
|
17480
|
+
var netLabelProps = z78.object({
|
|
17481
|
+
net: z78.string().optional(),
|
|
17482
|
+
connection: z78.string().optional(),
|
|
17483
|
+
connectsTo: z78.string().or(z78.array(z78.string())).optional(),
|
|
17476
17484
|
schX: distance.optional(),
|
|
17477
17485
|
schY: distance.optional(),
|
|
17478
17486
|
schRotation: rotation4.optional(),
|
|
17479
|
-
anchorSide:
|
|
17487
|
+
anchorSide: z78.enum(["left", "top", "right", "bottom"]).optional()
|
|
17480
17488
|
});
|
|
17481
17489
|
expectTypesMatch(true);
|
|
17482
17490
|
|
|
@@ -17491,32 +17499,32 @@ expectTypesMatch(true);
|
|
|
17491
17499
|
|
|
17492
17500
|
// lib/components/analogsimulation.ts
|
|
17493
17501
|
import { ms } from "circuit-json";
|
|
17494
|
-
import { z as
|
|
17495
|
-
var spiceEngine =
|
|
17502
|
+
import { z as z80 } from "zod";
|
|
17503
|
+
var spiceEngine = z80.custom(
|
|
17496
17504
|
(value) => typeof value === "string"
|
|
17497
17505
|
);
|
|
17498
|
-
var spiceOptions =
|
|
17499
|
-
method:
|
|
17500
|
-
reltol:
|
|
17501
|
-
abstol:
|
|
17502
|
-
vntol:
|
|
17506
|
+
var spiceOptions = z80.object({
|
|
17507
|
+
method: z80.enum(["trap", "gear"]).optional(),
|
|
17508
|
+
reltol: z80.union([z80.number(), z80.string()]).optional(),
|
|
17509
|
+
abstol: z80.union([z80.number(), z80.string()]).optional(),
|
|
17510
|
+
vntol: z80.union([z80.number(), z80.string()]).optional()
|
|
17503
17511
|
});
|
|
17504
17512
|
var analogAnalysisSimulationBaseProps = {
|
|
17505
|
-
name:
|
|
17513
|
+
name: z80.string().optional(),
|
|
17506
17514
|
spiceEngine: spiceEngine.optional(),
|
|
17507
17515
|
spiceOptions: spiceOptions.optional(),
|
|
17508
|
-
graphIndependentAxes:
|
|
17509
|
-
children:
|
|
17516
|
+
graphIndependentAxes: z80.boolean().optional(),
|
|
17517
|
+
children: z80.custom().optional()
|
|
17510
17518
|
};
|
|
17511
|
-
var analogSimulationProps =
|
|
17512
|
-
name:
|
|
17513
|
-
simulationType:
|
|
17519
|
+
var analogSimulationProps = z80.object({
|
|
17520
|
+
name: z80.string().optional(),
|
|
17521
|
+
simulationType: z80.literal("spice_transient_analysis").default("spice_transient_analysis"),
|
|
17514
17522
|
duration: ms.optional(),
|
|
17515
17523
|
startTime: ms.optional(),
|
|
17516
17524
|
timePerStep: ms.optional(),
|
|
17517
17525
|
spiceEngine: spiceEngine.optional(),
|
|
17518
17526
|
spiceOptions: spiceOptions.optional(),
|
|
17519
|
-
graphIndependentAxes:
|
|
17527
|
+
graphIndependentAxes: z80.boolean().optional()
|
|
17520
17528
|
});
|
|
17521
17529
|
expectTypesMatch(
|
|
17522
17530
|
true
|
|
@@ -17524,12 +17532,12 @@ expectTypesMatch(
|
|
|
17524
17532
|
|
|
17525
17533
|
// lib/components/analogtransientsimulation.ts
|
|
17526
17534
|
import { ms as ms2 } from "circuit-json";
|
|
17527
|
-
import { z as
|
|
17535
|
+
import { z as z81 } from "zod";
|
|
17528
17536
|
var positiveMilliseconds = ms2.refine(
|
|
17529
17537
|
(milliseconds) => milliseconds > 0,
|
|
17530
17538
|
"Time must be positive"
|
|
17531
17539
|
);
|
|
17532
|
-
var analogTransientSimulationProps =
|
|
17540
|
+
var analogTransientSimulationProps = z81.object({
|
|
17533
17541
|
...analogAnalysisSimulationBaseProps,
|
|
17534
17542
|
duration: positiveMilliseconds.default("10ms"),
|
|
17535
17543
|
startTime: ms2.default("0ms"),
|
|
@@ -17537,7 +17545,7 @@ var analogTransientSimulationProps = z80.object({
|
|
|
17537
17545
|
}).superRefine((simulation, context) => {
|
|
17538
17546
|
if (simulation.startTime < 0 || simulation.startTime > simulation.duration) {
|
|
17539
17547
|
context.addIssue({
|
|
17540
|
-
code:
|
|
17548
|
+
code: z81.ZodIssueCode.custom,
|
|
17541
17549
|
path: ["startTime"],
|
|
17542
17550
|
message: "startTime must be between zero and duration"
|
|
17543
17551
|
});
|
|
@@ -17546,19 +17554,19 @@ var analogTransientSimulationProps = z80.object({
|
|
|
17546
17554
|
expectTypesMatch(true);
|
|
17547
17555
|
|
|
17548
17556
|
// lib/components/analogdcoperatingpointsimulation.ts
|
|
17549
|
-
import { z as
|
|
17550
|
-
var analogDcOperatingPointSimulationProps =
|
|
17557
|
+
import { z as z82 } from "zod";
|
|
17558
|
+
var analogDcOperatingPointSimulationProps = z82.object({
|
|
17551
17559
|
...analogAnalysisSimulationBaseProps
|
|
17552
17560
|
});
|
|
17553
17561
|
expectTypesMatch(true);
|
|
17554
17562
|
|
|
17555
17563
|
// lib/components/analogdcsweepsimulation.ts
|
|
17556
17564
|
import { current, voltage as voltage3 } from "circuit-json";
|
|
17557
|
-
import { z as
|
|
17558
|
-
var dcSweepQuantity =
|
|
17559
|
-
var analogDcSweepSimulationProps =
|
|
17565
|
+
import { z as z83 } from "zod";
|
|
17566
|
+
var dcSweepQuantity = z83.union([voltage3, current]);
|
|
17567
|
+
var analogDcSweepSimulationProps = z83.object({
|
|
17560
17568
|
...analogAnalysisSimulationBaseProps,
|
|
17561
|
-
sweepSource:
|
|
17569
|
+
sweepSource: z83.string().min(1),
|
|
17562
17570
|
sweepStart: dcSweepQuantity,
|
|
17563
17571
|
sweepStop: dcSweepQuantity,
|
|
17564
17572
|
sweepStep: dcSweepQuantity.refine(
|
|
@@ -17568,7 +17576,7 @@ var analogDcSweepSimulationProps = z82.object({
|
|
|
17568
17576
|
}).superRefine((simulation, context) => {
|
|
17569
17577
|
if (Math.sign(simulation.sweepStop - simulation.sweepStart) !== Math.sign(simulation.sweepStep)) {
|
|
17570
17578
|
context.addIssue({
|
|
17571
|
-
code:
|
|
17579
|
+
code: z83.ZodIssueCode.custom,
|
|
17572
17580
|
path: ["sweepStep"],
|
|
17573
17581
|
message: "sweepStep must move from sweepStart toward sweepStop"
|
|
17574
17582
|
});
|
|
@@ -17578,10 +17586,10 @@ expectTypesMatch(true);
|
|
|
17578
17586
|
|
|
17579
17587
|
// lib/components/analogacsweepsimulation.ts
|
|
17580
17588
|
import { frequency as frequency3 } from "circuit-json";
|
|
17581
|
-
import { z as
|
|
17582
|
-
var analogAcSweepSimulationProps =
|
|
17589
|
+
import { z as z84 } from "zod";
|
|
17590
|
+
var analogAcSweepSimulationProps = z84.object({
|
|
17583
17591
|
...analogAnalysisSimulationBaseProps,
|
|
17584
|
-
sweepType:
|
|
17592
|
+
sweepType: z84.enum(["linear", "decade", "octave"]),
|
|
17585
17593
|
startFrequency: frequency3.refine(
|
|
17586
17594
|
(startFrequencyHz) => startFrequencyHz > 0,
|
|
17587
17595
|
"startFrequency must be positive"
|
|
@@ -17590,12 +17598,12 @@ var analogAcSweepSimulationProps = z83.object({
|
|
|
17590
17598
|
(stopFrequencyHz) => stopFrequencyHz > 0,
|
|
17591
17599
|
"stopFrequency must be positive"
|
|
17592
17600
|
),
|
|
17593
|
-
samplesPerInterval:
|
|
17594
|
-
sampleCount:
|
|
17601
|
+
samplesPerInterval: z84.number().int().positive().optional(),
|
|
17602
|
+
sampleCount: z84.number().int().positive().optional()
|
|
17595
17603
|
}).superRefine((simulation, context) => {
|
|
17596
17604
|
if (simulation.stopFrequency <= simulation.startFrequency) {
|
|
17597
17605
|
context.addIssue({
|
|
17598
|
-
code:
|
|
17606
|
+
code: z84.ZodIssueCode.custom,
|
|
17599
17607
|
path: ["stopFrequency"],
|
|
17600
17608
|
message: "stopFrequency must be greater than startFrequency"
|
|
17601
17609
|
});
|
|
@@ -17603,14 +17611,14 @@ var analogAcSweepSimulationProps = z83.object({
|
|
|
17603
17611
|
if (simulation.sweepType === "linear") {
|
|
17604
17612
|
if (simulation.sampleCount === void 0) {
|
|
17605
17613
|
context.addIssue({
|
|
17606
|
-
code:
|
|
17614
|
+
code: z84.ZodIssueCode.custom,
|
|
17607
17615
|
path: ["sampleCount"],
|
|
17608
17616
|
message: "sampleCount is required for a linear AC sweep"
|
|
17609
17617
|
});
|
|
17610
17618
|
}
|
|
17611
17619
|
if (simulation.samplesPerInterval !== void 0) {
|
|
17612
17620
|
context.addIssue({
|
|
17613
|
-
code:
|
|
17621
|
+
code: z84.ZodIssueCode.custom,
|
|
17614
17622
|
path: ["samplesPerInterval"],
|
|
17615
17623
|
message: "samplesPerInterval is only valid for decade or octave sweeps"
|
|
17616
17624
|
});
|
|
@@ -17619,14 +17627,14 @@ var analogAcSweepSimulationProps = z83.object({
|
|
|
17619
17627
|
}
|
|
17620
17628
|
if (simulation.samplesPerInterval === void 0) {
|
|
17621
17629
|
context.addIssue({
|
|
17622
|
-
code:
|
|
17630
|
+
code: z84.ZodIssueCode.custom,
|
|
17623
17631
|
path: ["samplesPerInterval"],
|
|
17624
17632
|
message: "samplesPerInterval is required for decade or octave sweeps"
|
|
17625
17633
|
});
|
|
17626
17634
|
}
|
|
17627
17635
|
if (simulation.sampleCount !== void 0) {
|
|
17628
17636
|
context.addIssue({
|
|
17629
|
-
code:
|
|
17637
|
+
code: z84.ZodIssueCode.custom,
|
|
17630
17638
|
path: ["sampleCount"],
|
|
17631
17639
|
message: "sampleCount is only valid for a linear sweep"
|
|
17632
17640
|
});
|
|
@@ -17642,43 +17650,43 @@ import {
|
|
|
17642
17650
|
resistance as resistance3,
|
|
17643
17651
|
voltage as voltage4
|
|
17644
17652
|
} from "circuit-json";
|
|
17645
|
-
import { z as
|
|
17646
|
-
var resistanceSweepQuantity = resistance3.pipe(
|
|
17647
|
-
var capacitanceSweepQuantity = capacitance4.pipe(
|
|
17648
|
-
var inductanceSweepQuantity = inductance.pipe(
|
|
17649
|
-
var voltageSweepQuantity = voltage4.pipe(
|
|
17650
|
-
var currentSweepQuantity = current2.pipe(
|
|
17653
|
+
import { z as z85 } from "zod";
|
|
17654
|
+
var resistanceSweepQuantity = resistance3.pipe(z85.number());
|
|
17655
|
+
var capacitanceSweepQuantity = capacitance4.pipe(z85.number());
|
|
17656
|
+
var inductanceSweepQuantity = inductance.pipe(z85.number());
|
|
17657
|
+
var voltageSweepQuantity = voltage4.pipe(z85.number());
|
|
17658
|
+
var currentSweepQuantity = current2.pipe(z85.number());
|
|
17651
17659
|
var createAnalogSweepCoordinateProps = (sweepQuantity) => ({
|
|
17652
|
-
name:
|
|
17653
|
-
values:
|
|
17660
|
+
name: z85.string().optional(),
|
|
17661
|
+
values: z85.array(sweepQuantity).min(1).optional(),
|
|
17654
17662
|
start: sweepQuantity.optional(),
|
|
17655
17663
|
stop: sweepQuantity.optional(),
|
|
17656
17664
|
step: sweepQuantity.optional()
|
|
17657
17665
|
});
|
|
17658
|
-
var analogResistanceSweepParameterProps =
|
|
17666
|
+
var analogResistanceSweepParameterProps = z85.object({
|
|
17659
17667
|
...createAnalogSweepCoordinateProps(resistanceSweepQuantity),
|
|
17660
|
-
parameterType:
|
|
17661
|
-
resistorRef:
|
|
17668
|
+
parameterType: z85.literal("resistance"),
|
|
17669
|
+
resistorRef: z85.string().min(1)
|
|
17662
17670
|
}).strict();
|
|
17663
|
-
var analogCapacitanceSweepParameterProps =
|
|
17671
|
+
var analogCapacitanceSweepParameterProps = z85.object({
|
|
17664
17672
|
...createAnalogSweepCoordinateProps(capacitanceSweepQuantity),
|
|
17665
|
-
parameterType:
|
|
17666
|
-
capacitorRef:
|
|
17673
|
+
parameterType: z85.literal("capacitance"),
|
|
17674
|
+
capacitorRef: z85.string().min(1)
|
|
17667
17675
|
}).strict();
|
|
17668
|
-
var analogInductanceSweepParameterProps =
|
|
17676
|
+
var analogInductanceSweepParameterProps = z85.object({
|
|
17669
17677
|
...createAnalogSweepCoordinateProps(inductanceSweepQuantity),
|
|
17670
|
-
parameterType:
|
|
17671
|
-
inductorRef:
|
|
17678
|
+
parameterType: z85.literal("inductance"),
|
|
17679
|
+
inductorRef: z85.string().min(1)
|
|
17672
17680
|
}).strict();
|
|
17673
|
-
var analogVoltageSweepParameterProps =
|
|
17681
|
+
var analogVoltageSweepParameterProps = z85.object({
|
|
17674
17682
|
...createAnalogSweepCoordinateProps(voltageSweepQuantity),
|
|
17675
|
-
parameterType:
|
|
17676
|
-
net:
|
|
17683
|
+
parameterType: z85.literal("voltage"),
|
|
17684
|
+
net: z85.string().min(1)
|
|
17677
17685
|
}).strict();
|
|
17678
|
-
var analogCurrentSweepParameterProps =
|
|
17686
|
+
var analogCurrentSweepParameterProps = z85.object({
|
|
17679
17687
|
...createAnalogSweepCoordinateProps(currentSweepQuantity),
|
|
17680
|
-
parameterType:
|
|
17681
|
-
currentSourceRef:
|
|
17688
|
+
parameterType: z85.literal("current"),
|
|
17689
|
+
currentSourceRef: z85.string().min(1)
|
|
17682
17690
|
}).strict();
|
|
17683
17691
|
var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
|
|
17684
17692
|
const hasExplicitSweepCoordinates = sweepCoordinates.values !== void 0;
|
|
@@ -17690,34 +17698,34 @@ var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
|
|
|
17690
17698
|
const hasRangeCoordinates = rangeCoordinateCount > 0;
|
|
17691
17699
|
if (hasExplicitSweepCoordinates === hasRangeCoordinates) {
|
|
17692
17700
|
context.addIssue({
|
|
17693
|
-
code:
|
|
17701
|
+
code: z85.ZodIssueCode.custom,
|
|
17694
17702
|
message: "Provide either values or start/stop/step"
|
|
17695
17703
|
});
|
|
17696
17704
|
return;
|
|
17697
17705
|
}
|
|
17698
17706
|
if (rangeCoordinateCount !== 0 && rangeCoordinateCount !== 3) {
|
|
17699
17707
|
context.addIssue({
|
|
17700
|
-
code:
|
|
17708
|
+
code: z85.ZodIssueCode.custom,
|
|
17701
17709
|
message: "start, stop, and step must be provided together"
|
|
17702
17710
|
});
|
|
17703
17711
|
return;
|
|
17704
17712
|
}
|
|
17705
17713
|
if (sweepCoordinates.step === 0) {
|
|
17706
17714
|
context.addIssue({
|
|
17707
|
-
code:
|
|
17715
|
+
code: z85.ZodIssueCode.custom,
|
|
17708
17716
|
path: ["step"],
|
|
17709
17717
|
message: "step must be nonzero"
|
|
17710
17718
|
});
|
|
17711
17719
|
}
|
|
17712
17720
|
if (sweepCoordinates.start !== void 0 && sweepCoordinates.stop !== void 0 && sweepCoordinates.step !== void 0 && Math.sign(sweepCoordinates.stop - sweepCoordinates.start) !== Math.sign(sweepCoordinates.step)) {
|
|
17713
17721
|
context.addIssue({
|
|
17714
|
-
code:
|
|
17722
|
+
code: z85.ZodIssueCode.custom,
|
|
17715
17723
|
path: ["step"],
|
|
17716
17724
|
message: "step must move from start toward stop"
|
|
17717
17725
|
});
|
|
17718
17726
|
}
|
|
17719
17727
|
};
|
|
17720
|
-
var analogSweepParameterProps =
|
|
17728
|
+
var analogSweepParameterProps = z85.discriminatedUnion("parameterType", [
|
|
17721
17729
|
analogResistanceSweepParameterProps,
|
|
17722
17730
|
analogCapacitanceSweepParameterProps,
|
|
17723
17731
|
analogInductanceSweepParameterProps,
|
|
@@ -17732,27 +17740,27 @@ expectTypesMatch(true);
|
|
|
17732
17740
|
expectTypesMatch(true);
|
|
17733
17741
|
|
|
17734
17742
|
// lib/components/autoroutingphase.ts
|
|
17735
|
-
import { z as
|
|
17736
|
-
var autoroutingPhaseProps =
|
|
17737
|
-
key:
|
|
17738
|
-
name:
|
|
17743
|
+
import { z as z86 } from "zod";
|
|
17744
|
+
var autoroutingPhaseProps = z86.object({
|
|
17745
|
+
key: z86.any().optional(),
|
|
17746
|
+
name: z86.string().optional(),
|
|
17739
17747
|
autorouter: autorouterProp.optional(),
|
|
17740
|
-
phaseIndex:
|
|
17748
|
+
phaseIndex: z86.number().optional(),
|
|
17741
17749
|
...routingTolerances.shape,
|
|
17742
|
-
region:
|
|
17743
|
-
shape:
|
|
17744
|
-
minX:
|
|
17745
|
-
maxX:
|
|
17746
|
-
minY:
|
|
17747
|
-
maxY:
|
|
17750
|
+
region: z86.object({
|
|
17751
|
+
shape: z86.literal("rect").optional(),
|
|
17752
|
+
minX: z86.number(),
|
|
17753
|
+
maxX: z86.number(),
|
|
17754
|
+
minY: z86.number(),
|
|
17755
|
+
maxY: z86.number()
|
|
17748
17756
|
}).optional(),
|
|
17749
|
-
connection:
|
|
17750
|
-
connections:
|
|
17751
|
-
reroute:
|
|
17757
|
+
connection: z86.string().optional(),
|
|
17758
|
+
connections: z86.array(z86.string()).optional(),
|
|
17759
|
+
reroute: z86.boolean().optional()
|
|
17752
17760
|
}).superRefine((value, ctx) => {
|
|
17753
17761
|
if (value.reroute !== void 0 && value.region === void 0 && value.connection === void 0 && value.connections === void 0) {
|
|
17754
17762
|
ctx.addIssue({
|
|
17755
|
-
code:
|
|
17763
|
+
code: z86.ZodIssueCode.custom,
|
|
17756
17764
|
message: "region, connection, or connections is required when reroute is provided",
|
|
17757
17765
|
path: ["region"]
|
|
17758
17766
|
});
|
|
@@ -17761,15 +17769,15 @@ var autoroutingPhaseProps = z85.object({
|
|
|
17761
17769
|
expectTypesMatch(true);
|
|
17762
17770
|
|
|
17763
17771
|
// lib/components/spicemodel.ts
|
|
17764
|
-
import { z as
|
|
17765
|
-
var spicemodelProps =
|
|
17766
|
-
source:
|
|
17767
|
-
spicePinMapping:
|
|
17772
|
+
import { z as z87 } from "zod";
|
|
17773
|
+
var spicemodelProps = z87.object({
|
|
17774
|
+
source: z87.string(),
|
|
17775
|
+
spicePinMapping: z87.record(z87.string(), z87.string()).optional()
|
|
17768
17776
|
});
|
|
17769
17777
|
expectTypesMatch(true);
|
|
17770
17778
|
|
|
17771
17779
|
// lib/components/transistor.ts
|
|
17772
|
-
import { z as
|
|
17780
|
+
import { z as z88 } from "zod";
|
|
17773
17781
|
var transistorPinsLabels = [
|
|
17774
17782
|
"pin1",
|
|
17775
17783
|
"pin2",
|
|
@@ -17782,7 +17790,7 @@ var transistorPinsLabels = [
|
|
|
17782
17790
|
"drain"
|
|
17783
17791
|
];
|
|
17784
17792
|
var transistorProps = commonComponentProps.extend({
|
|
17785
|
-
type:
|
|
17793
|
+
type: z88.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
|
|
17786
17794
|
connections: createConnectionsProp(transistorPinsLabels).optional()
|
|
17787
17795
|
});
|
|
17788
17796
|
var transistorPins = [
|
|
@@ -17796,7 +17804,7 @@ var transistorPins = [
|
|
|
17796
17804
|
expectTypesMatch(true);
|
|
17797
17805
|
|
|
17798
17806
|
// lib/components/mosfet.ts
|
|
17799
|
-
import { z as
|
|
17807
|
+
import { z as z89 } from "zod";
|
|
17800
17808
|
var mosfetPins = [
|
|
17801
17809
|
"pin1",
|
|
17802
17810
|
"drain",
|
|
@@ -17806,11 +17814,11 @@ var mosfetPins = [
|
|
|
17806
17814
|
"gate"
|
|
17807
17815
|
];
|
|
17808
17816
|
var mosfetProps = commonComponentProps.extend({
|
|
17809
|
-
channelType:
|
|
17810
|
-
mosfetMode:
|
|
17811
|
-
symbolDrainSide:
|
|
17812
|
-
symbolSourceSide:
|
|
17813
|
-
symbolGateSide:
|
|
17817
|
+
channelType: z89.enum(["n", "p"]),
|
|
17818
|
+
mosfetMode: z89.enum(["enhancement", "depletion"]),
|
|
17819
|
+
symbolDrainSide: z89.enum(["left", "right", "top", "bottom"]).optional(),
|
|
17820
|
+
symbolSourceSide: z89.enum(["left", "right", "top", "bottom"]).optional(),
|
|
17821
|
+
symbolGateSide: z89.enum(["left", "right", "top", "bottom"]).optional(),
|
|
17814
17822
|
connections: createConnectionsProp(mosfetPins).optional()
|
|
17815
17823
|
});
|
|
17816
17824
|
expectTypesMatch(true);
|
|
@@ -17832,29 +17840,29 @@ expectTypesMatch(true);
|
|
|
17832
17840
|
|
|
17833
17841
|
// lib/components/inductor.ts
|
|
17834
17842
|
import { inductance as inductance2 } from "circuit-json";
|
|
17835
|
-
import { z as
|
|
17843
|
+
import { z as z91 } from "zod";
|
|
17836
17844
|
var inductorPins = lrPins;
|
|
17837
17845
|
var inductorProps = commonComponentProps.extend({
|
|
17838
17846
|
inductance: inductance2,
|
|
17839
|
-
maxCurrentRating:
|
|
17847
|
+
maxCurrentRating: z91.union([z91.string(), z91.number()]).optional(),
|
|
17840
17848
|
schOrientation: schematicOrientation.optional(),
|
|
17841
17849
|
connections: createConnectionsProp(inductorPins).optional()
|
|
17842
17850
|
});
|
|
17843
17851
|
expectTypesMatch(true);
|
|
17844
17852
|
|
|
17845
17853
|
// lib/components/internal-circuit.ts
|
|
17846
|
-
import { z as
|
|
17847
|
-
var internalCircuitProps =
|
|
17848
|
-
children:
|
|
17854
|
+
import { z as z92 } from "zod";
|
|
17855
|
+
var internalCircuitProps = z92.object({
|
|
17856
|
+
children: z92.custom().optional()
|
|
17849
17857
|
});
|
|
17850
17858
|
expectTypesMatch(
|
|
17851
17859
|
true
|
|
17852
17860
|
);
|
|
17853
17861
|
|
|
17854
17862
|
// lib/components/diode.ts
|
|
17855
|
-
import { z as
|
|
17863
|
+
import { z as z93 } from "zod";
|
|
17856
17864
|
var diodePins = lrPolarPins;
|
|
17857
|
-
var diodeConnectionKeys =
|
|
17865
|
+
var diodeConnectionKeys = z93.enum([
|
|
17858
17866
|
"anode",
|
|
17859
17867
|
"cathode",
|
|
17860
17868
|
"pin1",
|
|
@@ -17862,13 +17870,13 @@ var diodeConnectionKeys = z92.enum([
|
|
|
17862
17870
|
"pos",
|
|
17863
17871
|
"neg"
|
|
17864
17872
|
]);
|
|
17865
|
-
var connectionTarget3 =
|
|
17866
|
-
var connectionsProp2 =
|
|
17867
|
-
var diodePinLabelsProp =
|
|
17868
|
-
|
|
17869
|
-
schematicPinLabel.or(
|
|
17873
|
+
var connectionTarget3 = z93.string().or(z93.array(z93.string()).readonly()).or(z93.array(z93.string()));
|
|
17874
|
+
var connectionsProp2 = z93.record(diodeConnectionKeys, connectionTarget3);
|
|
17875
|
+
var diodePinLabelsProp = z93.record(
|
|
17876
|
+
z93.enum(diodePins),
|
|
17877
|
+
schematicPinLabel.or(z93.array(schematicPinLabel).readonly()).or(z93.array(schematicPinLabel))
|
|
17870
17878
|
);
|
|
17871
|
-
var diodeVariant =
|
|
17879
|
+
var diodeVariant = z93.enum([
|
|
17872
17880
|
"standard",
|
|
17873
17881
|
"schottky",
|
|
17874
17882
|
"zener",
|
|
@@ -17879,12 +17887,12 @@ var diodeVariant = z92.enum([
|
|
|
17879
17887
|
var diodeProps = commonComponentProps.extend({
|
|
17880
17888
|
connections: connectionsProp2.optional(),
|
|
17881
17889
|
variant: diodeVariant.optional().default("standard"),
|
|
17882
|
-
standard:
|
|
17883
|
-
schottky:
|
|
17884
|
-
zener:
|
|
17885
|
-
avalanche:
|
|
17886
|
-
photo:
|
|
17887
|
-
tvs:
|
|
17890
|
+
standard: z93.boolean().optional(),
|
|
17891
|
+
schottky: z93.boolean().optional(),
|
|
17892
|
+
zener: z93.boolean().optional(),
|
|
17893
|
+
avalanche: z93.boolean().optional(),
|
|
17894
|
+
photo: z93.boolean().optional(),
|
|
17895
|
+
tvs: z93.boolean().optional(),
|
|
17888
17896
|
schOrientation: schematicOrientation.optional(),
|
|
17889
17897
|
pinLabels: diodePinLabelsProp.optional()
|
|
17890
17898
|
}).superRefine((data, ctx) => {
|
|
@@ -17898,11 +17906,11 @@ var diodeProps = commonComponentProps.extend({
|
|
|
17898
17906
|
].filter(Boolean).length;
|
|
17899
17907
|
if (enabledFlags > 1) {
|
|
17900
17908
|
ctx.addIssue({
|
|
17901
|
-
code:
|
|
17909
|
+
code: z93.ZodIssueCode.custom,
|
|
17902
17910
|
message: "Exactly one diode variant must be enabled",
|
|
17903
17911
|
path: []
|
|
17904
17912
|
});
|
|
17905
|
-
return
|
|
17913
|
+
return z93.INVALID;
|
|
17906
17914
|
}
|
|
17907
17915
|
}).transform((data) => {
|
|
17908
17916
|
const result = {
|
|
@@ -17948,34 +17956,34 @@ var diodeProps = commonComponentProps.extend({
|
|
|
17948
17956
|
expectTypesMatch(true);
|
|
17949
17957
|
|
|
17950
17958
|
// lib/components/led.ts
|
|
17951
|
-
import { z as
|
|
17959
|
+
import { z as z94 } from "zod";
|
|
17952
17960
|
var ledProps = commonComponentProps.extend({
|
|
17953
|
-
color:
|
|
17954
|
-
wavelength:
|
|
17955
|
-
schDisplayValue:
|
|
17961
|
+
color: z94.string().optional(),
|
|
17962
|
+
wavelength: z94.string().optional(),
|
|
17963
|
+
schDisplayValue: z94.string().optional(),
|
|
17956
17964
|
schOrientation: schematicOrientation.optional(),
|
|
17957
17965
|
connections: createConnectionsProp(lrPolarPins).optional(),
|
|
17958
|
-
laser:
|
|
17966
|
+
laser: z94.boolean().optional()
|
|
17959
17967
|
});
|
|
17960
17968
|
var ledPins = lrPolarPins;
|
|
17961
17969
|
|
|
17962
17970
|
// lib/components/switch.ts
|
|
17963
17971
|
import { ms as ms3, frequency as frequency4 } from "circuit-json";
|
|
17964
|
-
import { z as
|
|
17972
|
+
import { z as z95 } from "zod";
|
|
17965
17973
|
var switchProps = commonComponentProps.extend({
|
|
17966
|
-
type:
|
|
17967
|
-
isNormallyClosed:
|
|
17968
|
-
spst:
|
|
17969
|
-
spdt:
|
|
17970
|
-
dpst:
|
|
17971
|
-
dpdt:
|
|
17974
|
+
type: z95.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
|
|
17975
|
+
isNormallyClosed: z95.boolean().optional().default(false),
|
|
17976
|
+
spst: z95.boolean().optional(),
|
|
17977
|
+
spdt: z95.boolean().optional(),
|
|
17978
|
+
dpst: z95.boolean().optional(),
|
|
17979
|
+
dpdt: z95.boolean().optional(),
|
|
17972
17980
|
pinLabels: pinLabelsProp.optional(),
|
|
17973
17981
|
simSwitchFrequency: frequency4.optional(),
|
|
17974
17982
|
simCloseAt: ms3.optional(),
|
|
17975
17983
|
simOpenAt: ms3.optional(),
|
|
17976
|
-
simStartClosed:
|
|
17977
|
-
simStartOpen:
|
|
17978
|
-
connections:
|
|
17984
|
+
simStartClosed: z95.boolean().optional(),
|
|
17985
|
+
simStartOpen: z95.boolean().optional(),
|
|
17986
|
+
connections: z95.custom().pipe(z95.record(z95.string(), connectionTarget)).optional()
|
|
17979
17987
|
}).transform((props) => {
|
|
17980
17988
|
const updatedProps = { ...props };
|
|
17981
17989
|
if (updatedProps.dpdt) {
|
|
@@ -18007,33 +18015,33 @@ expectTypesMatch(true);
|
|
|
18007
18015
|
|
|
18008
18016
|
// lib/components/fabrication-note-text.ts
|
|
18009
18017
|
import { length as length4 } from "circuit-json";
|
|
18010
|
-
import { z as
|
|
18018
|
+
import { z as z96 } from "zod";
|
|
18011
18019
|
var fabricationNoteTextProps = pcbLayoutProps.extend({
|
|
18012
|
-
text:
|
|
18013
|
-
anchorAlignment:
|
|
18014
|
-
font:
|
|
18020
|
+
text: z96.string(),
|
|
18021
|
+
anchorAlignment: z96.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
18022
|
+
font: z96.enum(["tscircuit2024"]).optional(),
|
|
18015
18023
|
fontSize: length4.optional(),
|
|
18016
|
-
color:
|
|
18024
|
+
color: z96.string().optional()
|
|
18017
18025
|
});
|
|
18018
18026
|
expectTypesMatch(true);
|
|
18019
18027
|
|
|
18020
18028
|
// lib/components/fabrication-note-rect.ts
|
|
18021
18029
|
import { distance as distance21 } from "circuit-json";
|
|
18022
|
-
import { z as
|
|
18030
|
+
import { z as z97 } from "zod";
|
|
18023
18031
|
var fabricationNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18024
18032
|
width: distance21,
|
|
18025
18033
|
height: distance21,
|
|
18026
18034
|
strokeWidth: distance21.optional(),
|
|
18027
|
-
isFilled:
|
|
18028
|
-
hasStroke:
|
|
18029
|
-
isStrokeDashed:
|
|
18030
|
-
color:
|
|
18035
|
+
isFilled: z97.boolean().optional(),
|
|
18036
|
+
hasStroke: z97.boolean().optional(),
|
|
18037
|
+
isStrokeDashed: z97.boolean().optional(),
|
|
18038
|
+
color: z97.string().optional(),
|
|
18031
18039
|
cornerRadius: distance21.optional()
|
|
18032
18040
|
});
|
|
18033
18041
|
|
|
18034
18042
|
// lib/components/fabrication-note-path.ts
|
|
18035
18043
|
import { length as length5, route_hint_point as route_hint_point3 } from "circuit-json";
|
|
18036
|
-
import { z as
|
|
18044
|
+
import { z as z98 } from "zod";
|
|
18037
18045
|
var fabricationNotePathProps = pcbLayoutProps.omit({
|
|
18038
18046
|
pcbLeftEdgeX: true,
|
|
18039
18047
|
pcbRightEdgeX: true,
|
|
@@ -18045,15 +18053,15 @@ var fabricationNotePathProps = pcbLayoutProps.omit({
|
|
|
18045
18053
|
pcbOffsetY: true,
|
|
18046
18054
|
pcbRotation: true
|
|
18047
18055
|
}).extend({
|
|
18048
|
-
route:
|
|
18056
|
+
route: z98.array(route_hint_point3),
|
|
18049
18057
|
strokeWidth: length5.optional(),
|
|
18050
|
-
color:
|
|
18058
|
+
color: z98.string().optional()
|
|
18051
18059
|
});
|
|
18052
18060
|
|
|
18053
18061
|
// lib/components/fabrication-note-dimension.ts
|
|
18054
18062
|
import { distance as distance22, length as length6 } from "circuit-json";
|
|
18055
|
-
import { z as
|
|
18056
|
-
var dimensionTarget =
|
|
18063
|
+
import { z as z99 } from "zod";
|
|
18064
|
+
var dimensionTarget = z99.union([z99.string(), point]);
|
|
18057
18065
|
var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
18058
18066
|
pcbLeftEdgeX: true,
|
|
18059
18067
|
pcbRightEdgeX: true,
|
|
@@ -18067,54 +18075,54 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
18067
18075
|
}).extend({
|
|
18068
18076
|
from: dimensionTarget,
|
|
18069
18077
|
to: dimensionTarget,
|
|
18070
|
-
text:
|
|
18078
|
+
text: z99.string().optional(),
|
|
18071
18079
|
offset: distance22.optional(),
|
|
18072
|
-
font:
|
|
18080
|
+
font: z99.enum(["tscircuit2024"]).optional(),
|
|
18073
18081
|
fontSize: length6.optional(),
|
|
18074
|
-
color:
|
|
18082
|
+
color: z99.string().optional(),
|
|
18075
18083
|
arrowSize: distance22.optional(),
|
|
18076
|
-
units:
|
|
18077
|
-
outerEdgeToEdge:
|
|
18078
|
-
centerToCenter:
|
|
18079
|
-
innerEdgeToEdge:
|
|
18084
|
+
units: z99.enum(["in", "mm"]).optional(),
|
|
18085
|
+
outerEdgeToEdge: z99.literal(true).optional(),
|
|
18086
|
+
centerToCenter: z99.literal(true).optional(),
|
|
18087
|
+
innerEdgeToEdge: z99.literal(true).optional()
|
|
18080
18088
|
});
|
|
18081
18089
|
expectTypesMatch(true);
|
|
18082
18090
|
|
|
18083
18091
|
// lib/components/pcb-trace.ts
|
|
18084
18092
|
import { distance as distance23, route_hint_point as route_hint_point4 } from "circuit-json";
|
|
18085
|
-
import { z as
|
|
18086
|
-
var pcbTraceProps =
|
|
18087
|
-
layer:
|
|
18093
|
+
import { z as z100 } from "zod";
|
|
18094
|
+
var pcbTraceProps = z100.object({
|
|
18095
|
+
layer: z100.string().optional(),
|
|
18088
18096
|
thickness: distance23.optional(),
|
|
18089
|
-
route:
|
|
18097
|
+
route: z100.array(route_hint_point4)
|
|
18090
18098
|
});
|
|
18091
18099
|
|
|
18092
18100
|
// lib/components/via.ts
|
|
18093
18101
|
import { distance as distance24, layer_ref as layer_ref6 } from "circuit-json";
|
|
18094
|
-
import { z as
|
|
18102
|
+
import { z as z101 } from "zod";
|
|
18095
18103
|
var viaProps = commonLayoutProps.extend({
|
|
18096
|
-
name:
|
|
18104
|
+
name: z101.string().optional(),
|
|
18097
18105
|
fromLayer: layer_ref6.optional(),
|
|
18098
18106
|
toLayer: layer_ref6.optional(),
|
|
18099
18107
|
holeDiameter: distance24.optional(),
|
|
18100
18108
|
outerDiameter: distance24.optional(),
|
|
18101
|
-
layers:
|
|
18102
|
-
connectsTo:
|
|
18103
|
-
netIsAssignable:
|
|
18109
|
+
layers: z101.array(layer_ref6).optional(),
|
|
18110
|
+
connectsTo: z101.string().or(z101.array(z101.string())).optional(),
|
|
18111
|
+
netIsAssignable: z101.boolean().optional()
|
|
18104
18112
|
});
|
|
18105
18113
|
expectTypesMatch(true);
|
|
18106
18114
|
|
|
18107
18115
|
// lib/components/testpoint.ts
|
|
18108
18116
|
import { distance as distance25 } from "circuit-json";
|
|
18109
|
-
import { z as
|
|
18117
|
+
import { z as z102 } from "zod";
|
|
18110
18118
|
var testpointPins = ["pin1"];
|
|
18111
|
-
var testpointConnectionsProp =
|
|
18119
|
+
var testpointConnectionsProp = z102.object({
|
|
18112
18120
|
pin1: connectionTarget
|
|
18113
18121
|
}).strict();
|
|
18114
18122
|
var testpointProps = commonComponentProps.extend({
|
|
18115
18123
|
connections: testpointConnectionsProp.optional(),
|
|
18116
|
-
footprintVariant:
|
|
18117
|
-
padShape:
|
|
18124
|
+
footprintVariant: z102.enum(["pad", "through_hole"]).optional(),
|
|
18125
|
+
padShape: z102.enum(["rect", "circle"]).optional().default("circle"),
|
|
18118
18126
|
padDiameter: distance25.optional(),
|
|
18119
18127
|
holeDiameter: distance25.optional(),
|
|
18120
18128
|
width: distance25.optional(),
|
|
@@ -18126,45 +18134,45 @@ var testpointProps = commonComponentProps.extend({
|
|
|
18126
18134
|
expectTypesMatch(true);
|
|
18127
18135
|
|
|
18128
18136
|
// lib/components/breakoutpoint.ts
|
|
18129
|
-
import { z as
|
|
18137
|
+
import { z as z103 } from "zod";
|
|
18130
18138
|
var breakoutPointProps = pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
18131
|
-
connection:
|
|
18139
|
+
connection: z103.string()
|
|
18132
18140
|
});
|
|
18133
18141
|
expectTypesMatch(true);
|
|
18134
18142
|
|
|
18135
18143
|
// lib/components/pcb-keepout.ts
|
|
18136
18144
|
import { distance as distance26, layer_ref as layer_ref7 } from "circuit-json";
|
|
18137
|
-
import { z as
|
|
18138
|
-
var pcbKeepoutProps =
|
|
18145
|
+
import { z as z104 } from "zod";
|
|
18146
|
+
var pcbKeepoutProps = z104.union([
|
|
18139
18147
|
pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18140
|
-
shape:
|
|
18148
|
+
shape: z104.literal("circle"),
|
|
18141
18149
|
radius: distance26,
|
|
18142
|
-
layers:
|
|
18150
|
+
layers: z104.array(layer_ref7).optional()
|
|
18143
18151
|
}),
|
|
18144
18152
|
pcbLayoutProps.extend({
|
|
18145
|
-
shape:
|
|
18153
|
+
shape: z104.literal("rect"),
|
|
18146
18154
|
width: distance26,
|
|
18147
18155
|
height: distance26,
|
|
18148
|
-
layers:
|
|
18156
|
+
layers: z104.array(layer_ref7).optional()
|
|
18149
18157
|
})
|
|
18150
18158
|
]);
|
|
18151
18159
|
|
|
18152
18160
|
// lib/components/courtyard-rect.ts
|
|
18153
18161
|
import { distance as distance27 } from "circuit-json";
|
|
18154
|
-
import { z as
|
|
18162
|
+
import { z as z105 } from "zod";
|
|
18155
18163
|
var courtyardRectProps = pcbLayoutProps.extend({
|
|
18156
18164
|
width: distance27,
|
|
18157
18165
|
height: distance27,
|
|
18158
18166
|
strokeWidth: distance27.optional(),
|
|
18159
|
-
isFilled:
|
|
18160
|
-
hasStroke:
|
|
18161
|
-
isStrokeDashed:
|
|
18162
|
-
color:
|
|
18167
|
+
isFilled: z105.boolean().optional(),
|
|
18168
|
+
hasStroke: z105.boolean().optional(),
|
|
18169
|
+
isStrokeDashed: z105.boolean().optional(),
|
|
18170
|
+
color: z105.string().optional()
|
|
18163
18171
|
});
|
|
18164
18172
|
|
|
18165
18173
|
// lib/components/courtyard-outline.ts
|
|
18166
18174
|
import { length as length7 } from "circuit-json";
|
|
18167
|
-
import { z as
|
|
18175
|
+
import { z as z106 } from "zod";
|
|
18168
18176
|
var courtyardOutlineProps = pcbLayoutProps.omit({
|
|
18169
18177
|
pcbLeftEdgeX: true,
|
|
18170
18178
|
pcbRightEdgeX: true,
|
|
@@ -18176,11 +18184,11 @@ var courtyardOutlineProps = pcbLayoutProps.omit({
|
|
|
18176
18184
|
pcbOffsetY: true,
|
|
18177
18185
|
pcbRotation: true
|
|
18178
18186
|
}).extend({
|
|
18179
|
-
outline:
|
|
18187
|
+
outline: z106.array(point),
|
|
18180
18188
|
strokeWidth: length7.optional(),
|
|
18181
|
-
isClosed:
|
|
18182
|
-
isStrokeDashed:
|
|
18183
|
-
color:
|
|
18189
|
+
isClosed: z106.boolean().optional(),
|
|
18190
|
+
isStrokeDashed: z106.boolean().optional(),
|
|
18191
|
+
color: z106.string().optional()
|
|
18184
18192
|
});
|
|
18185
18193
|
|
|
18186
18194
|
// lib/components/courtyard-circle.ts
|
|
@@ -18200,35 +18208,35 @@ var courtyardPillProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
18200
18208
|
});
|
|
18201
18209
|
|
|
18202
18210
|
// lib/components/copper-pour.ts
|
|
18203
|
-
import { z as
|
|
18211
|
+
import { z as z109 } from "zod";
|
|
18204
18212
|
import { layer_ref as layer_ref8 } from "circuit-json";
|
|
18205
|
-
var copperPourProps =
|
|
18206
|
-
name:
|
|
18213
|
+
var copperPourProps = z109.object({
|
|
18214
|
+
name: z109.string().optional(),
|
|
18207
18215
|
layer: layer_ref8,
|
|
18208
|
-
connectsTo:
|
|
18209
|
-
unbroken:
|
|
18216
|
+
connectsTo: z109.string(),
|
|
18217
|
+
unbroken: z109.boolean().optional(),
|
|
18210
18218
|
padMargin: distance.optional(),
|
|
18211
18219
|
traceMargin: distance.optional(),
|
|
18212
18220
|
clearance: distance.optional(),
|
|
18213
18221
|
boardEdgeMargin: distance.optional(),
|
|
18214
18222
|
cutoutMargin: distance.optional(),
|
|
18215
|
-
outline:
|
|
18216
|
-
coveredWithSolderMask:
|
|
18223
|
+
outline: z109.array(point).optional(),
|
|
18224
|
+
coveredWithSolderMask: z109.boolean().optional().default(true)
|
|
18217
18225
|
});
|
|
18218
18226
|
expectTypesMatch(true);
|
|
18219
18227
|
|
|
18220
18228
|
// lib/components/cadassembly.ts
|
|
18221
18229
|
import { layer_ref as layer_ref9 } from "circuit-json";
|
|
18222
|
-
import { z as
|
|
18223
|
-
var cadassemblyProps =
|
|
18230
|
+
import { z as z110 } from "zod";
|
|
18231
|
+
var cadassemblyProps = z110.object({
|
|
18224
18232
|
originalLayer: layer_ref9.default("top").optional(),
|
|
18225
|
-
children:
|
|
18233
|
+
children: z110.any().optional()
|
|
18226
18234
|
});
|
|
18227
18235
|
expectTypesMatch(true);
|
|
18228
18236
|
|
|
18229
18237
|
// lib/components/cadmodel.ts
|
|
18230
|
-
import { z as
|
|
18231
|
-
var pcbPosition =
|
|
18238
|
+
import { z as z111 } from "zod";
|
|
18239
|
+
var pcbPosition = z111.object({
|
|
18232
18240
|
pcbX: pcbCoordinate.optional(),
|
|
18233
18241
|
pcbY: pcbCoordinate.optional(),
|
|
18234
18242
|
pcbLeftEdgeX: pcbCoordinate.optional(),
|
|
@@ -18245,7 +18253,7 @@ var cadModelBaseWithUrl = cadModelBase.extend({
|
|
|
18245
18253
|
});
|
|
18246
18254
|
var cadModelObject = cadModelBaseWithUrl.merge(pcbPosition);
|
|
18247
18255
|
expectTypesMatch(true);
|
|
18248
|
-
var cadmodelProps =
|
|
18256
|
+
var cadmodelProps = z111.union([z111.null(), url, cadModelObject]);
|
|
18249
18257
|
|
|
18250
18258
|
// lib/components/power-source.ts
|
|
18251
18259
|
import { voltage as voltage5 } from "circuit-json";
|
|
@@ -18255,9 +18263,9 @@ var powerSourceProps = commonComponentProps.extend({
|
|
|
18255
18263
|
|
|
18256
18264
|
// lib/components/voltagesource.ts
|
|
18257
18265
|
import { frequency as frequency5, ms as ms4, rotation as rotation5, voltage as voltage6 } from "circuit-json";
|
|
18258
|
-
import { z as
|
|
18266
|
+
import { z as z112 } from "zod";
|
|
18259
18267
|
var voltageSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
18260
|
-
var percentage =
|
|
18268
|
+
var percentage = z112.union([z112.string(), z112.number()]).transform((val) => {
|
|
18261
18269
|
if (typeof val === "string") {
|
|
18262
18270
|
if (val.endsWith("%")) {
|
|
18263
18271
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -18266,13 +18274,13 @@ var percentage = z111.union([z111.string(), z111.number()]).transform((val) => {
|
|
|
18266
18274
|
}
|
|
18267
18275
|
return val;
|
|
18268
18276
|
}).pipe(
|
|
18269
|
-
|
|
18277
|
+
z112.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
18270
18278
|
);
|
|
18271
18279
|
var voltageSourceProps = commonComponentProps.extend({
|
|
18272
18280
|
voltage: voltage6.optional(),
|
|
18273
18281
|
frequency: frequency5.optional(),
|
|
18274
18282
|
peakToPeakVoltage: voltage6.optional(),
|
|
18275
|
-
waveShape:
|
|
18283
|
+
waveShape: z112.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
18276
18284
|
phase: rotation5.optional(),
|
|
18277
18285
|
dutyCycle: percentage.optional(),
|
|
18278
18286
|
pulseDelay: ms4.optional(),
|
|
@@ -18289,9 +18297,9 @@ expectTypesMatch(true);
|
|
|
18289
18297
|
|
|
18290
18298
|
// lib/components/currentsource.ts
|
|
18291
18299
|
import { frequency as frequency6, rotation as rotation6, current as current3 } from "circuit-json";
|
|
18292
|
-
import { z as
|
|
18300
|
+
import { z as z113 } from "zod";
|
|
18293
18301
|
var currentSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
18294
|
-
var percentage2 =
|
|
18302
|
+
var percentage2 = z113.union([z113.string(), z113.number()]).transform((val) => {
|
|
18295
18303
|
if (typeof val === "string") {
|
|
18296
18304
|
if (val.endsWith("%")) {
|
|
18297
18305
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -18300,13 +18308,13 @@ var percentage2 = z112.union([z112.string(), z112.number()]).transform((val) =>
|
|
|
18300
18308
|
}
|
|
18301
18309
|
return val;
|
|
18302
18310
|
}).pipe(
|
|
18303
|
-
|
|
18311
|
+
z113.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
18304
18312
|
);
|
|
18305
18313
|
var currentSourceProps = commonComponentProps.extend({
|
|
18306
18314
|
current: current3.optional(),
|
|
18307
18315
|
frequency: frequency6.optional(),
|
|
18308
18316
|
peakToPeakCurrent: current3.optional(),
|
|
18309
|
-
waveShape:
|
|
18317
|
+
waveShape: z113.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
18310
18318
|
phase: rotation6.optional(),
|
|
18311
18319
|
dutyCycle: percentage2.optional(),
|
|
18312
18320
|
acMagnitude: current3.optional(),
|
|
@@ -18317,21 +18325,21 @@ var currentSourcePins = lrPolarPins;
|
|
|
18317
18325
|
expectTypesMatch(true);
|
|
18318
18326
|
|
|
18319
18327
|
// lib/components/voltageprobe.ts
|
|
18320
|
-
import { z as
|
|
18328
|
+
import { z as z114 } from "zod";
|
|
18321
18329
|
var voltageProbeProps = commonComponentProps.omit({ name: true }).extend({
|
|
18322
|
-
name:
|
|
18323
|
-
connectsTo:
|
|
18324
|
-
referenceTo:
|
|
18325
|
-
color:
|
|
18326
|
-
graphDisplayName:
|
|
18327
|
-
graphCenter:
|
|
18328
|
-
graphVerticalOffset:
|
|
18329
|
-
graphVoltagePerDiv:
|
|
18330
|
+
name: z114.string().optional(),
|
|
18331
|
+
connectsTo: z114.string(),
|
|
18332
|
+
referenceTo: z114.string().optional(),
|
|
18333
|
+
color: z114.string().optional(),
|
|
18334
|
+
graphDisplayName: z114.string().optional(),
|
|
18335
|
+
graphCenter: z114.number().optional(),
|
|
18336
|
+
graphVerticalOffset: z114.number().or(z114.string()).optional(),
|
|
18337
|
+
graphVoltagePerDiv: z114.number().or(z114.string()).optional()
|
|
18330
18338
|
});
|
|
18331
18339
|
expectTypesMatch(true);
|
|
18332
18340
|
|
|
18333
18341
|
// lib/components/ammeter.ts
|
|
18334
|
-
import { z as
|
|
18342
|
+
import { z as z115 } from "zod";
|
|
18335
18343
|
var ammeterPinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
18336
18344
|
var hasAmmeterConnectionPair = (connections) => {
|
|
18337
18345
|
return connections.pos !== void 0 && connections.neg !== void 0 || connections.pin1 !== void 0 && connections.pin2 !== void 0;
|
|
@@ -18341,63 +18349,63 @@ var ammeterProps = commonComponentProps.extend({
|
|
|
18341
18349
|
hasAmmeterConnectionPair,
|
|
18342
18350
|
"Ammeter connections must include either pos/neg or pin1/pin2"
|
|
18343
18351
|
),
|
|
18344
|
-
color:
|
|
18345
|
-
graphDisplayName:
|
|
18346
|
-
graphCenter:
|
|
18347
|
-
graphVerticalOffset:
|
|
18348
|
-
graphCurrentPerDiv:
|
|
18352
|
+
color: z115.string().optional(),
|
|
18353
|
+
graphDisplayName: z115.string().optional(),
|
|
18354
|
+
graphCenter: z115.number().optional(),
|
|
18355
|
+
graphVerticalOffset: z115.number().or(z115.string()).optional(),
|
|
18356
|
+
graphCurrentPerDiv: z115.number().or(z115.string()).optional()
|
|
18349
18357
|
});
|
|
18350
18358
|
var ammeterPins = ammeterPinLabels;
|
|
18351
18359
|
expectTypesMatch(true);
|
|
18352
18360
|
|
|
18353
18361
|
// lib/components/schematic-arc.ts
|
|
18354
18362
|
import { distance as distance30, point as point5, rotation as rotation7 } from "circuit-json";
|
|
18355
|
-
import { z as
|
|
18356
|
-
var schematicArcProps =
|
|
18363
|
+
import { z as z116 } from "zod";
|
|
18364
|
+
var schematicArcProps = z116.object({
|
|
18357
18365
|
center: point5,
|
|
18358
18366
|
radius: distance30,
|
|
18359
18367
|
startAngleDegrees: rotation7,
|
|
18360
18368
|
endAngleDegrees: rotation7,
|
|
18361
|
-
direction:
|
|
18369
|
+
direction: z116.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
18362
18370
|
strokeWidth: distance30.optional(),
|
|
18363
|
-
color:
|
|
18364
|
-
isDashed:
|
|
18371
|
+
color: z116.string().optional(),
|
|
18372
|
+
isDashed: z116.boolean().optional().default(false)
|
|
18365
18373
|
});
|
|
18366
18374
|
expectTypesMatch(true);
|
|
18367
18375
|
|
|
18368
18376
|
// lib/components/toolingrail.ts
|
|
18369
|
-
import { z as
|
|
18370
|
-
var toolingrailProps =
|
|
18371
|
-
children:
|
|
18377
|
+
import { z as z117 } from "zod";
|
|
18378
|
+
var toolingrailProps = z117.object({
|
|
18379
|
+
children: z117.any().optional()
|
|
18372
18380
|
});
|
|
18373
18381
|
expectTypesMatch(true);
|
|
18374
18382
|
|
|
18375
18383
|
// lib/components/schematic-box.ts
|
|
18376
18384
|
import { distance as distance31 } from "circuit-json";
|
|
18377
|
-
import { z as
|
|
18378
|
-
var schematicBoxProps =
|
|
18379
|
-
name:
|
|
18380
|
-
chipRef:
|
|
18385
|
+
import { z as z118 } from "zod";
|
|
18386
|
+
var schematicBoxProps = z118.object({
|
|
18387
|
+
name: z118.string().optional(),
|
|
18388
|
+
chipRef: z118.string().optional(),
|
|
18381
18389
|
pinLabels: pinLabelsProp.optional(),
|
|
18382
18390
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
18383
18391
|
schX: distance31.optional(),
|
|
18384
18392
|
schY: distance31.optional(),
|
|
18385
|
-
schSectionName:
|
|
18386
|
-
schSheetName:
|
|
18393
|
+
schSectionName: z118.string().optional(),
|
|
18394
|
+
schSheetName: z118.string().optional(),
|
|
18387
18395
|
width: distance31.optional(),
|
|
18388
18396
|
height: distance31.optional(),
|
|
18389
|
-
overlay:
|
|
18397
|
+
overlay: z118.array(z118.string()).optional(),
|
|
18390
18398
|
padding: distance31.optional(),
|
|
18391
18399
|
paddingLeft: distance31.optional(),
|
|
18392
18400
|
paddingRight: distance31.optional(),
|
|
18393
18401
|
paddingTop: distance31.optional(),
|
|
18394
18402
|
paddingBottom: distance31.optional(),
|
|
18395
|
-
title:
|
|
18403
|
+
title: z118.string().optional(),
|
|
18396
18404
|
titleAlignment: ninePointAnchor.default("top_left"),
|
|
18397
|
-
titleColor:
|
|
18405
|
+
titleColor: z118.string().optional(),
|
|
18398
18406
|
titleFontSize: distance31.optional(),
|
|
18399
|
-
titleInside:
|
|
18400
|
-
strokeStyle:
|
|
18407
|
+
titleInside: z118.boolean().default(false),
|
|
18408
|
+
strokeStyle: z118.enum(["solid", "dashed"]).default("solid")
|
|
18401
18409
|
}).refine(
|
|
18402
18410
|
(elm) => elm.width !== void 0 && elm.height !== void 0 || Array.isArray(elm.overlay) && elm.overlay.length > 0,
|
|
18403
18411
|
{
|
|
@@ -18413,21 +18421,21 @@ expectTypesMatch(true);
|
|
|
18413
18421
|
|
|
18414
18422
|
// lib/components/schematic-symbol.ts
|
|
18415
18423
|
import { rotation as rotation8 } from "circuit-json";
|
|
18416
|
-
import { z as
|
|
18417
|
-
var schematicSymbolConnections =
|
|
18424
|
+
import { z as z119 } from "zod";
|
|
18425
|
+
var schematicSymbolConnections = z119.custom().pipe(z119.record(z119.string(), connectionTarget)).refine((value) => Object.keys(value).length > 0, {
|
|
18418
18426
|
message: "connections must map at least one schematic symbol port"
|
|
18419
18427
|
});
|
|
18420
|
-
var schematicSymbolProps =
|
|
18421
|
-
name:
|
|
18422
|
-
displayName:
|
|
18423
|
-
chipRef:
|
|
18424
|
-
symbolName:
|
|
18428
|
+
var schematicSymbolProps = z119.object({
|
|
18429
|
+
name: z119.string().min(1),
|
|
18430
|
+
displayName: z119.string().optional(),
|
|
18431
|
+
chipRef: z119.string().min(1).optional(),
|
|
18432
|
+
symbolName: z119.string().min(1),
|
|
18425
18433
|
connections: schematicSymbolConnections.optional(),
|
|
18426
18434
|
schX: distance.optional(),
|
|
18427
18435
|
schY: distance.optional(),
|
|
18428
18436
|
schRotation: rotation8.optional(),
|
|
18429
|
-
schSectionName:
|
|
18430
|
-
schSheetName:
|
|
18437
|
+
schSectionName: z119.string().optional(),
|
|
18438
|
+
schSheetName: z119.string().optional()
|
|
18431
18439
|
});
|
|
18432
18440
|
expectTypesMatch(
|
|
18433
18441
|
true
|
|
@@ -18435,15 +18443,15 @@ expectTypesMatch(
|
|
|
18435
18443
|
|
|
18436
18444
|
// lib/components/schematic-circle.ts
|
|
18437
18445
|
import { distance as distance32, point as point6 } from "circuit-json";
|
|
18438
|
-
import { z as
|
|
18439
|
-
var schematicCircleProps =
|
|
18446
|
+
import { z as z120 } from "zod";
|
|
18447
|
+
var schematicCircleProps = z120.object({
|
|
18440
18448
|
center: point6,
|
|
18441
18449
|
radius: distance32,
|
|
18442
18450
|
strokeWidth: distance32.optional(),
|
|
18443
|
-
color:
|
|
18444
|
-
isFilled:
|
|
18445
|
-
fillColor:
|
|
18446
|
-
isDashed:
|
|
18451
|
+
color: z120.string().optional(),
|
|
18452
|
+
isFilled: z120.boolean().optional().default(false),
|
|
18453
|
+
fillColor: z120.string().optional(),
|
|
18454
|
+
isDashed: z120.boolean().optional().default(false)
|
|
18447
18455
|
});
|
|
18448
18456
|
expectTypesMatch(
|
|
18449
18457
|
true
|
|
@@ -18451,32 +18459,32 @@ expectTypesMatch(
|
|
|
18451
18459
|
|
|
18452
18460
|
// lib/components/schematic-rect.ts
|
|
18453
18461
|
import { distance as distance33, rotation as rotation9 } from "circuit-json";
|
|
18454
|
-
import { z as
|
|
18455
|
-
var schematicRectProps =
|
|
18462
|
+
import { z as z121 } from "zod";
|
|
18463
|
+
var schematicRectProps = z121.object({
|
|
18456
18464
|
schX: distance33.optional(),
|
|
18457
18465
|
schY: distance33.optional(),
|
|
18458
18466
|
width: distance33,
|
|
18459
18467
|
height: distance33,
|
|
18460
18468
|
rotation: rotation9.default(0),
|
|
18461
18469
|
strokeWidth: distance33.optional(),
|
|
18462
|
-
color:
|
|
18463
|
-
isFilled:
|
|
18464
|
-
fillColor:
|
|
18465
|
-
isDashed:
|
|
18470
|
+
color: z121.string().optional(),
|
|
18471
|
+
isFilled: z121.boolean().optional().default(false),
|
|
18472
|
+
fillColor: z121.string().optional(),
|
|
18473
|
+
isDashed: z121.boolean().optional().default(false)
|
|
18466
18474
|
});
|
|
18467
18475
|
expectTypesMatch(true);
|
|
18468
18476
|
|
|
18469
18477
|
// lib/components/schematic-line.ts
|
|
18470
18478
|
import { distance as distance34 } from "circuit-json";
|
|
18471
|
-
import { z as
|
|
18472
|
-
var schematicLineProps =
|
|
18479
|
+
import { z as z122 } from "zod";
|
|
18480
|
+
var schematicLineProps = z122.object({
|
|
18473
18481
|
x1: distance34,
|
|
18474
18482
|
y1: distance34,
|
|
18475
18483
|
x2: distance34,
|
|
18476
18484
|
y2: distance34,
|
|
18477
18485
|
strokeWidth: distance34.optional(),
|
|
18478
|
-
color:
|
|
18479
|
-
isDashed:
|
|
18486
|
+
color: z122.string().optional(),
|
|
18487
|
+
isDashed: z122.boolean().optional().default(false),
|
|
18480
18488
|
dashLength: distance34.optional(),
|
|
18481
18489
|
dashGap: distance34.optional()
|
|
18482
18490
|
});
|
|
@@ -18484,11 +18492,11 @@ expectTypesMatch(true);
|
|
|
18484
18492
|
|
|
18485
18493
|
// lib/components/schematic-text.ts
|
|
18486
18494
|
import { distance as distance35, rotation as rotation10 } from "circuit-json";
|
|
18487
|
-
import { z as
|
|
18495
|
+
import { z as z124 } from "zod";
|
|
18488
18496
|
|
|
18489
18497
|
// lib/common/fivePointAnchor.ts
|
|
18490
|
-
import { z as
|
|
18491
|
-
var fivePointAnchor =
|
|
18498
|
+
import { z as z123 } from "zod";
|
|
18499
|
+
var fivePointAnchor = z123.enum([
|
|
18492
18500
|
"center",
|
|
18493
18501
|
"left",
|
|
18494
18502
|
"right",
|
|
@@ -18497,39 +18505,39 @@ var fivePointAnchor = z122.enum([
|
|
|
18497
18505
|
]);
|
|
18498
18506
|
|
|
18499
18507
|
// lib/components/schematic-text.ts
|
|
18500
|
-
var schematicTextProps =
|
|
18508
|
+
var schematicTextProps = z124.object({
|
|
18501
18509
|
schX: distance35.optional(),
|
|
18502
18510
|
schY: distance35.optional(),
|
|
18503
|
-
text:
|
|
18504
|
-
fontSize:
|
|
18505
|
-
anchor:
|
|
18506
|
-
color:
|
|
18511
|
+
text: z124.string(),
|
|
18512
|
+
fontSize: z124.number().default(1),
|
|
18513
|
+
anchor: z124.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
18514
|
+
color: z124.string().default("#000000"),
|
|
18507
18515
|
schRotation: rotation10.default(0)
|
|
18508
18516
|
});
|
|
18509
18517
|
expectTypesMatch(true);
|
|
18510
18518
|
|
|
18511
18519
|
// lib/components/schematic-path.ts
|
|
18512
18520
|
import { distance as distance36, point as point7 } from "circuit-json";
|
|
18513
|
-
import { z as
|
|
18514
|
-
var schematicPathProps =
|
|
18515
|
-
points:
|
|
18516
|
-
svgPath:
|
|
18521
|
+
import { z as z125 } from "zod";
|
|
18522
|
+
var schematicPathProps = z125.object({
|
|
18523
|
+
points: z125.array(point7).optional(),
|
|
18524
|
+
svgPath: z125.string().optional(),
|
|
18517
18525
|
strokeWidth: distance36.optional(),
|
|
18518
|
-
strokeColor:
|
|
18526
|
+
strokeColor: z125.string().optional(),
|
|
18519
18527
|
dashLength: distance36.optional(),
|
|
18520
18528
|
dashGap: distance36.optional(),
|
|
18521
|
-
isFilled:
|
|
18522
|
-
fillColor:
|
|
18529
|
+
isFilled: z125.boolean().optional().default(false),
|
|
18530
|
+
fillColor: z125.string().optional()
|
|
18523
18531
|
});
|
|
18524
18532
|
expectTypesMatch(true);
|
|
18525
18533
|
|
|
18526
18534
|
// lib/components/schematic-table.ts
|
|
18527
18535
|
import { distance as distance37 } from "circuit-json";
|
|
18528
|
-
import { z as
|
|
18529
|
-
var schematicTableProps =
|
|
18536
|
+
import { z as z126 } from "zod";
|
|
18537
|
+
var schematicTableProps = z126.object({
|
|
18530
18538
|
schX: distance37.optional(),
|
|
18531
18539
|
schY: distance37.optional(),
|
|
18532
|
-
children:
|
|
18540
|
+
children: z126.any().optional(),
|
|
18533
18541
|
cellPadding: distance37.optional(),
|
|
18534
18542
|
borderWidth: distance37.optional(),
|
|
18535
18543
|
anchor: ninePointAnchor.optional(),
|
|
@@ -18539,34 +18547,34 @@ expectTypesMatch(true);
|
|
|
18539
18547
|
|
|
18540
18548
|
// lib/components/schematic-row.ts
|
|
18541
18549
|
import { distance as distance38 } from "circuit-json";
|
|
18542
|
-
import { z as
|
|
18543
|
-
var schematicRowProps =
|
|
18544
|
-
children:
|
|
18550
|
+
import { z as z127 } from "zod";
|
|
18551
|
+
var schematicRowProps = z127.object({
|
|
18552
|
+
children: z127.any().optional(),
|
|
18545
18553
|
height: distance38.optional()
|
|
18546
18554
|
});
|
|
18547
18555
|
expectTypesMatch(true);
|
|
18548
18556
|
|
|
18549
18557
|
// lib/components/schematic-cell.ts
|
|
18550
18558
|
import { distance as distance39 } from "circuit-json";
|
|
18551
|
-
import { z as
|
|
18552
|
-
var schematicCellProps =
|
|
18553
|
-
children:
|
|
18554
|
-
horizontalAlign:
|
|
18555
|
-
verticalAlign:
|
|
18559
|
+
import { z as z128 } from "zod";
|
|
18560
|
+
var schematicCellProps = z128.object({
|
|
18561
|
+
children: z128.string().optional(),
|
|
18562
|
+
horizontalAlign: z128.enum(["left", "center", "right"]).optional(),
|
|
18563
|
+
verticalAlign: z128.enum(["top", "middle", "bottom"]).optional(),
|
|
18556
18564
|
fontSize: distance39.optional(),
|
|
18557
|
-
rowSpan:
|
|
18558
|
-
colSpan:
|
|
18565
|
+
rowSpan: z128.number().optional(),
|
|
18566
|
+
colSpan: z128.number().optional(),
|
|
18559
18567
|
width: distance39.optional(),
|
|
18560
|
-
text:
|
|
18568
|
+
text: z128.string().optional()
|
|
18561
18569
|
});
|
|
18562
18570
|
expectTypesMatch(true);
|
|
18563
18571
|
|
|
18564
18572
|
// lib/components/schematic-section.ts
|
|
18565
18573
|
import { distance as distance40 } from "circuit-json";
|
|
18566
|
-
import { z as
|
|
18567
|
-
var schematicSectionProps =
|
|
18568
|
-
displayName:
|
|
18569
|
-
name:
|
|
18574
|
+
import { z as z129 } from "zod";
|
|
18575
|
+
var schematicSectionProps = z129.object({
|
|
18576
|
+
displayName: z129.string().optional(),
|
|
18577
|
+
name: z129.string(),
|
|
18570
18578
|
sectionTitleFontSize: distance40.optional()
|
|
18571
18579
|
});
|
|
18572
18580
|
expectTypesMatch(
|
|
@@ -18574,51 +18582,51 @@ expectTypesMatch(
|
|
|
18574
18582
|
);
|
|
18575
18583
|
|
|
18576
18584
|
// lib/components/schematic-sheet.ts
|
|
18577
|
-
import { z as
|
|
18578
|
-
var schematicSheetProps =
|
|
18579
|
-
name:
|
|
18580
|
-
displayName:
|
|
18581
|
-
sheetIndex:
|
|
18582
|
-
children:
|
|
18585
|
+
import { z as z130 } from "zod";
|
|
18586
|
+
var schematicSheetProps = z130.object({
|
|
18587
|
+
name: z130.string(),
|
|
18588
|
+
displayName: z130.string(),
|
|
18589
|
+
sheetIndex: z130.number().optional(),
|
|
18590
|
+
children: z130.any().optional()
|
|
18583
18591
|
});
|
|
18584
18592
|
expectTypesMatch(true);
|
|
18585
18593
|
|
|
18586
18594
|
// lib/components/copper-text.ts
|
|
18587
18595
|
import { layer_ref as layer_ref10, length as length8 } from "circuit-json";
|
|
18588
|
-
import { z as
|
|
18596
|
+
import { z as z131 } from "zod";
|
|
18589
18597
|
var copperTextProps = pcbLayoutProps.extend({
|
|
18590
|
-
text:
|
|
18598
|
+
text: z131.string(),
|
|
18591
18599
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
18592
|
-
font:
|
|
18600
|
+
font: z131.enum(["tscircuit2024"]).optional(),
|
|
18593
18601
|
fontSize: length8.optional(),
|
|
18594
|
-
layers:
|
|
18595
|
-
knockout:
|
|
18596
|
-
mirrored:
|
|
18602
|
+
layers: z131.array(layer_ref10).optional(),
|
|
18603
|
+
knockout: z131.boolean().optional(),
|
|
18604
|
+
mirrored: z131.boolean().optional()
|
|
18597
18605
|
});
|
|
18598
18606
|
|
|
18599
18607
|
// lib/components/silkscreen-text.ts
|
|
18600
18608
|
import { layer_ref as layer_ref11, length as length9 } from "circuit-json";
|
|
18601
|
-
import { z as
|
|
18609
|
+
import { z as z132 } from "zod";
|
|
18602
18610
|
var silkscreenTextProps = pcbLayoutProps.extend({
|
|
18603
|
-
text:
|
|
18611
|
+
text: z132.string(),
|
|
18604
18612
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
18605
|
-
font:
|
|
18613
|
+
font: z132.enum(["tscircuit2024"]).optional(),
|
|
18606
18614
|
fontSize: length9.optional(),
|
|
18607
18615
|
/**
|
|
18608
18616
|
* If true, text will knock out underlying silkscreen
|
|
18609
18617
|
*/
|
|
18610
|
-
isKnockout:
|
|
18618
|
+
isKnockout: z132.boolean().optional(),
|
|
18611
18619
|
knockoutPadding: length9.optional(),
|
|
18612
18620
|
knockoutPaddingLeft: length9.optional(),
|
|
18613
18621
|
knockoutPaddingRight: length9.optional(),
|
|
18614
18622
|
knockoutPaddingTop: length9.optional(),
|
|
18615
18623
|
knockoutPaddingBottom: length9.optional(),
|
|
18616
|
-
layers:
|
|
18624
|
+
layers: z132.array(layer_ref11).optional()
|
|
18617
18625
|
});
|
|
18618
18626
|
|
|
18619
18627
|
// lib/components/silkscreen-path.ts
|
|
18620
18628
|
import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
|
|
18621
|
-
import { z as
|
|
18629
|
+
import { z as z133 } from "zod";
|
|
18622
18630
|
var silkscreenPathProps = pcbLayoutProps.omit({
|
|
18623
18631
|
pcbLeftEdgeX: true,
|
|
18624
18632
|
pcbRightEdgeX: true,
|
|
@@ -18630,7 +18638,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
|
|
|
18630
18638
|
pcbOffsetY: true,
|
|
18631
18639
|
pcbRotation: true
|
|
18632
18640
|
}).extend({
|
|
18633
|
-
route:
|
|
18641
|
+
route: z133.array(route_hint_point5),
|
|
18634
18642
|
strokeWidth: length10.optional()
|
|
18635
18643
|
});
|
|
18636
18644
|
|
|
@@ -18652,10 +18660,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({
|
|
|
18652
18660
|
|
|
18653
18661
|
// lib/components/silkscreen-rect.ts
|
|
18654
18662
|
import { distance as distance42 } from "circuit-json";
|
|
18655
|
-
import { z as
|
|
18663
|
+
import { z as z134 } from "zod";
|
|
18656
18664
|
var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18657
|
-
filled:
|
|
18658
|
-
stroke:
|
|
18665
|
+
filled: z134.boolean().default(true).optional(),
|
|
18666
|
+
stroke: z134.enum(["dashed", "solid", "none"]).optional(),
|
|
18659
18667
|
strokeWidth: distance42.optional(),
|
|
18660
18668
|
width: distance42,
|
|
18661
18669
|
height: distance42,
|
|
@@ -18664,10 +18672,10 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
18664
18672
|
|
|
18665
18673
|
// lib/components/silkscreen-circle.ts
|
|
18666
18674
|
import { distance as distance43 } from "circuit-json";
|
|
18667
|
-
import { z as
|
|
18675
|
+
import { z as z135 } from "zod";
|
|
18668
18676
|
var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18669
|
-
isFilled:
|
|
18670
|
-
isOutline:
|
|
18677
|
+
isFilled: z135.boolean().optional(),
|
|
18678
|
+
isOutline: z135.boolean().optional(),
|
|
18671
18679
|
strokeWidth: distance43.optional(),
|
|
18672
18680
|
radius: distance43
|
|
18673
18681
|
});
|
|
@@ -18685,63 +18693,63 @@ expectTypesMatch(true);
|
|
|
18685
18693
|
|
|
18686
18694
|
// lib/components/trace-hint.ts
|
|
18687
18695
|
import { distance as distance44, layer_ref as layer_ref12, route_hint_point as route_hint_point6 } from "circuit-json";
|
|
18688
|
-
import { z as
|
|
18689
|
-
var routeHintPointProps =
|
|
18696
|
+
import { z as z137 } from "zod";
|
|
18697
|
+
var routeHintPointProps = z137.object({
|
|
18690
18698
|
x: distance44,
|
|
18691
18699
|
y: distance44,
|
|
18692
|
-
via:
|
|
18700
|
+
via: z137.boolean().optional(),
|
|
18693
18701
|
toLayer: layer_ref12.optional()
|
|
18694
18702
|
});
|
|
18695
|
-
var traceHintProps =
|
|
18696
|
-
for:
|
|
18703
|
+
var traceHintProps = z137.object({
|
|
18704
|
+
for: z137.string().optional().describe(
|
|
18697
18705
|
"Selector for the port you're targeting, not required if you're inside a trace"
|
|
18698
18706
|
),
|
|
18699
|
-
order:
|
|
18707
|
+
order: z137.number().optional(),
|
|
18700
18708
|
offset: route_hint_point6.or(routeHintPointProps).optional(),
|
|
18701
|
-
offsets:
|
|
18702
|
-
traceWidth:
|
|
18709
|
+
offsets: z137.array(route_hint_point6).or(z137.array(routeHintPointProps)).optional(),
|
|
18710
|
+
traceWidth: z137.number().optional()
|
|
18703
18711
|
});
|
|
18704
18712
|
|
|
18705
18713
|
// lib/components/port.ts
|
|
18706
|
-
import { z as
|
|
18714
|
+
import { z as z138 } from "zod";
|
|
18707
18715
|
var portProps = commonLayoutProps.extend({
|
|
18708
|
-
name:
|
|
18709
|
-
pinNumber:
|
|
18710
|
-
schStemLength:
|
|
18711
|
-
aliases:
|
|
18712
|
-
layer:
|
|
18713
|
-
layers:
|
|
18714
|
-
schX:
|
|
18715
|
-
schY:
|
|
18716
|
+
name: z138.string().optional(),
|
|
18717
|
+
pinNumber: z138.number().optional(),
|
|
18718
|
+
schStemLength: z138.number().optional(),
|
|
18719
|
+
aliases: z138.array(z138.string()).optional(),
|
|
18720
|
+
layer: z138.string().optional(),
|
|
18721
|
+
layers: z138.array(z138.string()).optional(),
|
|
18722
|
+
schX: z138.number().optional(),
|
|
18723
|
+
schY: z138.number().optional(),
|
|
18716
18724
|
direction: direction.optional(),
|
|
18717
|
-
connectsTo:
|
|
18725
|
+
connectsTo: z138.string().or(z138.array(z138.string())).optional(),
|
|
18718
18726
|
kicadPinMetadata: kicadPinMetadata.optional(),
|
|
18719
|
-
hasInversionCircle:
|
|
18727
|
+
hasInversionCircle: z138.boolean().optional()
|
|
18720
18728
|
});
|
|
18721
18729
|
|
|
18722
18730
|
// lib/components/pcb-note-text.ts
|
|
18723
18731
|
import { length as length11 } from "circuit-json";
|
|
18724
|
-
import { z as
|
|
18732
|
+
import { z as z139 } from "zod";
|
|
18725
18733
|
var pcbNoteTextProps = pcbLayoutProps.extend({
|
|
18726
|
-
text:
|
|
18727
|
-
anchorAlignment:
|
|
18728
|
-
font:
|
|
18734
|
+
text: z139.string(),
|
|
18735
|
+
anchorAlignment: z139.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
18736
|
+
font: z139.enum(["tscircuit2024"]).optional(),
|
|
18729
18737
|
fontSize: length11.optional(),
|
|
18730
|
-
color:
|
|
18738
|
+
color: z139.string().optional()
|
|
18731
18739
|
});
|
|
18732
18740
|
expectTypesMatch(true);
|
|
18733
18741
|
|
|
18734
18742
|
// lib/components/pcb-note-rect.ts
|
|
18735
18743
|
import { distance as distance45 } from "circuit-json";
|
|
18736
|
-
import { z as
|
|
18744
|
+
import { z as z140 } from "zod";
|
|
18737
18745
|
var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18738
18746
|
width: distance45,
|
|
18739
18747
|
height: distance45,
|
|
18740
18748
|
strokeWidth: distance45.optional(),
|
|
18741
|
-
isFilled:
|
|
18742
|
-
hasStroke:
|
|
18743
|
-
isStrokeDashed:
|
|
18744
|
-
color:
|
|
18749
|
+
isFilled: z140.boolean().optional(),
|
|
18750
|
+
hasStroke: z140.boolean().optional(),
|
|
18751
|
+
isStrokeDashed: z140.boolean().optional(),
|
|
18752
|
+
color: z140.string().optional(),
|
|
18745
18753
|
cornerRadius: distance45.optional()
|
|
18746
18754
|
});
|
|
18747
18755
|
expectTypesMatch(true);
|
|
@@ -18751,7 +18759,7 @@ import {
|
|
|
18751
18759
|
length as length12,
|
|
18752
18760
|
route_hint_point as route_hint_point7
|
|
18753
18761
|
} from "circuit-json";
|
|
18754
|
-
import { z as
|
|
18762
|
+
import { z as z141 } from "zod";
|
|
18755
18763
|
var pcbNotePathProps = pcbLayoutProps.omit({
|
|
18756
18764
|
pcbLeftEdgeX: true,
|
|
18757
18765
|
pcbRightEdgeX: true,
|
|
@@ -18763,15 +18771,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
|
|
|
18763
18771
|
pcbOffsetY: true,
|
|
18764
18772
|
pcbRotation: true
|
|
18765
18773
|
}).extend({
|
|
18766
|
-
route:
|
|
18774
|
+
route: z141.array(route_hint_point7),
|
|
18767
18775
|
strokeWidth: length12.optional(),
|
|
18768
|
-
color:
|
|
18776
|
+
color: z141.string().optional()
|
|
18769
18777
|
});
|
|
18770
18778
|
expectTypesMatch(true);
|
|
18771
18779
|
|
|
18772
18780
|
// lib/components/pcb-note-line.ts
|
|
18773
18781
|
import { distance as distance46 } from "circuit-json";
|
|
18774
|
-
import { z as
|
|
18782
|
+
import { z as z142 } from "zod";
|
|
18775
18783
|
var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
18776
18784
|
pcbLeftEdgeX: true,
|
|
18777
18785
|
pcbRightEdgeX: true,
|
|
@@ -18788,15 +18796,15 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
|
18788
18796
|
x2: distance46,
|
|
18789
18797
|
y2: distance46,
|
|
18790
18798
|
strokeWidth: distance46.optional(),
|
|
18791
|
-
color:
|
|
18792
|
-
isDashed:
|
|
18799
|
+
color: z142.string().optional(),
|
|
18800
|
+
isDashed: z142.boolean().optional()
|
|
18793
18801
|
});
|
|
18794
18802
|
expectTypesMatch(true);
|
|
18795
18803
|
|
|
18796
18804
|
// lib/components/pcb-note-dimension.ts
|
|
18797
18805
|
import { distance as distance47, length as length13 } from "circuit-json";
|
|
18798
|
-
import { z as
|
|
18799
|
-
var dimensionTarget2 =
|
|
18806
|
+
import { z as z143 } from "zod";
|
|
18807
|
+
var dimensionTarget2 = z143.union([z143.string(), point]);
|
|
18800
18808
|
var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
18801
18809
|
pcbLeftEdgeX: true,
|
|
18802
18810
|
pcbRightEdgeX: true,
|
|
@@ -18810,101 +18818,101 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
18810
18818
|
}).extend({
|
|
18811
18819
|
from: dimensionTarget2,
|
|
18812
18820
|
to: dimensionTarget2,
|
|
18813
|
-
text:
|
|
18821
|
+
text: z143.string().optional(),
|
|
18814
18822
|
offset: distance47.optional(),
|
|
18815
|
-
font:
|
|
18823
|
+
font: z143.enum(["tscircuit2024"]).optional(),
|
|
18816
18824
|
fontSize: length13.optional(),
|
|
18817
|
-
color:
|
|
18825
|
+
color: z143.string().optional(),
|
|
18818
18826
|
arrowSize: distance47.optional(),
|
|
18819
|
-
units:
|
|
18820
|
-
outerEdgeToEdge:
|
|
18821
|
-
centerToCenter:
|
|
18822
|
-
innerEdgeToEdge:
|
|
18827
|
+
units: z143.enum(["in", "mm"]).optional(),
|
|
18828
|
+
outerEdgeToEdge: z143.literal(true).optional(),
|
|
18829
|
+
centerToCenter: z143.literal(true).optional(),
|
|
18830
|
+
innerEdgeToEdge: z143.literal(true).optional()
|
|
18823
18831
|
});
|
|
18824
18832
|
expectTypesMatch(
|
|
18825
18833
|
true
|
|
18826
18834
|
);
|
|
18827
18835
|
|
|
18828
18836
|
// lib/platformConfig.ts
|
|
18829
|
-
import { z as
|
|
18830
|
-
var unvalidatedCircuitJson =
|
|
18831
|
-
var footprintLibraryResult =
|
|
18832
|
-
footprintCircuitJson:
|
|
18837
|
+
import { z as z144 } from "zod";
|
|
18838
|
+
var unvalidatedCircuitJson = z144.array(z144.any()).describe("Circuit JSON");
|
|
18839
|
+
var footprintLibraryResult = z144.object({
|
|
18840
|
+
footprintCircuitJson: z144.array(z144.any()),
|
|
18833
18841
|
cadModel: cadModelProp.optional()
|
|
18834
18842
|
});
|
|
18835
|
-
var pathToCircuitJsonFn =
|
|
18836
|
-
|
|
18837
|
-
|
|
18838
|
-
|
|
18839
|
-
).returns(
|
|
18843
|
+
var pathToCircuitJsonFn = z144.function().args(z144.string()).returns(z144.promise(footprintLibraryResult)).or(
|
|
18844
|
+
z144.function().args(
|
|
18845
|
+
z144.string(),
|
|
18846
|
+
z144.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
|
|
18847
|
+
).returns(z144.promise(footprintLibraryResult))
|
|
18840
18848
|
).describe("A function that takes a path and returns Circuit JSON");
|
|
18841
|
-
var footprintFileParserEntry =
|
|
18842
|
-
loadFromUrl:
|
|
18849
|
+
var footprintFileParserEntry = z144.object({
|
|
18850
|
+
loadFromUrl: z144.function().args(z144.string()).returns(z144.promise(footprintLibraryResult)).describe(
|
|
18843
18851
|
"A function that takes a footprint file URL and returns Circuit JSON"
|
|
18844
18852
|
)
|
|
18845
18853
|
});
|
|
18846
|
-
var spiceEngineSimulationResult =
|
|
18847
|
-
engineVersionString:
|
|
18854
|
+
var spiceEngineSimulationResult = z144.object({
|
|
18855
|
+
engineVersionString: z144.string().optional(),
|
|
18848
18856
|
simulationResultCircuitJson: unvalidatedCircuitJson
|
|
18849
18857
|
});
|
|
18850
|
-
var spiceEngineZod =
|
|
18851
|
-
simulate:
|
|
18858
|
+
var spiceEngineZod = z144.object({
|
|
18859
|
+
simulate: z144.function().args(z144.string()).returns(z144.promise(spiceEngineSimulationResult)).describe(
|
|
18852
18860
|
"A function that takes a SPICE string and returns a simulation result"
|
|
18853
18861
|
)
|
|
18854
18862
|
});
|
|
18855
|
-
var defaultSpiceEngine =
|
|
18863
|
+
var defaultSpiceEngine = z144.custom(
|
|
18856
18864
|
(value) => typeof value === "string"
|
|
18857
18865
|
);
|
|
18858
|
-
var autorouterInstance =
|
|
18859
|
-
run:
|
|
18860
|
-
getOutputSimpleRouteJson:
|
|
18866
|
+
var autorouterInstance = z144.object({
|
|
18867
|
+
run: z144.function().args().returns(z144.promise(z144.unknown())).describe("Run the autorouter"),
|
|
18868
|
+
getOutputSimpleRouteJson: z144.function().args().returns(z144.promise(z144.any())).describe("Get the resulting SimpleRouteJson")
|
|
18861
18869
|
});
|
|
18862
|
-
var autorouterDefinition =
|
|
18863
|
-
createAutorouter:
|
|
18870
|
+
var autorouterDefinition = z144.object({
|
|
18871
|
+
createAutorouter: z144.function().args(z144.any(), z144.any().optional()).returns(z144.union([autorouterInstance, z144.promise(autorouterInstance)])).describe("Create an autorouter instance")
|
|
18864
18872
|
});
|
|
18865
|
-
var platformFetch =
|
|
18866
|
-
var platformConfig =
|
|
18873
|
+
var platformFetch = z144.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
|
|
18874
|
+
var platformConfig = z144.object({
|
|
18867
18875
|
partsEngine: partsEngine.optional(),
|
|
18868
18876
|
autorouter: autorouterProp.optional(),
|
|
18869
|
-
autorouterMap:
|
|
18877
|
+
autorouterMap: z144.record(z144.string(), autorouterDefinition).optional(),
|
|
18870
18878
|
registryApiUrl: url.optional(),
|
|
18871
18879
|
cloudAutorouterUrl: url.optional(),
|
|
18872
|
-
projectName:
|
|
18880
|
+
projectName: z144.string().optional(),
|
|
18873
18881
|
projectBaseUrl: url.optional(),
|
|
18874
|
-
version:
|
|
18882
|
+
version: z144.string().optional(),
|
|
18875
18883
|
url: url.optional(),
|
|
18876
|
-
printBoardInformationToSilkscreen:
|
|
18877
|
-
includeBoardFiles:
|
|
18884
|
+
printBoardInformationToSilkscreen: z144.boolean().optional(),
|
|
18885
|
+
includeBoardFiles: z144.array(z144.string()).describe(
|
|
18878
18886
|
'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
|
|
18879
18887
|
).optional(),
|
|
18880
|
-
snapshotsDir:
|
|
18888
|
+
snapshotsDir: z144.string().describe(
|
|
18881
18889
|
'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
|
|
18882
18890
|
).optional(),
|
|
18883
18891
|
defaultSpiceEngine: defaultSpiceEngine.optional(),
|
|
18884
|
-
unitPreference:
|
|
18885
|
-
localCacheEngine:
|
|
18886
|
-
pcbDisabled:
|
|
18887
|
-
routingDisabled:
|
|
18888
|
-
schematicDisabled:
|
|
18889
|
-
partsEngineDisabled:
|
|
18890
|
-
drcChecksDisabled:
|
|
18891
|
-
netlistDrcChecksDisabled:
|
|
18892
|
-
routingDrcChecksDisabled:
|
|
18893
|
-
placementDrcChecksDisabled:
|
|
18894
|
-
pinSpecificationDrcChecksDisabled:
|
|
18895
|
-
spiceEngineMap:
|
|
18896
|
-
footprintLibraryMap:
|
|
18897
|
-
|
|
18898
|
-
|
|
18892
|
+
unitPreference: z144.enum(["mm", "in", "mil"]).optional(),
|
|
18893
|
+
localCacheEngine: z144.any().optional(),
|
|
18894
|
+
pcbDisabled: z144.boolean().optional(),
|
|
18895
|
+
routingDisabled: z144.boolean().optional(),
|
|
18896
|
+
schematicDisabled: z144.boolean().optional(),
|
|
18897
|
+
partsEngineDisabled: z144.boolean().optional(),
|
|
18898
|
+
drcChecksDisabled: z144.boolean().optional(),
|
|
18899
|
+
netlistDrcChecksDisabled: z144.boolean().optional(),
|
|
18900
|
+
routingDrcChecksDisabled: z144.boolean().optional(),
|
|
18901
|
+
placementDrcChecksDisabled: z144.boolean().optional(),
|
|
18902
|
+
pinSpecificationDrcChecksDisabled: z144.boolean().optional(),
|
|
18903
|
+
spiceEngineMap: z144.record(z144.string(), spiceEngineZod).optional(),
|
|
18904
|
+
footprintLibraryMap: z144.record(
|
|
18905
|
+
z144.string(),
|
|
18906
|
+
z144.union([
|
|
18899
18907
|
pathToCircuitJsonFn,
|
|
18900
|
-
|
|
18901
|
-
|
|
18902
|
-
|
|
18908
|
+
z144.record(
|
|
18909
|
+
z144.string(),
|
|
18910
|
+
z144.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
|
|
18903
18911
|
)
|
|
18904
18912
|
])
|
|
18905
18913
|
).optional(),
|
|
18906
|
-
footprintFileParserMap:
|
|
18907
|
-
resolveProjectStaticFileImportUrl:
|
|
18914
|
+
footprintFileParserMap: z144.record(z144.string(), footprintFileParserEntry).optional(),
|
|
18915
|
+
resolveProjectStaticFileImportUrl: z144.function().args(z144.string()).returns(z144.promise(z144.string())).describe(
|
|
18908
18916
|
"A function that returns a string URL for static files for the project"
|
|
18909
18917
|
).optional(),
|
|
18910
18918
|
platformFetch: platformFetch.optional()
|
|
@@ -18959,6 +18967,7 @@ export {
|
|
|
18959
18967
|
breakoutPointProps,
|
|
18960
18968
|
breakoutProps,
|
|
18961
18969
|
bugProps,
|
|
18970
|
+
busProps,
|
|
18962
18971
|
cadModelAxisDirection,
|
|
18963
18972
|
cadModelAxisDirections,
|
|
18964
18973
|
cadModelBase,
|