@gamepark/react-client 6.38.5 → 7.0.0-beta.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 (244) hide show
  1. package/dist/Actions/ActionFailed.d.ts +6 -6
  2. package/dist/Actions/ActionFailed.js +8 -8
  3. package/dist/Actions/ActionFailed.js.map +1 -1
  4. package/dist/Actions/ActionType.d.ts +3 -3
  5. package/dist/Actions/ActionType.js +7 -7
  6. package/dist/Actions/ActionType.js.map +1 -1
  7. package/dist/Actions/AnimationComplete.d.ts +6 -6
  8. package/dist/Actions/AnimationComplete.js +8 -8
  9. package/dist/Actions/AnimationComplete.js.map +1 -1
  10. package/dist/Actions/AnimationPaused.d.ts +6 -6
  11. package/dist/Actions/AnimationPaused.js +8 -8
  12. package/dist/Actions/AnimationPaused.js.map +1 -1
  13. package/dist/Actions/AnimationStart.d.ts +5 -5
  14. package/dist/Actions/AnimationStart.js +4 -4
  15. package/dist/Actions/ClearFailures.d.ts +5 -5
  16. package/dist/Actions/ClearFailures.js +8 -8
  17. package/dist/Actions/ClearFailures.js.map +1 -1
  18. package/dist/Actions/GameNotificationsReceived.d.ts +10 -10
  19. package/dist/Actions/GameNotificationsReceived.js +9 -9
  20. package/dist/Actions/GameNotificationsReceived.js.map +1 -1
  21. package/dist/Actions/GameOver.d.ts +16 -16
  22. package/dist/Actions/GameOver.js +8 -8
  23. package/dist/Actions/GameOver.js.map +1 -1
  24. package/dist/Actions/GameStateLoaded.d.ts +16 -16
  25. package/dist/Actions/GameStateLoaded.js +20 -20
  26. package/dist/Actions/GameStateLoaded.js.map +1 -1
  27. package/dist/Actions/MovePlayed.d.ts +11 -11
  28. package/dist/Actions/MovePlayed.js +4 -2
  29. package/dist/Actions/MovePlayed.js.map +1 -1
  30. package/dist/Actions/MoveUndone.d.ts +7 -7
  31. package/dist/Actions/MoveUndone.js +9 -9
  32. package/dist/Actions/MoveUndone.js.map +1 -1
  33. package/dist/Actions/PlayerQuit.d.ts +11 -11
  34. package/dist/Actions/PlayerQuit.js +19 -19
  35. package/dist/Actions/PlayerQuit.js.map +1 -1
  36. package/dist/Actions/SetAnimationsSpeed.d.ts +6 -6
  37. package/dist/Actions/SetAnimationsSpeed.js +8 -8
  38. package/dist/Actions/SetAnimationsSpeed.js.map +1 -1
  39. package/dist/Actions/index.d.ts +11 -12
  40. package/dist/Actions/index.js +27 -28
  41. package/dist/Actions/index.js.map +1 -1
  42. package/dist/Chat/ChatChannel.d.ts +5 -5
  43. package/dist/Chat/ChatChannel.js +2 -2
  44. package/dist/Chat/Message.d.ts +6 -6
  45. package/dist/Chat/Message.js +2 -2
  46. package/dist/Chat/index.d.ts +2 -2
  47. package/dist/Chat/index.js +18 -18
  48. package/dist/Deckbuilding/Deck.d.ts +5 -5
  49. package/dist/Deckbuilding/Deck.js +2 -2
  50. package/dist/Deckbuilding/index.d.ts +4 -4
  51. package/dist/Deckbuilding/index.js +24 -24
  52. package/dist/Deckbuilding/useDeleteDeck.d.ts +2 -2
  53. package/dist/Deckbuilding/useDeleteDeck.js +15 -15
  54. package/dist/Deckbuilding/useDeleteDeck.js.map +1 -1
  55. package/dist/Deckbuilding/useMyDecks.d.ts +2 -2
  56. package/dist/Deckbuilding/useMyDecks.js +14 -14
  57. package/dist/Deckbuilding/useMyDecks.js.map +1 -1
  58. package/dist/Deckbuilding/useSaveDeck.d.ts +2 -2
  59. package/dist/Deckbuilding/useSaveDeck.js +15 -15
  60. package/dist/Deckbuilding/useSaveDeck.js.map +1 -1
  61. package/dist/EjectPlayer/EjectPlayer.d.ts +6 -6
  62. package/dist/EjectPlayer/EjectPlayer.js +8 -8
  63. package/dist/EjectPlayer/EjectPlayer.js.map +1 -1
  64. package/dist/EjectPlayer/index.d.ts +1 -1
  65. package/dist/EjectPlayer/index.js +17 -17
  66. package/dist/Failure/Failure.d.ts +6 -6
  67. package/dist/Failure/Failure.js +9 -9
  68. package/dist/Failure/index.d.ts +1 -1
  69. package/dist/Failure/index.js +17 -17
  70. package/dist/GiveUp/GiveUp.d.ts +7 -7
  71. package/dist/GiveUp/GiveUp.js +5 -5
  72. package/dist/GiveUp/index.d.ts +1 -1
  73. package/dist/GiveUp/index.js +17 -17
  74. package/dist/Hooks/index.d.ts +5 -5
  75. package/dist/Hooks/index.js +21 -21
  76. package/dist/Hooks/useChatMessages.d.ts +12 -12
  77. package/dist/Hooks/useChatMessages.js +53 -51
  78. package/dist/Hooks/useChatMessages.js.map +1 -1
  79. package/dist/Hooks/useMessageAuthor.d.ts +4 -4
  80. package/dist/Hooks/useMessageAuthor.js +17 -18
  81. package/dist/Hooks/useMessageAuthor.js.map +1 -1
  82. package/dist/Hooks/useOptions.d.ts +2 -2
  83. package/dist/Hooks/useOptions.js +7 -8
  84. package/dist/Hooks/useOptions.js.map +1 -1
  85. package/dist/Hooks/useRematch.d.ts +7 -7
  86. package/dist/Hooks/useRematch.js +22 -19
  87. package/dist/Hooks/useRematch.js.map +1 -1
  88. package/dist/Hooks/useSendMessage.d.ts +1 -1
  89. package/dist/Hooks/useSendMessage.js +13 -14
  90. package/dist/Hooks/useSendMessage.js.map +1 -1
  91. package/dist/Log/StartLiveLog.d.ts +4 -4
  92. package/dist/Log/StartLiveLog.js +4 -4
  93. package/dist/Log/StopLiveLog.d.ts +5 -5
  94. package/dist/Log/StopLiveLog.js +8 -8
  95. package/dist/Log/StopLiveLog.js.map +1 -1
  96. package/dist/Log/index.d.ts +4 -4
  97. package/dist/Log/index.js +20 -20
  98. package/dist/Log/useLogControls.d.ts +7 -7
  99. package/dist/Log/useLogControls.js +21 -22
  100. package/dist/Log/useLogControls.js.map +1 -1
  101. package/dist/PlayerTime/PlayerTime.d.ts +11 -11
  102. package/dist/PlayerTime/PlayerTime.js +2 -2
  103. package/dist/PlayerTime/index.d.ts +1 -1
  104. package/dist/PlayerTime/index.js +17 -17
  105. package/dist/Rematch/RematchQueries.d.ts +19 -19
  106. package/dist/Rematch/RematchQueries.js +13 -13
  107. package/dist/Rematch/index.d.ts +1 -1
  108. package/dist/Rematch/index.js +17 -17
  109. package/dist/Sound/MuteSounds.d.ts +5 -5
  110. package/dist/Sound/MuteSounds.js +9 -9
  111. package/dist/Sound/MuteSounds.js.map +1 -1
  112. package/dist/Sound/UnmuteSounds.d.ts +4 -4
  113. package/dist/Sound/UnmuteSounds.js +4 -4
  114. package/dist/Sound/index.d.ts +3 -3
  115. package/dist/Sound/index.js +19 -19
  116. package/dist/Sound/useSoundControls.d.ts +7 -7
  117. package/dist/Sound/useSoundControls.js +21 -22
  118. package/dist/Sound/useSoundControls.js.map +1 -1
  119. package/dist/Store/DisplayedAction.d.ts +15 -15
  120. package/dist/Store/DisplayedAction.js +18 -19
  121. package/dist/Store/DisplayedAction.js.map +1 -1
  122. package/dist/Store/GamePageState.d.ts +28 -28
  123. package/dist/Store/GamePageState.js +2 -2
  124. package/dist/Store/PlayedMove.d.ts +5 -5
  125. package/dist/Store/PlayedMove.js +2 -2
  126. package/dist/Store/gameMiddleware.d.ts +4 -4
  127. package/dist/Store/gameMiddleware.js +45 -41
  128. package/dist/Store/gameMiddleware.js.map +1 -1
  129. package/dist/Store/gameReducer.d.ts +23 -20
  130. package/dist/Store/gameReducer.js +538 -525
  131. package/dist/Store/gameReducer.js.map +1 -1
  132. package/dist/Store/index.d.ts +3 -3
  133. package/dist/Store/index.js +19 -19
  134. package/dist/Store/localMovePreviewMiddleware.d.ts +4 -4
  135. package/dist/Store/localMovePreviewMiddleware.js +17 -18
  136. package/dist/Store/localMovePreviewMiddleware.js.map +1 -1
  137. package/dist/Tutorial/PlayTutorialMoves.d.ts +9 -9
  138. package/dist/Tutorial/PlayTutorialMoves.js +6 -6
  139. package/dist/Tutorial/Tutorial.d.ts +5 -5
  140. package/dist/Tutorial/Tutorial.js +2 -2
  141. package/dist/Tutorial/TutorialDescription.d.ts +7 -7
  142. package/dist/Tutorial/TutorialDescription.js +2 -2
  143. package/dist/Tutorial/index.d.ts +4 -4
  144. package/dist/Tutorial/index.js +20 -20
  145. package/dist/Tutorial/useTutorial.d.ts +2 -2
  146. package/dist/Tutorial/useTutorial.js +21 -22
  147. package/dist/Tutorial/useTutorial.js.map +1 -1
  148. package/dist/Types/GameAI.d.ts +1 -1
  149. package/dist/Types/GameAI.js +2 -2
  150. package/dist/Types/GameData.d.ts +18 -18
  151. package/dist/Types/GameData.js +2 -2
  152. package/dist/Types/GameMessage.d.ts +8 -8
  153. package/dist/Types/GameMessage.js +2 -2
  154. package/dist/Types/GameMode.d.ts +6 -6
  155. package/dist/Types/GameMode.js +10 -10
  156. package/dist/Types/GameMode.js.map +1 -1
  157. package/dist/Types/GameNotification.d.ts +6 -6
  158. package/dist/Types/GameNotification.js +2 -2
  159. package/dist/Types/GameOptions.d.ts +9 -9
  160. package/dist/Types/GameOptions.js +8 -8
  161. package/dist/Types/GameOptions.js.map +1 -1
  162. package/dist/Types/MovePlayedNotification.d.ts +9 -9
  163. package/dist/Types/MovePlayedNotification.js +11 -12
  164. package/dist/Types/MovePlayedNotification.js.map +1 -1
  165. package/dist/Types/MoveUndoneNotification.d.ts +8 -8
  166. package/dist/Types/MoveUndoneNotification.js +11 -12
  167. package/dist/Types/MoveUndoneNotification.js.map +1 -1
  168. package/dist/Types/Player.d.ts +13 -13
  169. package/dist/Types/Player.js +2 -2
  170. package/dist/Types/PlayerQuitReason.d.ts +4 -4
  171. package/dist/Types/PlayerQuitReason.js +8 -8
  172. package/dist/Types/PlayerQuitReason.js.map +1 -1
  173. package/dist/Types/ProxyGameData.d.ts +13 -13
  174. package/dist/Types/ProxyGameData.js +2 -2
  175. package/dist/Types/Tournament.d.ts +4 -4
  176. package/dist/Types/Tournament.js +2 -2
  177. package/dist/Types/index.d.ts +12 -12
  178. package/dist/Types/index.js +28 -28
  179. package/dist/User/User.d.ts +6 -6
  180. package/dist/User/User.js +2 -2
  181. package/dist/User/index.d.ts +2 -2
  182. package/dist/User/index.js +18 -18
  183. package/dist/User/useMe.d.ts +4 -4
  184. package/dist/User/useMe.js +20 -21
  185. package/dist/User/useMe.js.map +1 -1
  186. package/dist/animations/Animation.d.ts +6 -6
  187. package/dist/animations/Animation.js +2 -2
  188. package/dist/animations/AnimationContext.d.ts +8 -8
  189. package/dist/animations/AnimationContext.js +2 -2
  190. package/dist/animations/AnimationState.d.ts +6 -6
  191. package/dist/animations/AnimationState.js +2 -2
  192. package/dist/animations/AnimationStep.d.ts +6 -6
  193. package/dist/animations/AnimationStep.js +10 -10
  194. package/dist/animations/AnimationStep.js.map +1 -1
  195. package/dist/animations/Animations.d.ts +8 -8
  196. package/dist/animations/Animations.js +22 -22
  197. package/dist/animations/Animations.js.map +1 -1
  198. package/dist/animations/AnimationsListenerCreator.d.ts +5 -4
  199. package/dist/animations/AnimationsListenerCreator.js +46 -50
  200. package/dist/animations/AnimationsListenerCreator.js.map +1 -1
  201. package/dist/animations/index.d.ts +6 -6
  202. package/dist/animations/index.js +22 -22
  203. package/dist/api/Client/GameClientAPI.d.ts +25 -24
  204. package/dist/api/Client/GameClientAPI.js +166 -166
  205. package/dist/api/Client/GameClientAPI.js.map +1 -1
  206. package/dist/api/Client/GameNotificationsListener.d.ts +5 -5
  207. package/dist/api/Client/GameNotificationsListener.js +116 -114
  208. package/dist/api/Client/GameNotificationsListener.js.map +1 -1
  209. package/dist/api/Client/RemoteGameLoader.d.ts +4 -5
  210. package/dist/api/Client/RemoteGameLoader.js +61 -62
  211. package/dist/api/Client/RemoteGameLoader.js.map +1 -1
  212. package/dist/api/Client/RemoteGameProvider.d.ts +7 -7
  213. package/dist/api/Client/RemoteGameProvider.js +55 -70
  214. package/dist/api/Client/RemoteGameProvider.js.map +1 -1
  215. package/dist/api/Client/apollo-client.d.ts +2 -2
  216. package/dist/api/Client/apollo-client.js +57 -58
  217. package/dist/api/Client/apollo-client.js.map +1 -1
  218. package/dist/api/Client/index.d.ts +4 -3
  219. package/dist/api/Client/index.js +20 -19
  220. package/dist/api/Client/index.js.map +1 -1
  221. package/dist/api/Client/pusher.d.ts +2 -0
  222. package/dist/api/Client/pusher.js +16 -0
  223. package/dist/api/Client/pusher.js.map +1 -0
  224. package/dist/api/GameAPI.d.ts +11 -10
  225. package/dist/api/GameAPI.js +2 -2
  226. package/dist/api/Local/ConsoleTools.d.ts +26 -25
  227. package/dist/api/Local/ConsoleTools.js +85 -86
  228. package/dist/api/Local/ConsoleTools.js.map +1 -1
  229. package/dist/api/Local/GameLocalAPI.d.ts +45 -44
  230. package/dist/api/Local/GameLocalAPI.js +541 -540
  231. package/dist/api/Local/GameLocalAPI.js.map +1 -1
  232. package/dist/api/Local/LocalGameProvider.d.ts +15 -15
  233. package/dist/api/Local/LocalGameProvider.js +49 -58
  234. package/dist/api/Local/LocalGameProvider.js.map +1 -1
  235. package/dist/api/Local/index.d.ts +1 -1
  236. package/dist/api/Local/index.js +17 -17
  237. package/dist/api/index.d.ts +2 -2
  238. package/dist/api/index.js +18 -18
  239. package/dist/index.d.ts +18 -18
  240. package/dist/index.js +36 -36
  241. package/dist/util/ArrayUtil.d.ts +2 -2
  242. package/dist/util/ArrayUtil.js +20 -21
  243. package/dist/util/ArrayUtil.js.map +1 -1
  244. package/package.json +19 -22
