kokopu-react 1.11.1 → 2.0.1

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 (530) hide show
  1. package/.eslintrc.yml +83 -0
  2. package/.nycrc.yml +0 -1
  3. package/CHANGELOG.md +178 -0
  4. package/CREDITS.md +18 -0
  5. package/README.md +1 -1
  6. package/{src/css/chessboard.css → dist/lib/chessboard/Chessboard.css} +2 -2
  7. package/dist/lib/chessboard/Chessboard.d.ts +171 -0
  8. package/dist/lib/chessboard/Chessboard.js +366 -0
  9. package/dist/lib/chessboard/Chessboard.js.map +1 -0
  10. package/dist/lib/chessboard/ChessboardImpl.d.ts +119 -0
  11. package/dist/lib/chessboard/ChessboardImpl.js +471 -0
  12. package/dist/lib/chessboard/ChessboardImpl.js.map +1 -0
  13. package/dist/lib/chessboard/Draggable.d.ts +62 -0
  14. package/dist/lib/chessboard/Draggable.js +157 -0
  15. package/dist/lib/chessboard/Draggable.js.map +1 -0
  16. package/dist/lib/chessboard/Motion.d.ts +28 -0
  17. package/dist/lib/chessboard/Motion.js +74 -0
  18. package/dist/lib/chessboard/Motion.js.map +1 -0
  19. package/dist/lib/chessboard/colorsets.d.ts +5 -0
  20. package/dist/lib/{impl → chessboard}/colorsets.js +43 -47
  21. package/dist/lib/chessboard/colorsets.js.map +1 -0
  22. package/dist/lib/chessboard/piecesets.d.ts +5 -0
  23. package/dist/lib/chessboard/piecesets.js +214 -0
  24. package/dist/lib/chessboard/piecesets.js.map +1 -0
  25. package/dist/lib/{css/error_box.css → errorbox/ErrorBox.css} +2 -2
  26. package/dist/lib/errorbox/ErrorBox.d.ts +28 -0
  27. package/dist/lib/errorbox/ErrorBox.js +84 -0
  28. package/dist/lib/errorbox/ErrorBox.js.map +1 -0
  29. package/dist/lib/exception.d.ts +18 -0
  30. package/dist/lib/exception.js +40 -0
  31. package/dist/lib/exception.js.map +1 -0
  32. package/dist/lib/i18n.d.ts +18 -0
  33. package/dist/lib/i18n.js +20 -33
  34. package/dist/lib/i18n.js.map +1 -0
  35. package/{src/css/symbol.css → dist/lib/icons/AnnotationSymbolShape.css} +2 -2
  36. package/dist/lib/icons/AnnotationSymbolShape.d.ts +30 -0
  37. package/dist/lib/{impl/ArrowTip.js → icons/AnnotationSymbolShape.js} +21 -35
  38. package/dist/lib/icons/AnnotationSymbolShape.js.map +1 -0
  39. package/dist/lib/icons/ArrowMarkerIcon.d.ts +20 -0
  40. package/dist/lib/icons/ArrowMarkerIcon.js +54 -0
  41. package/dist/lib/icons/ArrowMarkerIcon.js.map +1 -0
  42. package/dist/lib/icons/ArrowTip.d.ts +16 -0
  43. package/dist/lib/icons/ArrowTip.js +29 -0
  44. package/dist/lib/icons/ArrowTip.js.map +1 -0
  45. package/dist/lib/icons/SquareMarkerIcon.d.ts +18 -0
  46. package/{src/i18n.js → dist/lib/icons/SquareMarkerIcon.js} +24 -23
  47. package/dist/lib/icons/SquareMarkerIcon.js.map +1 -0
  48. package/dist/lib/icons/TextMarkerIcon.d.ts +23 -0
  49. package/dist/lib/icons/TextMarkerIcon.js +45 -0
  50. package/dist/lib/icons/TextMarkerIcon.js.map +1 -0
  51. package/{src/css → dist/lib/icons}/arrow.css +2 -2
  52. package/dist/lib/index.d.ts +10 -0
  53. package/dist/lib/index.js +31 -105
  54. package/dist/lib/index.js.map +1 -0
  55. package/dist/lib/{css/movetext.css → movetext/Movetext.css} +2 -2
  56. package/dist/lib/movetext/Movetext.d.ts +136 -0
  57. package/dist/lib/movetext/Movetext.js +168 -0
  58. package/dist/lib/movetext/Movetext.js.map +1 -0
  59. package/dist/lib/movetext/MovetextImpl.d.ts +85 -0
  60. package/dist/lib/movetext/MovetextImpl.js +411 -0
  61. package/dist/lib/movetext/MovetextImpl.js.map +1 -0
  62. package/dist/lib/{css → movetext}/fonts.css +4 -4
  63. package/dist/lib/movetext/htmlFilter.d.ts +7 -0
  64. package/dist/lib/movetext/htmlFilter.js +169 -0
  65. package/dist/lib/movetext/htmlFilter.js.map +1 -0
  66. package/dist/lib/movetext/moveFormatter.d.ts +20 -0
  67. package/dist/lib/movetext/moveFormatter.js +93 -0
  68. package/dist/lib/movetext/moveFormatter.js.map +1 -0
  69. package/dist/lib/sanitization.d.ts +6 -0
  70. package/dist/lib/sanitization.js +39 -0
  71. package/dist/lib/sanitization.js.map +1 -0
  72. package/dist/lib/types.d.ts +151 -0
  73. package/dist/lib/types.js +162 -0
  74. package/dist/lib/types.js.map +1 -0
  75. package/dist/lib/util.d.ts +2 -0
  76. package/dist/lib/util.js +36 -0
  77. package/dist/lib/util.js.map +1 -0
  78. package/doc_src/demo/{PageChessboardBase.js → PageChessboardBase.tsx} +30 -24
  79. package/doc_src/demo/{PageChessboardInteraction.js → PageChessboardInteraction.tsx} +95 -66
  80. package/doc_src/demo/{PageChessboardMove.js → PageChessboardMove.tsx} +66 -54
  81. package/doc_src/demo/{PageChessboardSmallScreens.js → PageChessboardSmallScreens.tsx} +23 -14
  82. package/doc_src/demo/{PageMovetextBase.js → PageMovetextBase.tsx} +62 -49
  83. package/doc_src/demo/{PageMovetextInteraction.js → PageMovetextInteraction.tsx} +58 -43
  84. package/doc_src/demo/decs.d.ts +31 -0
  85. package/doc_src/demo/demo.css +2 -2
  86. package/doc_src/demo/{util.js → util.ts} +3 -3
  87. package/doc_src/migrate_to_2.md +26 -0
  88. package/doc_src/theming/LogoRenderer.js +5 -5
  89. package/doc_src/theming/theming.css +8 -2
  90. package/package.json +45 -32
  91. package/scripts/doc.styleguide.config.js +192 -0
  92. package/scripts/doc.tsconfig.json +7 -0
  93. package/scripts/docker-compose.yml +1 -1
  94. package/scripts/test-graphic.tsconfig.json +7 -0
  95. package/scripts/test-graphic.webpack.config.js +33 -17
  96. package/scripts/test-headless.webpack.config.js +6 -10
  97. package/{dist/lib/css/chessboard.css → src/chessboard/Chessboard.css} +2 -2
  98. package/src/chessboard/Chessboard.tsx +575 -0
  99. package/src/chessboard/ChessboardImpl.tsx +632 -0
  100. package/src/chessboard/Draggable.tsx +252 -0
  101. package/src/{impl/Motion.js → chessboard/Motion.tsx} +37 -27
  102. package/src/chessboard/colorsets.ts +134 -0
  103. package/src/chessboard/piecesets.ts +229 -0
  104. package/src/decs.d.ts +26 -0
  105. package/src/{css/error_box.css → errorbox/ErrorBox.css} +2 -2
  106. package/src/errorbox/ErrorBox.tsx +129 -0
  107. package/src/exception.ts +51 -0
  108. package/src/i18n.ts +43 -0
  109. package/{dist/lib/css/symbol.css → src/icons/AnnotationSymbolShape.css} +2 -2
  110. package/src/{impl/TextSymbol.js → icons/AnnotationSymbolShape.tsx} +32 -30
  111. package/src/{ArrowMarkerIcon.js → icons/ArrowMarkerIcon.tsx} +39 -36
  112. package/src/{impl/ArrowTip.js → icons/ArrowTip.tsx} +20 -20
  113. package/src/{SquareMarkerIcon.js → icons/SquareMarkerIcon.tsx} +35 -28
  114. package/src/{TextMarkerIcon.js → icons/TextMarkerIcon.tsx} +40 -32
  115. package/{dist/lib/css → src/icons}/arrow.css +2 -2
  116. package/src/index.ts +38 -0
  117. package/src/{css/movetext.css → movetext/Movetext.css} +2 -2
  118. package/src/movetext/Movetext.tsx +278 -0
  119. package/src/movetext/MovetextImpl.tsx +493 -0
  120. package/src/{css → movetext}/fonts.css +4 -4
  121. package/src/movetext/htmlFilter.tsx +188 -0
  122. package/src/{formatmove.js → movetext/moveFormatter.tsx} +39 -26
  123. package/src/sanitization.ts +51 -0
  124. package/src/types.ts +311 -0
  125. package/src/util.ts +39 -0
  126. package/test/.eslintrc.yml +3 -3
  127. package/test/{1_markers.js → 01_types.js} +89 -4
  128. package/test/{2_chessboard_util.js → 02_chessboard_util.js} +16 -7
  129. package/test/{3_marker_icons_graphic.js → 03_error_box_graphic.js} +20 -14
  130. package/test/04_marker_icons_graphic.js +49 -0
  131. package/test/05_chessboard_graphic.js +92 -0
  132. package/test/06_chessboard_animation.js +71 -0
  133. package/test/07_chessboard_interaction.js +130 -0
  134. package/test/08_chessboard_play_moves.js +98 -0
  135. package/test/{7_movetext_graphic.js → 09_movetext_graphic.js} +32 -16
  136. package/test/{8_movetext_interaction.js → 10_movetext_interaction.js} +18 -23
  137. package/test/common/graphic.js +67 -33
  138. package/test/graphic_references/03_error_box_graphic/base/cut_beginning_of_text.png +0 -0
  139. package/test/graphic_references/03_error_box_graphic/base/cut_end_of_text.png +0 -0
  140. package/test/graphic_references/03_error_box_graphic/base/cut_on_line_breaks.png +0 -0
  141. package/test/graphic_references/03_error_box_graphic/base/error_index_not_integer.png +0 -0
  142. package/test/graphic_references/03_error_box_graphic/base/full.png +0 -0
  143. package/test/graphic_references/03_error_box_graphic/base/minimal.png +0 -0
  144. package/test/graphic_references/03_error_box_graphic/base/missing_error_index.png +0 -0
  145. package/test/graphic_references/03_error_box_graphic/base/missing_error_text.png +0 -0
  146. package/test/graphic_references/03_error_box_graphic/base/negative_error_index.png +0 -0
  147. package/test/graphic_references/03_error_box_graphic/base/single_character_text.png +0 -0
  148. package/test/graphic_references/03_error_box_graphic/base/too_large_error_index.png +0 -0
  149. package/test/graphic_references/03_error_box_graphic/localization/default.png +0 -0
  150. package/test/graphic_references/04_marker_icons_graphic/base/colorized_arrow.png +0 -0
  151. package/test/graphic_references/04_marker_icons_graphic/base/colorized_symbol.png +0 -0
  152. package/test/graphic_references/04_marker_icons_graphic/base/colorized_text.png +0 -0
  153. package/test/graphic_references/04_marker_icons_graphic/base/default_arrow.png +0 -0
  154. package/test/graphic_references/04_marker_icons_graphic/base/default_text.png +0 -0
  155. package/test/graphic_references/04_marker_icons_graphic/base/invalid_arrow_size.png +0 -0
  156. package/test/graphic_references/04_marker_icons_graphic/base/invalid_square_size.png +0 -0
  157. package/test/graphic_references/04_marker_icons_graphic/base/invalid_symbol.png +0 -0
  158. package/test/graphic_references/04_marker_icons_graphic/base/invalid_text_size.png +0 -0
  159. package/test/graphic_references/04_marker_icons_graphic/base/wrapped_arrow.png +0 -0
  160. package/test/graphic_references/04_marker_icons_graphic/base/wrapped_symbol.png +0 -0
  161. package/test/graphic_references/04_marker_icons_graphic/base/wrapped_text.png +0 -0
  162. package/test/graphic_references/05_chessboard_graphic/base/wrong_position_type.png +0 -0
  163. package/test/graphic_references/05_chessboard_graphic/chess_variants/chess960.png +0 -0
  164. package/test/graphic_references/05_chessboard_graphic/chess_variants/chess960_with_move.png +0 -0
  165. package/test/graphic_references/05_chessboard_graphic/chess_variants/invalid_variant.png +0 -0
  166. package/test/graphic_references/05_chessboard_graphic/chess_variants/invalid_variant_with_fen.png +0 -0
  167. package/test/graphic_references/05_chessboard_graphic/chess_variants/special_code.png +0 -0
  168. package/test/graphic_references/05_chessboard_graphic/chess_variants/variant_with_std_initial_position.png +0 -0
  169. package/test/graphic_references/05_chessboard_graphic/flipped/parsing_error.png +0 -0
  170. package/test/graphic_references/05_chessboard_graphic/move/wrong_move_arrow_color_type.png +0 -0
  171. package/test/graphic_references/05_chessboard_graphic/move/wrong_move_type.png +0 -0
  172. package/test/graphic_references/05_chessboard_graphic/theme/wrong_colorset.png +0 -0
  173. package/test/graphic_references/05_chessboard_graphic/theme/wrong_pieceset.png +0 -0
  174. package/test/graphic_references/05_chessboard_graphic/theme/wrong_square_size_type.png +0 -0
  175. package/test/graphic_references/06_chessboard_animation/on_redraw/final_state.png +0 -0
  176. package/test/graphic_references/06_chessboard_animation/on_redraw/initial_state.png +0 -0
  177. package/test/graphic_references/07_chessboard_interaction/error/edit_color_not_set.png +0 -0
  178. package/test/graphic_references/07_chessboard_interaction/error/wrong_interaction_mode.png +0 -0
  179. package/test/graphic_references/09_movetext_graphic/error/wrong_game_index_type.png +0 -0
  180. package/test/graphic_references/09_movetext_graphic/error/wrong_game_type.png +0 -0
  181. package/test/graphic_references/09_movetext_graphic/options/wrong_diagram_options_1.png +0 -0
  182. package/test/graphic_references/09_movetext_graphic/options/wrong_diagram_options_2.png +0 -0
  183. package/test/graphic_references/10_movetext_interaction/error/wrong_interaction_mode.png +0 -0
  184. package/test/graphic_test_app/.eslintrc.yml +3 -0
  185. package/test/graphic_test_app/03_error_box_graphic/base.tsx +46 -0
  186. package/{scripts/clean-graphic-output.js → test/graphic_test_app/03_error_box_graphic/localization.tsx} +10 -7
  187. package/{graphic_test_src/01_marker_icons.js → test/graphic_test_app/04_marker_icons_graphic/base.tsx} +15 -7
  188. package/{graphic_test_src/04_chessboard_annotations.js → test/graphic_test_app/05_chessboard_graphic/annotations.tsx} +23 -14
  189. package/{graphic_test_src/02_chessboard_simple.js → test/graphic_test_app/05_chessboard_graphic/base.tsx} +6 -6
  190. package/test/graphic_test_app/05_chessboard_graphic/chess_variants.tsx +35 -0
  191. package/{graphic_test_src/03_chessboard_flipped.js → test/graphic_test_app/05_chessboard_graphic/flipped.tsx} +5 -5
  192. package/{graphic_test_src/05_chessboard_move.js → test/graphic_test_app/05_chessboard_graphic/move.tsx} +9 -8
  193. package/{graphic_test_src/07_chessboard_theme.js → test/graphic_test_app/05_chessboard_graphic/theme.tsx} +14 -11
  194. package/{graphic_test_src/06a_chessboard_animated_move.js → test/graphic_test_app/06_chessboard_animation/base_1.tsx} +5 -5
  195. package/{graphic_test_src/06b_chessboard_animated_move.js → test/graphic_test_app/06_chessboard_animation/base_2.tsx} +5 -5
  196. package/{graphic_test_src/06c_chessboard_animated_move.js → test/graphic_test_app/06_chessboard_animation/base_3.tsx} +5 -5
  197. package/test/graphic_test_app/06_chessboard_animation/on_redraw.tsx +49 -0
  198. package/{graphic_test_src/08_chessboard_click_squares.js → test/graphic_test_app/07_chessboard_interaction/click_squares.tsx} +7 -6
  199. package/{graphic_test_src/10_chessboard_edit_arrows.js → test/graphic_test_app/07_chessboard_interaction/edit_arrows.tsx} +7 -7
  200. package/test/graphic_test_app/07_chessboard_interaction/error.tsx +30 -0
  201. package/{graphic_test_src/09_chessboard_move_pieces.js → test/graphic_test_app/07_chessboard_interaction/move_pieces.tsx} +7 -6
  202. package/{graphic_test_src/11_chessboard_play_moves.js → test/graphic_test_app/08_chessboard_play_moves/base.tsx} +6 -6
  203. package/{graphic_test_src/12_chessboard_play_promotions.js → test/graphic_test_app/08_chessboard_play_moves/promotions.tsx} +6 -6
  204. package/{graphic_test_src/13_movetext_simple.js → test/graphic_test_app/09_movetext_graphic/base.tsx} +8 -8
  205. package/{graphic_test_src/14_movetext_error.js → test/graphic_test_app/09_movetext_graphic/error.tsx} +10 -9
  206. package/{graphic_test_src/15_movetext_html.js → test/graphic_test_app/09_movetext_graphic/html.tsx} +7 -7
  207. package/{graphic_test_src/16_movetext_options.js → test/graphic_test_app/09_movetext_graphic/options.tsx} +9 -6
  208. package/test/graphic_test_app/10_movetext_interaction/error.tsx +31 -0
  209. package/{graphic_test_src/17_movetext_interaction.js → test/graphic_test_app/10_movetext_interaction/select_moves.tsx} +7 -7
  210. package/test/graphic_test_app/common/decs.d.ts +26 -0
  211. package/{graphic_test_src → test/graphic_test_app}/common/games.pgn +1 -1
  212. package/{graphic_test_src → test/graphic_test_app}/common/test_app.css +11 -2
  213. package/{graphic_test_src/common/test_app.js → test/graphic_test_app/common/test_app.tsx} +62 -14
  214. package/tsconfig.json +15 -0
  215. package/.babelrc +0 -3
  216. package/dist/lib/ArrowMarkerIcon.js +0 -85
  217. package/dist/lib/Chessboard.js +0 -1276
  218. package/dist/lib/ErrorBox.js +0 -125
  219. package/dist/lib/Movetext.js +0 -805
  220. package/dist/lib/SquareMarkerIcon.js +0 -69
  221. package/dist/lib/TextMarkerIcon.js +0 -74
  222. package/dist/lib/formatmove.js +0 -107
  223. package/dist/lib/impl/DraggableHandle.js +0 -277
  224. package/dist/lib/impl/HtmlSanitizer.js +0 -145
  225. package/dist/lib/impl/Motion.js +0 -109
  226. package/dist/lib/impl/TextSymbol.js +0 -89
  227. package/dist/lib/impl/piecesets.js +0 -219
  228. package/dist/lib/impl/util.js +0 -71
  229. package/dist/lib/markers.js +0 -144
  230. package/doc_src/.eslintrc.yml +0 -2
  231. package/src/Chessboard.js +0 -1034
  232. package/src/ErrorBox.js +0 -132
  233. package/src/Movetext.js +0 -671
  234. package/src/impl/DraggableHandle.js +0 -235
  235. package/src/impl/HtmlSanitizer.js +0 -126
  236. package/src/impl/colorsets.js +0 -119
  237. package/src/impl/piecesets.js +0 -218
  238. package/src/impl/util.js +0 -68
  239. package/src/index.js +0 -31
  240. package/src/markers.js +0 -115
  241. package/test/4_chessboard_graphic.js +0 -49
  242. package/test/5_chessboard_interaction.js +0 -135
  243. package/test/6_chessboard_play_moves.js +0 -107
  244. package/test/references/01_marker_icons/10.png +0 -0
  245. package/test/references/01_marker_icons/3.png +0 -0
  246. package/test/references/01_marker_icons/4.png +0 -0
  247. package/test/references/01_marker_icons/5.png +0 -0
  248. package/test/references/01_marker_icons/6.png +0 -0
  249. package/test/references/01_marker_icons/7.png +0 -0
  250. package/test/references/01_marker_icons/8.png +0 -0
  251. package/test/references/01_marker_icons/9.png +0 -0
  252. package/test/references/02_chessboard_simple/5.png +0 -0
  253. package/test/references/05_chessboard_move/8.png +0 -0
  254. package/test/references/11_chessboard_play_moves/wrong_color.png +0 -0
  255. package/test/references/14_movetext_error/4.png +0 -0
  256. /package/dist/lib/{sprites → chessboard/sprites}/cburnett-bb.png +0 -0
  257. /package/dist/lib/{sprites → chessboard/sprites}/cburnett-bk.png +0 -0
  258. /package/dist/lib/{sprites → chessboard/sprites}/cburnett-bn.png +0 -0
  259. /package/dist/lib/{sprites → chessboard/sprites}/cburnett-bp.png +0 -0
  260. /package/dist/lib/{sprites → chessboard/sprites}/cburnett-bq.png +0 -0
  261. /package/dist/lib/{sprites → chessboard/sprites}/cburnett-br.png +0 -0
  262. /package/dist/lib/{sprites → chessboard/sprites}/cburnett-bx.png +0 -0
  263. /package/dist/lib/{sprites → chessboard/sprites}/cburnett-wb.png +0 -0
  264. /package/dist/lib/{sprites → chessboard/sprites}/cburnett-wk.png +0 -0
  265. /package/dist/lib/{sprites → chessboard/sprites}/cburnett-wn.png +0 -0
  266. /package/dist/lib/{sprites → chessboard/sprites}/cburnett-wp.png +0 -0
  267. /package/dist/lib/{sprites → chessboard/sprites}/cburnett-wq.png +0 -0
  268. /package/dist/lib/{sprites → chessboard/sprites}/cburnett-wr.png +0 -0
  269. /package/dist/lib/{sprites → chessboard/sprites}/cburnett-wx.png +0 -0
  270. /package/dist/lib/{sprites → chessboard/sprites}/celtic-bb.png +0 -0
  271. /package/dist/lib/{sprites → chessboard/sprites}/celtic-bk.png +0 -0
  272. /package/dist/lib/{sprites → chessboard/sprites}/celtic-bn.png +0 -0
  273. /package/dist/lib/{sprites → chessboard/sprites}/celtic-bp.png +0 -0
  274. /package/dist/lib/{sprites → chessboard/sprites}/celtic-bq.png +0 -0
  275. /package/dist/lib/{sprites → chessboard/sprites}/celtic-br.png +0 -0
  276. /package/dist/lib/{sprites → chessboard/sprites}/celtic-bx.png +0 -0
  277. /package/dist/lib/{sprites → chessboard/sprites}/celtic-wb.png +0 -0
  278. /package/dist/lib/{sprites → chessboard/sprites}/celtic-wk.png +0 -0
  279. /package/dist/lib/{sprites → chessboard/sprites}/celtic-wn.png +0 -0
  280. /package/dist/lib/{sprites → chessboard/sprites}/celtic-wp.png +0 -0
  281. /package/dist/lib/{sprites → chessboard/sprites}/celtic-wq.png +0 -0
  282. /package/dist/lib/{sprites → chessboard/sprites}/celtic-wr.png +0 -0
  283. /package/dist/lib/{sprites → chessboard/sprites}/celtic-wx.png +0 -0
  284. /package/dist/lib/{sprites → chessboard/sprites}/eyes-bb.png +0 -0
  285. /package/dist/lib/{sprites → chessboard/sprites}/eyes-bk.png +0 -0
  286. /package/dist/lib/{sprites → chessboard/sprites}/eyes-bn.png +0 -0
  287. /package/dist/lib/{sprites → chessboard/sprites}/eyes-bp.png +0 -0
  288. /package/dist/lib/{sprites → chessboard/sprites}/eyes-bq.png +0 -0
  289. /package/dist/lib/{sprites → chessboard/sprites}/eyes-br.png +0 -0
  290. /package/dist/lib/{sprites → chessboard/sprites}/eyes-spatial-bx.png +0 -0
  291. /package/dist/lib/{sprites → chessboard/sprites}/eyes-spatial-wx.png +0 -0
  292. /package/dist/lib/{sprites → chessboard/sprites}/eyes-wb.png +0 -0
  293. /package/dist/lib/{sprites → chessboard/sprites}/eyes-wk.png +0 -0
  294. /package/dist/lib/{sprites → chessboard/sprites}/eyes-wn.png +0 -0
  295. /package/dist/lib/{sprites → chessboard/sprites}/eyes-wp.png +0 -0
  296. /package/dist/lib/{sprites → chessboard/sprites}/eyes-wq.png +0 -0
  297. /package/dist/lib/{sprites → chessboard/sprites}/eyes-wr.png +0 -0
  298. /package/dist/lib/{sprites → chessboard/sprites}/fantasy-bb.png +0 -0
  299. /package/dist/lib/{sprites → chessboard/sprites}/fantasy-bk.png +0 -0
  300. /package/dist/lib/{sprites → chessboard/sprites}/fantasy-bn.png +0 -0
  301. /package/dist/lib/{sprites → chessboard/sprites}/fantasy-bp.png +0 -0
  302. /package/dist/lib/{sprites → chessboard/sprites}/fantasy-bq.png +0 -0
  303. /package/dist/lib/{sprites → chessboard/sprites}/fantasy-br.png +0 -0
  304. /package/dist/lib/{sprites → chessboard/sprites}/fantasy-bx.png +0 -0
  305. /package/dist/lib/{sprites → chessboard/sprites}/fantasy-wb.png +0 -0
  306. /package/dist/lib/{sprites → chessboard/sprites}/fantasy-wk.png +0 -0
  307. /package/dist/lib/{sprites → chessboard/sprites}/fantasy-wn.png +0 -0
  308. /package/dist/lib/{sprites → chessboard/sprites}/fantasy-wp.png +0 -0
  309. /package/dist/lib/{sprites → chessboard/sprites}/fantasy-wq.png +0 -0
  310. /package/dist/lib/{sprites → chessboard/sprites}/fantasy-wr.png +0 -0
  311. /package/dist/lib/{sprites → chessboard/sprites}/fantasy-wx.png +0 -0
  312. /package/dist/lib/{sprites → chessboard/sprites}/skulls-bb.png +0 -0
  313. /package/dist/lib/{sprites → chessboard/sprites}/skulls-bk.png +0 -0
  314. /package/dist/lib/{sprites → chessboard/sprites}/skulls-bn.png +0 -0
  315. /package/dist/lib/{sprites → chessboard/sprites}/skulls-bp.png +0 -0
  316. /package/dist/lib/{sprites → chessboard/sprites}/skulls-bq.png +0 -0
  317. /package/dist/lib/{sprites → chessboard/sprites}/skulls-br.png +0 -0
  318. /package/dist/lib/{sprites → chessboard/sprites}/skulls-bx.png +0 -0
  319. /package/dist/lib/{sprites → chessboard/sprites}/skulls-wb.png +0 -0
  320. /package/dist/lib/{sprites → chessboard/sprites}/skulls-wk.png +0 -0
  321. /package/dist/lib/{sprites → chessboard/sprites}/skulls-wn.png +0 -0
  322. /package/dist/lib/{sprites → chessboard/sprites}/skulls-wp.png +0 -0
  323. /package/dist/lib/{sprites → chessboard/sprites}/skulls-wq.png +0 -0
  324. /package/dist/lib/{sprites → chessboard/sprites}/skulls-wr.png +0 -0
  325. /package/dist/lib/{sprites → chessboard/sprites}/skulls-wx.png +0 -0
  326. /package/dist/lib/{sprites → chessboard/sprites}/spatial-bb.png +0 -0
  327. /package/dist/lib/{sprites → chessboard/sprites}/spatial-bk.png +0 -0
  328. /package/dist/lib/{sprites → chessboard/sprites}/spatial-bn.png +0 -0
  329. /package/dist/lib/{sprites → chessboard/sprites}/spatial-bp.png +0 -0
  330. /package/dist/lib/{sprites → chessboard/sprites}/spatial-bq.png +0 -0
  331. /package/dist/lib/{sprites → chessboard/sprites}/spatial-br.png +0 -0
  332. /package/dist/lib/{sprites → chessboard/sprites}/spatial-wb.png +0 -0
  333. /package/dist/lib/{sprites → chessboard/sprites}/spatial-wk.png +0 -0
  334. /package/dist/lib/{sprites → chessboard/sprites}/spatial-wn.png +0 -0
  335. /package/dist/lib/{sprites → chessboard/sprites}/spatial-wp.png +0 -0
  336. /package/dist/lib/{sprites → chessboard/sprites}/spatial-wq.png +0 -0
  337. /package/dist/lib/{sprites → chessboard/sprites}/spatial-wr.png +0 -0
  338. /package/dist/lib/{fonts → movetext/fonts}/chessalpha.woff +0 -0
  339. /package/dist/lib/{fonts → movetext/fonts}/chessalpha.woff2 +0 -0
  340. /package/src/{sprites → chessboard/sprites}/cburnett-bb.png +0 -0
  341. /package/src/{sprites → chessboard/sprites}/cburnett-bk.png +0 -0
  342. /package/src/{sprites → chessboard/sprites}/cburnett-bn.png +0 -0
  343. /package/src/{sprites → chessboard/sprites}/cburnett-bp.png +0 -0
  344. /package/src/{sprites → chessboard/sprites}/cburnett-bq.png +0 -0
  345. /package/src/{sprites → chessboard/sprites}/cburnett-br.png +0 -0
  346. /package/src/{sprites → chessboard/sprites}/cburnett-bx.png +0 -0
  347. /package/src/{sprites → chessboard/sprites}/cburnett-wb.png +0 -0
  348. /package/src/{sprites → chessboard/sprites}/cburnett-wk.png +0 -0
  349. /package/src/{sprites → chessboard/sprites}/cburnett-wn.png +0 -0
  350. /package/src/{sprites → chessboard/sprites}/cburnett-wp.png +0 -0
  351. /package/src/{sprites → chessboard/sprites}/cburnett-wq.png +0 -0
  352. /package/src/{sprites → chessboard/sprites}/cburnett-wr.png +0 -0
  353. /package/src/{sprites → chessboard/sprites}/cburnett-wx.png +0 -0
  354. /package/src/{sprites → chessboard/sprites}/celtic-bb.png +0 -0
  355. /package/src/{sprites → chessboard/sprites}/celtic-bk.png +0 -0
  356. /package/src/{sprites → chessboard/sprites}/celtic-bn.png +0 -0
  357. /package/src/{sprites → chessboard/sprites}/celtic-bp.png +0 -0
  358. /package/src/{sprites → chessboard/sprites}/celtic-bq.png +0 -0
  359. /package/src/{sprites → chessboard/sprites}/celtic-br.png +0 -0
  360. /package/src/{sprites → chessboard/sprites}/celtic-bx.png +0 -0
  361. /package/src/{sprites → chessboard/sprites}/celtic-wb.png +0 -0
  362. /package/src/{sprites → chessboard/sprites}/celtic-wk.png +0 -0
  363. /package/src/{sprites → chessboard/sprites}/celtic-wn.png +0 -0
  364. /package/src/{sprites → chessboard/sprites}/celtic-wp.png +0 -0
  365. /package/src/{sprites → chessboard/sprites}/celtic-wq.png +0 -0
  366. /package/src/{sprites → chessboard/sprites}/celtic-wr.png +0 -0
  367. /package/src/{sprites → chessboard/sprites}/celtic-wx.png +0 -0
  368. /package/src/{sprites → chessboard/sprites}/eyes-bb.png +0 -0
  369. /package/src/{sprites → chessboard/sprites}/eyes-bk.png +0 -0
  370. /package/src/{sprites → chessboard/sprites}/eyes-bn.png +0 -0
  371. /package/src/{sprites → chessboard/sprites}/eyes-bp.png +0 -0
  372. /package/src/{sprites → chessboard/sprites}/eyes-bq.png +0 -0
  373. /package/src/{sprites → chessboard/sprites}/eyes-br.png +0 -0
  374. /package/src/{sprites → chessboard/sprites}/eyes-spatial-bx.png +0 -0
  375. /package/src/{sprites → chessboard/sprites}/eyes-spatial-wx.png +0 -0
  376. /package/src/{sprites → chessboard/sprites}/eyes-wb.png +0 -0
  377. /package/src/{sprites → chessboard/sprites}/eyes-wk.png +0 -0
  378. /package/src/{sprites → chessboard/sprites}/eyes-wn.png +0 -0
  379. /package/src/{sprites → chessboard/sprites}/eyes-wp.png +0 -0
  380. /package/src/{sprites → chessboard/sprites}/eyes-wq.png +0 -0
  381. /package/src/{sprites → chessboard/sprites}/eyes-wr.png +0 -0
  382. /package/src/{sprites → chessboard/sprites}/fantasy-bb.png +0 -0
  383. /package/src/{sprites → chessboard/sprites}/fantasy-bk.png +0 -0
  384. /package/src/{sprites → chessboard/sprites}/fantasy-bn.png +0 -0
  385. /package/src/{sprites → chessboard/sprites}/fantasy-bp.png +0 -0
  386. /package/src/{sprites → chessboard/sprites}/fantasy-bq.png +0 -0
  387. /package/src/{sprites → chessboard/sprites}/fantasy-br.png +0 -0
  388. /package/src/{sprites → chessboard/sprites}/fantasy-bx.png +0 -0
  389. /package/src/{sprites → chessboard/sprites}/fantasy-wb.png +0 -0
  390. /package/src/{sprites → chessboard/sprites}/fantasy-wk.png +0 -0
  391. /package/src/{sprites → chessboard/sprites}/fantasy-wn.png +0 -0
  392. /package/src/{sprites → chessboard/sprites}/fantasy-wp.png +0 -0
  393. /package/src/{sprites → chessboard/sprites}/fantasy-wq.png +0 -0
  394. /package/src/{sprites → chessboard/sprites}/fantasy-wr.png +0 -0
  395. /package/src/{sprites → chessboard/sprites}/fantasy-wx.png +0 -0
  396. /package/src/{sprites → chessboard/sprites}/skulls-bb.png +0 -0
  397. /package/src/{sprites → chessboard/sprites}/skulls-bk.png +0 -0
  398. /package/src/{sprites → chessboard/sprites}/skulls-bn.png +0 -0
  399. /package/src/{sprites → chessboard/sprites}/skulls-bp.png +0 -0
  400. /package/src/{sprites → chessboard/sprites}/skulls-bq.png +0 -0
  401. /package/src/{sprites → chessboard/sprites}/skulls-br.png +0 -0
  402. /package/src/{sprites → chessboard/sprites}/skulls-bx.png +0 -0
  403. /package/src/{sprites → chessboard/sprites}/skulls-wb.png +0 -0
  404. /package/src/{sprites → chessboard/sprites}/skulls-wk.png +0 -0
  405. /package/src/{sprites → chessboard/sprites}/skulls-wn.png +0 -0
  406. /package/src/{sprites → chessboard/sprites}/skulls-wp.png +0 -0
  407. /package/src/{sprites → chessboard/sprites}/skulls-wq.png +0 -0
  408. /package/src/{sprites → chessboard/sprites}/skulls-wr.png +0 -0
  409. /package/src/{sprites → chessboard/sprites}/skulls-wx.png +0 -0
  410. /package/src/{sprites → chessboard/sprites}/spatial-bb.png +0 -0
  411. /package/src/{sprites → chessboard/sprites}/spatial-bk.png +0 -0
  412. /package/src/{sprites → chessboard/sprites}/spatial-bn.png +0 -0
  413. /package/src/{sprites → chessboard/sprites}/spatial-bp.png +0 -0
  414. /package/src/{sprites → chessboard/sprites}/spatial-bq.png +0 -0
  415. /package/src/{sprites → chessboard/sprites}/spatial-br.png +0 -0
  416. /package/src/{sprites → chessboard/sprites}/spatial-wb.png +0 -0
  417. /package/src/{sprites → chessboard/sprites}/spatial-wk.png +0 -0
  418. /package/src/{sprites → chessboard/sprites}/spatial-wn.png +0 -0
  419. /package/src/{sprites → chessboard/sprites}/spatial-wp.png +0 -0
  420. /package/src/{sprites → chessboard/sprites}/spatial-wq.png +0 -0
  421. /package/src/{sprites → chessboard/sprites}/spatial-wr.png +0 -0
  422. /package/src/{fonts → movetext/fonts}/chessalpha.woff +0 -0
  423. /package/src/{fonts → movetext/fonts}/chessalpha.woff2 +0 -0
  424. /package/test/{references/01_marker_icons/1.png → graphic_references/04_marker_icons_graphic/base/colorized_square.png} +0 -0
  425. /package/test/{references/01_marker_icons/0.png → graphic_references/04_marker_icons_graphic/base/default_square.png} +0 -0
  426. /package/test/{references/01_marker_icons/2.png → graphic_references/04_marker_icons_graphic/base/wrapped_square.png} +0 -0
  427. /package/test/{references/04_chessboard_annotations/4.png → graphic_references/05_chessboard_graphic/annotations/overlap.png} +0 -0
  428. /package/test/{references/04_chessboard_annotations/5.png → graphic_references/05_chessboard_graphic/annotations/overlap_and_flip.png} +0 -0
  429. /package/test/{references/04_chessboard_annotations/0.png → graphic_references/05_chessboard_graphic/annotations/with_coordinates.png} +0 -0
  430. /package/test/{references/04_chessboard_annotations/1.png → graphic_references/05_chessboard_graphic/annotations/with_coordinates_and_flip.png} +0 -0
  431. /package/test/{references/04_chessboard_annotations/2.png → graphic_references/05_chessboard_graphic/annotations/without_coordinates.png} +0 -0
  432. /package/test/{references/04_chessboard_annotations/3.png → graphic_references/05_chessboard_graphic/annotations/without_coordinates_and_flip.png} +0 -0
  433. /package/test/{references/02_chessboard_simple/0.png → graphic_references/05_chessboard_graphic/base/default.png} +0 -0
  434. /package/test/{references/02_chessboard_simple/1.png → graphic_references/05_chessboard_graphic/base/empty.png} +0 -0
  435. /package/test/{references/02_chessboard_simple/3.png → graphic_references/05_chessboard_graphic/base/from_fen.png} +0 -0
  436. /package/test/{references/02_chessboard_simple/4.png → graphic_references/05_chessboard_graphic/base/from_kokopu_object.png} +0 -0
  437. /package/test/{references/02_chessboard_simple/2.png → graphic_references/05_chessboard_graphic/base/parsing_error.png} +0 -0
  438. /package/test/{references/03_chessboard_flipped/2.png → graphic_references/05_chessboard_graphic/chess_variants/variant_without_std_initial_position.png} +0 -0
  439. /package/test/{references/03_chessboard_flipped/0.png → graphic_references/05_chessboard_graphic/flipped/default.png} +0 -0
  440. /package/test/{references/03_chessboard_flipped/1.png → graphic_references/05_chessboard_graphic/flipped/empty.png} +0 -0
  441. /package/test/{references/03_chessboard_flipped/3.png → graphic_references/05_chessboard_graphic/flipped/from_fen.png} +0 -0
  442. /package/test/{references/03_chessboard_flipped/4.png → graphic_references/05_chessboard_graphic/flipped/from_kokopu_object.png} +0 -0
  443. /package/test/{references/05_chessboard_move/4.png → graphic_references/05_chessboard_graphic/move/capture.png} +0 -0
  444. /package/test/{references/05_chessboard_move/5.png → graphic_references/05_chessboard_graphic/move/castling_move.png} +0 -0
  445. /package/test/{references/05_chessboard_move/0.png → graphic_references/05_chessboard_graphic/move/default.png} +0 -0
  446. /package/test/{references/05_chessboard_move/6.png → graphic_references/05_chessboard_graphic/move/en-passant.png} +0 -0
  447. /package/test/{references/05_chessboard_move/1.png → graphic_references/05_chessboard_graphic/move/no_move_arrow.png} +0 -0
  448. /package/test/{references/05_chessboard_move/2.png → graphic_references/05_chessboard_graphic/move/parsing_error.png} +0 -0
  449. /package/test/{references/05_chessboard_move/7.png → graphic_references/05_chessboard_graphic/move/promotion.png} +0 -0
  450. /package/test/{references/05_chessboard_move/3.png → graphic_references/05_chessboard_graphic/move/with_forced_move_arrow_and_flip.png} +0 -0
  451. /package/test/{references/07_chessboard_theme/3.png → graphic_references/05_chessboard_graphic/theme/custom_1.png} +0 -0
  452. /package/test/{references/07_chessboard_theme/4.png → graphic_references/05_chessboard_graphic/theme/custom_2.png} +0 -0
  453. /package/test/{references/07_chessboard_theme/5.png → graphic_references/05_chessboard_graphic/theme/custom_3.png} +0 -0
  454. /package/test/{references/07_chessboard_theme/6.png → graphic_references/05_chessboard_graphic/theme/custom_4.png} +0 -0
  455. /package/test/{references/07_chessboard_theme/7.png → graphic_references/05_chessboard_graphic/theme/custom_5.png} +0 -0
  456. /package/test/{references/07_chessboard_theme/8.png → graphic_references/05_chessboard_graphic/theme/custom_6.png} +0 -0
  457. /package/test/{references/07_chessboard_theme/0.png → graphic_references/05_chessboard_graphic/theme/default.png} +0 -0
  458. /package/test/{references/07_chessboard_theme/1.png → graphic_references/05_chessboard_graphic/theme/large.png} +0 -0
  459. /package/test/{references/07_chessboard_theme/2.png → graphic_references/05_chessboard_graphic/theme/small.png} +0 -0
  460. /package/test/{references/06a_chessboard_animated_move/2.png → graphic_references/06_chessboard_animation/base_1/capture.png} +0 -0
  461. /package/test/{references/06a_chessboard_animated_move/3.png → graphic_references/06_chessboard_animation/base_1/castling_move.png} +0 -0
  462. /package/test/{references/06a_chessboard_animated_move/4.png → graphic_references/06_chessboard_animation/base_1/en-passant.png} +0 -0
  463. /package/test/{references/06a_chessboard_animated_move/0.png → graphic_references/06_chessboard_animation/base_1/move_1.png} +0 -0
  464. /package/test/{references/06a_chessboard_animated_move/1.png → graphic_references/06_chessboard_animation/base_1/move_2.png} +0 -0
  465. /package/test/{references/06a_chessboard_animated_move/5.png → graphic_references/06_chessboard_animation/base_1/promotion.png} +0 -0
  466. /package/test/{references/06b_chessboard_animated_move/2.png → graphic_references/06_chessboard_animation/base_2/capture.png} +0 -0
  467. /package/test/{references/06b_chessboard_animated_move/3.png → graphic_references/06_chessboard_animation/base_2/castling_move.png} +0 -0
  468. /package/test/{references/06b_chessboard_animated_move/4.png → graphic_references/06_chessboard_animation/base_2/en-passant.png} +0 -0
  469. /package/test/{references/06b_chessboard_animated_move/0.png → graphic_references/06_chessboard_animation/base_2/move_1.png} +0 -0
  470. /package/test/{references/06b_chessboard_animated_move/1.png → graphic_references/06_chessboard_animation/base_2/move_2.png} +0 -0
  471. /package/test/{references/06b_chessboard_animated_move/5.png → graphic_references/06_chessboard_animation/base_2/promotion.png} +0 -0
  472. /package/test/{references/06c_chessboard_animated_move/2.png → graphic_references/06_chessboard_animation/base_3/capture.png} +0 -0
  473. /package/test/{references/06c_chessboard_animated_move/3.png → graphic_references/06_chessboard_animation/base_3/castling_move.png} +0 -0
  474. /package/test/{references/06c_chessboard_animated_move/4.png → graphic_references/06_chessboard_animation/base_3/en-passant.png} +0 -0
  475. /package/test/{references/06c_chessboard_animated_move/0.png → graphic_references/06_chessboard_animation/base_3/move_1.png} +0 -0
  476. /package/test/{references/06c_chessboard_animated_move/1.png → graphic_references/06_chessboard_animation/base_3/move_2.png} +0 -0
  477. /package/test/{references/06c_chessboard_animated_move/5.png → graphic_references/06_chessboard_animation/base_3/promotion.png} +0 -0
  478. /package/test/{references/10_chessboard_edit_arrows → graphic_references/07_chessboard_interaction/edit_arrows}/base_1.png +0 -0
  479. /package/test/{references/10_chessboard_edit_arrows → graphic_references/07_chessboard_interaction/edit_arrows}/base_2.png +0 -0
  480. /package/test/{references/10_chessboard_edit_arrows/null_vector.png → graphic_references/07_chessboard_interaction/edit_arrows/from_==_to.png} +0 -0
  481. /package/test/{references/10_chessboard_edit_arrows → graphic_references/07_chessboard_interaction/edit_arrows}/out_of_board.png +0 -0
  482. /package/test/{references/10_chessboard_edit_arrows → graphic_references/07_chessboard_interaction/edit_arrows}/over_arrow_marker.png +0 -0
  483. /package/test/{references/10_chessboard_edit_arrows → graphic_references/07_chessboard_interaction/edit_arrows}/over_square_marker.png +0 -0
  484. /package/test/{references/09_chessboard_move_pieces → graphic_references/07_chessboard_interaction/move_pieces}/after_move.png +0 -0
  485. /package/test/{references/09_chessboard_move_pieces/null_vector.png → graphic_references/07_chessboard_interaction/move_pieces/from_==_to.png} +0 -0
  486. /package/test/{references/09_chessboard_move_pieces/empty_square.png → graphic_references/07_chessboard_interaction/move_pieces/move_empty_square.png} +0 -0
  487. /package/test/{references/09_chessboard_move_pieces → graphic_references/07_chessboard_interaction/move_pieces}/out_of_board.png +0 -0
  488. /package/test/{references/09_chessboard_move_pieces → graphic_references/07_chessboard_interaction/move_pieces}/over_arrow_marker.png +0 -0
  489. /package/test/{references/09_chessboard_move_pieces → graphic_references/07_chessboard_interaction/move_pieces}/over_empty.png +0 -0
  490. /package/test/{references/09_chessboard_move_pieces/over_non_empty_1.png → graphic_references/07_chessboard_interaction/move_pieces/over_non-empty_1.png} +0 -0
  491. /package/test/{references/09_chessboard_move_pieces/over_non_empty_2.png → graphic_references/07_chessboard_interaction/move_pieces/over_non-empty_2.png} +0 -0
  492. /package/test/{references/09_chessboard_move_pieces → graphic_references/07_chessboard_interaction/move_pieces}/over_square_marker.png +0 -0
  493. /package/test/{references/09_chessboard_move_pieces → graphic_references/07_chessboard_interaction/move_pieces}/over_text_marker.png +0 -0
  494. /package/test/{references/11_chessboard_play_moves → graphic_references/08_chessboard_play_moves/base}/castling_move.png +0 -0
  495. /package/test/{references/11_chessboard_play_moves → graphic_references/08_chessboard_play_moves/base}/chess960_ambiguous_king_move.png +0 -0
  496. /package/test/{references/11_chessboard_play_moves → graphic_references/08_chessboard_play_moves/base}/chess960_castling_move_1.png +0 -0
  497. /package/test/{references/11_chessboard_play_moves → graphic_references/08_chessboard_play_moves/base}/chess960_castling_move_2.png +0 -0
  498. /package/test/{references/11_chessboard_play_moves/chess960_non_kxr_castling.png → graphic_references/08_chessboard_play_moves/base/chess960_non-kxr_castling.png} +0 -0
  499. /package/test/{references/11_chessboard_play_moves/null_vector.png → graphic_references/08_chessboard_play_moves/base/from_==_to.png} +0 -0
  500. /package/test/{references/11_chessboard_play_moves → graphic_references/08_chessboard_play_moves/base}/illegal_move.png +0 -0
  501. /package/test/{references/11_chessboard_play_moves → graphic_references/08_chessboard_play_moves/base}/illegal_position.png +0 -0
  502. /package/test/{references/11_chessboard_play_moves → graphic_references/08_chessboard_play_moves/base}/out_of_board.png +0 -0
  503. /package/test/{references/11_chessboard_play_moves → graphic_references/08_chessboard_play_moves/base}/regular_move_1.png +0 -0
  504. /package/test/{references/11_chessboard_play_moves → graphic_references/08_chessboard_play_moves/base}/regular_move_2.png +0 -0
  505. /package/test/{references/10_chessboard_edit_arrows/edit_color_not_set.png → graphic_references/08_chessboard_play_moves/base/wrong_color_moved.png} +0 -0
  506. /package/test/{references/12_chessboard_play_promotions → graphic_references/08_chessboard_play_moves/promotions}/antichess_promotion.png +0 -0
  507. /package/test/{references/12_chessboard_play_promotions → graphic_references/08_chessboard_play_moves/promotions}/cancel_promotion.png +0 -0
  508. /package/test/{references/12_chessboard_play_promotions → graphic_references/08_chessboard_play_moves/promotions}/regular_promotion_1.png +0 -0
  509. /package/test/{references/12_chessboard_play_promotions → graphic_references/08_chessboard_play_moves/promotions}/regular_promotion_2.png +0 -0
  510. /package/test/{references/13_movetext_simple/0.png → graphic_references/09_movetext_graphic/base/game_1.png} +0 -0
  511. /package/test/{references/13_movetext_simple/1.png → graphic_references/09_movetext_graphic/base/game_2.png} +0 -0
  512. /package/test/{references/13_movetext_simple/2.png → graphic_references/09_movetext_graphic/base/game_3.png} +0 -0
  513. /package/test/{references/13_movetext_simple/3.png → graphic_references/09_movetext_graphic/base/game_4.png} +0 -0
  514. /package/test/{references/14_movetext_error/2.png → graphic_references/09_movetext_graphic/error/pgn_parsing_error_1.png} +0 -0
  515. /package/test/{references/14_movetext_error/3.png → graphic_references/09_movetext_graphic/error/pgn_parsing_error_2.png} +0 -0
  516. /package/test/{references/14_movetext_error/0.png → graphic_references/09_movetext_graphic/error/wrong_game_index_1.png} +0 -0
  517. /package/test/{references/14_movetext_error/1.png → graphic_references/09_movetext_graphic/error/wrong_game_index_2.png} +0 -0
  518. /package/test/{references/15_movetext_html/2.png → graphic_references/09_movetext_graphic/html/filtered_tags_and_attributes.png} +0 -0
  519. /package/test/{references/15_movetext_html/1.png → graphic_references/09_movetext_graphic/html/html_in_comments.png} +0 -0
  520. /package/test/{references/15_movetext_html/0.png → graphic_references/09_movetext_graphic/html/html_in_headers.png} +0 -0
  521. /package/test/{references/16_movetext_options/1.png → graphic_references/09_movetext_graphic/options/custom_piece_symbols.png} +0 -0
  522. /package/test/{references/16_movetext_options/2.png → graphic_references/09_movetext_graphic/options/figurine_piece_symbols_and_diagram_options.png} +0 -0
  523. /package/test/{references/16_movetext_options/3.png → graphic_references/09_movetext_graphic/options/hidden_diagrams.png} +0 -0
  524. /package/test/{references/16_movetext_options/0.png → graphic_references/09_movetext_graphic/options/localized_piece_symbols.png} +0 -0
  525. /package/test/{references/17_movetext_interaction/0.png → graphic_references/10_movetext_interaction/select_moves/click_on_disabled.png} +0 -0
  526. /package/test/{references/17_movetext_interaction/1.png → graphic_references/10_movetext_interaction/select_moves/click_on_unselected.png} +0 -0
  527. /package/test/{references/17_movetext_interaction/2.png → graphic_references/10_movetext_interaction/select_moves/click_on_with_variations.png} +0 -0
  528. /package/{graphic_test_src → test/graphic_test_app}/common/dummy.pgn +0 -0
  529. /package/{graphic_test_src → test/graphic_test_app}/common/heartbeat.txt +0 -0
  530. /package/{graphic_test_src → test/graphic_test_app}/common/smiley.png +0 -0
