jscad-electronics 0.0.9 → 0.0.11
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/dist/index.d.ts +13 -9
- package/dist/index.js +202 -152
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { AnyCircuitElement, PcbSmtPad, PcbPlatedHole } from 'circuit-json';
|
|
3
3
|
|
|
4
4
|
declare const A0402: () => react_jsx_runtime.JSX.Element;
|
|
5
5
|
|
|
@@ -35,16 +35,16 @@ interface ChipBodyProps {
|
|
|
35
35
|
declare const ChipBody: ({ center, width, length, height, heightAboveSurface, }: ChipBodyProps) => react_jsx_runtime.JSX.Element;
|
|
36
36
|
|
|
37
37
|
declare const ExtrudedPads: ({ soup, footprint, }: {
|
|
38
|
-
soup?:
|
|
38
|
+
soup?: AnyCircuitElement[];
|
|
39
39
|
footprint?: string;
|
|
40
40
|
}) => react_jsx_runtime.JSX.Element;
|
|
41
41
|
|
|
42
42
|
declare const FootprintPad: ({ pad }: {
|
|
43
|
-
pad:
|
|
43
|
+
pad: PcbSmtPad;
|
|
44
44
|
}) => react_jsx_runtime.JSX.Element;
|
|
45
45
|
|
|
46
46
|
declare const FootprintPlatedHole: ({ hole }: {
|
|
47
|
-
hole:
|
|
47
|
+
hole: PcbPlatedHole;
|
|
48
48
|
}) => react_jsx_runtime.JSX.Element;
|
|
49
49
|
|
|
50
50
|
/**
|
|
@@ -86,11 +86,11 @@ interface SmdChipLeadProps {
|
|
|
86
86
|
*/
|
|
87
87
|
declare const SmdChipLead: (props: SmdChipLeadProps) => react_jsx_runtime.JSX.Element;
|
|
88
88
|
|
|
89
|
-
declare const Tssop: ({ pinCount,
|
|
89
|
+
declare const Tssop: ({ pinCount, leadLength, leadWidth, pitch, bodyWidth, }: {
|
|
90
90
|
pinCount: number;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
pitch: number;
|
|
92
|
+
leadWidth: number;
|
|
93
|
+
leadLength: number;
|
|
94
94
|
bodyWidth: number;
|
|
95
95
|
}) => react_jsx_runtime.JSX.Element;
|
|
96
96
|
|
|
@@ -100,8 +100,12 @@ declare const QFN: ({ fullWidth, height, thermalPadSize, }: {
|
|
|
100
100
|
thermalPadSize?: number;
|
|
101
101
|
}) => react_jsx_runtime.JSX.Element;
|
|
102
102
|
|
|
103
|
-
declare const QFP: ({ pinCount, }: {
|
|
103
|
+
declare const QFP: ({ pinCount, pitch, leadWidth, padContactLength, bodyWidth, }: {
|
|
104
104
|
pinCount: number;
|
|
105
|
+
pitch?: number;
|
|
106
|
+
leadWidth?: number;
|
|
107
|
+
padContactLength?: number;
|
|
108
|
+
bodyWidth?: number;
|
|
105
109
|
}) => react_jsx_runtime.JSX.Element;
|
|
106
110
|
|
|
107
111
|
declare const SOD123: ({ fullWidth, fullLength }: {
|
package/dist/index.js
CHANGED
|
@@ -78406,7 +78406,7 @@ var BGA = ({
|
|
|
78406
78406
|
const ballsSoup = (0, import_react.useMemo)(() => {
|
|
78407
78407
|
if (!footprintString) return null;
|
|
78408
78408
|
const result = fp.string(footprintString);
|
|
78409
|
-
return result.
|
|
78409
|
+
return result.circuitJson();
|
|
78410
78410
|
}, [footprintString]);
|
|
78411
78411
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
78412
78412
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jscad_fiber4.Translate, { z: bodyOffset, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jscad_fiber4.Colorize, { color: "#555", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jscad_fiber4.Cuboid, { size: [packageWidth, packageLength, bodyHeight] }) }) }),
|
|
@@ -78471,7 +78471,7 @@ var ExtrudedPads = ({
|
|
|
78471
78471
|
footprint
|
|
78472
78472
|
}) => {
|
|
78473
78473
|
if (!soup && footprint) {
|
|
78474
|
-
soup = fp2.string(footprint).
|
|
78474
|
+
soup = fp2.string(footprint).circuitJson();
|
|
78475
78475
|
}
|
|
78476
78476
|
if (!soup) throw new Error("No soup or footprint provided to ExtrudedPads");
|
|
78477
78477
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
@@ -78487,7 +78487,7 @@ var ExtrudedPads = ({
|
|
|
78487
78487
|
};
|
|
78488
78488
|
|
|
78489
78489
|
// lib/Footprinter3d.tsx
|
|
78490
|
-
import { fp as
|
|
78490
|
+
import { fp as fp3 } from "@tscircuit/footprinter";
|
|
78491
78491
|
|
|
78492
78492
|
// lib/DualInlinePackage.tsx
|
|
78493
78493
|
var import_jscad_fiber8 = __toESM(require_dist(), 1);
|
|
@@ -78634,7 +78634,7 @@ var Dip = ({
|
|
|
78634
78634
|
ChipBody,
|
|
78635
78635
|
{
|
|
78636
78636
|
width: bodyWidth,
|
|
78637
|
-
length:
|
|
78637
|
+
length: numPinsOnEachSide * pitch + 0.5,
|
|
78638
78638
|
height: 5.1 - 0.5,
|
|
78639
78639
|
heightAboveSurface: 0.5,
|
|
78640
78640
|
center: { x: 0, y: 0, z: 0 }
|
|
@@ -78643,9 +78643,6 @@ var Dip = ({
|
|
|
78643
78643
|
] });
|
|
78644
78644
|
};
|
|
78645
78645
|
|
|
78646
|
-
// lib/Tssop.tsx
|
|
78647
|
-
import "@tscircuit/footprinter";
|
|
78648
|
-
|
|
78649
78646
|
// lib/SmdChipLead.tsx
|
|
78650
78647
|
var import_jscad_fiber9 = __toESM(require_dist(), 1);
|
|
78651
78648
|
var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
|
|
@@ -78681,27 +78678,27 @@ var SmdChipLead = (props) => {
|
|
|
78681
78678
|
var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
|
|
78682
78679
|
var Tssop = ({
|
|
78683
78680
|
pinCount,
|
|
78684
|
-
|
|
78685
|
-
|
|
78686
|
-
|
|
78681
|
+
leadLength,
|
|
78682
|
+
leadWidth,
|
|
78683
|
+
pitch,
|
|
78687
78684
|
bodyWidth
|
|
78688
78685
|
}) => {
|
|
78689
78686
|
const sidePinLength = Math.ceil(pinCount / 2);
|
|
78690
|
-
const fullLength4 =
|
|
78691
|
-
const pinOffsetToCenter = (sidePinLength - 1) *
|
|
78687
|
+
const fullLength4 = pitch * pinCount / 2 + leadWidth / 2;
|
|
78688
|
+
const pinOffsetToCenter = (sidePinLength - 1) * pitch / 2;
|
|
78692
78689
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
78693
78690
|
Array.from({ length: sidePinLength }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
78694
78691
|
SmdChipLead,
|
|
78695
78692
|
{
|
|
78696
78693
|
position: {
|
|
78697
78694
|
x: -bodyWidth / 2 - 0.9,
|
|
78698
|
-
y: i *
|
|
78695
|
+
y: i * pitch - pinOffsetToCenter,
|
|
78699
78696
|
z: 0
|
|
78700
78697
|
},
|
|
78701
|
-
width:
|
|
78698
|
+
width: leadWidth,
|
|
78702
78699
|
thickness: 0.25,
|
|
78703
|
-
padContactLength:
|
|
78704
|
-
bodyDistance:
|
|
78700
|
+
padContactLength: leadLength,
|
|
78701
|
+
bodyDistance: leadLength + 0.4,
|
|
78705
78702
|
height: 0.8
|
|
78706
78703
|
},
|
|
78707
78704
|
i
|
|
@@ -78712,13 +78709,13 @@ var Tssop = ({
|
|
|
78712
78709
|
rotation: Math.PI,
|
|
78713
78710
|
position: {
|
|
78714
78711
|
x: bodyWidth / 2 + 0.9,
|
|
78715
|
-
y: i *
|
|
78712
|
+
y: i * pitch - pinOffsetToCenter,
|
|
78716
78713
|
z: 0
|
|
78717
78714
|
},
|
|
78718
|
-
width:
|
|
78715
|
+
width: leadWidth,
|
|
78719
78716
|
thickness: 0.25,
|
|
78720
|
-
padContactLength:
|
|
78721
|
-
bodyDistance:
|
|
78717
|
+
padContactLength: leadLength,
|
|
78718
|
+
bodyDistance: leadLength + 0.4,
|
|
78722
78719
|
height: 0.8
|
|
78723
78720
|
},
|
|
78724
78721
|
i
|
|
@@ -78735,49 +78732,199 @@ var Tssop = ({
|
|
|
78735
78732
|
] });
|
|
78736
78733
|
};
|
|
78737
78734
|
|
|
78738
|
-
// lib/
|
|
78735
|
+
// lib/qfp.tsx
|
|
78739
78736
|
var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
|
|
78737
|
+
var QFP = ({
|
|
78738
|
+
pinCount,
|
|
78739
|
+
pitch,
|
|
78740
|
+
leadWidth,
|
|
78741
|
+
padContactLength,
|
|
78742
|
+
bodyWidth
|
|
78743
|
+
}) => {
|
|
78744
|
+
const sidePinCount = pinCount / 4;
|
|
78745
|
+
if (!pitch) pitch = getPitch(pinCount, bodyWidth);
|
|
78746
|
+
if (!padContactLength) padContactLength = getPadContactLength(pinCount);
|
|
78747
|
+
if (!leadWidth) leadWidth = getLeadWidth(pinCount, bodyWidth);
|
|
78748
|
+
if (!bodyWidth) bodyWidth = pitch * (sidePinCount + 4);
|
|
78749
|
+
const bodyLength4 = bodyWidth;
|
|
78750
|
+
const pinOffsetToCenter = (sidePinCount - 1) * pitch / 2;
|
|
78751
|
+
const fullLength4 = bodyLength4 + 2 * padContactLength;
|
|
78752
|
+
const fullWidth = fullLength4;
|
|
78753
|
+
const leadHeight = 0.8;
|
|
78754
|
+
const leadThickness = 0.15;
|
|
78755
|
+
const bodyDistance = (fullWidth - bodyWidth) / 2;
|
|
78756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
78757
|
+
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
78758
|
+
SmdChipLead,
|
|
78759
|
+
{
|
|
78760
|
+
position: {
|
|
78761
|
+
x: -fullWidth / 2,
|
|
78762
|
+
y: i * pitch - pinOffsetToCenter,
|
|
78763
|
+
z: 0
|
|
78764
|
+
},
|
|
78765
|
+
width: leadWidth,
|
|
78766
|
+
thickness: leadThickness,
|
|
78767
|
+
padContactLength,
|
|
78768
|
+
bodyDistance,
|
|
78769
|
+
height: leadHeight
|
|
78770
|
+
},
|
|
78771
|
+
`left-${i}`
|
|
78772
|
+
)),
|
|
78773
|
+
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
78774
|
+
SmdChipLead,
|
|
78775
|
+
{
|
|
78776
|
+
rotation: Math.PI,
|
|
78777
|
+
position: {
|
|
78778
|
+
x: fullWidth / 2,
|
|
78779
|
+
y: i * pitch - pinOffsetToCenter,
|
|
78780
|
+
z: 0
|
|
78781
|
+
},
|
|
78782
|
+
width: leadWidth,
|
|
78783
|
+
thickness: leadThickness,
|
|
78784
|
+
padContactLength,
|
|
78785
|
+
bodyDistance,
|
|
78786
|
+
height: leadHeight
|
|
78787
|
+
},
|
|
78788
|
+
`right-${i}`
|
|
78789
|
+
)),
|
|
78790
|
+
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
78791
|
+
SmdChipLead,
|
|
78792
|
+
{
|
|
78793
|
+
rotation: Math.PI / 2,
|
|
78794
|
+
position: {
|
|
78795
|
+
x: i * pitch - pinOffsetToCenter,
|
|
78796
|
+
y: -fullLength4 / 2,
|
|
78797
|
+
z: 0
|
|
78798
|
+
},
|
|
78799
|
+
width: leadWidth,
|
|
78800
|
+
thickness: leadThickness,
|
|
78801
|
+
padContactLength,
|
|
78802
|
+
bodyDistance,
|
|
78803
|
+
height: leadHeight
|
|
78804
|
+
},
|
|
78805
|
+
`bottom-${i}`
|
|
78806
|
+
)),
|
|
78807
|
+
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
78808
|
+
SmdChipLead,
|
|
78809
|
+
{
|
|
78810
|
+
rotation: -Math.PI / 2,
|
|
78811
|
+
position: {
|
|
78812
|
+
x: i * pitch - pinOffsetToCenter,
|
|
78813
|
+
y: fullLength4 / 2,
|
|
78814
|
+
z: 0
|
|
78815
|
+
},
|
|
78816
|
+
width: leadWidth,
|
|
78817
|
+
thickness: leadThickness,
|
|
78818
|
+
padContactLength,
|
|
78819
|
+
bodyDistance,
|
|
78820
|
+
height: leadHeight
|
|
78821
|
+
},
|
|
78822
|
+
`top-${i}`
|
|
78823
|
+
)),
|
|
78824
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
78825
|
+
ChipBody,
|
|
78826
|
+
{
|
|
78827
|
+
center: { x: 0, y: 0, z: leadHeight / 2 },
|
|
78828
|
+
width: bodyWidth,
|
|
78829
|
+
length: bodyLength4,
|
|
78830
|
+
height: 1.5
|
|
78831
|
+
}
|
|
78832
|
+
)
|
|
78833
|
+
] });
|
|
78834
|
+
};
|
|
78835
|
+
var getPitch = (pinCount, width4) => {
|
|
78836
|
+
switch (pinCount) {
|
|
78837
|
+
case 44:
|
|
78838
|
+
case 64:
|
|
78839
|
+
return 0.8;
|
|
78840
|
+
case 52:
|
|
78841
|
+
return width4 === 14 ? 1 : 0.65;
|
|
78842
|
+
case 208:
|
|
78843
|
+
return 0.5;
|
|
78844
|
+
default:
|
|
78845
|
+
return 0.5;
|
|
78846
|
+
}
|
|
78847
|
+
};
|
|
78848
|
+
var getPadContactLength = (pinCount) => {
|
|
78849
|
+
switch (pinCount) {
|
|
78850
|
+
case 44:
|
|
78851
|
+
case 52:
|
|
78852
|
+
case 64:
|
|
78853
|
+
return 2.25;
|
|
78854
|
+
case 208:
|
|
78855
|
+
return 1.65;
|
|
78856
|
+
default:
|
|
78857
|
+
return 1;
|
|
78858
|
+
}
|
|
78859
|
+
};
|
|
78860
|
+
var getLeadWidth = (pinCount, width4) => {
|
|
78861
|
+
switch (pinCount) {
|
|
78862
|
+
case 44:
|
|
78863
|
+
case 64:
|
|
78864
|
+
return 0.5;
|
|
78865
|
+
case 52:
|
|
78866
|
+
return width4 === 14 ? 0.45 : 0.55;
|
|
78867
|
+
case 208:
|
|
78868
|
+
return 0.3;
|
|
78869
|
+
default:
|
|
78870
|
+
return 0.25;
|
|
78871
|
+
}
|
|
78872
|
+
};
|
|
78873
|
+
|
|
78874
|
+
// lib/Footprinter3d.tsx
|
|
78875
|
+
var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
|
|
78740
78876
|
var Footprinter3d = ({ footprint }) => {
|
|
78741
|
-
const fpJson =
|
|
78877
|
+
const fpJson = fp3.string(footprint).json();
|
|
78742
78878
|
switch (fpJson.fn) {
|
|
78743
78879
|
case "dip":
|
|
78744
|
-
return /* @__PURE__ */ (0,
|
|
78880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
|
|
78745
78881
|
case "tssop":
|
|
78746
|
-
return /* @__PURE__ */ (0,
|
|
78882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
78747
78883
|
Tssop,
|
|
78748
78884
|
{
|
|
78749
78885
|
pinCount: fpJson.num_pins,
|
|
78750
|
-
|
|
78751
|
-
|
|
78752
|
-
|
|
78886
|
+
leadLength: fpJson.pl,
|
|
78887
|
+
leadWidth: fpJson.pw,
|
|
78888
|
+
pitch: fpJson.p,
|
|
78889
|
+
bodyWidth: fpJson.w
|
|
78890
|
+
}
|
|
78891
|
+
);
|
|
78892
|
+
case "qfp":
|
|
78893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
78894
|
+
QFP,
|
|
78895
|
+
{
|
|
78896
|
+
pinCount: fpJson.num_pins,
|
|
78897
|
+
pitch: fpJson.p,
|
|
78898
|
+
leadWidth: fpJson.pw,
|
|
78899
|
+
padContactLength: fpJson.pl,
|
|
78753
78900
|
bodyWidth: fpJson.w
|
|
78754
78901
|
}
|
|
78755
78902
|
);
|
|
78756
78903
|
case "soic":
|
|
78757
|
-
return /* @__PURE__ */ (0,
|
|
78904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
78758
78905
|
Tssop,
|
|
78759
78906
|
{
|
|
78760
78907
|
pinCount: fpJson.num_pins,
|
|
78761
|
-
|
|
78762
|
-
|
|
78763
|
-
|
|
78908
|
+
leadLength: fpJson.pl,
|
|
78909
|
+
leadWidth: fpJson.pw,
|
|
78910
|
+
pitch: fpJson.p,
|
|
78764
78911
|
bodyWidth: fpJson.w
|
|
78765
78912
|
}
|
|
78766
78913
|
);
|
|
78767
78914
|
}
|
|
78768
78915
|
switch (fpJson.imperial) {
|
|
78769
78916
|
case "0402":
|
|
78770
|
-
return /* @__PURE__ */ (0,
|
|
78917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(A0402, {});
|
|
78771
78918
|
case "0603":
|
|
78772
|
-
return /* @__PURE__ */ (0,
|
|
78919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(A0603, {});
|
|
78773
78920
|
case "0805":
|
|
78774
|
-
return /* @__PURE__ */ (0,
|
|
78921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(A0805, {});
|
|
78775
78922
|
}
|
|
78776
78923
|
return null;
|
|
78777
78924
|
};
|
|
78778
78925
|
|
|
78779
78926
|
// lib/SOT-23-3P.tsx
|
|
78780
|
-
var
|
|
78927
|
+
var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
|
|
78781
78928
|
var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
78782
78929
|
const bodyWidth = 1.3;
|
|
78783
78930
|
const bodyLength4 = 2.9;
|
|
@@ -78787,8 +78934,8 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
|
78787
78934
|
const leadHeight = 0.95;
|
|
78788
78935
|
const padContactLength = 0.4;
|
|
78789
78936
|
const extendedBodyDistance = (fullWidth - bodyWidth) / 2 + 0.3;
|
|
78790
|
-
return /* @__PURE__ */ (0,
|
|
78791
|
-
/* @__PURE__ */ (0,
|
|
78937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
78938
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
78792
78939
|
SmdChipLead,
|
|
78793
78940
|
{
|
|
78794
78941
|
rotation: Math.PI,
|
|
@@ -78805,7 +78952,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
|
78805
78952
|
},
|
|
78806
78953
|
1
|
|
78807
78954
|
),
|
|
78808
|
-
/* @__PURE__ */ (0,
|
|
78955
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
78809
78956
|
SmdChipLead,
|
|
78810
78957
|
{
|
|
78811
78958
|
rotation: Math.PI,
|
|
@@ -78822,7 +78969,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
|
78822
78969
|
},
|
|
78823
78970
|
2
|
|
78824
78971
|
),
|
|
78825
|
-
/* @__PURE__ */ (0,
|
|
78972
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
78826
78973
|
SmdChipLead,
|
|
78827
78974
|
{
|
|
78828
78975
|
position: {
|
|
@@ -78838,7 +78985,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
|
78838
78985
|
},
|
|
78839
78986
|
3
|
|
78840
78987
|
),
|
|
78841
|
-
/* @__PURE__ */ (0,
|
|
78988
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
78842
78989
|
ChipBody,
|
|
78843
78990
|
{
|
|
78844
78991
|
center: { x: 0, y: 0, z: 0 },
|
|
@@ -78852,7 +78999,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
|
78852
78999
|
|
|
78853
79000
|
// lib/SOT-563.tsx
|
|
78854
79001
|
var import_jscad_fiber10 = __toESM(require_dist(), 1);
|
|
78855
|
-
var
|
|
79002
|
+
var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
|
|
78856
79003
|
var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength4 = 1.6 }) => {
|
|
78857
79004
|
const bodyWidth = 1.2;
|
|
78858
79005
|
const bodyLength4 = 1.6;
|
|
@@ -78862,24 +79009,24 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength4 = 1.6 }) => {
|
|
|
78862
79009
|
const leadHeight = 0.13;
|
|
78863
79010
|
const leadSpacing = 0.5;
|
|
78864
79011
|
const bodyZOffset = -0.3;
|
|
78865
|
-
return /* @__PURE__ */ (0,
|
|
78866
|
-
/* @__PURE__ */ (0,
|
|
79012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
79013
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber10.Rotate, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber10.Translate, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber10.Colorize, { color: "grey", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber10.Cuboid, { size: [bodyWidth, bodyLength4, bodyHeight] }) }) }) }),
|
|
78867
79014
|
[-1, 0, 1].flatMap((yOffset, index) => [
|
|
78868
79015
|
// Left lead
|
|
78869
|
-
/* @__PURE__ */ (0,
|
|
79016
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
78870
79017
|
import_jscad_fiber10.Translate,
|
|
78871
79018
|
{
|
|
78872
79019
|
center: [-bodyWidth / 2 - 0.03, yOffset * leadSpacing, 0],
|
|
78873
|
-
children: /* @__PURE__ */ (0,
|
|
79020
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber10.Cuboid, { size: [leadLength, leadWidth, leadHeight] })
|
|
78874
79021
|
},
|
|
78875
79022
|
`left-${index}`
|
|
78876
79023
|
),
|
|
78877
79024
|
// Right lead
|
|
78878
|
-
/* @__PURE__ */ (0,
|
|
79025
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
78879
79026
|
import_jscad_fiber10.Translate,
|
|
78880
79027
|
{
|
|
78881
79028
|
center: [bodyWidth / 2 + 0.03, yOffset * leadSpacing, 0],
|
|
78882
|
-
children: /* @__PURE__ */ (0,
|
|
79029
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber10.Cuboid, { size: [leadLength, leadWidth, leadHeight] })
|
|
78883
79030
|
},
|
|
78884
79031
|
`right-${index}`
|
|
78885
79032
|
)
|
|
@@ -78889,7 +79036,7 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength4 = 1.6 }) => {
|
|
|
78889
79036
|
|
|
78890
79037
|
// lib/SOT-723.tsx
|
|
78891
79038
|
var import_jscad_fiber11 = __toESM(require_dist(), 1);
|
|
78892
|
-
var
|
|
79039
|
+
var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
|
|
78893
79040
|
var getCcwSot723Coords = (pn) => {
|
|
78894
79041
|
if (pn === 1) {
|
|
78895
79042
|
return { x: 0, y: 0 };
|
|
@@ -78907,11 +79054,11 @@ var SOT723 = () => {
|
|
|
78907
79054
|
const leadLength = 0.3;
|
|
78908
79055
|
const leadHeight = 0.1;
|
|
78909
79056
|
const centerLeadWidth = 0.42;
|
|
78910
|
-
return /* @__PURE__ */ (0,
|
|
78911
|
-
/* @__PURE__ */ (0,
|
|
79057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
79058
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jscad_fiber11.Rotate, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jscad_fiber11.Translate, { center: [0.475, leadHeight / 2, -0.25], children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jscad_fiber11.Colorize, { color: "grey", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jscad_fiber11.Cuboid, { size: [bodyWidth, bodyLength4, bodyHeight] }) }) }) }),
|
|
78912
79059
|
[1, 2, 3].map((pn) => {
|
|
78913
79060
|
const { x, y } = getCcwSot723Coords(pn);
|
|
78914
|
-
return /* @__PURE__ */ (0,
|
|
79061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jscad_fiber11.Translate, { center: [x, y, 0], children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
78915
79062
|
import_jscad_fiber11.Cuboid,
|
|
78916
79063
|
{
|
|
78917
79064
|
size: [
|
|
@@ -78927,7 +79074,7 @@ var SOT723 = () => {
|
|
|
78927
79074
|
|
|
78928
79075
|
// lib/qfn.tsx
|
|
78929
79076
|
var import_jscad_fiber12 = __toESM(require_dist(), 1);
|
|
78930
|
-
var
|
|
79077
|
+
var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
|
|
78931
79078
|
var QFN = ({
|
|
78932
79079
|
fullWidth = 5,
|
|
78933
79080
|
height: height4 = 0.8,
|
|
@@ -78936,15 +79083,15 @@ var QFN = ({
|
|
|
78936
79083
|
const bodyWidth = fullWidth;
|
|
78937
79084
|
const bodyLength4 = fullWidth;
|
|
78938
79085
|
const thermalPadHeight = 0.1;
|
|
78939
|
-
return /* @__PURE__ */ (0,
|
|
78940
|
-
/* @__PURE__ */ (0,
|
|
79086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
79087
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jscad_fiber12.Colorize, { color: "grey", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
78941
79088
|
import_jscad_fiber12.Cuboid,
|
|
78942
79089
|
{
|
|
78943
79090
|
center: { x: 0, y: 0, z: height4 / 2 },
|
|
78944
79091
|
size: [bodyWidth, bodyLength4, height4]
|
|
78945
79092
|
}
|
|
78946
79093
|
) }),
|
|
78947
|
-
/* @__PURE__ */ (0,
|
|
79094
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
78948
79095
|
import_jscad_fiber12.Cuboid,
|
|
78949
79096
|
{
|
|
78950
79097
|
center: { x: 0, y: 0, z: -thermalPadHeight / 2 },
|
|
@@ -78954,103 +79101,6 @@ var QFN = ({
|
|
|
78954
79101
|
] });
|
|
78955
79102
|
};
|
|
78956
79103
|
|
|
78957
|
-
// lib/qfp.tsx
|
|
78958
|
-
var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
|
|
78959
|
-
var QFP = ({
|
|
78960
|
-
pinCount
|
|
78961
|
-
}) => {
|
|
78962
|
-
const sidePinCount = pinCount / 4;
|
|
78963
|
-
const pinSpacing = 0.5;
|
|
78964
|
-
const fullWidth = pinSpacing * sidePinCount + 4;
|
|
78965
|
-
const fullLength4 = fullWidth;
|
|
78966
|
-
const pinOffsetToCenter = (sidePinCount - 1) * pinSpacing / 2;
|
|
78967
|
-
const bodyWidth = fullWidth - 2;
|
|
78968
|
-
const bodyLength4 = fullLength4 - 2;
|
|
78969
|
-
const leadHeight = 0.8;
|
|
78970
|
-
const leadWidth = 0.25;
|
|
78971
|
-
const leadThickness = 0.15;
|
|
78972
|
-
const padContactLength = 0.6;
|
|
78973
|
-
const bodyDistance = (fullWidth - bodyWidth) / 2;
|
|
78974
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
78975
|
-
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
78976
|
-
SmdChipLead,
|
|
78977
|
-
{
|
|
78978
|
-
position: {
|
|
78979
|
-
x: -fullWidth / 2,
|
|
78980
|
-
y: i * pinSpacing - pinOffsetToCenter,
|
|
78981
|
-
z: 0
|
|
78982
|
-
},
|
|
78983
|
-
width: leadWidth,
|
|
78984
|
-
thickness: leadThickness,
|
|
78985
|
-
padContactLength,
|
|
78986
|
-
bodyDistance,
|
|
78987
|
-
height: leadHeight
|
|
78988
|
-
},
|
|
78989
|
-
`left-${i}`
|
|
78990
|
-
)),
|
|
78991
|
-
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
78992
|
-
SmdChipLead,
|
|
78993
|
-
{
|
|
78994
|
-
rotation: Math.PI,
|
|
78995
|
-
position: {
|
|
78996
|
-
x: fullWidth / 2,
|
|
78997
|
-
y: i * pinSpacing - pinOffsetToCenter,
|
|
78998
|
-
z: 0
|
|
78999
|
-
},
|
|
79000
|
-
width: leadWidth,
|
|
79001
|
-
thickness: leadThickness,
|
|
79002
|
-
padContactLength,
|
|
79003
|
-
bodyDistance,
|
|
79004
|
-
height: leadHeight
|
|
79005
|
-
},
|
|
79006
|
-
`right-${i}`
|
|
79007
|
-
)),
|
|
79008
|
-
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
79009
|
-
SmdChipLead,
|
|
79010
|
-
{
|
|
79011
|
-
rotation: Math.PI / 2,
|
|
79012
|
-
position: {
|
|
79013
|
-
x: i * pinSpacing - pinOffsetToCenter,
|
|
79014
|
-
y: -fullLength4 / 2,
|
|
79015
|
-
z: 0
|
|
79016
|
-
},
|
|
79017
|
-
width: leadWidth,
|
|
79018
|
-
thickness: leadThickness,
|
|
79019
|
-
padContactLength,
|
|
79020
|
-
bodyDistance,
|
|
79021
|
-
height: leadHeight
|
|
79022
|
-
},
|
|
79023
|
-
`bottom-${i}`
|
|
79024
|
-
)),
|
|
79025
|
-
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
79026
|
-
SmdChipLead,
|
|
79027
|
-
{
|
|
79028
|
-
rotation: -Math.PI / 2,
|
|
79029
|
-
position: {
|
|
79030
|
-
x: i * pinSpacing - pinOffsetToCenter,
|
|
79031
|
-
y: fullLength4 / 2,
|
|
79032
|
-
z: 0
|
|
79033
|
-
},
|
|
79034
|
-
width: leadWidth,
|
|
79035
|
-
thickness: leadThickness,
|
|
79036
|
-
padContactLength,
|
|
79037
|
-
bodyDistance,
|
|
79038
|
-
height: leadHeight
|
|
79039
|
-
},
|
|
79040
|
-
`top-${i}`
|
|
79041
|
-
)),
|
|
79042
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
79043
|
-
ChipBody,
|
|
79044
|
-
{
|
|
79045
|
-
center: { x: 0, y: 0, z: leadHeight / 2 },
|
|
79046
|
-
width: bodyWidth,
|
|
79047
|
-
length: bodyLength4,
|
|
79048
|
-
height: 1.5
|
|
79049
|
-
}
|
|
79050
|
-
)
|
|
79051
|
-
] });
|
|
79052
|
-
};
|
|
79053
|
-
|
|
79054
79104
|
// lib/sod-123.tsx
|
|
79055
79105
|
var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
|
|
79056
79106
|
var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength4 = 1.6 }) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jscad-electronics",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.11",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -19,20 +19,20 @@
|
|
|
19
19
|
"build:site": "cosmos-export"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@biomejs/biome": "^1.
|
|
23
|
-
"@
|
|
24
|
-
"@types/react": "^18.3.
|
|
25
|
-
"@types/react-dom": "^18.3.0",
|
|
22
|
+
"@biomejs/biome": "^1.9.3",
|
|
23
|
+
"@types/react": "^18.3.11",
|
|
24
|
+
"@types/react-dom": "^18.3.1",
|
|
26
25
|
"jscad-fiber": "^0.0.67",
|
|
27
26
|
"react": "^18.3.1",
|
|
28
|
-
"react-cosmos": "^6.
|
|
29
|
-
"react-cosmos-plugin-vite": "^6.
|
|
27
|
+
"react-cosmos": "^6.2.0",
|
|
28
|
+
"react-cosmos-plugin-vite": "^6.2.0",
|
|
30
29
|
"react-dom": "^18.3.1",
|
|
31
30
|
"tsup": "^8.3.0",
|
|
32
|
-
"vite": "^5.
|
|
31
|
+
"vite": "^5.4.8",
|
|
33
32
|
"vite-tsconfig-paths": "^5.0.1"
|
|
34
33
|
},
|
|
35
34
|
"dependencies": {
|
|
36
|
-
"@tscircuit/footprinter": "^0.0.
|
|
35
|
+
"@tscircuit/footprinter": "^0.0.70",
|
|
36
|
+
"circuit-json": "^0.0.84"
|
|
37
37
|
}
|
|
38
38
|
}
|