jscad-electronics 0.0.61 → 0.0.62

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
@@ -177,4 +177,6 @@ declare const SMC: () => react_jsx_runtime.JSX.Element;
177
177
 
178
178
  declare const SMF: () => react_jsx_runtime.JSX.Element;
179
179
 
180
- export { A01005, A0201, A0402, A0603, A0805, A1206, A1210, A2010, A2512, BGA, ChipBody, type ChipBodyProps, ExtrudedPads, FootprintPad, FootprintPlatedHole, Footprinter3d, PinRow, QFN, QFP, SMA, SMB, SMC, SMF, SOD123, SOD523, SOT233P, SOT563, SOT723, SmdChipLead, type SmdChipLeadProps, Tssop, VSSOP };
180
+ declare const SOD123F: () => react_jsx_runtime.JSX.Element;
181
+
182
+ export { A01005, A0201, A0402, A0603, A0805, A1206, A1210, A2010, A2512, BGA, ChipBody, type ChipBodyProps, ExtrudedPads, FootprintPad, FootprintPlatedHole, Footprinter3d, PinRow, QFN, QFP, SMA, SMB, SMC, SMF, SOD123, SOD123F, SOD523, SOT233P, SOT563, SOT723, SmdChipLead, type SmdChipLeadProps, Tssop, VSSOP };
package/dist/index.js CHANGED
@@ -1943,15 +1943,61 @@ var SMF = () => {
1943
1943
  ] });
1944
1944
  };
1945
1945
 
