jscad-electronics 0.0.26 → 0.0.27
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.js +274 -88
- package/package.json +1 -1
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 Fragment24 = 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 Fragment24:
|
|
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 !== Fragment24) {
|
|
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 === Fragment24) {
|
|
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 Fragment24:
|
|
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 Fragment24:
|
|
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(Fragment24, 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 jsx29 = jsxWithValidationDynamic;
|
|
23708
|
+
var jsxs25 = jsxWithValidationStatic;
|
|
23709
23709
|
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
23710
|
-
exports.jsx =
|
|
23711
|
-
exports.jsxs =
|
|
23710
|
+
exports.jsx = jsx29;
|
|
23711
|
+
exports.jsxs = jsxs25;
|
|
23712
23712
|
})();
|
|
23713
23713
|
}
|
|
23714
23714
|
}
|
|
@@ -77296,16 +77296,16 @@ var require_dist = __commonJS({
|
|
|
77296
77296
|
var lib_exports = {};
|
|
77297
77297
|
__export2(lib_exports, {
|
|
77298
77298
|
Circle: () => Circle,
|
|
77299
|
-
Colorize: () =>
|
|
77299
|
+
Colorize: () => Colorize12,
|
|
77300
77300
|
Cube: () => Cube2,
|
|
77301
|
-
Cuboid: () =>
|
|
77301
|
+
Cuboid: () => Cuboid19,
|
|
77302
77302
|
Custom: () => Custom,
|
|
77303
|
-
Cylinder: () =>
|
|
77303
|
+
Cylinder: () => Cylinder4,
|
|
77304
77304
|
CylinderElliptic: () => CylinderElliptic,
|
|
77305
77305
|
Ellipsoid: () => Ellipsoid,
|
|
77306
77306
|
ExtrudeFromSlices: () => ExtrudeFromSlices,
|
|
77307
77307
|
ExtrudeHelical: () => ExtrudeHelical,
|
|
77308
|
-
ExtrudeLinear: () =>
|
|
77308
|
+
ExtrudeLinear: () => ExtrudeLinear4,
|
|
77309
77309
|
ExtrudeRectangular: () => ExtrudeRectangular,
|
|
77310
77310
|
ExtrudeRotate: () => ExtrudeRotate,
|
|
77311
77311
|
GeodesicSphere: () => GeodesicSphere,
|
|
@@ -77313,16 +77313,16 @@ var require_dist = __commonJS({
|
|
|
77313
77313
|
HullChain: () => HullChain2,
|
|
77314
77314
|
JSCadThreeMesh: () => JSCadThreeMesh,
|
|
77315
77315
|
JsCadView: () => JsCadView,
|
|
77316
|
-
Polygon: () =>
|
|
77316
|
+
Polygon: () => Polygon4,
|
|
77317
77317
|
Project: () => Project,
|
|
77318
77318
|
Rectangle: () => Rectangle,
|
|
77319
|
-
Rotate: () =>
|
|
77320
|
-
RoundedCuboid: () =>
|
|
77319
|
+
Rotate: () => Rotate7,
|
|
77320
|
+
RoundedCuboid: () => RoundedCuboid3,
|
|
77321
77321
|
RoundedCylinder: () => RoundedCylinder,
|
|
77322
77322
|
Sphere: () => Sphere2,
|
|
77323
77323
|
Subtract: () => Subtract3,
|
|
77324
77324
|
Torus: () => Torus,
|
|
77325
|
-
Translate: () =>
|
|
77325
|
+
Translate: () => Translate11,
|
|
77326
77326
|
Union: () => Union4,
|
|
77327
77327
|
convertCSGToThreeGeom: () => convertCSGToThreeGeom,
|
|
77328
77328
|
createJSCADRenderer: () => createJSCADRenderer,
|
|
@@ -77715,17 +77715,17 @@ var require_dist = __commonJS({
|
|
|
77715
77715
|
};
|
|
77716
77716
|
return hostConfig2;
|
|
77717
77717
|
}
|
|
77718
|
-
var
|
|
77718
|
+
var import_jsx_runtime29 = require_jsx_runtime();
|
|
77719
77719
|
function Circle({ radius }) {
|
|
77720
|
-
return /* @__PURE__ */ (0,
|
|
77720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("circle", { radius });
|
|
77721
77721
|
}
|
|
77722
77722
|
var import_color = __toESM2(require_color(), 1);
|
|
77723
|
-
var
|
|
77724
|
-
function
|
|
77723
|
+
var import_jsx_runtime210 = require_jsx_runtime();
|
|
77724
|
+
function Colorize12({ color, children }) {
|
|
77725
77725
|
if (!Array.isArray(color)) {
|
|
77726
77726
|
color = (0, import_color.default)(color).rgb().array().map((v) => v / 255);
|
|
77727
77727
|
}
|
|
77728
|
-
return /* @__PURE__ */ (0,
|
|
77728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)("colorize", { color, children });
|
|
77729
77729
|
}
|
|
77730
77730
|
var import_jsx_runtime32 = require_jsx_runtime();
|
|
77731
77731
|
function withColorProp(WrappedComponent) {
|
|
@@ -77734,7 +77734,7 @@ var require_dist = __commonJS({
|
|
|
77734
77734
|
if (!color) {
|
|
77735
77735
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(WrappedComponent, { ...restProps });
|
|
77736
77736
|
}
|
|
77737
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
77737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Colorize12, { color, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(WrappedComponent, { ...restProps }) });
|
|
77738
77738
|
};
|
|
77739
77739
|
WithColor.displayName = `WithColor(${WrappedComponent.displayName || WrappedComponent.name || "Component"})`;
|
|
77740
77740
|
return WithColor;
|
|
@@ -77747,7 +77747,7 @@ var require_dist = __commonJS({
|
|
|
77747
77747
|
}
|
|
77748
77748
|
return [point.x, point.y, point.z];
|
|
77749
77749
|
};
|
|
77750
|
-
function
|
|
77750
|
+
function Translate11({
|
|
77751
77751
|
offset,
|
|
77752
77752
|
center,
|
|
77753
77753
|
x,
|
|
@@ -77771,7 +77771,7 @@ var require_dist = __commonJS({
|
|
|
77771
77771
|
if (!center && !offset) {
|
|
77772
77772
|
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(WrappedComponent, { ...restProps });
|
|
77773
77773
|
}
|
|
77774
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
77774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Translate11, { offset: center || offset, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(WrappedComponent, { ...restProps }) });
|
|
77775
77775
|
};
|
|
77776
77776
|
WithOffset.displayName = `WithOffset(${WrappedComponent.displayName || WrappedComponent.name || "Component"})`;
|
|
77777
77777
|
return WithOffset;
|
|
@@ -77785,7 +77785,7 @@ var require_dist = __commonJS({
|
|
|
77785
77785
|
var CuboidBase = ({ size }) => {
|
|
77786
77786
|
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("cuboid", { size });
|
|
77787
77787
|
};
|
|
77788
|
-
var
|
|
77788
|
+
var Cuboid19 = withOffsetProp(withColorProp(CuboidBase));
|
|
77789
77789
|
var import_jsx_runtime82 = require_jsx_runtime();
|
|
77790
77790
|
function Custom({ geometry }) {
|
|
77791
77791
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("custom", { geometry });
|
|
@@ -77824,7 +77824,7 @@ var require_dist = __commonJS({
|
|
|
77824
77824
|
const finalRotation = rotation ? processRotation(rotation) : processRotation(angles);
|
|
77825
77825
|
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("rotate", { angles: finalRotation, children });
|
|
77826
77826
|
};
|
|
77827
|
-
var
|
|
77827
|
+
var Rotate7 = withOffsetProp(withColorProp(RotateBase));
|
|
77828
77828
|
var import_jsx_runtime102 = require_jsx_runtime();
|
|
77829
77829
|
function withRotationProp(WrappedComponent) {
|
|
77830
77830
|
const WithRotation = (props) => {
|
|
@@ -77832,7 +77832,7 @@ var require_dist = __commonJS({
|
|
|
77832
77832
|
if (!rotation) {
|
|
77833
77833
|
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(WrappedComponent, { ...restProps });
|
|
77834
77834
|
}
|
|
77835
|
-
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
77835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Rotate7, { rotation, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(WrappedComponent, { ...restProps }) });
|
|
77836
77836
|
};
|
|
77837
77837
|
WithRotation.displayName = `WithRotation(${WrappedComponent.displayName || WrappedComponent.name || "Component"})`;
|
|
77838
77838
|
return WithRotation;
|
|
@@ -77841,7 +77841,7 @@ var require_dist = __commonJS({
|
|
|
77841
77841
|
var CylinderBase = ({ radius, height: height10 }) => {
|
|
77842
77842
|
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("cylinder", { radius, height: height10 });
|
|
77843
77843
|
};
|
|
77844
|
-
var
|
|
77844
|
+
var Cylinder4 = withColorProp(
|
|
77845
77845
|
withOffsetProp(withRotationProp(CylinderBase))
|
|
77846
77846
|
);
|
|
77847
77847
|
var import_jsx_runtime122 = require_jsx_runtime();
|
|
@@ -77914,7 +77914,7 @@ var require_dist = __commonJS({
|
|
|
77914
77914
|
}
|
|
77915
77915
|
);
|
|
77916
77916
|
};
|
|
77917
|
-
var
|
|
77917
|
+
var ExtrudeLinear4 = withOffsetProp(withColorProp(ExtrudeLinearBase));
|
|
77918
77918
|
var import_jsx_runtime162 = require_jsx_runtime();
|
|
77919
77919
|
var ExtrudeRectangularBase = ({
|
|
77920
77920
|
size,
|
|
@@ -77952,7 +77952,7 @@ var require_dist = __commonJS({
|
|
|
77952
77952
|
};
|
|
77953
77953
|
var HullChain2 = withOffsetProp(withColorProp(HullChainBase));
|
|
77954
77954
|
var import_jsx_runtime212 = require_jsx_runtime();
|
|
77955
|
-
function
|
|
77955
|
+
function Polygon4({ points }) {
|
|
77956
77956
|
return /* @__PURE__ */ (0, import_jsx_runtime212.jsx)("jscadPolygon", { points });
|
|
77957
77957
|
}
|
|
77958
77958
|
var import_jsx_runtime222 = require_jsx_runtime();
|
|
@@ -77967,7 +77967,7 @@ var require_dist = __commonJS({
|
|
|
77967
77967
|
var RoundedCuboidBase = ({ size, roundRadius }) => {
|
|
77968
77968
|
return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)("roundedCuboid", { size, roundRadius });
|
|
77969
77969
|
};
|
|
77970
|
-
var
|
|
77970
|
+
var RoundedCuboid3 = withOffsetProp(withColorProp(RoundedCuboidBase));
|
|
77971
77971
|
var import_jsx_runtime252 = require_jsx_runtime();
|
|
77972
77972
|
var RoundedCylinderBase = ({
|
|
77973
77973
|
radius,
|
|
@@ -79590,15 +79590,192 @@ var FemaleHeader = ({
|
|
|
79590
79590
|
] });
|
|
79591
79591
|
};
|
|
79592
79592
|
|
|
79593
|
-
// lib/
|
|
79593
|
+
// lib/PushButton.tsx
|
|
79594
|
+
var import_jscad_fiber19 = __toESM(require_dist(), 1);
|
|
79594
79595
|
var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
|
|
79596
|
+
var PushButton = ({
|
|
79597
|
+
width: width10,
|
|
79598
|
+
length,
|
|
79599
|
+
innerDiameter = 1
|
|
79600
|
+
}) => {
|
|
79601
|
+
const bodyWidth = width10;
|
|
79602
|
+
const bodyLength10 = length;
|
|
79603
|
+
const bodyHeight = width10 * 0.7;
|
|
79604
|
+
const legWidth = innerDiameter / 2.5;
|
|
79605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
79606
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
79607
|
+
import_jscad_fiber19.RoundedCuboid,
|
|
79608
|
+
{
|
|
79609
|
+
color: "#1a1a1f",
|
|
79610
|
+
center: [0, 0, bodyHeight / 2],
|
|
79611
|
+
size: [bodyLength10, bodyLength10, bodyHeight],
|
|
79612
|
+
roundRadius: 0.3
|
|
79613
|
+
}
|
|
79614
|
+
),
|
|
79615
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
79616
|
+
import_jscad_fiber19.RoundedCuboid,
|
|
79617
|
+
{
|
|
79618
|
+
color: "#f2f2f2",
|
|
79619
|
+
center: [0, 0, bodyHeight + bodyHeight * 0.1 / 2.5],
|
|
79620
|
+
size: [bodyLength10, bodyLength10, bodyHeight * 0.1],
|
|
79621
|
+
roundRadius: 0.14
|
|
79622
|
+
}
|
|
79623
|
+
),
|
|
79624
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
79625
|
+
import_jscad_fiber19.Cylinder,
|
|
79626
|
+
{
|
|
79627
|
+
color: "#1a1a1f",
|
|
79628
|
+
height: bodyHeight * 0.8,
|
|
79629
|
+
radius: bodyWidth / 3,
|
|
79630
|
+
center: [0, 0, bodyHeight + bodyHeight * 0.8 / 2]
|
|
79631
|
+
}
|
|
79632
|
+
),
|
|
79633
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
79634
|
+
import_jscad_fiber19.Cylinder,
|
|
79635
|
+
{
|
|
79636
|
+
color: "#1a1a1f",
|
|
79637
|
+
height: bodyHeight * 0.2,
|
|
79638
|
+
radius: innerDiameter / 2,
|
|
79639
|
+
center: [
|
|
79640
|
+
bodyLength10 / 3,
|
|
79641
|
+
bodyLength10 / 3,
|
|
79642
|
+
bodyHeight + bodyHeight * 0.1 / 2
|
|
79643
|
+
]
|
|
79644
|
+
}
|
|
79645
|
+
),
|
|
79646
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
79647
|
+
import_jscad_fiber19.Cylinder,
|
|
79648
|
+
{
|
|
79649
|
+
color: "#1a1a1f",
|
|
79650
|
+
height: bodyHeight * 0.2,
|
|
79651
|
+
radius: innerDiameter / 2,
|
|
79652
|
+
center: [
|
|
79653
|
+
-bodyLength10 / 3,
|
|
79654
|
+
-bodyLength10 / 3,
|
|
79655
|
+
bodyHeight + bodyHeight * 0.1 / 2
|
|
79656
|
+
]
|
|
79657
|
+
}
|
|
79658
|
+
),
|
|
79659
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
79660
|
+
import_jscad_fiber19.Cylinder,
|
|
79661
|
+
{
|
|
79662
|
+
color: "#1a1a1f",
|
|
79663
|
+
height: bodyHeight * 0.2,
|
|
79664
|
+
radius: innerDiameter / 2,
|
|
79665
|
+
center: [
|
|
79666
|
+
-bodyLength10 / 3,
|
|
79667
|
+
bodyLength10 / 3,
|
|
79668
|
+
bodyHeight + bodyHeight * 0.1 / 2
|
|
79669
|
+
]
|
|
79670
|
+
}
|
|
79671
|
+
),
|
|
79672
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
79673
|
+
import_jscad_fiber19.Cylinder,
|
|
79674
|
+
{
|
|
79675
|
+
color: "#1a1a1f",
|
|
79676
|
+
height: bodyHeight * 0.2,
|
|
79677
|
+
radius: innerDiameter / 2,
|
|
79678
|
+
center: [
|
|
79679
|
+
bodyLength10 / 3,
|
|
79680
|
+
-bodyLength10 / 3,
|
|
79681
|
+
bodyHeight + bodyHeight * 0.1 / 2
|
|
79682
|
+
]
|
|
79683
|
+
}
|
|
79684
|
+
),
|
|
79685
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
79686
|
+
PushButtonLeg,
|
|
79687
|
+
{
|
|
79688
|
+
thickness: innerDiameter / 3,
|
|
79689
|
+
width: legWidth,
|
|
79690
|
+
horizontalLength: bodyLength10 * 0.8,
|
|
79691
|
+
verticalLength: bodyHeight / 2,
|
|
79692
|
+
position: {
|
|
79693
|
+
x: -bodyWidth / 2,
|
|
79694
|
+
y: -bodyLength10 / 2,
|
|
79695
|
+
z: -bodyHeight * 1.2
|
|
79696
|
+
}
|
|
79697
|
+
}
|
|
79698
|
+
),
|
|
79699
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
79700
|
+
PushButtonLeg,
|
|
79701
|
+
{
|
|
79702
|
+
thickness: innerDiameter / 3,
|
|
79703
|
+
width: legWidth,
|
|
79704
|
+
horizontalLength: bodyLength10 * 0.8,
|
|
79705
|
+
verticalLength: bodyHeight / 2,
|
|
79706
|
+
position: {
|
|
79707
|
+
x: -bodyWidth / 2,
|
|
79708
|
+
y: bodyLength10 / 2,
|
|
79709
|
+
z: -bodyHeight * 1.2
|
|
79710
|
+
},
|
|
79711
|
+
rotation: Math.PI
|
|
79712
|
+
}
|
|
79713
|
+
),
|
|
79714
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
79715
|
+
PushButtonLeg,
|
|
79716
|
+
{
|
|
79717
|
+
thickness: innerDiameter / 3,
|
|
79718
|
+
width: legWidth,
|
|
79719
|
+
horizontalLength: bodyLength10 * 0.8,
|
|
79720
|
+
verticalLength: bodyHeight / 2,
|
|
79721
|
+
position: { x: bodyWidth / 2, y: bodyLength10 / 2, z: -bodyHeight * 1.2 },
|
|
79722
|
+
rotation: Math.PI
|
|
79723
|
+
}
|
|
79724
|
+
),
|
|
79725
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
79726
|
+
PushButtonLeg,
|
|
79727
|
+
{
|
|
79728
|
+
thickness: innerDiameter / 3,
|
|
79729
|
+
width: legWidth,
|
|
79730
|
+
horizontalLength: bodyLength10 * 0.8,
|
|
79731
|
+
verticalLength: bodyHeight / 2,
|
|
79732
|
+
position: {
|
|
79733
|
+
x: bodyWidth / 2 + innerDiameter / 3.6,
|
|
79734
|
+
y: -bodyLength10 / 2,
|
|
79735
|
+
z: -bodyHeight * 1.2
|
|
79736
|
+
}
|
|
79737
|
+
}
|
|
79738
|
+
)
|
|
79739
|
+
] });
|
|
79740
|
+
};
|
|
79741
|
+
var PushButtonLeg = (props) => {
|
|
79742
|
+
const {
|
|
79743
|
+
thickness,
|
|
79744
|
+
width: width10,
|
|
79745
|
+
horizontalLength,
|
|
79746
|
+
verticalLength,
|
|
79747
|
+
rotation = 0,
|
|
79748
|
+
position
|
|
79749
|
+
} = props;
|
|
79750
|
+
const points = [
|
|
79751
|
+
[0, horizontalLength],
|
|
79752
|
+
[-verticalLength / 3, horizontalLength / 3],
|
|
79753
|
+
[-verticalLength / 5, horizontalLength / 4],
|
|
79754
|
+
[0, 0]
|
|
79755
|
+
];
|
|
79756
|
+
const polygon = getExpandedStroke(points, thickness);
|
|
79757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_jscad_fiber19.Colorize, { color: "#f2f2f2", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
79758
|
+
import_jscad_fiber19.Translate,
|
|
79759
|
+
{
|
|
79760
|
+
offset: {
|
|
79761
|
+
x: position?.x || 0,
|
|
79762
|
+
y: position?.y || 0,
|
|
79763
|
+
z: position?.z || 0
|
|
79764
|
+
},
|
|
79765
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_jscad_fiber19.Rotate, { rotation: [0, 55, rotation], children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_jscad_fiber19.ExtrudeLinear, { height: width10, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_jscad_fiber19.Polygon, { points: polygon.map((p) => [p.y, p.x]) }) }) })
|
|
79766
|
+
}
|
|
79767
|
+
) });
|
|
79768
|
+
};
|
|
79769
|
+
|
|
79770
|
+
// lib/Footprinter3d.tsx
|
|
79771
|
+
var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
|
|
79595
79772
|
var Footprinter3d = ({ footprint }) => {
|
|
79596
79773
|
const fpJson = fp3.string(footprint).json();
|
|
79597
79774
|
switch (fpJson.fn) {
|
|
79598
79775
|
case "dip":
|
|
79599
|
-
return /* @__PURE__ */ (0,
|
|
79776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
|
|
79600
79777
|
case "tssop":
|
|
79601
|
-
return /* @__PURE__ */ (0,
|
|
79778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
79602
79779
|
Tssop,
|
|
79603
79780
|
{
|
|
79604
79781
|
pinCount: fpJson.num_pins,
|
|
@@ -79609,7 +79786,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
79609
79786
|
}
|
|
79610
79787
|
);
|
|
79611
79788
|
case "qfp":
|
|
79612
|
-
return /* @__PURE__ */ (0,
|
|
79789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
79613
79790
|
QFP,
|
|
79614
79791
|
{
|
|
79615
79792
|
pinCount: fpJson.num_pins,
|
|
@@ -79620,7 +79797,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
79620
79797
|
}
|
|
79621
79798
|
);
|
|
79622
79799
|
case "qfn":
|
|
79623
|
-
return /* @__PURE__ */ (0,
|
|
79800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
79624
79801
|
qfn_default,
|
|
79625
79802
|
{
|
|
79626
79803
|
num_pins: fpJson.num_pins,
|
|
@@ -79637,35 +79814,44 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
79637
79814
|
);
|
|
79638
79815
|
case "pinrow":
|
|
79639
79816
|
if (fpJson.male)
|
|
79640
|
-
return /* @__PURE__ */ (0,
|
|
79817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(PinRow, { numberOfPins: fpJson.num_pins, pitch: fpJson.p });
|
|
79641
79818
|
if (fpJson.female)
|
|
79642
|
-
return /* @__PURE__ */ (0,
|
|
79819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FemaleHeader, { numberOfPins: fpJson.num_pins, pitch: fpJson.p });
|
|
79643
79820
|
case "cap": {
|
|
79644
79821
|
switch (fpJson.imperial) {
|
|
79645
79822
|
case "0402":
|
|
79646
|
-
return /* @__PURE__ */ (0,
|
|
79823
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(A0402, { color: "#856c4d" });
|
|
79647
79824
|
case "0603":
|
|
79648
|
-
return /* @__PURE__ */ (0,
|
|
79825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(A0603, { color: "#856c4d" });
|
|
79649
79826
|
case "0805":
|
|
79650
|
-
return /* @__PURE__ */ (0,
|
|
79827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(A0805, { color: "#856c4d" });
|
|
79651
79828
|
case "0201":
|
|
79652
|
-
return /* @__PURE__ */ (0,
|
|
79829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(A0201, { color: "#856c4d" });
|
|
79653
79830
|
case "01005":
|
|
79654
|
-
return /* @__PURE__ */ (0,
|
|
79831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(A01005, { color: "#856c4d" });
|
|
79655
79832
|
case "1206":
|
|
79656
|
-
return /* @__PURE__ */ (0,
|
|
79833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(A1206, { color: "#856c4d" });
|
|
79657
79834
|
case "1210":
|
|
79658
|
-
return /* @__PURE__ */ (0,
|
|
79835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(A1210, { color: "#856c4d" });
|
|
79659
79836
|
case "2010":
|
|
79660
|
-
return /* @__PURE__ */ (0,
|
|
79837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(A2010, { color: "#856c4d" });
|
|
79661
79838
|
case "2512":
|
|
79662
|
-
return /* @__PURE__ */ (0,
|
|
79839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(A2512, { color: "#856c4d" });
|
|
79663
79840
|
}
|
|
79664
79841
|
}
|
|
79665
79842
|
case "sot235":
|
|
79666
|
-
return /* @__PURE__ */ (0,
|
|
79843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SOT_235_default, {});
|
|
79844
|
+
case "pushbutton":
|
|
79845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
79846
|
+
PushButton,
|
|
79847
|
+
{
|
|
79848
|
+
width: fpJson.w,
|
|
79849
|
+
length: fpJson.h,
|
|
79850
|
+
innerDiameter: fpJson.id
|
|
79851
|
+
}
|
|
79852
|
+
);
|
|
79667
79853
|
case "soic":
|
|
79668
|
-
return /* @__PURE__ */ (0,
|
|
79854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
79669
79855
|
Tssop,
|
|
79670
79856
|
{
|
|
79671
79857
|
pinCount: fpJson.num_pins,
|
|
@@ -79678,29 +79864,29 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
79678
79864
|
}
|
|
79679
79865
|
switch (fpJson.imperial) {
|
|
79680
79866
|
case "0402":
|
|
79681
|
-
return /* @__PURE__ */ (0,
|
|
79867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(A0402, {});
|
|
79682
79868
|
case "0603":
|
|
79683
|
-
return /* @__PURE__ */ (0,
|
|
79869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(A0603, {});
|
|
79684
79870
|
case "0805":
|
|
79685
|
-
return /* @__PURE__ */ (0,
|
|
79871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(A0805, {});
|
|
79686
79872
|
case "0201":
|
|
79687
|
-
return /* @__PURE__ */ (0,
|
|
79873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(A0201, {});
|
|
79688
79874
|
case "01005":
|
|
79689
|
-
return /* @__PURE__ */ (0,
|
|
79875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(A01005, {});
|
|
79690
79876
|
case "1206":
|
|
79691
|
-
return /* @__PURE__ */ (0,
|
|
79877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(A1206, {});
|
|
79692
79878
|
case "1210":
|
|
79693
|
-
return /* @__PURE__ */ (0,
|
|
79879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(A1210, {});
|
|
79694
79880
|
case "2010":
|
|
79695
|
-
return /* @__PURE__ */ (0,
|
|
79881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(A2010, {});
|
|
79696
79882
|
case "2512":
|
|
79697
|
-
return /* @__PURE__ */ (0,
|
|
79883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(A2512, {});
|
|
79698
79884
|
}
|
|
79699
79885
|
return null;
|
|
79700
79886
|
};
|
|
79701
79887
|
|
|
79702
79888
|
// lib/SOT-23-3P.tsx
|
|
79703
|
-
var
|
|
79889
|
+
var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
|
|
79704
79890
|
var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
79705
79891
|
const bodyWidth = 1.3;
|
|
79706
79892
|
const bodyLength10 = 2.9;
|
|
@@ -79710,8 +79896,8 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
79710
79896
|
const leadHeight = 0.95;
|
|
79711
79897
|
const padContactLength = 0.4;
|
|
79712
79898
|
const extendedBodyDistance = (fullWidth - bodyWidth) / 2 + 0.3;
|
|
79713
|
-
return /* @__PURE__ */ (0,
|
|
79714
|
-
/* @__PURE__ */ (0,
|
|
79899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
79900
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
79715
79901
|
SmdChipLead,
|
|
79716
79902
|
{
|
|
79717
79903
|
rotation: Math.PI,
|
|
@@ -79728,7 +79914,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
79728
79914
|
},
|
|
79729
79915
|
1
|
|
79730
79916
|
),
|
|
79731
|
-
/* @__PURE__ */ (0,
|
|
79917
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
79732
79918
|
SmdChipLead,
|
|
79733
79919
|
{
|
|
79734
79920
|
rotation: Math.PI,
|
|
@@ -79745,7 +79931,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
79745
79931
|
},
|
|
79746
79932
|
2
|
|
79747
79933
|
),
|
|
79748
|
-
/* @__PURE__ */ (0,
|
|
79934
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
79749
79935
|
SmdChipLead,
|
|
79750
79936
|
{
|
|
79751
79937
|
position: {
|
|
@@ -79761,7 +79947,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
79761
79947
|
},
|
|
79762
79948
|
3
|
|
79763
79949
|
),
|
|
79764
|
-
/* @__PURE__ */ (0,
|
|
79950
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
79765
79951
|
ChipBody,
|
|
79766
79952
|
{
|
|
79767
79953
|
center: { x: 0, y: 0, z: 0 },
|
|
@@ -79774,8 +79960,8 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
79774
79960
|
};
|
|
79775
79961
|
|
|
79776
79962
|
// lib/SOT-563.tsx
|
|
79777
|
-
var
|
|
79778
|
-
var
|
|
79963
|
+
var import_jscad_fiber20 = __toESM(require_dist(), 1);
|
|
79964
|
+
var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
|
|
79779
79965
|
var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
79780
79966
|
const bodyWidth = 1.2;
|
|
79781
79967
|
const bodyLength10 = 1.6;
|
|
@@ -79785,24 +79971,24 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
|
79785
79971
|
const leadHeight = 0.13;
|
|
79786
79972
|
const leadSpacing = 0.5;
|
|
79787
79973
|
const bodyZOffset = -0.3;
|
|
79788
|
-
return /* @__PURE__ */ (0,
|
|
79789
|
-
/* @__PURE__ */ (0,
|
|
79974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
79975
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jscad_fiber20.Rotate, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jscad_fiber20.Translate, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jscad_fiber20.Colorize, { color: "grey", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jscad_fiber20.Cuboid, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
|
|
79790
79976
|
[-1, 0, 1].flatMap((yOffset, index) => [
|
|
79791
79977
|
// Left lead
|
|
79792
|
-
/* @__PURE__ */ (0,
|
|
79793
|
-
|
|
79978
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
79979
|
+
import_jscad_fiber20.Translate,
|
|
79794
79980
|
{
|
|
79795
79981
|
center: [-bodyWidth / 2 - 0.03, yOffset * leadSpacing, 0],
|
|
79796
|
-
children: /* @__PURE__ */ (0,
|
|
79982
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jscad_fiber20.Cuboid, { size: [leadLength, leadWidth, leadHeight] })
|
|
79797
79983
|
},
|
|
79798
79984
|
`left-${index}`
|
|
79799
79985
|
),
|
|
79800
79986
|
// Right lead
|
|
79801
|
-
/* @__PURE__ */ (0,
|
|
79802
|
-
|
|
79987
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
79988
|
+
import_jscad_fiber20.Translate,
|
|
79803
79989
|
{
|
|
79804
79990
|
center: [bodyWidth / 2 + 0.03, yOffset * leadSpacing, 0],
|
|
79805
|
-
children: /* @__PURE__ */ (0,
|
|
79991
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jscad_fiber20.Cuboid, { size: [leadLength, leadWidth, leadHeight] })
|
|
79806
79992
|
},
|
|
79807
79993
|
`right-${index}`
|
|
79808
79994
|
)
|
|
@@ -79811,8 +79997,8 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
|
79811
79997
|
};
|
|
79812
79998
|
|
|
79813
79999
|
// lib/SOT-723.tsx
|
|
79814
|
-
var
|
|
79815
|
-
var
|
|
80000
|
+
var import_jscad_fiber21 = __toESM(require_dist(), 1);
|
|
80001
|
+
var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
|
|
79816
80002
|
var getCcwSot723Coords = (pn) => {
|
|
79817
80003
|
if (pn === 1) {
|
|
79818
80004
|
return { x: 0, y: 0 };
|
|
@@ -79830,12 +80016,12 @@ var SOT723 = () => {
|
|
|
79830
80016
|
const leadLength = 0.3;
|
|
79831
80017
|
const leadHeight = 0.1;
|
|
79832
80018
|
const centerLeadWidth = 0.42;
|
|
79833
|
-
return /* @__PURE__ */ (0,
|
|
79834
|
-
/* @__PURE__ */ (0,
|
|
80019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
80020
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_jscad_fiber21.Rotate, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_jscad_fiber21.Translate, { center: [0.475, leadHeight / 2, -0.25], children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_jscad_fiber21.Colorize, { color: "grey", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_jscad_fiber21.Cuboid, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
|
|
79835
80021
|
[1, 2, 3].map((pn) => {
|
|
79836
80022
|
const { x, y } = getCcwSot723Coords(pn);
|
|
79837
|
-
return /* @__PURE__ */ (0,
|
|
79838
|
-
|
|
80023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_jscad_fiber21.Translate, { center: [x, y, 0], children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
80024
|
+
import_jscad_fiber21.Cuboid,
|
|
79839
80025
|
{
|
|
79840
80026
|
size: [
|
|
79841
80027
|
leadLength,
|
|
@@ -79849,7 +80035,7 @@ var SOT723 = () => {
|
|
|
79849
80035
|
};
|
|
79850
80036
|
|
|
79851
80037
|
// lib/sod-123.tsx
|
|
79852
|
-
var
|
|
80038
|
+
var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
|
|
79853
80039
|
var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
|
|
79854
80040
|
const bodyWidth = 2.9;
|
|
79855
80041
|
const bodyLength10 = 1.3;
|
|
@@ -79861,8 +80047,8 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
|
|
|
79861
80047
|
const leadYOffset = leadHeight / 1 - 0.4;
|
|
79862
80048
|
const bodyYOffset = leadHeight / 2 - 0.4;
|
|
79863
80049
|
const bodyDistance = (fullWidth - bodyWidth) / 2;
|
|
79864
|
-
return /* @__PURE__ */ (0,
|
|
79865
|
-
/* @__PURE__ */ (0,
|
|
80050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
|
|
80051
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
79866
80052
|
SmdChipLead,
|
|
79867
80053
|
{
|
|
79868
80054
|
position: {
|
|
@@ -79878,7 +80064,7 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
|
|
|
79878
80064
|
},
|
|
79879
80065
|
1
|
|
79880
80066
|
),
|
|
79881
|
-
/* @__PURE__ */ (0,
|
|
80067
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
79882
80068
|
SmdChipLead,
|
|
79883
80069
|
{
|
|
79884
80070
|
rotation: Math.PI,
|
|
@@ -79895,7 +80081,7 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
|
|
|
79895
80081
|
},
|
|
79896
80082
|
2
|
|
79897
80083
|
),
|
|
79898
|
-
/* @__PURE__ */ (0,
|
|
80084
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
79899
80085
|
ChipBody,
|
|
79900
80086
|
{
|
|
79901
80087
|
center: { x: 0, y: bodyYOffset, z: 0 },
|