kokopu-react 3.0.1 → 3.1.0
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/CHANGELOG.md +10 -0
- package/dist/lib/chessboard/BoardProperties.d.ts +91 -0
- package/dist/lib/chessboard/BoardProperties.js +43 -0
- package/dist/lib/chessboard/BoardProperties.js.map +1 -0
- package/dist/lib/chessboard/Chessboard.css +7 -5
- package/dist/lib/chessboard/Chessboard.d.ts +36 -58
- package/dist/lib/chessboard/Chessboard.js +33 -97
- package/dist/lib/chessboard/Chessboard.js.map +1 -1
- package/dist/lib/chessboard/ChessboardImpl.d.ts +22 -0
- package/dist/lib/chessboard/ChessboardImpl.js +8 -6
- package/dist/lib/chessboard/ChessboardImpl.js.map +1 -1
- package/dist/lib/chessboard/Draggable.d.ts +22 -0
- package/dist/lib/chessboard/Draggable.js +7 -5
- package/dist/lib/chessboard/Draggable.js.map +1 -1
- package/dist/lib/chessboard/Motion.d.ts +22 -0
- package/dist/lib/chessboard/Motion.js +7 -5
- package/dist/lib/chessboard/Motion.js.map +1 -1
- package/dist/lib/chessboard/colorsets.d.ts +22 -0
- package/dist/lib/chessboard/colorsets.js +7 -5
- package/dist/lib/chessboard/colorsets.js.map +1 -1
- package/dist/lib/chessboard/piecesets.d.ts +22 -0
- package/dist/lib/chessboard/piecesets.js +7 -5
- package/dist/lib/chessboard/piecesets.js.map +1 -1
- package/dist/lib/errorbox/ErrorBox.css +7 -5
- package/dist/lib/errorbox/ErrorBox.d.ts +22 -0
- package/dist/lib/errorbox/ErrorBox.js +7 -5
- package/dist/lib/errorbox/ErrorBox.js.map +1 -1
- package/dist/lib/errorbox/parsing.d.ts +57 -0
- package/dist/lib/errorbox/parsing.js +140 -0
- package/dist/lib/errorbox/parsing.js.map +1 -0
- package/dist/lib/exception.d.ts +22 -0
- package/dist/lib/exception.js +7 -5
- package/dist/lib/exception.js.map +1 -1
- package/dist/lib/i18n.d.ts +27 -0
- package/dist/lib/i18n.js +13 -5
- package/dist/lib/i18n.js.map +1 -1
- package/dist/lib/icons/AnnotationSymbolShape.css +7 -5
- package/dist/lib/icons/AnnotationSymbolShape.d.ts +22 -0
- package/dist/lib/icons/AnnotationSymbolShape.js +7 -5
- package/dist/lib/icons/AnnotationSymbolShape.js.map +1 -1
- package/dist/lib/icons/ArrowMarkerIcon.d.ts +22 -0
- package/dist/lib/icons/ArrowMarkerIcon.js +7 -5
- package/dist/lib/icons/ArrowMarkerIcon.js.map +1 -1
- package/dist/lib/icons/ArrowTip.d.ts +22 -0
- package/dist/lib/icons/ArrowTip.js +7 -5
- package/dist/lib/icons/ArrowTip.js.map +1 -1
- package/dist/lib/icons/ChessPieceIcon.d.ts +22 -0
- package/dist/lib/icons/ChessPieceIcon.js +7 -5
- package/dist/lib/icons/ChessPieceIcon.js.map +1 -1
- package/dist/lib/icons/SquareMarkerIcon.d.ts +22 -0
- package/dist/lib/icons/SquareMarkerIcon.js +7 -5
- package/dist/lib/icons/SquareMarkerIcon.js.map +1 -1
- package/dist/lib/icons/TextMarkerIcon.d.ts +22 -0
- package/dist/lib/icons/TextMarkerIcon.js +7 -5
- package/dist/lib/icons/TextMarkerIcon.js.map +1 -1
- package/dist/lib/icons/arrow.css +7 -5
- package/dist/lib/index.d.ts +26 -1
- package/dist/lib/index.js +9 -5
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/movetext/Movetext.css +7 -18
- package/dist/lib/movetext/Movetext.d.ts +31 -43
- package/dist/lib/movetext/Movetext.js +22 -72
- package/dist/lib/movetext/Movetext.js.map +1 -1
- package/dist/lib/movetext/MovetextImpl.d.ts +29 -28
- package/dist/lib/movetext/MovetextImpl.js +22 -99
- package/dist/lib/movetext/MovetextImpl.js.map +1 -1
- package/dist/lib/movetext/fonts.css +7 -5
- package/dist/lib/movetext/htmlFilter.d.ts +22 -0
- package/dist/lib/movetext/htmlFilter.js +21 -19
- package/dist/lib/movetext/htmlFilter.js.map +1 -1
- package/dist/lib/movetext/moveFormatter.d.ts +22 -0
- package/dist/lib/movetext/moveFormatter.js +7 -5
- package/dist/lib/movetext/moveFormatter.js.map +1 -1
- package/dist/lib/navigationboard/NavigationBoard.d.ts +118 -0
- package/dist/lib/navigationboard/NavigationBoard.js +112 -0
- package/dist/lib/navigationboard/NavigationBoard.js.map +1 -0
- package/dist/lib/navigationboard/NavigationField.css +36 -0
- package/dist/lib/navigationboard/NavigationField.d.ts +81 -0
- package/dist/lib/navigationboard/NavigationField.js +154 -0
- package/dist/lib/navigationboard/NavigationField.js.map +1 -0
- package/dist/lib/navigationboard/NavigationToolbar.css +51 -0
- package/dist/lib/navigationboard/NavigationToolbar.d.ts +41 -0
- package/dist/lib/navigationboard/NavigationToolbar.js +124 -0
- package/dist/lib/navigationboard/NavigationToolbar.js.map +1 -0
- package/dist/lib/sanitization.d.ts +22 -0
- package/dist/lib/sanitization.js +7 -5
- package/dist/lib/sanitization.js.map +1 -1
- package/dist/lib/types.d.ts +22 -0
- package/dist/lib/types.js +7 -5
- package/dist/lib/types.js.map +1 -1
- package/dist/lib/util.d.ts +22 -0
- package/dist/lib/util.js +7 -5
- package/dist/lib/util.js.map +1 -1
- package/doc_src/demo/PageChessboardBase.tsx +7 -5
- package/doc_src/demo/PageChessboardInteraction.tsx +32 -22
- package/doc_src/demo/PageChessboardMove.tsx +24 -5
- package/doc_src/demo/PageChessboardSmallScreens.tsx +7 -5
- package/doc_src/demo/PageMovetextBase.tsx +7 -5
- package/doc_src/demo/PageMovetextInteraction.tsx +7 -5
- package/doc_src/demo/PageNavigationBoardBase.tsx +194 -0
- package/doc_src/demo/PageNavigationBoardUncontrolledVsControlled.tsx +114 -0
- package/doc_src/demo/decs.d.ts +7 -5
- package/doc_src/demo/demo.css +7 -5
- package/doc_src/demo/game-3.pgn +10 -0
- package/doc_src/demo/util.ts +7 -5
- package/doc_src/examples/Movetext.md +1 -1
- package/doc_src/examples/NavigationBoard.md +15 -0
- package/doc_src/theming/LogoRenderer.js +7 -5
- package/doc_src/theming/theming.css +7 -5
- package/package.json +27 -26
- package/scripts/doc.styleguide.config.js +19 -7
- package/scripts/docker-compose.yml +3 -3
- package/scripts/test-graphic.webpack.config.js +7 -5
- package/scripts/test-headless.webpack.config.js +7 -5
- package/src/chessboard/BoardProperties.ts +131 -0
- package/src/chessboard/Chessboard.css +7 -5
- package/src/chessboard/Chessboard.tsx +48 -175
- package/src/chessboard/ChessboardImpl.tsx +7 -5
- package/src/chessboard/Draggable.tsx +7 -5
- package/src/chessboard/Motion.tsx +7 -5
- package/src/chessboard/colorsets.ts +7 -5
- package/src/chessboard/piecesets.ts +7 -5
- package/src/decs.d.ts +7 -5
- package/src/errorbox/ErrorBox.css +7 -5
- package/src/errorbox/ErrorBox.tsx +7 -5
- package/src/errorbox/parsing.tsx +158 -0
- package/src/exception.ts +7 -5
- package/src/i18n.ts +14 -5
- package/src/icons/AnnotationSymbolShape.css +7 -5
- package/src/icons/AnnotationSymbolShape.tsx +7 -5
- package/src/icons/ArrowMarkerIcon.tsx +7 -5
- package/src/icons/ArrowTip.tsx +7 -5
- package/src/icons/ChessPieceIcon.tsx +7 -5
- package/src/icons/SquareMarkerIcon.tsx +7 -5
- package/src/icons/TextMarkerIcon.tsx +7 -5
- package/src/icons/arrow.css +7 -5
- package/src/index.ts +12 -6
- package/src/movetext/Movetext.css +7 -18
- package/src/movetext/Movetext.tsx +27 -90
- package/src/movetext/MovetextImpl.tsx +35 -120
- package/src/movetext/fonts.css +7 -5
- package/src/movetext/htmlFilter.tsx +7 -5
- package/src/movetext/moveFormatter.tsx +7 -5
- package/src/navigationboard/NavigationBoard.tsx +231 -0
- package/src/navigationboard/NavigationField.css +36 -0
- package/src/navigationboard/NavigationField.tsx +185 -0
- package/src/navigationboard/NavigationToolbar.css +51 -0
- package/src/navigationboard/NavigationToolbar.tsx +174 -0
- package/src/sanitization.ts +7 -5
- package/src/types.ts +7 -5
- package/src/util.ts +7 -5
- package/test/01_types.js +7 -5
- package/test/02_chessboard_util.js +7 -5
- package/test/03_error_box_graphic.js +7 -5
- package/test/04_icons_graphic.js +7 -5
- package/test/05_chessboard_graphic.js +9 -5
- package/test/06_chessboard_animation.js +7 -5
- package/test/07_chessboard_interaction.js +7 -5
- package/test/08_chessboard_play_moves.js +7 -5
- package/test/09_chessboard_small_screens.js +28 -5
- package/test/10_movetext_graphic.js +12 -5
- package/test/11_movetext_interaction.js +19 -13
- package/test/12_navigation_board.js +168 -0
- package/test/common/graphic.js +7 -5
- package/test/graphic_references/05_chessboard_graphic/move/illegal_null-move.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/move/null-move.png +0 -0
- package/test/graphic_references/09_chessboard_small_screens/top_bottom_components/default_bottom_component.png +0 -0
- package/test/graphic_references/09_chessboard_small_screens/top_bottom_components/default_top_component.png +0 -0
- package/test/graphic_references/09_chessboard_small_screens/top_bottom_components/reduced_bottom_component.png +0 -0
- package/test/graphic_references/09_chessboard_small_screens/top_bottom_components/reduced_top_component.png +0 -0
- package/test/graphic_references/10_movetext_graphic/format_move/format_text.png +0 -0
- package/test/graphic_references/10_movetext_graphic/options/wrong_piece_symbol_value.png +0 -0
- package/test/graphic_references/11_movetext_interaction/select_moves/click_on_unselected_without_callback.png +0 -0
- package/test/graphic_references/12_navigation_board/controlled/default.png +0 -0
- package/test/graphic_references/12_navigation_board/controlled/forbidden_navigation_0.png +0 -0
- package/test/graphic_references/12_navigation_board/controlled/forbidden_navigation_1.png +0 -0
- package/test/graphic_references/12_navigation_board/controlled/invalid_node_id.png +0 -0
- package/test/graphic_references/12_navigation_board/controlled/no_callback_defined_0.png +0 -0
- package/test/graphic_references/12_navigation_board/controlled/no_callback_defined_1.png +0 -0
- package/test/graphic_references/12_navigation_board/controlled/overriding_initial_node_id.png +0 -0
- package/test/graphic_references/12_navigation_board/controlled/regular_navigation_0.png +0 -0
- package/test/graphic_references/12_navigation_board/controlled/regular_navigation_1.png +0 -0
- package/test/graphic_references/12_navigation_board/controlled/regular_navigation_2.png +0 -0
- package/test/graphic_references/12_navigation_board/controlled/regular_navigation_3.png +0 -0
- package/test/graphic_references/12_navigation_board/error/pgn_parsing_error.png +0 -0
- package/test/graphic_references/12_navigation_board/error/wrong_game_type.png +0 -0
- package/test/graphic_references/12_navigation_board/theme/custom_1.png +0 -0
- package/test/graphic_references/12_navigation_board/theme/custom_2.png +0 -0
- package/test/graphic_references/12_navigation_board/theme/large.png +0 -0
- package/test/graphic_references/12_navigation_board/theme/small.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/forbidden_navigation_at_beginning_0.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/forbidden_navigation_at_beginning_1.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/forbidden_navigation_at_beginning_2.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/forbidden_navigation_at_end_0.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/forbidden_navigation_at_end_1.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/forbidden_navigation_at_end_2.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/initial_state_at_end.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/initial_state_at_specific_id.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/initial_state_default.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/initial_state_default_with_game_index.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/initial_state_on_null-move.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/navigation_with_keys_0.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/navigation_with_keys_1.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/navigation_with_keys_2.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/navigation_with_keys_3.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/navigation_with_keys_4.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/regular_flipping_0.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/regular_flipping_1.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/regular_navigation_0.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/regular_navigation_1.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/regular_navigation_2.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/regular_navigation_3.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/regular_navigation_4.png +0 -0
- package/test/graphic_references/12_navigation_board/uncontrolled/regular_navigation_5.png +0 -0
- package/test/graphic_test_app/03_error_box_graphic/base.tsx +7 -5
- package/test/graphic_test_app/03_error_box_graphic/localization.tsx +7 -5
- package/test/graphic_test_app/04_icons_graphic/chess_piece.tsx +7 -5
- package/test/graphic_test_app/04_icons_graphic/marker.tsx +7 -5
- package/test/graphic_test_app/05_chessboard_graphic/annotations.tsx +7 -5
- package/test/graphic_test_app/05_chessboard_graphic/base.tsx +7 -5
- package/test/graphic_test_app/05_chessboard_graphic/chess_variants.tsx +7 -5
- package/test/graphic_test_app/05_chessboard_graphic/flipped.tsx +7 -5
- package/test/graphic_test_app/05_chessboard_graphic/move.tsx +9 -5
- package/test/graphic_test_app/05_chessboard_graphic/theme.tsx +7 -5
- package/test/graphic_test_app/06_chessboard_animation/base_1.tsx +7 -5
- package/test/graphic_test_app/06_chessboard_animation/base_2.tsx +7 -5
- package/test/graphic_test_app/06_chessboard_animation/base_3.tsx +7 -5
- package/test/graphic_test_app/06_chessboard_animation/on_redraw.tsx +7 -5
- package/test/graphic_test_app/07_chessboard_interaction/click_squares.tsx +7 -5
- package/test/graphic_test_app/07_chessboard_interaction/edit_arrows.tsx +7 -5
- package/test/graphic_test_app/07_chessboard_interaction/error.tsx +7 -5
- package/test/graphic_test_app/07_chessboard_interaction/move_pieces.tsx +7 -5
- package/test/graphic_test_app/08_chessboard_play_moves/base.tsx +7 -5
- package/test/graphic_test_app/08_chessboard_play_moves/promotions.tsx +7 -5
- package/test/graphic_test_app/09_chessboard_small_screens/base.tsx +7 -5
- package/test/graphic_test_app/09_chessboard_small_screens/top_bottom_components.tsx +48 -0
- package/test/graphic_test_app/10_movetext_graphic/base.tsx +7 -5
- package/test/graphic_test_app/10_movetext_graphic/error.tsx +7 -5
- package/test/graphic_test_app/10_movetext_graphic/format_move.tsx +31 -0
- package/test/graphic_test_app/10_movetext_graphic/html.tsx +7 -5
- package/test/graphic_test_app/10_movetext_graphic/options.tsx +8 -5
- package/test/graphic_test_app/11_movetext_interaction/error.tsx +7 -5
- package/test/graphic_test_app/11_movetext_interaction/select_moves.tsx +8 -5
- package/test/graphic_test_app/12_navigation_board/controlled.tsx +43 -0
- package/test/graphic_test_app/12_navigation_board/error.tsx +34 -0
- package/test/graphic_test_app/12_navigation_board/theme.tsx +38 -0
- package/test/graphic_test_app/12_navigation_board/uncontrolled.tsx +56 -0
- package/test/graphic_test_app/common/decs.d.ts +7 -5
- package/test/graphic_test_app/common/test_app.css +7 -5
- package/test/graphic_test_app/common/test_app.tsx +7 -5
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* -------------------------------------------------------------------------- *
|
|
2
3
|
* *
|
|
3
|
-
*
|
|
4
|
-
*
|
|
4
|
+
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
|
+
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
+
* Copyright (C) 2021-2024 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
5
7
|
* *
|
|
6
|
-
*
|
|
8
|
+
* Kokopu-React is free software: you can redistribute it and/or *
|
|
7
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
8
10
|
* as published by the Free Software Foundation, either version 3 of *
|
|
9
11
|
* the License, or (at your option) any later version. *
|
|
10
12
|
* *
|
|
11
|
-
*
|
|
13
|
+
* Kokopu-React is distributed in the hope that it will be useful, *
|
|
12
14
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
13
15
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
14
16
|
* GNU Lesser General Public License for more details. *
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* -------------------------------------------------------------------------- *
|
|
3
|
+
* *
|
|
4
|
+
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
|
+
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
+
* Copyright (C) 2021-2024 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
|
+
* *
|
|
8
|
+
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
|
+
* modify it under the terms of the GNU Lesser General Public License *
|
|
10
|
+
* as published by the Free Software Foundation, either version 3 of *
|
|
11
|
+
* the License, or (at your option) any later version. *
|
|
12
|
+
* *
|
|
13
|
+
* Kokopu-React is distributed in the hope that it will be useful, *
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
16
|
+
* GNU Lesser General Public License for more details. *
|
|
17
|
+
* *
|
|
18
|
+
* You should have received a copy of the GNU Lesser General *
|
|
19
|
+
* Public License along with this program. If not, see *
|
|
20
|
+
* <http://www.gnu.org/licenses/>. *
|
|
21
|
+
* *
|
|
22
|
+
* -------------------------------------------------------------------------- */
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
import * as React from 'react';
|
|
26
|
+
import { testApp } from '../common/test_app';
|
|
27
|
+
import { Chessboard, ChessboardProps } from '../../../dist/lib/index';
|
|
28
|
+
|
|
29
|
+
const limits1 = [
|
|
30
|
+
{ width: 750, squareSize: 24, coordinateVisible: false },
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const limits2 = [
|
|
34
|
+
{ width: 750, squareSize: 27, turnVisible: false },
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
function AuxilliaryComponent({ squareSize, coordinateVisible, turnVisible}: Pick<ChessboardProps, 'squareSize' | 'coordinateVisible' | 'turnVisible'>) {
|
|
38
|
+
return (<>
|
|
39
|
+
<div>{`Square size: ${squareSize}`}</div>
|
|
40
|
+
<div>{`Coordinates: ${coordinateVisible}`}</div>
|
|
41
|
+
<div>{`Turn: ${turnVisible}`}</div>
|
|
42
|
+
</>);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
testApp([ /* eslint-disable react/jsx-key */
|
|
46
|
+
<Chessboard squareSize={30} smallScreenLimits={limits1} topComponent={AuxilliaryComponent} />,
|
|
47
|
+
<Chessboard squareSize={30} smallScreenLimits={limits2} bottomComponent={AuxilliaryComponent} />,
|
|
48
|
+
]); /* eslint-enable react/jsx-key */
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* -------------------------------------------------------------------------- *
|
|
2
3
|
* *
|
|
3
|
-
*
|
|
4
|
-
*
|
|
4
|
+
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
|
+
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
+
* Copyright (C) 2021-2024 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
5
7
|
* *
|
|
6
|
-
*
|
|
8
|
+
* Kokopu-React is free software: you can redistribute it and/or *
|
|
7
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
8
10
|
* as published by the Free Software Foundation, either version 3 of *
|
|
9
11
|
* the License, or (at your option) any later version. *
|
|
10
12
|
* *
|
|
11
|
-
*
|
|
13
|
+
* Kokopu-React is distributed in the hope that it will be useful, *
|
|
12
14
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
13
15
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
14
16
|
* GNU Lesser General Public License for more details. *
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* -------------------------------------------------------------------------- *
|
|
2
3
|
* *
|
|
3
|
-
*
|
|
4
|
-
*
|
|
4
|
+
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
|
+
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
+
* Copyright (C) 2021-2024 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
5
7
|
* *
|
|
6
|
-
*
|
|
8
|
+
* Kokopu-React is free software: you can redistribute it and/or *
|
|
7
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
8
10
|
* as published by the Free Software Foundation, either version 3 of *
|
|
9
11
|
* the License, or (at your option) any later version. *
|
|
10
12
|
* *
|
|
11
|
-
*
|
|
13
|
+
* Kokopu-React is distributed in the hope that it will be useful, *
|
|
12
14
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
13
15
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
14
16
|
* GNU Lesser General Public License for more details. *
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* -------------------------------------------------------------------------- *
|
|
3
|
+
* *
|
|
4
|
+
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
|
+
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
+
* Copyright (C) 2021-2024 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
|
+
* *
|
|
8
|
+
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
|
+
* modify it under the terms of the GNU Lesser General Public License *
|
|
10
|
+
* as published by the Free Software Foundation, either version 3 of *
|
|
11
|
+
* the License, or (at your option) any later version. *
|
|
12
|
+
* *
|
|
13
|
+
* Kokopu-React is distributed in the hope that it will be useful, *
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
16
|
+
* GNU Lesser General Public License for more details. *
|
|
17
|
+
* *
|
|
18
|
+
* You should have received a copy of the GNU Lesser General *
|
|
19
|
+
* Public License along with this program. If not, see *
|
|
20
|
+
* <http://www.gnu.org/licenses/>. *
|
|
21
|
+
* *
|
|
22
|
+
* -------------------------------------------------------------------------- */
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
import * as React from 'react';
|
|
26
|
+
import { testApp } from '../common/test_app';
|
|
27
|
+
import { formatMove } from '../../../dist/lib/index';
|
|
28
|
+
|
|
29
|
+
testApp([ /* eslint-disable react/jsx-key */
|
|
30
|
+
<div>{formatMove('figurines', 'Figurines: KQRBNP')}</div>,
|
|
31
|
+
], 'width-600'); /* eslint-enable react/jsx-key */
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* -------------------------------------------------------------------------- *
|
|
2
3
|
* *
|
|
3
|
-
*
|
|
4
|
-
*
|
|
4
|
+
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
|
+
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
+
* Copyright (C) 2021-2024 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
5
7
|
* *
|
|
6
|
-
*
|
|
8
|
+
* Kokopu-React is free software: you can redistribute it and/or *
|
|
7
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
8
10
|
* as published by the Free Software Foundation, either version 3 of *
|
|
9
11
|
* the License, or (at your option) any later version. *
|
|
10
12
|
* *
|
|
11
|
-
*
|
|
13
|
+
* Kokopu-React is distributed in the hope that it will be useful, *
|
|
12
14
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
13
15
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
14
16
|
* GNU Lesser General Public License for more details. *
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* -------------------------------------------------------------------------- *
|
|
2
3
|
* *
|
|
3
|
-
*
|
|
4
|
-
*
|
|
4
|
+
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
|
+
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
+
* Copyright (C) 2021-2024 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
5
7
|
* *
|
|
6
|
-
*
|
|
8
|
+
* Kokopu-React is free software: you can redistribute it and/or *
|
|
7
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
8
10
|
* as published by the Free Software Foundation, either version 3 of *
|
|
9
11
|
* the License, or (at your option) any later version. *
|
|
10
12
|
* *
|
|
11
|
-
*
|
|
13
|
+
* Kokopu-React is distributed in the hope that it will be useful, *
|
|
12
14
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
13
15
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
14
16
|
* GNU Lesser General Public License for more details. *
|
|
@@ -39,4 +41,5 @@ testApp([ /* eslint-disable react/jsx-key */
|
|
|
39
41
|
<Movetext game={pgn} gameIndex={3} diagramOptions={ /* eslint-disable @typescript-eslint/no-explicit-any */ null as any /* eslint-enable @typescript-eslint/no-explicit-any */ } />,
|
|
40
42
|
<Movetext game={pgn} gameIndex={3}
|
|
41
43
|
diagramOptions={ /* eslint-disable @typescript-eslint/no-explicit-any */ { squareSize: '32' } as any /* eslint-enable @typescript-eslint/no-explicit-any */ } />,
|
|
44
|
+
<Movetext game={pgn} pieceSymbols={ /* eslint-disable @typescript-eslint/no-explicit-any */ 'invalid' as any /* eslint-enable @typescript-eslint/no-explicit-any */ } />
|
|
42
45
|
], 'width-600'); /* eslint-enable react/jsx-key */
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* -------------------------------------------------------------------------- *
|
|
2
3
|
* *
|
|
3
|
-
*
|
|
4
|
-
*
|
|
4
|
+
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
|
+
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
+
* Copyright (C) 2021-2024 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
5
7
|
* *
|
|
6
|
-
*
|
|
8
|
+
* Kokopu-React is free software: you can redistribute it and/or *
|
|
7
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
8
10
|
* as published by the Free Software Foundation, either version 3 of *
|
|
9
11
|
* the License, or (at your option) any later version. *
|
|
10
12
|
* *
|
|
11
|
-
*
|
|
13
|
+
* Kokopu-React is distributed in the hope that it will be useful, *
|
|
12
14
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
13
15
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
14
16
|
* GNU Lesser General Public License for more details. *
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* -------------------------------------------------------------------------- *
|
|
2
3
|
* *
|
|
3
|
-
*
|
|
4
|
-
*
|
|
4
|
+
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
|
+
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
+
* Copyright (C) 2021-2024 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
5
7
|
* *
|
|
6
|
-
*
|
|
8
|
+
* Kokopu-React is free software: you can redistribute it and/or *
|
|
7
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
8
10
|
* as published by the Free Software Foundation, either version 3 of *
|
|
9
11
|
* the License, or (at your option) any later version. *
|
|
10
12
|
* *
|
|
11
|
-
*
|
|
13
|
+
* Kokopu-React is distributed in the hope that it will be useful, *
|
|
12
14
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
13
15
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
14
16
|
* GNU Lesser General Public License for more details. *
|
|
@@ -33,6 +35,7 @@ function onMoveSelected(nodeId: string | undefined, evtOrigin: string) {
|
|
|
33
35
|
testApp([ /* eslint-disable react/jsx-key */
|
|
34
36
|
<Movetext game={pgn} gameIndex={7} headerVisible={false} onMoveSelected={onMoveSelected} selection="4w" />,
|
|
35
37
|
<Movetext game={pgn} gameIndex={7} headerVisible={false} onMoveSelected={onMoveSelected} interactionMode="selectMove" />,
|
|
38
|
+
<Movetext game={pgn} gameIndex={7} headerVisible={false} interactionMode="selectMove" />,
|
|
36
39
|
<Movetext game={pgn} gameIndex={8} headerVisible={false} onMoveSelected={onMoveSelected} interactionMode="selectMove" selection="1b-v0-3w-v0-3w" />,
|
|
37
40
|
<Movetext game={pgn} gameIndex={8} headerVisible={false} onMoveSelected={onMoveSelected} interactionMode="selectMove" selection="1b-v0-2b" />,
|
|
38
41
|
<Movetext game={pgn} gameIndex={7} headerVisible={false} onMoveSelected={onMoveSelected} interactionMode="selectMove" selection="start" />,
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* -------------------------------------------------------------------------- *
|
|
3
|
+
* *
|
|
4
|
+
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
|
+
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
+
* Copyright (C) 2021-2024 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
|
+
* *
|
|
8
|
+
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
|
+
* modify it under the terms of the GNU Lesser General Public License *
|
|
10
|
+
* as published by the Free Software Foundation, either version 3 of *
|
|
11
|
+
* the License, or (at your option) any later version. *
|
|
12
|
+
* *
|
|
13
|
+
* Kokopu-React is distributed in the hope that it will be useful, *
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
16
|
+
* GNU Lesser General Public License for more details. *
|
|
17
|
+
* *
|
|
18
|
+
* You should have received a copy of the GNU Lesser General *
|
|
19
|
+
* Public License along with this program. If not, see *
|
|
20
|
+
* <http://www.gnu.org/licenses/>. *
|
|
21
|
+
* *
|
|
22
|
+
* -------------------------------------------------------------------------- */
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
import * as React from 'react';
|
|
26
|
+
import { setSandbox, testApp } from '../common/test_app';
|
|
27
|
+
import { NavigationBoard } from '../../../dist/lib/index';
|
|
28
|
+
|
|
29
|
+
import pgn from '../common/games.pgn';
|
|
30
|
+
|
|
31
|
+
function onNodeIdChanged(nodeId: string) {
|
|
32
|
+
setSandbox(`Node ID changed: ${nodeId}`);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function onFlippedChanged(flipped: boolean) {
|
|
36
|
+
setSandbox(`Flip state changed: ${flipped}`);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
testApp([ /* eslint-disable react/jsx-key */
|
|
40
|
+
<NavigationBoard game={pgn} gameIndex={1} nodeId="17w" onNodeIdChanged={onNodeIdChanged} />,
|
|
41
|
+
<NavigationBoard game={pgn} initialNodeId="3w" nodeId="end" onFlippedChanged={onFlippedChanged} />,
|
|
42
|
+
<NavigationBoard game={pgn} gameIndex={3} nodeId="whatever..." onNodeIdChanged={onNodeIdChanged} flipped={false} onFlippedChanged={onFlippedChanged} />,
|
|
43
|
+
]); /* eslint-enable react/jsx-key */
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* -------------------------------------------------------------------------- *
|
|
3
|
+
* *
|
|
4
|
+
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
|
+
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
+
* Copyright (C) 2021-2024 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
|
+
* *
|
|
8
|
+
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
|
+
* modify it under the terms of the GNU Lesser General Public License *
|
|
10
|
+
* as published by the Free Software Foundation, either version 3 of *
|
|
11
|
+
* the License, or (at your option) any later version. *
|
|
12
|
+
* *
|
|
13
|
+
* Kokopu-React is distributed in the hope that it will be useful, *
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
16
|
+
* GNU Lesser General Public License for more details. *
|
|
17
|
+
* *
|
|
18
|
+
* You should have received a copy of the GNU Lesser General *
|
|
19
|
+
* Public License along with this program. If not, see *
|
|
20
|
+
* <http://www.gnu.org/licenses/>. *
|
|
21
|
+
* *
|
|
22
|
+
* -------------------------------------------------------------------------- */
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
import * as React from 'react';
|
|
26
|
+
import { testApp } from '../common/test_app';
|
|
27
|
+
import { NavigationBoard } from '../../../dist/lib/index';
|
|
28
|
+
|
|
29
|
+
import dummyPgn from '../common/dummy.pgn';
|
|
30
|
+
|
|
31
|
+
testApp([ /* eslint-disable react/jsx-key */
|
|
32
|
+
<NavigationBoard game={dummyPgn} />,
|
|
33
|
+
<NavigationBoard game={ /* eslint-disable @typescript-eslint/no-explicit-any */ 42 as any /* eslint-enable @typescript-eslint/no-explicit-any */ } />,
|
|
34
|
+
], 'width-600'); /* eslint-enable react/jsx-key */
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* -------------------------------------------------------------------------- *
|
|
3
|
+
* *
|
|
4
|
+
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
|
+
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
+
* Copyright (C) 2021-2024 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
|
+
* *
|
|
8
|
+
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
|
+
* modify it under the terms of the GNU Lesser General Public License *
|
|
10
|
+
* as published by the Free Software Foundation, either version 3 of *
|
|
11
|
+
* the License, or (at your option) any later version. *
|
|
12
|
+
* *
|
|
13
|
+
* Kokopu-React is distributed in the hope that it will be useful, *
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
16
|
+
* GNU Lesser General Public License for more details. *
|
|
17
|
+
* *
|
|
18
|
+
* You should have received a copy of the GNU Lesser General *
|
|
19
|
+
* Public License along with this program. If not, see *
|
|
20
|
+
* <http://www.gnu.org/licenses/>. *
|
|
21
|
+
* *
|
|
22
|
+
* -------------------------------------------------------------------------- */
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
import * as React from 'react';
|
|
26
|
+
import { Game } from 'kokopu';
|
|
27
|
+
import { testApp } from '../common/test_app';
|
|
28
|
+
import { NavigationBoard } from '../../../dist/lib/index';
|
|
29
|
+
|
|
30
|
+
const game = new Game();
|
|
31
|
+
game.mainVariation().play('e4');
|
|
32
|
+
|
|
33
|
+
testApp([ /* eslint-disable react/jsx-key */
|
|
34
|
+
<NavigationBoard game={game} initialNodeId="end" squareSize={20} coordinateVisible={false} />,
|
|
35
|
+
<NavigationBoard game={game} initialNodeId="end" squareSize={53} colorset="scid" pieceset="celtic" flipButtonVisible={false} />,
|
|
36
|
+
<NavigationBoard game={game} initialNodeId="end" turnVisible={false} moveArrowColor="g" />,
|
|
37
|
+
<div style={{ color: 'red' }}><NavigationBoard game={game} initialNodeId="end" squareSize={48} moveArrowVisible={false} /></div>,
|
|
38
|
+
]); /* eslint-enable react/jsx-key */
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* -------------------------------------------------------------------------- *
|
|
3
|
+
* *
|
|
4
|
+
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
|
+
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
+
* Copyright (C) 2021-2024 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
|
+
* *
|
|
8
|
+
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
|
+
* modify it under the terms of the GNU Lesser General Public License *
|
|
10
|
+
* as published by the Free Software Foundation, either version 3 of *
|
|
11
|
+
* the License, or (at your option) any later version. *
|
|
12
|
+
* *
|
|
13
|
+
* Kokopu-React is distributed in the hope that it will be useful, *
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
16
|
+
* GNU Lesser General Public License for more details. *
|
|
17
|
+
* *
|
|
18
|
+
* You should have received a copy of the GNU Lesser General *
|
|
19
|
+
* Public License along with this program. If not, see *
|
|
20
|
+
* <http://www.gnu.org/licenses/>. *
|
|
21
|
+
* *
|
|
22
|
+
* -------------------------------------------------------------------------- */
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
import * as React from 'react';
|
|
26
|
+
import { Game, Position, pgnRead } from 'kokopu';
|
|
27
|
+
import { setSandbox, testApp } from '../common/test_app';
|
|
28
|
+
import { NavigationBoard } from '../../../dist/lib/index';
|
|
29
|
+
|
|
30
|
+
import pgn from '../common/games.pgn';
|
|
31
|
+
|
|
32
|
+
const game = new Game();
|
|
33
|
+
game.initialPosition(new Position('regular', 'r1bqkb1r/pppp1ppp/2n2n2/4p2Q/2B1P3/8/PPPP1PPP/RNB1K1NR w KQkq - 4 4'), 4);
|
|
34
|
+
game.mainVariation().play('Qxf7#');
|
|
35
|
+
game.result('1-0');
|
|
36
|
+
|
|
37
|
+
const gameWithNullMove = new Game();
|
|
38
|
+
gameWithNullMove.mainVariation().play('e4').play('e5').play('Nf3').play('--').play('Bc4');
|
|
39
|
+
|
|
40
|
+
const database = pgnRead(pgn);
|
|
41
|
+
|
|
42
|
+
function onNodeIdChanged(nodeId: string) { // Must NOT be invoked as the components are uncontrolled.
|
|
43
|
+
setSandbox(`Node ID changed: ${nodeId}`);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function onFlippedChanged(flipped: boolean) {
|
|
47
|
+
setSandbox(`Flip state changed: ${flipped}`);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
testApp([ /* eslint-disable react/jsx-key */
|
|
51
|
+
<NavigationBoard game={game} initialFlipped />,
|
|
52
|
+
<NavigationBoard game={pgn} initialNodeId="end" initialFlipped flipped={false} />,
|
|
53
|
+
<NavigationBoard game={pgn} gameIndex={1} initialNodeId="17w" onNodeIdChanged={onNodeIdChanged} />,
|
|
54
|
+
<NavigationBoard game={database} gameIndex={3} onNodeIdChanged={onNodeIdChanged} flipped onFlippedChanged={onFlippedChanged} />,
|
|
55
|
+
<NavigationBoard game={gameWithNullMove} initialNodeId="2b" />,
|
|
56
|
+
]); /* eslint-enable react/jsx-key */
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* -------------------------------------------------------------------------- *
|
|
2
3
|
* *
|
|
3
|
-
*
|
|
4
|
-
*
|
|
4
|
+
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
|
+
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
+
* Copyright (C) 2021-2024 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
5
7
|
* *
|
|
6
|
-
*
|
|
8
|
+
* Kokopu-React is free software: you can redistribute it and/or *
|
|
7
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
8
10
|
* as published by the Free Software Foundation, either version 3 of *
|
|
9
11
|
* the License, or (at your option) any later version. *
|
|
10
12
|
* *
|
|
11
|
-
*
|
|
13
|
+
* Kokopu-React is distributed in the hope that it will be useful, *
|
|
12
14
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
13
15
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
14
16
|
* GNU Lesser General Public License for more details. *
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* -------------------------------------------------------------------------- *
|
|
2
3
|
* *
|
|
3
|
-
*
|
|
4
|
-
*
|
|
4
|
+
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
|
+
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
+
* Copyright (C) 2021-2024 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
5
7
|
* *
|
|
6
|
-
*
|
|
8
|
+
* Kokopu-React is free software: you can redistribute it and/or *
|
|
7
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
8
10
|
* as published by the Free Software Foundation, either version 3 of *
|
|
9
11
|
* the License, or (at your option) any later version. *
|
|
10
12
|
* *
|
|
11
|
-
*
|
|
13
|
+
* Kokopu-React is distributed in the hope that it will be useful, *
|
|
12
14
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
13
15
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
14
16
|
* GNU Lesser General Public License for more details. *
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* -------------------------------------------------------------------------- *
|
|
2
3
|
* *
|
|
3
|
-
*
|
|
4
|
-
*
|
|
4
|
+
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
|
+
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
+
* Copyright (C) 2021-2024 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
5
7
|
* *
|
|
6
|
-
*
|
|
8
|
+
* Kokopu-React is free software: you can redistribute it and/or *
|
|
7
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
8
10
|
* as published by the Free Software Foundation, either version 3 of *
|
|
9
11
|
* the License, or (at your option) any later version. *
|
|
10
12
|
* *
|
|
11
|
-
*
|
|
13
|
+
* Kokopu-React is distributed in the hope that it will be useful, *
|
|
12
14
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
13
15
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
14
16
|
* GNU Lesser General Public License for more details. *
|