@gamepark/react-game 6.35.7 → 6.36.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/material/FlatMaterial/PolyhexDescription.d.ts +15 -8
- package/dist/components/material/FlatMaterial/PolyhexDescription.js +16 -4
- package/dist/components/material/FlatMaterial/PolyhexDescription.js.map +1 -1
- package/dist/locators/HexagonalGridLocator.d.ts +13 -15
- package/dist/locators/HexagonalGridLocator.js +79 -44
- package/dist/locators/HexagonalGridLocator.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MaterialItem, Polyhex } from '@gamepark/rules-api';
|
|
2
2
|
import { ItemContext } from '../../../locators';
|
|
3
3
|
import { ComponentDescription } from '../ComponentDescription';
|
|
4
4
|
import { FlatMaterialDescription } from './FlatMaterial';
|
|
5
|
-
export declare abstract class PolyhexDescription<P extends number = number, M extends number = number, L extends number = number, ItemId = any> extends FlatMaterialDescription<P, M, L, ItemId> {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
export declare abstract class PolyhexDescription<P extends number = number, M extends number = number, L extends number = number, ItemId = any, T = any> extends FlatMaterialDescription<P, M, L, ItemId> {
|
|
6
|
+
/**
|
|
7
|
+
* The shape of the polyhex (use getPolyhexShape if it varies depending on the item)
|
|
8
|
+
* IMPORTANT: all falsy values (0, null...) are considered as blank hex.
|
|
9
|
+
*/
|
|
10
|
+
polyhex: Polyhex<T>;
|
|
11
|
+
/**
|
|
12
|
+
* This function must return the shape of the polyhex, as a Matrix.
|
|
13
|
+
* IMPORTANT: all falsy values (0, null...) are considered as blank hex.
|
|
14
|
+
* @param _item Item
|
|
15
|
+
* @param _context Context of the item
|
|
16
|
+
* @returns Matrix representing the polyhex. Falsy values will be considered are blank spots
|
|
17
|
+
*/
|
|
18
|
+
getPolyhex(_item: MaterialItem<P, L, ItemId>, _context: ItemContext<P, M, L>): Polyhex<T>;
|
|
12
19
|
}
|
|
13
20
|
export declare function isPolyhexDescription<P extends number = number, M extends number = number, L extends number = number, ItemId = any>(description: ComponentDescription<ItemId>): description is PolyhexDescription<P, M, L, ItemId>;
|
|
@@ -16,22 +16,34 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
16
16
|
})();
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.isPolyhexDescription = exports.PolyhexDescription = void 0;
|
|
19
|
+
var rules_api_1 = require("@gamepark/rules-api");
|
|
19
20
|
var FlatMaterial_1 = require("./FlatMaterial");
|
|
20
21
|
var PolyhexDescription = /** @class */ (function (_super) {
|
|
21
22
|
__extends(PolyhexDescription, _super);
|
|
22
23
|
function PolyhexDescription() {
|
|
23
24
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
-
|
|
25
|
+
/**
|
|
26
|
+
* The shape of the polyhex (use getPolyhexShape if it varies depending on the item)
|
|
27
|
+
* IMPORTANT: all falsy values (0, null...) are considered as blank hex.
|
|
28
|
+
*/
|
|
29
|
+
_this.polyhex = new rules_api_1.Polyhex([]);
|
|
25
30
|
return _this;
|
|
26
31
|
}
|
|
27
|
-
|
|
28
|
-
|
|
32
|
+
/**
|
|
33
|
+
* This function must return the shape of the polyhex, as a Matrix.
|
|
34
|
+
* IMPORTANT: all falsy values (0, null...) are considered as blank hex.
|
|
35
|
+
* @param _item Item
|
|
36
|
+
* @param _context Context of the item
|
|
37
|
+
* @returns Matrix representing the polyhex. Falsy values will be considered are blank spots
|
|
38
|
+
*/
|
|
39
|
+
PolyhexDescription.prototype.getPolyhex = function (_item, _context) {
|
|
40
|
+
return this.polyhex;
|
|
29
41
|
};
|
|
30
42
|
return PolyhexDescription;
|
|
31
43
|
}(FlatMaterial_1.FlatMaterialDescription));
|
|
32
44
|
exports.PolyhexDescription = PolyhexDescription;
|
|
33
45
|
function isPolyhexDescription(description) {
|
|
34
|
-
return typeof description.
|
|
46
|
+
return typeof description.getPolyhex === 'function';
|
|
35
47
|
}
|
|
36
48
|
exports.isPolyhexDescription = isPolyhexDescription;
|
|
37
49
|
//# sourceMappingURL=PolyhexDescription.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PolyhexDescription.js","sourceRoot":"","sources":["../../../../src/components/material/FlatMaterial/PolyhexDescription.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"PolyhexDescription.js","sourceRoot":"","sources":["../../../../src/components/material/FlatMaterial/PolyhexDescription.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,iDAA2D;AAG3D,+CAAwD;AAExD;IACU,sCAAwC;IADlD;QAAA,qEAmBC;QAhBC;;;WAGG;QACH,aAAO,GAAe,IAAI,mBAAO,CAAI,EAAE,CAAC,CAAA;;IAY1C,CAAC;IAVC;;;;;;OAMG;IACH,uCAAU,GAAV,UAAW,KAAiC,EAAE,QAA8B;QAC1E,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;IACH,yBAAC;AAAD,CAAC,AAnBD,CACU,sCAAuB,GAkBhC;AAnBqB,gDAAkB;AAqBxC,SAAgB,oBAAoB,CAClC,WAAyC;IAEzC,OAAO,OAAQ,WAAkC,CAAC,UAAU,KAAK,UAAU,CAAA;AAC7E,CAAC;AAJD,oDAIC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Coordinates,
|
|
1
|
+
import { Coordinates, HexGridSystem, Location, MaterialItem, MoveItem, Polyhex, XYCoordinates } from '@gamepark/rules-api';
|
|
2
2
|
import { LocationDescription } from '../components';
|
|
3
3
|
import { ItemContext, Locator, MaterialContext } from './Locator';
|
|
4
4
|
/**
|
|
5
5
|
* This locator is responsible for placing locations and items on a hexagonal grid.
|
|
6
6
|
*/
|
|
7
|
-
export declare abstract class HexagonalGridLocator<P extends number = number, M extends number = number, L extends number = number> extends Locator<P, M, L> {
|
|
7
|
+
export declare abstract class HexagonalGridLocator<P extends number = number, M extends number = number, L extends number = number, T = any> extends Locator<P, M, L> {
|
|
8
8
|
/**
|
|
9
9
|
* The coordinates system used by the location and items to place
|
|
10
10
|
*/
|
|
@@ -23,24 +23,16 @@ export declare abstract class HexagonalGridLocator<P extends number = number, M
|
|
|
23
23
|
*/
|
|
24
24
|
protected get sizeY(): number;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
27
|
-
* Define the boundaries to get the drop area automatically sized and centered.
|
|
26
|
+
* Polyhex of the drop area
|
|
28
27
|
*/
|
|
29
|
-
|
|
28
|
+
dropArea?: Polyhex<T>;
|
|
30
29
|
/**
|
|
31
|
-
* Override if you need dynamic
|
|
30
|
+
* Override if you need a dynamic drop area
|
|
32
31
|
* @param _location The location to consider
|
|
33
32
|
* @param _context Context of the game
|
|
34
|
-
* @return current
|
|
33
|
+
* @return the current drop area
|
|
35
34
|
*/
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Based on the coordinates of each hexagon in an area, return the delta coordinates to place the area properly
|
|
39
|
-
* @param areaCoordinates Coordinates of each hexagon composing the area
|
|
40
|
-
* @param coordinatesSystem System of coordinates to consider
|
|
41
|
-
* @return delta x and y to apply to the position of the area
|
|
42
|
-
*/
|
|
43
|
-
getAreaDelta(areaCoordinates: XYCoordinates[], coordinatesSystem?: HexGridSystem): XYCoordinates;
|
|
35
|
+
getDropArea(_location: Location<P, L>, _context: MaterialContext<P, M, L>): Polyhex<T> | undefined;
|
|
44
36
|
/**
|
|
45
37
|
* Get the coordinates for the full grid area
|
|
46
38
|
* @param location Location to place
|
|
@@ -86,4 +78,10 @@ export declare abstract class HexagonalGridLocator<P extends number = number, M
|
|
|
86
78
|
* Generate automatically a {@link HexGridDropAreaDescription} based on the grid boundaries
|
|
87
79
|
*/
|
|
88
80
|
getLocationDescription(location: Location<P, L>, context: MaterialContext<P, M, L> | ItemContext<P, M, L>): LocationDescription<P, M, L> | undefined;
|
|
81
|
+
getBoundaries(polyhex: Polyhex<T>): {
|
|
82
|
+
xMin: number;
|
|
83
|
+
xMax: number;
|
|
84
|
+
yMin: number;
|
|
85
|
+
yMax: number;
|
|
86
|
+
};
|
|
89
87
|
}
|
|
@@ -14,6 +14,31 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
18
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
19
|
+
if (!m) return o;
|
|
20
|
+
var i = m.call(o), r, ar = [], e;
|
|
21
|
+
try {
|
|
22
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
23
|
+
}
|
|
24
|
+
catch (error) { e = { error: error }; }
|
|
25
|
+
finally {
|
|
26
|
+
try {
|
|
27
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
28
|
+
}
|
|
29
|
+
finally { if (e) throw e.error; }
|
|
30
|
+
}
|
|
31
|
+
return ar;
|
|
32
|
+
};
|
|
33
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
34
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
35
|
+
if (ar || !(i in from)) {
|
|
36
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
37
|
+
ar[i] = from[i];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
41
|
+
};
|
|
17
42
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
43
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
44
|
};
|
|
@@ -21,10 +46,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
21
46
|
exports.HexagonalGridLocator = void 0;
|
|
22
47
|
var rules_api_1 = require("@gamepark/rules-api");
|
|
23
48
|
var isEqual_1 = __importDefault(require("lodash/isEqual"));
|
|
24
|
-
var maxBy_1 = __importDefault(require("lodash/maxBy"));
|
|
25
|
-
var minBy_1 = __importDefault(require("lodash/minBy"));
|
|
26
49
|
var omit_1 = __importDefault(require("lodash/omit"));
|
|
27
|
-
var range_1 = __importDefault(require("lodash/range"));
|
|
28
50
|
var uniqWith_1 = __importDefault(require("lodash/uniqWith"));
|
|
29
51
|
var components_1 = require("../components");
|
|
30
52
|
var Locator_1 = require("./Locator");
|
|
@@ -35,11 +57,6 @@ var HexagonalGridLocator = /** @class */ (function (_super) {
|
|
|
35
57
|
__extends(HexagonalGridLocator, _super);
|
|
36
58
|
function HexagonalGridLocator() {
|
|
37
59
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
38
|
-
/**
|
|
39
|
-
* The min and max X and Y coordinates of the grid, if any.
|
|
40
|
-
* Define the boundaries to get the drop area automatically sized and centered.
|
|
41
|
-
*/
|
|
42
|
-
_this.boundaries = {};
|
|
43
60
|
_this.dropPreview = true;
|
|
44
61
|
return _this;
|
|
45
62
|
}
|
|
@@ -64,30 +81,13 @@ var HexagonalGridLocator = /** @class */ (function (_super) {
|
|
|
64
81
|
configurable: true
|
|
65
82
|
});
|
|
66
83
|
/**
|
|
67
|
-
* Override if you need dynamic
|
|
84
|
+
* Override if you need a dynamic drop area
|
|
68
85
|
* @param _location The location to consider
|
|
69
86
|
* @param _context Context of the game
|
|
70
|
-
* @return current
|
|
87
|
+
* @return the current drop area
|
|
71
88
|
*/
|
|
72
|
-
HexagonalGridLocator.prototype.
|
|
73
|
-
return this.
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* Based on the coordinates of each hexagon in an area, return the delta coordinates to place the area properly
|
|
77
|
-
* @param areaCoordinates Coordinates of each hexagon composing the area
|
|
78
|
-
* @param coordinatesSystem System of coordinates to consider
|
|
79
|
-
* @return delta x and y to apply to the position of the area
|
|
80
|
-
*/
|
|
81
|
-
HexagonalGridLocator.prototype.getAreaDelta = function (areaCoordinates, coordinatesSystem) {
|
|
82
|
-
var _this = this;
|
|
83
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
84
|
-
if (coordinatesSystem === void 0) { coordinatesSystem = this.coordinatesSystem; }
|
|
85
|
-
var areaDeltaCoordinates = areaCoordinates.map(function (coordinates) { return _this.getHexagonPosition(coordinates, coordinatesSystem); });
|
|
86
|
-
var xMin = (_b = (_a = (0, minBy_1.default)(areaDeltaCoordinates, 'x')) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : 0;
|
|
87
|
-
var xMax = (_d = (_c = (0, maxBy_1.default)(areaDeltaCoordinates, 'x')) === null || _c === void 0 ? void 0 : _c.x) !== null && _d !== void 0 ? _d : 0;
|
|
88
|
-
var yMin = (_f = (_e = (0, minBy_1.default)(areaDeltaCoordinates, 'y')) === null || _e === void 0 ? void 0 : _e.y) !== null && _f !== void 0 ? _f : 0;
|
|
89
|
-
var yMax = (_h = (_g = (0, maxBy_1.default)(areaDeltaCoordinates, 'y')) === null || _g === void 0 ? void 0 : _g.y) !== null && _h !== void 0 ? _h : 0;
|
|
90
|
-
return { x: (xMin + xMax) / 2, y: (yMin + yMax) / 2 };
|
|
89
|
+
HexagonalGridLocator.prototype.getDropArea = function (_location, _context) {
|
|
90
|
+
return this.dropArea;
|
|
91
91
|
};
|
|
92
92
|
/**
|
|
93
93
|
* Get the coordinates for the full grid area
|
|
@@ -97,10 +97,11 @@ var HexagonalGridLocator = /** @class */ (function (_super) {
|
|
|
97
97
|
*/
|
|
98
98
|
HexagonalGridLocator.prototype.getAreaCoordinates = function (location, context) {
|
|
99
99
|
var _a = this.getCoordinates(location, context), _b = _a.x, x = _b === void 0 ? 0 : _b, _c = _a.y, y = _c === void 0 ? 0 : _c, z = _a.z;
|
|
100
|
-
var
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
var dropArea = this.getDropArea(location, context);
|
|
101
|
+
if (!dropArea)
|
|
102
|
+
return { x: x, y: y, z: z };
|
|
103
|
+
var _d = this.getBoundaries(dropArea), xMin = _d.xMin, xMax = _d.xMax, yMin = _d.yMin, yMax = _d.yMax;
|
|
104
|
+
return { x: (xMin + xMax) / 2, y: (yMin + yMax) / 2, z: z };
|
|
104
105
|
};
|
|
105
106
|
/**
|
|
106
107
|
* Get the coordinates of a location on the grid
|
|
@@ -167,9 +168,9 @@ var HexagonalGridLocator = /** @class */ (function (_super) {
|
|
|
167
168
|
if (!description || !(0, components_1.isPolyhexDescription)(description)) {
|
|
168
169
|
return { x: x, y: y, z: z };
|
|
169
170
|
}
|
|
170
|
-
var
|
|
171
|
-
var
|
|
172
|
-
var
|
|
171
|
+
var polyhex = description.getPolyhex(item, context);
|
|
172
|
+
var _d = this.getBoundaries(polyhex), xMax = _d.xMax, xMin = _d.xMin, yMin = _d.yMin, yMax = _d.yMax;
|
|
173
|
+
var _e = rotateVector({ x: (xMin + xMax) / 2, y: (yMin + yMax) / 2 }, item.location.rotation * 60), deltaX = _e.x, deltaY = _e.y;
|
|
173
174
|
return { x: x + deltaX, y: y + deltaY, z: z };
|
|
174
175
|
};
|
|
175
176
|
/**
|
|
@@ -201,19 +202,52 @@ var HexagonalGridLocator = /** @class */ (function (_super) {
|
|
|
201
202
|
return this.locationDescription;
|
|
202
203
|
if (location.x !== undefined || location.y !== undefined)
|
|
203
204
|
return _super.prototype.getLocationDescription.call(this, location, context);
|
|
204
|
-
var
|
|
205
|
+
var dropArea = this.getDropArea(location, context);
|
|
206
|
+
if (!dropArea)
|
|
207
|
+
return _super.prototype.getLocationDescription.call(this, location, context);
|
|
208
|
+
var _a = this.getBoundaries(dropArea), xMin = _a.xMin, xMax = _a.xMax, yMin = _a.yMin, yMax = _a.yMax;
|
|
205
209
|
var borderRadius = this.sizeX / 3;
|
|
206
|
-
|
|
210
|
+
return new components_1.HexGridDropAreaDescription({
|
|
211
|
+
width: xMax - xMin,
|
|
212
|
+
height: yMax - yMin,
|
|
213
|
+
borderRadius: borderRadius
|
|
214
|
+
});
|
|
215
|
+
};
|
|
216
|
+
HexagonalGridLocator.prototype.getBoundaries = function (polyhex) {
|
|
217
|
+
var boundaries = { xMin: 0, xMax: 0, yMin: 0, yMax: 0 };
|
|
218
|
+
if (!polyhex) {
|
|
219
|
+
return boundaries;
|
|
220
|
+
}
|
|
221
|
+
switch (polyhex.system) {
|
|
207
222
|
case rules_api_1.HexGridSystem.Axial: {
|
|
208
223
|
throw new Error('Axial HexGridSystem is not yet implemented');
|
|
209
224
|
}
|
|
210
225
|
case rules_api_1.HexGridSystem.OddQ:
|
|
211
|
-
case rules_api_1.HexGridSystem.EvenQ:
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
226
|
+
case rules_api_1.HexGridSystem.EvenQ: {
|
|
227
|
+
boundaries.xMin = polyhex.xMin * 3 / 2 * this.sizeX - this.sizeX;
|
|
228
|
+
var xMax = Math.max.apply(Math, __spreadArray([], __read(polyhex.grid.map(function (line) { return line.length; })), false)) - 1;
|
|
229
|
+
boundaries.xMax = (xMax + polyhex.xMin) * 3 / 2 * this.sizeX + this.sizeX;
|
|
230
|
+
var swapSystem_1 = polyhex.xMin % 2 !== 0;
|
|
231
|
+
var yMin = polyhex.yMin - 0.5;
|
|
232
|
+
var firstLine = polyhex.grid[0];
|
|
233
|
+
if (polyhex.system === rules_api_1.HexGridSystem.OddQ && firstLine.every(function (value, y) { return polyhex.isEmpty(value) || (swapSystem_1 ? !(y % 2) : y % 2); })) {
|
|
234
|
+
yMin += 0.5;
|
|
235
|
+
}
|
|
236
|
+
else if (polyhex.system === rules_api_1.HexGridSystem.EvenQ && firstLine.some(function (value, y) { return !polyhex.isEmpty(value) && (swapSystem_1 ? !(y % 2) : y % 2); })) {
|
|
237
|
+
yMin -= 0.5;
|
|
238
|
+
}
|
|
239
|
+
boundaries.yMin = yMin * Math.sqrt(3) * this.sizeY;
|
|
240
|
+
var yMax = polyhex.grid.length + polyhex.yMin - 0.5;
|
|
241
|
+
var lastLine = polyhex.grid[polyhex.grid.length - 1];
|
|
242
|
+
if (polyhex.system === rules_api_1.HexGridSystem.OddQ && lastLine.some(function (value, y) { return !polyhex.isEmpty(value) && (swapSystem_1 ? !(y % 2) : y % 2); })) {
|
|
243
|
+
yMax += 0.5;
|
|
244
|
+
}
|
|
245
|
+
else if (polyhex.system === rules_api_1.HexGridSystem.EvenQ && lastLine.every(function (value, y) { return polyhex.isEmpty(value) || (swapSystem_1 ? !(y % 2) : y % 2); })) {
|
|
246
|
+
yMax -= 0.5;
|
|
247
|
+
}
|
|
248
|
+
boundaries.yMax = yMax * Math.sqrt(3) * this.sizeY;
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
217
251
|
case rules_api_1.HexGridSystem.OddR: {
|
|
218
252
|
throw new Error('OddR HexGridSystem is not yet implemented');
|
|
219
253
|
}
|
|
@@ -221,6 +255,7 @@ var HexagonalGridLocator = /** @class */ (function (_super) {
|
|
|
221
255
|
throw new Error('EvenR HexGridSystem is not yet implemented');
|
|
222
256
|
}
|
|
223
257
|
}
|
|
258
|
+
return boundaries;
|
|
224
259
|
};
|
|
225
260
|
return HexagonalGridLocator;
|
|
226
261
|
}(Locator_1.Locator));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HexagonalGridLocator.js","sourceRoot":"","sources":["../../src/locators/HexagonalGridLocator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HexagonalGridLocator.js","sourceRoot":"","sources":["../../src/locators/HexagonalGridLocator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA0H;AAC1H,2DAAoC;AACpC,qDAA8B;AAC9B,6DAAsC;AACtC,4CAAqG;AACrG,qCAAiE;AAEjE;;GAEG;AACH;IAA6I,wCAAgB;IAA7J;QAAA,qEAiNC;QA7DC,iBAAW,GAAG,IAAI,CAAA;;IA6DpB,CAAC;IAlMC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
-
"version": "6.
|
|
3
|
+
"version": "6.36.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.36.0",
|
|
31
|
+
"@gamepark/rules-api": "~6.36.0",
|
|
32
32
|
"dayjs": "^1.11.7",
|
|
33
33
|
"emotion-normalize": "^11.0.1",
|
|
34
34
|
"fscreen": "^1.2.0",
|