@gamepark/react-game 6.38.7 → 7.0.0-beta.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.
- package/dist/components/Avatar/Avatar.d.ts +6 -6
- package/dist/components/Avatar/Avatar.js +40 -63
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/ChatSpeechBubble.d.ts +8 -8
- package/dist/components/Avatar/ChatSpeechBubble.js +38 -77
- package/dist/components/Avatar/ChatSpeechBubble.js.map +1 -1
- package/dist/components/Avatar/SpeechBubble.d.ts +15 -15
- package/dist/components/Avatar/SpeechBubble.js +109 -72
- package/dist/components/Avatar/SpeechBubble.js.map +1 -1
- package/dist/components/Avatar/index.d.ts +3 -3
- package/dist/components/Avatar/index.js +3 -19
- package/dist/components/Avatar/index.js.map +1 -1
- package/dist/components/GamePoints/GamePointIcon.d.ts +2 -2
- package/dist/components/GamePoints/GamePointIcon.js +8 -25
- package/dist/components/GamePoints/GamePointIcon.js.map +1 -1
- package/dist/components/GamePoints/GamePoints.d.ts +8 -8
- package/dist/components/GamePoints/GamePoints.js +30 -73
- package/dist/components/GamePoints/GamePoints.js.map +1 -1
- package/dist/components/GamePoints/index.d.ts +2 -2
- package/dist/components/GamePoints/index.js +2 -18
- package/dist/components/GamePoints/index.js.map +1 -1
- package/dist/components/GameProvider/GameContext.d.ts +28 -28
- package/dist/components/GameProvider/GameContext.js +12 -19
- package/dist/components/GameProvider/GameContext.js.map +1 -1
- package/dist/components/GameProvider/GameProvider.d.ts +9 -9
- package/dist/components/GameProvider/GameProvider.js +106 -151
- package/dist/components/GameProvider/GameProvider.js.map +1 -1
- package/dist/components/GameProvider/index.d.ts +2 -2
- package/dist/components/GameProvider/index.js +2 -18
- package/dist/components/GameProvider/index.js.map +1 -1
- package/dist/components/Header/Header.d.ts +7 -7
- package/dist/components/Header/Header.js +35 -44
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/HeaderText.d.ts +11 -11
- package/dist/components/Header/HeaderText.js +23 -39
- package/dist/components/Header/HeaderText.js.map +1 -1
- package/dist/components/Header/MaterialHeader.d.ts +11 -11
- package/dist/components/Header/MaterialHeader.js +64 -112
- package/dist/components/Header/MaterialHeader.js.map +1 -1
- package/dist/components/Header/index.d.ts +3 -3
- package/dist/components/Header/index.js +3 -19
- package/dist/components/Header/index.js.map +1 -1
- package/dist/components/ImagesLoader/ImagesLoader.d.ts +5 -5
- package/dist/components/ImagesLoader/ImagesLoader.js +21 -26
- package/dist/components/ImagesLoader/ImagesLoader.js.map +1 -1
- package/dist/components/ImagesLoader/index.d.ts +1 -1
- package/dist/components/ImagesLoader/index.js +1 -17
- package/dist/components/ImagesLoader/index.js.map +1 -1
- package/dist/components/JournalTabs/Chat/Chat.d.ts +8 -8
- package/dist/components/JournalTabs/Chat/Chat.js +10 -36
- package/dist/components/JournalTabs/Chat/Chat.js.map +1 -1
- package/dist/components/JournalTabs/Chat/ChatMessage.d.ts +7 -7
- package/dist/components/JournalTabs/Chat/ChatMessage.js +13 -29
- package/dist/components/JournalTabs/Chat/ChatMessage.js.map +1 -1
- package/dist/components/JournalTabs/Chat/ChatMessageAuthor.d.ts +3 -3
- package/dist/components/JournalTabs/Chat/ChatMessageAuthor.js +21 -37
- package/dist/components/JournalTabs/Chat/ChatMessageAuthor.js.map +1 -1
- package/dist/components/JournalTabs/Chat/ChatTextInput.d.ts +19 -19
- package/dist/components/JournalTabs/Chat/ChatTextInput.js +74 -87
- package/dist/components/JournalTabs/Chat/ChatTextInput.js.map +1 -1
- package/dist/components/JournalTabs/Chat/CommonChat.d.ts +13 -12
- package/dist/components/JournalTabs/Chat/CommonChat.js +52 -58
- package/dist/components/JournalTabs/Chat/CommonChat.js.map +1 -1
- package/dist/components/JournalTabs/Chat/LocalChat.d.ts +6 -6
- package/dist/components/JournalTabs/Chat/LocalChat.js +13 -64
- package/dist/components/JournalTabs/Chat/LocalChat.js.map +1 -1
- package/dist/components/JournalTabs/Chat/RemoteChat.d.ts +7 -7
- package/dist/components/JournalTabs/Chat/RemoteChat.js +17 -45
- package/dist/components/JournalTabs/Chat/RemoteChat.js.map +1 -1
- package/dist/components/JournalTabs/Chat/SignInToChat.d.ts +1 -1
- package/dist/components/JournalTabs/Chat/SignInToChat.js +38 -35
- package/dist/components/JournalTabs/Chat/SignInToChat.js.map +1 -1
- package/dist/components/JournalTabs/Chat/index.d.ts +5 -5
- package/dist/components/JournalTabs/Chat/index.js +5 -21
- package/dist/components/JournalTabs/Chat/index.js.map +1 -1
- package/dist/components/JournalTabs/History/GameOverHistory.d.ts +1 -1
- package/dist/components/JournalTabs/History/GameOverHistory.js +18 -35
- package/dist/components/JournalTabs/History/GameOverHistory.js.map +1 -1
- package/dist/components/JournalTabs/History/History.d.ts +7 -7
- package/dist/components/JournalTabs/History/History.js +67 -62
- package/dist/components/JournalTabs/History/History.js.map +1 -1
- package/dist/components/JournalTabs/History/HistoryEntry.d.ts +9 -9
- package/dist/components/JournalTabs/History/HistoryEntry.js +39 -45
- package/dist/components/JournalTabs/History/HistoryEntry.js.map +1 -1
- package/dist/components/JournalTabs/History/StartGameHistory.d.ts +2 -2
- package/dist/components/JournalTabs/History/StartGameHistory.js +14 -30
- package/dist/components/JournalTabs/History/StartGameHistory.js.map +1 -1
- package/dist/components/JournalTabs/History/index.d.ts +2 -2
- package/dist/components/JournalTabs/History/index.js +2 -18
- package/dist/components/JournalTabs/History/index.js.map +1 -1
- package/dist/components/JournalTabs/JournalTabs.d.ts +6 -6
- package/dist/components/JournalTabs/JournalTabs.js +136 -93
- package/dist/components/JournalTabs/JournalTabs.js.map +1 -1
- package/dist/components/JournalTabs/index.d.ts +1 -1
- package/dist/components/JournalTabs/index.js +1 -17
- package/dist/components/JournalTabs/index.js.map +1 -1
- package/dist/components/Letterbox/Letterbox.d.ts +8 -8
- package/dist/components/Letterbox/Letterbox.js +30 -42
- package/dist/components/Letterbox/Letterbox.js.map +1 -1
- package/dist/components/Letterbox/index.d.ts +1 -1
- package/dist/components/Letterbox/index.js +1 -17
- package/dist/components/Letterbox/index.js.map +1 -1
- package/dist/components/LoadingScreen/LoadingScreen.d.ts +12 -12
- package/dist/components/LoadingScreen/LoadingScreen.js +96 -102
- package/dist/components/LoadingScreen/LoadingScreen.js.map +1 -1
- package/dist/components/LoadingScreen/index.d.ts +1 -1
- package/dist/components/LoadingScreen/index.js +1 -17
- package/dist/components/LoadingScreen/index.js.map +1 -1
- package/dist/components/Log/InternalLiveLogContainer.d.ts +6 -6
- package/dist/components/Log/InternalLiveLogContainer.js +107 -117
- package/dist/components/Log/InternalLiveLogContainer.js.map +1 -1
- package/dist/components/Log/LiveLogButton.d.ts +1 -1
- package/dist/components/Log/LiveLogButton.js +18 -34
- package/dist/components/Log/LiveLogButton.js.map +1 -1
- package/dist/components/Log/LiveLogContainer.d.ts +3 -3
- package/dist/components/Log/LiveLogContainer.js +10 -25
- package/dist/components/Log/LiveLogContainer.js.map +1 -1
- package/dist/components/Log/LogDescription.d.ts +24 -24
- package/dist/components/Log/LogDescription.js +1 -2
- package/dist/components/Log/LogItem.d.ts +11 -11
- package/dist/components/Log/LogItem.js +44 -44
- package/dist/components/Log/LogItem.js.map +1 -1
- package/dist/components/Log/index.d.ts +3 -3
- package/dist/components/Log/index.js +3 -19
- package/dist/components/Log/index.js.map +1 -1
- package/dist/components/Picture/Picture.d.ts +8 -8
- package/dist/components/Picture/Picture.js +8 -34
- package/dist/components/Picture/Picture.js.map +1 -1
- package/dist/components/Picture/index.d.ts +1 -1
- package/dist/components/Picture/index.js +1 -17
- package/dist/components/Picture/index.js.map +1 -1
- package/dist/components/PlayerPanel/Counters.d.ts +15 -15
- package/dist/components/PlayerPanel/Counters.js +93 -53
- package/dist/components/PlayerPanel/Counters.js.map +1 -1
- package/dist/components/PlayerPanel/PlayerPanel.d.ts +8 -8
- package/dist/components/PlayerPanel/PlayerPanel.js +85 -55
- package/dist/components/PlayerPanel/PlayerPanel.js.map +1 -1
- package/dist/components/PlayerPanel/StyledPlayerPanel.d.ts +24 -24
- package/dist/components/PlayerPanel/StyledPlayerPanel.js +158 -93
- package/dist/components/PlayerPanel/StyledPlayerPanel.js.map +1 -1
- package/dist/components/PlayerPanel/index.d.ts +3 -3
- package/dist/components/PlayerPanel/index.js +3 -19
- package/dist/components/PlayerPanel/index.js.map +1 -1
- package/dist/components/PlayerTimer/PlayerTimer.d.ts +13 -13
- package/dist/components/PlayerTimer/PlayerTimer.js +44 -73
- package/dist/components/PlayerTimer/PlayerTimer.js.map +1 -1
- package/dist/components/PlayerTimer/index.d.ts +1 -1
- package/dist/components/PlayerTimer/index.js +1 -17
- package/dist/components/PlayerTimer/index.js.map +1 -1
- package/dist/components/Scoring/ScoringDescription.d.ts +8 -8
- package/dist/components/Scoring/ScoringDescription.js +1 -2
- package/dist/components/Scoring/index.d.ts +1 -1
- package/dist/components/Scoring/index.js +1 -17
- package/dist/components/Scoring/index.js.map +1 -1
- package/dist/components/buttons/PlayMoveButton/PlayMoveButton.d.ts +14 -14
- package/dist/components/buttons/PlayMoveButton/PlayMoveButton.js +114 -137
- package/dist/components/buttons/PlayMoveButton/PlayMoveButton.js.map +1 -1
- package/dist/components/buttons/PlayMoveButton/index.d.ts +1 -1
- package/dist/components/buttons/PlayMoveButton/index.js +1 -17
- package/dist/components/buttons/PlayMoveButton/index.js.map +1 -1
- package/dist/components/buttons/ThemeButton/ThemeButton.d.ts +3 -3
- package/dist/components/buttons/ThemeButton/ThemeButton.js +6 -21
- package/dist/components/buttons/ThemeButton/ThemeButton.js.map +1 -1
- package/dist/components/buttons/ThemeButton/index.d.ts +1 -1
- package/dist/components/buttons/ThemeButton/index.js +1 -17
- package/dist/components/buttons/ThemeButton/index.js.map +1 -1
- package/dist/components/buttons/UndoMovesButton/UndoMovesButton.d.ts +7 -7
- package/dist/components/buttons/UndoMovesButton/UndoMovesButton.js +30 -72
- package/dist/components/buttons/UndoMovesButton/UndoMovesButton.js.map +1 -1
- package/dist/components/buttons/UndoMovesButton/index.d.ts +1 -1
- package/dist/components/buttons/UndoMovesButton/index.js +1 -17
- package/dist/components/buttons/UndoMovesButton/index.js.map +1 -1
- package/dist/components/buttons/index.d.ts +3 -3
- package/dist/components/buttons/index.js +3 -19
- package/dist/components/buttons/index.js.map +1 -1
- package/dist/components/dialogs/Dialog.d.ts +11 -11
- package/dist/components/dialogs/Dialog.js +74 -84
- package/dist/components/dialogs/Dialog.js.map +1 -1
- package/dist/components/dialogs/FailuresDialog.d.ts +2 -2
- package/dist/components/dialogs/FailuresDialog.js +50 -84
- package/dist/components/dialogs/FailuresDialog.js.map +1 -1
- package/dist/components/dialogs/ResultDialog/RematchDisplay.d.ts +6 -6
- package/dist/components/dialogs/ResultDialog/RematchDisplay.js +68 -73
- package/dist/components/dialogs/ResultDialog/RematchDisplay.js.map +1 -1
- package/dist/components/dialogs/ResultDialog/RematchSection.d.ts +5 -5
- package/dist/components/dialogs/ResultDialog/RematchSection.js +20 -41
- package/dist/components/dialogs/ResultDialog/RematchSection.js.map +1 -1
- package/dist/components/dialogs/ResultDialog/ResultDialog.d.ts +7 -7
- package/dist/components/dialogs/ResultDialog/ResultDialog.js +134 -103
- package/dist/components/dialogs/ResultDialog/ResultDialog.js.map +1 -1
- package/dist/components/dialogs/ResultDialog/index.d.ts +2 -2
- package/dist/components/dialogs/ResultDialog/index.js +2 -18
- package/dist/components/dialogs/ResultDialog/index.js.map +1 -1
- package/dist/components/dialogs/ResultDialog/useScoringTable.d.ts +2 -2
- package/dist/components/dialogs/ResultDialog/useScoringTable.js +35 -42
- package/dist/components/dialogs/ResultDialog/useScoringTable.js.map +1 -1
- package/dist/components/dialogs/RulesDialog/LocationRulesDialogContent.d.ts +5 -5
- package/dist/components/dialogs/RulesDialog/LocationRulesDialogContent.js +36 -46
- package/dist/components/dialogs/RulesDialog/LocationRulesDialogContent.js.map +1 -1
- package/dist/components/dialogs/RulesDialog/MaterialRulesDialog.d.ts +3 -3
- package/dist/components/dialogs/RulesDialog/MaterialRulesDialog.js +25 -39
- package/dist/components/dialogs/RulesDialog/MaterialRulesDialog.js.map +1 -1
- package/dist/components/dialogs/RulesDialog/MaterialRulesDialogContent.d.ts +5 -5
- package/dist/components/dialogs/RulesDialog/MaterialRulesDialogContent.js +143 -139
- package/dist/components/dialogs/RulesDialog/MaterialRulesDialogContent.js.map +1 -1
- package/dist/components/dialogs/RulesDialog/RulesDialog.d.ts +6 -6
- package/dist/components/dialogs/RulesDialog/RulesDialog.js +25 -44
- package/dist/components/dialogs/RulesDialog/RulesDialog.js.map +1 -1
- package/dist/components/dialogs/RulesDialog/RulesHelpDialogContent.d.ts +6 -6
- package/dist/components/dialogs/RulesDialog/RulesHelpDialogContent.js +38 -40
- package/dist/components/dialogs/RulesDialog/RulesHelpDialogContent.js.map +1 -1
- package/dist/components/dialogs/RulesDialog/index.d.ts +2 -2
- package/dist/components/dialogs/RulesDialog/index.js +2 -18
- package/dist/components/dialogs/RulesDialog/index.js.map +1 -1
- package/dist/components/dialogs/index.d.ts +4 -4
- package/dist/components/dialogs/index.js +4 -20
- package/dist/components/dialogs/index.js.map +1 -1
- package/dist/components/index.d.ts +17 -17
- package/dist/components/index.js +17 -33
- package/dist/components/index.js.map +1 -1
- package/dist/components/material/ComponentDescription.d.ts +52 -52
- package/dist/components/material/ComponentDescription.js +54 -40
- package/dist/components/material/ComponentDescription.js.map +1 -1
- package/dist/components/material/Dices/CubicDiceDescription.d.ts +21 -21
- package/dist/components/material/Dices/CubicDiceDescription.js +85 -132
- package/dist/components/material/Dices/CubicDiceDescription.js.map +1 -1
- package/dist/components/material/Dices/index.d.ts +1 -1
- package/dist/components/material/Dices/index.js +1 -17
- package/dist/components/material/Dices/index.js.map +1 -1
- package/dist/components/material/DraggableMaterial.d.ts +9 -9
- package/dist/components/material/DraggableMaterial.js +179 -259
- package/dist/components/material/DraggableMaterial.js.map +1 -1
- package/dist/components/material/FlatMaterial/BoardDescription.d.ts +3 -3
- package/dist/components/material/FlatMaterial/BoardDescription.js +3 -27
- package/dist/components/material/FlatMaterial/BoardDescription.js.map +1 -1
- package/dist/components/material/FlatMaterial/CardDescription.d.ts +6 -6
- package/dist/components/material/FlatMaterial/CardDescription.js +6 -31
- package/dist/components/material/FlatMaterial/CardDescription.js.map +1 -1
- package/dist/components/material/FlatMaterial/FlatMaterial.d.ts +31 -38
- package/dist/components/material/FlatMaterial/FlatMaterial.js +114 -170
- package/dist/components/material/FlatMaterial/FlatMaterial.js.map +1 -1
- package/dist/components/material/FlatMaterial/MoneyDescription.d.ts +7 -7
- package/dist/components/material/FlatMaterial/MoneyDescription.js +11 -38
- package/dist/components/material/FlatMaterial/MoneyDescription.js.map +1 -1
- package/dist/components/material/FlatMaterial/PolyhexDescription.d.ts +20 -20
- package/dist/components/material/FlatMaterial/PolyhexDescription.js +22 -48
- package/dist/components/material/FlatMaterial/PolyhexDescription.js.map +1 -1
- package/dist/components/material/FlatMaterial/TokenDescription.d.ts +10 -10
- package/dist/components/material/FlatMaterial/TokenDescription.js +12 -43
- package/dist/components/material/FlatMaterial/TokenDescription.js.map +1 -1
- package/dist/components/material/FlatMaterial/index.d.ts +6 -6
- package/dist/components/material/FlatMaterial/index.js +6 -22
- package/dist/components/material/FlatMaterial/index.js.map +1 -1
- package/dist/components/material/GameTable/DropPreview.d.ts +2 -2
- package/dist/components/material/GameTable/DropPreview.js +40 -75
- package/dist/components/material/GameTable/DropPreview.js.map +1 -1
- package/dist/components/material/GameTable/DynamicItemsDisplay.d.ts +4 -4
- package/dist/components/material/GameTable/DynamicItemsDisplay.js +29 -88
- package/dist/components/material/GameTable/DynamicItemsDisplay.js.map +1 -1
- package/dist/components/material/GameTable/GameMaterialDisplay.d.ts +7 -7
- package/dist/components/material/GameTable/GameMaterialDisplay.js +28 -33
- package/dist/components/material/GameTable/GameMaterialDisplay.js.map +1 -1
- package/dist/components/material/GameTable/GameTable.d.ts +20 -20
- package/dist/components/material/GameTable/GameTable.js +95 -142
- package/dist/components/material/GameTable/GameTable.js.map +1 -1
- package/dist/components/material/GameTable/GameTableNavigation.d.ts +6 -6
- package/dist/components/material/GameTable/GameTableNavigation.js +61 -70
- package/dist/components/material/GameTable/GameTableNavigation.js.map +1 -1
- package/dist/components/material/GameTable/ItemDisplay.d.ts +20 -21
- package/dist/components/material/GameTable/ItemDisplay.js +114 -182
- package/dist/components/material/GameTable/ItemDisplay.js.map +1 -1
- package/dist/components/material/GameTable/StaticItemsDisplay.d.ts +5 -5
- package/dist/components/material/GameTable/StaticItemsDisplay.js +33 -96
- package/dist/components/material/GameTable/StaticItemsDisplay.js.map +1 -1
- package/dist/components/material/GameTable/StaticLocationsDisplay.d.ts +5 -5
- package/dist/components/material/GameTable/StaticLocationsDisplay.js +15 -32
- package/dist/components/material/GameTable/StaticLocationsDisplay.js.map +1 -1
- package/dist/components/material/GameTable/focus/FocusProvider.d.ts +12 -10
- package/dist/components/material/GameTable/focus/FocusProvider.js +59 -99
- package/dist/components/material/GameTable/focus/FocusProvider.js.map +1 -1
- package/dist/components/material/GameTable/focus/MaterialFocus.d.ts +20 -20
- package/dist/components/material/GameTable/focus/MaterialFocus.js +1 -2
- package/dist/components/material/GameTable/focus/index.d.ts +2 -2
- package/dist/components/material/GameTable/focus/index.js +2 -18
- package/dist/components/material/GameTable/focus/index.js.map +1 -1
- package/dist/components/material/GameTable/index.d.ts +3 -3
- package/dist/components/material/GameTable/index.js +3 -19
- package/dist/components/material/GameTable/index.js.map +1 -1
- package/dist/components/material/ImageLoader/MaterialImageLoader.d.ts +5 -5
- package/dist/components/material/ImageLoader/MaterialImageLoader.js +21 -93
- package/dist/components/material/ImageLoader/MaterialImageLoader.js.map +1 -1
- package/dist/components/material/ImageLoader/index.d.ts +1 -1
- package/dist/components/material/ImageLoader/index.js +1 -17
- package/dist/components/material/ImageLoader/index.js.map +1 -1
- package/dist/components/material/ItemMenuButton.d.ts +14 -14
- package/dist/components/material/ItemMenuButton.js +46 -74
- package/dist/components/material/ItemMenuButton.js.map +1 -1
- package/dist/components/material/ItemMenuWrapper.d.ts +11 -11
- package/dist/components/material/ItemMenuWrapper.js +18 -68
- package/dist/components/material/ItemMenuWrapper.js.map +1 -1
- package/dist/components/material/MaterialComponent.d.ts +17 -17
- package/dist/components/material/MaterialComponent.js +26 -48
- package/dist/components/material/MaterialComponent.js.map +1 -1
- package/dist/components/material/MaterialComponentType.d.ts +7 -7
- package/dist/components/material/MaterialComponentType.js +8 -11
- package/dist/components/material/MaterialComponentType.js.map +1 -1
- package/dist/components/material/MaterialDescription.d.ts +176 -176
- package/dist/components/material/MaterialDescription.js +253 -295
- package/dist/components/material/MaterialDescription.js.map +1 -1
- package/dist/components/material/MobileMaterialDescription.d.ts +10 -10
- package/dist/components/material/MobileMaterialDescription.js +30 -70
- package/dist/components/material/MobileMaterialDescription.js.map +1 -1
- package/dist/components/material/Wheel/WheelContent.d.ts +14 -14
- package/dist/components/material/Wheel/WheelContent.js +37 -51
- package/dist/components/material/Wheel/WheelContent.js.map +1 -1
- package/dist/components/material/Wheel/WheelDescription.d.ts +20 -20
- package/dist/components/material/Wheel/WheelDescription.js +66 -125
- package/dist/components/material/Wheel/WheelDescription.js.map +1 -1
- package/dist/components/material/Wheel/WheelItem.d.ts +15 -15
- package/dist/components/material/Wheel/WheelItem.js +54 -53
- package/dist/components/material/Wheel/WheelItem.js.map +1 -1
- package/dist/components/material/Wheel/index.d.ts +1 -1
- package/dist/components/material/Wheel/index.js +1 -17
- package/dist/components/material/Wheel/index.js.map +1 -1
- package/dist/components/material/Writing/WritingDescription.d.ts +12 -12
- package/dist/components/material/Writing/WritingDescription.js +59 -117
- package/dist/components/material/Writing/WritingDescription.js.map +1 -1
- package/dist/components/material/Writing/index.d.ts +1 -1
- package/dist/components/material/Writing/index.js +1 -17
- package/dist/components/material/Writing/index.js.map +1 -1
- package/dist/components/material/animations/CreateItemAnimations.d.ts +20 -15
- package/dist/components/material/animations/CreateItemAnimations.js +56 -80
- package/dist/components/material/animations/CreateItemAnimations.js.map +1 -1
- package/dist/components/material/animations/DeleteItemAnimations.d.ts +19 -14
- package/dist/components/material/animations/DeleteItemAnimations.js +52 -71
- package/dist/components/material/animations/DeleteItemAnimations.js.map +1 -1
- package/dist/components/material/animations/DeleteItemAtOnceAnimations.d.ts +12 -12
- package/dist/components/material/animations/DeleteItemAtOnceAnimations.js +38 -61
- package/dist/components/material/animations/DeleteItemAtOnceAnimations.js.map +1 -1
- package/dist/components/material/animations/ItemAnimations.d.ts +16 -11
- package/dist/components/material/animations/ItemAnimations.js +23 -57
- package/dist/components/material/animations/ItemAnimations.js.map +1 -1
- package/dist/components/material/animations/MaterialAnimations.d.ts +19 -19
- package/dist/components/material/animations/MaterialAnimations.js +32 -58
- package/dist/components/material/animations/MaterialAnimations.js.map +1 -1
- package/dist/components/material/animations/MaterialGameAnimations.d.ts +33 -33
- package/dist/components/material/animations/MaterialGameAnimations.js +74 -130
- package/dist/components/material/animations/MaterialGameAnimations.js.map +1 -1
- package/dist/components/material/animations/MoveItemAnimations.d.ts +16 -16
- package/dist/components/material/animations/MoveItemAnimations.js +83 -124
- package/dist/components/material/animations/MoveItemAnimations.js.map +1 -1
- package/dist/components/material/animations/MoveItemAtOnceAnimations.d.ts +14 -14
- package/dist/components/material/animations/MoveItemAtOnceAnimations.js +40 -75
- package/dist/components/material/animations/MoveItemAtOnceAnimations.js.map +1 -1
- package/dist/components/material/animations/RollItemAnimations.d.ts +13 -13
- package/dist/components/material/animations/RollItemAnimations.js +73 -121
- package/dist/components/material/animations/RollItemAnimations.js.map +1 -1
- package/dist/components/material/animations/ShuffleAnimations.d.ts +8 -8
- package/dist/components/material/animations/ShuffleAnimations.js +11 -33
- package/dist/components/material/animations/ShuffleAnimations.js.map +1 -1
- package/dist/components/material/animations/getFirstStockItemTransforms.util.d.ts +2 -2
- package/dist/components/material/animations/getFirstStockItemTransforms.util.js +12 -30
- package/dist/components/material/animations/getFirstStockItemTransforms.util.js.map +1 -1
- package/dist/components/material/animations/index.d.ts +8 -8
- package/dist/components/material/animations/index.js +8 -26
- package/dist/components/material/animations/index.js.map +1 -1
- package/dist/components/material/animations/rotations.utils.d.ts +3 -3
- package/dist/components/material/animations/rotations.utils.js +93 -126
- package/dist/components/material/animations/rotations.utils.js.map +1 -1
- package/dist/components/material/animations/transformItem.util.d.ts +2 -2
- package/dist/components/material/animations/transformItem.util.js +7 -37
- package/dist/components/material/animations/transformItem.util.js.map +1 -1
- package/dist/components/material/index.d.ts +15 -15
- package/dist/components/material/index.js +15 -31
- package/dist/components/material/index.js.map +1 -1
- package/dist/components/material/locations/DropAreaDescription.d.ts +12 -12
- package/dist/components/material/locations/DropAreaDescription.js +23 -61
- package/dist/components/material/locations/DropAreaDescription.js.map +1 -1
- package/dist/components/material/locations/HexGridDropAreaDescription.d.ts +13 -13
- package/dist/components/material/locations/HexGridDropAreaDescription.js +52 -97
- package/dist/components/material/locations/HexGridDropAreaDescription.js.map +1 -1
- package/dist/components/material/locations/LocationComponent.d.ts +15 -16
- package/dist/components/material/locations/LocationComponent.js +70 -105
- package/dist/components/material/locations/LocationComponent.js.map +1 -1
- package/dist/components/material/locations/LocationDescription.d.ts +45 -45
- package/dist/components/material/locations/LocationDescription.js +83 -141
- package/dist/components/material/locations/LocationDescription.js.map +1 -1
- package/dist/components/material/locations/LocationDisplay.d.ts +13 -13
- package/dist/components/material/locations/LocationDisplay.js +30 -84
- package/dist/components/material/locations/LocationDisplay.js.map +1 -1
- package/dist/components/material/locations/LocationsMask.d.ts +6 -6
- package/dist/components/material/locations/LocationsMask.js +18 -39
- package/dist/components/material/locations/LocationsMask.js.map +1 -1
- package/dist/components/material/locations/SimpleDropArea.d.ts +11 -11
- package/dist/components/material/locations/SimpleDropArea.js +58 -106
- package/dist/components/material/locations/SimpleDropArea.js.map +1 -1
- package/dist/components/material/locations/index.d.ts +5 -5
- package/dist/components/material/locations/index.js +5 -21
- package/dist/components/material/locations/index.js.map +1 -1
- package/dist/components/material/sound/AudioLoader.d.ts +20 -20
- package/dist/components/material/sound/AudioLoader.js +70 -119
- package/dist/components/material/sound/AudioLoader.js.map +1 -1
- package/dist/components/material/sound/MaterialGameSounds.d.ts +8 -8
- package/dist/components/material/sound/MaterialGameSounds.js +88 -122
- package/dist/components/material/sound/MaterialGameSounds.js.map +1 -1
- package/dist/components/material/sound/MaterialSoundConfig.d.ts +11 -11
- package/dist/components/material/sound/MaterialSoundConfig.js +13 -10
- package/dist/components/material/sound/MaterialSoundConfig.js.map +1 -1
- package/dist/components/material/sound/MaterialSoundLoader.d.ts +8 -8
- package/dist/components/material/sound/MaterialSoundLoader.js +23 -79
- package/dist/components/material/sound/MaterialSoundLoader.js.map +1 -1
- package/dist/components/material/sound/index.d.ts +2 -2
- package/dist/components/material/sound/index.js +2 -18
- package/dist/components/material/sound/index.js.map +1 -1
- package/dist/components/material/sound/sound.utils.d.ts +2 -2
- package/dist/components/material/sound/sound.utils.js +10 -14
- package/dist/components/material/sound/sound.utils.js.map +1 -1
- package/dist/components/material/utils/IsLocationSubset.d.ts +2 -2
- package/dist/components/material/utils/IsLocationSubset.js +10 -17
- package/dist/components/material/utils/IsLocationSubset.js.map +1 -1
- package/dist/components/material/utils/getBestDropMove.d.ts +4 -4
- package/dist/components/material/utils/getBestDropMove.js +18 -33
- package/dist/components/material/utils/getBestDropMove.js.map +1 -1
- package/dist/components/material/utils/index.d.ts +1 -1
- package/dist/components/material/utils/index.js +1 -17
- package/dist/components/material/utils/index.js.map +1 -1
- package/dist/components/material/utils/isDroppedItem.d.ts +4 -4
- package/dist/components/material/utils/isDroppedItem.js +10 -27
- package/dist/components/material/utils/isDroppedItem.js.map +1 -1
- package/dist/components/material/utils/isPlacedOnItem.d.ts +3 -3
- package/dist/components/material/utils/isPlacedOnItem.js +9 -13
- package/dist/components/material/utils/isPlacedOnItem.js.map +1 -1
- package/dist/components/material/utils/isRotationMove.d.ts +3 -3
- package/dist/components/material/utils/isRotationMove.js +6 -24
- package/dist/components/material/utils/isRotationMove.js.map +1 -1
- package/dist/components/material/utils/useIsAnimatingPlayerAction.d.ts +1 -1
- package/dist/components/material/utils/useIsAnimatingPlayerAction.js +8 -14
- package/dist/components/material/utils/useIsAnimatingPlayerAction.js.map +1 -1
- package/dist/components/menus/EjectPlayer/EjectPlayerButton.d.ts +2 -2
- package/dist/components/menus/EjectPlayer/EjectPlayerButton.js +32 -34
- package/dist/components/menus/EjectPlayer/EjectPlayerButton.js.map +1 -1
- package/dist/components/menus/EjectPlayer/EjectPlayerDialog.d.ts +4 -10
- package/dist/components/menus/EjectPlayer/EjectPlayerDialog.js +55 -74
- package/dist/components/menus/EjectPlayer/EjectPlayerDialog.js.map +1 -1
- package/dist/components/menus/EjectPlayer/EjectPlayerPopButton.d.ts +2 -2
- package/dist/components/menus/EjectPlayer/EjectPlayerPopButton.js +27 -52
- package/dist/components/menus/EjectPlayer/EjectPlayerPopButton.js.map +1 -1
- package/dist/components/menus/EjectPlayer/index.d.ts +3 -3
- package/dist/components/menus/EjectPlayer/index.js +3 -19
- package/dist/components/menus/EjectPlayer/index.js.map +1 -1
- package/dist/components/menus/Fullscreen/FullscreenButton.d.ts +1 -1
- package/dist/components/menus/Fullscreen/FullscreenButton.js +13 -28
- package/dist/components/menus/Fullscreen/FullscreenButton.js.map +1 -1
- package/dist/components/menus/Fullscreen/FullscreenDialog.d.ts +2 -2
- package/dist/components/menus/Fullscreen/FullscreenDialog.js +38 -62
- package/dist/components/menus/Fullscreen/FullscreenDialog.js.map +1 -1
- package/dist/components/menus/Fullscreen/FullscreenPopButton.d.ts +1 -1
- package/dist/components/menus/Fullscreen/FullscreenPopButton.js +31 -56
- package/dist/components/menus/Fullscreen/FullscreenPopButton.js.map +1 -1
- package/dist/components/menus/Fullscreen/index.d.ts +3 -3
- package/dist/components/menus/Fullscreen/index.js +3 -19
- package/dist/components/menus/Fullscreen/index.js.map +1 -1
- package/dist/components/menus/GiveUpButton/GiveUpButton.d.ts +1 -1
- package/dist/components/menus/GiveUpButton/GiveUpButton.js +67 -89
- package/dist/components/menus/GiveUpButton/GiveUpButton.js.map +1 -1
- package/dist/components/menus/GiveUpButton/index.d.ts +1 -1
- package/dist/components/menus/GiveUpButton/index.js +1 -17
- package/dist/components/menus/GiveUpButton/index.js.map +1 -1
- package/dist/components/menus/Menu/LogoIcon.d.ts +2 -2
- package/dist/components/menus/Menu/LogoIcon.js +2 -17
- package/dist/components/menus/Menu/LogoIcon.js.map +1 -1
- package/dist/components/menus/Menu/Menu.d.ts +3 -3
- package/dist/components/menus/Menu/Menu.js +130 -117
- package/dist/components/menus/Menu/Menu.js.map +1 -1
- package/dist/components/menus/Menu/MenuPopButton.d.ts +7 -7
- package/dist/components/menus/Menu/MenuPopButton.js +29 -68
- package/dist/components/menus/Menu/MenuPopButton.js.map +1 -1
- package/dist/components/menus/Menu/NavButton.d.ts +7 -7
- package/dist/components/menus/Menu/NavButton.js +3 -32
- package/dist/components/menus/Menu/NavButton.js.map +1 -1
- package/dist/components/menus/Menu/index.d.ts +1 -1
- package/dist/components/menus/Menu/index.js +1 -17
- package/dist/components/menus/Menu/index.js.map +1 -1
- package/dist/components/menus/PlayerQuit/TrackPlayersQuit.d.ts +1 -1
- package/dist/components/menus/PlayerQuit/TrackPlayersQuit.js +30 -63
- package/dist/components/menus/PlayerQuit/TrackPlayersQuit.js.map +1 -1
- package/dist/components/menus/PlayerQuit/index.d.ts +1 -1
- package/dist/components/menus/PlayerQuit/index.js +1 -17
- package/dist/components/menus/PlayerQuit/index.js.map +1 -1
- package/dist/components/menus/RestartTutorialButton/RestartTutorialButton.d.ts +1 -1
- package/dist/components/menus/RestartTutorialButton/RestartTutorialButton.js +19 -35
- package/dist/components/menus/RestartTutorialButton/RestartTutorialButton.js.map +1 -1
- package/dist/components/menus/RestartTutorialButton/index.d.ts +1 -1
- package/dist/components/menus/RestartTutorialButton/index.js +1 -17
- package/dist/components/menus/RestartTutorialButton/index.js.map +1 -1
- package/dist/components/menus/Result/Medal.d.ts +4 -4
- package/dist/components/menus/Result/Medal.js +14 -41
- package/dist/components/menus/Result/Medal.js.map +1 -1
- package/dist/components/menus/Result/MedalBronze.d.ts +2 -2
- package/dist/components/menus/Result/MedalBronze.js +2 -17
- package/dist/components/menus/Result/MedalBronze.js.map +1 -1
- package/dist/components/menus/Result/MedalGold.d.ts +2 -2
- package/dist/components/menus/Result/MedalGold.js +2 -17
- package/dist/components/menus/Result/MedalGold.js.map +1 -1
- package/dist/components/menus/Result/MedalSilver.d.ts +2 -2
- package/dist/components/menus/Result/MedalSilver.js +2 -17
- package/dist/components/menus/Result/MedalSilver.js.map +1 -1
- package/dist/components/menus/Result/ResultButton.d.ts +2 -2
- package/dist/components/menus/Result/ResultButton.js +10 -25
- package/dist/components/menus/Result/ResultButton.js.map +1 -1
- package/dist/components/menus/Result/ResultPopButton.d.ts +2 -2
- package/dist/components/menus/Result/ResultPopButton.js +48 -37
- package/dist/components/menus/Result/ResultPopButton.js.map +1 -1
- package/dist/components/menus/Result/index.d.ts +3 -3
- package/dist/components/menus/Result/index.js +3 -19
- package/dist/components/menus/Result/index.js.map +1 -1
- package/dist/components/menus/SoundButton/SoundButton.d.ts +1 -1
- package/dist/components/menus/SoundButton/SoundButton.js +13 -28
- package/dist/components/menus/SoundButton/SoundButton.js.map +1 -1
- package/dist/components/menus/SoundButton/index.d.ts +1 -1
- package/dist/components/menus/SoundButton/index.js +1 -17
- package/dist/components/menus/SoundButton/index.js.map +1 -1
- package/dist/components/menus/TimeStatsButton/TimeStatsButton.d.ts +1 -1
- package/dist/components/menus/TimeStatsButton/TimeStatsButton.js +80 -93
- package/dist/components/menus/TimeStatsButton/TimeStatsButton.js.map +1 -1
- package/dist/components/menus/TimeStatsButton/index.d.ts +1 -1
- package/dist/components/menus/TimeStatsButton/index.js +1 -17
- package/dist/components/menus/TimeStatsButton/index.js.map +1 -1
- package/dist/components/menus/UndoButton/UndoButton.d.ts +1 -1
- package/dist/components/menus/UndoButton/UndoButton.js +13 -44
- package/dist/components/menus/UndoButton/UndoButton.js.map +1 -1
- package/dist/components/menus/UndoButton/UndoPopButton.d.ts +1 -1
- package/dist/components/menus/UndoButton/UndoPopButton.js +26 -51
- package/dist/components/menus/UndoButton/UndoPopButton.js.map +1 -1
- package/dist/components/menus/UndoButton/index.d.ts +2 -2
- package/dist/components/menus/UndoButton/index.js +2 -18
- package/dist/components/menus/UndoButton/index.js.map +1 -1
- package/dist/components/menus/index.d.ts +6 -6
- package/dist/components/menus/index.js +6 -22
- package/dist/components/menus/index.js.map +1 -1
- package/dist/components/menus/menuCss.d.ts +9 -9
- package/dist/components/menus/menuCss.js +102 -19
- package/dist/components/menus/menuCss.js.map +1 -1
- package/dist/components/tutorial/MaterialTutorial.d.ts +43 -43
- package/dist/components/tutorial/MaterialTutorial.js +32 -40
- package/dist/components/tutorial/MaterialTutorial.js.map +1 -1
- package/dist/components/tutorial/MaterialTutorialDisplay.d.ts +1 -1
- package/dist/components/tutorial/MaterialTutorialDisplay.js +97 -112
- package/dist/components/tutorial/MaterialTutorialDisplay.js.map +1 -1
- package/dist/components/tutorial/TutorialRulesWrapper.d.ts +3 -3
- package/dist/components/tutorial/TutorialRulesWrapper.js +133 -146
- package/dist/components/tutorial/TutorialRulesWrapper.js.map +1 -1
- package/dist/components/tutorial/index.d.ts +1 -1
- package/dist/components/tutorial/index.js +1 -17
- package/dist/components/tutorial/index.js.map +1 -1
- package/dist/css/GameTheme.d.ts +23 -23
- package/dist/css/GameTheme.js +18 -21
- package/dist/css/GameTheme.js.map +1 -1
- package/dist/css/addStylesheetUrl.d.ts +1 -1
- package/dist/css/addStylesheetUrl.js +6 -10
- package/dist/css/addStylesheetUrl.js.map +1 -1
- package/dist/css/backgroundCss.d.ts +1 -1
- package/dist/css/backgroundCss.js +5 -11
- package/dist/css/backgroundCss.js.map +1 -1
- package/dist/css/buttonCss.d.ts +3 -3
- package/dist/css/buttonCss.js +45 -13
- package/dist/css/buttonCss.js.map +1 -1
- package/dist/css/componentSizeCss.d.ts +5 -5
- package/dist/css/componentSizeCss.js +17 -22
- package/dist/css/componentSizeCss.js.map +1 -1
- package/dist/css/cursorCss.d.ts +3 -3
- package/dist/css/cursorCss.js +10 -12
- package/dist/css/cursorCss.js.map +1 -1
- package/dist/css/fadeIn.d.ts +1 -1
- package/dist/css/fadeIn.js +9 -12
- package/dist/css/fadeIn.js.map +1 -1
- package/dist/css/index.d.ts +10 -10
- package/dist/css/index.js +10 -26
- package/dist/css/index.js.map +1 -1
- package/dist/css/shadowEffect.d.ts +1 -1
- package/dist/css/shadowEffect.js +15 -10
- package/dist/css/shadowEffect.js.map +1 -1
- package/dist/css/shineEffect.d.ts +1 -1
- package/dist/css/shineEffect.js +31 -11
- package/dist/css/shineEffect.js.map +1 -1
- package/dist/css/transformCss.d.ts +2 -2
- package/dist/css/transformCss.js +7 -18
- package/dist/css/transformCss.js.map +1 -1
- package/dist/hooks/index.d.ts +26 -27
- package/dist/hooks/index.js +26 -43
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useActions.d.ts +2 -2
- package/dist/hooks/useActions.js +2 -8
- package/dist/hooks/useActions.js.map +1 -1
- package/dist/hooks/useAnimations.d.ts +4 -4
- package/dist/hooks/useAnimations.js +24 -58
- package/dist/hooks/useAnimations.js.map +1 -1
- package/dist/hooks/useDraggedItem.d.ts +2 -2
- package/dist/hooks/useDraggedItem.js +14 -34
- package/dist/hooks/useDraggedItem.js.map +1 -1
- package/dist/hooks/useFlatHistory.d.ts +13 -13
- package/dist/hooks/useFlatHistory.js +91 -162
- package/dist/hooks/useFlatHistory.js.map +1 -1
- package/dist/hooks/useFullscreen.d.ts +5 -5
- package/dist/hooks/useFullscreen.js +28 -51
- package/dist/hooks/useFullscreen.js.map +1 -1
- package/dist/hooks/useGame.d.ts +1 -1
- package/dist/hooks/useGame.js +4 -8
- package/dist/hooks/useGame.js.map +1 -1
- package/dist/hooks/useGiveUp.d.ts +1 -1
- package/dist/hooks/useGiveUp.js +11 -16
- package/dist/hooks/useGiveUp.js.map +1 -1
- package/dist/hooks/useItemLocations.d.ts +8 -8
- package/dist/hooks/useItemLocations.js +51 -126
- package/dist/hooks/useItemLocations.js.map +1 -1
- package/dist/hooks/useItemLocator.d.ts +2 -2
- package/dist/hooks/useItemLocator.js +4 -9
- package/dist/hooks/useItemLocator.js.map +1 -1
- package/dist/hooks/useKeyDown.d.ts +1 -1
- package/dist/hooks/useKeyDown.js +12 -16
- package/dist/hooks/useKeyDown.js.map +1 -1
- package/dist/hooks/useLegalMoves.d.ts +2 -2
- package/dist/hooks/useLegalMoves.js +14 -19
- package/dist/hooks/useLegalMoves.js.map +1 -1
- package/dist/hooks/useLocators.d.ts +1 -1
- package/dist/hooks/useLocators.js +3 -7
- package/dist/hooks/useLocators.js.map +1 -1
- package/dist/hooks/useMaterialContext.d.ts +2 -2
- package/dist/hooks/useMaterialContext.js +12 -17
- package/dist/hooks/useMaterialContext.js.map +1 -1
- package/dist/hooks/useMaterialDescription.d.ts +2 -2
- package/dist/hooks/useMaterialDescription.js +5 -10
- package/dist/hooks/useMaterialDescription.js.map +1 -1
- package/dist/hooks/useNow.d.ts +6 -6
- package/dist/hooks/useNow.js +16 -37
- package/dist/hooks/useNow.js.map +1 -1
- package/dist/hooks/useNumberOfPlayers.d.ts +1 -1
- package/dist/hooks/useNumberOfPlayers.js +2 -6
- package/dist/hooks/useNumberOfPlayers.js.map +1 -1
- package/dist/hooks/useOpponentWithMaxTime.d.ts +5 -5
- package/dist/hooks/useOpponentWithMaxTime.js +38 -60
- package/dist/hooks/useOpponentWithMaxTime.js.map +1 -1
- package/dist/hooks/usePlay.d.ts +2 -2
- package/dist/hooks/usePlay.js +7 -23
- package/dist/hooks/usePlay.js.map +1 -1
- package/dist/hooks/usePlayerId.d.ts +2 -2
- package/dist/hooks/usePlayerId.js +4 -10
- package/dist/hooks/usePlayerId.js.map +1 -1
- package/dist/hooks/usePlayerName.d.ts +1 -1
- package/dist/hooks/usePlayerName.js +20 -26
- package/dist/hooks/usePlayerName.js.map +1 -1
- package/dist/hooks/usePlayerTime.d.ts +1 -1
- package/dist/hooks/usePlayerTime.js +29 -50
- package/dist/hooks/usePlayerTime.js.map +1 -1
- package/dist/hooks/usePlayers.d.ts +8 -8
- package/dist/hooks/usePlayers.js +61 -95
- package/dist/hooks/usePlayers.js.map +1 -1
- package/dist/hooks/useRankedPlayers.d.ts +5 -5
- package/dist/hooks/useRankedPlayers.js +32 -37
- package/dist/hooks/useRankedPlayers.js.map +1 -1
- package/dist/hooks/useResultText.d.ts +1 -1
- package/dist/hooks/useResultText.js +67 -71
- package/dist/hooks/useResultText.js.map +1 -1
- package/dist/hooks/useRules.d.ts +2 -2
- package/dist/hooks/useRules.js +14 -18
- package/dist/hooks/useRules.js.map +1 -1
- package/dist/hooks/useSound.d.ts +1 -1
- package/dist/hooks/useSound.js +15 -35
- package/dist/hooks/useSound.js.map +1 -1
- package/dist/hooks/useStaticLocations.d.ts +2 -2
- package/dist/hooks/useStaticLocations.js +35 -102
- package/dist/hooks/useStaticLocations.js.map +1 -1
- package/dist/hooks/useTutorialStep.d.ts +2 -2
- package/dist/hooks/useTutorialStep.js +10 -14
- package/dist/hooks/useTutorialStep.js.map +1 -1
- package/dist/hooks/useUndo.d.ts +7 -7
- package/dist/hooks/useUndo.js +64 -102
- package/dist/hooks/useUndo.js.map +1 -1
- package/dist/hooks/useWebP.d.ts +1 -1
- package/dist/hooks/useWebP.js +12 -79
- package/dist/hooks/useWebP.js.map +1 -1
- package/dist/hooks/useZoomToElements.d.ts +13 -13
- package/dist/hooks/useZoomToElements.js +59 -92
- package/dist/hooks/useZoomToElements.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +5 -23
- package/dist/index.js.map +1 -1
- package/dist/locators/DeckLocator.d.ts +10 -10
- package/dist/locators/DeckLocator.js +12 -34
- package/dist/locators/DeckLocator.js.map +1 -1
- package/dist/locators/FlexLocator.d.ts +57 -57
- package/dist/locators/FlexLocator.js +104 -117
- package/dist/locators/FlexLocator.js.map +1 -1
- package/dist/locators/HandLocator.d.ts +96 -96
- package/dist/locators/HandLocator.js +151 -176
- package/dist/locators/HandLocator.js.map +1 -1
- package/dist/locators/HexagonalGridLocator.d.ts +95 -95
- package/dist/locators/HexagonalGridLocator.js +250 -308
- package/dist/locators/HexagonalGridLocator.js.map +1 -1
- package/dist/locators/ListLocator.d.ts +54 -54
- package/dist/locators/ListLocator.js +109 -123
- package/dist/locators/ListLocator.js.map +1 -1
- package/dist/locators/Locator.d.ts +275 -275
- package/dist/locators/Locator.js +375 -421
- package/dist/locators/Locator.js.map +1 -1
- package/dist/locators/PileLocator.d.ts +53 -53
- package/dist/locators/PileLocator.js +123 -184
- package/dist/locators/PileLocator.js.map +1 -1
- package/dist/locators/index.d.ts +8 -8
- package/dist/locators/index.js +8 -24
- package/dist/locators/index.js.map +1 -1
- package/dist/locators/utils/getRelativePlayerIndex.util.d.ts +2 -2
- package/dist/locators/utils/getRelativePlayerIndex.util.js +8 -14
- package/dist/locators/utils/getRelativePlayerIndex.util.js.map +1 -1
- package/dist/locators/utils/index.d.ts +1 -1
- package/dist/locators/utils/index.js +1 -17
- package/dist/locators/utils/index.js.map +1 -1
- package/dist/utilities/DeepPartial.d.ts +6 -6
- package/dist/utilities/DeepPartial.js +1 -2
- package/dist/utilities/combineEventListeners.d.ts +7 -7
- package/dist/utilities/combineEventListeners.js +15 -49
- package/dist/utilities/combineEventListeners.js.map +1 -1
- package/dist/utilities/findIfUnique.util.d.ts +7 -7
- package/dist/utilities/findIfUnique.util.js +18 -22
- package/dist/utilities/findIfUnique.util.js.map +1 -1
- package/dist/utilities/index.d.ts +4 -4
- package/dist/utilities/index.js +4 -20
- package/dist/utilities/index.js.map +1 -1
- package/dist/utilities/translation.util.d.ts +10 -10
- package/dist/utilities/translation.util.js +27 -37
- package/dist/utilities/translation.util.js.map +1 -1
- package/dist/utilities/zoom-pan-pinch/animations.constants.d.ts +16 -16
- package/dist/utilities/zoom-pan-pinch/animations.constants.js +78 -81
- package/dist/utilities/zoom-pan-pinch/animations.constants.js.map +1 -1
- package/dist/utilities/zoom-pan-pinch/animations.util.d.ts +8 -8
- package/dist/utilities/zoom-pan-pinch/animations.util.js +71 -77
- package/dist/utilities/zoom-pan-pinch/animations.util.js.map +1 -1
- package/dist/utilities/zoom-pan-pinch/bounds.util.d.ts +17 -17
- package/dist/utilities/zoom-pan-pinch/bounds.util.js +75 -84
- package/dist/utilities/zoom-pan-pinch/bounds.util.js.map +1 -1
- package/dist/utilities/zoom-pan-pinch/calculation.util.d.ts +14 -14
- package/dist/utilities/zoom-pan-pinch/calculation.util.js +18 -23
- package/dist/utilities/zoom-pan-pinch/calculation.util.js.map +1 -1
- package/dist/utilities/zoom-pan-pinch/index.d.ts +9 -9
- package/dist/utilities/zoom-pan-pinch/index.js +9 -25
- package/dist/utilities/zoom-pan-pinch/index.js.map +1 -1
- package/dist/utilities/zoom-pan-pinch/zoom.util.d.ts +4 -4
- package/dist/utilities/zoom-pan-pinch/zoom.util.js +12 -16
- package/dist/utilities/zoom-pan-pinch/zoom.util.js.map +1 -1
- package/package.json +83 -77
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFlatHistory.js","sourceRoot":"","sources":["../../src/hooks/useFlatHistory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFlatHistory.js","sourceRoot":"","sources":["../../src/hooks/useFlatHistory.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAErF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC/D,OAAO,EAAE,WAAW,EAA4B,MAAM,eAAe,CAAA;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAU3C,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC,CAAA;IACvC,MAAM,MAAM,GAAG,WAAW,EAA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C,OAAO,CAAC,CAAC,CAAA;QAC1E,CAAC;QAED,KAAK,CAAC,OAAO,GAAG,WAAW,CAAA;IAC7B,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAA;IAEjB,OAAO;QACL,OAAO;QACP,QAAQ;KACT,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const useFullscreen: () => {
|
|
2
|
-
fullscreen: boolean;
|
|
3
|
-
toggleFullscreen: () => void;
|
|
4
|
-
setFullscreen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
5
|
-
};
|
|
1
|
+
export declare const useFullscreen: () => {
|
|
2
|
+
fullscreen: boolean;
|
|
3
|
+
toggleFullscreen: () => void;
|
|
4
|
+
setFullscreen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
5
|
+
};
|
|
@@ -1,52 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var useFullscreen = function () {
|
|
30
|
-
var _a = __read((0, react_1.useState)(!fscreen_1.default.fullscreenEnabled), 2), fullscreen = _a[0], setFullscreen = _a[1];
|
|
31
|
-
var toggleFullscreen = function () { return fullscreen ? fscreen_1.default.exitFullscreen() : fscreen_1.default.requestFullscreen(document.getElementById('root')); };
|
|
32
|
-
var onFullscreenChange = function () {
|
|
33
|
-
setFullscreen(fscreen_1.default.fullscreenElement != null);
|
|
34
|
-
if (fscreen_1.default.fullscreenElement) {
|
|
35
|
-
o9n_1.orientation.lock('landscape')
|
|
36
|
-
.then(function () { return noSleep.enable(); })
|
|
37
|
-
.catch(function () { return console.info('screen orientation cannot be locked on this device'); });
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
noSleep.disable();
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
(0, react_1.useEffect)(function () {
|
|
44
|
-
fscreen_1.default.addEventListener('fullscreenchange', onFullscreenChange);
|
|
45
|
-
return function () {
|
|
46
|
-
fscreen_1.default.removeEventListener('fullscreenchange', onFullscreenChange);
|
|
47
|
-
};
|
|
48
|
-
}, []);
|
|
49
|
-
return { fullscreen: fullscreen, toggleFullscreen: toggleFullscreen, setFullscreen: setFullscreen };
|
|
50
|
-
};
|
|
51
|
-
exports.useFullscreen = useFullscreen;
|
|
1
|
+
import fscreen from 'fscreen';
|
|
2
|
+
import NoSleep from 'nosleep.js';
|
|
3
|
+
// @ts-ignore (@type/o9n does not exist yet)
|
|
4
|
+
import { orientation } from 'o9n';
|
|
5
|
+
import { useEffect, useState } from 'react';
|
|
6
|
+
const noSleep = new NoSleep();
|
|
7
|
+
export const useFullscreen = () => {
|
|
8
|
+
const [fullscreen, setFullscreen] = useState(!fscreen.fullscreenEnabled);
|
|
9
|
+
const toggleFullscreen = () => fullscreen ? fscreen.exitFullscreen() : fscreen.requestFullscreen(document.getElementById('root'));
|
|
10
|
+
const onFullscreenChange = () => {
|
|
11
|
+
setFullscreen(fscreen.fullscreenElement != null);
|
|
12
|
+
if (fscreen.fullscreenElement) {
|
|
13
|
+
orientation.lock('landscape')
|
|
14
|
+
.then(() => noSleep.enable())
|
|
15
|
+
.catch(() => console.info('screen orientation cannot be locked on this device'));
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
noSleep.disable();
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
fscreen.addEventListener('fullscreenchange', onFullscreenChange);
|
|
23
|
+
return () => {
|
|
24
|
+
fscreen.removeEventListener('fullscreenchange', onFullscreenChange);
|
|
25
|
+
};
|
|
26
|
+
}, []);
|
|
27
|
+
return { fullscreen, toggleFullscreen, setFullscreen };
|
|
28
|
+
};
|
|
52
29
|
//# sourceMappingURL=useFullscreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFullscreen.js","sourceRoot":"","sources":["../../src/hooks/useFullscreen.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFullscreen.js","sourceRoot":"","sources":["../../src/hooks/useFullscreen.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,OAAO,MAAM,YAAY,CAAA;AAChC,4CAA4C;AAC5C,OAAO,EAAC,WAAW,EAAC,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAA;AAEzC,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAA;AAE7B,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAA;IAExE,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAE,CAAC,CAAA;IAElI,MAAM,kBAAkB,GAAG,GAAG,EAAE;QAC9B,aAAa,CAAC,OAAO,CAAC,iBAAiB,IAAI,IAAI,CAAC,CAAA;QAChD,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;YAC9B,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC;iBAC1B,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;iBAC5B,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC,CAAA;QACpF,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,OAAO,EAAE,CAAA;QACnB,CAAC;IACH,CAAC,CAAA;IAED,SAAS,CAAC,GAAG,EAAE;QACb,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAA;QAChE,OAAO,GAAG,EAAE;YACV,OAAO,CAAC,mBAAmB,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAA;QACrE,CAAC,CAAA;IACH,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAC,CAAA;AACtD,CAAC,CAAA"}
|
package/dist/hooks/useGame.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useGame<Game>(): Game | undefined;
|
|
1
|
+
export declare function useGame<Game>(): Game | undefined;
|
package/dist/hooks/useGame.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function useGame() {
|
|
6
|
-
return (0, react_redux_1.useSelector)(function (state) { return state.state; });
|
|
7
|
-
}
|
|
8
|
-
exports.useGame = useGame;
|
|
1
|
+
import { useGameSelector } from '@gamepark/react-client';
|
|
2
|
+
export function useGame() {
|
|
3
|
+
return useGameSelector((state) => state.state);
|
|
4
|
+
}
|
|
9
5
|
//# sourceMappingURL=useGame.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGame.js","sourceRoot":"","sources":["../../src/hooks/useGame.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useGame.js","sourceRoot":"","sources":["../../src/hooks/useGame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAExD,MAAM,UAAU,OAAO;IACrB,OAAO,eAAe,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;AAChD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useGiveUp: () => [() => void, boolean];
|
|
1
|
+
export declare const useGiveUp: () => [() => void, boolean];
|
package/dist/hooks/useGiveUp.js
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var gameMode = (0, react_redux_1.useSelector)(function (state) { return state.gameMode; });
|
|
13
|
-
var canGiveUp = playerId !== undefined && !gameOver && gameMode !== react_client_1.GameMode.TUTORIAL;
|
|
14
|
-
return [giveUp, canGiveUp];
|
|
15
|
-
};
|
|
16
|
-
exports.useGiveUp = useGiveUp;
|
|
1
|
+
import { GameMode, giveUp, useGameDispatch, useGameSelector } from '@gamepark/react-client';
|
|
2
|
+
import { usePlayerId } from './usePlayerId';
|
|
3
|
+
export const useGiveUp = () => {
|
|
4
|
+
const dispatch = useGameDispatch();
|
|
5
|
+
const doGiveUp = () => dispatch(giveUp());
|
|
6
|
+
const playerId = usePlayerId();
|
|
7
|
+
const gameOver = useGameSelector((state) => state.gameOver);
|
|
8
|
+
const gameMode = useGameSelector((state) => state.gameMode);
|
|
9
|
+
const canGiveUp = playerId !== undefined && !gameOver && gameMode !== GameMode.TUTORIAL;
|
|
10
|
+
return [doGiveUp, canGiveUp];
|
|
11
|
+
};
|
|
17
12
|
//# sourceMappingURL=useGiveUp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGiveUp.js","sourceRoot":"","sources":["../../src/hooks/useGiveUp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useGiveUp.js","sourceRoot":"","sources":["../../src/hooks/useGiveUp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,MAAM,CAAC,MAAM,SAAS,GAAG,GAA0B,EAAE;IACnD,MAAM,QAAQ,GAAG,eAAe,EAAE,CAAA;IAClC,MAAM,QAAQ,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;IACzC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAC9B,MAAM,QAAQ,GAAG,eAAe,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC3D,MAAM,QAAQ,GAAG,eAAe,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC3D,MAAM,SAAS,GAAG,QAAQ,KAAK,SAAS,IAAI,CAAC,QAAQ,IAAI,QAAQ,KAAK,QAAQ,CAAC,QAAQ,CAAA;IACvF,OAAO,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAA;AAC9B,CAAC,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Location, MaterialItem } from '@gamepark/rules-api';
|
|
2
|
-
import { ItemContext } from '../locators';
|
|
3
|
-
export type LocationFocusRef<P extends number = number, L extends number = number> = {
|
|
4
|
-
location: Location<P, L>;
|
|
5
|
-
focusRef?: (ref: HTMLElement | null) => void;
|
|
6
|
-
};
|
|
7
|
-
export declare function useItemLocations<P extends number = number, M extends number = number, L extends number = number>(item: MaterialItem<P, L>, context: ItemContext<P, M, L>): LocationFocusRef<P, L>[];
|
|
8
|
-
export declare const useExpectedDropLocations: <P extends number = number, M extends number = number, L extends number = number>() => Location<P, L
|
|
1
|
+
import { Location, MaterialItem } from '@gamepark/rules-api';
|
|
2
|
+
import { ItemContext } from '../locators';
|
|
3
|
+
export type LocationFocusRef<P extends number = number, L extends number = number> = {
|
|
4
|
+
location: Location<P, L>;
|
|
5
|
+
focusRef?: (ref: HTMLElement | null) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function useItemLocations<P extends number = number, M extends number = number, L extends number = number>(item: MaterialItem<P, L>, context: ItemContext<P, M, L>): LocationFocusRef<P, L>[];
|
|
8
|
+
export declare const useExpectedDropLocations: <P extends number = number, M extends number = number, L extends number = number>() => Location<P, L>[];
|
|
@@ -1,127 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
};
|
|
52
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
-
exports.useExpectedDropLocations = exports.useItemLocations = void 0;
|
|
54
|
-
var uniqWith_1 = __importDefault(require("lodash/uniqWith"));
|
|
55
|
-
var isEqual_1 = __importDefault(require("lodash/isEqual"));
|
|
56
|
-
var react_1 = require("react");
|
|
57
|
-
var components_1 = require("../components");
|
|
58
|
-
var useDraggedItem_1 = require("./useDraggedItem");
|
|
59
|
-
var useLegalMoves_1 = require("./useLegalMoves");
|
|
60
|
-
var useMaterialContext_1 = require("./useMaterialContext");
|
|
61
|
-
function useItemLocations(item, context) {
|
|
62
|
-
var e_1, _a;
|
|
63
|
-
var _b, _c, _d, _e;
|
|
64
|
-
var type = context.type, locators = context.locators, material = context.material;
|
|
65
|
-
var _f = (0, components_1.useFocusContext)(), focus = _f.focus, focusRef = _f.focusRef;
|
|
66
|
-
if (!item)
|
|
67
|
-
return [];
|
|
68
|
-
var locations = (_c = (_b = material[type]) === null || _b === void 0 ? void 0 : _b.getLocations(item, context).map(function (l) { return l; })) !== null && _c !== void 0 ? _c : [];
|
|
69
|
-
var _loop_1 = function (locationType) {
|
|
70
|
-
var locator = locators[locationType];
|
|
71
|
-
if (locator.parentItemType === type) {
|
|
72
|
-
locations.push.apply(locations, __spreadArray([], __read(locator.getLocations(context).map(function (location) { return (__assign({ type: locationType }, location)); })), false));
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
for (var locationType in locators) {
|
|
76
|
-
_loop_1(locationType);
|
|
77
|
-
}
|
|
78
|
-
var result = locations.map(function (location) { return ({ location: location }); });
|
|
79
|
-
var locationsFocus = (_e = (_d = focus === null || focus === void 0 ? void 0 : focus.locations) === null || _d === void 0 ? void 0 : _d.filter(function (location) {
|
|
80
|
-
var locator = locators[location.type];
|
|
81
|
-
return (locator === null || locator === void 0 ? void 0 : locator.parentItemType) === type && (0, isEqual_1.default)(locator.getParentItem(location, context), item);
|
|
82
|
-
})) !== null && _e !== void 0 ? _e : [];
|
|
83
|
-
var _loop_2 = function (location_1) {
|
|
84
|
-
var index = result.findIndex(function (r) { return (0, isEqual_1.default)(r.location, location_1); });
|
|
85
|
-
if (index !== -1) {
|
|
86
|
-
result[index].focusRef = focusRef;
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
result.push({ location: location_1, focusRef: focusRef });
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
try {
|
|
93
|
-
for (var locationsFocus_1 = __values(locationsFocus), locationsFocus_1_1 = locationsFocus_1.next(); !locationsFocus_1_1.done; locationsFocus_1_1 = locationsFocus_1.next()) {
|
|
94
|
-
var location_1 = locationsFocus_1_1.value;
|
|
95
|
-
_loop_2(location_1);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
99
|
-
finally {
|
|
100
|
-
try {
|
|
101
|
-
if (locationsFocus_1_1 && !locationsFocus_1_1.done && (_a = locationsFocus_1.return)) _a.call(locationsFocus_1);
|
|
102
|
-
}
|
|
103
|
-
finally { if (e_1) throw e_1.error; }
|
|
104
|
-
}
|
|
105
|
-
return result;
|
|
106
|
-
}
|
|
107
|
-
exports.useItemLocations = useItemLocations;
|
|
108
|
-
var useExpectedDropLocations = function () {
|
|
109
|
-
var context = (0, useMaterialContext_1.useMaterialContext)();
|
|
110
|
-
var draggedItem = (0, useDraggedItem_1.useDraggedItem)();
|
|
111
|
-
var legalMoves = (0, useLegalMoves_1.useLegalMoves)();
|
|
112
|
-
return (0, react_1.useMemo)(function () {
|
|
113
|
-
var _a;
|
|
114
|
-
if (!draggedItem) {
|
|
115
|
-
delete context.expectedDropLocations;
|
|
116
|
-
}
|
|
117
|
-
else if (!context.expectedDropLocations) {
|
|
118
|
-
var description_1 = context.material[draggedItem.type];
|
|
119
|
-
var itemContext_1 = __assign(__assign({}, context), draggedItem);
|
|
120
|
-
var dragMoves = legalMoves.filter(function (move) { return description_1.canDrag(move, itemContext_1); });
|
|
121
|
-
context.expectedDropLocations = (0, uniqWith_1.default)(description_1.getDropLocations(itemContext_1, dragMoves), isEqual_1.default);
|
|
122
|
-
}
|
|
123
|
-
return (_a = context.expectedDropLocations) !== null && _a !== void 0 ? _a : [];
|
|
124
|
-
}, [draggedItem]);
|
|
125
|
-
};
|
|
126
|
-
exports.useExpectedDropLocations = useExpectedDropLocations;
|
|
1
|
+
import { isEqual, uniqWith } from 'es-toolkit';
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { useFocusContext } from '../components';
|
|
4
|
+
import { useDraggedItem } from './useDraggedItem';
|
|
5
|
+
import { useLegalMoves } from './useLegalMoves';
|
|
6
|
+
import { useMaterialContext } from './useMaterialContext';
|
|
7
|
+
export function useItemLocations(item, context) {
|
|
8
|
+
const { type, locators, material } = context;
|
|
9
|
+
const { focus, focusRef } = useFocusContext();
|
|
10
|
+
if (!item)
|
|
11
|
+
return [];
|
|
12
|
+
const locations = material[type]?.getLocations(item, context).map(l => l) ?? [];
|
|
13
|
+
for (const locationType in locators) {
|
|
14
|
+
const locator = locators[locationType];
|
|
15
|
+
if (locator.parentItemType === type) {
|
|
16
|
+
locations.push(...locator.getLocations(context).map(location => ({ type: locationType, ...location })));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const result = locations.map(location => ({ location }));
|
|
20
|
+
const locationsFocus = focus?.locations?.filter(location => {
|
|
21
|
+
const locator = locators[location.type];
|
|
22
|
+
return locator?.parentItemType === type && isEqual(locator.getParentItem(location, context), item);
|
|
23
|
+
}) ?? [];
|
|
24
|
+
for (const location of locationsFocus) {
|
|
25
|
+
const index = result.findIndex(r => isEqual(r.location, location));
|
|
26
|
+
if (index !== -1) {
|
|
27
|
+
result[index].focusRef = focusRef;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
result.push({ location, focusRef });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
export const useExpectedDropLocations = () => {
|
|
36
|
+
const context = useMaterialContext();
|
|
37
|
+
const draggedItem = useDraggedItem();
|
|
38
|
+
const legalMoves = useLegalMoves();
|
|
39
|
+
return useMemo(() => {
|
|
40
|
+
if (!draggedItem) {
|
|
41
|
+
delete context.expectedDropLocations;
|
|
42
|
+
}
|
|
43
|
+
else if (!context.expectedDropLocations) {
|
|
44
|
+
const description = context.material[draggedItem.type];
|
|
45
|
+
const itemContext = { ...context, ...draggedItem };
|
|
46
|
+
const dragMoves = legalMoves.filter(move => description.canDrag(move, itemContext));
|
|
47
|
+
context.expectedDropLocations = uniqWith(description.getDropLocations(itemContext, dragMoves), isEqual);
|
|
48
|
+
}
|
|
49
|
+
return context.expectedDropLocations ?? [];
|
|
50
|
+
}, [draggedItem]);
|
|
51
|
+
};
|
|
127
52
|
//# sourceMappingURL=useItemLocations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useItemLocations.js","sourceRoot":"","sources":["../../src/hooks/useItemLocations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useItemLocations.js","sourceRoot":"","sources":["../../src/hooks/useItemLocations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAOzD,MAAM,UAAU,gBAAgB,CAC9B,IAAwB,EAAE,OAA6B;IAEvD,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;IAC5C,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,eAAe,EAAW,CAAA;IACtD,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAA;IAEpB,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;IAC/E,KAAK,MAAM,YAAY,IAAI,QAAQ,EAAE,CAAC;QACpC,MAAM,OAAO,GAAG,QAAQ,CAAC,YAAY,CAAqB,CAAA;QAC1D,IAAI,OAAO,CA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tH,MAAM,WAAW,GAAG,cAAc,EAAK,CAAA;IACvC,MAAM,UAAU,GAAG,aAAa,EAAyB,CAAA;IACzD,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,OAAO,OAAO,CAAC,qBAAqB,CAAA;QACtC,CAAC;aAAM,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC;YAC1C,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAE,CAAA;YACvD,MAAM,WAAW,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,WAAW,EAAE,CAAA;YAClD,MAAM,SAAS,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAA;YACnF,OAAO,CAAC,qBAAqB,GAAG,QAAQ,CAAC,WAAW,CAAC,gBAAgB,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,OAAO,CAAC,CAAA;QACzG,CAAC;QACD,OAAQ,OAAe,CAAC,qBAAqB,IAAI,EAAE,CAAA;IACrD,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAA;AACnB,CAAC,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Locator } from '../locators';
|
|
2
|
-
export declare function useItemLocator<P extends number = number, M extends number = number, L extends number = number>(type: L): Locator<P, M, L> | undefined;
|
|
1
|
+
import { Locator } from '../locators';
|
|
2
|
+
export declare function useItemLocator<P extends number = number, M extends number = number, L extends number = number>(type: L): Locator<P, M, L> | undefined;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function useItemLocator(type) {
|
|
6
|
-
var _a;
|
|
7
|
-
return (_a = (0, useLocators_1.useLocators)()) === null || _a === void 0 ? void 0 : _a[type];
|
|
8
|
-
}
|
|
9
|
-
exports.useItemLocator = useItemLocator;
|
|
1
|
+
import { useLocators } from './useLocators';
|
|
2
|
+
export function useItemLocator(type) {
|
|
3
|
+
return useLocators()?.[type];
|
|
4
|
+
}
|
|
10
5
|
//# sourceMappingURL=useItemLocator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useItemLocator.js","sourceRoot":"","sources":["../../src/hooks/useItemLocator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useItemLocator.js","sourceRoot":"","sources":["../../src/hooks/useItemLocator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,MAAM,UAAU,cAAc,CAC5B,IAAO;IAEP,OAAO,WAAW,EAAE,EAAE,CAAC,IAAI,CAAiC,CAAA;AAC9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useKeyDown: (key: string, callback: () => void) => void;
|
|
1
|
+
export declare const useKeyDown: (key: string, callback: () => void) => void;
|
package/dist/hooks/useKeyDown.js
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return function () { return document.removeEventListener('keydown', onKeydown); };
|
|
14
|
-
}, [key, callback]);
|
|
15
|
-
};
|
|
16
|
-
exports.useKeyDown = useKeyDown;
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
export const useKeyDown = (key, callback) => {
|
|
3
|
+
useEffect(() => {
|
|
4
|
+
const onKeydown = (event) => {
|
|
5
|
+
if (event.key === key) {
|
|
6
|
+
callback();
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
document.addEventListener('keydown', onKeydown);
|
|
10
|
+
return () => document.removeEventListener('keydown', onKeydown);
|
|
11
|
+
}, [key, callback]);
|
|
12
|
+
};
|
|
17
13
|
//# sourceMappingURL=useKeyDown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useKeyDown.js","sourceRoot":"","sources":["../../src/hooks/useKeyDown.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useKeyDown.js","sourceRoot":"","sources":["../../src/hooks/useKeyDown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAA;AAE/B,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,QAAoB,EAAE,EAAE;IAC9D,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,SAAS,GAAG,CAAC,KAAoB,EAAE,EAAE;YACzC,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;gBACtB,QAAQ,EAAE,CAAA;YACZ,CAAC;QACH,CAAC,CAAA;QACD,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;QAC/C,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;IACjE,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAA;AACrB,CAAC,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function useLegalMoves<Move = any>(predicate?: (move: Move) => boolean): Move[];
|
|
2
|
-
export declare function useLegalMove<Move = any>(predicate?: (move: Move) => boolean): Move | undefined;
|
|
1
|
+
export declare function useLegalMoves<Move = any>(predicate?: (move: Move) => boolean): Move[];
|
|
2
|
+
export declare function useLegalMove<Move = any>(predicate?: (move: Move) => boolean): Move | undefined;
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
function useLegalMove(predicate) {
|
|
16
|
-
var moves = useLegalMoves(predicate);
|
|
17
|
-
return moves.length > 0 ? moves[0] : undefined;
|
|
18
|
-
}
|
|
19
|
-
exports.useLegalMove = useLegalMove;
|
|
1
|
+
import { useGameSelector } from '@gamepark/react-client';
|
|
2
|
+
import { useIsAnimatingPlayerAction } from '../components/material/utils/useIsAnimatingPlayerAction';
|
|
3
|
+
export function useLegalMoves(predicate) {
|
|
4
|
+
const legalMoves = useGameSelector((state) => state.legalMoves);
|
|
5
|
+
const gameOver = useGameSelector((state) => state.gameOver);
|
|
6
|
+
const isAnimatingPlayerAction = useIsAnimatingPlayerAction();
|
|
7
|
+
if (gameOver || isAnimatingPlayerAction)
|
|
8
|
+
return [];
|
|
9
|
+
return predicate ? legalMoves.filter(predicate) : legalMoves;
|
|
10
|
+
}
|
|
11
|
+
export function useLegalMove(predicate) {
|
|
12
|
+
const moves = useLegalMoves(predicate);
|
|
13
|
+
return moves.length > 0 ? moves[0] : undefined;
|
|
14
|
+
}
|
|
20
15
|
//# sourceMappingURL=useLegalMoves.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLegalMoves.js","sourceRoot":"","sources":["../../src/hooks/useLegalMoves.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLegalMoves.js","sourceRoot":"","sources":["../../src/hooks/useLegalMoves.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAA;AAEpG,MAAM,UAAU,aAAa,CAAa,SAAmC;IAC3E,MAAM,UAAU,GAAG,eAAe,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;IAC/D,MAAM,QAAQ,GAAG,eAAe,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC3D,MAAM,uBAAuB,GAAG,0BAA0B,EAAE,CAAA;IAC5D,IAAI,QAAQ,IAAI,uBAAuB;QAAE,OAAO,EAAE,CAAA;IAClD,OAAO,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,UAAU,CAAA;AAC9D,CAAC;AAED,MAAM,UAAU,YAAY,CAAa,SAAmC;IAC1E,MAAM,KAAK,GAAG,aAAa,CAAC,SAAS,CAAC,CAAA;IACtC,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;AAChD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useLocators: () => Partial<import("..").ItemLocatorRecord<number, number, number>> | undefined;
|
|
1
|
+
export declare const useLocators: () => Partial<import("..").ItemLocatorRecord<number, number, number>> | undefined;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var react_1 = require("react");
|
|
5
|
-
var components_1 = require("../components");
|
|
6
|
-
var useLocators = function () { return (0, react_1.useContext)(components_1.gameContext).locators; };
|
|
7
|
-
exports.useLocators = useLocators;
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import { gameContext } from '../components';
|
|
3
|
+
export const useLocators = () => useContext(gameContext).locators;
|
|
8
4
|
//# sourceMappingURL=useLocators.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocators.js","sourceRoot":"","sources":["../../src/hooks/useLocators.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLocators.js","sourceRoot":"","sources":["../../src/hooks/useLocators.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { MaterialContext } from '../locators';
|
|
2
|
-
export declare function useMaterialContext<P extends number = number, M extends number = number, L extends number = number>(): MaterialContext<P, M, L>;
|
|
1
|
+
import { MaterialContext } from '../locators';
|
|
2
|
+
export declare function useMaterialContext<P extends number = number, M extends number = number, L extends number = number>(): MaterialContext<P, M, L>;
|