@@ -1,4 +1,4 @@
1
- /******************************************************************************
1
+ /* -------------------------------------------------------------------------- *
2
2
  * *
3
3
  * This file is part of Kokopu-React, a JavaScript chess library. *
4
4
  * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
@@ -17,13 +17,16 @@
17
17
  * Public License along with this program. If not, see *
18
18
  * <http://www.gnu.org/licenses/>. *
19
19
  * *
20
- ******************************************************************************/
20
+ * -------------------------------------------------------------------------- */
21
21
 
22
22
 
23
- const fs = require('fs');
23
+ import * as React from 'react';
24
+ import { testApp } from '../common/test_app';
25
+ import { ErrorBox, i18n } from '../../../dist/lib/index';
24
26
 
25
- const rootDir = __dirname + '/..';
26
- const outputDir = rootDir + '/build/graphic_output';
27
+ // Checking localization...
28
+ i18n.LINE = 'ligne {0} (+ invalid placeholder {1})';
27
29
 
28
- // Erase the directory in which the screenshots are generated.
29
- fs.rmSync(outputDir, { force: true, recursive: true });
30
+ testApp([ /* eslint-disable react/jsx-key */
31
+ <ErrorBox title="The title" message="The message" text="| x <- error is here" errorIndex={2} lineNumber={42} />,
32
+ ]); /* eslint-enable react/jsx-key */
@@ -1,4 +1,4 @@
1
- /******************************************************************************
1
+ /* -------------------------------------------------------------------------- *
2
2
  * *
3
3
  * This file is part of Kokopu-React, a JavaScript chess library. *
4
4
  * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
@@ -17,23 +17,31 @@
17
17
  * Public License along with this program. If not, see *
18
18
  * <http://www.gnu.org/licenses/>. *
19
19
  * *
20
- ******************************************************************************/
20
+ * -------------------------------------------------------------------------- */
21
21
 
