@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,103 +1,36 @@
|
|
|
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
|
-
var context = (0, useMaterialContext_1.useMaterialContext)();
|
|
37
|
-
var locators = context.locators;
|
|
38
|
-
var result = [];
|
|
39
|
-
for (var type in locators) {
|
|
40
|
-
var locator = locators[type];
|
|
41
|
-
if (locator.parentItemType === undefined) {
|
|
42
|
-
try {
|
|
43
|
-
for (var _g = (e_1 = void 0, __values(locator.getLocations(context))), _h = _g.next(); !_h.done; _h = _g.next()) {
|
|
44
|
-
var location_1 = _h.value;
|
|
45
|
-
result.push({ location: __assign({ type: type }, location_1) });
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
49
|
-
finally {
|
|
50
|
-
try {
|
|
51
|
-
if (_h && !_h.done && (_a = _g.return)) _a.call(_g);
|
|
52
|
-
}
|
|
53
|
-
finally { if (e_1) throw e_1.error; }
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
var _j = (0, components_1.useFocusContext)(), focus = _j.focus, focusRef = _j.focusRef;
|
|
58
|
-
var locationsFocus = (_e = (_d = focus === null || focus === void 0 ? void 0 : focus.locations) === null || _d === void 0 ? void 0 : _d.filter(function (location) { var _a; return ((_a = locators[location.type]) === null || _a === void 0 ? void 0 : _a.parentItemType) === undefined; })) !== null && _e !== void 0 ? _e : [];
|
|
59
|
-
var _loop_1 = function (location_2) {
|
|
60
|
-
var index = result.findIndex(function (r) { return (0, isEqual_1.default)(r.location, location_2); });
|
|
61
|
-
if (index !== -1) {
|
|
62
|
-
result[index].focusRef = focusRef;
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
result.push({ location: location_2, focusRef: focusRef });
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
try {
|
|
69
|
-
for (var locationsFocus_1 = __values(locationsFocus), locationsFocus_1_1 = locationsFocus_1.next(); !locationsFocus_1_1.done; locationsFocus_1_1 = locationsFocus_1.next()) {
|
|
70
|
-
var location_2 = locationsFocus_1_1.value;
|
|
71
|
-
_loop_1(location_2);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
75
|
-
finally {
|
|
76
|
-
try {
|
|
77
|
-
if (locationsFocus_1_1 && !locationsFocus_1_1.done && (_b = locationsFocus_1.return)) _b.call(locationsFocus_1);
|
|
78
|
-
}
|
|
79
|
-
finally { if (e_2) throw e_2.error; }
|
|
80
|
-
}
|
|
81
|
-
var expectedDropLocations = (0, useItemLocations_1.useExpectedDropLocations)();
|
|
82
|
-
var _loop_2 = function (location_3) {
|
|
83
|
-
if (location_3.parent === undefined && ((_f = locators[location_3.type]) === null || _f === void 0 ? void 0 : _f.parentItemType) === undefined && !result.some(function (r) { return (0, components_1.isLocationSubset)(location_3, r.location); })) {
|
|
84
|
-
result.push({ location: location_3 });
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
try {
|
|
88
|
-
for (var expectedDropLocations_1 = __values(expectedDropLocations), expectedDropLocations_1_1 = expectedDropLocations_1.next(); !expectedDropLocations_1_1.done; expectedDropLocations_1_1 = expectedDropLocations_1.next()) {
|
|
89
|
-
var location_3 = expectedDropLocations_1_1.value;
|
|
90
|
-
_loop_2(location_3);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
94
|
-
finally {
|
|
95
|
-
try {
|
|
96
|
-
if (expectedDropLocations_1_1 && !expectedDropLocations_1_1.done && (_c = expectedDropLocations_1.return)) _c.call(expectedDropLocations_1);
|
|
97
|
-
}
|
|
98
|
-
finally { if (e_3) throw e_3.error; }
|
|
99
|
-
}
|
|
100
|
-
return result;
|
|
101
|
-
}
|
|
102
|
-
exports.useStaticLocations = useStaticLocations;
|
|
1
|
+
import { isEqual } from 'es-toolkit';
|
|
2
|
+
import { isLocationSubset, useFocusContext } from '../components';
|
|
3
|
+
import { useExpectedDropLocations } from './useItemLocations';
|
|
4
|
+
import { useMaterialContext } from './useMaterialContext';
|
|
5
|
+
export function useStaticLocations() {
|
|
6
|
+
const context = useMaterialContext();
|
|
7
|
+
const locators = context.locators;
|
|
8
|
+
const result = [];
|
|
9
|
+
for (const type in locators) {
|
|
10
|
+
const locator = locators[type];
|
|
11
|
+
if (locator.parentItemType === undefined) {
|
|
12
|
+
for (const location of locator.getLocations(context)) {
|
|
13
|
+
result.push({ location: { type, ...location } });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
const { focus, focusRef } = useFocusContext();
|
|
18
|
+
const locationsFocus = focus?.locations?.filter(location => locators[location.type]?.parentItemType === undefined) ?? [];
|
|
19
|
+
for (const location of locationsFocus) {
|
|
20
|
+
const index = result.findIndex(r => isEqual(r.location, location));
|
|
21
|
+
if (index !== -1) {
|
|
22
|
+
result[index].focusRef = focusRef;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
result.push({ location, focusRef });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const expectedDropLocations = useExpectedDropLocations();
|
|
29
|
+
for (const location of expectedDropLocations) {
|
|
30
|
+
if (location.parent === undefined && locators[location.type]?.parentItemType === undefined && !result.some(r => isLocationSubset(location, r.location))) {
|
|
31
|
+
result.push({ location });
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return result;
|
|
35
|
+
}
|
|
103
36
|
//# sourceMappingURL=useStaticLocations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStaticLocations.js","sourceRoot":"","sources":["../../src/hooks/useStaticLocations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useStaticLocations.js","sourceRoot":"","sources":["../../src/hooks/useStaticLocations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAEjE,OAAO,EAAoB,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEzD,MAAM,UAAU,kBAAkB;IAChC,MAAM,OAAO,GAAG,kBAAkB,EAAW,CAAA;IAC7C,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;IACjC,MAAM,MAAM,GAA6B,EAAE,CAAA;IAC3C,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;QAC5B,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAqB,CAAA;QAClD,IAAI,OAAO,CAAC,cAAc,KAAK,SAAS,EAAE,CAAC;YACzC,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC;gBACrD,MAAM,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,QAAQ,EAAE,EAAE,CAAC,CAAA;YAClD,CAAC;QACH,CAAC;IACH,CAAC;IACD,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,eAAe,EAAW,CAAA;IAEtD,MAAM,cAAc,GAAG,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,cAAc,KAAK,SAAS,CAAC,IAAI,EAAE,CAAA;IAExH,KAAK,MAAM,QAAQ,IAAI,cAAc,EAAE,CAAC;QACtC,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAA;QAClE,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;YACjB,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACnC,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAA;QACrC,CAAC;IACH,CAAC;IAED,MAAM,qBAAqB,GAAG,wBAAwB,EAAW,CAAA;IACjE,KAAK,MAAM,QAAQ,IAAI,qBAAqB,EAAE,CAAC;QAC7C,IAAI,QAAQ,CAAC,MAAM,KAAK,SAAS,IAAI,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,cAAc,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;YACxJ,MAAM,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAA;QAC3B,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { TutorialStep } from '../components';
|
|
2
|
-
export declare function useTutorialStep<P extends number = number, M extends number = number, L extends number = number>(): TutorialStep<P, M, L> | undefined;
|
|
1
|
+
import { TutorialStep } from '../components';
|
|
2
|
+
export declare function useTutorialStep<P extends number = number, M extends number = number, L extends number = number>(): TutorialStep<P, M, L> | undefined;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return;
|
|
12
|
-
return tutorial.steps[game.tutorial.step];
|
|
13
|
-
}
|
|
14
|
-
exports.useTutorialStep = useTutorialStep;
|
|
1
|
+
import { gameContext, isMaterialTutorial } from '../components';
|
|
2
|
+
import { useContext } from 'react';
|
|
3
|
+
import { useGame } from './useGame';
|
|
4
|
+
export function useTutorialStep() {
|
|
5
|
+
const game = useGame();
|
|
6
|
+
const tutorial = useContext(gameContext).tutorial;
|
|
7
|
+
if (!game || !game.tutorial || !isMaterialTutorial(tutorial))
|
|
8
|
+
return;
|
|
9
|
+
return tutorial.steps[game.tutorial.step];
|
|
10
|
+
}
|
|
15
11
|
//# sourceMappingURL=useTutorialStep.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTutorialStep.js","sourceRoot":"","sources":["../../src/hooks/useTutorialStep.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useTutorialStep.js","sourceRoot":"","sources":["../../src/hooks/useTutorialStep.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAgB,MAAM,eAAe,CAAA;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAGnC,MAAM,UAAU,eAAe;IAC7B,MAAM,IAAI,GAAG,OAAO,EAAgB,CAAA;IACpC,MAAM,QAAQ,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAA;IACjD,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,kBAAkB,CAAU,QAAQ,CAAC;QAAE,OAAM;IAC7E,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;AAC3C,CAAC"}
|
package/dist/hooks/useUndo.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export type UndoOptions = {
|
|
2
|
-
delayed?: boolean;
|
|
3
|
-
};
|
|
4
|
-
export type MovePredicate<Move> = (move: Move) => boolean;
|
|
5
|
-
export type CanUndo<Move> = (movePredicate?: MovePredicate<Move>) => boolean;
|
|
6
|
-
export type UndoFunction<Move> = ((arg?: string | number | MovePredicate<Move> | UndoOptions, options?: UndoOptions) => void);
|
|
7
|
-
export declare const useUndo: <Move = any
|
|
1
|
+
export type UndoOptions = {
|
|
2
|
+
delayed?: boolean;
|
|
3
|
+
};
|
|
4
|
+
export type MovePredicate<Move> = (move: Move) => boolean;
|
|
5
|
+
export type CanUndo<Move> = (movePredicate?: MovePredicate<Move>) => boolean;
|
|
6
|
+
export type UndoFunction<Move> = ((arg?: string | number | MovePredicate<Move> | UndoOptions, options?: UndoOptions) => void);
|
|
7
|
+
export declare const useUndo: <Move = any>() => [UndoFunction<Move>, CanUndo<Move>];
|
package/dist/hooks/useUndo.js
CHANGED
|
@@ -1,103 +1,65 @@
|
|
|
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
|
-
if (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if (!game || !actions)
|
|
66
|
-
return false;
|
|
67
|
-
if (actions.some(function (action) {
|
|
68
|
-
return action.playerId === playerId && ((0, react_client_1.isActionToAnimate)(action) || action.animation !== undefined);
|
|
69
|
-
}))
|
|
70
|
-
return false;
|
|
71
|
-
var index = (0, findLastIndex_1.default)(actions, function (action) {
|
|
72
|
-
return action.playerId === playerId && !action.cancelled && (!movePredicate || movePredicate(action.move));
|
|
73
|
-
});
|
|
74
|
-
if (index === -1)
|
|
75
|
-
return false;
|
|
76
|
-
var action = actions[index];
|
|
77
|
-
if (action.pending)
|
|
78
|
-
return false;
|
|
79
|
-
if (action.local)
|
|
80
|
-
return true;
|
|
81
|
-
var consecutiveActions = actions.slice(index + 1).filter(function (action) { return !action.cancelled; });
|
|
82
|
-
var rules = new Rules(game, { player: playerId });
|
|
83
|
-
if (!(0, rules_api_1.hasUndo)(rules))
|
|
84
|
-
return false;
|
|
85
|
-
return rules.canUndo(action, consecutiveActions);
|
|
86
|
-
}, [game, actions, playerId, Rules]);
|
|
87
|
-
return [undo, canUndo];
|
|
88
|
-
};
|
|
89
|
-
exports.useUndo = useUndo;
|
|
90
|
-
function findLastN(array, predicate, n) {
|
|
91
|
-
if (n === void 0) { n = 1; }
|
|
92
|
-
var result = [];
|
|
93
|
-
for (var i = array.length - 1; i >= 0; i--) {
|
|
94
|
-
var item = array[i];
|
|
95
|
-
if (predicate(item)) {
|
|
96
|
-
result.push(item);
|
|
97
|
-
if (result.length >= n)
|
|
98
|
-
return result;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return result;
|
|
102
|
-
}
|
|
1
|
+
import { isActionToAnimate, undoMove, useGameDispatch, useGameSelector } from '@gamepark/react-client';
|
|
2
|
+
import { hasUndo } from '@gamepark/rules-api';
|
|
3
|
+
import { findLastIndex } from 'es-toolkit/compat';
|
|
4
|
+
import { useCallback, useContext } from 'react';
|
|
5
|
+
import { gameContext } from '../components';
|
|
6
|
+
export const useUndo = () => {
|
|
7
|
+
const actions = useGameSelector((state) => state.actions);
|
|
8
|
+
const game = useGameSelector((state) => state.state);
|
|
9
|
+
const playerId = useGameSelector((state) => state.playerId);
|
|
10
|
+
const dispatch = useGameDispatch();
|
|
11
|
+
const Rules = useContext(gameContext)?.Rules;
|
|
12
|
+
if (!Rules)
|
|
13
|
+
throw new Error('Cannot useUndo outside a GameProvider');
|
|
14
|
+
const undo = useCallback((arg, options) => {
|
|
15
|
+
if (typeof arg === 'string') {
|
|
16
|
+
dispatch(undoMove({ actionId: arg, delayed: options?.delayed }));
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
if (!actions)
|
|
20
|
+
return console.error('Cannot undo before actions history is loaded');
|
|
21
|
+
const actionToUndo = findLastN(actions, action => action.playerId === playerId && !action.cancelled && (typeof arg !== 'function' || arg(action.move)), typeof arg === 'number' ? arg : 1);
|
|
22
|
+
if (!actionToUndo.length)
|
|
23
|
+
return console.error('This action does not exist, it cannot be undone');
|
|
24
|
+
const delayed = typeof arg === 'object' ? arg?.delayed : options?.delayed;
|
|
25
|
+
for (const action of actionToUndo) {
|
|
26
|
+
if (action.id) {
|
|
27
|
+
dispatch(undoMove({ actionId: action.id, delayed }));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}, [actions, playerId, dispatch]);
|
|
32
|
+
const canUndo = useCallback((movePredicate) => {
|
|
33
|
+
if (!game || !actions)
|
|
34
|
+
return false;
|
|
35
|
+
if (actions.some(action => action.playerId === playerId && (isActionToAnimate(action) || action.animation !== undefined)))
|
|
36
|
+
return false;
|
|
37
|
+
const index = findLastIndex(actions, action => action.playerId === playerId && !action.cancelled && (!movePredicate || movePredicate(action.move)));
|
|
38
|
+
if (index === -1)
|
|
39
|
+
return false;
|
|
40
|
+
const action = actions[index];
|
|
41
|
+
if (action.pending)
|
|
42
|
+
return false;
|
|
43
|
+
if (action.local)
|
|
44
|
+
return true;
|
|
45
|
+
const consecutiveActions = actions.slice(index + 1).filter(action => !action.cancelled);
|
|
46
|
+
const rules = new Rules(game, { player: playerId });
|
|
47
|
+
if (!hasUndo(rules))
|
|
48
|
+
return false;
|
|
49
|
+
return rules.canUndo(action, consecutiveActions);
|
|
50
|
+
}, [game, actions, playerId, Rules]);
|
|
51
|
+
return [undo, canUndo];
|
|
52
|
+
};
|
|
53
|
+
function findLastN(array, predicate, n = 1) {
|
|
54
|
+
const result = [];
|
|
55
|
+
for (let i = array.length - 1; i >= 0; i--) {
|
|
56
|
+
const item = array[i];
|
|
57
|
+
if (predicate(item)) {
|
|
58
|
+
result.push(item);
|
|
59
|
+
if (result.length >= n)
|
|
60
|
+
return result;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return result;
|
|
64
|
+
}
|
|
103
65
|
//# sourceMappingURL=useUndo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUndo.js","sourceRoot":"","sources":["../../src/hooks/useUndo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useUndo.js","sourceRoot":"","sources":["../../src/hooks/useUndo.ts"],"names":[],"mappings":"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"}
|
package/dist/hooks/useWebP.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useWebP: () => boolean | undefined;
|
|
1
|
+
export declare const useWebP: () => boolean | undefined;
|
package/dist/hooks/useWebP.js
CHANGED
|
@@ -1,80 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
39
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
40
|
-
if (!m) return o;
|
|
41
|
-
var i = m.call(o), r, ar = [], e;
|
|
42
|
-
try {
|
|
43
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
44
|
-
}
|
|
45
|
-
catch (error) { e = { error: error }; }
|
|
46
|
-
finally {
|
|
47
|
-
try {
|
|
48
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
49
|
-
}
|
|
50
|
-
finally { if (e) throw e.error; }
|
|
51
|
-
}
|
|
52
|
-
return ar;
|
|
53
|
-
};
|
|
54
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
55
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
56
|
-
};
|
|
57
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58
|
-
exports.useWebP = void 0;
|
|
59
|
-
var react_1 = require("react");
|
|
60
|
-
var supports_webp_1 = __importDefault(require("supports-webp"));
|
|
61
|
-
var useWebP = function () {
|
|
62
|
-
var _a = __read((0, react_1.useState)(), 2), webP = _a[0], setWebP = _a[1];
|
|
63
|
-
(0, react_1.useEffect)(function () {
|
|
64
|
-
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
65
|
-
var webP;
|
|
66
|
-
return __generator(this, function (_a) {
|
|
67
|
-
switch (_a.label) {
|
|
68
|
-
case 0: return [4 /*yield*/, supports_webp_1.default];
|
|
69
|
-
case 1:
|
|
70
|
-
webP = _a.sent();
|
|
71
|
-
setWebP(webP);
|
|
72
|
-
return [2 /*return*/];
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
}); })();
|
|
76
|
-
}, [supports_webp_1.default, setWebP]);
|
|
77
|
-
return webP;
|
|
78
|
-
};
|
|
79
|
-
exports.useWebP = useWebP;
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import webPCheck from 'supports-webp';
|
|
3
|
+
export const useWebP = () => {
|
|
4
|
+
const [webP, setWebP] = useState();
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
(async () => {
|
|
7
|
+
const webP = await webPCheck;
|
|
8
|
+
setWebP(webP);
|
|
9
|
+
})();
|
|
10
|
+
}, [webPCheck, setWebP]);
|
|
11
|
+
return webP;
|
|
12
|
+
};
|
|
80
13
|
//# sourceMappingURL=useWebP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWebP.js","sourceRoot":"","sources":["../../src/hooks/useWebP.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useWebP.js","sourceRoot":"","sources":["../../src/hooks/useWebP.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,SAAS,MAAM,eAAe,CAAA;AAErC,MAAM,CAAC,MAAM,OAAO,GAAG,GAAwB,EAAE;IAC/C,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,EAAW,CAAA;IAE3C,SAAS,CAAC,GAAG,EAAE;QACb,CAAC,KAAK,IAAI,EAAE;YACV,MAAM,IAAI,GAAG,MAAM,SAAS,CAAA;YAC5B,OAAO,CAAC,IAAI,CAAC,CAAA;QACf,CAAC,CAAC,EAAE,CAAA;IACN,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAA;IAExB,OAAO,IAAI,CAAA;AACb,CAAC,CAAA"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Margin } from '../components';
|
|
2
|
-
import { animations } from '../utilities/zoom-pan-pinch';
|
|
3
|
-
/**
|
|
4
|
-
* react-zoom-pan-pinch only has "zoomToElement". This code is the equivalent to zoom to display multiple elements at once.
|
|
5
|
-
*/
|
|
6
|
-
export declare function useZoomToElements(): (elements: HTMLElement[], options?: ZoomToElementsOptions) => void;
|
|
7
|
-
type ZoomToElementsOptions = {
|
|
8
|
-
scale?: number;
|
|
9
|
-
animationTime?: number;
|
|
10
|
-
animationType?: keyof typeof animations;
|
|
11
|
-
margin?: Margin;
|
|
12
|
-
};
|
|
13
|
-
export {};
|
|
1
|
+
import { Margin } from '../components';
|
|
2
|
+
import { animations } from '../utilities/zoom-pan-pinch';
|
|
3
|
+
/**
|
|
4
|
+
* react-zoom-pan-pinch only has "zoomToElement". This code is the equivalent to zoom to display multiple elements at once.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useZoomToElements(): (elements: HTMLElement[], options?: ZoomToElementsOptions) => void;
|
|
7
|
+
type ZoomToElementsOptions = {
|
|
8
|
+
scale?: number;
|
|
9
|
+
animationTime?: number;
|
|
10
|
+
animationType?: keyof typeof animations;
|
|
11
|
+
margin?: Margin;
|
|
12
|
+
};
|
|
13
|
+
export {};
|