1198 | );
1199 | };
1200 |
--------------------------------------------------------------------------------
/stories/StockfishIntegration.mdx:
--------------------------------------------------------------------------------
1 | import { Canvas, Meta } from "@storybook/blocks";
2 |
3 | import * as StockfishIntegrationStories from './StockfishIntegration.stories';
4 |
5 |
6 |
7 | # `Stockfish` Integration with `react-chessboard`
8 |
9 | > ℹ️ *You can use "Stockfish" with "react-chessboard" to craft chess games against bots, aid players in learning, analyze their matches, or assist in identifying optimal moves.
10 | > Stockfish is a powerful chess engine, considered one of the best in the world. Using a search algorithm and evaluation functions, it plays chess at a high level, and has 3000+ FIDE ELO rating.
11 | > Currently there are two stockfish engine implementations which you can use directly on your browser. [stockfish.wasm](https://github.com/lichess-org/stockfish.wasm) and [stockfish.js](http://github.com/nmrugg/stockfish.js).
12 | > They both are open source and free to use in any project. Although their strength of playing chess are the same, the "stockfish.wasm" is lighter and offers better calculating performance, but it is not compatible with old browsers.*
13 |
14 |
15 |
16 | #### For playing against stockfish using "react-chessboard" you have to do these steps below:
17 |
18 | 1. ###### Download "stockfish.js" file:
19 |
20 | You can download the "stockfish.js" file directly from [react-chessboard GitHub repository](https://github.com/Clariity/react-chessboard/blob/main/stories/stockfish/stockfish.js). For the latest updates and more info visit https://github.com/nmrugg/stockfish.js
21 |
22 | ***
23 |
24 | 2. ###### Place downloaded "stockfish.js" file into your React app's "public" folder:
25 |
26 | Since "stockfish.js" requires substantial calculation resources, it should be run as a [Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers). Placing it in the "public" folder allows it to be used from any point in your React app.
27 |
28 | ***
29 |
30 | 3. ###### Run "stockfish.js" as a web worker and it is ready to handle your UCI commands
31 |
32 | Below is a simple usage example of 'stockfish.js':
33 |
34 | ```js
35 | useEffect(() => {
36 | const stockfish = new Worker("./stockfish.js");
37 | const DEPTH = 8; // number of halfmoves the engine looks ahead
38 | const FEN_POSITION =
39 | "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
40 |
41 | stockfish.postMessage("uci");
42 | stockfish.postMessage(`position fen ${FEN_POSITION}`);
43 | stockfish.postMessage(`go depth ${DEPTH}`);
44 |
45 | stockfish.onmessage = (e) => {
46 | console.log(e.data); // in the console output you will see `bestmove e2e4` message
47 | };
48 | }, []);
49 | ```
50 |
51 | ***
52 |
53 | 4. ##### Create `Engine` class with stockfish commands you need for easy use
54 |
55 | The more advanced example of `Engine` class you can find [in our GitHub](https://github.com/Clariity/react-chessboard/blob/main/stories/stockfish/engine.ts)
56 |
57 | ```js
58 | class Engine {
59 | constructor() {
60 | this.stockfish = new Worker("./stockfish.js");
61 | this.onMessage = (callback) => {
62 | this.stockfish.addEventListener("message", (e) => {
63 | const bestMove = e.data?.match(/bestmove\s+(\S+)/)?.[1];
64 |
65 | callback({ bestMove });
66 | });
67 | };
68 | // Init engine
69 | this.sendMessage("uci");
70 | this.sendMessage("isready");
71 | }
72 |
73 | evaluatePosition(fen, depth) {
74 | this.stockfish.postMessage(`position fen ${fen}`);
75 | this.stockfish.postMessage(`go depth ${depth}`);
76 | }
77 | stop() {
78 | this.sendMessage("stop"); // Run when changing positions
79 | }
80 | quit() {
81 | this.sendMessage("quit"); // Good to run this before unmounting.
82 | }
83 | }
84 | ```
85 |
86 | ***
87 |
88 | 5. ##### Ready! You now can use [Engine](https://github.com/Clariity/react-chessboard/blob/main/stories/stockfish/engine.ts) for detecting the best moves on your `react-chessboard`
89 |
90 | The example below will create game where stockfish plays agianst itself
91 |
92 | ```jsx
93 | export const StockfishVsStockfish = () => {
94 | const engine = useMemo(() => new Engine(), []);
95 | const game = useMemo(() => new Chess(), []);
96 | const [chessBoardPosition, setChessBoardPosition] = useState(game.fen());
97 |
98 | function findBestMove() {
99 | engine.evaluatePosition(game.fen(), 10);
100 | engine.onMessage(({ bestMove }) => {
101 | if (bestMove) {
102 | game.move({
103 | from: bestMove.substring(0, 2),
104 | to: bestMove.substring(2, 4),
105 | promotion: bestMove.substring(4, 5),
106 | });
107 |
108 | setChessBoardPosition(game.fen());
109 | }
110 | });
111 | }
112 |
113 | useEffect(() => {
114 | if (!game.game_over() || game.in_draw()) {
115 | setTimeout(findBestMove, 300);
116 | }
117 | }, [chessBoardPosition]);
118 |
119 | return ;
120 | };
121 | ```
122 |
--------------------------------------------------------------------------------
/stories/StockfishIntegration.stories.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import type { Meta, StoryObj } from '@storybook/react';
3 |
4 | import { Chessboard } from "../src";
5 |
6 | const boardWrapper = {
7 | width: `70vw`,
8 | maxWidth: "70vh",
9 | margin: "3rem auto",
10 | };
11 |
12 | const meta: Meta = {
13 | component: Chessboard,
14 | decorators: [
15 | (Story) => (
16 |
17 |
18 |
19 | ),
20 | ],
21 | };
22 |
23 | export default meta;
24 | type Story = StoryObj;
25 |
26 | export const Default: Story = {
27 | args: {
28 | id: 'Default',
29 | },
30 | };
31 |
--------------------------------------------------------------------------------
/stories/media/3d-pieces/bB.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/3d-pieces/bB.webp
--------------------------------------------------------------------------------
/stories/media/3d-pieces/bK.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/3d-pieces/bK.webp
--------------------------------------------------------------------------------
/stories/media/3d-pieces/bN.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/3d-pieces/bN.webp
--------------------------------------------------------------------------------
/stories/media/3d-pieces/bP.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/3d-pieces/bP.webp
--------------------------------------------------------------------------------
/stories/media/3d-pieces/bQ.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/3d-pieces/bQ.webp
--------------------------------------------------------------------------------
/stories/media/3d-pieces/bR.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/3d-pieces/bR.webp
--------------------------------------------------------------------------------
/stories/media/3d-pieces/wB.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/3d-pieces/wB.webp
--------------------------------------------------------------------------------
/stories/media/3d-pieces/wK.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/3d-pieces/wK.webp
--------------------------------------------------------------------------------
/stories/media/3d-pieces/wN.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/3d-pieces/wN.webp
--------------------------------------------------------------------------------
/stories/media/3d-pieces/wP.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/3d-pieces/wP.webp
--------------------------------------------------------------------------------
/stories/media/3d-pieces/wQ.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/3d-pieces/wQ.webp
--------------------------------------------------------------------------------
/stories/media/3d-pieces/wR.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/3d-pieces/wR.webp
--------------------------------------------------------------------------------
/stories/media/bB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/bB.png
--------------------------------------------------------------------------------
/stories/media/bK.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/bK.png
--------------------------------------------------------------------------------
/stories/media/bN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/bN.png
--------------------------------------------------------------------------------
/stories/media/bP.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/bP.png
--------------------------------------------------------------------------------
/stories/media/bQ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/bQ.png
--------------------------------------------------------------------------------
/stories/media/bR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/bR.png
--------------------------------------------------------------------------------
/stories/media/wB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/wB.png
--------------------------------------------------------------------------------
/stories/media/wK.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/wK.png
--------------------------------------------------------------------------------
/stories/media/wN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/wN.png
--------------------------------------------------------------------------------
/stories/media/wP.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/wP.png
--------------------------------------------------------------------------------
/stories/media/wQ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/wQ.png
--------------------------------------------------------------------------------
/stories/media/wR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/wR.png
--------------------------------------------------------------------------------
/stories/media/wood-pattern.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/media/wood-pattern.png
--------------------------------------------------------------------------------
/stories/stockfish/engine.ts:
--------------------------------------------------------------------------------
1 | /*!
2 | * Stockfish.js (http://github.com/nmrugg/stockfish.js)
3 | * License: GPL
4 | */
5 |
6 | /*
7 | * Description of the universal chess interface (UCI) https://gist.github.com/aliostad/f4470274f39d29b788c1b09519e67372/
8 | */
9 |
10 | const stockfish = new Worker("./stockfish.wasm.js");
11 |
12 | type EngineMessage = {
13 | /** stockfish engine message in UCI format*/
14 | uciMessage: string;
15 | /** found best move for current position in format `e2e4`*/
16 | bestMove?: string;
17 | /** found best move for opponent in format `e7e5` */
18 | ponder?: string;
19 | /** material balance's difference in centipawns(IMPORTANT! stockfish gives the cp score in terms of whose turn it is)*/
20 | positionEvaluation?: string;
21 | /** count of moves until mate */
22 | possibleMate?: string;
23 | /** the best line found */
24 | pv?: string;
25 | /** number of halfmoves the engine looks ahead */
26 | depth?: number;
27 | };
28 |
29 | export default class Engine {
30 | stockfish: Worker;
31 | onMessage: (callback: (messageData: EngineMessage) => void) => void;
32 | isReady: boolean;
33 |
34 | constructor() {
35 | this.stockfish = stockfish;
36 | this.isReady = false;
37 | this.onMessage = (callback) => {
38 | this.stockfish.addEventListener("message", (e) => {
39 | callback(this.transformSFMessageData(e));
40 | });
41 | };
42 | this.init();
43 | }
44 |
45 | private transformSFMessageData(e) {
46 | const uciMessage = e?.data ?? e;
47 |
48 | return {
49 | uciMessage,
50 | bestMove: uciMessage.match(/bestmove\s+(\S+)/)?.[1],
51 | ponder: uciMessage.match(/ponder\s+(\S+)/)?.[1],
52 | positionEvaluation: uciMessage.match(/cp\s+(\S+)/)?.[1],
53 | possibleMate: uciMessage.match(/mate\s+(\S+)/)?.[1],
54 | pv: uciMessage.match(/ pv\s+(.*)/)?.[1],
55 | depth: Number(uciMessage.match(/ depth\s+(\S+)/)?.[1]) ?? 0,
56 | };
57 | }
58 |
59 | init() {
60 | this.stockfish.postMessage("uci");
61 | this.stockfish.postMessage("isready");
62 | this.onMessage(({ uciMessage }) => {
63 | if (uciMessage === "readyok") {
64 | this.isReady = true;
65 | }
66 | });
67 | }
68 |
69 | onReady(callback) {
70 | this.onMessage(({ uciMessage }) => {
71 | if (uciMessage === "readyok") {
72 | callback();
73 | }
74 | });
75 | }
76 |
77 | evaluatePosition(fen, depth = 12) {
78 | if (depth > 24) depth = 24;
79 |
80 | this.stockfish.postMessage(`position fen ${fen}`);
81 | this.stockfish.postMessage(`go depth ${depth}`);
82 | }
83 |
84 | stop() {
85 | this.stockfish.postMessage("stop"); // Run when searching takes too long time and stockfish will return you the bestmove of the deep it has reached
86 | }
87 |
88 | terminate() {
89 | this.isReady = false;
90 | this.stockfish.postMessage("quit"); // Run this before chessboard unmounting.
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/stories/stockfish/stockfish.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Clariity/react-chessboard/0f72cff7f35147c8f221127a761d8829736549d9/stories/stockfish/stockfish.wasm
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | /* Visit https://aka.ms/tsconfig to read more about this file */
4 |
5 | /* Projects */
6 | // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8 | // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12 |
13 | /* Language and Environment */
14 | "lib": [
15 | "ES5",
16 | "ES2015",
17 | "ES2016",
18 | "DOM",
19 | "ESNext"
20 | ] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
21 | "jsx": "react-jsx" /* Specify what JSX code is generated. */,
22 | // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
23 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
24 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
25 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
26 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
27 | // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
28 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
29 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
30 | // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
31 |
32 | /* Modules */
33 | "module": "ES2015" /* Specify what module code is generated. */,
34 | "target": "ES2015",
35 | // "rootDir": "./", /* Specify the root folder within your source files. */
36 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
37 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
38 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
39 | // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
40 | "types": ["node"] /* Specify type package names to be included without being referenced in a source file. */,
41 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
42 | // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
43 | // "resolveJsonModule": true, /* Enable importing .json files. */
44 | // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */
45 | "moduleResolution": "node",
46 |
47 | /* JavaScript Support */
48 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
49 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
50 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
51 |
52 | /* Emit */
53 | "declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
54 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */
55 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
56 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
57 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
58 | "outDir": "dist" /* Specify an output folder for all emitted files. */,
59 | // "removeComments": true, /* Disable emitting comments. */
60 | // "noEmit": true, /* Disable emitting files from a compilation. */
61 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
62 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
63 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
64 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
65 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
66 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
67 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
68 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
69 | // "newLine": "crlf", /* Set the newline character for emitting files. */
70 | // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
71 | // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
72 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
73 | // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
74 | "declarationDir": "dist", /* Specify the output directory for generated declaration files. */
75 | // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
76 |
77 | /* Interop Constraints */
78 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
79 | "allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */,
80 | "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
81 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
82 | "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
83 |
84 | /* Type Checking */
85 | "strict": true /* Enable all strict type-checking options. */,
86 | // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
87 | // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
88 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
89 | // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
90 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
91 | // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
92 | // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
93 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
94 | "noUnusedLocals": true /* Enable error reporting when local variables aren't read. */,
95 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
96 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
97 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
98 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
99 | // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
100 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
101 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
102 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
103 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
104 |
105 | /* Completeness */
106 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
107 | "skipLibCheck": true /* Skip type checking all .d.ts files. */
108 | },
109 | "include": ["src/**/*.ts", "src/**/*.tsx"]
110 | }
111 |
--------------------------------------------------------------------------------
/vercel.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://openapi.vercel.sh/vercel.json",
3 | "buildCommand": "npm run build-storybook",
4 | "devCommand": "npm run storybook",
5 | "installCommand": "npm install",
6 | "framework": null,
7 | "outputDirectory": "./storybook-static"
8 | }
9 |
--------------------------------------------------------------------------------