Skip to content

Releases: echecsjs/react-board

v3.0.0

Choose a tag to compare

@github-actions github-actions released this 01 May 18:41
8c5596b

Changed

  • BREAKING: Color type is now 'black' | 'white' (was 'b' | 'w')
  • BREAKING: PieceType type is now
    'bishop' | 'king' | 'knight' | 'pawn' | 'queen' | 'rook' (was
    'b' | 'k' | 'n' | 'p' | 'q' | 'r')
  • BREAKING: PromotionPiece type is now
    'bishop' | 'knight' | 'queen' | 'rook' (was 'b' | 'n' | 'q' | 'r')
  • BREAKING: MoveEvent.promotion is now typed as PromotionPiece (was
    string)
  • Color, File, Piece, PieceType, Rank, Square are now imported from
    @echecs/position and re-exported — consumers can pass
    game.position().pieces() directly to the position prop without conversion

Added

  • @echecs/position (>=3) as a peer dependency
  • Color, File, PieceType, Rank added to public type exports

v2.1.3

Choose a tag to compare

@github-actions github-actions released this 26 Apr 09:47
fdd8256

Changed

  • inlined Piece and Square types locally, removing @echecs/position as a
    runtime dependency — lighter install, no functional change (#39)

Fixed

  • storybook autodocs page not rendering — added missing @storybook/addon-docs
    dependency (#40)
  • deduplicated rendering logic in Board component (#22)

v2.1.2

Choose a tag to compare

@github-actions github-actions released this 19 Apr 08:57
a1f2ff8

Fixed

  • inline width: 100% on the board root preventing square rendering in
    height-constrained layouts (flex rows, grid columns) — the board now uses only
    aspect-ratio: 1/1 and lets the parent control sizing (#18)

v2.1.1

Choose a tag to compare

@github-actions github-actions released this 16 Apr 21:02
785386d

Fixed

  • animation offset stuck when parent re-renders during RAF window — removed
    cancelAnimationFrame cleanup from useAnimation effect since the
    offset-clearing callback is idempotent (#14)
  • added docs script for CI storybook deployment (#13)
  • added missing Annotations, ArrowKind, Circle types to README (#16)

v2.1.0

Choose a tag to compare

@github-actions github-actions released this 16 Apr 19:40
49b91cd

Added

  • right-click drawable annotations — drawable prop, circle and arrow drawing
    via useDrawing hook and AnnotationOverlay component
  • SVG arrow overlay — arrows prop with semantic kind types (move,
    alternative, danger, capture)
  • touch-aware drag threshold (10px for touch, 4px for mouse)
  • movable prop to control piece interaction independently from drawable

Fixed

  • drag restricted to left-click only (right-click no longer initiates drag)

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 11 Apr 10:18
716f46f

Added

  • --board-piece-transition CSS variable to customise piece move animation
    (default: transform 200ms ease)
  • gh-pages deployment workflow for storybook documentation
  • promotion support in the interactive storybook demo

Changed

  • BREAKING: PieceSet type changed from
    Record<PieceKey, React.ComponentType<{ size: number }>> to
    Record<PieceKey, string> — pieces are now image URLs (data URIs, SVG files,
    PNGs) rendered as CSS background-image instead of React components
  • BREAKING: PieceComponent type removed from public exports
  • bundled cburnett piece set converted from inline SVG components to
    data:image/svg+xml URIs
  • drag-drop animation now starts from the drop point instead of the origin
    square

Fixed

  • pieces appearing behind adjacent squares during drag (removed
    overflow: hidden from squares)

Removed

  • 12 individual piece TSX component files (src/pieces/*.tsx) — replaced by
    data URIs in src/pieces/index.ts

v1.0.2

Choose a tag to compare

@github-actions github-actions released this 09 Apr 17:21
036562a

Added

  • added keywords for npm discoverability

v1.0.1

Choose a tag to compare

@github-actions github-actions released this 09 Apr 17:00
7eb942b

Fixed

  • removed non-existent theme prop and BoardTheme type from docs
  • documented turn, children, arrows, onSquareClick props
  • documented squareCoords function export
  • documented all exported types (Arrow, BoardProps, PieceKey,
    PromotionDialogProps, PromotionPiece, SquareCoords)
  • fixed PromotionDialog.onCancel as optional
  • documented all sound assets (castle.mp3, check.mp3, game-end.mp3)

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 09 Apr 15:19
bff452b

Added

  • CSS variable theming (--board-*) for all visual properties
  • turn prop to restrict interaction by piece colour
  • <PromotionDialog /> component for promotion piece selection
  • children prop on <Board /> for rendering overlays inside the grid
  • squareCoords utility export for computing grid placement
  • capture field on MoveEvent
  • Bundled sound assets: move, capture, check, castle, game-end (subpath exports)
  • --board-drag-shadow CSS variable for dragged piece shadow
  • --board-coordinate-on-light, --board-coordinate-on-dark,
    --board-coordinate-weight CSS variables
  • --board-promotion-background CSS variable
  • Storybook with interactive stories including playable game demo with sounds
  • Dependabot configuration

Changed

  • Default piece set replaced with chess.com Neo (vector-traced via vtracer)
  • Coordinate labels scaled to 15% of square size (was 25%), semi-bold weight
  • MoveEvent now includes capture: boolean
  • Highlight renders behind pieces instead of on top

Fixed

  • Native browser drag interfering with fast piece moves
  • Highlight overlay tinting pieces

Removed

  • theme prop and BoardTheme type (replaced by CSS variables)
  • playground/ dev environment (replaced by Storybook)