@@ -1,13 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isMovePlayedNotification = exports.movePlayedNotification = void 0;
4
- function movePlayedNotification(action) {
5
- var _a;
6
- return { actionId: (_a = action.id) !== null && _a !== void 0 ? _a : null, playerId: action.playerId, moveView: action.move, consequences: action.consequences };
7
- }
8
- exports.movePlayedNotification = movePlayedNotification;
9
- function isMovePlayedNotification(notification) {
10
- return notification.moveView != undefined;
11
- }
12
- exports.isMovePlayedNotification = isMovePlayedNotification;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.movePlayedNotification = movePlayedNotification;
4
+ exports.isMovePlayedNotification = isMovePlayedNotification;
5
+ function movePlayedNotification(action) {
6
+ var _a;
7
+ return { actionId: (_a = action.id) !== null && _a !== void 0 ? _a : null, playerId: action.playerId, moveView: action.move, consequences: action.consequences };
8
+ }
9
+ function isMovePlayedNotification(notification) {
10
+ return notification.moveView != undefined;
11
+ }
13
12
  //# sourceMappingURL=MovePlayedNotification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MovePlayedNotification.js","sourceRoot":"","sources":["../../src/Types/MovePlayedNotification.ts"],"names":[],"mappings":";;;AASA,SAAgB,sBAAsB,CAAiB,MAAc;;IACnE,OAAO,EAAE,QAAQ,EAAE,MAAA,MAAM,CAAC,EAAE,mCAAI,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,CAAA;AAC7H,CAAC;AAFD,wDAEC;AAED,SAAgB,wBAAwB,CAAiB,YAAwC;IAC/F,OAAQ,YAAuD,CAAC,QAAQ,IAAI,SAAS,CAAA;AACvF,CAAC;AAFD,4DAEC"}
