@ankhorage/zora 21.0.22 → 21.1.0
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/CHANGELOG.md +20 -0
- package/README.md +40 -184
- package/dist/features/authoring/allowedChildren.d.ts +5 -2
- package/dist/features/authoring/allowedChildren.d.ts.map +1 -1
- package/dist/features/authoring/allowedChildren.js +13 -2
- package/dist/features/authoring/allowedChildren.js.map +1 -1
- package/dist/features/authoring/componentMeta.d.ts.map +1 -1
- package/dist/features/authoring/componentMeta.js +21 -0
- package/dist/features/authoring/componentMeta.js.map +1 -1
- package/dist/features/authoring/constants.d.ts +3 -0
- package/dist/features/authoring/constants.d.ts.map +1 -1
- package/dist/features/authoring/constants.js +3 -0
- package/dist/features/authoring/constants.js.map +1 -1
- package/dist/features/button/adapters/inbound/Button.d.ts +0 -4
- package/dist/features/button/adapters/inbound/Button.d.ts.map +1 -1
- package/dist/features/button/adapters/inbound/Button.js +0 -4
- package/dist/features/button/adapters/inbound/Button.js.map +1 -1
- package/dist/features/card/adapters/inbound/Card.d.ts +0 -4
- package/dist/features/card/adapters/inbound/Card.d.ts.map +1 -1
- package/dist/features/card/adapters/inbound/Card.js +0 -4
- package/dist/features/card/adapters/inbound/Card.js.map +1 -1
- package/dist/features/card/cardMeta.d.ts +1 -1
- package/dist/features/card/cardMeta.d.ts.map +1 -1
- package/dist/features/card/cardMeta.js +7 -2
- package/dist/features/card/cardMeta.js.map +1 -1
- package/dist/features/chess/adapters/inbound/ChessBoard.d.ts +5 -0
- package/dist/features/chess/adapters/inbound/ChessBoard.d.ts.map +1 -0
- package/dist/features/chess/adapters/inbound/ChessBoard.js +119 -0
- package/dist/features/chess/adapters/inbound/ChessBoard.js.map +1 -0
- package/dist/features/chess/adapters/inbound/OpeningBook.d.ts +5 -0
- package/dist/features/chess/adapters/inbound/OpeningBook.d.ts.map +1 -0
- package/dist/features/chess/adapters/inbound/OpeningBook.js +94 -0
- package/dist/features/chess/adapters/inbound/OpeningBook.js.map +1 -0
- package/dist/features/chess/meta.d.ts +219 -0
- package/dist/features/chess/meta.d.ts.map +1 -0
- package/dist/features/chess/meta.js +165 -0
- package/dist/features/chess/meta.js.map +1 -0
- package/dist/features/chess/public.d.ts +12 -0
- package/dist/features/chess/public.d.ts.map +1 -0
- package/dist/features/chess/public.js +10 -0
- package/dist/features/chess/public.js.map +1 -0
- package/dist/features/chess/utils/chessSquares.d.ts +4 -0
- package/dist/features/chess/utils/chessSquares.d.ts.map +1 -0
- package/dist/features/chess/utils/chessSquares.js +3 -0
- package/dist/features/chess/utils/chessSquares.js.map +1 -0
- package/dist/features/chess/utils/createBoardSquares.d.ts +4 -0
- package/dist/features/chess/utils/createBoardSquares.d.ts.map +1 -0
- package/dist/features/chess/utils/createBoardSquares.js +9 -0
- package/dist/features/chess/utils/createBoardSquares.js.map +1 -0
- package/dist/features/chess/utils/createChessBoardColorScheme.d.ts +35 -0
- package/dist/features/chess/utils/createChessBoardColorScheme.d.ts.map +1 -0
- package/dist/features/chess/utils/createChessBoardColorScheme.js +26 -0
- package/dist/features/chess/utils/createChessBoardColorScheme.js.map +1 -0
- package/dist/features/chess/utils/createOpeningBookColorScheme.d.ts +11 -0
- package/dist/features/chess/utils/createOpeningBookColorScheme.d.ts.map +1 -0
- package/dist/features/chess/utils/createOpeningBookColorScheme.js +21 -0
- package/dist/features/chess/utils/createOpeningBookColorScheme.js.map +1 -0
- package/dist/features/chess/utils/getSquareFile.d.ts +4 -0
- package/dist/features/chess/utils/getSquareFile.d.ts.map +1 -0
- package/dist/features/chess/utils/getSquareFile.js +5 -0
- package/dist/features/chess/utils/getSquareFile.js.map +1 -0
- package/dist/features/chess/utils/getSquareRank.d.ts +4 -0
- package/dist/features/chess/utils/getSquareRank.d.ts.map +1 -0
- package/dist/features/chess/utils/getSquareRank.js +5 -0
- package/dist/features/chess/utils/getSquareRank.js.map +1 -0
- package/dist/features/chess/utils/isLightSquare.d.ts +4 -0
- package/dist/features/chess/utils/isLightSquare.d.ts.map +1 -0
- package/dist/features/chess/utils/isLightSquare.js +6 -0
- package/dist/features/chess/utils/isLightSquare.js.map +1 -0
- package/dist/features/empty-state/adapters/inbound/EmptyState.d.ts +0 -4
- package/dist/features/empty-state/adapters/inbound/EmptyState.d.ts.map +1 -1
- package/dist/features/empty-state/adapters/inbound/EmptyState.js +0 -4
- package/dist/features/empty-state/adapters/inbound/EmptyState.js.map +1 -1
- package/dist/features/form/text-input/adapters/inbound/TextInput.d.ts +0 -4
- package/dist/features/form/text-input/adapters/inbound/TextInput.d.ts.map +1 -1
- package/dist/features/form/text-input/adapters/inbound/TextInput.js +0 -4
- package/dist/features/form/text-input/adapters/inbound/TextInput.js.map +1 -1
- package/dist/features/game/adapters/inbound/Game.d.ts +5 -0
- package/dist/features/game/adapters/inbound/Game.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/Game.js +24 -0
- package/dist/features/game/adapters/inbound/Game.js.map +1 -0
- package/dist/features/game/adapters/inbound/GameEntity.d.ts +5 -0
- package/dist/features/game/adapters/inbound/GameEntity.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/GameEntity.js +29 -0
- package/dist/features/game/adapters/inbound/GameEntity.js.map +1 -0
- package/dist/features/game/adapters/inbound/GameField.d.ts +4 -0
- package/dist/features/game/adapters/inbound/GameField.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/GameField.js +32 -0
- package/dist/features/game/adapters/inbound/GameField.js.map +1 -0
- package/dist/features/game/adapters/inbound/GameInputZone.d.ts +4 -0
- package/dist/features/game/adapters/inbound/GameInputZone.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/GameInputZone.js +50 -0
- package/dist/features/game/adapters/inbound/GameInputZone.js.map +1 -0
- package/dist/features/game/adapters/inbound/GameMeasurementProbe.d.ts +4 -0
- package/dist/features/game/adapters/inbound/GameMeasurementProbe.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/GameMeasurementProbe.js +54 -0
- package/dist/features/game/adapters/inbound/GameMeasurementProbe.js.map +1 -0
- package/dist/features/game/adapters/inbound/GameOverlay.d.ts +4 -0
- package/dist/features/game/adapters/inbound/GameOverlay.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/GameOverlay.js +39 -0
- package/dist/features/game/adapters/inbound/GameOverlay.js.map +1 -0
- package/dist/features/game/adapters/inbound/createGameKeyboardEvent.d.ts +16 -0
- package/dist/features/game/adapters/inbound/createGameKeyboardEvent.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/createGameKeyboardEvent.js +16 -0
- package/dist/features/game/adapters/inbound/createGameKeyboardEvent.js.map +1 -0
- package/dist/features/game/adapters/inbound/createGameMeasurementEvent.d.ts +14 -0
- package/dist/features/game/adapters/inbound/createGameMeasurementEvent.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/createGameMeasurementEvent.js +25 -0
- package/dist/features/game/adapters/inbound/createGameMeasurementEvent.js.map +1 -0
- package/dist/features/game/adapters/inbound/createGamePointerEvent.d.ts +17 -0
- package/dist/features/game/adapters/inbound/createGamePointerEvent.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/createGamePointerEvent.js +20 -0
- package/dist/features/game/adapters/inbound/createGamePointerEvent.js.map +1 -0
- package/dist/features/game/adapters/inbound/measureGameEntity.d.ts +5 -0
- package/dist/features/game/adapters/inbound/measureGameEntity.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/measureGameEntity.js +22 -0
- package/dist/features/game/adapters/inbound/measureGameEntity.js.map +1 -0
- package/dist/features/game/adapters/inbound/useGameInputZoneResponder.d.ts +15 -0
- package/dist/features/game/adapters/inbound/useGameInputZoneResponder.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/useGameInputZoneResponder.js +67 -0
- package/dist/features/game/adapters/inbound/useGameInputZoneResponder.js.map +1 -0
- package/dist/features/game/composition/GameRuntimeContext.d.ts +5 -0
- package/dist/features/game/composition/GameRuntimeContext.d.ts.map +1 -0
- package/dist/features/game/composition/GameRuntimeContext.js +4 -0
- package/dist/features/game/composition/GameRuntimeContext.js.map +1 -0
- package/dist/features/game/composition/createGameBindingContext.d.ts +4 -0
- package/dist/features/game/composition/createGameBindingContext.d.ts.map +1 -0
- package/dist/features/game/composition/createGameBindingContext.js +10 -0
- package/dist/features/game/composition/createGameBindingContext.js.map +1 -0
- package/dist/features/game/composition/createGameMeasurementRegistry.d.ts +4 -0
- package/dist/features/game/composition/createGameMeasurementRegistry.d.ts.map +1 -0
- package/dist/features/game/composition/createGameMeasurementRegistry.js +15 -0
- package/dist/features/game/composition/createGameMeasurementRegistry.js.map +1 -0
- package/dist/features/game/composition/useGameRuntime.d.ts +5 -0
- package/dist/features/game/composition/useGameRuntime.d.ts.map +1 -0
- package/dist/features/game/composition/useGameRuntime.js +117 -0
- package/dist/features/game/composition/useGameRuntime.js.map +1 -0
- package/dist/features/game/composition/useGameScheduledEffects.d.ts +17 -0
- package/dist/features/game/composition/useGameScheduledEffects.d.ts.map +1 -0
- package/dist/features/game/composition/useGameScheduledEffects.js +40 -0
- package/dist/features/game/composition/useGameScheduledEffects.js.map +1 -0
- package/dist/features/game/meta/gameEntityMeta.d.ts +403 -0
- package/dist/features/game/meta/gameEntityMeta.d.ts.map +1 -0
- package/dist/features/game/meta/gameEntityMeta.js +224 -0
- package/dist/features/game/meta/gameEntityMeta.js.map +1 -0
- package/dist/features/game/meta/gameFieldMeta.d.ts +61 -0
- package/dist/features/game/meta/gameFieldMeta.d.ts.map +1 -0
- package/dist/features/game/meta/gameFieldMeta.js +48 -0
- package/dist/features/game/meta/gameFieldMeta.js.map +1 -0
- package/dist/features/game/meta/gameInputZoneMeta.d.ts +163 -0
- package/dist/features/game/meta/gameInputZoneMeta.d.ts.map +1 -0
- package/dist/features/game/meta/gameInputZoneMeta.js +138 -0
- package/dist/features/game/meta/gameInputZoneMeta.js.map +1 -0
- package/dist/features/game/meta/gameMeasurementProbeMeta.d.ts +112 -0
- package/dist/features/game/meta/gameMeasurementProbeMeta.d.ts.map +1 -0
- package/dist/features/game/meta/gameMeasurementProbeMeta.js +70 -0
- package/dist/features/game/meta/gameMeasurementProbeMeta.js.map +1 -0
- package/dist/features/game/meta/gameMeta.d.ts +130 -0
- package/dist/features/game/meta/gameMeta.d.ts.map +1 -0
- package/dist/features/game/meta/gameMeta.js +113 -0
- package/dist/features/game/meta/gameMeta.js.map +1 -0
- package/dist/features/game/meta/gameOverlayMeta.d.ts +55 -0
- package/dist/features/game/meta/gameOverlayMeta.d.ts.map +1 -0
- package/dist/features/game/meta/gameOverlayMeta.js +65 -0
- package/dist/features/game/meta/gameOverlayMeta.js.map +1 -0
- package/dist/features/game/public.d.ts +8 -0
- package/dist/features/game/public.d.ts.map +1 -0
- package/dist/features/game/public.js +7 -0
- package/dist/features/game/public.js.map +1 -0
- package/dist/features/game/utils/clampGamePercentage.d.ts +3 -0
- package/dist/features/game/utils/clampGamePercentage.d.ts.map +1 -0
- package/dist/features/game/utils/clampGamePercentage.js +5 -0
- package/dist/features/game/utils/clampGamePercentage.js.map +1 -0
- package/dist/features/game/utils/resolveGameEntityMotionPlan.d.ts +15 -0
- package/dist/features/game/utils/resolveGameEntityMotionPlan.d.ts.map +1 -0
- package/dist/features/game/utils/resolveGameEntityMotionPlan.js +31 -0
- package/dist/features/game/utils/resolveGameEntityMotionPlan.js.map +1 -0
- package/dist/features/game/utils/toGamePercentage.d.ts +3 -0
- package/dist/features/game/utils/toGamePercentage.d.ts.map +1 -0
- package/dist/features/game/utils/toGamePercentage.js +6 -0
- package/dist/features/game/utils/toGamePercentage.js.map +1 -0
- package/dist/features/game/utils/useAnimatedGameEntityValue.d.ts +5 -0
- package/dist/features/game/utils/useAnimatedGameEntityValue.d.ts.map +1 -0
- package/dist/features/game/utils/useAnimatedGameEntityValue.js +33 -0
- package/dist/features/game/utils/useAnimatedGameEntityValue.js.map +1 -0
- package/dist/features/game/utils/useGameEntityAnimatedStyle.d.ts +16 -0
- package/dist/features/game/utils/useGameEntityAnimatedStyle.d.ts.map +1 -0
- package/dist/features/game/utils/useGameEntityAnimatedStyle.js +52 -0
- package/dist/features/game/utils/useGameEntityAnimatedStyle.js.map +1 -0
- package/dist/features/game/utils/useGameEntityMeasurement.d.ts +5 -0
- package/dist/features/game/utils/useGameEntityMeasurement.d.ts.map +1 -0
- package/dist/features/game/utils/useGameEntityMeasurement.js +14 -0
- package/dist/features/game/utils/useGameEntityMeasurement.js.map +1 -0
- package/dist/features/game/utils/useGameEntityMotionProgress.d.ts +5 -0
- package/dist/features/game/utils/useGameEntityMotionProgress.d.ts.map +1 -0
- package/dist/features/game/utils/useGameEntityMotionProgress.js +87 -0
- package/dist/features/game/utils/useGameEntityMotionProgress.js.map +1 -0
- package/dist/features/game/utils/useGameReducedMotion.d.ts +3 -0
- package/dist/features/game/utils/useGameReducedMotion.d.ts.map +1 -0
- package/dist/features/game/utils/useGameReducedMotion.js +13 -0
- package/dist/features/game/utils/useGameReducedMotion.js.map +1 -0
- package/dist/features/graph-view/adapters/inbound/web-artifact/GraphView.d.ts +5 -5
- package/dist/features/graph-view/adapters/inbound/web-artifact/GraphView.js +5 -5
- package/dist/features/graph-view/adapters/inbound/web-artifact/GraphView.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/compactGraphSpacing.d.ts +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/compactGraphSpacing.js +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/compactGraphSpacing.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphController.js +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphController.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphLoopSizer.d.ts +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphLoopSizer.js +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphLoopSizer.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.js +7 -7
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphGeometryKey.d.ts +0 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphGeometryKey.d.ts.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphGeometryKey.js +0 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphGeometryKey.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphTopologyKey.d.ts +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphTopologyKey.js +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphTopologyKey.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/hasGraphLayoutChanged.d.ts +0 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/hasGraphLayoutChanged.d.ts.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/hasGraphLayoutChanged.js +0 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/hasGraphLayoutChanged.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/runDetachedGraphLayout.d.ts +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/runDetachedGraphLayout.js +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/runDetachedGraphLayout.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/sizeGraphNodesToLabels.d.ts +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/sizeGraphNodesToLabels.js +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/sizeGraphNodesToLabels.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/syncGraphElements.d.ts +0 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/syncGraphElements.d.ts.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/syncGraphElements.js +0 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/syncGraphElements.js.map +1 -1
- package/dist/features/layout/gridMeta.d.ts +1 -1
- package/dist/features/layout/gridMeta.d.ts.map +1 -1
- package/dist/features/layout/gridMeta.js +7 -2
- package/dist/features/layout/gridMeta.js.map +1 -1
- package/dist/features/layout/screenMeta.d.ts +1 -1
- package/dist/features/layout/viewMeta.d.ts +1 -1
- package/dist/features/layout/viewMeta.d.ts.map +1 -1
- package/dist/features/layout/viewMeta.js +6 -2
- package/dist/features/layout/viewMeta.js.map +1 -1
- package/dist/features/registry/ZORA_COMPONENT_REGISTRY.d.ts.map +1 -1
- package/dist/features/registry/ZORA_COMPONENT_REGISTRY.js +16 -0
- package/dist/features/registry/ZORA_COMPONENT_REGISTRY.js.map +1 -1
- package/dist/features/section/screenSectionMeta.d.ts +1 -1
- package/dist/features/tabletop/adapters/inbound/CardBack.d.ts +5 -0
- package/dist/features/tabletop/adapters/inbound/CardBack.d.ts.map +1 -0
- package/dist/features/tabletop/adapters/inbound/CardBack.js +47 -0
- package/dist/features/tabletop/adapters/inbound/CardBack.js.map +1 -0
- package/dist/features/tabletop/adapters/inbound/CardHand.d.ts +5 -0
- package/dist/features/tabletop/adapters/inbound/CardHand.d.ts.map +1 -0
- package/dist/features/tabletop/adapters/inbound/CardHand.js +28 -0
- package/dist/features/tabletop/adapters/inbound/CardHand.js.map +1 -0
- package/dist/features/tabletop/adapters/inbound/PlayingCard.d.ts +5 -0
- package/dist/features/tabletop/adapters/inbound/PlayingCard.d.ts.map +1 -0
- package/dist/features/tabletop/adapters/inbound/PlayingCard.js +64 -0
- package/dist/features/tabletop/adapters/inbound/PlayingCard.js.map +1 -0
- package/dist/features/tabletop/adapters/inbound/PokerTrainingTable.d.ts +5 -0
- package/dist/features/tabletop/adapters/inbound/PokerTrainingTable.d.ts.map +1 -0
- package/dist/features/tabletop/adapters/inbound/PokerTrainingTable.js +12 -0
- package/dist/features/tabletop/adapters/inbound/PokerTrainingTable.js.map +1 -0
- package/dist/features/tabletop/adapters/inbound/TabletopTable.d.ts +5 -0
- package/dist/features/tabletop/adapters/inbound/TabletopTable.d.ts.map +1 -0
- package/dist/features/tabletop/adapters/inbound/TabletopTable.js +206 -0
- package/dist/features/tabletop/adapters/inbound/TabletopTable.js.map +1 -0
- package/dist/features/tabletop/meta.d.ts +353 -0
- package/dist/features/tabletop/meta.d.ts.map +1 -0
- package/dist/features/tabletop/meta.js +252 -0
- package/dist/features/tabletop/meta.js.map +1 -0
- package/dist/features/tabletop/public.d.ts +10 -0
- package/dist/features/tabletop/public.d.ts.map +1 -0
- package/dist/features/tabletop/public.js +9 -0
- package/dist/features/tabletop/public.js.map +1 -0
- package/dist/features/tabletop/utils/createPokerTrainingTableState.d.ts +13 -0
- package/dist/features/tabletop/utils/createPokerTrainingTableState.d.ts.map +1 -0
- package/dist/features/tabletop/utils/createPokerTrainingTableState.js +112 -0
- package/dist/features/tabletop/utils/createPokerTrainingTableState.js.map +1 -0
- package/dist/features/tabletop/utils/createTabletopColorScheme.d.ts +36 -0
- package/dist/features/tabletop/utils/createTabletopColorScheme.d.ts.map +1 -0
- package/dist/features/tabletop/utils/createTabletopColorScheme.js +144 -0
- package/dist/features/tabletop/utils/createTabletopColorScheme.js.map +1 -0
- package/dist/features/tabletop/utils/createTabletopGameSeats.d.ts +13 -0
- package/dist/features/tabletop/utils/createTabletopGameSeats.d.ts.map +1 -0
- package/dist/features/tabletop/utils/createTabletopGameSeats.js +22 -0
- package/dist/features/tabletop/utils/createTabletopGameSeats.js.map +1 -0
- package/dist/features/tabletop/utils/getPlayingCardLabel.d.ts +4 -0
- package/dist/features/tabletop/utils/getPlayingCardLabel.d.ts.map +1 -0
- package/dist/features/tabletop/utils/getPlayingCardLabel.js +6 -0
- package/dist/features/tabletop/utils/getPlayingCardLabel.js.map +1 -0
- package/dist/features/tabletop/utils/getTabletopCardDimensions.d.ts +12 -0
- package/dist/features/tabletop/utils/getTabletopCardDimensions.d.ts.map +1 -0
- package/dist/features/tabletop/utils/getTabletopCardDimensions.js +35 -0
- package/dist/features/tabletop/utils/getTabletopCardDimensions.js.map +1 -0
- package/dist/features/tabletop/utils/getTabletopSeatPosition.d.ts +9 -0
- package/dist/features/tabletop/utils/getTabletopSeatPosition.d.ts.map +1 -0
- package/dist/features/tabletop/utils/getTabletopSeatPosition.js +88 -0
- package/dist/features/tabletop/utils/getTabletopSeatPosition.js.map +1 -0
- package/dist/features/tree-view/adapters/inbound/TreeView.d.ts +1 -1
- package/dist/features/tree-view/adapters/inbound/TreeView.js +1 -1
- package/dist/features/tree-view/adapters/inbound/TreeView.js.map +1 -1
- package/dist/features/tree-view/adapters/inbound/web-artifact/TreeView.d.ts +1 -1
- package/dist/features/tree-view/adapters/inbound/web-artifact/TreeView.js +1 -1
- package/dist/features/tree-view/adapters/inbound/web-artifact/TreeView.js.map +1 -1
- package/dist/features/typography/adapters/inbound/Heading.d.ts +0 -4
- package/dist/features/typography/adapters/inbound/Heading.d.ts.map +1 -1
- package/dist/features/typography/adapters/inbound/Heading.js +0 -4
- package/dist/features/typography/adapters/inbound/Heading.js.map +1 -1
- package/dist/features/typography/adapters/inbound/Text.d.ts +0 -4
- package/dist/features/typography/adapters/inbound/Text.d.ts.map +1 -1
- package/dist/features/typography/adapters/inbound/Text.js +0 -4
- package/dist/features/typography/adapters/inbound/Text.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/types/chess.d.ts +83 -0
- package/dist/types/chess.d.ts.map +1 -0
- package/dist/types/chess.js +2 -0
- package/dist/types/chess.js.map +1 -0
- package/dist/types/gamePresentation.d.ts +94 -0
- package/dist/types/gamePresentation.d.ts.map +1 -0
- package/dist/types/gamePresentation.js +2 -0
- package/dist/types/gamePresentation.js.map +1 -0
- package/dist/types/gameRuntime.d.ts +29 -0
- package/dist/types/gameRuntime.d.ts.map +1 -0
- package/dist/types/gameRuntime.js +2 -0
- package/dist/types/gameRuntime.js.map +1 -0
- package/dist/types/tabletop.d.ts +129 -0
- package/dist/types/tabletop.d.ts.map +1 -0
- package/dist/types/tabletop.js +2 -0
- package/dist/types/tabletop.js.map +1 -0
- package/package.json +6 -7
- package/src/features/authoring/allowedChildren.ts +15 -2
- package/src/features/authoring/componentMeta.test.ts +93 -0
- package/src/features/authoring/componentMeta.ts +27 -0
- package/src/features/authoring/constants.ts +3 -0
- package/src/features/button/adapters/inbound/Button.tsx +0 -4
- package/src/features/card/adapters/inbound/Card.tsx +0 -4
- package/src/features/card/cardMeta.ts +12 -2
- package/src/features/chess/adapters/inbound/ChessBoard.tsx +169 -0
- package/src/features/chess/adapters/inbound/OpeningBook.tsx +131 -0
- package/src/features/chess/meta.ts +168 -0
- package/src/features/chess/public.test.tsx +165 -0
- package/src/features/chess/public.ts +27 -0
- package/src/features/chess/utils/chessSquares.ts +6 -0
- package/src/features/chess/utils/createBoardSquares.ts +13 -0
- package/src/features/chess/utils/createChessBoardColorScheme.ts +55 -0
- package/src/features/chess/utils/createOpeningBookColorScheme.ts +26 -0
- package/src/features/chess/utils/getSquareFile.ts +6 -0
- package/src/features/chess/utils/getSquareRank.ts +6 -0
- package/src/features/chess/utils/isLightSquare.ts +8 -0
- package/src/features/chessTabletopOwnership.test.ts +71 -0
- package/src/features/empty-state/adapters/inbound/EmptyState.tsx +0 -4
- package/src/features/form/text-input/adapters/inbound/TextInput.tsx +0 -4
- package/src/features/game/adapters/inbound/Game.tsx +43 -0
- package/src/features/game/adapters/inbound/GameEntity.tsx +44 -0
- package/src/features/game/adapters/inbound/GameField.tsx +52 -0
- package/src/features/game/adapters/inbound/GameInputZone.tsx +99 -0
- package/src/features/game/adapters/inbound/GameMeasurementProbe.tsx +83 -0
- package/src/features/game/adapters/inbound/GameOverlay.tsx +58 -0
- package/src/features/game/adapters/inbound/createGameKeyboardEvent.test.ts +51 -0
- package/src/features/game/adapters/inbound/createGameKeyboardEvent.ts +33 -0
- package/src/features/game/adapters/inbound/createGameMeasurementEvent.test.ts +56 -0
- package/src/features/game/adapters/inbound/createGameMeasurementEvent.ts +38 -0
- package/src/features/game/adapters/inbound/createGamePointerEvent.test.ts +56 -0
- package/src/features/game/adapters/inbound/createGamePointerEvent.ts +39 -0
- package/src/features/game/adapters/inbound/measureGameEntity.ts +28 -0
- package/src/features/game/adapters/inbound/useGameInputZoneResponder.ts +85 -0
- package/src/features/game/composition/GameRuntimeContext.ts +6 -0
- package/src/features/game/composition/createGameBindingContext.test.ts +66 -0
- package/src/features/game/composition/createGameBindingContext.ts +11 -0
- package/src/features/game/composition/createGameMeasurementRegistry.test.ts +35 -0
- package/src/features/game/composition/createGameMeasurementRegistry.ts +16 -0
- package/src/features/game/composition/useGameRuntime.test.tsx +173 -0
- package/src/features/game/composition/useGameRuntime.ts +200 -0
- package/src/features/game/composition/useGameScheduledEffects.ts +85 -0
- package/src/features/game/meta/gameEntityMeta.ts +226 -0
- package/src/features/game/meta/gameFieldMeta.ts +49 -0
- package/src/features/game/meta/gameInputZoneMeta.ts +140 -0
- package/src/features/game/meta/gameMeasurementProbeMeta.ts +72 -0
- package/src/features/game/meta/gameMeta.ts +115 -0
- package/src/features/game/meta/gameOverlayMeta.ts +66 -0
- package/src/features/game/public.test.tsx +64 -0
- package/src/features/game/public.ts +19 -0
- package/src/features/game/utils/clampGamePercentage.ts +4 -0
- package/src/features/game/utils/resolveGameEntityMotionPlan.test.ts +63 -0
- package/src/features/game/utils/resolveGameEntityMotionPlan.ts +53 -0
- package/src/features/game/utils/toGamePercentage.ts +6 -0
- package/src/features/game/utils/useAnimatedGameEntityValue.ts +41 -0
- package/src/features/game/utils/useGameEntityAnimatedStyle.ts +87 -0
- package/src/features/game/utils/useGameEntityMeasurement.ts +19 -0
- package/src/features/game/utils/useGameEntityMotionProgress.ts +114 -0
- package/src/features/game/utils/useGameReducedMotion.ts +15 -0
- package/src/features/graph-view/adapters/inbound/web-artifact/GraphView.tsx +5 -5
- package/src/features/graph-view/adapters/inbound/web-artifact/compactGraphSpacing.ts +1 -1
- package/src/features/graph-view/adapters/inbound/web-artifact/createGraphController.ts +1 -1
- package/src/features/graph-view/adapters/inbound/web-artifact/createGraphLoopSizer.ts +1 -1
- package/src/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.ts +7 -7
- package/src/features/graph-view/adapters/inbound/web-artifact/getGraphGeometryKey.ts +0 -1
- package/src/features/graph-view/adapters/inbound/web-artifact/getGraphTopologyKey.ts +1 -1
- package/src/features/graph-view/adapters/inbound/web-artifact/hasGraphLayoutChanged.ts +0 -1
- package/src/features/graph-view/adapters/inbound/web-artifact/runDetachedGraphLayout.ts +1 -1
- package/src/features/graph-view/adapters/inbound/web-artifact/sizeGraphNodesToLabels.ts +1 -1
- package/src/features/graph-view/adapters/inbound/web-artifact/syncGraphElements.ts +0 -1
- package/src/features/layout/gridMeta.ts +12 -2
- package/src/features/layout/viewMeta.ts +10 -2
- package/src/features/registry/ZORA_COMPONENT_REGISTRY.ts +29 -0
- package/src/features/tabletop/adapters/inbound/CardBack.tsx +70 -0
- package/src/features/tabletop/adapters/inbound/CardHand.tsx +61 -0
- package/src/features/tabletop/adapters/inbound/PlayingCard.tsx +95 -0
- package/src/features/tabletop/adapters/inbound/PokerTrainingTable.tsx +34 -0
- package/src/features/tabletop/adapters/inbound/TabletopTable.tsx +264 -0
- package/src/features/tabletop/meta.ts +254 -0
- package/src/features/tabletop/public.test.tsx +127 -0
- package/src/features/tabletop/public.ts +32 -0
- package/src/features/tabletop/utils/createPokerTrainingTableState.ts +152 -0
- package/src/features/tabletop/utils/createTabletopColorScheme.ts +232 -0
- package/src/features/tabletop/utils/createTabletopGameSeats.ts +31 -0
- package/src/features/tabletop/utils/getPlayingCardLabel.ts +8 -0
- package/src/features/tabletop/utils/getTabletopCardDimensions.ts +45 -0
- package/src/features/tabletop/utils/getTabletopSeatPosition.ts +100 -0
- package/src/features/tree-view/adapters/inbound/TreeView.tsx +1 -1
- package/src/features/tree-view/adapters/inbound/web-artifact/TreeView.tsx +1 -1
- package/src/features/typography/adapters/inbound/Heading.tsx +0 -4
- package/src/features/typography/adapters/inbound/Text.tsx +0 -4
- package/src/index.ts +83 -0
- package/src/types/chess.ts +95 -0
- package/src/types/gamePresentation.ts +103 -0
- package/src/types/gameRuntime.ts +34 -0
- package/src/types/tabletop.ts +131 -0
- package/web-dist/chunks/{Accordion-cscmtcn8.js → Accordion-0txegc16.js} +1 -1
- package/web-dist/chunks/{Accordion-06588rzn.js → Accordion-10xw59gm.js} +1 -1
- package/web-dist/chunks/{Accordion-8kgtg62g.js → Accordion-2zh15wt9.js} +6 -6
- package/web-dist/chunks/{Accordion-pkqj4g3r.js → Accordion-481bknsd.js} +5 -5
- package/web-dist/chunks/{Accordion-grfbz6f2.js → Accordion-4fkjn6r5.js} +1 -1
- package/web-dist/chunks/{Accordion-ftjkdjqs.js → Accordion-4gx45mn0.js} +3 -3
- package/web-dist/chunks/{Accordion-fjnck2tg.js → Accordion-4s69xvqy.js} +6 -6
- package/web-dist/chunks/{Accordion-jh7nxehr.js → Accordion-50jz5nhg.js} +1 -1
- package/web-dist/chunks/{Accordion-t6sdgmbz.js → Accordion-52xke54s.js} +1 -1
- package/web-dist/chunks/{Accordion-far6szrp.js → Accordion-6npzmbgk.js} +5 -5
- package/web-dist/chunks/{Accordion-q7c1ryf2.js → Accordion-6z4npcgf.js} +4 -4
- package/web-dist/chunks/{Accordion-gbba10rg.js → Accordion-8gw5tkfw.js} +6 -6
- package/web-dist/chunks/{Accordion-fmxygyb6.js → Accordion-8qteyww0.js} +4 -4
- package/web-dist/chunks/{Accordion-1pp37dtg.js → Accordion-9h5dx3ck.js} +4 -4
- package/web-dist/chunks/{Accordion-paha5aje.js → Accordion-9mmqf3wr.js} +2 -2
- package/web-dist/chunks/{Accordion-f5swy5bs.js → Accordion-b21zrnzj.js} +1 -1
- package/web-dist/chunks/{Accordion-ars389m1.js → Accordion-b8qd23hr.js} +3 -3
- package/web-dist/chunks/{Accordion-hxfa71g9.js → Accordion-c79y8g44.js} +7 -7
- package/web-dist/chunks/Accordion-ca2csh5r.js +321 -0
- package/web-dist/chunks/{Accordion-49gf1zb8.js → Accordion-cjht9dyv.js} +1 -1
- package/web-dist/chunks/{Accordion-sz21xsf4.js → Accordion-cq6hn45r.js} +1 -1
- package/web-dist/chunks/{Accordion-33rd76r7.js → Accordion-d90g9wcb.js} +8 -8
- package/web-dist/chunks/{Accordion-crx58d5n.js → Accordion-f5jb299b.js} +2 -2
- package/web-dist/chunks/{Accordion-h95wvyn5.js → Accordion-fe6vmbpf.js} +2 -2
- package/web-dist/chunks/{Accordion-jzbq36ec.js → Accordion-fqm027n3.js} +8 -8
- package/web-dist/chunks/{Accordion-0jkm3y3w.js → Accordion-gpccarct.js} +1 -1
- package/web-dist/chunks/{Accordion-v6ykq9hv.js → Accordion-h95h3xdb.js} +10 -10
- package/web-dist/chunks/{Accordion-t3p4ykg7.js → Accordion-j8ab9k8k.js} +8 -8
- package/web-dist/chunks/{Accordion-qpwhmqzd.js → Accordion-k5z591wx.js} +13 -13
- package/web-dist/chunks/{Accordion-rrpej6sv.js → Accordion-kdncjvc7.js} +7 -7
- package/web-dist/chunks/{Accordion-f05a7r28.js → Accordion-ks4a1c6w.js} +5 -5
- package/web-dist/chunks/{Accordion-x0j8b2by.js → Accordion-ma1sfe5z.js} +5 -5
- package/web-dist/chunks/{Accordion-2dws3778.js → Accordion-mhtyce1k.js} +4 -4
- package/web-dist/chunks/{Accordion-1vewf8aa.js → Accordion-n7gtb5ec.js} +2 -2
- package/web-dist/chunks/{Accordion-0psdn97s.js → Accordion-p42mm8rr.js} +1 -1
- package/web-dist/chunks/{Accordion-3404tth9.js → Accordion-panw5f0q.js} +7 -7
- package/web-dist/chunks/{Accordion-4a6wj3ez.js → Accordion-pxq8gfgg.js} +9 -9
- package/web-dist/chunks/{Accordion-xshn7k8f.js → Accordion-qwbshc4s.js} +4 -4
- package/web-dist/chunks/{Accordion-395r3wra.js → Accordion-r51wsmvy.js} +2 -2
- package/web-dist/chunks/Accordion-rt13cqr7.js +830 -0
- package/web-dist/chunks/{Accordion-hz4xaqjf.js → Accordion-s1f9hb5a.js} +9 -9
- package/web-dist/chunks/{Accordion-7ja4mtbz.js → Accordion-sv87mbqa.js} +1 -1
- package/web-dist/chunks/{Accordion-r4c9k9y7.js → Accordion-t4k9egq6.js} +2 -2
- package/web-dist/chunks/{Accordion-96cqeekv.js → Accordion-t64m1kca.js} +5 -5
- package/web-dist/chunks/Accordion-wg31jkvp.js +1559 -0
- package/web-dist/chunks/{Accordion-ch67q4t0.js → Accordion-y9zr4x2x.js} +4 -4
- package/web-dist/chunks/{Accordion-31aeqxak.js → Accordion-ye3k55r7.js} +3 -3
- package/web-dist/chunks/{Accordion-s42wwh6m.js → Accordion-z29agann.js} +6 -6
- package/web-dist/chunks/{Accordion-f1h2f05v.js → Accordion-ze26effy.js} +5 -5
- package/web-dist/chunks/{Accordion-tx78txec.js → Accordion-zqzcagxz.js} +5 -5
- package/web-dist/components/accordion/Accordion.js +12 -12
- package/web-dist/components/accordion-item/AccordionItem.js +12 -12
- package/web-dist/components/activity-indicator/ActivityIndicator.js +3 -3
- package/web-dist/components/app-bar/AppBar.js +19 -19
- package/web-dist/components/app-shell/AppShell.js +6 -6
- package/web-dist/components/avatar/Avatar.js +12 -12
- package/web-dist/components/avatar-group/AvatarGroup.js +12 -12
- package/web-dist/components/badge/Badge.js +7 -7
- package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +20 -20
- package/web-dist/components/bottom-sheet/BottomSheet.js +8 -8
- package/web-dist/components/bottom-sheet-flat-list/BottomSheetFlatList.js +8 -8
- package/web-dist/components/bottom-sheet-scroll-view/BottomSheetScrollView.js +8 -8
- package/web-dist/components/bottom-sheet-section-list/BottomSheetSectionList.js +8 -8
- package/web-dist/components/bottom-sheet-view/BottomSheetView.js +8 -8
- package/web-dist/components/bottom-sheet-virtualized-list/BottomSheetVirtualizedList.js +8 -8
- package/web-dist/components/breadcrumbs/Breadcrumbs.js +15 -15
- package/web-dist/components/button/Button.js +12 -12
- package/web-dist/components/button-group/ButtonGroup.js +12 -12
- package/web-dist/components/camera-permission-view/CameraPermissionView.js +20 -20
- package/web-dist/components/card/Card.js +19 -19
- package/web-dist/components/card-back/CardBack.d.ts +7 -0
- package/web-dist/components/card-back/CardBack.js +19 -0
- package/web-dist/components/card-back/index.d.ts +1 -0
- package/web-dist/components/card-back/index.js +2 -0
- package/web-dist/components/card-hand/CardHand.d.ts +7 -0
- package/web-dist/components/card-hand/CardHand.js +19 -0
- package/web-dist/components/card-hand/index.d.ts +1 -0
- package/web-dist/components/card-hand/index.js +2 -0
- package/web-dist/components/chat-list-item/ChatListItem.js +16 -16
- package/web-dist/components/checkbox/Checkbox.js +12 -12
- package/web-dist/components/checkbox-group/CheckboxGroup.js +12 -12
- package/web-dist/components/chess-board/ChessBoard.d.ts +4 -0
- package/web-dist/components/chess-board/ChessBoard.js +13 -0
- package/web-dist/components/chess-board/index.d.ts +1 -0
- package/web-dist/components/chess-board/index.js +2 -0
- package/web-dist/components/chip/Chip.js +13 -13
- package/web-dist/components/chip-group/ChipGroup.js +13 -13
- package/web-dist/components/collection-editor/CollectionEditor.js +19 -19
- package/web-dist/components/content-rail/ContentRail.js +13 -13
- package/web-dist/components/data-table/DataTable.js +26 -26
- package/web-dist/components/date-picker/DatePicker.js +17 -17
- package/web-dist/components/dialog/Dialog.js +12 -12
- package/web-dist/components/divider/Divider.js +6 -6
- package/web-dist/components/empty-state/EmptyState.js +20 -20
- package/web-dist/components/field/Field.js +12 -12
- package/web-dist/components/flat-list/FlatList.js +13 -13
- package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +18 -18
- package/web-dist/components/form/Form.js +16 -16
- package/web-dist/components/form-actions/FormActions.js +16 -16
- package/web-dist/components/form-error/FormError.js +16 -16
- package/web-dist/components/game/Game.d.ts +8 -0
- package/web-dist/components/game/Game.js +25 -0
- package/web-dist/components/game/index.d.ts +1 -0
- package/web-dist/components/game/index.js +2 -0
- package/web-dist/components/game-entity/GameEntity.d.ts +8 -0
- package/web-dist/components/game-entity/GameEntity.js +25 -0
- package/web-dist/components/game-entity/index.d.ts +1 -0
- package/web-dist/components/game-entity/index.js +2 -0
- package/web-dist/components/game-field/GameField.d.ts +8 -0
- package/web-dist/components/game-field/GameField.js +25 -0
- package/web-dist/components/game-field/index.d.ts +1 -0
- package/web-dist/components/game-field/index.js +2 -0
- package/web-dist/components/game-input-zone/GameInputZone.d.ts +8 -0
- package/web-dist/components/game-input-zone/GameInputZone.js +25 -0
- package/web-dist/components/game-input-zone/index.d.ts +1 -0
- package/web-dist/components/game-input-zone/index.js +2 -0
- package/web-dist/components/game-measurement-probe/GameMeasurementProbe.d.ts +8 -0
- package/web-dist/components/game-measurement-probe/GameMeasurementProbe.js +25 -0
- package/web-dist/components/game-measurement-probe/index.d.ts +1 -0
- package/web-dist/components/game-measurement-probe/index.js +2 -0
- package/web-dist/components/game-overlay/GameOverlay.d.ts +8 -0
- package/web-dist/components/game-overlay/GameOverlay.js +25 -0
- package/web-dist/components/game-overlay/index.d.ts +1 -0
- package/web-dist/components/game-overlay/index.js +2 -0
- package/web-dist/components/gradient/Gradient.js +7 -7
- package/web-dist/components/gradient-renderer-provider/GradientRendererProvider.js +7 -7
- package/web-dist/components/graph-view/GraphView.d.ts +5 -5
- package/web-dist/components/grid/Grid.js +6 -6
- package/web-dist/components/heading/Heading.js +6 -6
- package/web-dist/components/hero/Hero.js +19 -19
- package/web-dist/components/icon/Icon.js +4 -4
- package/web-dist/components/icon-button/IconButton.js +12 -12
- package/web-dist/components/image/Image.js +10 -10
- package/web-dist/components/keyboard-avoiding-view/KeyboardAvoidingView.js +2 -2
- package/web-dist/components/list/List.js +13 -13
- package/web-dist/components/list-item/ListItem.js +13 -13
- package/web-dist/components/list-section/ListSection.js +13 -13
- package/web-dist/components/media-card/MediaCard.js +19 -19
- package/web-dist/components/message-bubble/MessageBubble.js +16 -16
- package/web-dist/components/metric-card/MetricCard.js +19 -19
- package/web-dist/components/missing-element/MissingElement.js +11 -11
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +18 -18
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +18 -18
- package/web-dist/components/opening-book/OpeningBook.d.ts +4 -0
- package/web-dist/components/opening-book/OpeningBook.js +13 -0
- package/web-dist/components/opening-book/index.d.ts +1 -0
- package/web-dist/components/opening-book/index.js +2 -0
- package/web-dist/components/otp-form/OtpForm.js +18 -18
- package/web-dist/components/pagination/Pagination.js +13 -13
- package/web-dist/components/palette-item/PaletteItem.js +19 -19
- package/web-dist/components/playing-card/PlayingCard.d.ts +7 -0
- package/web-dist/components/playing-card/PlayingCard.js +19 -0
- package/web-dist/components/playing-card/index.d.ts +1 -0
- package/web-dist/components/playing-card/index.js +2 -0
- package/web-dist/components/poker-training-table/PokerTrainingTable.d.ts +7 -0
- package/web-dist/components/poker-training-table/PokerTrainingTable.js +19 -0
- package/web-dist/components/poker-training-table/index.d.ts +1 -0
- package/web-dist/components/poker-training-table/index.js +2 -0
- package/web-dist/components/popover-menu/PopoverMenu.js +14 -14
- package/web-dist/components/post-card/PostCard.js +19 -19
- package/web-dist/components/product-card/ProductCard.js +19 -19
- package/web-dist/components/progress/Progress.js +10 -10
- package/web-dist/components/progress-ring/ProgressRing.js +10 -10
- package/web-dist/components/radio/Radio.js +14 -14
- package/web-dist/components/radio-group/RadioGroup.js +14 -14
- package/web-dist/components/rating/Rating.js +9 -9
- package/web-dist/components/reader-surface/ReaderSurface.js +21 -21
- package/web-dist/components/scan-overlay/ScanOverlay.js +20 -20
- package/web-dist/components/screen/Screen.js +6 -6
- package/web-dist/components/screen-section/ScreenSection.js +10 -10
- package/web-dist/components/scroll-view/ScrollView.js +6 -6
- package/web-dist/components/search-input/SearchInput.js +13 -13
- package/web-dist/components/section-header/SectionHeader.js +10 -10
- package/web-dist/components/section-list/SectionList.js +13 -13
- package/web-dist/components/select/Select.js +16 -16
- package/web-dist/components/selectable-item/SelectableItem.js +5 -5
- package/web-dist/components/selection-provider/SelectionProvider.js +5 -5
- package/web-dist/components/sign-in-form/SignInForm.js +18 -18
- package/web-dist/components/sign-up-form/SignUpForm.js +18 -18
- package/web-dist/components/skeleton/Skeleton.js +22 -22
- package/web-dist/components/skeleton-card/SkeletonCard.js +22 -22
- package/web-dist/components/skeleton-list/SkeletonList.js +22 -22
- package/web-dist/components/skeleton-text/SkeletonText.js +22 -22
- package/web-dist/components/surface/Surface.js +7 -7
- package/web-dist/components/switch/Switch.js +7 -7
- package/web-dist/components/tab/Tab.js +7 -7
- package/web-dist/components/tab-list/TabList.js +7 -7
- package/web-dist/components/tab-panel/TabPanel.js +7 -7
- package/web-dist/components/tabletop-table/TabletopTable.d.ts +7 -0
- package/web-dist/components/tabletop-table/TabletopTable.js +19 -0
- package/web-dist/components/tabletop-table/index.d.ts +1 -0
- package/web-dist/components/tabletop-table/index.js +2 -0
- package/web-dist/components/tabs/Tabs.js +7 -7
- package/web-dist/components/text/Text.js +6 -6
- package/web-dist/components/text-input/TextInput.js +13 -13
- package/web-dist/components/time-picker/TimePicker.js +17 -17
- package/web-dist/components/timeline/Timeline.js +11 -11
- package/web-dist/components/toast/Toast.js +9 -9
- package/web-dist/components/toast-provider/ToastProvider.js +9 -9
- package/web-dist/components/toolbar/Toolbar.js +19 -19
- package/web-dist/components/tree-item/TreeItem.js +16 -16
- package/web-dist/components/tree-view/TreeView.d.ts +1 -1
- package/web-dist/components/uploader/Uploader.js +22 -22
- package/web-dist/components/view/View.js +6 -6
- package/web-dist/manifest.json +1650 -1379
- package/web-dist/runtime/ZoraProvider.js +8 -8
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { GameEntityProps } from '../../../../types/gamePresentation';
|
|
3
|
+
/*** Render one generic positioned game entity without owning gameplay semantics. */
|
|
4
|
+
export declare function GameEntity(props: GameEntityProps): React.JSX.Element;
|
|
5
|
+
//# sourceMappingURL=GameEntity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GameEntity.d.ts","sourceRoot":"","sources":["../../../../../src/features/game/adapters/inbound/GameEntity.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAI1E,oFAAoF;AACpF,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,qBAkBhD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Animated, StyleSheet } from 'react-native';
|
|
3
|
+
import { useGameEntityAnimatedStyle } from '../../utils/useGameEntityAnimatedStyle';
|
|
4
|
+
import { useGameEntityMeasurement } from '../../utils/useGameEntityMeasurement';
|
|
5
|
+
/*** Render one generic positioned game entity without owning gameplay semantics. */
|
|
6
|
+
export function GameEntity(props) {
|
|
7
|
+
const elementRef = React.useRef(null);
|
|
8
|
+
const animatedStyle = useGameEntityAnimatedStyle(props);
|
|
9
|
+
useGameEntityMeasurement(elementRef, props.measurementId);
|
|
10
|
+
return (<Animated.View ref={elementRef} accessibilityLabel={props.accessibilityLabel} testID={props.testID} pointerEvents={props.interactionPolicy === 'passive' ? 'none' : (props.pointerEvents ?? 'auto')} style={[styles.root, createEntityStaticStyle(props), animatedStyle]}>
|
|
11
|
+
{props.children}
|
|
12
|
+
</Animated.View>);
|
|
13
|
+
}
|
|
14
|
+
/*** Convert non-animated GameEntity presentation props into a React Native view style. */
|
|
15
|
+
function createEntityStaticStyle(props) {
|
|
16
|
+
return {
|
|
17
|
+
display: props.hidden === true ? 'none' : 'flex',
|
|
18
|
+
position: 'absolute',
|
|
19
|
+
zIndex: props.zIndex ?? 0,
|
|
20
|
+
...(props.height === undefined ? {} : { height: props.height }),
|
|
21
|
+
...(props.width === undefined ? {} : { width: props.width }),
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
const styles = StyleSheet.create({
|
|
25
|
+
root: {
|
|
26
|
+
position: 'absolute',
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=GameEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GameEntity.js","sourceRoot":"","sources":["../../../../../src/features/game/adapters/inbound/GameEntity.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,UAAU,EAA6B,MAAM,cAAc,CAAC;AAG/E,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAEhF,oFAAoF;AACpF,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC/C,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAc,IAAI,CAAC,CAAC;IACnD,MAAM,aAAa,GAAG,0BAA0B,CAAC,KAAK,CAAC,CAAC;IACxD,wBAAwB,CAAC,UAAU,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAE1D,OAAO,CACL,CAAC,QAAQ,CAAC,IAAI,CACZ,GAAG,CAAC,CAAC,UAAU,CAAC,CAChB,kBAAkB,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAC7C,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CACrB,aAAa,CAAC,CACZ,KAAK,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,IAAI,MAAM,CACjF,CAAC,CACD,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,uBAAuB,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,CAAC,CAEpE;MAAA,CAAC,KAAK,CAAC,QAAQ,CACjB;IAAA,EAAE,QAAQ,CAAC,IAAI,CAAC,CACjB,CAAC;AACJ,CAAC;AAED,0FAA0F;AAC1F,SAAS,uBAAuB,CAAC,KAAsB;IACrD,OAAO;QACL,OAAO,EAAE,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;QAChD,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,CAAC;QACzB,GAAG,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;QAC/D,GAAG,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;KAC7D,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;KACrB;CACF,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { Animated, StyleSheet, type View, type ViewStyle } from 'react-native';\n\nimport type { GameEntityProps } from '../../../../types/gamePresentation';\nimport { useGameEntityAnimatedStyle } from '../../utils/useGameEntityAnimatedStyle';\nimport { useGameEntityMeasurement } from '../../utils/useGameEntityMeasurement';\n\n/*** Render one generic positioned game entity without owning gameplay semantics. */\nexport function GameEntity(props: GameEntityProps) {\n const elementRef = React.useRef<View | null>(null);\n const animatedStyle = useGameEntityAnimatedStyle(props);\n useGameEntityMeasurement(elementRef, props.measurementId);\n\n return (\n <Animated.View\n ref={elementRef}\n accessibilityLabel={props.accessibilityLabel}\n testID={props.testID}\n pointerEvents={\n props.interactionPolicy === 'passive' ? 'none' : (props.pointerEvents ?? 'auto')\n }\n style={[styles.root, createEntityStaticStyle(props), animatedStyle]}\n >\n {props.children}\n </Animated.View>\n );\n}\n\n/*** Convert non-animated GameEntity presentation props into a React Native view style. */\nfunction createEntityStaticStyle(props: GameEntityProps): ViewStyle {\n return {\n display: props.hidden === true ? 'none' : 'flex',\n position: 'absolute',\n zIndex: props.zIndex ?? 0,\n ...(props.height === undefined ? {} : { height: props.height }),\n ...(props.width === undefined ? {} : { width: props.width }),\n };\n}\n\nconst styles = StyleSheet.create({\n root: {\n position: 'absolute',\n },\n});\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { GameFieldProps } from '../../../../types/gamePresentation';
|
|
2
|
+
/*** Render a bounded relative-positioning surface for game presentation content. */
|
|
3
|
+
export declare function GameField({ children, aspectRatio, minHeight, fill, clip, accessibilityLabel, interactionPolicy, testID, }: GameFieldProps): import("react").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=GameField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GameField.d.ts","sourceRoot":"","sources":["../../../../../src/features/game/adapters/inbound/GameField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAGzE,oFAAoF;AACpF,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,WAAW,EACX,SAAe,EACf,IAAY,EACZ,IAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,GACP,EAAE,cAAc,+BAoBhB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { View } from '../../../layout/public';
|
|
3
|
+
/*** Render a bounded relative-positioning surface for game presentation content. */
|
|
4
|
+
export function GameField({ children, aspectRatio, minHeight = 320, fill = false, clip = true, accessibilityLabel, interactionPolicy, testID, }) {
|
|
5
|
+
return (<View {...(accessibilityLabel === undefined ? {} : { accessibilityLabel })} {...(testID === undefined ? {} : { testID })} interactionPolicy={interactionPolicy} pointerEvents={interactionPolicy === 'passive' ? 'none' : 'auto'} style={[
|
|
6
|
+
styles.root,
|
|
7
|
+
clip ? styles.clipped : styles.overflowVisible,
|
|
8
|
+
fill ? styles.fill : undefined,
|
|
9
|
+
{
|
|
10
|
+
...(aspectRatio === undefined ? {} : { aspectRatio }),
|
|
11
|
+
minHeight,
|
|
12
|
+
},
|
|
13
|
+
]}>
|
|
14
|
+
{children}
|
|
15
|
+
</View>);
|
|
16
|
+
}
|
|
17
|
+
const styles = StyleSheet.create({
|
|
18
|
+
clipped: {
|
|
19
|
+
overflow: 'hidden',
|
|
20
|
+
},
|
|
21
|
+
fill: {
|
|
22
|
+
flex: 1,
|
|
23
|
+
},
|
|
24
|
+
overflowVisible: {
|
|
25
|
+
overflow: 'visible',
|
|
26
|
+
},
|
|
27
|
+
root: {
|
|
28
|
+
position: 'relative',
|
|
29
|
+
width: '100%',
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=GameField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GameField.js","sourceRoot":"","sources":["../../../../../src/features/game/adapters/inbound/GameField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,oFAAoF;AACpF,MAAM,UAAU,SAAS,CAAC,EACxB,QAAQ,EACR,WAAW,EACX,SAAS,GAAG,GAAG,EACf,IAAI,GAAG,KAAK,EACZ,IAAI,GAAG,IAAI,EACX,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,GACS;IACf,OAAO,CACL,CAAC,IAAI,CACH,IAAI,CAAC,kBAAkB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC,CACrE,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAC7C,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,aAAa,CAAC,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CACjE,KAAK,CAAC,CAAC;YACL,MAAM,CAAC,IAAI;YACX,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe;YAC9C,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;YAC9B;gBACE,GAAG,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC;gBACrD,SAAS;aACV;SACF,CAAC,CAEF;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,OAAO,EAAE;QACP,QAAQ,EAAE,QAAQ;KACnB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC;KACR;IACD,eAAe,EAAE;QACf,QAAQ,EAAE,SAAS;KACpB;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,MAAM;KACd;CACF,CAAC,CAAC","sourcesContent":["import { StyleSheet } from 'react-native';\n\nimport type { GameFieldProps } from '../../../../types/gamePresentation';\nimport { View } from '../../../layout/public';\n\n/*** Render a bounded relative-positioning surface for game presentation content. */\nexport function GameField({\n children,\n aspectRatio,\n minHeight = 320,\n fill = false,\n clip = true,\n accessibilityLabel,\n interactionPolicy,\n testID,\n}: GameFieldProps) {\n return (\n <View\n {...(accessibilityLabel === undefined ? {} : { accessibilityLabel })}\n {...(testID === undefined ? {} : { testID })}\n interactionPolicy={interactionPolicy}\n pointerEvents={interactionPolicy === 'passive' ? 'none' : 'auto'}\n style={[\n styles.root,\n clip ? styles.clipped : styles.overflowVisible,\n fill ? styles.fill : undefined,\n {\n ...(aspectRatio === undefined ? {} : { aspectRatio }),\n minHeight,\n },\n ]}\n >\n {children}\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n clipped: {\n overflow: 'hidden',\n },\n fill: {\n flex: 1,\n },\n overflowVisible: {\n overflow: 'visible',\n },\n root: {\n position: 'relative',\n width: '100%',\n },\n});\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { GameInputZoneProps } from '../../../../types/gamePresentation';
|
|
2
|
+
/*** Capture pointer/touch geometry and optional keyboard input as normalized generic Game events. */
|
|
3
|
+
export declare function GameInputZone({ x, y, width, height, zIndex, enabled, continuous, keyboardBindings, accessibilityLabel, interactionPolicy, testID, ...inputProps }: GameInputZoneProps): import("react").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=GameInputZone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GameInputZone.d.ts","sourceRoot":"","sources":["../../../../../src/features/game/adapters/inbound/GameInputZone.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAI7E,qGAAqG;AACrG,wBAAgB,aAAa,CAAC,EAC5B,CAAK,EACL,CAAK,EACL,KAAW,EACX,MAAY,EACZ,MAAU,EACV,OAAc,EACd,UAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,GAAG,UAAU,EACd,EAAE,kBAAkB,+BAkCpB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Platform, StyleSheet, View } from 'react-native';
|
|
2
|
+
import { toGamePercentage } from '../../utils/toGamePercentage';
|
|
3
|
+
import { useGameInputZoneResponder } from './useGameInputZoneResponder';
|
|
4
|
+
/*** Capture pointer/touch geometry and optional keyboard input as normalized generic Game events. */
|
|
5
|
+
export function GameInputZone({ x = 0, y = 0, width = 100, height = 100, zIndex = 0, enabled = true, continuous = true, keyboardBindings, accessibilityLabel, interactionPolicy, testID, ...inputProps }) {
|
|
6
|
+
const { dispatchKeyboard, dispatchPointer, handleLayout, shouldSetResponder } = useGameInputZoneResponder({
|
|
7
|
+
...inputProps,
|
|
8
|
+
x,
|
|
9
|
+
y,
|
|
10
|
+
width,
|
|
11
|
+
height,
|
|
12
|
+
enabled: enabled && interactionPolicy !== 'passive',
|
|
13
|
+
interactionPolicy,
|
|
14
|
+
continuous,
|
|
15
|
+
...(keyboardBindings === undefined ? {} : { keyboardBindings }),
|
|
16
|
+
});
|
|
17
|
+
const keyboardProps = createGameInputZoneKeyboardProps({
|
|
18
|
+
dispatchKeyboard,
|
|
19
|
+
enabled: enabled && interactionPolicy !== 'passive',
|
|
20
|
+
keyboardBindings,
|
|
21
|
+
});
|
|
22
|
+
return (<View {...keyboardProps} {...(accessibilityLabel === undefined ? {} : { accessibilityLabel })} {...(testID === undefined ? {} : { testID })} {...(continuous
|
|
23
|
+
? { onResponderGrant: dispatchPointer, onResponderMove: dispatchPointer }
|
|
24
|
+
: { onResponderRelease: dispatchPointer })} collapsable={false} onLayout={handleLayout} onStartShouldSetResponder={shouldSetResponder} pointerEvents={enabled && interactionPolicy !== 'passive' ? 'auto' : 'none'} style={createInputZoneStyle({ x, y, width, height, zIndex })}/>);
|
|
25
|
+
}
|
|
26
|
+
/*** Add a focusable web keyboard target only when the input zone owns key bindings. */
|
|
27
|
+
function createGameInputZoneKeyboardProps({ dispatchKeyboard, enabled, keyboardBindings, }) {
|
|
28
|
+
if (Platform.OS !== 'web' || !enabled || keyboardBindings === undefined)
|
|
29
|
+
return {};
|
|
30
|
+
if (keyboardBindings.length === 0)
|
|
31
|
+
return {};
|
|
32
|
+
return { onKeyDown: dispatchKeyboard, tabIndex: 0 };
|
|
33
|
+
}
|
|
34
|
+
/*** Convert field-relative input-zone props into one absolute React Native style. */
|
|
35
|
+
function createInputZoneStyle({ x, y, width, height, zIndex }) {
|
|
36
|
+
return {
|
|
37
|
+
left: toGamePercentage(x),
|
|
38
|
+
top: toGamePercentage(y),
|
|
39
|
+
width: toGamePercentage(width),
|
|
40
|
+
height: toGamePercentage(height),
|
|
41
|
+
zIndex,
|
|
42
|
+
...styles.root,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
const styles = StyleSheet.create({
|
|
46
|
+
root: {
|
|
47
|
+
position: 'absolute',
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=GameInputZone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GameInputZone.js","sourceRoot":"","sources":["../../../../../src/features/game/adapters/inbound/GameInputZone.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AAG1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,qGAAqG;AACrG,MAAM,UAAU,aAAa,CAAC,EAC5B,CAAC,GAAG,CAAC,EACL,CAAC,GAAG,CAAC,EACL,KAAK,GAAG,GAAG,EACX,MAAM,GAAG,GAAG,EACZ,MAAM,GAAG,CAAC,EACV,OAAO,GAAG,IAAI,EACd,UAAU,GAAG,IAAI,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,GAAG,UAAU,EACM;IACnB,MAAM,EAAE,gBAAgB,EAAE,eAAe,EAAE,YAAY,EAAE,kBAAkB,EAAE,GAC3E,yBAAyB,CAAC;QACxB,GAAG,UAAU;QACb,CAAC;QACD,CAAC;QACD,KAAK;QACL,MAAM;QACN,OAAO,EAAE,OAAO,IAAI,iBAAiB,KAAK,SAAS;QACnD,iBAAiB;QACjB,UAAU;QACV,GAAG,CAAC,gBAAgB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC;KAChE,CAAC,CAAC;IACL,MAAM,aAAa,GAAG,gCAAgC,CAAC;QACrD,gBAAgB;QAChB,OAAO,EAAE,OAAO,IAAI,iBAAiB,KAAK,SAAS;QACnD,gBAAgB;KACjB,CAAC,CAAC;IAEH,OAAO,CACL,CAAC,IAAI,CACH,IAAI,aAAa,CAAC,CAClB,IAAI,CAAC,kBAAkB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC,CACrE,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAC7C,IAAI,CAAC,UAAU;QACb,CAAC,CAAC,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE;QACzE,CAAC,CAAC,EAAE,kBAAkB,EAAE,eAAe,EAAE,CAAC,CAAC,CAC7C,WAAW,CAAC,CAAC,KAAK,CAAC,CACnB,QAAQ,CAAC,CAAC,YAAY,CAAC,CACvB,yBAAyB,CAAC,CAAC,kBAAkB,CAAC,CAC9C,aAAa,CAAC,CAAC,OAAO,IAAI,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAC5E,KAAK,CAAC,CAAC,oBAAoB,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,EAC7D,CACH,CAAC;AACJ,CAAC;AAQD,uFAAuF;AACvF,SAAS,gCAAgC,CAAC,EACxC,gBAAgB,EAChB,OAAO,EACP,gBAAgB,GACgB;IAChC,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC,OAAO,IAAI,gBAAgB,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACnF,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAE7C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAE,CAAU,EAAE,CAAC;AAC/D,CAAC;AAUD,qFAAqF;AACrF,SAAS,oBAAoB,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAuB;IAChF,OAAO;QACL,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC;QACzB,GAAG,EAAE,gBAAgB,CAAC,CAAC,CAAC;QACxB,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC;QAC9B,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC;QAChC,MAAM;QACN,GAAG,MAAM,CAAC,IAAI;KACf,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;KACrB;CACF,CAAC,CAAC","sourcesContent":["import { Platform, StyleSheet, View, type ViewStyle } from 'react-native';\n\nimport type { GameInputZoneProps } from '../../../../types/gamePresentation';\nimport { toGamePercentage } from '../../utils/toGamePercentage';\nimport { useGameInputZoneResponder } from './useGameInputZoneResponder';\n\n/*** Capture pointer/touch geometry and optional keyboard input as normalized generic Game events. */\nexport function GameInputZone({\n x = 0,\n y = 0,\n width = 100,\n height = 100,\n zIndex = 0,\n enabled = true,\n continuous = true,\n keyboardBindings,\n accessibilityLabel,\n interactionPolicy,\n testID,\n ...inputProps\n}: GameInputZoneProps) {\n const { dispatchKeyboard, dispatchPointer, handleLayout, shouldSetResponder } =\n useGameInputZoneResponder({\n ...inputProps,\n x,\n y,\n width,\n height,\n enabled: enabled && interactionPolicy !== 'passive',\n interactionPolicy,\n continuous,\n ...(keyboardBindings === undefined ? {} : { keyboardBindings }),\n });\n const keyboardProps = createGameInputZoneKeyboardProps({\n dispatchKeyboard,\n enabled: enabled && interactionPolicy !== 'passive',\n keyboardBindings,\n });\n\n return (\n <View\n {...keyboardProps}\n {...(accessibilityLabel === undefined ? {} : { accessibilityLabel })}\n {...(testID === undefined ? {} : { testID })}\n {...(continuous\n ? { onResponderGrant: dispatchPointer, onResponderMove: dispatchPointer }\n : { onResponderRelease: dispatchPointer })}\n collapsable={false}\n onLayout={handleLayout}\n onStartShouldSetResponder={shouldSetResponder}\n pointerEvents={enabled && interactionPolicy !== 'passive' ? 'auto' : 'none'}\n style={createInputZoneStyle({ x, y, width, height, zIndex })}\n />\n );\n}\n\ninterface GameInputZoneKeyboardPropsInput {\n readonly dispatchKeyboard: (event: { readonly key: string; preventDefault(): void }) => void;\n readonly enabled: boolean;\n readonly keyboardBindings: GameInputZoneProps['keyboardBindings'];\n}\n\n/*** Add a focusable web keyboard target only when the input zone owns key bindings. */\nfunction createGameInputZoneKeyboardProps({\n dispatchKeyboard,\n enabled,\n keyboardBindings,\n}: GameInputZoneKeyboardPropsInput) {\n if (Platform.OS !== 'web' || !enabled || keyboardBindings === undefined) return {};\n if (keyboardBindings.length === 0) return {};\n\n return { onKeyDown: dispatchKeyboard, tabIndex: 0 as const };\n}\n\ninterface InputZoneStyleInput {\n readonly x: number;\n readonly y: number;\n readonly width: number;\n readonly height: number;\n readonly zIndex: number;\n}\n\n/*** Convert field-relative input-zone props into one absolute React Native style. */\nfunction createInputZoneStyle({ x, y, width, height, zIndex }: InputZoneStyleInput): ViewStyle {\n return {\n left: toGamePercentage(x),\n top: toGamePercentage(y),\n width: toGamePercentage(width),\n height: toGamePercentage(height),\n zIndex,\n ...styles.root,\n };\n}\n\nconst styles = StyleSheet.create({\n root: {\n position: 'absolute',\n },\n});\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { GameMeasurementProbeProps } from '../../../../types/gamePresentation';
|
|
2
|
+
/*** Measure two registered game entities and dispatch only their raw rendered geometry. */
|
|
3
|
+
export declare function GameMeasurementProbe({ sourceId, targetId, eventType, entityId, delayMs, enabled, interactionPolicy, }: GameMeasurementProbeProps): null;
|
|
4
|
+
//# sourceMappingURL=GameMeasurementProbe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GameMeasurementProbe.d.ts","sourceRoot":"","sources":["../../../../../src/features/game/adapters/inbound/GameMeasurementProbe.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAKpF,2FAA2F;AAC3F,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,QAAQ,EACR,SAA8B,EAC9B,QAAQ,EACR,OAAW,EACX,OAAc,EACd,iBAAiB,GAClB,EAAE,yBAAyB,QAqC3B"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GameRuntimeContext } from '../../composition/GameRuntimeContext';
|
|
3
|
+
import { createGameMeasurementEvent } from './createGameMeasurementEvent';
|
|
4
|
+
/*** Measure two registered game entities and dispatch only their raw rendered geometry. */
|
|
5
|
+
export function GameMeasurementProbe({ sourceId, targetId, eventType = 'game.measurement', entityId, delayMs = 0, enabled = true, interactionPolicy, }) {
|
|
6
|
+
const runtime = React.useContext(GameRuntimeContext);
|
|
7
|
+
if (runtime === null)
|
|
8
|
+
throw new Error('GameMeasurementProbe must be rendered inside Game.');
|
|
9
|
+
React.useEffect(() => {
|
|
10
|
+
if (!enabled || interactionPolicy === 'passive' || runtime.interactionPolicy === 'passive')
|
|
11
|
+
return undefined;
|
|
12
|
+
const timer = setTimeout(() => {
|
|
13
|
+
void dispatchGameMeasurement({
|
|
14
|
+
dispatch: runtime.dispatch,
|
|
15
|
+
measure: runtime.measure,
|
|
16
|
+
sourceId,
|
|
17
|
+
targetId,
|
|
18
|
+
eventType,
|
|
19
|
+
...(entityId === undefined ? {} : { entityId }),
|
|
20
|
+
});
|
|
21
|
+
}, Math.max(0, delayMs));
|
|
22
|
+
return () => clearTimeout(timer);
|
|
23
|
+
}, [
|
|
24
|
+
delayMs,
|
|
25
|
+
enabled,
|
|
26
|
+
interactionPolicy,
|
|
27
|
+
entityId,
|
|
28
|
+
eventType,
|
|
29
|
+
runtime.dispatch,
|
|
30
|
+
runtime.interactionPolicy,
|
|
31
|
+
runtime.measure,
|
|
32
|
+
sourceId,
|
|
33
|
+
targetId,
|
|
34
|
+
]);
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
/*** Resolve both registered entity measurements before dispatching one Game event. */
|
|
38
|
+
async function dispatchGameMeasurement(input) {
|
|
39
|
+
const [source, target] = await Promise.all([
|
|
40
|
+
input.measure(input.sourceId),
|
|
41
|
+
input.measure(input.targetId),
|
|
42
|
+
]);
|
|
43
|
+
if (source === undefined || target === undefined)
|
|
44
|
+
return;
|
|
45
|
+
input.dispatch(createGameMeasurementEvent({
|
|
46
|
+
eventType: input.eventType,
|
|
47
|
+
...(input.entityId === undefined ? {} : { entityId: input.entityId }),
|
|
48
|
+
sourceId: input.sourceId,
|
|
49
|
+
targetId: input.targetId,
|
|
50
|
+
source,
|
|
51
|
+
target,
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=GameMeasurementProbe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GameMeasurementProbe.js","sourceRoot":"","sources":["../../../../../src/features/game/adapters/inbound/GameMeasurementProbe.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,2FAA2F;AAC3F,MAAM,UAAU,oBAAoB,CAAC,EACnC,QAAQ,EACR,QAAQ,EACR,SAAS,GAAG,kBAAkB,EAC9B,QAAQ,EACR,OAAO,GAAG,CAAC,EACX,OAAO,GAAG,IAAI,EACd,iBAAiB,GACS;IAC1B,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;IACrD,IAAI,OAAO,KAAK,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IAE5F,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,OAAO,IAAI,iBAAiB,KAAK,SAAS,IAAI,OAAO,CAAC,iBAAiB,KAAK,SAAS;YACxF,OAAO,SAAS,CAAC;QAEnB,MAAM,KAAK,GAAG,UAAU,CACtB,GAAG,EAAE;YACH,KAAK,uBAAuB,CAAC;gBAC3B,QAAQ,EAAE,OAAO,CAAC,QAAQ;gBAC1B,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,QAAQ;gBACR,QAAQ;gBACR,SAAS;gBACT,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC;aAChD,CAAC,CAAC;QACL,CAAC,EACD,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CACrB,CAAC;QAEF,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC,EAAE;QACD,OAAO;QACP,OAAO;QACP,iBAAiB;QACjB,QAAQ;QACR,SAAS;QACT,OAAO,CAAC,QAAQ;QAChB,OAAO,CAAC,iBAAiB;QACzB,OAAO,CAAC,OAAO;QACf,QAAQ;QACR,QAAQ;KACT,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC;AAWD,sFAAsF;AACtF,KAAK,UAAU,uBAAuB,CAAC,KAAmC;IACxE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACzC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC;QAC7B,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC;KAC9B,CAAC,CAAC;IACH,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO;IAEzD,KAAK,CAAC,QAAQ,CACZ,0BAA0B,CAAC;QACzB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,GAAG,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;QACrE,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,MAAM;QACN,MAAM;KACP,CAAC,CACH,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport type { GameMeasurementProbeProps } from '../../../../types/gamePresentation';\nimport type { GameRuntimeContextValue } from '../../../../types/gameRuntime';\nimport { GameRuntimeContext } from '../../composition/GameRuntimeContext';\nimport { createGameMeasurementEvent } from './createGameMeasurementEvent';\n\n/*** Measure two registered game entities and dispatch only their raw rendered geometry. */\nexport function GameMeasurementProbe({\n sourceId,\n targetId,\n eventType = 'game.measurement',\n entityId,\n delayMs = 0,\n enabled = true,\n interactionPolicy,\n}: GameMeasurementProbeProps) {\n const runtime = React.useContext(GameRuntimeContext);\n if (runtime === null) throw new Error('GameMeasurementProbe must be rendered inside Game.');\n\n React.useEffect(() => {\n if (!enabled || interactionPolicy === 'passive' || runtime.interactionPolicy === 'passive')\n return undefined;\n\n const timer = setTimeout(\n () => {\n void dispatchGameMeasurement({\n dispatch: runtime.dispatch,\n measure: runtime.measure,\n sourceId,\n targetId,\n eventType,\n ...(entityId === undefined ? {} : { entityId }),\n });\n },\n Math.max(0, delayMs),\n );\n\n return () => clearTimeout(timer);\n }, [\n delayMs,\n enabled,\n interactionPolicy,\n entityId,\n eventType,\n runtime.dispatch,\n runtime.interactionPolicy,\n runtime.measure,\n sourceId,\n targetId,\n ]);\n\n return null;\n}\n\ninterface DispatchGameMeasurementInput {\n readonly dispatch: GameRuntimeContextValue['dispatch'];\n readonly measure: GameRuntimeContextValue['measure'];\n readonly sourceId: string;\n readonly targetId: string;\n readonly eventType: string;\n readonly entityId?: string;\n}\n\n/*** Resolve both registered entity measurements before dispatching one Game event. */\nasync function dispatchGameMeasurement(input: DispatchGameMeasurementInput): Promise<void> {\n const [source, target] = await Promise.all([\n input.measure(input.sourceId),\n input.measure(input.targetId),\n ]);\n if (source === undefined || target === undefined) return;\n\n input.dispatch(\n createGameMeasurementEvent({\n eventType: input.eventType,\n ...(input.entityId === undefined ? {} : { entityId: input.entityId }),\n sourceId: input.sourceId,\n targetId: input.targetId,\n source,\n target,\n }),\n );\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { GameOverlayProps } from '../../../../types/gamePresentation';
|
|
2
|
+
/*** Render an absolute game presentation layer for HUD, feedback, and phase content. */
|
|
3
|
+
export declare function GameOverlay({ children, placement, blocking, padding, accessibilityLabel, interactionPolicy, testID, }: GameOverlayProps): import("react").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=GameOverlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GameOverlay.d.ts","sourceRoot":"","sources":["../../../../../src/features/game/adapters/inbound/GameOverlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAwB,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAGjG,wFAAwF;AACxF,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,SAAkB,EAClB,QAAgB,EAChB,OAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,GACP,EAAE,gBAAgB,+BAWlB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { View } from '../../../layout/public';
|
|
3
|
+
/*** Render an absolute game presentation layer for HUD, feedback, and phase content. */
|
|
4
|
+
export function GameOverlay({ children, placement = 'fill', blocking = false, padding = 0, accessibilityLabel, interactionPolicy, testID, }) {
|
|
5
|
+
return (<View {...(accessibilityLabel === undefined ? {} : { accessibilityLabel })} {...(testID === undefined ? {} : { testID })} pointerEvents={interactionPolicy === 'passive' ? 'none' : blocking ? 'auto' : 'box-none'} style={[styles.root, resolvePlacementStyle(placement), { padding }]}>
|
|
6
|
+
{children}
|
|
7
|
+
</View>);
|
|
8
|
+
}
|
|
9
|
+
/*** Resolve overlay alignment without coupling layout to any game genre or rule. */
|
|
10
|
+
function resolvePlacementStyle(placement) {
|
|
11
|
+
switch (placement) {
|
|
12
|
+
case 'center':
|
|
13
|
+
return { alignItems: 'center', justifyContent: 'center' };
|
|
14
|
+
case 'top':
|
|
15
|
+
return { alignItems: 'center', justifyContent: 'flex-start' };
|
|
16
|
+
case 'bottom':
|
|
17
|
+
return { alignItems: 'center', justifyContent: 'flex-end' };
|
|
18
|
+
case 'top-left':
|
|
19
|
+
return { alignItems: 'flex-start', justifyContent: 'flex-start' };
|
|
20
|
+
case 'top-right':
|
|
21
|
+
return { alignItems: 'flex-end', justifyContent: 'flex-start' };
|
|
22
|
+
case 'bottom-left':
|
|
23
|
+
return { alignItems: 'flex-start', justifyContent: 'flex-end' };
|
|
24
|
+
case 'bottom-right':
|
|
25
|
+
return { alignItems: 'flex-end', justifyContent: 'flex-end' };
|
|
26
|
+
case 'fill':
|
|
27
|
+
return {};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
const styles = StyleSheet.create({
|
|
31
|
+
root: {
|
|
32
|
+
bottom: 0,
|
|
33
|
+
left: 0,
|
|
34
|
+
position: 'absolute',
|
|
35
|
+
right: 0,
|
|
36
|
+
top: 0,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=GameOverlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GameOverlay.js","sourceRoot":"","sources":["../../../../../src/features/game/adapters/inbound/GameOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAC;AAG1D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,wFAAwF;AACxF,MAAM,UAAU,WAAW,CAAC,EAC1B,QAAQ,EACR,SAAS,GAAG,MAAM,EAClB,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,CAAC,EACX,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,GACW;IACjB,OAAO,CACL,CAAC,IAAI,CACH,IAAI,CAAC,kBAAkB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC,CACrE,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAC7C,aAAa,CAAC,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CACzF,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,qBAAqB,CAAC,SAAS,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,CAEpE;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,oFAAoF;AACpF,SAAS,qBAAqB,CAAC,SAA+B;IAC5D,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,QAAQ;YACX,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC;QAC5D,KAAK,KAAK;YACR,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC;QAChE,KAAK,QAAQ;YACX,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC;QAC9D,KAAK,UAAU;YACb,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC;QACpE,KAAK,WAAW;YACd,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC;QAClE,KAAK,aAAa;YAChB,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC;QAClE,KAAK,cAAc;YACjB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC;QAChE,KAAK,MAAM;YACT,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,CAAC;QACR,GAAG,EAAE,CAAC;KACP;CACF,CAAC,CAAC","sourcesContent":["import { StyleSheet, type ViewStyle } from 'react-native';\n\nimport type { GameOverlayPlacement, GameOverlayProps } from '../../../../types/gamePresentation';\nimport { View } from '../../../layout/public';\n\n/*** Render an absolute game presentation layer for HUD, feedback, and phase content. */\nexport function GameOverlay({\n children,\n placement = 'fill',\n blocking = false,\n padding = 0,\n accessibilityLabel,\n interactionPolicy,\n testID,\n}: GameOverlayProps) {\n return (\n <View\n {...(accessibilityLabel === undefined ? {} : { accessibilityLabel })}\n {...(testID === undefined ? {} : { testID })}\n pointerEvents={interactionPolicy === 'passive' ? 'none' : blocking ? 'auto' : 'box-none'}\n style={[styles.root, resolvePlacementStyle(placement), { padding }]}\n >\n {children}\n </View>\n );\n}\n\n/*** Resolve overlay alignment without coupling layout to any game genre or rule. */\nfunction resolvePlacementStyle(placement: GameOverlayPlacement): ViewStyle {\n switch (placement) {\n case 'center':\n return { alignItems: 'center', justifyContent: 'center' };\n case 'top':\n return { alignItems: 'center', justifyContent: 'flex-start' };\n case 'bottom':\n return { alignItems: 'center', justifyContent: 'flex-end' };\n case 'top-left':\n return { alignItems: 'flex-start', justifyContent: 'flex-start' };\n case 'top-right':\n return { alignItems: 'flex-end', justifyContent: 'flex-start' };\n case 'bottom-left':\n return { alignItems: 'flex-start', justifyContent: 'flex-end' };\n case 'bottom-right':\n return { alignItems: 'flex-end', justifyContent: 'flex-end' };\n case 'fill':\n return {};\n }\n}\n\nconst styles = StyleSheet.create({\n root: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n});\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { GameEvent } from '@ankhorage/game';
|
|
2
|
+
import type { GameKeyboardBinding } from '../../../../types/gamePresentation';
|
|
3
|
+
interface CreateGameKeyboardEventInput {
|
|
4
|
+
readonly bindings: readonly GameKeyboardBinding[];
|
|
5
|
+
readonly fallbackEventType: string;
|
|
6
|
+
readonly fallbackEntityId?: string;
|
|
7
|
+
readonly key: string;
|
|
8
|
+
}
|
|
9
|
+
interface GameKeyboardEventResult {
|
|
10
|
+
readonly event: GameEvent;
|
|
11
|
+
readonly preventDefault: boolean;
|
|
12
|
+
}
|
|
13
|
+
/*** Map one configured keyboard key into a generic Game event. */
|
|
14
|
+
export declare function createGameKeyboardEvent(input: CreateGameKeyboardEventInput): GameKeyboardEventResult | undefined;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=createGameKeyboardEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createGameKeyboardEvent.d.ts","sourceRoot":"","sources":["../../../../../src/features/game/adapters/inbound/createGameKeyboardEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAE9E,UAAU,4BAA4B;IACpC,QAAQ,CAAC,QAAQ,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAClD,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,uBAAuB;IAC/B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;CAClC;AAED,kEAAkE;AAClE,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,4BAA4B,GAClC,uBAAuB,GAAG,SAAS,CAarC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*** Map one configured keyboard key into a generic Game event. */
|
|
2
|
+
export function createGameKeyboardEvent(input) {
|
|
3
|
+
const binding = input.bindings.find((candidate) => candidate.key === input.key);
|
|
4
|
+
if (binding === undefined)
|
|
5
|
+
return undefined;
|
|
6
|
+
const entityId = binding.entityId ?? input.fallbackEntityId;
|
|
7
|
+
return {
|
|
8
|
+
event: {
|
|
9
|
+
type: binding.eventType ?? input.fallbackEventType,
|
|
10
|
+
...(entityId === undefined ? {} : { entityId }),
|
|
11
|
+
payload: { key: input.key },
|
|
12
|
+
},
|
|
13
|
+
preventDefault: binding.preventDefault ?? false,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=createGameKeyboardEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createGameKeyboardEvent.js","sourceRoot":"","sources":["../../../../../src/features/game/adapters/inbound/createGameKeyboardEvent.ts"],"names":[],"mappings":"AAgBA,kEAAkE;AAClE,MAAM,UAAU,uBAAuB,CACrC,KAAmC;IAEnC,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC;IAChF,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAE5C,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,KAAK,CAAC,gBAAgB,CAAC;IAC5D,OAAO;QACL,KAAK,EAAE;YACL,IAAI,EAAE,OAAO,CAAC,SAAS,IAAI,KAAK,CAAC,iBAAiB;YAClD,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC;YAC/C,OAAO,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE;SAC5B;QACD,cAAc,EAAE,OAAO,CAAC,cAAc,IAAI,KAAK;KAChD,CAAC;AACJ,CAAC","sourcesContent":["import type { GameEvent } from '@ankhorage/game';\n\nimport type { GameKeyboardBinding } from '../../../../types/gamePresentation';\n\ninterface CreateGameKeyboardEventInput {\n readonly bindings: readonly GameKeyboardBinding[];\n readonly fallbackEventType: string;\n readonly fallbackEntityId?: string;\n readonly key: string;\n}\n\ninterface GameKeyboardEventResult {\n readonly event: GameEvent;\n readonly preventDefault: boolean;\n}\n\n/*** Map one configured keyboard key into a generic Game event. */\nexport function createGameKeyboardEvent(\n input: CreateGameKeyboardEventInput,\n): GameKeyboardEventResult | undefined {\n const binding = input.bindings.find((candidate) => candidate.key === input.key);\n if (binding === undefined) return undefined;\n\n const entityId = binding.entityId ?? input.fallbackEntityId;\n return {\n event: {\n type: binding.eventType ?? input.fallbackEventType,\n ...(entityId === undefined ? {} : { entityId }),\n payload: { key: input.key },\n },\n preventDefault: binding.preventDefault ?? false,\n };\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { GameEvent } from '@ankhorage/game';
|
|
2
|
+
import type { GameMeasurementBounds } from '../../../../types/gameRuntime';
|
|
3
|
+
/*** Create one raw geometry event without deciding collision semantics. */
|
|
4
|
+
export declare function createGameMeasurementEvent(input: CreateGameMeasurementEventInput): GameEvent;
|
|
5
|
+
interface CreateGameMeasurementEventInput {
|
|
6
|
+
readonly eventType: string;
|
|
7
|
+
readonly entityId?: string;
|
|
8
|
+
readonly sourceId: string;
|
|
9
|
+
readonly targetId: string;
|
|
10
|
+
readonly source: GameMeasurementBounds;
|
|
11
|
+
readonly target: GameMeasurementBounds;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=createGameMeasurementEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createGameMeasurementEvent.d.ts","sourceRoot":"","sources":["../../../../../src/features/game/adapters/inbound/createGameMeasurementEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,iBAAiB,CAAC;AAE7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAE3E,2EAA2E;AAC3E,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,+BAA+B,GAAG,SAAS,CAW5F;AAED,UAAU,+BAA+B;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;IACvC,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;CACxC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*** Create one raw geometry event without deciding collision semantics. */
|
|
2
|
+
export function createGameMeasurementEvent(input) {
|
|
3
|
+
return {
|
|
4
|
+
type: input.eventType,
|
|
5
|
+
entityId: input.entityId ?? input.sourceId,
|
|
6
|
+
payload: {
|
|
7
|
+
sourceId: input.sourceId,
|
|
8
|
+
targetId: input.targetId,
|
|
9
|
+
source: toGameMeasurementRecord(input.source),
|
|
10
|
+
target: toGameMeasurementRecord(input.target),
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/*** Convert measured geometry into a serializable Game record. */
|
|
15
|
+
function toGameMeasurementRecord(bounds) {
|
|
16
|
+
return {
|
|
17
|
+
left: bounds.left,
|
|
18
|
+
right: bounds.right,
|
|
19
|
+
top: bounds.top,
|
|
20
|
+
bottom: bounds.bottom,
|
|
21
|
+
width: bounds.width,
|
|
22
|
+
height: bounds.height,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=createGameMeasurementEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createGameMeasurementEvent.js","sourceRoot":"","sources":["../../../../../src/features/game/adapters/inbound/createGameMeasurementEvent.ts"],"names":[],"mappings":"AAIA,2EAA2E;AAC3E,MAAM,UAAU,0BAA0B,CAAC,KAAsC;IAC/E,OAAO;QACL,IAAI,EAAE,KAAK,CAAC,SAAS;QACrB,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ;QAC1C,OAAO,EAAE;YACP,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,MAAM,EAAE,uBAAuB,CAAC,KAAK,CAAC,MAAM,CAAC;YAC7C,MAAM,EAAE,uBAAuB,CAAC,KAAK,CAAC,MAAM,CAAC;SAC9C;KACF,CAAC;AACJ,CAAC;AAWD,kEAAkE;AAClE,SAAS,uBAAuB,CAAC,MAA6B;IAC5D,OAAO;QACL,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,GAAG,EAAE,MAAM,CAAC,GAAG;QACf,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,MAAM,EAAE,MAAM,CAAC,MAAM;KACtB,CAAC;AACJ,CAAC","sourcesContent":["import type { GameEvent, GameRecord } from '@ankhorage/game';\n\nimport type { GameMeasurementBounds } from '../../../../types/gameRuntime';\n\n/*** Create one raw geometry event without deciding collision semantics. */\nexport function createGameMeasurementEvent(input: CreateGameMeasurementEventInput): GameEvent {\n return {\n type: input.eventType,\n entityId: input.entityId ?? input.sourceId,\n payload: {\n sourceId: input.sourceId,\n targetId: input.targetId,\n source: toGameMeasurementRecord(input.source),\n target: toGameMeasurementRecord(input.target),\n },\n };\n}\n\ninterface CreateGameMeasurementEventInput {\n readonly eventType: string;\n readonly entityId?: string;\n readonly sourceId: string;\n readonly targetId: string;\n readonly source: GameMeasurementBounds;\n readonly target: GameMeasurementBounds;\n}\n\n/*** Convert measured geometry into a serializable Game record. */\nfunction toGameMeasurementRecord(bounds: GameMeasurementBounds): GameRecord {\n return {\n left: bounds.left,\n right: bounds.right,\n top: bounds.top,\n bottom: bounds.bottom,\n width: bounds.width,\n height: bounds.height,\n };\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { GameEvent } from '@ankhorage/game';
|
|
2
|
+
interface GamePointerEventInput {
|
|
3
|
+
readonly eventType: string;
|
|
4
|
+
readonly entityId?: string;
|
|
5
|
+
readonly localX: number;
|
|
6
|
+
readonly localY: number;
|
|
7
|
+
readonly measuredWidth: number;
|
|
8
|
+
readonly measuredHeight: number;
|
|
9
|
+
readonly zoneX: number;
|
|
10
|
+
readonly zoneY: number;
|
|
11
|
+
readonly zoneWidth: number;
|
|
12
|
+
readonly zoneHeight: number;
|
|
13
|
+
}
|
|
14
|
+
/*** Normalize one measured pointer/touch position into a field-relative generic Game event. */
|
|
15
|
+
export declare function createGamePointerEvent(input: GamePointerEventInput): GameEvent | undefined;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=createGamePointerEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createGamePointerEvent.d.ts","sourceRoot":"","sources":["../../../../../src/features/game/adapters/inbound/createGamePointerEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIjD,UAAU,qBAAqB;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,+FAA+F;AAC/F,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,qBAAqB,GAAG,SAAS,GAAG,SAAS,CAoB1F"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { clampGamePercentage } from '../../utils/clampGamePercentage';
|
|
2
|
+
/*** Normalize one measured pointer/touch position into a field-relative generic Game event. */
|
|
3
|
+
export function createGamePointerEvent(input) {
|
|
4
|
+
if (!Number.isFinite(input.measuredWidth) ||
|
|
5
|
+
!Number.isFinite(input.measuredHeight) ||
|
|
6
|
+
input.measuredWidth <= 0 ||
|
|
7
|
+
input.measuredHeight <= 0) {
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
10
|
+
const localX = clampGamePercentage((input.localX / input.measuredWidth) * 100);
|
|
11
|
+
const localY = clampGamePercentage((input.localY / input.measuredHeight) * 100);
|
|
12
|
+
const x = clampGamePercentage(input.zoneX + (localX * input.zoneWidth) / 100);
|
|
13
|
+
const y = clampGamePercentage(input.zoneY + (localY * input.zoneHeight) / 100);
|
|
14
|
+
return {
|
|
15
|
+
type: input.eventType,
|
|
16
|
+
...(input.entityId === undefined ? {} : { entityId: input.entityId }),
|
|
17
|
+
payload: { x, y },
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=createGamePointerEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createGamePointerEvent.js","sourceRoot":"","sources":["../../../../../src/features/game/adapters/inbound/createGamePointerEvent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAetE,+FAA+F;AAC/F,MAAM,UAAU,sBAAsB,CAAC,KAA4B;IACjE,IACE,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC;QACrC,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC;QACtC,KAAK,CAAC,aAAa,IAAI,CAAC;QACxB,KAAK,CAAC,cAAc,IAAI,CAAC,EACzB,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,MAAM,GAAG,mBAAmB,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,GAAG,CAAC,CAAC;IAC/E,MAAM,MAAM,GAAG,mBAAmB,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,cAAc,CAAC,GAAG,GAAG,CAAC,CAAC;IAChF,MAAM,CAAC,GAAG,mBAAmB,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC,CAAC;IAC9E,MAAM,CAAC,GAAG,mBAAmB,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,CAAC;IAE/E,OAAO;QACL,IAAI,EAAE,KAAK,CAAC,SAAS;QACrB,GAAG,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;QACrE,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE;KAClB,CAAC;AACJ,CAAC","sourcesContent":["import type { GameEvent } from '@ankhorage/game';\n\nimport { clampGamePercentage } from '../../utils/clampGamePercentage';\n\ninterface GamePointerEventInput {\n readonly eventType: string;\n readonly entityId?: string;\n readonly localX: number;\n readonly localY: number;\n readonly measuredWidth: number;\n readonly measuredHeight: number;\n readonly zoneX: number;\n readonly zoneY: number;\n readonly zoneWidth: number;\n readonly zoneHeight: number;\n}\n\n/*** Normalize one measured pointer/touch position into a field-relative generic Game event. */\nexport function createGamePointerEvent(input: GamePointerEventInput): GameEvent | undefined {\n if (\n !Number.isFinite(input.measuredWidth) ||\n !Number.isFinite(input.measuredHeight) ||\n input.measuredWidth <= 0 ||\n input.measuredHeight <= 0\n ) {\n return undefined;\n }\n\n const localX = clampGamePercentage((input.localX / input.measuredWidth) * 100);\n const localY = clampGamePercentage((input.localY / input.measuredHeight) * 100);\n const x = clampGamePercentage(input.zoneX + (localX * input.zoneWidth) / 100);\n const y = clampGamePercentage(input.zoneY + (localY * input.zoneHeight) / 100);\n\n return {\n type: input.eventType,\n ...(input.entityId === undefined ? {} : { entityId: input.entityId }),\n payload: { x, y },\n };\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { View } from 'react-native';
|
|
2
|
+
import type { GameMeasurementBounds } from '../../../../types/gameRuntime';
|
|
3
|
+
/*** Measure one rendered React Native or React Native Web game entity in window coordinates. */
|
|
4
|
+
export declare function measureGameEntity(element: View | null): Promise<GameMeasurementBounds | undefined>;
|
|
5
|
+
//# sourceMappingURL=measureGameEntity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measureGameEntity.d.ts","sourceRoot":"","sources":["../../../../../src/features/game/adapters/inbound/measureGameEntity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAE3E,gGAAgG;AAChG,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,IAAI,GAAG,IAAI,GACnB,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAoB5C"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*** Measure one rendered React Native or React Native Web game entity in window coordinates. */
|
|
2
|
+
export function measureGameEntity(element) {
|
|
3
|
+
if (element === null)
|
|
4
|
+
return Promise.resolve(undefined);
|
|
5
|
+
return new Promise((resolve) => {
|
|
6
|
+
element.measureInWindow((left, top, width, height) => {
|
|
7
|
+
if (![left, top, width, height].every(Number.isFinite) || width < 0 || height < 0) {
|
|
8
|
+
resolve(undefined);
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
resolve({
|
|
12
|
+
left,
|
|
13
|
+
right: left + width,
|
|
14
|
+
top,
|
|
15
|
+
bottom: top + height,
|
|
16
|
+
width,
|
|
17
|
+
height,
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=measureGameEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measureGameEntity.js","sourceRoot":"","sources":["../../../../../src/features/game/adapters/inbound/measureGameEntity.ts"],"names":[],"mappings":"AAIA,gGAAgG;AAChG,MAAM,UAAU,iBAAiB,CAC/B,OAAoB;IAEpB,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAExD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,OAAO,CAAC,eAAe,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;YACnD,IAAI,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;gBAClF,OAAO,CAAC,SAAS,CAAC,CAAC;gBACnB,OAAO;YACT,CAAC;YAED,OAAO,CAAC;gBACN,IAAI;gBACJ,KAAK,EAAE,IAAI,GAAG,KAAK;gBACnB,GAAG;gBACH,MAAM,EAAE,GAAG,GAAG,MAAM;gBACpB,KAAK;gBACL,MAAM;aACP,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { View } from 'react-native';\n\nimport type { GameMeasurementBounds } from '../../../../types/gameRuntime';\n\n/*** Measure one rendered React Native or React Native Web game entity in window coordinates. */\nexport function measureGameEntity(\n element: View | null,\n): Promise<GameMeasurementBounds | undefined> {\n if (element === null) return Promise.resolve(undefined);\n\n return new Promise((resolve) => {\n element.measureInWindow((left, top, width, height) => {\n if (![left, top, width, height].every(Number.isFinite) || width < 0 || height < 0) {\n resolve(undefined);\n return;\n }\n\n resolve({\n left,\n right: left + width,\n top,\n bottom: top + height,\n width,\n height,\n });\n });\n });\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { GestureResponderEvent, LayoutChangeEvent } from 'react-native';
|
|
2
|
+
import type { GameInputZoneProps } from '../../../../types/gamePresentation';
|
|
3
|
+
interface GameKeyboardInputEvent {
|
|
4
|
+
readonly key: string;
|
|
5
|
+
preventDefault(): void;
|
|
6
|
+
}
|
|
7
|
+
/*** Own React Native responder measurement and event dispatch for one Game input zone. */
|
|
8
|
+
export declare function useGameInputZoneResponder(props: GameInputZoneProps): {
|
|
9
|
+
dispatchKeyboard: (event: GameKeyboardInputEvent) => void;
|
|
10
|
+
dispatchPointer: (event: GestureResponderEvent) => void;
|
|
11
|
+
handleLayout: (event: LayoutChangeEvent) => void;
|
|
12
|
+
shouldSetResponder: () => boolean;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=useGameInputZoneResponder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGameInputZoneResponder.d.ts","sourceRoot":"","sources":["../../../../../src/features/game/adapters/inbound/useGameInputZoneResponder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAE7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAK7E,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,cAAc,IAAI,IAAI,CAAC;CACxB;AAOD,0FAA0F;AAC1F,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,kBAAkB;8BAyCvD,sBAAsB;6BA9BtB,qBAAqB;0BANgB,iBAAiB;;EA4DjE"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GameRuntimeContext } from '../../composition/GameRuntimeContext';
|
|
3
|
+
import { createGameKeyboardEvent } from './createGameKeyboardEvent';
|
|
4
|
+
import { createGamePointerEvent } from './createGamePointerEvent';
|
|
5
|
+
/*** Own React Native responder measurement and event dispatch for one Game input zone. */
|
|
6
|
+
export function useGameInputZoneResponder(props) {
|
|
7
|
+
const runtime = React.useContext(GameRuntimeContext);
|
|
8
|
+
if (runtime === null)
|
|
9
|
+
throw new Error('GameInputZone must be rendered inside Game.');
|
|
10
|
+
const measuredSizeRef = React.useRef({ width: 0, height: 0 });
|
|
11
|
+
const handleLayout = React.useCallback((event) => {
|
|
12
|
+
const { width, height } = event.nativeEvent.layout;
|
|
13
|
+
measuredSizeRef.current = { width, height };
|
|
14
|
+
}, []);
|
|
15
|
+
const dispatchPointer = React.useCallback((event) => {
|
|
16
|
+
if (runtime.interactionPolicy === 'passive' || props.interactionPolicy === 'passive')
|
|
17
|
+
return;
|
|
18
|
+
const measured = measuredSizeRef.current;
|
|
19
|
+
const gameEvent = createGamePointerEvent({
|
|
20
|
+
eventType: props.eventType,
|
|
21
|
+
...(props.entityId === undefined ? {} : { entityId: props.entityId }),
|
|
22
|
+
localX: event.nativeEvent.locationX,
|
|
23
|
+
localY: event.nativeEvent.locationY,
|
|
24
|
+
measuredWidth: measured.width,
|
|
25
|
+
measuredHeight: measured.height,
|
|
26
|
+
zoneX: props.x ?? 0,
|
|
27
|
+
zoneY: props.y ?? 0,
|
|
28
|
+
zoneWidth: props.width ?? 100,
|
|
29
|
+
zoneHeight: props.height ?? 100,
|
|
30
|
+
});
|
|
31
|
+
if (gameEvent !== undefined)
|
|
32
|
+
runtime.dispatch(gameEvent);
|
|
33
|
+
}, [
|
|
34
|
+
props.entityId,
|
|
35
|
+
props.eventType,
|
|
36
|
+
props.height,
|
|
37
|
+
props.interactionPolicy,
|
|
38
|
+
props.width,
|
|
39
|
+
props.x,
|
|
40
|
+
props.y,
|
|
41
|
+
runtime,
|
|
42
|
+
]);
|
|
43
|
+
const dispatchKeyboard = React.useCallback((event) => {
|
|
44
|
+
if (runtime.interactionPolicy === 'passive' || props.interactionPolicy === 'passive')
|
|
45
|
+
return;
|
|
46
|
+
const result = createGameKeyboardEvent({
|
|
47
|
+
bindings: props.keyboardBindings ?? [],
|
|
48
|
+
fallbackEventType: props.eventType,
|
|
49
|
+
...(props.entityId === undefined ? {} : { fallbackEntityId: props.entityId }),
|
|
50
|
+
key: event.key,
|
|
51
|
+
});
|
|
52
|
+
if (result === undefined)
|
|
53
|
+
return;
|
|
54
|
+
if (result.preventDefault)
|
|
55
|
+
event.preventDefault();
|
|
56
|
+
runtime.dispatch(result.event);
|
|
57
|
+
}, [props.entityId, props.eventType, props.interactionPolicy, props.keyboardBindings, runtime]);
|
|
58
|
+
return {
|
|
59
|
+
dispatchKeyboard,
|
|
60
|
+
dispatchPointer,
|
|
61
|
+
handleLayout,
|
|
62
|
+
shouldSetResponder: () => (props.enabled ?? true) &&
|
|
63
|
+
props.interactionPolicy !== 'passive' &&
|
|
64
|
+
runtime.interactionPolicy !== 'passive',
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=useGameInputZoneResponder.js.map
|