@scriptonita/chess-football-ui 0.4.0 → 0.4.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.cjs CHANGED
@@ -399,7 +399,14 @@ function GameBoard({ userSide, showCoordinates = false, keyboardNav = true }) {
399
399
  isDisambiguateTarget && selectedPieceId && /* @__PURE__ */ jsxRuntime.jsxs(
400
400
  "div",
401
401
  {
402
- className: "absolute z-50 bottom-full mb-1 left-1/2 -translate-x-1/2 flex gap-1 bg-bg-secondary border border-border-subtle rounded-md p-1 shadow-xl pointer-events-auto whitespace-nowrap",
402
+ className: cn(
403
+ "absolute z-50 flex gap-1 bg-bg-secondary border border-border-subtle rounded-md p-1 shadow-xl pointer-events-auto whitespace-nowrap",
404
+ // The board container is `overflow-hidden` (for its rounded
405
+ // corners), so a popover that spills past an edge gets clipped.
406
+ // Anchor it inside the board on edge columns / the top row.
407
+ y === ROWS - 1 ? "top-full mt-1" : "bottom-full mb-1",
408
+ x === 0 ? "left-0" : x === COLS - 1 ? "right-0" : "left-1/2 -translate-x-1/2"
409
+ ),
403
410
  onClick: (e) => e.stopPropagation(),
404
411
  children: [
405
412
  /* @__PURE__ */ jsxRuntime.jsxs(