@tscircuit/common 0.0.19 → 0.0.21

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.
Files changed (2) hide show
  1. package/dist/index.js +87 -106
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -3534,111 +3534,92 @@ var pacmanPolygonOutline = new OutlineBuilder(-0.2, -0.2).lineTo(-0.2, 2.5).arcT
3534
3534
  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
3535
3535
  var ViaGridBoard = (_a) => {
3536
3536
  var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
3537
- const { boardProps, chipProps = {} } = splitBoardAndChipProps(__spreadValues({}, rest));
3538
- const resolvedName = `${chipProps.name}_chip`;
3539
- const _a2 = chipProps, { name: _ } = _a2, chipRest = __objRest(_a2, ["name"]);
3540
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
3541
- "board",
3542
- __spreadProps(__spreadValues({}, boardProps), {
3543
- width: "100mm",
3544
- height: "65mm",
3545
- boardAnchorPosition: { x: 0, y: 0 },
3546
- boardAnchorAlignment: "bottom_left",
3547
- children: [
3548
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3549
- "pcbnoterect",
3550
- {
3551
- pcbX: 50,
3552
- pcbY: 32.5,
3553
- width: 90,
3554
- height: 55,
3555
- strokeWidth: 0.3,
3556
- color: "blue"
3557
- }
3558
- ),
3559
- ["BL", "TL", "TR", "BR"].map((cornerPositionName, index) => {
3560
- const x = (cornerPositionName.includes("R") ? 90 : 0) + 5;
3561
- const y = (cornerPositionName.includes("T") ? 55 : 0) + 5;
3562
- const rotation = index * 90;
3563
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3564
- "chip",
3537
+ const { boardProps = {} } = splitBoardAndChipProps(__spreadValues({}, rest));
3538
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("board", __spreadProps(__spreadValues({}, boardProps), { width: "100mm", height: "65mm", children: [
3539
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3540
+ "pcbnoterect",
3541
+ {
3542
+ pcbX: 0,
3543
+ pcbY: 0,
3544
+ width: 90,
3545
+ height: 55,
3546
+ strokeWidth: 0.3,
3547
+ color: "blue"
3548
+ }
3549
+ ),
3550
+ ["BL", "TL", "TR", "BR"].map((cornerPositionName, index) => {
3551
+ const x = (cornerPositionName.includes("R") ? 90 : 0) + 5 - 50;
3552
+ const y = (cornerPositionName.includes("T") ? 55 : 0) + 5 - 32.5;
3553
+ const rotation = index * 90;
3554
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3555
+ "chip",
3556
+ {
3557
+ name: cornerPositionName,
3558
+ pcbX: x,
3559
+ pcbY: y,
3560
+ noSchematicRepresentation: true,
3561
+ pcbRotation: -rotation,
3562
+ footprint: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("footprint", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3563
+ "smtpad",
3565
3564
  {
3566
- name: cornerPositionName,
3567
- pcbX: x,
3568
- pcbY: y,
3569
- noSchematicRepresentation: true,
3570
- pcbRotation: -rotation,
3571
- footprint: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("footprint", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3572
- "smtpad",
3573
- {
3574
- pcbX: "0mm",
3575
- pcbY: "0mm",
3576
- layer: "top",
3577
- shape: "polygon",
3578
- portHints: ["pin1"],
3579
- points: pacmanPolygonOutline
3580
- }
3581
- ) })
3582
- },
3583
- "pacman_" + cornerPositionName
3584
- );
3585
- }),
3586
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ViaGridPlus, { pcbX: 30, pcbY: 25, startIndex: 0 }),
3587
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ViaGridPlus, { pcbX: 70, pcbY: 25, startIndex: 5 }),
3588
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ViaGridPlus, { pcbX: 30, pcbY: 40, startIndex: 10 }),
3589
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ViaGridPlus, { pcbX: 70, pcbY: 40, startIndex: 15 }),
3590
- horizontalEdgeViaGridCells.map((cell) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3591
- ViaGridVia,
3592
- {
3593
- pcbX: cell.center.x,
3594
- pcbY: cell.center.y,
3595
- viaIndex: cell.index + 20
3596
- },
3597
- cell.index
3598
- )),
3599
- verticalEdgeViaGridCells.map((cell) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3600
- ViaGridVia,
3601
- {
3602
- pcbX: cell.center.x,
3603
- pcbY: cell.center.y,
3604
- viaIndex: cell.index + 54
3605
- },
3606
- cell.index
3607
- )),
3608
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3609
- "chip",
3610
- {
3611
- name: "TOP_RECT",
3612
- pcbX: 50,
3613
- pcbY: 62.5,
3614
- noSchematicRepresentation: true,
3615
- footprint: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("footprint", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3616
- "smtpad",
3617
- {
3618
- layer: "top",
3619
- shape: "rect",
3620
- width: "40mm",
3621
- height: "3mm",
3622
- portHints: ["pin1"],
3623
- cornerRadius: 0.5
3624
- }
3625
- ) })
3626
- }
3627
- ),
3628
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3629
- "silkscreentext",
3565
+ pcbX: "0mm",
3566
+ pcbY: "0mm",
3567
+ layer: "top",
3568
+ shape: "polygon",
3569
+ portHints: ["pin1"],
3570
+ points: pacmanPolygonOutline
3571
+ }
3572
+ ) })
3573
+ },
3574
+ "pacman_" + cornerPositionName
3575
+ );
3576
+ }),
3577
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ViaGridPlus, { pcbX: -20, pcbY: -7.5, startIndex: 0 }),
3578
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ViaGridPlus, { pcbX: 20, pcbY: -7.5, startIndex: 5 }),
3579
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ViaGridPlus, { pcbX: -20, pcbY: 7.5, startIndex: 10 }),
3580
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ViaGridPlus, { pcbX: 20, pcbY: 7.5, startIndex: 15 }),
3581
+ horizontalEdgeViaGridCells.map((cell) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3582
+ ViaGridVia,
3583
+ {
3584
+ pcbX: cell.center.x - 50,
3585
+ pcbY: cell.center.y - 32.5,
3586
+ viaIndex: cell.index + 20
3587
+ },
3588
+ cell.index
3589
+ )),
3590
+ verticalEdgeViaGridCells.map((cell) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3591
+ ViaGridVia,
3592
+ {
3593
+ pcbX: cell.center.x - 50,
3594
+ pcbY: cell.center.y - 32.5,
3595
+ viaIndex: cell.index + 54
3596
+ },
3597
+ cell.index
3598
+ )),
3599
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3600
+ "chip",
3601
+ {
3602
+ name: "TOP_RECT",
3603
+ pcbX: 0,
3604
+ pcbY: 30,
3605
+ noSchematicRepresentation: true,
3606
+ footprint: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("footprint", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3607
+ "smtpad",
3630
3608
  {
3631
- text: "VIAGRID TOP",
3632
- fontSize: "1.5mm",
3633
- pcbX: 50,
3634
- pcbY: 2.5
3609
+ layer: "top",
3610
+ shape: "rect",
3611
+ width: "40mm",
3612
+ height: "3mm",
3613
+ portHints: ["pin1"],
3614
+ cornerRadius: 0.5
3635
3615
  }
3636
- ),
3637
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("net", { name: "GND" }),
3638
- children
3639
- ]
3640
- })
3641
- );
3616
+ ) })
3617
+ }
3618
+ ),
3619
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("silkscreentext", { text: "VIAGRID TOP", fontSize: "1.5mm", pcbX: 0, pcbY: -30 }),
3620
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("net", { name: "GND" }),
3621
+ children
3622
+ ] }));
3642
3623
  };
