@pretty-chitty/core 1.1.1
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/LICENSE.md +51 -0
- package/README.md +152 -0
- package/dist/0e0a96423fd742218c61.woff2 +0 -0
- package/dist/1e28c9f184923aacc181.woff +0 -0
- package/dist/37f3b2ddcbe588b2aaa5.jpg +0 -0
- package/dist/3f0fb9058a03e14ad2fa.jpg +0 -0
- package/dist/4482e08504d544757971.woff2 +0 -0
- package/dist/5212361bfd059a27e2da.woff2 +0 -0
- package/dist/699b459f21e39ca4b8df.woff2 +0 -0
- package/dist/7e339dfbea59fe54f2e3.png +0 -0
- package/dist/a3e6d4ebd8f859f0f1dc.woff +0 -0
- package/dist/b8b0d3bc0d26444e4a5a.woff2 +0 -0
- package/dist/bce9a6fcc5b3da9a086a.woff +0 -0
- package/dist/components/ActionLogDisplay.d.ts +4 -0
- package/dist/components/ActionLogDisplay.d.ts.map +1 -0
- package/dist/components/ActionLogDisplay.js +144 -0
- package/dist/components/ActionLogDisplay.js.map +1 -0
- package/dist/components/ActionLogHistory.d.ts +6 -0
- package/dist/components/ActionLogHistory.d.ts.map +1 -0
- package/dist/components/ActionLogHistory.js +81 -0
- package/dist/components/ActionLogHistory.js.map +1 -0
- package/dist/components/ActionLogHistoryDisplay.d.ts +2 -0
- package/dist/components/ActionLogHistoryDisplay.d.ts.map +1 -0
- package/dist/components/ActionLogHistoryDisplay.js +17 -0
- package/dist/components/ActionLogHistoryDisplay.js.map +1 -0
- package/dist/components/ActionLogSidebar.d.ts +2 -0
- package/dist/components/ActionLogSidebar.d.ts.map +1 -0
- package/dist/components/ActionLogSidebar.js +9 -0
- package/dist/components/ActionLogSidebar.js.map +1 -0
- package/dist/components/BottomBar.d.ts +2 -0
- package/dist/components/BottomBar.d.ts.map +1 -0
- package/dist/components/BottomBar.js +33 -0
- package/dist/components/BottomBar.js.map +1 -0
- package/dist/components/BottomBarBreak.d.ts +2 -0
- package/dist/components/BottomBarBreak.d.ts.map +1 -0
- package/dist/components/BottomBarBreak.js +8 -0
- package/dist/components/BottomBarBreak.js.map +1 -0
- package/dist/components/BottomBarButton.d.ts +16 -0
- package/dist/components/BottomBarButton.d.ts.map +1 -0
- package/dist/components/BottomBarButton.js +123 -0
- package/dist/components/BottomBarButton.js.map +1 -0
- package/dist/components/CanvasLibraryViewer.d.ts +8 -0
- package/dist/components/CanvasLibraryViewer.d.ts.map +1 -0
- package/dist/components/CanvasLibraryViewer.js +29 -0
- package/dist/components/CanvasLibraryViewer.js.map +1 -0
- package/dist/components/ChitLibraryViewer.d.ts +8 -0
- package/dist/components/ChitLibraryViewer.d.ts.map +1 -0
- package/dist/components/ChitLibraryViewer.js +101 -0
- package/dist/components/ChitLibraryViewer.js.map +1 -0
- package/dist/components/ClientTrustMatchViewer.d.ts +11 -0
- package/dist/components/ClientTrustMatchViewer.d.ts.map +1 -0
- package/dist/components/ClientTrustMatchViewer.js +53 -0
- package/dist/components/ClientTrustMatchViewer.js.map +1 -0
- package/dist/components/ContextGalleryDisplay.d.ts +4 -0
- package/dist/components/ContextGalleryDisplay.d.ts.map +1 -0
- package/dist/components/ContextGalleryDisplay.js +49 -0
- package/dist/components/ContextGalleryDisplay.js.map +1 -0
- package/dist/components/GalleryDisplay.d.ts +2 -0
- package/dist/components/GalleryDisplay.d.ts.map +1 -0
- package/dist/components/GalleryDisplay.js +42 -0
- package/dist/components/GalleryDisplay.js.map +1 -0
- package/dist/components/GalleryPlayground.d.ts +14 -0
- package/dist/components/GalleryPlayground.d.ts.map +1 -0
- package/dist/components/GalleryPlayground.js +36 -0
- package/dist/components/GalleryPlayground.js.map +1 -0
- package/dist/components/GalleryViewer.d.ts +48 -0
- package/dist/components/GalleryViewer.d.ts.map +1 -0
- package/dist/components/GalleryViewer.js +567 -0
- package/dist/components/GalleryViewer.js.map +1 -0
- package/dist/components/GameDesigner.d.ts +5 -0
- package/dist/components/GameDesigner.d.ts.map +1 -0
- package/dist/components/GameDesigner.js +14 -0
- package/dist/components/GameDesigner.js.map +1 -0
- package/dist/components/GameDialog.d.ts +7 -0
- package/dist/components/GameDialog.d.ts.map +1 -0
- package/dist/components/GameDialog.js +24 -0
- package/dist/components/GameDialog.js.map +1 -0
- package/dist/components/GameModalBackdrop.d.ts +10 -0
- package/dist/components/GameModalBackdrop.d.ts.map +1 -0
- package/dist/components/GameModalBackdrop.js +33 -0
- package/dist/components/GameModalBackdrop.js.map +1 -0
- package/dist/components/GameModalDialog.d.ts +11 -0
- package/dist/components/GameModalDialog.d.ts.map +1 -0
- package/dist/components/GameModalDialog.js +42 -0
- package/dist/components/GameModalDialog.js.map +1 -0
- package/dist/components/LiveButton.d.ts +4 -0
- package/dist/components/LiveButton.d.ts.map +1 -0
- package/dist/components/LiveButton.js +17 -0
- package/dist/components/LiveButton.js.map +1 -0
- package/dist/components/MatchEndDisplay.d.ts +2 -0
- package/dist/components/MatchEndDisplay.d.ts.map +1 -0
- package/dist/components/MatchEndDisplay.js +67 -0
- package/dist/components/MatchEndDisplay.js.map +1 -0
- package/dist/components/MatchViewer.d.ts +5 -0
- package/dist/components/MatchViewer.d.ts.map +1 -0
- package/dist/components/MatchViewer.js +59 -0
- package/dist/components/MatchViewer.js.map +1 -0
- package/dist/components/ObjectWithPropsEditor.d.ts +5 -0
- package/dist/components/ObjectWithPropsEditor.d.ts.map +1 -0
- package/dist/components/ObjectWithPropsEditor.js +88 -0
- package/dist/components/ObjectWithPropsEditor.js.map +1 -0
- package/dist/components/Panel/MultiPanel.d.ts +13 -0
- package/dist/components/Panel/MultiPanel.d.ts.map +1 -0
- package/dist/components/Panel/MultiPanel.js +196 -0
- package/dist/components/Panel/MultiPanel.js.map +1 -0
- package/dist/components/Panel/PanelContents.d.ts +27 -0
- package/dist/components/Panel/PanelContents.d.ts.map +1 -0
- package/dist/components/Panel/PanelContents.js +202 -0
- package/dist/components/Panel/PanelContents.js.map +1 -0
- package/dist/components/Panel/PanelTabStack.d.ts +9 -0
- package/dist/components/Panel/PanelTabStack.d.ts.map +1 -0
- package/dist/components/Panel/PanelTabStack.js +56 -0
- package/dist/components/Panel/PanelTabStack.js.map +1 -0
- package/dist/components/Panel/SinglePanel.d.ts +13 -0
- package/dist/components/Panel/SinglePanel.d.ts.map +1 -0
- package/dist/components/Panel/SinglePanel.js +44 -0
- package/dist/components/Panel/SinglePanel.js.map +1 -0
- package/dist/components/Panel/ViewerWrapper.d.ts +17 -0
- package/dist/components/Panel/ViewerWrapper.d.ts.map +1 -0
- package/dist/components/Panel/ViewerWrapper.js +70 -0
- package/dist/components/Panel/ViewerWrapper.js.map +1 -0
- package/dist/components/Panel/ViewerZoomControls.d.ts +8 -0
- package/dist/components/Panel/ViewerZoomControls.d.ts.map +1 -0
- package/dist/components/Panel/ViewerZoomControls.js +152 -0
- package/dist/components/Panel/ViewerZoomControls.js.map +1 -0
- package/dist/components/Panel/util.d.ts +3 -0
- package/dist/components/Panel/util.d.ts.map +1 -0
- package/dist/components/Panel/util.js +5 -0
- package/dist/components/Panel/util.js.map +1 -0
- package/dist/components/PanelSpark.d.ts +7 -0
- package/dist/components/PanelSpark.d.ts.map +1 -0
- package/dist/components/PanelSpark.js +84 -0
- package/dist/components/PanelSpark.js.map +1 -0
- package/dist/components/PersistentCanvas.d.ts +12 -0
- package/dist/components/PersistentCanvas.d.ts.map +1 -0
- package/dist/components/PersistentCanvas.js +44 -0
- package/dist/components/PersistentCanvas.js.map +1 -0
- package/dist/components/PlayerImage.d.ts +9 -0
- package/dist/components/PlayerImage.d.ts.map +1 -0
- package/dist/components/PlayerImage.js +21 -0
- package/dist/components/PlayerImage.js.map +1 -0
- package/dist/components/Playground.d.ts +9 -0
- package/dist/components/Playground.d.ts.map +1 -0
- package/dist/components/Playground.js +129 -0
- package/dist/components/Playground.js.map +1 -0
- package/dist/components/PromptControls.d.ts +4 -0
- package/dist/components/PromptControls.d.ts.map +1 -0
- package/dist/components/PromptControls.js +87 -0
- package/dist/components/PromptControls.js.map +1 -0
- package/dist/components/SelectableItemAndStage.d.ts +8 -0
- package/dist/components/SelectableItemAndStage.d.ts.map +1 -0
- package/dist/components/SelectableItemAndStage.js +16 -0
- package/dist/components/SelectableItemAndStage.js.map +1 -0
- package/dist/components/SettingsDisplay.d.ts +2 -0
- package/dist/components/SettingsDisplay.d.ts.map +1 -0
- package/dist/components/SettingsDisplay.js +62 -0
- package/dist/components/SettingsDisplay.js.map +1 -0
- package/dist/components/SparkLineChart.d.ts +21 -0
- package/dist/components/SparkLineChart.d.ts.map +1 -0
- package/dist/components/SparkLineChart.js +143 -0
- package/dist/components/SparkLineChart.js.map +1 -0
- package/dist/components/StageAndEditor.d.ts +5 -0
- package/dist/components/StageAndEditor.d.ts.map +1 -0
- package/dist/components/StageAndEditor.js +12 -0
- package/dist/components/StageAndEditor.js.map +1 -0
- package/dist/components/TimeControlBar.d.ts +5 -0
- package/dist/components/TimeControlBar.d.ts.map +1 -0
- package/dist/components/TimeControlBar.js +38 -0
- package/dist/components/TimeControlBar.js.map +1 -0
- package/dist/components/TokenizedMessage.d.ts +13 -0
- package/dist/components/TokenizedMessage.d.ts.map +1 -0
- package/dist/components/TokenizedMessage.js +102 -0
- package/dist/components/TokenizedMessage.js.map +1 -0
- package/dist/components/TopBar.d.ts +4 -0
- package/dist/components/TopBar.d.ts.map +1 -0
- package/dist/components/TopBar.js +47 -0
- package/dist/components/TopBar.js.map +1 -0
- package/dist/components/TopBarDropdown.d.ts +6 -0
- package/dist/components/TopBarDropdown.d.ts.map +1 -0
- package/dist/components/TopBarDropdown.js +69 -0
- package/dist/components/TopBarDropdown.js.map +1 -0
- package/dist/components/TopBarPlayers.d.ts +2 -0
- package/dist/components/TopBarPlayers.d.ts.map +1 -0
- package/dist/components/TopBarPlayers.js +70 -0
- package/dist/components/TopBarPlayers.js.map +1 -0
- package/dist/components/UpdatingCanvasImage.d.ts +7 -0
- package/dist/components/UpdatingCanvasImage.d.ts.map +1 -0
- package/dist/components/UpdatingCanvasImage.js +22 -0
- package/dist/components/UpdatingCanvasImage.js.map +1 -0
- package/dist/components/UpdatingCanvasViewer.d.ts +7 -0
- package/dist/components/UpdatingCanvasViewer.d.ts.map +1 -0
- package/dist/components/UpdatingCanvasViewer.js +50 -0
- package/dist/components/UpdatingCanvasViewer.js.map +1 -0
- package/dist/components/Viewer.d.ts +16 -0
- package/dist/components/Viewer.d.ts.map +1 -0
- package/dist/components/Viewer.js +289 -0
- package/dist/components/Viewer.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -0
- package/dist/e085acb5e467d8e85d21.woff +0 -0
- package/dist/e65dff62134b8879e792.woff +0 -0
- package/dist/game/Chit.d.ts +64 -0
- package/dist/game/Chit.d.ts.map +1 -0
- package/dist/game/Chit.js +524 -0
- package/dist/game/Chit.js.map +1 -0
- package/dist/game/ClientTimeState.d.ts +16 -0
- package/dist/game/ClientTimeState.d.ts.map +1 -0
- package/dist/game/ClientTimeState.js +38 -0
- package/dist/game/ClientTimeState.js.map +1 -0
- package/dist/game/ClockDetails.d.ts +9 -0
- package/dist/game/ClockDetails.d.ts.map +1 -0
- package/dist/game/ClockDetails.js +19 -0
- package/dist/game/ClockDetails.js.map +1 -0
- package/dist/game/Connection.d.ts +26 -0
- package/dist/game/Connection.d.ts.map +1 -0
- package/dist/game/Connection.js +99 -0
- package/dist/game/Connection.js.map +1 -0
- package/dist/game/ConnectionObject.d.ts +7 -0
- package/dist/game/ConnectionObject.d.ts.map +1 -0
- package/dist/game/ConnectionObject.js +16 -0
- package/dist/game/ConnectionObject.js.map +1 -0
- package/dist/game/ConnectionTransport.d.ts +17 -0
- package/dist/game/ConnectionTransport.d.ts.map +1 -0
- package/dist/game/ConnectionTransport.js +39 -0
- package/dist/game/ConnectionTransport.js.map +1 -0
- package/dist/game/DropdownChit.d.ts +7 -0
- package/dist/game/DropdownChit.d.ts.map +1 -0
- package/dist/game/DropdownChit.js +29 -0
- package/dist/game/DropdownChit.js.map +1 -0
- package/dist/game/GalleryItemChitChildrenSource.d.ts +12 -0
- package/dist/game/GalleryItemChitChildrenSource.d.ts.map +1 -0
- package/dist/game/GalleryItemChitChildrenSource.js +25 -0
- package/dist/game/GalleryItemChitChildrenSource.js.map +1 -0
- package/dist/game/GalleryItemRawSource.d.ts +9 -0
- package/dist/game/GalleryItemRawSource.d.ts.map +1 -0
- package/dist/game/GalleryItemRawSource.js +13 -0
- package/dist/game/GalleryItemRawSource.js.map +1 -0
- package/dist/game/Game.d.ts +51 -0
- package/dist/game/Game.d.ts.map +1 -0
- package/dist/game/Game.js +2 -0
- package/dist/game/Game.js.map +1 -0
- package/dist/game/GameBagChit.d.ts +16 -0
- package/dist/game/GameBagChit.d.ts.map +1 -0
- package/dist/game/GameBagChit.js +51 -0
- package/dist/game/GameBagChit.js.map +1 -0
- package/dist/game/GameButton.d.ts +30 -0
- package/dist/game/GameButton.d.ts.map +1 -0
- package/dist/game/GameButton.js +115 -0
- package/dist/game/GameButton.js.map +1 -0
- package/dist/game/GameDeckChit.d.ts +23 -0
- package/dist/game/GameDeckChit.d.ts.map +1 -0
- package/dist/game/GameDeckChit.js +79 -0
- package/dist/game/GameDeckChit.js.map +1 -0
- package/dist/game/GameTheme.d.ts +75 -0
- package/dist/game/GameTheme.d.ts.map +1 -0
- package/dist/game/GameTheme.js +103 -0
- package/dist/game/GameTheme.js.map +1 -0
- package/dist/game/Match.d.ts +34 -0
- package/dist/game/Match.d.ts.map +1 -0
- package/dist/game/Match.js +151 -0
- package/dist/game/Match.js.map +1 -0
- package/dist/game/MatchConnection.d.ts +8 -0
- package/dist/game/MatchConnection.d.ts.map +1 -0
- package/dist/game/MatchConnection.js +6 -0
- package/dist/game/MatchConnection.js.map +1 -0
- package/dist/game/MatchStorage.d.ts +17 -0
- package/dist/game/MatchStorage.d.ts.map +1 -0
- package/dist/game/MatchStorage.js +32 -0
- package/dist/game/MatchStorage.js.map +1 -0
- package/dist/game/ModalState.d.ts +9 -0
- package/dist/game/ModalState.d.ts.map +1 -0
- package/dist/game/ModalState.js +27 -0
- package/dist/game/ModalState.js.map +1 -0
- package/dist/game/OrderedOutlet.d.ts +50 -0
- package/dist/game/OrderedOutlet.d.ts.map +1 -0
- package/dist/game/OrderedOutlet.js +164 -0
- package/dist/game/OrderedOutlet.js.map +1 -0
- package/dist/game/Pick.d.ts +26 -0
- package/dist/game/Pick.d.ts.map +1 -0
- package/dist/game/Pick.js +239 -0
- package/dist/game/Pick.js.map +1 -0
- package/dist/game/PlayerChit.d.ts +16 -0
- package/dist/game/PlayerChit.d.ts.map +1 -0
- package/dist/game/PlayerChit.js +56 -0
- package/dist/game/PlayerChit.js.map +1 -0
- package/dist/game/PlayerInfo.d.ts +12 -0
- package/dist/game/PlayerInfo.d.ts.map +1 -0
- package/dist/game/PlayerInfo.js +20 -0
- package/dist/game/PlayerInfo.js.map +1 -0
- package/dist/game/PlayerPromptStatusChit.d.ts +5 -0
- package/dist/game/PlayerPromptStatusChit.d.ts.map +1 -0
- package/dist/game/PlayerPromptStatusChit.js +35 -0
- package/dist/game/PlayerPromptStatusChit.js.map +1 -0
- package/dist/game/Prompt.d.ts +94 -0
- package/dist/game/Prompt.d.ts.map +1 -0
- package/dist/game/Prompt.js +229 -0
- package/dist/game/Prompt.js.map +1 -0
- package/dist/game/RootChit.d.ts +15 -0
- package/dist/game/RootChit.d.ts.map +1 -0
- package/dist/game/RootChit.js +62 -0
- package/dist/game/RootChit.js.map +1 -0
- package/dist/game/SparkChit.d.ts +27 -0
- package/dist/game/SparkChit.d.ts.map +1 -0
- package/dist/game/SparkChit.js +97 -0
- package/dist/game/SparkChit.js.map +1 -0
- package/dist/game/StaticChitTypeRegistry.d.ts +5 -0
- package/dist/game/StaticChitTypeRegistry.d.ts.map +1 -0
- package/dist/game/StaticChitTypeRegistry.js +3 -0
- package/dist/game/StaticChitTypeRegistry.js.map +1 -0
- package/dist/game/Turn.d.ts +169 -0
- package/dist/game/Turn.d.ts.map +1 -0
- package/dist/game/Turn.js +1031 -0
- package/dist/game/Turn.js.map +1 -0
- package/dist/game/TurnState.d.ts +30 -0
- package/dist/game/TurnState.d.ts.map +1 -0
- package/dist/game/TurnState.js +170 -0
- package/dist/game/TurnState.js.map +1 -0
- package/dist/game/clientTransport/ClientPrompts.d.ts +23 -0
- package/dist/game/clientTransport/ClientPrompts.d.ts.map +1 -0
- package/dist/game/clientTransport/ClientPrompts.js +85 -0
- package/dist/game/clientTransport/ClientPrompts.js.map +1 -0
- package/dist/game/clientTransport/ClientStatus.d.ts +19 -0
- package/dist/game/clientTransport/ClientStatus.d.ts.map +1 -0
- package/dist/game/clientTransport/ClientStatus.js +25 -0
- package/dist/game/clientTransport/ClientStatus.js.map +1 -0
- package/dist/game/clientTransport/ClientTime.d.ts +42 -0
- package/dist/game/clientTransport/ClientTime.d.ts.map +1 -0
- package/dist/game/clientTransport/ClientTime.js +197 -0
- package/dist/game/clientTransport/ClientTime.js.map +1 -0
- package/dist/game/index.d.ts +1 -0
- package/dist/game/index.d.ts.map +1 -0
- package/dist/game/index.js +2 -0
- package/dist/game/index.js.map +1 -0
- package/dist/game/serverTransport/ServerPrompts.d.ts +17 -0
- package/dist/game/serverTransport/ServerPrompts.d.ts.map +1 -0
- package/dist/game/serverTransport/ServerPrompts.js +51 -0
- package/dist/game/serverTransport/ServerPrompts.js.map +1 -0
- package/dist/game/serverTransport/ServerStatus.d.ts +12 -0
- package/dist/game/serverTransport/ServerStatus.d.ts.map +1 -0
- package/dist/game/serverTransport/ServerStatus.js +16 -0
- package/dist/game/serverTransport/ServerStatus.js.map +1 -0
- package/dist/game/serverTransport/ServerTime.d.ts +39 -0
- package/dist/game/serverTransport/ServerTime.d.ts.map +1 -0
- package/dist/game/serverTransport/ServerTime.js +57 -0
- package/dist/game/serverTransport/ServerTime.js.map +1 -0
- package/dist/hooks/useChits.d.ts +4 -0
- package/dist/hooks/useChits.d.ts.map +1 -0
- package/dist/hooks/useChits.js +24 -0
- package/dist/hooks/useChits.js.map +1 -0
- package/dist/hooks/useConnection.d.ts +8 -0
- package/dist/hooks/useConnection.d.ts.map +1 -0
- package/dist/hooks/useConnection.js +14 -0
- package/dist/hooks/useConnection.js.map +1 -0
- package/dist/hooks/useEventChannelState.d.ts +4 -0
- package/dist/hooks/useEventChannelState.d.ts.map +1 -0
- package/dist/hooks/useEventChannelState.js +25 -0
- package/dist/hooks/useEventChannelState.js.map +1 -0
- package/dist/hooks/useGame.d.ts +8 -0
- package/dist/hooks/useGame.d.ts.map +1 -0
- package/dist/hooks/useGame.js +14 -0
- package/dist/hooks/useGame.js.map +1 -0
- package/dist/hooks/useGameTheme.d.ts +8 -0
- package/dist/hooks/useGameTheme.d.ts.map +1 -0
- package/dist/hooks/useGameTheme.js +11 -0
- package/dist/hooks/useGameTheme.js.map +1 -0
- package/dist/hooks/useModalState.d.ts +7 -0
- package/dist/hooks/useModalState.d.ts.map +1 -0
- package/dist/hooks/useModalState.js +12 -0
- package/dist/hooks/useModalState.js.map +1 -0
- package/dist/hooks/usePanelPositioning.d.ts +22 -0
- package/dist/hooks/usePanelPositioning.d.ts.map +1 -0
- package/dist/hooks/usePanelPositioning.js +10 -0
- package/dist/hooks/usePanelPositioning.js.map +1 -0
- package/dist/hooks/usePanelScale.d.ts +7 -0
- package/dist/hooks/usePanelScale.d.ts.map +1 -0
- package/dist/hooks/usePanelScale.js +22 -0
- package/dist/hooks/usePanelScale.js.map +1 -0
- package/dist/hooks/usePanelStates.d.ts +9 -0
- package/dist/hooks/usePanelStates.d.ts.map +1 -0
- package/dist/hooks/usePanelStates.js +19 -0
- package/dist/hooks/usePanelStates.js.map +1 -0
- package/dist/hooks/usePlayer.d.ts +7 -0
- package/dist/hooks/usePlayer.d.ts.map +1 -0
- package/dist/hooks/usePlayer.js +14 -0
- package/dist/hooks/usePlayer.js.map +1 -0
- package/dist/hooks/useSmartDebouncedState.d.ts +27 -0
- package/dist/hooks/useSmartDebouncedState.d.ts.map +1 -0
- package/dist/hooks/useSmartDebouncedState.js +109 -0
- package/dist/hooks/useSmartDebouncedState.js.map +1 -0
- package/dist/hooks/useTimeController.d.ts +22 -0
- package/dist/hooks/useTimeController.d.ts.map +1 -0
- package/dist/hooks/useTimeController.js +89 -0
- package/dist/hooks/useTimeController.js.map +1 -0
- package/dist/hooks/useTokenMap.d.ts +5 -0
- package/dist/hooks/useTokenMap.d.ts.map +1 -0
- package/dist/hooks/useTokenMap.js +16 -0
- package/dist/hooks/useTokenMap.js.map +1 -0
- package/dist/hooks/useWebGlRenderer.d.ts +34 -0
- package/dist/hooks/useWebGlRenderer.d.ts.map +1 -0
- package/dist/hooks/useWebGlRenderer.js +167 -0
- package/dist/hooks/useWebGlRenderer.js.map +1 -0
- package/dist/index.d.ts +97 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.html +12 -0
- package/dist/index.js +62 -0
- package/dist/index.js.map +1 -0
- package/dist/pretty-chitty.js +190767 -0
- package/dist/pretty-chitty.js.map +1 -0
- package/dist/rendering/CameraSpec.d.ts +22 -0
- package/dist/rendering/CameraSpec.d.ts.map +1 -0
- package/dist/rendering/CameraSpec.js +25 -0
- package/dist/rendering/CameraSpec.js.map +1 -0
- package/dist/rendering/CameraWrapperPerspective.d.ts +44 -0
- package/dist/rendering/CameraWrapperPerspective.d.ts.map +1 -0
- package/dist/rendering/CameraWrapperPerspective.js +481 -0
- package/dist/rendering/CameraWrapperPerspective.js.map +1 -0
- package/dist/rendering/ChitGalleryItemInstance.d.ts +31 -0
- package/dist/rendering/ChitGalleryItemInstance.d.ts.map +1 -0
- package/dist/rendering/ChitGalleryItemInstance.js +75 -0
- package/dist/rendering/ChitGalleryItemInstance.js.map +1 -0
- package/dist/rendering/ChitRenderInstance.d.ts +104 -0
- package/dist/rendering/ChitRenderInstance.d.ts.map +1 -0
- package/dist/rendering/ChitRenderInstance.js +902 -0
- package/dist/rendering/ChitRenderInstance.js.map +1 -0
- package/dist/rendering/ChitRenderSpec.d.ts +80 -0
- package/dist/rendering/ChitRenderSpec.d.ts.map +1 -0
- package/dist/rendering/ChitRenderSpec.js +152 -0
- package/dist/rendering/ChitRenderSpec.js.map +1 -0
- package/dist/rendering/HighlightSpec.d.ts +6 -0
- package/dist/rendering/HighlightSpec.d.ts.map +1 -0
- package/dist/rendering/HighlightSpec.js +6 -0
- package/dist/rendering/HighlightSpec.js.map +1 -0
- package/dist/rendering/LightSpec.d.ts +17 -0
- package/dist/rendering/LightSpec.d.ts.map +1 -0
- package/dist/rendering/LightSpec.js +37 -0
- package/dist/rendering/LightSpec.js.map +1 -0
- package/dist/rendering/LightWrapper.d.ts +19 -0
- package/dist/rendering/LightWrapper.d.ts.map +1 -0
- package/dist/rendering/LightWrapper.js +114 -0
- package/dist/rendering/LightWrapper.js.map +1 -0
- package/dist/rendering/RootChitRenderInstance.d.ts +81 -0
- package/dist/rendering/RootChitRenderInstance.d.ts.map +1 -0
- package/dist/rendering/RootChitRenderInstance.js +372 -0
- package/dist/rendering/RootChitRenderInstance.js.map +1 -0
- package/dist/rendering/Splay.d.ts +23 -0
- package/dist/rendering/Splay.d.ts.map +1 -0
- package/dist/rendering/Splay.js +89 -0
- package/dist/rendering/Splay.js.map +1 -0
- package/dist/rendering/SplayCounter.d.ts +19 -0
- package/dist/rendering/SplayCounter.d.ts.map +1 -0
- package/dist/rendering/SplayCounter.js +18 -0
- package/dist/rendering/SplayCounter.js.map +1 -0
- package/dist/rendering/TextureReferenceCounter.d.ts +12 -0
- package/dist/rendering/TextureReferenceCounter.d.ts.map +1 -0
- package/dist/rendering/TextureReferenceCounter.js +76 -0
- package/dist/rendering/TextureReferenceCounter.js.map +1 -0
- package/dist/rendering/index.d.ts +1 -0
- package/dist/rendering/index.d.ts.map +1 -0
- package/dist/rendering/index.js +2 -0
- package/dist/rendering/index.js.map +1 -0
- package/dist/rendering/outline/DepthVisualizationPass.d.ts +12 -0
- package/dist/rendering/outline/DepthVisualizationPass.d.ts.map +1 -0
- package/dist/rendering/outline/DepthVisualizationPass.js +93 -0
- package/dist/rendering/outline/DepthVisualizationPass.js.map +1 -0
- package/dist/rendering/outline/EffectComposer.d.ts +24 -0
- package/dist/rendering/outline/EffectComposer.d.ts.map +1 -0
- package/dist/rendering/outline/EffectComposer.js +118 -0
- package/dist/rendering/outline/EffectComposer.js.map +1 -0
- package/dist/rendering/outline/FullScreenQuad.d.ts +12 -0
- package/dist/rendering/outline/FullScreenQuad.d.ts.map +1 -0
- package/dist/rendering/outline/FullScreenQuad.js +21 -0
- package/dist/rendering/outline/FullScreenQuad.js.map +1 -0
- package/dist/rendering/outline/IDBasedOutlinePass.d.ts +49 -0
- package/dist/rendering/outline/IDBasedOutlinePass.d.ts.map +1 -0
- package/dist/rendering/outline/IDBasedOutlinePass.js +597 -0
- package/dist/rendering/outline/IDBasedOutlinePass.js.map +1 -0
- package/dist/rendering/outline/OutputPass.d.ts +13 -0
- package/dist/rendering/outline/OutputPass.d.ts.map +1 -0
- package/dist/rendering/outline/OutputPass.js +57 -0
- package/dist/rendering/outline/OutputPass.js.map +1 -0
- package/dist/rendering/outline/RenderPass.d.ts +13 -0
- package/dist/rendering/outline/RenderPass.d.ts.map +1 -0
- package/dist/rendering/outline/RenderPass.js +54 -0
- package/dist/rendering/outline/RenderPass.js.map +1 -0
- package/dist/rendering/outline/SceneWrapper.d.ts +39 -0
- package/dist/rendering/outline/SceneWrapper.d.ts.map +1 -0
- package/dist/rendering/outline/SceneWrapper.js +522 -0
- package/dist/rendering/outline/SceneWrapper.js.map +1 -0
- package/dist/rendering/outline/ShaderPass.d.ts +12 -0
- package/dist/rendering/outline/ShaderPass.d.ts.map +1 -0
- package/dist/rendering/outline/ShaderPass.js +43 -0
- package/dist/rendering/outline/ShaderPass.js.map +1 -0
- package/dist/rendering/outline/index.d.ts +8 -0
- package/dist/rendering/outline/index.d.ts.map +1 -0
- package/dist/rendering/outline/index.js +8 -0
- package/dist/rendering/outline/index.js.map +1 -0
- package/dist/rendering/outline/passes/DebugIDMappingPass.d.ts +20 -0
- package/dist/rendering/outline/passes/DebugIDMappingPass.d.ts.map +1 -0
- package/dist/rendering/outline/passes/DebugIDMappingPass.js +131 -0
- package/dist/rendering/outline/passes/DebugIDMappingPass.js.map +1 -0
- package/dist/rendering/outline/passes/DepthOcclusionPass.d.ts +24 -0
- package/dist/rendering/outline/passes/DepthOcclusionPass.d.ts.map +1 -0
- package/dist/rendering/outline/passes/DepthOcclusionPass.js +95 -0
- package/dist/rendering/outline/passes/DepthOcclusionPass.js.map +1 -0
- package/dist/rendering/outline/passes/InterMeshEdgeDetectionPass.d.ts +32 -0
- package/dist/rendering/outline/passes/InterMeshEdgeDetectionPass.d.ts.map +1 -0
- package/dist/rendering/outline/passes/InterMeshEdgeDetectionPass.js +208 -0
- package/dist/rendering/outline/passes/InterMeshEdgeDetectionPass.js.map +1 -0
- package/dist/rendering/outline/shaders.d.ts +20 -0
- package/dist/rendering/outline/shaders.d.ts.map +1 -0
- package/dist/rendering/outline/shaders.js +103 -0
- package/dist/rendering/outline/shaders.js.map +1 -0
- package/dist/rendering/outline/types.d.ts +14 -0
- package/dist/rendering/outline/types.d.ts.map +1 -0
- package/dist/rendering/outline/types.js +16 -0
- package/dist/rendering/outline/types.js.map +1 -0
- package/dist/utilities/Annotations.d.ts +60 -0
- package/dist/utilities/Annotations.d.ts.map +1 -0
- package/dist/utilities/Annotations.js +171 -0
- package/dist/utilities/Annotations.js.map +1 -0
- package/dist/utilities/BaseTable.d.ts +8 -0
- package/dist/utilities/BaseTable.d.ts.map +1 -0
- package/dist/utilities/BaseTable.js +35 -0
- package/dist/utilities/BaseTable.js.map +1 -0
- package/dist/utilities/BboxUtils.d.ts +3 -0
- package/dist/utilities/BboxUtils.d.ts.map +1 -0
- package/dist/utilities/BboxUtils.js +19 -0
- package/dist/utilities/BboxUtils.js.map +1 -0
- package/dist/utilities/CanvasStack/CanvasOperations.d.ts +140 -0
- package/dist/utilities/CanvasStack/CanvasOperations.d.ts.map +1 -0
- package/dist/utilities/CanvasStack/CanvasOperations.js +403 -0
- package/dist/utilities/CanvasStack/CanvasOperations.js.map +1 -0
- package/dist/utilities/CanvasStack/CanvasStack.d.ts +42 -0
- package/dist/utilities/CanvasStack/CanvasStack.d.ts.map +1 -0
- package/dist/utilities/CanvasStack/CanvasStack.js +128 -0
- package/dist/utilities/CanvasStack/CanvasStack.js.map +1 -0
- package/dist/utilities/CanvasStack/IconCanvas.d.ts +10 -0
- package/dist/utilities/CanvasStack/IconCanvas.d.ts.map +1 -0
- package/dist/utilities/CanvasStack/IconCanvas.js +15 -0
- package/dist/utilities/CanvasStack/IconCanvas.js.map +1 -0
- package/dist/utilities/CanvasStack/ImageCache.d.ts +8 -0
- package/dist/utilities/CanvasStack/ImageCache.d.ts.map +1 -0
- package/dist/utilities/CanvasStack/ImageCache.js +29 -0
- package/dist/utilities/CanvasStack/ImageCache.js.map +1 -0
- package/dist/utilities/CanvasStack/ImageColorOverlayer.d.ts +2 -0
- package/dist/utilities/CanvasStack/ImageColorOverlayer.d.ts.map +1 -0
- package/dist/utilities/CanvasStack/ImageColorOverlayer.js +31 -0
- package/dist/utilities/CanvasStack/ImageColorOverlayer.js.map +1 -0
- package/dist/utilities/CanvasStack/PlayerCanvas.d.ts +10 -0
- package/dist/utilities/CanvasStack/PlayerCanvas.d.ts.map +1 -0
- package/dist/utilities/CanvasStack/PlayerCanvas.js +15 -0
- package/dist/utilities/CanvasStack/PlayerCanvas.js.map +1 -0
- package/dist/utilities/CanvasStack/ReactCanvas.d.ts +133 -0
- package/dist/utilities/CanvasStack/ReactCanvas.d.ts.map +1 -0
- package/dist/utilities/CanvasStack/ReactCanvas.js +161 -0
- package/dist/utilities/CanvasStack/ReactCanvas.js.map +1 -0
- package/dist/utilities/CanvasStack/RichTextRenderer.d.ts +63 -0
- package/dist/utilities/CanvasStack/RichTextRenderer.d.ts.map +1 -0
- package/dist/utilities/CanvasStack/RichTextRenderer.js +523 -0
- package/dist/utilities/CanvasStack/RichTextRenderer.js.map +1 -0
- package/dist/utilities/CardMesh.d.ts +17 -0
- package/dist/utilities/CardMesh.d.ts.map +1 -0
- package/dist/utilities/CardMesh.js +44 -0
- package/dist/utilities/CardMesh.js.map +1 -0
- package/dist/utilities/Dice.d.ts +24 -0
- package/dist/utilities/Dice.d.ts.map +1 -0
- package/dist/utilities/Dice.js +148 -0
- package/dist/utilities/Dice.js.map +1 -0
- package/dist/utilities/EventChannel.d.ts +13 -0
- package/dist/utilities/EventChannel.d.ts.map +1 -0
- package/dist/utilities/EventChannel.js +47 -0
- package/dist/utilities/EventChannel.js.map +1 -0
- package/dist/utilities/GalleryItemConversion.d.ts +4 -0
- package/dist/utilities/GalleryItemConversion.d.ts.map +1 -0
- package/dist/utilities/GalleryItemConversion.js +28 -0
- package/dist/utilities/GalleryItemConversion.js.map +1 -0
- package/dist/utilities/IUpdatingCanvas.d.ts +19 -0
- package/dist/utilities/IUpdatingCanvas.d.ts.map +1 -0
- package/dist/utilities/IUpdatingCanvas.js +2 -0
- package/dist/utilities/IUpdatingCanvas.js.map +1 -0
- package/dist/utilities/LayoutHelper.d.ts +34 -0
- package/dist/utilities/LayoutHelper.d.ts.map +1 -0
- package/dist/utilities/LayoutHelper.js +451 -0
- package/dist/utilities/LayoutHelper.js.map +1 -0
- package/dist/utilities/ObjectWithProps.d.ts +5 -0
- package/dist/utilities/ObjectWithProps.d.ts.map +1 -0
- package/dist/utilities/ObjectWithProps.js +65 -0
- package/dist/utilities/ObjectWithProps.js.map +1 -0
- package/dist/utilities/OutlineCanvas.d.ts +12 -0
- package/dist/utilities/OutlineCanvas.d.ts.map +1 -0
- package/dist/utilities/OutlineCanvas.js +31 -0
- package/dist/utilities/OutlineCanvas.js.map +1 -0
- package/dist/utilities/OutlineGeometry.d.ts +3 -0
- package/dist/utilities/OutlineGeometry.d.ts.map +1 -0
- package/dist/utilities/OutlineGeometry.js +57 -0
- package/dist/utilities/OutlineGeometry.js.map +1 -0
- package/dist/utilities/ParameterizedCanvas.d.ts +13 -0
- package/dist/utilities/ParameterizedCanvas.d.ts.map +1 -0
- package/dist/utilities/ParameterizedCanvas.js +85 -0
- package/dist/utilities/ParameterizedCanvas.js.map +1 -0
- package/dist/utilities/RequestSharedAnimationFrame.d.ts +2 -0
- package/dist/utilities/RequestSharedAnimationFrame.d.ts.map +1 -0
- package/dist/utilities/RequestSharedAnimationFrame.js +16 -0
- package/dist/utilities/RequestSharedAnimationFrame.js.map +1 -0
- package/dist/utilities/StaticImage.d.ts +19 -0
- package/dist/utilities/StaticImage.d.ts.map +1 -0
- package/dist/utilities/StaticImage.js +38 -0
- package/dist/utilities/StaticImage.js.map +1 -0
- package/dist/utilities/SvgExtruder.d.ts +20 -0
- package/dist/utilities/SvgExtruder.d.ts.map +1 -0
- package/dist/utilities/SvgExtruder.js +238 -0
- package/dist/utilities/SvgExtruder.js.map +1 -0
- package/dist/utilities/ThreeDisposer.d.ts +11 -0
- package/dist/utilities/ThreeDisposer.d.ts.map +1 -0
- package/dist/utilities/ThreeDisposer.js +53 -0
- package/dist/utilities/ThreeDisposer.js.map +1 -0
- package/dist/utilities/zIndex.d.ts +14 -0
- package/dist/utilities/zIndex.d.ts.map +1 -0
- package/dist/utilities/zIndex.js +14 -0
- package/dist/utilities/zIndex.js.map +1 -0
- package/package.json +138 -0
- package/src/library/assets/checker.svg +4 -0
- package/src/library/assets/cutout.svg +22 -0
- package/src/library/components/ActionLogDisplay.tsx +183 -0
- package/src/library/components/ActionLogHistory.tsx +127 -0
- package/src/library/components/ActionLogHistoryDisplay.tsx +21 -0
- package/src/library/components/ActionLogSidebar.tsx +17 -0
- package/src/library/components/BottomBar.tsx +78 -0
- package/src/library/components/BottomBarBreak.tsx +12 -0
- package/src/library/components/BottomBarButton.tsx +181 -0
- package/src/library/components/CanvasLibraryViewer.tsx +86 -0
- package/src/library/components/ChitLibraryViewer.tsx +168 -0
- package/src/library/components/ClientTrustMatchViewer.tsx +83 -0
- package/src/library/components/ContextGalleryDisplay.tsx +72 -0
- package/src/library/components/GalleryDisplay.tsx +57 -0
- package/src/library/components/GalleryPlayground.tsx +50 -0
- package/src/library/components/GalleryViewer.tsx +773 -0
- package/src/library/components/GameDesigner.tsx +39 -0
- package/src/library/components/GameDialog.tsx +43 -0
- package/src/library/components/GameModalBackdrop.tsx +47 -0
- package/src/library/components/GameModalDialog.tsx +77 -0
- package/src/library/components/LiveButton.tsx +26 -0
- package/src/library/components/MatchEndDisplay.tsx +120 -0
- package/src/library/components/MatchViewer.tsx +111 -0
- package/src/library/components/ObjectWithPropsEditor.tsx +169 -0
- package/src/library/components/Panel/MultiPanel.tsx +276 -0
- package/src/library/components/Panel/PanelContents.tsx +359 -0
- package/src/library/components/Panel/PanelTabStack.tsx +103 -0
- package/src/library/components/Panel/SinglePanel.tsx +75 -0
- package/src/library/components/Panel/ViewerWrapper.tsx +131 -0
- package/src/library/components/Panel/ViewerZoomControls.tsx +216 -0
- package/src/library/components/Panel/util.ts +7 -0
- package/src/library/components/PanelSpark.tsx +112 -0
- package/src/library/components/PersistentCanvas.tsx +81 -0
- package/src/library/components/PlayerImage.tsx +40 -0
- package/src/library/components/Playground.tsx +285 -0
- package/src/library/components/PromptControls.tsx +132 -0
- package/src/library/components/SelectableItemAndStage.tsx +49 -0
- package/src/library/components/SettingsDisplay.tsx +142 -0
- package/src/library/components/SparkLineChart.tsx +307 -0
- package/src/library/components/StageAndEditor.tsx +28 -0
- package/src/library/components/TimeControlBar.tsx +71 -0
- package/src/library/components/TokenizedMessage.tsx +206 -0
- package/src/library/components/TopBar.tsx +90 -0
- package/src/library/components/TopBarDropdown.tsx +94 -0
- package/src/library/components/TopBarPlayers.tsx +163 -0
- package/src/library/components/UpdatingCanvasImage.tsx +25 -0
- package/src/library/components/UpdatingCanvasViewer.tsx +62 -0
- package/src/library/components/Viewer.tsx +360 -0
- package/src/library/components/index.ts +0 -0
- package/src/library/game/Chit.test.ts +66 -0
- package/src/library/game/Chit.ts +575 -0
- package/src/library/game/ClientTimeState.ts +42 -0
- package/src/library/game/ClockDetails.ts +24 -0
- package/src/library/game/Connection.test.ts +50 -0
- package/src/library/game/Connection.ts +122 -0
- package/src/library/game/ConnectionObject.ts +13 -0
- package/src/library/game/ConnectionTransport.ts +52 -0
- package/src/library/game/DropdownChit.tsx +17 -0
- package/src/library/game/GalleryItemChitChildrenSource.ts +31 -0
- package/src/library/game/GalleryItemRawSource.ts +15 -0
- package/src/library/game/Game.ts +55 -0
- package/src/library/game/GameBagChit.ts +42 -0
- package/src/library/game/GameButton.ts +127 -0
- package/src/library/game/GameDeckChit.ts +77 -0
- package/src/library/game/GameTheme.ts +122 -0
- package/src/library/game/Match.ts +187 -0
- package/src/library/game/MatchConnection.ts +5 -0
- package/src/library/game/MatchStorage.ts +51 -0
- package/src/library/game/ModalState.ts +29 -0
- package/src/library/game/OrderedOutlet.ts +198 -0
- package/src/library/game/Pick.ts +314 -0
- package/src/library/game/PlayerChit.ts +43 -0
- package/src/library/game/PlayerInfo.ts +30 -0
- package/src/library/game/PlayerPromptStatusChit.ts +20 -0
- package/src/library/game/Prompt.ts +292 -0
- package/src/library/game/RootChit.ts +54 -0
- package/src/library/game/SparkChit.ts +97 -0
- package/src/library/game/StaticChitTypeRegistry.ts +3 -0
- package/src/library/game/Turn.test.ts +611 -0
- package/src/library/game/Turn.ts +1249 -0
- package/src/library/game/TurnState.ts +187 -0
- package/src/library/game/clientTransport/ClientPrompts.ts +102 -0
- package/src/library/game/clientTransport/ClientStatus.ts +36 -0
- package/src/library/game/clientTransport/ClientTime.ts +256 -0
- package/src/library/game/index.ts +0 -0
- package/src/library/game/serverTransport/ServerPrompts.ts +76 -0
- package/src/library/game/serverTransport/ServerStatus.ts +31 -0
- package/src/library/game/serverTransport/ServerTime.ts +74 -0
- package/src/library/hooks/useChits.ts +32 -0
- package/src/library/hooks/useConnection.tsx +16 -0
- package/src/library/hooks/useEventChannelState.ts +33 -0
- package/src/library/hooks/useGame.tsx +16 -0
- package/src/library/hooks/useGameTheme.tsx +12 -0
- package/src/library/hooks/useModalState.tsx +13 -0
- package/src/library/hooks/usePanelPositioning.tsx +31 -0
- package/src/library/hooks/usePanelScale.tsx +23 -0
- package/src/library/hooks/usePanelStates.ts +30 -0
- package/src/library/hooks/usePlayer.tsx +15 -0
- package/src/library/hooks/useSmartDebouncedState.ts +161 -0
- package/src/library/hooks/useTimeController.tsx +108 -0
- package/src/library/hooks/useTokenMap.ts +20 -0
- package/src/library/hooks/useWebGlRenderer.tsx +227 -0
- package/src/library/index.ts +116 -0
- package/src/library/rendering/CameraSpec.ts +25 -0
- package/src/library/rendering/CameraWrapperPerspective.ts +612 -0
- package/src/library/rendering/ChitGalleryItemInstance.ts +108 -0
- package/src/library/rendering/ChitRenderInstance.ts +1141 -0
- package/src/library/rendering/ChitRenderSpec.ts +213 -0
- package/src/library/rendering/HighlightSpec.ts +5 -0
- package/src/library/rendering/LightSpec.ts +41 -0
- package/src/library/rendering/LightWrapper.ts +152 -0
- package/src/library/rendering/RootChitRenderInstance.ts +460 -0
- package/src/library/rendering/Splay.ts +118 -0
- package/src/library/rendering/SplayCounter.tsx +37 -0
- package/src/library/rendering/TextureReferenceCounter.ts +86 -0
- package/src/library/rendering/index.ts +0 -0
- package/src/library/rendering/outline/DepthVisualizationPass.ts +117 -0
- package/src/library/rendering/outline/EffectComposer.ts +187 -0
- package/src/library/rendering/outline/FullScreenQuad.ts +32 -0
- package/src/library/rendering/outline/IDBasedOutlinePass.ts +741 -0
- package/src/library/rendering/outline/OutputPass.ts +88 -0
- package/src/library/rendering/outline/RenderPass.ts +72 -0
- package/src/library/rendering/outline/SceneWrapper.ts +617 -0
- package/src/library/rendering/outline/ShaderPass.ts +50 -0
- package/src/library/rendering/outline/index.ts +8 -0
- package/src/library/rendering/outline/passes/DebugIDMappingPass.ts +154 -0
- package/src/library/rendering/outline/passes/DepthOcclusionPass.ts +106 -0
- package/src/library/rendering/outline/passes/InterMeshEdgeDetectionPass.ts +244 -0
- package/src/library/rendering/outline/shaders.ts +110 -0
- package/src/library/rendering/outline/types.ts +25 -0
- package/src/library/utilities/Annotations.ts +188 -0
- package/src/library/utilities/BaseTable.tsx +58 -0
- package/src/library/utilities/BboxUtils.ts +23 -0
- package/src/library/utilities/CanvasStack/CanvasOperations.tsx +630 -0
- package/src/library/utilities/CanvasStack/CanvasStack.ts +191 -0
- package/src/library/utilities/CanvasStack/IconCanvas.tsx +17 -0
- package/src/library/utilities/CanvasStack/ImageCache.ts +38 -0
- package/src/library/utilities/CanvasStack/ImageColorOverlayer.ts +36 -0
- package/src/library/utilities/CanvasStack/PlayerCanvas.tsx +17 -0
- package/src/library/utilities/CanvasStack/ReactCanvas.tsx +293 -0
- package/src/library/utilities/CanvasStack/RichTextRenderer.ts +719 -0
- package/src/library/utilities/CardMesh.ts +55 -0
- package/src/library/utilities/Dice.tsx +183 -0
- package/src/library/utilities/EventChannel.ts +52 -0
- package/src/library/utilities/GalleryItemConversion.ts +30 -0
- package/src/library/utilities/IUpdatingCanvas.ts +14 -0
- package/src/library/utilities/LayoutHelper.ts +586 -0
- package/src/library/utilities/ObjectWithProps.ts +52 -0
- package/src/library/utilities/OutlineCanvas.tsx +45 -0
- package/src/library/utilities/OutlineGeometry.ts +69 -0
- package/src/library/utilities/ParameterizedCanvas.ts +78 -0
- package/src/library/utilities/RequestSharedAnimationFrame.ts +16 -0
- package/src/library/utilities/StaticImage.tsx +58 -0
- package/src/library/utilities/SvgExtruder.ts +330 -0
- package/src/library/utilities/ThreeDisposer.ts +66 -0
- package/src/library/utilities/zIndex.ts +15 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const ZINDEX_GALLERY_INVISIBLE = -1;
|
|
2
|
+
export declare const ZINDEX_BOTTOM_BAR_BUTTON_LONG_CLICK = 1;
|
|
3
|
+
export declare const ZINDEX_BOTTOM_BAR_BUTTON_LABEL = 2;
|
|
4
|
+
export declare const ZINDEX_PROMPT_CONTROLS = 3;
|
|
5
|
+
export declare const ZINDEX_SPARKS = 10;
|
|
6
|
+
export declare const ZINDEX_PANEL_CUTOUTS = 11;
|
|
7
|
+
export declare const ZINDEX_PINCH_OUT = 50;
|
|
8
|
+
export declare const ZINDEX_PINCH_OUT_FOCUSED = 51;
|
|
9
|
+
export declare const ZINDEX_CONTEXT_GALLERY_DISPLAY = 140;
|
|
10
|
+
export declare const ZINDEX_MATCH_END_DISPLAY = 150;
|
|
11
|
+
export declare const ZINDEX_GALLERY_VISIBLE = 160;
|
|
12
|
+
export declare const ZINDEX_TOP_BAR_HEADER = 210;
|
|
13
|
+
export declare const ZINDEX_TOP_BAR_BODY = 200;
|
|
14
|
+
//# sourceMappingURL=zIndex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zIndex.d.ts","sourceRoot":"","sources":["../../src/library/utilities/zIndex.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,eAAO,MAAM,mCAAmC,IAAI,CAAC;AACrD,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAChD,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAClD,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAC5C,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,mBAAmB,MAAM,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const ZINDEX_GALLERY_INVISIBLE = -1;
|
|
2
|
+
export const ZINDEX_BOTTOM_BAR_BUTTON_LONG_CLICK = 1;
|
|
3
|
+
export const ZINDEX_BOTTOM_BAR_BUTTON_LABEL = 2;
|
|
4
|
+
export const ZINDEX_PROMPT_CONTROLS = 3;
|
|
5
|
+
export const ZINDEX_SPARKS = 10;
|
|
6
|
+
export const ZINDEX_PANEL_CUTOUTS = 11;
|
|
7
|
+
export const ZINDEX_PINCH_OUT = 50;
|
|
8
|
+
export const ZINDEX_PINCH_OUT_FOCUSED = 51;
|
|
9
|
+
export const ZINDEX_CONTEXT_GALLERY_DISPLAY = 140;
|
|
10
|
+
export const ZINDEX_MATCH_END_DISPLAY = 150;
|
|
11
|
+
export const ZINDEX_GALLERY_VISIBLE = 160;
|
|
12
|
+
export const ZINDEX_TOP_BAR_HEADER = 210;
|
|
13
|
+
export const ZINDEX_TOP_BAR_BODY = 200;
|
|
14
|
+
//# sourceMappingURL=zIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zIndex.js","sourceRoot":"","sources":["../../src/library/utilities/zIndex.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,CAAC;AAC3C,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC;AACrD,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC;AAChD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAAC;AAChC,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAE3C,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAClD,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAC5C,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAC1C,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AACzC,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pretty-chitty/core",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
|
+
"description": "A TypeScript framework for building high-quality async or realtime 3D strategy board games",
|
|
6
|
+
"author": "Pretty Chitty, LLC",
|
|
7
|
+
"homepage": "https://pretty-chitty.github.io/pretty-chitty/",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/pretty-chitty/pretty-chitty.git"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"game-engine",
|
|
14
|
+
"board-game",
|
|
15
|
+
"3d",
|
|
16
|
+
"threejs",
|
|
17
|
+
"game-development",
|
|
18
|
+
"strategy-game",
|
|
19
|
+
"multiplayer",
|
|
20
|
+
"typescript",
|
|
21
|
+
"react"
|
|
22
|
+
],
|
|
23
|
+
"main": "./dist/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"import": "./dist/index.js",
|
|
28
|
+
"types": "./dist/index.d.ts"
|
|
29
|
+
},
|
|
30
|
+
"./ReactCanvas": {
|
|
31
|
+
"import": "./dist/utilities/CanvasStack/ReactCanvas.js",
|
|
32
|
+
"types": "./dist/utilities/CanvasStack/ReactCanvas.d.ts"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist",
|
|
37
|
+
"src/library",
|
|
38
|
+
"README.md",
|
|
39
|
+
"LICENSE.md"
|
|
40
|
+
],
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@babel/core": "^7.23.3",
|
|
43
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
44
|
+
"@babel/plugin-proposal-decorators": "^7.23.5",
|
|
45
|
+
"@babel/plugin-syntax-decorators": "^7.23.3",
|
|
46
|
+
"@babel/plugin-transform-typescript": "^7.23.6",
|
|
47
|
+
"@babel/preset-env": "^7.23.3",
|
|
48
|
+
"@babel/preset-react": "^7.23.3",
|
|
49
|
+
"@babel/preset-typescript": "^7.23.3",
|
|
50
|
+
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
|
|
51
|
+
"@types/base-64": "^1.0.2",
|
|
52
|
+
"@types/color": "^3.0.6",
|
|
53
|
+
"@types/jest": "^29.5.11",
|
|
54
|
+
"@types/next-tick": "^1.0.2",
|
|
55
|
+
"@types/node": "^20.11.3",
|
|
56
|
+
"@types/wheel": "^0.0.3",
|
|
57
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
58
|
+
"@typescript-eslint/parser": "^6.21.0",
|
|
59
|
+
"@vitest/coverage-v8": "^1.2.0",
|
|
60
|
+
"babel-loader": "^9.1.3",
|
|
61
|
+
"babel-plugin-transform-typescript-metadata": "^0.3.2",
|
|
62
|
+
"css-loader": "^6.9.1",
|
|
63
|
+
"depcheck": "^1.4.7",
|
|
64
|
+
"eslint": "^8.56.0",
|
|
65
|
+
"eslint-config-prettier": "^9.1.0",
|
|
66
|
+
"eslint-plugin-react": "^7.33.2",
|
|
67
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
68
|
+
"html-webpack-plugin": "^5.5.3",
|
|
69
|
+
"jest": "^29.7.0",
|
|
70
|
+
"prettier": "^3.2.5",
|
|
71
|
+
"react-refresh": "^0.14.0",
|
|
72
|
+
"style-loader": "^3.3.4",
|
|
73
|
+
"ts-jest": "^29.4.6",
|
|
74
|
+
"ts-loader": "^9.5.1",
|
|
75
|
+
"ts-patch": "^3.3.0",
|
|
76
|
+
"typedoc": "^0.28.15",
|
|
77
|
+
"typescript": "5.9",
|
|
78
|
+
"vitest": "^1.2.0",
|
|
79
|
+
"vitest-mock-extended": "^1.3.1",
|
|
80
|
+
"webpack": "^5.90.3",
|
|
81
|
+
"webpack-cli": "^5.1.4",
|
|
82
|
+
"webpack-dev-server": "^4.15.1",
|
|
83
|
+
"webpack-node-externals": "^3.0.0"
|
|
84
|
+
},
|
|
85
|
+
"prettier": {
|
|
86
|
+
"printWidth": 120
|
|
87
|
+
},
|
|
88
|
+
"dependencies": {
|
|
89
|
+
"@egjs/hammerjs": "^2.0.17",
|
|
90
|
+
"@emotion/react": "^11.11.0",
|
|
91
|
+
"@emotion/styled": "^11.11.0",
|
|
92
|
+
"@fontsource/raleway": "^5.0.16",
|
|
93
|
+
"@material-ui/core": "^4.12.4",
|
|
94
|
+
"@material-ui/icons": "^4.11.3",
|
|
95
|
+
"@mui/icons-material": "^5.15.0",
|
|
96
|
+
"@mui/material": "^5.15.0",
|
|
97
|
+
"@multiavatar/multiavatar": "^1.0.7",
|
|
98
|
+
"@react-hook/debounce": "^4.0.0",
|
|
99
|
+
"@react-hook/hover": "^4.0.0",
|
|
100
|
+
"@react-hook/size": "^2.1.2",
|
|
101
|
+
"@tweenjs/tween.js": "^23.1.1",
|
|
102
|
+
"@types/react": "^18.2.34",
|
|
103
|
+
"@types/react-dom": "^18.2.14",
|
|
104
|
+
"@types/three": "^0.158.0",
|
|
105
|
+
"base-64": "^1.0.0",
|
|
106
|
+
"color": "^4.2.3",
|
|
107
|
+
"extrude-polyline": "^1.0.6",
|
|
108
|
+
"mui-modal-provider": "^2.4.2",
|
|
109
|
+
"next-tick": "^1.1.0",
|
|
110
|
+
"quick-lru": "^7.0.0",
|
|
111
|
+
"react": "^18.2.0",
|
|
112
|
+
"react-dom": "^18.2.0",
|
|
113
|
+
"react-interval-hook": "^1.1.4",
|
|
114
|
+
"react-markdown": "^9.0.1",
|
|
115
|
+
"react-random-avatars": "^1.3.1",
|
|
116
|
+
"react-window": "^2.2.1",
|
|
117
|
+
"reflect-metadata": "^0.1.14",
|
|
118
|
+
"three": "^0.158.0",
|
|
119
|
+
"three-csg-ts": "^3.1.13",
|
|
120
|
+
"use-local-storage-state": "^19.1.0",
|
|
121
|
+
"use-long-press": "^3.2.0",
|
|
122
|
+
"wheel": "^1.0.0"
|
|
123
|
+
},
|
|
124
|
+
"scripts": {
|
|
125
|
+
"dev": "webpack serve",
|
|
126
|
+
"start": "webpack serve",
|
|
127
|
+
"build": "rm -rf dist && yarn tsc --project tsconfig.build.json && yarn docs && yarn pack",
|
|
128
|
+
"build:no-sourcemaps": "rm -rf dist && yarn tsc --project tsconfig.build.json --sourceMap false --declarationMap false && yarn pack",
|
|
129
|
+
"build:demo": "NODE_ENV=production webpack --config webpack.demo.config.js",
|
|
130
|
+
"build:all": "yarn build && yarn build:demo",
|
|
131
|
+
"test": "vitest",
|
|
132
|
+
"compile:check": "tsc",
|
|
133
|
+
"lint": "eslint .",
|
|
134
|
+
"lint:fix": "eslint . --fix",
|
|
135
|
+
"coverage": "vitest run --coverage",
|
|
136
|
+
"docs": "typedoc"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
width="40"
|
|
4
|
+
height="20"
|
|
5
|
+
version="1.1"
|
|
6
|
+
id="svg4"
|
|
7
|
+
sodipodi:docname="cutout.svg"
|
|
8
|
+
viewport="0 0 40 20"
|
|
9
|
+
inkscape:version="1.3.1 (9b9bdc1480, 2023-11-25, custom)"
|
|
10
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
11
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
|
14
|
+
<rect
|
|
15
|
+
style="fill:#000000;stroke-width:1.58232"
|
|
16
|
+
id="rect4"
|
|
17
|
+
width="34"
|
|
18
|
+
height="8"
|
|
19
|
+
x="3"
|
|
20
|
+
y="6"
|
|
21
|
+
ry="4" />
|
|
22
|
+
</svg>
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
2
|
+
import { Box, Stack } from "@mui/material";
|
|
3
|
+
import { useGameTheme } from "../hooks/useGameTheme";
|
|
4
|
+
import useSize from "@react-hook/size";
|
|
5
|
+
import { useEventChannelState } from "../hooks/useEventChannelState";
|
|
6
|
+
import {
|
|
7
|
+
useAnimationSpeedMultiplier,
|
|
8
|
+
useClientPrompts,
|
|
9
|
+
useTimeController,
|
|
10
|
+
useTimeState,
|
|
11
|
+
} from "../hooks/useTimeController";
|
|
12
|
+
import { TokenizedMessage } from "./TokenizedMessage";
|
|
13
|
+
import { useChit, useChits } from "../hooks/useChits";
|
|
14
|
+
import { PlayerChit } from "../game/PlayerChit";
|
|
15
|
+
import { RootChit } from "../game/RootChit";
|
|
16
|
+
import { usePlayerId } from "../hooks/usePlayer";
|
|
17
|
+
import { NoValidMovesPrompt } from "../game/Prompt";
|
|
18
|
+
import { useTokenMap } from "../hooks/useTokenMap";
|
|
19
|
+
import { useModalState } from "../hooks/useModalState";
|
|
20
|
+
import { KeyboardDoubleArrowUp } from "@mui/icons-material";
|
|
21
|
+
import { useSmartDebouncedState } from "../hooks/useSmartDebouncedState";
|
|
22
|
+
|
|
23
|
+
function Arrow({ flipped, sideways }: { flipped?: boolean; sideways?: boolean }) {
|
|
24
|
+
const theme = useGameTheme();
|
|
25
|
+
return (
|
|
26
|
+
<Box
|
|
27
|
+
sx={{
|
|
28
|
+
color: theme.actionLogTextColor,
|
|
29
|
+
opacity: 0.25,
|
|
30
|
+
alignItems: "center",
|
|
31
|
+
display: "flex",
|
|
32
|
+
transform: !sideways
|
|
33
|
+
? flipped
|
|
34
|
+
? "rotate(180deg)"
|
|
35
|
+
: "rotate(0deg)"
|
|
36
|
+
: flipped
|
|
37
|
+
? "rotate(90deg)"
|
|
38
|
+
: "rotate(270deg)",
|
|
39
|
+
transition: "transform 0.1s ease-in-out",
|
|
40
|
+
}}
|
|
41
|
+
>
|
|
42
|
+
<KeyboardDoubleArrowUp />
|
|
43
|
+
</Box>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function ActionLogDisplay({ toggleSidebarLog }: { toggleSidebarLog: boolean }) {
|
|
48
|
+
const modalState = useModalState();
|
|
49
|
+
const animationSpeedMultiplier = useAnimationSpeedMultiplier();
|
|
50
|
+
const [visible, setVisible] = useEventChannelState(modalState.actionLogVisible);
|
|
51
|
+
const timeController = useTimeController();
|
|
52
|
+
const timeState = useTimeState();
|
|
53
|
+
const [currentClock] = useEventChannelState(timeController.currentClock);
|
|
54
|
+
const [targetClock] = useEventChannelState(timeState.targetClock);
|
|
55
|
+
const [live] = useEventChannelState(timeState.live);
|
|
56
|
+
const [maxClock] = useEventChannelState(timeController.maxClock);
|
|
57
|
+
const [showLog, setShowLog] = useEventChannelState(timeController.clientTimeState.showLog);
|
|
58
|
+
|
|
59
|
+
const theme = useGameTheme();
|
|
60
|
+
const containerRef = useRef<HTMLDivElement>(null);
|
|
61
|
+
const [width] = useSize(containerRef);
|
|
62
|
+
const layoutSize = theme.layoutSize(width);
|
|
63
|
+
const clientPrompt = useClientPrompts();
|
|
64
|
+
|
|
65
|
+
const [prompt] = useEventChannelState(clientPrompt.currentPrompt);
|
|
66
|
+
const [promptMode, setPromptMode] = useState(false);
|
|
67
|
+
const playerId = usePlayerId();
|
|
68
|
+
const [promptSpec] = useEventChannelState(clientPrompt.getPromptEventChannelForPlayer(playerId));
|
|
69
|
+
const tokenMap = useTokenMap();
|
|
70
|
+
|
|
71
|
+
const [message, setMessage] = useSmartDebouncedState<string | undefined>(undefined, {
|
|
72
|
+
interval: 1000 * animationSpeedMultiplier,
|
|
73
|
+
// immediate: 50,
|
|
74
|
+
});
|
|
75
|
+
const [isSteppingBack, setIsSteppingBack] = useState(false);
|
|
76
|
+
const [messageHasntChanged, setMessageHasntChanged] = useState(false);
|
|
77
|
+
const [logMessage] = useEventChannelState(timeController.activeLog);
|
|
78
|
+
|
|
79
|
+
const PADDING_SIZE = 8; // bs i know
|
|
80
|
+
|
|
81
|
+
const root = useChit<RootChit<PlayerChit>>("root");
|
|
82
|
+
|
|
83
|
+
const playerChits = useChits<PlayerChit>(root?.players.map((p) => p.id ?? "") ?? []);
|
|
84
|
+
playerChits.map((p) => p.promptStatus.latestPromptMessage).fill;
|
|
85
|
+
|
|
86
|
+
// calc if a prompt message. this has highest priority
|
|
87
|
+
let promptMessage: string | undefined;
|
|
88
|
+
if (prompt) {
|
|
89
|
+
if (prompt instanceof NoValidMovesPrompt) {
|
|
90
|
+
promptMessage = `:warning: ${prompt?.message ?? ""}`;
|
|
91
|
+
} else {
|
|
92
|
+
promptMessage = `:${playerId}: to ${prompt?.message ?? ""}`;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
if (!live) {
|
|
98
|
+
setPromptMode(false);
|
|
99
|
+
} else if (!prompt) {
|
|
100
|
+
// duplicated from promptcontrols... not ideal, but can fix later if this works
|
|
101
|
+
const to = setTimeout(() => setPromptMode(false), promptSpec ? 4000 : 400);
|
|
102
|
+
return () => clearTimeout(to);
|
|
103
|
+
} else {
|
|
104
|
+
setPromptMode(true);
|
|
105
|
+
}
|
|
106
|
+
}, [live, prompt, promptSpec]);
|
|
107
|
+
|
|
108
|
+
// debounce messages and lock up animation loop
|
|
109
|
+
useEffect(() => {
|
|
110
|
+
setMessage(logMessage);
|
|
111
|
+
setMessageHasntChanged(false);
|
|
112
|
+
const key = `ActionLogDisplay${Date.now()}`;
|
|
113
|
+
setTimeout(() => timeState.setAnimationState(key, false), 1000 * animationSpeedMultiplier);
|
|
114
|
+
const to2 = setTimeout(() => {
|
|
115
|
+
setMessageHasntChanged(true);
|
|
116
|
+
}, 5000 * animationSpeedMultiplier);
|
|
117
|
+
return () => {
|
|
118
|
+
clearTimeout(to2);
|
|
119
|
+
};
|
|
120
|
+
}, [logMessage, animationSpeedMultiplier, timeState, setMessage]);
|
|
121
|
+
|
|
122
|
+
// mark if we are stepping back
|
|
123
|
+
useEffect(() => {
|
|
124
|
+
if (live && targetClock < currentClock.clock) {
|
|
125
|
+
setIsSteppingBack(true);
|
|
126
|
+
setTimeout(() => setIsSteppingBack(false), 1000 * animationSpeedMultiplier);
|
|
127
|
+
}
|
|
128
|
+
}, [live, currentClock.clock, currentClock.pass, targetClock, maxClock.pass, animationSpeedMultiplier]);
|
|
129
|
+
|
|
130
|
+
let messageToShow = message;
|
|
131
|
+
if (promptMode) {
|
|
132
|
+
messageToShow = promptMessage;
|
|
133
|
+
} else if (isSteppingBack) {
|
|
134
|
+
messageToShow = "↩ Stepping back...";
|
|
135
|
+
} else if (messageHasntChanged && live) {
|
|
136
|
+
const waitingPlayers = playerChits.filter((p) => p.promptStatus?.latestPromptMessage);
|
|
137
|
+
if (waitingPlayers.length > 0 && !waitingPlayers.find((p) => p.playerId === playerId)) {
|
|
138
|
+
messageToShow = `Waiting for ${waitingPlayers.map((p) => `:${p.playerId}:`).join(" and ")}`;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const toggle = () => {
|
|
143
|
+
if (toggleSidebarLog) {
|
|
144
|
+
setShowLog(!showLog);
|
|
145
|
+
} else {
|
|
146
|
+
setVisible(!visible);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
return (
|
|
151
|
+
<Stack
|
|
152
|
+
direction={"row"}
|
|
153
|
+
ref={containerRef}
|
|
154
|
+
sx={{
|
|
155
|
+
background: theme.actionLogBackgroundColor,
|
|
156
|
+
cursor: "pointer",
|
|
157
|
+
}}
|
|
158
|
+
onClick={toggle}
|
|
159
|
+
>
|
|
160
|
+
<Box flex={1} />
|
|
161
|
+
{!toggleSidebarLog && <Arrow flipped={visible} />}
|
|
162
|
+
<Box
|
|
163
|
+
flex={1000}
|
|
164
|
+
sx={{
|
|
165
|
+
p: 1,
|
|
166
|
+
lineHeight: 1,
|
|
167
|
+
textAlign: "center",
|
|
168
|
+
minHeight: 14 * theme.actionBarLinesToShow * 1.1 + PADDING_SIZE * 2, // 8px for padding?
|
|
169
|
+
color: theme.actionLogTextColor,
|
|
170
|
+
maxWidth: layoutSize !== "mobile" ? `${theme.actionBarWidth - 40}px` : undefined,
|
|
171
|
+
display: "flex",
|
|
172
|
+
alignItems: "center",
|
|
173
|
+
justifyContent: "center",
|
|
174
|
+
}}
|
|
175
|
+
>
|
|
176
|
+
<TokenizedMessage message={messageToShow ?? ""} fontSize={14} tokenMap={tokenMap} />
|
|
177
|
+
</Box>
|
|
178
|
+
{!toggleSidebarLog && <Arrow flipped={visible} />}
|
|
179
|
+
<Box flex={1} />
|
|
180
|
+
{toggleSidebarLog && <Arrow sideways flipped={showLog} />}
|
|
181
|
+
</Stack>
|
|
182
|
+
);
|
|
183
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
|
+
import { Box, Stack } from "@mui/material";
|
|
3
|
+
import { useListRef, type RowComponentProps } from "react-window";
|
|
4
|
+
import { List, useDynamicRowHeight } from "react-window";
|
|
5
|
+
import { useGameTheme } from "../hooks/useGameTheme";
|
|
6
|
+
import { TokenDefinition, TokenizedMessage } from "./TokenizedMessage";
|
|
7
|
+
import { useTokenMap } from "../hooks/useTokenMap";
|
|
8
|
+
import { GameTheme } from "../game/GameTheme";
|
|
9
|
+
import { useModalState } from "../hooks/useModalState";
|
|
10
|
+
import { useEventChannelState } from "../hooks/useEventChannelState";
|
|
11
|
+
import { useClientPrompts, useTimeController, useTimeState } from "../hooks/useTimeController";
|
|
12
|
+
|
|
13
|
+
interface LogEntry {
|
|
14
|
+
message: string;
|
|
15
|
+
clock: number;
|
|
16
|
+
endClock: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface RowData {
|
|
20
|
+
messages: LogEntry[];
|
|
21
|
+
tokenMap: Record<string, TokenDefinition>;
|
|
22
|
+
theme: GameTheme;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function RowComponent({ index, messages, style, tokenMap, theme }: RowComponentProps<RowData>) {
|
|
26
|
+
const clientPrompt = useClientPrompts();
|
|
27
|
+
const [prompt] = useEventChannelState(clientPrompt.currentPrompt);
|
|
28
|
+
const modalState = useModalState();
|
|
29
|
+
const clientTime = useTimeController();
|
|
30
|
+
const clientTimeState = useTimeState();
|
|
31
|
+
const [currentClock] = useEventChannelState(clientTime.currentClock);
|
|
32
|
+
const [, setTargetClock] = useEventChannelState(clientTimeState.targetClock);
|
|
33
|
+
const [, setLive] = useEventChannelState(clientTimeState.live);
|
|
34
|
+
const isCurrent =
|
|
35
|
+
!prompt && currentClock.clock > messages[index].clock && currentClock.clock <= messages[index].endClock;
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<Stack
|
|
39
|
+
onClick={() => {
|
|
40
|
+
setTargetClock(messages[index].clock + 1);
|
|
41
|
+
setLive(false);
|
|
42
|
+
modalState.actionLogVisible.value = false;
|
|
43
|
+
}}
|
|
44
|
+
direction={"row"}
|
|
45
|
+
style={style}
|
|
46
|
+
sx={{
|
|
47
|
+
display: "flex",
|
|
48
|
+
alignItems: "center",
|
|
49
|
+
p: 1,
|
|
50
|
+
pl: 2,
|
|
51
|
+
pr: 2,
|
|
52
|
+
cursor: "pointer",
|
|
53
|
+
color: theme.actionLogTextColor,
|
|
54
|
+
background: isCurrent
|
|
55
|
+
? theme.actionLogDialogHighlightBackgroundColor
|
|
56
|
+
: index % 2 === 0
|
|
57
|
+
? "rgba(128,128,128,0.1)"
|
|
58
|
+
: "transparent",
|
|
59
|
+
}}
|
|
60
|
+
>
|
|
61
|
+
<Box sx={{ width: 25, fontSize: 11, textAlign: "right" }}>{messages[index].clock + 1}</Box>
|
|
62
|
+
<Box flex={1} sx={{ pl: 2 }}>
|
|
63
|
+
<TokenizedMessage message={messages[index].message} fontSize={14} tokenMap={tokenMap} />
|
|
64
|
+
</Box>
|
|
65
|
+
</Stack>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
interface ActionLogHistoryProps {
|
|
70
|
+
visible: boolean;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function ActionLogHistory({ visible }: ActionLogHistoryProps) {
|
|
74
|
+
const theme = useGameTheme();
|
|
75
|
+
const tokenMap = useTokenMap();
|
|
76
|
+
const [messages, setMessages] = useState<LogEntry[]>([]);
|
|
77
|
+
const listRef = useListRef(null);
|
|
78
|
+
const clientTime = useTimeController();
|
|
79
|
+
const [maxClock] = useEventChannelState(clientTime.maxClock);
|
|
80
|
+
const [currentClock] = useEventChannelState(clientTime.currentClock);
|
|
81
|
+
|
|
82
|
+
const dynamicRowHeight = useDynamicRowHeight({ defaultRowHeight: 40 });
|
|
83
|
+
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
if (!visible) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
let ignoreResponse = false;
|
|
90
|
+
clientTime.gameLogs().then((logs) => {
|
|
91
|
+
if (!ignoreResponse) {
|
|
92
|
+
setMessages(
|
|
93
|
+
logs
|
|
94
|
+
?.map((l, i) => ({
|
|
95
|
+
message: l.message,
|
|
96
|
+
clock: l.clock,
|
|
97
|
+
endClock: logs[i + 1]?.clock ?? Number.MAX_SAFE_INTEGER,
|
|
98
|
+
}))
|
|
99
|
+
.reverse() ?? [],
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
return () => {
|
|
104
|
+
ignoreResponse = true;
|
|
105
|
+
};
|
|
106
|
+
}, [maxClock, clientTime, visible]);
|
|
107
|
+
|
|
108
|
+
// Scroll to top when visible changes from false to true
|
|
109
|
+
useEffect(() => {
|
|
110
|
+
if (visible && listRef.current) {
|
|
111
|
+
const index = messages.findIndex((m) => m.clock <= currentClock.clock && m.endClock > currentClock.clock);
|
|
112
|
+
if (index >= 0) {
|
|
113
|
+
listRef.current.scrollToRow({ index });
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}, [visible, listRef, messages, currentClock]);
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
<List<RowData>
|
|
120
|
+
listRef={listRef}
|
|
121
|
+
rowComponent={RowComponent}
|
|
122
|
+
rowCount={messages.length}
|
|
123
|
+
rowHeight={dynamicRowHeight}
|
|
124
|
+
rowProps={{ messages, tokenMap, theme }}
|
|
125
|
+
/>
|
|
126
|
+
);
|
|
127
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { useEffect } from "react";
|
|
2
|
+
import { GameModalDialog } from "./GameModalDialog";
|
|
3
|
+
import { ActionLogHistory } from "./ActionLogHistory";
|
|
4
|
+
import { useModalState } from "../hooks/useModalState";
|
|
5
|
+
import { useEventChannelState } from "../hooks/useEventChannelState";
|
|
6
|
+
import { useTimeState } from "../hooks/useTimeController";
|
|
7
|
+
|
|
8
|
+
export function ActionLogHistoryDisplay() {
|
|
9
|
+
const modalState = useModalState();
|
|
10
|
+
const [visible, setVisible] = useEventChannelState(modalState.actionLogVisible);
|
|
11
|
+
const timeState = useTimeState();
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
timeState.setAnimationState("actionLogOpen", visible);
|
|
14
|
+
}, [visible, timeState]);
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<GameModalDialog visible={visible} onClose={() => setVisible(false)} title="Log">
|
|
18
|
+
<ActionLogHistory visible={visible} />
|
|
19
|
+
</GameModalDialog>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Box } from "@mui/material";
|
|
3
|
+
import { useGameTheme } from "../hooks/useGameTheme";
|
|
4
|
+
import { ActionLogHistory } from "./ActionLogHistory";
|
|
5
|
+
|
|
6
|
+
export function ActionLogSidebar() {
|
|
7
|
+
const theme = useGameTheme();
|
|
8
|
+
return (
|
|
9
|
+
<Box
|
|
10
|
+
sx={{ position: "relative", height: `100%`, width: "350px", background: theme.actionLogDialogBackgroundColor }}
|
|
11
|
+
>
|
|
12
|
+
<Box sx={{ position: "absolute", top: 0, left: 0, right: 0, bottom: 0 }}>
|
|
13
|
+
<ActionLogHistory visible />
|
|
14
|
+
</Box>
|
|
15
|
+
</Box>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import React, { ReactNode, useRef } from "react";
|
|
2
|
+
import { Box, Stack } from "@mui/material";
|
|
3
|
+
import { useGameTheme } from "../hooks/useGameTheme";
|
|
4
|
+
import TimeControlBar from "./TimeControlBar";
|
|
5
|
+
import PromptControls from "./PromptControls";
|
|
6
|
+
import useSize from "@react-hook/size";
|
|
7
|
+
|
|
8
|
+
function BaseBottomBar({ children }: { children: ReactNode | ReactNode[] }) {
|
|
9
|
+
const theme = useGameTheme();
|
|
10
|
+
return (
|
|
11
|
+
<Box
|
|
12
|
+
sx={{
|
|
13
|
+
overflow: "hidden",
|
|
14
|
+
position: "relative",
|
|
15
|
+
background: `${theme.barColor} linear-gradient(${theme.barGradientAngle}deg, rgba(255,255,255,${theme.barGradientPercent}) 0%, rgba(0,0,0,${theme.barGradientPercent}) 100%)`,
|
|
16
|
+
height: theme.bottomBarHeight,
|
|
17
|
+
}}
|
|
18
|
+
>
|
|
19
|
+
{children}
|
|
20
|
+
</Box>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default function BottomBar() {
|
|
25
|
+
const theme = useGameTheme();
|
|
26
|
+
const containerRef = useRef<HTMLDivElement>(null);
|
|
27
|
+
const [width] = useSize(containerRef);
|
|
28
|
+
|
|
29
|
+
const layoutSize = theme.layoutSize(width);
|
|
30
|
+
|
|
31
|
+
// Mobile: current behavior (live mode shows buttons, timeline mode shows TimeControlBar)
|
|
32
|
+
if (layoutSize === "mobile") {
|
|
33
|
+
return (
|
|
34
|
+
<BaseBottomBar>
|
|
35
|
+
<Stack ref={containerRef} direction="row" sx={{ width: "100%", height: "100%" }}>
|
|
36
|
+
<TimeControlBar />
|
|
37
|
+
<Box flex={1} />
|
|
38
|
+
<PromptControls collapsible />
|
|
39
|
+
</Stack>
|
|
40
|
+
</BaseBottomBar>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Medium: time controls left half, prompt controls right half
|
|
45
|
+
if (layoutSize === "medium") {
|
|
46
|
+
return (
|
|
47
|
+
<BaseBottomBar>
|
|
48
|
+
<Stack ref={containerRef} direction="row" sx={{ width: "100%", height: "100%" }}>
|
|
49
|
+
<Box sx={{ width: "50%", display: "flex" }}>
|
|
50
|
+
<TimeControlBar autoLive includeGridButton />
|
|
51
|
+
</Box>
|
|
52
|
+
<Box sx={{ width: "50%", display: "flex" }}>
|
|
53
|
+
<PromptControls />
|
|
54
|
+
</Box>
|
|
55
|
+
</Stack>
|
|
56
|
+
</BaseBottomBar>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Large: time controls left 1/3, prompt controls middle 1/3, empty right 1/3
|
|
61
|
+
return (
|
|
62
|
+
<BaseBottomBar>
|
|
63
|
+
<Stack ref={containerRef} direction="row" sx={{ width: "100%", height: "100%" }}>
|
|
64
|
+
<Box flex={1}>
|
|
65
|
+
<TimeControlBar autoLive />
|
|
66
|
+
</Box>
|
|
67
|
+
<Box sx={{ width: `${theme.actionBarWidth}px`, display: "flex" }}>
|
|
68
|
+
<PromptControls />
|
|
69
|
+
</Box>
|
|
70
|
+
<Box flex={1}>
|
|
71
|
+
<Stack direction="row" sx={{ pr: 1, pl: 1, height: "100%", width: "100%" }}>
|
|
72
|
+
<Box flex={1} />
|
|
73
|
+
</Stack>
|
|
74
|
+
</Box>
|
|
75
|
+
</Stack>
|
|
76
|
+
</BaseBottomBar>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Box } from "@mui/material";
|
|
3
|
+
import { useGameTheme } from "../hooks/useGameTheme";
|
|
4
|
+
|
|
5
|
+
export default function BottomBarBreak() {
|
|
6
|
+
const theme = useGameTheme();
|
|
7
|
+
return (
|
|
8
|
+
<Box sx={{ width: "1px", height: "100%", pt: 1, pb: 1 }}>
|
|
9
|
+
<Box sx={{ background: theme.barBreak, width: "1px", height: "100%" }} />;
|
|
10
|
+
</Box>
|
|
11
|
+
);
|
|
12
|
+
}
|