@scriptonita/chess-football-ui 0.4.0 → 0.4.2
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.cjs +12 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -5
- package/dist/index.js.map +1 -1
- package/package.json +13 -2
package/dist/index.js
CHANGED
|
@@ -65,14 +65,14 @@ function GamePiece({ piece, isSelected, hasBall, onClick }) {
|
|
|
65
65
|
onClick,
|
|
66
66
|
style,
|
|
67
67
|
className: cn(
|
|
68
|
-
"relative w-[88%] h-[88%] flex items-center justify-center rounded-full cursor-pointer z-10 transition-transform",
|
|
68
|
+
"relative w-[88%] h-[88%] flex items-center justify-center rounded-full cursor-pointer z-10 transition-transform motion-reduce:transition-none",
|
|
69
69
|
isSelected && "ring-4 ring-primary scale-110 z-30",
|
|
70
70
|
piece.hasMovedThisTurn && "opacity-70"
|
|
71
71
|
),
|
|
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
|
-
isSelected && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 rounded-full animate-pulse ring-2 ring-yellow-400 ring-offset-2 ring-offset-transparent" })
|
|
75
|
+
isSelected && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 rounded-full animate-pulse motion-reduce:animate-none ring-2 ring-yellow-400 ring-offset-2 ring-offset-transparent" })
|
|
76
76
|
]
|
|
77
77
|
}
|
|
78
78
|
);
|
|
@@ -378,7 +378,14 @@ function GameBoard({ userSide, showCoordinates = false, keyboardNav = true }) {
|
|
|
378
378
|
isDisambiguateTarget && selectedPieceId && /* @__PURE__ */ jsxs(
|
|
379
379
|
"div",
|
|
380
380
|
{
|
|
381
|
-
className:
|
|
381
|
+
className: cn(
|
|
382
|
+
"absolute z-50 flex gap-1 bg-bg-secondary border border-border-subtle rounded-md p-1 shadow-xl pointer-events-auto whitespace-nowrap",
|
|
383
|
+
// The board container is `overflow-hidden` (for its rounded
|
|
384
|
+
// corners), so a popover that spills past an edge gets clipped.
|
|
385
|
+
// Anchor it inside the board on edge columns / the top row.
|
|
386
|
+
y === ROWS - 1 ? "top-full mt-1" : "bottom-full mb-1",
|
|
387
|
+
x === 0 ? "left-0" : x === COLS - 1 ? "right-0" : "left-1/2 -translate-x-1/2"
|
|
388
|
+
),
|
|
382
389
|
onClick: (e) => e.stopPropagation(),
|
|
383
390
|
children: [
|
|
384
391
|
/* @__PURE__ */ jsxs(
|
|
@@ -686,7 +693,7 @@ function PlayerInfo({ name, team, avatarUrl, isActive, actionPoints, maxActionPo
|
|
|
686
693
|
), children: name }),
|
|
687
694
|
/* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-1", align === "right" && "flex-row-reverse"), children: [
|
|
688
695
|
/* @__PURE__ */ jsx("span", { className: "font-mono text-[10px] text-fg-muted uppercase", children: team }),
|
|
689
|
-
isActive && /* @__PURE__ */ jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-accent-green animate-pulse", "aria-hidden": "true" })
|
|
696
|
+
isActive && /* @__PURE__ */ jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-accent-green animate-pulse motion-reduce:animate-none", "aria-hidden": "true" })
|
|
690
697
|
] }),
|
|
691
698
|
/* @__PURE__ */ jsx(
|
|
692
699
|
ActionPoints,
|
|
@@ -1307,7 +1314,7 @@ function HistoryChip({ lastMove, onClick, className }) {
|
|
|
1307
1314
|
"bg-bg-surface border border-border-subtle",
|
|
1308
1315
|
"font-mono text-[11px] text-fg-secondary",
|
|
1309
1316
|
"hover:text-fg-primary hover:bg-bg-surface-elevated active:scale-95",
|
|
1310
|
-
"transition-all duration-150",
|
|
1317
|
+
"transition-all duration-150 motion-reduce:transition-none",
|
|
1311
1318
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-green",
|
|
1312
1319
|
className
|
|
1313
1320
|
),
|