22
22
 
23
- import React from 'react';
24
- import testApp from './common/test_app';
25
- import { SquareMarkerIcon, TextMarkerIcon, ArrowMarkerIcon } from '../src/index';
23
+ import * as React from 'react';
24
+ import { testApp } from '../common/test_app';
25
+ import { SquareMarkerIcon, TextMarkerIcon, ArrowMarkerIcon } from '../../../dist/lib/index';
26
26
 
27
27
  testApp([ /* eslint-disable react/jsx-key */
28
+
28
29
  <SquareMarkerIcon size={40} />,
29
30
  <SquareMarkerIcon size={45} color="green" />,
30
31
  <div style={{ color: 'purple' }}><SquareMarkerIcon size={31} /></div>,
32
+ <SquareMarkerIcon size={ /* eslint-disable @typescript-eslint/no-explicit-any */ 'not-a-number' as any /* eslint-enable @typescript-eslint/no-explicit-any */ } />,
33
+
31
34
  <TextMarkerIcon size={41} symbol="A" />,
32
35
  <TextMarkerIcon size={29} symbol="b" color="#0ff" />,
33
36
  <div style={{ color: 'red' }}><TextMarkerIcon size={53} symbol="5" /></div>,
37
+ <TextMarkerIcon size={47} symbol="dot" color="#00f" />,
38
+ <div style={{ color: 'pink' }}><TextMarkerIcon size={48} symbol="circle" /></div>,
39
+ <TextMarkerIcon size={ /* eslint-disable @typescript-eslint/no-explicit-any */ 'not-a-number' as any /* eslint-enable @typescript-eslint/no-explicit-any */ } symbol="A" />,
40
+ <TextMarkerIcon size={40} symbol={ /* eslint-disable @typescript-eslint/no-explicit-any */ 'not-a-symbol' as any /* eslint-enable @typescript-eslint/no-explicit-any */ } />,
41
+
34
42
  <ArrowMarkerIcon size={40} />,
35
43
  <ArrowMarkerIcon size={24} color="#888" />,
36
44
  <div style={{ color: '#f70' }}><ArrowMarkerIcon size={48} /></div>,
37
- <TextMarkerIcon size={47} symbol="dot" color="#00f" />,
38
- <div style={{ color: 'pink' }}><TextMarkerIcon size={48} symbol="circle" /></div>,
45
+ <ArrowMarkerIcon size={ /* eslint-disable @typescript-eslint/no-explicit-any */ 'not-a-number' as any /* eslint-enable @typescript-eslint/no-explicit-any */ } />,
46
+
39
47
  ]); /* eslint-enable react/jsx-key */