1
+ {"version":3,"file":"MovePlayedNotification.js","sourceRoot":"","sources":["../../src/Types/MovePlayedNotification.ts"],"names":[],"mappings":";;AASA,wDAEC;AAED,4DAEC;AAND,SAAgB,sBAAsB,CAAiB,MAAc;;IACnE,OAAO,EAAE,QAAQ,EAAE,MAAA,MAAM,CAAC,EAAE,mCAAI,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,CAAA;AAC7H,CAAC;AAED,SAAgB,wBAAwB,CAAiB,YAAwC;IAC/F,OAAQ,YAAuD,CAAC,QAAQ,IAAI,SAAS,CAAA;AACvF,CAAC"}
@@ -1,8 +1,8 @@
1
- import { Action } from '@gamepark/rules-api';
2
- import { GameNotification } from './GameNotification';
3
- export type MoveUndoneNotification<PlayerId> = GameNotification<PlayerId> & {
4
- actionId: string | null;
5
- moveUndone: number;
6
- };
7
- export declare function moveUndoneNotification<PlayerId>(action: Action<any, PlayerId>, moveUndone: number): MoveUndoneNotification<PlayerId>;
8
- export declare function isMoveUndoneNotification<PlayerId>(notification: GameNotification<PlayerId>): notification is MoveUndoneNotification<PlayerId>;
1
+ import { Action } from '@gamepark/rules-api';
2
+ import { GameNotification } from './GameNotification';
3
+ export type MoveUndoneNotification<PlayerId> = GameNotification<PlayerId> & {
4
+ actionId: string | null;
5
+ moveUndone: number;
6
+ };
7
+ export declare function moveUndoneNotification<PlayerId>(action: Action<any, PlayerId>, moveUndone: number): MoveUndoneNotification<PlayerId>;
8
+ export declare function isMoveUndoneNotification<PlayerId>(notification: GameNotification<PlayerId>): notification is MoveUndoneNotification<PlayerId>;
@@ -1,13 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isMoveUndoneNotification = exports.moveUndoneNotification = void 0;
4
- function moveUndoneNotification(action, moveUndone) {
5
- var _a;
6
- return { playerId: action.playerId, actionId: (_a = action.id) !== null && _a !== void 0 ? _a : null, moveUndone: moveUndone };
7
- }
8
- exports.moveUndoneNotification = moveUndoneNotification;
9
- function isMoveUndoneNotification(notification) {
10
- return notification.moveUndone != undefined;
11
- }
12
- exports.isMoveUndoneNotification = isMoveUndoneNotification;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.moveUndoneNotification = moveUndoneNotification;
4
+ exports.isMoveUndoneNotification = isMoveUndoneNotification;
5
+ function moveUndoneNotification(action, moveUndone) {
6
+ var _a;
7
+ return { playerId: action.playerId, actionId: (_a = action.id) !== null && _a !== void 0 ? _a : null, moveUndone: moveUndone };
8
+ }
9
+ function isMoveUndoneNotification(notification) {
10
+ return notification.moveUndone != undefined;
11
+ }
13
12
  //# sourceMappingURL=MoveUndoneNotification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MoveUndoneNotification.js","sourceRoot":"","sources":["../../src/Types/MoveUndoneNotification.ts"],"names":[],"mappings":";;;AAQA,SAAgB,sBAAsB,CAAW,MAA6B,EAAE,UAAkB;;IAChG,OAAO,EAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAA,MAAM,CAAC,EAAE,mCAAI,IAAI,EAAE,UAAU,YAAA,EAAC,CAAA;AAC7E,CAAC;AAFD,wDAEC;AAED,SAAgB,wBAAwB,CAAW,YAAwC;IACzF,OAAQ,YAAiD,CAAC,UAAU,IAAI,SAAS,CAAA;AACnF,CAAC;AAFD,4DAEC"}
