@tscircuit/common 0.0.22 → 0.0.24

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
@@ -28,6 +28,10 @@ type XiaoBoardProps = ChipProps & BoardProps & {
28
28
  };
29
29
  declare const XiaoBoard: ({ variant, withPlatedHoles, children, ...rest }: XiaoBoardProps) => react_jsx_runtime.JSX.Element;
30
30
 
31
+ declare const XiaoReceiver: (props: ChipProps & {
32
+ children?: any;
33
+ }) => react_jsx_runtime.JSX.Element;
34
+
31
35
  type ProMicroBoardProps = ChipProps & BoardProps & {
32
36
  children?: any;
33
37
  };
@@ -39,4 +43,4 @@ type ViaGridBoardProps = ChipProps & BoardProps & {
39
43
  };
40
44
  declare const ViaGridBoard: ({ children, ...rest }: ViaGridBoardProps) => react_jsx_runtime.JSX.Element;
41
45
 
42
- export { ArduinoShield, MicroModBoard, ProMicroBoard, RaspberryPiHatBoard, ViaGridBoard, XiaoBoard };
46
+ export { ArduinoShield, MicroModBoard, ProMicroBoard, RaspberryPiHatBoard, ViaGridBoard, XiaoBoard, XiaoReceiver };
package/dist/index.js CHANGED
@@ -3311,9 +3311,15 @@ var XiaoBoard = (_a) => {
3311
3311
  ] }));
3312
3312
  };
3313
3313
 
3314
+ // lib/XiaoBoard/XiaoReceiver.circuit.tsx
3315
+ var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
3316
+ var XiaoReceiver = (props) => {
3317
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(XiaoBoard, __spreadValues({ variant: "Receiver" }, props));
3318
+ };
3319
+
3314
3320
  // lib/ProMicroBoard/ProMicroBoardFootprint.tsx
3315
3321
  var import_react3 = __toESM(require_react(), 1);
3316
- var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
3322
+ var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
3317
3323
  var createPlatedHole3 = (props) => import_react3.default.createElement("platedhole", props);
3318
3324
  var ProMicroBoardFootprint = ({
3319
3325
  left = 12,
@@ -3354,11 +3360,11 @@ var ProMicroBoardFootprint = ({
3354
3360
  );
3355
3361
  pinNumber++;
3356
3362
  }
3357
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("footprint", { children: pads });
3363
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("footprint", { children: pads });
3358
3364
  };
3359
3365
 
3360
3366
  // lib/ProMicroBoard/ProMicroBoard.circuit.tsx
3361
- var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
3367
+ var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
3362
3368
  var ProMicroBoard = (_a) => {
3363
3369
  var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
3364
3370
  const { boardProps, chipProps = {} } = splitBoardAndChipProps(__spreadValues({}, rest));
@@ -3426,7 +3432,7 @@ var ProMicroBoard = (_a) => {
3426
3432
  ]
3427
3433
  }
3428
3434
  };
3429
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
3435
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
3430
3436
  "board",
