react-chess-puzzle-kit 1.0.0 → 1.0.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/README.md +1 -1
- package/dist/features/analysis/analysisContext.d.ts +1 -1
- package/dist/features/board/LineBoardWithControls.d.ts +3 -1
- package/dist/features/board/PuzzleBoard.d.ts +6 -1
- package/dist/features/board/PuzzleBoardWithControls.d.ts +63 -6
- package/dist/features/board/PuzzlePlaySurface.d.ts +27 -3
- package/dist/features/board/puzzleBoardLayout.d.ts +17 -4
- package/dist/features/board/useStackPuzzleControlsBelow.d.ts +2 -0
- package/dist/features/position/Position.d.ts +18 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +432 -100
- package/dist/index.js +432 -98
- package/package.json +3 -3
- package/dist/features/analysis/AnalysisBoard.d.ts +0 -18
- package/dist/features/analysis/AnalysisBoardCore.d.ts +0 -28
- package/dist/features/analysis/AnalysisBoardLayout.d.ts +0 -12
- package/dist/features/analysis/AnalysisChessboardView.d.ts +0 -5
- package/dist/features/analysis/AnalysisPosition.d.ts +0 -53
- package/dist/features/analysis/AnalysisTrigger.d.ts +0 -6
- package/dist/features/analysis/DefaultAnalysisContainer.d.ts +0 -3
- package/dist/features/analysis/DefaultAnalysisSidebar.d.ts +0 -2
- package/dist/features/analysis/analysisBoardHighlightColors.d.ts +0 -12
- package/dist/features/analysis/analysisLayout.d.ts +0 -5
- package/dist/features/analysis/core/AnalysisBoardCore.d.ts +0 -28
- package/dist/features/analysis/core/AnalysisChessboardView.d.ts +0 -5
- package/dist/features/analysis/core/AnalysisErrorBoundary.d.ts +0 -14
- package/dist/features/analysis/core/AnalysisPosition.d.ts +0 -54
- package/dist/features/analysis/core/analysisContext.d.ts +0 -13
- package/dist/features/analysis/core/analysisLayout.d.ts +0 -5
- package/dist/features/analysis/core/analysisLayoutConfig.d.ts +0 -6
- package/dist/features/analysis/core/index.d.ts +0 -9
- package/dist/features/analysis/core/renderProps.d.ts +0 -39
- package/dist/features/analysis/core/useAnalysisBoardModel.d.ts +0 -36
- package/dist/features/analysis/core/usePuzzleAnalysis.d.ts +0 -10
- package/dist/features/analysis/defaults/AnalysisBoard.d.ts +0 -16
- package/dist/features/analysis/defaults/AnalysisBoardLayout.d.ts +0 -14
- package/dist/features/analysis/defaults/DefaultAnalysisContainer.d.ts +0 -4
- package/dist/features/analysis/defaults/DefaultAnalysisSidebar.d.ts +0 -3
- package/dist/features/analysis/defaults/analysisLayout.d.ts +0 -3
- package/dist/features/analysis/defaults/analysisModalStyles.d.ts +0 -7
- package/dist/features/analysis/defaults/analysisSidebarColors.d.ts +0 -37
- package/dist/features/analysis/defaults/analysisSidebarRowStyle.d.ts +0 -8
- package/dist/features/analysis/defaults/index.d.ts +0 -8
- package/dist/features/analysis/renderProps.d.ts +0 -39
- package/dist/features/analysis/useAnalysisBoardModel.d.ts +0 -33
- package/dist/features/board/HighlightChessboard.d.ts +0 -2
- package/dist/features/board/boardSquareHighlightColors.d.ts +0 -1
- package/dist/features/board/chessboardTheme.d.ts +0 -2
- package/dist/features/engine/EngineEvaluationPanel.d.ts +0 -8
- package/dist/features/engine/StockfishBrowserEngine.d.ts +0 -1
- package/dist/features/engine/formatEvaluation.d.ts +0 -1
- package/dist/features/engine/index.d.ts +0 -1
- package/dist/features/engine/isAnalyzableFen.d.ts +0 -1
- package/dist/features/engine/parseUciInfo.d.ts +0 -1
- package/dist/features/engine/stockfishUrls.d.ts +0 -1
- package/dist/features/engine/types.d.ts +0 -1
- package/dist/features/engine/useAnalysisEngine.d.ts +0 -1
- package/dist/features/theme/ThemeContext.d.ts +0 -26
- package/dist/features/theme/ThemeProvider.d.ts +0 -7
- package/dist/features/theme/squareHighlightColors.d.ts +0 -50
- package/dist/stories/AnalysisBoard.stories.d.ts +0 -9
- package/dist/stories/HighlightChessboard.stories.d.ts +0 -9
- package/dist/stories/analysisFixtures.d.ts +0 -4
- package/dist/stories/regressions/StockfishAnalysisRegressions.stories.d.ts +0 -7
- package/dist/stories/regressions/regressionAnalysisContext.d.ts +0 -5
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { EngineEvaluationPanel, type EngineEvaluationPanelProps, } from './EngineEvaluationPanel';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { isAnalyzableFen } from 'react-chess-core';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { parseUciInfoLine } from 'react-chess-core';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { resolveStockfishScriptUrl, resolveStockfishWasmUrl, resolveStockfishWorkerUrl, } from 'react-chess-core';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from 'react-chess-core';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useAnalysisEngine } from 'react-chess-core';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
interface ThemeContextType {
|
|
3
|
-
customDarkSquareStyle: {
|
|
4
|
-
backgroundColor: string;
|
|
5
|
-
};
|
|
6
|
-
customLightSquareStyle: {
|
|
7
|
-
backgroundColor: string;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export declare const ThemeContext: import("react").Context<ThemeContextType | undefined>;
|
|
11
|
-
export declare const useTheme: () => ThemeContextType;
|
|
12
|
-
export declare const getStylesForTheme: (theme: "light" | "dark") => {
|
|
13
|
-
customDarkSquareStyle: {
|
|
14
|
-
backgroundColor: string;
|
|
15
|
-
};
|
|
16
|
-
customLightSquareStyle: {
|
|
17
|
-
backgroundColor: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
export type AnalysisModalStyles = {
|
|
21
|
-
panel: CSSProperties;
|
|
22
|
-
title: CSSProperties;
|
|
23
|
-
closeButton: CSSProperties;
|
|
24
|
-
};
|
|
25
|
-
export declare const getAnalysisModalStyles: (theme: "light" | "dark") => AnalysisModalStyles;
|
|
26
|
-
export {};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Square overlay colors for puzzle + analysis boards.
|
|
3
|
-
* Tweak values here when iterating on highlights.
|
|
4
|
-
*/
|
|
5
|
-
export declare const squareHighlightColors: {
|
|
6
|
-
/** King in check */
|
|
7
|
-
readonly check: "#e53935";
|
|
8
|
-
/** Hint square (puzzle) */
|
|
9
|
-
readonly hint: "rgba(119, 177, 212, 0.75)";
|
|
10
|
-
/** Wrong guess square (puzzle) */
|
|
11
|
-
readonly incorrect: "rgba(255, 127, 127, 0.8)";
|
|
12
|
-
/** Last move from/to (analysis replay) */
|
|
13
|
-
readonly lastMove: {
|
|
14
|
-
readonly light: "rgba(253, 216, 53, 0.55)";
|
|
15
|
-
readonly dark: "rgba(144, 202, 249, 0.5)";
|
|
16
|
-
};
|
|
17
|
-
/** DefaultAnalysisSidebar selected move chip */
|
|
18
|
-
readonly sidebarActiveMove: {
|
|
19
|
-
readonly light: "rgba(119, 177, 212, 1)";
|
|
20
|
-
readonly dark: "rgba(90, 159, 190, 1)";
|
|
21
|
-
};
|
|
22
|
-
readonly sidebarMove: {
|
|
23
|
-
readonly light: "rgba(240, 240, 240, 1)";
|
|
24
|
-
readonly dark: "rgba(45, 45, 45, 1)";
|
|
25
|
-
};
|
|
26
|
-
/** Analysis sidebar: Start row */
|
|
27
|
-
readonly sidebarStart: {
|
|
28
|
-
readonly light: "#e8e8e8";
|
|
29
|
-
readonly dark: "#262626";
|
|
30
|
-
};
|
|
31
|
-
/** Alternating main-line move rows (index 0 = darker, 1 = lighter). */
|
|
32
|
-
readonly sidebarMainStripe: readonly [{
|
|
33
|
-
readonly light: "#c9c9c9";
|
|
34
|
-
readonly dark: "#1c1c1c";
|
|
35
|
-
}, {
|
|
36
|
-
readonly light: "#f2f2f2";
|
|
37
|
-
readonly dark: "#383838";
|
|
38
|
-
}];
|
|
39
|
-
/** Alternating user-variation rows (index 0 = slightly tinted, 1 = lighter). */
|
|
40
|
-
readonly sidebarVariationStripe: readonly [{
|
|
41
|
-
readonly light: "#eef5fb";
|
|
42
|
-
readonly dark: "#2c3540";
|
|
43
|
-
}, {
|
|
44
|
-
readonly light: "#f7fbfe";
|
|
45
|
-
readonly dark: "#343f4c";
|
|
46
|
-
}];
|
|
47
|
-
};
|
|
48
|
-
export declare const getLastMoveSquareStyles: (from: string, to: string, theme: "light" | "dark") => Record<string, {
|
|
49
|
-
backgroundColor: string;
|
|
50
|
-
}>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { AnalysisBoard } from '../features/analysis/defaults/AnalysisBoard';
|
|
3
|
-
declare const meta: Meta<typeof AnalysisBoard>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof AnalysisBoard>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const LightTheme: Story;
|
|
8
|
-
/** Requires `npm run copy:stockfish` so WASM is served from `public/stockfish/`. */
|
|
9
|
-
export declare const WithStockfishEngine: Story;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { HighlightChessboard } from 'react-chess-core';
|
|
3
|
-
declare const meta: Meta<typeof HighlightChessboard>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof HighlightChessboard>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const KingInCheck: Story;
|
|
8
|
-
export declare const WithHint: Story;
|
|
9
|
-
export declare const IncorrectMove: Story;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const samplePuzzleFen = "r6k/pp2r2p/4Rp1Q/3p4/8/1N1P2R1/PqP2bPP/7K b - - 0 24";
|
|
2
|
-
export declare const samplePuzzleMoves: string[];
|
|
3
|
-
/** Completed puzzle snapshot for analysis stories. */
|
|
4
|
-
export declare const createSampleAnalysisContext: () => import("../features/analysis/core/analysisContext").PuzzleAnalysisContext;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { AnalysisBoard } from '../../features/analysis/defaults/AnalysisBoard';
|
|
3
|
-
declare const meta: Meta<typeof AnalysisBoard>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof AnalysisBoard>;
|
|
6
|
-
/** Puzzle 66abad1bcb8d6163fd6e172a — rapid clicks through every main-line move. */
|
|
7
|
-
export declare const Move3Ke6DuringAnalysis: Story;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { PuzzleRegression } from './fixtures';
|
|
2
|
-
/** Main-line sidebar labels (`Start`, `1. e4`, …) for a regression puzzle. */
|
|
3
|
-
export declare const getRegressionMainLineLabels: (regression: PuzzleRegression) => string[];
|
|
4
|
-
/** Completed puzzle snapshot for analysis regression stories. */
|
|
5
|
-
export declare const createRegressionAnalysisContext: (regression: PuzzleRegression) => import("../../features/analysis/core/analysisContext").PuzzleAnalysisContext;
|