Releases: echecsjs/react-board
Releases · echecsjs/react-board
Release list
v3.0.0
Changed
- BREAKING:
Colortype is now'black' | 'white'(was'b' | 'w') - BREAKING:
PieceTypetype is now
'bishop' | 'king' | 'knight' | 'pawn' | 'queen' | 'rook'(was
'b' | 'k' | 'n' | 'p' | 'q' | 'r') - BREAKING:
PromotionPiecetype is now
'bishop' | 'knight' | 'queen' | 'rook'(was'b' | 'n' | 'q' | 'r') - BREAKING:
MoveEvent.promotionis now typed asPromotionPiece(was
string) Color,File,Piece,PieceType,Rank,Squareare now imported from
@echecs/positionand re-exported — consumers can pass
game.position().pieces()directly to thepositionprop without conversion
Added
@echecs/position(>=3) as a peer dependencyColor,File,PieceType,Rankadded to public type exports
v2.1.3
v2.1.2
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/1and lets the parent control sizing (#18)
v2.1.1
Fixed
- animation offset stuck when parent re-renders during RAF window — removed
cancelAnimationFramecleanup fromuseAnimationeffect since the
offset-clearing callback is idempotent (#14) - added
docsscript for CI storybook deployment (#13) - added missing
Annotations,ArrowKind,Circletypes to README (#16)
v2.1.0
Added
- right-click drawable annotations —
drawableprop, circle and arrow drawing
viauseDrawinghook andAnnotationOverlaycomponent - SVG arrow overlay —
arrowsprop with semantickindtypes (move,
alternative,danger,capture) - touch-aware drag threshold (10px for touch, 4px for mouse)
movableprop to control piece interaction independently fromdrawable
Fixed
- drag restricted to left-click only (right-click no longer initiates drag)
v2.0.0
Added
--board-piece-transitionCSS 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:
PieceSettype changed from
Record<PieceKey, React.ComponentType<{ size: number }>>to
Record<PieceKey, string>— pieces are now image URLs (data URIs, SVG files,
PNGs) rendered as CSSbackground-imageinstead of React components - BREAKING:
PieceComponenttype removed from public exports - bundled cburnett piece set converted from inline SVG components to
data:image/svg+xmlURIs - drag-drop animation now starts from the drop point instead of the origin
square
Fixed
- pieces appearing behind adjacent squares during drag (removed
overflow: hiddenfrom squares)
Removed
- 12 individual piece TSX component files (
src/pieces/*.tsx) — replaced by
data URIs insrc/pieces/index.ts
v1.0.2
Added
- added keywords for npm discoverability
v1.0.1
Fixed
- removed non-existent
themeprop andBoardThemetype from docs - documented
turn,children,arrows,onSquareClickprops - documented
squareCoordsfunction export - documented all exported types (
Arrow,BoardProps,PieceKey,
PromotionDialogProps,PromotionPiece,SquareCoords) - fixed
PromotionDialog.onCancelas optional - documented all sound assets (
castle.mp3,check.mp3,game-end.mp3)
v1.0.0
Added
- CSS variable theming (
--board-*) for all visual properties turnprop to restrict interaction by piece colour<PromotionDialog />component for promotion piece selectionchildrenprop on<Board />for rendering overlays inside the gridsquareCoordsutility export for computing grid placementcapturefield onMoveEvent- Bundled sound assets: move, capture, check, castle, game-end (subpath exports)
--board-drag-shadowCSS variable for dragged piece shadow--board-coordinate-on-light,--board-coordinate-on-dark,
--board-coordinate-weightCSS variables--board-promotion-backgroundCSS 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
MoveEventnow includescapture: boolean- Highlight renders behind pieces instead of on top
Fixed
- Native browser drag interfering with fast piece moves
- Highlight overlay tinting pieces
Removed
themeprop andBoardThemetype (replaced by CSS variables)playground/dev environment (replaced by Storybook)