1946
+ // lib/sod-123F.tsx
1947
+ import { Colorize as Colorize15, Cuboid as Cuboid23, Hull as Hull9, Translate as Translate14, Union as Union10 } from "jscad-fiber";
1948
+ import { Fragment as Fragment27, jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
1949
+ var SOD123F = () => {
1950
+ const fullWidth = 2.7;
1951
+ const bodyLength10 = 1.6;
1952
+ const bodyHeight = 1.1;
1953
+ const padWidth = 0.6;
1954
+ const padLength = 1;
1955
+ const padThickness = 0.12;
1956
+ const leftPadCenterX = -1.3;
1957
+ const rightPadCenterX = 1.3;
1958
+ const taperOffset = 0.2;
1959
+ const straightHeight = bodyHeight * 0.5;
1960
+ return /* @__PURE__ */ jsxs29(Fragment27, { children: [
1961
+ /* @__PURE__ */ jsx31(
1962
+ Cuboid23,
1963
+ {
1964
+ color: "#ccc",
1965
+ size: [padLength, padWidth, padThickness],
1966
+ center: [leftPadCenterX, 0, padThickness / 2]
1967
+ }
1968
+ ),
1969
+ /* @__PURE__ */ jsx31(
1970
+ Cuboid23,
1971
+ {
1972
+ color: "#ccc",
1973
+ size: [padLength, padWidth, padThickness],
1974
+ center: [rightPadCenterX, 0, padThickness / 2]
1975
+ }
1976
+ ),
1977
+ /* @__PURE__ */ jsx31(Colorize15, { color: "#222", children: /* @__PURE__ */ jsxs29(Union10, { children: [
1978
+ /* @__PURE__ */ jsx31(Translate14, { z: straightHeight / 2, children: /* @__PURE__ */ jsx31(Cuboid23, { size: [fullWidth, bodyLength10, straightHeight] }) }),
1979
+ /* @__PURE__ */ jsxs29(Hull9, { children: [
1980
+ /* @__PURE__ */ jsx31(Translate14, { z: straightHeight, children: /* @__PURE__ */ jsx31(Cuboid23, { size: [fullWidth, bodyLength10, 0.01] }) }),
1981
+ /* @__PURE__ */ jsx31(Translate14, { z: bodyHeight, children: /* @__PURE__ */ jsx31(
1982
+ Cuboid23,
1983
+ {
1984
+ size: [fullWidth - taperOffset, bodyLength10 - taperOffset, 0.01]
1985
+ }
1986
+ ) })
1987
+ ] })
1988
+ ] }) })
1989
+ ] });
1990
+ };
1991
+
1946
1992
  // lib/Footprinter3d.tsx
1947
- import { jsx as jsx31 } from "react/jsx-runtime";
1993
+ import { jsx as jsx32 } from "react/jsx-runtime";
1948
1994
  var Footprinter3d = ({ footprint }) => {
1949
1995
  const fpJson = fp3.string(footprint).json();
1950
1996
  switch (fpJson.fn) {
1951
1997
  case "dip":
1952
- return /* @__PURE__ */ jsx31(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
1998
+ return /* @__PURE__ */ jsx32(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
1953
1999
  case "tssop":
1954
- return /* @__PURE__ */ jsx31(
2000
+ return /* @__PURE__ */ jsx32(
1955
2001
  Tssop,
1956
2002
  {
1957
2003
  pinCount: fpJson.num_pins,
@@ -1962,7 +2008,7 @@ var Footprinter3d = ({ footprint }) => {
1962
2008
  }
1963
2009
  );
1964
2010
  case "vssop":
1965
- return /* @__PURE__ */ jsx31(
2011
+ return /* @__PURE__ */ jsx32(
1966
2012
  VSSOP,
1967
2013
  {
1968
2014
  pinCount: fpJson.num_pins,
@@ -1974,7 +2020,7 @@ var Footprinter3d = ({ footprint }) => {
1974
2020
  }
1975
2021
  );
1976
2022
  case "qfp":
1977
- return /* @__PURE__ */ jsx31(
2023
+ return /* @__PURE__ */ jsx32(
1978
2024
  QFP,
1979
2025
  {
1980
2026
  pinCount: fpJson.num_pins,
@@ -1986,7 +2032,7 @@ var Footprinter3d = ({ footprint }) => {
1986
2032
  );
1987
2033
  case "qfn":
1988
2034
  const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
1989
- return /* @__PURE__ */ jsx31(
2035
+ return /* @__PURE__ */ jsx32(
1990
2036
  qfn_default,
1991
2037
  {
1992
2038
  num_pins: fpJson.num_pins,
@@ -2003,35 +2049,35 @@ var Footprinter3d = ({ footprint }) => {
2003
2049
  );
2004
2050
  case "pinrow":
2005
2051
  if (fpJson.male)
2006
- return /* @__PURE__ */ jsx31(PinRow, { numberOfPins: fpJson.num_pins, pitch: fpJson.p });
2052
+ return /* @__PURE__ */ jsx32(PinRow, { numberOfPins: fpJson.num_pins, pitch: fpJson.p });
2007
2053
  if (fpJson.female)
2008
- return /* @__PURE__ */ jsx31(FemaleHeader, { numberOfPins: fpJson.num_pins, pitch: fpJson.p });
2054
+ return /* @__PURE__ */ jsx32(FemaleHeader, { numberOfPins: fpJson.num_pins, pitch: fpJson.p });
2009
2055
  case "cap": {
2010
2056
  switch (fpJson.imperial) {
2011
2057
  case "0402":
2012
- return /* @__PURE__ */ jsx31(A0402, { color: "#856c4d" });
2058
+ return /* @__PURE__ */ jsx32(A0402, { color: "#856c4d" });
2013
2059
  case "0603":
2014
- return /* @__PURE__ */ jsx31(A0603, { color: "#856c4d" });
2060
+ return /* @__PURE__ */ jsx32(A0603, { color: "#856c4d" });
2015
2061
  case "0805":
2016
- return /* @__PURE__ */ jsx31(A0805, { color: "#856c4d" });
2062
+ return /* @__PURE__ */ jsx32(A0805, { color: "#856c4d" });
2017
2063
  case "0201":
2018
- return /* @__PURE__ */ jsx31(A0201, { color: "#856c4d" });
2064
+ return /* @__PURE__ */ jsx32(A0201, { color: "#856c4d" });
2019
2065
  case "01005":
2020
- return /* @__PURE__ */ jsx31(A01005, { color: "#856c4d" });
2066
+ return /* @__PURE__ */ jsx32(A01005, { color: "#856c4d" });
2021
2067
  case "1206":
2022
- return /* @__PURE__ */ jsx31(A1206, { color: "#856c4d" });
2068
+ return /* @__PURE__ */ jsx32(A1206, { color: "#856c4d" });
2023
2069
  case "1210":
2024
- return /* @__PURE__ */ jsx31(A1210, { color: "#856c4d" });
2070
+ return /* @__PURE__ */ jsx32(A1210, { color: "#856c4d" });
2025
2071
  case "2010":
2026
- return /* @__PURE__ */ jsx31(A2010, { color: "#856c4d" });
2072
+ return /* @__PURE__ */ jsx32(A2010, { color: "#856c4d" });
2027
2073
  case "2512":
2028
- return /* @__PURE__ */ jsx31(A2512, { color: "#856c4d" });
2074
+ return /* @__PURE__ */ jsx32(A2512, { color: "#856c4d" });
2029
2075
  }
2030
2076
  }
2031
2077
  case "sot235":
2032
- return /* @__PURE__ */ jsx31(SOT_235_default, {});
2078
+ return /* @__PURE__ */ jsx32(SOT_235_default, {});
2033
2079
  case "pushbutton":
2034
- return /* @__PURE__ */ jsx31(
2080
+ return /* @__PURE__ */ jsx32(
2035
2081
  PushButton,
2036
2082
  {
2037
2083
  width: fpJson.w,
@@ -2040,7 +2086,7 @@ var Footprinter3d = ({ footprint }) => {
2040
2086
  }
2041
2087
  );
2042
2088
  case "soic":
2043
- return /* @__PURE__ */ jsx31(
2089
+ return /* @__PURE__ */ jsx32(
2044
2090
  SOIC,
2045
2091
  {
2046
2092
  pinCount: fpJson.num_pins,
@@ -2051,43 +2097,45 @@ var Footprinter3d = ({ footprint }) => {
2051
2097
  }
2052
2098
  );
2053
2099
  case "sod523":
2054
- return /* @__PURE__ */ jsx31(SOD523, {});
2100
+ return /* @__PURE__ */ jsx32(SOD523, {});
2055
2101
  case "sma":
2056
- return /* @__PURE__ */ jsx31(SMA, {});
2102
+ return /* @__PURE__ */ jsx32(SMA, {});
2057
2103
  case "smb":
2058
- return /* @__PURE__ */ jsx31(SMB, {});
2104
+ return /* @__PURE__ */ jsx32(SMB, {});
2059
2105
  case "smc":
2060
- return /* @__PURE__ */ jsx31(SMC, {});
2106
+ return /* @__PURE__ */ jsx32(SMC, {});
2061
2107
  case "smf":
2062
- return /* @__PURE__ */ jsx31(SMF, {});
2108
+ return /* @__PURE__ */ jsx32(SMF, {});
2109
+ case "sod123f":
2110
+ return /* @__PURE__ */ jsx32(SOD123F, {});
2063
2111
  }
2064
2112
  const colorMatch = footprint.match(/_color\(([^)]+)\)/);
2065
2113
  const color = colorMatch ? colorMatch[1] : void 0;
2066
2114
  switch (fpJson.imperial) {
2067
2115
  case "0402":
2068
- return /* @__PURE__ */ jsx31(A0402, { color });
2116
+ return /* @__PURE__ */ jsx32(A0402, { color });
2069
2117
  case "0603":
2070
- return /* @__PURE__ */ jsx31(A0603, { color });
2118
+ return /* @__PURE__ */ jsx32(A0603, { color });
2071
2119
  case "0805":
2072
- return /* @__PURE__ */ jsx31(A0805, { color });
2120
+ return /* @__PURE__ */ jsx32(A0805, { color });
2073
2121
  case "0201":
2074
- return /* @__PURE__ */ jsx31(A0201, { color });
2122
+ return /* @__PURE__ */ jsx32(A0201, { color });
2075
2123
  case "01005":
2076
- return /* @__PURE__ */ jsx31(A01005, { color });
2124
+ return /* @__PURE__ */ jsx32(A01005, { color });
2077
2125
  case "1206":
2078
- return /* @__PURE__ */ jsx31(A1206, { color });
2126
+ return /* @__PURE__ */ jsx32(A1206, { color });
2079
2127
  case "1210":
2080
- return /* @__PURE__ */ jsx31(A1210, { color });
2128
+ return /* @__PURE__ */ jsx32(A1210, { color });
2081
2129
  case "2010":
2082
- return /* @__PURE__ */ jsx31(A2010, { color });
2130
+ return /* @__PURE__ */ jsx32(A2010, { color });
2083
2131
  case "2512":
2084
- return /* @__PURE__ */ jsx31(A2512, { color });
2132
+ return /* @__PURE__ */ jsx32(A2512, { color });
2085
2133
  }
2086
2134
  return null;
2087
2135
  };
2088
2136
 
2089
2137
  // lib/SOT-23-3P.tsx
2090
- import { Fragment as Fragment27, jsx as jsx32, jsxs as jsxs29 } from "react/jsx-runtime";
2138
+ import { Fragment as Fragment28, jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
2091
2139
  var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
2092
2140
  const bodyWidth = 1.3;
2093
2141
  const bodyLength10 = 2.9;
@@ -2098,8 +2146,8 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
2098
2146
  const padContactLength = 0.4;
2099
2147
  const padThickness = leadThickness / 2;
2100
2148
  const extendedBodyDistance = (fullWidth - bodyWidth) / 2 + 0.3;
2101
- return /* @__PURE__ */ jsxs29(Fragment27, { children: [
2102
- /* @__PURE__ */ jsx32(
2149
+ return /* @__PURE__ */ jsxs30(Fragment28, { children: [
2150
+ /* @__PURE__ */ jsx33(
2103
2151
  SmdChipLead,
2104
2152
  {
2105
2153
  rotation: Math.PI,
@@ -2116,7 +2164,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
2116
2164
  },
2117
2165
  1
2118
2166
  ),
2119
- /* @__PURE__ */ jsx32(
2167
+ /* @__PURE__ */ jsx33(
2120
2168
  SmdChipLead,
2121
2169
  {
2122
2170
  rotation: Math.PI,
@@ -2133,7 +2181,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
2133
2181
  },
2134
2182
  2
2135
2183
  ),
2136
- /* @__PURE__ */ jsx32(
2184
+ /* @__PURE__ */ jsx33(
2137
2185
  SmdChipLead,
2138
2186
  {
2139
2187
  position: {
@@ -2149,7 +2197,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
2149
2197
  },
2150
2198
  3
2151
2199
  ),
2152
- /* @__PURE__ */ jsx32(
2200
+ /* @__PURE__ */ jsx33(
2153
2201
  ChipBody,
2154
2202
  {
2155
2203
  center: { x: 0, y: 0, z: 0 },
@@ -2162,8 +2210,8 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
2162
2210
  };
2163
2211
 
2164
2212
  // lib/SOT-563.tsx
2165
- import { Cuboid as Cuboid23, Translate as Translate14, Rotate as Rotate6, Colorize as Colorize15 } from "jscad-fiber";
2166
- import { Fragment as Fragment28, jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
2213
+ import { Cuboid as Cuboid24, Translate as Translate15, Rotate as Rotate6, Colorize as Colorize16 } from "jscad-fiber";
2214
+ import { Fragment as Fragment29, jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
2167
2215
  var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
2168
2216
  const bodyWidth = 1.2;
2169
2217
  const bodyLength10 = 1.6;
@@ -2173,28 +2221,28 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
2173
2221
  const leadHeight = 0.13;
2174
2222
  const leadSpacing = 0.5;
2175
2223
  const bodyZOffset = -0.4;
2176
- return /* @__PURE__ */ jsxs30(Fragment28, { children: [
2177
- /* @__PURE__ */ jsx33(Rotate6, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx33(Translate14, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ jsx33(Colorize15, { color: "grey", children: /* @__PURE__ */ jsx33(Cuboid23, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
2224
+ return /* @__PURE__ */ jsxs31(Fragment29, { children: [
2225
+ /* @__PURE__ */ jsx34(Rotate6, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx34(Translate15, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ jsx34(Colorize16, { color: "grey", children: /* @__PURE__ */ jsx34(Cuboid24, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
2178
2226
  [-1, 0, 1].flatMap((yOffset, index) => [
2179
2227
  // Left lead
2180
- /* @__PURE__ */ jsx33(
2181
- Translate14,
2228
+ /* @__PURE__ */ jsx34(
2229
+ Translate15,
2182
2230
  {
2183
2231
  center: [
2184
2232
  -bodyWidth / 2 - 0.03,
2185
2233
  yOffset * leadSpacing,
2186
2234
  leadHeight / 2
2187
2235
  ],
2188
- children: /* @__PURE__ */ jsx33(Cuboid23, { size: [leadLength, leadWidth, leadHeight] })
2236
+ children: /* @__PURE__ */ jsx34(Cuboid24, { size: [leadLength, leadWidth, leadHeight] })
2189
2237
  },
2190
2238
  `left-${index}`
2191
2239
  ),
2192
2240
  // Right lead
2193
- /* @__PURE__ */ jsx33(
2194
- Translate14,
2241
+ /* @__PURE__ */ jsx34(
2242
+ Translate15,
2195
2243
  {
2196
2244
  center: [bodyWidth / 2 + 0.03, yOffset * leadSpacing, leadHeight / 2],
2197
- children: /* @__PURE__ */ jsx33(Cuboid23, { size: [leadLength, leadWidth, leadHeight] })
2245
+ children: /* @__PURE__ */ jsx34(Cuboid24, { size: [leadLength, leadWidth, leadHeight] })
2198
2246
  },
2199
2247
  `right-${index}`
2200
2248
  )
@@ -2203,8 +2251,8 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
2203
2251
  };
2204
2252
 
2205
2253
  // lib/SOT-723.tsx
2206
- import { Cuboid as Cuboid24, Translate as Translate15, Rotate as Rotate7, Colorize as Colorize16 } from "jscad-fiber";
2207
- import { Fragment as Fragment29, jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
2254
+ import { Cuboid as Cuboid25, Translate as Translate16, Rotate as Rotate7, Colorize as Colorize17 } from "jscad-fiber";
2255
+ import { Fragment as Fragment30, jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
2208
2256
  var getCcwSot723Coords = (pn) => {
2209
2257
  if (pn === 1) {
2210
2258
  return { x: 0, y: 0 };
@@ -2222,12 +2270,12 @@ var SOT723 = () => {
2222
2270
  const leadLength = 0.3;
2223
2271
  const leadHeight = 0.1;
2224
2272
  const centerLeadWidth = 0.42;
2225
- return /* @__PURE__ */ jsxs31(Fragment29, { children: [
2226
- /* @__PURE__ */ jsx34(Rotate7, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx34(Translate15, { center: [0.475, leadHeight / 2, -0.25], children: /* @__PURE__ */ jsx34(Colorize16, { color: "grey", children: /* @__PURE__ */ jsx34(Cuboid24, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
2273
+ return /* @__PURE__ */ jsxs32(Fragment30, { children: [
2274
+ /* @__PURE__ */ jsx35(Rotate7, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx35(Translate16, { center: [0.475, leadHeight / 2, -0.25], children: /* @__PURE__ */ jsx35(Colorize17, { color: "grey", children: /* @__PURE__ */ jsx35(Cuboid25, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
2227
2275
  [1, 2, 3].map((pn) => {
2228
2276
  const { x, y } = getCcwSot723Coords(pn);
2229
- return /* @__PURE__ */ jsx34(Translate15, { center: [x, y, 0], children: /* @__PURE__ */ jsx34(
2230
- Cuboid24,
2277
+ return /* @__PURE__ */ jsx35(Translate16, { center: [x, y, 0], children: /* @__PURE__ */ jsx35(
2278
+ Cuboid25,
2231
2279
  {
2232
2280
  size: [
2233
2281
  leadLength,
@@ -2241,7 +2289,7 @@ var SOT723 = () => {
2241
2289
  };
2242
2290
 
2243
2291
  // lib/sod-123.tsx
2244
- import { Fragment as Fragment30, jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
2292
+ import { Fragment as Fragment31, jsx as jsx36, jsxs as jsxs33 } from "react/jsx-runtime";
2245
2293
  var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
2246
2294
  const bodyWidth = 2.9;
2247
2295
  const bodyLength10 = 1.3;
@@ -2252,8 +2300,8 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
2252
2300
  const padContactLength = 0.4;
2253
2301
  const padThickness = leadThickness / 2;
2254
2302
  const bodyDistance = (fullWidth - bodyWidth) / 2;
2255
- return /* @__PURE__ */ jsxs32(Fragment30, { children: [
2256
- /* @__PURE__ */ jsx35(
2303
+ return /* @__PURE__ */ jsxs33(Fragment31, { children: [
2304
+ /* @__PURE__ */ jsx36(
2257
2305
  SmdChipLead,
2258
2306
  {
2259
2307
  position: {
@@ -2269,7 +2317,7 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
2269
2317
  },
2270
2318
  1
2271
2319
  ),
2272
- /* @__PURE__ */ jsx35(
2320
+ /* @__PURE__ */ jsx36(
2273
2321
  SmdChipLead,
2274
2322
  {
2275
2323
  rotation: Math.PI,
@@ -2286,7 +2334,7 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
2286
2334
  },
2287
2335
  2
2288
2336
  ),
2289
- /* @__PURE__ */ jsx35(
2337
+ /* @__PURE__ */ jsx36(
2290
2338
  ChipBody,
2291
2339
  {
2292
2340
  center: { x: 0, y: 0, z: 0 },
@@ -2321,6 +2369,7 @@ export {
2321
2369
  SMC,
2322
2370
  SMF,
2323
2371
  SOD123,
2372
+ SOD123F,
2324
2373
  SOD523,
2325
2374
  SOT233P,
2326
2375
  SOT563,