jscad-electronics 0.0.38 → 0.0.40

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 CHANGED
@@ -167,4 +167,6 @@ declare const PinRow: ({ numberOfPins, pitch, longSidePinLength, }: {
167
167
  longSidePinLength?: number;
168
168
  }) => react_jsx_runtime.JSX.Element;
169
169
 
170
- export { A01005, A0201, A0402, A0603, A0805, A1206, A1210, A2010, A2512, BGA, ChipBody, type ChipBodyProps, ExtrudedPads, FootprintPad, FootprintPlatedHole, Footprinter3d, PinRow, QFN, QFP, SOD123, SOT233P, SOT563, SOT723, SmdChipLead, type SmdChipLeadProps, Tssop, VSSOP };
170
+ declare const SOD523: () => react_jsx_runtime.JSX.Element;
171
+
172
+ export { A01005, A0201, A0402, A0603, A0805, A1206, A1210, A2010, A2512, BGA, ChipBody, type ChipBodyProps, ExtrudedPads, FootprintPad, FootprintPlatedHole, Footprinter3d, PinRow, QFN, QFP, SOD123, SOD523, SOT233P, SOT563, SOT723, SmdChipLead, type SmdChipLeadProps, Tssop, VSSOP };
package/dist/index.js CHANGED
@@ -1595,15 +1595,63 @@ var VSSOP = ({
1595
1595
  ] });
1596
1596
  };
1597
1597
 
