@scriptonita/chess-football-ui 0.2.0 → 0.2.1

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 CHANGED
@@ -72,14 +72,6 @@ function GamePiece({ piece, isSelected, hasBall, onClick }) {
72
72
  children: [
73
73
  /* @__PURE__ */ jsx(PieceIcon, { type: piece.type, side: piece.side }),
74
74
  hasBall && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 rounded-full ring-2 ring-orange-400 pointer-events-none" }),
75
- piece.hasMovedThisTurn && /* @__PURE__ */ jsx(
76
- "span",
77
- {
78
- "aria-hidden": "true",
79
- className: "absolute top-0.5 right-0.5 w-[14px] h-[14px] rounded-full bg-fg-muted/80 flex items-center justify-center text-[9px] text-bg-primary font-bold leading-none pointer-events-none",
80
- children: "\u2713"
81
- }
82
- ),
83
75
  isSelected && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 rounded-full animate-pulse ring-2 ring-yellow-400 ring-offset-2 ring-offset-transparent" })
84
76
  ]
85
77
  }
@@ -199,6 +191,7 @@ function GameBoard({ userSide, showCoordinates = false, keyboardNav = true }) {
199
191
  const ballCarrier = ball.holderId ? boardState.pieces.find((p) => p.id === ball.holderId) ?? null : null;
200
192
  const isOffsideRisk = !!ballCarrier && ballCarrier.type !== "king" && userSide !== null && ballCarrier.side === userSide && boardState.turn === userSide && isInEnemyArea(ballCarrier.pos, ballCarrier.side);
201
193
  const handleSquareClick = (x, y) => {
194
+ setCursor(null);
202
195
  const isValidMove = validMoves.some((m) => m.x === x && m.y === y);
203
196
  const isValidPass = validPasses.some((p) => p.x === x && p.y === y);
204
197
  if (isValidMove && isValidPass) {
@@ -400,8 +393,7 @@ function GameBoard({ userSide, showCoordinates = false, keyboardNav = true }) {
400
393
  tabIndex: 0,
401
394
  role: "application",
402
395
  "aria-label": "Game board \u2014 arrow keys to move the cursor, Enter to act",
403
- onKeyDown: handleKeyDown,
404
- onFocus: () => setCursor((c) => c ?? defaultCursor())
396
+ onKeyDown: handleKeyDown
405
397
  } : {},
406
398
  children: /* @__PURE__ */ jsxs("div", { className: "relative", style: { containerType: "inline-size" }, children: [
407
399
  /* @__PURE__ */ jsx("div", { className: "grid grid-cols-9 gap-[1px]", children: renderSquares() }),