react-chessboard-ui 1.4.4 → 1.4.5

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/dist/index.js CHANGED
@@ -2431,7 +2431,8 @@ var useChessBoardInteractive = function useChessBoardInteractive(props) {
2431
2431
  return {};
2432
2432
  }
2433
2433
  var colorFEN = currentColor === 'white' ? 'black' : 'white';
2434
- var FEN = stateToFEN(updatedCells, colorFEN);
2434
+ var reversedUpdatedCells = boardReversed ? JSChessEngine.reverseChessBoard(updatedCells) : updatedCells;
2435
+ var FEN = stateToFEN(reversedUpdatedCells, colorFEN);
2435
2436
  var moveData = {
2436
2437
  figure: figure,
2437
2438
  from: from,
@@ -2486,7 +2487,8 @@ var useChessBoardInteractive = function useChessBoardInteractive(props) {
2486
2487
  return {};
2487
2488
  }
2488
2489
  var colorFEN = currentColor === 'white' ? 'black' : 'white';
2489
- var FEN = stateToFEN(updatedCells, colorFEN);
2490
+ var reversedUpdatedCells = boardReversed ? JSChessEngine.reverseChessBoard(updatedCells) : updatedCells;
2491
+ var FEN = stateToFEN(reversedUpdatedCells, colorFEN);
2490
2492
  var moveData = {
2491
2493
  figure: figure,
2492
2494
  from: from,