jscad-electronics 0.0.178 → 0.0.180
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 +31 -1
- package/dist/index.js +1219 -1148
- package/dist/index.js.map +1 -1
- package/dist/vanilla.js +68 -1
- package/dist/vanilla.js.map +1 -1
- package/package.json +1 -1
package/dist/vanilla.js
CHANGED
|
@@ -961,6 +961,66 @@ var A0603 = ({ color = "#333" }) => {
|
|
|
961
961
|
] });
|
|
962
962
|
};
|
|
963
963
|
|
|
964
|
+
// lib/SmdLED.tsx
|
|
965
|
+
var smdLedDimensions = {
|
|
966
|
+
"0402": { length: 1, width: 0.5, height: 0.5, terminalLength: 0.2 },
|
|
967
|
+
"0603": { length: 1.62, width: 0.8, height: 0.615, terminalLength: 0.21 },
|
|
968
|
+
"0805": { length: 2, width: 1.25, height: 0.75, terminalLength: 0.35 }
|
|
969
|
+
};
|
|
970
|
+
function SmdLED({
|
|
971
|
+
footprint,
|
|
972
|
+
color = "#ffe8a0"
|
|
973
|
+
}) {
|
|
974
|
+
const p = smdLedDimensions[footprint];
|
|
975
|
+
if (footprint === "0603")
|
|
976
|
+
return /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
977
|
+
/* @__PURE__ */ jsx(Colorize, { color: "#f0eee7", children: /* @__PURE__ */ jsx(
|
|
978
|
+
RoundedCuboid,
|
|
979
|
+
{
|
|
980
|
+
size: [1.2, 0.79, 0.6],
|
|
981
|
+
roundRadius: 0.02,
|
|
982
|
+
center: [0, 0, 0.31]
|
|
983
|
+
}
|
|
984
|
+
) }),
|
|
985
|
+
/* @__PURE__ */ jsx(Colorize, { color: "#c7c9ca", children: [-1, 1].map((sign) => /* @__PURE__ */ jsx(
|
|
986
|
+
Cuboid,
|
|
987
|
+
{
|
|
988
|
+
size: [0.21, 0.8, 0.22],
|
|
989
|
+
center: [sign * 0.705, 0, 0.11]
|
|
990
|
+
},
|
|
991
|
+
sign
|
|
992
|
+
)) }),
|
|
993
|
+
/* @__PURE__ */ jsx(Colorize, { color, children: /* @__PURE__ */ jsx(Cuboid, { size: [0.72, 0.52, 0.01], center: [0, 0, 0.61] }) })
|
|
994
|
+
] });
|
|
995
|
+
const terminalThickness = Math.min(0.1, p.height / 4);
|
|
996
|
+
const apertureHeight = 0.02;
|
|
997
|
+
return /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
998
|
+
/* @__PURE__ */ jsx(Colorize, { color: "#f0eee7", children: /* @__PURE__ */ jsx(Translate, { z: (p.height + terminalThickness - apertureHeight) / 2, children: /* @__PURE__ */ jsx(
|
|
999
|
+
Cuboid,
|
|
1000
|
+
{
|
|
1001
|
+
size: [
|
|
1002
|
+
p.length,
|
|
1003
|
+
p.width,
|
|
1004
|
+
p.height - terminalThickness - apertureHeight
|
|
1005
|
+
]
|
|
1006
|
+
}
|
|
1007
|
+
) }) }),
|
|
1008
|
+
/* @__PURE__ */ jsx(Colorize, { color: "#c7c9ca", children: [-1, 1].map((sign) => /* @__PURE__ */ jsx(
|
|
1009
|
+
Translate,
|
|
1010
|
+
{
|
|
1011
|
+
offset: [
|
|
1012
|
+
sign * (p.length - p.terminalLength) / 2,
|
|
1013
|
+
0,
|
|
1014
|
+
terminalThickness / 2
|
|
1015
|
+
],
|
|
1016
|
+
children: /* @__PURE__ */ jsx(Cuboid, { size: [p.terminalLength, p.width, terminalThickness] })
|
|
1017
|
+
},
|
|
1018
|
+
sign
|
|
1019
|
+
)) }),
|
|
1020
|
+
/* @__PURE__ */ jsx(Colorize, { color, children: /* @__PURE__ */ jsx(Translate, { z: p.height - apertureHeight / 2, children: /* @__PURE__ */ jsx(Cuboid, { size: [p.length * 0.45, p.width * 0.65, apertureHeight] }) }) })
|
|
1021
|
+
] });
|
|
1022
|
+
}
|
|
1023
|
+
|
|
964
1024
|
// lib/A0805.tsx
|
|
965
1025
|
var fullLength3 = 2;
|
|
966
1026
|
var width3 = 1.25;
|
|
@@ -8269,7 +8329,8 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
8269
8329
|
}
|
|
8270
8330
|
);
|
|
8271
8331
|
}
|
|
8272
|
-
case "pinrow":
|
|
8332
|
+
case "pinrow":
|
|
8333
|
+
case "headermodule": {
|
|
8273
8334
|
const rowsMatch = footprint.match(/_rows(\d+)/);
|
|
8274
8335
|
const rows = rowsMatch && rowsMatch[1] ? parseInt(rowsMatch[1], 10) : 1;
|
|
8275
8336
|
if (fpJson.male)
|
|
@@ -8305,6 +8366,12 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
8305
8366
|
);
|
|
8306
8367
|
case "led5050":
|
|
8307
8368
|
return /* @__PURE__ */ jsx(Led5050, { color });
|
|
8369
|
+
case "led": {
|
|
8370
|
+
const imperial = String(fpJson.imperial);
|
|
8371
|
+
if (imperial === "0402" || imperial === "0603" || imperial === "0805")
|
|
8372
|
+
return /* @__PURE__ */ jsx(SmdLED, { footprint: imperial, color });
|
|
8373
|
+
break;
|
|
8374
|
+
}
|
|
8308
8375
|
case "cap": {
|
|
8309
8376
|
switch (fpJson.imperial) {
|
|
8310
8377
|
case "0402":
|