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