react-chess-explorer 0.0.2 → 0.0.3
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/LICENSE +21 -21
- package/README.md +63 -63
- package/dist/features/explorer/components/DefaultBoardNav.d.ts +2 -7
- package/dist/features/explorer/components/PositionGamesPanel.d.ts +2 -9
- package/dist/features/explorer/core/PositionReferenceExplorerCore.d.ts +1 -1
- package/dist/features/explorer/core/renderProps.d.ts +22 -15
- package/dist/features/explorer/defaults/DefaultReferencePanel.d.ts +2 -1
- package/dist/features/explorer/defaults/DefaultVariationsStrip.d.ts +1 -1
- package/dist/features/explorer/explorerSessionCache.d.ts +15 -0
- package/dist/features/explorer/hooks/useExplorerPrefetch.d.ts +11 -0
- package/dist/features/explorer/hooks/usePositionHistory.d.ts +12 -1
- package/dist/features/explorer/hooks/usePositionReferenceData.d.ts +11 -14
- package/dist/features/explorer/hooks/useVariationLines.d.ts +1 -5
- package/dist/features/explorer/index.d.ts +4 -3
- package/dist/features/explorer/mocks.d.ts +2 -2
- package/dist/features/explorer/positionUtils.d.ts +2 -0
- package/dist/features/explorer/seedExplorerStartSession.d.ts +3 -0
- package/dist/features/explorer/types.d.ts +13 -10
- package/dist/features/explorer/variationLines.d.ts +0 -1
- package/dist/index.esm.js +666 -292
- package/dist/index.js +676 -290
- package/dist/stories/fixtures/nc6MockApi.d.ts +2 -2
- package/dist/stories/fixtures/nc6SampleGames.d.ts +0 -3
- package/package.json +59 -59
- package/dist/features/explorer/components/EloRangeFilter.d.ts +0 -9
- package/dist/features/explorer/components/LineHeader.d.ts +0 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { FetchPositionGamesParams, FetchPositionVariationsParams, PositionGamesApiDto, PositionVariationsApiDto } from "../../features/explorer/types";
|
|
1
|
+
import type { FetchPositionGamesParams, FetchPositionParams, FetchPositionVariationsParams, PositionGamesApiDto, PositionVariationsApiDto } from "../../features/explorer/types";
|
|
2
2
|
import { nc6SampleGames, NC6_TABIYA_FEN } from "./nc6SampleGames";
|
|
3
|
-
export declare function nc6FetchPosition(
|
|
3
|
+
export declare function nc6FetchPosition(params: FetchPositionParams): Promise<import("../..").PositionApiDto | null>;
|
|
4
4
|
export declare function nc6FetchPositionGames(params: FetchPositionGamesParams): Promise<PositionGamesApiDto>;
|
|
5
5
|
export declare function nc6FetchPositionVariations(params: FetchPositionVariationsParams): Promise<PositionVariationsApiDto | null>;
|
|
6
6
|
export declare function nc6FetchGame(gameId: string): Promise<(import("../..").ExplorerGameReplayApiDto & {
|
|
@@ -29,10 +29,7 @@ export declare const nc6SampleGames: BuiltGame[];
|
|
|
29
29
|
export declare const nc6PositionBuckets: Map<string, PositionBucket>;
|
|
30
30
|
export declare function nc6PositionForFen(fen: string): PositionApiDto | null;
|
|
31
31
|
export declare function nc6GamesForPosition(fen: string, options: {
|
|
32
|
-
minElo: number;
|
|
33
|
-
maxElo: number;
|
|
34
32
|
uci?: string;
|
|
35
|
-
topOnly: boolean;
|
|
36
33
|
sources?: ("lichess" | "twic")[];
|
|
37
34
|
}): PositionGameRowApiDto[];
|
|
38
35
|
export declare function nc6ScorePercentForMove(move: PositionMoveApiDto): number | null;
|
package/package.json
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-chess-explorer",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "React components for browsing and replaying chess games (depends on react-chess-core only)",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"author": "Robert Blackwell",
|
|
7
|
-
"main": "dist/index.js",
|
|
8
|
-
"module": "dist/index.esm.js",
|
|
9
|
-
"types": "dist/index.d.ts",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "git+https://github.com/reblackwell3/react-chess-explorer.git"
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"dist"
|
|
16
|
-
],
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build": "rollup -c",
|
|
19
|
-
"prepublishOnly": "npm run build",
|
|
20
|
-
"storybook": "storybook dev -p 6008",
|
|
21
|
-
"build-storybook": "storybook build"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"rollup": "^4.22.2",
|
|
25
|
-
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
26
|
-
"typescript": "^5.6.2"
|
|
27
|
-
},
|
|
28
|
-
"peerDependencies": {
|
|
29
|
-
"chess.js": "^1.0.0-beta.8",
|
|
30
|
-
"react": "^18.3.1",
|
|
31
|
-
"react-chess-core": "^0.1.
|
|
32
|
-
"react-chessboard": "^4.7.1"
|
|
33
|
-
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"@chromatic-com/storybook": "^1.9.0",
|
|
36
|
-
"@rollup/plugin-commonjs": "^26.0.1",
|
|
37
|
-
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
38
|
-
"@rollup/plugin-typescript": "^12.3.0",
|
|
39
|
-
"@storybook/addon-essentials": "^8.2.9",
|
|
40
|
-
"@storybook/addon-interactions": "^8.2.9",
|
|
41
|
-
"@storybook/addon-links": "^8.2.9",
|
|
42
|
-
"@storybook/addon-onboarding": "^8.2.9",
|
|
43
|
-
"@storybook/blocks": "^8.2.9",
|
|
44
|
-
"@storybook/preset-typescript": "^3.0.0",
|
|
45
|
-
"@storybook/react": "^8.2.9",
|
|
46
|
-
"@storybook/react-vite": "^8.2.9",
|
|
47
|
-
"@storybook/test": "^8.2.9",
|
|
48
|
-
"@types/react": "^18.3.12",
|
|
49
|
-
"@types/react-dom": "^18.3.1",
|
|
50
|
-
"@vitejs/plugin-react": "^4.3.1",
|
|
51
|
-
"chess.js": "^1.0.0-beta.8",
|
|
52
|
-
"react": "^18.3.1",
|
|
53
|
-
"react-chess-core": "^0.1.
|
|
54
|
-
"react-chessboard": "^4.7.1",
|
|
55
|
-
"react-dom": "^18.3.1",
|
|
56
|
-
"storybook": "^8.2.9",
|
|
57
|
-
"tslib": "^2.8.1"
|
|
58
|
-
}
|
|
59
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "react-chess-explorer",
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "React components for browsing and replaying chess games (depends on react-chess-core only)",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Robert Blackwell",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"module": "dist/index.esm.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/reblackwell3/react-chess-explorer.git"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "rollup -c",
|
|
19
|
+
"prepublishOnly": "npm run build",
|
|
20
|
+
"storybook": "storybook dev -p 6008",
|
|
21
|
+
"build-storybook": "storybook build"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"rollup": "^4.22.2",
|
|
25
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
26
|
+
"typescript": "^5.6.2"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"chess.js": "^1.0.0-beta.8",
|
|
30
|
+
"react": "^18.3.1",
|
|
31
|
+
"react-chess-core": "^0.1.1",
|
|
32
|
+
"react-chessboard": "^4.7.1"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@chromatic-com/storybook": "^1.9.0",
|
|
36
|
+
"@rollup/plugin-commonjs": "^26.0.1",
|
|
37
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
38
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
39
|
+
"@storybook/addon-essentials": "^8.2.9",
|
|
40
|
+
"@storybook/addon-interactions": "^8.2.9",
|
|
41
|
+
"@storybook/addon-links": "^8.2.9",
|
|
42
|
+
"@storybook/addon-onboarding": "^8.2.9",
|
|
43
|
+
"@storybook/blocks": "^8.2.9",
|
|
44
|
+
"@storybook/preset-typescript": "^3.0.0",
|
|
45
|
+
"@storybook/react": "^8.2.9",
|
|
46
|
+
"@storybook/react-vite": "^8.2.9",
|
|
47
|
+
"@storybook/test": "^8.2.9",
|
|
48
|
+
"@types/react": "^18.3.12",
|
|
49
|
+
"@types/react-dom": "^18.3.1",
|
|
50
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
51
|
+
"chess.js": "^1.0.0-beta.8",
|
|
52
|
+
"react": "^18.3.1",
|
|
53
|
+
"react-chess-core": "^0.1.1",
|
|
54
|
+
"react-chessboard": "^4.7.1",
|
|
55
|
+
"react-dom": "^18.3.1",
|
|
56
|
+
"storybook": "^8.2.9",
|
|
57
|
+
"tslib": "^2.8.1"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export type EloRangeFilterProps = {
|
|
2
|
-
minElo: number;
|
|
3
|
-
maxElo: number;
|
|
4
|
-
defaultMinElo: number;
|
|
5
|
-
defaultMaxElo: number;
|
|
6
|
-
onMinEloChange: (value: number) => void;
|
|
7
|
-
onMaxEloChange: (value: number) => void;
|
|
8
|
-
};
|
|
9
|
-
export declare const EloRangeFilter: ({ minElo, maxElo, defaultMinElo, defaultMaxElo, onMinEloChange, onMaxEloChange, }: EloRangeFilterProps) => import("react").JSX.Element;
|