1
+ {"version":3,"file":"MoveUndoneNotification.js","sourceRoot":"","sources":["../../src/Types/MoveUndoneNotification.ts"],"names":[],"mappings":";;AAQA,wDAEC;AAED,4DAEC;AAND,SAAgB,sBAAsB,CAAW,MAA6B,EAAE,UAAkB;;IAChG,OAAO,EAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAA,MAAM,CAAC,EAAE,mCAAI,IAAI,EAAE,UAAU,YAAA,EAAC,CAAA;AAC7E,CAAC;AAED,SAAgB,wBAAwB,CAAW,YAAwC;IACzF,OAAQ,YAAiD,CAAC,UAAU,IAAI,SAAS,CAAA;AACnF,CAAC"}
@@ -1,13 +1,13 @@
1
- import { PlayerTime } from '../PlayerTime';
2
- import { PlayerQuitReason } from './PlayerQuitReason';
3
- export type Player<PlayerId = any> = {
4
- id: PlayerId;
5
- userId?: string;
6
- name?: string;
7
- avatar?: any;
8
- gamePointsDelta?: number | null;
9
- tournamentPoints?: number | null;
10
- time?: PlayerTime;
11
- quit?: boolean;
12
- quitReason?: PlayerQuitReason;
13
- };
1
+ import { PlayerTime } from '../PlayerTime';
2
+ import { PlayerQuitReason } from './PlayerQuitReason';
3
+ export type Player<PlayerId = any> = {
4
+ id: PlayerId;
5
+ userId?: string;
6
+ name?: string;
7
+ avatar?: any;
8
+ gamePointsDelta?: number | null;
9
+ tournamentPoints?: number | null;
10
+ time?: PlayerTime;
11
+ quit?: boolean;
12
+ quitReason?: PlayerQuitReason;
13
+ };
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=Player.js.map
@@ -1,4 +1,4 @@
1
- export declare enum PlayerQuitReason {
2
- GiveUp = 1,
3
- Ejected = 2
4
- }
1
+ export declare enum PlayerQuitReason {
2
+ GiveUp = 1,
3
+ Ejected = 2
4
+ }
@@ -1,9 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PlayerQuitReason = void 0;
4
- var PlayerQuitReason;
5
- (function (PlayerQuitReason) {
6
- PlayerQuitReason[PlayerQuitReason["GiveUp"] = 1] = "GiveUp";
7
- PlayerQuitReason[PlayerQuitReason["Ejected"] = 2] = "Ejected";
8
- })(PlayerQuitReason = exports.PlayerQuitReason || (exports.PlayerQuitReason = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PlayerQuitReason = void 0;
4
+ var PlayerQuitReason;
5
+ (function (PlayerQuitReason) {
6
+ PlayerQuitReason[PlayerQuitReason["GiveUp"] = 1] = "GiveUp";
7
+ PlayerQuitReason[PlayerQuitReason["Ejected"] = 2] = "Ejected";
8
+ })(PlayerQuitReason || (exports.PlayerQuitReason = PlayerQuitReason = {}));
9
9
  //# sourceMappingURL=PlayerQuitReason.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlayerQuitReason.js","sourceRoot":"","sources":["../../src/Types/PlayerQuitReason.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,2DAAU,CAAA;IACV,6DAAW,CAAA;AACb,CAAC,EAHW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAG3B"}
1
+ {"version":3,"file":"PlayerQuitReason.js","sourceRoot":"","sources":["../../src/Types/PlayerQuitReason.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,2DAAU,CAAA;IACV,6DAAW,CAAA;AACb,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B"}
@@ -1,13 +1,13 @@
1
- import { Action } from '@gamepark/rules-api';
2
- import { Player } from './Player';
3
- import { GameOptions } from './GameOptions';
4
- export type ProxyGameData<Game = any, Move = any, PlayerId = any> = {
5
- playerId?: PlayerId;
6
- players: Player<PlayerId>[];
7
- setup: Game;
8
- state: Game;
9
- actions: Action<Move, PlayerId>[];
10
- monkeyOpponents: boolean;
11
- tutorial?: number;
12
- options?: GameOptions;
13
- };
1
+ import { Action } from '@gamepark/rules-api';
2
+ import { Player } from './Player';
3
+ import { GameOptions } from './GameOptions';
4
+ export type ProxyGameData<Game = any, Move = any, PlayerId = any> = {
5
+ playerId?: PlayerId;
6
+ players: Player<PlayerId>[];
7
+ setup: Game;
8
+ state: Game;
9
+ actions: Action<Move, PlayerId>[];
10
+ monkeyOpponents: boolean;
11
+ tutorial?: number;
12
+ options?: GameOptions;
13
+ };
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=ProxyGameData.js.map
@@ -1,4 +1,4 @@
1
- export type Tournament = {
2
- signedUp: boolean;
3
- number: number;
4
- };
1
+ export type Tournament = {
2
+ signedUp: boolean;
3
+ number: number;
4
+ };
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=Tournament.js.map
@@ -1,12 +1,12 @@
1
- export * from './GameAI';
2
- export * from './GameData';
3
- export * from './GameMessage';
4
- export * from './GameMode';
5
- export * from './GameNotification';
6
- export * from './GameOptions';
7
- export * from './MovePlayedNotification';
8
- export * from './MoveUndoneNotification';
9
- export * from './Player';
10
- export * from './PlayerQuitReason';
11
- export * from './ProxyGameData';
12
- export * from './Tournament';
1
+ export * from './GameAI';
2
+ export * from './GameData';
3
+ export * from './GameMessage';
4
+ export * from './GameMode';
5
+ export * from './GameNotification';
6
+ export * from './GameOptions';
7
+ export * from './MovePlayedNotification';
8
+ export * from './MoveUndoneNotification';
9
+ export * from './Player';
10
+ export * from './PlayerQuitReason';
11
+ export * from './ProxyGameData';
12
+ export * from './Tournament';
@@ -1,29 +1,29 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./GameAI"), exports);
18
- __exportStar(require("./GameData"), exports);
19
- __exportStar(require("./GameMessage"), exports);
20
- __exportStar(require("./GameMode"), exports);
21
- __exportStar(require("./GameNotification"), exports);
22
- __exportStar(require("./GameOptions"), exports);
23
- __exportStar(require("./MovePlayedNotification"), exports);
24
- __exportStar(require("./MoveUndoneNotification"), exports);
25
- __exportStar(require("./Player"), exports);
26
- __exportStar(require("./PlayerQuitReason"), exports);
27
- __exportStar(require("./ProxyGameData"), exports);
28
- __exportStar(require("./Tournament"), exports);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./GameAI"), exports);
18
+ __exportStar(require("./GameData"), exports);
19
+ __exportStar(require("./GameMessage"), exports);
20
+ __exportStar(require("./GameMode"), exports);
21
+ __exportStar(require("./GameNotification"), exports);
22
+ __exportStar(require("./GameOptions"), exports);
23
+ __exportStar(require("./MovePlayedNotification"), exports);
24
+ __exportStar(require("./MoveUndoneNotification"), exports);
25
+ __exportStar(require("./Player"), exports);
26
+ __exportStar(require("./PlayerQuitReason"), exports);
27
+ __exportStar(require("./ProxyGameData"), exports);
28
+ __exportStar(require("./Tournament"), exports);
29
29
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
- export type User = {
2
- id: string;
3
- name?: string;
4
- avatar?: any;
5
- subscriptionSince: string | null;
6
- };
1
+ export type User = {
2
+ id: string;
3
+ name?: string;
4
+ avatar?: any;
5
+ subscriptionSince: string | null;
6
+ };
package/dist/User/User.js CHANGED
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=User.js.map
@@ -1,2 +1,2 @@
1
- export * from './User';
2
- export * from './useMe';
1
+ export * from './User';
2
+ export * from './useMe';
@@ -1,19 +1,19 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./User"), exports);
18
- __exportStar(require("./useMe"), exports);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./User"), exports);
18
+ __exportStar(require("./useMe"), exports);
19
19
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { User } from './User';
2
- export declare function useMe(): {
3
- user: User;
4
- } | undefined;
1
+ import { User } from './User';
2
+ export declare function useMe(): {
3
+ user: User;
4
+ } | undefined;
@@ -1,22 +1,21 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.useMe = void 0;
8
- var client_1 = require("@apollo/client");
9
- var react_1 = require("react");
10
- var api_1 = require("../api");
11
- var GET_ME = (0, client_1.gql)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["query Me { me { user { id name subscriptionSince avatar {...AvatarInfo} } } } ", ""], ["query Me { me { user { id name subscriptionSince avatar {...AvatarInfo} } } } ", ""])), api_1.AVATAR_INFO);
12
- function useMe() {
13
- var _a;
14
- var urlSearchParams = new URLSearchParams(window.location.search);
15
- var fetchPolicy = (0, react_1.useMemo)(function () {
16
- return process.env.NODE_ENV !== 'production' && !urlSearchParams.get('game') && !urlSearchParams.get('mode') ? 'cache-only' : 'cache-first';
17
- }, []);
18
- return (_a = (0, client_1.useQuery)(GET_ME, { ssr: false, fetchPolicy: fetchPolicy }).data) === null || _a === void 0 ? void 0 : _a.me;
19
- }
20
- exports.useMe = useMe;
21
- var templateObject_1;
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.useMe = useMe;
8
+ var client_1 = require("@apollo/client");
9
+ var react_1 = require("react");
10
+ var api_1 = require("../api");
11
+ var GET_ME = (0, client_1.gql)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["query Me { me { user { id name subscriptionSince avatar {...AvatarInfo} } } } ", ""], ["query Me { me { user { id name subscriptionSince avatar {...AvatarInfo} } } } ", ""])), api_1.AVATAR_INFO);
12
+ function useMe() {
13
+ var _a;
14
+ var urlSearchParams = new URLSearchParams(window.location.search);
15
+ var fetchPolicy = (0, react_1.useMemo)(function () {
16
+ return process.env.NODE_ENV !== 'production' && !urlSearchParams.get('game') && !urlSearchParams.get('mode') ? 'cache-only' : 'cache-first';
17
+ }, []);
18
+ return (_a = (0, client_1.useQuery)(GET_ME, { ssr: false, fetchPolicy: fetchPolicy }).data) === null || _a === void 0 ? void 0 : _a.me;
19
+ }
20
+ var templateObject_1;
22
21
  //# sourceMappingURL=useMe.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMe.js","sourceRoot":"","sources":["../../src/User/useMe.ts"],"names":[],"mappings":";;;;;;;AAAA,yCAA8C;AAC9C,+BAA+B;AAC/B,8BAAoC;AAGpC,IAAM,MAAM,OAAG,YAAG,wJAAA,gFAAiF,EAAW,EAAE,KAAb,iBAAW,CAAE,CAAA;AAEhH,SAAgB,KAAK;;IACnB,IAAM,eAAe,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;IACnE,IAAM,WAAW,GAAG,IAAA,eAAO,EAAC;QACxB,OAAA,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa;IAApI,CAAoI,EACpI,EAAE,CAAC,CAAA;IACP,OAAO,MAAA,IAAA,iBAAQ,EAAyB,MAAM,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,aAAA,EAAE,CAAC,CAAC,IAAI,0CAAE,EAAE,CAAA;AACvF,CAAC;AAND,sBAMC"}
