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