@mirasen/chessboard 1.1.1 → 1.1.3

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @mirasen/chessboard
2
2
 
3
+ ## 1.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - dc95241: Use an explicit ChessJsMoveInput type for chess.js adapter output.
8
+
9
+ ## 1.1.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 6c108b6: Export public input types for wrapper packages.
14
+
3
15
  ## 1.1.1
4
16
 
5
17
  ### Patch Changes
@@ -1 +1,2 @@
1
1
  export { toBoardMove, toBoardMoveDestinations, toGameMove } from './main.js';
2
+ export type { ChessJsMoveInput } from './main.js';
@@ -1,8 +1,12 @@
1
- import type { Chess, Move } from 'chess.js';
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 = Exclude<Parameters<Chess['move']>[0], string | null>;
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/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export type { MoveOutput } from './extensions/build/index.js';
2
- export type { MoveRequestInput, PiecePositionRecordString } from './state/board/types/input.js';
3
- export type { MoveDestinationInput } from './state/interaction/types/input.js';
2
+ export type { ColorInput, MoveRequestInput, PiecePositionRecordString, PositionInput } from './state/board/types/input.js';
3
+ export type { MovabilityInput, MoveDestinationInput } from './state/interaction/types/input.js';
4
4
  export { createBoard } from './wrapper/factory.js';
5
5
  export type { Chessboard, ChessboardExtensionInput, ChessboardInitOptions } from './wrapper/types.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mirasen/chessboard",
3
3
  "description": "Framework-agnostic TypeScript chessboard platform with real chess interaction built in.",
4
- "version": "1.1.1",
4
+ "version": "1.1.3",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "Mirasen",