kokopu-react 3.3.0 → 3.3.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/CHANGELOG.md +8 -0
- package/dist/lib/chessboard/BoardProperties.d.ts +1 -1
- package/dist/lib/chessboard/BoardProperties.js +1 -1
- package/dist/lib/chessboard/Chessboard.css +1 -1
- package/dist/lib/chessboard/Chessboard.d.ts +3 -3
- package/dist/lib/chessboard/Chessboard.js +4 -3
- package/dist/lib/chessboard/Chessboard.js.map +1 -1
- package/dist/lib/chessboard/ChessboardImpl.d.ts +1 -1
- package/dist/lib/chessboard/ChessboardImpl.js +2 -2
- package/dist/lib/chessboard/ChessboardImpl.js.map +1 -1
- package/dist/lib/chessboard/Draggable.d.ts +1 -1
- package/dist/lib/chessboard/Draggable.js +1 -1
- package/dist/lib/chessboard/Draggable.js.map +1 -1
- package/dist/lib/chessboard/Motion.d.ts +1 -1
- package/dist/lib/chessboard/Motion.js +2 -2
- package/dist/lib/chessboard/Motion.js.map +1 -1
- package/dist/lib/chessboard/colorsets.d.ts +1 -1
- package/dist/lib/chessboard/colorsets.js +1 -1
- package/dist/lib/chessboard/piecesets.d.ts +1 -1
- package/dist/lib/chessboard/piecesets.js +1 -1
- package/dist/lib/errorbox/ErrorBox.css +1 -1
- package/dist/lib/errorbox/ErrorBox.d.ts +1 -1
- package/dist/lib/errorbox/ErrorBox.js +1 -1
- package/dist/lib/errorbox/parsing.d.ts +5 -4
- package/dist/lib/errorbox/parsing.js +1 -1
- package/dist/lib/exception.d.ts +1 -1
- package/dist/lib/exception.js +1 -1
- package/dist/lib/i18n.d.ts +1 -1
- package/dist/lib/i18n.js +3 -3
- package/dist/lib/i18n.js.map +1 -1
- package/dist/lib/icons/AnnotationSymbolShape.css +1 -1
- package/dist/lib/icons/AnnotationSymbolShape.d.ts +1 -1
- package/dist/lib/icons/AnnotationSymbolShape.js +1 -1
- package/dist/lib/icons/ArrowMarkerIcon.d.ts +1 -1
- package/dist/lib/icons/ArrowMarkerIcon.js +1 -1
- package/dist/lib/icons/ArrowMarkerIcon.js.map +1 -1
- package/dist/lib/icons/ArrowTip.d.ts +1 -1
- package/dist/lib/icons/ArrowTip.js +1 -1
- package/dist/lib/icons/ChessPieceIcon.d.ts +2 -5
- package/dist/lib/icons/ChessPieceIcon.js +2 -6
- package/dist/lib/icons/ChessPieceIcon.js.map +1 -1
- package/dist/lib/icons/SquareMarkerIcon.d.ts +2 -5
- package/dist/lib/icons/SquareMarkerIcon.js +2 -6
- package/dist/lib/icons/SquareMarkerIcon.js.map +1 -1
- package/dist/lib/icons/TextMarkerIcon.d.ts +2 -5
- package/dist/lib/icons/TextMarkerIcon.js +2 -6
- package/dist/lib/icons/TextMarkerIcon.js.map +1 -1
- package/dist/lib/icons/arrow.css +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/lib/movetext/Movetext.css +1 -1
- package/dist/lib/movetext/Movetext.d.ts +1 -1
- package/dist/lib/movetext/Movetext.js +1 -1
- package/dist/lib/movetext/Movetext.js.map +1 -1
- package/dist/lib/movetext/MovetextImpl.d.ts +1 -1
- package/dist/lib/movetext/MovetextImpl.js +5 -4
- package/dist/lib/movetext/MovetextImpl.js.map +1 -1
- package/dist/lib/movetext/fonts.css +1 -1
- package/dist/lib/movetext/htmlFilter.d.ts +1 -1
- package/dist/lib/movetext/htmlFilter.js +2 -2
- package/dist/lib/movetext/htmlFilter.js.map +1 -1
- package/dist/lib/movetext/moveFormatter.d.ts +1 -1
- package/dist/lib/movetext/moveFormatter.js +1 -1
- package/dist/lib/navigationboard/NavigationBoard.d.ts +2 -2
- package/dist/lib/navigationboard/NavigationBoard.js +3 -3
- package/dist/lib/navigationboard/NavigationBoard.js.map +1 -1
- package/dist/lib/navigationboard/NavigationButton.d.ts +1 -1
- package/dist/lib/navigationboard/NavigationButton.js +1 -1
- package/dist/lib/navigationboard/NavigationField.css +1 -1
- package/dist/lib/navigationboard/NavigationField.d.ts +1 -1
- package/dist/lib/navigationboard/NavigationField.js +2 -2
- package/dist/lib/navigationboard/NavigationField.js.map +1 -1
- package/dist/lib/navigationboard/NavigationToolbar.css +1 -1
- package/dist/lib/navigationboard/NavigationToolbar.d.ts +1 -1
- package/dist/lib/navigationboard/NavigationToolbar.js +1 -1
- package/dist/lib/navigationboard/NavigationToolbar.js.map +1 -1
- package/dist/lib/navigationboard/iconPaths.d.ts +1 -1
- package/dist/lib/navigationboard/iconPaths.js +1 -1
- package/dist/lib/sanitization.d.ts +1 -1
- package/dist/lib/sanitization.js +1 -1
- package/dist/lib/types.d.ts +1 -1
- package/dist/lib/types.js +1 -1
- package/dist/lib/util.d.ts +1 -1
- package/dist/lib/util.js +3 -3
- package/dist/lib/util.js.map +1 -1
- package/doc_src/demo/NavigationBoardWithMoveText.txt +19 -0
- package/doc_src/demo/PageChessboardBase.tsx +58 -52
- package/doc_src/demo/PageChessboardInteraction.tsx +79 -64
- package/doc_src/demo/PageChessboardMove.tsx +36 -31
- package/doc_src/demo/PageChessboardSmallScreens.tsx +4 -4
- package/doc_src/demo/PageMovetextBase.tsx +92 -82
- package/doc_src/demo/PageMovetextInteraction.tsx +28 -28
- package/doc_src/demo/PageNavigationBoardBase.tsx +64 -56
- package/doc_src/demo/PageNavigationBoardUncontrolledVsControlled.tsx +26 -20
- package/doc_src/demo/PageSynchroNavigationBoardMovetext.tsx +115 -0
- package/doc_src/demo/decs.d.ts +6 -1
- package/doc_src/demo/demo.css +1 -1
- package/doc_src/demo/util.ts +1 -1
- package/doc_src/theming/LogoRenderer.js +9 -10
- package/doc_src/theming/theming.css +1 -1
- package/package.json +32 -30
- package/scripts/doc.styleguide.config.js +3 -2
- package/scripts/docker-compose.yml +1 -3
- package/scripts/test-graphic.webpack.config.js +1 -1
- package/scripts/test-headless.webpack.config.js +1 -1
- package/src/chessboard/BoardProperties.ts +14 -14
- package/src/chessboard/Chessboard.css +1 -1
- package/src/chessboard/Chessboard.tsx +44 -40
- package/src/chessboard/ChessboardImpl.tsx +57 -40
- package/src/chessboard/Draggable.tsx +17 -17
- package/src/chessboard/Motion.tsx +5 -5
- package/src/chessboard/colorsets.ts +1 -1
- package/src/chessboard/piecesets.ts +1 -1
- package/src/decs.d.ts +1 -1
- package/src/errorbox/ErrorBox.css +1 -1
- package/src/errorbox/ErrorBox.tsx +6 -6
- package/src/errorbox/parsing.tsx +7 -7
- package/src/exception.ts +1 -1
- package/src/i18n.ts +3 -3
- package/src/icons/AnnotationSymbolShape.css +1 -1
- package/src/icons/AnnotationSymbolShape.tsx +6 -6
- package/src/icons/ArrowMarkerIcon.tsx +9 -5
- package/src/icons/ArrowTip.tsx +3 -3
- package/src/icons/ChessPieceIcon.tsx +5 -12
- package/src/icons/SquareMarkerIcon.tsx +4 -11
- package/src/icons/TextMarkerIcon.tsx +5 -12
- package/src/icons/arrow.css +1 -1
- package/src/index.ts +1 -1
- package/src/movetext/Movetext.css +1 -1
- package/src/movetext/Movetext.tsx +13 -12
- package/src/movetext/MovetextImpl.tsx +36 -30
- package/src/movetext/fonts.css +1 -1
- package/src/movetext/htmlFilter.tsx +5 -5
- package/src/movetext/moveFormatter.tsx +1 -1
- package/src/navigationboard/NavigationBoard.tsx +57 -52
- package/src/navigationboard/NavigationButton.ts +5 -5
- package/src/navigationboard/NavigationField.css +1 -1
- package/src/navigationboard/NavigationField.tsx +8 -8
- package/src/navigationboard/NavigationToolbar.css +1 -1
- package/src/navigationboard/NavigationToolbar.tsx +18 -14
- package/src/navigationboard/iconPaths.ts +1 -1
- package/src/sanitization.ts +1 -1
- package/src/types.ts +27 -27
- package/src/util.ts +3 -3
- package/test/01_types.js +84 -62
- package/test/02_chessboard_util.js +3 -1
- package/test/03_error_box_graphic.js +2 -2
- package/test/04_icons_graphic.js +1 -1
- package/test/05_chessboard_graphic.js +1 -1
- package/test/06_chessboard_animation.js +1 -1
- package/test/07_chessboard_interaction.js +2 -3
- package/test/08_chessboard_play_moves.js +1 -1
- package/test/09_chessboard_small_screens.js +1 -1
- package/test/10_movetext_graphic.js +1 -1
- package/test/11_movetext_interaction.js +1 -1
- package/test/12_navigation_board_base.js +1 -1
- package/test/13_navigation_board_graphic.js +4 -4
- package/test/14_navigation_board_autoplay.js +1 -1
- package/test/common/graphic.js +12 -12
- package/test/graphic_references/03_error_box_graphic/base/cut_beginning_of_text.png +0 -0
- package/test/graphic_references/03_error_box_graphic/base/cut_end_of_text.png +0 -0
- package/test/graphic_references/03_error_box_graphic/base/cut_on_line_breaks.png +0 -0
- package/test/graphic_references/03_error_box_graphic/base/error_index_not_integer.png +0 -0
- package/test/graphic_references/03_error_box_graphic/base/full.png +0 -0
- package/test/graphic_references/03_error_box_graphic/base/minimal.png +0 -0
- package/test/graphic_references/03_error_box_graphic/base/missing_error_index.png +0 -0
- package/test/graphic_references/03_error_box_graphic/base/missing_error_text.png +0 -0
- package/test/graphic_references/03_error_box_graphic/base/negative_error_index.png +0 -0
- package/test/graphic_references/03_error_box_graphic/base/single_character_text.png +0 -0
- package/test/graphic_references/03_error_box_graphic/base/too_large_error_index.png +0 -0
- package/test/graphic_references/03_error_box_graphic/localization/default.png +0 -0
- package/test/graphic_references/04_icons_graphic/chess_piece/customized_pieceset.png +0 -0
- package/test/graphic_references/04_icons_graphic/chess_piece/invalid_multiple_pieces.png +0 -0
- package/test/graphic_references/04_icons_graphic/chess_piece/invalid_pieceset.png +0 -0
- package/test/graphic_references/04_icons_graphic/chess_piece/invalid_single_piece.png +0 -0
- package/test/graphic_references/04_icons_graphic/chess_piece/invalid_size.png +0 -0
- package/test/graphic_references/04_icons_graphic/chess_piece/multiple_pieces.png +0 -0
- package/test/graphic_references/04_icons_graphic/chess_piece/single_piece.png +0 -0
- package/test/graphic_references/04_icons_graphic/marker/colorized_arrow.png +0 -0
- package/test/graphic_references/04_icons_graphic/marker/colorized_square.png +0 -0
- package/test/graphic_references/04_icons_graphic/marker/colorized_symbol.png +0 -0
- package/test/graphic_references/04_icons_graphic/marker/colorized_text.png +0 -0
- package/test/graphic_references/04_icons_graphic/marker/default_arrow.png +0 -0
- package/test/graphic_references/04_icons_graphic/marker/default_square.png +0 -0
- package/test/graphic_references/04_icons_graphic/marker/default_text.png +0 -0
- package/test/graphic_references/04_icons_graphic/marker/invalid_arrow_size.png +0 -0
- package/test/graphic_references/04_icons_graphic/marker/invalid_square_size.png +0 -0
- package/test/graphic_references/04_icons_graphic/marker/invalid_symbol.png +0 -0
- package/test/graphic_references/04_icons_graphic/marker/invalid_text_size.png +0 -0
- package/test/graphic_references/04_icons_graphic/marker/wrapped_arrow.png +0 -0
- package/test/graphic_references/04_icons_graphic/marker/wrapped_square.png +0 -0
- package/test/graphic_references/04_icons_graphic/marker/wrapped_symbol.png +0 -0
- package/test/graphic_references/04_icons_graphic/marker/wrapped_text.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/annotations/overlap.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/annotations/overlap_and_flip.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/annotations/with_coordinates.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/annotations/with_coordinates_and_flip.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/annotations/without_coordinates.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/annotations/without_coordinates_and_flip.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/base/default.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/base/empty.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/base/from_fen.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/base/from_kokopu_object.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/base/parsing_error.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/base/wrong_position_type.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/chess_variants/chess960.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/chess_variants/chess960_with_move.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/chess_variants/invalid_variant.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/chess_variants/invalid_variant_with_fen.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/chess_variants/special_code.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/chess_variants/variant_with_std_initial_position.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/chess_variants/variant_without_std_initial_position.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/flipped/default.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/flipped/empty.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/flipped/from_fen.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/flipped/from_kokopu_object.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/flipped/parsing_error.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/move/capture.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/move/castling_move.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/move/default.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/move/en-passant.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/move/illegal_null-move.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/move/no_move_arrow.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/move/null-move.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/move/parsing_error.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/move/promotion.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/move/with_forced_move_arrow_and_flip.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/move/wrong_move_arrow_color_type.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/move/wrong_move_type.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/theme/custom_1.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/theme/custom_2.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/theme/custom_3.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/theme/custom_4.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/theme/custom_5.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/theme/custom_6.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/theme/default.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/theme/large.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/theme/small.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/theme/wrong_colorset.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/theme/wrong_pieceset.png +0 -0
- package/test/graphic_references/05_chessboard_graphic/theme/wrong_square_size_type.png +0 -0
- package/test/graphic_references/06_chessboard_animation/base_1/capture.png +0 -0
- package/test/graphic_references/06_chessboard_animation/base_1/castling_move.png +0 -0
- package/test/graphic_references/06_chessboard_animation/base_1/en-passant.png +0 -0
- package/test/graphic_references/06_chessboard_animation/base_1/move_1.png +0 -0
- package/test/graphic_references/06_chessboard_animation/base_1/move_2.png +0 -0
- package/test/graphic_references/06_chessboard_animation/base_1/promotion.png +0 -0
- package/test/graphic_references/06_chessboard_animation/base_2/capture.png +0 -0
- package/test/graphic_references/06_chessboard_animation/base_2/castling_move.png +0 -0
- package/test/graphic_references/06_chessboard_animation/base_2/en-passant.png +0 -0
- package/test/graphic_references/06_chessboard_animation/base_2/move_1.png +0 -0
- package/test/graphic_references/06_chessboard_animation/base_2/move_2.png +0 -0
- package/test/graphic_references/06_chessboard_animation/base_2/promotion.png +0 -0
- package/test/graphic_references/06_chessboard_animation/base_3/capture.png +0 -0
- package/test/graphic_references/06_chessboard_animation/base_3/castling_move.png +0 -0
- package/test/graphic_references/06_chessboard_animation/base_3/en-passant.png +0 -0
- package/test/graphic_references/06_chessboard_animation/base_3/move_1.png +0 -0
- package/test/graphic_references/06_chessboard_animation/base_3/move_2.png +0 -0
- package/test/graphic_references/06_chessboard_animation/base_3/promotion.png +0 -0
- package/test/graphic_references/06_chessboard_animation/on_redraw/final_state.png +0 -0
- package/test/graphic_references/06_chessboard_animation/on_redraw/initial_state.png +0 -0
- package/test/graphic_references/07_chessboard_interaction/edit_arrows/base_1.png +0 -0
- package/test/graphic_references/07_chessboard_interaction/edit_arrows/base_2.png +0 -0
- package/test/graphic_references/07_chessboard_interaction/edit_arrows/from_==_to.png +0 -0
- package/test/graphic_references/07_chessboard_interaction/edit_arrows/out_of_board.png +0 -0
- package/test/graphic_references/07_chessboard_interaction/edit_arrows/over_arrow_marker.png +0 -0
- package/test/graphic_references/07_chessboard_interaction/edit_arrows/over_square_marker.png +0 -0
- package/test/graphic_references/07_chessboard_interaction/error/edit_color_not_set.png +0 -0
- package/test/graphic_references/07_chessboard_interaction/error/wrong_interaction_mode.png +0 -0
- package/test/graphic_references/07_chessboard_interaction/move_pieces/after_move.png +0 -0
- package/test/graphic_references/07_chessboard_interaction/move_pieces/from_==_to.png +0 -0
- package/test/graphic_references/07_chessboard_interaction/move_pieces/move_empty_square.png +0 -0
- package/test/graphic_references/07_chessboard_interaction/move_pieces/out_of_board.png +0 -0
- package/test/graphic_references/07_chessboard_interaction/move_pieces/over_arrow_marker.png +0 -0
- package/test/graphic_references/07_chessboard_interaction/move_pieces/over_empty.png +0 -0
- package/test/graphic_references/07_chessboard_interaction/move_pieces/over_non-empty_1.png +0 -0
- package/test/graphic_references/07_chessboard_interaction/move_pieces/over_non-empty_2.png +0 -0
- package/test/graphic_references/07_chessboard_interaction/move_pieces/over_square_marker.png +0 -0
- package/test/graphic_references/07_chessboard_interaction/move_pieces/over_text_marker.png +0 -0
- package/test/graphic_references/08_chessboard_play_moves/base/castling_move.png +0 -0
- package/test/graphic_references/08_chessboard_play_moves/base/chess960_ambiguous_king_move.png +0 -0
- package/test/graphic_references/08_chessboard_play_moves/base/chess960_castling_move_1.png +0 -0
- package/test/graphic_references/08_chessboard_play_moves/base/chess960_castling_move_2.png +0 -0
- package/test/graphic_references/08_chessboard_play_moves/base/chess960_non-kxr_castling.png +0 -0
- package/test/graphic_references/08_chessboard_play_moves/base/from_==_to.png +0 -0
- package/test/graphic_references/08_chessboard_play_moves/base/illegal_move.png +0 -0
- package/test/graphic_references/08_chessboard_play_moves/base/illegal_position.png +0 -0
- package/test/graphic_references/08_chessboard_play_moves/base/out_of_board.png +0 -0
- package/test/graphic_references/08_chessboard_play_moves/base/regular_move_1.png +0 -0
- package/test/graphic_references/08_chessboard_play_moves/base/regular_move_2.png +0 -0
- package/test/graphic_references/08_chessboard_play_moves/base/wrong_color_moved.png +0 -0
- package/test/graphic_references/08_chessboard_play_moves/promotions/antichess_promotion.png +0 -0
- package/test/graphic_references/08_chessboard_play_moves/promotions/cancel_promotion.png +0 -0
- package/test/graphic_references/08_chessboard_play_moves/promotions/regular_promotion_1.png +0 -0
- package/test/graphic_references/08_chessboard_play_moves/promotions/regular_promotion_2.png +0 -0
- package/test/graphic_references/09_chessboard_small_screens/base/default.png +0 -0
- package/test/graphic_references/09_chessboard_small_screens/base/invalid_limits.png +0 -0
- package/test/graphic_references/09_chessboard_small_screens/base/width_690.png +0 -0
- package/test/graphic_references/09_chessboard_small_screens/base/width_700.png +0 -0
- package/test/graphic_references/09_chessboard_small_screens/base/width_710.png +0 -0
- package/test/graphic_references/09_chessboard_small_screens/base/width_720.png +0 -0
- package/test/graphic_references/09_chessboard_small_screens/base/width_730.png +0 -0
- package/test/graphic_references/09_chessboard_small_screens/base/width_740.png +0 -0
- package/test/graphic_references/09_chessboard_small_screens/base/width_750.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/base/game_1.png +0 -0
- package/test/graphic_references/10_movetext_graphic/base/game_2.png +0 -0
- package/test/graphic_references/10_movetext_graphic/base/game_3.png +0 -0
- package/test/graphic_references/10_movetext_graphic/base/game_4.png +0 -0
- package/test/graphic_references/10_movetext_graphic/error/pgn_parsing_error_1.png +0 -0
- package/test/graphic_references/10_movetext_graphic/error/pgn_parsing_error_2.png +0 -0
- package/test/graphic_references/10_movetext_graphic/error/wrong_game_index_1.png +0 -0
- package/test/graphic_references/10_movetext_graphic/error/wrong_game_index_2.png +0 -0
- package/test/graphic_references/10_movetext_graphic/error/wrong_game_index_type.png +0 -0
- package/test/graphic_references/10_movetext_graphic/error/wrong_game_type.png +0 -0
- package/test/graphic_references/10_movetext_graphic/format_move/format_text.png +0 -0
- package/test/graphic_references/10_movetext_graphic/html/filtered_tags_and_attributes.png +0 -0
- package/test/graphic_references/10_movetext_graphic/html/html_in_comments.png +0 -0
- package/test/graphic_references/10_movetext_graphic/html/html_in_headers.png +0 -0
- package/test/graphic_references/10_movetext_graphic/options/custom_piece_symbols.png +0 -0
- package/test/graphic_references/10_movetext_graphic/options/figurine_piece_symbols_and_diagram_options.png +0 -0
- package/test/graphic_references/10_movetext_graphic/options/hidden_diagrams.png +0 -0
- package/test/graphic_references/10_movetext_graphic/options/localized_piece_symbols.png +0 -0
- package/test/graphic_references/10_movetext_graphic/options/other_diagram_options.png +0 -0
- package/test/graphic_references/10_movetext_graphic/options/wrong_diagram_options_1.png +0 -0
- package/test/graphic_references/10_movetext_graphic/options/wrong_diagram_options_2.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/error/wrong_interaction_mode.png +0 -0
- package/test/graphic_references/11_movetext_interaction/select_moves/click_on_disabled.png +0 -0
- package/test/graphic_references/11_movetext_interaction/select_moves/click_on_unselected.png +0 -0
- package/test/graphic_references/11_movetext_interaction/select_moves/click_on_unselected_without_callback.png +0 -0
- package/test/graphic_references/11_movetext_interaction/select_moves/click_on_with_variations.png +0 -0
- package/test/graphic_references/12_navigation_board_base/controlled/default.png +0 -0
- package/test/graphic_references/12_navigation_board_base/controlled/forbidden_navigation_0.png +0 -0
- package/test/graphic_references/12_navigation_board_base/controlled/forbidden_navigation_1.png +0 -0
- package/test/graphic_references/12_navigation_board_base/controlled/invalid_node_id.png +0 -0
- package/test/graphic_references/12_navigation_board_base/controlled/no_callback_defined_0.png +0 -0
- package/test/graphic_references/12_navigation_board_base/controlled/no_callback_defined_1.png +0 -0
- package/test/graphic_references/12_navigation_board_base/controlled/overriding_initial_node_id.png +0 -0
- package/test/graphic_references/12_navigation_board_base/controlled/regular_navigation_0.png +0 -0
- package/test/graphic_references/12_navigation_board_base/controlled/regular_navigation_1.png +0 -0
- package/test/graphic_references/12_navigation_board_base/controlled/regular_navigation_2.png +0 -0
- package/test/graphic_references/12_navigation_board_base/controlled/regular_navigation_3.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/forbidden_navigation_at_beginning_0.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/forbidden_navigation_at_beginning_1.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/forbidden_navigation_at_beginning_2.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/forbidden_navigation_at_end_0.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/forbidden_navigation_at_end_1.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/forbidden_navigation_at_end_2.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/initial_state_at_end.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/initial_state_at_specific_id.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/initial_state_default.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/initial_state_default_with_game_index.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/initial_state_on_null-move.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/navigation_with_keys_0.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/navigation_with_keys_1.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/navigation_with_keys_2.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/navigation_with_keys_3.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/navigation_with_keys_4.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/regular_flipping_0.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/regular_flipping_1.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/regular_navigation_0.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/regular_navigation_1.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/regular_navigation_2.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/regular_navigation_3.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/regular_navigation_4.png +0 -0
- package/test/graphic_references/12_navigation_board_base/uncontrolled/regular_navigation_5.png +0 -0
- package/test/graphic_references/13_navigation_board_graphic/additional_buttons/error_1.png +0 -0
- package/test/graphic_references/13_navigation_board_graphic/additional_buttons/error_2.png +0 -0
- package/test/graphic_references/13_navigation_board_graphic/additional_buttons/multiple_buttons.png +0 -0
- package/test/graphic_references/13_navigation_board_graphic/additional_buttons/single_button.png +0 -0
- package/test/graphic_references/13_navigation_board_graphic/error/pgn_parsing_error.png +0 -0
- package/test/graphic_references/13_navigation_board_graphic/error/wrong_game_type.png +0 -0
- package/test/graphic_references/13_navigation_board_graphic/theme/custom_1.png +0 -0
- package/test/graphic_references/13_navigation_board_graphic/theme/custom_2.png +0 -0
- package/test/graphic_references/13_navigation_board_graphic/theme/large.png +0 -0
- package/test/graphic_references/13_navigation_board_graphic/theme/small.png +0 -0
- package/test/graphic_references/14_navigation_board_autoplay/controlled/after_1_move_acknowledging_is-playing_changes.png +0 -0
- package/test/graphic_references/14_navigation_board_autoplay/controlled/after_1_move_not_acknowledging_is-playing_changes.png +0 -0
- package/test/graphic_references/14_navigation_board_autoplay/controlled/after_2_moves_acknowledging_node_changes.png +0 -0
- package/test/graphic_references/14_navigation_board_autoplay/controlled/after_2_moves_not_acknowledging_node_changes.png +0 -0
- package/test/graphic_references/14_navigation_board_autoplay/controlled/after_reaching_the_end.png +0 -0
- package/test/graphic_references/14_navigation_board_autoplay/controlled/already_at_the_end.png +0 -0
- package/test/graphic_references/14_navigation_board_autoplay/controlled/initial_state_acknowledging_is-playing_changes.png +0 -0
- package/test/graphic_references/14_navigation_board_autoplay/controlled/initial_state_acknowledging_node_changes.png +0 -0
- package/test/graphic_references/14_navigation_board_autoplay/controlled/initial_state_at_the_end.png +0 -0
- package/test/graphic_references/14_navigation_board_autoplay/controlled/initial_state_close_to_end.png +0 -0
- package/test/graphic_references/14_navigation_board_autoplay/controlled/initial_state_not_acknowledging_is-playing_changes.png +0 -0
- package/test/graphic_references/14_navigation_board_autoplay/controlled/initial_state_not_acknowledging_node_changes.png +0 -0
- package/test/graphic_references/14_navigation_board_autoplay/uncontrolled/after_2_moves_from_beginning_after_stop.png +0 -0
- package/test/graphic_references/14_navigation_board_autoplay/uncontrolled/after_2_moves_from_beginning_before_stop.png +0 -0
- package/test/graphic_references/14_navigation_board_autoplay/uncontrolled/after_reaching_the_end_after_stop.png +0 -0
- package/test/graphic_references/14_navigation_board_autoplay/uncontrolled/after_reaching_the_end_before_stop.png +0 -0
- package/test/graphic_references/14_navigation_board_autoplay/uncontrolled/initial_state_close_to_end.png +0 -0
- package/test/graphic_references/14_navigation_board_autoplay/uncontrolled/initial_state_default.png +0 -0
- package/test/graphic_test_app/03_error_box_graphic/base.tsx +19 -7
- package/test/graphic_test_app/03_error_box_graphic/localization.tsx +1 -1
- package/test/graphic_test_app/04_icons_graphic/chess_piece.tsx +13 -4
- package/test/graphic_test_app/04_icons_graphic/marker.tsx +15 -5
- package/test/graphic_test_app/05_chessboard_graphic/annotations.tsx +8 -4
- package/test/graphic_test_app/05_chessboard_graphic/base.tsx +2 -2
- package/test/graphic_test_app/05_chessboard_graphic/chess_variants.tsx +1 -1
- package/test/graphic_test_app/05_chessboard_graphic/flipped.tsx +1 -1
- package/test/graphic_test_app/05_chessboard_graphic/move.tsx +10 -3
- package/test/graphic_test_app/05_chessboard_graphic/theme.tsx +2 -2
- package/test/graphic_test_app/06_chessboard_animation/base_1.tsx +1 -1
- package/test/graphic_test_app/06_chessboard_animation/base_2.tsx +1 -1
- package/test/graphic_test_app/06_chessboard_animation/base_3.tsx +1 -1
- package/test/graphic_test_app/06_chessboard_animation/on_redraw.tsx +9 -7
- package/test/graphic_test_app/07_chessboard_interaction/click_squares.tsx +5 -3
- package/test/graphic_test_app/07_chessboard_interaction/edit_arrows.tsx +5 -3
- package/test/graphic_test_app/07_chessboard_interaction/error.tsx +4 -2
- package/test/graphic_test_app/07_chessboard_interaction/move_pieces.tsx +5 -3
- package/test/graphic_test_app/08_chessboard_play_moves/base.tsx +13 -7
- package/test/graphic_test_app/08_chessboard_play_moves/promotions.tsx +13 -4
- package/test/graphic_test_app/09_chessboard_small_screens/base.tsx +4 -2
- package/test/graphic_test_app/09_chessboard_small_screens/top_bottom_components.tsx +9 -7
- package/test/graphic_test_app/10_movetext_graphic/base.tsx +1 -1
- package/test/graphic_test_app/10_movetext_graphic/error.tsx +2 -2
- package/test/graphic_test_app/10_movetext_graphic/format_move.tsx +1 -1
- package/test/graphic_test_app/10_movetext_graphic/html.tsx +1 -1
- package/test/graphic_test_app/10_movetext_graphic/options.tsx +17 -7
- package/test/graphic_test_app/11_movetext_interaction/error.tsx +5 -2
- package/test/graphic_test_app/11_movetext_interaction/select_moves.tsx +1 -1
- package/test/graphic_test_app/12_navigation_board_base/controlled.tsx +1 -1
- package/test/graphic_test_app/12_navigation_board_base/uncontrolled.tsx +1 -1
- package/test/graphic_test_app/13_navigation_board_graphic/additional_buttons.tsx +24 -17
- package/test/graphic_test_app/13_navigation_board_graphic/error.tsx +2 -2
- package/test/graphic_test_app/13_navigation_board_graphic/theme.tsx +1 -1
- package/test/graphic_test_app/14_navigation_board_autoplay/controlled.tsx +35 -19
- package/test/graphic_test_app/14_navigation_board_autoplay/uncontrolled.tsx +1 -1
- package/test/graphic_test_app/common/decs.d.ts +1 -1
- package/test/graphic_test_app/common/test_app.css +1 -1
- package/test/graphic_test_app/common/test_app.tsx +5 -5
- package/.eslintrc.yml +0 -83
- package/test/.eslintrc.yml +0 -8
- package/test/graphic_test_app/.eslintrc.yml +0 -3
- /package/doc_src/demo/{game-3.pgn → game-short.pgn} +0 -0
package/test/graphic_references/12_navigation_board_base/controlled/regular_navigation_3.png
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/test/graphic_references/12_navigation_board_base/uncontrolled/initial_state_at_end.png
CHANGED
|
Binary file
|
|
Binary file
|
package/test/graphic_references/12_navigation_board_base/uncontrolled/initial_state_default.png
CHANGED
|
Binary file
|
|
Binary file
|
package/test/graphic_references/12_navigation_board_base/uncontrolled/initial_state_on_null-move.png
CHANGED
|
Binary file
|
package/test/graphic_references/12_navigation_board_base/uncontrolled/navigation_with_keys_0.png
CHANGED
|
Binary file
|
package/test/graphic_references/12_navigation_board_base/uncontrolled/navigation_with_keys_1.png
CHANGED
|
Binary file
|
package/test/graphic_references/12_navigation_board_base/uncontrolled/navigation_with_keys_2.png
CHANGED
|
Binary file
|
package/test/graphic_references/12_navigation_board_base/uncontrolled/navigation_with_keys_3.png
CHANGED
|
Binary file
|
package/test/graphic_references/12_navigation_board_base/uncontrolled/navigation_with_keys_4.png
CHANGED
|
Binary file
|
package/test/graphic_references/12_navigation_board_base/uncontrolled/regular_flipping_0.png
CHANGED
|
Binary file
|
package/test/graphic_references/12_navigation_board_base/uncontrolled/regular_flipping_1.png
CHANGED
|
Binary file
|
package/test/graphic_references/12_navigation_board_base/uncontrolled/regular_navigation_0.png
CHANGED
|
Binary file
|
package/test/graphic_references/12_navigation_board_base/uncontrolled/regular_navigation_1.png
CHANGED
|
Binary file
|
package/test/graphic_references/12_navigation_board_base/uncontrolled/regular_navigation_2.png
CHANGED
|
Binary file
|
package/test/graphic_references/12_navigation_board_base/uncontrolled/regular_navigation_3.png
CHANGED
|
Binary file
|
package/test/graphic_references/12_navigation_board_base/uncontrolled/regular_navigation_4.png
CHANGED
|
Binary file
|
package/test/graphic_references/12_navigation_board_base/uncontrolled/regular_navigation_5.png
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/test/graphic_references/13_navigation_board_graphic/additional_buttons/multiple_buttons.png
CHANGED
|
Binary file
|
package/test/graphic_references/13_navigation_board_graphic/additional_buttons/single_button.png
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/test/graphic_references/14_navigation_board_autoplay/controlled/after_reaching_the_end.png
CHANGED
|
Binary file
|
package/test/graphic_references/14_navigation_board_autoplay/controlled/already_at_the_end.png
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/test/graphic_references/14_navigation_board_autoplay/controlled/initial_state_at_the_end.png
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/test/graphic_references/14_navigation_board_autoplay/uncontrolled/initial_state_default.png
CHANGED
|
Binary file
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* *
|
|
4
4
|
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
5
|
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
-
* Copyright (C) 2021-
|
|
6
|
+
* Copyright (C) 2021-2025 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
7
|
* *
|
|
8
8
|
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
@@ -37,12 +37,24 @@ testApp([ /* eslint-disable react/jsx-key */
|
|
|
37
37
|
<ErrorBox title="Too large error index" message="Nothing below" text="You will not see this..." errorIndex={100} />,
|
|
38
38
|
<ErrorBox title="Error index not an integer" message="Nothing below" text="You will not see this..." errorIndex={2.3} />,
|
|
39
39
|
|
|
40
|
-
<ErrorBox
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
<ErrorBox
|
|
41
|
+
title="Cut the end of the text"
|
|
42
|
+
message="and keep all the beginning"
|
|
43
|
+
text="| x <- the error is there and the rest of the line is cut because too long"
|
|
44
|
+
errorIndex={2}
|
|
45
|
+
/>,
|
|
46
|
+
<ErrorBox
|
|
47
|
+
title="Cut the beginning of the text"
|
|
48
|
+
message="and keep all the end"
|
|
49
|
+
text="The error is there -> x 234567890 234567890 234567890 234567890"
|
|
50
|
+
errorIndex={22} lineNumber={0}
|
|
51
|
+
/>,
|
|
52
|
+
<ErrorBox
|
|
53
|
+
title="Cut on line breaks"
|
|
54
|
+
message="both at the beginning and at the end"
|
|
55
|
+
text={'This is the first line\n| x |\nThis is the third line'}
|
|
56
|
+
errorIndex={25} lineNumber={2}
|
|
57
|
+
/>,
|
|
46
58
|
<ErrorBox title="Single character text" message="The text is 1-character long" text="x" errorIndex={0} lineNumber={1.1} />,
|
|
47
59
|
|
|
48
60
|
]); /* eslint-enable react/jsx-key */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* *
|
|
4
4
|
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
5
|
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
-
* Copyright (C) 2021-
|
|
6
|
+
* Copyright (C) 2021-2025 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
7
|
* *
|
|
8
8
|
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* *
|
|
4
4
|
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
5
|
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
-
* Copyright (C) 2021-
|
|
6
|
+
* Copyright (C) 2021-2025 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
7
|
* *
|
|
8
8
|
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
@@ -32,9 +32,18 @@ testApp([ /* eslint-disable react/jsx-key */
|
|
|
32
32
|
<ChessPieceIcon size={24} type={[ 'bb', 'wx', 'wx', 'wn', 'bx', 'bk', 'bk' ]} />,
|
|
33
33
|
<ChessPieceIcon size={36} type={[ 'wr', 'wb', 'bq' ]} pieceset="eyes" />,
|
|
34
34
|
|
|
35
|
-
<ChessPieceIcon
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
<ChessPieceIcon
|
|
36
|
+
size={/* eslint-disable @typescript-eslint/no-explicit-any */ 'not-a-number' as any /* eslint-enable @typescript-eslint/no-explicit-any */}
|
|
37
|
+
type="wq"
|
|
38
|
+
/>,
|
|
39
|
+
<ChessPieceIcon
|
|
40
|
+
size={40}
|
|
41
|
+
type={/* eslint-disable @typescript-eslint/no-explicit-any */ 'invalid' as any /* eslint-enable @typescript-eslint/no-explicit-any */}
|
|
42
|
+
/>,
|
|
43
|
+
<ChessPieceIcon
|
|
44
|
+
size={40}
|
|
45
|
+
type={[ 'bb', /* eslint-disable @typescript-eslint/no-explicit-any */ 'zp' as any /* eslint-enable @typescript-eslint/no-explicit-any */ ]}
|
|
46
|
+
/>,
|
|
38
47
|
<ChessPieceIcon size={40} type="wq" pieceset="not-a-pieceset" />,
|
|
39
48
|
|
|
40
49
|
]); /* eslint-enable react/jsx-key */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* *
|
|
4
4
|
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
5
|
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
-
* Copyright (C) 2021-
|
|
6
|
+
* Copyright (C) 2021-2025 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
7
|
* *
|
|
8
8
|
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
@@ -31,19 +31,29 @@ testApp([ /* eslint-disable react/jsx-key */
|
|
|
31
31
|
<SquareMarkerIcon size={40} />,
|
|
32
32
|
<SquareMarkerIcon size={45} color="green" />,
|
|
33
33
|
<div style={{ color: 'purple' }}><SquareMarkerIcon size={31} /></div>,
|
|
34
|
-
<SquareMarkerIcon
|
|
34
|
+
<SquareMarkerIcon
|
|
35
|
+
size={/* eslint-disable @typescript-eslint/no-explicit-any */ 'not-a-number' as any /* eslint-enable @typescript-eslint/no-explicit-any */}
|
|
36
|
+
/>,
|
|
35
37
|
|
|
36
38
|
<TextMarkerIcon size={41} symbol="A" />,
|
|
37
39
|
<TextMarkerIcon size={29} symbol="b" color="#0ff" />,
|
|
38
40
|
<div style={{ color: 'red' }}><TextMarkerIcon size={53} symbol="5" /></div>,
|
|
39
41
|
<TextMarkerIcon size={47} symbol="dot" color="#00f" />,
|
|
40
42
|
<div style={{ color: 'pink' }}><TextMarkerIcon size={48} symbol="circle" /></div>,
|
|
41
|
-
<TextMarkerIcon
|
|
42
|
-
|
|
43
|
+
<TextMarkerIcon
|
|
44
|
+
size={/* eslint-disable @typescript-eslint/no-explicit-any */ 'not-a-number' as any /* eslint-enable @typescript-eslint/no-explicit-any */}
|
|
45
|
+
symbol="A"
|
|
46
|
+
/>,
|
|
47
|
+
<TextMarkerIcon
|
|
48
|
+
size={40}
|
|
49
|
+
symbol={/* eslint-disable @typescript-eslint/no-explicit-any */ 'not-a-symbol' as any /* eslint-enable @typescript-eslint/no-explicit-any */}
|
|
50
|
+
/>,
|
|
43
51
|
|
|
44
52
|
<ArrowMarkerIcon size={40} />,
|
|
45
53
|
<ArrowMarkerIcon size={24} color="#888" />,
|
|
46
54
|
<div style={{ color: '#f70' }}><ArrowMarkerIcon size={48} /></div>,
|
|
47
|
-
<ArrowMarkerIcon
|
|
55
|
+
<ArrowMarkerIcon
|
|
56
|
+
size={/* eslint-disable @typescript-eslint/no-explicit-any */ 'not-a-number' as any /* eslint-enable @typescript-eslint/no-explicit-any */}
|
|
57
|
+
/>,
|
|
48
58
|
|
|
49
59
|
]); /* eslint-enable react/jsx-key */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* *
|
|
4
4
|
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
5
|
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
-
* Copyright (C) 2021-
|
|
6
|
+
* Copyright (C) 2021-2025 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
7
|
* *
|
|
8
8
|
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
@@ -52,7 +52,11 @@ testApp([ /* eslint-disable react/jsx-key */
|
|
|
52
52
|
<Chessboard squareMarkers={squareMarkers1} arrowMarkers={arrowMarkers1} textMarkers={textMarkers1} flipped={true} coordinateVisible={true} />,
|
|
53
53
|
<Chessboard squareMarkers={squareMarkers2} arrowMarkers={arrowMarkers2} textMarkers={textMarkers2} flipped={false} coordinateVisible={false} />,
|
|
54
54
|
<Chessboard squareMarkers={squareMarkers2} arrowMarkers={arrowMarkers2} textMarkers={textMarkers2} flipped={true} coordinateVisible={false} />,
|
|
55
|
-
<Chessboard
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
<Chessboard
|
|
56
|
+
squareMarkers={squareMarkers3} arrowMarkers={arrowMarkers3} textMarkers={textMarkers3} flipped={false} coordinateVisible={false} position="empty"
|
|
57
|
+
/>,
|
|
58
|
+
<Chessboard
|
|
59
|
+
squareMarkers={squareMarkers3} arrowMarkers={arrowMarkers3} textMarkers={textMarkers3} flipped={true} coordinateVisible={true}
|
|
60
|
+
position="8/8/1r6/8/5k1K/8/8/8 b - - 0 1"
|
|
61
|
+
/>,
|
|
58
62
|
]); /* eslint-enable react/jsx-key */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* *
|
|
4
4
|
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
5
|
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
-
* Copyright (C) 2021-
|
|
6
|
+
* Copyright (C) 2021-2025 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
7
|
* *
|
|
8
8
|
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
@@ -33,5 +33,5 @@ testApp([ /* eslint-disable react/jsx-key */
|
|
|
33
33
|
<Chessboard position="something invalid" />,
|
|
34
34
|
<Chessboard position="r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R b KQkq - 3 3" turnVisible={false} />,
|
|
35
35
|
<Chessboard position={new Position('8/8/1r6/8/5k1K/8/8/8 b - - 0 1')} />,
|
|
36
|
-
<Chessboard position={
|
|
36
|
+
<Chessboard position={/* eslint-disable @typescript-eslint/no-explicit-any */ 42 as any /* eslint-enable @typescript-eslint/no-explicit-any */} />,
|
|
37
37
|
]); /* eslint-enable react/jsx-key */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* *
|
|
4
4
|
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
5
|
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
-
* Copyright (C) 2021-
|
|
6
|
+
* Copyright (C) 2021-2025 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
7
|
* *
|
|
8
8
|
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* *
|
|
4
4
|
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
5
|
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
-
* Copyright (C) 2021-
|
|
6
|
+
* Copyright (C) 2021-2025 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
7
|
* *
|
|
8
8
|
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* *
|
|
4
4
|
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
5
|
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
-
* Copyright (C) 2021-
|
|
6
|
+
* Copyright (C) 2021-2025 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
7
|
* *
|
|
8
8
|
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
@@ -39,8 +39,15 @@ testApp([ /* eslint-disable react/jsx-key */
|
|
|
39
39
|
<Chessboard position="r3k2r/pppppppp/8/8/8/8/PPPPPPPP/R3K2R b KQkq - 0 1" move="O-O-O" animated={false} moveArrowColor="r" />,
|
|
40
40
|
<Chessboard position="rnbqkbnr/ppp1p1pp/8/3pPp2/8/8/PPPP1PPP/RNBQKBNR w KQkq f6 0 3" move="exf6" animated={false} moveArrowColor="y" />,
|
|
41
41
|
<Chessboard position="8/8/8/1K6/8/4k3/1p6/8 b - - 0 1" move="b1=R+" animated={false} moveArrowColor="b" />,
|
|
42
|
-
<Chessboard
|
|
43
|
-
|
|
42
|
+
<Chessboard
|
|
43
|
+
move={/* eslint-disable @typescript-eslint/no-explicit-any */ 42 as any /* eslint-enable @typescript-eslint/no-explicit-any */}
|
|
44
|
+
animated={false}
|
|
45
|
+
/>,
|
|
46
|
+
<Chessboard
|
|
47
|
+
move="e4"
|
|
48
|
+
animated={false}
|
|
49
|
+
moveArrowColor={/* eslint-disable @typescript-eslint/no-explicit-any */ 'z' as any /* eslint-enable @typescript-eslint/no-explicit-any */}
|
|
50
|
+
/>,
|
|
44
51
|
<Chessboard move="--" animated={false} />,
|
|
45
52
|
<Chessboard position="rnbqkbnr/ppp1pppp/8/1B1p4/4P3/8/PPPP1PPP/RNBQK1NR b KQkq - 1 2" move="--" animated={false} />,
|
|
46
53
|
]); /* eslint-enable react/jsx-key */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* *
|
|
4
4
|
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
5
|
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
-
* Copyright (C) 2021-
|
|
6
|
+
* Copyright (C) 2021-2025 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
7
|
* *
|
|
8
8
|
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
@@ -45,7 +45,7 @@ testApp([ /* eslint-disable react/jsx-key */
|
|
|
45
45
|
<Chessboard position={pos1} move={mv1} squareMarkers={sm} arrowMarkers={am} colorset="emerald" pieceset="skulls" animated={false} />,
|
|
46
46
|
<Chessboard position={pos2} move={mv2} squareMarkers={sm} arrowMarkers={am} squareSize={91} flipped={true} colorset="gray" pieceset="spatial" animated={false} />,
|
|
47
47
|
<Chessboard position={pos1} move={mv1} squareMarkers={sm} arrowMarkers={am} squareSize={17} colorset="dusk" animated={false} />,
|
|
48
|
-
<Chessboard squareSize={
|
|
48
|
+
<Chessboard squareSize={/* eslint-disable @typescript-eslint/no-explicit-any */ '24' as any /* eslint-enable @typescript-eslint/no-explicit-any */} />,
|
|
49
49
|
<Chessboard colorset="not-a-colorset" />,
|
|
50
50
|
<Chessboard pieceset="not-a-pieceset" />,
|
|
51
51
|
]); /* eslint-enable react/jsx-key */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* *
|
|
4
4
|
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
5
|
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
-
* Copyright (C) 2021-
|
|
6
|
+
* Copyright (C) 2021-2025 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
7
|
* *
|
|
8
8
|
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* *
|
|
4
4
|
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
5
|
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
-
* Copyright (C) 2021-
|
|
6
|
+
* Copyright (C) 2021-2025 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
7
|
* *
|
|
8
8
|
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* *
|
|
4
4
|
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
5
|
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
-
* Copyright (C) 2021-
|
|
6
|
+
* Copyright (C) 2021-2025 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
7
|
* *
|
|
8
8
|
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* *
|
|
4
4
|
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
5
|
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
-
* Copyright (C) 2021-
|
|
6
|
+
* Copyright (C) 2021-2025 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
7
|
* *
|
|
8
8
|
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
@@ -37,12 +37,14 @@ function TestComponent() {
|
|
|
37
37
|
setClicked(true);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
return (
|
|
41
|
-
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
return (
|
|
41
|
+
<>
|
|
42
|
+
<div>
|
|
43
|
+
<Chessboard position={position} move={move} animated={true} />
|
|
44
|
+
</div>
|
|
45
|
+
{clicked ? undefined : <button id="chessboard-action-button" onClick={onClick}>Click here</button>}
|
|
46
|
+
</>
|
|
47
|
+
);
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* *
|
|
4
4
|
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
5
|
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
-
* Copyright (C) 2021-
|
|
6
|
+
* Copyright (C) 2021-2025 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
7
|
* *
|
|
8
8
|
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
@@ -34,6 +34,8 @@ function onSquareClicked(sq: Square) {
|
|
|
34
34
|
testApp([ /* eslint-disable react/jsx-key */
|
|
35
35
|
<Chessboard squareSize={50} interactionMode="clickSquares" onSquareClicked={onSquareClicked} />,
|
|
36
36
|
<Chessboard squareSize={50} interactionMode="clickSquares" onSquareClicked={onSquareClicked} flipped coordinateVisible={false} />,
|
|
37
|
-
<Chessboard
|
|
38
|
-
|
|
37
|
+
<Chessboard
|
|
38
|
+
squareSize={50} interactionMode="clickSquares" onSquareClicked={onSquareClicked} position="empty"
|
|
39
|
+
squareMarkers="Ga8" arrowMarkers="Ra6d6" textMarkers="YAb4"
|
|
40
|
+
/>,
|
|
39
41
|
]); /* eslint-enable react/jsx-key */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* *
|
|
4
4
|
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
5
|
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
-
* Copyright (C) 2021-
|
|
6
|
+
* Copyright (C) 2021-2025 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
7
|
* *
|
|
8
8
|
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
@@ -33,6 +33,8 @@ function onArrowEdited(from: Square, to: Square) {
|
|
|
33
33
|
|
|
34
34
|
testApp([ /* eslint-disable react/jsx-key */
|
|
35
35
|
<Chessboard squareSize={50} coordinateVisible={false} interactionMode="editArrows" onArrowEdited={onArrowEdited} editedArrowColor="g" />,
|
|
36
|
-
<Chessboard
|
|
37
|
-
|
|
36
|
+
<Chessboard
|
|
37
|
+
squareSize={50} coordinateVisible={false} interactionMode="editArrows" onArrowEdited={onArrowEdited} editedArrowColor="r" flipped
|
|
38
|
+
squareMarkers="Gc5" arrowMarkers="Yh3f6"
|
|
39
|
+
/>,
|
|
38
40
|
]); /* eslint-enable react/jsx-key */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* *
|
|
4
4
|
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
5
|
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
-
* Copyright (C) 2021-
|
|
6
|
+
* Copyright (C) 2021-2025 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
7
|
* *
|
|
8
8
|
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
@@ -27,6 +27,8 @@ import { testApp } from '../common/test_app';
|
|
|
27
27
|
import { Chessboard } from '../../../dist/lib/index';
|
|
28
28
|
|
|
29
29
|
testApp([ /* eslint-disable react/jsx-key */
|
|
30
|
-
<Chessboard
|
|
30
|
+
<Chessboard
|
|
31
|
+
interactionMode={/* eslint-disable @typescript-eslint/no-explicit-any */ 'whatever' as any /* eslint-enable @typescript-eslint/no-explicit-any */}
|
|
32
|
+
/>,
|
|
31
33
|
<Chessboard interactionMode="editArrows" />,
|
|
32
34
|
]); /* eslint-enable react/jsx-key */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* *
|
|
4
4
|
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
5
|
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
-
* Copyright (C) 2021-
|
|
6
|
+
* Copyright (C) 2021-2025 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
7
|
* *
|
|
8
8
|
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
@@ -33,7 +33,9 @@ function onPieceMoved(from: Square, to: Square) {
|
|
|
33
33
|
|
|
34
34
|
testApp([ /* eslint-disable react/jsx-key */
|
|
35
35
|
<Chessboard squareSize={50} coordinateVisible={false} interactionMode="movePieces" onPieceMoved={onPieceMoved} />,
|
|
36
|
-
<Chessboard
|
|
37
|
-
|
|
36
|
+
<Chessboard
|
|
37
|
+
squareSize={50} coordinateVisible={false} interactionMode="movePieces" onPieceMoved={onPieceMoved} flipped
|
|
38
|
+
squareMarkers="Gc4" textMarkers="BAh3" arrowMarkers="Gc8a4" moveArrowColor="r"
|
|
39
|
+
/>,
|
|
38
40
|
<Chessboard squareSize={50} coordinateVisible={false} interactionMode="movePieces" onPieceMoved={onPieceMoved} move="e4" animated={false} />,
|
|
39
41
|
]); /* eslint-enable react/jsx-key */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* *
|
|
4
4
|
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
5
|
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
-
* Copyright (C) 2021-
|
|
6
|
+
* Copyright (C) 2021-2025 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
7
|
* *
|
|
8
8
|
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
@@ -32,10 +32,16 @@ function onMovePlayed(move: string) {
|
|
|
32
32
|
|
|
33
33
|
testApp([ /* eslint-disable react/jsx-key */
|
|
34
34
|
<Chessboard squareSize={50} coordinateVisible={false} interactionMode="playMoves" onMovePlayed={onMovePlayed} />,
|
|
35
|
-
<Chessboard
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<Chessboard
|
|
40
|
-
|
|
35
|
+
<Chessboard
|
|
36
|
+
squareSize={50} coordinateVisible={false} interactionMode="playMoves" onMovePlayed={onMovePlayed}
|
|
37
|
+
flipped position="rnbqk2r/ppp2ppp/3p1n2/2b1p3/4P3/2NP1N2/PPP2PPP/R1BQKB1R w KQkq - 0 1" move="Bg5" animated={false} moveArrowColor="g"
|
|
38
|
+
/>,
|
|
39
|
+
<Chessboard
|
|
40
|
+
squareSize={50} coordinateVisible={false} interactionMode="playMoves" onMovePlayed={onMovePlayed}
|
|
41
|
+
position="rnbq1bnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQ - 0 1"
|
|
42
|
+
/>,
|
|
43
|
+
<Chessboard
|
|
44
|
+
squareSize={50} coordinateVisible={false} interactionMode="playMoves" onMovePlayed={onMovePlayed}
|
|
45
|
+
position="chess960:1r3k1r/pppppppp/8/8/8/8/PPPPPPPP/1R3K1R w BHbh - 0 1"
|
|
46
|
+
/>,
|
|
41
47
|
]); /* eslint-enable react/jsx-key */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* *
|
|
4
4
|
* Kokopu-React - A React-based library of chess-related components. *
|
|
5
5
|
* <https://www.npmjs.com/package/kokopu-react> *
|
|
6
|
-
* Copyright (C) 2021-
|
|
6
|
+
* Copyright (C) 2021-2025 Yoann Le Montagner <yo35 -at- melix.net> *
|
|
7
7
|
* *
|
|
8
8
|
* Kokopu-React is free software: you can redistribute it and/or *
|
|
9
9
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
@@ -31,7 +31,16 @@ function onMovePlayed(move: string) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
testApp([ /* eslint-disable react/jsx-key */
|
|
34
|
-
<Chessboard
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
<Chessboard
|
|
35
|
+
squareSize={50} coordinateVisible={false} interactionMode="playMoves" onMovePlayed={onMovePlayed}
|
|
36
|
+
position="8/1P6/8/8/7k/8/5K2/8 w - - 0 1"
|
|
37
|
+
/>,
|
|
38
|
+
<Chessboard
|
|
39
|
+
squareSize={50} coordinateVisible={false} interactionMode="playMoves" onMovePlayed={onMovePlayed}
|
|
40
|
+
position="8/8/8/8/7k/8/1p3K2/R7 b - - 0 1"
|
|
41
|
+
/>,
|
|
42
|
+
<Chessboard
|
|
43
|
+
squareSize={50} coordinateVisible={false} interactionMode="playMoves" onMovePlayed={onMovePlayed}
|
|
44
|
+
flipped position="antichess:8/1P6/8/8/7r/8/5K2/8 w - - 0 1"
|
|
45
|
+
/>,
|
|
37
46
|
]); /* eslint-enable react/jsx-key */
|