@tscircuit/common 0.0.18 → 0.0.20
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 +87 -105
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3534,110 +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
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
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
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
))
|
|
3608
|
-
|
|
3609
|
-
"chip",
|
|
3610
|
-
{
|
|
3611
|
-
name: "TOP_RECT",
|
|
3612
|
-
noSchematicRepresentation: true,
|
|
3613
|
-
footprint: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("footprint", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3614
|
-
"smtpad",
|
|
3615
|
-
{
|
|
3616
|
-
pcbX: "50mm",
|
|
3617
|
-
pcbY: "62.5mm",
|
|
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
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3609
|
+
layer: "top",
|
|
3610
|
+
shape: "rect",
|
|
3611
|
+
width: "40mm",
|
|
3612
|
+
height: "3mm",
|
|
3613
|
+
portHints: ["pin1"],
|
|
3614
|
+
cornerRadius: 0.5
|
|
3635
3615
|
}
|
|
3636
|
-
)
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
})
|
|
3640
|
-
|
|
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
|
+
] }));
|
|
3641
3623
|
};
|
|
3642
3624
|
var horizontalEdgeViaGridCells = grid({
|
|
3643
3625
|
rows: 2,
|
|
@@ -3648,9 +3630,9 @@ var horizontalEdgeViaGridCells = grid({
|
|
|
3648
3630
|
// if you want to provide the spacing instead of width
|
|
3649
3631
|
ySpacing: 45,
|
|
3650
3632
|
// if you want to provide the spacing instead of height
|
|
3651
|
-
offsetX:
|
|
3633
|
+
offsetX: 50,
|
|
3652
3634
|
// optional
|
|
3653
|
-
offsetY:
|
|
3635
|
+
offsetY: 32.5,
|
|
3654
3636
|
// optional
|
|
3655
3637
|
yDirection: "up-is-negative"
|
|
3656
3638
|
// optional, default: "cartesian"
|
|
@@ -3665,9 +3647,9 @@ var verticalEdgeViaGridCells = grid({
|
|
|
3665
3647
|
// if you want to provide the spacing instead of width
|
|
3666
3648
|
ySpacing: 5,
|
|
3667
3649
|
// if you want to provide the spacing instead of height
|
|
3668
|
-
offsetX:
|
|
3650
|
+
offsetX: 50,
|
|
3669
3651
|
// optional
|
|
3670
|
-
offsetY:
|
|
3652
|
+
offsetY: 32.5,
|
|
3671
3653
|
// optional
|
|
3672
3654
|
yDirection: "up-is-negative"
|
|
3673
3655
|
// optional, default: "cartesian"
|