react-chess-puzzle-kit 1.0.6 → 1.0.7

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.esm.js CHANGED
@@ -1190,10 +1190,12 @@ const PuzzleBoardWithControls = ({ theme, boardTheme, apiProxy, renderControls =
1190
1190
  window.clearTimeout(timer);
1191
1191
  };
1192
1192
  }, [completionCheckVisible]);
1193
+ const analysis = usePuzzleAnalysis(position, resultStatus, puzzleNum);
1193
1194
  const shouldAutoAdvance = autoAdvanceOnComplete &&
1194
1195
  resultStatus === 'complete' &&
1195
1196
  !(hasIncorrectAttempt && !autoAdvanceOnCompleteAfterIncorrect) &&
1196
- (!showCompletionRecap || completionRecapDone);
1197
+ (!showCompletionRecap || completionRecapDone) &&
1198
+ !analysis.isOpen;
1197
1199
  const autoAdvance = usePuzzleAutoAdvanceCountdown(shouldAutoAdvance, autoAdvanceOnCompleteDelayMs, handleNextPuzzle);
1198
1200
  const controlState = {
1199
1201
  canShowHint: position !== null &&
@@ -1203,7 +1205,6 @@ const PuzzleBoardWithControls = ({ theme, boardTheme, apiProxy, renderControls =
1203
1205
  canShowSolution: position !== null &&
1204
1206
  (position.isSolutionRevealed() || !position.isFinished()),
1205
1207
  };
1206
- const analysis = usePuzzleAnalysis(position, resultStatus, puzzleNum);
1207
1208
  const analysisSnapshot = analysis.isOpen && analysis.snapshot ? analysis.snapshot : null;
1208
1209
  const resolvedAnalysisBoardWidth = analysisBoardWidth !== null && analysisBoardWidth !== void 0 ? analysisBoardWidth : analysisLayout.boardWidth;
1209
1210
  const useHostAnalysisUi = Boolean(renderAnalysisSidebar &&
package/dist/index.js CHANGED
@@ -1191,10 +1191,12 @@ const PuzzleBoardWithControls = ({ theme, boardTheme, apiProxy, renderControls =
1191
1191
  window.clearTimeout(timer);
1192
1192
  };
1193
1193
  }, [completionCheckVisible]);
1194
+ const analysis = usePuzzleAnalysis(position, resultStatus, puzzleNum);
1194
1195
  const shouldAutoAdvance = autoAdvanceOnComplete &&
1195
1196
  resultStatus === 'complete' &&
1196
1197
  !(hasIncorrectAttempt && !autoAdvanceOnCompleteAfterIncorrect) &&
1197
- (!showCompletionRecap || completionRecapDone);
1198
+ (!showCompletionRecap || completionRecapDone) &&
1199
+ !analysis.isOpen;
1198
1200
  const autoAdvance = usePuzzleAutoAdvanceCountdown(shouldAutoAdvance, autoAdvanceOnCompleteDelayMs, handleNextPuzzle);
1199
1201
  const controlState = {
1200
1202
  canShowHint: position !== null &&
@@ -1204,7 +1206,6 @@ const PuzzleBoardWithControls = ({ theme, boardTheme, apiProxy, renderControls =
1204
1206
  canShowSolution: position !== null &&
1205
1207
  (position.isSolutionRevealed() || !position.isFinished()),
1206
1208
  };
1207
- const analysis = usePuzzleAnalysis(position, resultStatus, puzzleNum);
1208
1209
  const analysisSnapshot = analysis.isOpen && analysis.snapshot ? analysis.snapshot : null;
1209
1210
  const resolvedAnalysisBoardWidth = analysisBoardWidth !== null && analysisBoardWidth !== void 0 ? analysisBoardWidth : analysisLayout.boardWidth;
1210
1211
  const useHostAnalysisUi = Boolean(renderAnalysisSidebar &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-chess-puzzle-kit",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "React chess puzzle kit: play, controls, analysis, and browser Stockfish for endchess.training and other apps",
5
5
  "license": "MIT",
6
6
  "author": "Robert Blackwell",
@@ -68,11 +68,13 @@
68
68
  "@storybook/react": "^8.2.9",
69
69
  "@storybook/react-vite": "^8.2.9",
70
70
  "@storybook/test": "^8.2.9",
71
+ "@testing-library/react": "^16.0.1",
71
72
  "@types/jest": "^29.5.12",
72
73
  "@types/react": "^18.3.12",
73
74
  "@types/react-dom": "^18.3.1",
74
75
  "chess.js": "^1.0.0-beta.8",
75
76
  "jest": "^29.7.0",
77
+ "jest-environment-jsdom": "^29.7.0",
76
78
  "react": "^18.3.1",
77
79
  "react-chess-core": "^0.1.8",
78
80
  "react-chessboard": "^4.7.1",