@gamepark/react-client 5.16.0 → 5.17.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 (110) hide show
  1. package/dist/Actions/AnimationPaused.d.ts +6 -0
  2. package/dist/Actions/AnimationPaused.js +9 -0
  3. package/dist/Actions/AnimationPaused.js.map +1 -0
  4. package/dist/GiveUp/GiveUp.d.ts +1 -0
  5. package/dist/Store/GamePageState.d.ts +1 -0
  6. package/dist/Store/gameMiddleware.js +1 -1
  7. package/dist/Store/gameMiddleware.js.map +1 -1
  8. package/dist/Store/gameReducer.d.ts +2 -1
  9. package/dist/Store/gameReducer.js +8 -3
  10. package/dist/Store/gameReducer.js.map +1 -1
  11. package/dist/Undo/useUndo.js +1 -1
  12. package/dist/Undo/useUndo.js.map +1 -1
  13. package/dist/animations/AnimationsListenerCreator.js +1 -1
  14. package/dist/animations/AnimationsListenerCreator.js.map +1 -1
  15. package/dist/api/Local/GameLocalAPI.js +1 -0
  16. package/dist/api/Local/GameLocalAPI.js.map +1 -1
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.js +3 -1
  19. package/dist/index.js.map +1 -1
  20. package/package.json +2 -2
  21. package/dist/Actions/AnimationBreakComplete.d.ts +0 -5
  22. package/dist/Actions/AnimationBreakComplete.js +0 -6
  23. package/dist/Actions/AnimationBreakComplete.js.map +0 -1
  24. package/dist/Actions/EjectPlayer.d.ts +0 -6
  25. package/dist/Actions/EjectPlayer.js +0 -9
  26. package/dist/Actions/EjectPlayer.js.map +0 -1
  27. package/dist/Actions/IgnoreRematch.d.ts +0 -5
  28. package/dist/Actions/IgnoreRematch.js +0 -9
  29. package/dist/Actions/IgnoreRematch.js.map +0 -1
  30. package/dist/Actions/LeaveGame.d.ts +0 -5
  31. package/dist/Actions/LeaveGame.js +0 -9
  32. package/dist/Actions/LeaveGame.js.map +0 -1
  33. package/dist/Actions/MoveLegacyUndone.d.ts +0 -7
  34. package/dist/Actions/MoveLegacyUndone.js +0 -10
  35. package/dist/Actions/MoveLegacyUndone.js.map +0 -1
  36. package/dist/Actions/MuteSounds.d.ts +0 -4
  37. package/dist/Actions/MuteSounds.js +0 -5
  38. package/dist/Actions/MuteSounds.js.map +0 -1
  39. package/dist/Actions/SetDisplayState.d.ts +0 -6
  40. package/dist/Actions/SetDisplayState.js +0 -9
  41. package/dist/Actions/SetDisplayState.js.map +0 -1
  42. package/dist/Actions/StartRematch.d.ts +0 -7
  43. package/dist/Actions/StartRematch.js +0 -9
  44. package/dist/Actions/StartRematch.js.map +0 -1
  45. package/dist/Actions/UnmuteSounds.d.ts +0 -4
  46. package/dist/Actions/UnmuteSounds.js +0 -5
  47. package/dist/Actions/UnmuteSounds.js.map +0 -1
  48. package/dist/Chat/MessagesList.d.ts +0 -1
  49. package/dist/Chat/MessagesList.js +0 -43
  50. package/dist/Chat/MessagesList.js.map +0 -1
  51. package/dist/Concede/ConcedeButton.d.ts +0 -1
  52. package/dist/Concede/ConcedeButton.js +0 -60
  53. package/dist/Concede/ConcedeButton.js.map +0 -1
  54. package/dist/Concede/useConcede.d.ts +0 -1
  55. package/dist/Concede/useConcede.js +0 -18
  56. package/dist/Concede/useConcede.js.map +0 -1
  57. package/dist/EjectPlayer/useEjectPlayer.d.ts +0 -24
  58. package/dist/EjectPlayer/useEjectPlayer.js +0 -65
  59. package/dist/EjectPlayer/useEjectPlayer.js.map +0 -1
  60. package/dist/EjectPlayer/useEjectPlayerButton.d.ts +0 -6
  61. package/dist/EjectPlayer/useEjectPlayerButton.js +0 -47
  62. package/dist/EjectPlayer/useEjectPlayerButton.js.map +0 -1
  63. package/dist/Hooks/useDisplayState.d.ts +0 -1
  64. package/dist/Hooks/useDisplayState.js +0 -17
  65. package/dist/Hooks/useDisplayState.js.map +0 -1
  66. package/dist/Hooks/useEjection.d.ts +0 -1
  67. package/dist/Hooks/useEjection.js +0 -10
  68. package/dist/Hooks/useEjection.js.map +0 -1
  69. package/dist/Hooks/useFailures.d.ts +0 -1
  70. package/dist/Hooks/useFailures.js +0 -10
  71. package/dist/Hooks/useFailures.js.map +0 -1
  72. package/dist/Hooks/useLeaveGame.d.ts +0 -1
  73. package/dist/Hooks/useLeaveGame.js +0 -10
  74. package/dist/Hooks/useLeaveGame.js.map +0 -1
  75. package/dist/Hooks/useRematch.d.ts +0 -7
  76. package/dist/Hooks/useRematch.js +0 -17
  77. package/dist/Hooks/useRematch.js.map +0 -1
  78. package/dist/Hooks/useSound.d.ts +0 -7
  79. package/dist/Hooks/useSound.js +0 -25
  80. package/dist/Hooks/useSound.js.map +0 -1
  81. package/dist/Hooks/useUndo.d.ts +0 -6
  82. package/dist/Hooks/useUndo.js +0 -63
  83. package/dist/Hooks/useUndo.js.map +0 -1
  84. package/dist/Tutorial/TutorialButton.d.ts +0 -1
  85. package/dist/Tutorial/TutorialButton.js +0 -45
  86. package/dist/Tutorial/TutorialButton.js.map +0 -1
  87. package/dist/Types/Failure.d.ts +0 -7
  88. package/dist/Types/Failure.js +0 -10
  89. package/dist/Types/Failure.js.map +0 -1
  90. package/dist/Types/GamePageState.d.ts +0 -26
  91. package/dist/Types/GamePageState.js +0 -3
  92. package/dist/Types/GamePageState.js.map +0 -1
  93. package/dist/Types/PlayerTime.d.ts +0 -12
  94. package/dist/Types/PlayerTime.js +0 -3
  95. package/dist/Types/PlayerTime.js.map +0 -1
  96. package/dist/Types/RematchNotification.d.ts +0 -7
  97. package/dist/Types/RematchNotification.js +0 -12
  98. package/dist/Types/RematchNotification.js.map +0 -1
  99. package/dist/Types/RematchOffer.d.ts +0 -5
  100. package/dist/Types/RematchOffer.js +0 -3
  101. package/dist/Types/RematchOffer.js.map +0 -1
  102. package/dist/Types/Tutorial.d.ts +0 -5
  103. package/dist/Types/Tutorial.js +0 -3
  104. package/dist/Types/Tutorial.js.map +0 -1
  105. package/dist/animations/DisplayedAction.d.ts +0 -13
  106. package/dist/animations/DisplayedAction.js +0 -3
  107. package/dist/animations/DisplayedAction.js.map +0 -1
  108. package/dist/api/Client/game-apollo-client.d.ts +0 -2
  109. package/dist/api/Client/game-apollo-client.js +0 -30
  110. package/dist/api/Client/game-apollo-client.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"Failure.js","sourceRoot":"","sources":["../../src/Types/Failure.ts"],"names":[],"mappings":";;AAAA,IAAM,OAAO,GAAG;IACd,OAAO,EAAE,eAAe;IACxB,cAAc,EAAE,uCAAuC;IACvD,cAAc,EAAE,4BAA4B;IAC5C,sBAAsB,EAAE,iDAAiD;CAC1E,CAAA;AAED,kBAAe,OAAO,CAAA"}
