jscad-electronics 0.0.16 → 0.0.17

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
@@ -113,4 +113,10 @@ declare const SOD123: ({ fullWidth, fullLength }: {
113
113
  fullLength?: number | undefined;
114
114
  }) => react_jsx_runtime.JSX.Element;
115
115
 
116
- export { A0402, A0603, A0805, BGA, ChipBody, type ChipBodyProps, ExtrudedPads, FootprintPad, FootprintPlatedHole, Footprinter3d, QFN, QFP, SOD123, SOT233P, SOT563, SOT723, SmdChipLead, type SmdChipLeadProps, Tssop };
116
+ declare const PinRow: ({ numberOfPins, pitch, longSidePinLength, }: {
117
+ numberOfPins: number;
118
+ pitch?: number;
119
+ longSidePinLength?: number;
120
+ }) => react_jsx_runtime.JSX.Element;
121
+
122
+ export { A0402, A0603, A0805, BGA, ChipBody, type ChipBodyProps, ExtrudedPads, FootprintPad, FootprintPlatedHole, Footprinter3d, PinRow, QFN, QFP, SOD123, SOT233P, SOT563, SOT723, SmdChipLead, type SmdChipLeadProps, Tssop };
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 Fragment14 = 7;
7733
+ var Fragment15 = 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 Fragment14:
7873
+ case Fragment15:
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 !== Fragment14) {
11007
+ if (current2 === null || current2.tag !== Fragment15) {
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 === Fragment14) {
11410
+ if (child.tag === Fragment15) {
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 Fragment14:
16901
+ case Fragment15:
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 Fragment14:
17338
+ case Fragment15:
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(Fragment14, elements, key, mode);
22106
+ var fiber = createFiber(Fragment15, 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 jsx19 = jsxWithValidationDynamic;
23708
- var jsxs14 = jsxWithValidationStatic;
23707
+ var jsx20 = jsxWithValidationDynamic;
23708
+ var jsxs16 = jsxWithValidationStatic;
23709
23709
  exports.Fragment = REACT_FRAGMENT_TYPE;
23710
- exports.jsx = jsx19;
23711
- exports.jsxs = jsxs14;
23710
+ exports.jsx = jsx20;
23711
+ exports.jsxs = jsxs16;
23712
23712
  })();
23713
23713
  }
23714
23714
  }