@@ -1,4 +1,4 @@
1
- /******************************************************************************
1
+ /* -------------------------------------------------------------------------- *
2
2
  * *
3
3
  * This file is part of Kokopu-React, a JavaScript chess library. *
4
4
  * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
@@ -17,24 +17,33 @@
17
17
  * Public License along with this program. If not, see *
18
18
  * <http://www.gnu.org/licenses/>. *
19
19
  * *
20
- ******************************************************************************/
20
+ * -------------------------------------------------------------------------- */
21
21
 
22
22
 
23
- import React from 'react';
24
- import testApp from './common/test_app';
25
- import { Chessboard } from '../src/index';
23
+ import * as React from 'react';
24
+ import { testApp } from '../common/test_app';
25
+ import { Chessboard, AnnotationColor, AnnotationSymbol } from '../../../dist/lib/index';
26
26
 
27
- let squareMarkers1 = 'Ba1,Ba2,Gb1,Gb2,Rc1,Rc2,Yd1,Yd2';
28
- let arrowMarkers1 = 'Ba8b6,Gb8c6,Re8f6,Yf8g6';
29
- let textMarkers1 = 'B(circle)e1,B(plus)e2,GAf1,Gaf2,RZg1,Rzg2,Y2h1,Y8h2';
27
+ const squareMarkers1 = 'Ba1,Ba2,Gb1,Gb2,Rc1,Rc2,Yd1,Yd2';
28
+ const arrowMarkers1 = 'Ba8b6,Gb8c6,Re8f6,Yf8g6';
29
+ const textMarkers1 = 'B(circle)e1,B(plus)e2,GAf1,Gaf2,RZg1,Rzg2,Y2h1,Y8h2';
30
30
 