1
+ {"version":3,"file":"useMe.js","sourceRoot":"","sources":["../../src/User/useMe.ts"],"names":[],"mappings":";;;;;;AAOA,sBAMC;AAbD,yCAA8C;AAC9C,+BAA+B;AAC/B,8BAAoC;AAGpC,IAAM,MAAM,OAAG,YAAG,wJAAA,gFAAiF,EAAW,EAAE,KAAb,iBAAW,CAAE,CAAA;AAEhH,SAAgB,KAAK;;IACnB,IAAM,eAAe,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;IACnE,IAAM,WAAW,GAAG,IAAA,eAAO,EAAC;QACxB,OAAA,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa;IAApI,CAAoI,EACpI,EAAE,CAAC,CAAA;IACP,OAAO,MAAA,IAAA,iBAAQ,EAAyB,MAAM,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,aAAA,EAAE,CAAC,CAAC,IAAI,0CAAE,EAAE,CAAA;AACvF,CAAC"}
@@ -1,6 +1,6 @@
1
- import { DisplayedAction } from '../Store';
2
- export type Animation<Move = any, PlayerId = any> = {
3
- move: Move;
4
- duration: number;
5
- action: DisplayedAction<Move, PlayerId>;
6
- };
1
+ import { DisplayedAction } from '../Store';
2
+ export type Animation<Move = any, PlayerId = any> = {
3
+ move: Move;
4
+ duration: number;
5
+ action: DisplayedAction<Move, PlayerId>;
6
+ };
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=Animation.js.map
@@ -1,8 +1,8 @@
1
- import { AnimationStep } from './AnimationStep';
2
- import { DisplayedAction } from '../Store';
3
- export type AnimationContext<Game, Move, PlayerId> = {
4
- action: DisplayedAction<Move, PlayerId>;
5
- game: Game;
6
- step: AnimationStep;
7
- playerId?: PlayerId;
8
- };
1
+ import { AnimationStep } from './AnimationStep';
2
+ import { DisplayedAction } from '../Store';
3
+ export type AnimationContext<Game, Move, PlayerId> = {
4
+ action: DisplayedAction<Move, PlayerId>;
5
+ game: Game;
6
+ step: AnimationStep;
7
+ playerId?: PlayerId;
8
+ };
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=AnimationContext.js.map
@@ -1,6 +1,6 @@
1
- import { AnimationStep } from './AnimationStep';
2
- export type AnimationState = {
3
- id: number;
4
- duration: number;
5
- step: AnimationStep;
6
- };
1
+ import { AnimationStep } from './AnimationStep';
2
+ export type AnimationState = {
3
+ id: number;
4
+ duration: number;
5
+ step: AnimationStep;
6
+ };
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=AnimationState.js.map
@@ -1,6 +1,6 @@
1
- export declare enum AnimationStep {
2
- BEFORE_MOVE = 1,
3
- AFTER_MOVE = 2,
4
- BEFORE_UNDO = 3,
5
- AFTER_UNDO = 4
6
- }
1
+ export declare enum AnimationStep {
2
+ BEFORE_MOVE = 1,
3
+ AFTER_MOVE = 2,
4
+ BEFORE_UNDO = 3,
5
+ AFTER_UNDO = 4
6
+ }
@@ -1,11 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AnimationStep = void 0;
4
- var AnimationStep;
5
- (function (AnimationStep) {
6
- AnimationStep[AnimationStep["BEFORE_MOVE"] = 1] = "BEFORE_MOVE";
7
- AnimationStep[AnimationStep["AFTER_MOVE"] = 2] = "AFTER_MOVE";
8
- AnimationStep[AnimationStep["BEFORE_UNDO"] = 3] = "BEFORE_UNDO";
9
- AnimationStep[AnimationStep["AFTER_UNDO"] = 4] = "AFTER_UNDO";
10
- })(AnimationStep = exports.AnimationStep || (exports.AnimationStep = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AnimationStep = void 0;
4
+ var AnimationStep;
5
+ (function (AnimationStep) {
6
+ AnimationStep[AnimationStep["BEFORE_MOVE"] = 1] = "BEFORE_MOVE";
7
+ AnimationStep[AnimationStep["AFTER_MOVE"] = 2] = "AFTER_MOVE";
8
+ AnimationStep[AnimationStep["BEFORE_UNDO"] = 3] = "BEFORE_UNDO";
9
+ AnimationStep[AnimationStep["AFTER_UNDO"] = 4] = "AFTER_UNDO";
10
+ })(AnimationStep || (exports.AnimationStep = AnimationStep = {}));
11
11
  //# sourceMappingURL=AnimationStep.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnimationStep.js","sourceRoot":"","sources":["../../src/animations/AnimationStep.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAEX;AAFD,WAAY,aAAa;IACvB,+DAAe,CAAA;IAAE,6DAAU,CAAA;IAAE,+DAAW,CAAA;IAAE,6DAAU,CAAA;AACtD,CAAC,EAFW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAExB"}
1
+ {"version":3,"file":"AnimationStep.js","sourceRoot":"","sources":["../../src/animations/AnimationStep.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAEX;AAFD,WAAY,aAAa;IACvB,+DAAe,CAAA;IAAE,6DAAU,CAAA;IAAE,+DAAW,CAAA;IAAE,6DAAU,CAAA;AACtD,CAAC,EAFW,aAAa,6BAAb,aAAa,QAExB"}
@@ -1,8 +1,8 @@
1
- import { AnimationContext } from './AnimationContext';
2
- export declare class Animations<Game = any, Move = any, PlayerId = any> {
3
- getDuration(move: Move, context: AnimationContext<Game, Move, PlayerId>): number;
4
- getPreDuration?(move: Move, context: AnimationContext<Game, Move, PlayerId>): number;
5
- getPostDuration?(move: Move, context: AnimationContext<Game, Move, PlayerId>): number;
6
- getUndoPreDuration?(move: Move, context: AnimationContext<Game, Move, PlayerId>): number;
7
- getUndoPostDuration?(move: Move, context: AnimationContext<Game, Move, PlayerId>): number;
8
- }
1
+ import { AnimationContext } from './AnimationContext';
2
+ export declare class Animations<Game = any, Move = any, PlayerId = any> {
3
+ getDuration(move: Move, context: AnimationContext<Game, Move, PlayerId>): number;
4
+ getPreDuration?(move: Move, context: AnimationContext<Game, Move, PlayerId>): number;
5
+ getPostDuration?(move: Move, context: AnimationContext<Game, Move, PlayerId>): number;
6
+ getUndoPreDuration?(move: Move, context: AnimationContext<Game, Move, PlayerId>): number;
7
+ getUndoPostDuration?(move: Move, context: AnimationContext<Game, Move, PlayerId>): number;
8
+ }
@@ -1,23 +1,23 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Animations = void 0;
4
- var AnimationStep_1 = require("./AnimationStep");
5
- var Animations = (function () {
6
- function Animations() {
7
- }
8
- Animations.prototype.getDuration = function (move, context) {
9
- switch (context.step) {
10
- case AnimationStep_1.AnimationStep.BEFORE_MOVE:
11
- return this.getPreDuration ? this.getPreDuration(move, context) : 0;
12
- case AnimationStep_1.AnimationStep.AFTER_MOVE:
13
- return this.getPostDuration ? this.getPostDuration(move, context) : 0;
14
- case AnimationStep_1.AnimationStep.BEFORE_UNDO:
15
- return this.getUndoPreDuration ? this.getUndoPreDuration(move, context) : 0;
16
- case AnimationStep_1.AnimationStep.AFTER_UNDO:
17
- return this.getUndoPostDuration ? this.getUndoPostDuration(move, context) : 0;
18
- }
19
- };
20
- return Animations;
21
- }());
22
- exports.Animations = Animations;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Animations = void 0;
4
+ var AnimationStep_1 = require("./AnimationStep");
5
+ var Animations = (function () {
6
+ function Animations() {
7
+ }
8
+ Animations.prototype.getDuration = function (move, context) {
9
+ switch (context.step) {
10
+ case AnimationStep_1.AnimationStep.BEFORE_MOVE:
11
+ return this.getPreDuration ? this.getPreDuration(move, context) : 0;
12
+ case AnimationStep_1.AnimationStep.AFTER_MOVE:
13
+ return this.getPostDuration ? this.getPostDuration(move, context) : 0;
14
+ case AnimationStep_1.AnimationStep.BEFORE_UNDO:
15
+ return this.getUndoPreDuration ? this.getUndoPreDuration(move, context) : 0;
16
+ case AnimationStep_1.AnimationStep.AFTER_UNDO:
17
+ return this.getUndoPostDuration ? this.getUndoPostDuration(move, context) : 0;
18
+ }
19
+ };
20
+ return Animations;
21
+ }());
22
+ exports.Animations = Animations;
23
23
  //# sourceMappingURL=Animations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Animations.js","sourceRoot":"","sources":["../../src/animations/Animations.ts"],"names":[],"mappings":";;;AACA,iDAA+C;AAE/C;IAAA;IAsBA,CAAC;IApBC,gCAAW,GAAX,UAAY,IAAU,EAAE,OAA+C;QACrE,QAAQ,OAAO,CAAC,IAAI,EAAE;YACpB,KAAK,6BAAa,CAAC,WAAW;gBAC5B,OAAO,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;YACrE,KAAK,6BAAa,CAAC,UAAU;gBAC3B,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;YACvE,KAAK,6BAAa,CAAC,WAAW;gBAC5B,OAAO,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;YAC7E,KAAK,6BAAa,CAAC,UAAU;gBAC3B,OAAO,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;SAChF;IACH,CAAC;IASH,iBAAC;AAAD,CAAC,AAtBD,IAsBC;AAtBY,gCAAU"}
1
+ {"version":3,"file":"Animations.js","sourceRoot":"","sources":["../../src/animations/Animations.ts"],"names":[],"mappings":";;;AACA,iDAA+C;AAE/C;IAAA;IAsBA,CAAC;IApBC,gCAAW,GAAX,UAAY,IAAU,EAAE,OAA+C;QACrE,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;YACrB,KAAK,6BAAa,CAAC,WAAW;gBAC5B,OAAO,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;YACrE,KAAK,6BAAa,CAAC,UAAU;gBAC3B,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;YACvE,KAAK,6BAAa,CAAC,WAAW;gBAC5B,OAAO,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;YAC7E,KAAK,6BAAa,CAAC,UAAU;gBAC3B,OAAO,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QACjF,CAAC;IACH,CAAC;IASH,iBAAC;AAAD,CAAC,AAtBD,IAsBC;AAtBY,gCAAU"}
@@ -1,4 +1,5 @@
1
- import { RulesCreator } from '@gamepark/rules-api';
2
- import { Store } from 'redux';
3
- import { GamePageState } from '../Store';
4
- export declare function createAnimationsListener<Game = any, Move = any, PlayerId = any>(store: Store<GamePageState<Game, Move, PlayerId>>, Rules: RulesCreator<Game, Move, PlayerId>): () => void;
1
+ import { RulesCreator } from '@gamepark/rules-api';
2
+ import { Store } from 'redux';
3
+ import { GamePageState } from '../Store';
4
+ import { GameActions } from '../Store/gameReducer';
5
+ export declare function createAnimationsListener<Game = any, Move = any, PlayerId = any>(store: Store<GamePageState<Game, Move, PlayerId>, GameActions<Game, Move, PlayerId>>, Rules: RulesCreator<Game, Move, PlayerId>): () => void;