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.
Files changed (250) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/lib/chessboard/BoardProperties.d.ts +91 -0
  3. package/dist/lib/chessboard/BoardProperties.js +43 -0
  4. package/dist/lib/chessboard/BoardProperties.js.map +1 -0
  5. package/dist/lib/chessboard/Chessboard.css +7 -5
  6. package/dist/lib/chessboard/Chessboard.d.ts +36 -58
  7. package/dist/lib/chessboard/Chessboard.js +33 -97
  8. package/dist/lib/chessboard/Chessboard.js.map +1 -1
  9. package/dist/lib/chessboard/ChessboardImpl.d.ts +22 -0
  10. package/dist/lib/chessboard/ChessboardImpl.js +8 -6
  11. package/dist/lib/chessboard/ChessboardImpl.js.map +1 -1
  12. package/dist/lib/chessboard/Draggable.d.ts +22 -0
  13. package/dist/lib/chessboard/Draggable.js +7 -5
  14. package/dist/lib/chessboard/Draggable.js.map +1 -1
  15. package/dist/lib/chessboard/Motion.d.ts +22 -0
  16. package/dist/lib/chessboard/Motion.js +7 -5
  17. package/dist/lib/chessboard/Motion.js.map +1 -1
  18. package/dist/lib/chessboard/colorsets.d.ts +22 -0
  19. package/dist/lib/chessboard/colorsets.js +7 -5
  20. package/dist/lib/chessboard/colorsets.js.map +1 -1
  21. package/dist/lib/chessboard/piecesets.d.ts +22 -0
  22. package/dist/lib/chessboard/piecesets.js +7 -5
  23. package/dist/lib/chessboard/piecesets.js.map +1 -1
  24. package/dist/lib/errorbox/ErrorBox.css +7 -5
  25. package/dist/lib/errorbox/ErrorBox.d.ts +22 -0
  26. package/dist/lib/errorbox/ErrorBox.js +7 -5
  27. package/dist/lib/errorbox/ErrorBox.js.map +1 -1
  28. package/dist/lib/errorbox/parsing.d.ts +57 -0
  29. package/dist/lib/errorbox/parsing.js +140 -0
  30. package/dist/lib/errorbox/parsing.js.map +1 -0
  31. package/dist/lib/exception.d.ts +22 -0
  32. package/dist/lib/exception.js +7 -5
  33. package/dist/lib/exception.js.map +1 -1
  34. package/dist/lib/i18n.d.ts +27 -0
  35. package/dist/lib/i18n.js +13 -5
  36. package/dist/lib/i18n.js.map +1 -1
  37. package/dist/lib/icons/AnnotationSymbolShape.css +7 -5
  38. package/dist/lib/icons/AnnotationSymbolShape.d.ts +22 -0
  39. package/dist/lib/icons/AnnotationSymbolShape.js +7 -5
  40. package/dist/lib/icons/AnnotationSymbolShape.js.map +1 -1
  41. package/dist/lib/icons/ArrowMarkerIcon.d.ts +22 -0
  42. package/dist/lib/icons/ArrowMarkerIcon.js +7 -5
  43. package/dist/lib/icons/ArrowMarkerIcon.js.map +1 -1
  44. package/dist/lib/icons/ArrowTip.d.ts +22 -0
  45. package/dist/lib/icons/ArrowTip.js +7 -5
  46. package/dist/lib/icons/ArrowTip.js.map +1 -1
  47. package/dist/lib/icons/ChessPieceIcon.d.ts +22 -0
  48. package/dist/lib/icons/ChessPieceIcon.js +7 -5
  49. package/dist/lib/icons/ChessPieceIcon.js.map +1 -1
  50. package/dist/lib/icons/SquareMarkerIcon.d.ts +22 -0
  51. package/dist/lib/icons/SquareMarkerIcon.js +7 -5
  52. package/dist/lib/icons/SquareMarkerIcon.js.map +1 -1
  53. package/dist/lib/icons/TextMarkerIcon.d.ts +22 -0
  54. package/dist/lib/icons/TextMarkerIcon.js +7 -5
  55. package/dist/lib/icons/TextMarkerIcon.js.map +1 -1
  56. package/dist/lib/icons/arrow.css +7 -5
  57. package/dist/lib/index.d.ts +26 -1
  58. package/dist/lib/index.js +9 -5
  59. package/dist/lib/index.js.map +1 -1
  60. package/dist/lib/movetext/Movetext.css +7 -18
  61. package/dist/lib/movetext/Movetext.d.ts +31 -43
  62. package/dist/lib/movetext/Movetext.js +22 -72
  63. package/dist/lib/movetext/Movetext.js.map +1 -1
  64. package/dist/lib/movetext/MovetextImpl.d.ts +29 -28
  65. package/dist/lib/movetext/MovetextImpl.js +22 -99
  66. package/dist/lib/movetext/MovetextImpl.js.map +1 -1
  67. package/dist/lib/movetext/fonts.css +7 -5
  68. package/dist/lib/movetext/htmlFilter.d.ts +22 -0
  69. package/dist/lib/movetext/htmlFilter.js +21 -19
  70. package/dist/lib/movetext/htmlFilter.js.map +1 -1
  71. package/dist/lib/movetext/moveFormatter.d.ts +22 -0
  72. package/dist/lib/movetext/moveFormatter.js +7 -5
  73. package/dist/lib/movetext/moveFormatter.js.map +1 -1
  74. package/dist/lib/navigationboard/NavigationBoard.d.ts +118 -0
  75. package/dist/lib/navigationboard/NavigationBoard.js +112 -0
  76. package/dist/lib/navigationboard/NavigationBoard.js.map +1 -0
  77. package/dist/lib/navigationboard/NavigationField.css +36 -0
  78. package/dist/lib/navigationboard/NavigationField.d.ts +81 -0
  79. package/dist/lib/navigationboard/NavigationField.js +154 -0
  80. package/dist/lib/navigationboard/NavigationField.js.map +1 -0
  81. package/dist/lib/navigationboard/NavigationToolbar.css +51 -0
  82. package/dist/lib/navigationboard/NavigationToolbar.d.ts +41 -0
  83. package/dist/lib/navigationboard/NavigationToolbar.js +124 -0
  84. package/dist/lib/navigationboard/NavigationToolbar.js.map +1 -0
  85. package/dist/lib/sanitization.d.ts +22 -0
  86. package/dist/lib/sanitization.js +7 -5
  87. package/dist/lib/sanitization.js.map +1 -1
  88. package/dist/lib/types.d.ts +22 -0
  89. package/dist/lib/types.js +7 -5
  90. package/dist/lib/types.js.map +1 -1
  91. package/dist/lib/util.d.ts +22 -0
  92. package/dist/lib/util.js +7 -5
  93. package/dist/lib/util.js.map +1 -1
  94. package/doc_src/demo/PageChessboardBase.tsx +7 -5
  95. package/doc_src/demo/PageChessboardInteraction.tsx +32 -22
  96. package/doc_src/demo/PageChessboardMove.tsx +24 -5
  97. package/doc_src/demo/PageChessboardSmallScreens.tsx +7 -5
  98. package/doc_src/demo/PageMovetextBase.tsx +7 -5
  99. package/doc_src/demo/PageMovetextInteraction.tsx +7 -5
  100. package/doc_src/demo/PageNavigationBoardBase.tsx +194 -0
  101. package/doc_src/demo/PageNavigationBoardUncontrolledVsControlled.tsx +114 -0
  102. package/doc_src/demo/decs.d.ts +7 -5
  103. package/doc_src/demo/demo.css +7 -5
  104. package/doc_src/demo/game-3.pgn +10 -0
  105. package/doc_src/demo/util.ts +7 -5
  106. package/doc_src/examples/Movetext.md +1 -1
  107. package/doc_src/examples/NavigationBoard.md +15 -0
  108. package/doc_src/theming/LogoRenderer.js +7 -5
  109. package/doc_src/theming/theming.css +7 -5
  110. package/package.json +27 -26
  111. package/scripts/doc.styleguide.config.js +19 -7
  112. package/scripts/docker-compose.yml +3 -3
  113. package/scripts/test-graphic.webpack.config.js +7 -5
  114. package/scripts/test-headless.webpack.config.js +7 -5
  115. package/src/chessboard/BoardProperties.ts +131 -0
  116. package/src/chessboard/Chessboard.css +7 -5
  117. package/src/chessboard/Chessboard.tsx +48 -175
  118. package/src/chessboard/ChessboardImpl.tsx +7 -5
  119. package/src/chessboard/Draggable.tsx +7 -5
  120. package/src/chessboard/Motion.tsx +7 -5
  121. package/src/chessboard/colorsets.ts +7 -5
  122. package/src/chessboard/piecesets.ts +7 -5
  123. package/src/decs.d.ts +7 -5
  124. package/src/errorbox/ErrorBox.css +7 -5
  125. package/src/errorbox/ErrorBox.tsx +7 -5
  126. package/src/errorbox/parsing.tsx +158 -0
  127. package/src/exception.ts +7 -5
  128. package/src/i18n.ts +14 -5
  129. package/src/icons/AnnotationSymbolShape.css +7 -5
  130. package/src/icons/AnnotationSymbolShape.tsx +7 -5
  131. package/src/icons/ArrowMarkerIcon.tsx +7 -5
  132. package/src/icons/ArrowTip.tsx +7 -5
  133. package/src/icons/ChessPieceIcon.tsx +7 -5
  134. package/src/icons/SquareMarkerIcon.tsx +7 -5
  135. package/src/icons/TextMarkerIcon.tsx +7 -5
  136. package/src/icons/arrow.css +7 -5
  137. package/src/index.ts +12 -6
  138. package/src/movetext/Movetext.css +7 -18
  139. package/src/movetext/Movetext.tsx +27 -90
  140. package/src/movetext/MovetextImpl.tsx +35 -120
  141. package/src/movetext/fonts.css +7 -5
  142. package/src/movetext/htmlFilter.tsx +7 -5
  143. package/src/movetext/moveFormatter.tsx +7 -5
  144. package/src/navigationboard/NavigationBoard.tsx +231 -0
  145. package/src/navigationboard/NavigationField.css +36 -0
  146. package/src/navigationboard/NavigationField.tsx +185 -0
  147. package/src/navigationboard/NavigationToolbar.css +51 -0
  148. package/src/navigationboard/NavigationToolbar.tsx +174 -0
  149. package/src/sanitization.ts +7 -5
  150. package/src/types.ts +7 -5
  151. package/src/util.ts +7 -5
  152. package/test/01_types.js +7 -5
  153. package/test/02_chessboard_util.js +7 -5
  154. package/test/03_error_box_graphic.js +7 -5
  155. package/test/04_icons_graphic.js +7 -5
  156. package/test/05_chessboard_graphic.js +9 -5
  157. package/test/06_chessboard_animation.js +7 -5
  158. package/test/07_chessboard_interaction.js +7 -5
  159. package/test/08_chessboard_play_moves.js +7 -5
  160. package/test/09_chessboard_small_screens.js +28 -5
  161. package/test/10_movetext_graphic.js +12 -5
  162. package/test/11_movetext_interaction.js +19 -13
  163. package/test/12_navigation_board.js +168 -0
  164. package/test/common/graphic.js +7 -5
  165. package/test/graphic_references/05_chessboard_graphic/move/illegal_null-move.png +0 -0
  166. package/test/graphic_references/05_chessboard_graphic/move/null-move.png +0 -0
  167. package/test/graphic_references/09_chessboard_small_screens/top_bottom_components/default_bottom_component.png +0 -0
  168. package/test/graphic_references/09_chessboard_small_screens/top_bottom_components/default_top_component.png +0 -0
  169. package/test/graphic_references/09_chessboard_small_screens/top_bottom_components/reduced_bottom_component.png +0 -0
  170. package/test/graphic_references/09_chessboard_small_screens/top_bottom_components/reduced_top_component.png +0 -0
  171. package/test/graphic_references/10_movetext_graphic/format_move/format_text.png +0 -0
  172. package/test/graphic_references/10_movetext_graphic/options/wrong_piece_symbol_value.png +0 -0
  173. package/test/graphic_references/11_movetext_interaction/select_moves/click_on_unselected_without_callback.png +0 -0
  174. package/test/graphic_references/12_navigation_board/controlled/default.png +0 -0
  175. package/test/graphic_references/12_navigation_board/controlled/forbidden_navigation_0.png +0 -0
  176. package/test/graphic_references/12_navigation_board/controlled/forbidden_navigation_1.png +0 -0
  177. package/test/graphic_references/12_navigation_board/controlled/invalid_node_id.png +0 -0
  178. package/test/graphic_references/12_navigation_board/controlled/no_callback_defined_0.png +0 -0
  179. package/test/graphic_references/12_navigation_board/controlled/no_callback_defined_1.png +0 -0
  180. package/test/graphic_references/12_navigation_board/controlled/overriding_initial_node_id.png +0 -0
  181. package/test/graphic_references/12_navigation_board/controlled/regular_navigation_0.png +0 -0
  182. package/test/graphic_references/12_navigation_board/controlled/regular_navigation_1.png +0 -0
  183. package/test/graphic_references/12_navigation_board/controlled/regular_navigation_2.png +0 -0
  184. package/test/graphic_references/12_navigation_board/controlled/regular_navigation_3.png +0 -0
  185. package/test/graphic_references/12_navigation_board/error/pgn_parsing_error.png +0 -0
  186. package/test/graphic_references/12_navigation_board/error/wrong_game_type.png +0 -0
  187. package/test/graphic_references/12_navigation_board/theme/custom_1.png +0 -0
  188. package/test/graphic_references/12_navigation_board/theme/custom_2.png +0 -0
  189. package/test/graphic_references/12_navigation_board/theme/large.png +0 -0
  190. package/test/graphic_references/12_navigation_board/theme/small.png +0 -0
  191. package/test/graphic_references/12_navigation_board/uncontrolled/forbidden_navigation_at_beginning_0.png +0 -0
  192. package/test/graphic_references/12_navigation_board/uncontrolled/forbidden_navigation_at_beginning_1.png +0 -0
  193. package/test/graphic_references/12_navigation_board/uncontrolled/forbidden_navigation_at_beginning_2.png +0 -0
  194. package/test/graphic_references/12_navigation_board/uncontrolled/forbidden_navigation_at_end_0.png +0 -0
  195. package/test/graphic_references/12_navigation_board/uncontrolled/forbidden_navigation_at_end_1.png +0 -0
  196. package/test/graphic_references/12_navigation_board/uncontrolled/forbidden_navigation_at_end_2.png +0 -0
  197. package/test/graphic_references/12_navigation_board/uncontrolled/initial_state_at_end.png +0 -0
  198. package/test/graphic_references/12_navigation_board/uncontrolled/initial_state_at_specific_id.png +0 -0
  199. package/test/graphic_references/12_navigation_board/uncontrolled/initial_state_default.png +0 -0
  200. package/test/graphic_references/12_navigation_board/uncontrolled/initial_state_default_with_game_index.png +0 -0
  201. package/test/graphic_references/12_navigation_board/uncontrolled/initial_state_on_null-move.png +0 -0
  202. package/test/graphic_references/12_navigation_board/uncontrolled/navigation_with_keys_0.png +0 -0
  203. package/test/graphic_references/12_navigation_board/uncontrolled/navigation_with_keys_1.png +0 -0
  204. package/test/graphic_references/12_navigation_board/uncontrolled/navigation_with_keys_2.png +0 -0
  205. package/test/graphic_references/12_navigation_board/uncontrolled/navigation_with_keys_3.png +0 -0
  206. package/test/graphic_references/12_navigation_board/uncontrolled/navigation_with_keys_4.png +0 -0
  207. package/test/graphic_references/12_navigation_board/uncontrolled/regular_flipping_0.png +0 -0
  208. package/test/graphic_references/12_navigation_board/uncontrolled/regular_flipping_1.png +0 -0
  209. package/test/graphic_references/12_navigation_board/uncontrolled/regular_navigation_0.png +0 -0
  210. package/test/graphic_references/12_navigation_board/uncontrolled/regular_navigation_1.png +0 -0
  211. package/test/graphic_references/12_navigation_board/uncontrolled/regular_navigation_2.png +0 -0
  212. package/test/graphic_references/12_navigation_board/uncontrolled/regular_navigation_3.png +0 -0
  213. package/test/graphic_references/12_navigation_board/uncontrolled/regular_navigation_4.png +0 -0
  214. package/test/graphic_references/12_navigation_board/uncontrolled/regular_navigation_5.png +0 -0
  215. package/test/graphic_test_app/03_error_box_graphic/base.tsx +7 -5
  216. package/test/graphic_test_app/03_error_box_graphic/localization.tsx +7 -5
  217. package/test/graphic_test_app/04_icons_graphic/chess_piece.tsx +7 -5
  218. package/test/graphic_test_app/04_icons_graphic/marker.tsx +7 -5
  219. package/test/graphic_test_app/05_chessboard_graphic/annotations.tsx +7 -5
  220. package/test/graphic_test_app/05_chessboard_graphic/base.tsx +7 -5
  221. package/test/graphic_test_app/05_chessboard_graphic/chess_variants.tsx +7 -5
  222. package/test/graphic_test_app/05_chessboard_graphic/flipped.tsx +7 -5
  223. package/test/graphic_test_app/05_chessboard_graphic/move.tsx +9 -5
  224. package/test/graphic_test_app/05_chessboard_graphic/theme.tsx +7 -5
  225. package/test/graphic_test_app/06_chessboard_animation/base_1.tsx +7 -5
  226. package/test/graphic_test_app/06_chessboard_animation/base_2.tsx +7 -5
  227. package/test/graphic_test_app/06_chessboard_animation/base_3.tsx +7 -5
  228. package/test/graphic_test_app/06_chessboard_animation/on_redraw.tsx +7 -5
  229. package/test/graphic_test_app/07_chessboard_interaction/click_squares.tsx +7 -5
  230. package/test/graphic_test_app/07_chessboard_interaction/edit_arrows.tsx +7 -5
  231. package/test/graphic_test_app/07_chessboard_interaction/error.tsx +7 -5
  232. package/test/graphic_test_app/07_chessboard_interaction/move_pieces.tsx +7 -5
  233. package/test/graphic_test_app/08_chessboard_play_moves/base.tsx +7 -5
  234. package/test/graphic_test_app/08_chessboard_play_moves/promotions.tsx +7 -5
  235. package/test/graphic_test_app/09_chessboard_small_screens/base.tsx +7 -5
  236. package/test/graphic_test_app/09_chessboard_small_screens/top_bottom_components.tsx +48 -0
  237. package/test/graphic_test_app/10_movetext_graphic/base.tsx +7 -5
  238. package/test/graphic_test_app/10_movetext_graphic/error.tsx +7 -5
  239. package/test/graphic_test_app/10_movetext_graphic/format_move.tsx +31 -0
  240. package/test/graphic_test_app/10_movetext_graphic/html.tsx +7 -5
  241. package/test/graphic_test_app/10_movetext_graphic/options.tsx +8 -5
  242. package/test/graphic_test_app/11_movetext_interaction/error.tsx +7 -5
  243. package/test/graphic_test_app/11_movetext_interaction/select_moves.tsx +8 -5
  244. package/test/graphic_test_app/12_navigation_board/controlled.tsx +43 -0
  245. package/test/graphic_test_app/12_navigation_board/error.tsx +34 -0
  246. package/test/graphic_test_app/12_navigation_board/theme.tsx +38 -0
  247. package/test/graphic_test_app/12_navigation_board/uncontrolled.tsx +56 -0
  248. package/test/graphic_test_app/common/decs.d.ts +7 -5
  249. package/test/graphic_test_app/common/test_app.css +7 -5
  250. package/test/graphic_test_app/common/test_app.tsx +7 -5
