react-chessboard-ui 1.7.1 → 1.7.2
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.
|
@@ -13,5 +13,6 @@ export declare const DEFAULT_MARKED_CELL_COLOR = "#3697ce";
|
|
|
13
13
|
export declare const DEFAULT_CHECKED_CELL_COLOR = "#e95b5c";
|
|
14
14
|
export declare const DEFAULT_PIECES_MAP: import("./models").ChessPiecesMap;
|
|
15
15
|
export declare const DEFAULT_CSS_HIDE_PIECES_EFFECT: string;
|
|
16
|
+
export declare const DEFAULT_SHOW_MOVES_TRAIL = true;
|
|
16
17
|
export declare const DEFAULT_HIDE_PIECES_HANDLER: (figure: Figure) => void;
|
|
17
18
|
export declare const DEFAULT_CHESSBORD_CONFIG: ChessBoardConfig;
|
package/dist/index.js
CHANGED
|
@@ -1890,6 +1890,7 @@ var DEFAULT_MARKED_CELL_COLOR = '#3697ce';
|
|
|
1890
1890
|
var DEFAULT_CHECKED_CELL_COLOR = '#e95b5c';
|
|
1891
1891
|
var DEFAULT_PIECES_MAP = CHESS_PIECES_MAP;
|
|
1892
1892
|
var DEFAULT_CSS_HIDE_PIECES_EFFECT = styles.hiddenFigureEffect;
|
|
1893
|
+
var DEFAULT_SHOW_MOVES_TRAIL = true;
|
|
1893
1894
|
var DEFAULT_HIDE_PIECES_HANDLER = function DEFAULT_HIDE_PIECES_HANDLER(figure) {
|
|
1894
1895
|
figure.color === 'white' ? figure.position = [8, figure.position[1]] : figure.position = [-1, figure.position[1]];
|
|
1895
1896
|
};
|
|
@@ -1906,6 +1907,7 @@ var DEFAULT_CHESSBORD_CONFIG = {
|
|
|
1906
1907
|
checkedCellColor: DEFAULT_CHECKED_CELL_COLOR,
|
|
1907
1908
|
piecesMap: DEFAULT_PIECES_MAP,
|
|
1908
1909
|
cssHidePieceEffect: DEFAULT_CSS_HIDE_PIECES_EFFECT,
|
|
1910
|
+
showMovesTrail: DEFAULT_SHOW_MOVES_TRAIL,
|
|
1909
1911
|
onHidePieces: DEFAULT_HIDE_PIECES_HANDLER
|
|
1910
1912
|
};
|
|
1911
1913
|
|
|
@@ -2982,9 +2984,7 @@ var ChessBoard = function ChessBoard(props) {
|
|
|
2982
2984
|
reversed = props.reversed,
|
|
2983
2985
|
config = props.config,
|
|
2984
2986
|
playerColor = props.playerColor,
|
|
2985
|
-
viewOnly = props.viewOnly
|
|
2986
|
-
_props$showMovesTrail = props.showMovesTrail,
|
|
2987
|
-
showMovesTrail = _props$showMovesTrail === void 0 ? true : _props$showMovesTrail;
|
|
2987
|
+
viewOnly = props.viewOnly;
|
|
2988
2988
|
var _useChessBoardInterac = useChessBoardInteractive({
|
|
2989
2989
|
onChange: onChange,
|
|
2990
2990
|
onEndGame: onEndGame,
|
|
@@ -3051,7 +3051,7 @@ var ChessBoard = function ChessBoard(props) {
|
|
|
3051
3051
|
className: styles.chessBoard
|
|
3052
3052
|
}, React__default.createElement(ChessBoardCellsLayout, {
|
|
3053
3053
|
boardConfig: boardConfig,
|
|
3054
|
-
movesTrail: showMovesTrail && movesTrail
|
|
3054
|
+
movesTrail: boardConfig.showMovesTrail && movesTrail
|
|
3055
3055
|
}), React__default.createElement(ChessBoardFiguresLayout, {
|
|
3056
3056
|
initialState: initialState,
|
|
3057
3057
|
change: newMove,
|