@mirasen/chessboard 1.1.2 → 1.1.4
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/CHANGELOG.md +12 -0
- package/README.md +4 -0
- package/dist/adapters/chessjs/index.d.ts +1 -0
- package/dist/adapters/chessjs/main.d.ts +6 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @mirasen/chessboard
|
|
2
2
|
|
|
3
|
+
## 1.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 86d630d: Link to the React chessboard package from the README.
|
|
8
|
+
|
|
9
|
+
## 1.1.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- dc95241: Use an explicit ChessJsMoveInput type for chess.js adapter output.
|
|
14
|
+
|
|
3
15
|
## 1.1.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -14,6 +14,10 @@ A framework-agnostic TypeScript chessboard platform with real chess interaction
|
|
|
14
14
|
- [Try the promotion flow](https://mirasen.io/chessboard/examples/promotion.html)
|
|
15
15
|
- [Try the minimal example](https://mirasen.io/chessboard/examples/minimal.html)
|
|
16
16
|
|
|
17
|
+
## Using React?
|
|
18
|
+
|
|
19
|
+
Use [`@mirasen/react-chessboard`](https://github.com/mirasen-io/react-chessboard) for a React component with the same built-in interaction, promotion, animation, and chess.js integration.
|
|
20
|
+
|
|
17
21
|
## Why this exists
|
|
18
22
|
|
|
19
23
|
Most chessboards fall into one of two buckets:
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Move } from 'chess.js';
|
|
2
2
|
import type { MoveRequestInput } from '../../state/board/types/input.js';
|
|
3
3
|
import type { MoveOutput } from '../../state/board/types/output.js';
|
|
4
4
|
import type { MoveDestinationInput } from '../../state/interaction/types/input.js';
|
|
5
|
-
type ChessJsMoveInput =
|
|
5
|
+
export type ChessJsMoveInput = {
|
|
6
|
+
from: string;
|
|
7
|
+
to: string;
|
|
8
|
+
promotion?: string;
|
|
9
|
+
};
|
|
6
10
|
/**
|
|
7
11
|
* Convert a board MoveOutput into the object notation accepted by chess.move().
|
|
8
12
|
*/
|
|
@@ -16,4 +20,3 @@ export declare function toBoardMove(move: Move): MoveRequestInput;
|
|
|
16
20
|
* Merges promotion variants for the same from/to/special-move identity into one destination.
|
|
17
21
|
*/
|
|
18
22
|
export declare function toBoardMoveDestinations(moves: readonly Move[]): MoveDestinationInput[];
|
|
19
|
-
export {};
|
package/package.json
CHANGED