@ankhorage/zora 21.0.23 → 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 +11 -0
- package/README.md +6 -2
- 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/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/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/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/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 +3 -1
- 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/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/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/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/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/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/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,52 @@
|
|
|
1
|
+
import { Animated } from 'react-native';
|
|
2
|
+
import { resolveGameEntityMotionPlan } from './resolveGameEntityMotionPlan';
|
|
3
|
+
import { useAnimatedGameEntityValue } from './useAnimatedGameEntityValue';
|
|
4
|
+
import { useGameEntityMotionProgress } from './useGameEntityMotionProgress';
|
|
5
|
+
import { useGameReducedMotion } from './useGameReducedMotion';
|
|
6
|
+
/*** Compose bound GameEntity values with optional relative presentation motion. */
|
|
7
|
+
export function useGameEntityAnimatedStyle(input) {
|
|
8
|
+
const reduceMotion = useGameReducedMotion();
|
|
9
|
+
const plan = resolveGameEntityMotionPlan(input, reduceMotion);
|
|
10
|
+
const values = {
|
|
11
|
+
x: useAnimatedGameEntityValue(input.x ?? 0, plan.transitionDurationMs, plan.transitionEasing),
|
|
12
|
+
y: useAnimatedGameEntityValue(input.y ?? 0, plan.transitionDurationMs, plan.transitionEasing),
|
|
13
|
+
opacity: useAnimatedGameEntityValue(input.opacity ?? 1, plan.transitionDurationMs, plan.transitionEasing),
|
|
14
|
+
scale: useAnimatedGameEntityValue(input.scale ?? 1, plan.transitionDurationMs, plan.transitionEasing),
|
|
15
|
+
rotation: useAnimatedGameEntityValue(input.rotation ?? 0, plan.transitionDurationMs, plan.transitionEasing),
|
|
16
|
+
progress: useGameEntityMotionProgress(plan),
|
|
17
|
+
};
|
|
18
|
+
return createGameEntityAnimatedStyle(values, input);
|
|
19
|
+
}
|
|
20
|
+
/*** Build one animated React Native style from base values and relative motion progress. */
|
|
21
|
+
function createGameEntityAnimatedStyle(values, input) {
|
|
22
|
+
const left = Animated.add(values.x, Animated.multiply(values.progress, input.motionOffsetX ?? 0));
|
|
23
|
+
const top = Animated.add(values.y, Animated.multiply(values.progress, input.motionOffsetY ?? 0));
|
|
24
|
+
const opacity = Animated.add(values.opacity, Animated.multiply(values.progress, input.motionOpacityDelta ?? 0));
|
|
25
|
+
const scale = Animated.add(values.scale, Animated.multiply(values.progress, input.motionScaleDelta ?? 0));
|
|
26
|
+
const rotation = Animated.add(values.rotation, Animated.multiply(values.progress, input.motionRotationDelta ?? 0));
|
|
27
|
+
return {
|
|
28
|
+
left: left.interpolate({
|
|
29
|
+
inputRange: [-10_000, 10_000],
|
|
30
|
+
outputRange: ['-10000%', '10000%'],
|
|
31
|
+
}),
|
|
32
|
+
top: top.interpolate({
|
|
33
|
+
inputRange: [-10_000, 10_000],
|
|
34
|
+
outputRange: ['-10000%', '10000%'],
|
|
35
|
+
}),
|
|
36
|
+
opacity: opacity.interpolate({
|
|
37
|
+
inputRange: [0, 1],
|
|
38
|
+
outputRange: [0, 1],
|
|
39
|
+
extrapolate: 'clamp',
|
|
40
|
+
}),
|
|
41
|
+
transform: [
|
|
42
|
+
{ scale },
|
|
43
|
+
{
|
|
44
|
+
rotate: rotation.interpolate({
|
|
45
|
+
inputRange: [-36_000, 36_000],
|
|
46
|
+
outputRange: ['-36000deg', '36000deg'],
|
|
47
|
+
}),
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=useGameEntityAnimatedStyle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGameEntityAnimatedStyle.js","sourceRoot":"","sources":["../../../../src/features/game/utils/useGameEntityAnimatedStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGxC,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAW9D,mFAAmF;AACnF,MAAM,UAAU,0BAA0B,CAAC,KAAsB;IAC/D,MAAM,YAAY,GAAG,oBAAoB,EAAE,CAAC;IAC5C,MAAM,IAAI,GAAG,2BAA2B,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;IAC9D,MAAM,MAAM,GAA6B;QACvC,CAAC,EAAE,0BAA0B,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,IAAI,CAAC,gBAAgB,CAAC;QAC7F,CAAC,EAAE,0BAA0B,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,IAAI,CAAC,gBAAgB,CAAC;QAC7F,OAAO,EAAE,0BAA0B,CACjC,KAAK,CAAC,OAAO,IAAI,CAAC,EAClB,IAAI,CAAC,oBAAoB,EACzB,IAAI,CAAC,gBAAgB,CACtB;QACD,KAAK,EAAE,0BAA0B,CAC/B,KAAK,CAAC,KAAK,IAAI,CAAC,EAChB,IAAI,CAAC,oBAAoB,EACzB,IAAI,CAAC,gBAAgB,CACtB;QACD,QAAQ,EAAE,0BAA0B,CAClC,KAAK,CAAC,QAAQ,IAAI,CAAC,EACnB,IAAI,CAAC,oBAAoB,EACzB,IAAI,CAAC,gBAAgB,C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AAC;QACF,GAAG,EAAE,GAAG,CAAC,WAAW,CAAC;YACnB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC;YAC7B,WAAW,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;SACnC,CAAC;QACF,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC;YAC3B,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;YAClB,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;YACnB,WAAW,EAAE,OAAO;SACrB,CAAC;QACF,SAAS,EAAE;YACT,EAAE,KAAK,EAAE;YACT;gBACE,MAAM,EAAE,QAAQ,CAAC,WAAW,CAAC;oBAC3B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC;oBAC7B,WAAW,EAAE,CAAC,WAAW,EAAE,UAAU,CAAC;iBACvC,CAAC;aACH;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { Animated } from 'react-native';\n\nimport type { GameEntityProps } from '../../../types/gamePresentation';\nimport { resolveGameEntityMotionPlan } from './resolveGameEntityMotionPlan';\nimport { useAnimatedGameEntityValue } from './useAnimatedGameEntityValue';\nimport { useGameEntityMotionProgress } from './useGameEntityMotionProgress';\nimport { useGameReducedMotion } from './useGameReducedMotion';\n\ninterface GameEntityAnimatedValues {\n readonly x: Animated.Value;\n readonly y: Animated.Value;\n readonly opacity: Animated.Value;\n readonly scale: Animated.Value;\n readonly rotation: Animated.Value;\n readonly progress: Animated.Value;\n}\n\n/*** Compose bound GameEntity values with optional relative presentation motion. */\nexport function useGameEntityAnimatedStyle(input: GameEntityProps) {\n const reduceMotion = useGameReducedMotion();\n const plan = resolveGameEntityMotionPlan(input, reduceMotion);\n const values: GameEntityAnimatedValues = {\n x: useAnimatedGameEntityValue(input.x ?? 0, plan.transitionDurationMs, plan.transitionEasing),\n y: useAnimatedGameEntityValue(input.y ?? 0, plan.transitionDurationMs, plan.transitionEasing),\n opacity: useAnimatedGameEntityValue(\n input.opacity ?? 1,\n plan.transitionDurationMs,\n plan.transitionEasing,\n ),\n scale: useAnimatedGameEntityValue(\n input.scale ?? 1,\n plan.transitionDurationMs,\n plan.transitionEasing,\n ),\n rotation: useAnimatedGameEntityValue(\n input.rotation ?? 0,\n plan.transitionDurationMs,\n plan.transitionEasing,\n ),\n progress: useGameEntityMotionProgress(plan),\n };\n\n return createGameEntityAnimatedStyle(values, input);\n}\n\n/*** Build one animated React Native style from base values and relative motion progress. */\nfunction createGameEntityAnimatedStyle(values: GameEntityAnimatedValues, input: GameEntityProps) {\n const left = Animated.add(values.x, Animated.multiply(values.progress, input.motionOffsetX ?? 0));\n const top = Animated.add(values.y, Animated.multiply(values.progress, input.motionOffsetY ?? 0));\n const opacity = Animated.add(\n values.opacity,\n Animated.multiply(values.progress, input.motionOpacityDelta ?? 0),\n );\n const scale = Animated.add(\n values.scale,\n Animated.multiply(values.progress, input.motionScaleDelta ?? 0),\n );\n const rotation = Animated.add(\n values.rotation,\n Animated.multiply(values.progress, input.motionRotationDelta ?? 0),\n );\n\n return {\n left: left.interpolate({\n inputRange: [-10_000, 10_000],\n outputRange: ['-10000%', '10000%'],\n }),\n top: top.interpolate({\n inputRange: [-10_000, 10_000],\n outputRange: ['-10000%', '10000%'],\n }),\n opacity: opacity.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n transform: [\n { scale },\n {\n rotate: rotation.interpolate({\n inputRange: [-36_000, 36_000],\n outputRange: ['-36000deg', '36000deg'],\n }),\n },\n ],\n };\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { View } from 'react-native';
|
|
3
|
+
/*** Register one optional measurable GameEntity view inside its local Game scope. */
|
|
4
|
+
export declare function useGameEntityMeasurement(elementRef: React.RefObject<View | null>, measurementId: string | undefined): void;
|
|
5
|
+
//# sourceMappingURL=useGameEntityMeasurement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGameEntityMeasurement.d.ts","sourceRoot":"","sources":["../../../../src/features/game/utils/useGameEntityMeasurement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAKzC,qFAAqF;AACrF,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,EACxC,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,IAAI,CAQN"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { measureGameEntity } from '../adapters/inbound/measureGameEntity';
|
|
3
|
+
import { GameRuntimeContext } from '../composition/GameRuntimeContext';
|
|
4
|
+
/*** Register one optional measurable GameEntity view inside its local Game scope. */
|
|
5
|
+
export function useGameEntityMeasurement(elementRef, measurementId) {
|
|
6
|
+
const runtime = React.useContext(GameRuntimeContext);
|
|
7
|
+
const registerMeasurement = runtime?.registerMeasurement;
|
|
8
|
+
React.useEffect(() => {
|
|
9
|
+
if (measurementId === undefined || registerMeasurement === undefined)
|
|
10
|
+
return undefined;
|
|
11
|
+
return registerMeasurement(measurementId, () => measureGameEntity(elementRef.current));
|
|
12
|
+
}, [elementRef, measurementId, registerMeasurement]);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=useGameEntityMeasurement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGameEntityMeasurement.js","sourceRoot":"","sources":["../../../../src/features/game/utils/useGameEntityMeasurement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,qFAAqF;AACrF,MAAM,UAAU,wBAAwB,CACtC,UAAwC,EACxC,aAAiC;IAEjC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;IACrD,MAAM,mBAAmB,GAAG,OAAO,EAAE,mBAAmB,CAAC;IAEzD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,aAAa,KAAK,SAAS,IAAI,mBAAmB,KAAK,SAAS;YAAE,OAAO,SAAS,CAAC;QACvF,OAAO,mBAAmB,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IACzF,CAAC,EAAE,CAAC,UAAU,EAAE,aAAa,EAAE,mBAAmB,CAAC,CAAC,CAAC;AACvD,CAAC","sourcesContent":["import React from 'react';\nimport type { View } from 'react-native';\n\nimport { measureGameEntity } from '../adapters/inbound/measureGameEntity';\nimport { GameRuntimeContext } from '../composition/GameRuntimeContext';\n\n/*** Register one optional measurable GameEntity view inside its local Game scope. */\nexport function useGameEntityMeasurement(\n elementRef: React.RefObject<View | null>,\n measurementId: string | undefined,\n): void {\n const runtime = React.useContext(GameRuntimeContext);\n const registerMeasurement = runtime?.registerMeasurement;\n\n React.useEffect(() => {\n if (measurementId === undefined || registerMeasurement === undefined) return undefined;\n return registerMeasurement(measurementId, () => measureGameEntity(elementRef.current));\n }, [elementRef, measurementId, registerMeasurement]);\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Animated } from 'react-native';
|
|
2
|
+
import type { GameEntityMotionPlan } from './resolveGameEntityMotionPlan';
|
|
3
|
+
/*** Drive one optional relative GameEntity motion timeline without changing game-session state. */
|
|
4
|
+
export declare function useGameEntityMotionProgress(plan: GameEntityMotionPlan): Animated.Value;
|
|
5
|
+
//# sourceMappingURL=useGameEntityMotionProgress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGameEntityMotionProgress.d.ts","sourceRoot":"","sources":["../../../../src/features/game/utils/useGameEntityMotionProgress.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAU,MAAM,cAAc,CAAC;AAGhD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAU1E,mGAAmG;AACnG,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,oBAAoB,GAAG,QAAQ,CAAC,KAAK,CAmDtF"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Animated, Easing } from 'react-native';
|
|
3
|
+
/*** Drive one optional relative GameEntity motion timeline without changing game-session state. */
|
|
4
|
+
export function useGameEntityMotionProgress(plan) {
|
|
5
|
+
const [progress] = React.useState(() => new Animated.Value(0));
|
|
6
|
+
const signature = createMotionSignature(plan);
|
|
7
|
+
const previousSignature = React.useRef(signature);
|
|
8
|
+
const { motionEnabled, motionPaused, motionDurationMs, motionDelayMs, motionEasing, motionRepeat, motionAlternate, } = plan;
|
|
9
|
+
React.useEffect(() => {
|
|
10
|
+
progress.stopAnimation();
|
|
11
|
+
if (!motionEnabled) {
|
|
12
|
+
progress.setValue(0);
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
if (previousSignature.current !== signature) {
|
|
16
|
+
progress.setValue(0);
|
|
17
|
+
previousSignature.current = signature;
|
|
18
|
+
}
|
|
19
|
+
if (motionPaused)
|
|
20
|
+
return undefined;
|
|
21
|
+
const animation = createMotionAnimation(progress, {
|
|
22
|
+
durationMs: motionDurationMs,
|
|
23
|
+
delayMs: motionDelayMs,
|
|
24
|
+
easing: motionEasing,
|
|
25
|
+
repeat: motionRepeat,
|
|
26
|
+
alternate: motionAlternate,
|
|
27
|
+
});
|
|
28
|
+
animation.start();
|
|
29
|
+
return () => animation.stop();
|
|
30
|
+
}, [
|
|
31
|
+
motionAlternate,
|
|
32
|
+
motionDelayMs,
|
|
33
|
+
motionDurationMs,
|
|
34
|
+
motionEasing,
|
|
35
|
+
motionEnabled,
|
|
36
|
+
motionPaused,
|
|
37
|
+
motionRepeat,
|
|
38
|
+
progress,
|
|
39
|
+
signature,
|
|
40
|
+
]);
|
|
41
|
+
return progress;
|
|
42
|
+
}
|
|
43
|
+
/*** Create the one-shot or repeating React Native motion sequence for one entity. */
|
|
44
|
+
function createMotionAnimation(progress, input) {
|
|
45
|
+
const forward = () => Animated.timing(progress, {
|
|
46
|
+
toValue: 1,
|
|
47
|
+
duration: input.durationMs,
|
|
48
|
+
easing: resolveMotionEasing(input.easing),
|
|
49
|
+
useNativeDriver: false,
|
|
50
|
+
});
|
|
51
|
+
const reverse = () => Animated.timing(progress, {
|
|
52
|
+
toValue: 0,
|
|
53
|
+
duration: input.durationMs,
|
|
54
|
+
easing: resolveMotionEasing(input.easing),
|
|
55
|
+
useNativeDriver: false,
|
|
56
|
+
});
|
|
57
|
+
const movement = input.alternate
|
|
58
|
+
? Animated.loop(Animated.sequence([forward(), reverse()]))
|
|
59
|
+
: input.repeat
|
|
60
|
+
? Animated.loop(forward())
|
|
61
|
+
: forward();
|
|
62
|
+
return input.delayMs === 0
|
|
63
|
+
? movement
|
|
64
|
+
: Animated.sequence([Animated.delay(input.delayMs), movement]);
|
|
65
|
+
}
|
|
66
|
+
/*** Create a stable signature for motion parameters that should restart the relative timeline. */
|
|
67
|
+
function createMotionSignature(plan) {
|
|
68
|
+
return [
|
|
69
|
+
plan.motionDurationMs,
|
|
70
|
+
plan.motionDelayMs,
|
|
71
|
+
plan.motionEasing,
|
|
72
|
+
plan.motionEnabled,
|
|
73
|
+
plan.motionRepeat,
|
|
74
|
+
plan.motionAlternate,
|
|
75
|
+
].join(':');
|
|
76
|
+
}
|
|
77
|
+
/*** Map serializable timeline easing names onto React Native easing functions. */
|
|
78
|
+
function resolveMotionEasing(easing) {
|
|
79
|
+
if (easing === 'ease-in')
|
|
80
|
+
return Easing.in(Easing.ease);
|
|
81
|
+
if (easing === 'ease-out')
|
|
82
|
+
return Easing.out(Easing.ease);
|
|
83
|
+
if (easing === 'ease-in-out')
|
|
84
|
+
return Easing.inOut(Easing.ease);
|
|
85
|
+
return Easing.linear;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=useGameEntityMotionProgress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGameEntityMotionProgress.js","sourceRoot":"","sources":["../../../../src/features/game/utils/useGameEntityMotionProgress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAahD,mGAAmG;AACnG,MAAM,UAAU,2BAA2B,CAAC,IAA0B;IACpE,MAAM,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/D,MAAM,SAAS,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAC9C,MAAM,iBAAiB,GAAG,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAClD,MAAM,EACJ,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,eAAe,GAChB,GAAG,IAAI,CAAC;IAET,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,QAAQ,CAAC,aAAa,EAAE,CAAC;QAEzB,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACrB,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,IAAI,iBAAiB,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YAC5C,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACrB,iBAAiB,CAAC,OAAO,GAAG,SAAS,CAAC;QACxC,CAAC;QAED,IAAI,YAAY;YAAE,OAAO,SAAS,CAAC;QAEnC,MAAM,SAAS,GAAG,qBAAqB,CAAC,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AC;YAC1B,CAAC,CAAC,OAAO,EAAE,CAAC;IAEhB,OAAO,KAAK,CAAC,OAAO,KAAK,CAAC;QACxB,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;AACnE,CAAC;AAED,kGAAkG;AAClG,SAAS,qBAAqB,CAAC,IAA0B;IACvD,OAAO;QACL,IAAI,CAAC,gBAAgB;QACrB,IAAI,CAAC,aAAa;QAClB,IAAI,CAAC,YAAY;QACjB,IAAI,CAAC,aAAa;QAClB,IAAI,CAAC,YAAY;QACjB,IAAI,CAAC,eAAe;KACrB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACd,CAAC;AAED,kFAAkF;AAClF,SAAS,mBAAmB,CAAC,MAAwB;IACnD,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACxD,IAAI,MAAM,KAAK,UAAU;QAAE,OAAO,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC1D,IAAI,MAAM,KAAK,aAAa;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC/D,OAAO,MAAM,CAAC,MAAM,CAAC;AACvB,CAAC","sourcesContent":["import React from 'react';\nimport { Animated, Easing } from 'react-native';\n\nimport type { GameEntityEasing } from '../../../types/gamePresentation';\nimport type { GameEntityMotionPlan } from './resolveGameEntityMotionPlan';\n\ninterface MotionAnimationInput {\n readonly durationMs: number;\n readonly delayMs: number;\n readonly easing: GameEntityEasing;\n readonly repeat: boolean;\n readonly alternate: boolean;\n}\n\n/*** Drive one optional relative GameEntity motion timeline without changing game-session state. */\nexport function useGameEntityMotionProgress(plan: GameEntityMotionPlan): Animated.Value {\n const [progress] = React.useState(() => new Animated.Value(0));\n const signature = createMotionSignature(plan);\n const previousSignature = React.useRef(signature);\n const {\n motionEnabled,\n motionPaused,\n motionDurationMs,\n motionDelayMs,\n motionEasing,\n motionRepeat,\n motionAlternate,\n } = plan;\n\n React.useEffect(() => {\n progress.stopAnimation();\n\n if (!motionEnabled) {\n progress.setValue(0);\n return undefined;\n }\n\n if (previousSignature.current !== signature) {\n progress.setValue(0);\n previousSignature.current = signature;\n }\n\n if (motionPaused) return undefined;\n\n const animation = createMotionAnimation(progress, {\n durationMs: motionDurationMs,\n delayMs: motionDelayMs,\n easing: motionEasing,\n repeat: motionRepeat,\n alternate: motionAlternate,\n });\n animation.start();\n return () => animation.stop();\n }, [\n motionAlternate,\n motionDelayMs,\n motionDurationMs,\n motionEasing,\n motionEnabled,\n motionPaused,\n motionRepeat,\n progress,\n signature,\n ]);\n\n return progress;\n}\n\n/*** Create the one-shot or repeating React Native motion sequence for one entity. */\nfunction createMotionAnimation(progress: Animated.Value, input: MotionAnimationInput) {\n const forward = () =>\n Animated.timing(progress, {\n toValue: 1,\n duration: input.durationMs,\n easing: resolveMotionEasing(input.easing),\n useNativeDriver: false,\n });\n const reverse = () =>\n Animated.timing(progress, {\n toValue: 0,\n duration: input.durationMs,\n easing: resolveMotionEasing(input.easing),\n useNativeDriver: false,\n });\n const movement = input.alternate\n ? Animated.loop(Animated.sequence([forward(), reverse()]))\n : input.repeat\n ? Animated.loop(forward())\n : forward();\n\n return input.delayMs === 0\n ? movement\n : Animated.sequence([Animated.delay(input.delayMs), movement]);\n}\n\n/*** Create a stable signature for motion parameters that should restart the relative timeline. */\nfunction createMotionSignature(plan: GameEntityMotionPlan): string {\n return [\n plan.motionDurationMs,\n plan.motionDelayMs,\n plan.motionEasing,\n plan.motionEnabled,\n plan.motionRepeat,\n plan.motionAlternate,\n ].join(':');\n}\n\n/*** Map serializable timeline easing names onto React Native easing functions. */\nfunction resolveMotionEasing(easing: GameEntityEasing) {\n if (easing === 'ease-in') return Easing.in(Easing.ease);\n if (easing === 'ease-out') return Easing.out(Easing.ease);\n if (easing === 'ease-in-out') return Easing.inOut(Easing.ease);\n return Easing.linear;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGameReducedMotion.d.ts","sourceRoot":"","sources":["../../../../src/features/game/utils/useGameReducedMotion.ts"],"names":[],"mappings":"AAGA,wFAAwF;AACxF,wBAAgB,oBAAoB,IAAI,OAAO,CAU9C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AccessibilityInfo } from 'react-native';
|
|
3
|
+
/*** Track the cross-platform system reduced-motion preference for game presentation. */
|
|
4
|
+
export function useGameReducedMotion() {
|
|
5
|
+
const [reduceMotion, setReduceMotion] = React.useState(false);
|
|
6
|
+
React.useEffect(() => {
|
|
7
|
+
void AccessibilityInfo.isReduceMotionEnabled().then(setReduceMotion);
|
|
8
|
+
const subscription = AccessibilityInfo.addEventListener('reduceMotionChanged', setReduceMotion);
|
|
9
|
+
return () => subscription.remove();
|
|
10
|
+
}, []);
|
|
11
|
+
return reduceMotion;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=useGameReducedMotion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGameReducedMotion.js","sourceRoot":"","sources":["../../../../src/features/game/utils/useGameReducedMotion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,wFAAwF;AACxF,MAAM,UAAU,oBAAoB;IAClC,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9D,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,KAAK,iBAAiB,CAAC,qBAAqB,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACrE,MAAM,YAAY,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,qBAAqB,EAAE,eAAe,CAAC,CAAC;QAChG,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;IACrC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["import React from 'react';\nimport { AccessibilityInfo } from 'react-native';\n\n/*** Track the cross-platform system reduced-motion preference for game presentation. */\nexport function useGameReducedMotion(): boolean {\n const [reduceMotion, setReduceMotion] = React.useState(false);\n\n React.useEffect(() => {\n void AccessibilityInfo.isReduceMotionEnabled().then(setReduceMotion);\n const subscription = AccessibilityInfo.addEventListener('reduceMotionChanged', setReduceMotion);\n return () => subscription.remove();\n }, []);\n\n return reduceMotion;\n}\n"]}
|
|
@@ -2,7 +2,7 @@ export declare const gridMeta: {
|
|
|
2
2
|
readonly name: "Grid";
|
|
3
3
|
readonly category: "foundation";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement", "ChessBoard", "OpeningBook", "Game", "GameField", "TabletopTable", "PokerTrainingTable"];
|
|
6
6
|
readonly props: {
|
|
7
7
|
readonly cols: {
|
|
8
8
|
readonly type: "number";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gridMeta.d.ts","sourceRoot":"","sources":["../../../src/features/layout/gridMeta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gridMeta.d.ts","sourceRoot":"","sources":["../../../src/features/layout/gridMeta.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBiB,CAAC"}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { CONTAINER_ALLOWED_CHILDREN } from '../authoring/allowedChildren';
|
|
1
|
+
import { CHESS_ALLOWED_CHILDREN, CONTAINER_ALLOWED_CHILDREN, GAME_ALLOWED_CHILDREN, TABLETOP_ALLOWED_CHILDREN, } from '../authoring/allowedChildren';
|
|
2
2
|
import { LAYOUT_PROPS } from './constants';
|
|
3
3
|
export const gridMeta = {
|
|
4
4
|
name: 'Grid',
|
|
5
5
|
category: 'foundation',
|
|
6
6
|
directManifestNode: true,
|
|
7
|
-
allowedChildren: [
|
|
7
|
+
allowedChildren: [
|
|
8
|
+
...CONTAINER_ALLOWED_CHILDREN,
|
|
9
|
+
...CHESS_ALLOWED_CHILDREN,
|
|
10
|
+
...GAME_ALLOWED_CHILDREN,
|
|
11
|
+
...TABLETOP_ALLOWED_CHILDREN,
|
|
12
|
+
],
|
|
8
13
|
props: {
|
|
9
14
|
...LAYOUT_PROPS,
|
|
10
15
|
cols: { type: 'number', category: 'Layout', default: 1 },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gridMeta.js","sourceRoot":"","sources":["../../../src/features/layout/gridMeta.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"gridMeta.js","sourceRoot":"","sources":["../../../src/features/layout/gridMeta.ts"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,YAAY;IACtB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE;QACf,GAAG,0BAA0B;QAC7B,GAAG,sBAAsB;QACzB,GAAG,qBAAqB;QACxB,GAAG,yBAAyB;KAC7B;IACD,KAAK,EAAE;QACL,GAAG,YAAY;QACf,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE;QACxD,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE;QAC7C,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE;QAChD,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE;QAChD,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE;KACrD;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../types/authoring';\nimport {\n CHESS_ALLOWED_CHILDREN,\n CONTAINER_ALLOWED_CHILDREN,\n GAME_ALLOWED_CHILDREN,\n TABLETOP_ALLOWED_CHILDREN,\n} from '../authoring/allowedChildren';\nimport { LAYOUT_PROPS } from './constants';\n\nexport const gridMeta = {\n name: 'Grid',\n category: 'foundation',\n directManifestNode: true,\n allowedChildren: [\n ...CONTAINER_ALLOWED_CHILDREN,\n ...CHESS_ALLOWED_CHILDREN,\n ...GAME_ALLOWED_CHILDREN,\n ...TABLETOP_ALLOWED_CHILDREN,\n ],\n props: {\n ...LAYOUT_PROPS,\n cols: { type: 'number', category: 'Layout', default: 1 },\n gap: { type: 'spacing', category: 'Spacing' },\n rowGap: { type: 'spacing', category: 'Spacing' },\n colGap: { type: 'spacing', category: 'Spacing' },\n minItemWidth: { type: 'number', category: 'Layout' },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -2,7 +2,7 @@ export declare const screenMeta: {
|
|
|
2
2
|
readonly name: "Screen";
|
|
3
3
|
readonly category: "layout";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["ScreenSection", "ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
5
|
+
readonly allowedChildren: readonly ["ScreenSection", "ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement", "ChessBoard", "OpeningBook", "Game", "GameField", "TabletopTable", "PokerTrainingTable"];
|
|
6
6
|
readonly blueprint: {
|
|
7
7
|
readonly label: "Screen";
|
|
8
8
|
};
|
|
@@ -2,7 +2,7 @@ export declare const viewMeta: {
|
|
|
2
2
|
readonly name: "View";
|
|
3
3
|
readonly category: "foundation";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement", "ChessBoard", "OpeningBook", "Game", "GameField"];
|
|
6
6
|
readonly props: {
|
|
7
7
|
readonly direction: {
|
|
8
8
|
readonly type: "enum";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewMeta.d.ts","sourceRoot":"","sources":["../../../src/features/layout/viewMeta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"viewMeta.d.ts","sourceRoot":"","sources":["../../../src/features/layout/viewMeta.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BiB,CAAC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { CONTAINER_ALLOWED_CHILDREN } from '../authoring/allowedChildren';
|
|
1
|
+
import { CHESS_ALLOWED_CHILDREN, CONTAINER_ALLOWED_CHILDREN, GAME_ALLOWED_CHILDREN, } from '../authoring/allowedChildren';
|
|
2
2
|
import { LAYOUT_PROPS } from './constants';
|
|
3
3
|
export const viewMeta = {
|
|
4
4
|
name: 'View',
|
|
5
5
|
category: 'foundation',
|
|
6
6
|
directManifestNode: true,
|
|
7
|
-
allowedChildren: [
|
|
7
|
+
allowedChildren: [
|
|
8
|
+
...CONTAINER_ALLOWED_CHILDREN,
|
|
9
|
+
...CHESS_ALLOWED_CHILDREN,
|
|
10
|
+
...GAME_ALLOWED_CHILDREN,
|
|
11
|
+
],
|
|
8
12
|
props: {
|
|
9
13
|
...LAYOUT_PROPS,
|
|
10
14
|
direction: { type: 'enum', category: 'Layout', enum: ['row', 'column'] },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewMeta.js","sourceRoot":"","sources":["../../../src/features/layout/viewMeta.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"viewMeta.js","sourceRoot":"","sources":["../../../src/features/layout/viewMeta.ts"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,GACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,YAAY;IACtB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE;QACf,GAAG,0BAA0B;QAC7B,GAAG,sBAAsB;QACzB,GAAG,qBAAqB;KACzB;IACD,KAAK,EAAE;QACL,GAAG,YAAY;QACf,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE;QACxE,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE;QAC7C,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE;QAChD,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE;QACnD,KAAK,EAAE;YACL,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,QAAQ;YAClB,IAAI,EAAE,CAAC,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC;SAClE;QACD,OAAO,EAAE;YACP,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,QAAQ;YAClB,IAAI,EAAE,CAAC,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,cAAc,CAAC;SAC5F;QACD,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE;QACpE,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE;QACxC,WAAW,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE;QACjD,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE;KACnD;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../types/authoring';\nimport {\n CHESS_ALLOWED_CHILDREN,\n CONTAINER_ALLOWED_CHILDREN,\n GAME_ALLOWED_CHILDREN,\n} from '../authoring/allowedChildren';\nimport { LAYOUT_PROPS } from './constants';\n\nexport const viewMeta = {\n name: 'View',\n category: 'foundation',\n directManifestNode: true,\n allowedChildren: [\n ...CONTAINER_ALLOWED_CHILDREN,\n ...CHESS_ALLOWED_CHILDREN,\n ...GAME_ALLOWED_CHILDREN,\n ],\n props: {\n ...LAYOUT_PROPS,\n direction: { type: 'enum', category: 'Layout', enum: ['row', 'column'] },\n gap: { type: 'spacing', category: 'Spacing' },\n rowGap: { type: 'spacing', category: 'Spacing' },\n columnGap: { type: 'spacing', category: 'Spacing' },\n align: {\n type: 'enum',\n category: 'Layout',\n enum: ['flex-start', 'center', 'flex-end', 'stretch', 'baseline'],\n },\n justify: {\n type: 'enum',\n category: 'Layout',\n enum: ['flex-start', 'center', 'flex-end', 'space-between', 'space-around', 'space-evenly'],\n },\n wrap: { type: 'enum', category: 'Layout', enum: ['nowrap', 'wrap'] },\n bg: { type: 'color', category: 'Style' },\n borderColor: { type: 'color', category: 'Style' },\n borderWidth: { type: 'number', category: 'Style' },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZORA_COMPONENT_REGISTRY.d.ts","sourceRoot":"","sources":["../../../src/features/registry/ZORA_COMPONENT_REGISTRY.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ZORA_COMPONENT_REGISTRY.d.ts","sourceRoot":"","sources":["../../../src/features/registry/ZORA_COMPONENT_REGISTRY.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAmNlE,eAAO,MAAM,uBAAuB,EAAE,qBAAgD,CAAC"}
|
|
@@ -9,6 +9,7 @@ import { Breadcrumbs } from '../breadcrumbs/public';
|
|
|
9
9
|
import { Button, ButtonGroup, IconButton } from '../button/public';
|
|
10
10
|
import { Card, MediaCard, MetricCard, PostCard, ProductCard } from '../card/public';
|
|
11
11
|
import { ChatListItem, MessageBubble } from '../chat/public';
|
|
12
|
+
import { ChessBoard, OpeningBook } from '../chess/public';
|
|
12
13
|
import { Chip, ChipGroup } from '../chip/public';
|
|
13
14
|
import { CollectionEditor } from '../collection-editor/public';
|
|
14
15
|
import { ContentRail } from '../content-rail/public';
|
|
@@ -23,6 +24,7 @@ import { SearchInput } from '../form/search-input/public';
|
|
|
23
24
|
import { Select } from '../form/select/public';
|
|
24
25
|
import { Switch } from '../form/switch/public';
|
|
25
26
|
import { TextInput } from '../form/text-input/public';
|
|
27
|
+
import { Game, GameEntity, GameField, GameInputZone, GameMeasurementProbe, GameOverlay, } from '../game/public';
|
|
26
28
|
import { Gradient } from '../gradient/public';
|
|
27
29
|
import { Hero } from '../hero/public';
|
|
28
30
|
import { Icon } from '../icon/public';
|
|
@@ -42,6 +44,7 @@ import { ScreenSection, SectionHeader } from '../section/public';
|
|
|
42
44
|
import { SelectableItem } from '../selection/public';
|
|
43
45
|
import { Skeleton, SkeletonCard, SkeletonList, SkeletonText } from '../skeleton/public';
|
|
44
46
|
import { Surface } from '../surface/public';
|
|
47
|
+
import { CardBack, CardHand, PlayingCard, PokerTrainingTable, TabletopTable, } from '../tabletop/public';
|
|
45
48
|
import { Tab, TabList, TabPanel, Tabs } from '../tabs/public';
|
|
46
49
|
import { ThemeModeToggle } from '../theme/adapters/inbound/ThemeModeToggle';
|
|
47
50
|
import { TimePicker } from '../time-picker/public';
|
|
@@ -75,6 +78,12 @@ const _ZORA_COMPONENT_REGISTRY = {
|
|
|
75
78
|
FormError,
|
|
76
79
|
Field,
|
|
77
80
|
Gradient,
|
|
81
|
+
Game,
|
|
82
|
+
GameEntity,
|
|
83
|
+
GameField,
|
|
84
|
+
GameInputZone,
|
|
85
|
+
GameMeasurementProbe,
|
|
86
|
+
GameOverlay,
|
|
78
87
|
Heading,
|
|
79
88
|
Icon,
|
|
80
89
|
IconButton,
|
|
@@ -125,6 +134,7 @@ const _ZORA_COMPONENT_REGISTRY = {
|
|
|
125
134
|
SignInForm,
|
|
126
135
|
SignUpForm,
|
|
127
136
|
ChatListItem,
|
|
137
|
+
ChessBoard,
|
|
128
138
|
CollectionEditor,
|
|
129
139
|
ContentRail,
|
|
130
140
|
EmptyState,
|
|
@@ -133,6 +143,7 @@ const _ZORA_COMPONENT_REGISTRY = {
|
|
|
133
143
|
ListItem,
|
|
134
144
|
ListSection,
|
|
135
145
|
MessageBubble,
|
|
146
|
+
OpeningBook,
|
|
136
147
|
MissingElement,
|
|
137
148
|
PostCard,
|
|
138
149
|
ProductCard,
|
|
@@ -143,6 +154,11 @@ const _ZORA_COMPONENT_REGISTRY = {
|
|
|
143
154
|
SectionHeader,
|
|
144
155
|
SelectableItem,
|
|
145
156
|
PaletteItem,
|
|
157
|
+
CardBack,
|
|
158
|
+
CardHand,
|
|
159
|
+
PlayingCard,
|
|
160
|
+
TabletopTable,
|
|
161
|
+
PokerTrainingTable,
|
|
146
162
|
Timeline,
|
|
147
163
|
TreeItem,
|
|
148
164
|
TreeView,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZORA_COMPONENT_REGISTRY.js","sourceRoot":"","sources":["../../../src/features/registry/ZORA_COMPONENT_REGISTRY.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,OAAO,EACP,UAAU,EACV,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,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;IACR,WAAW;IACX,aAAa;IACb,kBAAkB;IAClB,oBAAoB;IACpB,WAAW;IACX,aAAa;IACb,cAAc;IACd,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,QAAQ;CACgC,CAAC;AAE3C,MAAM,CAAC,MAAM,uBAAuB,GAA0B,wBAAwB,CAAC","sourcesContent":["import type { InteractionPolicyProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraComponentRegistry } from '../../types/registry';\nimport { Accordion, AccordionItem } from '../accordion/public';\nimport { ActivityIndicator } from '../activity-indicator/public';\nimport { AppBar } from '../app-bar/public';\nimport {\n ForgotPasswordForm,\n OAuthProviderButton,\n OAuthProviderList,\n OtpForm,\n SignInForm,\n SignUpForm,\n} from '../auth/public';\nimport { Avatar, AvatarGroup } from '../avatar/public';\nimport { Badge } from '../badge/public';\nimport { BottomSheet } from '../bottom-sheet/public';\nimport { Breadcrumbs } from '../breadcrumbs/public';\nimport { Button, ButtonGroup, IconButton } from '../button/public';\nimport { Card, MediaCard, MetricCard, PostCard, ProductCard } from '../card/public';\nimport { ChatListItem, MessageBubble } from '../chat/public';\nimport { Chip, ChipGroup } from '../chip/public';\nimport { CollectionEditor } from '../collection-editor/public';\nimport { ContentRail } from '../content-rail/public';\nimport { DataTable } from '../data-table/public';\nimport { DatePicker } from '../date-picker/public';\nimport { Dialog } from '../dialog/public';\nimport { EmptyState } from '../empty-state/public';\nimport { Checkbox, CheckboxGroup } from '../form/checkbox/public';\nimport { Field, Form, FormActions, FormError } from '../form/public';\nimport { Radio, RadioGroup } from '../form/radio/public';\nimport { SearchInput } from '../form/search-input/public';\nimport { Select } from '../form/select/public';\nimport { Switch } from '../form/switch/public';\nimport { TextInput } from '../form/text-input/public';\nimport { Gradient } from '../gradient/public';\nimport { Hero } from '../hero/public';\nimport { Icon } from '../icon/public';\nimport { Image } from '../image/public';\nimport { KeyboardAvoidingView } from '../keyboard-avoiding-view/public';\nimport { AppShell, Divider, Grid, Screen, ScrollView, View } from '../layout/public';\nimport { FlatList, List, ListItem, ListSection, SectionList } from '../list/public';\nimport { MissingElement } from '../missing-element/public';\nimport { Pagination } from '../pagination/public';\nimport { PaletteItem } from '../palette-item/public';\nimport { PopoverMenu } from '../popover-menu/public';\nimport { Progress, ProgressRing } from '../progress/public';\nimport { Rating } from '../rating/public';\nimport { ReaderSurface } from '../reader/public';\nimport { BarcodeScannerView, CameraPermissionView, ScanOverlay } from '../scanner/public';\nimport { ScreenSection, SectionHeader } from '../section/public';\nimport { SelectableItem } from '../selection/public';\nimport { Skeleton, SkeletonCard, SkeletonList, SkeletonText } from '../skeleton/public';\nimport { Surface } from '../surface/public';\nimport { Tab, TabList, TabPanel, Tabs } from '../tabs/public';\nimport { ThemeModeToggle } from '../theme/adapters/inbound/ThemeModeToggle';\nimport { TimePicker } from '../time-picker/public';\nimport { Timeline } from '../timeline/public';\nimport { Toast } from '../toast/public';\nimport { Toolbar } from '../toolbar/public';\nimport { TreeItem, TreeView } from '../tree-view/public';\nimport { Heading, Text } from '../typography/public';\nimport { Uploader } from '../uploader/public';\n\ntype ComponentPropsFor<K extends keyof typeof _ZORA_COMPONENT_REGISTRY> = React.ComponentProps<\n (typeof _ZORA_COMPONENT_REGISTRY)[K]\n>;\n\ntype AcceptsSurfaceInteractionPolicyProps<P> = 'interactionPolicy' extends keyof P\n ? InteractionPolicyProps extends Pick<P, 'interactionPolicy'>\n ? Pick<P, 'interactionPolicy'> extends InteractionPolicyProps\n ? true\n : false\n : false\n : false;\n\ntype RegistryInteractionPolicyContract = {\n [K in keyof typeof _ZORA_COMPONENT_REGISTRY]: AcceptsSurfaceInteractionPolicyProps<\n ComponentPropsFor<K>\n >;\n};\n\ntype _AssertTrue<T extends true> = T;\ntype _RegistryInteractionPolicyCheck = _AssertTrue<\n RegistryInteractionPolicyContract[keyof typeof _ZORA_COMPONENT_REGISTRY]\n>;\n\nconst _ZORA_COMPONENT_REGISTRY = {\n Accordion,\n AccordionItem,\n ActivityIndicator,\n AppBar,\n Avatar,\n AvatarGroup,\n Badge,\n Breadcrumbs,\n Button,\n ButtonGroup,\n Card,\n Checkbox,\n CheckboxGroup,\n Chip,\n ChipGroup,\n DataTable,\n DatePicker,\n Dialog,\n Form,\n FormActions,\n FormError,\n Field,\n Gradient,\n Heading,\n Icon,\n IconButton,\n Image,\n KeyboardAvoidingView,\n TextInput,\n MediaCard,\n MetricCard,\n Pagination,\n PopoverMenu,\n Progress,\n ProgressRing,\n Radio,\n RadioGroup,\n Rating,\n SearchInput,\n Select,\n Switch,\n Skeleton,\n SkeletonCard,\n SkeletonList,\n SkeletonText,\n Tab,\n TabList,\n TabPanel,\n Tabs,\n Text,\n TimePicker,\n Toast,\n Toolbar,\n Uploader,\n BottomSheet,\n FlatList,\n SectionList,\n ScrollView,\n View,\n ThemeModeToggle,\n Divider,\n Grid,\n Surface,\n AppShell,\n Screen,\n ScreenSection,\n ForgotPasswordForm,\n OAuthProviderButton,\n OAuthProviderList,\n OtpForm,\n SignInForm,\n SignUpForm,\n ChatListItem,\n CollectionEditor,\n ContentRail,\n EmptyState,\n Hero,\n List,\n ListItem,\n ListSection,\n MessageBubble,\n MissingElement,\n PostCard,\n ProductCard,\n ReaderSurface,\n BarcodeScannerView,\n CameraPermissionView,\n ScanOverlay,\n SectionHeader,\n SelectableItem,\n PaletteItem,\n Timeline,\n TreeItem,\n TreeView,\n} as const satisfies ZoraComponentRegistry;\n\nexport const ZORA_COMPONENT_REGISTRY: ZoraComponentRegistry = _ZORA_COMPONENT_REGISTRY;\n"]}
|
|
1
|
+
{"version":3,"file":"ZORA_COMPONENT_REGISTRY.js","sourceRoot":"","sources":["../../../src/features/registry/ZORA_COMPONENT_REGISTRY.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AA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ACP,IAAI;IACJ,UAAU;IACV,KAAK;IACL,oBAAoB;IACpB,SAAS;IACT,SAAS;IACT,UAAU;IACV,UAAU;IACV,WAAW;IACX,QAAQ;IACR,YAAY;IACZ,KAAK;IACL,UAAU;IACV,MAAM;IACN,WAAW;IACX,MAAM;IACN,MAAM;IACN,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,GAAG;IACH,OAAO;IACP,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,UAAU;IACV,KAAK;IACL,OAAO;IACP,QAAQ;IACR,WAAW;IACX,QAAQ;IACR,WAAW;IACX,UAAU;IACV,IAAI;IACJ,eAAe;IACf,OAAO;IACP,IAAI;IACJ,OAAO;IACP,QAAQ;IACR,MAAM;IACN,aAAa;IACb,kBAAkB;IAClB,mBAAmB;IACnB,iBAAiB;IACjB,OAAO;IACP,UAAU;IACV,UAAU;IACV,YAAY;IACZ,UAAU;IACV,gBAAgB;IAChB,WAAW;IACX,UAAU;IACV,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,WAAW;IACX,aAAa;IACb,WAAW;IACX,cAAc;IACd,QAAQ;IACR,WAAW;IACX,aAAa;IACb,kBAAkB;IAClB,oBAAoB;IACpB,WAAW;IACX,aAAa;IACb,cAAc;IACd,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,aAAa;IACb,kBAAkB;IAClB,QAAQ;IACR,QAAQ;IACR,QAAQ;CACgC,CAAC;AAE3C,MAAM,CAAC,MAAM,uBAAuB,GAA0B,wBAAwB,CAAC","sourcesContent":["import type { InteractionPolicyProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraComponentRegistry } from '../../types/registry';\nimport { Accordion, AccordionItem } from '../accordion/public';\nimport { ActivityIndicator } from '../activity-indicator/public';\nimport { AppBar } from '../app-bar/public';\nimport {\n ForgotPasswordForm,\n OAuthProviderButton,\n OAuthProviderList,\n OtpForm,\n SignInForm,\n SignUpForm,\n} from '../auth/public';\nimport { Avatar, AvatarGroup } from '../avatar/public';\nimport { Badge } from '../badge/public';\nimport { BottomSheet } from '../bottom-sheet/public';\nimport { Breadcrumbs } from '../breadcrumbs/public';\nimport { Button, ButtonGroup, IconButton } from '../button/public';\nimport { Card, MediaCard, MetricCard, PostCard, ProductCard } from '../card/public';\nimport { ChatListItem, MessageBubble } from '../chat/public';\nimport { ChessBoard, OpeningBook } from '../chess/public';\nimport { Chip, ChipGroup } from '../chip/public';\nimport { CollectionEditor } from '../collection-editor/public';\nimport { ContentRail } from '../content-rail/public';\nimport { DataTable } from '../data-table/public';\nimport { DatePicker } from '../date-picker/public';\nimport { Dialog } from '../dialog/public';\nimport { EmptyState } from '../empty-state/public';\nimport { Checkbox, CheckboxGroup } from '../form/checkbox/public';\nimport { Field, Form, FormActions, FormError } from '../form/public';\nimport { Radio, RadioGroup } from '../form/radio/public';\nimport { SearchInput } from '../form/search-input/public';\nimport { Select } from '../form/select/public';\nimport { Switch } from '../form/switch/public';\nimport { TextInput } from '../form/text-input/public';\nimport {\n Game,\n GameEntity,\n GameField,\n GameInputZone,\n GameMeasurementProbe,\n GameOverlay,\n} from '../game/public';\nimport { Gradient } from '../gradient/public';\nimport { Hero } from '../hero/public';\nimport { Icon } from '../icon/public';\nimport { Image } from '../image/public';\nimport { KeyboardAvoidingView } from '../keyboard-avoiding-view/public';\nimport { AppShell, Divider, Grid, Screen, ScrollView, View } from '../layout/public';\nimport { FlatList, List, ListItem, ListSection, SectionList } from '../list/public';\nimport { MissingElement } from '../missing-element/public';\nimport { Pagination } from '../pagination/public';\nimport { PaletteItem } from '../palette-item/public';\nimport { PopoverMenu } from '../popover-menu/public';\nimport { Progress, ProgressRing } from '../progress/public';\nimport { Rating } from '../rating/public';\nimport { ReaderSurface } from '../reader/public';\nimport { BarcodeScannerView, CameraPermissionView, ScanOverlay } from '../scanner/public';\nimport { ScreenSection, SectionHeader } from '../section/public';\nimport { SelectableItem } from '../selection/public';\nimport { Skeleton, SkeletonCard, SkeletonList, SkeletonText } from '../skeleton/public';\nimport { Surface } from '../surface/public';\nimport {\n CardBack,\n CardHand,\n PlayingCard,\n PokerTrainingTable,\n TabletopTable,\n} from '../tabletop/public';\nimport { Tab, TabList, TabPanel, Tabs } from '../tabs/public';\nimport { ThemeModeToggle } from '../theme/adapters/inbound/ThemeModeToggle';\nimport { TimePicker } from '../time-picker/public';\nimport { Timeline } from '../timeline/public';\nimport { Toast } from '../toast/public';\nimport { Toolbar } from '../toolbar/public';\nimport { TreeItem, TreeView } from '../tree-view/public';\nimport { Heading, Text } from '../typography/public';\nimport { Uploader } from '../uploader/public';\n\ntype ComponentPropsFor<K extends keyof typeof _ZORA_COMPONENT_REGISTRY> = React.ComponentProps<\n (typeof _ZORA_COMPONENT_REGISTRY)[K]\n>;\n\ntype AcceptsSurfaceInteractionPolicyProps<P> = 'interactionPolicy' extends keyof P\n ? InteractionPolicyProps extends Pick<P, 'interactionPolicy'>\n ? Pick<P, 'interactionPolicy'> extends InteractionPolicyProps\n ? true\n : false\n : false\n : false;\n\ntype RegistryInteractionPolicyContract = {\n [K in keyof typeof _ZORA_COMPONENT_REGISTRY]: AcceptsSurfaceInteractionPolicyProps<\n ComponentPropsFor<K>\n >;\n};\n\ntype _AssertTrue<T extends true> = T;\ntype _RegistryInteractionPolicyCheck = _AssertTrue<\n RegistryInteractionPolicyContract[keyof typeof _ZORA_COMPONENT_REGISTRY]\n>;\n\nconst _ZORA_COMPONENT_REGISTRY = {\n Accordion,\n AccordionItem,\n ActivityIndicator,\n AppBar,\n Avatar,\n AvatarGroup,\n Badge,\n Breadcrumbs,\n Button,\n ButtonGroup,\n Card,\n Checkbox,\n CheckboxGroup,\n Chip,\n ChipGroup,\n DataTable,\n DatePicker,\n Dialog,\n Form,\n FormActions,\n FormError,\n Field,\n Gradient,\n Game,\n GameEntity,\n GameField,\n GameInputZone,\n GameMeasurementProbe,\n GameOverlay,\n Heading,\n Icon,\n IconButton,\n Image,\n KeyboardAvoidingView,\n TextInput,\n MediaCard,\n MetricCard,\n Pagination,\n PopoverMenu,\n Progress,\n ProgressRing,\n Radio,\n RadioGroup,\n Rating,\n SearchInput,\n Select,\n Switch,\n Skeleton,\n SkeletonCard,\n SkeletonList,\n SkeletonText,\n Tab,\n TabList,\n TabPanel,\n Tabs,\n Text,\n TimePicker,\n Toast,\n Toolbar,\n Uploader,\n BottomSheet,\n FlatList,\n SectionList,\n ScrollView,\n View,\n ThemeModeToggle,\n Divider,\n Grid,\n Surface,\n AppShell,\n Screen,\n ScreenSection,\n ForgotPasswordForm,\n OAuthProviderButton,\n OAuthProviderList,\n OtpForm,\n SignInForm,\n SignUpForm,\n ChatListItem,\n ChessBoard,\n CollectionEditor,\n ContentRail,\n EmptyState,\n Hero,\n List,\n ListItem,\n ListSection,\n MessageBubble,\n OpeningBook,\n MissingElement,\n PostCard,\n ProductCard,\n ReaderSurface,\n BarcodeScannerView,\n CameraPermissionView,\n ScanOverlay,\n SectionHeader,\n SelectableItem,\n PaletteItem,\n CardBack,\n CardHand,\n PlayingCard,\n TabletopTable,\n PokerTrainingTable,\n Timeline,\n TreeItem,\n TreeView,\n} as const satisfies ZoraComponentRegistry;\n\nexport const ZORA_COMPONENT_REGISTRY: ZoraComponentRegistry = _ZORA_COMPONENT_REGISTRY;\n"]}
|
|
@@ -2,7 +2,7 @@ export declare const screenSectionMeta: {
|
|
|
2
2
|
readonly name: "ScreenSection";
|
|
3
3
|
readonly category: "layout";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement", "ChessBoard", "OpeningBook", "Game", "GameField", "TabletopTable", "PokerTrainingTable"];
|
|
6
6
|
readonly blueprint: {
|
|
7
7
|
readonly label: "Screen section";
|
|
8
8
|
readonly defaultProps: {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CardBackProps } from '../../../../types/tabletop';
|
|
3
|
+
/*** Renders a face-down card with a non-revealing accessible label. */
|
|
4
|
+
export declare const CardBack: (props: CardBackProps) => React.ReactElement | null;
|
|
5
|
+
//# sourceMappingURL=CardBack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardBack.d.ts","sourceRoot":"","sources":["../../../../../src/features/tabletop/adapters/inbound/CardBack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAMhE,uEAAuE;AACvE,eAAO,MAAM,QAAQ,qDAAoC,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';
|
|
4
|
+
import { useZoraTheme } from '../../../theme/composition/useZoraTheme';
|
|
5
|
+
import { createTabletopColorScheme } from '../../utils/createTabletopColorScheme';
|
|
6
|
+
import { getTabletopCardDimensions } from '../../utils/getTabletopCardDimensions';
|
|
7
|
+
/*** Renders a face-down card with a non-revealing accessible label. */
|
|
8
|
+
export const CardBack = withZoraThemeScope(CardBackInner);
|
|
9
|
+
/*** Renders the card back using the active ZORA theme. */
|
|
10
|
+
function CardBackInner({ size = 'medium', muted = false, accessibilityLabel, colorScheme, testID, }) {
|
|
11
|
+
const { theme } = useZoraTheme();
|
|
12
|
+
const colors = React.useMemo(() => createTabletopColorScheme(theme, colorScheme), [colorScheme, theme]);
|
|
13
|
+
const dimensions = getTabletopCardDimensions(size);
|
|
14
|
+
return (<View accessibilityLabel={accessibilityLabel ?? 'Hidden card'} accessibilityRole="image" style={[
|
|
15
|
+
styles.card,
|
|
16
|
+
{
|
|
17
|
+
backgroundColor: colors.cardBack,
|
|
18
|
+
borderColor: colors.cardBackBorder,
|
|
19
|
+
borderRadius: dimensions.radius,
|
|
20
|
+
height: dimensions.height,
|
|
21
|
+
opacity: muted ? 0.48 : 1,
|
|
22
|
+
width: dimensions.width,
|
|
23
|
+
},
|
|
24
|
+
]} testID={testID}>
|
|
25
|
+
<View style={[
|
|
26
|
+
styles.inner,
|
|
27
|
+
{
|
|
28
|
+
borderColor: colors.cardBackBorder,
|
|
29
|
+
borderRadius: Math.max(2, dimensions.radius - 3),
|
|
30
|
+
},
|
|
31
|
+
]}/>
|
|
32
|
+
</View>);
|
|
33
|
+
}
|
|
34
|
+
const styles = StyleSheet.create({
|
|
35
|
+
card: {
|
|
36
|
+
alignItems: 'center',
|
|
37
|
+
borderWidth: 1,
|
|
38
|
+
justifyContent: 'center',
|
|
39
|
+
},
|
|
40
|
+
inner: {
|
|
41
|
+
borderWidth: 1,
|
|
42
|
+
height: '68%',
|
|
43
|
+
opacity: 0.48,
|
|
44
|
+
width: '68%',
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=CardBack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardBack.js","sourceRoot":"","sources":["../../../../../src/features/tabletop/adapters/inbound/CardBack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAElF,uEAAuE;AACvE,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC;AAE1D,0DAA0D;AAC1D,SAAS,aAAa,CAAC,EACrB,IAAI,GAAG,QAAQ,EACf,KAAK,GAAG,KAAK,EACb,kBAAkB,EAClB,WAAW,EACX,MAAM,GACQ;IACd,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,CAAC;IACjC,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAC1B,GAAG,EAAE,CAAC,yBAAyB,CAAC,KAAK,EAAE,WAAW,CAAC,EACnD,CAAC,WAAW,EAAE,KAAK,CAAC,CACrB,CAAC;IACF,MAAM,UAAU,GAAG,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAEnD,OAAO,CACL,CAAC,IAAI,CACH,kBAAkB,CAAC,CAAC,kBAAkB,IAAI,aAAa,CAAC,CACxD,iBAAiB,CAAC,OAAO,CACzB,KAAK,CAAC,CAAC;YACL,MAAM,CAAC,IAAI;YACX;gBACE,eAAe,EAAE,MAAM,CAAC,QAAQ;gBAChC,WAAW,EAAE,MAAM,CAAC,cAAc;gBAClC,YAAY,EAAE,UAAU,CAAC,MAAM;gBAC/B,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBACzB,KAAK,EAAE,UAAU,CAAC,KAAK;aACxB;SACF,CAAC,CACF,MAAM,CAAC,CAAC,MAAM,CAAC,CAEf;MAAA,CAAC,IAAI,CACH,KAAK,CAAC,CAAC;YACL,MAAM,CAAC,KAAK;YACZ;gBACE,WAAW,EAAE,MAAM,CAAC,cAAc;gBAClC,YAAY,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;aACjD;SACF,CAAC,EAEN;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,UAAU,EAAE,QAAQ;QACpB,WAAW,EAAE,CAAC;QACd,cAAc,EAAE,QAAQ;KACzB;IACD,KAAK,EAAE;QACL,WAAW,EAAE,CAAC;QACd,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,KAAK;KACb;CACF,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nimport type { CardBackProps } from '../../../../types/tabletop';\nimport { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';\nimport { useZoraTheme } from '../../../theme/composition/useZoraTheme';\nimport { createTabletopColorScheme } from '../../utils/createTabletopColorScheme';\nimport { getTabletopCardDimensions } from '../../utils/getTabletopCardDimensions';\n\n/*** Renders a face-down card with a non-revealing accessible label. */\nexport const CardBack = withZoraThemeScope(CardBackInner);\n\n/*** Renders the card back using the active ZORA theme. */\nfunction CardBackInner({\n size = 'medium',\n muted = false,\n accessibilityLabel,\n colorScheme,\n testID,\n}: CardBackProps) {\n const { theme } = useZoraTheme();\n const colors = React.useMemo(\n () => createTabletopColorScheme(theme, colorScheme),\n [colorScheme, theme],\n );\n const dimensions = getTabletopCardDimensions(size);\n\n return (\n <View\n accessibilityLabel={accessibilityLabel ?? 'Hidden card'}\n accessibilityRole=\"image\"\n style={[\n styles.card,\n {\n backgroundColor: colors.cardBack,\n borderColor: colors.cardBackBorder,\n borderRadius: dimensions.radius,\n height: dimensions.height,\n opacity: muted ? 0.48 : 1,\n width: dimensions.width,\n },\n ]}\n testID={testID}\n >\n <View\n style={[\n styles.inner,\n {\n borderColor: colors.cardBackBorder,\n borderRadius: Math.max(2, dimensions.radius - 3),\n },\n ]}\n />\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n card: {\n alignItems: 'center',\n borderWidth: 1,\n justifyContent: 'center',\n },\n inner: {\n borderWidth: 1,\n height: '68%',\n opacity: 0.48,\n width: '68%',\n },\n});\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CardHandProps } from '../../../../types/tabletop';
|
|
3
|
+
/*** Renders a compact row of face-up and face-down cards. */
|
|
4
|
+
export declare const CardHand: (props: CardHandProps) => React.ReactElement | null;
|
|
5
|
+
//# sourceMappingURL=CardHand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardHand.d.ts","sourceRoot":"","sources":["../../../../../src/features/tabletop/adapters/inbound/CardHand.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAKhE,6DAA6D;AAC7D,eAAO,MAAM,QAAQ,qDAAoC,CAAC"}
|