@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.
- package/dist/Actions/ActionFailed.d.ts +6 -6
- package/dist/Actions/ActionFailed.js +8 -8
- package/dist/Actions/ActionFailed.js.map +1 -1
- package/dist/Actions/ActionType.d.ts +3 -3
- package/dist/Actions/ActionType.js +7 -7
- package/dist/Actions/ActionType.js.map +1 -1
- package/dist/Actions/AnimationComplete.d.ts +6 -6
- package/dist/Actions/AnimationComplete.js +8 -8
- package/dist/Actions/AnimationComplete.js.map +1 -1
- package/dist/Actions/AnimationPaused.d.ts +6 -6
- package/dist/Actions/AnimationPaused.js +8 -8
- package/dist/Actions/AnimationPaused.js.map +1 -1
- package/dist/Actions/AnimationStart.d.ts +5 -5
- package/dist/Actions/AnimationStart.js +4 -4
- package/dist/Actions/ClearFailures.d.ts +5 -5
- package/dist/Actions/ClearFailures.js +8 -8
- package/dist/Actions/ClearFailures.js.map +1 -1
- package/dist/Actions/GameNotificationsReceived.d.ts +10 -10
- package/dist/Actions/GameNotificationsReceived.js +9 -9
- package/dist/Actions/GameNotificationsReceived.js.map +1 -1
- package/dist/Actions/GameOver.d.ts +16 -16
- package/dist/Actions/GameOver.js +8 -8
- package/dist/Actions/GameOver.js.map +1 -1
- package/dist/Actions/GameStateLoaded.d.ts +16 -16
- package/dist/Actions/GameStateLoaded.js +20 -20
- package/dist/Actions/GameStateLoaded.js.map +1 -1
- package/dist/Actions/MovePlayed.d.ts +11 -11
- package/dist/Actions/MovePlayed.js +4 -2
- package/dist/Actions/MovePlayed.js.map +1 -1
- package/dist/Actions/MoveUndone.d.ts +7 -7
- package/dist/Actions/MoveUndone.js +9 -9
- package/dist/Actions/MoveUndone.js.map +1 -1
- package/dist/Actions/PlayerQuit.d.ts +11 -11
- package/dist/Actions/PlayerQuit.js +19 -19
- package/dist/Actions/PlayerQuit.js.map +1 -1
- package/dist/Actions/SetAnimationsSpeed.d.ts +6 -6
- package/dist/Actions/SetAnimationsSpeed.js +8 -8
- package/dist/Actions/SetAnimationsSpeed.js.map +1 -1
- package/dist/Actions/index.d.ts +11 -12
- package/dist/Actions/index.js +27 -28
- package/dist/Actions/index.js.map +1 -1
- package/dist/Chat/ChatChannel.d.ts +5 -5
- package/dist/Chat/ChatChannel.js +2 -2
- package/dist/Chat/Message.d.ts +6 -6
- package/dist/Chat/Message.js +2 -2
- package/dist/Chat/index.d.ts +2 -2
- package/dist/Chat/index.js +18 -18
- package/dist/Deckbuilding/Deck.d.ts +5 -5
- package/dist/Deckbuilding/Deck.js +2 -2
- package/dist/Deckbuilding/index.d.ts +4 -4
- package/dist/Deckbuilding/index.js +24 -24
- package/dist/Deckbuilding/useDeleteDeck.d.ts +2 -2
- package/dist/Deckbuilding/useDeleteDeck.js +15 -15
- package/dist/Deckbuilding/useDeleteDeck.js.map +1 -1
- package/dist/Deckbuilding/useMyDecks.d.ts +2 -2
- package/dist/Deckbuilding/useMyDecks.js +14 -14
- package/dist/Deckbuilding/useMyDecks.js.map +1 -1
- package/dist/Deckbuilding/useSaveDeck.d.ts +2 -2
- package/dist/Deckbuilding/useSaveDeck.js +15 -15
- package/dist/Deckbuilding/useSaveDeck.js.map +1 -1
- package/dist/EjectPlayer/EjectPlayer.d.ts +6 -6
- package/dist/EjectPlayer/EjectPlayer.js +8 -8
- package/dist/EjectPlayer/EjectPlayer.js.map +1 -1
- package/dist/EjectPlayer/index.d.ts +1 -1
- package/dist/EjectPlayer/index.js +17 -17
- package/dist/Failure/Failure.d.ts +6 -6
- package/dist/Failure/Failure.js +9 -9
- package/dist/Failure/index.d.ts +1 -1
- package/dist/Failure/index.js +17 -17
- package/dist/GiveUp/GiveUp.d.ts +7 -7
- package/dist/GiveUp/GiveUp.js +5 -5
- package/dist/GiveUp/index.d.ts +1 -1
- package/dist/GiveUp/index.js +17 -17
- package/dist/Hooks/index.d.ts +5 -5
- package/dist/Hooks/index.js +21 -21
- package/dist/Hooks/useChatMessages.d.ts +12 -12
- package/dist/Hooks/useChatMessages.js +53 -51
- package/dist/Hooks/useChatMessages.js.map +1 -1
- package/dist/Hooks/useMessageAuthor.d.ts +4 -4
- package/dist/Hooks/useMessageAuthor.js +17 -18
- package/dist/Hooks/useMessageAuthor.js.map +1 -1
- package/dist/Hooks/useOptions.d.ts +2 -2
- package/dist/Hooks/useOptions.js +7 -8
- package/dist/Hooks/useOptions.js.map +1 -1
- package/dist/Hooks/useRematch.d.ts +7 -7
- package/dist/Hooks/useRematch.js +22 -19
- package/dist/Hooks/useRematch.js.map +1 -1
- package/dist/Hooks/useSendMessage.d.ts +1 -1
- package/dist/Hooks/useSendMessage.js +13 -14
- package/dist/Hooks/useSendMessage.js.map +1 -1
- package/dist/Log/StartLiveLog.d.ts +4 -4
- package/dist/Log/StartLiveLog.js +4 -4
- package/dist/Log/StopLiveLog.d.ts +5 -5
- package/dist/Log/StopLiveLog.js +8 -8
- package/dist/Log/StopLiveLog.js.map +1 -1
- package/dist/Log/index.d.ts +4 -4
- package/dist/Log/index.js +20 -20
- package/dist/Log/useLogControls.d.ts +7 -7
- package/dist/Log/useLogControls.js +21 -22
- package/dist/Log/useLogControls.js.map +1 -1
- package/dist/PlayerTime/PlayerTime.d.ts +11 -11
- package/dist/PlayerTime/PlayerTime.js +2 -2
- package/dist/PlayerTime/index.d.ts +1 -1
- package/dist/PlayerTime/index.js +17 -17
- package/dist/Rematch/RematchQueries.d.ts +19 -19
- package/dist/Rematch/RematchQueries.js +13 -13
- package/dist/Rematch/index.d.ts +1 -1
- package/dist/Rematch/index.js +17 -17
- package/dist/Sound/MuteSounds.d.ts +5 -5
- package/dist/Sound/MuteSounds.js +9 -9
- package/dist/Sound/MuteSounds.js.map +1 -1
- package/dist/Sound/UnmuteSounds.d.ts +4 -4
- package/dist/Sound/UnmuteSounds.js +4 -4
- package/dist/Sound/index.d.ts +3 -3
- package/dist/Sound/index.js +19 -19
- package/dist/Sound/useSoundControls.d.ts +7 -7
- package/dist/Sound/useSoundControls.js +21 -22
- package/dist/Sound/useSoundControls.js.map +1 -1
- package/dist/Store/DisplayedAction.d.ts +15 -15
- package/dist/Store/DisplayedAction.js +18 -19
- package/dist/Store/DisplayedAction.js.map +1 -1
- package/dist/Store/GamePageState.d.ts +28 -28
- package/dist/Store/GamePageState.js +2 -2
- package/dist/Store/PlayedMove.d.ts +5 -5
- package/dist/Store/PlayedMove.js +2 -2
- package/dist/Store/gameMiddleware.d.ts +4 -4
- package/dist/Store/gameMiddleware.js +45 -41
- package/dist/Store/gameMiddleware.js.map +1 -1
- package/dist/Store/gameReducer.d.ts +23 -20
- package/dist/Store/gameReducer.js +538 -525
- package/dist/Store/gameReducer.js.map +1 -1
- package/dist/Store/index.d.ts +3 -3
- package/dist/Store/index.js +19 -19
- package/dist/Store/localMovePreviewMiddleware.d.ts +4 -4
- package/dist/Store/localMovePreviewMiddleware.js +17 -18
- package/dist/Store/localMovePreviewMiddleware.js.map +1 -1
- package/dist/Tutorial/PlayTutorialMoves.d.ts +9 -9
- package/dist/Tutorial/PlayTutorialMoves.js +6 -6
- package/dist/Tutorial/Tutorial.d.ts +5 -5
- package/dist/Tutorial/Tutorial.js +2 -2
- package/dist/Tutorial/TutorialDescription.d.ts +7 -7
- package/dist/Tutorial/TutorialDescription.js +2 -2
- package/dist/Tutorial/index.d.ts +4 -4
- package/dist/Tutorial/index.js +20 -20
- package/dist/Tutorial/useTutorial.d.ts +2 -2
- package/dist/Tutorial/useTutorial.js +21 -22
- package/dist/Tutorial/useTutorial.js.map +1 -1
- package/dist/Types/GameAI.d.ts +1 -1
- package/dist/Types/GameAI.js +2 -2
- package/dist/Types/GameData.d.ts +18 -18
- package/dist/Types/GameData.js +2 -2
- package/dist/Types/GameMessage.d.ts +8 -8
- package/dist/Types/GameMessage.js +2 -2
- package/dist/Types/GameMode.d.ts +6 -6
- package/dist/Types/GameMode.js +10 -10
- package/dist/Types/GameMode.js.map +1 -1
- package/dist/Types/GameNotification.d.ts +6 -6
- package/dist/Types/GameNotification.js +2 -2
- package/dist/Types/GameOptions.d.ts +9 -9
- package/dist/Types/GameOptions.js +8 -8
- package/dist/Types/GameOptions.js.map +1 -1
- package/dist/Types/MovePlayedNotification.d.ts +9 -9
- package/dist/Types/MovePlayedNotification.js +11 -12
- package/dist/Types/MovePlayedNotification.js.map +1 -1
- package/dist/Types/MoveUndoneNotification.d.ts +8 -8
- package/dist/Types/MoveUndoneNotification.js +11 -12
- package/dist/Types/MoveUndoneNotification.js.map +1 -1
- package/dist/Types/Player.d.ts +13 -13
- package/dist/Types/Player.js +2 -2
- package/dist/Types/PlayerQuitReason.d.ts +4 -4
- package/dist/Types/PlayerQuitReason.js +8 -8
- package/dist/Types/PlayerQuitReason.js.map +1 -1
- package/dist/Types/ProxyGameData.d.ts +13 -13
- package/dist/Types/ProxyGameData.js +2 -2
- package/dist/Types/Tournament.d.ts +4 -4
- package/dist/Types/Tournament.js +2 -2
- package/dist/Types/index.d.ts +12 -12
- package/dist/Types/index.js +28 -28
- package/dist/User/User.d.ts +6 -6
- package/dist/User/User.js +2 -2
- package/dist/User/index.d.ts +2 -2
- package/dist/User/index.js +18 -18
- package/dist/User/useMe.d.ts +4 -4
- package/dist/User/useMe.js +20 -21
- package/dist/User/useMe.js.map +1 -1
- package/dist/animations/Animation.d.ts +6 -6
- package/dist/animations/Animation.js +2 -2
- package/dist/animations/AnimationContext.d.ts +8 -8
- package/dist/animations/AnimationContext.js +2 -2
- package/dist/animations/AnimationState.d.ts +6 -6
- package/dist/animations/AnimationState.js +2 -2
- package/dist/animations/AnimationStep.d.ts +6 -6
- package/dist/animations/AnimationStep.js +10 -10
- package/dist/animations/AnimationStep.js.map +1 -1
- package/dist/animations/Animations.d.ts +8 -8
- package/dist/animations/Animations.js +22 -22
- package/dist/animations/Animations.js.map +1 -1
- package/dist/animations/AnimationsListenerCreator.d.ts +5 -4
- package/dist/animations/AnimationsListenerCreator.js +46 -50
- package/dist/animations/AnimationsListenerCreator.js.map +1 -1
- package/dist/animations/index.d.ts +6 -6
- package/dist/animations/index.js +22 -22
- package/dist/api/Client/GameClientAPI.d.ts +25 -24
- package/dist/api/Client/GameClientAPI.js +166 -166
- package/dist/api/Client/GameClientAPI.js.map +1 -1
- package/dist/api/Client/GameNotificationsListener.d.ts +5 -5
- package/dist/api/Client/GameNotificationsListener.js +116 -114
- package/dist/api/Client/GameNotificationsListener.js.map +1 -1
- package/dist/api/Client/RemoteGameLoader.d.ts +4 -5
- package/dist/api/Client/RemoteGameLoader.js +61 -62
- package/dist/api/Client/RemoteGameLoader.js.map +1 -1
- package/dist/api/Client/RemoteGameProvider.d.ts +7 -7
- package/dist/api/Client/RemoteGameProvider.js +55 -70
- package/dist/api/Client/RemoteGameProvider.js.map +1 -1
- package/dist/api/Client/apollo-client.d.ts +2 -2
- package/dist/api/Client/apollo-client.js +57 -58
- package/dist/api/Client/apollo-client.js.map +1 -1
- package/dist/api/Client/index.d.ts +4 -3
- package/dist/api/Client/index.js +20 -19
- package/dist/api/Client/index.js.map +1 -1
- package/dist/api/Client/pusher.d.ts +2 -0
- package/dist/api/Client/pusher.js +16 -0
- package/dist/api/Client/pusher.js.map +1 -0
- package/dist/api/GameAPI.d.ts +11 -10
- package/dist/api/GameAPI.js +2 -2
- package/dist/api/Local/ConsoleTools.d.ts +26 -25
- package/dist/api/Local/ConsoleTools.js +85 -86
- package/dist/api/Local/ConsoleTools.js.map +1 -1
- package/dist/api/Local/GameLocalAPI.d.ts +45 -44
- package/dist/api/Local/GameLocalAPI.js +541 -540
- package/dist/api/Local/GameLocalAPI.js.map +1 -1
- package/dist/api/Local/LocalGameProvider.d.ts +15 -15
- package/dist/api/Local/LocalGameProvider.js +49 -58
- package/dist/api/Local/LocalGameProvider.js.map +1 -1
- package/dist/api/Local/index.d.ts +1 -1
- package/dist/api/Local/index.js +17 -17
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.js +18 -18
- package/dist/index.d.ts +18 -18
- package/dist/index.js +36 -36
- package/dist/util/ArrayUtil.d.ts +2 -2
- package/dist/util/ArrayUtil.js +20 -21
- package/dist/util/ArrayUtil.js.map +1 -1
- package/package.json +19 -22
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
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":"
|
|
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.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
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":"
|
|
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"}
|
package/dist/Types/Player.d.ts
CHANGED
|
@@ -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
|
+
};
|
package/dist/Types/Player.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=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
|
|
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,
|
|
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
|
+
};
|
package/dist/Types/Tournament.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=Tournament.js.map
|
package/dist/Types/index.d.ts
CHANGED
|
@@ -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';
|
package/dist/Types/index.js
CHANGED
|
@@ -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
|
package/dist/User/User.d.ts
CHANGED
|
@@ -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
|
package/dist/User/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './User';
|
|
2
|
-
export * from './useMe';
|
|
1
|
+
export * from './User';
|
|
2
|
+
export * from './useMe';
|
package/dist/User/index.js
CHANGED
|
@@ -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
|
package/dist/User/useMe.d.ts
CHANGED
|
@@ -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;
|
package/dist/User/useMe.js
CHANGED
|
@@ -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 =
|
|
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
|
-
|
|
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
|
package/dist/User/useMe.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMe.js","sourceRoot":"","sources":["../../src/User/useMe.ts"],"names":[],"mappings":"
|
|
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
|
|
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,
|
|
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;
|
|
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
|
-
|
|
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;
|