@gamepark/react-client 5.6.3 → 5.7.2
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/EjectPlayer/EjectPlayerDialog.js +2 -2
- package/dist/EjectPlayer/EjectPlayerDialog.js.map +1 -1
- package/dist/GameProvider/GameContext.d.ts +16 -2
- package/dist/GameProvider/GameContext.js +11 -3
- package/dist/GameProvider/GameContext.js.map +1 -1
- package/dist/GameProvider/GameProvider.js +9 -83
- package/dist/GameProvider/GameProvider.js.map +1 -1
- package/dist/GameProvider/index.js +1 -3
- package/dist/GameProvider/index.js.map +1 -1
- package/dist/Menu/Menu.js +2 -2
- package/dist/Menu/Menu.js.map +1 -1
- package/dist/Sound/SoundButton.js +2 -2
- package/dist/Sound/SoundButton.js.map +1 -1
- package/dist/Sound/useSound.js +5 -8
- package/dist/Sound/useSound.js.map +1 -1
- package/dist/Tutorial/RestartTutorialButton.js +2 -5
- package/dist/Tutorial/RestartTutorialButton.js.map +1 -1
- package/dist/Types/GameData.d.ts +1 -1
- package/dist/Undo/useUndo.js +2 -2
- package/dist/Undo/useUndo.js.map +1 -1
- package/dist/api/Client/GameClientAPI.d.ts +3 -4
- package/dist/api/Client/GameClientAPI.js +14 -84
- package/dist/api/Client/GameClientAPI.js.map +1 -1
- package/dist/api/Client/GameNotificationsListener.d.ts +4 -0
- package/dist/api/Client/GameNotificationsListener.js +97 -0
- package/dist/api/Client/GameNotificationsListener.js.map +1 -0
- package/dist/api/Client/RemoteGameLoader.d.ts +4 -0
- package/dist/api/Client/RemoteGameLoader.js +34 -0
- package/dist/api/Client/RemoteGameLoader.js.map +1 -0
- package/dist/api/Client/RemoteGameProvider.d.ts +4 -0
- package/dist/api/Client/RemoteGameProvider.js +60 -0
- package/dist/api/Client/RemoteGameProvider.js.map +1 -0
- package/dist/api/Client/apollo-client.d.ts +2 -0
- package/dist/api/Client/apollo-client.js +54 -0
- package/dist/api/Client/apollo-client.js.map +1 -0
- package/dist/api/Client/game-apollo-client.d.ts +2 -0
- package/dist/api/Client/game-apollo-client.js +30 -0
- package/dist/api/Client/game-apollo-client.js.map +1 -0
- package/dist/api/Local/GameLocalAPI.d.ts +6 -6
- package/dist/api/Local/GameLocalAPI.js +34 -28
- package/dist/api/Local/GameLocalAPI.js.map +1 -1
- package/dist/api/Local/LocalGameProvider.d.ts +2 -0
- package/dist/api/Local/LocalGameProvider.js +48 -0
- package/dist/api/Local/LocalGameProvider.js.map +1 -0
- package/dist/datadog/DatadogLogsInitializer.js +7 -0
- package/dist/datadog/DatadogLogsInitializer.js.map +1 -1
- package/package.json +5 -5
|
@@ -40,7 +40,7 @@ var moment_1 = __importDefault(require("moment"));
|
|
|
40
40
|
var react_2 = require("react");
|
|
41
41
|
var react_i18next_1 = require("react-i18next");
|
|
42
42
|
var react_redux_1 = require("react-redux");
|
|
43
|
-
var
|
|
43
|
+
var GameContext_1 = require("../GameProvider/GameContext");
|
|
44
44
|
var Menu_1 = require("../Menu");
|
|
45
45
|
var EjectPlayer_1 = require("./EjectPlayer");
|
|
46
46
|
var useOpponentWithMaxTime_1 = __importDefault(require("./useOpponentWithMaxTime"));
|
|
@@ -52,7 +52,7 @@ function EjectPlayerDialog(_a) {
|
|
|
52
52
|
var opponentWithNegativeTime = (0, useOpponentWithMaxTime_1.default)(0);
|
|
53
53
|
var opponentThatCanBeEjected = (0, useOpponentWithMaxTime_1.default)();
|
|
54
54
|
var dispatch = (0, react_redux_1.useDispatch)();
|
|
55
|
-
var optionsSpec = (_b = (0, react_2.useContext)(
|
|
55
|
+
var optionsSpec = (_b = (0, react_2.useContext)(GameContext_1.gameContext)) === null || _b === void 0 ? void 0 : _b.optionsSpec;
|
|
56
56
|
(0, react_2.useEffect)(function () {
|
|
57
57
|
if (!opponentWithNegativeTime) {
|
|
58
58
|
close();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EjectPlayerDialog.js","sourceRoot":"","sources":["../../src/EjectPlayer/EjectP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AAA,6EAIxB,IAAA,CAAA;AAED,IAAM,cAAc,OAAG,WAAG,sFAAA,kBAEzB,IAAA,CAAA"}
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
+
import { GameCreator, Robot, RulesCreator } from '@gamepark/rules-api';
|
|
1
2
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
3
|
+
import Animations from '../animations/Animations';
|
|
4
|
+
import { TutorialDescription } from '../Tutorial';
|
|
5
|
+
import GameAI from '../Types/GameAI';
|
|
6
|
+
declare type GameContext<State = any, View = any, Move = any, MoveView = any, PlayerId = any> = {
|
|
7
|
+
game: string;
|
|
8
|
+
Rules: RulesCreator<State, Move, PlayerId>;
|
|
9
|
+
RulesView?: GameCreator<View, MoveView>;
|
|
10
|
+
optionsSpec?: any;
|
|
11
|
+
dummy?: Robot<State, Move, PlayerId>;
|
|
12
|
+
animations?: Animations;
|
|
13
|
+
tutorial?: TutorialDescription<State, Move, PlayerId>;
|
|
14
|
+
ai?: GameAI<State, Move, PlayerId>;
|
|
15
|
+
hasSounds?: boolean;
|
|
16
|
+
};
|
|
4
17
|
export default GameContext;
|
|
18
|
+
export declare const gameContext: React.Context<GameContext<any, any, any, any, any>>;
|
|
@@ -3,10 +3,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.gameContext = void 0;
|
|
6
7
|
var react_1 = __importDefault(require("react"));
|
|
7
|
-
var
|
|
8
|
+
var MissingRules = /** @class */ (function () {
|
|
9
|
+
function MissingRules() {
|
|
10
|
+
throw new Error('Missing GameContext');
|
|
11
|
+
}
|
|
12
|
+
return MissingRules;
|
|
13
|
+
}());
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
var missingContext = { game: '', Rules: MissingRules };
|
|
16
|
+
exports.gameContext = react_1.default.createContext(missingContext);
|
|
8
17
|
if (process.env.NODE_ENV !== 'production') {
|
|
9
|
-
|
|
18
|
+
exports.gameContext.displayName = 'GameContext';
|
|
10
19
|
}
|
|
11
|
-
exports.default = GameContext;
|
|
12
20
|
//# sourceMappingURL=GameContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GameContext.js","sourceRoot":"","sources":["../../src/GameProvider/GameContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GameContext.js","sourceRoot":"","sources":["../../src/GameProvider/GameContext.ts"],"names":[],"mappings":";;;;;;AACA,gDAAyB;AAmBzB;IACE;QACE,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAA;IACxC,CAAC;IACH,mBAAC;AAAD,CAAC,AAJD,IAIC;AAED,aAAa;AACb,IAAM,cAAc,GAAgB,EAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,YAAY,EAAC,CAAA;AAEtD,QAAA,WAAW,GAAG,eAAK,CAAC,aAAa,CAAc,cAAc,CAAC,CAAA;AAE3E,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;IACzC,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAA;CACxC"}
|
|
@@ -21,110 +21,36 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
}
|
|
22
22
|
return t;
|
|
23
23
|
};
|
|
24
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
25
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
26
|
-
if (ar || !(i in from)) {
|
|
27
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
28
|
-
ar[i] = from[i];
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
32
|
-
};
|
|
33
24
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
34
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
35
26
|
};
|
|
36
|
-
var _a;
|
|
37
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
28
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
39
|
-
var client_1 = require("@apollo/client");
|
|
40
29
|
var cache_1 = __importDefault(require("@emotion/cache"));
|
|
41
30
|
var react_1 = require("@emotion/react");
|
|
42
31
|
var react_components_1 = require("@gamepark/react-components");
|
|
43
|
-
var rules_api_1 = require("@gamepark/rules-api");
|
|
44
|
-
var use_pusher_1 = require("@harelpls/use-pusher");
|
|
45
|
-
var moment_1 = __importDefault(require("moment"));
|
|
46
32
|
var react_2 = require("react");
|
|
47
|
-
var react_redux_1 = require("react-redux");
|
|
48
|
-
var redux_1 = require("redux");
|
|
49
33
|
var stylis_1 = require("stylis");
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var ConsoleTools_1 = __importDefault(require("../api/Local/ConsoleTools"));
|
|
53
|
-
var GameLocalAPI_1 = __importDefault(require("../api/Local/GameLocalAPI"));
|
|
34
|
+
var RemoteGameProvider_1 = __importDefault(require("../api/Client/RemoteGameProvider"));
|
|
35
|
+
var LocalGameProvider_1 = __importDefault(require("../api/Local/LocalGameProvider"));
|
|
54
36
|
var DatadogLogsInitializer_1 = require("../datadog/DatadogLogsInitializer");
|
|
55
|
-
var index_1 = require("../index");
|
|
56
|
-
var gameMiddleware_1 = __importDefault(require("../Store/gameMiddleware"));
|
|
57
|
-
var gameReducer_1 = __importDefault(require("../Store/gameReducer"));
|
|
58
37
|
var webPReplace_1 = __importDefault(require("../util/webPReplace"));
|
|
59
|
-
var GameContext_1 =
|
|
38
|
+
var GameContext_1 = require("./GameContext");
|
|
60
39
|
var GameProviderProps_1 = require("./GameProviderProps");
|
|
61
|
-
var
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
typePolicies: {
|
|
65
|
-
ChatChannel: {
|
|
66
|
-
keyFields: ['name'],
|
|
67
|
-
fields: {
|
|
68
|
-
messages: {
|
|
69
|
-
keyArgs: false,
|
|
70
|
-
merge: function (existing, incoming) {
|
|
71
|
-
if (existing === void 0) { existing = []; }
|
|
72
|
-
if (incoming === void 0) { incoming = []; }
|
|
73
|
-
return __spreadArray(__spreadArray([], incoming, true), existing, true).sort(function (m1, m2) { return (0, moment_1.default)(m1.date).unix() - (0, moment_1.default)(m2.date).unix(); })
|
|
74
|
-
.filter(function (message, index, messages) { return index === 0 || message.id !== messages[index - 1].id; });
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
Message: {
|
|
80
|
-
keyFields: false
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
})
|
|
84
|
-
});
|
|
40
|
+
var query = new URLSearchParams(window.location.search);
|
|
41
|
+
var gameId = query.get('game');
|
|
42
|
+
(0, DatadogLogsInitializer_1.initDatadogLogs)();
|
|
85
43
|
function GameProvider(_a) {
|
|
86
|
-
var _b, _c;
|
|
87
44
|
var children = _a.children, props = __rest(_a, ["children"]);
|
|
88
|
-
(0, react_2.useEffect)(DatadogLogsInitializer_1.initDatadogLogs, []);
|
|
89
45
|
var RulesView = ((0, GameProviderProps_1.isGameViewProviderProps)(props) ? props.RulesView : props.Rules);
|
|
90
46
|
var gameViewProps = __assign(__assign({}, props), { RulesView: RulesView });
|
|
91
|
-
var store = (0, react_2.useMemo)(function () { return createGameStore(gameViewProps); }, [props, RulesView]);
|
|
92
47
|
var webP = (0, react_components_1.useWebP)();
|
|
93
48
|
var emotionCache = (0, react_2.useMemo)(function () { return (0, cache_1.default)({
|
|
94
49
|
key: 'css', stylisPlugins: (webP ? [webPReplace_1.default, stylis_1.prefixer] : [stylis_1.prefixer])
|
|
95
50
|
}); }, [webP]);
|
|
96
|
-
return ((0, jsx_runtime_1.jsx)(GameContext_1.
|
|
51
|
+
return ((0, jsx_runtime_1.jsx)(GameContext_1.gameContext.Provider, __assign({ value: gameViewProps }, { children: (0, jsx_runtime_1.jsx)(react_1.CacheProvider, __assign({ value: emotionCache }, { children: gameId ?
|
|
52
|
+
(0, jsx_runtime_1.jsx)(RemoteGameProvider_1.default, __assign({ gameId: gameId }, { children: children }), void 0) :
|
|
53
|
+
(0, jsx_runtime_1.jsx)(LocalGameProvider_1.default, { children: children }, void 0) }), void 0) }), void 0));
|
|
97
54
|
}
|
|
98
55
|
exports.default = GameProvider;
|
|
99
|
-
function createGameStore(props) {
|
|
100
|
-
var query = new URLSearchParams(window.location.search);
|
|
101
|
-
var gameId = query.get('game');
|
|
102
|
-
if (gameId) {
|
|
103
|
-
return createRemoteApiStore(props, gameId);
|
|
104
|
-
}
|
|
105
|
-
return createLocalApiStore(props);
|
|
106
|
-
}
|
|
107
|
-
function createRemoteApiStore(_a, gameId) {
|
|
108
|
-
var RulesView = _a.RulesView, animations = _a.animations, game = _a.game;
|
|
109
|
-
var api = new GameClientAPI_1.default(gameId);
|
|
110
|
-
var store = (0, redux_1.createStore)((0, gameReducer_1.default)(game, RulesView, animations), (0, redux_1.applyMiddleware)((0, gameMiddleware_1.default)(api)));
|
|
111
|
-
store.subscribe((0, AnimationsListenerCreator_1.createAnimationsListener)(store));
|
|
112
|
-
api.init(store.dispatch);
|
|
113
|
-
return store;
|
|
114
|
-
}
|
|
115
|
-
function createLocalApiStore(props) {
|
|
116
|
-
var robot = props.dummy || createDummy(props.Rules);
|
|
117
|
-
var api = new GameLocalAPI_1.default(props.game, props.Rules, props.RulesView, robot, props.optionsSpec, props.ai, props.tutorial);
|
|
118
|
-
var store = (0, redux_1.createStore)((0, gameReducer_1.default)(props.game, props.RulesView, props.animations), (0, redux_1.applyMiddleware)((0, gameMiddleware_1.default)(api)));
|
|
119
|
-
store.subscribe((0, AnimationsListenerCreator_1.createAnimationsListener)(store));
|
|
120
|
-
if (process.env.NODE_ENV === 'development') {
|
|
121
|
-
window.game = (0, ConsoleTools_1.default)(api, store);
|
|
122
|
-
}
|
|
123
|
-
api.init(store.dispatch);
|
|
124
|
-
return store;
|
|
125
|
-
}
|
|
126
|
-
function createDummy(Rules) {
|
|
127
|
-
var dummy = new rules_api_1.Dummy(Rules);
|
|
128
|
-
return function (state, playerId) { return dummy.getRandomMove(state, playerId); };
|
|
129
|
-
}
|
|
130
56
|
//# sourceMappingURL=GameProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GameProvider.js","sourceRoot":"","sources":["../../src/GameProvider/GameProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GameProvider.js","sourceRoot":"","sources":["../../src/GameProvider/GameProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yDAAwD;AACxD,wCAA4C;AAC5C,+DAAkD;AAElD,+BAA8D;AAC9D,iCAA+B;AAC/B,wFAAiE;AACjE,qFAA8D;AAC9D,4EAAiE;AACjE,oEAA6C;AAC7C,6CAAyC;AACzC,yDAAqG;AAErG,IAAM,KAAK,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;AACzD,IAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;AAEhC,IAAA,wCAAe,GAAE,CAAA;AAMjB,SAAwB,YAAY,CAClC,EAE6H;IAD3H,IAAA,QAAQ,cAAA,EAAK,KAAK,cADpB,YAEC,CADmB;IAGpB,IAAM,SAAS,GAAG,CAAC,IAAA,2CAAuB,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAgC,CAAA;IACjH,IAAM,aAAa,yBAAO,KAAK,KAAE,SAAS,WAAA,GAAC,CAAA;IAC3C,IAAM,IAAI,GAAG,IAAA,0BAAO,GAAE,CAAA;IACtB,IAAM,YAAY,GAAG,IAAA,eAAO,EAAC,cAAM,OAAA,IAAA,eAAW,EAAC;QAC7C,GAAG,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,qBAAW,EAAE,iBAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,iBAAQ,CAAC,CAAwB;KAChG,CAAC,EAFiC,CAEjC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;IACX,OAAO,CACL,uBAAC,yBAAW,CAAC,QAAQ,aAAC,KAAK,EAAE,aAAa,gBACxC,uBAAC,qBAAa,aAAC,KAAK,EAAE,YAAY,gBAC/B,MAAM,CAAC,CAAC;gBACP,uBAAC,4BAAkB,aAAC,MAAM,EAAE,MAAM,gBAAG,QAAQ,YAAsB,CAAC,CAAC;gBACrE,uBAAC,2BAAiB,cAAE,QAAQ,WAAqB,YAGrC,YACK,CACxB,CAAA;AACH,CAAC;AAtBD,+BAsBC"}
|
|
@@ -3,9 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
var GameProvider_1 = require("./GameProvider");
|
|
8
8
|
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(GameProvider_1).default; } });
|
|
9
|
-
var GameContext_1 = require("./GameContext");
|
|
10
|
-
Object.defineProperty(exports, "GameContext", { enumerable: true, get: function () { return __importDefault(GameContext_1).default; } });
|
|
11
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/GameProvider/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAsC;AAA9B,wHAAA,OAAO,OAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/GameProvider/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAsC;AAA9B,wHAAA,OAAO,OAAA"}
|
package/dist/Menu/Menu.js
CHANGED
|
@@ -35,7 +35,7 @@ var EjectPlayerDialog_1 = __importDefault(require("../EjectPlayer/EjectPlayerDia
|
|
|
35
35
|
var EjectPlayerPopButton_1 = __importDefault(require("../EjectPlayer/EjectPlayerPopButton"));
|
|
36
36
|
var FullscreenButton_1 = __importDefault(require("../Fullscreen/FullscreenButton"));
|
|
37
37
|
var FullscreenPopButton_1 = __importDefault(require("../Fullscreen/FullscreenPopButton"));
|
|
38
|
-
var
|
|
38
|
+
var GameContext_1 = require("../GameProvider/GameContext");
|
|
39
39
|
var GiveUpButton_1 = __importDefault(require("../GiveUp/GiveUpButton"));
|
|
40
40
|
var index_1 = require("../index");
|
|
41
41
|
var SoundButton_1 = __importDefault(require("../Sound/SoundButton"));
|
|
@@ -53,7 +53,7 @@ function Menu() {
|
|
|
53
53
|
var _a, _b;
|
|
54
54
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
55
55
|
var _c = (0, react_2.useState)(false), isOpen = _c[0], setOpen = _c[1];
|
|
56
|
-
var game = (_b = (_a = (0, react_2.useContext)(
|
|
56
|
+
var game = (_b = (_a = (0, react_2.useContext)(GameContext_1.gameContext)) === null || _a === void 0 ? void 0 : _a.game) !== null && _b !== void 0 ? _b : '';
|
|
57
57
|
var query = new URLSearchParams(window.location.search);
|
|
58
58
|
var gameId = query.get('game');
|
|
59
59
|
var locale = query.get('locale') || 'en';
|
package/dist/Menu/Menu.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../src/Menu/Menu.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,sCAAsC;AACtC,wCAA4C;AAC5C,0EAAsE;AACtE,oEAA8D;AAC9D,iDAA6C;AAC7C,oDAA6B;AAC7B,+BAA0C;AAC1C,+CAA4C;AAC5C,2CAAuC;AACvC,iDAA0B;AAC1B,uFAAgE;AAChE,uFAAgE;AAChE,6FAAsE;AACtE,oFAA6D;AAC7D,0FAAmE;AACnE,
|
|
1
|
+
{"version":3,"file":"Menu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free-solid-svg-icons");
|
|
|
20
20
|
var react_fontawesome_1 = require("@fortawesome/react-fontawesome");
|
|
21
21
|
var react_1 = require("react");
|
|
22
22
|
var react_i18next_1 = require("react-i18next");
|
|
23
|
-
var GameContext_1 =
|
|
23
|
+
var GameContext_1 = require("../GameProvider/GameContext");
|
|
24
24
|
var Menu_1 = require("../Menu");
|
|
25
25
|
var useSoundControls_1 = __importDefault(require("./useSoundControls"));
|
|
26
26
|
function SoundButton() {
|
|
27
27
|
var _a;
|
|
28
28
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
29
29
|
var _b = (0, useSoundControls_1.default)(), mute = _b.mute, unmute = _b.unmute, muted = _b.muted;
|
|
30
|
-
var hasSounds = (_a = (0, react_1.useContext)(GameContext_1.
|
|
30
|
+
var hasSounds = (_a = (0, react_1.useContext)(GameContext_1.gameContext)) === null || _a === void 0 ? void 0 : _a.hasSounds;
|
|
31
31
|
if (!hasSounds)
|
|
32
32
|
return null;
|
|
33
33
|
return ((0, jsx_runtime_1.jsxs)("button", __assign({ css: Menu_1.menuButtonCss, onClick: function () { return muted ? unmute() : mute(); } }, { children: [(0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: muted ? free_solid_svg_icons_1.faVolumeMute : free_solid_svg_icons_1.faVolumeUp }, void 0), muted ? t('Enable sound') : t('Mute sound')] }), void 0));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SoundButton.js","sourceRoot":"","sources":["../../src/Sound/SoundButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,sCAAsC;AACtC,0EAA0E;AAC1E,oEAA8D;AAC9D,+BAAgC;AAChC,+CAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"SoundButton.js","sourceRoot":"","sources":["../../src/Sound/SoundButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,sCAAsC;AACtC,0EAA0E;AAC1E,oEAA8D;AAC9D,+BAAgC;AAChC,+CAA4C;AAC5C,2DAAuD;AACvD,gCAAqC;AACrC,wEAAiD;AAEjD,SAAwB,WAAW;;IAC1B,IAAA,CAAC,GAAI,IAAA,8BAAc,GAAE,EAApB,CAAoB;IACtB,IAAA,KAAwB,IAAA,0BAAgB,GAAE,EAAzC,IAAI,UAAA,EAAE,MAAM,YAAA,EAAE,KAAK,WAAsB,CAAA;IAChD,IAAM,SAAS,GAAG,MAAA,IAAA,kBAAU,EAAC,yBAAW,CAAC,0CAAE,SAAS,CAAA;IACpD,IAAI,CAAC,SAAS;QAAE,OAAO,IAAI,CAAA;IAC3B,OAAO,CACL,6CAAQ,GAAG,EAAE,oBAAa,EAAE,OAAO,EAAE,cAAM,OAAA,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,EAAzB,CAAyB,iBAClE,uBAAC,mCAAe,IAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,mCAAY,CAAC,CAAC,CAAC,iCAAU,WAAG,EAC1D,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,aACrC,CACV,CAAA;AACH,CAAC;AAXD,8BAWC"}
|
package/dist/Sound/useSound.js
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
var react_1 = require("react");
|
|
7
4
|
var react_redux_1 = require("react-redux");
|
|
8
|
-
var GameContext_1 =
|
|
5
|
+
var GameContext_1 = require("../GameProvider/GameContext");
|
|
9
6
|
function useSound(src) {
|
|
10
|
-
var
|
|
7
|
+
var context = (0, react_1.useContext)(GameContext_1.gameContext);
|
|
11
8
|
var audio = (0, react_1.useState)(new Audio(src))[0];
|
|
12
9
|
audio.muted = (0, react_redux_1.useSelector)(function (state) { return state.soundsMuted; });
|
|
13
10
|
(0, react_1.useEffect)(function () {
|
|
14
|
-
if (
|
|
15
|
-
|
|
11
|
+
if (context) {
|
|
12
|
+
context.hasSounds = true;
|
|
16
13
|
}
|
|
17
|
-
}, [
|
|
14
|
+
}, [context]);
|
|
18
15
|
return audio;
|
|
19
16
|
}
|
|
20
17
|
exports.default = useSound;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSound.js","sourceRoot":"","sources":["../../src/Sound/useSound.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSound.js","sourceRoot":"","sources":["../../src/Sound/useSound.ts"],"names":[],"mappings":";;AAAA,+BAAqD;AACrD,2CAAuC;AACvC,2DAAuD;AAGvD,SAAwB,QAAQ,CAAC,GAAW;IAC1C,IAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,yBAAW,CAAC,CAAA;IAChC,IAAA,KAAK,GAAI,IAAA,gBAAQ,EAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,GAA5B,CAA4B;IACxC,KAAK,CAAC,KAAK,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAoB,IAAK,OAAA,KAAK,CAAC,WAAW,EAAjB,CAAiB,CAAC,CAAA;IACtE,IAAA,iBAAS,EAAC;QACR,IAAI,OAAO,EAAE;YACX,OAAO,CAAC,SAAS,GAAG,IAAI,CAAA;SACzB;IACH,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IACb,OAAO,KAAK,CAAA;AACd,CAAC;AAVD,2BAUC"}
|
|
@@ -10,9 +10,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
14
|
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
18
15
|
/** @jsxImportSource @emotion/react */
|
|
@@ -20,12 +17,12 @@ var free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
|
|
|
20
17
|
var react_fontawesome_1 = require("@fortawesome/react-fontawesome");
|
|
21
18
|
var react_1 = require("react");
|
|
22
19
|
var react_i18next_1 = require("react-i18next");
|
|
23
|
-
var GameContext_1 =
|
|
20
|
+
var GameContext_1 = require("../GameProvider/GameContext");
|
|
24
21
|
var Menu_1 = require("../Menu");
|
|
25
22
|
function RestartTutorialButton() {
|
|
26
23
|
var _a;
|
|
27
24
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
28
|
-
var game = (_a = (0, react_1.useContext)(GameContext_1.
|
|
25
|
+
var game = (_a = (0, react_1.useContext)(GameContext_1.gameContext)) === null || _a === void 0 ? void 0 : _a.game;
|
|
29
26
|
if (!game)
|
|
30
27
|
throw new Error('Cannot use TutorialButton outside a GameProvider context');
|
|
31
28
|
var onClick = function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RestartTutorialButton.js","sourceRoot":"","sources":["../../src/Tutorial/RestartTutorialButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RestartTutorialButton.js","sourceRoot":"","sources":["../../src/Tutorial/RestartTutorialButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,sCAAsC;AACtC,0EAAiE;AACjE,oEAA8D;AAC9D,+BAAgC;AAChC,+CAA4C;AAC5C,2DAAuD;AACvD,gCAAqC;AAErC,SAAwB,qBAAqB;;IACpC,IAAA,CAAC,GAAI,IAAA,8BAAc,GAAE,EAApB,CAAoB;IAC5B,IAAM,IAAI,GAAG,MAAA,IAAA,kBAAU,EAAC,yBAAW,CAAC,0CAAE,IAAI,CAAA;IAC1C,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAA;IAEtF,IAAM,OAAO,GAAG;QACd,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;QAC7B,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAA;IAC1B,CAAC,CAAA;IAED,OAAO,CACL,6CAAQ,GAAG,EAAE,oBAAa,EAAE,OAAO,EAAE,OAAO,iBAC1C,uBAAC,mCAAe,IAAC,IAAI,EAAE,sCAAe,WAAG,EACxC,CAAC,CAAC,sBAAsB,CAAC,aACnB,CACV,CAAA;AACH,CAAC;AAhBD,wCAgBC"}
|
package/dist/Types/GameData.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import GameMode from './GameMode';
|
|
2
2
|
import GameOptions from './GameOptions';
|
|
3
3
|
import Player from './Player';
|
|
4
|
-
declare type GameData<State, PlayerId> = {
|
|
4
|
+
declare type GameData<State = any, PlayerId = any> = {
|
|
5
5
|
players: Player<PlayerId>[];
|
|
6
6
|
options: GameOptions;
|
|
7
7
|
myPlayerId?: PlayerId;
|
package/dist/Undo/useUndo.js
CHANGED
|
@@ -8,7 +8,7 @@ var fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
|
|
|
8
8
|
var react_1 = require("react");
|
|
9
9
|
var react_redux_1 = require("react-redux");
|
|
10
10
|
var MoveUndone_1 = require("../Actions/MoveUndone");
|
|
11
|
-
var GameContext_1 =
|
|
11
|
+
var GameContext_1 = require("../GameProvider/GameContext");
|
|
12
12
|
var ArrayUtil_1 = require("../util/ArrayUtil");
|
|
13
13
|
function isUndoOptions(arg) {
|
|
14
14
|
if (typeof arg !== 'object')
|
|
@@ -19,7 +19,7 @@ function isUndoOptions(arg) {
|
|
|
19
19
|
function useUndo() {
|
|
20
20
|
var _a;
|
|
21
21
|
var state = (0, react_redux_1.useSelector)(function (state) { return state; });
|
|
22
|
-
var Game = (_a = (0, react_1.useContext)(GameContext_1.
|
|
22
|
+
var Game = (_a = (0, react_1.useContext)(GameContext_1.gameContext)) === null || _a === void 0 ? void 0 : _a.RulesView;
|
|
23
23
|
if (!Game)
|
|
24
24
|
throw new Error('Cannot useUndo outside a GameProvider');
|
|
25
25
|
var dispatch = (0, react_redux_1.useDispatch)();
|
package/dist/Undo/useUndo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUndo.js","sourceRoot":"","sources":["../../src/Undo/useUndo.ts"],"names":[],"mappings":";;;;;AAAA,iDAAuE;AACvE,oEAAmC;AACnC,+BAAgC;AAChC,2CAAoD;AACpD,oDAAgD;AAChD,
|
|
1
|
+
{"version":3,"file":"useUndo.js","sourceRoot":"","sources":["../../src/Undo/useUndo.ts"],"names":[],"mappings":";;;;;AAAA,iDAAuE;AACvE,oEAAmC;AACnC,+BAAgC;AAChC,2CAAoD;AACpD,oDAAgD;AAChD,2DAAuD;AAEvD,+CAA+C;AAK/C,SAAS,aAAa,CAAC,GAAQ;IAC7B,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IACzC,IAAI,gBAAgB,GAAG,MAAM,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAA;IACtD,OAAO,gBAAgB,CAAC,MAAM,KAAK,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,KAAK,SAAS,CAAA;AAC3E,CAAC;AAED,SAAwB,OAAO;;IAC7B,IAAM,KAAK,GAAG,IAAA,yBAAW,EAA6E,UAAA,KAAK,IAAI,OAAA,KAAK,EAAL,CAAK,CAAC,CAAA;IACrH,IAAM,IAAI,GAAG,MAAA,IAAA,kBAAU,EAAC,yBAAW,CAAC,0CAAE,SAAS,CAAA;IAC/C,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;IACnE,IAAM,QAAQ,GAAG,IAAA,yBAAW,GAAE,CAAA;IAC9B,OAAO,CAAC,UAAC,GAAwB,EAAE,OAAqB;YACtD,IAAI,aAAa,CAAC,GAAG,CAAC,EAAE;gBACtB,QAAQ,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|
import RematchNotification from '../../Types/RematchNotification';
|
|
3
3
|
import GameAPI from '../GameAPI';
|
|
4
4
|
export declare const AVATAR_INFO: import("@apollo/client").DocumentNode;
|
|
5
|
+
export declare const PLAYERS_TIME: import("@apollo/client").DocumentNode;
|
|
6
|
+
export declare const NOTIFICATIONS: import("@apollo/client").DocumentNode;
|
|
5
7
|
export declare const GET_MESSAGE_AUTHOR: import("@apollo/client").DocumentNode;
|
|
6
|
-
export default class GameClientAPI<
|
|
8
|
+
export default class GameClientAPI<Move = any, PlayerId = any> implements GameAPI<Move, PlayerId> {
|
|
7
9
|
private dispatch?;
|
|
8
10
|
private readonly gameId;
|
|
9
|
-
private notificationsChannel?;
|
|
10
11
|
private ongoingAction?;
|
|
11
12
|
private pendingActions;
|
|
12
|
-
private nextNotificationIndex;
|
|
13
13
|
private readonly apolloClient;
|
|
14
|
-
private readonly pusher;
|
|
15
14
|
constructor(gameId: string);
|
|
16
15
|
init(dispatch: Dispatch): Promise<void>;
|
|
17
16
|
play(move: Move): void;
|
|
@@ -43,38 +43,27 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
43
43
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
44
44
|
};
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.GET_MESSAGE_AUTHOR = exports.AVATAR_INFO = void 0;
|
|
46
|
+
exports.GET_MESSAGE_AUTHOR = exports.NOTIFICATIONS = exports.PLAYERS_TIME = exports.AVATAR_INFO = void 0;
|
|
47
47
|
var client_1 = require("@apollo/client");
|
|
48
48
|
var error_1 = require("@apollo/client/link/error");
|
|
49
|
-
var pusher_js_1 = __importDefault(require("pusher-js"));
|
|
50
49
|
var ActionFailed_1 = require("../../Actions/ActionFailed");
|
|
51
50
|
var GameNotificationsReceived_1 = require("../../Actions/GameNotificationsReceived");
|
|
52
|
-
var GameOver_1 = require("../../Actions/GameOver");
|
|
53
|
-
var GameStateLoaded_1 = require("../../Actions/GameStateLoaded");
|
|
54
51
|
var Failure_1 = __importDefault(require("../../Failure"));
|
|
55
52
|
var index_1 = require("../../index");
|
|
56
|
-
pusher_js_1.default.Runtime.createXHR = function () {
|
|
57
|
-
var xhr = new XMLHttpRequest();
|
|
58
|
-
xhr.withCredentials = true;
|
|
59
|
-
return xhr;
|
|
60
|
-
};
|
|
61
53
|
exports.AVATAR_INFO = (0, client_1.gql)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["fragment AvatarInfo on Avataaar {accessoriesType clotheColor clotheType eyeType eyebrowType facialHairType facialHairColor graphicType hairColor mouthType skinColor topType}"], ["fragment AvatarInfo on Avataaar {accessoriesType clotheColor clotheType eyeType eyebrowType facialHairType facialHairColor graphicType hairColor mouthType skinColor topType}"])));
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
var
|
|
65
|
-
var
|
|
66
|
-
var
|
|
67
|
-
var
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
var GIVE_UP = (0, client_1.gql)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["mutation GiveUp($gameId: String!) { giveUp(gameId: $gameId) { notifications { ...Notifications } index players { id ...PlayerTime } date } } ", " ", ""], ["mutation GiveUp($gameId: String!) { giveUp(gameId: $gameId) { notifications { ...Notifications } index players { id ...PlayerTime } date } } ", " ", ""])), NOTIFICATIONS, PLAYERS_TIME);
|
|
71
|
-
exports.GET_MESSAGE_AUTHOR = (0, client_1.gql)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n query GetMessageAuthor($id: String!) {\n user(id: $id) {\n id name avatar {...AvatarInfo}\n }\n } ", "\n"], ["\n query GetMessageAuthor($id: String!) {\n user(id: $id) {\n id name avatar {...AvatarInfo}\n }\n } ", "\n"])), exports.AVATAR_INFO);
|
|
54
|
+
exports.PLAYERS_TIME = (0, client_1.gql)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["fragment PlayerTime on Player { time { availableTime cumulatedDownTime cumulatedPlayTime cumulatedWaitForMeTime highestDownTime highestPlayTime lastChange playing weightedWaitForMeTime } }"], ["fragment PlayerTime on Player { time { availableTime cumulatedDownTime cumulatedPlayTime cumulatedWaitForMeTime highestDownTime highestPlayTime lastChange playing weightedWaitForMeTime } }"])));
|
|
55
|
+
exports.NOTIFICATIONS = (0, client_1.gql)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["fragment Notifications on GameNotification { playerId ... on MovePlayedNotification { moveView consequences } ... on MoveUndoneNotification { moveUndone } ...on RematchNotification { rematchId } }"], ["fragment Notifications on GameNotification { playerId ... on MovePlayedNotification { moveView consequences } ... on MoveUndoneNotification { moveUndone } ...on RematchNotification { rematchId } }"])));
|
|
56
|
+
var PLAY = (0, client_1.gql)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["mutation PlayMoves($gameId: String!, $moves: [JSON!]!) { playMoves(gameId: $gameId, moves: $moves) { notifications { ...Notifications } index players { id ...PlayerTime } date } } ", " ", ""], ["mutation PlayMoves($gameId: String!, $moves: [JSON!]!) { playMoves(gameId: $gameId, moves: $moves) { notifications { ...Notifications } index players { id ...PlayerTime } date } } ", " ", ""])), exports.NOTIFICATIONS, exports.PLAYERS_TIME);
|
|
57
|
+
var UNDO = (0, client_1.gql)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["mutation UndoLastMove($gameId: String!, $playerActionsIndexes: [Int!]!) { undoMoves(gameId: $gameId, playerActionsIndexes: $playerActionsIndexes) { notifications { ...Notifications } index players { id ...PlayerTime } date } } ", " ", ""], ["mutation UndoLastMove($gameId: String!, $playerActionsIndexes: [Int!]!) { undoMoves(gameId: $gameId, playerActionsIndexes: $playerActionsIndexes) { notifications { ...Notifications } index players { id ...PlayerTime } date } } ", " ", ""])), exports.NOTIFICATIONS, exports.PLAYERS_TIME);
|
|
58
|
+
var REMATCH = (0, client_1.gql)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["mutation Rematch($gameId: String!) { rematch(gameId: $gameId) { notifications { ...Notifications } index players { id ...PlayerTime } date } } ", " ", ""], ["mutation Rematch($gameId: String!) { rematch(gameId: $gameId) { notifications { ...Notifications } index players { id ...PlayerTime } date } } ", " ", ""])), exports.NOTIFICATIONS, exports.PLAYERS_TIME);
|
|
59
|
+
var EJECT_PLAYER = (0, client_1.gql)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["mutation EjectPlayer($gameId: String!, $playerId: JSON!) { ejectPlayer(gameId: $gameId, playerId: $playerId) { notifications { ...Notifications } index players { id ...PlayerTime } date } } ", " ", ""], ["mutation EjectPlayer($gameId: String!, $playerId: JSON!) { ejectPlayer(gameId: $gameId, playerId: $playerId) { notifications { ...Notifications } index players { id ...PlayerTime } date } } ", " ", ""])), exports.NOTIFICATIONS, exports.PLAYERS_TIME);
|
|
60
|
+
var GIVE_UP = (0, client_1.gql)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["mutation GiveUp($gameId: String!) { giveUp(gameId: $gameId) { notifications { ...Notifications } index players { id ...PlayerTime } date } } ", " ", ""], ["mutation GiveUp($gameId: String!) { giveUp(gameId: $gameId) { notifications { ...Notifications } index players { id ...PlayerTime } date } } ", " ", ""])), exports.NOTIFICATIONS, exports.PLAYERS_TIME);
|
|
61
|
+
exports.GET_MESSAGE_AUTHOR = (0, client_1.gql)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n query GetMessageAuthor($id: String!) {\n user(id: $id) {\n id name avatar {...AvatarInfo}\n }\n } ", "\n"], ["\n query GetMessageAuthor($id: String!) {\n user(id: $id) {\n id name avatar {...AvatarInfo}\n }\n } ", "\n"])), exports.AVATAR_INFO);
|
|
72
62
|
var GameClientAPI = /** @class */ (function () {
|
|
73
63
|
function GameClientAPI(gameId) {
|
|
74
64
|
var _this = this;
|
|
75
|
-
var _a
|
|
65
|
+
var _a;
|
|
76
66
|
this.pendingActions = [];
|
|
77
|
-
this.nextNotificationIndex = 0;
|
|
78
67
|
this.errorLink = (0, error_1.onError)(function (_a) {
|
|
79
68
|
var graphQLErrors = _a.graphQLErrors, networkError = _a.networkError;
|
|
80
69
|
if (graphQLErrors) {
|
|
@@ -103,71 +92,12 @@ var GameClientAPI = /** @class */ (function () {
|
|
|
103
92
|
}
|
|
104
93
|
}
|
|
105
94
|
});
|
|
106
|
-
var authEndpoint = index_1.PLATFORM_URI + ((_b = process.env.REACT_APP_PUSHER_ENDPOINT) !== null && _b !== void 0 ? _b : '/api/pusher/auth');
|
|
107
|
-
this.pusher = new pusher_js_1.default((_c = process.env.REACT_APP_PUSHER_KEY) !== null && _c !== void 0 ? _c : '747557f1e8edf7fc2816', {
|
|
108
|
-
cluster: (_d = process.env.REACT_APP_PUSHER_CLUSTER) !== null && _d !== void 0 ? _d : 'eu',
|
|
109
|
-
authEndpoint: authEndpoint,
|
|
110
|
-
forceTLS: true
|
|
111
|
-
});
|
|
112
95
|
}
|
|
113
96
|
GameClientAPI.prototype.init = function (dispatch) {
|
|
114
|
-
var _a;
|
|
115
97
|
return __awaiter(this, void 0, void 0, function () {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
switch (_b.label) {
|
|
120
|
-
case 0:
|
|
121
|
-
this.dispatch = dispatch;
|
|
122
|
-
return [4 /*yield*/, this.apolloClient.query({ query: GET_GAME, variables: { id: this.gameId } })];
|
|
123
|
-
case 1:
|
|
124
|
-
gameResponse = _b.sent();
|
|
125
|
-
if (!gameResponse.data) {
|
|
126
|
-
return [2 /*return*/, console.error('Failed to collect game data')];
|
|
127
|
-
}
|
|
128
|
-
gameData = gameResponse.data.game;
|
|
129
|
-
this.dispatch((0, GameStateLoaded_1.gameStateLoaded)(gameData, gameResponse.data.time));
|
|
130
|
-
this.notificationsChannel = this.pusher.subscribe((_a = gameData.notificationsChannel) !== null && _a !== void 0 ? _a : "game=" + this.gameId);
|
|
131
|
-
this.notificationsChannel.bind('pusher:subscription_error', function (error) { return __awaiter(_this, void 0, void 0, function () {
|
|
132
|
-
return __generator(this, function (_a) {
|
|
133
|
-
console.error('pusher subscription failed', error);
|
|
134
|
-
return [2 /*return*/];
|
|
135
|
-
});
|
|
136
|
-
}); });
|
|
137
|
-
this.notificationsChannel.bind('pusher:subscription_succeeded', function () { return __awaiter(_this, void 0, void 0, function () {
|
|
138
|
-
var start, notificationsResponse, notifications;
|
|
139
|
-
return __generator(this, function (_a) {
|
|
140
|
-
switch (_a.label) {
|
|
141
|
-
case 0:
|
|
142
|
-
start = this.nextNotificationIndex;
|
|
143
|
-
return [4 /*yield*/, this.apolloClient.query({
|
|
144
|
-
query: GET_NOTIFICATIONS,
|
|
145
|
-
variables: { gameId: this.gameId, start: start }
|
|
146
|
-
})];
|
|
147
|
-
case 1:
|
|
148
|
-
notificationsResponse = _a.sent();
|
|
149
|
-
if (!notificationsResponse.data) {
|
|
150
|
-
return [2 /*return*/, console.error('Failed to collect game data')];
|
|
151
|
-
}
|
|
152
|
-
notifications = notificationsResponse.data.gameNotifications;
|
|
153
|
-
this.dispatch((0, GameNotificationsReceived_1.gameNotificationsReceived)(notifications, start, notificationsResponse.data.game.players, notificationsResponse.data.time));
|
|
154
|
-
if (notifications.length > 0) {
|
|
155
|
-
this.nextNotificationIndex = Math.max(this.nextNotificationIndex, start + notifications.length);
|
|
156
|
-
}
|
|
157
|
-
return [2 /*return*/];
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
}); });
|
|
161
|
-
this.notificationsChannel.bind('moves-played', function (_a) {
|
|
162
|
-
var index = _a.index, notifications = _a.notifications, players = _a.players, date = _a.date;
|
|
163
|
-
_this.dispatch((0, GameNotificationsReceived_1.gameNotificationsReceived)(notifications, index, players, Date.parse(date)));
|
|
164
|
-
_this.nextNotificationIndex = Math.max(_this.nextNotificationIndex, index + notifications.length);
|
|
165
|
-
});
|
|
166
|
-
this.notificationsChannel.bind('game-over', function (players) {
|
|
167
|
-
_this.dispatch((0, GameOver_1.gameOver)(players));
|
|
168
|
-
});
|
|
169
|
-
return [2 /*return*/];
|
|
170
|
-
}
|
|
98
|
+
return __generator(this, function (_a) {
|
|
99
|
+
this.dispatch = dispatch;
|
|
100
|
+
return [2 /*return*/];
|
|
171
101
|
});
|
|
172
102
|
});
|
|
173
103
|
};
|
|
@@ -263,5 +193,5 @@ var GameClientAPI = /** @class */ (function () {
|
|
|
263
193
|
return GameClientAPI;
|
|
264
194
|
}());
|
|
265
195
|
exports.default = GameClientAPI;
|
|
266
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9
|
|
196
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
|
|
267
197
|
//# sourceMappingURL=GameClientAPI.js.map
|