3643
3624
  var horizontalEdgeViaGridCells = grid({
3644
3625
  rows: 2,
@@ -3649,9 +3630,9 @@ var horizontalEdgeViaGridCells = grid({
3649
3630
  // if you want to provide the spacing instead of width
3650
3631
  ySpacing: 45,
3651
3632
  // if you want to provide the spacing instead of height
3652
- offsetX: 90 / 2 + 5,
3633
+ offsetX: 50,
3653
3634
  // optional
3654
- offsetY: 55 / 2 + 5,
3635
+ offsetY: 32.5,
3655
3636
  // optional
3656
3637
  yDirection: "up-is-negative"
3657
3638
  // optional, default: "cartesian"
@@ -3666,9 +3647,9 @@ var verticalEdgeViaGridCells = grid({
3666
3647
  // if you want to provide the spacing instead of width
3667
3648
  ySpacing: 5,
3668
3649
  // if you want to provide the spacing instead of height
3669
- offsetX: 90 / 2 + 5,
3650
+ offsetX: 50,
3670
3651
  // optional
3671
- offsetY: 55 / 2 + 5,
3652
+ offsetY: 32.5,
3672
3653
  // optional
3673
3654
  yDirection: "up-is-negative"
3674
3655
  // optional, default: "cartesian"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/common",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -31,7 +31,7 @@
31
31
  "devDependencies": {
32
32
  "@biomejs/biome": "^2.2.4",
33
33
  "@types/react": "^19.1.12",
34
- "tscircuit": "^0.0.860",
34
+ "tscircuit": "^0.0.879",
35
35
  "tsup": "^8.5.0"
36
36
  }
37
37
  }