@@ -77296,11 +77296,11 @@ var require_dist = __commonJS({
77296
77296
  var lib_exports = {};
77297
77297
  __export2(lib_exports, {
77298
77298
  Circle: () => Circle,
77299
- Colorize: () => Colorize9,
77299
+ Colorize: () => Colorize10,
77300
77300
  Cube: () => Cube2,
77301
- Cuboid: () => Cuboid10,
77301
+ Cuboid: () => Cuboid11,
77302
77302
  Custom: () => Custom,
77303
- Cylinder: () => Cylinder2,
77303
+ Cylinder: () => Cylinder3,
77304
77304
  CylinderElliptic: () => CylinderElliptic,
77305
77305
  Ellipsoid: () => Ellipsoid,
77306
77306
  ExtrudeFromSlices: () => ExtrudeFromSlices,
@@ -77309,8 +77309,8 @@ var require_dist = __commonJS({
77309
77309
  ExtrudeRectangular: () => ExtrudeRectangular,
77310
77310
  ExtrudeRotate: () => ExtrudeRotate,
77311
77311
  GeodesicSphere: () => GeodesicSphere,
77312
- Hull: () => Hull,
77313
- HullChain: () => HullChain,
77312
+ Hull: () => Hull2,
77313
+ HullChain: () => HullChain2,
77314
77314
  JSCadThreeMesh: () => JSCadThreeMesh,
77315
77315
  JsCadFixture: () => JsCadFixture,
77316
77316
  Polygon: () => Polygon3,
@@ -77320,10 +77320,10 @@ var require_dist = __commonJS({
77320
77320
  RoundedCuboid: () => RoundedCuboid2,
77321
77321
  RoundedCylinder: () => RoundedCylinder,
77322
77322
  Sphere: () => Sphere2,
77323
- Subtract: () => Subtract,
77323
+ Subtract: () => Subtract2,
77324
77324
  Torus: () => Torus,
77325
77325
  Translate: () => Translate10,
77326
- Union: () => Union3,
77326
+ Union: () => Union4,
77327
77327
  convertCSGToThreeGeom: () => convertCSGToThreeGeom,
77328
77328
  createJSCADRenderer: () => createJSCADRenderer,
77329
77329
  normalizePointToArray: () => normalizePointToArray,
@@ -77673,13 +77673,13 @@ var require_dist = __commonJS({
77673
77673
  };
77674
77674
  return hostConfig2;
77675
77675
  }
77676
- var import_jsx_runtime19 = require_jsx_runtime();
77676
+ var import_jsx_runtime20 = require_jsx_runtime();
77677
77677
  function Circle({ radius }) {
77678
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("circle", { radius });
77678
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("circle", { radius });
77679
77679
  }
77680
77680
  var import_color = __toESM2(require_color(), 1);
77681
77681
  var import_jsx_runtime22 = require_jsx_runtime();
77682
- function Colorize9({ color, children }) {
77682
+ function Colorize10({ color, children }) {
77683
77683
  if (!Array.isArray(color)) {
77684
77684
  color = (0, import_color.default)(color).rgb().array().map((v) => v / 255);
77685
77685
  }
@@ -77692,7 +77692,7 @@ var require_dist = __commonJS({
77692
77692
  if (!color) {
77693
77693
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(WrappedComponent, { ...restProps });
77694
77694
  }
77695
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Colorize9, { color, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(WrappedComponent, { ...restProps }) });
77695
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Colorize10, { color, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(WrappedComponent, { ...restProps }) });
77696
77696
  };
77697
77697
  WithColor.displayName = `WithColor(${WrappedComponent.displayName || WrappedComponent.name || "Component"})`;
77698
77698
  return WithColor;
@@ -77743,7 +77743,7 @@ var require_dist = __commonJS({
77743
77743
  var CuboidBase = ({ size }) => {
77744
77744
  return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("cuboid", { size });
77745
77745
  };
77746
- var Cuboid10 = withOffsetProp(withColorProp(CuboidBase));
77746
+ var Cuboid11 = withOffsetProp(withColorProp(CuboidBase));
77747
77747
  var import_jsx_runtime82 = require_jsx_runtime();
77748
77748
  function Custom({ geometry }) {
77749
77749
  return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("custom", { geometry });
@@ -77799,7 +77799,7 @@ var require_dist = __commonJS({
77799
77799
  var CylinderBase = ({ radius, height: height4 }) => {
77800
77800
  return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("cylinder", { radius, height: height4 });
77801
77801
  };
77802
- var Cylinder2 = withColorProp(
77802
+ var Cylinder3 = withColorProp(
77803
77803
  withOffsetProp(withRotationProp(CylinderBase))
77804
77804
  );
77805
77805
  var import_jsx_runtime122 = require_jsx_runtime();
@@ -77903,12 +77903,12 @@ var require_dist = __commonJS({
77903
77903
  var HullBase = ({ children }) => {
77904
77904
  return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)("hull", { children });
77905
77905
  };
77906
- var Hull = withOffsetProp(withColorProp(HullBase));
77907
- var import_jsx_runtime20 = require_jsx_runtime();
77906
+ var Hull2 = withOffsetProp(withColorProp(HullBase));
77907
+ var import_jsx_runtime202 = require_jsx_runtime();
77908
77908
  var HullChainBase = ({ children }) => {
77909
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("hullChain", { children });
77909
+ return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("hullChain", { children });
77910
77910
  };
77911
- var HullChain = withOffsetProp(withColorProp(HullChainBase));
77911
+ var HullChain2 = withOffsetProp(withColorProp(HullChainBase));
77912
77912
  var import_jsx_runtime21 = require_jsx_runtime();
77913
77913
  function Polygon3({ points }) {
77914
77914
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("jscadPolygon", { points });
@@ -77956,7 +77956,7 @@ var require_dist = __commonJS({
77956
77956
  }
77957
77957
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("subtract", { children });
77958
77958
  };
77959
- var Subtract = withOffsetProp(withColorProp(SubtractBase));
77959
+ var Subtract2 = withOffsetProp(withColorProp(SubtractBase));
77960
77960
  var import_jsx_runtime28 = require_jsx_runtime();
77961
77961
  var TorusBase = ({
77962
77962
  innerRadius,
@@ -77982,7 +77982,7 @@ var require_dist = __commonJS({
77982
77982
  };
77983
77983
  var Torus = withOffsetProp(withColorProp(TorusBase));
77984
77984
  var import_jsx_runtime29 = require_jsx_runtime();
77985
- function Union3({ children }) {
77985
+ function Union4({ children }) {
77986
77986
  return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("union", { children });
77987
77987
  }
77988
77988
  var import_jsx_runtime30 = require_jsx_runtime();
@@ -78486,7 +78486,10 @@ var import_jscad_fiber7 = __toESM(require_dist(), 1);
78486
78486
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
78487
78487
  var FootprintPlatedHole = ({ hole }) => {
78488
78488
  if (hole.shape === "circle") {
78489
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jscad_fiber7.Colorize, { color: [255, 0, 0], children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jscad_fiber7.Translate, { offset: [hole.x, hole.y, 0], children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jscad_fiber7.Cylinder, { radius: hole.outer_diameter, height: 0.01 }) }) });
78489
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jscad_fiber7.Colorize, { color: "#b87333", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jscad_fiber7.Translate, { offset: [hole.x, hole.y, 0], children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jscad_fiber7.Subtract, { children: [
78490
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jscad_fiber7.Cylinder, { radius: hole.outer_diameter / 2, height: 0.01 }),
78491
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jscad_fiber7.Cylinder, { radius: hole.hole_diameter / 2, height: 0.01 })
78492
+ ] }) }) });
78490
78493
  }
78491
78494
  throw new Error("Shape not supported: " + hole.shape);
78492
78495
  };
@@ -79186,6 +79189,81 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength4 = 1.6 }) => {
79186
79189
  )
79187
79190
  ] });
79188
79191
  };
79192
+
79193
+ // lib/PinRow.tsx
79194
+ var import_jscad_fiber13 = __toESM(require_dist(), 1);
79195
+ var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
79196
+ var PinRow = ({
79197
+ numberOfPins,
79198
+ pitch = 2.54,
79199
+ longSidePinLength = 6
79200
+ }) => {
79201
+ const pinThickness = 0.63;
79202
+ const bodyHeight = 2;
79203
+ const bodyWidth = numberOfPins * pitch;
79204
+ const shortSidePinLength = 3;
79205
+ const xoff = -((numberOfPins - 1) / 2) * pitch;
79206
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
79207
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
79208
+ import_jscad_fiber13.Cuboid,
79209
+ {
79210
+ color: "#222",
79211
+ size: [bodyWidth, pinThickness * 3, bodyHeight],
79212
+ center: [0, 0, bodyHeight / 2]
79213
+ }
79214
+ ),
79215
+ Array.from({ length: numberOfPins }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
79216
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jscad_fiber13.Colorize, { color: "gold", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jscad_fiber13.Hull, { children: [
79217
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
79218
+ import_jscad_fiber13.Cuboid,
79219
+ {
79220
+ color: "gold",
79221
+ size: [pinThickness, pinThickness, shortSidePinLength * 0.9],
79222
+ center: [
79223
+ xoff + i * pitch,
79224
+ 0,
79225
+ bodyHeight * 0.9 + bodyHeight / 2
79226
+ ]
79227
+ }
79228
+ ),
79229
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
79230
+ import_jscad_fiber13.Cuboid,
79231
+ {
79232
+ color: "gold",
79233
+ size: [
79234
+ pinThickness / 1.8,
79235
+ pinThickness / 1.8,
79236
+ shortSidePinLength
79237
+ ],
79238
+ center: [xoff + i * pitch, 0, bodyHeight + bodyHeight / 2]
79239
+ }
79240
+ )
79241
+ ] }) }),
79242
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jscad_fiber13.Colorize, { color: "gold", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jscad_fiber13.Hull, { children: [
79243
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
79244
+ import_jscad_fiber13.Cuboid,
79245
+ {
79246
+ color: "gold",
79247
+ size: [pinThickness, pinThickness, longSidePinLength * 0.9],
79248
+ center: [xoff + i * pitch, 0, -longSidePinLength / 2 * 0.9]
79249
+ }
79250
+ ),
79251
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
79252
+ import_jscad_fiber13.Cuboid,
79253
+ {
79254
+ color: "gold",
79255
+ size: [
79256
+ pinThickness / 1.8,
79257
+ pinThickness / 1.8,
79258
+ longSidePinLength
79259
+ ],
79260
+ center: [xoff + i * pitch, 0, -longSidePinLength / 2]
79261
+ }
79262
+ )
79263
+ ] }) })
79264
+ ] }))
79265
+ ] });
79266
+ };
79189
79267
  export {
79190
79268
  A0402,
79191
79269
  A0603,
@@ -79196,6 +79274,7 @@ export {
79196
79274
  FootprintPad,
79197
79275
  FootprintPlatedHole,
79198
79276
  Footprinter3d,
79277
+ PinRow,
79199
79278
  QFN,
79200
79279
  QFP,
79201
79280
  SOD123,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jscad-electronics",
3
3
  "type": "module",
4
- "version": "0.0.16",
4
+ "version": "0.0.17",
5
5
  "main": "./dist/index.js",
6
6
  "repository": {
7
7
  "type": "git",