@gamepark/react-game 6.16.0 → 6.17.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/components/GameProvider/GameContext.d.ts +2 -0
- package/dist/components/GameProvider/GameContext.js.map +1 -1
- package/dist/components/GameProvider/GameProvider.js +5 -3
- package/dist/components/GameProvider/GameProvider.js.map +1 -1
- package/dist/components/JournalTabs/Chat/Chat.d.ts +7 -0
- package/dist/components/JournalTabs/Chat/Chat.js +37 -0
- package/dist/components/JournalTabs/Chat/Chat.js.map +1 -0
- package/dist/components/JournalTabs/Chat/ChatMessage.d.ts +7 -0
- package/dist/components/JournalTabs/Chat/ChatMessage.js +29 -0
- package/dist/components/JournalTabs/Chat/ChatMessage.js.map +1 -0
- package/dist/components/JournalTabs/Chat/ChatMessageAuthor.d.ts +3 -0
- package/dist/components/JournalTabs/Chat/ChatMessageAuthor.js +37 -0
- package/dist/components/JournalTabs/Chat/ChatMessageAuthor.js.map +1 -0
- package/dist/components/JournalTabs/Chat/ChatTextInput.d.ts +19 -0
- package/dist/components/JournalTabs/Chat/ChatTextInput.js +71 -0
- package/dist/components/JournalTabs/Chat/ChatTextInput.js.map +1 -0
- package/dist/components/JournalTabs/Chat/CommonChat.d.ts +12 -0
- package/dist/components/JournalTabs/Chat/CommonChat.js +58 -0
- package/dist/components/JournalTabs/Chat/CommonChat.js.map +1 -0
- package/dist/components/JournalTabs/Chat/LocalChat.d.ts +6 -0
- package/dist/components/JournalTabs/Chat/LocalChat.js +49 -0
- package/dist/components/JournalTabs/Chat/LocalChat.js.map +1 -0
- package/dist/components/JournalTabs/Chat/RemoteChat.d.ts +7 -0
- package/dist/components/JournalTabs/Chat/RemoteChat.js +46 -0
- package/dist/components/JournalTabs/Chat/RemoteChat.js.map +1 -0
- package/dist/components/JournalTabs/Chat/SignInToChat.d.ts +1 -0
- package/dist/components/JournalTabs/Chat/SignInToChat.js +35 -0
- package/dist/components/JournalTabs/Chat/SignInToChat.js.map +1 -0
- package/dist/components/JournalTabs/Chat/index.d.ts +5 -0
- package/dist/components/JournalTabs/Chat/index.js +22 -0
- package/dist/components/JournalTabs/Chat/index.js.map +1 -0
- package/dist/components/JournalTabs/History/ActionHistoryEntry.d.ts +12 -0
- package/dist/components/JournalTabs/History/ActionHistoryEntry.js +62 -0
- package/dist/components/JournalTabs/History/ActionHistoryEntry.js.map +1 -0
- package/dist/components/JournalTabs/History/History.d.ts +6 -0
- package/dist/components/JournalTabs/History/History.js +54 -0
- package/dist/components/JournalTabs/History/History.js.map +1 -0
- package/dist/components/JournalTabs/History/HistoryEntry.d.ts +11 -0
- package/dist/components/JournalTabs/History/HistoryEntry.js +42 -0
- package/dist/components/JournalTabs/History/HistoryEntry.js.map +1 -0
- package/dist/components/JournalTabs/History/MaterialHistory.d.ts +11 -0
- package/dist/components/JournalTabs/History/MaterialHistory.js +3 -0
- package/dist/components/JournalTabs/History/MaterialHistory.js.map +1 -0
- package/dist/components/JournalTabs/History/PlayerActionHistory.d.ts +8 -0
- package/dist/components/JournalTabs/History/PlayerActionHistory.js +42 -0
- package/dist/components/JournalTabs/History/PlayerActionHistory.js.map +1 -0
- package/dist/components/JournalTabs/History/PlayerHistoryEntry.d.ts +8 -0
- package/dist/components/JournalTabs/History/PlayerHistoryEntry.js +44 -0
- package/dist/components/JournalTabs/History/PlayerHistoryEntry.js.map +1 -0
- package/dist/components/JournalTabs/History/StartHistory.d.ts +2 -0
- package/dist/components/JournalTabs/History/StartHistory.js +30 -0
- package/dist/components/JournalTabs/History/StartHistory.js.map +1 -0
- package/dist/components/JournalTabs/History/index.d.ts +5 -0
- package/dist/components/JournalTabs/History/index.js +22 -0
- package/dist/components/JournalTabs/History/index.js.map +1 -0
- package/dist/components/JournalTabs/JournalTabs.d.ts +5 -0
- package/dist/components/JournalTabs/JournalTabs.js +74 -0
- package/dist/components/JournalTabs/JournalTabs.js.map +1 -0
- package/dist/components/JournalTabs/index.d.ts +1 -0
- package/dist/components/JournalTabs/index.js +18 -0
- package/dist/components/JournalTabs/index.js.map +1 -0
- package/dist/components/Picture/Picture.js +1 -0
- package/dist/components/Picture/Picture.js.map +1 -1
- package/dist/components/PlayerPanel/PlayerPanel.d.ts +4 -3
- package/dist/components/PlayerPanel/PlayerPanel.js +16 -10
- package/dist/components/PlayerPanel/PlayerPanel.js.map +1 -1
- package/dist/components/buttons/PlayMoveButton/PlayMoveButton.js +21 -23
- package/dist/components/buttons/PlayMoveButton/PlayMoveButton.js.map +1 -1
- package/dist/components/dialogs/FailuresDialog.js +3 -3
- package/dist/components/dialogs/FailuresDialog.js.map +1 -1
- package/dist/components/dialogs/ResultDialog/ResultDialog.js +9 -6
- package/dist/components/dialogs/ResultDialog/ResultDialog.js.map +1 -1
- package/dist/components/dialogs/RulesDialog/MaterialRulesDialogContent.js +5 -5
- package/dist/components/dialogs/RulesDialog/MaterialRulesDialogContent.js.map +1 -1
- package/dist/components/dialogs/RulesDialog/RulesDialog.d.ts +1 -1
- package/dist/components/dialogs/RulesDialog/RulesDialog.js +1 -1
- package/dist/components/dialogs/RulesDialog/RulesDialog.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/dist/components/material/Dices/CubicDiceDescription.d.ts +5 -4
- package/dist/components/material/Dices/CubicDiceDescription.js +5 -5
- package/dist/components/material/Dices/CubicDiceDescription.js.map +1 -1
- package/dist/components/material/DraggableMaterial.d.ts +2 -0
- package/dist/components/material/DraggableMaterial.js +65 -33
- package/dist/components/material/DraggableMaterial.js.map +1 -1
- package/dist/components/material/FlatMaterial/FlatMaterial.d.ts +10 -10
- package/dist/components/material/FlatMaterial/FlatMaterial.js +19 -19
- package/dist/components/material/FlatMaterial/FlatMaterial.js.map +1 -1
- package/dist/components/material/GameTable/DraggableStockItem.d.ts +4 -0
- package/dist/components/material/GameTable/DraggableStockItem.js +82 -0
- package/dist/components/material/GameTable/DraggableStockItem.js.map +1 -0
- package/dist/components/material/GameTable/DynamicItemsDisplay.d.ts +4 -0
- package/dist/components/material/GameTable/DynamicItemsDisplay.js +72 -0
- package/dist/components/material/GameTable/DynamicItemsDisplay.js.map +1 -0
- package/dist/components/material/GameTable/FocusableElement.d.ts +13 -0
- package/dist/components/material/GameTable/FocusableElement.js +63 -0
- package/dist/components/material/GameTable/FocusableElement.js.map +1 -0
- package/dist/components/material/GameTable/FocusableLocation.d.ts +8 -0
- package/dist/components/material/GameTable/FocusableLocation.js +37 -0
- package/dist/components/material/GameTable/FocusableLocation.js.map +1 -0
- package/dist/components/material/GameTable/FocusableLocations.d.ts +0 -0
- package/dist/components/material/GameTable/FocusableLocations.js +2 -0
- package/dist/components/material/GameTable/FocusableLocations.js.map +1 -0
- package/dist/components/material/GameTable/GameMaterialDisplay.d.ts +7 -1
- package/dist/components/material/GameTable/GameMaterialDisplay.js +16 -133
- package/dist/components/material/GameTable/GameMaterialDisplay.js.map +1 -1
- package/dist/components/material/GameTable/GameTable.d.ts +2 -0
- package/dist/components/material/GameTable/GameTable.js +7 -6
- package/dist/components/material/GameTable/GameTable.js.map +1 -1
- package/dist/components/material/GameTable/GameTableNavigation.d.ts +5 -1
- package/dist/components/material/GameTable/GameTableNavigation.js +18 -6
- package/dist/components/material/GameTable/GameTableNavigation.js.map +1 -1
- package/dist/components/material/GameTable/ItemDisplay.d.ts +15 -0
- package/dist/components/material/GameTable/ItemDisplay.js +51 -0
- package/dist/components/material/GameTable/ItemDisplay.js.map +1 -0
- package/dist/components/material/GameTable/StaticItemsDisplay.d.ts +4 -0
- package/dist/components/material/GameTable/StaticItemsDisplay.js +67 -0
- package/dist/components/material/GameTable/StaticItemsDisplay.js.map +1 -0
- package/dist/components/material/GameTable/StaticLocationsDisplay.d.ts +4 -0
- package/dist/components/material/GameTable/StaticLocationsDisplay.js +35 -0
- package/dist/components/material/GameTable/StaticLocationsDisplay.js.map +1 -0
- package/dist/components/material/GameTable/focus/FocusProvider.d.ts +10 -0
- package/dist/components/material/GameTable/focus/FocusProvider.js +78 -0
- package/dist/components/material/GameTable/focus/FocusProvider.js.map +1 -0
- package/dist/components/material/GameTable/focus/FocusableElement.d.ts +13 -0
- package/dist/components/material/GameTable/focus/FocusableElement.js +63 -0
- package/dist/components/material/GameTable/focus/FocusableElement.js.map +1 -0
- package/dist/components/material/GameTable/focus/FocusableLocation.d.ts +8 -0
- package/dist/components/material/GameTable/focus/FocusableLocation.js +38 -0
- package/dist/components/material/GameTable/focus/FocusableLocation.js.map +1 -0
- package/dist/components/material/GameTable/focus/LocationsWithFocus.d.ts +8 -0
- package/dist/components/material/GameTable/focus/LocationsWithFocus.js +30 -0
- package/dist/components/material/GameTable/focus/LocationsWithFocus.js.map +1 -0
- package/dist/components/material/GameTable/focus/MaterialFocus.d.ts +20 -0
- package/dist/components/material/GameTable/focus/MaterialFocus.js +3 -0
- package/dist/components/material/GameTable/focus/MaterialFocus.js.map +1 -0
- package/dist/components/material/GameTable/focus/index.d.ts +3 -0
- package/dist/components/material/GameTable/focus/index.js +20 -0
- package/dist/components/material/GameTable/focus/index.js.map +1 -0
- package/dist/components/material/GameTable/index.d.ts +1 -0
- package/dist/components/material/GameTable/index.js +1 -0
- package/dist/components/material/GameTable/index.js.map +1 -1
- package/dist/components/material/GameTable/locations.utils.d.ts +0 -0
- package/dist/components/material/GameTable/locations.utils.js +2 -0
- package/dist/components/material/GameTable/locations.utils.js.map +1 -0
- package/dist/components/material/MaterialComponent.d.ts +2 -2
- package/dist/components/material/MaterialComponent.js +7 -7
- package/dist/components/material/MaterialComponent.js.map +1 -1
- package/dist/components/material/MaterialDescription.d.ts +10 -9
- package/dist/components/material/MaterialDescription.js +11 -38
- package/dist/components/material/MaterialDescription.js.map +1 -1
- package/dist/components/material/MobileMaterialDescription.d.ts +9 -0
- package/dist/components/material/MobileMaterialDescription.js +68 -0
- package/dist/components/material/MobileMaterialDescription.js.map +1 -0
- package/dist/components/material/Writing/WritingDescription.d.ts +5 -5
- package/dist/components/material/Writing/WritingDescription.js +15 -15
- package/dist/components/material/Writing/WritingDescription.js.map +1 -1
- package/dist/components/material/animations/CreateItemAnimations.d.ts +2 -1
- package/dist/components/material/animations/CreateItemAnimations.js +10 -3
- package/dist/components/material/animations/CreateItemAnimations.js.map +1 -1
- package/dist/components/material/animations/MaterialGameAnimations.d.ts +1 -1
- package/dist/components/material/animations/MaterialGameAnimations.js +1 -1
- package/dist/components/material/animations/MaterialGameAnimations.js.map +1 -1
- package/dist/components/material/animations/MoveItemAnimations.js +1 -1
- package/dist/components/material/animations/MoveItemAnimations.js.map +1 -1
- package/dist/components/material/index.d.ts +1 -0
- package/dist/components/material/index.js +1 -0
- package/dist/components/material/index.js.map +1 -1
- package/dist/components/material/locations/LocationDescription.d.ts +1 -2
- package/dist/components/material/locations/LocationDescription.js +1 -4
- package/dist/components/material/locations/LocationDescription.js.map +1 -1
- package/dist/components/material/locations/LocationsMask.d.ts +1 -1
- package/dist/components/material/locations/LocationsMask.js +1 -3
- package/dist/components/material/locations/LocationsMask.js.map +1 -1
- package/dist/components/material/locations/SimpleDropArea.js +65 -34
- package/dist/components/material/locations/SimpleDropArea.js.map +1 -1
- package/dist/components/material/utils/useIsAnimatingPlayerAction.js +8 -3
- package/dist/components/material/utils/useIsAnimatingPlayerAction.js.map +1 -1
- package/dist/components/menus/EjectPlayer/EjectPlayerButton.js +2 -2
- package/dist/components/menus/EjectPlayer/EjectPlayerButton.js.map +1 -1
- package/dist/components/menus/EjectPlayer/EjectPlayerDialog.js +2 -2
- package/dist/components/menus/EjectPlayer/EjectPlayerDialog.js.map +1 -1
- package/dist/components/menus/EjectPlayer/EjectPlayerPopButton.js +2 -2
- package/dist/components/menus/EjectPlayer/EjectPlayerPopButton.js.map +1 -1
- package/dist/components/menus/Fullscreen/FullscreenButton.js +3 -2
- package/dist/components/menus/Fullscreen/FullscreenButton.js.map +1 -1
- package/dist/components/menus/Fullscreen/FullscreenDialog.js +2 -2
- package/dist/components/menus/Fullscreen/FullscreenDialog.js.map +1 -1
- package/dist/components/menus/Fullscreen/FullscreenPopButton.js +3 -2
- package/dist/components/menus/Fullscreen/FullscreenPopButton.js.map +1 -1
- package/dist/components/menus/Menu/Menu.js +19 -19
- package/dist/components/menus/Menu/Menu.js.map +1 -1
- package/dist/components/menus/RestartTutorialButton/RestartTutorialButton.js +2 -2
- package/dist/components/menus/RestartTutorialButton/RestartTutorialButton.js.map +1 -1
- package/dist/components/menus/SoundButton/SoundButton.js +3 -2
- package/dist/components/menus/SoundButton/SoundButton.js.map +1 -1
- package/dist/components/menus/TimeStatsButton/TimeStatsButton.js +2 -2
- package/dist/components/menus/TimeStatsButton/TimeStatsButton.js.map +1 -1
- package/dist/components/menus/UndoButton/UndoButton.js +2 -2
- package/dist/components/menus/UndoButton/UndoButton.js.map +1 -1
- package/dist/components/menus/UndoButton/UndoPopButton.js +2 -2
- package/dist/components/menus/UndoButton/UndoPopButton.js.map +1 -1
- package/dist/components/tutorial/FocusableElement.d.ts +0 -0
- package/dist/components/tutorial/FocusableElement.js +2 -0
- package/dist/components/tutorial/FocusableElement.js.map +1 -0
- package/dist/components/tutorial/MaterialTutorial.d.ts +4 -14
- package/dist/components/tutorial/MaterialTutorial.js +1 -60
- package/dist/components/tutorial/MaterialTutorial.js.map +1 -1
- package/dist/components/tutorial/MaterialTutorialDisplay.js +39 -24
- package/dist/components/tutorial/MaterialTutorialDisplay.js.map +1 -1
- package/dist/components/tutorial/TutorialRulesWrapper.js +25 -5
- package/dist/components/tutorial/TutorialRulesWrapper.js.map +1 -1
- package/dist/css/GameTheme.d.ts +4 -0
- package/dist/css/GameTheme.js +3 -0
- package/dist/css/GameTheme.js.map +1 -1
- package/dist/hooks/useHistory.d.ts +6 -0
- package/dist/hooks/useHistory.js +82 -0
- package/dist/hooks/useHistory.js.map +1 -0
- package/dist/hooks/useLegalMoves.js +5 -3
- package/dist/hooks/useLegalMoves.js.map +1 -1
- package/dist/hooks/useRankedPlayers.js.map +1 -1
- package/dist/hooks/useZoomToElements.d.ts +9 -1
- package/dist/hooks/useZoomToElements.js +20 -17
- package/dist/hooks/useZoomToElements.js.map +1 -1
- package/dist/locators/ItemLocator.d.ts +1 -1
- package/dist/locators/ItemLocator.js +3 -3
- package/dist/locators/ItemLocator.js.map +1 -1
- package/dist/utilities/findIfUnique.util.d.ts +1 -0
- package/dist/utilities/findIfUnique.util.js +17 -0
- package/dist/utilities/findIfUnique.util.js.map +1 -0
- package/dist/utilities/index.d.ts +1 -0
- package/dist/utilities/index.js +1 -0
- package/dist/utilities/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FocusableElement.js","sourceRoot":"","sources":["../../../../src/components/material/GameTable/FocusableElement.ts"],"names":[],"mappings":";;;;;;AACA,oEAAmC;AACnC,uDAAgC;AAShC,SAAgB,WAAW,CAAC,QAAgB,EAAE,SAAiB,EAAE,KAA6C;IAC5G,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACxB,OAAO,KAAK,CAAC,IAAI,CAAC,UAAA,KAAK,IAAI,OAAA,WAAW,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,CAAC,EAAvC,CAAuC,CAAC,CAAA;KACpE;IACD,OAAO,eAAe,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;AACpG,CAAC;AALD,kCAKC;AAED,SAAgB,eAAe,CAAC,KAAwB;IACtD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,KAAkB,CAAC,OAAO,KAAK,SAAS,CAAA;AAC/E,CAAC;AAFD,0CAEC;AAED,SAAgB,sBAAsB,CAAC,KAA6C;;IAClF,IAAI,CAAC,KAAK;QAAE,OAAO,CAAC,CAAA;IACpB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACxB,OAAO,IAAA,eAAK,EAAC,KAAK,EA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AyB,CAAC,QAAQ,KAAK,QAAQ,CAAA;AAC7F,CAAC;AAFD,8CAEC;AAED,SAAgB,eAAe,CAAC,QAAkB,EAAE,KAA6C;IAC/F,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACxB,OAAO,KAAK,CAAC,IAAI,CAAC,UAAA,KAAK,IAAI,OAAA,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAhC,CAAgC,CAAC,CAAA;KAC7D;IACD,OAAO,iBAAiB,CAAC,KAAK,CAAC,IAAI,IAAA,yBAAK,EAAC,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;AACpE,CAAC;AALD,0CAKC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Location, MaterialItem } from '@gamepark/rules-api';
|
|
2
|
+
import { ItemContext } from '../../../locators';
|
|
3
|
+
import { FocusableElement } from './FocusableElement';
|
|
4
|
+
export type FocusableLocation = {
|
|
5
|
+
location: Location;
|
|
6
|
+
focus?: true;
|
|
7
|
+
};
|
|
8
|
+
export declare const getInnerLocations: (item: MaterialItem, context: ItemContext, focus?: FocusableElement | FocusableElement[]) => FocusableLocation[];
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getInnerLocations = void 0;
|
|
7
|
+
var fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
|
|
8
|
+
var FocusableElement_1 = require("./FocusableElement");
|
|
9
|
+
var getInnerLocations = function (item, context, focus) {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
var locationsFocus = getLocationsFocus(focus).filter(function (location) { var _a, _b; return ((_a = context.locators[location.type]) === null || _a === void 0 ? void 0 : _a.parentItemType) === context.type && ((_b = location.parent) !== null && _b !== void 0 ? _b : 0) === context.index; });
|
|
12
|
+
var result = (_b = (_a = context.material[context.type]) === null || _a === void 0 ? void 0 : _a.getLocations(item, context).map(function (location) { return ({ location: location }); })) !== null && _b !== void 0 ? _b : [];
|
|
13
|
+
var _loop_1 = function (locationFocus) {
|
|
14
|
+
var focusableLocation = result.find(function (focusableLocation) { return (0, fast_deep_equal_1.default)(focusableLocation.location, locationFocus); });
|
|
15
|
+
if (focusableLocation) {
|
|
16
|
+
focusableLocation.focus = true;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
result.push({ location: locationFocus, focus: true });
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
for (var _i = 0, locationsFocus_1 = locationsFocus; _i < locationsFocus_1.length; _i++) {
|
|
23
|
+
var locationFocus = locationsFocus_1[_i];
|
|
24
|
+
_loop_1(locationFocus);
|
|
25
|
+
}
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
exports.getInnerLocations = getInnerLocations;
|
|
29
|
+
var getLocationsFocus = function (focus) {
|
|
30
|
+
if (!focus)
|
|
31
|
+
return [];
|
|
32
|
+
if (Array.isArray(focus)) {
|
|
33
|
+
return focus.filter(FocusableElement_1.isLocationBuilder).map(function (builder) { return builder.location; });
|
|
34
|
+
}
|
|
35
|
+
return (0, FocusableElement_1.isLocationBuilder)(focus) ? [focus.location] : [];
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=FocusableLocation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FocusableLocation.js","sourceRoot":"","sources":["../../../../src/components/material/GameTable/FocusableLocation.ts"],"names":[],"mappings":";;;;;;AACA,oEAAmC;AAEnC,uDAAwE;AAOjE,IAAM,iBAAiB,GAAG,UAC/B,IAAkB,EAAE,OAAoB,EAAE,KAA6C;;IAEvF,IAAM,cAAc,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,UAAA,QAAQ,gBAC7D,OAAA,CAAA,MAA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hB,CAAgB,CAAC,CAAA;KACxE;IACD,OAAO,IAAA,oCAAiB,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;AACzD,CAAC,CAAA"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FocusableLocations.js","sourceRoot":"","sources":["../../../../src/components/material/GameTable/FocusableLocations.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
type GameMaterialDisplayProps = PropsWithChildren<{
|
|
3
|
+
left: number;
|
|
4
|
+
top: number;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const GameMaterialDisplay: ({ left, top, children }: GameMaterialDisplayProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1,148 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
14
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
15
|
-
if (ar || !(i in from)) {
|
|
16
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17
|
-
ar[i] = from[i];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
21
|
-
};
|
|
22
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
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;
|
|
24
5
|
};
|
|
25
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
7
|
exports.GameMaterialDisplay = void 0;
|
|
27
8
|
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
9
|
+
var react_1 = require("@emotion/react");
|
|
28
10
|
var rules_api_1 = require("@gamepark/rules-api");
|
|
29
|
-
var fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
|
|
30
|
-
var react_1 = require("react");
|
|
31
|
-
var react_i18next_1 = require("react-i18next");
|
|
32
|
-
var react_zoom_pan_pinch_1 = require("react-zoom-pan-pinch");
|
|
33
|
-
var css_1 = require("../../../css");
|
|
34
11
|
var hooks_1 = require("../../../hooks");
|
|
35
|
-
var useTutorialStep_1 = require("../../../hooks/useTutorialStep");
|
|
36
|
-
var locators_1 = require("../../../locators");
|
|
37
12
|
var dialogs_1 = require("../../dialogs");
|
|
38
|
-
var tutorial_1 = require("../../tutorial");
|
|
39
13
|
var MaterialTutorialDisplay_1 = require("../../tutorial/MaterialTutorialDisplay");
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
var
|
|
46
|
-
var locators = context.locators;
|
|
14
|
+
var DynamicItemsDisplay_1 = require("./DynamicItemsDisplay");
|
|
15
|
+
var focus_1 = require("./focus");
|
|
16
|
+
var StaticItemsDisplay_1 = require("./StaticItemsDisplay");
|
|
17
|
+
var StaticLocationsDisplay_1 = require("./StaticLocationsDisplay");
|
|
18
|
+
var GameMaterialDisplay = function (_a) {
|
|
19
|
+
var left = _a.left, top = _a.top, children = _a.children;
|
|
47
20
|
var rules = (0, hooks_1.useRules)();
|
|
48
21
|
var play = (0, hooks_1.usePlay)();
|
|
49
|
-
|
|
50
|
-
var zoomToElements = (0, hooks_1.useZoomToElements)();
|
|
51
|
-
var resetTransform = (0, react_zoom_pan_pinch_1.useControls)().resetTransform;
|
|
52
|
-
var focusRefs = (0, react_1.useRef)(new Set());
|
|
53
|
-
var tutorialStep = (0, useTutorialStep_1.useTutorialStep)();
|
|
54
|
-
var tutorialPopup = !(rules === null || rules === void 0 ? void 0 : rules.game.tutorialPopupClosed) && (tutorialStep === null || tutorialStep === void 0 ? void 0 : tutorialStep.popup);
|
|
55
|
-
var tutorialFocus = (0, react_1.useMemo)(function () {
|
|
56
|
-
var _a;
|
|
57
|
-
focusRefs.current = new Set();
|
|
58
|
-
var tutorialFocus = (rules === null || rules === void 0 ? void 0 : rules.game) ? (_a = tutorialStep === null || tutorialStep === void 0 ? void 0 : tutorialStep.focus) === null || _a === void 0 ? void 0 : _a.call(tutorialStep, rules.game) : undefined;
|
|
59
|
-
if (!tutorialFocus) {
|
|
60
|
-
resetTransform(1000);
|
|
61
|
-
}
|
|
62
|
-
return tutorialFocus;
|
|
63
|
-
}, [tutorialStep]);
|
|
64
|
-
var addFocusRef = (0, react_1.useCallback)(function (ref) {
|
|
65
|
-
if (!ref || focusRefs.current.has(ref))
|
|
66
|
-
return;
|
|
67
|
-
focusRefs.current.add(ref);
|
|
68
|
-
if ((0, tutorial_1.countTutorialFocusRefs)(tutorialFocus) === focusRefs.current.size) {
|
|
69
|
-
var elements_1 = Array.from(focusRefs.current);
|
|
70
|
-
setTimeout(function () { return zoomToElements(elements_1, undefined, 1000); }, 50);
|
|
71
|
-
}
|
|
72
|
-
}, [tutorialFocus]);
|
|
73
|
-
if (!rules)
|
|
22
|
+
if (!rules || !rules.game)
|
|
74
23
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
75
|
-
var game = rules
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
var type = parseInt(stringType);
|
|
79
|
-
return description === null || description === void 0 ? void 0 : description.getStaticItems(context).map(function (item, index) {
|
|
80
|
-
var _a, _b;
|
|
81
|
-
var locator = (_a = locators[item.location.type]) !== null && _a !== void 0 ? _a : locators_1.centerLocator;
|
|
82
|
-
return __spreadArray([], Array((_b = item.quantity) !== null && _b !== void 0 ? _b : 1), true).map(function (_, displayIndex) {
|
|
83
|
-
var itemContext = __assign(__assign({}, context), { type: type, index: index, displayIndex: displayIndex });
|
|
84
|
-
var innerLocations = getInnerLocations(item, itemContext, tutorialPopup, tutorialFocus);
|
|
85
|
-
var focus = (0, tutorial_1.isStaticItemFocus)(type, item, tutorialFocus);
|
|
86
|
-
return (0, jsx_runtime_1.jsxs)(MaterialComponent_1.MaterialComponent, __assign({ type: type, itemId: item.id, playDown: tutorialPopup && !focus && !innerLocations.some(function (location) { return location.focus; }), ref: focus ? addFocusRef : undefined, css: [css_1.pointerCursorCss, css_1.transformCss.apply(void 0, locator.transformItem(item, itemContext))], onShortClick: function () { return play((0, rules_api_1.displayMaterialHelp)(type, item, index, displayIndex), { local: true }); } }, { children: [(0, jsx_runtime_1.jsx)(locations_1.LocationsMask, { locations: innerLocations.filter(function (l) { return l.focus; }).map(function (l) { return l.location; }) }), innerLocations.map(function (_a) {
|
|
87
|
-
var focus = _a.focus, location = _a.location;
|
|
88
|
-
return (0, jsx_runtime_1.jsx)(locations_1.SimpleDropArea, { location: location, alwaysVisible: focus, ref: focus ? addFocusRef : undefined }, JSON.stringify(location));
|
|
89
|
-
})] }), "".concat(type, "_").concat(index, "_").concat(displayIndex));
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
}), rules && game && Object.entries(game.items).map(function (_a) {
|
|
93
|
-
var stringType = _a[0], items = _a[1];
|
|
94
|
-
if (!items)
|
|
95
|
-
return null;
|
|
96
|
-
var type = parseInt(stringType);
|
|
97
|
-
return items.map(function (item, index) {
|
|
98
|
-
var _a;
|
|
99
|
-
var locator = locators[item.location.type];
|
|
100
|
-
return __spreadArray([], Array((_a = item.quantity) !== null && _a !== void 0 ? _a : 1), true).map(function (_, displayIndex) {
|
|
101
|
-
var itemContext = __assign(__assign({}, context), { type: type, index: index, displayIndex: displayIndex });
|
|
102
|
-
if (locator === null || locator === void 0 ? void 0 : locator.hide(item, itemContext))
|
|
103
|
-
return null;
|
|
104
|
-
var innerLocations = getInnerLocations(item, itemContext, tutorialPopup, tutorialFocus);
|
|
105
|
-
var focus = (0, tutorial_1.isItemFocus)(type, index, tutorialFocus);
|
|
106
|
-
return (0, jsx_runtime_1.jsxs)(DraggableMaterial_1.DraggableMaterial, __assign({ type: type, index: index, displayIndex: displayIndex, playDown: tutorialPopup && !focus && !innerLocations.some(function (location) { return location.focus; }), ref: focus ? addFocusRef : undefined, title: item.quantity !== undefined ? t('quantity.tooltip', { n: item.quantity }) : undefined }, { children: [(0, jsx_runtime_1.jsx)(locations_1.LocationsMask, { locations: innerLocations.filter(function (l) { return l.focus; }).map(function (l) { return l.location; }) }), innerLocations.map(function (_a) {
|
|
107
|
-
var focus = _a.focus, location = _a.location;
|
|
108
|
-
return (0, jsx_runtime_1.jsx)(locations_1.SimpleDropArea, { location: location, alwaysVisible: focus, ref: focus ? addFocusRef : undefined }, JSON.stringify(location));
|
|
109
|
-
})] }), "".concat(type, "_").concat(index, "_").concat(displayIndex));
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
}), Object.values(locators).map(function (locator) {
|
|
113
|
-
var _a;
|
|
114
|
-
return (_a = locator === null || locator === void 0 ? void 0 : locator.getLocationDescription(context)) === null || _a === void 0 ? void 0 : _a.getLocations(context).map(function (location) {
|
|
115
|
-
var isFocus = (0, tutorial_1.isLocationFocus)(location, tutorialFocus);
|
|
116
|
-
return (0, jsx_runtime_1.jsx)(locations_1.SimpleDropArea, { location: location, alwaysVisible: isFocus, ref: isFocus ? addFocusRef : undefined }, JSON.stringify(location));
|
|
117
|
-
});
|
|
118
|
-
}), (0, jsx_runtime_1.jsx)(dialogs_1.MaterialRulesDialog, { open: !!(game === null || game === void 0 ? void 0 : game.helpDisplay), close: function () { return play(rules_api_1.closeHelpDisplay, { local: true }); } }), (game === null || game === void 0 ? void 0 : game.tutorialStep) !== undefined && (0, jsx_runtime_1.jsx)(MaterialTutorialDisplay_1.MaterialTutorialDisplay, {})] });
|
|
24
|
+
var game = rules.game;
|
|
25
|
+
var position = defaultPosition(left, top);
|
|
26
|
+
return (0, jsx_runtime_1.jsxs)(focus_1.FocusProvider, { children: [(0, jsx_runtime_1.jsx)(StaticItemsDisplay_1.StaticItemsDisplay, { css: position }), (0, jsx_runtime_1.jsx)(DynamicItemsDisplay_1.DynamicItemsDisplay, { css: position }), (0, jsx_runtime_1.jsx)(StaticLocationsDisplay_1.StaticLocationsDisplay, { css: position }), (0, jsx_runtime_1.jsx)(dialogs_1.MaterialRulesDialog, { open: !!(game === null || game === void 0 ? void 0 : game.helpDisplay), close: function () { return play(rules_api_1.closeHelpDisplay, { local: true }); } }), (game === null || game === void 0 ? void 0 : game.tutorialStep) !== undefined && (0, jsx_runtime_1.jsx)(MaterialTutorialDisplay_1.MaterialTutorialDisplay, {}), children] });
|
|
119
27
|
};
|
|
120
28
|
exports.GameMaterialDisplay = GameMaterialDisplay;
|
|
121
|
-
var
|
|
122
|
-
|
|
123
|
-
var locationsFocus = tutorialPopup ? getLocationsFocus(tutorialFocus).filter(function (location) { var _a, _b; return ((_a = context.locators[location.type]) === null || _a === void 0 ? void 0 : _a.parentItemType) === context.type && ((_b = location.parent) !== null && _b !== void 0 ? _b : 0) === context.index; }) : [];
|
|
124
|
-
var result = (_b = (_a = context.material[context.type]) === null || _a === void 0 ? void 0 : _a.getLocations(item, context).map(function (location) { return ({ location: location }); })) !== null && _b !== void 0 ? _b : [];
|
|
125
|
-
var _loop_1 = function (locationFocus) {
|
|
126
|
-
var focusableLocation = result.find(function (focusableLocation) { return (0, fast_deep_equal_1.default)(focusableLocation.location, locationFocus); });
|
|
127
|
-
if (focusableLocation) {
|
|
128
|
-
focusableLocation.focus = true;
|
|
129
|
-
}
|
|
130
|
-
else {
|
|
131
|
-
result.push({ location: locationFocus, focus: true });
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
for (var _i = 0, locationsFocus_1 = locationsFocus; _i < locationsFocus_1.length; _i++) {
|
|
135
|
-
var locationFocus = locationsFocus_1[_i];
|
|
136
|
-
_loop_1(locationFocus);
|
|
137
|
-
}
|
|
138
|
-
return result;
|
|
139
|
-
};
|
|
140
|
-
var getLocationsFocus = function (focus) {
|
|
141
|
-
if (!focus)
|
|
142
|
-
return [];
|
|
143
|
-
if (Array.isArray(focus)) {
|
|
144
|
-
return focus.filter(tutorial_1.isLocationBuilder).map(function (builder) { return builder.location; });
|
|
145
|
-
}
|
|
146
|
-
return (0, tutorial_1.isLocationBuilder)(focus) ? [focus.location] : [];
|
|
147
|
-
};
|
|
29
|
+
var defaultPosition = function (left, top) { return (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n left: ", "em;\n top: ", "em;\n transform-style: preserve-3d;\n"], ["\n position: absolute;\n left: ", "em;\n top: ", "em;\n transform-style: preserve-3d;\n"])), left, top); };
|
|
30
|
+
var templateObject_1;
|
|
148
31
|
//# sourceMappingURL=GameMaterialDisplay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GameMaterialDisplay.js","sourceRoot":"","sources":["../../../../src/components/material/GameTable/GameMaterialDisplay.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GameMaterialDisplay.js","sourceRoot":"","sources":["../../../../src/components/material/GameTable/GameMaterialDisplay.tsx"],"names":[],"mappings":";;;;;;;;AACA,wCAAoC;AACpC,iDAAqE;AAErE,wCAAkD;AAClD,yCAAmD;AACnD,kFAAgF;AAChF,6DAA2D;AAC3D,iCAAuC;AACvC,2DAAyD;AACzD,mEAAiE;AAO1D,IAAM,mBAAmB,GAAG,UAAC,EAAiD;QAA/C,IAAI,UAAA,EAAE,GAAG,SAAA,EAAE,QAAQ,cAAA;IACvD,IAAM,KAAK,GAAG,IAAA,gBAAQ,GAAiB,CAAA;IACvC,IAAM,IAAI,GAAG,IAAA,eAAO,GAAE,CAAA;IAEtB,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,IAAI;QAAE,OAAO,kDAAK,CAAA;IACvC,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;IAEvB,IAAM,QAAQ,GAAG,eAAe,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;IAC3C,OAAO,wBAAC,qBAAa,eACnB,uBAAC,uCAAkB,IAAC,GAAG,EAAE,QAAQ,GAAG,EACpC,uBAAC,yCAAmB,IAAC,GAAG,EAAE,QAAQ,GAAG,EACrC,uBAAC,+CAAsB,IAAC,GAAG,EAAE,QAAQ,GAAG,EACxC,uBAAC,6BAAmB,IAAC,IAAI,EAAE,CAAC,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,CAAA,EAAE,KAAK,EAAE,cAAM,OAAA,IAAI,CAAC,4BAAgB,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAvC,CAAuC,GAAG,EACtG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,YAAY,MAAK,SAAS,IAAI,uBAAC,iDAAuB,KAAE,EAC9D,QAAQ,IACK,CAAA;AAClB,CAAC,CAAA;AAhBY,QAAA,mBAAmB,uBAgB/B;AAED,IAAM,eAAe,GAAG,UAAC,IAAY,EAAE,GAAW,IAAK,WAAA,WAAG,iKAAA,mCAEhD,EAAI,cACL,EAAG,wCAEX,KAHS,IAAI,EACL,GAAG,GAH2C,CAKtD,CAAA"}
|
|
@@ -2,6 +2,7 @@ import { CollisionDetection } from '@dnd-kit/core';
|
|
|
2
2
|
import { FC, HTMLAttributes } from 'react';
|
|
3
3
|
export type GameTableProps = {
|
|
4
4
|
collisionAlgorithm?: CollisionDetection;
|
|
5
|
+
snapToCenter?: boolean;
|
|
5
6
|
xMin: number;
|
|
6
7
|
xMax: number;
|
|
7
8
|
yMin: number;
|
|
@@ -13,5 +14,6 @@ export type GameTableProps = {
|
|
|
13
14
|
right: number;
|
|
14
15
|
bottom: number;
|
|
15
16
|
};
|
|
17
|
+
verticalCenter?: boolean;
|
|
16
18
|
} & HTMLAttributes<HTMLDivElement>;
|
|
17
19
|
export declare const GameTable: FC<GameTableProps>;
|
|
@@ -43,8 +43,8 @@ var wheel = { step: 0.05 };
|
|
|
43
43
|
var doubleClick = { disabled: true };
|
|
44
44
|
var pointerSensorOptions = { activationConstraint: { distance: 2 } };
|
|
45
45
|
var GameTable = function (_a) {
|
|
46
|
-
var collisionAlgorithm = _a.collisionAlgorithm, perspective = _a.perspective, xMin = _a.xMin, xMax = _a.xMax, yMin = _a.yMin, yMax = _a.yMax,
|
|
47
|
-
var
|
|
46
|
+
var collisionAlgorithm = _a.collisionAlgorithm, _b = _a.snapToCenter, snapToCenter = _b === void 0 ? true : _b, perspective = _a.perspective, xMin = _a.xMin, xMax = _a.xMax, yMin = _a.yMin, yMax = _a.yMax, _c = _a.margin, margin = _c === void 0 ? { left: 0, right: 0, top: 7, bottom: 0 } : _c, verticalCenter = _a.verticalCenter, children = _a.children, props = __rest(_a, ["collisionAlgorithm", "snapToCenter", "perspective", "xMin", "xMax", "yMin", "yMax", "margin", "verticalCenter", "children"]);
|
|
47
|
+
var _d = (0, react_2.useState)(false), dragging = _d[0], setDragging = _d[1];
|
|
48
48
|
var sensors = (0, core_1.useSensors)((0, core_1.useSensor)(core_1.PointerSensor, pointerSensorOptions));
|
|
49
49
|
var context = (0, hooks_1.useMaterialContext)();
|
|
50
50
|
var play = (0, hooks_1.usePlay)();
|
|
@@ -94,17 +94,18 @@ var GameTable = function (_a) {
|
|
|
94
94
|
position: 'absolute',
|
|
95
95
|
margin: "".concat(margin.top, "em ").concat(margin.right, "em ").concat(margin.bottom, "em ").concat(margin.left, "em"),
|
|
96
96
|
transformStyle: 'preserve-3d',
|
|
97
|
-
height: "min(100% - ".concat(vm, "em, (100dvw - ").concat(hm, "em) / ").concat(ratio, ")"),
|
|
97
|
+
height: verticalCenter ? "calc(100% - ".concat(vm, "em)") : "min(100% - ".concat(vm, "em, (100dvw - ").concat(hm, "em) / ").concat(ratio, ")"),
|
|
98
98
|
width: "calc(100dvw - ".concat(hm, "em)"),
|
|
99
|
-
overflow: 'visible'
|
|
99
|
+
overflow: 'visible',
|
|
100
100
|
}); }, [margin, vm, hm, ratio]);
|
|
101
|
-
|
|
101
|
+
var modifiers = (0, react_2.useMemo)(function () { return snapToCenter ? [modifiers_1.snapCenterToCursor] : undefined; }, [snapToCenter]);
|
|
102
|
+
return ((0, jsx_runtime_1.jsxs)(core_1.DndContext, __assign({ collisionDetection: collisionAlgorithm, measuring: { draggable: { measure: core_1.getClientRect }, droppable: { measure: core_1.getClientRect } }, modifiers: modifiers, sensors: sensors, onDragStart: function () { return setDragging(true); }, onDragEnd: onDragEnd, onDragCancel: function () { return setDragging(false); } }, { children: [(0, jsx_runtime_1.jsx)(react_1.Global, { styles: ratioFontSize(ratioWithMargins) }), (0, jsx_runtime_1.jsx)(react_zoom_pan_pinch_1.TransformWrapper, __assign({ ref: ref, minScale: minScale, maxScale: maxScale, initialScale: minScale, centerOnInit: true, wheel: wheel, smooth: false, panning: panning, disablePadding: true, doubleClick: doubleClick }, { children: (0, jsx_runtime_1.jsx)(react_zoom_pan_pinch_1.TransformComponent, __assign({ wrapperStyle: wrapperStyle }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ css: [tableCss(xMin, xMax, yMin, yMax), (0, css_1.fontSizeCss)(tableFontSize), perspective && (0, css_1.perspectiveCss)(perspective)] }, props, { children: (0, jsx_runtime_1.jsx)(GameMaterialDisplay_1.GameMaterialDisplay, __assign({ left: -xMin, top: -yMin }, { children: children })) })) })) }))] })));
|
|
102
103
|
};
|
|
103
104
|
exports.GameTable = GameTable;
|
|
104
105
|
function dataIsLocation(data) {
|
|
105
106
|
return typeof (data === null || data === void 0 ? void 0 : data.type) === 'number';
|
|
106
107
|
}
|
|
107
108
|
var ratioFontSize = function (ratio) { return (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .react-transform-wrapper {\n font-size: 1dvh;\n @media (max-aspect-ratio: ", "/1) {\n font-size: calc(1dvw / ", ");\n }\n }\n"], ["\n .react-transform-wrapper {\n font-size: 1dvh;\n @media (max-aspect-ratio: ", "/1) {\n font-size: calc(1dvw / ", ");\n }\n }\n"])), ratio, ratio); };
|
|
108
|
-
var tableCss = function (xMin, xMax, yMin, yMax) { return (0, react_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n transform-style: preserve-3d;\n width: ", "em;\n height: ", "em;\n
|
|
109
|
+
var tableCss = function (xMin, xMax, yMin, yMax) { return (0, react_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n transform-style: preserve-3d;\n width: ", "em;\n height: ", "em;\n"], ["\n transform-style: preserve-3d;\n width: ", "em;\n height: ", "em;\n"])), xMax - xMin, yMax - yMin); };
|
|
109
110
|
var templateObject_1, templateObject_2;
|
|
110
111
|
//# sourceMappingURL=GameTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GameTable.js","sourceRoot":"","sources":["../../../../src/components/material/GameTable/GameTable.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,sCAAiI;AACjI,gDAAuD;AACvD,wCAA4C;AAC5C,iDAA4D;AAC5D,+BAAoG;AACpG,6DAAwG;AACxG,oCAA0D;AAC1D,wCAA2E;AAC3E,8DAAyF;AACzF,0DAA0D;AAC1D,6DAA2D;
|
|
1
|
+
{"version":3,"file":"GameTable.js","sourceRoot":"","sources":["../../../../src/components/material/GameTable/GameTable.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,sCAAiI;AACjI,gDAAuD;AACvD,wCAA4C;AAC5C,iDAA4D;AAC5D,+BAAoG;AACpG,6DAAwG;AACxG,oCAA0D;AAC1D,wCAA2E;AAC3E,8DA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QAAQ,GAAG,UAAC,IAAY,EAAE,IAAY,EAAE,IAAY,EAAE,IAAY,IAAK,WAAA,WAAG,8IAAA,8CAErE,EAAW,iBACV,EAAW,OACtB,KAFU,IAAI,GAAG,IAAI,EACV,IAAI,GAAG,IAAI,GAHsD,CAI5E,CAAA"}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import { FC, HTMLAttributes } from 'react';
|
|
2
|
-
|
|
2
|
+
type GameTableNavigationProps = {
|
|
3
|
+
scaleStep?: number;
|
|
4
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
5
|
+
export declare const GameTableNavigation: FC<GameTableNavigationProps>;
|
|
6
|
+
export {};
|
|
@@ -14,6 +14,17 @@ var __assign = (this && this.__assign) || function () {
|
|
|
14
14
|
};
|
|
15
15
|
return __assign.apply(this, arguments);
|
|
16
16
|
};
|
|
17
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
18
|
+
var t = {};
|
|
19
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
20
|
+
t[p] = s[p];
|
|
21
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
22
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
23
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
24
|
+
t[p[i]] = s[p[i]];
|
|
25
|
+
}
|
|
26
|
+
return t;
|
|
27
|
+
};
|
|
17
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
29
|
exports.GameTableNavigation = void 0;
|
|
19
30
|
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
@@ -26,19 +37,20 @@ var react_dom_1 = require("react-dom");
|
|
|
26
37
|
var react_zoom_pan_pinch_1 = require("react-zoom-pan-pinch");
|
|
27
38
|
var css_1 = require("../../../css");
|
|
28
39
|
var GameTableNavigation = function (props) {
|
|
29
|
-
var _a =
|
|
30
|
-
var _b = (0,
|
|
31
|
-
var _c = (0, react_2.useState)(false),
|
|
40
|
+
var _a = props.scaleStep, scaleStep = _a === void 0 ? 0.1 : _a, rest = __rest(props, ["scaleStep"]);
|
|
41
|
+
var _b = (0, react_zoom_pan_pinch_1.useControls)(), zoomIn = _b.zoomIn, zoomOut = _b.zoomOut;
|
|
42
|
+
var _c = (0, react_2.useState)(false), isMin = _c[0], setIsMin = _c[1];
|
|
43
|
+
var _d = (0, react_2.useState)(false), isMax = _d[0], setIsMax = _d[1];
|
|
32
44
|
(0, react_zoom_pan_pinch_1.useTransformEffect)(function (_a) {
|
|
33
45
|
var state = _a.state, instance = _a.instance;
|
|
34
46
|
setIsMin(state.scale === instance.props.minScale);
|
|
35
47
|
setIsMax(state.scale === instance.props.maxScale);
|
|
36
48
|
});
|
|
37
|
-
return (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsxs)("div", __assign({ css: navigationContainer },
|
|
49
|
+
return (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsxs)("div", __assign({ css: navigationContainer }, rest, { children: [(0, jsx_runtime_1.jsx)("button", __assign({ css: button, onClick: function () { return zoomIn(scaleStep); }, disabled: isMax }, { children: (0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: faSearchPlus_1.faSearchPlus, css: iconCss }) })), (0, jsx_runtime_1.jsx)("button", __assign({ css: button, onClick: function () { return zoomOut(scaleStep); }, disabled: isMin }, { children: (0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: faSearchMinus_1.faSearchMinus, css: iconCss }) }))] })), document.getElementById('root'));
|
|
38
50
|
};
|
|
39
51
|
exports.GameTableNavigation = GameTableNavigation;
|
|
40
|
-
var navigationContainer = (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: fixed;\n display: flex;\n gap: 1em;\n top: 8em;\n left: 1em;\n color: white;\n transform: translateZ(100em);\n"], ["\n position: fixed;\n display: flex;\n gap: 1em;\n top: 8em;\n left: 1em;\n color: white;\n transform: translateZ(100em);\n"])));
|
|
41
|
-
var button = [css_1.buttonResetCss, (0, react_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: 3em;\n height: 2em;\n width: 2em;\n border-radius: 2em;\n transition: transform 0.1s ease-in-out;\n border: 0.1em solid white;\n color: inherit;\n background: transparent;\n\n &:disabled {\n color: #a0a0a0;\n border-color: #a0a0a0;\n }\n\n &:not(:disabled) {\n &:focus, &:hover {\n transform: scale(1.05);\n }\n\n &:active {\n transform: scale(1.05);\n background-color: rgba(0, 0, 0, 0.5);\n }\n }\n\n"], ["\n font-size: 3em;\n height: 2em;\n width: 2em;\n border-radius: 2em;\n transition: transform 0.1s ease-in-out;\n border: 0.1em solid white;\n color: inherit;\n background: transparent;\n\n &:disabled {\n color: #a0a0a0;\n border-color: #a0a0a0;\n }\n\n &:not(:disabled) {\n &:focus, &:hover {\n transform: scale(1.05);\n }\n\n &:active {\n transform: scale(1.05);\n background-color: rgba(0, 0, 0, 0.5);\n }\n }\n\n"])))];
|
|
52
|
+
var navigationContainer = (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: fixed;\n z-index: 1;\n display: flex;\n gap: 1em;\n top: 8em;\n left: 1em;\n color: white;\n transform: translateZ(100em);\n"], ["\n position: fixed;\n z-index: 1;\n display: flex;\n gap: 1em;\n top: 8em;\n left: 1em;\n color: white;\n transform: translateZ(100em);\n"])));
|
|
53
|
+
var button = [css_1.buttonResetCss, (0, react_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: 3em;\n height: 2em;\n width: 2em;\n border-radius: 2em;\n transition: transform 0.1s ease-in-out;\n border: 0.1em solid white;\n color: inherit;\n background: transparent;\n padding: 0;\n filter: drop-shadow(0.1em 0.1em 0.05em black);\n\n &:disabled {\n color: #a0a0a0;\n border-color: #a0a0a0;\n }\n\n &:not(:disabled) {\n &:focus, &:hover {\n transform: scale(1.05);\n }\n\n &:active {\n transform: scale(1.05);\n background-color: rgba(0, 0, 0, 0.5);\n }\n }\n\n"], ["\n font-size: 3em;\n height: 2em;\n width: 2em;\n border-radius: 2em;\n transition: transform 0.1s ease-in-out;\n border: 0.1em solid white;\n color: inherit;\n background: transparent;\n padding: 0;\n filter: drop-shadow(0.1em 0.1em 0.05em black);\n\n &:disabled {\n color: #a0a0a0;\n border-color: #a0a0a0;\n }\n\n &:not(:disabled) {\n &:focus, &:hover {\n transform: scale(1.05);\n }\n\n &:active {\n transform: scale(1.05);\n background-color: rgba(0, 0, 0, 0.5);\n }\n }\n\n"])))];
|
|
42
54
|
var iconCss = (0, react_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: inherit;\n"], ["\n color: inherit;\n"])));
|
|
43
55
|
var templateObject_1, templateObject_2, templateObject_3;
|
|
44
56
|
//# sourceMappingURL=GameTableNavigation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GameTableNavigation.js","sourceRoot":"","sources":["../../../../src/components/material/GameTable/GameTableNavigation.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GameTableNavigation.js","sourceRoot":"","sources":["../../../../src/components/material/GameTable/GameTableNavigation.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,wCAAoC;AACpC,iFAA+E;AAC/E,+EAA6E;AAC7E,oEAAgE;AAChE,+BAAoD;AACpD,uCAAwC;AACxC,6DAAsE;AACtE,oCAA6C;AAMtC,IAAM,mBAAmB,GAAiC,UAAC,KAAK;IAC7D,IAAA,KAA6B,KAAK,UAAnB,EAAf,SAAS,mBAAG,GAAG,KAAA,EAAK,IAAI,UAAK,KAAK,EAApC,aAA4B,CAAF,CAAU;IACpC,IAAA,KAAsB,IAAA,kCAAW,GAAE,EAAjC,MAAM,YAAA,EAAE,OAAO,aAAkB,CAAA;IACnC,IAAA,KAAoB,IAAA,gBAAQ,EAAC,KAAK,CAAC,EAAlC,KAAK,QAAA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
/// <reference types="react" />
|
|
2
|
+
import { MaterialItem } from '@gamepark/rules-api';
|
|
3
|
+
export declare const ItemDisplay: import("react").ForwardRefExoticComponent<{
|
|
4
|
+
type: number;
|
|
5
|
+
itemId?: any;
|
|
6
|
+
onShortClick?: (() => void) | undefined;
|
|
7
|
+
onLongClick?: (() => void) | undefined;
|
|
8
|
+
highlight?: boolean | undefined;
|
|
9
|
+
playDown?: boolean | undefined;
|
|
10
|
+
} & import("react").HTMLAttributes<HTMLElement> & {
|
|
11
|
+
index: number;
|
|
12
|
+
displayIndex: number;
|
|
13
|
+
item: MaterialItem;
|
|
14
|
+
isFocused?: boolean | undefined;
|
|
15
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.ItemDisplay = void 0;
|
|
26
|
+
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
27
|
+
var react_1 = require("react");
|
|
28
|
+
var react_merge_refs_1 = require("react-merge-refs");
|
|
29
|
+
var css_1 = require("../../../css");
|
|
30
|
+
var hooks_1 = require("../../../hooks");
|
|
31
|
+
var locators_1 = require("../../../locators");
|
|
32
|
+
var locations_1 = require("../locations");
|
|
33
|
+
var MaterialComponent_1 = require("../MaterialComponent");
|
|
34
|
+
var focus_1 = require("./focus");
|
|
35
|
+
exports.ItemDisplay = (0, react_1.forwardRef)(function (_a, ref) {
|
|
36
|
+
var _b;
|
|
37
|
+
var type = _a.type, index = _a.index, displayIndex = _a.displayIndex, item = _a.item, isFocused = _a.isFocused, props = __rest(_a, ["type", "index", "displayIndex", "item", "isFocused"]);
|
|
38
|
+
var context = (0, hooks_1.useMaterialContext)();
|
|
39
|
+
var _c = (0, focus_1.useFocusContext)(), focus = _c.focus, addFocusRef = _c.addFocusRef;
|
|
40
|
+
var itemContext = __assign(__assign({}, context), { type: type, index: index, displayIndex: displayIndex });
|
|
41
|
+
var _d = (0, focus_1.getLocationsWithFocus)(item, itemContext, focus), locations = _d.locations, focusedIndexes = _d.focusedIndexes;
|
|
42
|
+
var focusedLocations = (0, react_1.useMemo)(function () { return focusedIndexes.map(function (index) { return locations[index]; }); }, [locations, focusedIndexes]);
|
|
43
|
+
var locator = (_b = context.locators[item.location.type]) !== null && _b !== void 0 ? _b : locators_1.centerLocator;
|
|
44
|
+
var description = context.material[type];
|
|
45
|
+
return (0, jsx_runtime_1.jsx)(MaterialComponent_1.MaterialComponent, __assign({ ref: isFocused ? (0, react_merge_refs_1.mergeRefs)([ref, addFocusRef]) : ref, type: type, itemId: item.id, playDown: (focus === null || focus === void 0 ? void 0 : focus.highlight) && !isFocused && !focusedIndexes.length, css: [css_1.pointerCursorCss, css_1.transformCss.apply(void 0, locator.transformItem(item, itemContext)), description === null || description === void 0 ? void 0 : description.getItemExtraCss(item, itemContext)] }, props, { children: locations.length > 0 && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [locations.map(function (location, index) {
|
|
46
|
+
var hasFocus = focusedIndexes.includes(index);
|
|
47
|
+
return (0, jsx_runtime_1.jsx)(locations_1.SimpleDropArea, { location: location, alwaysVisible: hasFocus, ref: hasFocus ? addFocusRef : undefined }, JSON.stringify(location));
|
|
48
|
+
}), focusedLocations.length > 0 && (0, jsx_runtime_1.jsx)(locations_1.LocationsMask, { locations: focusedLocations })] }) }));
|
|
49
|
+
});
|
|
50
|
+
exports.ItemDisplay.displayName = 'ItemDisplay';
|
|
51
|
+
//# sourceMappingURL=ItemDisplay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ItemDisplay.js","sourceRoot":"","sources":["../../../../src/components/material/GameTable/ItemDisplay.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,+BAA2C;AAC3C,qDAA4C;AAC5C,oCAA6D;AAC7D,wCAAmD;AACnD,8CAA8D;AAC9D,0CAA4D;AAC5D,0DAAgF;AAChF,iCAAgE;AASnD,QAAA,WAAW,GAAG,IAAA,kBAAU,EAAmC,UACtE,EAA0E,EAAE,GAAG;;IAA7E,IAAA,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,YAAY,kBAAA,EAAE,IAAI,UAAA,EAAE,SAAS,eAAA,EAAK,KAAK,cAAtD,sDAAwD,CAAF;IAEtD,IAAM,OAAO,GAAG,IAAA,0BAAkB,GAAE,CAAA;IAC9B,IAAA,KAAyB,IAAA,uBAAe,GAAE,EAAxC,KAAK,WAAA,EAAE,WAAW,iBAAsB,CAAA;IAChD,IAAM,WAAW,yBAAqB,OAAO,KAAE,IAAI,MAAA,EAAE,KAAK,OAAA,EAAE,YAAY,cAAA,GAAE,CAAA;IACpE,IAAA,KAAgC,IAAA,6BAAqB,EAAC,IAAI,EAAE,WAAW,EAAE,KAAK,CAAC,EA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QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,IAA9G,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAyF,CAAA;gBAC/I,CAAC,CACF,EACA,gBAAgB,CAAC,MAAM,GAAG,CAAC,IAAI,uBAAC,yBAAa,IAAC,SAAS,EAAE,gBAAgB,GAAG,IAC5E,IACe,CAAA;AACtB,CAAC,CAAC,CAAA;AAEF,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
34
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.StaticItemsDisplay = void 0;
|
|
38
|
+
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
39
|
+
var rules_api_1 = require("@gamepark/rules-api");
|
|
40
|
+
var fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
|
|
41
|
+
var hooks_1 = require("../../../hooks");
|
|
42
|
+
var focus_1 = require("./focus");
|
|
43
|
+
var ItemDisplay_1 = require("./ItemDisplay");
|
|
44
|
+
var StaticItemsDisplay = function (props) {
|
|
45
|
+
var material = (0, hooks_1.useMaterialContext)().material;
|
|
46
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: Object.entries(material).map(function (_a) {
|
|
47
|
+
var stringType = _a[0], description = _a[1];
|
|
48
|
+
return description && (0, jsx_runtime_1.jsx)(StaticItemsTypeDisplay, __assign({ type: parseInt(stringType), description: description }, props), stringType);
|
|
49
|
+
}) });
|
|
50
|
+
};
|
|
51
|
+
exports.StaticItemsDisplay = StaticItemsDisplay;
|
|
52
|
+
var StaticItemsTypeDisplay = function (_a) {
|
|
53
|
+
var type = _a.type, description = _a.description, props = __rest(_a, ["type", "description"]);
|
|
54
|
+
var context = (0, hooks_1.useMaterialContext)();
|
|
55
|
+
var focus = (0, focus_1.useFocusContext)().focus;
|
|
56
|
+
var play = (0, hooks_1.usePlay)();
|
|
57
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: description.getStaticItems(context).map(function (item, index) {
|
|
58
|
+
var _a;
|
|
59
|
+
return __spreadArray([], Array((_a = item.quantity) !== null && _a !== void 0 ? _a : 1), true).map(function (_, displayIndex) {
|
|
60
|
+
var isFocused = focus === null || focus === void 0 ? void 0 : focus.staticItems.some(function (focusedItem) {
|
|
61
|
+
return focusedItem.type === type && (0, fast_deep_equal_1.default)(focusedItem.item, item);
|
|
62
|
+
});
|
|
63
|
+
return (0, jsx_runtime_1.jsx)(ItemDisplay_1.ItemDisplay, __assign({ type: type, index: index, displayIndex: displayIndex, item: item, isFocused: isFocused, onShortClick: function () { return play((0, rules_api_1.displayMaterialHelp)(type, item, index, displayIndex), { local: true }); } }, props), "".concat(type, "_").concat(index, "_").concat(displayIndex));
|
|
64
|
+
});
|
|
65
|
+
}) });
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=StaticItemsDisplay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StaticItemsDisplay.js","sourceRoot":"","sources":["../../../../src/components/material/GameTable/StaticItemsDisplay.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,iDAAyD;AACzD,oEAAmC;AACnC,wCAA4D;AAE5D,iCAAyC;AACzC,6CAA2C;AAEpC,IAAM,kBAAkB,GAAG,UAAC,KAAqC;IACtE,IAAM,QAAQ,GAAG,IAAA,0BAAkB,GAAE,CAAC,QAAQ,CAAA;IAC9C,OAAO,2DACJ,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,UAAC,EAAyB;gBAAxB,UAAU,QAAA,EAAE,WAAW,QAAA;YACrD,OAAA,WAAW,IAAI,uBAAC,sBAAsB,aAAkB,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,WAAW,EAAE,WAAW,IAAM,KAAK,GAA3E,UAAU,CAAoE;QAA1H,CAA0H,CAC3H,GACA,CAAA;AACL,CAAC,CAAA;AAPY,QAAA,kBAAkB,sBAO9B;AAQD,IAAM,sBAAsB,GAAG,UAAC,EAA4D;IAA1D,IAAA,IAAI,UA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