jscad-electronics 0.0.106 → 0.0.108
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 +2 -1
- package/dist/index.js +12 -8
- package/dist/index.js.map +1 -1
- package/dist/vanilla.js +12 -8
- package/dist/vanilla.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -216,11 +216,12 @@ declare const SOD123: ({ fullWidth, fullLength }: {
|
|
|
216
216
|
fullLength?: number | undefined;
|
|
217
217
|
}) => react_jsx_runtime.JSX.Element;
|
|
218
218
|
|
|
219
|
-
declare const PinRow: ({ numberOfPins, pitch, longSidePinLength, invert, }: {
|
|
219
|
+
declare const PinRow: ({ numberOfPins, pitch, longSidePinLength, invert, faceup, }: {
|
|
220
220
|
numberOfPins: number;
|
|
221
221
|
pitch?: number;
|
|
222
222
|
longSidePinLength?: number;
|
|
223
223
|
invert?: boolean;
|
|
224
|
+
faceup?: boolean;
|
|
224
225
|
}) => react_jsx_runtime.JSX.Element;
|
|
225
226
|
|
|
226
227
|
declare const SOD523: () => react_jsx_runtime.JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -669,10 +669,12 @@ var DipPinLeg = ({ x, y, z }) => {
|
|
|
669
669
|
var Dip = ({
|
|
670
670
|
numPins = 8,
|
|
671
671
|
pitch = 2.54,
|
|
672
|
-
bodyWidth = 6.4
|
|
672
|
+
bodyWidth = 6.4,
|
|
673
|
+
rowSpacing
|
|
673
674
|
}) => {
|
|
674
675
|
const numPinsOnEachSide = Math.floor(numPins / 2);
|
|
675
|
-
const
|
|
676
|
+
const pinRowSpacing = rowSpacing ?? (bodyWidth >= 7 ? bodyWidth : bodyWidth + 1.22);
|
|
677
|
+
const chipBodyWidth = bodyWidth >= 7 ? pinRowSpacing - 1.22 : bodyWidth;
|
|
676
678
|
return /* @__PURE__ */ jsxs14(Fragment12, { children: [
|
|
677
679
|
range(numPins).map((i) => {
|
|
678
680
|
const yRow = i % numPinsOnEachSide;
|
|
@@ -680,7 +682,7 @@ var Dip = ({
|
|
|
680
682
|
return /* @__PURE__ */ jsx15(
|
|
681
683
|
DipPinLeg,
|
|
682
684
|
{
|
|
683
|
-
x: xRow *
|
|
685
|
+
x: xRow * pinRowSpacing / 2,
|
|
684
686
|
y: yRow * pitch - (numPinsOnEachSide - 1) / 2 * pitch,
|
|
685
687
|
z: DIP_PIN_HEIGHT / 2 + heightAboveSurface
|
|
686
688
|
},
|
|
@@ -690,7 +692,7 @@ var Dip = ({
|
|
|
690
692
|
/* @__PURE__ */ jsx15(
|
|
691
693
|
ChipBody,
|
|
692
694
|
{
|
|
693
|
-
width:
|
|
695
|
+
width: chipBodyWidth,
|
|
694
696
|
length: numPinsOnEachSide * pitch + 0.5,
|
|
695
697
|
height: DIP_PIN_HEIGHT - heightAboveSurface,
|
|
696
698
|
heightAboveSurface,
|
|
@@ -1014,14 +1016,15 @@ var PinRow = ({
|
|
|
1014
1016
|
numberOfPins,
|
|
1015
1017
|
pitch = 2.54,
|
|
1016
1018
|
longSidePinLength = 6,
|
|
1017
|
-
invert
|
|
1019
|
+
invert,
|
|
1020
|
+
faceup
|
|
1018
1021
|
}) => {
|
|
1019
1022
|
const pinThickness = 0.63;
|
|
1020
1023
|
const bodyHeight = 2;
|
|
1021
1024
|
const bodyWidth = numberOfPins * pitch;
|
|
1022
1025
|
const shortSidePinLength = 3;
|
|
1023
1026
|
const xoff = -((numberOfPins - 1) / 2) * pitch;
|
|
1024
|
-
const flipZ = (z) => invert ? -z + bodyHeight : z;
|
|
1027
|
+
const flipZ = (z) => invert || faceup ? -z + bodyHeight : z;
|
|
1025
1028
|
return /* @__PURE__ */ jsxs18(Fragment16, { children: [
|
|
1026
1029
|
/* @__PURE__ */ jsx20(
|
|
1027
1030
|
Cuboid14,
|
|
@@ -1032,7 +1035,7 @@ var PinRow = ({
|
|
|
1032
1035
|
}
|
|
1033
1036
|
),
|
|
1034
1037
|
Array.from({ length: numberOfPins }, (_, i) => /* @__PURE__ */ jsxs18(Fragment16, { children: [
|
|
1035
|
-
/* @__PURE__ */ jsx20(Colorize6, { color: "gold", children: /* @__PURE__ */ jsxs18(Hull2, { children: [
|
|
1038
|
+
!faceup && /* @__PURE__ */ jsx20(Colorize6, { color: "gold", children: /* @__PURE__ */ jsxs18(Hull2, { children: [
|
|
1036
1039
|
/* @__PURE__ */ jsx20(
|
|
1037
1040
|
Cuboid14,
|
|
1038
1041
|
{
|
|
@@ -4209,7 +4212,8 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
4209
4212
|
{
|
|
4210
4213
|
numberOfPins: fpJson.num_pins,
|
|
4211
4214
|
pitch: fpJson.p,
|
|
4212
|
-
invert: fpJson.invert
|
|
4215
|
+
invert: fpJson.invert,
|
|
4216
|
+
faceup: fpJson.faceup
|
|
4213
4217
|
}
|
|
4214
4218
|
);
|
|
4215
4219
|
if (fpJson.female)
|