next-chessground 1.1.0 → 1.1.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.
package/dist/index.es.js CHANGED
@@ -5601,7 +5601,7 @@ const cgProps = props => {
5601
5601
  }
5602
5602
 
5603
5603
  // pass props directly to Chessground
5604
- const passProps = ['shapes', 'onSelect', 'drawable'];
5604
+ const passProps = ['shapes', 'onSelect', 'drawable', 'lastMove'];
5605
5605
  for (const prop of passProps) {
5606
5606
  cgProps[prop] = props[prop];
5607
5607
  }
@@ -5757,7 +5757,9 @@ const useOrientation = props => {
5757
5757
  });
5758
5758
  };
5759
5759
  useEffect(() => {
5760
- setOrientation(sideToMove(props.fen));
5760
+ if (props.reset) {
5761
+ setOrientation(sideToMove(props.fen));
5762
+ }
5761
5763
  }, [props.reset]);
5762
5764
  return [orientation, flip];
5763
5765
  };
package/dist/index.js CHANGED
@@ -5610,7 +5610,7 @@ const cgProps = props => {
5610
5610
  }
5611
5611
 
5612
5612
  // pass props directly to Chessground
5613
- const passProps = ['shapes', 'onSelect', 'drawable'];
5613
+ const passProps = ['shapes', 'onSelect', 'drawable', 'lastMove'];
5614
5614
  for (const prop of passProps) {
5615
5615
  cgProps[prop] = props[prop];
5616
5616
  }
@@ -5766,7 +5766,9 @@ const useOrientation = props => {
5766
5766
  });
5767
5767
  };
5768
5768
  React.useEffect(() => {
5769
- setOrientation(sideToMove(props.fen));
5769
+ if (props.reset) {
5770
+ setOrientation(sideToMove(props.fen));
5771
+ }
5770
5772
  }, [props.reset]);
5771
5773
  return [orientation, flip];
5772
5774
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-chessground",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "React and Next wrapper for Chessground with chessboard and pieces out of the box",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",