31
- let squareMarkers2 = { e4: 'g', g5: 'r', g1: 'y', h4: 'b' };
32
- let arrowMarkers2 = { c3a2: 'b', c4a4: 'g', c5a6: 'r', c6a8: 'y', d6c8: 'b', e6e8: 'g', f6g8: 'r' };
33
- let textMarkers2 = { g3: { symbol: 'H', color: 'r' }, g5: { symbol: 'M', color: 'g' }, h4: { symbol: 'times', color: 'y' } };
31
+ const B: AnnotationColor = 'b';
32
+ const G: AnnotationColor = 'g';
33
+ const R: AnnotationColor = 'r';
34
+ const Y: AnnotationColor = 'y';
34
35
 
35
- let squareMarkers3 = { b5: 'r', e4: 'g', h5: 'y', e2: 'b' };
36
- let arrowMarkers3 = { d1h5: 'g', a5f4: 'r', c7c3: 'y', g7g7: 'g' };
37
- let textMarkers3 = 'G5c6,R(plus)a1,G(times)b1,B(dot)a2,Y(circle)b2';
36
+ const SYMBOL_H: AnnotationSymbol = 'H';
37
+ const SYMBOL_M: AnnotationSymbol = 'M';
38
+ const SYMBOL_TIMES: AnnotationSymbol = 'times';
39
+
40
+ const squareMarkers2 = { e4: G, g5: R, g1: Y, h4: B };
41
+ const arrowMarkers2 = { c3a2: B, c4a4: G, c5a6: R, c6a8: Y, d6c8: B, e6e8: G, f6g8: R };
42
+ const textMarkers2 = { g3: { symbol: SYMBOL_H, color: R }, g5: { symbol: SYMBOL_M, color: G }, h4: { symbol: SYMBOL_TIMES, color: Y } };
43
+
44
+ const squareMarkers3 = { b5: R, e4: G, h5: Y, e2: B };
45
+ const arrowMarkers3 = { d1h5: G, a5f4: R, c7c3: Y, g7g7: G };
46
+ const textMarkers3 = 'G5c6,R(plus)a1,G(times)b1,B(dot)a2,Y(circle)b2';
38
47
 
