@ankhorage/zora 21.0.22 → 21.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +40 -184
- package/dist/features/authoring/allowedChildren.d.ts +5 -2
- package/dist/features/authoring/allowedChildren.d.ts.map +1 -1
- package/dist/features/authoring/allowedChildren.js +13 -2
- package/dist/features/authoring/allowedChildren.js.map +1 -1
- package/dist/features/authoring/componentMeta.d.ts.map +1 -1
- package/dist/features/authoring/componentMeta.js +21 -0
- package/dist/features/authoring/componentMeta.js.map +1 -1
- package/dist/features/authoring/constants.d.ts +3 -0
- package/dist/features/authoring/constants.d.ts.map +1 -1
- package/dist/features/authoring/constants.js +3 -0
- package/dist/features/authoring/constants.js.map +1 -1
- package/dist/features/button/adapters/inbound/Button.d.ts +0 -4
- package/dist/features/button/adapters/inbound/Button.d.ts.map +1 -1
- package/dist/features/button/adapters/inbound/Button.js +0 -4
- package/dist/features/button/adapters/inbound/Button.js.map +1 -1
- package/dist/features/card/adapters/inbound/Card.d.ts +0 -4
- package/dist/features/card/adapters/inbound/Card.d.ts.map +1 -1
- package/dist/features/card/adapters/inbound/Card.js +0 -4
- package/dist/features/card/adapters/inbound/Card.js.map +1 -1
- package/dist/features/card/cardMeta.d.ts +1 -1
- package/dist/features/card/cardMeta.d.ts.map +1 -1
- package/dist/features/card/cardMeta.js +7 -2
- package/dist/features/card/cardMeta.js.map +1 -1
- package/dist/features/chess/adapters/inbound/ChessBoard.d.ts +5 -0
- package/dist/features/chess/adapters/inbound/ChessBoard.d.ts.map +1 -0
- package/dist/features/chess/adapters/inbound/ChessBoard.js +119 -0
- package/dist/features/chess/adapters/inbound/ChessBoard.js.map +1 -0
- package/dist/features/chess/adapters/inbound/OpeningBook.d.ts +5 -0
- package/dist/features/chess/adapters/inbound/OpeningBook.d.ts.map +1 -0
- package/dist/features/chess/adapters/inbound/OpeningBook.js +94 -0
- package/dist/features/chess/adapters/inbound/OpeningBook.js.map +1 -0
- package/dist/features/chess/meta.d.ts +219 -0
- package/dist/features/chess/meta.d.ts.map +1 -0
- package/dist/features/chess/meta.js +165 -0
- package/dist/features/chess/meta.js.map +1 -0
- package/dist/features/chess/public.d.ts +12 -0
- package/dist/features/chess/public.d.ts.map +1 -0
- package/dist/features/chess/public.js +10 -0
- package/dist/features/chess/public.js.map +1 -0
- package/dist/features/chess/utils/chessSquares.d.ts +4 -0
- package/dist/features/chess/utils/chessSquares.d.ts.map +1 -0
- package/dist/features/chess/utils/chessSquares.js +3 -0
- package/dist/features/chess/utils/chessSquares.js.map +1 -0
- package/dist/features/chess/utils/createBoardSquares.d.ts +4 -0
- package/dist/features/chess/utils/createBoardSquares.d.ts.map +1 -0
- package/dist/features/chess/utils/createBoardSquares.js +9 -0
- package/dist/features/chess/utils/createBoardSquares.js.map +1 -0
- package/dist/features/chess/utils/createChessBoardColorScheme.d.ts +35 -0
- package/dist/features/chess/utils/createChessBoardColorScheme.d.ts.map +1 -0
- package/dist/features/chess/utils/createChessBoardColorScheme.js +26 -0
- package/dist/features/chess/utils/createChessBoardColorScheme.js.map +1 -0
- package/dist/features/chess/utils/createOpeningBookColorScheme.d.ts +11 -0
- package/dist/features/chess/utils/createOpeningBookColorScheme.d.ts.map +1 -0
- package/dist/features/chess/utils/createOpeningBookColorScheme.js +21 -0
- package/dist/features/chess/utils/createOpeningBookColorScheme.js.map +1 -0
- package/dist/features/chess/utils/getSquareFile.d.ts +4 -0
- package/dist/features/chess/utils/getSquareFile.d.ts.map +1 -0
- package/dist/features/chess/utils/getSquareFile.js +5 -0
- package/dist/features/chess/utils/getSquareFile.js.map +1 -0
- package/dist/features/chess/utils/getSquareRank.d.ts +4 -0
- package/dist/features/chess/utils/getSquareRank.d.ts.map +1 -0
- package/dist/features/chess/utils/getSquareRank.js +5 -0
- package/dist/features/chess/utils/getSquareRank.js.map +1 -0
- package/dist/features/chess/utils/isLightSquare.d.ts +4 -0
- package/dist/features/chess/utils/isLightSquare.d.ts.map +1 -0
- package/dist/features/chess/utils/isLightSquare.js +6 -0
- package/dist/features/chess/utils/isLightSquare.js.map +1 -0
- package/dist/features/empty-state/adapters/inbound/EmptyState.d.ts +0 -4
- package/dist/features/empty-state/adapters/inbound/EmptyState.d.ts.map +1 -1
- package/dist/features/empty-state/adapters/inbound/EmptyState.js +0 -4
- package/dist/features/empty-state/adapters/inbound/EmptyState.js.map +1 -1
- package/dist/features/form/text-input/adapters/inbound/TextInput.d.ts +0 -4
- package/dist/features/form/text-input/adapters/inbound/TextInput.d.ts.map +1 -1
- package/dist/features/form/text-input/adapters/inbound/TextInput.js +0 -4
- package/dist/features/form/text-input/adapters/inbound/TextInput.js.map +1 -1
- package/dist/features/game/adapters/inbound/Game.d.ts +5 -0
- package/dist/features/game/adapters/inbound/Game.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/Game.js +24 -0
- package/dist/features/game/adapters/inbound/Game.js.map +1 -0
- package/dist/features/game/adapters/inbound/GameEntity.d.ts +5 -0
- package/dist/features/game/adapters/inbound/GameEntity.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/GameEntity.js +29 -0
- package/dist/features/game/adapters/inbound/GameEntity.js.map +1 -0
- package/dist/features/game/adapters/inbound/GameField.d.ts +4 -0
- package/dist/features/game/adapters/inbound/GameField.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/GameField.js +32 -0
- package/dist/features/game/adapters/inbound/GameField.js.map +1 -0
- package/dist/features/game/adapters/inbound/GameInputZone.d.ts +4 -0
- package/dist/features/game/adapters/inbound/GameInputZone.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/GameInputZone.js +50 -0
- package/dist/features/game/adapters/inbound/GameInputZone.js.map +1 -0
- package/dist/features/game/adapters/inbound/GameMeasurementProbe.d.ts +4 -0
- package/dist/features/game/adapters/inbound/GameMeasurementProbe.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/GameMeasurementProbe.js +54 -0
- package/dist/features/game/adapters/inbound/GameMeasurementProbe.js.map +1 -0
- package/dist/features/game/adapters/inbound/GameOverlay.d.ts +4 -0
- package/dist/features/game/adapters/inbound/GameOverlay.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/GameOverlay.js +39 -0
- package/dist/features/game/adapters/inbound/GameOverlay.js.map +1 -0
- package/dist/features/game/adapters/inbound/createGameKeyboardEvent.d.ts +16 -0
- package/dist/features/game/adapters/inbound/createGameKeyboardEvent.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/createGameKeyboardEvent.js +16 -0
- package/dist/features/game/adapters/inbound/createGameKeyboardEvent.js.map +1 -0
- package/dist/features/game/adapters/inbound/createGameMeasurementEvent.d.ts +14 -0
- package/dist/features/game/adapters/inbound/createGameMeasurementEvent.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/createGameMeasurementEvent.js +25 -0
- package/dist/features/game/adapters/inbound/createGameMeasurementEvent.js.map +1 -0
- package/dist/features/game/adapters/inbound/createGamePointerEvent.d.ts +17 -0
- package/dist/features/game/adapters/inbound/createGamePointerEvent.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/createGamePointerEvent.js +20 -0
- package/dist/features/game/adapters/inbound/createGamePointerEvent.js.map +1 -0
- package/dist/features/game/adapters/inbound/measureGameEntity.d.ts +5 -0
- package/dist/features/game/adapters/inbound/measureGameEntity.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/measureGameEntity.js +22 -0
- package/dist/features/game/adapters/inbound/measureGameEntity.js.map +1 -0
- package/dist/features/game/adapters/inbound/useGameInputZoneResponder.d.ts +15 -0
- package/dist/features/game/adapters/inbound/useGameInputZoneResponder.d.ts.map +1 -0
- package/dist/features/game/adapters/inbound/useGameInputZoneResponder.js +67 -0
- package/dist/features/game/adapters/inbound/useGameInputZoneResponder.js.map +1 -0
- package/dist/features/game/composition/GameRuntimeContext.d.ts +5 -0
- package/dist/features/game/composition/GameRuntimeContext.d.ts.map +1 -0
- package/dist/features/game/composition/GameRuntimeContext.js +4 -0
- package/dist/features/game/composition/GameRuntimeContext.js.map +1 -0
- package/dist/features/game/composition/createGameBindingContext.d.ts +4 -0
- package/dist/features/game/composition/createGameBindingContext.d.ts.map +1 -0
- package/dist/features/game/composition/createGameBindingContext.js +10 -0
- package/dist/features/game/composition/createGameBindingContext.js.map +1 -0
- package/dist/features/game/composition/createGameMeasurementRegistry.d.ts +4 -0
- package/dist/features/game/composition/createGameMeasurementRegistry.d.ts.map +1 -0
- package/dist/features/game/composition/createGameMeasurementRegistry.js +15 -0
- package/dist/features/game/composition/createGameMeasurementRegistry.js.map +1 -0
- package/dist/features/game/composition/useGameRuntime.d.ts +5 -0
- package/dist/features/game/composition/useGameRuntime.d.ts.map +1 -0
- package/dist/features/game/composition/useGameRuntime.js +117 -0
- package/dist/features/game/composition/useGameRuntime.js.map +1 -0
- package/dist/features/game/composition/useGameScheduledEffects.d.ts +17 -0
- package/dist/features/game/composition/useGameScheduledEffects.d.ts.map +1 -0
- package/dist/features/game/composition/useGameScheduledEffects.js +40 -0
- package/dist/features/game/composition/useGameScheduledEffects.js.map +1 -0
- package/dist/features/game/meta/gameEntityMeta.d.ts +403 -0
- package/dist/features/game/meta/gameEntityMeta.d.ts.map +1 -0
- package/dist/features/game/meta/gameEntityMeta.js +224 -0
- package/dist/features/game/meta/gameEntityMeta.js.map +1 -0
- package/dist/features/game/meta/gameFieldMeta.d.ts +61 -0
- package/dist/features/game/meta/gameFieldMeta.d.ts.map +1 -0
- package/dist/features/game/meta/gameFieldMeta.js +48 -0
- package/dist/features/game/meta/gameFieldMeta.js.map +1 -0
- package/dist/features/game/meta/gameInputZoneMeta.d.ts +163 -0
- package/dist/features/game/meta/gameInputZoneMeta.d.ts.map +1 -0
- package/dist/features/game/meta/gameInputZoneMeta.js +138 -0
- package/dist/features/game/meta/gameInputZoneMeta.js.map +1 -0
- package/dist/features/game/meta/gameMeasurementProbeMeta.d.ts +112 -0
- package/dist/features/game/meta/gameMeasurementProbeMeta.d.ts.map +1 -0
- package/dist/features/game/meta/gameMeasurementProbeMeta.js +70 -0
- package/dist/features/game/meta/gameMeasurementProbeMeta.js.map +1 -0
- package/dist/features/game/meta/gameMeta.d.ts +130 -0
- package/dist/features/game/meta/gameMeta.d.ts.map +1 -0
- package/dist/features/game/meta/gameMeta.js +113 -0
- package/dist/features/game/meta/gameMeta.js.map +1 -0
- package/dist/features/game/meta/gameOverlayMeta.d.ts +55 -0
- package/dist/features/game/meta/gameOverlayMeta.d.ts.map +1 -0
- package/dist/features/game/meta/gameOverlayMeta.js +65 -0
- package/dist/features/game/meta/gameOverlayMeta.js.map +1 -0
- package/dist/features/game/public.d.ts +8 -0
- package/dist/features/game/public.d.ts.map +1 -0
- package/dist/features/game/public.js +7 -0
- package/dist/features/game/public.js.map +1 -0
- package/dist/features/game/utils/clampGamePercentage.d.ts +3 -0
- package/dist/features/game/utils/clampGamePercentage.d.ts.map +1 -0
- package/dist/features/game/utils/clampGamePercentage.js +5 -0
- package/dist/features/game/utils/clampGamePercentage.js.map +1 -0
- package/dist/features/game/utils/resolveGameEntityMotionPlan.d.ts +15 -0
- package/dist/features/game/utils/resolveGameEntityMotionPlan.d.ts.map +1 -0
- package/dist/features/game/utils/resolveGameEntityMotionPlan.js +31 -0
- package/dist/features/game/utils/resolveGameEntityMotionPlan.js.map +1 -0
- package/dist/features/game/utils/toGamePercentage.d.ts +3 -0
- package/dist/features/game/utils/toGamePercentage.d.ts.map +1 -0
- package/dist/features/game/utils/toGamePercentage.js +6 -0
- package/dist/features/game/utils/toGamePercentage.js.map +1 -0
- package/dist/features/game/utils/useAnimatedGameEntityValue.d.ts +5 -0
- package/dist/features/game/utils/useAnimatedGameEntityValue.d.ts.map +1 -0
- package/dist/features/game/utils/useAnimatedGameEntityValue.js +33 -0
- package/dist/features/game/utils/useAnimatedGameEntityValue.js.map +1 -0
- package/dist/features/game/utils/useGameEntityAnimatedStyle.d.ts +16 -0
- package/dist/features/game/utils/useGameEntityAnimatedStyle.d.ts.map +1 -0
- package/dist/features/game/utils/useGameEntityAnimatedStyle.js +52 -0
- package/dist/features/game/utils/useGameEntityAnimatedStyle.js.map +1 -0
- package/dist/features/game/utils/useGameEntityMeasurement.d.ts +5 -0
- package/dist/features/game/utils/useGameEntityMeasurement.d.ts.map +1 -0
- package/dist/features/game/utils/useGameEntityMeasurement.js +14 -0
- package/dist/features/game/utils/useGameEntityMeasurement.js.map +1 -0
- package/dist/features/game/utils/useGameEntityMotionProgress.d.ts +5 -0
- package/dist/features/game/utils/useGameEntityMotionProgress.d.ts.map +1 -0
- package/dist/features/game/utils/useGameEntityMotionProgress.js +87 -0
- package/dist/features/game/utils/useGameEntityMotionProgress.js.map +1 -0
- package/dist/features/game/utils/useGameReducedMotion.d.ts +3 -0
- package/dist/features/game/utils/useGameReducedMotion.d.ts.map +1 -0
- package/dist/features/game/utils/useGameReducedMotion.js +13 -0
- package/dist/features/game/utils/useGameReducedMotion.js.map +1 -0
- package/dist/features/graph-view/adapters/inbound/web-artifact/GraphView.d.ts +5 -5
- package/dist/features/graph-view/adapters/inbound/web-artifact/GraphView.js +5 -5
- package/dist/features/graph-view/adapters/inbound/web-artifact/GraphView.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/compactGraphSpacing.d.ts +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/compactGraphSpacing.js +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/compactGraphSpacing.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphController.js +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphController.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphLoopSizer.d.ts +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphLoopSizer.js +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphLoopSizer.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.js +7 -7
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphGeometryKey.d.ts +0 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphGeometryKey.d.ts.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphGeometryKey.js +0 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphGeometryKey.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphTopologyKey.d.ts +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphTopologyKey.js +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphTopologyKey.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/hasGraphLayoutChanged.d.ts +0 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/hasGraphLayoutChanged.d.ts.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/hasGraphLayoutChanged.js +0 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/hasGraphLayoutChanged.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/runDetachedGraphLayout.d.ts +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/runDetachedGraphLayout.js +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/runDetachedGraphLayout.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/sizeGraphNodesToLabels.d.ts +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/sizeGraphNodesToLabels.js +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/sizeGraphNodesToLabels.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/syncGraphElements.d.ts +0 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/syncGraphElements.d.ts.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/syncGraphElements.js +0 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/syncGraphElements.js.map +1 -1
- package/dist/features/layout/gridMeta.d.ts +1 -1
- package/dist/features/layout/gridMeta.d.ts.map +1 -1
- package/dist/features/layout/gridMeta.js +7 -2
- package/dist/features/layout/gridMeta.js.map +1 -1
- package/dist/features/layout/screenMeta.d.ts +1 -1
- package/dist/features/layout/viewMeta.d.ts +1 -1
- package/dist/features/layout/viewMeta.d.ts.map +1 -1
- package/dist/features/layout/viewMeta.js +6 -2
- package/dist/features/layout/viewMeta.js.map +1 -1
- package/dist/features/registry/ZORA_COMPONENT_REGISTRY.d.ts.map +1 -1
- package/dist/features/registry/ZORA_COMPONENT_REGISTRY.js +16 -0
- package/dist/features/registry/ZORA_COMPONENT_REGISTRY.js.map +1 -1
- package/dist/features/section/screenSectionMeta.d.ts +1 -1
- package/dist/features/tabletop/adapters/inbound/CardBack.d.ts +5 -0
- package/dist/features/tabletop/adapters/inbound/CardBack.d.ts.map +1 -0
- package/dist/features/tabletop/adapters/inbound/CardBack.js +47 -0
- package/dist/features/tabletop/adapters/inbound/CardBack.js.map +1 -0
- package/dist/features/tabletop/adapters/inbound/CardHand.d.ts +5 -0
- package/dist/features/tabletop/adapters/inbound/CardHand.d.ts.map +1 -0
- package/dist/features/tabletop/adapters/inbound/CardHand.js +28 -0
- package/dist/features/tabletop/adapters/inbound/CardHand.js.map +1 -0
- package/dist/features/tabletop/adapters/inbound/PlayingCard.d.ts +5 -0
- package/dist/features/tabletop/adapters/inbound/PlayingCard.d.ts.map +1 -0
- package/dist/features/tabletop/adapters/inbound/PlayingCard.js +64 -0
- package/dist/features/tabletop/adapters/inbound/PlayingCard.js.map +1 -0
- package/dist/features/tabletop/adapters/inbound/PokerTrainingTable.d.ts +5 -0
- package/dist/features/tabletop/adapters/inbound/PokerTrainingTable.d.ts.map +1 -0
- package/dist/features/tabletop/adapters/inbound/PokerTrainingTable.js +12 -0
- package/dist/features/tabletop/adapters/inbound/PokerTrainingTable.js.map +1 -0
- package/dist/features/tabletop/adapters/inbound/TabletopTable.d.ts +5 -0
- package/dist/features/tabletop/adapters/inbound/TabletopTable.d.ts.map +1 -0
- package/dist/features/tabletop/adapters/inbound/TabletopTable.js +206 -0
- package/dist/features/tabletop/adapters/inbound/TabletopTable.js.map +1 -0
- package/dist/features/tabletop/meta.d.ts +353 -0
- package/dist/features/tabletop/meta.d.ts.map +1 -0
- package/dist/features/tabletop/meta.js +252 -0
- package/dist/features/tabletop/meta.js.map +1 -0
- package/dist/features/tabletop/public.d.ts +10 -0
- package/dist/features/tabletop/public.d.ts.map +1 -0
- package/dist/features/tabletop/public.js +9 -0
- package/dist/features/tabletop/public.js.map +1 -0
- package/dist/features/tabletop/utils/createPokerTrainingTableState.d.ts +13 -0
- package/dist/features/tabletop/utils/createPokerTrainingTableState.d.ts.map +1 -0
- package/dist/features/tabletop/utils/createPokerTrainingTableState.js +112 -0
- package/dist/features/tabletop/utils/createPokerTrainingTableState.js.map +1 -0
- package/dist/features/tabletop/utils/createTabletopColorScheme.d.ts +36 -0
- package/dist/features/tabletop/utils/createTabletopColorScheme.d.ts.map +1 -0
- package/dist/features/tabletop/utils/createTabletopColorScheme.js +144 -0
- package/dist/features/tabletop/utils/createTabletopColorScheme.js.map +1 -0
- package/dist/features/tabletop/utils/createTabletopGameSeats.d.ts +13 -0
- package/dist/features/tabletop/utils/createTabletopGameSeats.d.ts.map +1 -0
- package/dist/features/tabletop/utils/createTabletopGameSeats.js +22 -0
- package/dist/features/tabletop/utils/createTabletopGameSeats.js.map +1 -0
- package/dist/features/tabletop/utils/getPlayingCardLabel.d.ts +4 -0
- package/dist/features/tabletop/utils/getPlayingCardLabel.d.ts.map +1 -0
- package/dist/features/tabletop/utils/getPlayingCardLabel.js +6 -0
- package/dist/features/tabletop/utils/getPlayingCardLabel.js.map +1 -0
- package/dist/features/tabletop/utils/getTabletopCardDimensions.d.ts +12 -0
- package/dist/features/tabletop/utils/getTabletopCardDimensions.d.ts.map +1 -0
- package/dist/features/tabletop/utils/getTabletopCardDimensions.js +35 -0
- package/dist/features/tabletop/utils/getTabletopCardDimensions.js.map +1 -0
- package/dist/features/tabletop/utils/getTabletopSeatPosition.d.ts +9 -0
- package/dist/features/tabletop/utils/getTabletopSeatPosition.d.ts.map +1 -0
- package/dist/features/tabletop/utils/getTabletopSeatPosition.js +88 -0
- package/dist/features/tabletop/utils/getTabletopSeatPosition.js.map +1 -0
- package/dist/features/tree-view/adapters/inbound/TreeView.d.ts +1 -1
- package/dist/features/tree-view/adapters/inbound/TreeView.js +1 -1
- package/dist/features/tree-view/adapters/inbound/TreeView.js.map +1 -1
- package/dist/features/tree-view/adapters/inbound/web-artifact/TreeView.d.ts +1 -1
- package/dist/features/tree-view/adapters/inbound/web-artifact/TreeView.js +1 -1
- package/dist/features/tree-view/adapters/inbound/web-artifact/TreeView.js.map +1 -1
- package/dist/features/typography/adapters/inbound/Heading.d.ts +0 -4
- package/dist/features/typography/adapters/inbound/Heading.d.ts.map +1 -1
- package/dist/features/typography/adapters/inbound/Heading.js +0 -4
- package/dist/features/typography/adapters/inbound/Heading.js.map +1 -1
- package/dist/features/typography/adapters/inbound/Text.d.ts +0 -4
- package/dist/features/typography/adapters/inbound/Text.d.ts.map +1 -1
- package/dist/features/typography/adapters/inbound/Text.js +0 -4
- package/dist/features/typography/adapters/inbound/Text.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/types/chess.d.ts +83 -0
- package/dist/types/chess.d.ts.map +1 -0
- package/dist/types/chess.js +2 -0
- package/dist/types/chess.js.map +1 -0
- package/dist/types/gamePresentation.d.ts +94 -0
- package/dist/types/gamePresentation.d.ts.map +1 -0
- package/dist/types/gamePresentation.js +2 -0
- package/dist/types/gamePresentation.js.map +1 -0
- package/dist/types/gameRuntime.d.ts +29 -0
- package/dist/types/gameRuntime.d.ts.map +1 -0
- package/dist/types/gameRuntime.js +2 -0
- package/dist/types/gameRuntime.js.map +1 -0
- package/dist/types/tabletop.d.ts +129 -0
- package/dist/types/tabletop.d.ts.map +1 -0
- package/dist/types/tabletop.js +2 -0
- package/dist/types/tabletop.js.map +1 -0
- package/package.json +6 -7
- package/src/features/authoring/allowedChildren.ts +15 -2
- package/src/features/authoring/componentMeta.test.ts +93 -0
- package/src/features/authoring/componentMeta.ts +27 -0
- package/src/features/authoring/constants.ts +3 -0
- package/src/features/button/adapters/inbound/Button.tsx +0 -4
- package/src/features/card/adapters/inbound/Card.tsx +0 -4
- package/src/features/card/cardMeta.ts +12 -2
- package/src/features/chess/adapters/inbound/ChessBoard.tsx +169 -0
- package/src/features/chess/adapters/inbound/OpeningBook.tsx +131 -0
- package/src/features/chess/meta.ts +168 -0
- package/src/features/chess/public.test.tsx +165 -0
- package/src/features/chess/public.ts +27 -0
- package/src/features/chess/utils/chessSquares.ts +6 -0
- package/src/features/chess/utils/createBoardSquares.ts +13 -0
- package/src/features/chess/utils/createChessBoardColorScheme.ts +55 -0
- package/src/features/chess/utils/createOpeningBookColorScheme.ts +26 -0
- package/src/features/chess/utils/getSquareFile.ts +6 -0
- package/src/features/chess/utils/getSquareRank.ts +6 -0
- package/src/features/chess/utils/isLightSquare.ts +8 -0
- package/src/features/chessTabletopOwnership.test.ts +71 -0
- package/src/features/empty-state/adapters/inbound/EmptyState.tsx +0 -4
- package/src/features/form/text-input/adapters/inbound/TextInput.tsx +0 -4
- package/src/features/game/adapters/inbound/Game.tsx +43 -0
- package/src/features/game/adapters/inbound/GameEntity.tsx +44 -0
- package/src/features/game/adapters/inbound/GameField.tsx +52 -0
- package/src/features/game/adapters/inbound/GameInputZone.tsx +99 -0
- package/src/features/game/adapters/inbound/GameMeasurementProbe.tsx +83 -0
- package/src/features/game/adapters/inbound/GameOverlay.tsx +58 -0
- package/src/features/game/adapters/inbound/createGameKeyboardEvent.test.ts +51 -0
- package/src/features/game/adapters/inbound/createGameKeyboardEvent.ts +33 -0
- package/src/features/game/adapters/inbound/createGameMeasurementEvent.test.ts +56 -0
- package/src/features/game/adapters/inbound/createGameMeasurementEvent.ts +38 -0
- package/src/features/game/adapters/inbound/createGamePointerEvent.test.ts +56 -0
- package/src/features/game/adapters/inbound/createGamePointerEvent.ts +39 -0
- package/src/features/game/adapters/inbound/measureGameEntity.ts +28 -0
- package/src/features/game/adapters/inbound/useGameInputZoneResponder.ts +85 -0
- package/src/features/game/composition/GameRuntimeContext.ts +6 -0
- package/src/features/game/composition/createGameBindingContext.test.ts +66 -0
- package/src/features/game/composition/createGameBindingContext.ts +11 -0
- package/src/features/game/composition/createGameMeasurementRegistry.test.ts +35 -0
- package/src/features/game/composition/createGameMeasurementRegistry.ts +16 -0
- package/src/features/game/composition/useGameRuntime.test.tsx +173 -0
- package/src/features/game/composition/useGameRuntime.ts +200 -0
- package/src/features/game/composition/useGameScheduledEffects.ts +85 -0
- package/src/features/game/meta/gameEntityMeta.ts +226 -0
- package/src/features/game/meta/gameFieldMeta.ts +49 -0
- package/src/features/game/meta/gameInputZoneMeta.ts +140 -0
- package/src/features/game/meta/gameMeasurementProbeMeta.ts +72 -0
- package/src/features/game/meta/gameMeta.ts +115 -0
- package/src/features/game/meta/gameOverlayMeta.ts +66 -0
- package/src/features/game/public.test.tsx +64 -0
- package/src/features/game/public.ts +19 -0
- package/src/features/game/utils/clampGamePercentage.ts +4 -0
- package/src/features/game/utils/resolveGameEntityMotionPlan.test.ts +63 -0
- package/src/features/game/utils/resolveGameEntityMotionPlan.ts +53 -0
- package/src/features/game/utils/toGamePercentage.ts +6 -0
- package/src/features/game/utils/useAnimatedGameEntityValue.ts +41 -0
- package/src/features/game/utils/useGameEntityAnimatedStyle.ts +87 -0
- package/src/features/game/utils/useGameEntityMeasurement.ts +19 -0
- package/src/features/game/utils/useGameEntityMotionProgress.ts +114 -0
- package/src/features/game/utils/useGameReducedMotion.ts +15 -0
- package/src/features/graph-view/adapters/inbound/web-artifact/GraphView.tsx +5 -5
- package/src/features/graph-view/adapters/inbound/web-artifact/compactGraphSpacing.ts +1 -1
- package/src/features/graph-view/adapters/inbound/web-artifact/createGraphController.ts +1 -1
- package/src/features/graph-view/adapters/inbound/web-artifact/createGraphLoopSizer.ts +1 -1
- package/src/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.ts +7 -7
- package/src/features/graph-view/adapters/inbound/web-artifact/getGraphGeometryKey.ts +0 -1
- package/src/features/graph-view/adapters/inbound/web-artifact/getGraphTopologyKey.ts +1 -1
- package/src/features/graph-view/adapters/inbound/web-artifact/hasGraphLayoutChanged.ts +0 -1
- package/src/features/graph-view/adapters/inbound/web-artifact/runDetachedGraphLayout.ts +1 -1
- package/src/features/graph-view/adapters/inbound/web-artifact/sizeGraphNodesToLabels.ts +1 -1
- package/src/features/graph-view/adapters/inbound/web-artifact/syncGraphElements.ts +0 -1
- package/src/features/layout/gridMeta.ts +12 -2
- package/src/features/layout/viewMeta.ts +10 -2
- package/src/features/registry/ZORA_COMPONENT_REGISTRY.ts +29 -0
- package/src/features/tabletop/adapters/inbound/CardBack.tsx +70 -0
- package/src/features/tabletop/adapters/inbound/CardHand.tsx +61 -0
- package/src/features/tabletop/adapters/inbound/PlayingCard.tsx +95 -0
- package/src/features/tabletop/adapters/inbound/PokerTrainingTable.tsx +34 -0
- package/src/features/tabletop/adapters/inbound/TabletopTable.tsx +264 -0
- package/src/features/tabletop/meta.ts +254 -0
- package/src/features/tabletop/public.test.tsx +127 -0
- package/src/features/tabletop/public.ts +32 -0
- package/src/features/tabletop/utils/createPokerTrainingTableState.ts +152 -0
- package/src/features/tabletop/utils/createTabletopColorScheme.ts +232 -0
- package/src/features/tabletop/utils/createTabletopGameSeats.ts +31 -0
- package/src/features/tabletop/utils/getPlayingCardLabel.ts +8 -0
- package/src/features/tabletop/utils/getTabletopCardDimensions.ts +45 -0
- package/src/features/tabletop/utils/getTabletopSeatPosition.ts +100 -0
- package/src/features/tree-view/adapters/inbound/TreeView.tsx +1 -1
- package/src/features/tree-view/adapters/inbound/web-artifact/TreeView.tsx +1 -1
- package/src/features/typography/adapters/inbound/Heading.tsx +0 -4
- package/src/features/typography/adapters/inbound/Text.tsx +0 -4
- package/src/index.ts +83 -0
- package/src/types/chess.ts +95 -0
- package/src/types/gamePresentation.ts +103 -0
- package/src/types/gameRuntime.ts +34 -0
- package/src/types/tabletop.ts +131 -0
- package/web-dist/chunks/{Accordion-cscmtcn8.js → Accordion-0txegc16.js} +1 -1
- package/web-dist/chunks/{Accordion-06588rzn.js → Accordion-10xw59gm.js} +1 -1
- package/web-dist/chunks/{Accordion-8kgtg62g.js → Accordion-2zh15wt9.js} +6 -6
- package/web-dist/chunks/{Accordion-pkqj4g3r.js → Accordion-481bknsd.js} +5 -5
- package/web-dist/chunks/{Accordion-grfbz6f2.js → Accordion-4fkjn6r5.js} +1 -1
- package/web-dist/chunks/{Accordion-ftjkdjqs.js → Accordion-4gx45mn0.js} +3 -3
- package/web-dist/chunks/{Accordion-fjnck2tg.js → Accordion-4s69xvqy.js} +6 -6
- package/web-dist/chunks/{Accordion-jh7nxehr.js → Accordion-50jz5nhg.js} +1 -1
- package/web-dist/chunks/{Accordion-t6sdgmbz.js → Accordion-52xke54s.js} +1 -1
- package/web-dist/chunks/{Accordion-far6szrp.js → Accordion-6npzmbgk.js} +5 -5
- package/web-dist/chunks/{Accordion-q7c1ryf2.js → Accordion-6z4npcgf.js} +4 -4
- package/web-dist/chunks/{Accordion-gbba10rg.js → Accordion-8gw5tkfw.js} +6 -6
- package/web-dist/chunks/{Accordion-fmxygyb6.js → Accordion-8qteyww0.js} +4 -4
- package/web-dist/chunks/{Accordion-1pp37dtg.js → Accordion-9h5dx3ck.js} +4 -4
- package/web-dist/chunks/{Accordion-paha5aje.js → Accordion-9mmqf3wr.js} +2 -2
- package/web-dist/chunks/{Accordion-f5swy5bs.js → Accordion-b21zrnzj.js} +1 -1
- package/web-dist/chunks/{Accordion-ars389m1.js → Accordion-b8qd23hr.js} +3 -3
- package/web-dist/chunks/{Accordion-hxfa71g9.js → Accordion-c79y8g44.js} +7 -7
- package/web-dist/chunks/Accordion-ca2csh5r.js +321 -0
- package/web-dist/chunks/{Accordion-49gf1zb8.js → Accordion-cjht9dyv.js} +1 -1
- package/web-dist/chunks/{Accordion-sz21xsf4.js → Accordion-cq6hn45r.js} +1 -1
- package/web-dist/chunks/{Accordion-33rd76r7.js → Accordion-d90g9wcb.js} +8 -8
- package/web-dist/chunks/{Accordion-crx58d5n.js → Accordion-f5jb299b.js} +2 -2
- package/web-dist/chunks/{Accordion-h95wvyn5.js → Accordion-fe6vmbpf.js} +2 -2
- package/web-dist/chunks/{Accordion-jzbq36ec.js → Accordion-fqm027n3.js} +8 -8
- package/web-dist/chunks/{Accordion-0jkm3y3w.js → Accordion-gpccarct.js} +1 -1
- package/web-dist/chunks/{Accordion-v6ykq9hv.js → Accordion-h95h3xdb.js} +10 -10
- package/web-dist/chunks/{Accordion-t3p4ykg7.js → Accordion-j8ab9k8k.js} +8 -8
- package/web-dist/chunks/{Accordion-qpwhmqzd.js → Accordion-k5z591wx.js} +13 -13
- package/web-dist/chunks/{Accordion-rrpej6sv.js → Accordion-kdncjvc7.js} +7 -7
- package/web-dist/chunks/{Accordion-f05a7r28.js → Accordion-ks4a1c6w.js} +5 -5
- package/web-dist/chunks/{Accordion-x0j8b2by.js → Accordion-ma1sfe5z.js} +5 -5
- package/web-dist/chunks/{Accordion-2dws3778.js → Accordion-mhtyce1k.js} +4 -4
- package/web-dist/chunks/{Accordion-1vewf8aa.js → Accordion-n7gtb5ec.js} +2 -2
- package/web-dist/chunks/{Accordion-0psdn97s.js → Accordion-p42mm8rr.js} +1 -1
- package/web-dist/chunks/{Accordion-3404tth9.js → Accordion-panw5f0q.js} +7 -7
- package/web-dist/chunks/{Accordion-4a6wj3ez.js → Accordion-pxq8gfgg.js} +9 -9
- package/web-dist/chunks/{Accordion-xshn7k8f.js → Accordion-qwbshc4s.js} +4 -4
- package/web-dist/chunks/{Accordion-395r3wra.js → Accordion-r51wsmvy.js} +2 -2
- package/web-dist/chunks/Accordion-rt13cqr7.js +830 -0
- package/web-dist/chunks/{Accordion-hz4xaqjf.js → Accordion-s1f9hb5a.js} +9 -9
- package/web-dist/chunks/{Accordion-7ja4mtbz.js → Accordion-sv87mbqa.js} +1 -1
- package/web-dist/chunks/{Accordion-r4c9k9y7.js → Accordion-t4k9egq6.js} +2 -2
- package/web-dist/chunks/{Accordion-96cqeekv.js → Accordion-t64m1kca.js} +5 -5
- package/web-dist/chunks/Accordion-wg31jkvp.js +1559 -0
- package/web-dist/chunks/{Accordion-ch67q4t0.js → Accordion-y9zr4x2x.js} +4 -4
- package/web-dist/chunks/{Accordion-31aeqxak.js → Accordion-ye3k55r7.js} +3 -3
- package/web-dist/chunks/{Accordion-s42wwh6m.js → Accordion-z29agann.js} +6 -6
- package/web-dist/chunks/{Accordion-f1h2f05v.js → Accordion-ze26effy.js} +5 -5
- package/web-dist/chunks/{Accordion-tx78txec.js → Accordion-zqzcagxz.js} +5 -5
- package/web-dist/components/accordion/Accordion.js +12 -12
- package/web-dist/components/accordion-item/AccordionItem.js +12 -12
- package/web-dist/components/activity-indicator/ActivityIndicator.js +3 -3
- package/web-dist/components/app-bar/AppBar.js +19 -19
- package/web-dist/components/app-shell/AppShell.js +6 -6
- package/web-dist/components/avatar/Avatar.js +12 -12
- package/web-dist/components/avatar-group/AvatarGroup.js +12 -12
- package/web-dist/components/badge/Badge.js +7 -7
- package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +20 -20
- package/web-dist/components/bottom-sheet/BottomSheet.js +8 -8
- package/web-dist/components/bottom-sheet-flat-list/BottomSheetFlatList.js +8 -8
- package/web-dist/components/bottom-sheet-scroll-view/BottomSheetScrollView.js +8 -8
- package/web-dist/components/bottom-sheet-section-list/BottomSheetSectionList.js +8 -8
- package/web-dist/components/bottom-sheet-view/BottomSheetView.js +8 -8
- package/web-dist/components/bottom-sheet-virtualized-list/BottomSheetVirtualizedList.js +8 -8
- package/web-dist/components/breadcrumbs/Breadcrumbs.js +15 -15
- package/web-dist/components/button/Button.js +12 -12
- package/web-dist/components/button-group/ButtonGroup.js +12 -12
- package/web-dist/components/camera-permission-view/CameraPermissionView.js +20 -20
- package/web-dist/components/card/Card.js +19 -19
- package/web-dist/components/card-back/CardBack.d.ts +7 -0
- package/web-dist/components/card-back/CardBack.js +19 -0
- package/web-dist/components/card-back/index.d.ts +1 -0
- package/web-dist/components/card-back/index.js +2 -0
- package/web-dist/components/card-hand/CardHand.d.ts +7 -0
- package/web-dist/components/card-hand/CardHand.js +19 -0
- package/web-dist/components/card-hand/index.d.ts +1 -0
- package/web-dist/components/card-hand/index.js +2 -0
- package/web-dist/components/chat-list-item/ChatListItem.js +16 -16
- package/web-dist/components/checkbox/Checkbox.js +12 -12
- package/web-dist/components/checkbox-group/CheckboxGroup.js +12 -12
- package/web-dist/components/chess-board/ChessBoard.d.ts +4 -0
- package/web-dist/components/chess-board/ChessBoard.js +13 -0
- package/web-dist/components/chess-board/index.d.ts +1 -0
- package/web-dist/components/chess-board/index.js +2 -0
- package/web-dist/components/chip/Chip.js +13 -13
- package/web-dist/components/chip-group/ChipGroup.js +13 -13
- package/web-dist/components/collection-editor/CollectionEditor.js +19 -19
- package/web-dist/components/content-rail/ContentRail.js +13 -13
- package/web-dist/components/data-table/DataTable.js +26 -26
- package/web-dist/components/date-picker/DatePicker.js +17 -17
- package/web-dist/components/dialog/Dialog.js +12 -12
- package/web-dist/components/divider/Divider.js +6 -6
- package/web-dist/components/empty-state/EmptyState.js +20 -20
- package/web-dist/components/field/Field.js +12 -12
- package/web-dist/components/flat-list/FlatList.js +13 -13
- package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +18 -18
- package/web-dist/components/form/Form.js +16 -16
- package/web-dist/components/form-actions/FormActions.js +16 -16
- package/web-dist/components/form-error/FormError.js +16 -16
- package/web-dist/components/game/Game.d.ts +8 -0
- package/web-dist/components/game/Game.js +25 -0
- package/web-dist/components/game/index.d.ts +1 -0
- package/web-dist/components/game/index.js +2 -0
- package/web-dist/components/game-entity/GameEntity.d.ts +8 -0
- package/web-dist/components/game-entity/GameEntity.js +25 -0
- package/web-dist/components/game-entity/index.d.ts +1 -0
- package/web-dist/components/game-entity/index.js +2 -0
- package/web-dist/components/game-field/GameField.d.ts +8 -0
- package/web-dist/components/game-field/GameField.js +25 -0
- package/web-dist/components/game-field/index.d.ts +1 -0
- package/web-dist/components/game-field/index.js +2 -0
- package/web-dist/components/game-input-zone/GameInputZone.d.ts +8 -0
- package/web-dist/components/game-input-zone/GameInputZone.js +25 -0
- package/web-dist/components/game-input-zone/index.d.ts +1 -0
- package/web-dist/components/game-input-zone/index.js +2 -0
- package/web-dist/components/game-measurement-probe/GameMeasurementProbe.d.ts +8 -0
- package/web-dist/components/game-measurement-probe/GameMeasurementProbe.js +25 -0
- package/web-dist/components/game-measurement-probe/index.d.ts +1 -0
- package/web-dist/components/game-measurement-probe/index.js +2 -0
- package/web-dist/components/game-overlay/GameOverlay.d.ts +8 -0
- package/web-dist/components/game-overlay/GameOverlay.js +25 -0
- package/web-dist/components/game-overlay/index.d.ts +1 -0
- package/web-dist/components/game-overlay/index.js +2 -0
- package/web-dist/components/gradient/Gradient.js +7 -7
- package/web-dist/components/gradient-renderer-provider/GradientRendererProvider.js +7 -7
- package/web-dist/components/graph-view/GraphView.d.ts +5 -5
- package/web-dist/components/grid/Grid.js +6 -6
- package/web-dist/components/heading/Heading.js +6 -6
- package/web-dist/components/hero/Hero.js +19 -19
- package/web-dist/components/icon/Icon.js +4 -4
- package/web-dist/components/icon-button/IconButton.js +12 -12
- package/web-dist/components/image/Image.js +10 -10
- package/web-dist/components/keyboard-avoiding-view/KeyboardAvoidingView.js +2 -2
- package/web-dist/components/list/List.js +13 -13
- package/web-dist/components/list-item/ListItem.js +13 -13
- package/web-dist/components/list-section/ListSection.js +13 -13
- package/web-dist/components/media-card/MediaCard.js +19 -19
- package/web-dist/components/message-bubble/MessageBubble.js +16 -16
- package/web-dist/components/metric-card/MetricCard.js +19 -19
- package/web-dist/components/missing-element/MissingElement.js +11 -11
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +18 -18
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +18 -18
- package/web-dist/components/opening-book/OpeningBook.d.ts +4 -0
- package/web-dist/components/opening-book/OpeningBook.js +13 -0
- package/web-dist/components/opening-book/index.d.ts +1 -0
- package/web-dist/components/opening-book/index.js +2 -0
- package/web-dist/components/otp-form/OtpForm.js +18 -18
- package/web-dist/components/pagination/Pagination.js +13 -13
- package/web-dist/components/palette-item/PaletteItem.js +19 -19
- package/web-dist/components/playing-card/PlayingCard.d.ts +7 -0
- package/web-dist/components/playing-card/PlayingCard.js +19 -0
- package/web-dist/components/playing-card/index.d.ts +1 -0
- package/web-dist/components/playing-card/index.js +2 -0
- package/web-dist/components/poker-training-table/PokerTrainingTable.d.ts +7 -0
- package/web-dist/components/poker-training-table/PokerTrainingTable.js +19 -0
- package/web-dist/components/poker-training-table/index.d.ts +1 -0
- package/web-dist/components/poker-training-table/index.js +2 -0
- package/web-dist/components/popover-menu/PopoverMenu.js +14 -14
- package/web-dist/components/post-card/PostCard.js +19 -19
- package/web-dist/components/product-card/ProductCard.js +19 -19
- package/web-dist/components/progress/Progress.js +10 -10
- package/web-dist/components/progress-ring/ProgressRing.js +10 -10
- package/web-dist/components/radio/Radio.js +14 -14
- package/web-dist/components/radio-group/RadioGroup.js +14 -14
- package/web-dist/components/rating/Rating.js +9 -9
- package/web-dist/components/reader-surface/ReaderSurface.js +21 -21
- package/web-dist/components/scan-overlay/ScanOverlay.js +20 -20
- package/web-dist/components/screen/Screen.js +6 -6
- package/web-dist/components/screen-section/ScreenSection.js +10 -10
- package/web-dist/components/scroll-view/ScrollView.js +6 -6
- package/web-dist/components/search-input/SearchInput.js +13 -13
- package/web-dist/components/section-header/SectionHeader.js +10 -10
- package/web-dist/components/section-list/SectionList.js +13 -13
- package/web-dist/components/select/Select.js +16 -16
- package/web-dist/components/selectable-item/SelectableItem.js +5 -5
- package/web-dist/components/selection-provider/SelectionProvider.js +5 -5
- package/web-dist/components/sign-in-form/SignInForm.js +18 -18
- package/web-dist/components/sign-up-form/SignUpForm.js +18 -18
- package/web-dist/components/skeleton/Skeleton.js +22 -22
- package/web-dist/components/skeleton-card/SkeletonCard.js +22 -22
- package/web-dist/components/skeleton-list/SkeletonList.js +22 -22
- package/web-dist/components/skeleton-text/SkeletonText.js +22 -22
- package/web-dist/components/surface/Surface.js +7 -7
- package/web-dist/components/switch/Switch.js +7 -7
- package/web-dist/components/tab/Tab.js +7 -7
- package/web-dist/components/tab-list/TabList.js +7 -7
- package/web-dist/components/tab-panel/TabPanel.js +7 -7
- package/web-dist/components/tabletop-table/TabletopTable.d.ts +7 -0
- package/web-dist/components/tabletop-table/TabletopTable.js +19 -0
- package/web-dist/components/tabletop-table/index.d.ts +1 -0
- package/web-dist/components/tabletop-table/index.js +2 -0
- package/web-dist/components/tabs/Tabs.js +7 -7
- package/web-dist/components/text/Text.js +6 -6
- package/web-dist/components/text-input/TextInput.js +13 -13
- package/web-dist/components/time-picker/TimePicker.js +17 -17
- package/web-dist/components/timeline/Timeline.js +11 -11
- package/web-dist/components/toast/Toast.js +9 -9
- package/web-dist/components/toast-provider/ToastProvider.js +9 -9
- package/web-dist/components/toolbar/Toolbar.js +19 -19
- package/web-dist/components/tree-item/TreeItem.js +16 -16
- package/web-dist/components/tree-view/TreeView.d.ts +1 -1
- package/web-dist/components/uploader/Uploader.js +22 -22
- package/web-dist/components/view/View.js +6 -6
- package/web-dist/manifest.json +1650 -1379
- package/web-dist/runtime/ZoraProvider.js +8 -8
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import type { PokerTrainingTableProps } from '../../../../types/tabletop';
|
|
4
|
+
import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';
|
|
5
|
+
import { createPokerTrainingTableState } from '../../utils/createPokerTrainingTableState';
|
|
6
|
+
import { TabletopTable } from './TabletopTable';
|
|
7
|
+
|
|
8
|
+
/*** Maps a serializable training task to presentation without running poker or training policy. */
|
|
9
|
+
export const PokerTrainingTable = withZoraThemeScope(PokerTrainingTableInner);
|
|
10
|
+
|
|
11
|
+
/*** Renders the reconstructed seat ring and shared table content. */
|
|
12
|
+
function PokerTrainingTableInner({
|
|
13
|
+
task = {},
|
|
14
|
+
defaultStackBigBlinds = 100,
|
|
15
|
+
accessibilityLabel,
|
|
16
|
+
...tableProps
|
|
17
|
+
}: PokerTrainingTableProps) {
|
|
18
|
+
const state = React.useMemo(
|
|
19
|
+
() => createPokerTrainingTableState(task, { defaultStackBigBlinds }),
|
|
20
|
+
[defaultStackBigBlinds, task],
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<TabletopTable
|
|
25
|
+
{...tableProps}
|
|
26
|
+
accessibilityLabel={accessibilityLabel ?? state.accessibilityLabel}
|
|
27
|
+
centerCards={state.centerCards}
|
|
28
|
+
centerLabel={state.centerLabel}
|
|
29
|
+
centerSublabel={state.centerSublabel}
|
|
30
|
+
seatCount={state.seatCount}
|
|
31
|
+
seats={state.seats}
|
|
32
|
+
/>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import type { TabletopSeatState } from '../../../../types/tabletop';
|
|
5
|
+
import type { TabletopTableProps } from '../../../../types/tabletop';
|
|
6
|
+
import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';
|
|
7
|
+
import { useZoraTheme } from '../../../theme/composition/useZoraTheme';
|
|
8
|
+
import { createTabletopColorScheme } from '../../utils/createTabletopColorScheme';
|
|
9
|
+
import { getTabletopSeatPosition } from '../../utils/getTabletopSeatPosition';
|
|
10
|
+
import { CardHand } from './CardHand';
|
|
11
|
+
|
|
12
|
+
/*** Renders a responsive table surface and caller-owned seats. */
|
|
13
|
+
export const TabletopTable = withZoraThemeScope(TabletopTableInner);
|
|
14
|
+
|
|
15
|
+
/*** Summarizes the visible seat state for assistive technology. */
|
|
16
|
+
function createSeatAccessibilityLabel(seat: TabletopSeatState): string | undefined {
|
|
17
|
+
if (seat.accessibilityLabel !== undefined) return seat.accessibilityLabel;
|
|
18
|
+
if (typeof seat.label !== 'string') return undefined;
|
|
19
|
+
const parts = [seat.label];
|
|
20
|
+
if (typeof seat.sublabel === 'string') parts.push(seat.sublabel);
|
|
21
|
+
if (typeof seat.tokenLabel === 'string') parts.push(seat.tokenLabel);
|
|
22
|
+
if (seat.selected) parts.push('selected');
|
|
23
|
+
if (seat.muted) parts.push('muted');
|
|
24
|
+
return parts.join(', ');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/*** Renders the table geometry using the active ZORA theme. */
|
|
28
|
+
function TabletopTableInner({
|
|
29
|
+
seats,
|
|
30
|
+
centerCards = [],
|
|
31
|
+
centerLabel,
|
|
32
|
+
centerSublabel,
|
|
33
|
+
shape = 'oval',
|
|
34
|
+
seatCount,
|
|
35
|
+
cardSize = 'small',
|
|
36
|
+
disabled = false,
|
|
37
|
+
colorScheme,
|
|
38
|
+
accessibilityLabel,
|
|
39
|
+
testID,
|
|
40
|
+
}: TabletopTableProps) {
|
|
41
|
+
const { theme } = useZoraTheme();
|
|
42
|
+
const colors = React.useMemo(
|
|
43
|
+
() => createTabletopColorScheme(theme, colorScheme),
|
|
44
|
+
[colorScheme, theme],
|
|
45
|
+
);
|
|
46
|
+
const resolvedSeatCount = seatCount ?? seats.length;
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<View
|
|
50
|
+
accessibilityLabel={accessibilityLabel}
|
|
51
|
+
style={[
|
|
52
|
+
styles.root,
|
|
53
|
+
{ aspectRatio: shape === 'circle' ? 1 : 1.6, opacity: disabled ? 0.56 : 1 },
|
|
54
|
+
]}
|
|
55
|
+
testID={testID}
|
|
56
|
+
>
|
|
57
|
+
<View
|
|
58
|
+
style={[
|
|
59
|
+
styles.surface,
|
|
60
|
+
shape === 'circle' ? styles.circleSurface : styles.ovalSurface,
|
|
61
|
+
shape === 'rounded' ? styles.roundedSurface : null,
|
|
62
|
+
{
|
|
63
|
+
backgroundColor: colors.tableFelt,
|
|
64
|
+
borderColor: colors.tableBorder,
|
|
65
|
+
},
|
|
66
|
+
]}
|
|
67
|
+
>
|
|
68
|
+
<View
|
|
69
|
+
pointerEvents="none"
|
|
70
|
+
style={[
|
|
71
|
+
styles.innerSurface,
|
|
72
|
+
shape === 'circle' ? styles.circleSurface : styles.ovalSurface,
|
|
73
|
+
shape === 'rounded' ? styles.roundedSurface : null,
|
|
74
|
+
{ borderColor: colors.tableInnerBorder },
|
|
75
|
+
]}
|
|
76
|
+
/>
|
|
77
|
+
<View style={styles.centerContent}>
|
|
78
|
+
{centerCards.length > 0 ? (
|
|
79
|
+
<CardHand cards={centerCards} colorScheme={colorScheme} size={cardSize} />
|
|
80
|
+
) : null}
|
|
81
|
+
{centerLabel !== undefined ? (
|
|
82
|
+
<View style={[styles.centerLabel, { backgroundColor: colors.seatSurface }]}>
|
|
83
|
+
<Text style={[styles.centerLabelText, { color: colors.seatText }]}>
|
|
84
|
+
{centerLabel}
|
|
85
|
+
</Text>
|
|
86
|
+
</View>
|
|
87
|
+
) : null}
|
|
88
|
+
{centerSublabel !== undefined ? (
|
|
89
|
+
<Text style={[styles.centerSublabel, { color: colors.tableMutedText }]}>
|
|
90
|
+
{centerSublabel}
|
|
91
|
+
</Text>
|
|
92
|
+
) : null}
|
|
93
|
+
</View>
|
|
94
|
+
</View>
|
|
95
|
+
|
|
96
|
+
{seats.map((seat, index) => {
|
|
97
|
+
const position = getTabletopSeatPosition(index, resolvedSeatCount);
|
|
98
|
+
const hasCards = seat.cards !== undefined || seat.faceDownCards !== undefined;
|
|
99
|
+
const seatCardSize = seat.selected && cardSize === 'small' ? 'medium' : cardSize;
|
|
100
|
+
|
|
101
|
+
return (
|
|
102
|
+
<View
|
|
103
|
+
accessibilityLabel={createSeatAccessibilityLabel(seat)}
|
|
104
|
+
accessibilityRole="summary"
|
|
105
|
+
key={seat.id}
|
|
106
|
+
style={[
|
|
107
|
+
styles.seatSlot,
|
|
108
|
+
{
|
|
109
|
+
left: position.left,
|
|
110
|
+
opacity: seat.muted ? 0.48 : 1,
|
|
111
|
+
top: position.top,
|
|
112
|
+
},
|
|
113
|
+
]}
|
|
114
|
+
testID={testID ? `${testID}-seat-${seat.id}` : undefined}
|
|
115
|
+
>
|
|
116
|
+
<View
|
|
117
|
+
style={[
|
|
118
|
+
styles.seatPanel,
|
|
119
|
+
seat.selected ? styles.selectedSeatPanel : null,
|
|
120
|
+
{
|
|
121
|
+
borderColor: seat.selected ? colors.seatSelectedBorder : colors.seatBorder,
|
|
122
|
+
backgroundColor: colors.seatSurface,
|
|
123
|
+
},
|
|
124
|
+
]}
|
|
125
|
+
>
|
|
126
|
+
{hasCards ? (
|
|
127
|
+
<CardHand
|
|
128
|
+
cards={seat.cards}
|
|
129
|
+
colorScheme={colorScheme}
|
|
130
|
+
faceDownCards={seat.faceDownCards}
|
|
131
|
+
muted={seat.muted ?? seat.disabled}
|
|
132
|
+
size={seatCardSize}
|
|
133
|
+
/>
|
|
134
|
+
) : null}
|
|
135
|
+
<View style={styles.seatTextGroup}>
|
|
136
|
+
<Text style={[styles.seatLabel, { color: colors.seatText }]}>{seat.label}</Text>
|
|
137
|
+
{seat.sublabel !== undefined ? (
|
|
138
|
+
<Text style={[styles.seatSublabel, { color: colors.seatMutedText }]}>
|
|
139
|
+
{seat.sublabel}
|
|
140
|
+
</Text>
|
|
141
|
+
) : null}
|
|
142
|
+
</View>
|
|
143
|
+
</View>
|
|
144
|
+
{seat.tokenLabel !== undefined ? (
|
|
145
|
+
<View
|
|
146
|
+
style={[
|
|
147
|
+
styles.token,
|
|
148
|
+
{
|
|
149
|
+
backgroundColor: colors.tokenSurface,
|
|
150
|
+
borderColor: seat.selected
|
|
151
|
+
? colors.seatSelectedBorder
|
|
152
|
+
: colors.tableInnerBorder,
|
|
153
|
+
},
|
|
154
|
+
]}
|
|
155
|
+
>
|
|
156
|
+
<Text style={[styles.tokenText, { color: colors.tokenText }]}>
|
|
157
|
+
{seat.tokenLabel}
|
|
158
|
+
</Text>
|
|
159
|
+
</View>
|
|
160
|
+
) : null}
|
|
161
|
+
</View>
|
|
162
|
+
);
|
|
163
|
+
})}
|
|
164
|
+
</View>
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const styles = StyleSheet.create({
|
|
169
|
+
centerContent: {
|
|
170
|
+
alignItems: 'center',
|
|
171
|
+
gap: 6,
|
|
172
|
+
left: 0,
|
|
173
|
+
position: 'absolute',
|
|
174
|
+
right: 0,
|
|
175
|
+
top: '35%',
|
|
176
|
+
},
|
|
177
|
+
centerLabel: {
|
|
178
|
+
borderRadius: 999,
|
|
179
|
+
paddingHorizontal: 10,
|
|
180
|
+
paddingVertical: 4,
|
|
181
|
+
},
|
|
182
|
+
centerLabelText: {
|
|
183
|
+
fontSize: 12,
|
|
184
|
+
fontWeight: '800',
|
|
185
|
+
},
|
|
186
|
+
centerSublabel: {
|
|
187
|
+
fontSize: 11,
|
|
188
|
+
fontWeight: '700',
|
|
189
|
+
},
|
|
190
|
+
circleSurface: {
|
|
191
|
+
borderRadius: 999,
|
|
192
|
+
},
|
|
193
|
+
innerSurface: {
|
|
194
|
+
borderWidth: 1,
|
|
195
|
+
bottom: 10,
|
|
196
|
+
left: 10,
|
|
197
|
+
opacity: 0.44,
|
|
198
|
+
position: 'absolute',
|
|
199
|
+
right: 10,
|
|
200
|
+
top: 10,
|
|
201
|
+
},
|
|
202
|
+
ovalSurface: {
|
|
203
|
+
borderRadius: 999,
|
|
204
|
+
},
|
|
205
|
+
root: {
|
|
206
|
+
maxWidth: 760,
|
|
207
|
+
position: 'relative',
|
|
208
|
+
width: '100%',
|
|
209
|
+
},
|
|
210
|
+
roundedSurface: {
|
|
211
|
+
borderRadius: 28,
|
|
212
|
+
},
|
|
213
|
+
seatLabel: {
|
|
214
|
+
fontSize: 11,
|
|
215
|
+
fontWeight: '800',
|
|
216
|
+
},
|
|
217
|
+
seatPanel: {
|
|
218
|
+
alignItems: 'center',
|
|
219
|
+
borderRadius: 12,
|
|
220
|
+
borderWidth: 1,
|
|
221
|
+
gap: 4,
|
|
222
|
+
minWidth: 68,
|
|
223
|
+
paddingHorizontal: 7,
|
|
224
|
+
paddingVertical: 6,
|
|
225
|
+
},
|
|
226
|
+
seatSlot: {
|
|
227
|
+
alignItems: 'center',
|
|
228
|
+
gap: 4,
|
|
229
|
+
minWidth: 78,
|
|
230
|
+
position: 'absolute',
|
|
231
|
+
transform: [{ translateX: -39 }, { translateY: -34 }],
|
|
232
|
+
},
|
|
233
|
+
seatSublabel: {
|
|
234
|
+
fontSize: 10,
|
|
235
|
+
fontWeight: '700',
|
|
236
|
+
},
|
|
237
|
+
seatTextGroup: {
|
|
238
|
+
alignItems: 'center',
|
|
239
|
+
gap: 1,
|
|
240
|
+
},
|
|
241
|
+
selectedSeatPanel: {
|
|
242
|
+
borderWidth: 2,
|
|
243
|
+
paddingHorizontal: 9,
|
|
244
|
+
paddingVertical: 7,
|
|
245
|
+
},
|
|
246
|
+
surface: {
|
|
247
|
+
borderWidth: 8,
|
|
248
|
+
bottom: 28,
|
|
249
|
+
left: 24,
|
|
250
|
+
position: 'absolute',
|
|
251
|
+
right: 24,
|
|
252
|
+
top: 24,
|
|
253
|
+
},
|
|
254
|
+
token: {
|
|
255
|
+
borderRadius: 999,
|
|
256
|
+
borderWidth: 1,
|
|
257
|
+
paddingHorizontal: 7,
|
|
258
|
+
paddingVertical: 2,
|
|
259
|
+
},
|
|
260
|
+
tokenText: {
|
|
261
|
+
fontSize: 10,
|
|
262
|
+
fontWeight: '800',
|
|
263
|
+
},
|
|
264
|
+
});
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import type { ZoraComponentMeta } from '../../types/authoring';
|
|
2
|
+
|
|
3
|
+
export const cardBackMeta = {
|
|
4
|
+
name: 'CardBack',
|
|
5
|
+
category: 'component',
|
|
6
|
+
description: 'Renders one face-down playing card.',
|
|
7
|
+
directManifestNode: false,
|
|
8
|
+
allowedChildren: [],
|
|
9
|
+
note: 'Public card primitive composed by code-facing tabletop components, not a direct manifest node.',
|
|
10
|
+
blueprint: { label: 'Card back', defaultProps: { size: 'medium' } },
|
|
11
|
+
props: {
|
|
12
|
+
size: {
|
|
13
|
+
type: 'enum',
|
|
14
|
+
category: 'Style',
|
|
15
|
+
label: 'Size',
|
|
16
|
+
enum: ['small', 'medium', 'large'],
|
|
17
|
+
default: 'medium',
|
|
18
|
+
authoring: { authority: 'instance' },
|
|
19
|
+
},
|
|
20
|
+
muted: {
|
|
21
|
+
type: 'boolean',
|
|
22
|
+
category: 'State',
|
|
23
|
+
label: 'Muted',
|
|
24
|
+
default: false,
|
|
25
|
+
authoring: { authority: 'instance' },
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
} as const satisfies ZoraComponentMeta;
|
|
29
|
+
export const cardHandMeta = {
|
|
30
|
+
name: 'CardHand',
|
|
31
|
+
category: 'component',
|
|
32
|
+
description: 'Renders a compact caller-owned card hand.',
|
|
33
|
+
directManifestNode: false,
|
|
34
|
+
allowedChildren: [],
|
|
35
|
+
note: 'Public hand primitive composed by code-facing tabletop components, not a direct manifest node.',
|
|
36
|
+
blueprint: { label: 'Card hand', defaultProps: { cards: [], faceDownCards: 0, size: 'medium' } },
|
|
37
|
+
props: {
|
|
38
|
+
cards: {
|
|
39
|
+
type: 'array',
|
|
40
|
+
category: 'Cards',
|
|
41
|
+
label: 'Cards',
|
|
42
|
+
default: [],
|
|
43
|
+
authoring: { authority: 'instance' },
|
|
44
|
+
},
|
|
45
|
+
faceDownCards: {
|
|
46
|
+
type: 'number',
|
|
47
|
+
category: 'Cards',
|
|
48
|
+
label: 'Face-down cards',
|
|
49
|
+
default: 0,
|
|
50
|
+
authoring: { authority: 'instance' },
|
|
51
|
+
},
|
|
52
|
+
size: {
|
|
53
|
+
type: 'enum',
|
|
54
|
+
category: 'Style',
|
|
55
|
+
label: 'Size',
|
|
56
|
+
enum: ['small', 'medium', 'large'],
|
|
57
|
+
default: 'medium',
|
|
58
|
+
authoring: { authority: 'instance' },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
} as const satisfies ZoraComponentMeta;
|
|
62
|
+
export const playingCardMeta = {
|
|
63
|
+
name: 'PlayingCard',
|
|
64
|
+
category: 'component',
|
|
65
|
+
description: 'Renders one face-up caller-owned playing card.',
|
|
66
|
+
directManifestNode: false,
|
|
67
|
+
allowedChildren: [],
|
|
68
|
+
note: 'Public card primitive composed by code-facing tabletop components, not a direct manifest node.',
|
|
69
|
+
blueprint: {
|
|
70
|
+
label: 'Playing card',
|
|
71
|
+
defaultProps: { card: { rank: 'A', suit: 'spades' }, size: 'medium' },
|
|
72
|
+
},
|
|
73
|
+
bindings: {
|
|
74
|
+
props: { card: { label: 'Card', value: { type: 'object' }, acceptsFallback: true } },
|
|
75
|
+
},
|
|
76
|
+
props: {
|
|
77
|
+
size: {
|
|
78
|
+
type: 'enum',
|
|
79
|
+
category: 'Style',
|
|
80
|
+
label: 'Size',
|
|
81
|
+
enum: ['small', 'medium', 'large'],
|
|
82
|
+
default: 'medium',
|
|
83
|
+
authoring: { authority: 'instance' },
|
|
84
|
+
},
|
|
85
|
+
selected: {
|
|
86
|
+
type: 'boolean',
|
|
87
|
+
category: 'State',
|
|
88
|
+
label: 'Selected',
|
|
89
|
+
default: false,
|
|
90
|
+
authoring: { authority: 'instance' },
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
} as const satisfies ZoraComponentMeta;
|
|
94
|
+
export const tabletopTableMeta = {
|
|
95
|
+
name: 'TabletopTable',
|
|
96
|
+
category: 'component',
|
|
97
|
+
description:
|
|
98
|
+
'Arranges caller-owned player seats and shared cards around a responsive tabletop surface.',
|
|
99
|
+
directManifestNode: true,
|
|
100
|
+
allowedChildren: [],
|
|
101
|
+
blueprint: {
|
|
102
|
+
label: 'Tabletop table',
|
|
103
|
+
defaultProps: { seats: [], centerCards: [], shape: 'oval', cardSize: 'small' },
|
|
104
|
+
},
|
|
105
|
+
bindings: {
|
|
106
|
+
props: {
|
|
107
|
+
seats: {
|
|
108
|
+
label: 'Seats',
|
|
109
|
+
value: { type: 'array', itemType: 'object' },
|
|
110
|
+
acceptsFallback: true,
|
|
111
|
+
acceptsTransforms: true,
|
|
112
|
+
},
|
|
113
|
+
centerCards: {
|
|
114
|
+
label: 'Center cards',
|
|
115
|
+
value: { type: 'array', itemType: 'object' },
|
|
116
|
+
acceptsFallback: true,
|
|
117
|
+
acceptsTransforms: true,
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
props: {
|
|
122
|
+
seats: {
|
|
123
|
+
type: 'array',
|
|
124
|
+
category: 'Players',
|
|
125
|
+
label: 'Seats',
|
|
126
|
+
default: [],
|
|
127
|
+
authoring: { authority: 'instance' },
|
|
128
|
+
},
|
|
129
|
+
centerCards: {
|
|
130
|
+
type: 'array',
|
|
131
|
+
category: 'Table',
|
|
132
|
+
label: 'Center cards',
|
|
133
|
+
default: [],
|
|
134
|
+
authoring: { authority: 'instance' },
|
|
135
|
+
},
|
|
136
|
+
centerLabel: {
|
|
137
|
+
type: 'string',
|
|
138
|
+
category: 'Table',
|
|
139
|
+
label: 'Center label',
|
|
140
|
+
authoring: { authority: 'instance' },
|
|
141
|
+
},
|
|
142
|
+
centerSublabel: {
|
|
143
|
+
type: 'string',
|
|
144
|
+
category: 'Table',
|
|
145
|
+
label: 'Center sublabel',
|
|
146
|
+
authoring: { authority: 'instance' },
|
|
147
|
+
},
|
|
148
|
+
shape: {
|
|
149
|
+
type: 'enum',
|
|
150
|
+
category: 'Table',
|
|
151
|
+
label: 'Shape',
|
|
152
|
+
enum: ['circle', 'oval', 'rounded'],
|
|
153
|
+
default: 'oval',
|
|
154
|
+
authoring: { authority: 'instance' },
|
|
155
|
+
},
|
|
156
|
+
seatCount: {
|
|
157
|
+
type: 'enum',
|
|
158
|
+
category: 'Players',
|
|
159
|
+
label: 'Seat count',
|
|
160
|
+
enum: [2, 3, 4, 5, 6, 7, 8, 9, 10],
|
|
161
|
+
authoring: { authority: 'instance' },
|
|
162
|
+
},
|
|
163
|
+
cardSize: {
|
|
164
|
+
type: 'enum',
|
|
165
|
+
category: 'Cards',
|
|
166
|
+
label: 'Card size',
|
|
167
|
+
enum: ['small', 'medium', 'large'],
|
|
168
|
+
default: 'small',
|
|
169
|
+
authoring: { authority: 'instance' },
|
|
170
|
+
},
|
|
171
|
+
disabled: {
|
|
172
|
+
type: 'boolean',
|
|
173
|
+
category: 'State',
|
|
174
|
+
label: 'Disabled',
|
|
175
|
+
default: false,
|
|
176
|
+
authoring: { authority: 'instance' },
|
|
177
|
+
},
|
|
178
|
+
accessibilityLabel: {
|
|
179
|
+
type: 'string',
|
|
180
|
+
category: 'Accessibility',
|
|
181
|
+
label: 'Accessibility label',
|
|
182
|
+
authoring: { authority: 'instance' },
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
} as const satisfies ZoraComponentMeta;
|
|
186
|
+
export const pokerTrainingTableMeta = {
|
|
187
|
+
name: 'PokerTrainingTable',
|
|
188
|
+
category: 'pattern',
|
|
189
|
+
description: 'Maps serializable poker table data into the reusable tabletop presentation.',
|
|
190
|
+
directManifestNode: true,
|
|
191
|
+
allowedChildren: [],
|
|
192
|
+
blueprint: {
|
|
193
|
+
label: 'Poker training table',
|
|
194
|
+
defaultProps: { task: {}, defaultStackBigBlinds: 100, shape: 'oval', cardSize: 'small' },
|
|
195
|
+
},
|
|
196
|
+
bindings: {
|
|
197
|
+
props: {
|
|
198
|
+
task: {
|
|
199
|
+
label: 'Poker training task',
|
|
200
|
+
description: 'Table-relevant fields from a poker training task.',
|
|
201
|
+
value: {
|
|
202
|
+
type: 'object',
|
|
203
|
+
fields: [
|
|
204
|
+
{ path: 'blinds', type: 'object', label: 'Blinds' },
|
|
205
|
+
{ path: 'heroPosition', type: 'string', label: 'Hero position' },
|
|
206
|
+
{ path: 'heroCards', type: 'array', label: 'Hero cards' },
|
|
207
|
+
{ path: 'communityCards', type: 'array', label: 'Community cards' },
|
|
208
|
+
{ path: 'pot', type: 'number', label: 'Pot' },
|
|
209
|
+
{ path: 'players', type: 'array', label: 'Players' },
|
|
210
|
+
],
|
|
211
|
+
},
|
|
212
|
+
acceptsFallback: true,
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
props: {
|
|
217
|
+
defaultStackBigBlinds: {
|
|
218
|
+
type: 'number',
|
|
219
|
+
category: 'Players',
|
|
220
|
+
label: 'Default stack in big blinds',
|
|
221
|
+
default: 100,
|
|
222
|
+
authoring: { authority: 'instance' },
|
|
223
|
+
},
|
|
224
|
+
shape: {
|
|
225
|
+
type: 'enum',
|
|
226
|
+
category: 'Table',
|
|
227
|
+
label: 'Shape',
|
|
228
|
+
enum: ['circle', 'oval', 'rounded'],
|
|
229
|
+
default: 'oval',
|
|
230
|
+
authoring: { authority: 'instance' },
|
|
231
|
+
},
|
|
232
|
+
cardSize: {
|
|
233
|
+
type: 'enum',
|
|
234
|
+
category: 'Cards',
|
|
235
|
+
label: 'Card size',
|
|
236
|
+
enum: ['small', 'medium', 'large'],
|
|
237
|
+
default: 'small',
|
|
238
|
+
authoring: { authority: 'instance' },
|
|
239
|
+
},
|
|
240
|
+
disabled: {
|
|
241
|
+
type: 'boolean',
|
|
242
|
+
category: 'State',
|
|
243
|
+
label: 'Disabled',
|
|
244
|
+
default: false,
|
|
245
|
+
authoring: { authority: 'instance' },
|
|
246
|
+
},
|
|
247
|
+
accessibilityLabel: {
|
|
248
|
+
type: 'string',
|
|
249
|
+
category: 'Accessibility',
|
|
250
|
+
label: 'Accessibility label',
|
|
251
|
+
authoring: { authority: 'instance' },
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { join } from 'node:path';
|
|
2
|
+
import { pathToFileURL } from 'node:url';
|
|
3
|
+
|
|
4
|
+
import { describe, expect, test } from 'bun:test';
|
|
5
|
+
import { Window } from 'happy-dom';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { renderToStaticMarkup } from 'react-dom/server';
|
|
8
|
+
|
|
9
|
+
import type {
|
|
10
|
+
CardHand as CardHandComponent,
|
|
11
|
+
PokerTrainingTable as PokerTrainingTableComponent,
|
|
12
|
+
TabletopTable as TabletopTableComponent,
|
|
13
|
+
} from './public';
|
|
14
|
+
import { createPokerTrainingTableState } from './utils/createPokerTrainingTableState';
|
|
15
|
+
import { createTabletopGameSeats } from './utils/createTabletopGameSeats';
|
|
16
|
+
import { getTabletopSeatPosition } from './utils/getTabletopSeatPosition';
|
|
17
|
+
|
|
18
|
+
const webDistRoot = join(import.meta.dir, '../../../web-dist');
|
|
19
|
+
const load = (path: string) => import(pathToFileURL(join(webDistRoot, path)).href);
|
|
20
|
+
|
|
21
|
+
describe('Tabletop presentation', () => {
|
|
22
|
+
test('reconstructs the complete hero-oriented ring without training policy', () => {
|
|
23
|
+
const state = createPokerTrainingTableState({
|
|
24
|
+
tableSize: '6max',
|
|
25
|
+
heroPosition: 'CO',
|
|
26
|
+
heroCards: [{ rank: 'A', suit: 'spades' }],
|
|
27
|
+
blinds: { small: 1, big: 2 },
|
|
28
|
+
pot: 24,
|
|
29
|
+
players: [
|
|
30
|
+
{ position: 'CO', stack: 200 },
|
|
31
|
+
{ position: 'BTN', folded: true },
|
|
32
|
+
],
|
|
33
|
+
});
|
|
34
|
+
expect(state.seatCount).toBe(6);
|
|
35
|
+
expect(state.seats.map((seat) => seat.id)).toEqual(['CO', 'BTN', 'SB', 'BB', 'UTG', 'HJ']);
|
|
36
|
+
expect(state.seats[0]).toMatchObject({
|
|
37
|
+
selected: true,
|
|
38
|
+
sublabel: '100 BB',
|
|
39
|
+
cards: [{ rank: 'A', suit: 'spades' }],
|
|
40
|
+
});
|
|
41
|
+
expect(state.seats[2]).toMatchObject({
|
|
42
|
+
disabled: true,
|
|
43
|
+
muted: true,
|
|
44
|
+
sublabel: '100 BB · Folded',
|
|
45
|
+
});
|
|
46
|
+
expect(state.seats[1]?.tokenLabel).toBe('D');
|
|
47
|
+
expect(state.centerLabel).toBe('Pot 24');
|
|
48
|
+
expect(state.centerSublabel).toBe('Blinds 1 / 2');
|
|
49
|
+
expect(state.accessibilityLabel).toContain('Hero CO');
|
|
50
|
+
expect(getTabletopSeatPosition(0, 6)).toEqual({ top: '84%', left: '50%' });
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
test('joins ordered seats with participant display overrides', () => {
|
|
54
|
+
expect(
|
|
55
|
+
createTabletopGameSeats({
|
|
56
|
+
seats: [
|
|
57
|
+
{ id: 'north', defaultState: { label: 'North' } },
|
|
58
|
+
{ id: 'south', defaultState: { label: 'South' } },
|
|
59
|
+
],
|
|
60
|
+
participants: [{ seatId: 'south', state: { selected: true } }],
|
|
61
|
+
}),
|
|
62
|
+
).toEqual([
|
|
63
|
+
{ id: 'north', label: 'North', disabled: true, muted: true },
|
|
64
|
+
{ id: 'south', label: 'South', selected: true },
|
|
65
|
+
]);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
test('renders card sizing, per-card IDs, seat accessibility, and table shapes', async () => {
|
|
69
|
+
const { CardHand } = (await load('components/card-hand/index.js')) as {
|
|
70
|
+
CardHand: typeof CardHandComponent;
|
|
71
|
+
};
|
|
72
|
+
const { TabletopTable } = (await load('components/tabletop-table/index.js')) as {
|
|
73
|
+
TabletopTable: typeof TabletopTableComponent;
|
|
74
|
+
};
|
|
75
|
+
const { PokerTrainingTable } = (await load('components/poker-training-table/index.js')) as {
|
|
76
|
+
PokerTrainingTable: typeof PokerTrainingTableComponent;
|
|
77
|
+
};
|
|
78
|
+
const markup = renderToStaticMarkup(
|
|
79
|
+
<>
|
|
80
|
+
<CardHand
|
|
81
|
+
cards={[{ rank: 'A', suit: 'spades' }]}
|
|
82
|
+
colorScheme={{ cardSurface: '#000000' }}
|
|
83
|
+
faceDownCards={1}
|
|
84
|
+
testID="hand"
|
|
85
|
+
/>
|
|
86
|
+
<TabletopTable
|
|
87
|
+
shape="circle"
|
|
88
|
+
seats={[
|
|
89
|
+
{ id: 'hero', label: 'Hero', sublabel: '100 BB', selected: true, tokenLabel: 'D' },
|
|
90
|
+
]}
|
|
91
|
+
testID="table"
|
|
92
|
+
/>
|
|
93
|
+
<PokerTrainingTable task={{ tableSize: '6max', heroPosition: 'CO' }} testID="poker" />
|
|
94
|
+
</>,
|
|
95
|
+
);
|
|
96
|
+
const browser = new Window();
|
|
97
|
+
browser.document.body.innerHTML = markup;
|
|
98
|
+
const card = browser.document.querySelector('[data-testid="hand-card-0"]');
|
|
99
|
+
expect(card?.getAttribute('aria-label')).toBe('ace of spades');
|
|
100
|
+
expect(card?.getAttribute('style')).toContain('height:56px');
|
|
101
|
+
expect(card?.getAttribute('style')).toContain('width:40px');
|
|
102
|
+
expect(card?.getAttribute('style')).toContain('background-color:rgba(0,0,0,1.00)');
|
|
103
|
+
expect(card?.textContent).toContain('A');
|
|
104
|
+
expect(card?.firstElementChild.getAttribute('style')).toContain('color:rgba(255,255,255,1.00)');
|
|
105
|
+
expect(
|
|
106
|
+
browser.document.querySelector('[data-testid="hand-hidden-0"]')?.getAttribute('aria-label'),
|
|
107
|
+
).toBe('Hidden card');
|
|
108
|
+
expect(
|
|
109
|
+
browser.document.querySelector('[data-testid="table-seat-hero"]')?.getAttribute('aria-label'),
|
|
110
|
+
).toBe('Hero, 100 BB, D, selected');
|
|
111
|
+
expect(browser.document.querySelectorAll('[data-testid^="poker-seat-"]')).toHaveLength(6);
|
|
112
|
+
expect(
|
|
113
|
+
browser.document.querySelector('[data-testid="poker"]')?.getAttribute('aria-label'),
|
|
114
|
+
).toContain('Six-player poker table');
|
|
115
|
+
const circleTable = browser.document.querySelector('[data-testid="table"]');
|
|
116
|
+
expect(circleTable?.getAttribute('style')).toContain('aspect-ratio:1');
|
|
117
|
+
const circleSurface = circleTable?.firstElementChild.getAttribute('class');
|
|
118
|
+
browser.document.body.innerHTML = renderToStaticMarkup(
|
|
119
|
+
<TabletopTable seats={[]} shape="rounded" testID="table" />,
|
|
120
|
+
);
|
|
121
|
+
const roundedSurface = browser.document
|
|
122
|
+
.querySelector('[data-testid="table"]')
|
|
123
|
+
?.firstElementChild.getAttribute('class');
|
|
124
|
+
expect(circleSurface).not.toBe(roundedSurface);
|
|
125
|
+
browser.close();
|
|
126
|
+
});
|
|
127
|
+
});
|