@@ -0,0 +1,140 @@
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
+ import * as React from 'react';
24
+ import { exception as kokopuException, i18n as kokopuI18n, Database, Game, MoveDescriptor, Position, isGameVariant, pgnRead } from 'kokopu';
25
+ import { IllegalArgument } from '../exception';
26
+ import { i18n } from '../i18n';
27
+ import { ErrorBox } from './ErrorBox';
28
+ /**
29
+ * Try to interpret the given object as a chess position.
30
+ */
31
+ export function parsePosition(position, componentName) {
32
+ if (position instanceof Position) {
33
+ return { error: false, position: position };
34
+ }
35
+ else if (position === 'start' || position === 'empty') {
36
+ return { error: false, position: new Position(position) };
37
+ }
38
+ else if (typeof position === 'string') {
39
+ try {
40
+ const { variant, fen } = splitGameVariantAndFEN(position);
41
+ const result = new Position(variant, 'empty');
42
+ result.fen(fen);
43
+ return { error: false, position: result };
44
+ }
45
+ catch (e) {
46
+ // istanbul ignore else
47
+ if (e instanceof kokopuException.InvalidFEN) {
48
+ return { error: true, errorBox: React.createElement(ErrorBox, { title: i18n.INVALID_FEN_ERROR_TITLE, message: e.message }) };
49
+ }
50
+ else {
51
+ throw e;
52
+ }
53
+ }
54
+ }
55
+ else {
56
+ throw new IllegalArgument(componentName, 'position');
57
+ }
58
+ }
59
+ /**
60
+ * Look for an optional 'chess-variant:' prefix in the position attribute.
61
+ */
62
+ function splitGameVariantAndFEN(position) {
63
+ const separatorIndex = position.indexOf(':');
64
+ if (separatorIndex < 0) {
65
+ return { variant: 'regular', fen: position };
66
+ }
67
+ const variant = position.substring(0, separatorIndex);
68
+ return isGameVariant(variant) ? { variant: variant, fen: position.substring(separatorIndex + 1) } : { variant: 'regular', fen: position };
69
+ }
70
+ /**
71
+ * Try to interpret the given object `move` as a move descriptor based on the given position.
72
+ */
73
+ export function parseMove(position, move, componentName) {
74
+ if (move === undefined || move === null) {
75
+ return { error: false, type: 'none' };
76
+ }
77
+ else if (move instanceof MoveDescriptor) {
78
+ return { error: false, type: 'regular', move: move };
79
+ }
80
+ else if (typeof move === 'string') {
81
+ if (move === '--') {
82
+ if (position.isNullMoveLegal()) {
83
+ return { error: false, type: 'null-move' };
84
+ }
85
+ else {
86
+ return { error: true, errorBox: React.createElement(ErrorBox, { title: i18n.INVALID_NOTATION_ERROR_TITLE, message: kokopuI18n.ILLEGAL_NULL_MOVE }) };
87
+ }
88
+ }
89
+ else {
90
+ try {
91
+ return { error: false, type: 'regular', move: position.notation(move) };
92
+ }
93
+ catch (e) {
94
+ // istanbul ignore else
95
+ if (e instanceof kokopuException.InvalidNotation) {
96
+ return { error: true, errorBox: React.createElement(ErrorBox, { title: i18n.INVALID_NOTATION_ERROR_TITLE, message: e.message }) };
97
+ }
98
+ else {
99
+ throw e;
100
+ }
101
+ }
102
+ }
103
+ }
104
+ else {
105
+ throw new IllegalArgument(componentName, 'move');
106
+ }
107
+ }
108
+ /**
109
+ * Try to interpret the given object as a chess game.
110
+ */
111
+ export function parseGame(game, gameIndex, componentName) {
112
+ if (game instanceof Game) {
113
+ return { error: false, game: game };
114
+ }
115
+ else if (game instanceof Database || typeof game === 'string') {
116
+ if (!Number.isInteger(gameIndex) || gameIndex < 0) {
117
+ throw new IllegalArgument(componentName, 'gameIndex');
118
+ }
119
+ try {
120
+ const result = game instanceof Database ? game.game(gameIndex) : pgnRead(game, gameIndex);
121
+ return { error: false, game: result };
122
+ }
123
+ catch (e) {
124
+ // istanbul ignore else
125
+ if (e instanceof kokopuException.InvalidPGN) {
126
+ return {
127
+ error: true,
128
+ errorBox: React.createElement(ErrorBox, { title: i18n.INVALID_PGN_ERROR_TITLE, message: e.message, text: e.pgn, errorIndex: e.index, lineNumber: e.lineNumber }),
129
+ };
130
+ }
131
+ else {
132
+ throw e;
133
+ }
134
+ }
135
+ }
136
+ else {
137
+ throw new IllegalArgument(componentName, 'game');
138
+ }
139
+ }
140
+ //# sourceMappingURL=parsing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parsing.js","sourceRoot":"","sources":["../../../src/errorbox/parsing.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;gFAqBgF;AAGhF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,IAAI,eAAe,EAAE,IAAI,IAAI,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAe,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEzJ,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,QAA2B,EAAE,aAAqB;IAG/E,IAAI,QAAQ,YAAY,QAAQ,EAAE,CAAC;QAClC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;IAC7C,CAAC;SACI,IAAI,QAAQ,KAAK,OAAO,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QACvD,OAAO,E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BACN,KAAK,EAAE,IAAI;oBACX,QAAQ,EAAE,oBAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,CAAC,uBAAuB,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC,UAAU,GAAI;iBAC3I,CAAC;YACH,CAAC;iBACI,CAAC;gBACL,MAAM,CAAC,CAAC;YACT,CAAC;QACF,CAAC;IACF,CAAC;SACI,CAAC;QACL,MAAM,IAAI,eAAe,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IAClD,CAAC;AACF,CAAC"}
@@ -1,3 +1,25 @@
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
+ * -------------------------------------------------------------------------- */
1
23
  /**
2
24
  * This module contains the exceptions used by the library.
3
25
  * @module
@@ -1,14 +1,16 @@
1
- /* -------------------------------------------------------------------------- *
1
+ /*!
2
+ * -------------------------------------------------------------------------- *
2
3
  * *
3
- * This file is part of Kokopu-React, a JavaScript chess library. *
4
- * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
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
- * This program is free software: you can redistribute it and/or *
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
- * This program is distributed in the hope that it will be useful, *
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 +1 @@
1
- {"version":3,"file":"exception.js","sourceRoot":"","sources":["../../src/exception.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;gFAmBgF;AAGhF;;;GAGG;AAGH;;GAEG;AACH,MAAM,OAAO,eAAe;IAQ3B,YAAY,uBAA+B,EAAE,YAAoB;QAChE,IAAI,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;QACvD,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,QAAQ;QACP,OAAO,qBAAqB,IAAI,CAAC,YAAY,8BAA8B,IAAI,CAAC,uBAAuB,EAAE,CAAC;IAC3G,CAAC;CACD"}
1
+ {"version":3,"file":"exception.js","sourceRoot":"","sources":["../../src/exception.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;gFAqBgF;AAGhF;;;GAGG;AAGH;;GAEG;AACH,MAAM,OAAO,eAAe;IAQ3B,YAAY,uBAA+B,EAAE,YAAoB;QAChE,IAAI,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;QACvD,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,QAAQ;QACP,OAAO,qBAAqB,IAAI,CAAC,YAAY,8BAA8B,IAAI,CAAC,uBAAuB,EAAE,CAAC;IAC3G,CAAC;CACD"}
@@ -1,3 +1,25 @@
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
+ * -------------------------------------------------------------------------- */
1
23
  /**
2
24
  * This module defines the localizable strings used by the library.
3
25
  */