@@ -1,26 +0,0 @@
1
- import DisplayedAction from '../animations/DisplayedAction';
2
- import GameMode from './GameMode';
3
- import { IndexedGameNotification } from './GameNotification';
4
- import GameOptions from './GameOptions';
5
- import Player from './Player';
6
- import RematchOffer from './RematchOffer';
7
- declare type GamePageState<State = any, Move = any, PlayerId = any> = {
8
- players: Player<PlayerId>[];
9
- playerId?: PlayerId;
10
- options?: GameOptions;
11
- gameMode?: GameMode;
12
- setup?: State;
13
- state?: State;
14
- actions?: DisplayedAction<Move, PlayerId>[];
15
- pendingNotifications: IndexedGameNotification<PlayerId>[];
16
- nextNotificationIndex: number;
17
- failures: string[];
18
- animationIncrement: number;
19
- animationsSpeed: number;
20
- animationsBreak?: boolean;
21
- rematchOffer?: RematchOffer<PlayerId>;
22
- soundsMuted: boolean;
23
- clientTimeDelta: number;
24
- gameOver?: boolean;
25
- };
26
- export default GamePageState;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=GamePageState.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GamePageState.js","sourceRoot":"","sources":["../../src/Types/GamePageState.ts"],"names":[],"mappings":""}
@@ -1,12 +0,0 @@
1
- declare type PlayerTime = {
2
- playing: boolean;
3
- lastChange: string;
4
- availableTime: number;
5
- highestPlayTime: number;
6
- highestDownTime: number;
7
- cumulatedPlayTime: number;
8
- cumulatedDownTime: number;
9
- cumulatedWaitForMeTime: number;
10
- weightedWaitForMeTime: number;
11
- };
12
- export default PlayerTime;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=PlayerTime.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PlayerTime.js","sourceRoot":"","sources":["../../src/Types/PlayerTime.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- import GameNotification from './GameNotification';
2
- declare type RematchNotification<PlayerId = any> = GameNotification<PlayerId> & {
3
- rematchId: string;
4
- };
5
- export declare function rematchNotification<PlayerId>(playerId: PlayerId, rematchId: string): RematchNotification<PlayerId>;
6
- export default RematchNotification;
7
- export declare function isRematchNotification<PlayerId>(notification: GameNotification<PlayerId>): notification is RematchNotification<PlayerId>;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isRematchNotification = exports.rematchNotification = void 0;
4
- function rematchNotification(playerId, rematchId) {
5
- return { playerId: playerId, rematchId: rematchId };
6
- }
7
- exports.rematchNotification = rematchNotification;
8
- function isRematchNotification(notification) {
9
- return notification.rematchId != undefined;
10
- }
11
- exports.isRematchNotification = isRematchNotification;
12
- //# sourceMappingURL=RematchNotification.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RematchNotification.js","sourceRoot":"","sources":["../../src/Types/RematchNotification.ts"],"names":[],"mappings":";;;AAMA,SAAgB,mBAAmB,CAAW,QAAkB,EAAE,SAAiB;IACjF,OAAO,EAAC,QAAQ,UAAA,EAAE,SAAS,WAAA,EAAC,CAAA;AAC9B,CAAC;AAFD,kDAEC;AAID,SAAgB,qBAAqB,CAAW,YAAwC;IACtF,OAAQ,YAA8C,CAAC,SAAS,IAAI,SAAS,CAAA;AAC/E,CAAC;AAFD,sDAEC"}
@@ -1,5 +0,0 @@
1
- declare type RematchOffer<PlayerId> = {
2
- playerId: PlayerId;
3
- link?: string;
4
- };
5
- export default RematchOffer;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=RematchOffer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RematchOffer.js","sourceRoot":"","sources":["../../src/Types/RematchOffer.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- declare type Tutorial<State, Move = string, PlayerId = number> = {
2
- setupTutorial(): [State, PlayerId[]];
3
- expectedMoves(): (Move | Move[])[];
4
- };
5
- export default Tutorial;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=Tutorial.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Tutorial.js","sourceRoot":"","sources":["../../src/Types/Tutorial.ts"],"names":[],"mappings":""}
@@ -1,13 +0,0 @@
1
- import { Action } from '@gamepark/rules-api';
2
- declare type DisplayedAction<Move = any, PlayerId = any> = Action<Move, PlayerId> & {
3
- pending?: boolean;
4
- delayed?: boolean;
5
- animation?: {
6
- id: number;
7
- consequence?: number;
8
- duration: number;
9
- };
10
- cancelled?: boolean;
11
- cancelPending?: boolean;
12
- };
13
- export default DisplayedAction;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DisplayedAction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DisplayedAction.js","sourceRoot":"","sources":["../../src/animations/DisplayedAction.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import { ApolloClient } from '@apollo/client';
2
- export declare function getGameApolloClient(): ApolloClient<any>;
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getGameApolloClient = void 0;
4
- var client_1 = require("@apollo/client");
5
- var index_1 = require("../../index");
6
- var gameApolloClient;
7
- function getGameApolloClient() {
8
- if (!gameApolloClient) {
9
- gameApolloClient = initGameApolloClient();
10
- }
11
- return gameApolloClient;
12
- }
13
- exports.getGameApolloClient = getGameApolloClient;
14
- // Hotfix for GameNotification inheritance bug
15
- function initGameApolloClient() {
16
- var _a;
17
- return new client_1.ApolloClient({
18
- link: client_1.ApolloLink.from([new client_1.HttpLink({ uri: index_1.PLATFORM_URI + ((_a = process.env.REACT_APP_GRAPHQL_ENDPOINT) !== null && _a !== void 0 ? _a : '/api/graphql'), fetch: fetch, credentials: 'include' })]),
19
- cache: new client_1.InMemoryCache(),
20
- defaultOptions: {
21
- watchQuery: {
22
- fetchPolicy: 'no-cache'
23
- },
24
- query: {
25
- fetchPolicy: 'no-cache' // TODO: configure fragment matchers for Interface types and re-enable caching
26
- }
27
- }
28
- });
29
- }
30
- //# sourceMappingURL=game-apollo-client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"game-apollo-client.js","sourceRoot":"","sources":["../../../src/api/Client/game-apollo-client.ts"],"names":[],"mappings":";;;AAAA,yCAAgF;AAChF,qCAAwC;AAExC,IAAI,gBAA+C,CAAA;AAEnD,SAAgB,mBAAmB;IACjC,IAAI,CAAC,gBAAgB,EAAE;QACrB,gBAAgB,GAAG,oBAAoB,EAAE,CAAA;KAC1C;IACD,OAAO,gBAAgB,CAAA;AACzB,CAAC;AALD,kDAKC;AAED,8CAA8C;AAC9C,SAAS,oBAAoB;;IAC3B,OAAO,IAAI,qBAAY,CAAC;QACtB,IAAI,EAAE,mBAAU,CAAC,IAAI,CAAC,CAAC,IAAI,iBAAQ,CAAC,EAAC,GAAG,EAAE,oBAAY,GAAG,CAAC,MAAA,OAAO,CAAC,GAAG,CAAC,0BAA0B,mCAAI,cAAc,CAAC,EAAE,KAAK,OAAA,EAAE,WAAW,EAAE,SAAS,EAAC,CAAC,CAAC,CAAC;QACtJ,KAAK,EAAE,IAAI,sBAAa,EAAE;QAC1B,cAAc,EAAE;YACd,UAAU,EAAE;gBACV,WAAW,EAAE,UAAU;aACxB;YACD,KAAK,EAAE;gBACL,WAAW,EAAE,UAAU,CAAC,8EAA8E;aACvG;SACF;KACF,CAAC,CAAA;AACJ,CAAC"}