jscad-electronics 0.0.21 → 0.0.23
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/README.md +3 -4
- package/dist/index.js +163 -52
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -13,7 +13,6 @@ Contribution Guide:
|
|
|
13
13
|
|
|
14
14
|
[](https://youtu.be/DHGW_DFhJao)
|
|
15
15
|
|
|
16
|
-
|
|
17
16
|
## Features
|
|
18
17
|
|
|
19
18
|
- Wide range of electronic component models (e.g., resistors, capacitors, ICs, connectors)
|
|
@@ -34,15 +33,15 @@ npm install jscad-electronics
|
|
|
34
33
|
Here's a basic example of how to use jscad-electronics with JSCAD:
|
|
35
34
|
|
|
36
35
|
```jsx
|
|
37
|
-
import {
|
|
36
|
+
import { JsCadView } from "jscad-fiber"
|
|
38
37
|
import { SOT233P, ExtrudedPads } from "jscad-electronics"
|
|
39
38
|
|
|
40
39
|
export default () => {
|
|
41
40
|
return (
|
|
42
|
-
<
|
|
41
|
+
<JsCadView zAxisUp>
|
|
43
42
|
<SOT233P />
|
|
44
43
|
<ExtrudedPads footprint="sot23" />
|
|
45
|
-
</
|
|
44
|
+
</JsCadView>
|
|
46
45
|
)
|
|
47
46
|
}
|
|
48
47
|
```
|
package/dist/index.js
CHANGED
|
@@ -7730,7 +7730,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
7730
7730
|
var HostPortal = 4;
|
|
7731
7731
|
var HostComponent = 5;
|
|
7732
7732
|
var HostText = 6;
|
|
7733
|
-
var
|
|
7733
|
+
var Fragment16 = 7;
|
|
7734
7734
|
var Mode = 8;
|
|
7735
7735
|
var ContextConsumer = 9;
|
|
7736
7736
|
var ContextProvider = 10;
|
|
@@ -7870,7 +7870,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
7870
7870
|
return "DehydratedFragment";
|
|
7871
7871
|
case ForwardRef:
|
|
7872
7872
|
return getWrappedName$1(type, type.render, "ForwardRef");
|
|
7873
|
-
case
|
|
7873
|
+
case Fragment16:
|
|
7874
7874
|
return "Fragment";
|
|
7875
7875
|
case HostComponent:
|
|
7876
7876
|
return type;
|
|
@@ -11004,7 +11004,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
11004
11004
|
}
|
|
11005
11005
|
}
|
|
11006
11006
|
function updateFragment2(returnFiber, current2, fragment, lanes, key) {
|
|
11007
|
-
if (current2 === null || current2.tag !==
|
|
11007
|
+
if (current2 === null || current2.tag !== Fragment16) {
|
|
11008
11008
|
var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
|
|
11009
11009
|
created.return = returnFiber;
|
|
11010
11010
|
return created;
|
|
@@ -11407,7 +11407,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
11407
11407
|
if (child.key === key) {
|
|
11408
11408
|
var elementType = element.type;
|
|
11409
11409
|
if (elementType === REACT_FRAGMENT_TYPE) {
|
|
11410
|
-
if (child.tag ===
|
|
11410
|
+
if (child.tag === Fragment16) {
|
|
11411
11411
|
deleteRemainingChildren(returnFiber, child.sibling);
|
|
11412
11412
|
var existing = useFiber(child, element.props.children);
|
|
11413
11413
|
existing.return = returnFiber;
|
|
@@ -16898,7 +16898,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
16898
16898
|
var _resolvedProps2 = workInProgress2.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
|
|
16899
16899
|
return updateForwardRef(current2, workInProgress2, type, _resolvedProps2, renderLanes2);
|
|
16900
16900
|
}
|
|
16901
|
-
case
|
|
16901
|
+
case Fragment16:
|
|
16902
16902
|
return updateFragment(current2, workInProgress2, renderLanes2);
|
|
16903
16903
|
case Mode:
|
|
16904
16904
|
return updateMode(current2, workInProgress2, renderLanes2);
|
|
@@ -17335,7 +17335,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
17335
17335
|
case SimpleMemoComponent:
|
|
17336
17336
|
case FunctionComponent:
|
|
17337
17337
|
case ForwardRef:
|
|
17338
|
-
case
|
|
17338
|
+
case Fragment16:
|
|
17339
17339
|
case Mode:
|
|
17340
17340
|
case Profiler:
|
|
17341
17341
|
case ContextConsumer:
|
|
@@ -22103,7 +22103,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
22103
22103
|
return fiber;
|
|
22104
22104
|
}
|
|
22105
22105
|
function createFiberFromFragment(elements, mode, lanes, key) {
|
|
22106
|
-
var fiber = createFiber(
|
|
22106
|
+
var fiber = createFiber(Fragment16, elements, key, mode);
|
|
22107
22107
|
fiber.lanes = lanes;
|
|
22108
22108
|
return fiber;
|
|
22109
22109
|
}
|
|
@@ -23704,11 +23704,11 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
23704
23704
|
return jsxWithValidation(type, props, key, false);
|
|
23705
23705
|
}
|
|
23706
23706
|
}
|
|
23707
|
-
var
|
|
23708
|
-
var
|
|
23707
|
+
var jsx21 = jsxWithValidationDynamic;
|
|
23708
|
+
var jsxs17 = jsxWithValidationStatic;
|
|
23709
23709
|
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
23710
|
-
exports.jsx =
|
|
23711
|
-
exports.jsxs =
|
|
23710
|
+
exports.jsx = jsx21;
|
|
23711
|
+
exports.jsxs = jsxs17;
|
|
23712
23712
|
})();
|
|
23713
23713
|
}
|
|
23714
23714
|
}
|
|
@@ -77312,7 +77312,7 @@ var require_dist = __commonJS({
|
|
|
77312
77312
|
Hull: () => Hull2,
|
|
77313
77313
|
HullChain: () => HullChain2,
|
|
77314
77314
|
JSCadThreeMesh: () => JSCadThreeMesh,
|
|
77315
|
-
|
|
77315
|
+
JsCadView: () => JsCadView,
|
|
77316
77316
|
Polygon: () => Polygon3,
|
|
77317
77317
|
Project: () => Project,
|
|
77318
77318
|
Rectangle: () => Rectangle,
|
|
@@ -77715,9 +77715,9 @@ var require_dist = __commonJS({
|
|
|
77715
77715
|
};
|
|
77716
77716
|
return hostConfig2;
|
|
77717
77717
|
}
|
|
77718
|
-
var
|
|
77718
|
+
var import_jsx_runtime21 = require_jsx_runtime();
|
|
77719
77719
|
function Circle({ radius }) {
|
|
77720
|
-
return /* @__PURE__ */ (0,
|
|
77720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("circle", { radius });
|
|
77721
77721
|
}
|
|
77722
77722
|
var import_color = __toESM2(require_color(), 1);
|
|
77723
77723
|
var import_jsx_runtime22 = require_jsx_runtime();
|
|
@@ -77951,9 +77951,9 @@ var require_dist = __commonJS({
|
|
|
77951
77951
|
return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("hullChain", { children });
|
|
77952
77952
|
};
|
|
77953
77953
|
var HullChain2 = withOffsetProp(withColorProp(HullChainBase));
|
|
77954
|
-
var
|
|
77954
|
+
var import_jsx_runtime212 = require_jsx_runtime();
|
|
77955
77955
|
function Polygon3({ points }) {
|
|
77956
|
-
return /* @__PURE__ */ (0,
|
|
77956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime212.jsx)("jscadPolygon", { points });
|
|
77957
77957
|
}
|
|
77958
77958
|
var import_jsx_runtime222 = require_jsx_runtime();
|
|
77959
77959
|
function Project({ axis, origin, children }) {
|
|
@@ -78137,7 +78137,7 @@ var require_dist = __commonJS({
|
|
|
78137
78137
|
var convert_csg_to_three_geom_default = convertCSGToThreeGeom;
|
|
78138
78138
|
var import_jsx_runtime31 = require_jsx_runtime();
|
|
78139
78139
|
var { createJSCADRoot } = createJSCADRenderer(jscad);
|
|
78140
|
-
function
|
|
78140
|
+
function JsCadView({
|
|
78141
78141
|
children,
|
|
78142
78142
|
wireframe,
|
|
78143
78143
|
zAxisUp = false,
|
|
@@ -79190,15 +79190,124 @@ var QFN = ({
|
|
|
79190
79190
|
};
|
|
79191
79191
|
var qfn_default = QFN;
|
|
79192
79192
|
|
|
79193
|
-
// lib/
|
|
79193
|
+
// lib/SOT-235.tsx
|
|
79194
79194
|
var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
|
|
79195
|
+
var SOT235 = () => {
|
|
79196
|
+
const fullWidth = 2.8;
|
|
79197
|
+
const bodyWidth = 1.6;
|
|
79198
|
+
const bodyLength4 = 2.9;
|
|
79199
|
+
const bodyHeight = 1.2;
|
|
79200
|
+
const leadWidth = 0.4;
|
|
79201
|
+
const leadThickness = 0.15;
|
|
79202
|
+
const leadHeight = 0.95;
|
|
79203
|
+
const padContactLength = 0.5;
|
|
79204
|
+
const padPitch = 0.95;
|
|
79205
|
+
const extendedBodyDistance = fullWidth - bodyWidth;
|
|
79206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
79207
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
79208
|
+
SmdChipLead,
|
|
79209
|
+
{
|
|
79210
|
+
rotation: Math.PI,
|
|
79211
|
+
position: {
|
|
79212
|
+
x: fullWidth / 2 + extendedBodyDistance / 4,
|
|
79213
|
+
y: -1,
|
|
79214
|
+
z: leadThickness / 2
|
|
79215
|
+
},
|
|
79216
|
+
width: leadWidth,
|
|
79217
|
+
thickness: leadThickness,
|
|
79218
|
+
padContactLength,
|
|
79219
|
+
bodyDistance: extendedBodyDistance,
|
|
79220
|
+
height: leadHeight
|
|
79221
|
+
},
|
|
79222
|
+
1
|
|
79223
|
+
),
|
|
79224
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
79225
|
+
SmdChipLead,
|
|
79226
|
+
{
|
|
79227
|
+
rotation: Math.PI,
|
|
79228
|
+
position: {
|
|
79229
|
+
x: fullWidth / 2 + extendedBodyDistance / 4,
|
|
79230
|
+
y: 1,
|
|
79231
|
+
z: leadThickness / 2
|
|
79232
|
+
},
|
|
79233
|
+
width: leadWidth,
|
|
79234
|
+
thickness: leadThickness,
|
|
79235
|
+
padContactLength,
|
|
79236
|
+
bodyDistance: extendedBodyDistance,
|
|
79237
|
+
height: leadHeight
|
|
79238
|
+
},
|
|
79239
|
+
2
|
|
79240
|
+
),
|
|
79241
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
79242
|
+
SmdChipLead,
|
|
79243
|
+
{
|
|
79244
|
+
position: {
|
|
79245
|
+
x: -fullWidth / 2 - extendedBodyDistance / 4,
|
|
79246
|
+
y: 0,
|
|
79247
|
+
z: leadThickness / 2
|
|
79248
|
+
},
|
|
79249
|
+
width: leadWidth,
|
|
79250
|
+
thickness: leadThickness,
|
|
79251
|
+
padContactLength,
|
|
79252
|
+
bodyDistance: extendedBodyDistance,
|
|
79253
|
+
height: leadHeight
|
|
79254
|
+
},
|
|
79255
|
+
3
|
|
79256
|
+
),
|
|
79257
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
79258
|
+
SmdChipLead,
|
|
79259
|
+
{
|
|
79260
|
+
position: {
|
|
79261
|
+
x: -fullWidth / 2 - extendedBodyDistance / 4,
|
|
79262
|
+
y: -1,
|
|
79263
|
+
z: leadThickness / 2
|
|
79264
|
+
},
|
|
79265
|
+
width: leadWidth,
|
|
79266
|
+
thickness: leadThickness,
|
|
79267
|
+
padContactLength,
|
|
79268
|
+
bodyDistance: extendedBodyDistance,
|
|
79269
|
+
height: leadHeight
|
|
79270
|
+
},
|
|
79271
|
+
1
|
|
79272
|
+
),
|
|
79273
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
79274
|
+
SmdChipLead,
|
|
79275
|
+
{
|
|
79276
|
+
position: {
|
|
79277
|
+
x: -fullWidth / 2 - extendedBodyDistance / 4,
|
|
79278
|
+
y: 1,
|
|
79279
|
+
z: leadThickness / 2
|
|
79280
|
+
},
|
|
79281
|
+
width: leadWidth,
|
|
79282
|
+
thickness: leadThickness,
|
|
79283
|
+
padContactLength,
|
|
79284
|
+
bodyDistance: extendedBodyDistance,
|
|
79285
|
+
height: leadHeight
|
|
79286
|
+
},
|
|
79287
|
+
2
|
|
79288
|
+
),
|
|
79289
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
79290
|
+
ChipBody,
|
|
79291
|
+
{
|
|
79292
|
+
center: { x: 0, y: 0, z: 0 },
|
|
79293
|
+
width: bodyWidth,
|
|
79294
|
+
length: bodyLength4,
|
|
79295
|
+
height: bodyHeight
|
|
79296
|
+
}
|
|
79297
|
+
)
|
|
79298
|
+
] });
|
|
79299
|
+
};
|
|
79300
|
+
var SOT_235_default = SOT235;
|
|
79301
|
+
|
|
79302
|
+
// lib/Footprinter3d.tsx
|
|
79303
|
+
var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
|
|
79195
79304
|
var Footprinter3d = ({ footprint }) => {
|
|
79196
79305
|
const fpJson = fp3.string(footprint).json();
|
|
79197
79306
|
switch (fpJson.fn) {
|
|
79198
79307
|
case "dip":
|
|
79199
|
-
return /* @__PURE__ */ (0,
|
|
79308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
|
|
79200
79309
|
case "tssop":
|
|
79201
|
-
return /* @__PURE__ */ (0,
|
|
79310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
79202
79311
|
Tssop,
|
|
79203
79312
|
{
|
|
79204
79313
|
pinCount: fpJson.num_pins,
|
|
@@ -79209,7 +79318,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
79209
79318
|
}
|
|
79210
79319
|
);
|
|
79211
79320
|
case "qfp":
|
|
79212
|
-
return /* @__PURE__ */ (0,
|
|
79321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
79213
79322
|
QFP,
|
|
79214
79323
|
{
|
|
79215
79324
|
pinCount: fpJson.num_pins,
|
|
@@ -79220,7 +79329,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
79220
79329
|
}
|
|
79221
79330
|
);
|
|
79222
79331
|
case "qfn":
|
|
79223
|
-
return /* @__PURE__ */ (0,
|
|
79332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
79224
79333
|
qfn_default,
|
|
79225
79334
|
{
|
|
79226
79335
|
num_pins: fpJson.num_pins,
|
|
@@ -79236,19 +79345,21 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
79236
79345
|
}
|
|
79237
79346
|
);
|
|
79238
79347
|
case "pinrow":
|
|
79239
|
-
return /* @__PURE__ */ (0,
|
|
79348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(PinRow, { numberOfPins: fpJson.num_pins, pitch: fpJson.p });
|
|
79240
79349
|
case "cap": {
|
|
79241
79350
|
switch (fpJson.imperial) {
|
|
79242
79351
|
case "0402":
|
|
79243
|
-
return /* @__PURE__ */ (0,
|
|
79352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(A0402, { color: "#856c4d" });
|
|
79244
79353
|
case "0603":
|
|
79245
|
-
return /* @__PURE__ */ (0,
|
|
79354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(A0603, { color: "#856c4d" });
|
|
79246
79355
|
case "0805":
|
|
79247
|
-
return /* @__PURE__ */ (0,
|
|
79356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(A0805, { color: "#856c4d" });
|
|
79248
79357
|
}
|
|
79249
79358
|
}
|
|
79359
|
+
case "sot235":
|
|
79360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SOT_235_default, {});
|
|
79250
79361
|
case "soic":
|
|
79251
|
-
return /* @__PURE__ */ (0,
|
|
79362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
79252
79363
|
Tssop,
|
|
79253
79364
|
{
|
|
79254
79365
|
pinCount: fpJson.num_pins,
|
|
@@ -79261,17 +79372,17 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
79261
79372
|
}
|
|
79262
79373
|
switch (fpJson.imperial) {
|
|
79263
79374
|
case "0402":
|
|
79264
|
-
return /* @__PURE__ */ (0,
|
|
79375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(A0402, {});
|
|
79265
79376
|
case "0603":
|
|
79266
|
-
return /* @__PURE__ */ (0,
|
|
79377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(A0603, {});
|
|
79267
79378
|
case "0805":
|
|
79268
|
-
return /* @__PURE__ */ (0,
|
|
79379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(A0805, {});
|
|
79269
79380
|
}
|
|
79270
79381
|
return null;
|
|
79271
79382
|
};
|
|
79272
79383
|
|
|
79273
79384
|
// lib/SOT-23-3P.tsx
|
|
79274
|
-
var
|
|
79385
|
+
var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
|
|
79275
79386
|
var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
79276
79387
|
const bodyWidth = 1.3;
|
|
79277
79388
|
const bodyLength4 = 2.9;
|
|
@@ -79281,8 +79392,8 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
|
79281
79392
|
const leadHeight = 0.95;
|
|
79282
79393
|
const padContactLength = 0.4;
|
|
79283
79394
|
const extendedBodyDistance = (fullWidth - bodyWidth) / 2 + 0.3;
|
|
79284
|
-
return /* @__PURE__ */ (0,
|
|
79285
|
-
/* @__PURE__ */ (0,
|
|
79395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
79396
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
79286
79397
|
SmdChipLead,
|
|
79287
79398
|
{
|
|
79288
79399
|
rotation: Math.PI,
|
|
@@ -79299,7 +79410,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
|
79299
79410
|
},
|
|
79300
79411
|
1
|
|
79301
79412
|
),
|
|
79302
|
-
/* @__PURE__ */ (0,
|
|
79413
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
79303
79414
|
SmdChipLead,
|
|
79304
79415
|
{
|
|
79305
79416
|
rotation: Math.PI,
|
|
@@ -79316,7 +79427,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
|
79316
79427
|
},
|
|
79317
79428
|
2
|
|
79318
79429
|
),
|
|
79319
|
-
/* @__PURE__ */ (0,
|
|
79430
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
79320
79431
|
SmdChipLead,
|
|
79321
79432
|
{
|
|
79322
79433
|
position: {
|
|
@@ -79332,7 +79443,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
|
79332
79443
|
},
|
|
79333
79444
|
3
|
|
79334
79445
|
),
|
|
79335
|
-
/* @__PURE__ */ (0,
|
|
79446
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
79336
79447
|
ChipBody,
|
|
79337
79448
|
{
|
|
79338
79449
|
center: { x: 0, y: 0, z: 0 },
|
|
@@ -79346,7 +79457,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
|
79346
79457
|
|
|
79347
79458
|
// lib/SOT-563.tsx
|
|
79348
79459
|
var import_jscad_fiber12 = __toESM(require_dist(), 1);
|
|
79349
|
-
var
|
|
79460
|
+
var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
|
|
79350
79461
|
var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength4 = 1.6 }) => {
|
|
79351
79462
|
const bodyWidth = 1.2;
|
|
79352
79463
|
const bodyLength4 = 1.6;
|
|
@@ -79356,24 +79467,24 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength4 = 1.6 }) => {
|
|
|
79356
79467
|
const leadHeight = 0.13;
|
|
79357
79468
|
const leadSpacing = 0.5;
|
|
79358
79469
|
const bodyZOffset = -0.3;
|
|
79359
|
-
return /* @__PURE__ */ (0,
|
|
79360
|
-
/* @__PURE__ */ (0,
|
|
79470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
79471
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jscad_fiber12.Rotate, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jscad_fiber12.Translate, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jscad_fiber12.Colorize, { color: "grey", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jscad_fiber12.Cuboid, { size: [bodyWidth, bodyLength4, bodyHeight] }) }) }) }),
|
|
79361
79472
|
[-1, 0, 1].flatMap((yOffset, index) => [
|
|
79362
79473
|
// Left lead
|
|
79363
|
-
/* @__PURE__ */ (0,
|
|
79474
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
79364
79475
|
import_jscad_fiber12.Translate,
|
|
79365
79476
|
{
|
|
79366
79477
|
center: [-bodyWidth / 2 - 0.03, yOffset * leadSpacing, 0],
|
|
79367
|
-
children: /* @__PURE__ */ (0,
|
|
79478
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jscad_fiber12.Cuboid, { size: [leadLength, leadWidth, leadHeight] })
|
|
79368
79479
|
},
|
|
79369
79480
|
`left-${index}`
|
|
79370
79481
|
),
|
|
79371
79482
|
// Right lead
|
|
79372
|
-
/* @__PURE__ */ (0,
|
|
79483
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
79373
79484
|
import_jscad_fiber12.Translate,
|
|
79374
79485
|
{
|
|
79375
79486
|
center: [bodyWidth / 2 + 0.03, yOffset * leadSpacing, 0],
|
|
79376
|
-
children: /* @__PURE__ */ (0,
|
|
79487
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jscad_fiber12.Cuboid, { size: [leadLength, leadWidth, leadHeight] })
|
|
79377
79488
|
},
|
|
79378
79489
|
`right-${index}`
|
|
79379
79490
|
)
|
|
@@ -79383,7 +79494,7 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength4 = 1.6 }) => {
|
|
|
79383
79494
|
|
|
79384
79495
|
// lib/SOT-723.tsx
|
|
79385
79496
|
var import_jscad_fiber13 = __toESM(require_dist(), 1);
|
|
79386
|
-
var
|
|
79497
|
+
var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
|
|
79387
79498
|
var getCcwSot723Coords = (pn) => {
|
|
79388
79499
|
if (pn === 1) {
|
|
79389
79500
|
return { x: 0, y: 0 };
|
|
@@ -79401,11 +79512,11 @@ var SOT723 = () => {
|
|
|
79401
79512
|
const leadLength = 0.3;
|
|
79402
79513
|
const leadHeight = 0.1;
|
|
79403
79514
|
const centerLeadWidth = 0.42;
|
|
79404
|
-
return /* @__PURE__ */ (0,
|
|
79405
|
-
/* @__PURE__ */ (0,
|
|
79515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
79516
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jscad_fiber13.Rotate, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jscad_fiber13.Translate, { center: [0.475, leadHeight / 2, -0.25], children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jscad_fiber13.Colorize, { color: "grey", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jscad_fiber13.Cuboid, { size: [bodyWidth, bodyLength4, bodyHeight] }) }) }) }),
|
|
79406
79517
|
[1, 2, 3].map((pn) => {
|
|
79407
79518
|
const { x, y } = getCcwSot723Coords(pn);
|
|
79408
|
-
return /* @__PURE__ */ (0,
|
|
79519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jscad_fiber13.Translate, { center: [x, y, 0], children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
79409
79520
|
import_jscad_fiber13.Cuboid,
|
|
79410
79521
|
{
|
|
79411
79522
|
size: [
|
|
@@ -79420,7 +79531,7 @@ var SOT723 = () => {
|
|
|
79420
79531
|
};
|
|
79421
79532
|
|
|
79422
79533
|
// lib/sod-123.tsx
|
|
79423
|
-
var
|
|
79534
|
+
var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
|
|
79424
79535
|
var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength4 = 1.6 }) => {
|
|
79425
79536
|
const bodyWidth = 2.9;
|
|
79426
79537
|
const bodyLength4 = 1.3;
|
|
@@ -79432,8 +79543,8 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength4 = 1.6 }) => {
|
|
|
79432
79543
|
const leadYOffset = leadHeight / 1 - 0.4;
|
|
79433
79544
|
const bodyYOffset = leadHeight / 2 - 0.4;
|
|
79434
79545
|
const bodyDistance = (fullWidth - bodyWidth) / 2;
|
|
79435
|
-
return /* @__PURE__ */ (0,
|
|
79436
|
-
/* @__PURE__ */ (0,
|
|
79546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
79547
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
79437
79548
|
SmdChipLead,
|
|
79438
79549
|
{
|
|
79439
79550
|
position: {
|
|
@@ -79449,7 +79560,7 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength4 = 1.6 }) => {
|
|
|
79449
79560
|
},
|
|
79450
79561
|
1
|
|
79451
79562
|
),
|
|
79452
|
-
/* @__PURE__ */ (0,
|
|
79563
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
79453
79564
|
SmdChipLead,
|
|
79454
79565
|
{
|
|
79455
79566
|
rotation: Math.PI,
|
|
@@ -79466,7 +79577,7 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength4 = 1.6 }) => {
|
|
|
79466
79577
|
},
|
|
79467
79578
|
2
|
|
79468
79579
|
),
|
|
79469
|
-
/* @__PURE__ */ (0,
|
|
79580
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
79470
79581
|
ChipBody,
|
|
79471
79582
|
{
|
|
79472
79583
|
center: { x: 0, y: bodyYOffset, z: 0 },
|
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.23",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@biomejs/biome": "^1.9.3",
|
|
23
23
|
"@types/react": "^18.3.11",
|
|
24
24
|
"@types/react-dom": "^18.3.1",
|
|
25
|
-
"jscad-fiber": "^0.0.
|
|
25
|
+
"jscad-fiber": "^0.0.74",
|
|
26
26
|
"react": "^18.3.1",
|
|
27
27
|
"react-cosmos": "^6.2.0",
|
|
28
28
|
"react-cosmos-plugin-vite": "^6.2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"vite-tsconfig-paths": "^5.0.1"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@tscircuit/footprinter": "^0.0.
|
|
35
|
+
"@tscircuit/footprinter": "^0.0.87",
|
|
36
36
|
"circuit-json": "^0.0.92"
|
|
37
37
|
}
|
|
38
38
|
}
|