@@ -5,6 +27,11 @@ export declare namespace i18n {
5
27
  let LINE: string;
6
28
  let INVALID_FEN_ERROR_TITLE: string;
7
29
  let INVALID_NOTATION_ERROR_TITLE: string;
30
+ let TOOLTIP_GO_FIRST: string;
31
+ let TOOLTIP_GO_PREVIOUS: string;
32
+ let TOOLTIP_GO_NEXT: string;
33
+ let TOOLTIP_GO_LAST: string;
34
+ let TOOLTIP_FLIP: string;
8
35
  let PIECE_SYMBOLS: {
9
36
  K: string;
10
37
  Q: string;
package/dist/lib/i18n.js CHANGED
@@ -1,14 +1,16 @@
1
- /* -------------------------------------------------------------------------- *
1
+ /*!
2
+ * -------------------------------------------------------------------------- *
2
3
  * *
3
- * This file is part of Kokopu-React, a JavaScript chess library. *
4
- * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
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
- * This program is free software: you can redistribute it and/or *
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
- * This program is distributed in the hope that it will be useful, *
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. *
@@ -30,6 +32,12 @@ export var i18n;
30
32
  // Chessboard
31
33
  i18n.INVALID_FEN_ERROR_TITLE = 'Invalid FEN string.';
32
34
  i18n.INVALID_NOTATION_ERROR_TITLE = 'Invalid move notation.';
35
+ // Navigation board
36
+ i18n.TOOLTIP_GO_FIRST = 'Go to the beginning of the game';
37
+ i18n.TOOLTIP_GO_PREVIOUS = 'Go to the previous move';
38
+ i18n.TOOLTIP_GO_NEXT = 'Go to the next move';
39
+ i18n.TOOLTIP_GO_LAST = 'Go to the end of the game';
40
+ i18n.TOOLTIP_FLIP = 'Flip the board';
33
41
  // Movetext
34
42
  i18n.PIECE_SYMBOLS = { 'K': 'K', 'Q': 'Q', 'R': 'R', 'B': 'B', 'N': 'N', 'P': 'P' };
35
43
  i18n.ANNOTATED_BY = 'Annotated by {0}';
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/i18n.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;gFAmBgF;AAGhF;;GAEG;AACH,MAAM,KAAW,IAAI,CAiBpB;AAjBD,WAAiB,IAAI;IAErB,iCAAiC;IACjC,0HAA0H;IAE1H,YAAY;I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pB"}
@@ -1,14 +1,16 @@
1
- /* -------------------------------------------------------------------------- *
1
+ /*!
2
+ * -------------------------------------------------------------------------- *
2
3
  * *
3
- * This file is part of Kokopu-React, a JavaScript chess library. *
4
- * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
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
- * This program is free software: you can redistribute it and/or *
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
- * This program is distributed in the hope that it will be useful, *
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,3 +1,25 @@
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
+ * -------------------------------------------------------------------------- */
1
23
  import * as React from 'react';
2
24
  import { AnnotationSymbol } from '../types';
3
25
  import './AnnotationSymbolShape.css';
@@ -1,14 +1,16 @@
1
- /* -------------------------------------------------------------------------- *
1
+ /*!
2
+ * -------------------------------------------------------------------------- *
2
3
  * *
3
- * This file is part of Kokopu-React, a JavaScript chess library. *
4
- * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
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
- * This program is free software: you can redistribute it and/or *
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
- * This program is distributed in the hope that it will be useful, *
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 +1 @@
1
- {"version":3,"file":"AnnotationSymbolShape.js","sourceRoot":"","sources":["../../../src/icons/AnnotationSymbolShape.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;gFAmBgF;AAGhF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,6BAA6B,CAAC;AAErC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AACnC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAC/B,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAgCnC;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAA8B;IAC9F,IAAI,MAAM,KAAK,KAAK,EAAE;QACrB,OA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E,CAAC;QACtB,OAAO,gCAAQ,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,GAAG,iBAAiB,EAAE,IAAI,EAAE,KAAK,GAAI,CAAC;IAC3E,CAAC;SACI,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,SAAS,GAAG,IAAI,GAAG,sBAAsB,CAAC;QAChD,OAAO,gCAAQ,SAAS,EAAC,qBAAqB,EAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,GAAG,oBAAoB,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,GAAI,CAAC;IACxI,CAAC;SACI,CAAC;QACL,MAAM,IAAI,GAAG,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;QAC9E,OAAO,8BAAM,SAAS,EAAC,mBAAmB,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAG,IAAI,CAAQ,CAAC;IACnG,CAAC;AACF,CAAC"}
@@ -1,3 +1,25 @@
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
+ * -------------------------------------------------------------------------- */
1
23
  import * as React from 'react';
2
24
  import './arrow.css';
3
25
  export interface ArrowMarkerIconProps {
@@ -1,14 +1,16 @@
1
- /* -------------------------------------------------------------------------- *
1
+ /*!
2
+ * -------------------------------------------------------------------------- *
2
3
  * *
3
- * This file is part of Kokopu-React, a JavaScript chess library. *
4
- * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
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
- * This program is free software: you can redistribute it and/or *
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
- * This program is distributed in the hope that it will be useful, *
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 +1 @@
1
- {"version":3,"file":"ArrowMarkerIcon.js","sourceRoot":"","sources":["../../../src/icons/ArrowMarkerIcon.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;gFAmBgF;AAGhF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CA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C,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI;YAClF;gBACC,oBAAC,QAAQ,IAAC,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAI,CACpD;YACP,8BAAM,SAAS,EAAC,cAAc,EAAC,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,IAAI,GAAG,CAAC,EAAE,EAAE,EAAE,IAAI,GAAG,aAAa,GAAG,CAAC,EAAE,EAAE,EAAE,IAAI,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK,EACxH,WAAW,EAAE,aAAa,GAAG,CAAC,EAAE,SAAS,EAAE,QAAQ,IAAI,CAAC,UAAU,GAAG,GAAI,CACrE,CACN,CAAC;IACH,CAAC;;AAxBM,4BAAY,GAAkC;IACpD,KAAK,EAAE,cAAc;CACrB,AAFkB,CAEjB"}
@@ -1,3 +1,25 @@
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
+ * -------------------------------------------------------------------------- */
1
23
  import * as React from 'react';
2
24
  interface ArrowTipProps {
3
25
  /**
@@ -1,14 +1,16 @@
1
- /* -------------------------------------------------------------------------- *
1
+ /*!
2
+ * -------------------------------------------------------------------------- *
2
3
  * *
3
- * This file is part of Kokopu-React, a JavaScript chess library. *
4
- * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
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
- * This program is free software: you can redistribute it and/or *
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
- * This program is distributed in the hope that it will be useful, *
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 +1 @@
1
- {"version":3,"file":"ArrowTip.js","sourceRoot":"","sources":["../../../src/icons/ArrowTip.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;gFAmBgF;AAGhF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,EAAE,EAAE,EAAE,KAAK,EAAiB;IACpD,OAAO,CACN,gCAAQ,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAC,MAAM;QACjF,8BAAM,IAAI,EAAE,KAAK,EAAE,CAAC,EAAC,2BAA2B,GAAG,CAC3C,CACT,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"ArrowTip.js","sourceRoot":"","sources":["../../../src/icons/ArrowTip.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;gFAqBgF;AAGhF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,EAAE,EAAE,EAAE,KAAK,EAAiB;IACpD,OAAO,CACN,gCAAQ,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAC,MAAM;QACjF,8BAAM,IAAI,EAAE,KAAK,EAAE,CAAC,EAAC,2BAA2B,GAAG,CAC3C,CACT,CAAC;AACH,CAAC"}
@@ -1,3 +1,25 @@
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
+ * -------------------------------------------------------------------------- */
1
23
  import * as React from 'react';
2
24
  import { ChessPieceIconType } from '../types';
3
25
  export interface ChessPieceIconProps {
@@ -1,14 +1,16 @@
1
- /* -------------------------------------------------------------------------- *
1
+ /*!
2
+ * -------------------------------------------------------------------------- *
2
3
  * *
3
- * This file is part of Kokopu-React, a JavaScript chess library. *
4
- * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
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
- * This program is free software: you can redistribute it and/or *
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
- * This program is distributed in the hope that it will be useful, *
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 +1 @@
1
- {"version":3,"file":"ChessPieceIcon.js","sourceRoot":"","sources":["../../../src/icons/ChessPieceIcon.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;gFAmBgF;AAGhF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAsB,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACtG,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAsBtE,MAAM,YAAY,GAAiC;IAClD,QAAQ,EAAE,gBAAgB;CAC1B,CAAC;AAGF;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAuB;IAE3E,uBAAuB;IACvB,IAAI,GAAG,sBAAsB,CAAC,IAAI,EAAE,eAAe,EAAE,eAAe,EAAE,GAAG,EAAE,CAAC,IAAI,eAAe,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAA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,EAAE,CAAC;IACvC,OAAO,CACN,6BAAK,SAAS,EAAC,uBAAuB,EAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,IACjF,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,+BAAO,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,GAAI,CAAC,CACvG,CACN,CAAC;AACH,CAAC;AAED,cAAc,CAAC,YAAY,GAAG,YAAY,CAAC;AAG3C;;GAEG;AACH,SAAS,0BAA0B,CAAC,IAA+C,EAAE,gBAAuC;IAC3H,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;YACnB,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC9B,MAAM,gBAAgB,EAAE,CAAC;YAC1B,CAAC;YACD,OAAO,CAAC,CAAC;QACV,CAAC,CAAC,CAAC;IACJ,CAAC;SACI,IAAI,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC;QACrC,OAAO,CAAE,IAAI,CAAE,CAAC;IACjB,CAAC;SACI,CAAC;QACL,MAAM,gBAAgB,EAAE,CAAC;IAC1B,CAAC;AACF,CAAC"}
@@ -1,3 +1,25 @@
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
+ * -------------------------------------------------------------------------- */
1
23
  import * as React from 'react';
2
24
  export interface SquareMarkerIconProps {
3
25
  /**
@@ -1,14 +1,16 @@
1
- /* -------------------------------------------------------------------------- *
1
+ /*!
2
+ * -------------------------------------------------------------------------- *
2
3
  * *
3
- * This file is part of Kokopu-React, a JavaScript chess library. *
4
- * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
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
- * This program is free software: you can redistribute it and/or *
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
- * This program is distributed in the hope that it will be useful, *
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 +1 @@
1
- {"version":3,"file":"SquareMarkerIcon.js","sourceRoot":"","sources":["../../../src/icons/SquareMarkerIcon.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;gFAmBgF;AAGhF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE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