@gamepark/react-game 6.38.1 → 6.38.3
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.
|
@@ -3,7 +3,7 @@ import { MaterialMove } from '@gamepark/rules-api';
|
|
|
3
3
|
import { ReactElement } from 'react';
|
|
4
4
|
type Props = {
|
|
5
5
|
code: string;
|
|
6
|
-
values?: Record<string,
|
|
6
|
+
values?: Record<string, any>;
|
|
7
7
|
components?: Record<string, ReactElement>;
|
|
8
8
|
moves?: Record<string, (move: MaterialMove) => boolean>;
|
|
9
9
|
};
|
|
@@ -1,4 +1,8 @@
|
|
|
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
|
+
};
|
|
2
6
|
var __assign = (this && this.__assign) || function () {
|
|
3
7
|
__assign = Object.assign || function(t) {
|
|
4
8
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -14,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
14
18
|
exports.MaterialRulesDialog = void 0;
|
|
15
19
|
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
16
20
|
/** @jsxImportSource @emotion/react */
|
|
21
|
+
var react_1 = require("@emotion/react");
|
|
17
22
|
var rules_api_1 = require("@gamepark/rules-api");
|
|
18
23
|
var hooks_1 = require("../../../hooks");
|
|
19
24
|
var index_1 = require("../index");
|
|
@@ -24,10 +29,12 @@ var MaterialRulesDialog = function (props) {
|
|
|
24
29
|
var game = (0, hooks_1.useGame)();
|
|
25
30
|
if (!(game === null || game === void 0 ? void 0 : game.helpDisplay))
|
|
26
31
|
return null;
|
|
27
|
-
return ((0, jsx_runtime_1.jsxs)(index_1.RulesDialog, __assign({}, props, { children: [game.helpDisplay.type === rules_api_1.HelpDisplayType.Material &&
|
|
32
|
+
return ((0, jsx_runtime_1.jsxs)(index_1.RulesDialog, __assign({}, props, { css: inlineImg }, { children: [game.helpDisplay.type === rules_api_1.HelpDisplayType.Material &&
|
|
28
33
|
(0, jsx_runtime_1.jsx)(MaterialRulesDialogContent_1.MaterialRulesDialogContent, { helpDisplay: game.helpDisplay }), game.helpDisplay.type === rules_api_1.HelpDisplayType.Location &&
|
|
29
34
|
(0, jsx_runtime_1.jsx)(LocationRulesDialogContent_1.LocationRulesDialogContent, { helpDisplay: game.helpDisplay }), game.helpDisplay.type === rules_api_1.HelpDisplayType.Rules &&
|
|
30
35
|
(0, jsx_runtime_1.jsx)(RulesHelpDialogContent_1.RulesHelpDialogContent, { helpDisplay: game.helpDisplay })] })));
|
|
31
36
|
};
|
|
32
37
|
exports.MaterialRulesDialog = MaterialRulesDialog;
|
|
38
|
+
var inlineImg = (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n p img {\n height: 1em;\n position: relative;\n top: 0.1em;\n }\n"], ["\n p img {\n height: 1em;\n position: relative;\n top: 0.1em;\n }\n"])));
|
|
39
|
+
var templateObject_1;
|
|
33
40
|
//# sourceMappingURL=MaterialRulesDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MaterialRulesDialog.js","sourceRoot":"","sources":["../../../../src/components/dialogs/RulesDialog/MaterialRulesDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MaterialRulesDialog.js","sourceRoot":"","sources":["../../../../src/components/dialogs/RulesDialog/MaterialRulesDialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,sCAAsC;AACtC,wCAAoC;AACpC,iDAAmE;AAEnE,wCAAwC;AACxC,kCAAwD;AACxD,2EAAyE;AACzE,2EAAyE;AACzE,mEAAiE;AAE1D,IAAM,mBAAmB,GAAyB,UAAC,KAAuB;IAC/E,IAAM,IAAI,GAAG,IAAA,eAAO,GAAgB,CAAA;IACpC,IAAI,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,CAAA;QAAE,OAAO,IAAI,CAAA;IACnC,OAAO,CACL,wBAAC,mBAAW,eAAK,KAAK,IAAE,GAAG,EAAE,SAAS,iBACnC,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,2BAAe,CAAC,QAAQ;gBACjD,uBAAC,uDAA0B,IAAC,WAAW,EAAE,IAAI,CAAC,WAAW,GAAG,EAE7D,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,2BAAe,CAAC,QAAQ;gBACjD,uBAAC,uDAA0B,IAAC,WAAW,EAAE,IAAI,CAAC,WAAW,GAAG,EAE7D,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,2BAAe,CAAC,KAAK;gBAC9C,uBAAC,+CAAsB,IAAC,WAAW,EAAE,IAAI,CAAC,WAAW,GAAG,KAE9C,CACf,CAAA;AACH,CAAC,CAAA;AAhBY,QAAA,mBAAmB,uBAgB/B;AAED,IAAM,SAAS,OAAG,WAAG,oJAAA,gFAMpB,IAAA,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamepark/react-game",
|
|
3
|
-
"version": "6.38.
|
|
3
|
+
"version": "6.38.3",
|
|
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",
|