react-chess-core 0.1.4 → 0.1.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.esm.js +2 -7
- package/dist/index.js +2 -7
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3225,7 +3225,7 @@ class AnalysisPosition {
|
|
|
3225
3225
|
}
|
|
3226
3226
|
|
|
3227
3227
|
const useAnalysisBoardModel = ({ analysisContext, onClose, theme, boardWidth, engine, }) => {
|
|
3228
|
-
var _a
|
|
3228
|
+
var _a;
|
|
3229
3229
|
const skipBackdropCloseRef = useRef(true);
|
|
3230
3230
|
const analysisPosition = useMemo(() => new AnalysisPosition(analysisContext), [analysisContext]);
|
|
3231
3231
|
const [navRevision, setNavRevision] = useState(0);
|
|
@@ -3241,12 +3241,7 @@ const useAnalysisBoardModel = ({ analysisContext, onClose, theme, boardWidth, en
|
|
|
3241
3241
|
}, [analysisContext, analysisPosition]);
|
|
3242
3242
|
const fen = analysisPosition.fen();
|
|
3243
3243
|
const engineEnabled = (_a = engine === null || engine === void 0 ? void 0 : engine.enabled) !== null && _a !== void 0 ? _a : true;
|
|
3244
|
-
const engineEvaluation = useAnalysisEngine(fen, {
|
|
3245
|
-
enabled: engineEnabled,
|
|
3246
|
-
depth: (_b = engine === null || engine === void 0 ? void 0 : engine.depth) !== null && _b !== void 0 ? _b : 16,
|
|
3247
|
-
multiPv: (_c = engine === null || engine === void 0 ? void 0 : engine.multiPv) !== null && _c !== void 0 ? _c : 2,
|
|
3248
|
-
scriptUrl: (_d = engine === null || engine === void 0 ? void 0 : engine.scriptUrl) !== null && _d !== void 0 ? _d : DEFAULT_STOCKFISH_SCRIPT_URL,
|
|
3249
|
-
});
|
|
3244
|
+
const engineEvaluation = useAnalysisEngine(fen, Object.assign(Object.assign({ depth: 16, multiPv: 2, scriptUrl: DEFAULT_STOCKFISH_SCRIPT_URL }, engine), { enabled: engineEnabled }));
|
|
3250
3245
|
return {
|
|
3251
3246
|
theme,
|
|
3252
3247
|
boardWidth,
|
package/dist/index.js
CHANGED
|
@@ -3227,7 +3227,7 @@ class AnalysisPosition {
|
|
|
3227
3227
|
}
|
|
3228
3228
|
|
|
3229
3229
|
const useAnalysisBoardModel = ({ analysisContext, onClose, theme, boardWidth, engine, }) => {
|
|
3230
|
-
var _a
|
|
3230
|
+
var _a;
|
|
3231
3231
|
const skipBackdropCloseRef = react.useRef(true);
|
|
3232
3232
|
const analysisPosition = react.useMemo(() => new AnalysisPosition(analysisContext), [analysisContext]);
|
|
3233
3233
|
const [navRevision, setNavRevision] = react.useState(0);
|
|
@@ -3243,12 +3243,7 @@ const useAnalysisBoardModel = ({ analysisContext, onClose, theme, boardWidth, en
|
|
|
3243
3243
|
}, [analysisContext, analysisPosition]);
|
|
3244
3244
|
const fen = analysisPosition.fen();
|
|
3245
3245
|
const engineEnabled = (_a = engine === null || engine === void 0 ? void 0 : engine.enabled) !== null && _a !== void 0 ? _a : true;
|
|
3246
|
-
const engineEvaluation = useAnalysisEngine(fen, {
|
|
3247
|
-
enabled: engineEnabled,
|
|
3248
|
-
depth: (_b = engine === null || engine === void 0 ? void 0 : engine.depth) !== null && _b !== void 0 ? _b : 16,
|
|
3249
|
-
multiPv: (_c = engine === null || engine === void 0 ? void 0 : engine.multiPv) !== null && _c !== void 0 ? _c : 2,
|
|
3250
|
-
scriptUrl: (_d = engine === null || engine === void 0 ? void 0 : engine.scriptUrl) !== null && _d !== void 0 ? _d : DEFAULT_STOCKFISH_SCRIPT_URL,
|
|
3251
|
-
});
|
|
3246
|
+
const engineEvaluation = useAnalysisEngine(fen, Object.assign(Object.assign({ depth: 16, multiPv: 2, scriptUrl: DEFAULT_STOCKFISH_SCRIPT_URL }, engine), { enabled: engineEnabled }));
|
|
3252
3247
|
return {
|
|
3253
3248
|
theme,
|
|
3254
3249
|
boardWidth,
|