1598
+ // lib/SOD523.tsx
1599
+ import { Colorize as Colorize10, Cuboid as Cuboid17, Hull as Hull3, Translate as Translate9, Union as Union4 } from "jscad-fiber";
1600
+ import { Fragment as Fragment22, jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
1601
+ var SOD523 = () => {
1602
+ const fullWidth = 2.15;
1603
+ const bodyLength10 = 0.8;
1604
+ const bodyHeight = 0.6;
1605
+ const padWidth = 0.6;
1606
+ const padLength = 0.5;
1607
+ const padThickness = 0.12;
1608
+ const bodyWidth = fullWidth - padLength;
1609
+ const leftPadCenterX = -bodyWidth / 2 + padLength / 2 - 0.15;
1610
+ const rightPadCenterX = bodyWidth / 2 - padLength / 2 + 0.15;
1611
+ const taperOffset = 0.2;
1612
+ const straightHeight = bodyHeight * 0.5;
1613
+ const Body = /* @__PURE__ */ jsx26(Colorize10, { color: "#222", children: /* @__PURE__ */ jsxs23(Union4, { children: [
1614
+ /* @__PURE__ */ jsx26(Translate9, { z: straightHeight / 2, children: /* @__PURE__ */ jsx26(Cuboid17, { size: [bodyWidth, bodyLength10, straightHeight] }) }),
1615
+ /* @__PURE__ */ jsxs23(Hull3, { children: [
1616
+ /* @__PURE__ */ jsx26(Translate9, { z: straightHeight, children: /* @__PURE__ */ jsx26(Cuboid17, { size: [bodyWidth, bodyLength10, 0.01] }) }),
1617
+ /* @__PURE__ */ jsx26(Translate9, { z: bodyHeight, children: /* @__PURE__ */ jsx26(
1618
+ Cuboid17,
1619
+ {
1620
+ size: [bodyWidth - taperOffset, bodyLength10 - taperOffset, 0.01]
1621
+ }
1622
+ ) })
1623
+ ] })
1624
+ ] }) });
1625
+ return /* @__PURE__ */ jsxs23(Fragment22, { children: [
1626
+ /* @__PURE__ */ jsx26(
1627
+ Cuboid17,
1628
+ {
1629
+ color: "#ccc",
1630
+ size: [padLength, padWidth, padThickness],
1631
+ center: [leftPadCenterX, 0, padThickness / 2]
1632
+ }
1633
+ ),
1634
+ /* @__PURE__ */ jsx26(
1635
+ Cuboid17,
1636
+ {
1637
+ color: "#ccc",
1638
+ size: [padLength, padWidth, padThickness],
1639
+ center: [rightPadCenterX, 0, padThickness / 2]
1640
+ }
1641
+ ),
1642
+ Body
1643
+ ] });
1644
+ };
1645
+
1598
1646
  // lib/Footprinter3d.tsx
1599
- import { jsx as jsx26 } from "react/jsx-runtime";
1647
+ import { jsx as jsx27 } from "react/jsx-runtime";
1600
1648
  var Footprinter3d = ({ footprint }) => {
1601
1649
  const fpJson = fp3.string(footprint).json();
1602
1650
  switch (fpJson.fn) {
1603
1651
  case "dip":
1604
- return /* @__PURE__ */ jsx26(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
1652
+ return /* @__PURE__ */ jsx27(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
1605
1653
  case "tssop":
1606
- return /* @__PURE__ */ jsx26(
1654
+ return /* @__PURE__ */ jsx27(
1607
1655
  Tssop,
1608
1656
  {
1609
1657
  pinCount: fpJson.num_pins,
@@ -1614,7 +1662,7 @@ var Footprinter3d = ({ footprint }) => {
1614
1662
  }
1615
1663
  );
1616
1664
  case "vssop":
1617
- return /* @__PURE__ */ jsx26(
1665
+ return /* @__PURE__ */ jsx27(
1618
1666
  VSSOP,
1619
1667
  {
1620
1668
  pinCount: fpJson.num_pins,
@@ -1626,7 +1674,7 @@ var Footprinter3d = ({ footprint }) => {
1626
1674
  }
1627
1675
  );
1628
1676
  case "qfp":
1629
- return /* @__PURE__ */ jsx26(
1677
+ return /* @__PURE__ */ jsx27(
1630
1678
  QFP,
1631
1679
  {
1632
1680
  pinCount: fpJson.num_pins,
@@ -1637,7 +1685,7 @@ var Footprinter3d = ({ footprint }) => {
1637
1685
  }
1638
1686
  );
1639
1687
  case "qfn":
1640
- return /* @__PURE__ */ jsx26(
1688
+ return /* @__PURE__ */ jsx27(
1641
1689
  qfn_default,
1642
1690
  {
1643
1691
  num_pins: fpJson.num_pins,
@@ -1654,35 +1702,35 @@ var Footprinter3d = ({ footprint }) => {
1654
1702
  );
1655
1703
  case "pinrow":
1656
1704
  if (fpJson.male)
1657
- return /* @__PURE__ */ jsx26(PinRow, { numberOfPins: fpJson.num_pins, pitch: fpJson.p });
1705
+ return /* @__PURE__ */ jsx27(PinRow, { numberOfPins: fpJson.num_pins, pitch: fpJson.p });
1658
1706
  if (fpJson.female)
1659
- return /* @__PURE__ */ jsx26(FemaleHeader, { numberOfPins: fpJson.num_pins, pitch: fpJson.p });
1707
+ return /* @__PURE__ */ jsx27(FemaleHeader, { numberOfPins: fpJson.num_pins, pitch: fpJson.p });
1660
1708
  case "cap": {
1661
1709
  switch (fpJson.imperial) {
1662
1710
  case "0402":
1663
- return /* @__PURE__ */ jsx26(A0402, { color: "#856c4d" });
1711
+ return /* @__PURE__ */ jsx27(A0402, { color: "#856c4d" });
1664
1712
  case "0603":
1665
- return /* @__PURE__ */ jsx26(A0603, { color: "#856c4d" });
1713
+ return /* @__PURE__ */ jsx27(A0603, { color: "#856c4d" });
1666
1714
  case "0805":
1667
- return /* @__PURE__ */ jsx26(A0805, { color: "#856c4d" });
1715
+ return /* @__PURE__ */ jsx27(A0805, { color: "#856c4d" });
1668
1716
  case "0201":
1669
- return /* @__PURE__ */ jsx26(A0201, { color: "#856c4d" });
1717
+ return /* @__PURE__ */ jsx27(A0201, { color: "#856c4d" });
1670
1718
  case "01005":
1671
- return /* @__PURE__ */ jsx26(A01005, { color: "#856c4d" });
1719
+ return /* @__PURE__ */ jsx27(A01005, { color: "#856c4d" });
1672
1720
  case "1206":
1673
- return /* @__PURE__ */ jsx26(A1206, { color: "#856c4d" });
1721
+ return /* @__PURE__ */ jsx27(A1206, { color: "#856c4d" });
1674
1722
  case "1210":
1675
- return /* @__PURE__ */ jsx26(A1210, { color: "#856c4d" });
1723
+ return /* @__PURE__ */ jsx27(A1210, { color: "#856c4d" });
1676
1724
  case "2010":
1677
- return /* @__PURE__ */ jsx26(A2010, { color: "#856c4d" });
1725
+ return /* @__PURE__ */ jsx27(A2010, { color: "#856c4d" });
1678
1726
  case "2512":
1679
- return /* @__PURE__ */ jsx26(A2512, { color: "#856c4d" });
1727
+ return /* @__PURE__ */ jsx27(A2512, { color: "#856c4d" });
1680
1728
  }
1681
1729
  }
1682
1730
  case "sot235":
1683
- return /* @__PURE__ */ jsx26(SOT_235_default, {});
1731
+ return /* @__PURE__ */ jsx27(SOT_235_default, {});
1684
1732
  case "pushbutton":
1685
- return /* @__PURE__ */ jsx26(
1733
+ return /* @__PURE__ */ jsx27(
1686
1734
  PushButton,
1687
1735
  {
1688
1736
  width: fpJson.w,
@@ -1691,7 +1739,7 @@ var Footprinter3d = ({ footprint }) => {
1691
1739
  }
1692
1740
  );
1693
1741
  case "soic":
1694
- return /* @__PURE__ */ jsx26(
1742
+ return /* @__PURE__ */ jsx27(
1695
1743
  SOIC,
1696
1744
  {
1697
1745
  pinCount: fpJson.num_pins,
@@ -1701,32 +1749,34 @@ var Footprinter3d = ({ footprint }) => {
1701
1749
  bodyWidth: fpJson.w
1702
1750
  }
1703
1751
  );
1752
+ case "sod523":
1753
+ return /* @__PURE__ */ jsx27(SOD523, {});
1704
1754
  }
1705
1755
  switch (fpJson.imperial) {
1706
1756
  case "0402":
1707
- return /* @__PURE__ */ jsx26(A0402, {});
1757
+ return /* @__PURE__ */ jsx27(A0402, {});
1708
1758
  case "0603":
1709
- return /* @__PURE__ */ jsx26(A0603, {});
1759
+ return /* @__PURE__ */ jsx27(A0603, {});
1710
1760
  case "0805":
1711
- return /* @__PURE__ */ jsx26(A0805, {});
1761
+ return /* @__PURE__ */ jsx27(A0805, {});
1712
1762
  case "0201":
1713
- return /* @__PURE__ */ jsx26(A0201, {});
1763
+ return /* @__PURE__ */ jsx27(A0201, {});
1714
1764
  case "01005":
1715
- return /* @__PURE__ */ jsx26(A01005, {});
1765
+ return /* @__PURE__ */ jsx27(A01005, {});
1716
1766
  case "1206":
1717
- return /* @__PURE__ */ jsx26(A1206, {});
1767
+ return /* @__PURE__ */ jsx27(A1206, {});
1718
1768
  case "1210":
1719
- return /* @__PURE__ */ jsx26(A1210, {});
1769
+ return /* @__PURE__ */ jsx27(A1210, {});
1720
1770
  case "2010":
1721
- return /* @__PURE__ */ jsx26(A2010, {});
1771
+ return /* @__PURE__ */ jsx27(A2010, {});
1722
1772
  case "2512":
1723
- return /* @__PURE__ */ jsx26(A2512, {});
1773
+ return /* @__PURE__ */ jsx27(A2512, {});
1724
1774
  }
1725
1775
  return null;
1726
1776
  };
1727
1777
 
1728
1778
  // lib/SOT-23-3P.tsx
1729
- import { Fragment as Fragment22, jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
1779
+ import { Fragment as Fragment23, jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
1730
1780
  var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
1731
1781
  const bodyWidth = 1.3;
1732
1782
  const bodyLength10 = 2.9;
@@ -1736,8 +1786,8 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
1736
1786
  const leadHeight = 0.95;
1737
1787
  const padContactLength = 0.4;
1738
1788
  const extendedBodyDistance = (fullWidth - bodyWidth) / 2 + 0.3;
1739
- return /* @__PURE__ */ jsxs23(Fragment22, { children: [
1740
- /* @__PURE__ */ jsx27(
1789
+ return /* @__PURE__ */ jsxs24(Fragment23, { children: [
1790
+ /* @__PURE__ */ jsx28(
1741
1791
  SmdChipLead,
1742
1792
  {
1743
1793
  rotation: Math.PI,
@@ -1754,7 +1804,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
1754
1804
  },
1755
1805
  1
1756
1806
  ),
1757
- /* @__PURE__ */ jsx27(
1807
+ /* @__PURE__ */ jsx28(
1758
1808
  SmdChipLead,
1759
1809
  {
1760
1810
  rotation: Math.PI,
@@ -1771,7 +1821,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
1771
1821
  },
1772
1822
  2
1773
1823
  ),
1774
- /* @__PURE__ */ jsx27(
1824
+ /* @__PURE__ */ jsx28(
1775
1825
  SmdChipLead,
1776
1826
  {
1777
1827
  position: {
@@ -1787,7 +1837,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
1787
1837
  },
1788
1838
  3
1789
1839
  ),
1790
- /* @__PURE__ */ jsx27(
1840
+ /* @__PURE__ */ jsx28(
1791
1841
  ChipBody,
1792
1842
  {
1793
1843
  center: { x: 0, y: 0, z: 0 },
@@ -1800,8 +1850,8 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
1800
1850
  };
1801
1851
 
1802
1852
  // lib/SOT-563.tsx
1803
- import { Cuboid as Cuboid17, Translate as Translate9, Rotate as Rotate5, Colorize as Colorize10 } from "jscad-fiber";
1804
- import { Fragment as Fragment23, jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
1853
+ import { Cuboid as Cuboid18, Translate as Translate10, Rotate as Rotate5, Colorize as Colorize11 } from "jscad-fiber";
1854
+ import { Fragment as Fragment24, jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
1805
1855
  var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
1806
1856
  const bodyWidth = 1.2;
1807
1857
  const bodyLength10 = 1.6;
@@ -1811,24 +1861,24 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
1811
1861
  const leadHeight = 0.13;
1812
1862
  const leadSpacing = 0.5;
1813
1863
  const bodyZOffset = -0.3;
1814
- return /* @__PURE__ */ jsxs24(Fragment23, { children: [
1815
- /* @__PURE__ */ jsx28(Rotate5, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx28(Translate9, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ jsx28(Colorize10, { color: "grey", children: /* @__PURE__ */ jsx28(Cuboid17, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
1864
+ return /* @__PURE__ */ jsxs25(Fragment24, { children: [
1865
+ /* @__PURE__ */ jsx29(Rotate5, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx29(Translate10, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ jsx29(Colorize11, { color: "grey", children: /* @__PURE__ */ jsx29(Cuboid18, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
1816
1866
  [-1, 0, 1].flatMap((yOffset, index) => [
1817
1867
  // Left lead
1818
- /* @__PURE__ */ jsx28(
1819
- Translate9,
1868
+ /* @__PURE__ */ jsx29(
1869
+ Translate10,
1820
1870
  {
1821
1871
  center: [-bodyWidth / 2 - 0.03, yOffset * leadSpacing, 0],
1822
- children: /* @__PURE__ */ jsx28(Cuboid17, { size: [leadLength, leadWidth, leadHeight] })
1872
+ children: /* @__PURE__ */ jsx29(Cuboid18, { size: [leadLength, leadWidth, leadHeight] })
1823
1873
  },
1824
1874
  `left-${index}`
1825
1875
  ),
1826
1876
  // Right lead
1827
- /* @__PURE__ */ jsx28(
1828
- Translate9,
1877
+ /* @__PURE__ */ jsx29(
1878
+ Translate10,
1829
1879
  {
1830
1880
  center: [bodyWidth / 2 + 0.03, yOffset * leadSpacing, 0],
1831
- children: /* @__PURE__ */ jsx28(Cuboid17, { size: [leadLength, leadWidth, leadHeight] })
1881
+ children: /* @__PURE__ */ jsx29(Cuboid18, { size: [leadLength, leadWidth, leadHeight] })
1832
1882
  },
1833
1883
  `right-${index}`
1834
1884
  )
@@ -1837,8 +1887,8 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
1837
1887
  };
1838
1888
 
1839
1889
  // lib/SOT-723.tsx
1840
- import { Cuboid as Cuboid18, Translate as Translate10, Rotate as Rotate6, Colorize as Colorize11 } from "jscad-fiber";
1841
- import { Fragment as Fragment24, jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
1890
+ import { Cuboid as Cuboid19, Translate as Translate11, Rotate as Rotate6, Colorize as Colorize12 } from "jscad-fiber";
1891
+ import { Fragment as Fragment25, jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
1842
1892
  var getCcwSot723Coords = (pn) => {
1843
1893
  if (pn === 1) {
1844
1894
  return { x: 0, y: 0 };
@@ -1856,12 +1906,12 @@ var SOT723 = () => {
1856
1906
  const leadLength = 0.3;
1857
1907
  const leadHeight = 0.1;
1858
1908
  const centerLeadWidth = 0.42;
1859
- return /* @__PURE__ */ jsxs25(Fragment24, { children: [
1860
- /* @__PURE__ */ jsx29(Rotate6, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx29(Translate10, { center: [0.475, leadHeight / 2, -0.25], children: /* @__PURE__ */ jsx29(Colorize11, { color: "grey", children: /* @__PURE__ */ jsx29(Cuboid18, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
1909
+ return /* @__PURE__ */ jsxs26(Fragment25, { children: [
1910
+ /* @__PURE__ */ jsx30(Rotate6, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx30(Translate11, { center: [0.475, leadHeight / 2, -0.25], children: /* @__PURE__ */ jsx30(Colorize12, { color: "grey", children: /* @__PURE__ */ jsx30(Cuboid19, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
1861
1911
  [1, 2, 3].map((pn) => {
1862
1912
  const { x, y } = getCcwSot723Coords(pn);
1863
- return /* @__PURE__ */ jsx29(Translate10, { center: [x, y, 0], children: /* @__PURE__ */ jsx29(
1864
- Cuboid18,
1913
+ return /* @__PURE__ */ jsx30(Translate11, { center: [x, y, 0], children: /* @__PURE__ */ jsx30(
1914
+ Cuboid19,
1865
1915
  {
1866
1916
  size: [
1867
1917
  leadLength,
@@ -1875,7 +1925,7 @@ var SOT723 = () => {
1875
1925
  };
1876
1926
 
1877
1927
  // lib/sod-123.tsx
1878
- import { Fragment as Fragment25, jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
1928
+ import { Fragment as Fragment26, jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
1879
1929
  var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
1880
1930
  const bodyWidth = 2.9;
1881
1931
  const bodyLength10 = 1.3;
@@ -1884,17 +1934,16 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
1884
1934
  const leadThickness = 0.15;
1885
1935
  const leadHeight = 0.5;
1886
1936
  const padContactLength = 0.4;
1887
- const leadYOffset = leadHeight / 1 - 0.4;
1888
- const bodyYOffset = leadHeight / 2 - 0.4;
1937
+ const padThickness = leadThickness / 2;
1889
1938
  const bodyDistance = (fullWidth - bodyWidth) / 2;
1890
- return /* @__PURE__ */ jsxs26(Fragment25, { children: [
1891
- /* @__PURE__ */ jsx30(
1939
+ return /* @__PURE__ */ jsxs27(Fragment26, { children: [
1940
+ /* @__PURE__ */ jsx31(
1892
1941
  SmdChipLead,
1893
1942
  {
1894
1943
  position: {
1895
1944
  x: -fullWidth / 2 + leadWidth / 2,
1896
- y: leadYOffset,
1897
- z: 0
1945
+ y: 0,
1946
+ z: padThickness
1898
1947
  },
1899
1948
  width: leadWidth,
1900
1949
  thickness: leadThickness,
@@ -1904,14 +1953,14 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
1904
1953
  },
1905
1954
  1
1906
1955
  ),
1907
- /* @__PURE__ */ jsx30(
1956
+ /* @__PURE__ */ jsx31(
1908
1957
  SmdChipLead,
1909
1958
  {
1910
1959
  rotation: Math.PI,
1911
1960
  position: {
1912
1961
  x: fullWidth / 2 - leadWidth / 2,
1913
- y: leadYOffset,
1914
- z: 0
1962
+ y: 0,
1963
+ z: padThickness
1915
1964
  },
1916
1965
  width: leadWidth,
1917
1966
  thickness: leadThickness,
@@ -1921,10 +1970,10 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
1921
1970
  },
1922
1971
  2
1923
1972
  ),
1924
- /* @__PURE__ */ jsx30(
1973
+ /* @__PURE__ */ jsx31(
1925
1974
  ChipBody,
1926
1975
  {
1927
- center: { x: 0, y: bodyYOffset, z: 0 },
1976
+ center: { x: 0, y: 0, z: 0 },
1928
1977
  width: bodyWidth,
1929
1978
  length: bodyLength10,
1930
1979
  height: bodyHeight
@@ -1952,6 +2001,7 @@ export {
1952
2001
  QFN,
1953
2002
  QFP,
1954
2003
  SOD123,
2004
+ SOD523,
1955
2005
  SOT233P,
1956
2006
  SOT563,
1957
2007
  SOT723,