39
48
  testApp([ /* eslint-disable react/jsx-key */
40
49
  <Chessboard squareMarkers={squareMarkers1} arrowMarkers={arrowMarkers1} textMarkers={textMarkers1} flipped={false} coordinateVisible={true} />,
@@ -1,4 +1,4 @@
1
- /******************************************************************************
1
+ /* -------------------------------------------------------------------------- *
2
2
  * *
3
3
  * This file is part of Kokopu-React, a JavaScript chess library. *
4
4
  * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
@@ -17,13 +17,13 @@
17
17
  * Public License along with this program. If not, see *
18
18
  * <http://www.gnu.org/licenses/>. *
19
19
  * *
20
- ******************************************************************************/
20
+ * -------------------------------------------------------------------------- */
21
21
 
22
22
 
23
- import React from 'react';
23
+ import * as React from 'react';
24
24
  import { Position } from 'kokopu';
25
- import testApp from './common/test_app';
26
- import { Chessboard } from '../src/index';
25
+ import { testApp } from '../common/test_app';
26
+ import { Chessboard } from '../../../dist/lib/index';
27
27
 
28
28
  testApp([ /* eslint-disable react/jsx-key */
29
29
  <Chessboard />,
@@ -31,5 +31,5 @@ testApp([ /* eslint-disable react/jsx-key */
31
31
  <Chessboard position="something invalid" />,
32
32
  <Chessboard position="r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R b KQkq - 3 3" />,
33
33
  <Chessboard position={new Position('8/8/1r6/8/5k1K/8/8/8 b - - 0 1')} />,
34
- <Chessboard position={42} />,
34
+ <Chessboard position={ /* eslint-disable @typescript-eslint/no-explicit-any */ 42 as any /* eslint-enable @typescript-eslint/no-explicit-any */ } />,
35
35
  ]); /* eslint-enable react/jsx-key */
@@ -0,0 +1,35 @@
1
+ /* -------------------------------------------------------------------------- *
2
+ * *
3
+ * This file is part of Kokopu-React, a JavaScript chess library. *
4
+ * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
5
+ * *
6
+ * This program is free software: you can redistribute it and/or *
7
+ * modify it under the terms of the GNU Lesser General Public License *
8
+ * as published by the Free Software Foundation, either version 3 of *
9
+ * the License, or (at your option) any later version. *
10
+ * *
11
+ * This program is distributed in the hope that it will be useful, *
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14
+ * GNU Lesser General Public License for more details. *
15
+ * *
16
+ * You should have received a copy of the GNU Lesser General *
17
+ * Public License along with this program. If not, see *
18
+ * <http://www.gnu.org/licenses/>. *
19
+ * *
20
+ * -------------------------------------------------------------------------- */
21
+
22
+
23
+ import * as React from 'react';
24
+ import { testApp } from '../common/test_app';
25
+ import { Chessboard } from '../../../dist/lib/index';
26
+
27
+ testApp([ /* eslint-disable react/jsx-key */
28
+ <Chessboard position="chess960:nqbrnkrb/pppppppp/8/8/8/8/PPPPPPPP/NQBRNKRB w KQkq - 0 1" />,
29
+ <Chessboard position="chess960:nqbrnkrb/pppppppp/8/8/8/8/PPPPPPPP/NQBRNKRB w KQkq - 0 1" move="O-O" />,
30
+ <Chessboard position="chess960" />,
31
+ <Chessboard position="horde" />,
32
+ <Chessboard position="start" />,
33
+ <Chessboard position="whatever" />,
34
+ <Chessboard position="whatever:rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" />,
35
+ ]); /* eslint-enable react/jsx-key */
@@ -1,4 +1,4 @@
1
- /******************************************************************************
1
+ /* -------------------------------------------------------------------------- *
2
2
  * *
3
3
  * This file is part of Kokopu-React, a JavaScript chess library. *
4
4
  * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
@@ -17,13 +17,13 @@
17
17
  * Public License along with this program. If not, see *
18
18
  * <http://www.gnu.org/licenses/>. *
19
19
  * *
20
- ******************************************************************************/
20
+ * -------------------------------------------------------------------------- */
21
21
 
22
22
 
23
- import React from 'react';
23
+ import * as React from 'react';
24
24
  import { Position } from 'kokopu';
25
- import testApp from './common/test_app';
26
- import { Chessboard } from '../src/index';
25
+ import { testApp } from '../common/test_app';
26
+ import { Chessboard } from '../../../dist/lib/index';
27
27
 
28
28
  testApp([ /* eslint-disable react/jsx-key */
29
29
  <Chessboard flipped={true} />,
@@ -1,4 +1,4 @@
1
- /******************************************************************************
1
+ /* -------------------------------------------------------------------------- *
2
2
  * *
3
3
  * This file is part of Kokopu-React, a JavaScript chess library. *
4
4
  * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
@@ -17,16 +17,16 @@
17
17
  * Public License along with this program. If not, see *
18
18
  * <http://www.gnu.org/licenses/>. *
19
19
  * *
20
- ******************************************************************************/
20
+ * -------------------------------------------------------------------------- */
21
21
 
22
22
 
23
- import React from 'react';
23
+ import * as React from 'react';
24
24
  import { Position } from 'kokopu';
25
- import testApp from './common/test_app';
26
- import { Chessboard } from '../src/index';
25
+ import { testApp } from '../common/test_app';
26
+ import { Chessboard } from '../../../dist/lib/index';
27
27
 
28
- let pos = new Position('r1bqkbnr/1ppp1ppp/p1n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R w KQkq - 0 4');
29
- let move = pos.notation('Bxc6');
28
+ const pos = new Position('r1bqkbnr/1ppp1ppp/p1n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R w KQkq - 0 4');
29
+ const move = pos.notation('Bxc6');
30
30
 
31
31
  testApp([ /* eslint-disable react/jsx-key */
32
32
  <Chessboard move="e4" animated={false} />,
@@ -37,5 +37,6 @@ testApp([ /* eslint-disable react/jsx-key */
37
37
  <Chessboard position="r3k2r/pppppppp/8/8/8/8/PPPPPPPP/R3K2R b KQkq - 0 1" move="O-O-O" animated={false} moveArrowColor="r" />,
38
38
  <Chessboard position="rnbqkbnr/ppp1p1pp/8/3pPp2/8/8/PPPP1PPP/RNBQKBNR w KQkq f6 0 3" move="exf6" animated={false} moveArrowColor="y" />,
39
39
  <Chessboard position="8/8/8/1K6/8/4k3/1p6/8 b - - 0 1" move="b1=R+" animated={false} moveArrowColor="b" />,
40
- <Chessboard move={42} animated={false} />,
40
+ <Chessboard move={ /* eslint-disable @typescript-eslint/no-explicit-any */ 42 as any /* eslint-enable @typescript-eslint/no-explicit-any */ } animated={false} />,
41
+ <Chessboard move="e4" animated={false} moveArrowColor={ /* eslint-disable @typescript-eslint/no-explicit-any */ 'z' as any /* eslint-enable @typescript-eslint/no-explicit-any */ } />,
41
42
  ]); /* eslint-enable react/jsx-key */
@@ -1,4 +1,4 @@
1
- /******************************************************************************
1
+ /* -------------------------------------------------------------------------- *
2
2
  * *
3
3
  * This file is part of Kokopu-React, a JavaScript chess library. *
4
4
  * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
@@ -17,21 +17,21 @@
17
17
  * Public License along with this program. If not, see *
18
18
  * <http://www.gnu.org/licenses/>. *
19
19
  * *
20
- ******************************************************************************/
20
+ * -------------------------------------------------------------------------- */
21
21
 
22
22
 
23
- import React from 'react';
24
- import testApp from './common/test_app';
25
- import { Chessboard } from '../src/index';
23
+ import * as React from 'react';
24
+ import { testApp } from '../common/test_app';
25
+ import { Chessboard } from '../../../dist/lib/index';
26
26
 
27
- let pos1 = '2qb1rk1/3n1p1p/2p3p1/2Pp4/p2P1BQ1/8/P1N2PPP/R5K1 b - - 0 1';
28
- let mv1 = 'Ba5';
27
+ const pos1 = '2qb1rk1/3n1p1p/2p3p1/2Pp4/p2P1BQ1/8/P1N2PPP/R5K1 b - - 0 1';
28
+ const mv1 = 'Ba5';
29
29
 
30
- let pos2 = 'start';
31
- let mv2 = 'e4';
30
+ const pos2 = 'start';
31
+ const mv2 = 'e4';
32
32
 
33
- let sm = 'Ba8,Ba7,Gb8,Gb7,Rc8,Rc7,Yd8,Yd7';
34
- let am = 'Ba1a3,Gb1b3,Rc1c3,Yd1d3';
33
+ const sm = 'Ba8,Ba7,Gb8,Gb7,Rc8,Rc7,Yd8,Yd7';
34
+ const am = 'Ba1a3,Gb1b3,Rc1c3,Yd1d3';
35
35
 
36
36
  testApp([ /* eslint-disable react/jsx-key */
37
37
  <Chessboard position={pos1} move={mv1} squareMarkers={sm} arrowMarkers={am} animated={false} />,
@@ -43,4 +43,7 @@ testApp([ /* eslint-disable react/jsx-key */
43
43
  <Chessboard position={pos1} move={mv1} squareMarkers={sm} arrowMarkers={am} colorset="emerald" pieceset="skulls" animated={false} />,
44
44
  <Chessboard position={pos2} move={mv2} squareMarkers={sm} arrowMarkers={am} squareSize={91} flipped={true} colorset="gray" pieceset="spatial" animated={false} />,
45
45
  <Chessboard position={pos1} move={mv1} squareMarkers={sm} arrowMarkers={am} squareSize={17} colorset="dusk" animated={false} />,
46
+ <Chessboard squareSize={ /* eslint-disable @typescript-eslint/no-explicit-any */ '24' as any /* eslint-enable @typescript-eslint/no-explicit-any */ } />,
47
+ <Chessboard colorset="not-a-colorset" />,
48
+ <Chessboard pieceset="not-a-pieceset" />,
46
49
  ]); /* eslint-enable react/jsx-key */
@@ -1,4 +1,4 @@
1
- /******************************************************************************
1
+ /* -------------------------------------------------------------------------- *
2
2
  * *
3
3
  * This file is part of Kokopu-React, a JavaScript chess library. *
4
4
  * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
@@ -17,12 +17,12 @@
17
17
  * Public License along with this program. If not, see *
18
18
  * <http://www.gnu.org/licenses/>. *
19
19
  * *
20
- ******************************************************************************/
20
+ * -------------------------------------------------------------------------- */
21
21
 
22
22
 
23
- import React from 'react';
24
- import testApp from './common/test_app';
25
- import { Chessboard } from '../src/index';
23
+ import * as React from 'react';
24
+ import { testApp } from '../common/test_app';
25
+ import { Chessboard } from '../../../dist/lib/index';
26
26
 
27
27
  window['__kokopu_debug_freeze_motion'] = 0.09;
28
28
 
@@ -1,4 +1,4 @@
1
- /******************************************************************************
1
+ /* -------------------------------------------------------------------------- *
2
2
  * *
3
3
  * This file is part of Kokopu-React, a JavaScript chess library. *
4
4
  * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
@@ -17,12 +17,12 @@
17
17
  * Public License along with this program. If not, see *
18
18
  * <http://www.gnu.org/licenses/>. *
19
19
  * *
20
- ******************************************************************************/
20
+ * -------------------------------------------------------------------------- */
21
21
 
22
22
 
23
- import React from 'react';
24
- import testApp from './common/test_app';
25
- import { Chessboard } from '../src/index';
23
+ import * as React from 'react';
24
+ import { testApp } from '../common/test_app';
25
+ import { Chessboard } from '../../../dist/lib/index';
26
26
 
27
27
  window['__kokopu_debug_freeze_motion'] = 0.7;
28
28
 
@@ -1,4 +1,4 @@
1
- /******************************************************************************
1
+ /* -------------------------------------------------------------------------- *
2
2
  * *
3
3
  * This file is part of Kokopu-React, a JavaScript chess library. *
4
4
  * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
@@ -17,12 +17,12 @@
17
17
  * Public License along with this program. If not, see *
18
18
  * <http://www.gnu.org/licenses/>. *
19
19
  * *
20
- ******************************************************************************/
20
+ * -------------------------------------------------------------------------- */
21
21
 
22
22
 
23
- import React from 'react';
24
- import testApp from './common/test_app';
25
- import { Chessboard } from '../src/index';
23
+ import * as React from 'react';
24
+ import { testApp } from '../common/test_app';
25
+ import { Chessboard } from '../../../dist/lib/index';
26
26
 
27
27
  window['__kokopu_debug_freeze_motion'] = 0.91;
28
28
 
@@ -0,0 +1,49 @@
1
+ /* -------------------------------------------------------------------------- *
2
+ * *
3
+ * This file is part of Kokopu-React, a JavaScript chess library. *
4
+ * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
5
+ * *
6
+ * This program is free software: you can redistribute it and/or *
7
+ * modify it under the terms of the GNU Lesser General Public License *
8
+ * as published by the Free Software Foundation, either version 3 of *
9
+ * the License, or (at your option) any later version. *
10
+ * *
11
+ * This program is distributed in the hope that it will be useful, *
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14
+ * GNU Lesser General Public License for more details. *
15
+ * *
16
+ * You should have received a copy of the GNU Lesser General *
17
+ * Public License along with this program. If not, see *
18
+ * <http://www.gnu.org/licenses/>. *
19
+ * *
20
+ * -------------------------------------------------------------------------- */
21
+
22
+
23
+ import * as React from 'react';
24
+ import { testApp } from '../common/test_app';
25
+ import { Chessboard } from '../../../dist/lib/index';
26
+
27
+ function TestComponent() {
28
+
29
+ const [ clicked, setClicked ] = React.useState(false);
30
+ const position = clicked ? 'rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1' : 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1';
31
+ const move = clicked ? 'Nf6' : 'e4';
32
+
33
+ function onClick() {
34
+ window['__kokopu_debug_freeze_motion'] = 0.6;
35
+ setClicked(true);
36
+ }
37
+
38
+ return (<>
39
+ <div>
40
+ <Chessboard position={position} move={move} animated={true} />
41
+ </div>
42
+ {clicked ? undefined : <button id="chessboard-action-button" onClick={onClick}>Click here</button>}
43
+ </>);
44
+ }
45
+
46
+
47
+ testApp([ /* eslint-disable react/jsx-key */
48
+ <TestComponent />,
49
+ ]); /* eslint-enable react/jsx-key */
@@ -1,4 +1,4 @@
1
- /******************************************************************************
1
+ /* -------------------------------------------------------------------------- *
2
2
  * *
3
3
  * This file is part of Kokopu-React, a JavaScript chess library. *
4
4
  * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
@@ -17,14 +17,15 @@
17
17
  * Public License along with this program. If not, see *
18
18
  * <http://www.gnu.org/licenses/>. *
19
19
  * *
20
- ******************************************************************************/
20
+ * -------------------------------------------------------------------------- */
21
21
 
22
22
 
23
- import React from 'react';
24
- import testApp, { setSandbox } from './common/test_app';
25
- import { Chessboard } from '../src/index';
23
+ import * as React from 'react';
24
+ import { Square } from 'kokopu';
25
+ import { testApp, setSandbox } from '../common/test_app';
26
+ import { Chessboard } from '../../../dist/lib/index';
26
27
 
27
- function onSquareClicked(sq) {
28
+ function onSquareClicked(sq: Square) {
28
29
  setSandbox(`square clicked: ${sq}`);
29
30
  }
30
31
 
@@ -1,4 +1,4 @@
1
- /******************************************************************************
1
+ /* -------------------------------------------------------------------------- *
2
2
  * *
3
3
  * This file is part of Kokopu-React, a JavaScript chess library. *
4
4
  * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
@@ -17,14 +17,15 @@
17
17
  * Public License along with this program. If not, see *
18
18
  * <http://www.gnu.org/licenses/>. *
19
19
  * *
20
- ******************************************************************************/
20
+ * -------------------------------------------------------------------------- */
21
21
 
22
22
 
23
- import React from 'react';
24
- import testApp, { setSandbox } from './common/test_app';
25
- import { Chessboard } from '../src/index';
23
+ import * as React from 'react';
24
+ import { Square } from 'kokopu';
25
+ import { testApp, setSandbox } from '../common/test_app';
26
+ import { Chessboard } from '../../../dist/lib/index';
26
27
 
27
- function onArrowEdited(from, to) {
28
+ function onArrowEdited(from: Square, to: Square) {
28
29
  setSandbox(`arrow edited: ${from} -> ${to}`);
29
30
  }
30
31
 
@@ -32,5 +33,4 @@ testApp([ /* eslint-disable react/jsx-key */
32
33
  <Chessboard squareSize={50} coordinateVisible={false} interactionMode="editArrows" onArrowEdited={onArrowEdited} editedArrowColor="g" />,
33
34
  <Chessboard squareSize={50} coordinateVisible={false} interactionMode="editArrows" onArrowEdited={onArrowEdited} editedArrowColor="r" flipped
34
35
  squareMarkers="Gc5" arrowMarkers="Yh3f6" />,
35
- <Chessboard squareSize={50} coordinateVisible={false} interactionMode="editArrows" onArrowEdited={onArrowEdited} />,
36
36
  ]); /* eslint-enable react/jsx-key */
@@ -0,0 +1,30 @@
1
+ /* -------------------------------------------------------------------------- *
2
+ * *
3
+ * This file is part of Kokopu-React, a JavaScript chess library. *
4
+ * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
5
+ * *
6
+ * This program is free software: you can redistribute it and/or *
7
+ * modify it under the terms of the GNU Lesser General Public License *
8
+ * as published by the Free Software Foundation, either version 3 of *
9
+ * the License, or (at your option) any later version. *
10
+ * *
11
+ * This program is distributed in the hope that it will be useful, *
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14
+ * GNU Lesser General Public License for more details. *
15
+ * *
16
+ * You should have received a copy of the GNU Lesser General *
17
+ * Public License along with this program. If not, see *
18
+ * <http://www.gnu.org/licenses/>. *
19
+ * *
20
+ * -------------------------------------------------------------------------- */
21
+
22
+
23
+ import * as React from 'react';
24
+ import { testApp } from '../common/test_app';
25
+ import { Chessboard } from '../../../dist/lib/index';
26
+
27
+ testApp([ /* eslint-disable react/jsx-key */
28
+ <Chessboard interactionMode={ /* eslint-disable @typescript-eslint/no-explicit-any */ 'whatever' as any /* eslint-enable @typescript-eslint/no-explicit-any */ } />,
29
+ <Chessboard interactionMode="editArrows" />,
30
+ ]); /* eslint-enable react/jsx-key */
@@ -1,4 +1,4 @@
1
- /******************************************************************************
1
+ /* -------------------------------------------------------------------------- *
2
2
  * *
3
3
  * This file is part of Kokopu-React, a JavaScript chess library. *
4
4
  * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
@@ -17,14 +17,15 @@
17
17
  * Public License along with this program. If not, see *
18
18
  * <http://www.gnu.org/licenses/>. *
19
19
  * *
20
- ******************************************************************************/
20
+ * -------------------------------------------------------------------------- */
21
21
 
22
22
 
23
- import React from 'react';
24
- import testApp, { setSandbox } from './common/test_app';
25
- import { Chessboard } from '../src/index';
23
+ import * as React from 'react';
24
+ import { Square } from 'kokopu';
25
+ import { testApp, setSandbox } from '../common/test_app';
26
+ import { Chessboard } from '../../../dist/lib/index';
26
27
 
27
- function onPieceMoved(from, to) {
28
+ function onPieceMoved(from: Square, to: Square) {
28
29
  setSandbox(`piece moved: ${from} -> ${to}`);
29
30
  }
30
31
 
@@ -1,4 +1,4 @@
1
- /******************************************************************************
1
+ /* -------------------------------------------------------------------------- *
2
2
  * *
3
3
  * This file is part of Kokopu-React, a JavaScript chess library. *
4
4
  * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
@@ -17,14 +17,14 @@
17
17
  * Public License along with this program. If not, see *
18
18
  * <http://www.gnu.org/licenses/>. *
19
19
  * *
20
- ******************************************************************************/
20
+ * -------------------------------------------------------------------------- */
21
21
 
22
22
 
23
- import React from 'react';
24
- import testApp, { setSandbox } from './common/test_app';
25
- import { Chessboard } from '../src/index';
23
+ import * as React from 'react';
24
+ import { testApp, setSandbox } from '../common/test_app';
25
+ import { Chessboard } from '../../../dist/lib/index';
26
26
 
27
- function onMovePlayed(move) {
27
+ function onMovePlayed(move: string) {
28
28
  setSandbox(`move played: ${move}`);
29
29
  }
30
30
 
@@ -1,4 +1,4 @@
1
- /******************************************************************************
1
+ /* -------------------------------------------------------------------------- *
2
2
  * *
3
3
  * This file is part of Kokopu-React, a JavaScript chess library. *
4
4
  * Copyright (C) 2021-2023 Yoann Le Montagner <yo35 -at- melix.net> *
@@ -17,14 +17,14 @@
17
17
  * Public License along with this program. If not, see *
18
18
  * <http://www.gnu.org/licenses/>. *
19
19
  * *
20
- ******************************************************************************/
20
+ * -------------------------------------------------------------------------- */
21
21
 
22
22
 
23
- import React from 'react';
24
- import testApp, { setSandbox } from './common/test_app';
25
- import { Chessboard } from '../src/index';
23
+ import * as React from 'react';
24
+ import { testApp, setSandbox } from '../common/test_app';
25
+ import { Chessboard } from '../../../dist/lib/index';
26
26
 
27
- function onMovePlayed(move) {
27
+ function onMovePlayed(move: string) {
28
28
  setSandbox(`promotion move played: ${move}`);
29
29
  }
30
30