3431
3437
  __spreadProps(__spreadValues({}, boardProps), {
3432
3438
  outline: [
@@ -3437,11 +3443,11 @@ var ProMicroBoard = (_a) => {
3437
3443
  { x: -8.89, y: 16.51 }
3438
3444
  ],
3439
3445
  children: [
3440
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
3446
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3441
3447
  "chip",
3442
3448
  __spreadProps(__spreadValues({}, chipRest), {
3443
3449
  name: resolvedName,
3444
- footprint: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ProMicroBoardFootprint, {}),
3450
+ footprint: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ProMicroBoardFootprint, {}),
3445
3451
  doNotPlace: true,
3446
3452
  pcbX: 0,
3447
3453
  pcbY: 0,
@@ -3504,10 +3510,10 @@ function grid({
3504
3510
  }
3505
3511
 
3506
3512
  // lib/ViaGridBoard/viaGridElements.tsx
3507
- var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
3513
+ var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
3508
3514
  var ViaGridVia = (props) => {
3509
3515
  const _a = props, { viaIndex } = _a, restProps = __objRest(_a, ["viaIndex"]);
3510
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3516
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3511
3517
  "via",
3512
3518
  __spreadValues({
3513
3519
  name: `via_${viaIndex}`,
@@ -3520,23 +3526,23 @@ var ViaGridVia = (props) => {
3520
3526
  };
3521
3527
  var ViaGridPlus = (props) => {
3522
3528
  const _a = props, { startIndex } = _a, restProps = __objRest(_a, ["startIndex"]);
3523
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("group", __spreadProps(__spreadValues({}, restProps), { children: [
3524
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ViaGridVia, { pcbX: 0, pcbY: 0, viaIndex: startIndex }),
3525
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ViaGridVia, { pcbX: 2.5, pcbY: 0, viaIndex: startIndex + 1 }),
3526
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ViaGridVia, { pcbX: 0, pcbY: 2.5, viaIndex: startIndex + 2 }),
3527
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ViaGridVia, { pcbX: -2.5, pcbY: 0, viaIndex: startIndex + 3 }),
3528
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ViaGridVia, { pcbX: 0, pcbY: -2.5, viaIndex: startIndex + 4 })
3529
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("group", __spreadProps(__spreadValues({}, restProps), { children: [
3530
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ViaGridVia, { pcbX: 0, pcbY: 0, viaIndex: startIndex }),
3531
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ViaGridVia, { pcbX: 2.5, pcbY: 0, viaIndex: startIndex + 1 }),
3532
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ViaGridVia, { pcbX: 0, pcbY: 2.5, viaIndex: startIndex + 2 }),
3533
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ViaGridVia, { pcbX: -2.5, pcbY: 0, viaIndex: startIndex + 3 }),
3534
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ViaGridVia, { pcbX: 0, pcbY: -2.5, viaIndex: startIndex + 4 })
3529
3535
  ] }));
3530
3536
  };
3531
3537
  var pacmanPolygonOutline = new OutlineBuilder(-0.2, -0.2).lineTo(-0.2, 2.5).arcTo(-2.5, 0, { radius: 2.5, sweep: true }).arcTo(0, -2.5, { radius: 2.5, sweep: true }).arcTo(2.5, -0.2, { radius: 2.5, sweep: true }).lineTo(-0.2, -0.2).toArray();
3532
3538
 
3533
3539
  // lib/ViaGridBoard/ViaGridBoard.circuit.tsx
3534
- var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
3540
+ var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
3535
3541
  var ViaGridBoard = (_a) => {
3536
3542
  var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
3537
3543
  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)(
3544
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("board", __spreadProps(__spreadValues({}, boardProps), { width: "100mm", height: "65mm", children: [
3545
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3540
3546
  "pcbnoterect",
3541
3547
  {
3542
3548
  pcbX: 0,
@@ -3551,7 +3557,7 @@ var ViaGridBoard = (_a) => {
3551
3557
  const x = (cornerPositionName.includes("R") ? 90 : 0) + 5 - 50;
3552
3558
  const y = (cornerPositionName.includes("T") ? 55 : 0) + 5 - 32.5;
3553
3559
  const rotation = index * 90;
3554
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3560
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3555
3561
  "chip",
3556
3562
  {
3557
3563
  name: cornerPositionName,
@@ -3559,7 +3565,7 @@ var ViaGridBoard = (_a) => {
3559
3565
  pcbY: y,
3560
3566
  noSchematicRepresentation: true,
3561
3567
  pcbRotation: -rotation,
3562
- footprint: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("footprint", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3568
+ footprint: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("footprint", { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3563
3569
  "smtpad",
3564
3570
  {
3565
3571
  pcbX: "0mm",
@@ -3574,11 +3580,11 @@ var ViaGridBoard = (_a) => {
3574
3580
  "pacman_" + cornerPositionName
3575
3581
  );
3576
3582
  }),
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)(
3583
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ViaGridPlus, { pcbX: -20, pcbY: -7.5, startIndex: 0 }),
3584
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ViaGridPlus, { pcbX: 20, pcbY: -7.5, startIndex: 5 }),
3585
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ViaGridPlus, { pcbX: -20, pcbY: 7.5, startIndex: 10 }),
3586
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ViaGridPlus, { pcbX: 20, pcbY: 7.5, startIndex: 15 }),
3587
+ horizontalEdgeViaGridCells.map((cell) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3582
3588
  ViaGridVia,
3583
3589
  {
3584
3590
  pcbX: cell.center.x - 50,
@@ -3587,7 +3593,7 @@ var ViaGridBoard = (_a) => {
3587
3593
  },
3588
3594
  cell.index
3589
3595
  )),
3590
- verticalEdgeViaGridCells.map((cell) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3596
+ verticalEdgeViaGridCells.map((cell) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3591
3597
  ViaGridVia,
3592
3598
  {
3593
3599
  pcbX: cell.center.x - 50,
@@ -3596,14 +3602,14 @@ var ViaGridBoard = (_a) => {
3596
3602
  },
3597
3603
  cell.index
3598
3604
  )),
3599
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3605
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3600
3606
  "chip",
3601
3607
  {
3602
3608
  name: "TOP_RECT",
3603
3609
  pcbX: 0,
3604
3610
  pcbY: 30,
3605
3611
  noSchematicRepresentation: true,
3606
- footprint: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("footprint", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3612
+ footprint: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("footprint", { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3607
3613
  "smtpad",
3608
3614
  {
3609
3615
  layer: "top",
@@ -3616,8 +3622,8 @@ var ViaGridBoard = (_a) => {
3616
3622
  ) })
3617
3623
  }
3618
3624
  ),
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" }),
3625
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("silkscreentext", { text: "VIAGRID TOP", fontSize: "1.5mm", pcbX: 0, pcbY: -30 }),
3626
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("net", { name: "GND" }),
3621
3627
  children
3622
3628
  ] }));
3623
3629
  };
@@ -3661,7 +3667,8 @@ export {
3661
3667
  ProMicroBoard,
3662
3668
  RaspberryPiHatBoard,
3663
3669
  ViaGridBoard,
3664
- XiaoBoard
3670
+ XiaoBoard,
3671
+ XiaoReceiver
3665
3672
  };
3666
3673
  /*! Bundled license information:
3667
3674
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/common",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
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.888",
34
+ "tscircuit": "^0.0.911",
35
35
  "tsup": "^8.5.0"
36
36
  }
37
37
  }