@gamepark/react-game 6.31.4 → 6.32.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/components/GameProvider/GameContext.d.ts +2 -1
- package/dist/components/GameProvider/GameContext.js.map +1 -1
- package/dist/components/Scoring/ScoringDescription.d.ts +8 -0
- package/dist/components/Scoring/ScoringDescription.js +3 -0
- package/dist/components/Scoring/ScoringDescription.js.map +1 -0
- package/dist/components/Scoring/index.d.ts +1 -0
- package/dist/components/Scoring/index.js +18 -0
- package/dist/components/Scoring/index.js.map +1 -0
- package/dist/components/dialogs/ResultDialog/useScoringTable.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Animations,
|
|
1
|
+
import { Animations, TutorialDescription } from '@gamepark/react-client';
|
|
2
2
|
import { RulesCreator } from '@gamepark/rules-api';
|
|
3
3
|
import React, { ComponentType } from 'react';
|
|
4
4
|
import { ItemLocatorRecord } from '../../locators';
|
|
5
5
|
import { LogDescription } from '../Log';
|
|
6
6
|
import { MaterialDescriptionRecord } from '../material';
|
|
7
|
+
import { ScoringDescription } from '../Scoring';
|
|
7
8
|
export type GameContext<Game = any, Move = any, PlayerId extends number = number, MaterialType extends number = number, LocationType extends number = number> = {
|
|
8
9
|
game: string;
|
|
9
10
|
Rules: RulesCreator<Game, Move, PlayerId>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GameContext.js","sourceRoot":"","sources":["../../../src/components/GameProvider/GameContext.ts"],"names":[],"mappings":";;;;;;AAEA,gDAA4C;
|
|
1
|
+
{"version":3,"file":"GameContext.js","sourceRoot":"","sources":["../../../src/components/GameProvider/GameContext.ts"],"names":[],"mappings":";;;;;;AAEA,gDAA4C;AA2B5C;IACE;QACE,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAA;IACxC,CAAC;IACH,mBAAC;AAAD,CAAC,AAJD,IAIC;AAED,aAAa;AACb,IAAM,cAAc,GAAgB,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,CAAA;AAExD,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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Rules } from '@gamepark/rules-api';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
export type ScoringValue = string | number | ReactElement;
|
|
4
|
+
export interface ScoringDescription<Player extends number = number, GameRule extends Rules = Rules, Key = any> {
|
|
5
|
+
getScoringKeys(rules: GameRule): Key[];
|
|
6
|
+
getScoringHeader(key: Key, rules: GameRule): ScoringValue;
|
|
7
|
+
getScoringPlayerData(key: Key, player: Player, rules: GameRule): ScoringValue | null;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScoringDescription.js","sourceRoot":"","sources":["../../../src/components/Scoring/ScoringDescription.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ScoringDescription';
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./ScoringDescription"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Scoring/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScoringTable.js","sourceRoot":"","sources":["../../../../src/components/dialogs/ResultDialog/useScoringTable.tsx"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"useScoringTable.js","sourceRoot":"","sources":["../../../../src/components/dialogs/ResultDialog/useScoringTable.tsx"],"names":[],"mappings":";;;;AAAA,+BAA2C;AAC3C,wCAAyC;AACzC,mDAAgD;AAGzC,IAAM,gBAAgB,GAAG;IAC9B,IAAM,KAAK,GAAG,IAAA,gBAAQ,GAAE,CAAA;IACxB,IAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,0BAAW,CAAC,CAAA;IACvC,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;IAC/B,OAAO,IAAA,eAAO,EAAC;;QACb,IAAI,CAAC,KAAK,IAAI,CAAC,OAAO;YAAE,OAAO,EAAE,CAAA;QACjC,IAAM,IAAI,GAAG,MAAA,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,mCAAI,EAAE,CAAA;QAChD,OAAO,IAAI;aACR,GAAG,CAAC,UAAC,GAAG,IAAK,OAAA,OAAO,CAAC,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,EAApC,CAAoC,CAAC;aAClD,GAAG,CAAC,eAAe,CAAC,CAAA;IACzB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAA;AACtB,CAAC,CAAA;AAXY,QAAA,gBAAgB,oBAW5B;AAEM,IAAM,gBAAgB,GAAG,UAAC,QAAgB;IAC/C,IAAM,KAAK,GAAG,IAAA,gBAAQ,GAAE,CAAA;IACxB,IAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,0BAAW,CAAC,CAAA;IACvC,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;IAC/B,OAAO,IAAA,eAAO,EAAC;;QACb,IAAI,CAAC,KAAK,IAAI,CAAC,OAAO;YAAE,OAAO,EAAE,CAAA;QACjC,IAAM,IAAI,GAAG,MAAA,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,mCAAI,EAAE,CAAA;QAChD,OAAO,IAAI;aACR,GAAG,CAAC,UAAC,GAAG,IAAK,OAAA,OAAO,CAAC,oBAAoB,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAlD,CAAkD,CAAC;aAChE,GAAG,CAAC,eAAe,CAAC,CAAA;IACzB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAA;AAEtB,CAAC,CAAA;AAZY,QAAA,gBAAgB,oBAY5B;AAED,IAAM,eAAe,GAAG,UAAC,OAA4B;IACnD,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,OAAO,2DAAG,OAAO,GAAI,CAAA;IACrF,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
|
package/dist/components/index.js
CHANGED
|
@@ -27,6 +27,7 @@ __exportStar(require("./menus"), exports);
|
|
|
27
27
|
__exportStar(require("./Picture"), exports);
|
|
28
28
|
__exportStar(require("./PlayerPanel"), exports);
|
|
29
29
|
__exportStar(require("./PlayerTimer"), exports);
|
|
30
|
+
__exportStar(require("./Scoring"), exports);
|
|
30
31
|
__exportStar(require("./tutorial"), exports);
|
|
31
32
|
__exportStar(require("./Avatar"), exports);
|
|
32
33
|
__exportStar(require("./Log"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,4CAAyB;AACzB,iDAA8B;AAC9B,2CAAwB;AACxB,iDAA8B;AAC9B,gDAA6B;AAC7B,8CAA2B;AAC3B,kDAA+B;AAC/B,6CAA0B;AAC1B,0CAAuB;AACvB,4CAAyB;AACzB,gDAA6B;AAC7B,gDAA6B;AAC7B,6CAA0B;AAC1B,2CAAwB;AACxB,wCAAqB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,4CAAyB;AACzB,iDAA8B;AAC9B,2CAAwB;AACxB,iDAA8B;AAC9B,gDAA6B;AAC7B,8CAA2B;AAC3B,kDAA+B;AAC/B,6CAA0B;AAC1B,0CAAuB;AACvB,4CAAyB;AACzB,gDAA6B;AAC7B,gDAA6B;AAC7B,4CAAyB;AACzB,6CAA0B;AAC1B,2CAAwB;AACxB,wCAAqB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamepark/react-game",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.32.0",
|
|
4
4
|
"description": "React components & tools to create a Board Game user interface for Game Park",
|
|
5
5
|
"author": "Romain Fromi <romain@game-park.com> (https://game-park.com/)",
|
|
6
6
|
"license": "ISC",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"@fortawesome/free-solid-svg-icons": "^6.6.0",
|
|
28
28
|
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
29
29
|
"@gamepark/avataaars": "~2.2.0",
|
|
30
|
-
"@gamepark/react-client": "~6.
|
|
31
|
-
"@gamepark/rules-api": "~6.
|
|
30
|
+
"@gamepark/react-client": "~6.32.0",
|
|
31
|
+
"@gamepark/rules-api": "~6.32.0",
|
|
32
32
|
"dayjs": "^1.11.7",
|
|
33
33
|
"emotion-normalize": "^11.0.1",
|
|
34
34
|
"fscreen": "^1.2.0",
|