@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.
- package/dist/index.js +87 -106
- 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
|
|
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
|
-
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
|
-
|
|
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
|
-
})
|
|
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:
|
|
3633
|
+
offsetX: 50,
|
|
3653
3634
|
// optional
|
|
3654
|
-
offsetY:
|
|
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:
|
|
3650
|
+
offsetX: 50,
|
|
3670
3651
|
// optional
|
|
3671
|
-
offsetY:
|
|
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.
|
|
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.
|
|
34
|
+
"tscircuit": "^0.0.879",
|
|
35
35
|
"tsup": "^8.5.0"
|
|
36
36
|
}
|
|
37
37
|
}
|