@tscircuit/props 0.0.600 → 0.0.602
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 +4 -35
- package/dist/index.d.ts +244 -122
- package/dist/index.js +711 -699
- package/dist/index.js.map +1 -1
- package/lib/common/fanoutProps.ts +65 -0
- package/lib/components/autoroutingphase.ts +7 -55
- package/lib/components/breakout.ts +4 -12
- package/lib/components/bus.ts +3 -0
- package/lib/index.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16606,6 +16606,10 @@ import "zod";
|
|
|
16606
16606
|
var subpanelProps = panelProps;
|
|
16607
16607
|
expectTypesMatch(true);
|
|
16608
16608
|
|
|
16609
|
+
// lib/common/fanoutProps.ts
|
|
16610
|
+
import { layer_ref as layer_ref4 } from "circuit-json";
|
|
16611
|
+
import { z as z46 } from "zod";
|
|
16612
|
+
|
|
16609
16613
|
// lib/common/fanoutBoundaryPadding.ts
|
|
16610
16614
|
import { z as z45 } from "zod";
|
|
16611
16615
|
var nonnegativeDistance = distance.refine((value) => value >= 0, {
|
|
@@ -16624,6 +16628,19 @@ expectTypesMatch(
|
|
|
16624
16628
|
true
|
|
16625
16629
|
);
|
|
16626
16630
|
|
|
16631
|
+
// lib/common/fanoutProps.ts
|
|
16632
|
+
var busFanoutDirection = z46.union([
|
|
16633
|
+
ninePointAnchor,
|
|
16634
|
+
z46.object({ direction: ninePointAnchor })
|
|
16635
|
+
]);
|
|
16636
|
+
var fanoutProps = z46.object({
|
|
16637
|
+
busFanoutDirections: z46.record(busFanoutDirection).optional(),
|
|
16638
|
+
fanoutBoundaryPadding: fanoutBoundaryPadding.optional(),
|
|
16639
|
+
fanoutRoutingLayers: z46.array(layer_ref4).min(1).optional(),
|
|
16640
|
+
fanoutPourNetMap: z46.record(layer_ref4, z46.union([z46.string(), z46.array(z46.string()).min(1)])).optional()
|
|
16641
|
+
});
|
|
16642
|
+
expectTypesMatch(true);
|
|
16643
|
+
|
|
16627
16644
|
// lib/components/breakout.ts
|
|
16628
16645
|
import "zod";
|
|
16629
16646
|
var breakoutProps = subcircuitGroupProps.extend({
|
|
@@ -16633,48 +16650,48 @@ var breakoutProps = subcircuitGroupProps.extend({
|
|
|
16633
16650
|
paddingRight: distance.optional(),
|
|
16634
16651
|
paddingTop: distance.optional(),
|
|
16635
16652
|
paddingBottom: distance.optional(),
|
|
16636
|
-
|
|
16653
|
+
...fanoutProps.shape
|
|
16637
16654
|
});
|
|
16638
16655
|
expectTypesMatch(true);
|
|
16639
16656
|
|
|
16640
16657
|
// lib/components/chip.ts
|
|
16641
16658
|
import { distance as distance12, supplier_name as supplier_name2 } from "circuit-json";
|
|
16642
16659
|
import { isValidElement } from "react";
|
|
16643
|
-
import { z as
|
|
16644
|
-
var connectionTarget2 =
|
|
16645
|
-
var noConnectProp =
|
|
16646
|
-
var connectionsProp =
|
|
16647
|
-
var spicemodelElement =
|
|
16660
|
+
import { z as z48 } from "zod";
|
|
16661
|
+
var connectionTarget2 = z48.string().or(z48.array(z48.string()).readonly()).or(z48.array(z48.string()));
|
|
16662
|
+
var noConnectProp = z48.array(schematicPinLabel).readonly().or(z48.array(schematicPinLabel));
|
|
16663
|
+
var connectionsProp = z48.custom().pipe(z48.record(z48.string(), connectionTarget2));
|
|
16664
|
+
var spicemodelElement = z48.custom(
|
|
16648
16665
|
(v) => !!v && typeof v === "object" && "type" in v && "props" in v
|
|
16649
16666
|
);
|
|
16650
|
-
var internalCircuitElement =
|
|
16667
|
+
var internalCircuitElement = z48.custom(
|
|
16651
16668
|
(value) => isValidElement(value) && value.type === "internalcircuit"
|
|
16652
16669
|
);
|
|
16653
|
-
var pinLabelsProp =
|
|
16670
|
+
var pinLabelsProp = z48.record(
|
|
16654
16671
|
schematicPinLabel,
|
|
16655
|
-
schematicPinLabel.or(
|
|
16672
|
+
schematicPinLabel.or(z48.array(schematicPinLabel).readonly()).or(z48.array(schematicPinLabel))
|
|
16656
16673
|
);
|
|
16657
16674
|
expectTypesMatch(true);
|
|
16658
|
-
var pinCompatibleVariant =
|
|
16659
|
-
manufacturerPartNumber:
|
|
16660
|
-
supplierPartNumber:
|
|
16675
|
+
var pinCompatibleVariant = z48.object({
|
|
16676
|
+
manufacturerPartNumber: z48.string().optional(),
|
|
16677
|
+
supplierPartNumber: z48.record(supplier_name2, z48.array(z48.string())).optional()
|
|
16661
16678
|
});
|
|
16662
16679
|
var chipProps = commonComponentProps.extend({
|
|
16663
|
-
manufacturerPartNumber:
|
|
16680
|
+
manufacturerPartNumber: z48.string().optional(),
|
|
16664
16681
|
pinLabels: pinLabelsProp.optional(),
|
|
16665
|
-
showPinAliases:
|
|
16666
|
-
pcbPinLabels:
|
|
16667
|
-
internallyConnectedPins:
|
|
16668
|
-
externallyConnectedPins:
|
|
16682
|
+
showPinAliases: z48.boolean().optional(),
|
|
16683
|
+
pcbPinLabels: z48.record(z48.string(), z48.string()).optional(),
|
|
16684
|
+
internallyConnectedPins: z48.array(z48.array(z48.union([z48.string(), z48.number()]))).optional(),
|
|
16685
|
+
externallyConnectedPins: z48.array(z48.array(z48.string())).optional(),
|
|
16669
16686
|
schPinArrangement: schematicPortArrangement.optional(),
|
|
16670
16687
|
schPortArrangement: schematicPortArrangement.optional(),
|
|
16671
|
-
pinCompatibleVariants:
|
|
16688
|
+
pinCompatibleVariants: z48.array(pinCompatibleVariant).optional(),
|
|
16672
16689
|
schPinStyle: schematicPinStyle.optional(),
|
|
16673
16690
|
schPinSpacing: distance12.optional(),
|
|
16674
16691
|
schWidth: distance12.optional(),
|
|
16675
16692
|
schHeight: distance12.optional(),
|
|
16676
|
-
noSchematicRepresentation:
|
|
16677
|
-
schShowInternalCircuit:
|
|
16693
|
+
noSchematicRepresentation: z48.boolean().optional(),
|
|
16694
|
+
schShowInternalCircuit: z48.boolean().optional().default(false),
|
|
16678
16695
|
noConnect: noConnectProp.optional(),
|
|
16679
16696
|
connections: connectionsProp.optional(),
|
|
16680
16697
|
spiceModel: spicemodelElement.optional(),
|
|
@@ -16689,75 +16706,75 @@ expectTypesMatch(true);
|
|
|
16689
16706
|
|
|
16690
16707
|
// lib/components/jumper.ts
|
|
16691
16708
|
import { distance as distance13 } from "circuit-json";
|
|
16692
|
-
import { z as
|
|
16709
|
+
import { z as z49 } from "zod";
|
|
16693
16710
|
var jumperProps = commonComponentProps.extend({
|
|
16694
|
-
manufacturerPartNumber:
|
|
16695
|
-
pinLabels:
|
|
16696
|
-
|
|
16697
|
-
schematicPinLabel.or(
|
|
16711
|
+
manufacturerPartNumber: z49.string().optional(),
|
|
16712
|
+
pinLabels: z49.record(
|
|
16713
|
+
z49.number().or(schematicPinLabel),
|
|
16714
|
+
schematicPinLabel.or(z49.array(schematicPinLabel))
|
|
16698
16715
|
).optional(),
|
|
16699
16716
|
schPinStyle: schematicPinStyle.optional(),
|
|
16700
16717
|
schPinSpacing: distance13.optional(),
|
|
16701
16718
|
schWidth: distance13.optional(),
|
|
16702
16719
|
schHeight: distance13.optional(),
|
|
16703
|
-
schDirection:
|
|
16720
|
+
schDirection: z49.enum(["left", "right"]).optional(),
|
|
16704
16721
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
16705
16722
|
schPortArrangement: schematicPortArrangement.optional(),
|
|
16706
|
-
pcbPinLabels:
|
|
16707
|
-
pinCount:
|
|
16708
|
-
internallyConnectedPins:
|
|
16709
|
-
connections:
|
|
16723
|
+
pcbPinLabels: z49.record(z49.string(), z49.string()).optional(),
|
|
16724
|
+
pinCount: z49.union([z49.literal(2), z49.literal(3)]).optional(),
|
|
16725
|
+
internallyConnectedPins: z49.array(z49.array(z49.union([z49.string(), z49.number()]))).optional(),
|
|
16726
|
+
connections: z49.custom().pipe(z49.record(z49.string(), connectionTarget)).optional()
|
|
16710
16727
|
});
|
|
16711
16728
|
expectTypesMatch(true);
|
|
16712
16729
|
|
|
16713
16730
|
// lib/components/solderjumper.ts
|
|
16714
|
-
import { z as
|
|
16731
|
+
import { z as z50 } from "zod";
|
|
16715
16732
|
var solderjumperProps = jumperProps.extend({
|
|
16716
|
-
bridgedPins:
|
|
16717
|
-
bridged:
|
|
16733
|
+
bridgedPins: z50.array(z50.array(z50.string())).optional(),
|
|
16734
|
+
bridged: z50.boolean().optional()
|
|
16718
16735
|
});
|
|
16719
16736
|
expectTypesMatch(true);
|
|
16720
16737
|
|
|
16721
16738
|
// lib/components/connector.ts
|
|
16722
|
-
import { z as
|
|
16739
|
+
import { z as z51 } from "zod";
|
|
16723
16740
|
var connectorProps = chipProps.extend({
|
|
16724
|
-
standard:
|
|
16741
|
+
standard: z51.enum(["usb_c", "m2"]).optional()
|
|
16725
16742
|
});
|
|
16726
16743
|
expectTypesMatch(true);
|
|
16727
16744
|
|
|
16728
16745
|
// lib/components/interconnect.ts
|
|
16729
|
-
import { z as
|
|
16746
|
+
import { z as z52 } from "zod";
|
|
16730
16747
|
var interconnectProps = commonComponentProps.extend({
|
|
16731
|
-
standard:
|
|
16732
|
-
pinLabels:
|
|
16733
|
-
|
|
16734
|
-
schematicPinLabel.or(
|
|
16748
|
+
standard: z52.enum(["TSC0001_36P_XALT_2025_11", "0805", "0603", "1206"]).optional(),
|
|
16749
|
+
pinLabels: z52.record(
|
|
16750
|
+
z52.number().or(schematicPinLabel),
|
|
16751
|
+
schematicPinLabel.or(z52.array(schematicPinLabel))
|
|
16735
16752
|
).optional(),
|
|
16736
|
-
internallyConnectedPins:
|
|
16753
|
+
internallyConnectedPins: z52.array(z52.array(z52.union([z52.string(), z52.number()]))).optional()
|
|
16737
16754
|
});
|
|
16738
16755
|
expectTypesMatch(true);
|
|
16739
16756
|
|
|
16740
16757
|
// lib/components/fuse.ts
|
|
16741
|
-
import { z as
|
|
16758
|
+
import { z as z53 } from "zod";
|
|
16742
16759
|
var fusePinLabels = ["pin1", "pin2"];
|
|
16743
16760
|
var fuseProps = commonComponentProps.extend({
|
|
16744
|
-
currentRating:
|
|
16745
|
-
voltageRating:
|
|
16746
|
-
schShowRatings:
|
|
16761
|
+
currentRating: z53.union([z53.number(), z53.string()]),
|
|
16762
|
+
voltageRating: z53.union([z53.number(), z53.string()]).optional(),
|
|
16763
|
+
schShowRatings: z53.boolean().optional(),
|
|
16747
16764
|
schOrientation: schematicOrientation.optional(),
|
|
16748
|
-
connections:
|
|
16749
|
-
|
|
16750
|
-
|
|
16751
|
-
|
|
16752
|
-
|
|
16753
|
-
|
|
16765
|
+
connections: z53.record(
|
|
16766
|
+
z53.string(),
|
|
16767
|
+
z53.union([
|
|
16768
|
+
z53.string(),
|
|
16769
|
+
z53.array(z53.string()).readonly(),
|
|
16770
|
+
z53.array(z53.string())
|
|
16754
16771
|
])
|
|
16755
16772
|
).optional()
|
|
16756
16773
|
});
|
|
16757
16774
|
|
|
16758
16775
|
// lib/components/platedhole.ts
|
|
16759
16776
|
import { distance as distance14 } from "circuit-json";
|
|
16760
|
-
import { z as
|
|
16777
|
+
import { z as z54 } from "zod";
|
|
16761
16778
|
var DEFAULT_PIN_HEADER_HOLE_DIAMETER = "0.04in";
|
|
16762
16779
|
var DEFAULT_PIN_HEADER_OUTER_DIAMETER = "0.1in";
|
|
16763
16780
|
var inferPlatedHoleShapeAndDefaults = (rawProps) => {
|
|
@@ -16789,26 +16806,26 @@ var inferPlatedHoleShapeAndDefaults = (rawProps) => {
|
|
|
16789
16806
|
props.outerDiameter = DEFAULT_PIN_HEADER_OUTER_DIAMETER;
|
|
16790
16807
|
return props;
|
|
16791
16808
|
};
|
|
16792
|
-
var distanceHiddenUndefined =
|
|
16809
|
+
var distanceHiddenUndefined = z54.custom().transform((a) => {
|
|
16793
16810
|
if (a === void 0) return void 0;
|
|
16794
16811
|
return distance14.parse(a);
|
|
16795
16812
|
});
|
|
16796
|
-
var platedHolePropsByShape =
|
|
16813
|
+
var platedHolePropsByShape = z54.discriminatedUnion("shape", [
|
|
16797
16814
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
16798
|
-
name:
|
|
16799
|
-
connectsTo:
|
|
16800
|
-
shape:
|
|
16815
|
+
name: z54.string().optional(),
|
|
16816
|
+
connectsTo: z54.string().or(z54.array(z54.string())).optional(),
|
|
16817
|
+
shape: z54.literal("circle"),
|
|
16801
16818
|
holeDiameter: distance14,
|
|
16802
16819
|
outerDiameter: distance14,
|
|
16803
16820
|
padDiameter: distance14.optional().describe("Diameter of the copper pad"),
|
|
16804
16821
|
portHints: portHints.optional(),
|
|
16805
16822
|
solderMaskMargin: distance14.optional(),
|
|
16806
|
-
coveredWithSolderMask:
|
|
16823
|
+
coveredWithSolderMask: z54.boolean().optional()
|
|
16807
16824
|
}),
|
|
16808
16825
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
16809
|
-
name:
|
|
16810
|
-
connectsTo:
|
|
16811
|
-
shape:
|
|
16826
|
+
name: z54.string().optional(),
|
|
16827
|
+
connectsTo: z54.string().or(z54.array(z54.string())).optional(),
|
|
16828
|
+
shape: z54.literal("oval"),
|
|
16812
16829
|
outerWidth: distance14,
|
|
16813
16830
|
outerHeight: distance14,
|
|
16814
16831
|
holeWidth: distanceHiddenUndefined,
|
|
@@ -16817,13 +16834,13 @@ var platedHolePropsByShape = z53.discriminatedUnion("shape", [
|
|
|
16817
16834
|
innerHeight: distance14.optional().describe("DEPRECATED use holeHeight"),
|
|
16818
16835
|
portHints: portHints.optional(),
|
|
16819
16836
|
solderMaskMargin: distance14.optional(),
|
|
16820
|
-
coveredWithSolderMask:
|
|
16837
|
+
coveredWithSolderMask: z54.boolean().optional()
|
|
16821
16838
|
}),
|
|
16822
16839
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
16823
|
-
name:
|
|
16824
|
-
connectsTo:
|
|
16825
|
-
shape:
|
|
16826
|
-
rectPad:
|
|
16840
|
+
name: z54.string().optional(),
|
|
16841
|
+
connectsTo: z54.string().or(z54.array(z54.string())).optional(),
|
|
16842
|
+
shape: z54.literal("pill"),
|
|
16843
|
+
rectPad: z54.boolean().optional(),
|
|
16827
16844
|
outerWidth: distance14,
|
|
16828
16845
|
outerHeight: distance14,
|
|
16829
16846
|
holeWidth: distanceHiddenUndefined,
|
|
@@ -16834,30 +16851,30 @@ var platedHolePropsByShape = z53.discriminatedUnion("shape", [
|
|
|
16834
16851
|
holeOffsetX: distance14.optional(),
|
|
16835
16852
|
holeOffsetY: distance14.optional(),
|
|
16836
16853
|
solderMaskMargin: distance14.optional(),
|
|
16837
|
-
coveredWithSolderMask:
|
|
16854
|
+
coveredWithSolderMask: z54.boolean().optional()
|
|
16838
16855
|
}),
|
|
16839
16856
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
16840
|
-
name:
|
|
16841
|
-
connectsTo:
|
|
16842
|
-
shape:
|
|
16857
|
+
name: z54.string().optional(),
|
|
16858
|
+
connectsTo: z54.string().or(z54.array(z54.string())).optional(),
|
|
16859
|
+
shape: z54.literal("circular_hole_with_rect_pad"),
|
|
16843
16860
|
holeDiameter: distance14,
|
|
16844
16861
|
rectPadWidth: distance14,
|
|
16845
16862
|
rectPadHeight: distance14,
|
|
16846
16863
|
rectBorderRadius: distance14.optional(),
|
|
16847
|
-
holeShape:
|
|
16848
|
-
padShape:
|
|
16864
|
+
holeShape: z54.literal("circle").optional(),
|
|
16865
|
+
padShape: z54.literal("rect").optional(),
|
|
16849
16866
|
portHints: portHints.optional(),
|
|
16850
16867
|
holeOffsetX: distance14.optional(),
|
|
16851
16868
|
holeOffsetY: distance14.optional(),
|
|
16852
16869
|
solderMaskMargin: distance14.optional(),
|
|
16853
|
-
coveredWithSolderMask:
|
|
16870
|
+
coveredWithSolderMask: z54.boolean().optional()
|
|
16854
16871
|
}),
|
|
16855
16872
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
16856
|
-
name:
|
|
16857
|
-
connectsTo:
|
|
16858
|
-
shape:
|
|
16859
|
-
holeShape:
|
|
16860
|
-
padShape:
|
|
16873
|
+
name: z54.string().optional(),
|
|
16874
|
+
connectsTo: z54.string().or(z54.array(z54.string())).optional(),
|
|
16875
|
+
shape: z54.literal("pill_hole_with_rect_pad"),
|
|
16876
|
+
holeShape: z54.literal("pill").optional(),
|
|
16877
|
+
padShape: z54.literal("rect").optional(),
|
|
16861
16878
|
holeWidth: distance14,
|
|
16862
16879
|
holeHeight: distance14,
|
|
16863
16880
|
rectPadWidth: distance14,
|
|
@@ -16867,22 +16884,22 @@ var platedHolePropsByShape = z53.discriminatedUnion("shape", [
|
|
|
16867
16884
|
holeOffsetX: distance14.optional(),
|
|
16868
16885
|
holeOffsetY: distance14.optional(),
|
|
16869
16886
|
solderMaskMargin: distance14.optional(),
|
|
16870
|
-
coveredWithSolderMask:
|
|
16887
|
+
coveredWithSolderMask: z54.boolean().optional()
|
|
16871
16888
|
}),
|
|
16872
16889
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
16873
|
-
name:
|
|
16874
|
-
connectsTo:
|
|
16875
|
-
shape:
|
|
16876
|
-
holeShape:
|
|
16890
|
+
name: z54.string().optional(),
|
|
16891
|
+
connectsTo: z54.string().or(z54.array(z54.string())).optional(),
|
|
16892
|
+
shape: z54.literal("hole_with_polygon_pad"),
|
|
16893
|
+
holeShape: z54.enum(["circle", "oval", "pill", "rotated_pill"]),
|
|
16877
16894
|
holeDiameter: distance14.optional(),
|
|
16878
16895
|
holeWidth: distance14.optional(),
|
|
16879
16896
|
holeHeight: distance14.optional(),
|
|
16880
|
-
padOutline:
|
|
16897
|
+
padOutline: z54.array(point),
|
|
16881
16898
|
holeOffsetX: distance14,
|
|
16882
16899
|
holeOffsetY: distance14,
|
|
16883
16900
|
portHints: portHints.optional(),
|
|
16884
16901
|
solderMaskMargin: distance14.optional(),
|
|
16885
|
-
coveredWithSolderMask:
|
|
16902
|
+
coveredWithSolderMask: z54.boolean().optional()
|
|
16886
16903
|
})
|
|
16887
16904
|
]).transform((a) => {
|
|
16888
16905
|
if ("innerWidth" in a && a.innerWidth !== void 0) {
|
|
@@ -16893,7 +16910,7 @@ var platedHolePropsByShape = z53.discriminatedUnion("shape", [
|
|
|
16893
16910
|
}
|
|
16894
16911
|
return a;
|
|
16895
16912
|
});
|
|
16896
|
-
var platedHoleProps =
|
|
16913
|
+
var platedHoleProps = z54.preprocess(
|
|
16897
16914
|
inferPlatedHoleShapeAndDefaults,
|
|
16898
16915
|
platedHolePropsByShape
|
|
16899
16916
|
);
|
|
@@ -16901,7 +16918,7 @@ expectTypesMatch(true);
|
|
|
16901
16918
|
|
|
16902
16919
|
// lib/components/resistor.ts
|
|
16903
16920
|
import { resistance } from "circuit-json";
|
|
16904
|
-
import { z as
|
|
16921
|
+
import { z as z55 } from "zod";
|
|
16905
16922
|
var resistorPinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
16906
16923
|
var resistorImperialFootprintNames = /* @__PURE__ */ new Set([
|
|
16907
16924
|
"01005",
|
|
@@ -16925,7 +16942,7 @@ var resistorFootprintProp = footprintProp.optional().transform(mapResistorFootpr
|
|
|
16925
16942
|
var resistorProps = commonComponentProps.extend({
|
|
16926
16943
|
footprint: resistorFootprintProp,
|
|
16927
16944
|
resistance,
|
|
16928
|
-
tolerance:
|
|
16945
|
+
tolerance: z55.union([z55.string(), z55.number()]).transform((val) => {
|
|
16929
16946
|
if (typeof val === "string") {
|
|
16930
16947
|
if (val.endsWith("%")) {
|
|
16931
16948
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -16934,12 +16951,12 @@ var resistorProps = commonComponentProps.extend({
|
|
|
16934
16951
|
}
|
|
16935
16952
|
return val;
|
|
16936
16953
|
}).pipe(
|
|
16937
|
-
|
|
16954
|
+
z55.number().min(0, "Tolerance must be non-negative").max(1, "Tolerance cannot be greater than 100%")
|
|
16938
16955
|
).optional(),
|
|
16939
|
-
pullupFor:
|
|
16940
|
-
pullupTo:
|
|
16941
|
-
pulldownFor:
|
|
16942
|
-
pulldownTo:
|
|
16956
|
+
pullupFor: z55.string().optional(),
|
|
16957
|
+
pullupTo: z55.string().optional(),
|
|
16958
|
+
pulldownFor: z55.string().optional(),
|
|
16959
|
+
pulldownTo: z55.string().optional(),
|
|
16943
16960
|
schOrientation: schematicOrientation.optional(),
|
|
16944
16961
|
schSize: schematicSymbolSize.optional(),
|
|
16945
16962
|
connections: createConnectionsProp(resistorPinLabels).optional()
|
|
@@ -16949,18 +16966,18 @@ expectTypesMatch(true);
|
|
|
16949
16966
|
|
|
16950
16967
|
// lib/components/potentiometer.ts
|
|
16951
16968
|
import { resistance as resistance2 } from "circuit-json";
|
|
16952
|
-
import { z as
|
|
16969
|
+
import { z as z56 } from "zod";
|
|
16953
16970
|
var potentiometerPinLabels = ["pin1", "pin2", "pin3"];
|
|
16954
16971
|
var potentiometerProps = commonComponentProps.extend({
|
|
16955
16972
|
maxResistance: resistance2,
|
|
16956
|
-
pinVariant:
|
|
16973
|
+
pinVariant: z56.enum(["two_pin", "three_pin"]).optional(),
|
|
16957
16974
|
connections: createConnectionsProp(potentiometerPinLabels).optional()
|
|
16958
16975
|
});
|
|
16959
16976
|
expectTypesMatch(true);
|
|
16960
16977
|
|
|
16961
16978
|
// lib/components/crystal.ts
|
|
16962
16979
|
import { capacitance, distance as distance15, frequency } from "circuit-json";
|
|
16963
|
-
import { z as
|
|
16980
|
+
import { z as z57 } from "zod";
|
|
16964
16981
|
var crystalPins = [
|
|
16965
16982
|
"pin1",
|
|
16966
16983
|
"left",
|
|
@@ -16973,9 +16990,9 @@ var crystalProps = commonComponentProps.extend({
|
|
|
16973
16990
|
frequency,
|
|
16974
16991
|
loadCapacitance: capacitance,
|
|
16975
16992
|
maxTraceLength: distance15.optional(),
|
|
16976
|
-
manufacturerPartNumber:
|
|
16977
|
-
mpn:
|
|
16978
|
-
pinVariant:
|
|
16993
|
+
manufacturerPartNumber: z57.string().optional(),
|
|
16994
|
+
mpn: z57.string().optional(),
|
|
16995
|
+
pinVariant: z57.enum(["two_pin", "four_pin"]).optional(),
|
|
16979
16996
|
schOrientation: schematicOrientation.optional(),
|
|
16980
16997
|
connections: createConnectionsProp(crystalPins).optional()
|
|
16981
16998
|
});
|
|
@@ -16983,34 +17000,34 @@ expectTypesMatch(true);
|
|
|
16983
17000
|
|
|
16984
17001
|
// lib/components/resonator.ts
|
|
16985
17002
|
import { frequency as frequency2, capacitance as capacitance2 } from "circuit-json";
|
|
16986
|
-
import { z as
|
|
17003
|
+
import { z as z58 } from "zod";
|
|
16987
17004
|
var resonatorProps = commonComponentProps.extend({
|
|
16988
17005
|
frequency: frequency2,
|
|
16989
17006
|
loadCapacitance: capacitance2,
|
|
16990
|
-
pinVariant:
|
|
17007
|
+
pinVariant: z58.enum(["no_ground", "ground_pin", "two_ground_pins"]).optional()
|
|
16991
17008
|
});
|
|
16992
17009
|
expectTypesMatch(true);
|
|
16993
17010
|
|
|
16994
17011
|
// lib/components/stampboard.ts
|
|
16995
17012
|
import { distance as distance16 } from "circuit-json";
|
|
16996
|
-
import { z as
|
|
17013
|
+
import { z as z59 } from "zod";
|
|
16997
17014
|
var stampboardProps = boardProps.extend({
|
|
16998
|
-
leftPinCount:
|
|
16999
|
-
rightPinCount:
|
|
17000
|
-
topPinCount:
|
|
17001
|
-
bottomPinCount:
|
|
17002
|
-
leftPins:
|
|
17003
|
-
rightPins:
|
|
17004
|
-
topPins:
|
|
17005
|
-
bottomPins:
|
|
17015
|
+
leftPinCount: z59.number().optional(),
|
|
17016
|
+
rightPinCount: z59.number().optional(),
|
|
17017
|
+
topPinCount: z59.number().optional(),
|
|
17018
|
+
bottomPinCount: z59.number().optional(),
|
|
17019
|
+
leftPins: z59.array(z59.string()).optional(),
|
|
17020
|
+
rightPins: z59.array(z59.string()).optional(),
|
|
17021
|
+
topPins: z59.array(z59.string()).optional(),
|
|
17022
|
+
bottomPins: z59.array(z59.string()).optional(),
|
|
17006
17023
|
pinPitch: distance16.optional(),
|
|
17007
|
-
innerHoles:
|
|
17024
|
+
innerHoles: z59.boolean().optional()
|
|
17008
17025
|
});
|
|
17009
17026
|
expectTypesMatch(true);
|
|
17010
17027
|
|
|
17011
17028
|
// lib/components/capacitor.ts
|
|
17012
17029
|
import { capacitance as capacitance3, voltage } from "circuit-json";
|
|
17013
|
-
import { z as
|
|
17030
|
+
import { z as z60 } from "zod";
|
|
17014
17031
|
var capacitorPinLabels = [
|
|
17015
17032
|
"pin1",
|
|
17016
17033
|
"pin2",
|
|
@@ -17022,13 +17039,13 @@ var capacitorPinLabels = [
|
|
|
17022
17039
|
var capacitorProps = commonComponentProps.extend({
|
|
17023
17040
|
capacitance: capacitance3,
|
|
17024
17041
|
maxVoltageRating: voltage.optional(),
|
|
17025
|
-
schShowRatings:
|
|
17026
|
-
polarized:
|
|
17027
|
-
decouplingFor:
|
|
17028
|
-
decouplingTo:
|
|
17029
|
-
bypassFor:
|
|
17030
|
-
bypassTo:
|
|
17031
|
-
maxDecouplingTraceLength:
|
|
17042
|
+
schShowRatings: z60.boolean().optional().default(false),
|
|
17043
|
+
polarized: z60.boolean().optional().default(false),
|
|
17044
|
+
decouplingFor: z60.string().optional(),
|
|
17045
|
+
decouplingTo: z60.string().optional(),
|
|
17046
|
+
bypassFor: z60.string().optional(),
|
|
17047
|
+
bypassTo: z60.string().optional(),
|
|
17048
|
+
maxDecouplingTraceLength: z60.number().optional(),
|
|
17032
17049
|
schOrientation: schematicOrientation.optional(),
|
|
17033
17050
|
schSize: schematicSymbolSize.optional(),
|
|
17034
17051
|
connections: createConnectionsProp(capacitorPinLabels).optional()
|
|
@@ -17038,14 +17055,14 @@ expectTypesMatch(true);
|
|
|
17038
17055
|
|
|
17039
17056
|
// lib/components/net.ts
|
|
17040
17057
|
import { distance as distance17 } from "circuit-json";
|
|
17041
|
-
import { z as
|
|
17042
|
-
var netProps =
|
|
17043
|
-
name:
|
|
17044
|
-
connectsTo:
|
|
17045
|
-
routingPhaseIndex:
|
|
17046
|
-
highlightColor:
|
|
17047
|
-
isPowerNet:
|
|
17048
|
-
isGroundNet:
|
|
17058
|
+
import { z as z61 } from "zod";
|
|
17059
|
+
var netProps = z61.object({
|
|
17060
|
+
name: z61.string(),
|
|
17061
|
+
connectsTo: z61.string().or(z61.array(z61.string())).optional(),
|
|
17062
|
+
routingPhaseIndex: z61.number().nullable().optional(),
|
|
17063
|
+
highlightColor: z61.string().optional(),
|
|
17064
|
+
isPowerNet: z61.boolean().optional(),
|
|
17065
|
+
isGroundNet: z61.boolean().optional(),
|
|
17049
17066
|
nominalTraceWidth: distance17.optional()
|
|
17050
17067
|
});
|
|
17051
17068
|
expectTypesMatch(true);
|
|
@@ -17059,55 +17076,55 @@ var fiducialProps = commonComponentProps.extend({
|
|
|
17059
17076
|
expectTypesMatch(true);
|
|
17060
17077
|
|
|
17061
17078
|
// lib/components/constrainedlayout.ts
|
|
17062
|
-
import { z as
|
|
17063
|
-
var constrainedLayoutProps =
|
|
17064
|
-
name:
|
|
17065
|
-
pcbOnly:
|
|
17066
|
-
schOnly:
|
|
17079
|
+
import { z as z63 } from "zod";
|
|
17080
|
+
var constrainedLayoutProps = z63.object({
|
|
17081
|
+
name: z63.string().optional(),
|
|
17082
|
+
pcbOnly: z63.boolean().optional(),
|
|
17083
|
+
schOnly: z63.boolean().optional()
|
|
17067
17084
|
});
|
|
17068
17085
|
expectTypesMatch(true);
|
|
17069
17086
|
|
|
17070
17087
|
// lib/components/constraint.ts
|
|
17071
|
-
import { z as
|
|
17072
|
-
var pcbXDistConstraintProps =
|
|
17073
|
-
pcb:
|
|
17088
|
+
import { z as z64 } from "zod";
|
|
17089
|
+
var pcbXDistConstraintProps = z64.object({
|
|
17090
|
+
pcb: z64.literal(true).optional(),
|
|
17074
17091
|
xDist: distance,
|
|
17075
|
-
left:
|
|
17076
|
-
right:
|
|
17077
|
-
edgeToEdge:
|
|
17078
|
-
centerToCenter:
|
|
17092
|
+
left: z64.string(),
|
|
17093
|
+
right: z64.string(),
|
|
17094
|
+
edgeToEdge: z64.literal(true).optional(),
|
|
17095
|
+
centerToCenter: z64.literal(true).optional()
|
|
17079
17096
|
});
|
|
17080
17097
|
expectTypesMatch(
|
|
17081
17098
|
true
|
|
17082
17099
|
);
|
|
17083
|
-
var pcbYDistConstraintProps =
|
|
17084
|
-
pcb:
|
|
17100
|
+
var pcbYDistConstraintProps = z64.object({
|
|
17101
|
+
pcb: z64.literal(true).optional(),
|
|
17085
17102
|
yDist: distance,
|
|
17086
|
-
top:
|
|
17087
|
-
bottom:
|
|
17088
|
-
edgeToEdge:
|
|
17089
|
-
centerToCenter:
|
|
17103
|
+
top: z64.string(),
|
|
17104
|
+
bottom: z64.string(),
|
|
17105
|
+
edgeToEdge: z64.literal(true).optional(),
|
|
17106
|
+
centerToCenter: z64.literal(true).optional()
|
|
17090
17107
|
});
|
|
17091
17108
|
expectTypesMatch(
|
|
17092
17109
|
true
|
|
17093
17110
|
);
|
|
17094
|
-
var pcbSameYConstraintProps =
|
|
17095
|
-
pcb:
|
|
17096
|
-
sameY:
|
|
17097
|
-
for:
|
|
17111
|
+
var pcbSameYConstraintProps = z64.object({
|
|
17112
|
+
pcb: z64.literal(true).optional(),
|
|
17113
|
+
sameY: z64.literal(true).optional(),
|
|
17114
|
+
for: z64.array(z64.string())
|
|
17098
17115
|
});
|
|
17099
17116
|
expectTypesMatch(
|
|
17100
17117
|
true
|
|
17101
17118
|
);
|
|
17102
|
-
var pcbSameXConstraintProps =
|
|
17103
|
-
pcb:
|
|
17104
|
-
sameX:
|
|
17105
|
-
for:
|
|
17119
|
+
var pcbSameXConstraintProps = z64.object({
|
|
17120
|
+
pcb: z64.literal(true).optional(),
|
|
17121
|
+
sameX: z64.literal(true).optional(),
|
|
17122
|
+
for: z64.array(z64.string())
|
|
17106
17123
|
});
|
|
17107
17124
|
expectTypesMatch(
|
|
17108
17125
|
true
|
|
17109
17126
|
);
|
|
17110
|
-
var constraintProps =
|
|
17127
|
+
var constraintProps = z64.union([
|
|
17111
17128
|
pcbXDistConstraintProps,
|
|
17112
17129
|
pcbYDistConstraintProps,
|
|
17113
17130
|
pcbSameYConstraintProps,
|
|
@@ -17116,13 +17133,13 @@ var constraintProps = z63.union([
|
|
|
17116
17133
|
expectTypesMatch(true);
|
|
17117
17134
|
|
|
17118
17135
|
// lib/components/cutout.ts
|
|
17119
|
-
import { z as
|
|
17136
|
+
import { z as z65 } from "zod";
|
|
17120
17137
|
var rectCutoutProps = pcbLayoutProps.omit({
|
|
17121
17138
|
layer: true,
|
|
17122
17139
|
pcbRotation: true
|
|
17123
17140
|
}).extend({
|
|
17124
|
-
name:
|
|
17125
|
-
shape:
|
|
17141
|
+
name: z65.string().optional(),
|
|
17142
|
+
shape: z65.literal("rect"),
|
|
17126
17143
|
width: distance,
|
|
17127
17144
|
height: distance
|
|
17128
17145
|
});
|
|
@@ -17131,8 +17148,8 @@ var circleCutoutProps = pcbLayoutProps.omit({
|
|
|
17131
17148
|
layer: true,
|
|
17132
17149
|
pcbRotation: true
|
|
17133
17150
|
}).extend({
|
|
17134
|
-
name:
|
|
17135
|
-
shape:
|
|
17151
|
+
name: z65.string().optional(),
|
|
17152
|
+
shape: z65.literal("circle"),
|
|
17136
17153
|
radius: distance
|
|
17137
17154
|
});
|
|
17138
17155
|
expectTypesMatch(true);
|
|
@@ -17140,36 +17157,36 @@ var polygonCutoutProps = pcbLayoutProps.omit({
|
|
|
17140
17157
|
layer: true,
|
|
17141
17158
|
pcbRotation: true
|
|
17142
17159
|
}).extend({
|
|
17143
|
-
name:
|
|
17144
|
-
shape:
|
|
17145
|
-
points:
|
|
17160
|
+
name: z65.string().optional(),
|
|
17161
|
+
shape: z65.literal("polygon"),
|
|
17162
|
+
points: z65.array(point)
|
|
17146
17163
|
});
|
|
17147
17164
|
expectTypesMatch(true);
|
|
17148
|
-
var cutoutProps =
|
|
17165
|
+
var cutoutProps = z65.discriminatedUnion("shape", [
|
|
17149
17166
|
rectCutoutProps,
|
|
17150
17167
|
circleCutoutProps,
|
|
17151
17168
|
polygonCutoutProps
|
|
17152
17169
|
]);
|
|
17153
17170
|
|
|
17154
17171
|
// lib/components/drc-check.ts
|
|
17155
|
-
import { z as
|
|
17156
|
-
var drcCheckProps =
|
|
17157
|
-
name:
|
|
17172
|
+
import { z as z66 } from "zod";
|
|
17173
|
+
var drcCheckProps = z66.object({
|
|
17174
|
+
name: z66.string().optional(),
|
|
17158
17175
|
checkFn: customDrcCheckFn
|
|
17159
17176
|
});
|
|
17160
17177
|
expectTypesMatch(true);
|
|
17161
17178
|
|
|
17162
17179
|
// lib/components/smtpad.ts
|
|
17163
|
-
import { z as
|
|
17180
|
+
import { z as z67 } from "zod";
|
|
17164
17181
|
var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17165
|
-
name:
|
|
17166
|
-
shape:
|
|
17182
|
+
name: z67.string().optional(),
|
|
17183
|
+
shape: z67.literal("rect"),
|
|
17167
17184
|
width: distance,
|
|
17168
17185
|
height: distance,
|
|
17169
17186
|
rectBorderRadius: distance.optional(),
|
|
17170
17187
|
cornerRadius: distance.optional(),
|
|
17171
17188
|
portHints: portHints.optional(),
|
|
17172
|
-
coveredWithSolderMask:
|
|
17189
|
+
coveredWithSolderMask: z67.boolean().optional(),
|
|
17173
17190
|
solderMaskMargin: distance.optional(),
|
|
17174
17191
|
solderMaskMarginLeft: distance.optional(),
|
|
17175
17192
|
solderMaskMarginRight: distance.optional(),
|
|
@@ -17179,14 +17196,14 @@ var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
17179
17196
|
});
|
|
17180
17197
|
expectTypesMatch(true);
|
|
17181
17198
|
var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17182
|
-
name:
|
|
17183
|
-
shape:
|
|
17199
|
+
name: z67.string().optional(),
|
|
17200
|
+
shape: z67.literal("rotated_rect"),
|
|
17184
17201
|
width: distance,
|
|
17185
17202
|
height: distance,
|
|
17186
|
-
ccwRotation:
|
|
17203
|
+
ccwRotation: z67.number(),
|
|
17187
17204
|
cornerRadius: distance.optional(),
|
|
17188
17205
|
portHints: portHints.optional(),
|
|
17189
|
-
coveredWithSolderMask:
|
|
17206
|
+
coveredWithSolderMask: z67.boolean().optional(),
|
|
17190
17207
|
solderMaskMargin: distance.optional(),
|
|
17191
17208
|
solderMaskMarginLeft: distance.optional(),
|
|
17192
17209
|
solderMaskMarginRight: distance.optional(),
|
|
@@ -17196,38 +17213,38 @@ var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
17196
17213
|
});
|
|
17197
17214
|
expectTypesMatch(true);
|
|
17198
17215
|
var circleSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17199
|
-
name:
|
|
17200
|
-
shape:
|
|
17216
|
+
name: z67.string().optional(),
|
|
17217
|
+
shape: z67.literal("circle"),
|
|
17201
17218
|
radius: distance,
|
|
17202
17219
|
portHints: portHints.optional(),
|
|
17203
|
-
coveredWithSolderMask:
|
|
17220
|
+
coveredWithSolderMask: z67.boolean().optional(),
|
|
17204
17221
|
solderMaskMargin: distance.optional(),
|
|
17205
17222
|
solderPasteMargin: distance.optional()
|
|
17206
17223
|
});
|
|
17207
17224
|
expectTypesMatch(true);
|
|
17208
17225
|
var pillSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17209
|
-
name:
|
|
17210
|
-
shape:
|
|
17226
|
+
name: z67.string().optional(),
|
|
17227
|
+
shape: z67.literal("pill"),
|
|
17211
17228
|
width: distance,
|
|
17212
17229
|
height: distance,
|
|
17213
17230
|
radius: distance,
|
|
17214
17231
|
portHints: portHints.optional(),
|
|
17215
|
-
coveredWithSolderMask:
|
|
17232
|
+
coveredWithSolderMask: z67.boolean().optional(),
|
|
17216
17233
|
solderMaskMargin: distance.optional(),
|
|
17217
17234
|
solderPasteMargin: distance.optional()
|
|
17218
17235
|
});
|
|
17219
17236
|
expectTypesMatch(true);
|
|
17220
17237
|
var polygonSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17221
|
-
name:
|
|
17222
|
-
shape:
|
|
17223
|
-
points:
|
|
17238
|
+
name: z67.string().optional(),
|
|
17239
|
+
shape: z67.literal("polygon"),
|
|
17240
|
+
points: z67.array(point),
|
|
17224
17241
|
portHints: portHints.optional(),
|
|
17225
|
-
coveredWithSolderMask:
|
|
17242
|
+
coveredWithSolderMask: z67.boolean().optional(),
|
|
17226
17243
|
solderMaskMargin: distance.optional(),
|
|
17227
17244
|
solderPasteMargin: distance.optional()
|
|
17228
17245
|
});
|
|
17229
17246
|
expectTypesMatch(true);
|
|
17230
|
-
var smtPadProps =
|
|
17247
|
+
var smtPadProps = z67.discriminatedUnion("shape", [
|
|
17231
17248
|
circleSmtPadProps,
|
|
17232
17249
|
rectSmtPadProps,
|
|
17233
17250
|
rotatedRectSmtPadProps,
|
|
@@ -17237,63 +17254,63 @@ var smtPadProps = z66.discriminatedUnion("shape", [
|
|
|
17237
17254
|
expectTypesMatch(true);
|
|
17238
17255
|
|
|
17239
17256
|
// lib/components/solderpaste.ts
|
|
17240
|
-
import { z as
|
|
17257
|
+
import { z as z68 } from "zod";
|
|
17241
17258
|
var rectSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17242
|
-
shape:
|
|
17259
|
+
shape: z68.literal("rect"),
|
|
17243
17260
|
width: distance,
|
|
17244
17261
|
height: distance
|
|
17245
17262
|
});
|
|
17246
17263
|
expectTypesMatch(true);
|
|
17247
17264
|
var circleSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17248
|
-
shape:
|
|
17265
|
+
shape: z68.literal("circle"),
|
|
17249
17266
|
radius: distance
|
|
17250
17267
|
});
|
|
17251
17268
|
expectTypesMatch(true);
|
|
17252
|
-
var solderPasteProps =
|
|
17269
|
+
var solderPasteProps = z68.union([
|
|
17253
17270
|
circleSolderPasteProps,
|
|
17254
17271
|
rectSolderPasteProps
|
|
17255
17272
|
]);
|
|
17256
17273
|
expectTypesMatch(true);
|
|
17257
17274
|
|
|
17258
17275
|
// lib/components/hole.ts
|
|
17259
|
-
import { z as
|
|
17276
|
+
import { z as z69 } from "zod";
|
|
17260
17277
|
var circleHoleProps = pcbLayoutProps.extend({
|
|
17261
|
-
name:
|
|
17262
|
-
shape:
|
|
17278
|
+
name: z69.string().optional(),
|
|
17279
|
+
shape: z69.literal("circle").optional(),
|
|
17263
17280
|
diameter: distance.optional(),
|
|
17264
17281
|
radius: distance.optional(),
|
|
17265
17282
|
solderMaskMargin: distance.optional(),
|
|
17266
|
-
coveredWithSolderMask:
|
|
17283
|
+
coveredWithSolderMask: z69.boolean().optional()
|
|
17267
17284
|
}).transform((d) => ({
|
|
17268
17285
|
...d,
|
|
17269
17286
|
diameter: d.diameter ?? 2 * d.radius,
|
|
17270
17287
|
radius: d.radius ?? d.diameter / 2
|
|
17271
17288
|
}));
|
|
17272
17289
|
var pillHoleProps = pcbLayoutProps.extend({
|
|
17273
|
-
name:
|
|
17274
|
-
shape:
|
|
17290
|
+
name: z69.string().optional(),
|
|
17291
|
+
shape: z69.literal("pill"),
|
|
17275
17292
|
width: distance,
|
|
17276
17293
|
height: distance,
|
|
17277
17294
|
solderMaskMargin: distance.optional(),
|
|
17278
|
-
coveredWithSolderMask:
|
|
17295
|
+
coveredWithSolderMask: z69.boolean().optional()
|
|
17279
17296
|
});
|
|
17280
17297
|
var ovalHoleProps = pcbLayoutProps.extend({
|
|
17281
|
-
name:
|
|
17282
|
-
shape:
|
|
17298
|
+
name: z69.string().optional(),
|
|
17299
|
+
shape: z69.literal("oval"),
|
|
17283
17300
|
width: distance,
|
|
17284
17301
|
height: distance,
|
|
17285
17302
|
solderMaskMargin: distance.optional(),
|
|
17286
|
-
coveredWithSolderMask:
|
|
17303
|
+
coveredWithSolderMask: z69.boolean().optional()
|
|
17287
17304
|
});
|
|
17288
17305
|
var rectHoleProps = pcbLayoutProps.extend({
|
|
17289
|
-
name:
|
|
17290
|
-
shape:
|
|
17306
|
+
name: z69.string().optional(),
|
|
17307
|
+
shape: z69.literal("rect"),
|
|
17291
17308
|
width: distance,
|
|
17292
17309
|
height: distance,
|
|
17293
17310
|
solderMaskMargin: distance.optional(),
|
|
17294
|
-
coveredWithSolderMask:
|
|
17311
|
+
coveredWithSolderMask: z69.boolean().optional()
|
|
17295
17312
|
});
|
|
17296
|
-
var holeProps =
|
|
17313
|
+
var holeProps = z69.union([
|
|
17297
17314
|
circleHoleProps,
|
|
17298
17315
|
pillHoleProps,
|
|
17299
17316
|
ovalHoleProps,
|
|
@@ -17302,58 +17319,58 @@ var holeProps = z68.union([
|
|
|
17302
17319
|
expectTypesMatch(true);
|
|
17303
17320
|
|
|
17304
17321
|
// lib/components/trace.ts
|
|
17305
|
-
import { distance as distance18, layer_ref as
|
|
17306
|
-
import { z as
|
|
17307
|
-
var portRef =
|
|
17308
|
-
|
|
17309
|
-
|
|
17322
|
+
import { distance as distance18, layer_ref as layer_ref5, route_hint_point as route_hint_point2 } from "circuit-json";
|
|
17323
|
+
import { z as z70 } from "zod";
|
|
17324
|
+
var portRef = z70.union([
|
|
17325
|
+
z70.string(),
|
|
17326
|
+
z70.custom(
|
|
17310
17327
|
(v) => typeof v === "object" && v !== null && "getPortSelector" in v && typeof v.getPortSelector === "function"
|
|
17311
17328
|
)
|
|
17312
17329
|
]);
|
|
17313
17330
|
var pcbPathPoint = point.extend({
|
|
17314
|
-
via:
|
|
17315
|
-
fromLayer:
|
|
17316
|
-
toLayer:
|
|
17331
|
+
via: z70.boolean().optional(),
|
|
17332
|
+
fromLayer: layer_ref5.optional(),
|
|
17333
|
+
toLayer: layer_ref5.optional()
|
|
17317
17334
|
}).superRefine((value, ctx) => {
|
|
17318
17335
|
if (value.via) {
|
|
17319
17336
|
if (!value.toLayer) {
|
|
17320
17337
|
ctx.addIssue({
|
|
17321
|
-
code:
|
|
17338
|
+
code: z70.ZodIssueCode.custom,
|
|
17322
17339
|
message: "toLayer is required when via is true",
|
|
17323
17340
|
path: ["toLayer"]
|
|
17324
17341
|
});
|
|
17325
17342
|
}
|
|
17326
17343
|
} else if (value.fromLayer || value.toLayer) {
|
|
17327
17344
|
ctx.addIssue({
|
|
17328
|
-
code:
|
|
17345
|
+
code: z70.ZodIssueCode.custom,
|
|
17329
17346
|
message: "fromLayer/toLayer are only allowed when via is true",
|
|
17330
17347
|
path: ["via"]
|
|
17331
17348
|
});
|
|
17332
17349
|
}
|
|
17333
17350
|
});
|
|
17334
|
-
var pcbPath =
|
|
17335
|
-
var baseTraceProps =
|
|
17336
|
-
key:
|
|
17337
|
-
name:
|
|
17338
|
-
displayName:
|
|
17351
|
+
var pcbPath = z70.array(z70.union([pcbPathPoint, z70.string()]));
|
|
17352
|
+
var baseTraceProps = z70.object({
|
|
17353
|
+
key: z70.string().optional(),
|
|
17354
|
+
name: z70.string().optional(),
|
|
17355
|
+
displayName: z70.string().optional(),
|
|
17339
17356
|
thickness: distance18.optional(),
|
|
17340
17357
|
width: distance18.optional().describe("Alias for trace thickness"),
|
|
17341
|
-
schematicRouteHints:
|
|
17342
|
-
pcbRouteHints:
|
|
17343
|
-
pcbPathRelativeTo:
|
|
17358
|
+
schematicRouteHints: z70.array(point).optional(),
|
|
17359
|
+
pcbRouteHints: z70.array(route_hint_point2).optional(),
|
|
17360
|
+
pcbPathRelativeTo: z70.string().optional(),
|
|
17344
17361
|
pcbPath: pcbPath.optional(),
|
|
17345
|
-
pcbPaths:
|
|
17346
|
-
routingPhaseIndex:
|
|
17347
|
-
pcbStraightLine:
|
|
17348
|
-
schDisplayLabel:
|
|
17349
|
-
schStroke:
|
|
17350
|
-
highlightColor:
|
|
17362
|
+
pcbPaths: z70.array(pcbPath).optional(),
|
|
17363
|
+
routingPhaseIndex: z70.number().nullable().optional(),
|
|
17364
|
+
pcbStraightLine: z70.boolean().optional().describe("Draw a straight pcb trace between the connected points"),
|
|
17365
|
+
schDisplayLabel: z70.string().optional(),
|
|
17366
|
+
schStroke: z70.string().optional(),
|
|
17367
|
+
highlightColor: z70.string().optional(),
|
|
17351
17368
|
maxLength: distance18.optional(),
|
|
17352
|
-
connectsTo:
|
|
17369
|
+
connectsTo: z70.string().or(z70.array(z70.string())).optional()
|
|
17353
17370
|
});
|
|
17354
|
-
var traceProps =
|
|
17371
|
+
var traceProps = z70.union([
|
|
17355
17372
|
baseTraceProps.extend({
|
|
17356
|
-
path:
|
|
17373
|
+
path: z70.array(portRef)
|
|
17357
17374
|
}),
|
|
17358
17375
|
baseTraceProps.extend({
|
|
17359
17376
|
from: portRef,
|
|
@@ -17366,27 +17383,28 @@ var traceProps = z69.union([
|
|
|
17366
17383
|
]);
|
|
17367
17384
|
|
|
17368
17385
|
// lib/components/bus.ts
|
|
17369
|
-
import { z as
|
|
17370
|
-
var busProps =
|
|
17371
|
-
name:
|
|
17372
|
-
connections:
|
|
17386
|
+
import { z as z71 } from "zod";
|
|
17387
|
+
var busProps = z71.object({
|
|
17388
|
+
name: z71.string().optional(),
|
|
17389
|
+
connections: z71.array(z71.string()).min(2),
|
|
17390
|
+
routingPhaseIndex: z71.number().nullable().optional()
|
|
17373
17391
|
});
|
|
17374
17392
|
expectTypesMatch(true);
|
|
17375
17393
|
|
|
17376
17394
|
// lib/components/differentialpair.ts
|
|
17377
|
-
import { z as
|
|
17378
|
-
var differentialPairProps =
|
|
17379
|
-
name:
|
|
17380
|
-
positiveConnection:
|
|
17381
|
-
negativeConnection:
|
|
17382
|
-
maxLengthSkew:
|
|
17395
|
+
import { z as z72 } from "zod";
|
|
17396
|
+
var differentialPairProps = z72.object({
|
|
17397
|
+
name: z72.string().optional(),
|
|
17398
|
+
positiveConnection: z72.string(),
|
|
17399
|
+
negativeConnection: z72.string(),
|
|
17400
|
+
maxLengthSkew: z72.number().min(0).finite().optional()
|
|
17383
17401
|
});
|
|
17384
17402
|
expectTypesMatch(true);
|
|
17385
17403
|
|
|
17386
17404
|
// lib/components/footprint.ts
|
|
17387
|
-
import { layer_ref as
|
|
17388
|
-
import { z as
|
|
17389
|
-
var footprintInsertionDirection =
|
|
17405
|
+
import { layer_ref as layer_ref6 } from "circuit-json";
|
|
17406
|
+
import { z as z73 } from "zod";
|
|
17407
|
+
var footprintInsertionDirection = z73.enum([
|
|
17390
17408
|
"from_above",
|
|
17391
17409
|
"from_left",
|
|
17392
17410
|
"from_right",
|
|
@@ -17394,11 +17412,11 @@ var footprintInsertionDirection = z72.enum([
|
|
|
17394
17412
|
"from_back"
|
|
17395
17413
|
]);
|
|
17396
17414
|
expectTypesMatch(true);
|
|
17397
|
-
var footprintProps =
|
|
17398
|
-
children:
|
|
17399
|
-
name:
|
|
17400
|
-
originalLayer:
|
|
17401
|
-
circuitJson:
|
|
17415
|
+
var footprintProps = z73.object({
|
|
17416
|
+
children: z73.any().optional(),
|
|
17417
|
+
name: z73.string().optional(),
|
|
17418
|
+
originalLayer: layer_ref6.default("top").optional(),
|
|
17419
|
+
circuitJson: z73.array(z73.any()).optional(),
|
|
17402
17420
|
src: footprintProp.describe("Can be a footprint or kicad string").optional(),
|
|
17403
17421
|
insertionDirection: footprintInsertionDirection.optional().describe(
|
|
17404
17422
|
"Direction a cable or mating part is inserted into this footprint in its unrotated orientation."
|
|
@@ -17407,19 +17425,19 @@ var footprintProps = z72.object({
|
|
|
17407
17425
|
expectTypesMatch(true);
|
|
17408
17426
|
|
|
17409
17427
|
// lib/components/symbol.ts
|
|
17410
|
-
import { z as
|
|
17411
|
-
var symbolProps =
|
|
17412
|
-
originalFacingDirection:
|
|
17428
|
+
import { z as z74 } from "zod";
|
|
17429
|
+
var symbolProps = z74.object({
|
|
17430
|
+
originalFacingDirection: z74.enum(["up", "down", "left", "right"]).default("right").optional(),
|
|
17413
17431
|
width: distance.optional(),
|
|
17414
17432
|
height: distance.optional(),
|
|
17415
|
-
name:
|
|
17433
|
+
name: z74.string().optional()
|
|
17416
17434
|
});
|
|
17417
17435
|
expectTypesMatch(true);
|
|
17418
17436
|
|
|
17419
17437
|
// lib/components/battery.ts
|
|
17420
17438
|
import { voltage as voltage2 } from "circuit-json";
|
|
17421
|
-
import { z as
|
|
17422
|
-
var capacity =
|
|
17439
|
+
import { z as z75 } from "zod";
|
|
17440
|
+
var capacity = z75.number().or(z75.string().endsWith("mAh")).transform((v) => {
|
|
17423
17441
|
if (typeof v === "string") {
|
|
17424
17442
|
const valString = v.replace("mAh", "");
|
|
17425
17443
|
const num = Number.parseFloat(valString);
|
|
@@ -17434,14 +17452,14 @@ var batteryPins = lrPolarPins;
|
|
|
17434
17452
|
var batteryProps = commonComponentProps.extend({
|
|
17435
17453
|
capacity: capacity.optional(),
|
|
17436
17454
|
voltage: voltage2.optional(),
|
|
17437
|
-
standard:
|
|
17455
|
+
standard: z75.enum(["AA", "AAA", "9V", "CR2032", "18650", "C"]).optional(),
|
|
17438
17456
|
schOrientation: schematicOrientation.optional(),
|
|
17439
17457
|
connections: createConnectionsProp(batteryPins).optional()
|
|
17440
17458
|
});
|
|
17441
17459
|
expectTypesMatch(true);
|
|
17442
17460
|
|
|
17443
17461
|
// lib/components/mountedboard.ts
|
|
17444
|
-
import { z as
|
|
17462
|
+
import { z as z76 } from "zod";
|
|
17445
17463
|
var mountedboardProps = subcircuitGroupProps.extend({
|
|
17446
17464
|
manufacturerPartNumber: chipProps.shape.manufacturerPartNumber,
|
|
17447
17465
|
pinLabels: chipProps.shape.pinLabels,
|
|
@@ -17453,7 +17471,7 @@ var mountedboardProps = subcircuitGroupProps.extend({
|
|
|
17453
17471
|
internallyConnectedPins: chipProps.shape.internallyConnectedPins,
|
|
17454
17472
|
externallyConnectedPins: chipProps.shape.externallyConnectedPins,
|
|
17455
17473
|
boardToBoardDistance: distance.optional(),
|
|
17456
|
-
mountOrientation:
|
|
17474
|
+
mountOrientation: z76.enum(["faceDown", "faceUp"]).optional()
|
|
17457
17475
|
});
|
|
17458
17476
|
expectTypesMatch(true);
|
|
17459
17477
|
|
|
@@ -17461,29 +17479,29 @@ expectTypesMatch(true);
|
|
|
17461
17479
|
import { distance as distance19 } from "circuit-json";
|
|
17462
17480
|
|
|
17463
17481
|
// lib/common/pcbOrientation.ts
|
|
17464
|
-
import { z as
|
|
17465
|
-
var pcbOrientation =
|
|
17482
|
+
import { z as z77 } from "zod";
|
|
17483
|
+
var pcbOrientation = z77.enum(["vertical", "horizontal"]).describe(
|
|
17466
17484
|
"vertical means pins go 1->2 downward and horizontal means pins go 1->2 rightward"
|
|
17467
17485
|
);
|
|
17468
17486
|
expectTypesMatch(true);
|
|
17469
17487
|
|
|
17470
17488
|
// lib/components/pin-header.ts
|
|
17471
|
-
import { z as
|
|
17489
|
+
import { z as z78 } from "zod";
|
|
17472
17490
|
var pinHeaderProps = commonComponentProps.extend({
|
|
17473
|
-
pinCount:
|
|
17491
|
+
pinCount: z78.number(),
|
|
17474
17492
|
pitch: distance19.optional(),
|
|
17475
|
-
schFacingDirection:
|
|
17476
|
-
gender:
|
|
17477
|
-
showSilkscreenPinLabels:
|
|
17478
|
-
pcbPinLabels:
|
|
17479
|
-
doubleRow:
|
|
17480
|
-
rightAngle:
|
|
17493
|
+
schFacingDirection: z78.enum(["up", "down", "left", "right"]).optional(),
|
|
17494
|
+
gender: z78.enum(["male", "female", "unpopulated"]).optional().default("male"),
|
|
17495
|
+
showSilkscreenPinLabels: z78.boolean().optional(),
|
|
17496
|
+
pcbPinLabels: z78.record(z78.string(), z78.string()).optional(),
|
|
17497
|
+
doubleRow: z78.boolean().optional(),
|
|
17498
|
+
rightAngle: z78.boolean().optional(),
|
|
17481
17499
|
pcbOrientation: pcbOrientation.optional(),
|
|
17482
17500
|
holeDiameter: distance19.optional(),
|
|
17483
17501
|
platedDiameter: distance19.optional(),
|
|
17484
|
-
pinLabels:
|
|
17485
|
-
connections:
|
|
17486
|
-
facingDirection:
|
|
17502
|
+
pinLabels: z78.record(z78.string(), schematicPinLabel).or(z78.array(schematicPinLabel)).optional(),
|
|
17503
|
+
connections: z78.custom().pipe(z78.record(z78.string(), connectionTarget)).optional(),
|
|
17504
|
+
facingDirection: z78.enum(["left", "right"]).optional(),
|
|
17487
17505
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
17488
17506
|
schPinStyle: schematicPinStyle.optional(),
|
|
17489
17507
|
schPinSpacing: distance19.optional(),
|
|
@@ -17493,29 +17511,29 @@ var pinHeaderProps = commonComponentProps.extend({
|
|
|
17493
17511
|
expectTypesMatch(true);
|
|
17494
17512
|
|
|
17495
17513
|
// lib/components/netalias.ts
|
|
17496
|
-
import { z as
|
|
17514
|
+
import { z as z79 } from "zod";
|
|
17497
17515
|
import { rotation as rotation3 } from "circuit-json";
|
|
17498
|
-
var netAliasProps =
|
|
17499
|
-
net:
|
|
17500
|
-
connection:
|
|
17516
|
+
var netAliasProps = z79.object({
|
|
17517
|
+
net: z79.string().optional(),
|
|
17518
|
+
connection: z79.string().optional(),
|
|
17501
17519
|
schX: distance.optional(),
|
|
17502
17520
|
schY: distance.optional(),
|
|
17503
17521
|
schRotation: rotation3.optional(),
|
|
17504
|
-
anchorSide:
|
|
17522
|
+
anchorSide: z79.enum(["left", "top", "right", "bottom"]).optional()
|
|
17505
17523
|
});
|
|
17506
17524
|
expectTypesMatch(true);
|
|
17507
17525
|
|
|
17508
17526
|
// lib/components/netlabel.ts
|
|
17509
|
-
import { z as
|
|
17527
|
+
import { z as z80 } from "zod";
|
|
17510
17528
|
import { rotation as rotation4 } from "circuit-json";
|
|
17511
|
-
var netLabelProps =
|
|
17512
|
-
net:
|
|
17513
|
-
connection:
|
|
17514
|
-
connectsTo:
|
|
17529
|
+
var netLabelProps = z80.object({
|
|
17530
|
+
net: z80.string().optional(),
|
|
17531
|
+
connection: z80.string().optional(),
|
|
17532
|
+
connectsTo: z80.string().or(z80.array(z80.string())).optional(),
|
|
17515
17533
|
schX: distance.optional(),
|
|
17516
17534
|
schY: distance.optional(),
|
|
17517
17535
|
schRotation: rotation4.optional(),
|
|
17518
|
-
anchorSide:
|
|
17536
|
+
anchorSide: z80.enum(["left", "top", "right", "bottom"]).optional()
|
|
17519
17537
|
});
|
|
17520
17538
|
expectTypesMatch(true);
|
|
17521
17539
|
|
|
@@ -17530,32 +17548,32 @@ expectTypesMatch(true);
|
|
|
17530
17548
|
|
|
17531
17549
|
// lib/components/analogsimulation.ts
|
|
17532
17550
|
import { ms } from "circuit-json";
|
|
17533
|
-
import { z as
|
|
17534
|
-
var spiceEngine =
|
|
17551
|
+
import { z as z82 } from "zod";
|
|
17552
|
+
var spiceEngine = z82.custom(
|
|
17535
17553
|
(value) => typeof value === "string"
|
|
17536
17554
|
);
|
|
17537
|
-
var spiceOptions =
|
|
17538
|
-
method:
|
|
17539
|
-
reltol:
|
|
17540
|
-
abstol:
|
|
17541
|
-
vntol:
|
|
17555
|
+
var spiceOptions = z82.object({
|
|
17556
|
+
method: z82.enum(["trap", "gear"]).optional(),
|
|
17557
|
+
reltol: z82.union([z82.number(), z82.string()]).optional(),
|
|
17558
|
+
abstol: z82.union([z82.number(), z82.string()]).optional(),
|
|
17559
|
+
vntol: z82.union([z82.number(), z82.string()]).optional()
|
|
17542
17560
|
});
|
|
17543
17561
|
var analogAnalysisSimulationBaseProps = {
|
|
17544
|
-
name:
|
|
17562
|
+
name: z82.string().optional(),
|
|
17545
17563
|
spiceEngine: spiceEngine.optional(),
|
|
17546
17564
|
spiceOptions: spiceOptions.optional(),
|
|
17547
|
-
graphIndependentAxes:
|
|
17548
|
-
children:
|
|
17565
|
+
graphIndependentAxes: z82.boolean().optional(),
|
|
17566
|
+
children: z82.custom().optional()
|
|
17549
17567
|
};
|
|
17550
|
-
var analogSimulationProps =
|
|
17551
|
-
name:
|
|
17552
|
-
simulationType:
|
|
17568
|
+
var analogSimulationProps = z82.object({
|
|
17569
|
+
name: z82.string().optional(),
|
|
17570
|
+
simulationType: z82.literal("spice_transient_analysis").default("spice_transient_analysis"),
|
|
17553
17571
|
duration: ms.optional(),
|
|
17554
17572
|
startTime: ms.optional(),
|
|
17555
17573
|
timePerStep: ms.optional(),
|
|
17556
17574
|
spiceEngine: spiceEngine.optional(),
|
|
17557
17575
|
spiceOptions: spiceOptions.optional(),
|
|
17558
|
-
graphIndependentAxes:
|
|
17576
|
+
graphIndependentAxes: z82.boolean().optional()
|
|
17559
17577
|
});
|
|
17560
17578
|
expectTypesMatch(
|
|
17561
17579
|
true
|
|
@@ -17563,12 +17581,12 @@ expectTypesMatch(
|
|
|
17563
17581
|
|
|
17564
17582
|
// lib/components/analogtransientsimulation.ts
|
|
17565
17583
|
import { ms as ms2 } from "circuit-json";
|
|
17566
|
-
import { z as
|
|
17584
|
+
import { z as z83 } from "zod";
|
|
17567
17585
|
var positiveMilliseconds = ms2.refine(
|
|
17568
17586
|
(milliseconds) => milliseconds > 0,
|
|
17569
17587
|
"Time must be positive"
|
|
17570
17588
|
);
|
|
17571
|
-
var analogTransientSimulationProps =
|
|
17589
|
+
var analogTransientSimulationProps = z83.object({
|
|
17572
17590
|
...analogAnalysisSimulationBaseProps,
|
|
17573
17591
|
duration: positiveMilliseconds.default("10ms"),
|
|
17574
17592
|
startTime: ms2.default("0ms"),
|
|
@@ -17576,7 +17594,7 @@ var analogTransientSimulationProps = z82.object({
|
|
|
17576
17594
|
}).superRefine((simulation, context) => {
|
|
17577
17595
|
if (simulation.startTime < 0 || simulation.startTime > simulation.duration) {
|
|
17578
17596
|
context.addIssue({
|
|
17579
|
-
code:
|
|
17597
|
+
code: z83.ZodIssueCode.custom,
|
|
17580
17598
|
path: ["startTime"],
|
|
17581
17599
|
message: "startTime must be between zero and duration"
|
|
17582
17600
|
});
|
|
@@ -17585,19 +17603,19 @@ var analogTransientSimulationProps = z82.object({
|
|
|
17585
17603
|
expectTypesMatch(true);
|
|
17586
17604
|
|
|
17587
17605
|
// lib/components/analogdcoperatingpointsimulation.ts
|
|
17588
|
-
import { z as
|
|
17589
|
-
var analogDcOperatingPointSimulationProps =
|
|
17606
|
+
import { z as z84 } from "zod";
|
|
17607
|
+
var analogDcOperatingPointSimulationProps = z84.object({
|
|
17590
17608
|
...analogAnalysisSimulationBaseProps
|
|
17591
17609
|
});
|
|
17592
17610
|
expectTypesMatch(true);
|
|
17593
17611
|
|
|
17594
17612
|
// lib/components/analogdcsweepsimulation.ts
|
|
17595
17613
|
import { current, voltage as voltage3 } from "circuit-json";
|
|
17596
|
-
import { z as
|
|
17597
|
-
var dcSweepQuantity =
|
|
17598
|
-
var analogDcSweepSimulationProps =
|
|
17614
|
+
import { z as z85 } from "zod";
|
|
17615
|
+
var dcSweepQuantity = z85.union([voltage3, current]);
|
|
17616
|
+
var analogDcSweepSimulationProps = z85.object({
|
|
17599
17617
|
...analogAnalysisSimulationBaseProps,
|
|
17600
|
-
sweepSource:
|
|
17618
|
+
sweepSource: z85.string().min(1),
|
|
17601
17619
|
sweepStart: dcSweepQuantity,
|
|
17602
17620
|
sweepStop: dcSweepQuantity,
|
|
17603
17621
|
sweepStep: dcSweepQuantity.refine(
|
|
@@ -17607,7 +17625,7 @@ var analogDcSweepSimulationProps = z84.object({
|
|
|
17607
17625
|
}).superRefine((simulation, context) => {
|
|
17608
17626
|
if (Math.sign(simulation.sweepStop - simulation.sweepStart) !== Math.sign(simulation.sweepStep)) {
|
|
17609
17627
|
context.addIssue({
|
|
17610
|
-
code:
|
|
17628
|
+
code: z85.ZodIssueCode.custom,
|
|
17611
17629
|
path: ["sweepStep"],
|
|
17612
17630
|
message: "sweepStep must move from sweepStart toward sweepStop"
|
|
17613
17631
|
});
|
|
@@ -17617,10 +17635,10 @@ expectTypesMatch(true);
|
|
|
17617
17635
|
|
|
17618
17636
|
// lib/components/analogacsweepsimulation.ts
|
|
17619
17637
|
import { frequency as frequency3 } from "circuit-json";
|
|
17620
|
-
import { z as
|
|
17621
|
-
var analogAcSweepSimulationProps =
|
|
17638
|
+
import { z as z86 } from "zod";
|
|
17639
|
+
var analogAcSweepSimulationProps = z86.object({
|
|
17622
17640
|
...analogAnalysisSimulationBaseProps,
|
|
17623
|
-
sweepType:
|
|
17641
|
+
sweepType: z86.enum(["linear", "decade", "octave"]),
|
|
17624
17642
|
startFrequency: frequency3.refine(
|
|
17625
17643
|
(startFrequencyHz) => startFrequencyHz > 0,
|
|
17626
17644
|
"startFrequency must be positive"
|
|
@@ -17629,12 +17647,12 @@ var analogAcSweepSimulationProps = z85.object({
|
|
|
17629
17647
|
(stopFrequencyHz) => stopFrequencyHz > 0,
|
|
17630
17648
|
"stopFrequency must be positive"
|
|
17631
17649
|
),
|
|
17632
|
-
samplesPerInterval:
|
|
17633
|
-
sampleCount:
|
|
17650
|
+
samplesPerInterval: z86.number().int().positive().optional(),
|
|
17651
|
+
sampleCount: z86.number().int().positive().optional()
|
|
17634
17652
|
}).superRefine((simulation, context) => {
|
|
17635
17653
|
if (simulation.stopFrequency <= simulation.startFrequency) {
|
|
17636
17654
|
context.addIssue({
|
|
17637
|
-
code:
|
|
17655
|
+
code: z86.ZodIssueCode.custom,
|
|
17638
17656
|
path: ["stopFrequency"],
|
|
17639
17657
|
message: "stopFrequency must be greater than startFrequency"
|
|
17640
17658
|
});
|
|
@@ -17642,14 +17660,14 @@ var analogAcSweepSimulationProps = z85.object({
|
|
|
17642
17660
|
if (simulation.sweepType === "linear") {
|
|
17643
17661
|
if (simulation.sampleCount === void 0) {
|
|
17644
17662
|
context.addIssue({
|
|
17645
|
-
code:
|
|
17663
|
+
code: z86.ZodIssueCode.custom,
|
|
17646
17664
|
path: ["sampleCount"],
|
|
17647
17665
|
message: "sampleCount is required for a linear AC sweep"
|
|
17648
17666
|
});
|
|
17649
17667
|
}
|
|
17650
17668
|
if (simulation.samplesPerInterval !== void 0) {
|
|
17651
17669
|
context.addIssue({
|
|
17652
|
-
code:
|
|
17670
|
+
code: z86.ZodIssueCode.custom,
|
|
17653
17671
|
path: ["samplesPerInterval"],
|
|
17654
17672
|
message: "samplesPerInterval is only valid for decade or octave sweeps"
|
|
17655
17673
|
});
|
|
@@ -17658,14 +17676,14 @@ var analogAcSweepSimulationProps = z85.object({
|
|
|
17658
17676
|
}
|
|
17659
17677
|
if (simulation.samplesPerInterval === void 0) {
|
|
17660
17678
|
context.addIssue({
|
|
17661
|
-
code:
|
|
17679
|
+
code: z86.ZodIssueCode.custom,
|
|
17662
17680
|
path: ["samplesPerInterval"],
|
|
17663
17681
|
message: "samplesPerInterval is required for decade or octave sweeps"
|
|
17664
17682
|
});
|
|
17665
17683
|
}
|
|
17666
17684
|
if (simulation.sampleCount !== void 0) {
|
|
17667
17685
|
context.addIssue({
|
|
17668
|
-
code:
|
|
17686
|
+
code: z86.ZodIssueCode.custom,
|
|
17669
17687
|
path: ["sampleCount"],
|
|
17670
17688
|
message: "sampleCount is only valid for a linear sweep"
|
|
17671
17689
|
});
|
|
@@ -17681,43 +17699,43 @@ import {
|
|
|
17681
17699
|
resistance as resistance3,
|
|
17682
17700
|
voltage as voltage4
|
|
17683
17701
|
} from "circuit-json";
|
|
17684
|
-
import { z as
|
|
17685
|
-
var resistanceSweepQuantity = resistance3.pipe(
|
|
17686
|
-
var capacitanceSweepQuantity = capacitance4.pipe(
|
|
17687
|
-
var inductanceSweepQuantity = inductance.pipe(
|
|
17688
|
-
var voltageSweepQuantity = voltage4.pipe(
|
|
17689
|
-
var currentSweepQuantity = current2.pipe(
|
|
17702
|
+
import { z as z87 } from "zod";
|
|
17703
|
+
var resistanceSweepQuantity = resistance3.pipe(z87.number());
|
|
17704
|
+
var capacitanceSweepQuantity = capacitance4.pipe(z87.number());
|
|
17705
|
+
var inductanceSweepQuantity = inductance.pipe(z87.number());
|
|
17706
|
+
var voltageSweepQuantity = voltage4.pipe(z87.number());
|
|
17707
|
+
var currentSweepQuantity = current2.pipe(z87.number());
|
|
17690
17708
|
var createAnalogSweepCoordinateProps = (sweepQuantity) => ({
|
|
17691
|
-
name:
|
|
17692
|
-
values:
|
|
17709
|
+
name: z87.string().optional(),
|
|
17710
|
+
values: z87.array(sweepQuantity).min(1).optional(),
|
|
17693
17711
|
start: sweepQuantity.optional(),
|
|
17694
17712
|
stop: sweepQuantity.optional(),
|
|
17695
17713
|
step: sweepQuantity.optional()
|
|
17696
17714
|
});
|
|
17697
|
-
var analogResistanceSweepParameterProps =
|
|
17715
|
+
var analogResistanceSweepParameterProps = z87.object({
|
|
17698
17716
|
...createAnalogSweepCoordinateProps(resistanceSweepQuantity),
|
|
17699
|
-
parameterType:
|
|
17700
|
-
resistorRef:
|
|
17717
|
+
parameterType: z87.literal("resistance"),
|
|
17718
|
+
resistorRef: z87.string().min(1)
|
|
17701
17719
|
}).strict();
|
|
17702
|
-
var analogCapacitanceSweepParameterProps =
|
|
17720
|
+
var analogCapacitanceSweepParameterProps = z87.object({
|
|
17703
17721
|
...createAnalogSweepCoordinateProps(capacitanceSweepQuantity),
|
|
17704
|
-
parameterType:
|
|
17705
|
-
capacitorRef:
|
|
17722
|
+
parameterType: z87.literal("capacitance"),
|
|
17723
|
+
capacitorRef: z87.string().min(1)
|
|
17706
17724
|
}).strict();
|
|
17707
|
-
var analogInductanceSweepParameterProps =
|
|
17725
|
+
var analogInductanceSweepParameterProps = z87.object({
|
|
17708
17726
|
...createAnalogSweepCoordinateProps(inductanceSweepQuantity),
|
|
17709
|
-
parameterType:
|
|
17710
|
-
inductorRef:
|
|
17727
|
+
parameterType: z87.literal("inductance"),
|
|
17728
|
+
inductorRef: z87.string().min(1)
|
|
17711
17729
|
}).strict();
|
|
17712
|
-
var analogVoltageSweepParameterProps =
|
|
17730
|
+
var analogVoltageSweepParameterProps = z87.object({
|
|
17713
17731
|
...createAnalogSweepCoordinateProps(voltageSweepQuantity),
|
|
17714
|
-
parameterType:
|
|
17715
|
-
net:
|
|
17732
|
+
parameterType: z87.literal("voltage"),
|
|
17733
|
+
net: z87.string().min(1)
|
|
17716
17734
|
}).strict();
|
|
17717
|
-
var analogCurrentSweepParameterProps =
|
|
17735
|
+
var analogCurrentSweepParameterProps = z87.object({
|
|
17718
17736
|
...createAnalogSweepCoordinateProps(currentSweepQuantity),
|
|
17719
|
-
parameterType:
|
|
17720
|
-
currentSourceRef:
|
|
17737
|
+
parameterType: z87.literal("current"),
|
|
17738
|
+
currentSourceRef: z87.string().min(1)
|
|
17721
17739
|
}).strict();
|
|
17722
17740
|
var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
|
|
17723
17741
|
const hasExplicitSweepCoordinates = sweepCoordinates.values !== void 0;
|
|
@@ -17729,34 +17747,34 @@ var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
|
|
|
17729
17747
|
const hasRangeCoordinates = rangeCoordinateCount > 0;
|
|
17730
17748
|
if (hasExplicitSweepCoordinates === hasRangeCoordinates) {
|
|
17731
17749
|
context.addIssue({
|
|
17732
|
-
code:
|
|
17750
|
+
code: z87.ZodIssueCode.custom,
|
|
17733
17751
|
message: "Provide either values or start/stop/step"
|
|
17734
17752
|
});
|
|
17735
17753
|
return;
|
|
17736
17754
|
}
|
|
17737
17755
|
if (rangeCoordinateCount !== 0 && rangeCoordinateCount !== 3) {
|
|
17738
17756
|
context.addIssue({
|
|
17739
|
-
code:
|
|
17757
|
+
code: z87.ZodIssueCode.custom,
|
|
17740
17758
|
message: "start, stop, and step must be provided together"
|
|
17741
17759
|
});
|
|
17742
17760
|
return;
|
|
17743
17761
|
}
|
|
17744
17762
|
if (sweepCoordinates.step === 0) {
|
|
17745
17763
|
context.addIssue({
|
|
17746
|
-
code:
|
|
17764
|
+
code: z87.ZodIssueCode.custom,
|
|
17747
17765
|
path: ["step"],
|
|
17748
17766
|
message: "step must be nonzero"
|
|
17749
17767
|
});
|
|
17750
17768
|
}
|
|
17751
17769
|
if (sweepCoordinates.start !== void 0 && sweepCoordinates.stop !== void 0 && sweepCoordinates.step !== void 0 && Math.sign(sweepCoordinates.stop - sweepCoordinates.start) !== Math.sign(sweepCoordinates.step)) {
|
|
17752
17770
|
context.addIssue({
|
|
17753
|
-
code:
|
|
17771
|
+
code: z87.ZodIssueCode.custom,
|
|
17754
17772
|
path: ["step"],
|
|
17755
17773
|
message: "step must move from start toward stop"
|
|
17756
17774
|
});
|
|
17757
17775
|
}
|
|
17758
17776
|
};
|
|
17759
|
-
var analogSweepParameterProps =
|
|
17777
|
+
var analogSweepParameterProps = z87.discriminatedUnion("parameterType", [
|
|
17760
17778
|
analogResistanceSweepParameterProps,
|
|
17761
17779
|
analogCapacitanceSweepParameterProps,
|
|
17762
17780
|
analogInductanceSweepParameterProps,
|
|
@@ -17771,36 +17789,28 @@ expectTypesMatch(true);
|
|
|
17771
17789
|
expectTypesMatch(true);
|
|
17772
17790
|
|
|
17773
17791
|
// lib/components/autoroutingphase.ts
|
|
17774
|
-
import { z as
|
|
17775
|
-
|
|
17776
|
-
|
|
17777
|
-
|
|
17778
|
-
z87.object({ direction: ninePointAnchor })
|
|
17779
|
-
]);
|
|
17780
|
-
var autoroutingPhaseProps = z87.object({
|
|
17781
|
-
key: z87.any().optional(),
|
|
17782
|
-
name: z87.string().optional(),
|
|
17792
|
+
import { z as z88 } from "zod";
|
|
17793
|
+
var autoroutingPhaseProps = z88.object({
|
|
17794
|
+
key: z88.any().optional(),
|
|
17795
|
+
name: z88.string().optional(),
|
|
17783
17796
|
autorouter: autorouterProp.optional(),
|
|
17784
|
-
phaseIndex:
|
|
17797
|
+
phaseIndex: z88.number().optional(),
|
|
17785
17798
|
...routingTolerances.shape,
|
|
17786
|
-
region:
|
|
17787
|
-
shape:
|
|
17788
|
-
minX:
|
|
17789
|
-
maxX:
|
|
17790
|
-
minY:
|
|
17791
|
-
maxY:
|
|
17799
|
+
region: z88.object({
|
|
17800
|
+
shape: z88.literal("rect").optional(),
|
|
17801
|
+
minX: z88.number(),
|
|
17802
|
+
maxX: z88.number(),
|
|
17803
|
+
minY: z88.number(),
|
|
17804
|
+
maxY: z88.number()
|
|
17792
17805
|
}).optional(),
|
|
17793
|
-
connection:
|
|
17794
|
-
connections:
|
|
17795
|
-
reroute:
|
|
17796
|
-
|
|
17797
|
-
fanoutBoundaryPadding: fanoutBoundaryPadding.optional(),
|
|
17798
|
-
fanoutRoutingLayers: z87.array(layer_ref6).min(1).optional(),
|
|
17799
|
-
fanoutPourNetMap: z87.record(layer_ref6, z87.union([z87.string(), z87.array(z87.string()).min(1)])).optional()
|
|
17806
|
+
connection: z88.string().optional(),
|
|
17807
|
+
connections: z88.array(z88.string()).optional(),
|
|
17808
|
+
reroute: z88.boolean().optional(),
|
|
17809
|
+
...fanoutProps.shape
|
|
17800
17810
|
}).superRefine((value, ctx) => {
|
|
17801
17811
|
if (value.reroute !== void 0 && value.region === void 0 && value.connection === void 0 && value.connections === void 0) {
|
|
17802
17812
|
ctx.addIssue({
|
|
17803
|
-
code:
|
|
17813
|
+
code: z88.ZodIssueCode.custom,
|
|
17804
17814
|
message: "region, connection, or connections is required when reroute is provided",
|
|
17805
17815
|
path: ["region"]
|
|
17806
17816
|
});
|
|
@@ -17809,15 +17819,15 @@ var autoroutingPhaseProps = z87.object({
|
|
|
17809
17819
|
expectTypesMatch(true);
|
|
17810
17820
|
|
|
17811
17821
|
// lib/components/spicemodel.ts
|
|
17812
|
-
import { z as
|
|
17813
|
-
var spicemodelProps =
|
|
17814
|
-
source:
|
|
17815
|
-
spicePinMapping:
|
|
17822
|
+
import { z as z89 } from "zod";
|
|
17823
|
+
var spicemodelProps = z89.object({
|
|
17824
|
+
source: z89.string(),
|
|
17825
|
+
spicePinMapping: z89.record(z89.string(), z89.string()).optional()
|
|
17816
17826
|
});
|
|
17817
17827
|
expectTypesMatch(true);
|
|
17818
17828
|
|
|
17819
17829
|
// lib/components/transistor.ts
|
|
17820
|
-
import { z as
|
|
17830
|
+
import { z as z90 } from "zod";
|
|
17821
17831
|
var transistorPinsLabels = [
|
|
17822
17832
|
"pin1",
|
|
17823
17833
|
"pin2",
|
|
@@ -17830,7 +17840,7 @@ var transistorPinsLabels = [
|
|
|
17830
17840
|
"drain"
|
|
17831
17841
|
];
|
|
17832
17842
|
var transistorProps = commonComponentProps.extend({
|
|
17833
|
-
type:
|
|
17843
|
+
type: z90.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
|
|
17834
17844
|
connections: createConnectionsProp(transistorPinsLabels).optional()
|
|
17835
17845
|
});
|
|
17836
17846
|
var transistorPins = [
|
|
@@ -17844,7 +17854,7 @@ var transistorPins = [
|
|
|
17844
17854
|
expectTypesMatch(true);
|
|
17845
17855
|
|
|
17846
17856
|
// lib/components/mosfet.ts
|
|
17847
|
-
import { z as
|
|
17857
|
+
import { z as z91 } from "zod";
|
|
17848
17858
|
var mosfetPins = [
|
|
17849
17859
|
"pin1",
|
|
17850
17860
|
"drain",
|
|
@@ -17854,11 +17864,11 @@ var mosfetPins = [
|
|
|
17854
17864
|
"gate"
|
|
17855
17865
|
];
|
|
17856
17866
|
var mosfetProps = commonComponentProps.extend({
|
|
17857
|
-
channelType:
|
|
17858
|
-
mosfetMode:
|
|
17859
|
-
symbolDrainSide:
|
|
17860
|
-
symbolSourceSide:
|
|
17861
|
-
symbolGateSide:
|
|
17867
|
+
channelType: z91.enum(["n", "p"]),
|
|
17868
|
+
mosfetMode: z91.enum(["enhancement", "depletion"]),
|
|
17869
|
+
symbolDrainSide: z91.enum(["left", "right", "top", "bottom"]).optional(),
|
|
17870
|
+
symbolSourceSide: z91.enum(["left", "right", "top", "bottom"]).optional(),
|
|
17871
|
+
symbolGateSide: z91.enum(["left", "right", "top", "bottom"]).optional(),
|
|
17862
17872
|
connections: createConnectionsProp(mosfetPins).optional()
|
|
17863
17873
|
});
|
|
17864
17874
|
expectTypesMatch(true);
|
|
@@ -17880,29 +17890,29 @@ expectTypesMatch(true);
|
|
|
17880
17890
|
|
|
17881
17891
|
// lib/components/inductor.ts
|
|
17882
17892
|
import { inductance as inductance2 } from "circuit-json";
|
|
17883
|
-
import { z as
|
|
17893
|
+
import { z as z93 } from "zod";
|
|
17884
17894
|
var inductorPins = lrPins;
|
|
17885
17895
|
var inductorProps = commonComponentProps.extend({
|
|
17886
17896
|
inductance: inductance2,
|
|
17887
|
-
maxCurrentRating:
|
|
17897
|
+
maxCurrentRating: z93.union([z93.string(), z93.number()]).optional(),
|
|
17888
17898
|
schOrientation: schematicOrientation.optional(),
|
|
17889
17899
|
connections: createConnectionsProp(inductorPins).optional()
|
|
17890
17900
|
});
|
|
17891
17901
|
expectTypesMatch(true);
|
|
17892
17902
|
|
|
17893
17903
|
// lib/components/internal-circuit.ts
|
|
17894
|
-
import { z as
|
|
17895
|
-
var internalCircuitProps =
|
|
17896
|
-
children:
|
|
17904
|
+
import { z as z94 } from "zod";
|
|
17905
|
+
var internalCircuitProps = z94.object({
|
|
17906
|
+
children: z94.custom().optional()
|
|
17897
17907
|
});
|
|
17898
17908
|
expectTypesMatch(
|
|
17899
17909
|
true
|
|
17900
17910
|
);
|
|
17901
17911
|
|
|
17902
17912
|
// lib/components/diode.ts
|
|
17903
|
-
import { z as
|
|
17913
|
+
import { z as z95 } from "zod";
|
|
17904
17914
|
var diodePins = lrPolarPins;
|
|
17905
|
-
var diodeConnectionKeys =
|
|
17915
|
+
var diodeConnectionKeys = z95.enum([
|
|
17906
17916
|
"anode",
|
|
17907
17917
|
"cathode",
|
|
17908
17918
|
"pin1",
|
|
@@ -17910,13 +17920,13 @@ var diodeConnectionKeys = z94.enum([
|
|
|
17910
17920
|
"pos",
|
|
17911
17921
|
"neg"
|
|
17912
17922
|
]);
|
|
17913
|
-
var connectionTarget3 =
|
|
17914
|
-
var connectionsProp2 =
|
|
17915
|
-
var diodePinLabelsProp =
|
|
17916
|
-
|
|
17917
|
-
schematicPinLabel.or(
|
|
17923
|
+
var connectionTarget3 = z95.string().or(z95.array(z95.string()).readonly()).or(z95.array(z95.string()));
|
|
17924
|
+
var connectionsProp2 = z95.record(diodeConnectionKeys, connectionTarget3);
|
|
17925
|
+
var diodePinLabelsProp = z95.record(
|
|
17926
|
+
z95.enum(diodePins),
|
|
17927
|
+
schematicPinLabel.or(z95.array(schematicPinLabel).readonly()).or(z95.array(schematicPinLabel))
|
|
17918
17928
|
);
|
|
17919
|
-
var diodeVariant =
|
|
17929
|
+
var diodeVariant = z95.enum([
|
|
17920
17930
|
"standard",
|
|
17921
17931
|
"schottky",
|
|
17922
17932
|
"zener",
|
|
@@ -17927,12 +17937,12 @@ var diodeVariant = z94.enum([
|
|
|
17927
17937
|
var diodeProps = commonComponentProps.extend({
|
|
17928
17938
|
connections: connectionsProp2.optional(),
|
|
17929
17939
|
variant: diodeVariant.optional().default("standard"),
|
|
17930
|
-
standard:
|
|
17931
|
-
schottky:
|
|
17932
|
-
zener:
|
|
17933
|
-
avalanche:
|
|
17934
|
-
photo:
|
|
17935
|
-
tvs:
|
|
17940
|
+
standard: z95.boolean().optional(),
|
|
17941
|
+
schottky: z95.boolean().optional(),
|
|
17942
|
+
zener: z95.boolean().optional(),
|
|
17943
|
+
avalanche: z95.boolean().optional(),
|
|
17944
|
+
photo: z95.boolean().optional(),
|
|
17945
|
+
tvs: z95.boolean().optional(),
|
|
17936
17946
|
schOrientation: schematicOrientation.optional(),
|
|
17937
17947
|
pinLabels: diodePinLabelsProp.optional()
|
|
17938
17948
|
}).superRefine((data, ctx) => {
|
|
@@ -17946,11 +17956,11 @@ var diodeProps = commonComponentProps.extend({
|
|
|
17946
17956
|
].filter(Boolean).length;
|
|
17947
17957
|
if (enabledFlags > 1) {
|
|
17948
17958
|
ctx.addIssue({
|
|
17949
|
-
code:
|
|
17959
|
+
code: z95.ZodIssueCode.custom,
|
|
17950
17960
|
message: "Exactly one diode variant must be enabled",
|
|
17951
17961
|
path: []
|
|
17952
17962
|
});
|
|
17953
|
-
return
|
|
17963
|
+
return z95.INVALID;
|
|
17954
17964
|
}
|
|
17955
17965
|
}).transform((data) => {
|
|
17956
17966
|
const result = {
|
|
@@ -17996,34 +18006,34 @@ var diodeProps = commonComponentProps.extend({
|
|
|
17996
18006
|
expectTypesMatch(true);
|
|
17997
18007
|
|
|
17998
18008
|
// lib/components/led.ts
|
|
17999
|
-
import { z as
|
|
18009
|
+
import { z as z96 } from "zod";
|
|
18000
18010
|
var ledProps = commonComponentProps.extend({
|
|
18001
|
-
color:
|
|
18002
|
-
wavelength:
|
|
18003
|
-
schDisplayValue:
|
|
18011
|
+
color: z96.string().optional(),
|
|
18012
|
+
wavelength: z96.string().optional(),
|
|
18013
|
+
schDisplayValue: z96.string().optional(),
|
|
18004
18014
|
schOrientation: schematicOrientation.optional(),
|
|
18005
18015
|
connections: createConnectionsProp(lrPolarPins).optional(),
|
|
18006
|
-
laser:
|
|
18016
|
+
laser: z96.boolean().optional()
|
|
18007
18017
|
});
|
|
18008
18018
|
var ledPins = lrPolarPins;
|
|
18009
18019
|
|
|
18010
18020
|
// lib/components/switch.ts
|
|
18011
18021
|
import { ms as ms3, frequency as frequency4 } from "circuit-json";
|
|
18012
|
-
import { z as
|
|
18022
|
+
import { z as z97 } from "zod";
|
|
18013
18023
|
var switchProps = commonComponentProps.extend({
|
|
18014
|
-
type:
|
|
18015
|
-
isNormallyClosed:
|
|
18016
|
-
spst:
|
|
18017
|
-
spdt:
|
|
18018
|
-
dpst:
|
|
18019
|
-
dpdt:
|
|
18024
|
+
type: z97.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
|
|
18025
|
+
isNormallyClosed: z97.boolean().optional().default(false),
|
|
18026
|
+
spst: z97.boolean().optional(),
|
|
18027
|
+
spdt: z97.boolean().optional(),
|
|
18028
|
+
dpst: z97.boolean().optional(),
|
|
18029
|
+
dpdt: z97.boolean().optional(),
|
|
18020
18030
|
pinLabels: pinLabelsProp.optional(),
|
|
18021
18031
|
simSwitchFrequency: frequency4.optional(),
|
|
18022
18032
|
simCloseAt: ms3.optional(),
|
|
18023
18033
|
simOpenAt: ms3.optional(),
|
|
18024
|
-
simStartClosed:
|
|
18025
|
-
simStartOpen:
|
|
18026
|
-
connections:
|
|
18034
|
+
simStartClosed: z97.boolean().optional(),
|
|
18035
|
+
simStartOpen: z97.boolean().optional(),
|
|
18036
|
+
connections: z97.custom().pipe(z97.record(z97.string(), connectionTarget)).optional()
|
|
18027
18037
|
}).transform((props) => {
|
|
18028
18038
|
const updatedProps = { ...props };
|
|
18029
18039
|
if (updatedProps.dpdt) {
|
|
@@ -18055,33 +18065,33 @@ expectTypesMatch(true);
|
|
|
18055
18065
|
|
|
18056
18066
|
// lib/components/fabrication-note-text.ts
|
|
18057
18067
|
import { length as length4 } from "circuit-json";
|
|
18058
|
-
import { z as
|
|
18068
|
+
import { z as z98 } from "zod";
|
|
18059
18069
|
var fabricationNoteTextProps = pcbLayoutProps.extend({
|
|
18060
|
-
text:
|
|
18061
|
-
anchorAlignment:
|
|
18062
|
-
font:
|
|
18070
|
+
text: z98.string(),
|
|
18071
|
+
anchorAlignment: z98.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
18072
|
+
font: z98.enum(["tscircuit2024"]).optional(),
|
|
18063
18073
|
fontSize: length4.optional(),
|
|
18064
|
-
color:
|
|
18074
|
+
color: z98.string().optional()
|
|
18065
18075
|
});
|
|
18066
18076
|
expectTypesMatch(true);
|
|
18067
18077
|
|
|
18068
18078
|
// lib/components/fabrication-note-rect.ts
|
|
18069
18079
|
import { distance as distance20 } from "circuit-json";
|
|
18070
|
-
import { z as
|
|
18080
|
+
import { z as z99 } from "zod";
|
|
18071
18081
|
var fabricationNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18072
18082
|
width: distance20,
|
|
18073
18083
|
height: distance20,
|
|
18074
18084
|
strokeWidth: distance20.optional(),
|
|
18075
|
-
isFilled:
|
|
18076
|
-
hasStroke:
|
|
18077
|
-
isStrokeDashed:
|
|
18078
|
-
color:
|
|
18085
|
+
isFilled: z99.boolean().optional(),
|
|
18086
|
+
hasStroke: z99.boolean().optional(),
|
|
18087
|
+
isStrokeDashed: z99.boolean().optional(),
|
|
18088
|
+
color: z99.string().optional(),
|
|
18079
18089
|
cornerRadius: distance20.optional()
|
|
18080
18090
|
});
|
|
18081
18091
|
|
|
18082
18092
|
// lib/components/fabrication-note-path.ts
|
|
18083
18093
|
import { length as length5, route_hint_point as route_hint_point3 } from "circuit-json";
|
|
18084
|
-
import { z as
|
|
18094
|
+
import { z as z100 } from "zod";
|
|
18085
18095
|
var fabricationNotePathProps = pcbLayoutProps.omit({
|
|
18086
18096
|
pcbLeftEdgeX: true,
|
|
18087
18097
|
pcbRightEdgeX: true,
|
|
@@ -18093,15 +18103,15 @@ var fabricationNotePathProps = pcbLayoutProps.omit({
|
|
|
18093
18103
|
pcbOffsetY: true,
|
|
18094
18104
|
pcbRotation: true
|
|
18095
18105
|
}).extend({
|
|
18096
|
-
route:
|
|
18106
|
+
route: z100.array(route_hint_point3),
|
|
18097
18107
|
strokeWidth: length5.optional(),
|
|
18098
|
-
color:
|
|
18108
|
+
color: z100.string().optional()
|
|
18099
18109
|
});
|
|
18100
18110
|
|
|
18101
18111
|
// lib/components/fabrication-note-dimension.ts
|
|
18102
18112
|
import { distance as distance21, length as length6 } from "circuit-json";
|
|
18103
|
-
import { z as
|
|
18104
|
-
var dimensionTarget =
|
|
18113
|
+
import { z as z101 } from "zod";
|
|
18114
|
+
var dimensionTarget = z101.union([z101.string(), point]);
|
|
18105
18115
|
var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
18106
18116
|
pcbLeftEdgeX: true,
|
|
18107
18117
|
pcbRightEdgeX: true,
|
|
@@ -18115,54 +18125,54 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
18115
18125
|
}).extend({
|
|
18116
18126
|
from: dimensionTarget,
|
|
18117
18127
|
to: dimensionTarget,
|
|
18118
|
-
text:
|
|
18128
|
+
text: z101.string().optional(),
|
|
18119
18129
|
offset: distance21.optional(),
|
|
18120
|
-
font:
|
|
18130
|
+
font: z101.enum(["tscircuit2024"]).optional(),
|
|
18121
18131
|
fontSize: length6.optional(),
|
|
18122
|
-
color:
|
|
18132
|
+
color: z101.string().optional(),
|
|
18123
18133
|
arrowSize: distance21.optional(),
|
|
18124
|
-
units:
|
|
18125
|
-
outerEdgeToEdge:
|
|
18126
|
-
centerToCenter:
|
|
18127
|
-
innerEdgeToEdge:
|
|
18134
|
+
units: z101.enum(["in", "mm"]).optional(),
|
|
18135
|
+
outerEdgeToEdge: z101.literal(true).optional(),
|
|
18136
|
+
centerToCenter: z101.literal(true).optional(),
|
|
18137
|
+
innerEdgeToEdge: z101.literal(true).optional()
|
|
18128
18138
|
});
|
|
18129
18139
|
expectTypesMatch(true);
|
|
18130
18140
|
|
|
18131
18141
|
// lib/components/pcb-trace.ts
|
|
18132
18142
|
import { distance as distance22, route_hint_point as route_hint_point4 } from "circuit-json";
|
|
18133
|
-
import { z as
|
|
18134
|
-
var pcbTraceProps =
|
|
18135
|
-
layer:
|
|
18143
|
+
import { z as z102 } from "zod";
|
|
18144
|
+
var pcbTraceProps = z102.object({
|
|
18145
|
+
layer: z102.string().optional(),
|
|
18136
18146
|
thickness: distance22.optional(),
|
|
18137
|
-
route:
|
|
18147
|
+
route: z102.array(route_hint_point4)
|
|
18138
18148
|
});
|
|
18139
18149
|
|
|
18140
18150
|
// lib/components/via.ts
|
|
18141
18151
|
import { distance as distance23, layer_ref as layer_ref7 } from "circuit-json";
|
|
18142
|
-
import { z as
|
|
18152
|
+
import { z as z103 } from "zod";
|
|
18143
18153
|
var viaProps = commonLayoutProps.extend({
|
|
18144
|
-
name:
|
|
18154
|
+
name: z103.string().optional(),
|
|
18145
18155
|
fromLayer: layer_ref7.optional(),
|
|
18146
18156
|
toLayer: layer_ref7.optional(),
|
|
18147
18157
|
holeDiameter: distance23.optional(),
|
|
18148
18158
|
outerDiameter: distance23.optional(),
|
|
18149
|
-
layers:
|
|
18150
|
-
connectsTo:
|
|
18151
|
-
netIsAssignable:
|
|
18159
|
+
layers: z103.array(layer_ref7).optional(),
|
|
18160
|
+
connectsTo: z103.string().or(z103.array(z103.string())).optional(),
|
|
18161
|
+
netIsAssignable: z103.boolean().optional()
|
|
18152
18162
|
});
|
|
18153
18163
|
expectTypesMatch(true);
|
|
18154
18164
|
|
|
18155
18165
|
// lib/components/testpoint.ts
|
|
18156
18166
|
import { distance as distance24 } from "circuit-json";
|
|
18157
|
-
import { z as
|
|
18167
|
+
import { z as z104 } from "zod";
|
|
18158
18168
|
var testpointPins = ["pin1"];
|
|
18159
|
-
var testpointConnectionsProp =
|
|
18169
|
+
var testpointConnectionsProp = z104.object({
|
|
18160
18170
|
pin1: connectionTarget
|
|
18161
18171
|
}).strict();
|
|
18162
18172
|
var testpointProps = commonComponentProps.extend({
|
|
18163
18173
|
connections: testpointConnectionsProp.optional(),
|
|
18164
|
-
footprintVariant:
|
|
18165
|
-
padShape:
|
|
18174
|
+
footprintVariant: z104.enum(["pad", "through_hole"]).optional(),
|
|
18175
|
+
padShape: z104.enum(["rect", "circle"]).optional().default("circle"),
|
|
18166
18176
|
padDiameter: distance24.optional(),
|
|
18167
18177
|
holeDiameter: distance24.optional(),
|
|
18168
18178
|
width: distance24.optional(),
|
|
@@ -18174,45 +18184,45 @@ var testpointProps = commonComponentProps.extend({
|
|
|
18174
18184
|
expectTypesMatch(true);
|
|
18175
18185
|
|
|
18176
18186
|
// lib/components/breakoutpoint.ts
|
|
18177
|
-
import { z as
|
|
18187
|
+
import { z as z105 } from "zod";
|
|
18178
18188
|
var breakoutPointProps = pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
18179
|
-
connection:
|
|
18189
|
+
connection: z105.string()
|
|
18180
18190
|
});
|
|
18181
18191
|
expectTypesMatch(true);
|
|
18182
18192
|
|
|
18183
18193
|
// lib/components/pcb-keepout.ts
|
|
18184
18194
|
import { distance as distance25, layer_ref as layer_ref8 } from "circuit-json";
|
|
18185
|
-
import { z as
|
|
18186
|
-
var pcbKeepoutProps =
|
|
18195
|
+
import { z as z106 } from "zod";
|
|
18196
|
+
var pcbKeepoutProps = z106.union([
|
|
18187
18197
|
pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18188
|
-
shape:
|
|
18198
|
+
shape: z106.literal("circle"),
|
|
18189
18199
|
radius: distance25,
|
|
18190
|
-
layers:
|
|
18200
|
+
layers: z106.array(layer_ref8).optional()
|
|
18191
18201
|
}),
|
|
18192
18202
|
pcbLayoutProps.extend({
|
|
18193
|
-
shape:
|
|
18203
|
+
shape: z106.literal("rect"),
|
|
18194
18204
|
width: distance25,
|
|
18195
18205
|
height: distance25,
|
|
18196
|
-
layers:
|
|
18206
|
+
layers: z106.array(layer_ref8).optional()
|
|
18197
18207
|
})
|
|
18198
18208
|
]);
|
|
18199
18209
|
|
|
18200
18210
|
// lib/components/courtyard-rect.ts
|
|
18201
18211
|
import { distance as distance26 } from "circuit-json";
|
|
18202
|
-
import { z as
|
|
18212
|
+
import { z as z107 } from "zod";
|
|
18203
18213
|
var courtyardRectProps = pcbLayoutProps.extend({
|
|
18204
18214
|
width: distance26,
|
|
18205
18215
|
height: distance26,
|
|
18206
18216
|
strokeWidth: distance26.optional(),
|
|
18207
|
-
isFilled:
|
|
18208
|
-
hasStroke:
|
|
18209
|
-
isStrokeDashed:
|
|
18210
|
-
color:
|
|
18217
|
+
isFilled: z107.boolean().optional(),
|
|
18218
|
+
hasStroke: z107.boolean().optional(),
|
|
18219
|
+
isStrokeDashed: z107.boolean().optional(),
|
|
18220
|
+
color: z107.string().optional()
|
|
18211
18221
|
});
|
|
18212
18222
|
|
|
18213
18223
|
// lib/components/courtyard-outline.ts
|
|
18214
18224
|
import { length as length7 } from "circuit-json";
|
|
18215
|
-
import { z as
|
|
18225
|
+
import { z as z108 } from "zod";
|
|
18216
18226
|
var courtyardOutlineProps = pcbLayoutProps.omit({
|
|
18217
18227
|
pcbLeftEdgeX: true,
|
|
18218
18228
|
pcbRightEdgeX: true,
|
|
@@ -18224,11 +18234,11 @@ var courtyardOutlineProps = pcbLayoutProps.omit({
|
|
|
18224
18234
|
pcbOffsetY: true,
|
|
18225
18235
|
pcbRotation: true
|
|
18226
18236
|
}).extend({
|
|
18227
|
-
outline:
|
|
18237
|
+
outline: z108.array(point),
|
|
18228
18238
|
strokeWidth: length7.optional(),
|
|
18229
|
-
isClosed:
|
|
18230
|
-
isStrokeDashed:
|
|
18231
|
-
color:
|
|
18239
|
+
isClosed: z108.boolean().optional(),
|
|
18240
|
+
isStrokeDashed: z108.boolean().optional(),
|
|
18241
|
+
color: z108.string().optional()
|
|
18232
18242
|
});
|
|
18233
18243
|
|
|
18234
18244
|
// lib/components/courtyard-circle.ts
|
|
@@ -18248,35 +18258,35 @@ var courtyardPillProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
18248
18258
|
});
|
|
18249
18259
|
|
|
18250
18260
|
// lib/components/copper-pour.ts
|
|
18251
|
-
import { z as
|
|
18261
|
+
import { z as z111 } from "zod";
|
|
18252
18262
|
import { layer_ref as layer_ref9 } from "circuit-json";
|
|
18253
|
-
var copperPourProps =
|
|
18254
|
-
name:
|
|
18263
|
+
var copperPourProps = z111.object({
|
|
18264
|
+
name: z111.string().optional(),
|
|
18255
18265
|
layer: layer_ref9,
|
|
18256
|
-
connectsTo:
|
|
18257
|
-
unbroken:
|
|
18266
|
+
connectsTo: z111.string(),
|
|
18267
|
+
unbroken: z111.boolean().optional(),
|
|
18258
18268
|
padMargin: distance.optional(),
|
|
18259
18269
|
traceMargin: distance.optional(),
|
|
18260
18270
|
clearance: distance.optional(),
|
|
18261
18271
|
boardEdgeMargin: distance.optional(),
|
|
18262
18272
|
cutoutMargin: distance.optional(),
|
|
18263
|
-
outline:
|
|
18264
|
-
coveredWithSolderMask:
|
|
18273
|
+
outline: z111.array(point).optional(),
|
|
18274
|
+
coveredWithSolderMask: z111.boolean().optional().default(true)
|
|
18265
18275
|
});
|
|
18266
18276
|
expectTypesMatch(true);
|
|
18267
18277
|
|
|
18268
18278
|
// lib/components/cadassembly.ts
|
|
18269
18279
|
import { layer_ref as layer_ref10 } from "circuit-json";
|
|
18270
|
-
import { z as
|
|
18271
|
-
var cadassemblyProps =
|
|
18280
|
+
import { z as z112 } from "zod";
|
|
18281
|
+
var cadassemblyProps = z112.object({
|
|
18272
18282
|
originalLayer: layer_ref10.default("top").optional(),
|
|
18273
|
-
children:
|
|
18283
|
+
children: z112.any().optional()
|
|
18274
18284
|
});
|
|
18275
18285
|
expectTypesMatch(true);
|
|
18276
18286
|
|
|
18277
18287
|
// lib/components/cadmodel.ts
|
|
18278
|
-
import { z as
|
|
18279
|
-
var pcbPosition =
|
|
18288
|
+
import { z as z113 } from "zod";
|
|
18289
|
+
var pcbPosition = z113.object({
|
|
18280
18290
|
pcbX: pcbCoordinate.optional(),
|
|
18281
18291
|
pcbY: pcbCoordinate.optional(),
|
|
18282
18292
|
pcbLeftEdgeX: pcbCoordinate.optional(),
|
|
@@ -18293,7 +18303,7 @@ var cadModelBaseWithUrl = cadModelBase.extend({
|
|
|
18293
18303
|
});
|
|
18294
18304
|
var cadModelObject = cadModelBaseWithUrl.merge(pcbPosition);
|
|
18295
18305
|
expectTypesMatch(true);
|
|
18296
|
-
var cadmodelProps =
|
|
18306
|
+
var cadmodelProps = z113.union([z113.null(), url, cadModelObject]);
|
|
18297
18307
|
|
|
18298
18308
|
// lib/components/power-source.ts
|
|
18299
18309
|
import { voltage as voltage5 } from "circuit-json";
|
|
@@ -18303,9 +18313,9 @@ var powerSourceProps = commonComponentProps.extend({
|
|
|
18303
18313
|
|
|
18304
18314
|
// lib/components/voltagesource.ts
|
|
18305
18315
|
import { frequency as frequency5, ms as ms4, rotation as rotation5, voltage as voltage6 } from "circuit-json";
|
|
18306
|
-
import { z as
|
|
18316
|
+
import { z as z114 } from "zod";
|
|
18307
18317
|
var voltageSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
18308
|
-
var percentage =
|
|
18318
|
+
var percentage = z114.union([z114.string(), z114.number()]).transform((val) => {
|
|
18309
18319
|
if (typeof val === "string") {
|
|
18310
18320
|
if (val.endsWith("%")) {
|
|
18311
18321
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -18314,13 +18324,13 @@ var percentage = z113.union([z113.string(), z113.number()]).transform((val) => {
|
|
|
18314
18324
|
}
|
|
18315
18325
|
return val;
|
|
18316
18326
|
}).pipe(
|
|
18317
|
-
|
|
18327
|
+
z114.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
18318
18328
|
);
|
|
18319
18329
|
var voltageSourceProps = commonComponentProps.extend({
|
|
18320
18330
|
voltage: voltage6.optional(),
|
|
18321
18331
|
frequency: frequency5.optional(),
|
|
18322
18332
|
peakToPeakVoltage: voltage6.optional(),
|
|
18323
|
-
waveShape:
|
|
18333
|
+
waveShape: z114.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
18324
18334
|
phase: rotation5.optional(),
|
|
18325
18335
|
dutyCycle: percentage.optional(),
|
|
18326
18336
|
pulseDelay: ms4.optional(),
|
|
@@ -18337,9 +18347,9 @@ expectTypesMatch(true);
|
|
|
18337
18347
|
|
|
18338
18348
|
// lib/components/currentsource.ts
|
|
18339
18349
|
import { frequency as frequency6, rotation as rotation6, current as current3 } from "circuit-json";
|
|
18340
|
-
import { z as
|
|
18350
|
+
import { z as z115 } from "zod";
|
|
18341
18351
|
var currentSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
18342
|
-
var percentage2 =
|
|
18352
|
+
var percentage2 = z115.union([z115.string(), z115.number()]).transform((val) => {
|
|
18343
18353
|
if (typeof val === "string") {
|
|
18344
18354
|
if (val.endsWith("%")) {
|
|
18345
18355
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -18348,13 +18358,13 @@ var percentage2 = z114.union([z114.string(), z114.number()]).transform((val) =>
|
|
|
18348
18358
|
}
|
|
18349
18359
|
return val;
|
|
18350
18360
|
}).pipe(
|
|
18351
|
-
|
|
18361
|
+
z115.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
18352
18362
|
);
|
|
18353
18363
|
var currentSourceProps = commonComponentProps.extend({
|
|
18354
18364
|
current: current3.optional(),
|
|
18355
18365
|
frequency: frequency6.optional(),
|
|
18356
18366
|
peakToPeakCurrent: current3.optional(),
|
|
18357
|
-
waveShape:
|
|
18367
|
+
waveShape: z115.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
18358
18368
|
phase: rotation6.optional(),
|
|
18359
18369
|
dutyCycle: percentage2.optional(),
|
|
18360
18370
|
acMagnitude: current3.optional(),
|
|
@@ -18365,21 +18375,21 @@ var currentSourcePins = lrPolarPins;
|
|
|
18365
18375
|
expectTypesMatch(true);
|
|
18366
18376
|
|
|
18367
18377
|
// lib/components/voltageprobe.ts
|
|
18368
|
-
import { z as
|
|
18378
|
+
import { z as z116 } from "zod";
|
|
18369
18379
|
var voltageProbeProps = commonComponentProps.omit({ name: true }).extend({
|
|
18370
|
-
name:
|
|
18371
|
-
connectsTo:
|
|
18372
|
-
referenceTo:
|
|
18373
|
-
color:
|
|
18374
|
-
graphDisplayName:
|
|
18375
|
-
graphCenter:
|
|
18376
|
-
graphVerticalOffset:
|
|
18377
|
-
graphVoltagePerDiv:
|
|
18380
|
+
name: z116.string().optional(),
|
|
18381
|
+
connectsTo: z116.string(),
|
|
18382
|
+
referenceTo: z116.string().optional(),
|
|
18383
|
+
color: z116.string().optional(),
|
|
18384
|
+
graphDisplayName: z116.string().optional(),
|
|
18385
|
+
graphCenter: z116.number().optional(),
|
|
18386
|
+
graphVerticalOffset: z116.number().or(z116.string()).optional(),
|
|
18387
|
+
graphVoltagePerDiv: z116.number().or(z116.string()).optional()
|
|
18378
18388
|
});
|
|
18379
18389
|
expectTypesMatch(true);
|
|
18380
18390
|
|
|
18381
18391
|
// lib/components/ammeter.ts
|
|
18382
|
-
import { z as
|
|
18392
|
+
import { z as z117 } from "zod";
|
|
18383
18393
|
var ammeterPinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
18384
18394
|
var hasAmmeterConnectionPair = (connections) => {
|
|
18385
18395
|
return connections.pos !== void 0 && connections.neg !== void 0 || connections.pin1 !== void 0 && connections.pin2 !== void 0;
|
|
@@ -18389,63 +18399,63 @@ var ammeterProps = commonComponentProps.extend({
|
|
|
18389
18399
|
hasAmmeterConnectionPair,
|
|
18390
18400
|
"Ammeter connections must include either pos/neg or pin1/pin2"
|
|
18391
18401
|
),
|
|
18392
|
-
color:
|
|
18393
|
-
graphDisplayName:
|
|
18394
|
-
graphCenter:
|
|
18395
|
-
graphVerticalOffset:
|
|
18396
|
-
graphCurrentPerDiv:
|
|
18402
|
+
color: z117.string().optional(),
|
|
18403
|
+
graphDisplayName: z117.string().optional(),
|
|
18404
|
+
graphCenter: z117.number().optional(),
|
|
18405
|
+
graphVerticalOffset: z117.number().or(z117.string()).optional(),
|
|
18406
|
+
graphCurrentPerDiv: z117.number().or(z117.string()).optional()
|
|
18397
18407
|
});
|
|
18398
18408
|
var ammeterPins = ammeterPinLabels;
|
|
18399
18409
|
expectTypesMatch(true);
|
|
18400
18410
|
|
|
18401
18411
|
// lib/components/schematic-arc.ts
|
|
18402
18412
|
import { distance as distance29, point as point5, rotation as rotation7 } from "circuit-json";
|
|
18403
|
-
import { z as
|
|
18404
|
-
var schematicArcProps =
|
|
18413
|
+
import { z as z118 } from "zod";
|
|
18414
|
+
var schematicArcProps = z118.object({
|
|
18405
18415
|
center: point5,
|
|
18406
18416
|
radius: distance29,
|
|
18407
18417
|
startAngleDegrees: rotation7,
|
|
18408
18418
|
endAngleDegrees: rotation7,
|
|
18409
|
-
direction:
|
|
18419
|
+
direction: z118.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
18410
18420
|
strokeWidth: distance29.optional(),
|
|
18411
|
-
color:
|
|
18412
|
-
isDashed:
|
|
18421
|
+
color: z118.string().optional(),
|
|
18422
|
+
isDashed: z118.boolean().optional().default(false)
|
|
18413
18423
|
});
|
|
18414
18424
|
expectTypesMatch(true);
|
|
18415
18425
|
|
|
18416
18426
|
// lib/components/toolingrail.ts
|
|
18417
|
-
import { z as
|
|
18418
|
-
var toolingrailProps =
|
|
18419
|
-
children:
|
|
18427
|
+
import { z as z119 } from "zod";
|
|
18428
|
+
var toolingrailProps = z119.object({
|
|
18429
|
+
children: z119.any().optional()
|
|
18420
18430
|
});
|
|
18421
18431
|
expectTypesMatch(true);
|
|
18422
18432
|
|
|
18423
18433
|
// lib/components/schematic-box.ts
|
|
18424
18434
|
import { distance as distance30 } from "circuit-json";
|
|
18425
|
-
import { z as
|
|
18426
|
-
var schematicBoxProps =
|
|
18427
|
-
name:
|
|
18428
|
-
chipRef:
|
|
18435
|
+
import { z as z120 } from "zod";
|
|
18436
|
+
var schematicBoxProps = z120.object({
|
|
18437
|
+
name: z120.string().optional(),
|
|
18438
|
+
chipRef: z120.string().optional(),
|
|
18429
18439
|
pinLabels: pinLabelsProp.optional(),
|
|
18430
18440
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
18431
18441
|
schX: distance30.optional(),
|
|
18432
18442
|
schY: distance30.optional(),
|
|
18433
|
-
schSectionName:
|
|
18434
|
-
schSheetName:
|
|
18443
|
+
schSectionName: z120.string().optional(),
|
|
18444
|
+
schSheetName: z120.string().optional(),
|
|
18435
18445
|
width: distance30.optional(),
|
|
18436
18446
|
height: distance30.optional(),
|
|
18437
|
-
overlay:
|
|
18447
|
+
overlay: z120.array(z120.string()).optional(),
|
|
18438
18448
|
padding: distance30.optional(),
|
|
18439
18449
|
paddingLeft: distance30.optional(),
|
|
18440
18450
|
paddingRight: distance30.optional(),
|
|
18441
18451
|
paddingTop: distance30.optional(),
|
|
18442
18452
|
paddingBottom: distance30.optional(),
|
|
18443
|
-
title:
|
|
18453
|
+
title: z120.string().optional(),
|
|
18444
18454
|
titleAlignment: ninePointAnchor.default("top_left"),
|
|
18445
|
-
titleColor:
|
|
18455
|
+
titleColor: z120.string().optional(),
|
|
18446
18456
|
titleFontSize: distance30.optional(),
|
|
18447
|
-
titleInside:
|
|
18448
|
-
strokeStyle:
|
|
18457
|
+
titleInside: z120.boolean().default(false),
|
|
18458
|
+
strokeStyle: z120.enum(["solid", "dashed"]).default("solid")
|
|
18449
18459
|
}).refine(
|
|
18450
18460
|
(elm) => elm.width !== void 0 && elm.height !== void 0 || Array.isArray(elm.overlay) && elm.overlay.length > 0,
|
|
18451
18461
|
{
|
|
@@ -18461,21 +18471,21 @@ expectTypesMatch(true);
|
|
|
18461
18471
|
|
|
18462
18472
|
// lib/components/schematic-symbol.ts
|
|
18463
18473
|
import { rotation as rotation8 } from "circuit-json";
|
|
18464
|
-
import { z as
|
|
18465
|
-
var schematicSymbolConnections =
|
|
18474
|
+
import { z as z121 } from "zod";
|
|
18475
|
+
var schematicSymbolConnections = z121.custom().pipe(z121.record(z121.string(), connectionTarget)).refine((value) => Object.keys(value).length > 0, {
|
|
18466
18476
|
message: "connections must map at least one schematic symbol port"
|
|
18467
18477
|
});
|
|
18468
|
-
var schematicSymbolProps =
|
|
18469
|
-
name:
|
|
18470
|
-
displayName:
|
|
18471
|
-
chipRef:
|
|
18472
|
-
symbolName:
|
|
18478
|
+
var schematicSymbolProps = z121.object({
|
|
18479
|
+
name: z121.string().min(1),
|
|
18480
|
+
displayName: z121.string().optional(),
|
|
18481
|
+
chipRef: z121.string().min(1).optional(),
|
|
18482
|
+
symbolName: z121.string().min(1),
|
|
18473
18483
|
connections: schematicSymbolConnections.optional(),
|
|
18474
18484
|
schX: distance.optional(),
|
|
18475
18485
|
schY: distance.optional(),
|
|
18476
18486
|
schRotation: rotation8.optional(),
|
|
18477
|
-
schSectionName:
|
|
18478
|
-
schSheetName:
|
|
18487
|
+
schSectionName: z121.string().optional(),
|
|
18488
|
+
schSheetName: z121.string().optional()
|
|
18479
18489
|
});
|
|
18480
18490
|
expectTypesMatch(
|
|
18481
18491
|
true
|
|
@@ -18483,15 +18493,15 @@ expectTypesMatch(
|
|
|
18483
18493
|
|
|
18484
18494
|
// lib/components/schematic-circle.ts
|
|
18485
18495
|
import { distance as distance31, point as point6 } from "circuit-json";
|
|
18486
|
-
import { z as
|
|
18487
|
-
var schematicCircleProps =
|
|
18496
|
+
import { z as z122 } from "zod";
|
|
18497
|
+
var schematicCircleProps = z122.object({
|
|
18488
18498
|
center: point6,
|
|
18489
18499
|
radius: distance31,
|
|
18490
18500
|
strokeWidth: distance31.optional(),
|
|
18491
|
-
color:
|
|
18492
|
-
isFilled:
|
|
18493
|
-
fillColor:
|
|
18494
|
-
isDashed:
|
|
18501
|
+
color: z122.string().optional(),
|
|
18502
|
+
isFilled: z122.boolean().optional().default(false),
|
|
18503
|
+
fillColor: z122.string().optional(),
|
|
18504
|
+
isDashed: z122.boolean().optional().default(false)
|
|
18495
18505
|
});
|
|
18496
18506
|
expectTypesMatch(
|
|
18497
18507
|
true
|
|
@@ -18499,32 +18509,32 @@ expectTypesMatch(
|
|
|
18499
18509
|
|
|
18500
18510
|
// lib/components/schematic-rect.ts
|
|
18501
18511
|
import { distance as distance32, rotation as rotation9 } from "circuit-json";
|
|
18502
|
-
import { z as
|
|
18503
|
-
var schematicRectProps =
|
|
18512
|
+
import { z as z123 } from "zod";
|
|
18513
|
+
var schematicRectProps = z123.object({
|
|
18504
18514
|
schX: distance32.optional(),
|
|
18505
18515
|
schY: distance32.optional(),
|
|
18506
18516
|
width: distance32,
|
|
18507
18517
|
height: distance32,
|
|
18508
18518
|
rotation: rotation9.default(0),
|
|
18509
18519
|
strokeWidth: distance32.optional(),
|
|
18510
|
-
color:
|
|
18511
|
-
isFilled:
|
|
18512
|
-
fillColor:
|
|
18513
|
-
isDashed:
|
|
18520
|
+
color: z123.string().optional(),
|
|
18521
|
+
isFilled: z123.boolean().optional().default(false),
|
|
18522
|
+
fillColor: z123.string().optional(),
|
|
18523
|
+
isDashed: z123.boolean().optional().default(false)
|
|
18514
18524
|
});
|
|
18515
18525
|
expectTypesMatch(true);
|
|
18516
18526
|
|
|
18517
18527
|
// lib/components/schematic-line.ts
|
|
18518
18528
|
import { distance as distance33 } from "circuit-json";
|
|
18519
|
-
import { z as
|
|
18520
|
-
var schematicLineProps =
|
|
18529
|
+
import { z as z124 } from "zod";
|
|
18530
|
+
var schematicLineProps = z124.object({
|
|
18521
18531
|
x1: distance33,
|
|
18522
18532
|
y1: distance33,
|
|
18523
18533
|
x2: distance33,
|
|
18524
18534
|
y2: distance33,
|
|
18525
18535
|
strokeWidth: distance33.optional(),
|
|
18526
|
-
color:
|
|
18527
|
-
isDashed:
|
|
18536
|
+
color: z124.string().optional(),
|
|
18537
|
+
isDashed: z124.boolean().optional().default(false),
|
|
18528
18538
|
dashLength: distance33.optional(),
|
|
18529
18539
|
dashGap: distance33.optional()
|
|
18530
18540
|
});
|
|
@@ -18532,11 +18542,11 @@ expectTypesMatch(true);
|
|
|
18532
18542
|
|
|
18533
18543
|
// lib/components/schematic-text.ts
|
|
18534
18544
|
import { distance as distance34, rotation as rotation10 } from "circuit-json";
|
|
18535
|
-
import { z as
|
|
18545
|
+
import { z as z126 } from "zod";
|
|
18536
18546
|
|
|
18537
18547
|
// lib/common/fivePointAnchor.ts
|
|
18538
|
-
import { z as
|
|
18539
|
-
var fivePointAnchor =
|
|
18548
|
+
import { z as z125 } from "zod";
|
|
18549
|
+
var fivePointAnchor = z125.enum([
|
|
18540
18550
|
"center",
|
|
18541
18551
|
"left",
|
|
18542
18552
|
"right",
|
|
@@ -18545,39 +18555,39 @@ var fivePointAnchor = z124.enum([
|
|
|
18545
18555
|
]);
|
|
18546
18556
|
|
|
18547
18557
|
// lib/components/schematic-text.ts
|
|
18548
|
-
var schematicTextProps =
|
|
18558
|
+
var schematicTextProps = z126.object({
|
|
18549
18559
|
schX: distance34.optional(),
|
|
18550
18560
|
schY: distance34.optional(),
|
|
18551
|
-
text:
|
|
18552
|
-
fontSize:
|
|
18553
|
-
anchor:
|
|
18554
|
-
color:
|
|
18561
|
+
text: z126.string(),
|
|
18562
|
+
fontSize: z126.number().default(1),
|
|
18563
|
+
anchor: z126.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
18564
|
+
color: z126.string().default("#000000"),
|
|
18555
18565
|
schRotation: rotation10.default(0)
|
|
18556
18566
|
});
|
|
18557
18567
|
expectTypesMatch(true);
|
|
18558
18568
|
|
|
18559
18569
|
// lib/components/schematic-path.ts
|
|
18560
18570
|
import { distance as distance35, point as point7 } from "circuit-json";
|
|
18561
|
-
import { z as
|
|
18562
|
-
var schematicPathProps =
|
|
18563
|
-
points:
|
|
18564
|
-
svgPath:
|
|
18571
|
+
import { z as z127 } from "zod";
|
|
18572
|
+
var schematicPathProps = z127.object({
|
|
18573
|
+
points: z127.array(point7).optional(),
|
|
18574
|
+
svgPath: z127.string().optional(),
|
|
18565
18575
|
strokeWidth: distance35.optional(),
|
|
18566
|
-
strokeColor:
|
|
18576
|
+
strokeColor: z127.string().optional(),
|
|
18567
18577
|
dashLength: distance35.optional(),
|
|
18568
18578
|
dashGap: distance35.optional(),
|
|
18569
|
-
isFilled:
|
|
18570
|
-
fillColor:
|
|
18579
|
+
isFilled: z127.boolean().optional().default(false),
|
|
18580
|
+
fillColor: z127.string().optional()
|
|
18571
18581
|
});
|
|
18572
18582
|
expectTypesMatch(true);
|
|
18573
18583
|
|
|
18574
18584
|
// lib/components/schematic-table.ts
|
|
18575
18585
|
import { distance as distance36 } from "circuit-json";
|
|
18576
|
-
import { z as
|
|
18577
|
-
var schematicTableProps =
|
|
18586
|
+
import { z as z128 } from "zod";
|
|
18587
|
+
var schematicTableProps = z128.object({
|
|
18578
18588
|
schX: distance36.optional(),
|
|
18579
18589
|
schY: distance36.optional(),
|
|
18580
|
-
children:
|
|
18590
|
+
children: z128.any().optional(),
|
|
18581
18591
|
cellPadding: distance36.optional(),
|
|
18582
18592
|
borderWidth: distance36.optional(),
|
|
18583
18593
|
anchor: ninePointAnchor.optional(),
|
|
@@ -18587,34 +18597,34 @@ expectTypesMatch(true);
|
|
|
18587
18597
|
|
|
18588
18598
|
// lib/components/schematic-row.ts
|
|
18589
18599
|
import { distance as distance37 } from "circuit-json";
|
|
18590
|
-
import { z as
|
|
18591
|
-
var schematicRowProps =
|
|
18592
|
-
children:
|
|
18600
|
+
import { z as z129 } from "zod";
|
|
18601
|
+
var schematicRowProps = z129.object({
|
|
18602
|
+
children: z129.any().optional(),
|
|
18593
18603
|
height: distance37.optional()
|
|
18594
18604
|
});
|
|
18595
18605
|
expectTypesMatch(true);
|
|
18596
18606
|
|
|
18597
18607
|
// lib/components/schematic-cell.ts
|
|
18598
18608
|
import { distance as distance38 } from "circuit-json";
|
|
18599
|
-
import { z as
|
|
18600
|
-
var schematicCellProps =
|
|
18601
|
-
children:
|
|
18602
|
-
horizontalAlign:
|
|
18603
|
-
verticalAlign:
|
|
18609
|
+
import { z as z130 } from "zod";
|
|
18610
|
+
var schematicCellProps = z130.object({
|
|
18611
|
+
children: z130.string().optional(),
|
|
18612
|
+
horizontalAlign: z130.enum(["left", "center", "right"]).optional(),
|
|
18613
|
+
verticalAlign: z130.enum(["top", "middle", "bottom"]).optional(),
|
|
18604
18614
|
fontSize: distance38.optional(),
|
|
18605
|
-
rowSpan:
|
|
18606
|
-
colSpan:
|
|
18615
|
+
rowSpan: z130.number().optional(),
|
|
18616
|
+
colSpan: z130.number().optional(),
|
|
18607
18617
|
width: distance38.optional(),
|
|
18608
|
-
text:
|
|
18618
|
+
text: z130.string().optional()
|
|
18609
18619
|
});
|
|
18610
18620
|
expectTypesMatch(true);
|
|
18611
18621
|
|
|
18612
18622
|
// lib/components/schematic-section.ts
|
|
18613
18623
|
import { distance as distance39 } from "circuit-json";
|
|
18614
|
-
import { z as
|
|
18615
|
-
var schematicSectionProps =
|
|
18616
|
-
displayName:
|
|
18617
|
-
name:
|
|
18624
|
+
import { z as z131 } from "zod";
|
|
18625
|
+
var schematicSectionProps = z131.object({
|
|
18626
|
+
displayName: z131.string().optional(),
|
|
18627
|
+
name: z131.string(),
|
|
18618
18628
|
sectionTitleFontSize: distance39.optional()
|
|
18619
18629
|
});
|
|
18620
18630
|
expectTypesMatch(
|
|
@@ -18622,51 +18632,51 @@ expectTypesMatch(
|
|
|
18622
18632
|
);
|
|
18623
18633
|
|
|
18624
18634
|
// lib/components/schematic-sheet.ts
|
|
18625
|
-
import { z as
|
|
18626
|
-
var schematicSheetProps =
|
|
18627
|
-
name:
|
|
18628
|
-
displayName:
|
|
18629
|
-
sheetIndex:
|
|
18630
|
-
children:
|
|
18635
|
+
import { z as z132 } from "zod";
|
|
18636
|
+
var schematicSheetProps = z132.object({
|
|
18637
|
+
name: z132.string(),
|
|
18638
|
+
displayName: z132.string(),
|
|
18639
|
+
sheetIndex: z132.number().optional(),
|
|
18640
|
+
children: z132.any().optional()
|
|
18631
18641
|
});
|
|
18632
18642
|
expectTypesMatch(true);
|
|
18633
18643
|
|
|
18634
18644
|
// lib/components/copper-text.ts
|
|
18635
18645
|
import { layer_ref as layer_ref11, length as length8 } from "circuit-json";
|
|
18636
|
-
import { z as
|
|
18646
|
+
import { z as z133 } from "zod";
|
|
18637
18647
|
var copperTextProps = pcbLayoutProps.extend({
|
|
18638
|
-
text:
|
|
18648
|
+
text: z133.string(),
|
|
18639
18649
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
18640
|
-
font:
|
|
18650
|
+
font: z133.enum(["tscircuit2024"]).optional(),
|
|
18641
18651
|
fontSize: length8.optional(),
|
|
18642
|
-
layers:
|
|
18643
|
-
knockout:
|
|
18644
|
-
mirrored:
|
|
18652
|
+
layers: z133.array(layer_ref11).optional(),
|
|
18653
|
+
knockout: z133.boolean().optional(),
|
|
18654
|
+
mirrored: z133.boolean().optional()
|
|
18645
18655
|
});
|
|
18646
18656
|
|
|
18647
18657
|
// lib/components/silkscreen-text.ts
|
|
18648
18658
|
import { layer_ref as layer_ref12, length as length9 } from "circuit-json";
|
|
18649
|
-
import { z as
|
|
18659
|
+
import { z as z134 } from "zod";
|
|
18650
18660
|
var silkscreenTextProps = pcbLayoutProps.extend({
|
|
18651
|
-
text:
|
|
18661
|
+
text: z134.string(),
|
|
18652
18662
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
18653
|
-
font:
|
|
18663
|
+
font: z134.enum(["tscircuit2024"]).optional(),
|
|
18654
18664
|
fontSize: length9.optional(),
|
|
18655
18665
|
/**
|
|
18656
18666
|
* If true, text will knock out underlying silkscreen
|
|
18657
18667
|
*/
|
|
18658
|
-
isKnockout:
|
|
18668
|
+
isKnockout: z134.boolean().optional(),
|
|
18659
18669
|
knockoutPadding: length9.optional(),
|
|
18660
18670
|
knockoutPaddingLeft: length9.optional(),
|
|
18661
18671
|
knockoutPaddingRight: length9.optional(),
|
|
18662
18672
|
knockoutPaddingTop: length9.optional(),
|
|
18663
18673
|
knockoutPaddingBottom: length9.optional(),
|
|
18664
|
-
layers:
|
|
18674
|
+
layers: z134.array(layer_ref12).optional()
|
|
18665
18675
|
});
|
|
18666
18676
|
|
|
18667
18677
|
// lib/components/silkscreen-path.ts
|
|
18668
18678
|
import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
|
|
18669
|
-
import { z as
|
|
18679
|
+
import { z as z135 } from "zod";
|
|
18670
18680
|
var silkscreenPathProps = pcbLayoutProps.omit({
|
|
18671
18681
|
pcbLeftEdgeX: true,
|
|
18672
18682
|
pcbRightEdgeX: true,
|
|
@@ -18678,7 +18688,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
|
|
|
18678
18688
|
pcbOffsetY: true,
|
|
18679
18689
|
pcbRotation: true
|
|
18680
18690
|
}).extend({
|
|
18681
|
-
route:
|
|
18691
|
+
route: z135.array(route_hint_point5),
|
|
18682
18692
|
strokeWidth: length10.optional()
|
|
18683
18693
|
});
|
|
18684
18694
|
|
|
@@ -18700,10 +18710,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({
|
|
|
18700
18710
|
|
|
18701
18711
|
// lib/components/silkscreen-rect.ts
|
|
18702
18712
|
import { distance as distance41 } from "circuit-json";
|
|
18703
|
-
import { z as
|
|
18713
|
+
import { z as z136 } from "zod";
|
|
18704
18714
|
var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18705
|
-
filled:
|
|
18706
|
-
stroke:
|
|
18715
|
+
filled: z136.boolean().default(true).optional(),
|
|
18716
|
+
stroke: z136.enum(["dashed", "solid", "none"]).optional(),
|
|
18707
18717
|
strokeWidth: distance41.optional(),
|
|
18708
18718
|
width: distance41,
|
|
18709
18719
|
height: distance41,
|
|
@@ -18712,10 +18722,10 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
18712
18722
|
|
|
18713
18723
|
// lib/components/silkscreen-circle.ts
|
|
18714
18724
|
import { distance as distance42 } from "circuit-json";
|
|
18715
|
-
import { z as
|
|
18725
|
+
import { z as z137 } from "zod";
|
|
18716
18726
|
var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18717
|
-
isFilled:
|
|
18718
|
-
isOutline:
|
|
18727
|
+
isFilled: z137.boolean().optional(),
|
|
18728
|
+
isOutline: z137.boolean().optional(),
|
|
18719
18729
|
strokeWidth: distance42.optional(),
|
|
18720
18730
|
radius: distance42
|
|
18721
18731
|
});
|
|
@@ -18733,63 +18743,63 @@ expectTypesMatch(true);
|
|
|
18733
18743
|
|
|
18734
18744
|
// lib/components/trace-hint.ts
|
|
18735
18745
|
import { distance as distance43, layer_ref as layer_ref13, route_hint_point as route_hint_point6 } from "circuit-json";
|
|
18736
|
-
import { z as
|
|
18737
|
-
var routeHintPointProps =
|
|
18746
|
+
import { z as z139 } from "zod";
|
|
18747
|
+
var routeHintPointProps = z139.object({
|
|
18738
18748
|
x: distance43,
|
|
18739
18749
|
y: distance43,
|
|
18740
|
-
via:
|
|
18750
|
+
via: z139.boolean().optional(),
|
|
18741
18751
|
toLayer: layer_ref13.optional()
|
|
18742
18752
|
});
|
|
18743
|
-
var traceHintProps =
|
|
18744
|
-
for:
|
|
18753
|
+
var traceHintProps = z139.object({
|
|
18754
|
+
for: z139.string().optional().describe(
|
|
18745
18755
|
"Selector for the port you're targeting, not required if you're inside a trace"
|
|
18746
18756
|
),
|
|
18747
|
-
order:
|
|
18757
|
+
order: z139.number().optional(),
|
|
18748
18758
|
offset: route_hint_point6.or(routeHintPointProps).optional(),
|
|
18749
|
-
offsets:
|
|
18750
|
-
traceWidth:
|
|
18759
|
+
offsets: z139.array(route_hint_point6).or(z139.array(routeHintPointProps)).optional(),
|
|
18760
|
+
traceWidth: z139.number().optional()
|
|
18751
18761
|
});
|
|
18752
18762
|
|
|
18753
18763
|
// lib/components/port.ts
|
|
18754
|
-
import { z as
|
|
18764
|
+
import { z as z140 } from "zod";
|
|
18755
18765
|
var portProps = commonLayoutProps.extend({
|
|
18756
|
-
name:
|
|
18757
|
-
pinNumber:
|
|
18758
|
-
schStemLength:
|
|
18759
|
-
aliases:
|
|
18760
|
-
layer:
|
|
18761
|
-
layers:
|
|
18762
|
-
schX:
|
|
18763
|
-
schY:
|
|
18766
|
+
name: z140.string().optional(),
|
|
18767
|
+
pinNumber: z140.number().optional(),
|
|
18768
|
+
schStemLength: z140.number().optional(),
|
|
18769
|
+
aliases: z140.array(z140.string()).optional(),
|
|
18770
|
+
layer: z140.string().optional(),
|
|
18771
|
+
layers: z140.array(z140.string()).optional(),
|
|
18772
|
+
schX: z140.number().optional(),
|
|
18773
|
+
schY: z140.number().optional(),
|
|
18764
18774
|
direction: direction.optional(),
|
|
18765
|
-
connectsTo:
|
|
18775
|
+
connectsTo: z140.string().or(z140.array(z140.string())).optional(),
|
|
18766
18776
|
kicadPinMetadata: kicadPinMetadata.optional(),
|
|
18767
|
-
hasInversionCircle:
|
|
18777
|
+
hasInversionCircle: z140.boolean().optional()
|
|
18768
18778
|
});
|
|
18769
18779
|
|
|
18770
18780
|
// lib/components/pcb-note-text.ts
|
|
18771
18781
|
import { length as length11 } from "circuit-json";
|
|
18772
|
-
import { z as
|
|
18782
|
+
import { z as z141 } from "zod";
|
|
18773
18783
|
var pcbNoteTextProps = pcbLayoutProps.extend({
|
|
18774
|
-
text:
|
|
18775
|
-
anchorAlignment:
|
|
18776
|
-
font:
|
|
18784
|
+
text: z141.string(),
|
|
18785
|
+
anchorAlignment: z141.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
18786
|
+
font: z141.enum(["tscircuit2024"]).optional(),
|
|
18777
18787
|
fontSize: length11.optional(),
|
|
18778
|
-
color:
|
|
18788
|
+
color: z141.string().optional()
|
|
18779
18789
|
});
|
|
18780
18790
|
expectTypesMatch(true);
|
|
18781
18791
|
|
|
18782
18792
|
// lib/components/pcb-note-rect.ts
|
|
18783
18793
|
import { distance as distance44 } from "circuit-json";
|
|
18784
|
-
import { z as
|
|
18794
|
+
import { z as z142 } from "zod";
|
|
18785
18795
|
var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18786
18796
|
width: distance44,
|
|
18787
18797
|
height: distance44,
|
|
18788
18798
|
strokeWidth: distance44.optional(),
|
|
18789
|
-
isFilled:
|
|
18790
|
-
hasStroke:
|
|
18791
|
-
isStrokeDashed:
|
|
18792
|
-
color:
|
|
18799
|
+
isFilled: z142.boolean().optional(),
|
|
18800
|
+
hasStroke: z142.boolean().optional(),
|
|
18801
|
+
isStrokeDashed: z142.boolean().optional(),
|
|
18802
|
+
color: z142.string().optional(),
|
|
18793
18803
|
cornerRadius: distance44.optional()
|
|
18794
18804
|
});
|
|
18795
18805
|
expectTypesMatch(true);
|
|
@@ -18799,7 +18809,7 @@ import {
|
|
|
18799
18809
|
length as length12,
|
|
18800
18810
|
route_hint_point as route_hint_point7
|
|
18801
18811
|
} from "circuit-json";
|
|
18802
|
-
import { z as
|
|
18812
|
+
import { z as z143 } from "zod";
|
|
18803
18813
|
var pcbNotePathProps = pcbLayoutProps.omit({
|
|
18804
18814
|
pcbLeftEdgeX: true,
|
|
18805
18815
|
pcbRightEdgeX: true,
|
|
@@ -18811,15 +18821,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
|
|
|
18811
18821
|
pcbOffsetY: true,
|
|
18812
18822
|
pcbRotation: true
|
|
18813
18823
|
}).extend({
|
|
18814
|
-
route:
|
|
18824
|
+
route: z143.array(route_hint_point7),
|
|
18815
18825
|
strokeWidth: length12.optional(),
|
|
18816
|
-
color:
|
|
18826
|
+
color: z143.string().optional()
|
|
18817
18827
|
});
|
|
18818
18828
|
expectTypesMatch(true);
|
|
18819
18829
|
|
|
18820
18830
|
// lib/components/pcb-note-line.ts
|
|
18821
18831
|
import { distance as distance45 } from "circuit-json";
|
|
18822
|
-
import { z as
|
|
18832
|
+
import { z as z144 } from "zod";
|
|
18823
18833
|
var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
18824
18834
|
pcbLeftEdgeX: true,
|
|
18825
18835
|
pcbRightEdgeX: true,
|
|
@@ -18836,15 +18846,15 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
|
18836
18846
|
x2: distance45,
|
|
18837
18847
|
y2: distance45,
|
|
18838
18848
|
strokeWidth: distance45.optional(),
|
|
18839
|
-
color:
|
|
18840
|
-
isDashed:
|
|
18849
|
+
color: z144.string().optional(),
|
|
18850
|
+
isDashed: z144.boolean().optional()
|
|
18841
18851
|
});
|
|
18842
18852
|
expectTypesMatch(true);
|
|
18843
18853
|
|
|
18844
18854
|
// lib/components/pcb-note-dimension.ts
|
|
18845
18855
|
import { distance as distance46, length as length13 } from "circuit-json";
|
|
18846
|
-
import { z as
|
|
18847
|
-
var dimensionTarget2 =
|
|
18856
|
+
import { z as z145 } from "zod";
|
|
18857
|
+
var dimensionTarget2 = z145.union([z145.string(), point]);
|
|
18848
18858
|
var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
18849
18859
|
pcbLeftEdgeX: true,
|
|
18850
18860
|
pcbRightEdgeX: true,
|
|
@@ -18858,101 +18868,101 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
18858
18868
|
}).extend({
|
|
18859
18869
|
from: dimensionTarget2,
|
|
18860
18870
|
to: dimensionTarget2,
|
|
18861
|
-
text:
|
|
18871
|
+
text: z145.string().optional(),
|
|
18862
18872
|
offset: distance46.optional(),
|
|
18863
|
-
font:
|
|
18873
|
+
font: z145.enum(["tscircuit2024"]).optional(),
|
|
18864
18874
|
fontSize: length13.optional(),
|
|
18865
|
-
color:
|
|
18875
|
+
color: z145.string().optional(),
|
|
18866
18876
|
arrowSize: distance46.optional(),
|
|
18867
|
-
units:
|
|
18868
|
-
outerEdgeToEdge:
|
|
18869
|
-
centerToCenter:
|
|
18870
|
-
innerEdgeToEdge:
|
|
18877
|
+
units: z145.enum(["in", "mm"]).optional(),
|
|
18878
|
+
outerEdgeToEdge: z145.literal(true).optional(),
|
|
18879
|
+
centerToCenter: z145.literal(true).optional(),
|
|
18880
|
+
innerEdgeToEdge: z145.literal(true).optional()
|
|
18871
18881
|
});
|
|
18872
18882
|
expectTypesMatch(
|
|
18873
18883
|
true
|
|
18874
18884
|
);
|
|
18875
18885
|
|
|
18876
18886
|
// lib/platformConfig.ts
|
|
18877
|
-
import { z as
|
|
18878
|
-
var unvalidatedCircuitJson =
|
|
18879
|
-
var footprintLibraryResult =
|
|
18880
|
-
footprintCircuitJson:
|
|
18887
|
+
import { z as z146 } from "zod";
|
|
18888
|
+
var unvalidatedCircuitJson = z146.array(z146.any()).describe("Circuit JSON");
|
|
18889
|
+
var footprintLibraryResult = z146.object({
|
|
18890
|
+
footprintCircuitJson: z146.array(z146.any()),
|
|
18881
18891
|
cadModel: cadModelProp.optional()
|
|
18882
18892
|
});
|
|
18883
|
-
var pathToCircuitJsonFn =
|
|
18884
|
-
|
|
18885
|
-
|
|
18886
|
-
|
|
18887
|
-
).returns(
|
|
18893
|
+
var pathToCircuitJsonFn = z146.function().args(z146.string()).returns(z146.promise(footprintLibraryResult)).or(
|
|
18894
|
+
z146.function().args(
|
|
18895
|
+
z146.string(),
|
|
18896
|
+
z146.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
|
|
18897
|
+
).returns(z146.promise(footprintLibraryResult))
|
|
18888
18898
|
).describe("A function that takes a path and returns Circuit JSON");
|
|
18889
|
-
var footprintFileParserEntry =
|
|
18890
|
-
loadFromUrl:
|
|
18899
|
+
var footprintFileParserEntry = z146.object({
|
|
18900
|
+
loadFromUrl: z146.function().args(z146.string()).returns(z146.promise(footprintLibraryResult)).describe(
|
|
18891
18901
|
"A function that takes a footprint file URL and returns Circuit JSON"
|
|
18892
18902
|
)
|
|
18893
18903
|
});
|
|
18894
|
-
var spiceEngineSimulationResult =
|
|
18895
|
-
engineVersionString:
|
|
18904
|
+
var spiceEngineSimulationResult = z146.object({
|
|
18905
|
+
engineVersionString: z146.string().optional(),
|
|
18896
18906
|
simulationResultCircuitJson: unvalidatedCircuitJson
|
|
18897
18907
|
});
|
|
18898
|
-
var spiceEngineZod =
|
|
18899
|
-
simulate:
|
|
18908
|
+
var spiceEngineZod = z146.object({
|
|
18909
|
+
simulate: z146.function().args(z146.string()).returns(z146.promise(spiceEngineSimulationResult)).describe(
|
|
18900
18910
|
"A function that takes a SPICE string and returns a simulation result"
|
|
18901
18911
|
)
|
|
18902
18912
|
});
|
|
18903
|
-
var defaultSpiceEngine =
|
|
18913
|
+
var defaultSpiceEngine = z146.custom(
|
|
18904
18914
|
(value) => typeof value === "string"
|
|
18905
18915
|
);
|
|
18906
|
-
var autorouterInstance =
|
|
18907
|
-
run:
|
|
18908
|
-
getOutputSimpleRouteJson:
|
|
18916
|
+
var autorouterInstance = z146.object({
|
|
18917
|
+
run: z146.function().args().returns(z146.promise(z146.unknown())).describe("Run the autorouter"),
|
|
18918
|
+
getOutputSimpleRouteJson: z146.function().args().returns(z146.promise(z146.any())).describe("Get the resulting SimpleRouteJson")
|
|
18909
18919
|
});
|
|
18910
|
-
var autorouterDefinition =
|
|
18911
|
-
createAutorouter:
|
|
18920
|
+
var autorouterDefinition = z146.object({
|
|
18921
|
+
createAutorouter: z146.function().args(z146.any(), z146.any().optional()).returns(z146.union([autorouterInstance, z146.promise(autorouterInstance)])).describe("Create an autorouter instance")
|
|
18912
18922
|
});
|
|
18913
|
-
var platformFetch =
|
|
18914
|
-
var platformConfig =
|
|
18923
|
+
var platformFetch = z146.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
|
|
18924
|
+
var platformConfig = z146.object({
|
|
18915
18925
|
partsEngine: partsEngine.optional(),
|
|
18916
18926
|
autorouter: autorouterProp.optional(),
|
|
18917
|
-
autorouterMap:
|
|
18927
|
+
autorouterMap: z146.record(z146.string(), autorouterDefinition).optional(),
|
|
18918
18928
|
registryApiUrl: url.optional(),
|
|
18919
18929
|
cloudAutorouterUrl: url.optional(),
|
|
18920
|
-
projectName:
|
|
18930
|
+
projectName: z146.string().optional(),
|
|
18921
18931
|
projectBaseUrl: url.optional(),
|
|
18922
|
-
version:
|
|
18932
|
+
version: z146.string().optional(),
|
|
18923
18933
|
url: url.optional(),
|
|
18924
|
-
printBoardInformationToSilkscreen:
|
|
18925
|
-
includeBoardFiles:
|
|
18934
|
+
printBoardInformationToSilkscreen: z146.boolean().optional(),
|
|
18935
|
+
includeBoardFiles: z146.array(z146.string()).describe(
|
|
18926
18936
|
'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
|
|
18927
18937
|
).optional(),
|
|
18928
|
-
snapshotsDir:
|
|
18938
|
+
snapshotsDir: z146.string().describe(
|
|
18929
18939
|
'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
|
|
18930
18940
|
).optional(),
|
|
18931
18941
|
defaultSpiceEngine: defaultSpiceEngine.optional(),
|
|
18932
|
-
unitPreference:
|
|
18933
|
-
localCacheEngine:
|
|
18934
|
-
pcbDisabled:
|
|
18935
|
-
routingDisabled:
|
|
18936
|
-
schematicDisabled:
|
|
18937
|
-
partsEngineDisabled:
|
|
18938
|
-
drcChecksDisabled:
|
|
18939
|
-
netlistDrcChecksDisabled:
|
|
18940
|
-
routingDrcChecksDisabled:
|
|
18941
|
-
placementDrcChecksDisabled:
|
|
18942
|
-
pinSpecificationDrcChecksDisabled:
|
|
18943
|
-
spiceEngineMap:
|
|
18944
|
-
footprintLibraryMap:
|
|
18945
|
-
|
|
18946
|
-
|
|
18942
|
+
unitPreference: z146.enum(["mm", "in", "mil"]).optional(),
|
|
18943
|
+
localCacheEngine: z146.any().optional(),
|
|
18944
|
+
pcbDisabled: z146.boolean().optional(),
|
|
18945
|
+
routingDisabled: z146.boolean().optional(),
|
|
18946
|
+
schematicDisabled: z146.boolean().optional(),
|
|
18947
|
+
partsEngineDisabled: z146.boolean().optional(),
|
|
18948
|
+
drcChecksDisabled: z146.boolean().optional(),
|
|
18949
|
+
netlistDrcChecksDisabled: z146.boolean().optional(),
|
|
18950
|
+
routingDrcChecksDisabled: z146.boolean().optional(),
|
|
18951
|
+
placementDrcChecksDisabled: z146.boolean().optional(),
|
|
18952
|
+
pinSpecificationDrcChecksDisabled: z146.boolean().optional(),
|
|
18953
|
+
spiceEngineMap: z146.record(z146.string(), spiceEngineZod).optional(),
|
|
18954
|
+
footprintLibraryMap: z146.record(
|
|
18955
|
+
z146.string(),
|
|
18956
|
+
z146.union([
|
|
18947
18957
|
pathToCircuitJsonFn,
|
|
18948
|
-
|
|
18949
|
-
|
|
18950
|
-
|
|
18958
|
+
z146.record(
|
|
18959
|
+
z146.string(),
|
|
18960
|
+
z146.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
|
|
18951
18961
|
)
|
|
18952
18962
|
])
|
|
18953
18963
|
).optional(),
|
|
18954
|
-
footprintFileParserMap:
|
|
18955
|
-
resolveProjectStaticFileImportUrl:
|
|
18964
|
+
footprintFileParserMap: z146.record(z146.string(), footprintFileParserEntry).optional(),
|
|
18965
|
+
resolveProjectStaticFileImportUrl: z146.function().args(z146.string()).returns(z146.promise(z146.string())).describe(
|
|
18956
18966
|
"A function that returns a string URL for static files for the project"
|
|
18957
18967
|
).optional(),
|
|
18958
18968
|
platformFetch: platformFetch.optional()
|
|
@@ -19007,6 +19017,7 @@ export {
|
|
|
19007
19017
|
breakoutPointProps,
|
|
19008
19018
|
breakoutProps,
|
|
19009
19019
|
bugProps,
|
|
19020
|
+
busFanoutDirection,
|
|
19010
19021
|
busProps,
|
|
19011
19022
|
cadModelAxisDirection,
|
|
19012
19023
|
cadModelAxisDirections,
|
|
@@ -19072,6 +19083,7 @@ export {
|
|
|
19072
19083
|
fabricationNoteRectProps,
|
|
19073
19084
|
fabricationNoteTextProps,
|
|
19074
19085
|
fanoutBoundaryPadding,
|
|
19086
|
+
fanoutProps,
|
|
19075
19087
|
fiducialProps,
|
|
19076
19088
|
footprintInsertionDirection,
|
|
19077
19089
|
footprintProp,
|