react-chessboard-ui 1.0.0 → 1.1.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/README.md CHANGED
@@ -1,35 +1,50 @@
1
- # react-chessboard-ui
1
+ # react-chessboard-ui ♟️
2
2
 
3
- [![NPM](https://img.shields.io/npm/v/react-chessboard-ui.svg)](https://www.npmjs.com/package/react-chessboard-ui) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
3
+ [![NPM](https://img.shields.io/npm/v/react-chessboard-ui.svg)](https://www.npmjs.com/package/react-chessboard-ui)
4
+ [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
4
5
 
5
- <img src="./blob/ChessBoard.png?raw=true" width="400px">
6
+ A lightweight and customizable React chessboard component built with modern UI in mind. Easily integrate chess functionality into your React apps with FEN support, game-end detection, and position handling.
6
7
 
7
- ## See full documentation on https://chessboardui.space
8
+ <img src="./blob/ChessBoard.png?raw=true" width="400px" alt="react-chessboard-ui preview" />
8
9
 
10
+ ## 📘 **Full documentation**: [https://chessboardui.space/](https://chessboardui.space/)
9
11
 
10
- ## Install
12
+ ---
13
+
14
+ ## 🚀 Features
15
+
16
+ - 🎯 Fully controlled via FEN strings
17
+ - ♻️ React functional component with hooks support
18
+ - 🎨 Customizable styles (via CSS or override)
19
+ - ♟️ Game-end and move-change callbacks
20
+ - 🧩 Easy integration into any React project
21
+
22
+ ---
23
+
24
+ ## 📦 Installation
25
+
26
+ Install via npm:
11
27
 
12
28
  ```bash
13
29
  npm install react-chessboard-ui
14
30
  ```
15
31
 
16
- or
32
+ Or using yarn:
17
33
 
18
34
  ```bash
19
35
  yarn add react-chessboard-ui
20
36
  ```
21
37
 
22
- ## Usage example
38
+ ---
39
+
40
+ ## 💡 Usage Example
41
+
23
42
  ```tsx
24
43
  import React from 'react';
25
- import { ChessBoard } from 'react-chessboard-ui'; // ChessBoard is a base component of react-chessboard-ui
26
-
27
- import 'react-chessboard-ui/dist/index.css'; // required import css for ChessBoard
44
+ import { ChessBoard } from 'react-chessboard-ui';
45
+ import 'react-chessboard-ui/dist/index.css'; // Required CSS
28
46
 
29
47
  export const App = () => {
30
-
31
- // ... all handlers
32
-
33
48
  return (
34
49
  <div>
35
50
  <ChessBoard
@@ -39,11 +54,32 @@ export const App = () => {
39
54
  />
40
55
  </div>
41
56
  );
42
- }
57
+ };
43
58
  ```
44
59
 
45
- ## Creators
46
- Created by [in: Tanya](https://www.linkedin.com/in/tatiana-utbanova-6415b8271/) and [in: Alex](linkedin.com/in/alexander-utbanov-a9670a210/)
60
+ ## Full customizable
61
+ <img src="./blob/customization.png?raw=true" width="400px" alt="react-chessboard-ui preview" />
62
+
63
+ ### 📘 **Documentation for customization**: [https://chessboardui.space/properties/config/](https://chessboardui.space/properties/config/)
64
+
65
+
66
+ ---
67
+
68
+ ## 👥 Authors
69
+
70
+ Created by:
71
+
72
+ - [Tatiana Utbanova](https://www.linkedin.com/in/tatiana-utbanova-6415b8271/) - Design owner
73
+ - [Alexander Utbanov](https://linkedin.com/in/alexander-utbanov-a9670a210/) - Code owner
74
+
75
+ ---
76
+
77
+ ## 📄 License
78
+
79
+ MIT © [react-chessboard-ui](https://github.com/)
80
+
81
+ ---
82
+
83
+ ## 🧠 Keywords (for discoverability)
47
84
 
48
- ## License
49
- MIT © [](https://github.com/)
85
+ `react` `chess` `chessboard` `react-chess` `chess ui` `react chess component` `fen` `chess game` `react board game`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-chessboard-ui",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "A customizable and interactive chessboard component for React applications. Easily integrate a fully functional and responsive chessboard into your React project with features like drag-and-drop pieces, move validation, and customizable board styles.",
5
5
  "author": "skilldill",
6
6
  "license": "MIT",
@@ -26,7 +26,7 @@
26
26
  "deploy": "gh-pages -d example/build"
27
27
  },
28
28
  "peerDependencies": {
29
- "react": "^18.3.0"
29
+ "react": "^19.1.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@testing-library/jest-dom": "^4.2.4",
@@ -34,8 +34,8 @@
34
34
  "@testing-library/user-event": "^7.2.1",
35
35
  "@types/jest": "^25.1.4",
36
36
  "@types/node": "^12.12.38",
37
- "@types/react": "^18.3.0",
38
- "@types/react-dom": "^18.3.0",
37
+ "@types/react": "^19.1.0",
38
+ "@types/react-dom": "^19.1.0",
39
39
  "@typescript-eslint/eslint-plugin": "^2.26.0",
40
40
  "@typescript-eslint/parser": "^2.26.0",
41
41
  "babel-eslint": "^10.0.3",
@@ -54,8 +54,8 @@
54
54
  "microbundle-crl": "^0.13.10",
55
55
  "npm-run-all": "^4.1.5",
56
56
  "prettier": "^2.0.4",
57
- "react": "^18.3.0",
58
- "react-dom": "^18.3.0",
57
+ "react": "^19.1.0",
58
+ "react-dom": "^19.1.0",
59
59
  "react-scripts": "^3.4.1",
60
60
  "typescript": "^3.7.5"
61
61
  },
@@ -1,27 +0,0 @@
1
- /// <reference types="react" />
2
- import { CellPos, Figure, MoveData } from "../JSChessEngine";
3
- export interface ChessPiecesMap {
4
- [key: string]: (size: string) => JSX.Element;
5
- }
6
- export declare type ChessBoardConfig = {
7
- cellSize: number;
8
- whiteCellColor: string;
9
- blackCellColor: string;
10
- selectedCellColor: string;
11
- selectedCellBorder: string;
12
- markedCellColor: string;
13
- circleMarkColor: string;
14
- arrowColor: string;
15
- checkedCellColor: string;
16
- piecesMap: ChessPiecesMap;
17
- };
18
- export declare type ChangeMove = {
19
- move: MoveData;
20
- withTransition?: boolean;
21
- attackedPos?: CellPos;
22
- transformTo?: Figure;
23
- };
24
- export declare type ArrowCoords = {
25
- start: number[];
26
- end: number[];
27
- };
@@ -1 +0,0 @@
1
- export {};