@tscircuit/props 0.0.647 → 0.0.649
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 +376 -9
- package/dist/index.js +798 -753
- package/dist/index.js.map +1 -1
- package/lib/common/fanoutTracePath.ts +62 -0
- package/lib/components/breakout.ts +18 -0
- package/lib/index.ts +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16753,18 +16753,61 @@ import "zod";
|
|
|
16753
16753
|
var subpanelProps = panelProps;
|
|
16754
16754
|
expectTypesMatch(true);
|
|
16755
16755
|
|
|
16756
|
-
// lib/common/
|
|
16756
|
+
// lib/common/fanoutTracePath.ts
|
|
16757
16757
|
import { layer_ref as layer_ref5 } from "circuit-json";
|
|
16758
|
-
import { z as
|
|
16758
|
+
import { z as z47 } from "zod";
|
|
16759
|
+
var coordinate = distance.refine(Number.isFinite, "Coordinate must be finite");
|
|
16760
|
+
var positiveDistance2 = distance.refine(
|
|
16761
|
+
(value) => Number.isFinite(value) && value > 0,
|
|
16762
|
+
"Distance must be positive and finite"
|
|
16763
|
+
);
|
|
16764
|
+
var routePoint = z47.discriminatedUnion("route_type", [
|
|
16765
|
+
z47.object({
|
|
16766
|
+
route_type: z47.literal("wire"),
|
|
16767
|
+
x: coordinate,
|
|
16768
|
+
y: coordinate,
|
|
16769
|
+
width: positiveDistance2,
|
|
16770
|
+
layer: layer_ref5
|
|
16771
|
+
}),
|
|
16772
|
+
z47.object({
|
|
16773
|
+
route_type: z47.literal("via"),
|
|
16774
|
+
x: coordinate,
|
|
16775
|
+
y: coordinate,
|
|
16776
|
+
from_layer: layer_ref5,
|
|
16777
|
+
to_layer: layer_ref5,
|
|
16778
|
+
via_diameter: positiveDistance2.optional(),
|
|
16779
|
+
via_hole_diameter: positiveDistance2.optional()
|
|
16780
|
+
})
|
|
16781
|
+
]);
|
|
16782
|
+
var fanoutTracePath = z47.object({
|
|
16783
|
+
connection: z47.string().min(1),
|
|
16784
|
+
route: z47.array(routePoint).min(2).superRefine((route, ctx) => {
|
|
16785
|
+
const first = route[0];
|
|
16786
|
+
let layer = first?.route_type === "via" ? first.from_layer : first?.layer;
|
|
16787
|
+
for (const point8 of route) {
|
|
16788
|
+
if ((point8.route_type === "wire" ? point8.layer : point8.from_layer) !== layer) {
|
|
16789
|
+
ctx.addIssue({
|
|
16790
|
+
code: "custom",
|
|
16791
|
+
message: "A fanout trace path must use vias for layer changes"
|
|
16792
|
+
});
|
|
16793
|
+
}
|
|
16794
|
+
if (point8.route_type === "via") layer = point8.to_layer;
|
|
16795
|
+
}
|
|
16796
|
+
})
|
|
16797
|
+
});
|
|
16798
|
+
|
|
16799
|
+
// lib/common/fanoutProps.ts
|
|
16800
|
+
import { layer_ref as layer_ref6 } from "circuit-json";
|
|
16801
|
+
import { z as z49 } from "zod";
|
|
16759
16802
|
|
|
16760
16803
|
// lib/common/fanoutBoundaryPadding.ts
|
|
16761
|
-
import { z as
|
|
16804
|
+
import { z as z48 } from "zod";
|
|
16762
16805
|
var nonnegativeDistance = distance.refine((value) => value >= 0, {
|
|
16763
16806
|
message: "Fanout boundary padding cannot be negative"
|
|
16764
16807
|
});
|
|
16765
|
-
var fanoutBoundaryPadding =
|
|
16808
|
+
var fanoutBoundaryPadding = z48.union([
|
|
16766
16809
|
nonnegativeDistance,
|
|
16767
|
-
|
|
16810
|
+
z48.object({
|
|
16768
16811
|
top: nonnegativeDistance.optional(),
|
|
16769
16812
|
right: nonnegativeDistance.optional(),
|
|
16770
16813
|
bottom: nonnegativeDistance.optional(),
|
|
@@ -16791,31 +16834,32 @@ var canonicalBusFanoutDirectionValues = [
|
|
|
16791
16834
|
"leftside_top",
|
|
16792
16835
|
"center"
|
|
16793
16836
|
];
|
|
16794
|
-
var canonicalBusFanoutDirection =
|
|
16837
|
+
var canonicalBusFanoutDirection = z49.enum(
|
|
16795
16838
|
canonicalBusFanoutDirectionValues
|
|
16796
16839
|
);
|
|
16797
|
-
var busFanoutDirection =
|
|
16840
|
+
var busFanoutDirection = z49.union([
|
|
16798
16841
|
ninePointAnchor,
|
|
16799
16842
|
canonicalBusFanoutDirection,
|
|
16800
|
-
|
|
16801
|
-
direction:
|
|
16843
|
+
z49.object({
|
|
16844
|
+
direction: z49.union([ninePointAnchor, canonicalBusFanoutDirection])
|
|
16802
16845
|
})
|
|
16803
16846
|
]);
|
|
16804
|
-
var fanoutProps =
|
|
16805
|
-
busFanoutDirections:
|
|
16847
|
+
var fanoutProps = z49.object({
|
|
16848
|
+
busFanoutDirections: z49.record(busFanoutDirection).optional(),
|
|
16806
16849
|
fanoutBoundaryPadding: fanoutBoundaryPadding.optional(),
|
|
16807
|
-
fanoutRoutingLayers:
|
|
16808
|
-
fanoutPourNetMap:
|
|
16850
|
+
fanoutRoutingLayers: z49.array(layer_ref6).min(1).optional(),
|
|
16851
|
+
fanoutPourNetMap: z49.record(layer_ref6, z49.union([z49.string(), z49.array(z49.string()).min(1)])).optional()
|
|
16809
16852
|
});
|
|
16810
16853
|
expectTypesMatch(true);
|
|
16811
16854
|
|
|
16812
16855
|
// lib/components/breakout.ts
|
|
16813
|
-
import "zod";
|
|
16856
|
+
import { z as z50 } from "zod";
|
|
16814
16857
|
var nonnegativeFanoutMargin = distance.refine((value) => value >= 0, {
|
|
16815
16858
|
message: "Fanout margin cannot be negative"
|
|
16816
16859
|
});
|
|
16817
16860
|
var breakoutProps = subcircuitGroupProps.extend({
|
|
16818
16861
|
autorouter: autorouterProp.default("fanout"),
|
|
16862
|
+
pcbTracePaths: z50.array(fanoutTracePath).optional(),
|
|
16819
16863
|
padding: distance.optional(),
|
|
16820
16864
|
paddingLeft: distance.optional(),
|
|
16821
16865
|
paddingRight: distance.optional(),
|
|
@@ -16829,41 +16873,41 @@ expectTypesMatch(true);
|
|
|
16829
16873
|
// lib/components/chip.ts
|
|
16830
16874
|
import { distance as distance12, supplier_name as supplier_name2 } from "circuit-json";
|
|
16831
16875
|
import { isValidElement } from "react";
|
|
16832
|
-
import { z as
|
|
16833
|
-
var connectionTarget2 =
|
|
16834
|
-
var noConnectProp =
|
|
16835
|
-
var connectionsProp =
|
|
16836
|
-
var spicemodelElement =
|
|
16876
|
+
import { z as z51 } from "zod";
|
|
16877
|
+
var connectionTarget2 = z51.string().or(z51.array(z51.string()).readonly()).or(z51.array(z51.string()));
|
|
16878
|
+
var noConnectProp = z51.array(schematicPinLabel).readonly().or(z51.array(schematicPinLabel));
|
|
16879
|
+
var connectionsProp = z51.custom().pipe(z51.record(z51.string(), connectionTarget2));
|
|
16880
|
+
var spicemodelElement = z51.custom(
|
|
16837
16881
|
(v) => !!v && typeof v === "object" && "type" in v && "props" in v
|
|
16838
16882
|
);
|
|
16839
|
-
var internalCircuitElement =
|
|
16883
|
+
var internalCircuitElement = z51.custom(
|
|
16840
16884
|
(value) => isValidElement(value) && value.type === "internalcircuit"
|
|
16841
16885
|
);
|
|
16842
|
-
var pinLabelsProp =
|
|
16886
|
+
var pinLabelsProp = z51.record(
|
|
16843
16887
|
schematicPinLabel,
|
|
16844
|
-
schematicPinLabel.or(
|
|
16888
|
+
schematicPinLabel.or(z51.array(schematicPinLabel).readonly()).or(z51.array(schematicPinLabel))
|
|
16845
16889
|
);
|
|
16846
16890
|
expectTypesMatch(true);
|
|
16847
|
-
var pinCompatibleVariant =
|
|
16848
|
-
manufacturerPartNumber:
|
|
16849
|
-
supplierPartNumber:
|
|
16891
|
+
var pinCompatibleVariant = z51.object({
|
|
16892
|
+
manufacturerPartNumber: z51.string().optional(),
|
|
16893
|
+
supplierPartNumber: z51.record(supplier_name2, z51.array(z51.string())).optional()
|
|
16850
16894
|
});
|
|
16851
16895
|
var chipProps = commonComponentProps.extend({
|
|
16852
|
-
manufacturerPartNumber:
|
|
16896
|
+
manufacturerPartNumber: z51.string().optional(),
|
|
16853
16897
|
pinLabels: pinLabelsProp.optional(),
|
|
16854
|
-
showPinAliases:
|
|
16855
|
-
pcbPinLabels:
|
|
16856
|
-
internallyConnectedPins:
|
|
16857
|
-
externallyConnectedPins:
|
|
16898
|
+
showPinAliases: z51.boolean().optional(),
|
|
16899
|
+
pcbPinLabels: z51.record(z51.string(), z51.string()).optional(),
|
|
16900
|
+
internallyConnectedPins: z51.array(z51.array(z51.union([z51.string(), z51.number()]))).optional(),
|
|
16901
|
+
externallyConnectedPins: z51.array(z51.array(z51.string())).optional(),
|
|
16858
16902
|
schPinArrangement: schematicPortArrangement.optional(),
|
|
16859
16903
|
schPortArrangement: schematicPortArrangement.optional(),
|
|
16860
|
-
pinCompatibleVariants:
|
|
16904
|
+
pinCompatibleVariants: z51.array(pinCompatibleVariant).optional(),
|
|
16861
16905
|
schPinStyle: schematicPinStyle.optional(),
|
|
16862
16906
|
schPinSpacing: distance12.optional(),
|
|
16863
16907
|
schWidth: distance12.optional(),
|
|
16864
16908
|
schHeight: distance12.optional(),
|
|
16865
|
-
noSchematicRepresentation:
|
|
16866
|
-
schShowInternalCircuit:
|
|
16909
|
+
noSchematicRepresentation: z51.boolean().optional(),
|
|
16910
|
+
schShowInternalCircuit: z51.boolean().optional().default(false),
|
|
16867
16911
|
noConnect: noConnectProp.optional(),
|
|
16868
16912
|
connections: connectionsProp.optional(),
|
|
16869
16913
|
spiceModel: spicemodelElement.optional(),
|
|
@@ -16878,38 +16922,38 @@ expectTypesMatch(true);
|
|
|
16878
16922
|
|
|
16879
16923
|
// lib/components/jumper.ts
|
|
16880
16924
|
import { distance as distance13 } from "circuit-json";
|
|
16881
|
-
import { z as
|
|
16925
|
+
import { z as z52 } from "zod";
|
|
16882
16926
|
var jumperProps = commonComponentProps.extend({
|
|
16883
|
-
manufacturerPartNumber:
|
|
16884
|
-
pinLabels:
|
|
16885
|
-
|
|
16886
|
-
schematicPinLabel.or(
|
|
16927
|
+
manufacturerPartNumber: z52.string().optional(),
|
|
16928
|
+
pinLabels: z52.record(
|
|
16929
|
+
z52.number().or(schematicPinLabel),
|
|
16930
|
+
schematicPinLabel.or(z52.array(schematicPinLabel))
|
|
16887
16931
|
).optional(),
|
|
16888
16932
|
schPinStyle: schematicPinStyle.optional(),
|
|
16889
16933
|
schPinSpacing: distance13.optional(),
|
|
16890
16934
|
schWidth: distance13.optional(),
|
|
16891
16935
|
schHeight: distance13.optional(),
|
|
16892
|
-
schDirection:
|
|
16936
|
+
schDirection: z52.enum(["left", "right"]).optional(),
|
|
16893
16937
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
16894
16938
|
schPortArrangement: schematicPortArrangement.optional(),
|
|
16895
|
-
pcbPinLabels:
|
|
16896
|
-
pinCount:
|
|
16897
|
-
internallyConnectedPins:
|
|
16898
|
-
connections:
|
|
16939
|
+
pcbPinLabels: z52.record(z52.string(), z52.string()).optional(),
|
|
16940
|
+
pinCount: z52.union([z52.literal(2), z52.literal(3)]).optional(),
|
|
16941
|
+
internallyConnectedPins: z52.array(z52.array(z52.union([z52.string(), z52.number()]))).optional(),
|
|
16942
|
+
connections: z52.custom().pipe(z52.record(z52.string(), connectionTarget)).optional()
|
|
16899
16943
|
});
|
|
16900
16944
|
expectTypesMatch(true);
|
|
16901
16945
|
|
|
16902
16946
|
// lib/components/solderjumper.ts
|
|
16903
|
-
import { z as
|
|
16947
|
+
import { z as z53 } from "zod";
|
|
16904
16948
|
var solderjumperProps = jumperProps.extend({
|
|
16905
|
-
bridgedPins:
|
|
16906
|
-
bridged:
|
|
16949
|
+
bridgedPins: z53.array(z53.array(z53.string())).optional(),
|
|
16950
|
+
bridged: z53.boolean().optional()
|
|
16907
16951
|
});
|
|
16908
16952
|
expectTypesMatch(true);
|
|
16909
16953
|
|
|
16910
16954
|
// lib/components/connector.ts
|
|
16911
|
-
import { z as
|
|
16912
|
-
var connectorStandard =
|
|
16955
|
+
import { z as z54 } from "zod";
|
|
16956
|
+
var connectorStandard = z54.enum([
|
|
16913
16957
|
"usb_c",
|
|
16914
16958
|
"m2",
|
|
16915
16959
|
"jst_sh",
|
|
@@ -16921,43 +16965,43 @@ var connectorStandard = z53.enum([
|
|
|
16921
16965
|
]);
|
|
16922
16966
|
var connectorProps = chipProps.extend({
|
|
16923
16967
|
standard: connectorStandard.optional(),
|
|
16924
|
-
pinCount:
|
|
16968
|
+
pinCount: z54.number().int().positive().optional()
|
|
16925
16969
|
});
|
|
16926
16970
|
expectTypesMatch(true);
|
|
16927
16971
|
|
|
16928
16972
|
// lib/components/interconnect.ts
|
|
16929
|
-
import { z as
|
|
16973
|
+
import { z as z55 } from "zod";
|
|
16930
16974
|
var interconnectProps = commonComponentProps.extend({
|
|
16931
|
-
standard:
|
|
16932
|
-
pinLabels:
|
|
16933
|
-
|
|
16934
|
-
schematicPinLabel.or(
|
|
16975
|
+
standard: z55.enum(["TSC0001_36P_XALT_2025_11", "0805", "0603", "1206"]).optional(),
|
|
16976
|
+
pinLabels: z55.record(
|
|
16977
|
+
z55.number().or(schematicPinLabel),
|
|
16978
|
+
schematicPinLabel.or(z55.array(schematicPinLabel))
|
|
16935
16979
|
).optional(),
|
|
16936
|
-
internallyConnectedPins:
|
|
16980
|
+
internallyConnectedPins: z55.array(z55.array(z55.union([z55.string(), z55.number()]))).optional()
|
|
16937
16981
|
});
|
|
16938
16982
|
expectTypesMatch(true);
|
|
16939
16983
|
|
|
16940
16984
|
// lib/components/fuse.ts
|
|
16941
|
-
import { z as
|
|
16985
|
+
import { z as z56 } from "zod";
|
|
16942
16986
|
var fusePinLabels = ["pin1", "pin2"];
|
|
16943
16987
|
var fuseProps = commonComponentProps.extend({
|
|
16944
|
-
currentRating:
|
|
16945
|
-
voltageRating:
|
|
16946
|
-
schShowRatings:
|
|
16988
|
+
currentRating: z56.union([z56.number(), z56.string()]),
|
|
16989
|
+
voltageRating: z56.union([z56.number(), z56.string()]).optional(),
|
|
16990
|
+
schShowRatings: z56.boolean().optional(),
|
|
16947
16991
|
schOrientation: schematicOrientation.optional(),
|
|
16948
|
-
connections:
|
|
16949
|
-
|
|
16950
|
-
|
|
16951
|
-
|
|
16952
|
-
|
|
16953
|
-
|
|
16992
|
+
connections: z56.record(
|
|
16993
|
+
z56.string(),
|
|
16994
|
+
z56.union([
|
|
16995
|
+
z56.string(),
|
|
16996
|
+
z56.array(z56.string()).readonly(),
|
|
16997
|
+
z56.array(z56.string())
|
|
16954
16998
|
])
|
|
16955
16999
|
).optional()
|
|
16956
17000
|
});
|
|
16957
17001
|
|
|
16958
17002
|
// lib/components/platedhole.ts
|
|
16959
17003
|
import { distance as distance14 } from "circuit-json";
|
|
16960
|
-
import { z as
|
|
17004
|
+
import { z as z57 } from "zod";
|
|
16961
17005
|
var DEFAULT_PIN_HEADER_HOLE_DIAMETER = "0.04in";
|
|
16962
17006
|
var DEFAULT_PIN_HEADER_OUTER_DIAMETER = "0.1in";
|
|
16963
17007
|
var inferPlatedHoleShapeAndDefaults = (rawProps) => {
|
|
@@ -16989,26 +17033,26 @@ var inferPlatedHoleShapeAndDefaults = (rawProps) => {
|
|
|
16989
17033
|
props.outerDiameter = DEFAULT_PIN_HEADER_OUTER_DIAMETER;
|
|
16990
17034
|
return props;
|
|
16991
17035
|
};
|
|
16992
|
-
var distanceHiddenUndefined =
|
|
17036
|
+
var distanceHiddenUndefined = z57.custom().transform((a) => {
|
|
16993
17037
|
if (a === void 0) return void 0;
|
|
16994
17038
|
return distance14.parse(a);
|
|
16995
17039
|
});
|
|
16996
|
-
var platedHolePropsByShape =
|
|
17040
|
+
var platedHolePropsByShape = z57.discriminatedUnion("shape", [
|
|
16997
17041
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
16998
|
-
name:
|
|
16999
|
-
connectsTo:
|
|
17000
|
-
shape:
|
|
17042
|
+
name: z57.string().optional(),
|
|
17043
|
+
connectsTo: z57.string().or(z57.array(z57.string())).optional(),
|
|
17044
|
+
shape: z57.literal("circle"),
|
|
17001
17045
|
holeDiameter: distance14,
|
|
17002
17046
|
outerDiameter: distance14,
|
|
17003
17047
|
padDiameter: distance14.optional().describe("Diameter of the copper pad"),
|
|
17004
17048
|
portHints: portHints.optional(),
|
|
17005
17049
|
solderMaskMargin: distance14.optional(),
|
|
17006
|
-
coveredWithSolderMask:
|
|
17050
|
+
coveredWithSolderMask: z57.boolean().optional()
|
|
17007
17051
|
}),
|
|
17008
17052
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
17009
|
-
name:
|
|
17010
|
-
connectsTo:
|
|
17011
|
-
shape:
|
|
17053
|
+
name: z57.string().optional(),
|
|
17054
|
+
connectsTo: z57.string().or(z57.array(z57.string())).optional(),
|
|
17055
|
+
shape: z57.literal("oval"),
|
|
17012
17056
|
outerWidth: distance14,
|
|
17013
17057
|
outerHeight: distance14,
|
|
17014
17058
|
holeWidth: distanceHiddenUndefined,
|
|
@@ -17017,13 +17061,13 @@ var platedHolePropsByShape = z56.discriminatedUnion("shape", [
|
|
|
17017
17061
|
innerHeight: distance14.optional().describe("DEPRECATED use holeHeight"),
|
|
17018
17062
|
portHints: portHints.optional(),
|
|
17019
17063
|
solderMaskMargin: distance14.optional(),
|
|
17020
|
-
coveredWithSolderMask:
|
|
17064
|
+
coveredWithSolderMask: z57.boolean().optional()
|
|
17021
17065
|
}),
|
|
17022
17066
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
17023
|
-
name:
|
|
17024
|
-
connectsTo:
|
|
17025
|
-
shape:
|
|
17026
|
-
rectPad:
|
|
17067
|
+
name: z57.string().optional(),
|
|
17068
|
+
connectsTo: z57.string().or(z57.array(z57.string())).optional(),
|
|
17069
|
+
shape: z57.literal("pill"),
|
|
17070
|
+
rectPad: z57.boolean().optional(),
|
|
17027
17071
|
outerWidth: distance14,
|
|
17028
17072
|
outerHeight: distance14,
|
|
17029
17073
|
holeWidth: distanceHiddenUndefined,
|
|
@@ -17034,30 +17078,30 @@ var platedHolePropsByShape = z56.discriminatedUnion("shape", [
|
|
|
17034
17078
|
holeOffsetX: distance14.optional(),
|
|
17035
17079
|
holeOffsetY: distance14.optional(),
|
|
17036
17080
|
solderMaskMargin: distance14.optional(),
|
|
17037
|
-
coveredWithSolderMask:
|
|
17081
|
+
coveredWithSolderMask: z57.boolean().optional()
|
|
17038
17082
|
}),
|
|
17039
17083
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
17040
|
-
name:
|
|
17041
|
-
connectsTo:
|
|
17042
|
-
shape:
|
|
17084
|
+
name: z57.string().optional(),
|
|
17085
|
+
connectsTo: z57.string().or(z57.array(z57.string())).optional(),
|
|
17086
|
+
shape: z57.literal("circular_hole_with_rect_pad"),
|
|
17043
17087
|
holeDiameter: distance14,
|
|
17044
17088
|
rectPadWidth: distance14,
|
|
17045
17089
|
rectPadHeight: distance14,
|
|
17046
17090
|
rectBorderRadius: distance14.optional(),
|
|
17047
|
-
holeShape:
|
|
17048
|
-
padShape:
|
|
17091
|
+
holeShape: z57.literal("circle").optional(),
|
|
17092
|
+
padShape: z57.literal("rect").optional(),
|
|
17049
17093
|
portHints: portHints.optional(),
|
|
17050
17094
|
holeOffsetX: distance14.optional(),
|
|
17051
17095
|
holeOffsetY: distance14.optional(),
|
|
17052
17096
|
solderMaskMargin: distance14.optional(),
|
|
17053
|
-
coveredWithSolderMask:
|
|
17097
|
+
coveredWithSolderMask: z57.boolean().optional()
|
|
17054
17098
|
}),
|
|
17055
17099
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
17056
|
-
name:
|
|
17057
|
-
connectsTo:
|
|
17058
|
-
shape:
|
|
17059
|
-
holeShape:
|
|
17060
|
-
padShape:
|
|
17100
|
+
name: z57.string().optional(),
|
|
17101
|
+
connectsTo: z57.string().or(z57.array(z57.string())).optional(),
|
|
17102
|
+
shape: z57.literal("pill_hole_with_rect_pad"),
|
|
17103
|
+
holeShape: z57.literal("pill").optional(),
|
|
17104
|
+
padShape: z57.literal("rect").optional(),
|
|
17061
17105
|
holeWidth: distance14,
|
|
17062
17106
|
holeHeight: distance14,
|
|
17063
17107
|
rectPadWidth: distance14,
|
|
@@ -17067,22 +17111,22 @@ var platedHolePropsByShape = z56.discriminatedUnion("shape", [
|
|
|
17067
17111
|
holeOffsetX: distance14.optional(),
|
|
17068
17112
|
holeOffsetY: distance14.optional(),
|
|
17069
17113
|
solderMaskMargin: distance14.optional(),
|
|
17070
|
-
coveredWithSolderMask:
|
|
17114
|
+
coveredWithSolderMask: z57.boolean().optional()
|
|
17071
17115
|
}),
|
|
17072
17116
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
17073
|
-
name:
|
|
17074
|
-
connectsTo:
|
|
17075
|
-
shape:
|
|
17076
|
-
holeShape:
|
|
17117
|
+
name: z57.string().optional(),
|
|
17118
|
+
connectsTo: z57.string().or(z57.array(z57.string())).optional(),
|
|
17119
|
+
shape: z57.literal("hole_with_polygon_pad"),
|
|
17120
|
+
holeShape: z57.enum(["circle", "oval", "pill", "rotated_pill"]),
|
|
17077
17121
|
holeDiameter: distance14.optional(),
|
|
17078
17122
|
holeWidth: distance14.optional(),
|
|
17079
17123
|
holeHeight: distance14.optional(),
|
|
17080
|
-
padOutline:
|
|
17124
|
+
padOutline: z57.array(point),
|
|
17081
17125
|
holeOffsetX: distance14,
|
|
17082
17126
|
holeOffsetY: distance14,
|
|
17083
17127
|
portHints: portHints.optional(),
|
|
17084
17128
|
solderMaskMargin: distance14.optional(),
|
|
17085
|
-
coveredWithSolderMask:
|
|
17129
|
+
coveredWithSolderMask: z57.boolean().optional()
|
|
17086
17130
|
})
|
|
17087
17131
|
]).transform((a) => {
|
|
17088
17132
|
if ("innerWidth" in a && a.innerWidth !== void 0) {
|
|
@@ -17093,7 +17137,7 @@ var platedHolePropsByShape = z56.discriminatedUnion("shape", [
|
|
|
17093
17137
|
}
|
|
17094
17138
|
return a;
|
|
17095
17139
|
});
|
|
17096
|
-
var platedHoleProps =
|
|
17140
|
+
var platedHoleProps = z57.preprocess(
|
|
17097
17141
|
inferPlatedHoleShapeAndDefaults,
|
|
17098
17142
|
platedHolePropsByShape
|
|
17099
17143
|
);
|
|
@@ -17101,7 +17145,7 @@ expectTypesMatch(true);
|
|
|
17101
17145
|
|
|
17102
17146
|
// lib/components/resistor.ts
|
|
17103
17147
|
import { resistance } from "circuit-json";
|
|
17104
|
-
import { z as
|
|
17148
|
+
import { z as z58 } from "zod";
|
|
17105
17149
|
var resistorPinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
17106
17150
|
var resistorImperialFootprintNames = /* @__PURE__ */ new Set([
|
|
17107
17151
|
"01005",
|
|
@@ -17125,7 +17169,7 @@ var resistorFootprintProp = footprintProp.optional().transform(mapResistorFootpr
|
|
|
17125
17169
|
var resistorProps = commonComponentProps.extend({
|
|
17126
17170
|
footprint: resistorFootprintProp,
|
|
17127
17171
|
resistance,
|
|
17128
|
-
tolerance:
|
|
17172
|
+
tolerance: z58.union([z58.string(), z58.number()]).transform((val) => {
|
|
17129
17173
|
if (typeof val === "string") {
|
|
17130
17174
|
if (val.endsWith("%")) {
|
|
17131
17175
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -17134,12 +17178,12 @@ var resistorProps = commonComponentProps.extend({
|
|
|
17134
17178
|
}
|
|
17135
17179
|
return val;
|
|
17136
17180
|
}).pipe(
|
|
17137
|
-
|
|
17181
|
+
z58.number().min(0, "Tolerance must be non-negative").max(1, "Tolerance cannot be greater than 100%")
|
|
17138
17182
|
).optional(),
|
|
17139
|
-
pullupFor:
|
|
17140
|
-
pullupTo:
|
|
17141
|
-
pulldownFor:
|
|
17142
|
-
pulldownTo:
|
|
17183
|
+
pullupFor: z58.string().optional(),
|
|
17184
|
+
pullupTo: z58.string().optional(),
|
|
17185
|
+
pulldownFor: z58.string().optional(),
|
|
17186
|
+
pulldownTo: z58.string().optional(),
|
|
17143
17187
|
schOrientation: schematicOrientation.optional(),
|
|
17144
17188
|
schSize: schematicSymbolSize.optional(),
|
|
17145
17189
|
connections: createConnectionsProp(resistorPinLabels).optional()
|
|
@@ -17149,18 +17193,18 @@ expectTypesMatch(true);
|
|
|
17149
17193
|
|
|
17150
17194
|
// lib/components/potentiometer.ts
|
|
17151
17195
|
import { resistance as resistance2 } from "circuit-json";
|
|
17152
|
-
import { z as
|
|
17196
|
+
import { z as z59 } from "zod";
|
|
17153
17197
|
var potentiometerPinLabels = ["pin1", "pin2", "pin3"];
|
|
17154
17198
|
var potentiometerProps = commonComponentProps.extend({
|
|
17155
17199
|
maxResistance: resistance2,
|
|
17156
|
-
pinVariant:
|
|
17200
|
+
pinVariant: z59.enum(["two_pin", "three_pin"]).optional(),
|
|
17157
17201
|
connections: createConnectionsProp(potentiometerPinLabels).optional()
|
|
17158
17202
|
});
|
|
17159
17203
|
expectTypesMatch(true);
|
|
17160
17204
|
|
|
17161
17205
|
// lib/components/crystal.ts
|
|
17162
17206
|
import { capacitance, distance as distance15, frequency } from "circuit-json";
|
|
17163
|
-
import { z as
|
|
17207
|
+
import { z as z60 } from "zod";
|
|
17164
17208
|
var crystalPins = [
|
|
17165
17209
|
"pin1",
|
|
17166
17210
|
"left",
|
|
@@ -17173,9 +17217,9 @@ var crystalProps = commonComponentProps.extend({
|
|
|
17173
17217
|
frequency,
|
|
17174
17218
|
loadCapacitance: capacitance,
|
|
17175
17219
|
maxTraceLength: distance15.optional(),
|
|
17176
|
-
manufacturerPartNumber:
|
|
17177
|
-
mpn:
|
|
17178
|
-
pinVariant:
|
|
17220
|
+
manufacturerPartNumber: z60.string().optional(),
|
|
17221
|
+
mpn: z60.string().optional(),
|
|
17222
|
+
pinVariant: z60.enum(["two_pin", "four_pin"]).optional(),
|
|
17179
17223
|
schOrientation: schematicOrientation.optional(),
|
|
17180
17224
|
connections: createConnectionsProp(crystalPins).optional()
|
|
17181
17225
|
});
|
|
@@ -17183,34 +17227,34 @@ expectTypesMatch(true);
|
|
|
17183
17227
|
|
|
17184
17228
|
// lib/components/resonator.ts
|
|
17185
17229
|
import { frequency as frequency2, capacitance as capacitance2 } from "circuit-json";
|
|
17186
|
-
import { z as
|
|
17230
|
+
import { z as z61 } from "zod";
|
|
17187
17231
|
var resonatorProps = commonComponentProps.extend({
|
|
17188
17232
|
frequency: frequency2,
|
|
17189
17233
|
loadCapacitance: capacitance2,
|
|
17190
|
-
pinVariant:
|
|
17234
|
+
pinVariant: z61.enum(["no_ground", "ground_pin", "two_ground_pins"]).optional()
|
|
17191
17235
|
});
|
|
17192
17236
|
expectTypesMatch(true);
|
|
17193
17237
|
|
|
17194
17238
|
// lib/components/stampboard.ts
|
|
17195
17239
|
import { distance as distance16 } from "circuit-json";
|
|
17196
|
-
import { z as
|
|
17240
|
+
import { z as z62 } from "zod";
|
|
17197
17241
|
var stampboardProps = boardProps.extend({
|
|
17198
|
-
leftPinCount:
|
|
17199
|
-
rightPinCount:
|
|
17200
|
-
topPinCount:
|
|
17201
|
-
bottomPinCount:
|
|
17202
|
-
leftPins:
|
|
17203
|
-
rightPins:
|
|
17204
|
-
topPins:
|
|
17205
|
-
bottomPins:
|
|
17242
|
+
leftPinCount: z62.number().optional(),
|
|
17243
|
+
rightPinCount: z62.number().optional(),
|
|
17244
|
+
topPinCount: z62.number().optional(),
|
|
17245
|
+
bottomPinCount: z62.number().optional(),
|
|
17246
|
+
leftPins: z62.array(z62.string()).optional(),
|
|
17247
|
+
rightPins: z62.array(z62.string()).optional(),
|
|
17248
|
+
topPins: z62.array(z62.string()).optional(),
|
|
17249
|
+
bottomPins: z62.array(z62.string()).optional(),
|
|
17206
17250
|
pinPitch: distance16.optional(),
|
|
17207
|
-
innerHoles:
|
|
17251
|
+
innerHoles: z62.boolean().optional()
|
|
17208
17252
|
});
|
|
17209
17253
|
expectTypesMatch(true);
|
|
17210
17254
|
|
|
17211
17255
|
// lib/components/capacitor.ts
|
|
17212
17256
|
import { capacitance as capacitance3, distance as distance17, voltage } from "circuit-json";
|
|
17213
|
-
import { z as
|
|
17257
|
+
import { z as z63 } from "zod";
|
|
17214
17258
|
var capacitorPinLabels = [
|
|
17215
17259
|
"pin1",
|
|
17216
17260
|
"pin2",
|
|
@@ -17222,12 +17266,12 @@ var capacitorPinLabels = [
|
|
|
17222
17266
|
var capacitorProps = commonComponentProps.extend({
|
|
17223
17267
|
capacitance: capacitance3,
|
|
17224
17268
|
maxVoltageRating: voltage.optional(),
|
|
17225
|
-
schShowRatings:
|
|
17226
|
-
polarized:
|
|
17227
|
-
decouplingFor:
|
|
17228
|
-
decouplingTo:
|
|
17229
|
-
bypassFor:
|
|
17230
|
-
bypassTo:
|
|
17269
|
+
schShowRatings: z63.boolean().optional().default(false),
|
|
17270
|
+
polarized: z63.boolean().optional().default(false),
|
|
17271
|
+
decouplingFor: z63.string().optional(),
|
|
17272
|
+
decouplingTo: z63.string().optional(),
|
|
17273
|
+
bypassFor: z63.string().optional(),
|
|
17274
|
+
bypassTo: z63.string().optional(),
|
|
17231
17275
|
maxDecouplingTraceLength: distance17.optional(),
|
|
17232
17276
|
schOrientation: schematicOrientation.optional(),
|
|
17233
17277
|
schSize: schematicSymbolSize.optional(),
|
|
@@ -17238,14 +17282,14 @@ expectTypesMatch(true);
|
|
|
17238
17282
|
|
|
17239
17283
|
// lib/components/net.ts
|
|
17240
17284
|
import { distance as distance18 } from "circuit-json";
|
|
17241
|
-
import { z as
|
|
17242
|
-
var netProps =
|
|
17243
|
-
name:
|
|
17244
|
-
connectsTo:
|
|
17245
|
-
routingPhaseIndex:
|
|
17246
|
-
highlightColor:
|
|
17247
|
-
isPowerNet:
|
|
17248
|
-
isGroundNet:
|
|
17285
|
+
import { z as z64 } from "zod";
|
|
17286
|
+
var netProps = z64.object({
|
|
17287
|
+
name: z64.string(),
|
|
17288
|
+
connectsTo: z64.string().or(z64.array(z64.string())).optional(),
|
|
17289
|
+
routingPhaseIndex: z64.number().nullable().optional(),
|
|
17290
|
+
highlightColor: z64.string().optional(),
|
|
17291
|
+
isPowerNet: z64.boolean().optional(),
|
|
17292
|
+
isGroundNet: z64.boolean().optional(),
|
|
17249
17293
|
nominalTraceWidth: distance18.optional()
|
|
17250
17294
|
});
|
|
17251
17295
|
expectTypesMatch(true);
|
|
@@ -17259,55 +17303,55 @@ var fiducialProps = commonComponentProps.extend({
|
|
|
17259
17303
|
expectTypesMatch(true);
|
|
17260
17304
|
|
|
17261
17305
|
// lib/components/constrainedlayout.ts
|
|
17262
|
-
import { z as
|
|
17263
|
-
var constrainedLayoutProps =
|
|
17264
|
-
name:
|
|
17265
|
-
pcbOnly:
|
|
17266
|
-
schOnly:
|
|
17306
|
+
import { z as z66 } from "zod";
|
|
17307
|
+
var constrainedLayoutProps = z66.object({
|
|
17308
|
+
name: z66.string().optional(),
|
|
17309
|
+
pcbOnly: z66.boolean().optional(),
|
|
17310
|
+
schOnly: z66.boolean().optional()
|
|
17267
17311
|
});
|
|
17268
17312
|
expectTypesMatch(true);
|
|
17269
17313
|
|
|
17270
17314
|
// lib/components/constraint.ts
|
|
17271
|
-
import { z as
|
|
17272
|
-
var pcbXDistConstraintProps =
|
|
17273
|
-
pcb:
|
|
17315
|
+
import { z as z67 } from "zod";
|
|
17316
|
+
var pcbXDistConstraintProps = z67.object({
|
|
17317
|
+
pcb: z67.literal(true).optional(),
|
|
17274
17318
|
xDist: distance,
|
|
17275
|
-
left:
|
|
17276
|
-
right:
|
|
17277
|
-
edgeToEdge:
|
|
17278
|
-
centerToCenter:
|
|
17319
|
+
left: z67.string(),
|
|
17320
|
+
right: z67.string(),
|
|
17321
|
+
edgeToEdge: z67.literal(true).optional(),
|
|
17322
|
+
centerToCenter: z67.literal(true).optional()
|
|
17279
17323
|
});
|
|
17280
17324
|
expectTypesMatch(
|
|
17281
17325
|
true
|
|
17282
17326
|
);
|
|
17283
|
-
var pcbYDistConstraintProps =
|
|
17284
|
-
pcb:
|
|
17327
|
+
var pcbYDistConstraintProps = z67.object({
|
|
17328
|
+
pcb: z67.literal(true).optional(),
|
|
17285
17329
|
yDist: distance,
|
|
17286
|
-
top:
|
|
17287
|
-
bottom:
|
|
17288
|
-
edgeToEdge:
|
|
17289
|
-
centerToCenter:
|
|
17330
|
+
top: z67.string(),
|
|
17331
|
+
bottom: z67.string(),
|
|
17332
|
+
edgeToEdge: z67.literal(true).optional(),
|
|
17333
|
+
centerToCenter: z67.literal(true).optional()
|
|
17290
17334
|
});
|
|
17291
17335
|
expectTypesMatch(
|
|
17292
17336
|
true
|
|
17293
17337
|
);
|
|
17294
|
-
var pcbSameYConstraintProps =
|
|
17295
|
-
pcb:
|
|
17296
|
-
sameY:
|
|
17297
|
-
for:
|
|
17338
|
+
var pcbSameYConstraintProps = z67.object({
|
|
17339
|
+
pcb: z67.literal(true).optional(),
|
|
17340
|
+
sameY: z67.literal(true).optional(),
|
|
17341
|
+
for: z67.array(z67.string())
|
|
17298
17342
|
});
|
|
17299
17343
|
expectTypesMatch(
|
|
17300
17344
|
true
|
|
17301
17345
|
);
|
|
17302
|
-
var pcbSameXConstraintProps =
|
|
17303
|
-
pcb:
|
|
17304
|
-
sameX:
|
|
17305
|
-
for:
|
|
17346
|
+
var pcbSameXConstraintProps = z67.object({
|
|
17347
|
+
pcb: z67.literal(true).optional(),
|
|
17348
|
+
sameX: z67.literal(true).optional(),
|
|
17349
|
+
for: z67.array(z67.string())
|
|
17306
17350
|
});
|
|
17307
17351
|
expectTypesMatch(
|
|
17308
17352
|
true
|
|
17309
17353
|
);
|
|
17310
|
-
var constraintProps =
|
|
17354
|
+
var constraintProps = z67.union([
|
|
17311
17355
|
pcbXDistConstraintProps,
|
|
17312
17356
|
pcbYDistConstraintProps,
|
|
17313
17357
|
pcbSameYConstraintProps,
|
|
@@ -17316,13 +17360,13 @@ var constraintProps = z66.union([
|
|
|
17316
17360
|
expectTypesMatch(true);
|
|
17317
17361
|
|
|
17318
17362
|
// lib/components/cutout.ts
|
|
17319
|
-
import { z as
|
|
17363
|
+
import { z as z68 } from "zod";
|
|
17320
17364
|
var rectCutoutProps = pcbLayoutProps.omit({
|
|
17321
17365
|
layer: true,
|
|
17322
17366
|
pcbRotation: true
|
|
17323
17367
|
}).extend({
|
|
17324
|
-
name:
|
|
17325
|
-
shape:
|
|
17368
|
+
name: z68.string().optional(),
|
|
17369
|
+
shape: z68.literal("rect"),
|
|
17326
17370
|
width: distance,
|
|
17327
17371
|
height: distance
|
|
17328
17372
|
});
|
|
@@ -17331,8 +17375,8 @@ var circleCutoutProps = pcbLayoutProps.omit({
|
|
|
17331
17375
|
layer: true,
|
|
17332
17376
|
pcbRotation: true
|
|
17333
17377
|
}).extend({
|
|
17334
|
-
name:
|
|
17335
|
-
shape:
|
|
17378
|
+
name: z68.string().optional(),
|
|
17379
|
+
shape: z68.literal("circle"),
|
|
17336
17380
|
radius: distance
|
|
17337
17381
|
});
|
|
17338
17382
|
expectTypesMatch(true);
|
|
@@ -17340,36 +17384,36 @@ var polygonCutoutProps = pcbLayoutProps.omit({
|
|
|
17340
17384
|
layer: true,
|
|
17341
17385
|
pcbRotation: true
|
|
17342
17386
|
}).extend({
|
|
17343
|
-
name:
|
|
17344
|
-
shape:
|
|
17345
|
-
points:
|
|
17387
|
+
name: z68.string().optional(),
|
|
17388
|
+
shape: z68.literal("polygon"),
|
|
17389
|
+
points: z68.array(point)
|
|
17346
17390
|
});
|
|
17347
17391
|
expectTypesMatch(true);
|
|
17348
|
-
var cutoutProps =
|
|
17392
|
+
var cutoutProps = z68.discriminatedUnion("shape", [
|
|
17349
17393
|
rectCutoutProps,
|
|
17350
17394
|
circleCutoutProps,
|
|
17351
17395
|
polygonCutoutProps
|
|
17352
17396
|
]);
|
|
17353
17397
|
|
|
17354
17398
|
// lib/components/drc-check.ts
|
|
17355
|
-
import { z as
|
|
17356
|
-
var drcCheckProps =
|
|
17357
|
-
name:
|
|
17399
|
+
import { z as z69 } from "zod";
|
|
17400
|
+
var drcCheckProps = z69.object({
|
|
17401
|
+
name: z69.string().optional(),
|
|
17358
17402
|
checkFn: customDrcCheckFn
|
|
17359
17403
|
});
|
|
17360
17404
|
expectTypesMatch(true);
|
|
17361
17405
|
|
|
17362
17406
|
// lib/components/smtpad.ts
|
|
17363
|
-
import { z as
|
|
17407
|
+
import { z as z70 } from "zod";
|
|
17364
17408
|
var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17365
|
-
name:
|
|
17366
|
-
shape:
|
|
17409
|
+
name: z70.string().optional(),
|
|
17410
|
+
shape: z70.literal("rect"),
|
|
17367
17411
|
width: distance,
|
|
17368
17412
|
height: distance,
|
|
17369
17413
|
rectBorderRadius: distance.optional(),
|
|
17370
17414
|
cornerRadius: distance.optional(),
|
|
17371
17415
|
portHints: portHints.optional(),
|
|
17372
|
-
coveredWithSolderMask:
|
|
17416
|
+
coveredWithSolderMask: z70.boolean().optional(),
|
|
17373
17417
|
solderMaskMargin: distance.optional(),
|
|
17374
17418
|
solderMaskMarginLeft: distance.optional(),
|
|
17375
17419
|
solderMaskMarginRight: distance.optional(),
|
|
@@ -17379,14 +17423,14 @@ var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
17379
17423
|
});
|
|
17380
17424
|
expectTypesMatch(true);
|
|
17381
17425
|
var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17382
|
-
name:
|
|
17383
|
-
shape:
|
|
17426
|
+
name: z70.string().optional(),
|
|
17427
|
+
shape: z70.literal("rotated_rect"),
|
|
17384
17428
|
width: distance,
|
|
17385
17429
|
height: distance,
|
|
17386
|
-
ccwRotation:
|
|
17430
|
+
ccwRotation: z70.number(),
|
|
17387
17431
|
cornerRadius: distance.optional(),
|
|
17388
17432
|
portHints: portHints.optional(),
|
|
17389
|
-
coveredWithSolderMask:
|
|
17433
|
+
coveredWithSolderMask: z70.boolean().optional(),
|
|
17390
17434
|
solderMaskMargin: distance.optional(),
|
|
17391
17435
|
solderMaskMarginLeft: distance.optional(),
|
|
17392
17436
|
solderMaskMarginRight: distance.optional(),
|
|
@@ -17396,51 +17440,51 @@ var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
17396
17440
|
});
|
|
17397
17441
|
expectTypesMatch(true);
|
|
17398
17442
|
var circleSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17399
|
-
name:
|
|
17400
|
-
shape:
|
|
17443
|
+
name: z70.string().optional(),
|
|
17444
|
+
shape: z70.literal("circle"),
|
|
17401
17445
|
radius: distance,
|
|
17402
17446
|
portHints: portHints.optional(),
|
|
17403
|
-
coveredWithSolderMask:
|
|
17447
|
+
coveredWithSolderMask: z70.boolean().optional(),
|
|
17404
17448
|
solderMaskMargin: distance.optional(),
|
|
17405
17449
|
solderPasteMargin: distance.optional()
|
|
17406
17450
|
});
|
|
17407
17451
|
expectTypesMatch(true);
|
|
17408
17452
|
var pillSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17409
|
-
name:
|
|
17410
|
-
shape:
|
|
17453
|
+
name: z70.string().optional(),
|
|
17454
|
+
shape: z70.literal("pill"),
|
|
17411
17455
|
width: distance,
|
|
17412
17456
|
height: distance,
|
|
17413
17457
|
radius: distance,
|
|
17414
17458
|
portHints: portHints.optional(),
|
|
17415
|
-
coveredWithSolderMask:
|
|
17459
|
+
coveredWithSolderMask: z70.boolean().optional(),
|
|
17416
17460
|
solderMaskMargin: distance.optional(),
|
|
17417
17461
|
solderPasteMargin: distance.optional()
|
|
17418
17462
|
});
|
|
17419
17463
|
expectTypesMatch(true);
|
|
17420
17464
|
var rotatedPillSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17421
|
-
name:
|
|
17422
|
-
shape:
|
|
17465
|
+
name: z70.string().optional(),
|
|
17466
|
+
shape: z70.literal("rotated_pill"),
|
|
17423
17467
|
width: distance,
|
|
17424
17468
|
height: distance,
|
|
17425
17469
|
radius: distance,
|
|
17426
|
-
ccwRotation:
|
|
17470
|
+
ccwRotation: z70.number(),
|
|
17427
17471
|
portHints: portHints.optional(),
|
|
17428
|
-
coveredWithSolderMask:
|
|
17472
|
+
coveredWithSolderMask: z70.boolean().optional(),
|
|
17429
17473
|
solderMaskMargin: distance.optional(),
|
|
17430
17474
|
solderPasteMargin: distance.optional()
|
|
17431
17475
|
});
|
|
17432
17476
|
expectTypesMatch(true);
|
|
17433
17477
|
var polygonSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17434
|
-
name:
|
|
17435
|
-
shape:
|
|
17436
|
-
points:
|
|
17478
|
+
name: z70.string().optional(),
|
|
17479
|
+
shape: z70.literal("polygon"),
|
|
17480
|
+
points: z70.array(point),
|
|
17437
17481
|
portHints: portHints.optional(),
|
|
17438
|
-
coveredWithSolderMask:
|
|
17482
|
+
coveredWithSolderMask: z70.boolean().optional(),
|
|
17439
17483
|
solderMaskMargin: distance.optional(),
|
|
17440
17484
|
solderPasteMargin: distance.optional()
|
|
17441
17485
|
});
|
|
17442
17486
|
expectTypesMatch(true);
|
|
17443
|
-
var smtPadProps =
|
|
17487
|
+
var smtPadProps = z70.discriminatedUnion("shape", [
|
|
17444
17488
|
circleSmtPadProps,
|
|
17445
17489
|
rectSmtPadProps,
|
|
17446
17490
|
rotatedRectSmtPadProps,
|
|
@@ -17451,63 +17495,63 @@ var smtPadProps = z69.discriminatedUnion("shape", [
|
|
|
17451
17495
|
expectTypesMatch(true);
|
|
17452
17496
|
|
|
17453
17497
|
// lib/components/solderpaste.ts
|
|
17454
|
-
import { z as
|
|
17498
|
+
import { z as z71 } from "zod";
|
|
17455
17499
|
var rectSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17456
|
-
shape:
|
|
17500
|
+
shape: z71.literal("rect"),
|
|
17457
17501
|
width: distance,
|
|
17458
17502
|
height: distance
|
|
17459
17503
|
});
|
|
17460
17504
|
expectTypesMatch(true);
|
|
17461
17505
|
var circleSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17462
|
-
shape:
|
|
17506
|
+
shape: z71.literal("circle"),
|
|
17463
17507
|
radius: distance
|
|
17464
17508
|
});
|
|
17465
17509
|
expectTypesMatch(true);
|
|
17466
|
-
var solderPasteProps =
|
|
17510
|
+
var solderPasteProps = z71.union([
|
|
17467
17511
|
circleSolderPasteProps,
|
|
17468
17512
|
rectSolderPasteProps
|
|
17469
17513
|
]);
|
|
17470
17514
|
expectTypesMatch(true);
|
|
17471
17515
|
|
|
17472
17516
|
// lib/components/hole.ts
|
|
17473
|
-
import { z as
|
|
17517
|
+
import { z as z72 } from "zod";
|
|
17474
17518
|
var circleHoleProps = pcbLayoutProps.extend({
|
|
17475
|
-
name:
|
|
17476
|
-
shape:
|
|
17519
|
+
name: z72.string().optional(),
|
|
17520
|
+
shape: z72.literal("circle").optional(),
|
|
17477
17521
|
diameter: distance.optional(),
|
|
17478
17522
|
radius: distance.optional(),
|
|
17479
17523
|
solderMaskMargin: distance.optional(),
|
|
17480
|
-
coveredWithSolderMask:
|
|
17524
|
+
coveredWithSolderMask: z72.boolean().optional()
|
|
17481
17525
|
}).transform((d) => ({
|
|
17482
17526
|
...d,
|
|
17483
17527
|
diameter: d.diameter ?? 2 * d.radius,
|
|
17484
17528
|
radius: d.radius ?? d.diameter / 2
|
|
17485
17529
|
}));
|
|
17486
17530
|
var pillHoleProps = pcbLayoutProps.extend({
|
|
17487
|
-
name:
|
|
17488
|
-
shape:
|
|
17531
|
+
name: z72.string().optional(),
|
|
17532
|
+
shape: z72.literal("pill"),
|
|
17489
17533
|
width: distance,
|
|
17490
17534
|
height: distance,
|
|
17491
17535
|
solderMaskMargin: distance.optional(),
|
|
17492
|
-
coveredWithSolderMask:
|
|
17536
|
+
coveredWithSolderMask: z72.boolean().optional()
|
|
17493
17537
|
});
|
|
17494
17538
|
var ovalHoleProps = pcbLayoutProps.extend({
|
|
17495
|
-
name:
|
|
17496
|
-
shape:
|
|
17539
|
+
name: z72.string().optional(),
|
|
17540
|
+
shape: z72.literal("oval"),
|
|
17497
17541
|
width: distance,
|
|
17498
17542
|
height: distance,
|
|
17499
17543
|
solderMaskMargin: distance.optional(),
|
|
17500
|
-
coveredWithSolderMask:
|
|
17544
|
+
coveredWithSolderMask: z72.boolean().optional()
|
|
17501
17545
|
});
|
|
17502
17546
|
var rectHoleProps = pcbLayoutProps.extend({
|
|
17503
|
-
name:
|
|
17504
|
-
shape:
|
|
17547
|
+
name: z72.string().optional(),
|
|
17548
|
+
shape: z72.literal("rect"),
|
|
17505
17549
|
width: distance,
|
|
17506
17550
|
height: distance,
|
|
17507
17551
|
solderMaskMargin: distance.optional(),
|
|
17508
|
-
coveredWithSolderMask:
|
|
17552
|
+
coveredWithSolderMask: z72.boolean().optional()
|
|
17509
17553
|
});
|
|
17510
|
-
var holeProps =
|
|
17554
|
+
var holeProps = z72.union([
|
|
17511
17555
|
circleHoleProps,
|
|
17512
17556
|
pillHoleProps,
|
|
17513
17557
|
ovalHoleProps,
|
|
@@ -17516,7 +17560,7 @@ var holeProps = z71.union([
|
|
|
17516
17560
|
expectTypesMatch(true);
|
|
17517
17561
|
|
|
17518
17562
|
// lib/components/antenna.ts
|
|
17519
|
-
import { z as
|
|
17563
|
+
import { z as z73 } from "zod";
|
|
17520
17564
|
var antennaShapes = [
|
|
17521
17565
|
"2.4ghz_quarter_wave_monopole",
|
|
17522
17566
|
"2.4ghz_meandered_monopole",
|
|
@@ -17524,7 +17568,7 @@ var antennaShapes = [
|
|
|
17524
17568
|
"2.4ghz_meandered_inverted_f",
|
|
17525
17569
|
"2.4ghz_folded_dipole"
|
|
17526
17570
|
];
|
|
17527
|
-
var antennaShape =
|
|
17571
|
+
var antennaShape = z73.enum(antennaShapes);
|
|
17528
17572
|
var antennaFrequencyBands = [
|
|
17529
17573
|
"2.4ghz",
|
|
17530
17574
|
"5ghz",
|
|
@@ -17532,7 +17576,7 @@ var antennaFrequencyBands = [
|
|
|
17532
17576
|
"dual_band_2.4ghz_5ghz",
|
|
17533
17577
|
"tri_band_2.4ghz_5ghz_6ghz"
|
|
17534
17578
|
];
|
|
17535
|
-
var antennaFrequencyBand =
|
|
17579
|
+
var antennaFrequencyBand = z73.enum(antennaFrequencyBands);
|
|
17536
17580
|
var antennaProps = commonComponentProps.extend({
|
|
17537
17581
|
antennaShape: antennaShape.optional(),
|
|
17538
17582
|
frequencyBand: antennaFrequencyBand.optional(),
|
|
@@ -17542,36 +17586,36 @@ expectTypesMatch(true);
|
|
|
17542
17586
|
|
|
17543
17587
|
// lib/components/trace.ts
|
|
17544
17588
|
import { distance as distance19, route_hint_point as route_hint_point2 } from "circuit-json";
|
|
17545
|
-
import { z as
|
|
17546
|
-
var portRef =
|
|
17547
|
-
|
|
17548
|
-
|
|
17589
|
+
import { z as z74 } from "zod";
|
|
17590
|
+
var portRef = z74.union([
|
|
17591
|
+
z74.string(),
|
|
17592
|
+
z74.custom(
|
|
17549
17593
|
(v) => typeof v === "object" && v !== null && "getPortSelector" in v && typeof v.getPortSelector === "function"
|
|
17550
17594
|
)
|
|
17551
17595
|
]);
|
|
17552
|
-
var baseTraceProps =
|
|
17553
|
-
key:
|
|
17554
|
-
name:
|
|
17555
|
-
displayName:
|
|
17596
|
+
var baseTraceProps = z74.object({
|
|
17597
|
+
key: z74.string().optional(),
|
|
17598
|
+
name: z74.string().optional(),
|
|
17599
|
+
displayName: z74.string().optional(),
|
|
17556
17600
|
thickness: distance19.optional(),
|
|
17557
17601
|
width: distance19.optional().describe("Alias for trace thickness"),
|
|
17558
|
-
schematicRouteHints:
|
|
17559
|
-
pcbRouteHints:
|
|
17560
|
-
pcbPathRelativeTo:
|
|
17602
|
+
schematicRouteHints: z74.array(point).optional(),
|
|
17603
|
+
pcbRouteHints: z74.array(route_hint_point2).optional(),
|
|
17604
|
+
pcbPathRelativeTo: z74.string().optional(),
|
|
17561
17605
|
pcbPath: pcbPath.optional(),
|
|
17562
|
-
pcbPaths:
|
|
17563
|
-
routingPhaseIndex:
|
|
17564
|
-
pcbStraightLine:
|
|
17565
|
-
schDisplayLabel:
|
|
17566
|
-
schStroke:
|
|
17567
|
-
highlightColor:
|
|
17606
|
+
pcbPaths: z74.array(pcbPath).optional(),
|
|
17607
|
+
routingPhaseIndex: z74.number().nullable().optional(),
|
|
17608
|
+
pcbStraightLine: z74.boolean().optional().describe("Draw a straight pcb trace between the connected points"),
|
|
17609
|
+
schDisplayLabel: z74.string().optional(),
|
|
17610
|
+
schStroke: z74.string().optional(),
|
|
17611
|
+
highlightColor: z74.string().optional(),
|
|
17568
17612
|
maxLength: distance19.optional(),
|
|
17569
|
-
maxViaCount:
|
|
17570
|
-
connectsTo:
|
|
17613
|
+
maxViaCount: z74.number().int().nonnegative().optional().describe("Maximum number of vias allowed in the PCB trace route"),
|
|
17614
|
+
connectsTo: z74.string().or(z74.array(z74.string())).optional()
|
|
17571
17615
|
});
|
|
17572
|
-
var traceProps =
|
|
17616
|
+
var traceProps = z74.union([
|
|
17573
17617
|
baseTraceProps.extend({
|
|
17574
|
-
path:
|
|
17618
|
+
path: z74.array(portRef)
|
|
17575
17619
|
}),
|
|
17576
17620
|
baseTraceProps.extend({
|
|
17577
17621
|
from: portRef,
|
|
@@ -17586,43 +17630,43 @@ var traceProps = z73.union([
|
|
|
17586
17630
|
// lib/components/bus.ts
|
|
17587
17631
|
import {
|
|
17588
17632
|
distance as distance20,
|
|
17589
|
-
layer_ref as
|
|
17633
|
+
layer_ref as layer_ref7,
|
|
17590
17634
|
resistance as resistance3
|
|
17591
17635
|
} from "circuit-json";
|
|
17592
|
-
import { z as
|
|
17593
|
-
var busProps =
|
|
17594
|
-
name:
|
|
17595
|
-
connections:
|
|
17596
|
-
routingPhaseIndex:
|
|
17597
|
-
maxLengthSkew: distance20.pipe(
|
|
17598
|
-
targetImpedance: resistance3.pipe(
|
|
17599
|
-
pcbTraceWidth: distance20.pipe(
|
|
17600
|
-
pcbAllowedLayers:
|
|
17601
|
-
preferredLayer:
|
|
17602
|
-
preferredLayers:
|
|
17636
|
+
import { z as z75 } from "zod";
|
|
17637
|
+
var busProps = z75.object({
|
|
17638
|
+
name: z75.string().optional(),
|
|
17639
|
+
connections: z75.array(z75.string()).min(1),
|
|
17640
|
+
routingPhaseIndex: z75.number().nullable().optional(),
|
|
17641
|
+
maxLengthSkew: distance20.pipe(z75.number().min(0).finite()).optional(),
|
|
17642
|
+
targetImpedance: resistance3.pipe(z75.number().positive().finite()).optional(),
|
|
17643
|
+
pcbTraceWidth: distance20.pipe(z75.number().positive().finite()).optional(),
|
|
17644
|
+
pcbAllowedLayers: z75.array(layer_ref7).min(1).optional(),
|
|
17645
|
+
preferredLayer: layer_ref7.optional(),
|
|
17646
|
+
preferredLayers: z75.array(layer_ref7).min(1).optional()
|
|
17603
17647
|
});
|
|
17604
17648
|
expectTypesMatch(true);
|
|
17605
17649
|
|
|
17606
17650
|
// lib/components/differentialpair.ts
|
|
17607
17651
|
import { distance as distance21, resistance as resistance4 } from "circuit-json";
|
|
17608
|
-
import { z as
|
|
17609
|
-
var differentialPairProps =
|
|
17610
|
-
name:
|
|
17611
|
-
positiveConnection:
|
|
17612
|
-
negativeConnection:
|
|
17613
|
-
maxLengthSkew: distance21.pipe(
|
|
17614
|
-
targetDifferentialImpedance: resistance4.pipe(
|
|
17615
|
-
pcbTraceGap: distance21.pipe(
|
|
17616
|
-
maxUncoupledLength: distance21.pipe(
|
|
17652
|
+
import { z as z76 } from "zod";
|
|
17653
|
+
var differentialPairProps = z76.object({
|
|
17654
|
+
name: z76.string().optional(),
|
|
17655
|
+
positiveConnection: z76.string(),
|
|
17656
|
+
negativeConnection: z76.string(),
|
|
17657
|
+
maxLengthSkew: distance21.pipe(z76.number().min(0).finite()).optional(),
|
|
17658
|
+
targetDifferentialImpedance: resistance4.pipe(z76.number().positive().finite()).optional(),
|
|
17659
|
+
pcbTraceGap: distance21.pipe(z76.number().positive().finite()).optional(),
|
|
17660
|
+
maxUncoupledLength: distance21.pipe(z76.number().min(0).finite()).optional()
|
|
17617
17661
|
});
|
|
17618
17662
|
expectTypesMatch(true);
|
|
17619
17663
|
|
|
17620
17664
|
// lib/components/footprint.ts
|
|
17621
17665
|
import {
|
|
17622
|
-
layer_ref as
|
|
17666
|
+
layer_ref as layer_ref8
|
|
17623
17667
|
} from "circuit-json";
|
|
17624
|
-
import { z as
|
|
17625
|
-
var footprintInsertionDirection =
|
|
17668
|
+
import { z as z77 } from "zod";
|
|
17669
|
+
var footprintInsertionDirection = z77.enum([
|
|
17626
17670
|
"from_left",
|
|
17627
17671
|
"from_right",
|
|
17628
17672
|
"from_top",
|
|
@@ -17640,11 +17684,11 @@ var footprintInsertionDirection = z76.enum([
|
|
|
17640
17684
|
"from_back"
|
|
17641
17685
|
]);
|
|
17642
17686
|
expectTypesMatch(true);
|
|
17643
|
-
var footprintProps =
|
|
17644
|
-
children:
|
|
17645
|
-
name:
|
|
17646
|
-
originalLayer:
|
|
17647
|
-
circuitJson:
|
|
17687
|
+
var footprintProps = z77.object({
|
|
17688
|
+
children: z77.any().optional(),
|
|
17689
|
+
name: z77.string().optional(),
|
|
17690
|
+
originalLayer: layer_ref8.default("top").optional(),
|
|
17691
|
+
circuitJson: z77.array(z77.any()).optional(),
|
|
17648
17692
|
src: footprintProp.describe("Can be a footprint or kicad string").optional(),
|
|
17649
17693
|
insertionDirection: footprintInsertionDirection.optional().describe(
|
|
17650
17694
|
"Direction a cable or mating part is attached from, named for the side of the footprint it approaches from, in its unrotated orientation."
|
|
@@ -17656,19 +17700,19 @@ var footprintProps = z76.object({
|
|
|
17656
17700
|
expectTypesMatch(true);
|
|
17657
17701
|
|
|
17658
17702
|
// lib/components/symbol.ts
|
|
17659
|
-
import { z as
|
|
17660
|
-
var symbolProps =
|
|
17661
|
-
originalFacingDirection:
|
|
17703
|
+
import { z as z78 } from "zod";
|
|
17704
|
+
var symbolProps = z78.object({
|
|
17705
|
+
originalFacingDirection: z78.enum(["up", "down", "left", "right"]).default("right").optional(),
|
|
17662
17706
|
width: distance.optional(),
|
|
17663
17707
|
height: distance.optional(),
|
|
17664
|
-
name:
|
|
17708
|
+
name: z78.string().optional()
|
|
17665
17709
|
});
|
|
17666
17710
|
expectTypesMatch(true);
|
|
17667
17711
|
|
|
17668
17712
|
// lib/components/battery.ts
|
|
17669
17713
|
import { voltage as voltage2 } from "circuit-json";
|
|
17670
|
-
import { z as
|
|
17671
|
-
var capacity =
|
|
17714
|
+
import { z as z79 } from "zod";
|
|
17715
|
+
var capacity = z79.number().or(z79.string().endsWith("mAh")).transform((v) => {
|
|
17672
17716
|
if (typeof v === "string") {
|
|
17673
17717
|
const valString = v.replace("mAh", "");
|
|
17674
17718
|
const num = Number.parseFloat(valString);
|
|
@@ -17683,14 +17727,14 @@ var batteryPins = lrPolarPins;
|
|
|
17683
17727
|
var batteryProps = commonComponentProps.extend({
|
|
17684
17728
|
capacity: capacity.optional(),
|
|
17685
17729
|
voltage: voltage2.optional(),
|
|
17686
|
-
standard:
|
|
17730
|
+
standard: z79.enum(["AA", "AAA", "9V", "CR2032", "18650", "C"]).optional(),
|
|
17687
17731
|
schOrientation: schematicOrientation.optional(),
|
|
17688
17732
|
connections: createConnectionsProp(batteryPins).optional()
|
|
17689
17733
|
});
|
|
17690
17734
|
expectTypesMatch(true);
|
|
17691
17735
|
|
|
17692
17736
|
// lib/components/mountedboard.ts
|
|
17693
|
-
import { z as
|
|
17737
|
+
import { z as z80 } from "zod";
|
|
17694
17738
|
var mountedboardProps = subcircuitGroupProps.extend({
|
|
17695
17739
|
manufacturerPartNumber: chipProps.shape.manufacturerPartNumber,
|
|
17696
17740
|
pinLabels: chipProps.shape.pinLabels,
|
|
@@ -17702,7 +17746,7 @@ var mountedboardProps = subcircuitGroupProps.extend({
|
|
|
17702
17746
|
internallyConnectedPins: chipProps.shape.internallyConnectedPins,
|
|
17703
17747
|
externallyConnectedPins: chipProps.shape.externallyConnectedPins,
|
|
17704
17748
|
boardToBoardDistance: distance.optional(),
|
|
17705
|
-
mountOrientation:
|
|
17749
|
+
mountOrientation: z80.enum(["faceDown", "faceUp"]).optional()
|
|
17706
17750
|
});
|
|
17707
17751
|
expectTypesMatch(true);
|
|
17708
17752
|
|
|
@@ -17710,40 +17754,40 @@ expectTypesMatch(true);
|
|
|
17710
17754
|
import { distance as distance22 } from "circuit-json";
|
|
17711
17755
|
|
|
17712
17756
|
// lib/common/pcbOrientation.ts
|
|
17713
|
-
import { z as
|
|
17714
|
-
var pcbOrientation =
|
|
17757
|
+
import { z as z81 } from "zod";
|
|
17758
|
+
var pcbOrientation = z81.enum(["vertical", "horizontal"]).describe(
|
|
17715
17759
|
"vertical means pins go 1->2 downward and horizontal means pins go 1->2 rightward"
|
|
17716
17760
|
);
|
|
17717
17761
|
expectTypesMatch(true);
|
|
17718
17762
|
|
|
17719
17763
|
// lib/components/pin-header.ts
|
|
17720
|
-
import { z as
|
|
17764
|
+
import { z as z82 } from "zod";
|
|
17721
17765
|
var pinHeaderProps = commonComponentProps.extend({
|
|
17722
|
-
pinCount:
|
|
17766
|
+
pinCount: z82.number(),
|
|
17723
17767
|
pitch: distance22.optional(),
|
|
17724
|
-
schFacingDirection:
|
|
17725
|
-
gender:
|
|
17726
|
-
showSilkscreenPinLabels:
|
|
17727
|
-
pcbPinLabels:
|
|
17728
|
-
doubleRow:
|
|
17729
|
-
rightAngle:
|
|
17768
|
+
schFacingDirection: z82.enum(["up", "down", "left", "right"]).optional(),
|
|
17769
|
+
gender: z82.enum(["male", "female", "unpopulated"]).optional().default("male"),
|
|
17770
|
+
showSilkscreenPinLabels: z82.boolean().optional(),
|
|
17771
|
+
pcbPinLabels: z82.record(z82.string(), z82.string()).optional(),
|
|
17772
|
+
doubleRow: z82.boolean().optional(),
|
|
17773
|
+
rightAngle: z82.boolean().optional(),
|
|
17730
17774
|
pcbOrientation: pcbOrientation.optional(),
|
|
17731
17775
|
holeDiameter: distance22.optional(),
|
|
17732
17776
|
platedDiameter: distance22.optional(),
|
|
17733
|
-
pinLabels:
|
|
17734
|
-
connections:
|
|
17735
|
-
facingDirection:
|
|
17777
|
+
pinLabels: z82.record(z82.string(), schematicPinLabel).or(z82.array(schematicPinLabel)).optional(),
|
|
17778
|
+
connections: z82.custom().pipe(z82.record(z82.string(), connectionTarget)).optional(),
|
|
17779
|
+
facingDirection: z82.enum(["left", "right"]).optional(),
|
|
17736
17780
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
17737
17781
|
schPinStyle: schematicPinStyle.optional(),
|
|
17738
17782
|
schPinSpacing: distance22.optional(),
|
|
17739
17783
|
schWidth: distance22.optional(),
|
|
17740
17784
|
schHeight: distance22.optional(),
|
|
17741
|
-
connectsFromAbove:
|
|
17742
|
-
connectsFromBelow:
|
|
17785
|
+
connectsFromAbove: z82.boolean().optional(),
|
|
17786
|
+
connectsFromBelow: z82.boolean().optional()
|
|
17743
17787
|
}).superRefine((props, ctx) => {
|
|
17744
17788
|
if (props.connectsFromAbove && props.connectsFromBelow) {
|
|
17745
17789
|
ctx.addIssue({
|
|
17746
|
-
code:
|
|
17790
|
+
code: z82.ZodIssueCode.custom,
|
|
17747
17791
|
message: "connectsFromAbove and connectsFromBelow are opposites; set at most one"
|
|
17748
17792
|
});
|
|
17749
17793
|
}
|
|
@@ -17754,30 +17798,30 @@ var pinHeaderProps = commonComponentProps.extend({
|
|
|
17754
17798
|
expectTypesMatch(true);
|
|
17755
17799
|
|
|
17756
17800
|
// lib/components/netalias.ts
|
|
17757
|
-
import { z as
|
|
17801
|
+
import { z as z83 } from "zod";
|
|
17758
17802
|
import { rotation as rotation3 } from "circuit-json";
|
|
17759
|
-
var netAliasProps =
|
|
17760
|
-
net:
|
|
17761
|
-
connection:
|
|
17803
|
+
var netAliasProps = z83.object({
|
|
17804
|
+
net: z83.string().optional(),
|
|
17805
|
+
connection: z83.string().optional(),
|
|
17762
17806
|
schX: distance.optional(),
|
|
17763
17807
|
schY: distance.optional(),
|
|
17764
17808
|
schRotation: rotation3.optional(),
|
|
17765
|
-
anchorSide:
|
|
17809
|
+
anchorSide: z83.enum(["left", "top", "right", "bottom"]).optional()
|
|
17766
17810
|
});
|
|
17767
17811
|
expectTypesMatch(true);
|
|
17768
17812
|
|
|
17769
17813
|
// lib/components/netlabel.ts
|
|
17770
|
-
import { z as
|
|
17814
|
+
import { z as z84 } from "zod";
|
|
17771
17815
|
import { rotation as rotation4 } from "circuit-json";
|
|
17772
|
-
var netLabelProps =
|
|
17773
|
-
net:
|
|
17774
|
-
connection:
|
|
17775
|
-
connectsTo:
|
|
17776
|
-
inline:
|
|
17816
|
+
var netLabelProps = z84.object({
|
|
17817
|
+
net: z84.string().optional(),
|
|
17818
|
+
connection: z84.string().optional(),
|
|
17819
|
+
connectsTo: z84.string().or(z84.array(z84.string())).optional(),
|
|
17820
|
+
inline: z84.boolean().optional(),
|
|
17777
17821
|
schX: distance.optional(),
|
|
17778
17822
|
schY: distance.optional(),
|
|
17779
17823
|
schRotation: rotation4.optional(),
|
|
17780
|
-
anchorSide:
|
|
17824
|
+
anchorSide: z84.enum(["left", "top", "right", "bottom"]).optional()
|
|
17781
17825
|
});
|
|
17782
17826
|
expectTypesMatch(true);
|
|
17783
17827
|
|
|
@@ -17792,32 +17836,32 @@ expectTypesMatch(true);
|
|
|
17792
17836
|
|
|
17793
17837
|
// lib/components/analogsimulation.ts
|
|
17794
17838
|
import { ms } from "circuit-json";
|
|
17795
|
-
import { z as
|
|
17796
|
-
var spiceEngine =
|
|
17839
|
+
import { z as z86 } from "zod";
|
|
17840
|
+
var spiceEngine = z86.custom(
|
|
17797
17841
|
(value) => typeof value === "string"
|
|
17798
17842
|
);
|
|
17799
|
-
var spiceOptions =
|
|
17800
|
-
method:
|
|
17801
|
-
reltol:
|
|
17802
|
-
abstol:
|
|
17803
|
-
vntol:
|
|
17843
|
+
var spiceOptions = z86.object({
|
|
17844
|
+
method: z86.enum(["trap", "gear"]).optional(),
|
|
17845
|
+
reltol: z86.union([z86.number(), z86.string()]).optional(),
|
|
17846
|
+
abstol: z86.union([z86.number(), z86.string()]).optional(),
|
|
17847
|
+
vntol: z86.union([z86.number(), z86.string()]).optional()
|
|
17804
17848
|
});
|
|
17805
17849
|
var analogAnalysisSimulationBaseProps = {
|
|
17806
|
-
name:
|
|
17850
|
+
name: z86.string().optional(),
|
|
17807
17851
|
spiceEngine: spiceEngine.optional(),
|
|
17808
17852
|
spiceOptions: spiceOptions.optional(),
|
|
17809
|
-
graphIndependentAxes:
|
|
17810
|
-
children:
|
|
17853
|
+
graphIndependentAxes: z86.boolean().optional(),
|
|
17854
|
+
children: z86.custom().optional()
|
|
17811
17855
|
};
|
|
17812
|
-
var analogSimulationProps =
|
|
17813
|
-
name:
|
|
17814
|
-
simulationType:
|
|
17856
|
+
var analogSimulationProps = z86.object({
|
|
17857
|
+
name: z86.string().optional(),
|
|
17858
|
+
simulationType: z86.literal("spice_transient_analysis").default("spice_transient_analysis"),
|
|
17815
17859
|
duration: ms.optional(),
|
|
17816
17860
|
startTime: ms.optional(),
|
|
17817
17861
|
timePerStep: ms.optional(),
|
|
17818
17862
|
spiceEngine: spiceEngine.optional(),
|
|
17819
17863
|
spiceOptions: spiceOptions.optional(),
|
|
17820
|
-
graphIndependentAxes:
|
|
17864
|
+
graphIndependentAxes: z86.boolean().optional()
|
|
17821
17865
|
});
|
|
17822
17866
|
expectTypesMatch(
|
|
17823
17867
|
true
|
|
@@ -17825,12 +17869,12 @@ expectTypesMatch(
|
|
|
17825
17869
|
|
|
17826
17870
|
// lib/components/analogtransientsimulation.ts
|
|
17827
17871
|
import { ms as ms2 } from "circuit-json";
|
|
17828
|
-
import { z as
|
|
17872
|
+
import { z as z87 } from "zod";
|
|
17829
17873
|
var positiveMilliseconds = ms2.refine(
|
|
17830
17874
|
(milliseconds) => milliseconds > 0,
|
|
17831
17875
|
"Time must be positive"
|
|
17832
17876
|
);
|
|
17833
|
-
var analogTransientSimulationProps =
|
|
17877
|
+
var analogTransientSimulationProps = z87.object({
|
|
17834
17878
|
...analogAnalysisSimulationBaseProps,
|
|
17835
17879
|
duration: positiveMilliseconds.default("10ms"),
|
|
17836
17880
|
startTime: ms2.default("0ms"),
|
|
@@ -17838,7 +17882,7 @@ var analogTransientSimulationProps = z86.object({
|
|
|
17838
17882
|
}).superRefine((simulation, context) => {
|
|
17839
17883
|
if (simulation.startTime < 0 || simulation.startTime > simulation.duration) {
|
|
17840
17884
|
context.addIssue({
|
|
17841
|
-
code:
|
|
17885
|
+
code: z87.ZodIssueCode.custom,
|
|
17842
17886
|
path: ["startTime"],
|
|
17843
17887
|
message: "startTime must be between zero and duration"
|
|
17844
17888
|
});
|
|
@@ -17847,19 +17891,19 @@ var analogTransientSimulationProps = z86.object({
|
|
|
17847
17891
|
expectTypesMatch(true);
|
|
17848
17892
|
|
|
17849
17893
|
// lib/components/analogdcoperatingpointsimulation.ts
|
|
17850
|
-
import { z as
|
|
17851
|
-
var analogDcOperatingPointSimulationProps =
|
|
17894
|
+
import { z as z88 } from "zod";
|
|
17895
|
+
var analogDcOperatingPointSimulationProps = z88.object({
|
|
17852
17896
|
...analogAnalysisSimulationBaseProps
|
|
17853
17897
|
});
|
|
17854
17898
|
expectTypesMatch(true);
|
|
17855
17899
|
|
|
17856
17900
|
// lib/components/analogdcsweepsimulation.ts
|
|
17857
17901
|
import { current, voltage as voltage3 } from "circuit-json";
|
|
17858
|
-
import { z as
|
|
17859
|
-
var dcSweepQuantity =
|
|
17860
|
-
var analogDcSweepSimulationProps =
|
|
17902
|
+
import { z as z89 } from "zod";
|
|
17903
|
+
var dcSweepQuantity = z89.union([voltage3, current]);
|
|
17904
|
+
var analogDcSweepSimulationProps = z89.object({
|
|
17861
17905
|
...analogAnalysisSimulationBaseProps,
|
|
17862
|
-
sweepSource:
|
|
17906
|
+
sweepSource: z89.string().min(1),
|
|
17863
17907
|
sweepStart: dcSweepQuantity,
|
|
17864
17908
|
sweepStop: dcSweepQuantity,
|
|
17865
17909
|
sweepStep: dcSweepQuantity.refine(
|
|
@@ -17869,7 +17913,7 @@ var analogDcSweepSimulationProps = z88.object({
|
|
|
17869
17913
|
}).superRefine((simulation, context) => {
|
|
17870
17914
|
if (Math.sign(simulation.sweepStop - simulation.sweepStart) !== Math.sign(simulation.sweepStep)) {
|
|
17871
17915
|
context.addIssue({
|
|
17872
|
-
code:
|
|
17916
|
+
code: z89.ZodIssueCode.custom,
|
|
17873
17917
|
path: ["sweepStep"],
|
|
17874
17918
|
message: "sweepStep must move from sweepStart toward sweepStop"
|
|
17875
17919
|
});
|
|
@@ -17879,10 +17923,10 @@ expectTypesMatch(true);
|
|
|
17879
17923
|
|
|
17880
17924
|
// lib/components/analogacsweepsimulation.ts
|
|
17881
17925
|
import { frequency as frequency3 } from "circuit-json";
|
|
17882
|
-
import { z as
|
|
17883
|
-
var analogAcSweepSimulationProps =
|
|
17926
|
+
import { z as z90 } from "zod";
|
|
17927
|
+
var analogAcSweepSimulationProps = z90.object({
|
|
17884
17928
|
...analogAnalysisSimulationBaseProps,
|
|
17885
|
-
sweepType:
|
|
17929
|
+
sweepType: z90.enum(["linear", "decade", "octave"]),
|
|
17886
17930
|
startFrequency: frequency3.refine(
|
|
17887
17931
|
(startFrequencyHz) => startFrequencyHz > 0,
|
|
17888
17932
|
"startFrequency must be positive"
|
|
@@ -17891,12 +17935,12 @@ var analogAcSweepSimulationProps = z89.object({
|
|
|
17891
17935
|
(stopFrequencyHz) => stopFrequencyHz > 0,
|
|
17892
17936
|
"stopFrequency must be positive"
|
|
17893
17937
|
),
|
|
17894
|
-
samplesPerInterval:
|
|
17895
|
-
sampleCount:
|
|
17938
|
+
samplesPerInterval: z90.number().int().positive().optional(),
|
|
17939
|
+
sampleCount: z90.number().int().positive().optional()
|
|
17896
17940
|
}).superRefine((simulation, context) => {
|
|
17897
17941
|
if (simulation.stopFrequency <= simulation.startFrequency) {
|
|
17898
17942
|
context.addIssue({
|
|
17899
|
-
code:
|
|
17943
|
+
code: z90.ZodIssueCode.custom,
|
|
17900
17944
|
path: ["stopFrequency"],
|
|
17901
17945
|
message: "stopFrequency must be greater than startFrequency"
|
|
17902
17946
|
});
|
|
@@ -17904,14 +17948,14 @@ var analogAcSweepSimulationProps = z89.object({
|
|
|
17904
17948
|
if (simulation.sweepType === "linear") {
|
|
17905
17949
|
if (simulation.sampleCount === void 0) {
|
|
17906
17950
|
context.addIssue({
|
|
17907
|
-
code:
|
|
17951
|
+
code: z90.ZodIssueCode.custom,
|
|
17908
17952
|
path: ["sampleCount"],
|
|
17909
17953
|
message: "sampleCount is required for a linear AC sweep"
|
|
17910
17954
|
});
|
|
17911
17955
|
}
|
|
17912
17956
|
if (simulation.samplesPerInterval !== void 0) {
|
|
17913
17957
|
context.addIssue({
|
|
17914
|
-
code:
|
|
17958
|
+
code: z90.ZodIssueCode.custom,
|
|
17915
17959
|
path: ["samplesPerInterval"],
|
|
17916
17960
|
message: "samplesPerInterval is only valid for decade or octave sweeps"
|
|
17917
17961
|
});
|
|
@@ -17920,14 +17964,14 @@ var analogAcSweepSimulationProps = z89.object({
|
|
|
17920
17964
|
}
|
|
17921
17965
|
if (simulation.samplesPerInterval === void 0) {
|
|
17922
17966
|
context.addIssue({
|
|
17923
|
-
code:
|
|
17967
|
+
code: z90.ZodIssueCode.custom,
|
|
17924
17968
|
path: ["samplesPerInterval"],
|
|
17925
17969
|
message: "samplesPerInterval is required for decade or octave sweeps"
|
|
17926
17970
|
});
|
|
17927
17971
|
}
|
|
17928
17972
|
if (simulation.sampleCount !== void 0) {
|
|
17929
17973
|
context.addIssue({
|
|
17930
|
-
code:
|
|
17974
|
+
code: z90.ZodIssueCode.custom,
|
|
17931
17975
|
path: ["sampleCount"],
|
|
17932
17976
|
message: "sampleCount is only valid for a linear sweep"
|
|
17933
17977
|
});
|
|
@@ -17943,43 +17987,43 @@ import {
|
|
|
17943
17987
|
resistance as resistance5,
|
|
17944
17988
|
voltage as voltage4
|
|
17945
17989
|
} from "circuit-json";
|
|
17946
|
-
import { z as
|
|
17947
|
-
var resistanceSweepQuantity = resistance5.pipe(
|
|
17948
|
-
var capacitanceSweepQuantity = capacitance4.pipe(
|
|
17949
|
-
var inductanceSweepQuantity = inductance.pipe(
|
|
17950
|
-
var voltageSweepQuantity = voltage4.pipe(
|
|
17951
|
-
var currentSweepQuantity = current2.pipe(
|
|
17990
|
+
import { z as z91 } from "zod";
|
|
17991
|
+
var resistanceSweepQuantity = resistance5.pipe(z91.number());
|
|
17992
|
+
var capacitanceSweepQuantity = capacitance4.pipe(z91.number());
|
|
17993
|
+
var inductanceSweepQuantity = inductance.pipe(z91.number());
|
|
17994
|
+
var voltageSweepQuantity = voltage4.pipe(z91.number());
|
|
17995
|
+
var currentSweepQuantity = current2.pipe(z91.number());
|
|
17952
17996
|
var createAnalogSweepCoordinateProps = (sweepQuantity) => ({
|
|
17953
|
-
name:
|
|
17954
|
-
values:
|
|
17997
|
+
name: z91.string().optional(),
|
|
17998
|
+
values: z91.array(sweepQuantity).min(1).optional(),
|
|
17955
17999
|
start: sweepQuantity.optional(),
|
|
17956
18000
|
stop: sweepQuantity.optional(),
|
|
17957
18001
|
step: sweepQuantity.optional()
|
|
17958
18002
|
});
|
|
17959
|
-
var analogResistanceSweepParameterProps =
|
|
18003
|
+
var analogResistanceSweepParameterProps = z91.object({
|
|
17960
18004
|
...createAnalogSweepCoordinateProps(resistanceSweepQuantity),
|
|
17961
|
-
parameterType:
|
|
17962
|
-
resistorRef:
|
|
18005
|
+
parameterType: z91.literal("resistance"),
|
|
18006
|
+
resistorRef: z91.string().min(1)
|
|
17963
18007
|
}).strict();
|
|
17964
|
-
var analogCapacitanceSweepParameterProps =
|
|
18008
|
+
var analogCapacitanceSweepParameterProps = z91.object({
|
|
17965
18009
|
...createAnalogSweepCoordinateProps(capacitanceSweepQuantity),
|
|
17966
|
-
parameterType:
|
|
17967
|
-
capacitorRef:
|
|
18010
|
+
parameterType: z91.literal("capacitance"),
|
|
18011
|
+
capacitorRef: z91.string().min(1)
|
|
17968
18012
|
}).strict();
|
|
17969
|
-
var analogInductanceSweepParameterProps =
|
|
18013
|
+
var analogInductanceSweepParameterProps = z91.object({
|
|
17970
18014
|
...createAnalogSweepCoordinateProps(inductanceSweepQuantity),
|
|
17971
|
-
parameterType:
|
|
17972
|
-
inductorRef:
|
|
18015
|
+
parameterType: z91.literal("inductance"),
|
|
18016
|
+
inductorRef: z91.string().min(1)
|
|
17973
18017
|
}).strict();
|
|
17974
|
-
var analogVoltageSweepParameterProps =
|
|
18018
|
+
var analogVoltageSweepParameterProps = z91.object({
|
|
17975
18019
|
...createAnalogSweepCoordinateProps(voltageSweepQuantity),
|
|
17976
|
-
parameterType:
|
|
17977
|
-
net:
|
|
18020
|
+
parameterType: z91.literal("voltage"),
|
|
18021
|
+
net: z91.string().min(1)
|
|
17978
18022
|
}).strict();
|
|
17979
|
-
var analogCurrentSweepParameterProps =
|
|
18023
|
+
var analogCurrentSweepParameterProps = z91.object({
|
|
17980
18024
|
...createAnalogSweepCoordinateProps(currentSweepQuantity),
|
|
17981
|
-
parameterType:
|
|
17982
|
-
currentSourceRef:
|
|
18025
|
+
parameterType: z91.literal("current"),
|
|
18026
|
+
currentSourceRef: z91.string().min(1)
|
|
17983
18027
|
}).strict();
|
|
17984
18028
|
var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
|
|
17985
18029
|
const hasExplicitSweepCoordinates = sweepCoordinates.values !== void 0;
|
|
@@ -17991,34 +18035,34 @@ var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
|
|
|
17991
18035
|
const hasRangeCoordinates = rangeCoordinateCount > 0;
|
|
17992
18036
|
if (hasExplicitSweepCoordinates === hasRangeCoordinates) {
|
|
17993
18037
|
context.addIssue({
|
|
17994
|
-
code:
|
|
18038
|
+
code: z91.ZodIssueCode.custom,
|
|
17995
18039
|
message: "Provide either values or start/stop/step"
|
|
17996
18040
|
});
|
|
17997
18041
|
return;
|
|
17998
18042
|
}
|
|
17999
18043
|
if (rangeCoordinateCount !== 0 && rangeCoordinateCount !== 3) {
|
|
18000
18044
|
context.addIssue({
|
|
18001
|
-
code:
|
|
18045
|
+
code: z91.ZodIssueCode.custom,
|
|
18002
18046
|
message: "start, stop, and step must be provided together"
|
|
18003
18047
|
});
|
|
18004
18048
|
return;
|
|
18005
18049
|
}
|
|
18006
18050
|
if (sweepCoordinates.step === 0) {
|
|
18007
18051
|
context.addIssue({
|
|
18008
|
-
code:
|
|
18052
|
+
code: z91.ZodIssueCode.custom,
|
|
18009
18053
|
path: ["step"],
|
|
18010
18054
|
message: "step must be nonzero"
|
|
18011
18055
|
});
|
|
18012
18056
|
}
|
|
18013
18057
|
if (sweepCoordinates.start !== void 0 && sweepCoordinates.stop !== void 0 && sweepCoordinates.step !== void 0 && Math.sign(sweepCoordinates.stop - sweepCoordinates.start) !== Math.sign(sweepCoordinates.step)) {
|
|
18014
18058
|
context.addIssue({
|
|
18015
|
-
code:
|
|
18059
|
+
code: z91.ZodIssueCode.custom,
|
|
18016
18060
|
path: ["step"],
|
|
18017
18061
|
message: "step must move from start toward stop"
|
|
18018
18062
|
});
|
|
18019
18063
|
}
|
|
18020
18064
|
};
|
|
18021
|
-
var analogSweepParameterProps =
|
|
18065
|
+
var analogSweepParameterProps = z91.discriminatedUnion("parameterType", [
|
|
18022
18066
|
analogResistanceSweepParameterProps,
|
|
18023
18067
|
analogCapacitanceSweepParameterProps,
|
|
18024
18068
|
analogInductanceSweepParameterProps,
|
|
@@ -18033,23 +18077,23 @@ expectTypesMatch(true);
|
|
|
18033
18077
|
expectTypesMatch(true);
|
|
18034
18078
|
|
|
18035
18079
|
// lib/components/autoroutingphase.ts
|
|
18036
|
-
import { z as
|
|
18037
|
-
var autoroutingPhaseProps =
|
|
18038
|
-
key:
|
|
18039
|
-
name:
|
|
18080
|
+
import { z as z92 } from "zod";
|
|
18081
|
+
var autoroutingPhaseProps = z92.object({
|
|
18082
|
+
key: z92.any().optional(),
|
|
18083
|
+
name: z92.string().optional(),
|
|
18040
18084
|
autorouter: autorouterProp.optional(),
|
|
18041
|
-
phaseIndex:
|
|
18085
|
+
phaseIndex: z92.number().optional(),
|
|
18042
18086
|
...routingTolerances.shape,
|
|
18043
|
-
region:
|
|
18044
|
-
shape:
|
|
18045
|
-
minX:
|
|
18046
|
-
maxX:
|
|
18047
|
-
minY:
|
|
18048
|
-
maxY:
|
|
18087
|
+
region: z92.object({
|
|
18088
|
+
shape: z92.literal("rect").optional(),
|
|
18089
|
+
minX: z92.number(),
|
|
18090
|
+
maxX: z92.number(),
|
|
18091
|
+
minY: z92.number(),
|
|
18092
|
+
maxY: z92.number()
|
|
18049
18093
|
}).optional(),
|
|
18050
|
-
connection:
|
|
18051
|
-
connections:
|
|
18052
|
-
reroute:
|
|
18094
|
+
connection: z92.string().optional(),
|
|
18095
|
+
connections: z92.array(z92.string()).optional(),
|
|
18096
|
+
reroute: z92.boolean().optional(),
|
|
18053
18097
|
...fanoutProps.shape
|
|
18054
18098
|
}).superRefine((value, ctx) => {
|
|
18055
18099
|
const isSimplifyAutorouter = value.autorouter === "simplify" || typeof value.autorouter === "object" && value.autorouter?.preset === "simplify";
|
|
@@ -18060,7 +18104,7 @@ var autoroutingPhaseProps = z91.object({
|
|
|
18060
18104
|
}
|
|
18061
18105
|
if (value.reroute !== void 0 && !(isSimplifyAutorouter && value.reroute === true) && value.region === void 0 && value.connection === void 0 && value.connections === void 0) {
|
|
18062
18106
|
ctx.addIssue({
|
|
18063
|
-
code:
|
|
18107
|
+
code: z92.ZodIssueCode.custom,
|
|
18064
18108
|
message: "region, connection, or connections is required when reroute is provided",
|
|
18065
18109
|
path: ["region"]
|
|
18066
18110
|
});
|
|
@@ -18069,15 +18113,15 @@ var autoroutingPhaseProps = z91.object({
|
|
|
18069
18113
|
expectTypesMatch(true);
|
|
18070
18114
|
|
|
18071
18115
|
// lib/components/spicemodel.ts
|
|
18072
|
-
import { z as
|
|
18073
|
-
var spicemodelProps =
|
|
18074
|
-
source:
|
|
18075
|
-
spicePinMapping:
|
|
18116
|
+
import { z as z93 } from "zod";
|
|
18117
|
+
var spicemodelProps = z93.object({
|
|
18118
|
+
source: z93.string(),
|
|
18119
|
+
spicePinMapping: z93.record(z93.string(), z93.string()).optional()
|
|
18076
18120
|
});
|
|
18077
18121
|
expectTypesMatch(true);
|
|
18078
18122
|
|
|
18079
18123
|
// lib/components/transistor.ts
|
|
18080
|
-
import { z as
|
|
18124
|
+
import { z as z94 } from "zod";
|
|
18081
18125
|
var transistorPinsLabels = [
|
|
18082
18126
|
"pin1",
|
|
18083
18127
|
"pin2",
|
|
@@ -18090,7 +18134,7 @@ var transistorPinsLabels = [
|
|
|
18090
18134
|
"drain"
|
|
18091
18135
|
];
|
|
18092
18136
|
var transistorProps = commonComponentProps.extend({
|
|
18093
|
-
type:
|
|
18137
|
+
type: z94.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
|
|
18094
18138
|
connections: createConnectionsProp(transistorPinsLabels).optional()
|
|
18095
18139
|
});
|
|
18096
18140
|
var transistorPins = [
|
|
@@ -18104,7 +18148,7 @@ var transistorPins = [
|
|
|
18104
18148
|
expectTypesMatch(true);
|
|
18105
18149
|
|
|
18106
18150
|
// lib/components/mosfet.ts
|
|
18107
|
-
import { z as
|
|
18151
|
+
import { z as z95 } from "zod";
|
|
18108
18152
|
var mosfetPins = [
|
|
18109
18153
|
"pin1",
|
|
18110
18154
|
"drain",
|
|
@@ -18114,11 +18158,11 @@ var mosfetPins = [
|
|
|
18114
18158
|
"gate"
|
|
18115
18159
|
];
|
|
18116
18160
|
var mosfetProps = commonComponentProps.extend({
|
|
18117
|
-
channelType:
|
|
18118
|
-
mosfetMode:
|
|
18119
|
-
symbolDrainSide:
|
|
18120
|
-
symbolSourceSide:
|
|
18121
|
-
symbolGateSide:
|
|
18161
|
+
channelType: z95.enum(["n", "p"]),
|
|
18162
|
+
mosfetMode: z95.enum(["enhancement", "depletion"]),
|
|
18163
|
+
symbolDrainSide: z95.enum(["left", "right", "top", "bottom"]).optional(),
|
|
18164
|
+
symbolSourceSide: z95.enum(["left", "right", "top", "bottom"]).optional(),
|
|
18165
|
+
symbolGateSide: z95.enum(["left", "right", "top", "bottom"]).optional(),
|
|
18122
18166
|
connections: createConnectionsProp(mosfetPins).optional()
|
|
18123
18167
|
});
|
|
18124
18168
|
expectTypesMatch(true);
|
|
@@ -18140,29 +18184,29 @@ expectTypesMatch(true);
|
|
|
18140
18184
|
|
|
18141
18185
|
// lib/components/inductor.ts
|
|
18142
18186
|
import { inductance as inductance2 } from "circuit-json";
|
|
18143
|
-
import { z as
|
|
18187
|
+
import { z as z97 } from "zod";
|
|
18144
18188
|
var inductorPins = lrPins;
|
|
18145
18189
|
var inductorProps = commonComponentProps.extend({
|
|
18146
18190
|
inductance: inductance2,
|
|
18147
|
-
maxCurrentRating:
|
|
18191
|
+
maxCurrentRating: z97.union([z97.string(), z97.number()]).optional(),
|
|
18148
18192
|
schOrientation: schematicOrientation.optional(),
|
|
18149
18193
|
connections: createConnectionsProp(inductorPins).optional()
|
|
18150
18194
|
});
|
|
18151
18195
|
expectTypesMatch(true);
|
|
18152
18196
|
|
|
18153
18197
|
// lib/components/internal-circuit.ts
|
|
18154
|
-
import { z as
|
|
18155
|
-
var internalCircuitProps =
|
|
18156
|
-
children:
|
|
18198
|
+
import { z as z98 } from "zod";
|
|
18199
|
+
var internalCircuitProps = z98.object({
|
|
18200
|
+
children: z98.custom().optional()
|
|
18157
18201
|
});
|
|
18158
18202
|
expectTypesMatch(
|
|
18159
18203
|
true
|
|
18160
18204
|
);
|
|
18161
18205
|
|
|
18162
18206
|
// lib/components/diode.ts
|
|
18163
|
-
import { z as
|
|
18207
|
+
import { z as z99 } from "zod";
|
|
18164
18208
|
var diodePins = lrPolarPins;
|
|
18165
|
-
var diodeConnectionKeys =
|
|
18209
|
+
var diodeConnectionKeys = z99.enum([
|
|
18166
18210
|
"anode",
|
|
18167
18211
|
"cathode",
|
|
18168
18212
|
"pin1",
|
|
@@ -18170,13 +18214,13 @@ var diodeConnectionKeys = z98.enum([
|
|
|
18170
18214
|
"pos",
|
|
18171
18215
|
"neg"
|
|
18172
18216
|
]);
|
|
18173
|
-
var connectionTarget3 =
|
|
18174
|
-
var connectionsProp2 =
|
|
18175
|
-
var diodePinLabelsProp =
|
|
18176
|
-
|
|
18177
|
-
schematicPinLabel.or(
|
|
18217
|
+
var connectionTarget3 = z99.string().or(z99.array(z99.string()).readonly()).or(z99.array(z99.string()));
|
|
18218
|
+
var connectionsProp2 = z99.record(diodeConnectionKeys, connectionTarget3);
|
|
18219
|
+
var diodePinLabelsProp = z99.record(
|
|
18220
|
+
z99.enum(diodePins),
|
|
18221
|
+
schematicPinLabel.or(z99.array(schematicPinLabel).readonly()).or(z99.array(schematicPinLabel))
|
|
18178
18222
|
);
|
|
18179
|
-
var diodeVariant =
|
|
18223
|
+
var diodeVariant = z99.enum([
|
|
18180
18224
|
"standard",
|
|
18181
18225
|
"schottky",
|
|
18182
18226
|
"zener",
|
|
@@ -18187,12 +18231,12 @@ var diodeVariant = z98.enum([
|
|
|
18187
18231
|
var diodeProps = commonComponentProps.extend({
|
|
18188
18232
|
connections: connectionsProp2.optional(),
|
|
18189
18233
|
variant: diodeVariant.optional().default("standard"),
|
|
18190
|
-
standard:
|
|
18191
|
-
schottky:
|
|
18192
|
-
zener:
|
|
18193
|
-
avalanche:
|
|
18194
|
-
photo:
|
|
18195
|
-
tvs:
|
|
18234
|
+
standard: z99.boolean().optional(),
|
|
18235
|
+
schottky: z99.boolean().optional(),
|
|
18236
|
+
zener: z99.boolean().optional(),
|
|
18237
|
+
avalanche: z99.boolean().optional(),
|
|
18238
|
+
photo: z99.boolean().optional(),
|
|
18239
|
+
tvs: z99.boolean().optional(),
|
|
18196
18240
|
schOrientation: schematicOrientation.optional(),
|
|
18197
18241
|
pinLabels: diodePinLabelsProp.optional()
|
|
18198
18242
|
}).superRefine((data, ctx) => {
|
|
@@ -18206,11 +18250,11 @@ var diodeProps = commonComponentProps.extend({
|
|
|
18206
18250
|
].filter(Boolean).length;
|
|
18207
18251
|
if (enabledFlags > 1) {
|
|
18208
18252
|
ctx.addIssue({
|
|
18209
|
-
code:
|
|
18253
|
+
code: z99.ZodIssueCode.custom,
|
|
18210
18254
|
message: "Exactly one diode variant must be enabled",
|
|
18211
18255
|
path: []
|
|
18212
18256
|
});
|
|
18213
|
-
return
|
|
18257
|
+
return z99.INVALID;
|
|
18214
18258
|
}
|
|
18215
18259
|
}).transform((data) => {
|
|
18216
18260
|
const result = {
|
|
@@ -18256,44 +18300,44 @@ var diodeProps = commonComponentProps.extend({
|
|
|
18256
18300
|
expectTypesMatch(true);
|
|
18257
18301
|
|
|
18258
18302
|
// lib/components/led.ts
|
|
18259
|
-
import { z as
|
|
18260
|
-
var legacyNumericLedPinLabelsProp =
|
|
18261
|
-
|
|
18262
|
-
schematicPinLabel.or(
|
|
18303
|
+
import { z as z100 } from "zod";
|
|
18304
|
+
var legacyNumericLedPinLabelsProp = z100.record(
|
|
18305
|
+
z100.enum(["1", "2"]),
|
|
18306
|
+
schematicPinLabel.or(z100.array(schematicPinLabel).readonly()).or(z100.array(schematicPinLabel))
|
|
18263
18307
|
).transform((pinLabels) => ({
|
|
18264
18308
|
...pinLabels["1"] === void 0 ? {} : { pin1: pinLabels["1"] },
|
|
18265
18309
|
...pinLabels["2"] === void 0 ? {} : { pin2: pinLabels["2"] }
|
|
18266
18310
|
}));
|
|
18267
18311
|
var ledProps = commonComponentProps.extend({
|
|
18268
|
-
color:
|
|
18269
|
-
wavelength:
|
|
18270
|
-
schDisplayValue:
|
|
18312
|
+
color: z100.string().optional(),
|
|
18313
|
+
wavelength: z100.string().optional(),
|
|
18314
|
+
schDisplayValue: z100.string().optional(),
|
|
18271
18315
|
schOrientation: schematicOrientation.optional(),
|
|
18272
18316
|
// Numeric keys are accepted for compatibility with legacy generated LED
|
|
18273
18317
|
// wrappers, then normalized to the canonical pin1/pin2 representation.
|
|
18274
18318
|
pinLabels: diodePinLabelsProp.or(legacyNumericLedPinLabelsProp).optional(),
|
|
18275
18319
|
connections: createConnectionsProp(lrPolarPins).optional(),
|
|
18276
|
-
laser:
|
|
18320
|
+
laser: z100.boolean().optional()
|
|
18277
18321
|
});
|
|
18278
18322
|
var ledPins = lrPolarPins;
|
|
18279
18323
|
|
|
18280
18324
|
// lib/components/switch.ts
|
|
18281
18325
|
import { ms as ms3, frequency as frequency4 } from "circuit-json";
|
|
18282
|
-
import { z as
|
|
18326
|
+
import { z as z101 } from "zod";
|
|
18283
18327
|
var switchProps = commonComponentProps.extend({
|
|
18284
|
-
type:
|
|
18285
|
-
isNormallyClosed:
|
|
18286
|
-
spst:
|
|
18287
|
-
spdt:
|
|
18288
|
-
dpst:
|
|
18289
|
-
dpdt:
|
|
18328
|
+
type: z101.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
|
|
18329
|
+
isNormallyClosed: z101.boolean().optional().default(false),
|
|
18330
|
+
spst: z101.boolean().optional(),
|
|
18331
|
+
spdt: z101.boolean().optional(),
|
|
18332
|
+
dpst: z101.boolean().optional(),
|
|
18333
|
+
dpdt: z101.boolean().optional(),
|
|
18290
18334
|
pinLabels: pinLabelsProp.optional(),
|
|
18291
18335
|
simSwitchFrequency: frequency4.optional(),
|
|
18292
18336
|
simCloseAt: ms3.optional(),
|
|
18293
18337
|
simOpenAt: ms3.optional(),
|
|
18294
|
-
simStartClosed:
|
|
18295
|
-
simStartOpen:
|
|
18296
|
-
connections:
|
|
18338
|
+
simStartClosed: z101.boolean().optional(),
|
|
18339
|
+
simStartOpen: z101.boolean().optional(),
|
|
18340
|
+
connections: z101.custom().pipe(z101.record(z101.string(), connectionTarget)).optional()
|
|
18297
18341
|
}).transform((props) => {
|
|
18298
18342
|
const updatedProps = { ...props };
|
|
18299
18343
|
if (updatedProps.dpdt) {
|
|
@@ -18325,33 +18369,33 @@ expectTypesMatch(true);
|
|
|
18325
18369
|
|
|
18326
18370
|
// lib/components/fabrication-note-text.ts
|
|
18327
18371
|
import { length as length4 } from "circuit-json";
|
|
18328
|
-
import { z as
|
|
18372
|
+
import { z as z102 } from "zod";
|
|
18329
18373
|
var fabricationNoteTextProps = pcbLayoutProps.extend({
|
|
18330
|
-
text:
|
|
18331
|
-
anchorAlignment:
|
|
18332
|
-
font:
|
|
18374
|
+
text: z102.string(),
|
|
18375
|
+
anchorAlignment: z102.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
18376
|
+
font: z102.enum(["tscircuit2024"]).optional(),
|
|
18333
18377
|
fontSize: length4.optional(),
|
|
18334
|
-
color:
|
|
18378
|
+
color: z102.string().optional()
|
|
18335
18379
|
});
|
|
18336
18380
|
expectTypesMatch(true);
|
|
18337
18381
|
|
|
18338
18382
|
// lib/components/fabrication-note-rect.ts
|
|
18339
18383
|
import { distance as distance23 } from "circuit-json";
|
|
18340
|
-
import { z as
|
|
18384
|
+
import { z as z103 } from "zod";
|
|
18341
18385
|
var fabricationNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18342
18386
|
width: distance23,
|
|
18343
18387
|
height: distance23,
|
|
18344
18388
|
strokeWidth: distance23.optional(),
|
|
18345
|
-
isFilled:
|
|
18346
|
-
hasStroke:
|
|
18347
|
-
isStrokeDashed:
|
|
18348
|
-
color:
|
|
18389
|
+
isFilled: z103.boolean().optional(),
|
|
18390
|
+
hasStroke: z103.boolean().optional(),
|
|
18391
|
+
isStrokeDashed: z103.boolean().optional(),
|
|
18392
|
+
color: z103.string().optional(),
|
|
18349
18393
|
cornerRadius: distance23.optional()
|
|
18350
18394
|
});
|
|
18351
18395
|
|
|
18352
18396
|
// lib/components/fabrication-note-path.ts
|
|
18353
18397
|
import { length as length5, route_hint_point as route_hint_point3 } from "circuit-json";
|
|
18354
|
-
import { z as
|
|
18398
|
+
import { z as z104 } from "zod";
|
|
18355
18399
|
var fabricationNotePathProps = pcbLayoutProps.omit({
|
|
18356
18400
|
pcbLeftEdgeX: true,
|
|
18357
18401
|
pcbRightEdgeX: true,
|
|
@@ -18363,15 +18407,15 @@ var fabricationNotePathProps = pcbLayoutProps.omit({
|
|
|
18363
18407
|
pcbOffsetY: true,
|
|
18364
18408
|
pcbRotation: true
|
|
18365
18409
|
}).extend({
|
|
18366
|
-
route:
|
|
18410
|
+
route: z104.array(route_hint_point3),
|
|
18367
18411
|
strokeWidth: length5.optional(),
|
|
18368
|
-
color:
|
|
18412
|
+
color: z104.string().optional()
|
|
18369
18413
|
});
|
|
18370
18414
|
|
|
18371
18415
|
// lib/components/fabrication-note-dimension.ts
|
|
18372
18416
|
import { distance as distance24, length as length6 } from "circuit-json";
|
|
18373
|
-
import { z as
|
|
18374
|
-
var dimensionTarget =
|
|
18417
|
+
import { z as z105 } from "zod";
|
|
18418
|
+
var dimensionTarget = z105.union([z105.string(), point]);
|
|
18375
18419
|
var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
18376
18420
|
pcbLeftEdgeX: true,
|
|
18377
18421
|
pcbRightEdgeX: true,
|
|
@@ -18385,54 +18429,54 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
18385
18429
|
}).extend({
|
|
18386
18430
|
from: dimensionTarget,
|
|
18387
18431
|
to: dimensionTarget,
|
|
18388
|
-
text:
|
|
18432
|
+
text: z105.string().optional(),
|
|
18389
18433
|
offset: distance24.optional(),
|
|
18390
|
-
font:
|
|
18434
|
+
font: z105.enum(["tscircuit2024"]).optional(),
|
|
18391
18435
|
fontSize: length6.optional(),
|
|
18392
|
-
color:
|
|
18436
|
+
color: z105.string().optional(),
|
|
18393
18437
|
arrowSize: distance24.optional(),
|
|
18394
|
-
units:
|
|
18395
|
-
outerEdgeToEdge:
|
|
18396
|
-
centerToCenter:
|
|
18397
|
-
innerEdgeToEdge:
|
|
18438
|
+
units: z105.enum(["in", "mm"]).optional(),
|
|
18439
|
+
outerEdgeToEdge: z105.literal(true).optional(),
|
|
18440
|
+
centerToCenter: z105.literal(true).optional(),
|
|
18441
|
+
innerEdgeToEdge: z105.literal(true).optional()
|
|
18398
18442
|
});
|
|
18399
18443
|
expectTypesMatch(true);
|
|
18400
18444
|
|
|
18401
18445
|
// lib/components/pcb-trace.ts
|
|
18402
18446
|
import { distance as distance25, route_hint_point as route_hint_point4 } from "circuit-json";
|
|
18403
|
-
import { z as
|
|
18404
|
-
var pcbTraceProps =
|
|
18405
|
-
layer:
|
|
18447
|
+
import { z as z106 } from "zod";
|
|
18448
|
+
var pcbTraceProps = z106.object({
|
|
18449
|
+
layer: z106.string().optional(),
|
|
18406
18450
|
thickness: distance25.optional(),
|
|
18407
|
-
route:
|
|
18451
|
+
route: z106.array(route_hint_point4)
|
|
18408
18452
|
});
|
|
18409
18453
|
|
|
18410
18454
|
// lib/components/via.ts
|
|
18411
|
-
import { distance as distance26, layer_ref as
|
|
18412
|
-
import { z as
|
|
18455
|
+
import { distance as distance26, layer_ref as layer_ref9 } from "circuit-json";
|
|
18456
|
+
import { z as z107 } from "zod";
|
|
18413
18457
|
var viaProps = commonLayoutProps.extend({
|
|
18414
|
-
name:
|
|
18415
|
-
fromLayer:
|
|
18416
|
-
toLayer:
|
|
18458
|
+
name: z107.string().optional(),
|
|
18459
|
+
fromLayer: layer_ref9.optional(),
|
|
18460
|
+
toLayer: layer_ref9.optional(),
|
|
18417
18461
|
holeDiameter: distance26.optional(),
|
|
18418
18462
|
outerDiameter: distance26.optional(),
|
|
18419
|
-
layers:
|
|
18420
|
-
connectsTo:
|
|
18421
|
-
netIsAssignable:
|
|
18463
|
+
layers: z107.array(layer_ref9).optional(),
|
|
18464
|
+
connectsTo: z107.string().or(z107.array(z107.string())).optional(),
|
|
18465
|
+
netIsAssignable: z107.boolean().optional()
|
|
18422
18466
|
});
|
|
18423
18467
|
expectTypesMatch(true);
|
|
18424
18468
|
|
|
18425
18469
|
// lib/components/testpoint.ts
|
|
18426
18470
|
import { distance as distance27 } from "circuit-json";
|
|
18427
|
-
import { z as
|
|
18471
|
+
import { z as z108 } from "zod";
|
|
18428
18472
|
var testpointPins = ["pin1"];
|
|
18429
|
-
var testpointConnectionsProp =
|
|
18473
|
+
var testpointConnectionsProp = z108.object({
|
|
18430
18474
|
pin1: connectionTarget
|
|
18431
18475
|
}).strict();
|
|
18432
18476
|
var testpointProps = commonComponentProps.extend({
|
|
18433
18477
|
connections: testpointConnectionsProp.optional(),
|
|
18434
|
-
footprintVariant:
|
|
18435
|
-
padShape:
|
|
18478
|
+
footprintVariant: z108.enum(["pad", "through_hole"]).optional(),
|
|
18479
|
+
padShape: z108.enum(["rect", "circle"]).optional().default("circle"),
|
|
18436
18480
|
padDiameter: distance27.optional(),
|
|
18437
18481
|
holeDiameter: distance27.optional(),
|
|
18438
18482
|
width: distance27.optional(),
|
|
@@ -18444,30 +18488,30 @@ var testpointProps = commonComponentProps.extend({
|
|
|
18444
18488
|
expectTypesMatch(true);
|
|
18445
18489
|
|
|
18446
18490
|
// lib/components/breakoutpoint.ts
|
|
18447
|
-
import { z as
|
|
18491
|
+
import { z as z109 } from "zod";
|
|
18448
18492
|
var breakoutPointProps = pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
18449
|
-
connection:
|
|
18493
|
+
connection: z109.string()
|
|
18450
18494
|
});
|
|
18451
18495
|
expectTypesMatch(true);
|
|
18452
18496
|
|
|
18453
18497
|
// lib/components/pcb-keepout.ts
|
|
18454
|
-
import { distance as distance28, layer_ref as
|
|
18455
|
-
import { z as
|
|
18456
|
-
var pcbKeepoutProps =
|
|
18498
|
+
import { distance as distance28, layer_ref as layer_ref10 } from "circuit-json";
|
|
18499
|
+
import { z as z110 } from "zod";
|
|
18500
|
+
var pcbKeepoutProps = z110.union([
|
|
18457
18501
|
pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18458
|
-
shape:
|
|
18502
|
+
shape: z110.literal("circle"),
|
|
18459
18503
|
radius: distance28,
|
|
18460
|
-
layers:
|
|
18461
|
-
excludeRefs:
|
|
18504
|
+
layers: z110.array(layer_ref10).optional(),
|
|
18505
|
+
excludeRefs: z110.array(z110.string()).optional().describe(
|
|
18462
18506
|
'Component selectors excluded from the keepout, such as ".ANT1"'
|
|
18463
18507
|
)
|
|
18464
18508
|
}),
|
|
18465
18509
|
pcbLayoutProps.extend({
|
|
18466
|
-
shape:
|
|
18510
|
+
shape: z110.literal("rect"),
|
|
18467
18511
|
width: distance28,
|
|
18468
18512
|
height: distance28,
|
|
18469
|
-
layers:
|
|
18470
|
-
excludeRefs:
|
|
18513
|
+
layers: z110.array(layer_ref10).optional(),
|
|
18514
|
+
excludeRefs: z110.array(z110.string()).optional().describe(
|
|
18471
18515
|
'Component selectors excluded from the keepout, such as ".ANT1"'
|
|
18472
18516
|
)
|
|
18473
18517
|
})
|
|
@@ -18475,20 +18519,20 @@ var pcbKeepoutProps = z109.union([
|
|
|
18475
18519
|
|
|
18476
18520
|
// lib/components/courtyard-rect.ts
|
|
18477
18521
|
import { distance as distance29 } from "circuit-json";
|
|
18478
|
-
import { z as
|
|
18522
|
+
import { z as z111 } from "zod";
|
|
18479
18523
|
var courtyardRectProps = pcbLayoutProps.extend({
|
|
18480
18524
|
width: distance29,
|
|
18481
18525
|
height: distance29,
|
|
18482
18526
|
strokeWidth: distance29.optional(),
|
|
18483
|
-
isFilled:
|
|
18484
|
-
hasStroke:
|
|
18485
|
-
isStrokeDashed:
|
|
18486
|
-
color:
|
|
18527
|
+
isFilled: z111.boolean().optional(),
|
|
18528
|
+
hasStroke: z111.boolean().optional(),
|
|
18529
|
+
isStrokeDashed: z111.boolean().optional(),
|
|
18530
|
+
color: z111.string().optional()
|
|
18487
18531
|
});
|
|
18488
18532
|
|
|
18489
18533
|
// lib/components/courtyard-outline.ts
|
|
18490
18534
|
import { length as length7 } from "circuit-json";
|
|
18491
|
-
import { z as
|
|
18535
|
+
import { z as z112 } from "zod";
|
|
18492
18536
|
var courtyardOutlineProps = pcbLayoutProps.omit({
|
|
18493
18537
|
pcbLeftEdgeX: true,
|
|
18494
18538
|
pcbRightEdgeX: true,
|
|
@@ -18500,11 +18544,11 @@ var courtyardOutlineProps = pcbLayoutProps.omit({
|
|
|
18500
18544
|
pcbOffsetY: true,
|
|
18501
18545
|
pcbRotation: true
|
|
18502
18546
|
}).extend({
|
|
18503
|
-
outline:
|
|
18547
|
+
outline: z112.array(point),
|
|
18504
18548
|
strokeWidth: length7.optional(),
|
|
18505
|
-
isClosed:
|
|
18506
|
-
isStrokeDashed:
|
|
18507
|
-
color:
|
|
18549
|
+
isClosed: z112.boolean().optional(),
|
|
18550
|
+
isStrokeDashed: z112.boolean().optional(),
|
|
18551
|
+
color: z112.string().optional()
|
|
18508
18552
|
});
|
|
18509
18553
|
|
|
18510
18554
|
// lib/components/courtyard-circle.ts
|
|
@@ -18524,13 +18568,13 @@ var courtyardPillProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
18524
18568
|
});
|
|
18525
18569
|
|
|
18526
18570
|
// lib/components/copper-pour.ts
|
|
18527
|
-
import { z as
|
|
18528
|
-
import { layer_ref as
|
|
18529
|
-
var copperPourProps =
|
|
18530
|
-
name:
|
|
18531
|
-
layer:
|
|
18532
|
-
connectsTo:
|
|
18533
|
-
unbroken:
|
|
18571
|
+
import { z as z115 } from "zod";
|
|
18572
|
+
import { layer_ref as layer_ref11 } from "circuit-json";
|
|
18573
|
+
var copperPourProps = z115.object({
|
|
18574
|
+
name: z115.string().optional(),
|
|
18575
|
+
layer: layer_ref11,
|
|
18576
|
+
connectsTo: z115.string(),
|
|
18577
|
+
unbroken: z115.boolean().optional().describe(
|
|
18534
18578
|
"Reserves the pour region during autorouting so unrelated traces do not split it. Vias may still cross the region using antipads."
|
|
18535
18579
|
),
|
|
18536
18580
|
padMargin: distance.optional(),
|
|
@@ -18538,24 +18582,24 @@ var copperPourProps = z114.object({
|
|
|
18538
18582
|
clearance: distance.optional(),
|
|
18539
18583
|
boardEdgeMargin: distance.optional(),
|
|
18540
18584
|
cutoutMargin: distance.optional(),
|
|
18541
|
-
useThermalReliefs:
|
|
18542
|
-
outline:
|
|
18543
|
-
coveredWithSolderMask:
|
|
18585
|
+
useThermalReliefs: z115.boolean().optional(),
|
|
18586
|
+
outline: z115.array(point).optional(),
|
|
18587
|
+
coveredWithSolderMask: z115.boolean().optional().default(true)
|
|
18544
18588
|
});
|
|
18545
18589
|
expectTypesMatch(true);
|
|
18546
18590
|
|
|
18547
18591
|
// lib/components/cadassembly.ts
|
|
18548
|
-
import { layer_ref as
|
|
18549
|
-
import { z as
|
|
18550
|
-
var cadassemblyProps =
|
|
18551
|
-
originalLayer:
|
|
18552
|
-
children:
|
|
18592
|
+
import { layer_ref as layer_ref12 } from "circuit-json";
|
|
18593
|
+
import { z as z116 } from "zod";
|
|
18594
|
+
var cadassemblyProps = z116.object({
|
|
18595
|
+
originalLayer: layer_ref12.default("top").optional(),
|
|
18596
|
+
children: z116.any().optional()
|
|
18553
18597
|
});
|
|
18554
18598
|
expectTypesMatch(true);
|
|
18555
18599
|
|
|
18556
18600
|
// lib/components/cadmodel.ts
|
|
18557
|
-
import { z as
|
|
18558
|
-
var pcbPosition =
|
|
18601
|
+
import { z as z117 } from "zod";
|
|
18602
|
+
var pcbPosition = z117.object({
|
|
18559
18603
|
pcbX: pcbCoordinate.optional(),
|
|
18560
18604
|
pcbY: pcbCoordinate.optional(),
|
|
18561
18605
|
pcbLeftEdgeX: pcbCoordinate.optional(),
|
|
@@ -18572,7 +18616,7 @@ var cadModelBaseWithUrl = cadModelBase.extend({
|
|
|
18572
18616
|
});
|
|
18573
18617
|
var cadModelObject = cadModelBaseWithUrl.merge(pcbPosition);
|
|
18574
18618
|
expectTypesMatch(true);
|
|
18575
|
-
var cadmodelProps =
|
|
18619
|
+
var cadmodelProps = z117.union([z117.null(), url, cadModelObject]);
|
|
18576
18620
|
|
|
18577
18621
|
// lib/components/power-source.ts
|
|
18578
18622
|
import { voltage as voltage5 } from "circuit-json";
|
|
@@ -18582,9 +18626,9 @@ var powerSourceProps = commonComponentProps.extend({
|
|
|
18582
18626
|
|
|
18583
18627
|
// lib/components/voltagesource.ts
|
|
18584
18628
|
import { frequency as frequency5, ms as ms4, rotation as rotation5, voltage as voltage6 } from "circuit-json";
|
|
18585
|
-
import { z as
|
|
18629
|
+
import { z as z118 } from "zod";
|
|
18586
18630
|
var voltageSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
18587
|
-
var percentage =
|
|
18631
|
+
var percentage = z118.union([z118.string(), z118.number()]).transform((val) => {
|
|
18588
18632
|
if (typeof val === "string") {
|
|
18589
18633
|
if (val.endsWith("%")) {
|
|
18590
18634
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -18593,13 +18637,13 @@ var percentage = z117.union([z117.string(), z117.number()]).transform((val) => {
|
|
|
18593
18637
|
}
|
|
18594
18638
|
return val;
|
|
18595
18639
|
}).pipe(
|
|
18596
|
-
|
|
18640
|
+
z118.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
18597
18641
|
);
|
|
18598
18642
|
var voltageSourceProps = commonComponentProps.extend({
|
|
18599
18643
|
voltage: voltage6.optional(),
|
|
18600
18644
|
frequency: frequency5.optional(),
|
|
18601
18645
|
peakToPeakVoltage: voltage6.optional(),
|
|
18602
|
-
waveShape:
|
|
18646
|
+
waveShape: z118.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
18603
18647
|
phase: rotation5.optional(),
|
|
18604
18648
|
dutyCycle: percentage.optional(),
|
|
18605
18649
|
pulseDelay: ms4.optional(),
|
|
@@ -18616,9 +18660,9 @@ expectTypesMatch(true);
|
|
|
18616
18660
|
|
|
18617
18661
|
// lib/components/currentsource.ts
|
|
18618
18662
|
import { frequency as frequency6, rotation as rotation6, current as current3 } from "circuit-json";
|
|
18619
|
-
import { z as
|
|
18663
|
+
import { z as z119 } from "zod";
|
|
18620
18664
|
var currentSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
18621
|
-
var percentage2 =
|
|
18665
|
+
var percentage2 = z119.union([z119.string(), z119.number()]).transform((val) => {
|
|
18622
18666
|
if (typeof val === "string") {
|
|
18623
18667
|
if (val.endsWith("%")) {
|
|
18624
18668
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -18627,13 +18671,13 @@ var percentage2 = z118.union([z118.string(), z118.number()]).transform((val) =>
|
|
|
18627
18671
|
}
|
|
18628
18672
|
return val;
|
|
18629
18673
|
}).pipe(
|
|
18630
|
-
|
|
18674
|
+
z119.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
18631
18675
|
);
|
|
18632
18676
|
var currentSourceProps = commonComponentProps.extend({
|
|
18633
18677
|
current: current3.optional(),
|
|
18634
18678
|
frequency: frequency6.optional(),
|
|
18635
18679
|
peakToPeakCurrent: current3.optional(),
|
|
18636
|
-
waveShape:
|
|
18680
|
+
waveShape: z119.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
18637
18681
|
phase: rotation6.optional(),
|
|
18638
18682
|
dutyCycle: percentage2.optional(),
|
|
18639
18683
|
acMagnitude: current3.optional(),
|
|
@@ -18644,21 +18688,21 @@ var currentSourcePins = lrPolarPins;
|
|
|
18644
18688
|
expectTypesMatch(true);
|
|
18645
18689
|
|
|
18646
18690
|
// lib/components/voltageprobe.ts
|
|
18647
|
-
import { z as
|
|
18691
|
+
import { z as z120 } from "zod";
|
|
18648
18692
|
var voltageProbeProps = commonComponentProps.omit({ name: true }).extend({
|
|
18649
|
-
name:
|
|
18650
|
-
connectsTo:
|
|
18651
|
-
referenceTo:
|
|
18652
|
-
color:
|
|
18653
|
-
graphDisplayName:
|
|
18654
|
-
graphCenter:
|
|
18655
|
-
graphVerticalOffset:
|
|
18656
|
-
graphVoltagePerDiv:
|
|
18693
|
+
name: z120.string().optional(),
|
|
18694
|
+
connectsTo: z120.string(),
|
|
18695
|
+
referenceTo: z120.string().optional(),
|
|
18696
|
+
color: z120.string().optional(),
|
|
18697
|
+
graphDisplayName: z120.string().optional(),
|
|
18698
|
+
graphCenter: z120.number().optional(),
|
|
18699
|
+
graphVerticalOffset: z120.number().or(z120.string()).optional(),
|
|
18700
|
+
graphVoltagePerDiv: z120.number().or(z120.string()).optional()
|
|
18657
18701
|
});
|
|
18658
18702
|
expectTypesMatch(true);
|
|
18659
18703
|
|
|
18660
18704
|
// lib/components/ammeter.ts
|
|
18661
|
-
import { z as
|
|
18705
|
+
import { z as z121 } from "zod";
|
|
18662
18706
|
var ammeterPinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
18663
18707
|
var hasAmmeterConnectionPair = (connections) => {
|
|
18664
18708
|
return connections.pos !== void 0 && connections.neg !== void 0 || connections.pin1 !== void 0 && connections.pin2 !== void 0;
|
|
@@ -18668,64 +18712,64 @@ var ammeterProps = commonComponentProps.extend({
|
|
|
18668
18712
|
hasAmmeterConnectionPair,
|
|
18669
18713
|
"Ammeter connections must include either pos/neg or pin1/pin2"
|
|
18670
18714
|
),
|
|
18671
|
-
color:
|
|
18672
|
-
graphDisplayName:
|
|
18673
|
-
graphCenter:
|
|
18674
|
-
graphVerticalOffset:
|
|
18675
|
-
graphCurrentPerDiv:
|
|
18715
|
+
color: z121.string().optional(),
|
|
18716
|
+
graphDisplayName: z121.string().optional(),
|
|
18717
|
+
graphCenter: z121.number().optional(),
|
|
18718
|
+
graphVerticalOffset: z121.number().or(z121.string()).optional(),
|
|
18719
|
+
graphCurrentPerDiv: z121.number().or(z121.string()).optional()
|
|
18676
18720
|
});
|
|
18677
18721
|
var ammeterPins = ammeterPinLabels;
|
|
18678
18722
|
expectTypesMatch(true);
|
|
18679
18723
|
|
|
18680
18724
|
// lib/components/schematic-arc.ts
|
|
18681
18725
|
import { distance as distance32, point as point5, rotation as rotation7 } from "circuit-json";
|
|
18682
|
-
import { z as
|
|
18683
|
-
var schematicArcProps =
|
|
18726
|
+
import { z as z122 } from "zod";
|
|
18727
|
+
var schematicArcProps = z122.object({
|
|
18684
18728
|
center: point5,
|
|
18685
18729
|
radius: distance32,
|
|
18686
18730
|
startAngleDegrees: rotation7,
|
|
18687
18731
|
endAngleDegrees: rotation7,
|
|
18688
|
-
direction:
|
|
18732
|
+
direction: z122.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
18689
18733
|
strokeWidth: distance32.optional(),
|
|
18690
|
-
color:
|
|
18691
|
-
isDashed:
|
|
18734
|
+
color: z122.string().optional(),
|
|
18735
|
+
isDashed: z122.boolean().optional().default(false)
|
|
18692
18736
|
});
|
|
18693
18737
|
expectTypesMatch(true);
|
|
18694
18738
|
|
|
18695
18739
|
// lib/components/toolingrail.ts
|
|
18696
|
-
import { z as
|
|
18697
|
-
var toolingrailProps =
|
|
18698
|
-
children:
|
|
18740
|
+
import { z as z123 } from "zod";
|
|
18741
|
+
var toolingrailProps = z123.object({
|
|
18742
|
+
children: z123.any().optional()
|
|
18699
18743
|
});
|
|
18700
18744
|
expectTypesMatch(true);
|
|
18701
18745
|
|
|
18702
18746
|
// lib/components/schematic-box.ts
|
|
18703
18747
|
import { distance as distance33 } from "circuit-json";
|
|
18704
|
-
import { z as
|
|
18705
|
-
var schematicBoxProps =
|
|
18706
|
-
name:
|
|
18707
|
-
chipRef:
|
|
18748
|
+
import { z as z124 } from "zod";
|
|
18749
|
+
var schematicBoxProps = z124.object({
|
|
18750
|
+
name: z124.string().optional(),
|
|
18751
|
+
chipRef: z124.string().optional(),
|
|
18708
18752
|
pinLabels: pinLabelsProp.optional(),
|
|
18709
18753
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
18710
18754
|
schPinStyle: schematicPinStyle.optional(),
|
|
18711
18755
|
schX: distance33.optional(),
|
|
18712
18756
|
schY: distance33.optional(),
|
|
18713
|
-
schSectionName:
|
|
18714
|
-
schSheetName:
|
|
18757
|
+
schSectionName: z124.string().optional(),
|
|
18758
|
+
schSheetName: z124.string().optional(),
|
|
18715
18759
|
width: distance33.optional(),
|
|
18716
18760
|
height: distance33.optional(),
|
|
18717
|
-
overlay:
|
|
18761
|
+
overlay: z124.array(z124.string()).optional(),
|
|
18718
18762
|
padding: distance33.optional(),
|
|
18719
18763
|
paddingLeft: distance33.optional(),
|
|
18720
18764
|
paddingRight: distance33.optional(),
|
|
18721
18765
|
paddingTop: distance33.optional(),
|
|
18722
18766
|
paddingBottom: distance33.optional(),
|
|
18723
|
-
title:
|
|
18767
|
+
title: z124.string().optional(),
|
|
18724
18768
|
titleAlignment: ninePointAnchor.default("top_left"),
|
|
18725
|
-
titleColor:
|
|
18769
|
+
titleColor: z124.string().optional(),
|
|
18726
18770
|
titleFontSize: distance33.optional(),
|
|
18727
|
-
titleInside:
|
|
18728
|
-
strokeStyle:
|
|
18771
|
+
titleInside: z124.boolean().default(false),
|
|
18772
|
+
strokeStyle: z124.enum(["solid", "dashed"]).default("solid")
|
|
18729
18773
|
}).refine(
|
|
18730
18774
|
(elm) => elm.width !== void 0 && elm.height !== void 0 || Array.isArray(elm.overlay) && elm.overlay.length > 0,
|
|
18731
18775
|
{
|
|
@@ -18741,21 +18785,21 @@ expectTypesMatch(true);
|
|
|
18741
18785
|
|
|
18742
18786
|
// lib/components/schematic-symbol.ts
|
|
18743
18787
|
import { rotation as rotation8 } from "circuit-json";
|
|
18744
|
-
import { z as
|
|
18745
|
-
var schematicSymbolConnections =
|
|
18788
|
+
import { z as z125 } from "zod";
|
|
18789
|
+
var schematicSymbolConnections = z125.custom().pipe(z125.record(z125.string(), connectionTarget)).refine((value) => Object.keys(value).length > 0, {
|
|
18746
18790
|
message: "connections must map at least one schematic symbol port"
|
|
18747
18791
|
});
|
|
18748
|
-
var schematicSymbolProps =
|
|
18749
|
-
name:
|
|
18750
|
-
displayName:
|
|
18751
|
-
chipRef:
|
|
18752
|
-
symbolName:
|
|
18792
|
+
var schematicSymbolProps = z125.object({
|
|
18793
|
+
name: z125.string().min(1),
|
|
18794
|
+
displayName: z125.string().optional(),
|
|
18795
|
+
chipRef: z125.string().min(1).optional(),
|
|
18796
|
+
symbolName: z125.string().min(1),
|
|
18753
18797
|
connections: schematicSymbolConnections.optional(),
|
|
18754
18798
|
schX: distance.optional(),
|
|
18755
18799
|
schY: distance.optional(),
|
|
18756
18800
|
schRotation: rotation8.optional(),
|
|
18757
|
-
schSectionName:
|
|
18758
|
-
schSheetName:
|
|
18801
|
+
schSectionName: z125.string().optional(),
|
|
18802
|
+
schSheetName: z125.string().optional()
|
|
18759
18803
|
});
|
|
18760
18804
|
expectTypesMatch(
|
|
18761
18805
|
true
|
|
@@ -18763,15 +18807,15 @@ expectTypesMatch(
|
|
|
18763
18807
|
|
|
18764
18808
|
// lib/components/schematic-circle.ts
|
|
18765
18809
|
import { distance as distance34, point as point6 } from "circuit-json";
|
|
18766
|
-
import { z as
|
|
18767
|
-
var schematicCircleProps =
|
|
18810
|
+
import { z as z126 } from "zod";
|
|
18811
|
+
var schematicCircleProps = z126.object({
|
|
18768
18812
|
center: point6,
|
|
18769
18813
|
radius: distance34,
|
|
18770
18814
|
strokeWidth: distance34.optional(),
|
|
18771
|
-
color:
|
|
18772
|
-
isFilled:
|
|
18773
|
-
fillColor:
|
|
18774
|
-
isDashed:
|
|
18815
|
+
color: z126.string().optional(),
|
|
18816
|
+
isFilled: z126.boolean().optional().default(false),
|
|
18817
|
+
fillColor: z126.string().optional(),
|
|
18818
|
+
isDashed: z126.boolean().optional().default(false)
|
|
18775
18819
|
});
|
|
18776
18820
|
expectTypesMatch(
|
|
18777
18821
|
true
|
|
@@ -18779,32 +18823,32 @@ expectTypesMatch(
|
|
|
18779
18823
|
|
|
18780
18824
|
// lib/components/schematic-rect.ts
|
|
18781
18825
|
import { distance as distance35, rotation as rotation9 } from "circuit-json";
|
|
18782
|
-
import { z as
|
|
18783
|
-
var schematicRectProps =
|
|
18826
|
+
import { z as z127 } from "zod";
|
|
18827
|
+
var schematicRectProps = z127.object({
|
|
18784
18828
|
schX: distance35.optional(),
|
|
18785
18829
|
schY: distance35.optional(),
|
|
18786
18830
|
width: distance35,
|
|
18787
18831
|
height: distance35,
|
|
18788
18832
|
rotation: rotation9.default(0),
|
|
18789
18833
|
strokeWidth: distance35.optional(),
|
|
18790
|
-
color:
|
|
18791
|
-
isFilled:
|
|
18792
|
-
fillColor:
|
|
18793
|
-
isDashed:
|
|
18834
|
+
color: z127.string().optional(),
|
|
18835
|
+
isFilled: z127.boolean().optional().default(false),
|
|
18836
|
+
fillColor: z127.string().optional(),
|
|
18837
|
+
isDashed: z127.boolean().optional().default(false)
|
|
18794
18838
|
});
|
|
18795
18839
|
expectTypesMatch(true);
|
|
18796
18840
|
|
|
18797
18841
|
// lib/components/schematic-line.ts
|
|
18798
18842
|
import { distance as distance36 } from "circuit-json";
|
|
18799
|
-
import { z as
|
|
18800
|
-
var schematicLineProps =
|
|
18843
|
+
import { z as z128 } from "zod";
|
|
18844
|
+
var schematicLineProps = z128.object({
|
|
18801
18845
|
x1: distance36,
|
|
18802
18846
|
y1: distance36,
|
|
18803
18847
|
x2: distance36,
|
|
18804
18848
|
y2: distance36,
|
|
18805
18849
|
strokeWidth: distance36.optional(),
|
|
18806
|
-
color:
|
|
18807
|
-
isDashed:
|
|
18850
|
+
color: z128.string().optional(),
|
|
18851
|
+
isDashed: z128.boolean().optional().default(false),
|
|
18808
18852
|
dashLength: distance36.optional(),
|
|
18809
18853
|
dashGap: distance36.optional()
|
|
18810
18854
|
});
|
|
@@ -18812,11 +18856,11 @@ expectTypesMatch(true);
|
|
|
18812
18856
|
|
|
18813
18857
|
// lib/components/schematic-text.ts
|
|
18814
18858
|
import { distance as distance37, rotation as rotation10 } from "circuit-json";
|
|
18815
|
-
import { z as
|
|
18859
|
+
import { z as z130 } from "zod";
|
|
18816
18860
|
|
|
18817
18861
|
// lib/common/fivePointAnchor.ts
|
|
18818
|
-
import { z as
|
|
18819
|
-
var fivePointAnchor =
|
|
18862
|
+
import { z as z129 } from "zod";
|
|
18863
|
+
var fivePointAnchor = z129.enum([
|
|
18820
18864
|
"center",
|
|
18821
18865
|
"left",
|
|
18822
18866
|
"right",
|
|
@@ -18825,39 +18869,39 @@ var fivePointAnchor = z128.enum([
|
|
|
18825
18869
|
]);
|
|
18826
18870
|
|
|
18827
18871
|
// lib/components/schematic-text.ts
|
|
18828
|
-
var schematicTextProps =
|
|
18872
|
+
var schematicTextProps = z130.object({
|
|
18829
18873
|
schX: distance37.optional(),
|
|
18830
18874
|
schY: distance37.optional(),
|
|
18831
|
-
text:
|
|
18832
|
-
fontSize:
|
|
18833
|
-
anchor:
|
|
18834
|
-
color:
|
|
18875
|
+
text: z130.string(),
|
|
18876
|
+
fontSize: z130.number().default(1),
|
|
18877
|
+
anchor: z130.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
18878
|
+
color: z130.string().default("#000000"),
|
|
18835
18879
|
schRotation: rotation10.default(0)
|
|
18836
18880
|
});
|
|
18837
18881
|
expectTypesMatch(true);
|
|
18838
18882
|
|
|
18839
18883
|
// lib/components/schematic-path.ts
|
|
18840
18884
|
import { distance as distance38, point as point7 } from "circuit-json";
|
|
18841
|
-
import { z as
|
|
18842
|
-
var schematicPathProps =
|
|
18843
|
-
points:
|
|
18844
|
-
svgPath:
|
|
18885
|
+
import { z as z131 } from "zod";
|
|
18886
|
+
var schematicPathProps = z131.object({
|
|
18887
|
+
points: z131.array(point7).optional(),
|
|
18888
|
+
svgPath: z131.string().optional(),
|
|
18845
18889
|
strokeWidth: distance38.optional(),
|
|
18846
|
-
strokeColor:
|
|
18890
|
+
strokeColor: z131.string().optional(),
|
|
18847
18891
|
dashLength: distance38.optional(),
|
|
18848
18892
|
dashGap: distance38.optional(),
|
|
18849
|
-
isFilled:
|
|
18850
|
-
fillColor:
|
|
18893
|
+
isFilled: z131.boolean().optional().default(false),
|
|
18894
|
+
fillColor: z131.string().optional()
|
|
18851
18895
|
});
|
|
18852
18896
|
expectTypesMatch(true);
|
|
18853
18897
|
|
|
18854
18898
|
// lib/components/schematic-table.ts
|
|
18855
18899
|
import { distance as distance39 } from "circuit-json";
|
|
18856
|
-
import { z as
|
|
18857
|
-
var schematicTableProps =
|
|
18900
|
+
import { z as z132 } from "zod";
|
|
18901
|
+
var schematicTableProps = z132.object({
|
|
18858
18902
|
schX: distance39.optional(),
|
|
18859
18903
|
schY: distance39.optional(),
|
|
18860
|
-
children:
|
|
18904
|
+
children: z132.any().optional(),
|
|
18861
18905
|
cellPadding: distance39.optional(),
|
|
18862
18906
|
borderWidth: distance39.optional(),
|
|
18863
18907
|
anchor: ninePointAnchor.optional(),
|
|
@@ -18867,34 +18911,34 @@ expectTypesMatch(true);
|
|
|
18867
18911
|
|
|
18868
18912
|
// lib/components/schematic-row.ts
|
|
18869
18913
|
import { distance as distance40 } from "circuit-json";
|
|
18870
|
-
import { z as
|
|
18871
|
-
var schematicRowProps =
|
|
18872
|
-
children:
|
|
18914
|
+
import { z as z133 } from "zod";
|
|
18915
|
+
var schematicRowProps = z133.object({
|
|
18916
|
+
children: z133.any().optional(),
|
|
18873
18917
|
height: distance40.optional()
|
|
18874
18918
|
});
|
|
18875
18919
|
expectTypesMatch(true);
|
|
18876
18920
|
|
|
18877
18921
|
// lib/components/schematic-cell.ts
|
|
18878
18922
|
import { distance as distance41 } from "circuit-json";
|
|
18879
|
-
import { z as
|
|
18880
|
-
var schematicCellProps =
|
|
18881
|
-
children:
|
|
18882
|
-
horizontalAlign:
|
|
18883
|
-
verticalAlign:
|
|
18923
|
+
import { z as z134 } from "zod";
|
|
18924
|
+
var schematicCellProps = z134.object({
|
|
18925
|
+
children: z134.string().optional(),
|
|
18926
|
+
horizontalAlign: z134.enum(["left", "center", "right"]).optional(),
|
|
18927
|
+
verticalAlign: z134.enum(["top", "middle", "bottom"]).optional(),
|
|
18884
18928
|
fontSize: distance41.optional(),
|
|
18885
|
-
rowSpan:
|
|
18886
|
-
colSpan:
|
|
18929
|
+
rowSpan: z134.number().optional(),
|
|
18930
|
+
colSpan: z134.number().optional(),
|
|
18887
18931
|
width: distance41.optional(),
|
|
18888
|
-
text:
|
|
18932
|
+
text: z134.string().optional()
|
|
18889
18933
|
});
|
|
18890
18934
|
expectTypesMatch(true);
|
|
18891
18935
|
|
|
18892
18936
|
// lib/components/schematic-section.ts
|
|
18893
18937
|
import { distance as distance42 } from "circuit-json";
|
|
18894
|
-
import { z as
|
|
18895
|
-
var schematicSectionProps =
|
|
18896
|
-
displayName:
|
|
18897
|
-
name:
|
|
18938
|
+
import { z as z135 } from "zod";
|
|
18939
|
+
var schematicSectionProps = z135.object({
|
|
18940
|
+
displayName: z135.string().optional(),
|
|
18941
|
+
name: z135.string(),
|
|
18898
18942
|
sectionTitleFontSize: distance42.optional()
|
|
18899
18943
|
});
|
|
18900
18944
|
expectTypesMatch(
|
|
@@ -18902,38 +18946,38 @@ expectTypesMatch(
|
|
|
18902
18946
|
);
|
|
18903
18947
|
|
|
18904
18948
|
// lib/components/schematic-sheet.ts
|
|
18905
|
-
import { z as
|
|
18949
|
+
import { z as z136 } from "zod";
|
|
18906
18950
|
import { distance as distance43 } from "circuit-json";
|
|
18907
|
-
var schematicSheetProps =
|
|
18908
|
-
name:
|
|
18909
|
-
displayName:
|
|
18910
|
-
sheetIndex:
|
|
18911
|
-
sheetSize:
|
|
18912
|
-
sheetWidth: distance43.pipe(
|
|
18913
|
-
sheetHeight: distance43.pipe(
|
|
18914
|
-
children:
|
|
18951
|
+
var schematicSheetProps = z136.object({
|
|
18952
|
+
name: z136.string().optional(),
|
|
18953
|
+
displayName: z136.string().optional(),
|
|
18954
|
+
sheetIndex: z136.number().optional(),
|
|
18955
|
+
sheetSize: z136.enum(["A4", "ANSI_B"]).default("A4"),
|
|
18956
|
+
sheetWidth: distance43.pipe(z136.number().positive()).optional(),
|
|
18957
|
+
sheetHeight: distance43.pipe(z136.number().positive()).optional(),
|
|
18958
|
+
children: z136.any().optional()
|
|
18915
18959
|
});
|
|
18916
18960
|
expectTypesMatch(true);
|
|
18917
18961
|
|
|
18918
18962
|
// lib/components/schematic-graphic.ts
|
|
18919
|
-
import { z as
|
|
18963
|
+
import { z as z137 } from "zod";
|
|
18920
18964
|
var nonemptyUrl = url.refine((value) => value.trim().length > 0, {
|
|
18921
18965
|
message: "imageUrl cannot be empty"
|
|
18922
18966
|
});
|
|
18923
|
-
var
|
|
18967
|
+
var positiveDistance3 = (fieldName) => distance.refine((value) => Number.isFinite(value) && value > 0, {
|
|
18924
18968
|
message: `${fieldName} must be a positive finite distance`
|
|
18925
18969
|
});
|
|
18926
|
-
var schematicGraphicProps =
|
|
18970
|
+
var schematicGraphicProps = z137.object({
|
|
18927
18971
|
imageUrl: nonemptyUrl.optional(),
|
|
18928
|
-
svgContent:
|
|
18972
|
+
svgContent: z137.string().refine((value) => value.trim().length > 0, {
|
|
18929
18973
|
message: "svgContent cannot be empty"
|
|
18930
18974
|
}).optional(),
|
|
18931
|
-
width:
|
|
18932
|
-
height:
|
|
18975
|
+
width: positiveDistance3("width").optional(),
|
|
18976
|
+
height: positiveDistance3("height").optional()
|
|
18933
18977
|
}).superRefine(({ imageUrl, svgContent }, ctx) => {
|
|
18934
18978
|
if (imageUrl === void 0 && svgContent === void 0) {
|
|
18935
18979
|
ctx.addIssue({
|
|
18936
|
-
code:
|
|
18980
|
+
code: z137.ZodIssueCode.custom,
|
|
18937
18981
|
message: "At least one of imageUrl or svgContent is required"
|
|
18938
18982
|
});
|
|
18939
18983
|
}
|
|
@@ -18943,41 +18987,41 @@ expectTypesMatch(
|
|
|
18943
18987
|
);
|
|
18944
18988
|
|
|
18945
18989
|
// lib/components/copper-text.ts
|
|
18946
|
-
import { layer_ref as
|
|
18947
|
-
import { z as
|
|
18990
|
+
import { layer_ref as layer_ref13, length as length8 } from "circuit-json";
|
|
18991
|
+
import { z as z138 } from "zod";
|
|
18948
18992
|
var copperTextProps = pcbLayoutProps.extend({
|
|
18949
|
-
text:
|
|
18993
|
+
text: z138.string(),
|
|
18950
18994
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
18951
|
-
font:
|
|
18995
|
+
font: z138.enum(["tscircuit2024"]).optional(),
|
|
18952
18996
|
fontSize: length8.optional(),
|
|
18953
|
-
layers:
|
|
18954
|
-
knockout:
|
|
18955
|
-
mirrored:
|
|
18997
|
+
layers: z138.array(layer_ref13).optional(),
|
|
18998
|
+
knockout: z138.boolean().optional(),
|
|
18999
|
+
mirrored: z138.boolean().optional()
|
|
18956
19000
|
});
|
|
18957
19001
|
|
|
18958
19002
|
// lib/components/silkscreen-text.ts
|
|
18959
|
-
import { layer_ref as
|
|
18960
|
-
import { z as
|
|
19003
|
+
import { layer_ref as layer_ref14, length as length9 } from "circuit-json";
|
|
19004
|
+
import { z as z139 } from "zod";
|
|
18961
19005
|
var silkscreenTextProps = pcbLayoutProps.extend({
|
|
18962
|
-
text:
|
|
19006
|
+
text: z139.string(),
|
|
18963
19007
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
18964
|
-
font:
|
|
19008
|
+
font: z139.enum(["tscircuit2024"]).optional(),
|
|
18965
19009
|
fontSize: length9.optional(),
|
|
18966
19010
|
/**
|
|
18967
19011
|
* If true, text will knock out underlying silkscreen
|
|
18968
19012
|
*/
|
|
18969
|
-
isKnockout:
|
|
19013
|
+
isKnockout: z139.boolean().optional(),
|
|
18970
19014
|
knockoutPadding: length9.optional(),
|
|
18971
19015
|
knockoutPaddingLeft: length9.optional(),
|
|
18972
19016
|
knockoutPaddingRight: length9.optional(),
|
|
18973
19017
|
knockoutPaddingTop: length9.optional(),
|
|
18974
19018
|
knockoutPaddingBottom: length9.optional(),
|
|
18975
|
-
layers:
|
|
19019
|
+
layers: z139.array(layer_ref14).optional()
|
|
18976
19020
|
});
|
|
18977
19021
|
|
|
18978
19022
|
// lib/components/silkscreen-path.ts
|
|
18979
19023
|
import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
|
|
18980
|
-
import { z as
|
|
19024
|
+
import { z as z140 } from "zod";
|
|
18981
19025
|
var silkscreenPathProps = pcbLayoutProps.omit({
|
|
18982
19026
|
pcbLeftEdgeX: true,
|
|
18983
19027
|
pcbRightEdgeX: true,
|
|
@@ -18989,7 +19033,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
|
|
|
18989
19033
|
pcbOffsetY: true,
|
|
18990
19034
|
pcbRotation: true
|
|
18991
19035
|
}).extend({
|
|
18992
|
-
route:
|
|
19036
|
+
route: z140.array(route_hint_point5),
|
|
18993
19037
|
strokeWidth: length10.optional()
|
|
18994
19038
|
});
|
|
18995
19039
|
|
|
@@ -19011,10 +19055,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({
|
|
|
19011
19055
|
|
|
19012
19056
|
// lib/components/silkscreen-rect.ts
|
|
19013
19057
|
import { distance as distance45 } from "circuit-json";
|
|
19014
|
-
import { z as
|
|
19058
|
+
import { z as z141 } from "zod";
|
|
19015
19059
|
var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
19016
|
-
filled:
|
|
19017
|
-
stroke:
|
|
19060
|
+
filled: z141.boolean().default(true).optional(),
|
|
19061
|
+
stroke: z141.enum(["dashed", "solid", "none"]).optional(),
|
|
19018
19062
|
strokeWidth: distance45.optional(),
|
|
19019
19063
|
width: distance45,
|
|
19020
19064
|
height: distance45,
|
|
@@ -19023,10 +19067,10 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
19023
19067
|
|
|
19024
19068
|
// lib/components/silkscreen-circle.ts
|
|
19025
19069
|
import { distance as distance46 } from "circuit-json";
|
|
19026
|
-
import { z as
|
|
19070
|
+
import { z as z142 } from "zod";
|
|
19027
19071
|
var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
19028
|
-
isFilled:
|
|
19029
|
-
isOutline:
|
|
19072
|
+
isFilled: z142.boolean().optional(),
|
|
19073
|
+
isOutline: z142.boolean().optional(),
|
|
19030
19074
|
strokeWidth: distance46.optional(),
|
|
19031
19075
|
radius: distance46
|
|
19032
19076
|
});
|
|
@@ -19043,70 +19087,70 @@ var silkscreenGraphicProps = pcbLayoutProps.omit({ layer: true, pcbStyle: true,
|
|
|
19043
19087
|
expectTypesMatch(true);
|
|
19044
19088
|
|
|
19045
19089
|
// lib/components/trace-hint.ts
|
|
19046
|
-
import { distance as distance47, layer_ref as
|
|
19047
|
-
import { z as
|
|
19048
|
-
var routeHintPointProps =
|
|
19090
|
+
import { distance as distance47, layer_ref as layer_ref15, route_hint_point as route_hint_point6 } from "circuit-json";
|
|
19091
|
+
import { z as z144 } from "zod";
|
|
19092
|
+
var routeHintPointProps = z144.object({
|
|
19049
19093
|
x: distance47,
|
|
19050
19094
|
y: distance47,
|
|
19051
|
-
via:
|
|
19052
|
-
toLayer:
|
|
19095
|
+
via: z144.boolean().optional(),
|
|
19096
|
+
toLayer: layer_ref15.optional()
|
|
19053
19097
|
});
|
|
19054
|
-
var traceHintProps =
|
|
19055
|
-
for:
|
|
19098
|
+
var traceHintProps = z144.object({
|
|
19099
|
+
for: z144.string().optional().describe(
|
|
19056
19100
|
"Selector for the port you're targeting, not required if you're inside a trace"
|
|
19057
19101
|
),
|
|
19058
|
-
order:
|
|
19102
|
+
order: z144.number().optional(),
|
|
19059
19103
|
offset: route_hint_point6.or(routeHintPointProps).optional(),
|
|
19060
|
-
offsets:
|
|
19061
|
-
traceWidth:
|
|
19104
|
+
offsets: z144.array(route_hint_point6).or(z144.array(routeHintPointProps)).optional(),
|
|
19105
|
+
traceWidth: z144.number().optional()
|
|
19062
19106
|
});
|
|
19063
19107
|
|
|
19064
19108
|
// lib/components/port.ts
|
|
19065
19109
|
import { distance as distance48 } from "circuit-json";
|
|
19066
|
-
import { z as
|
|
19110
|
+
import { z as z145 } from "zod";
|
|
19067
19111
|
var portProps = commonLayoutProps.extend({
|
|
19068
|
-
name:
|
|
19069
|
-
pinNumber:
|
|
19070
|
-
schStemLength:
|
|
19071
|
-
schPinLabelFontSize:
|
|
19112
|
+
name: z145.string().optional(),
|
|
19113
|
+
pinNumber: z145.number().optional(),
|
|
19114
|
+
schStemLength: z145.number().optional(),
|
|
19115
|
+
schPinLabelFontSize: z145.enum(["default", "sm"]).or(
|
|
19072
19116
|
distance48.refine((value) => Number.isFinite(value) && value > 0, {
|
|
19073
19117
|
message: "Schematic pin-label font size must be positive and finite"
|
|
19074
19118
|
})
|
|
19075
19119
|
).optional(),
|
|
19076
|
-
aliases:
|
|
19077
|
-
layer:
|
|
19078
|
-
layers:
|
|
19079
|
-
schX:
|
|
19080
|
-
schY:
|
|
19120
|
+
aliases: z145.array(z145.string()).optional(),
|
|
19121
|
+
layer: z145.string().optional(),
|
|
19122
|
+
layers: z145.array(z145.string()).optional(),
|
|
19123
|
+
schX: z145.number().optional(),
|
|
19124
|
+
schY: z145.number().optional(),
|
|
19081
19125
|
direction: direction.optional(),
|
|
19082
|
-
connectsTo:
|
|
19126
|
+
connectsTo: z145.string().or(z145.array(z145.string())).optional(),
|
|
19083
19127
|
kicadPinMetadata: kicadPinMetadata.optional(),
|
|
19084
|
-
hasInversionCircle:
|
|
19128
|
+
hasInversionCircle: z145.boolean().optional()
|
|
19085
19129
|
});
|
|
19086
19130
|
|
|
19087
19131
|
// lib/components/pcb-note-text.ts
|
|
19088
19132
|
import { length as length11 } from "circuit-json";
|
|
19089
|
-
import { z as
|
|
19133
|
+
import { z as z146 } from "zod";
|
|
19090
19134
|
var pcbNoteTextProps = pcbLayoutProps.extend({
|
|
19091
|
-
text:
|
|
19092
|
-
anchorAlignment:
|
|
19093
|
-
font:
|
|
19135
|
+
text: z146.string(),
|
|
19136
|
+
anchorAlignment: z146.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
19137
|
+
font: z146.enum(["tscircuit2024"]).optional(),
|
|
19094
19138
|
fontSize: length11.optional(),
|
|
19095
|
-
color:
|
|
19139
|
+
color: z146.string().optional()
|
|
19096
19140
|
});
|
|
19097
19141
|
expectTypesMatch(true);
|
|
19098
19142
|
|
|
19099
19143
|
// lib/components/pcb-note-rect.ts
|
|
19100
19144
|
import { distance as distance49 } from "circuit-json";
|
|
19101
|
-
import { z as
|
|
19145
|
+
import { z as z147 } from "zod";
|
|
19102
19146
|
var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
19103
19147
|
width: distance49,
|
|
19104
19148
|
height: distance49,
|
|
19105
19149
|
strokeWidth: distance49.optional(),
|
|
19106
|
-
isFilled:
|
|
19107
|
-
hasStroke:
|
|
19108
|
-
isStrokeDashed:
|
|
19109
|
-
color:
|
|
19150
|
+
isFilled: z147.boolean().optional(),
|
|
19151
|
+
hasStroke: z147.boolean().optional(),
|
|
19152
|
+
isStrokeDashed: z147.boolean().optional(),
|
|
19153
|
+
color: z147.string().optional(),
|
|
19110
19154
|
cornerRadius: distance49.optional()
|
|
19111
19155
|
});
|
|
19112
19156
|
expectTypesMatch(true);
|
|
@@ -19116,7 +19160,7 @@ import {
|
|
|
19116
19160
|
length as length12,
|
|
19117
19161
|
route_hint_point as route_hint_point7
|
|
19118
19162
|
} from "circuit-json";
|
|
19119
|
-
import { z as
|
|
19163
|
+
import { z as z148 } from "zod";
|
|
19120
19164
|
var pcbNotePathProps = pcbLayoutProps.omit({
|
|
19121
19165
|
pcbLeftEdgeX: true,
|
|
19122
19166
|
pcbRightEdgeX: true,
|
|
@@ -19128,15 +19172,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
|
|
|
19128
19172
|
pcbOffsetY: true,
|
|
19129
19173
|
pcbRotation: true
|
|
19130
19174
|
}).extend({
|
|
19131
|
-
route:
|
|
19175
|
+
route: z148.array(route_hint_point7),
|
|
19132
19176
|
strokeWidth: length12.optional(),
|
|
19133
|
-
color:
|
|
19177
|
+
color: z148.string().optional()
|
|
19134
19178
|
});
|
|
19135
19179
|
expectTypesMatch(true);
|
|
19136
19180
|
|
|
19137
19181
|
// lib/components/pcb-note-line.ts
|
|
19138
19182
|
import { distance as distance50 } from "circuit-json";
|
|
19139
|
-
import { z as
|
|
19183
|
+
import { z as z149 } from "zod";
|
|
19140
19184
|
var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
19141
19185
|
pcbLeftEdgeX: true,
|
|
19142
19186
|
pcbRightEdgeX: true,
|
|
@@ -19153,15 +19197,15 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
|
19153
19197
|
x2: distance50,
|
|
19154
19198
|
y2: distance50,
|
|
19155
19199
|
strokeWidth: distance50.optional(),
|
|
19156
|
-
color:
|
|
19157
|
-
isDashed:
|
|
19200
|
+
color: z149.string().optional(),
|
|
19201
|
+
isDashed: z149.boolean().optional()
|
|
19158
19202
|
});
|
|
19159
19203
|
expectTypesMatch(true);
|
|
19160
19204
|
|
|
19161
19205
|
// lib/components/pcb-note-dimension.ts
|
|
19162
19206
|
import { distance as distance51, length as length13 } from "circuit-json";
|
|
19163
|
-
import { z as
|
|
19164
|
-
var dimensionTarget2 =
|
|
19207
|
+
import { z as z150 } from "zod";
|
|
19208
|
+
var dimensionTarget2 = z150.union([z150.string(), point]);
|
|
19165
19209
|
var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
19166
19210
|
pcbLeftEdgeX: true,
|
|
19167
19211
|
pcbRightEdgeX: true,
|
|
@@ -19175,109 +19219,109 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
19175
19219
|
}).extend({
|
|
19176
19220
|
from: dimensionTarget2,
|
|
19177
19221
|
to: dimensionTarget2,
|
|
19178
|
-
text:
|
|
19222
|
+
text: z150.string().optional(),
|
|
19179
19223
|
offset: distance51.optional(),
|
|
19180
|
-
font:
|
|
19224
|
+
font: z150.enum(["tscircuit2024"]).optional(),
|
|
19181
19225
|
fontSize: length13.optional(),
|
|
19182
|
-
color:
|
|
19226
|
+
color: z150.string().optional(),
|
|
19183
19227
|
arrowSize: distance51.optional(),
|
|
19184
|
-
units:
|
|
19185
|
-
outerEdgeToEdge:
|
|
19186
|
-
centerToCenter:
|
|
19187
|
-
innerEdgeToEdge:
|
|
19228
|
+
units: z150.enum(["in", "mm"]).optional(),
|
|
19229
|
+
outerEdgeToEdge: z150.literal(true).optional(),
|
|
19230
|
+
centerToCenter: z150.literal(true).optional(),
|
|
19231
|
+
innerEdgeToEdge: z150.literal(true).optional()
|
|
19188
19232
|
});
|
|
19189
19233
|
expectTypesMatch(
|
|
19190
19234
|
true
|
|
19191
19235
|
);
|
|
19192
19236
|
|
|
19193
19237
|
// lib/platformConfig.ts
|
|
19194
|
-
import { z as
|
|
19195
|
-
var unvalidatedCircuitJson =
|
|
19196
|
-
var footprintLibraryResult =
|
|
19197
|
-
footprintCircuitJson:
|
|
19238
|
+
import { z as z151 } from "zod";
|
|
19239
|
+
var unvalidatedCircuitJson = z151.array(z151.any()).describe("Circuit JSON");
|
|
19240
|
+
var footprintLibraryResult = z151.object({
|
|
19241
|
+
footprintCircuitJson: z151.array(z151.any()),
|
|
19198
19242
|
cadModel: cadModelProp.optional()
|
|
19199
19243
|
});
|
|
19200
|
-
var pathToCircuitJsonFn =
|
|
19201
|
-
|
|
19202
|
-
|
|
19203
|
-
|
|
19204
|
-
).returns(
|
|
19244
|
+
var pathToCircuitJsonFn = z151.function().args(z151.string()).returns(z151.promise(footprintLibraryResult)).or(
|
|
19245
|
+
z151.function().args(
|
|
19246
|
+
z151.string(),
|
|
19247
|
+
z151.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
|
|
19248
|
+
).returns(z151.promise(footprintLibraryResult))
|
|
19205
19249
|
).describe("A function that takes a path and returns Circuit JSON");
|
|
19206
|
-
var footprintFileParserEntry =
|
|
19207
|
-
loadFromUrl:
|
|
19250
|
+
var footprintFileParserEntry = z151.object({
|
|
19251
|
+
loadFromUrl: z151.function().args(z151.string()).returns(z151.promise(footprintLibraryResult)).describe(
|
|
19208
19252
|
"A function that takes a footprint file URL and returns Circuit JSON"
|
|
19209
19253
|
)
|
|
19210
19254
|
});
|
|
19211
|
-
var spiceEngineSimulationResult =
|
|
19212
|
-
engineVersionString:
|
|
19255
|
+
var spiceEngineSimulationResult = z151.object({
|
|
19256
|
+
engineVersionString: z151.string().optional(),
|
|
19213
19257
|
simulationResultCircuitJson: unvalidatedCircuitJson
|
|
19214
19258
|
});
|
|
19215
|
-
var spiceEngineZod =
|
|
19216
|
-
simulate:
|
|
19259
|
+
var spiceEngineZod = z151.object({
|
|
19260
|
+
simulate: z151.function().args(z151.string()).returns(z151.promise(spiceEngineSimulationResult)).describe(
|
|
19217
19261
|
"A function that takes a SPICE string and returns a simulation result"
|
|
19218
19262
|
)
|
|
19219
19263
|
});
|
|
19220
|
-
var defaultSpiceEngine =
|
|
19264
|
+
var defaultSpiceEngine = z151.custom(
|
|
19221
19265
|
(value) => typeof value === "string"
|
|
19222
19266
|
);
|
|
19223
|
-
var autorouterInstance =
|
|
19224
|
-
run:
|
|
19225
|
-
getOutputSimpleRouteJson:
|
|
19267
|
+
var autorouterInstance = z151.object({
|
|
19268
|
+
run: z151.function().args().returns(z151.promise(z151.unknown())).describe("Run the autorouter"),
|
|
19269
|
+
getOutputSimpleRouteJson: z151.function().args().returns(z151.promise(z151.any())).describe("Get the resulting SimpleRouteJson")
|
|
19226
19270
|
});
|
|
19227
|
-
var autorouterDefinition =
|
|
19228
|
-
createAutorouter:
|
|
19271
|
+
var autorouterDefinition = z151.object({
|
|
19272
|
+
createAutorouter: z151.function().args(z151.any(), z151.any().optional()).returns(z151.union([autorouterInstance, z151.promise(autorouterInstance)])).describe("Create an autorouter instance")
|
|
19229
19273
|
});
|
|
19230
|
-
var platformFetch =
|
|
19231
|
-
var localCacheEngine =
|
|
19274
|
+
var platformFetch = z151.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
|
|
19275
|
+
var localCacheEngine = z151.custom(
|
|
19232
19276
|
(value) => typeof value === "object" && value !== null && "getItem" in value && typeof value.getItem === "function" && "setItem" in value && typeof value.setItem === "function"
|
|
19233
19277
|
);
|
|
19234
|
-
var platformConfig =
|
|
19278
|
+
var platformConfig = z151.object({
|
|
19235
19279
|
partsEngine: partsEngine.optional(),
|
|
19236
19280
|
autorouter: autorouterProp.optional(),
|
|
19237
|
-
autorouterMap:
|
|
19238
|
-
allowLegacyAutorouters:
|
|
19281
|
+
autorouterMap: z151.record(z151.string(), autorouterDefinition).optional(),
|
|
19282
|
+
allowLegacyAutorouters: z151.boolean().optional(),
|
|
19239
19283
|
registryApiUrl: url.optional(),
|
|
19240
19284
|
cloudAutorouterUrl: url.optional(),
|
|
19241
|
-
projectName:
|
|
19285
|
+
projectName: z151.string().optional(),
|
|
19242
19286
|
projectBaseUrl: url.optional(),
|
|
19243
|
-
version:
|
|
19287
|
+
version: z151.string().optional(),
|
|
19244
19288
|
url: url.optional(),
|
|
19245
|
-
printBoardInformationToSilkscreen:
|
|
19246
|
-
includeBoardFiles:
|
|
19289
|
+
printBoardInformationToSilkscreen: z151.boolean().optional(),
|
|
19290
|
+
includeBoardFiles: z151.array(z151.string()).describe(
|
|
19247
19291
|
'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
|
|
19248
19292
|
).optional(),
|
|
19249
|
-
snapshotsDir:
|
|
19293
|
+
snapshotsDir: z151.string().describe(
|
|
19250
19294
|
'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
|
|
19251
19295
|
).optional(),
|
|
19252
19296
|
defaultSpiceEngine: defaultSpiceEngine.optional(),
|
|
19253
|
-
unitPreference:
|
|
19297
|
+
unitPreference: z151.enum(["mm", "in", "mil"]).optional(),
|
|
19254
19298
|
localCacheEngine: localCacheEngine.optional(),
|
|
19255
|
-
useCloudAutorouter:
|
|
19256
|
-
enablePartOrientationAnalysis:
|
|
19257
|
-
pcbPackSolverTimeoutMs:
|
|
19258
|
-
pcbDisabled:
|
|
19259
|
-
routingDisabled:
|
|
19260
|
-
schematicDisabled:
|
|
19261
|
-
partsEngineDisabled:
|
|
19262
|
-
analogSimulationDisabled:
|
|
19263
|
-
drcChecksDisabled:
|
|
19264
|
-
netlistDrcChecksDisabled:
|
|
19265
|
-
routingDrcChecksDisabled:
|
|
19266
|
-
placementDrcChecksDisabled:
|
|
19267
|
-
pinSpecificationDrcChecksDisabled:
|
|
19268
|
-
spiceEngineMap:
|
|
19269
|
-
footprintLibraryMap:
|
|
19270
|
-
|
|
19271
|
-
|
|
19299
|
+
useCloudAutorouter: z151.boolean().optional(),
|
|
19300
|
+
enablePartOrientationAnalysis: z151.boolean().optional(),
|
|
19301
|
+
pcbPackSolverTimeoutMs: z151.number().finite().positive().optional(),
|
|
19302
|
+
pcbDisabled: z151.boolean().optional(),
|
|
19303
|
+
routingDisabled: z151.boolean().optional(),
|
|
19304
|
+
schematicDisabled: z151.boolean().optional(),
|
|
19305
|
+
partsEngineDisabled: z151.boolean().optional(),
|
|
19306
|
+
analogSimulationDisabled: z151.boolean().optional(),
|
|
19307
|
+
drcChecksDisabled: z151.boolean().optional(),
|
|
19308
|
+
netlistDrcChecksDisabled: z151.boolean().optional(),
|
|
19309
|
+
routingDrcChecksDisabled: z151.boolean().optional(),
|
|
19310
|
+
placementDrcChecksDisabled: z151.boolean().optional(),
|
|
19311
|
+
pinSpecificationDrcChecksDisabled: z151.boolean().optional(),
|
|
19312
|
+
spiceEngineMap: z151.record(z151.string(), spiceEngineZod).optional(),
|
|
19313
|
+
footprintLibraryMap: z151.record(
|
|
19314
|
+
z151.string(),
|
|
19315
|
+
z151.union([
|
|
19272
19316
|
pathToCircuitJsonFn,
|
|
19273
|
-
|
|
19274
|
-
|
|
19275
|
-
|
|
19317
|
+
z151.record(
|
|
19318
|
+
z151.string(),
|
|
19319
|
+
z151.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
|
|
19276
19320
|
)
|
|
19277
19321
|
])
|
|
19278
19322
|
).optional(),
|
|
19279
|
-
footprintFileParserMap:
|
|
19280
|
-
resolveProjectStaticFileImportUrl:
|
|
19323
|
+
footprintFileParserMap: z151.record(z151.string(), footprintFileParserEntry).optional(),
|
|
19324
|
+
resolveProjectStaticFileImportUrl: z151.function().args(z151.string()).returns(z151.promise(z151.string())).describe(
|
|
19281
19325
|
"A function that returns a string URL for static files for the project"
|
|
19282
19326
|
).optional(),
|
|
19283
19327
|
platformFetch: platformFetch.optional()
|
|
@@ -19412,6 +19456,7 @@ export {
|
|
|
19412
19456
|
fabricationNoteTextProps,
|
|
19413
19457
|
fanoutBoundaryPadding,
|
|
19414
19458
|
fanoutProps,
|
|
19459
|
+
fanoutTracePath,
|
|
19415
19460
|
fiducialProps,
|
|
19416
19461
|
footprintInsertionDirection,
|
|
19417
19462
|
footprintProp,
|