react-chessboard-ui 1.4.7 → 1.4.8

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.
@@ -1,5 +1,6 @@
1
1
  import { ChessBoardConfig } from "./models";
2
2
  export declare const DEFAULT_CELL_SIZE = 92;
3
+ export declare const DEFAULT_FIGURE_SIZE_PERCENT = 80;
3
4
  export declare const FACTOR_FOR_SIZE_CIRCLE_MARK = 4.6;
4
5
  export declare const DEFAULT_CIRCLE_MARK_COLOR = "#3697ce";
5
6
  export declare const DEFAULT_WHITE_CELL_COLOR = "#fafafc";
package/dist/index.js CHANGED
@@ -1877,6 +1877,7 @@ var CHESS_PIECES_MAP = {
1877
1877
  };
1878
1878
 
1879
1879
  var DEFAULT_CELL_SIZE = 92;
1880
+ var DEFAULT_FIGURE_SIZE_PERCENT = 80;
1880
1881
  var FACTOR_FOR_SIZE_CIRCLE_MARK = 4.6;
1881
1882
  var DEFAULT_CIRCLE_MARK_COLOR = '#3697ce';
1882
1883
  var DEFAULT_WHITE_CELL_COLOR = '#fafafc';
@@ -1889,6 +1890,7 @@ var DEFAULT_CHECKED_CELL_COLOR = '#e95b5c';
1889
1890
  var DEFAULT_PIECES_MAP = CHESS_PIECES_MAP;
1890
1891
  var DEFAULT_CHESSBORD_CONFIG = {
1891
1892
  cellSize: DEFAULT_CELL_SIZE,
1893
+ figureSizePercent: DEFAULT_FIGURE_SIZE_PERCENT,
1892
1894
  circleMarkColor: DEFAULT_CIRCLE_MARK_COLOR,
1893
1895
  whiteCellColor: DEFAULT_WHITE_CELL_COLOR,
1894
1896
  blackCellColor: DEFAULT_BLACK_CELL_COLOR,
@@ -2194,7 +2196,7 @@ var ChessBoardFiguresLayout = function ChessBoardFiguresLayout(props) {
2194
2196
  width: boardConfig.cellSize,
2195
2197
  height: boardConfig.cellSize
2196
2198
  }
2197
- }, boardConfig.piecesMap[getFigureCSS(figure)] && boardConfig.piecesMap[getFigureCSS(figure)]('80%'));
2199
+ }, boardConfig.piecesMap[getFigureCSS(figure)] && boardConfig.piecesMap[getFigureCSS(figure)](boardConfig.figureSizePercent + "%"));
2198
2200
  }));
2199
2201
  };
2200
2202
 
@@ -2814,7 +2816,7 @@ var HoldedFigure = function HoldedFigure(props) {
2814
2816
  width: boardConfig.cellSize,
2815
2817
  height: boardConfig.cellSize
2816
2818
  }
2817
- }, " ", boardConfig.piecesMap[getFigureCSS(holdedFigure)]('80%'));
2819
+ }, " ", boardConfig.piecesMap[getFigureCSS(holdedFigure)](boardConfig.figureSizePercent + "%"));
2818
2820
  };
2819
2821
 
2820
2822
  var BASE_BOARD_SIZE$2 = 8;
@@ -2856,7 +2858,7 @@ var ChessBoardInteractiveLayout = function ChessBoardInteractiveLayout(props) {
2856
2858
  width: boardConfig.cellSize,
2857
2859
  height: boardConfig.cellSize
2858
2860
  }
2859
- }, boardConfig.piecesMap[getFigureCSS(holdedFigure)]('80%')), checkIsPossibleMove(possibleMoves, [i, j]) && React__default.createElement("div", {
2861
+ }, boardConfig.piecesMap[getFigureCSS(holdedFigure)](boardConfig.figureSizePercent + "%")), checkIsPossibleMove(possibleMoves, [i, j]) && React__default.createElement("div", {
2860
2862
  className: styles.possibleMoveMark,
2861
2863
  style: {
2862
2864
  width: boardConfig.cellSize / FACTOR_FOR_SIZE_CIRCLE_MARK,
@@ -2939,7 +2941,7 @@ var FigurePicker = function FigurePicker(props) {
2939
2941
  onClick: function onClick() {
2940
2942
  return handleChange(figure);
2941
2943
  }
2942
- }, boardConfig.piecesMap[getFigureCSS(figure)]('80%'));
2944
+ }, boardConfig.piecesMap[getFigureCSS(figure)](boardConfig.figureSizePercent + "%"));
2943
2945
  }));
2944
2946
  };
2945
2947