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