@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,114 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Animated, Easing } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import type { GameEntityEasing } from '../../../types/gamePresentation';
|
|
5
|
+
import type { GameEntityMotionPlan } from './resolveGameEntityMotionPlan';
|
|
6
|
+
|
|
7
|
+
interface MotionAnimationInput {
|
|
8
|
+
readonly durationMs: number;
|
|
9
|
+
readonly delayMs: number;
|
|
10
|
+
readonly easing: GameEntityEasing;
|
|
11
|
+
readonly repeat: boolean;
|
|
12
|
+
readonly alternate: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/*** Drive one optional relative GameEntity motion timeline without changing game-session state. */
|
|
16
|
+
export function useGameEntityMotionProgress(plan: GameEntityMotionPlan): Animated.Value {
|
|
17
|
+
const [progress] = React.useState(() => new Animated.Value(0));
|
|
18
|
+
const signature = createMotionSignature(plan);
|
|
19
|
+
const previousSignature = React.useRef(signature);
|
|
20
|
+
const {
|
|
21
|
+
motionEnabled,
|
|
22
|
+
motionPaused,
|
|
23
|
+
motionDurationMs,
|
|
24
|
+
motionDelayMs,
|
|
25
|
+
motionEasing,
|
|
26
|
+
motionRepeat,
|
|
27
|
+
motionAlternate,
|
|
28
|
+
} = plan;
|
|
29
|
+
|
|
30
|
+
React.useEffect(() => {
|
|
31
|
+
progress.stopAnimation();
|
|
32
|
+
|
|
33
|
+
if (!motionEnabled) {
|
|
34
|
+
progress.setValue(0);
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (previousSignature.current !== signature) {
|
|
39
|
+
progress.setValue(0);
|
|
40
|
+
previousSignature.current = signature;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (motionPaused) return undefined;
|
|
44
|
+
|
|
45
|
+
const animation = createMotionAnimation(progress, {
|
|
46
|
+
durationMs: motionDurationMs,
|
|
47
|
+
delayMs: motionDelayMs,
|
|
48
|
+
easing: motionEasing,
|
|
49
|
+
repeat: motionRepeat,
|
|
50
|
+
alternate: motionAlternate,
|
|
51
|
+
});
|
|
52
|
+
animation.start();
|
|
53
|
+
return () => animation.stop();
|
|
54
|
+
}, [
|
|
55
|
+
motionAlternate,
|
|
56
|
+
motionDelayMs,
|
|
57
|
+
motionDurationMs,
|
|
58
|
+
motionEasing,
|
|
59
|
+
motionEnabled,
|
|
60
|
+
motionPaused,
|
|
61
|
+
motionRepeat,
|
|
62
|
+
progress,
|
|
63
|
+
signature,
|
|
64
|
+
]);
|
|
65
|
+
|
|
66
|
+
return progress;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/*** Create the one-shot or repeating React Native motion sequence for one entity. */
|
|
70
|
+
function createMotionAnimation(progress: Animated.Value, input: MotionAnimationInput) {
|
|
71
|
+
const forward = () =>
|
|
72
|
+
Animated.timing(progress, {
|
|
73
|
+
toValue: 1,
|
|
74
|
+
duration: input.durationMs,
|
|
75
|
+
easing: resolveMotionEasing(input.easing),
|
|
76
|
+
useNativeDriver: false,
|
|
77
|
+
});
|
|
78
|
+
const reverse = () =>
|
|
79
|
+
Animated.timing(progress, {
|
|
80
|
+
toValue: 0,
|
|
81
|
+
duration: input.durationMs,
|
|
82
|
+
easing: resolveMotionEasing(input.easing),
|
|
83
|
+
useNativeDriver: false,
|
|
84
|
+
});
|
|
85
|
+
const movement = input.alternate
|
|
86
|
+
? Animated.loop(Animated.sequence([forward(), reverse()]))
|
|
87
|
+
: input.repeat
|
|
88
|
+
? Animated.loop(forward())
|
|
89
|
+
: forward();
|
|
90
|
+
|
|
91
|
+
return input.delayMs === 0
|
|
92
|
+
? movement
|
|
93
|
+
: Animated.sequence([Animated.delay(input.delayMs), movement]);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/*** Create a stable signature for motion parameters that should restart the relative timeline. */
|
|
97
|
+
function createMotionSignature(plan: GameEntityMotionPlan): string {
|
|
98
|
+
return [
|
|
99
|
+
plan.motionDurationMs,
|
|
100
|
+
plan.motionDelayMs,
|
|
101
|
+
plan.motionEasing,
|
|
102
|
+
plan.motionEnabled,
|
|
103
|
+
plan.motionRepeat,
|
|
104
|
+
plan.motionAlternate,
|
|
105
|
+
].join(':');
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/*** Map serializable timeline easing names onto React Native easing functions. */
|
|
109
|
+
function resolveMotionEasing(easing: GameEntityEasing) {
|
|
110
|
+
if (easing === 'ease-in') return Easing.in(Easing.ease);
|
|
111
|
+
if (easing === 'ease-out') return Easing.out(Easing.ease);
|
|
112
|
+
if (easing === 'ease-in-out') return Easing.inOut(Easing.ease);
|
|
113
|
+
return Easing.linear;
|
|
114
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AccessibilityInfo } from 'react-native';
|
|
3
|
+
|
|
4
|
+
/*** Track the cross-platform system reduced-motion preference for game presentation. */
|
|
5
|
+
export function useGameReducedMotion(): boolean {
|
|
6
|
+
const [reduceMotion, setReduceMotion] = React.useState(false);
|
|
7
|
+
|
|
8
|
+
React.useEffect(() => {
|
|
9
|
+
void AccessibilityInfo.isReduceMotionEnabled().then(setReduceMotion);
|
|
10
|
+
const subscription = AccessibilityInfo.addEventListener('reduceMotionChanged', setReduceMotion);
|
|
11
|
+
return () => subscription.remove();
|
|
12
|
+
}, []);
|
|
13
|
+
|
|
14
|
+
return reduceMotion;
|
|
15
|
+
}
|
|
@@ -124,13 +124,13 @@ type GraphContainer = NonNullable<CytoscapeOptions['container']>;
|
|
|
124
124
|
|
|
125
125
|
/***
|
|
126
126
|
* Render a browser graph while one runtime owns Cytoscape layout, viewport, and disposal.
|
|
127
|
-
*
|
|
127
|
+
* zoomMode Use `fit-relative` to make controller zoom, events and min/max limits relative
|
|
128
128
|
* to the visible-node fit (1 = fit). The default `absolute` keeps engine-space zoom units.
|
|
129
|
-
*
|
|
129
|
+
* sizeNodesToLabels Opt in to renderer-measured plain labels, including bold and Unicode
|
|
130
130
|
* text. Keep padding in styleRules. Compound and rich-node dimensions retain their existing owners.
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
131
|
+
* minReadableLabelSize Expand the manual zoom ceiling until plain labels reach this CSS-pixel size.
|
|
132
|
+
* maxFitLabelSize Cap automatic fitting at this plain-label CSS-pixel size, leaving whitespace for tiny graphs.
|
|
133
|
+
* onSpacingFactorChange Receive the spacing accepted by explicit fit({ optimizeSpacing: true }).
|
|
134
134
|
* Ordinary zoom never adjusts spacing or relayouts. Explicit optimization preserves layout ordering
|
|
135
135
|
* and uses bounded collision checks including labels and compound siblings; it can recover uniformly
|
|
136
136
|
* cramped layouts but cannot repair non-uniform overlaps.
|
|
@@ -10,7 +10,7 @@ const SEARCH_ITERATIONS = 8;
|
|
|
10
10
|
/***
|
|
11
11
|
* Optimize settled layout spacing around readable label bounds instead of full node clearance.
|
|
12
12
|
* Compound containment stays intentional while sibling groups retain non-overlapping boundaries.
|
|
13
|
-
*
|
|
13
|
+
* Cytoscape geometry is measured once, then bounded pure numeric trials reuse the
|
|
14
14
|
* immutable snapshot. No layout reruns, zoom work, or intermediate frames are painted.
|
|
15
15
|
*/
|
|
16
16
|
export function compactGraphSpacing(cy: Core, spacingFactor: number): number {
|
|
@@ -112,7 +112,7 @@ function positiveSize(value: number | undefined, fallback: number): number {
|
|
|
112
112
|
|
|
113
113
|
/***
|
|
114
114
|
* Recompute the fit reference only after layout or resize, never on every pan/zoom event.
|
|
115
|
-
*
|
|
115
|
+
* Cache the geometry-derived scale in the viewport owner; labels are included, edges excluded.
|
|
116
116
|
*/
|
|
117
117
|
function getNodeFitZoom(cy: Core, padding: number): number {
|
|
118
118
|
if (cy.nodes().empty()) return 1;
|
|
@@ -2,7 +2,7 @@ import type { Core } from 'cytoscape';
|
|
|
2
2
|
|
|
3
3
|
/***
|
|
4
4
|
* Keeps self-loop control points outside the rendered node, independent of label size and direction.
|
|
5
|
-
*
|
|
5
|
+
* Reconcile loop geometry only after size/style/layout changes, never on pan or zoom.
|
|
6
6
|
* Preserve valid dependencies and configured larger loops; do not hide edges or silence warnings.
|
|
7
7
|
*/
|
|
8
8
|
export function createGraphLoopSizer(cy: Core) {
|
|
@@ -150,7 +150,7 @@ function createRuntimeState(
|
|
|
150
150
|
|
|
151
151
|
/***
|
|
152
152
|
* Reconcile presentation in place and relayout only when graph geometry or layout policy changes.
|
|
153
|
-
*
|
|
153
|
+
* Batch reconciliation and skip layout for presentation-only updates.
|
|
154
154
|
*/
|
|
155
155
|
function updateRuntime(state: GraphRuntimeState, input: GraphRuntimeUpdate) {
|
|
156
156
|
if (state.cy.destroyed()) return;
|
|
@@ -227,7 +227,7 @@ function startCurrentLayout(state: GraphRuntimeState, input: GraphRuntimeUpdate)
|
|
|
227
227
|
|
|
228
228
|
/***
|
|
229
229
|
* Settle only the latest layout generation and fit once from node bounds.
|
|
230
|
-
*
|
|
230
|
+
* Discard stale completions and avoid repeated automatic fits.
|
|
231
231
|
*/
|
|
232
232
|
function completeCurrentLayout(state: GraphRuntimeState, generation: number) {
|
|
233
233
|
scheduleGraphFrame(() => {
|
|
@@ -265,7 +265,7 @@ function completeCurrentLayout(state: GraphRuntimeState, generation: number) {
|
|
|
265
265
|
|
|
266
266
|
/***
|
|
267
267
|
* Handle explicit readable-fit intent in the runtime owner, never from zoom or React effects.
|
|
268
|
-
*
|
|
268
|
+
* Bounded spacing optimization preserves the settled algorithm instead of repeatedly running it.
|
|
269
269
|
*/
|
|
270
270
|
function requestOptimizedFit(state: GraphRuntimeState, options: GraphViewFitOptions) {
|
|
271
271
|
if (state.cy.destroyed()) return;
|
|
@@ -319,7 +319,7 @@ function applyGraphStyles(
|
|
|
319
319
|
|
|
320
320
|
/***
|
|
321
321
|
* Synchronize controlled selection without rerunning layout.
|
|
322
|
-
*
|
|
322
|
+
* Selection updates must not trigger graph reconstruction or layout.
|
|
323
323
|
*/
|
|
324
324
|
function setSelectedNodeIds(state: GraphRuntimeState, nodeIds: readonly string[] | undefined) {
|
|
325
325
|
if (state.cy.destroyed() || nodeIds === undefined) return;
|
|
@@ -333,7 +333,7 @@ function setSelectedNodeIds(state: GraphRuntimeState, nodeIds: readonly string[]
|
|
|
333
333
|
|
|
334
334
|
/***
|
|
335
335
|
* Persist one rich-node size and schedule at most one relayout for changed geometry.
|
|
336
|
-
*
|
|
336
|
+
* Ignore unchanged measurements before scheduling layout work.
|
|
337
337
|
*/
|
|
338
338
|
function setNodeSize(state: GraphRuntimeState, id: string, size: GraphViewSize) {
|
|
339
339
|
const previous = state.nodeSizes.get(id);
|
|
@@ -357,7 +357,7 @@ function applyNodeSize(cy: Core, id: string, size: GraphViewSize) {
|
|
|
357
357
|
|
|
358
358
|
/***
|
|
359
359
|
* Coalesce DOM measurements into one follow-up layout generation.
|
|
360
|
-
*
|
|
360
|
+
* Keep one scheduled layout per frame instead of one per measured node.
|
|
361
361
|
*/
|
|
362
362
|
function scheduleMeasuredNodeRelayout(state: GraphRuntimeState) {
|
|
363
363
|
if (state.relayoutScheduledRef.current) return;
|
|
@@ -382,7 +382,7 @@ function subscribeRenderedNodes(state: GraphRuntimeState, listener: RenderedNode
|
|
|
382
382
|
|
|
383
383
|
/***
|
|
384
384
|
* Publish current rendered node positions only to active rich-node subscribers.
|
|
385
|
-
*
|
|
385
|
+
* Skip snapshot preparation when no overlay is subscribed.
|
|
386
386
|
*/
|
|
387
387
|
function emitRenderedNodes(
|
|
388
388
|
state: Pick<GraphRuntimeState, 'cy' | 'hoveredNodeIds' | 'renderedNodeListeners'>,
|
|
@@ -2,7 +2,6 @@ import type { Core } from 'cytoscape';
|
|
|
2
2
|
|
|
3
3
|
/***
|
|
4
4
|
* Identifies layout-relevant leaf dimensions without including positions or presentation colors.
|
|
5
|
-
* @performance
|
|
6
5
|
* Adding viewport, color or arbitrary data to this key turns interaction updates into relayouts.
|
|
7
6
|
* Measure after style reconciliation; actual size changes still require layout. Compound bounds
|
|
8
7
|
* follow child positions, so keying their measured bounds would feed layout output back into input.
|
|
@@ -2,7 +2,7 @@ import type { GraphViewEdge, GraphViewNode } from './GraphView';
|
|
|
2
2
|
|
|
3
3
|
/***
|
|
4
4
|
* Identify visible graph membership and hierarchy independently of presentation metadata.
|
|
5
|
-
*
|
|
5
|
+
* Keep presentation-only changes out of the relayout decision.
|
|
6
6
|
*/
|
|
7
7
|
export function getGraphTopologyKey(
|
|
8
8
|
nodes: readonly GraphViewNode[],
|
|
@@ -3,7 +3,6 @@ import { getGraphTopologyKey } from './getGraphTopologyKey';
|
|
|
3
3
|
|
|
4
4
|
/***
|
|
5
5
|
* Detects topology and explicit layout-policy changes independently of highlight metadata.
|
|
6
|
-
* @performance
|
|
7
6
|
* New node/edge array identities alone are not a layout request: consumers may update classes
|
|
8
7
|
* and colors on hover or selection. Keep structural identity separate from presentation and
|
|
9
8
|
* combine this decision with measured geometry in the single runtime owner, not consumer effects.
|
|
@@ -3,7 +3,7 @@ import cytoscape, { type Core, type LayoutOptions } from 'cytoscape';
|
|
|
3
3
|
|
|
4
4
|
/***
|
|
5
5
|
* Isolate an uncancellable layout from the displayed core and discard stopped generations.
|
|
6
|
-
*
|
|
6
|
+
* Apply current positions in one batch without rebuilding the displayed graph.
|
|
7
7
|
* A stopped ELK computation still runs to completion; this guard does not cancel its CPU work.
|
|
8
8
|
*/
|
|
9
9
|
export function runDetachedGraphLayout(cy: Core, options: LayoutOptions, onComplete: () => void) {
|
|
@@ -2,7 +2,7 @@ import type { Core } from 'cytoscape';
|
|
|
2
2
|
|
|
3
3
|
/***
|
|
4
4
|
* Size plain leaf nodes from the renderer's styled label bounds, keeping padding in the stylesheet.
|
|
5
|
-
*
|
|
5
|
+
* Reuse Cytoscape's cached text measurements during reconciliation, never a per-element
|
|
6
6
|
* style callback or a pan/zoom listener. Only write changed dimensions; bold and Unicode labels must
|
|
7
7
|
* not regress to character-count estimates. Compound dimensions remain owned by child bounds.
|
|
8
8
|
*/
|
|
@@ -6,7 +6,6 @@ import type { GraphViewEdge, GraphViewNode } from './GraphView';
|
|
|
6
6
|
|
|
7
7
|
/***
|
|
8
8
|
* Reconciles graph data in one batch while retaining positions, selection and element identity.
|
|
9
|
-
* @performance
|
|
10
9
|
* Do not replace this with remove-all/add-all: presentation updates must not discard interaction
|
|
11
10
|
* state or force the runtime to rebuild the graph. Use direct ID lookups for obsolete metadata;
|
|
12
11
|
* per-element selector scans would add avoidable work. Runtime tests cover hover/selection updates.
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import type { ZoraComponentMeta } from '../../types/authoring';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
CHESS_ALLOWED_CHILDREN,
|
|
4
|
+
CONTAINER_ALLOWED_CHILDREN,
|
|
5
|
+
GAME_ALLOWED_CHILDREN,
|
|
6
|
+
TABLETOP_ALLOWED_CHILDREN,
|
|
7
|
+
} from '../authoring/allowedChildren';
|
|
3
8
|
import { LAYOUT_PROPS } from './constants';
|
|
4
9
|
|
|
5
10
|
export const gridMeta = {
|
|
6
11
|
name: 'Grid',
|
|
7
12
|
category: 'foundation',
|
|
8
13
|
directManifestNode: true,
|
|
9
|
-
allowedChildren: [
|
|
14
|
+
allowedChildren: [
|
|
15
|
+
...CONTAINER_ALLOWED_CHILDREN,
|
|
16
|
+
...CHESS_ALLOWED_CHILDREN,
|
|
17
|
+
...GAME_ALLOWED_CHILDREN,
|
|
18
|
+
...TABLETOP_ALLOWED_CHILDREN,
|
|
19
|
+
],
|
|
10
20
|
props: {
|
|
11
21
|
...LAYOUT_PROPS,
|
|
12
22
|
cols: { type: 'number', category: 'Layout', default: 1 },
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import type { ZoraComponentMeta } from '../../types/authoring';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
CHESS_ALLOWED_CHILDREN,
|
|
4
|
+
CONTAINER_ALLOWED_CHILDREN,
|
|
5
|
+
GAME_ALLOWED_CHILDREN,
|
|
6
|
+
} from '../authoring/allowedChildren';
|
|
3
7
|
import { LAYOUT_PROPS } from './constants';
|
|
4
8
|
|
|
5
9
|
export const viewMeta = {
|
|
6
10
|
name: 'View',
|
|
7
11
|
category: 'foundation',
|
|
8
12
|
directManifestNode: true,
|
|
9
|
-
allowedChildren: [
|
|
13
|
+
allowedChildren: [
|
|
14
|
+
...CONTAINER_ALLOWED_CHILDREN,
|
|
15
|
+
...CHESS_ALLOWED_CHILDREN,
|
|
16
|
+
...GAME_ALLOWED_CHILDREN,
|
|
17
|
+
],
|
|
10
18
|
props: {
|
|
11
19
|
...LAYOUT_PROPS,
|
|
12
20
|
direction: { type: 'enum', category: 'Layout', enum: ['row', 'column'] },
|
|
@@ -20,6 +20,7 @@ import { Breadcrumbs } from '../breadcrumbs/public';
|
|
|
20
20
|
import { Button, ButtonGroup, IconButton } from '../button/public';
|
|
21
21
|
import { Card, MediaCard, MetricCard, PostCard, ProductCard } from '../card/public';
|
|
22
22
|
import { ChatListItem, MessageBubble } from '../chat/public';
|
|
23
|
+
import { ChessBoard, OpeningBook } from '../chess/public';
|
|
23
24
|
import { Chip, ChipGroup } from '../chip/public';
|
|
24
25
|
import { CollectionEditor } from '../collection-editor/public';
|
|
25
26
|
import { ContentRail } from '../content-rail/public';
|
|
@@ -34,6 +35,14 @@ import { SearchInput } from '../form/search-input/public';
|
|
|
34
35
|
import { Select } from '../form/select/public';
|
|
35
36
|
import { Switch } from '../form/switch/public';
|
|
36
37
|
import { TextInput } from '../form/text-input/public';
|
|
38
|
+
import {
|
|
39
|
+
Game,
|
|
40
|
+
GameEntity,
|
|
41
|
+
GameField,
|
|
42
|
+
GameInputZone,
|
|
43
|
+
GameMeasurementProbe,
|
|
44
|
+
GameOverlay,
|
|
45
|
+
} from '../game/public';
|
|
37
46
|
import { Gradient } from '../gradient/public';
|
|
38
47
|
import { Hero } from '../hero/public';
|
|
39
48
|
import { Icon } from '../icon/public';
|
|
@@ -53,6 +62,13 @@ import { ScreenSection, SectionHeader } from '../section/public';
|
|
|
53
62
|
import { SelectableItem } from '../selection/public';
|
|
54
63
|
import { Skeleton, SkeletonCard, SkeletonList, SkeletonText } from '../skeleton/public';
|
|
55
64
|
import { Surface } from '../surface/public';
|
|
65
|
+
import {
|
|
66
|
+
CardBack,
|
|
67
|
+
CardHand,
|
|
68
|
+
PlayingCard,
|
|
69
|
+
PokerTrainingTable,
|
|
70
|
+
TabletopTable,
|
|
71
|
+
} from '../tabletop/public';
|
|
56
72
|
import { Tab, TabList, TabPanel, Tabs } from '../tabs/public';
|
|
57
73
|
import { ThemeModeToggle } from '../theme/adapters/inbound/ThemeModeToggle';
|
|
58
74
|
import { TimePicker } from '../time-picker/public';
|
|
@@ -110,6 +126,12 @@ const _ZORA_COMPONENT_REGISTRY = {
|
|
|
110
126
|
FormError,
|
|
111
127
|
Field,
|
|
112
128
|
Gradient,
|
|
129
|
+
Game,
|
|
130
|
+
GameEntity,
|
|
131
|
+
GameField,
|
|
132
|
+
GameInputZone,
|
|
133
|
+
GameMeasurementProbe,
|
|
134
|
+
GameOverlay,
|
|
113
135
|
Heading,
|
|
114
136
|
Icon,
|
|
115
137
|
IconButton,
|
|
@@ -160,6 +182,7 @@ const _ZORA_COMPONENT_REGISTRY = {
|
|
|
160
182
|
SignInForm,
|
|
161
183
|
SignUpForm,
|
|
162
184
|
ChatListItem,
|
|
185
|
+
ChessBoard,
|
|
163
186
|
CollectionEditor,
|
|
164
187
|
ContentRail,
|
|
165
188
|
EmptyState,
|
|
@@ -168,6 +191,7 @@ const _ZORA_COMPONENT_REGISTRY = {
|
|
|
168
191
|
ListItem,
|
|
169
192
|
ListSection,
|
|
170
193
|
MessageBubble,
|
|
194
|
+
OpeningBook,
|
|
171
195
|
MissingElement,
|
|
172
196
|
PostCard,
|
|
173
197
|
ProductCard,
|
|
@@ -178,6 +202,11 @@ const _ZORA_COMPONENT_REGISTRY = {
|
|
|
178
202
|
SectionHeader,
|
|
179
203
|
SelectableItem,
|
|
180
204
|
PaletteItem,
|
|
205
|
+
CardBack,
|
|
206
|
+
CardHand,
|
|
207
|
+
PlayingCard,
|
|
208
|
+
TabletopTable,
|
|
209
|
+
PokerTrainingTable,
|
|
181
210
|
Timeline,
|
|
182
211
|
TreeItem,
|
|
183
212
|
TreeView,
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import type { CardBackProps } from '../../../../types/tabletop';
|
|
5
|
+
import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';
|
|
6
|
+
import { useZoraTheme } from '../../../theme/composition/useZoraTheme';
|
|
7
|
+
import { createTabletopColorScheme } from '../../utils/createTabletopColorScheme';
|
|
8
|
+
import { getTabletopCardDimensions } from '../../utils/getTabletopCardDimensions';
|
|
9
|
+
|
|
10
|
+
/*** Renders a face-down card with a non-revealing accessible label. */
|
|
11
|
+
export const CardBack = withZoraThemeScope(CardBackInner);
|
|
12
|
+
|
|
13
|
+
/*** Renders the card back using the active ZORA theme. */
|
|
14
|
+
function CardBackInner({
|
|
15
|
+
size = 'medium',
|
|
16
|
+
muted = false,
|
|
17
|
+
accessibilityLabel,
|
|
18
|
+
colorScheme,
|
|
19
|
+
testID,
|
|
20
|
+
}: CardBackProps) {
|
|
21
|
+
const { theme } = useZoraTheme();
|
|
22
|
+
const colors = React.useMemo(
|
|
23
|
+
() => createTabletopColorScheme(theme, colorScheme),
|
|
24
|
+
[colorScheme, theme],
|
|
25
|
+
);
|
|
26
|
+
const dimensions = getTabletopCardDimensions(size);
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<View
|
|
30
|
+
accessibilityLabel={accessibilityLabel ?? 'Hidden card'}
|
|
31
|
+
accessibilityRole="image"
|
|
32
|
+
style={[
|
|
33
|
+
styles.card,
|
|
34
|
+
{
|
|
35
|
+
backgroundColor: colors.cardBack,
|
|
36
|
+
borderColor: colors.cardBackBorder,
|
|
37
|
+
borderRadius: dimensions.radius,
|
|
38
|
+
height: dimensions.height,
|
|
39
|
+
opacity: muted ? 0.48 : 1,
|
|
40
|
+
width: dimensions.width,
|
|
41
|
+
},
|
|
42
|
+
]}
|
|
43
|
+
testID={testID}
|
|
44
|
+
>
|
|
45
|
+
<View
|
|
46
|
+
style={[
|
|
47
|
+
styles.inner,
|
|
48
|
+
{
|
|
49
|
+
borderColor: colors.cardBackBorder,
|
|
50
|
+
borderRadius: Math.max(2, dimensions.radius - 3),
|
|
51
|
+
},
|
|
52
|
+
]}
|
|
53
|
+
/>
|
|
54
|
+
</View>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const styles = StyleSheet.create({
|
|
59
|
+
card: {
|
|
60
|
+
alignItems: 'center',
|
|
61
|
+
borderWidth: 1,
|
|
62
|
+
justifyContent: 'center',
|
|
63
|
+
},
|
|
64
|
+
inner: {
|
|
65
|
+
borderWidth: 1,
|
|
66
|
+
height: '68%',
|
|
67
|
+
opacity: 0.48,
|
|
68
|
+
width: '68%',
|
|
69
|
+
},
|
|
70
|
+
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import type { CardHandProps } from '../../../../types/tabletop';
|
|
5
|
+
import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';
|
|
6
|
+
import { CardBack } from './CardBack';
|
|
7
|
+
import { PlayingCard } from './PlayingCard';
|
|
8
|
+
|
|
9
|
+
/*** Renders a compact row of face-up and face-down cards. */
|
|
10
|
+
export const CardHand = withZoraThemeScope(CardHandInner);
|
|
11
|
+
|
|
12
|
+
/*** Creates stable indices for non-revealing card backs. */
|
|
13
|
+
function createFaceDownCards(count: number): readonly number[] {
|
|
14
|
+
return Array.from({ length: Math.max(0, count) }, (_, index) => index);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/*** Renders the card row from caller-owned values. */
|
|
18
|
+
function CardHandInner({
|
|
19
|
+
cards = [],
|
|
20
|
+
faceDownCards = 0,
|
|
21
|
+
size = 'medium',
|
|
22
|
+
muted = false,
|
|
23
|
+
colorScheme,
|
|
24
|
+
accessibilityLabel,
|
|
25
|
+
testID,
|
|
26
|
+
}: CardHandProps) {
|
|
27
|
+
const hiddenCards = createFaceDownCards(faceDownCards);
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<View accessibilityLabel={accessibilityLabel} style={styles.hand} testID={testID}>
|
|
31
|
+
{cards.map((card, index) => (
|
|
32
|
+
<PlayingCard
|
|
33
|
+
card={card}
|
|
34
|
+
colorScheme={colorScheme}
|
|
35
|
+
key={`${card.rank}-${card.suit}-${index}`}
|
|
36
|
+
muted={muted}
|
|
37
|
+
size={size}
|
|
38
|
+
testID={testID ? `${testID}-card-${index}` : undefined}
|
|
39
|
+
/>
|
|
40
|
+
))}
|
|
41
|
+
{hiddenCards.map((index) => (
|
|
42
|
+
<CardBack
|
|
43
|
+
colorScheme={colorScheme}
|
|
44
|
+
key={`hidden-${index}`}
|
|
45
|
+
muted={muted}
|
|
46
|
+
size={size}
|
|
47
|
+
testID={testID ? `${testID}-hidden-${index}` : undefined}
|
|
48
|
+
/>
|
|
49
|
+
))}
|
|
50
|
+
</View>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const styles = StyleSheet.create({
|
|
55
|
+
hand: {
|
|
56
|
+
alignItems: 'center',
|
|
57
|
+
flexDirection: 'row',
|
|
58
|
+
gap: 4,
|
|
59
|
+
justifyContent: 'center',
|
|
60
|
+
},
|
|
61
|
+
});
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import type { PlayingCardProps } from '../../../../types/tabletop';
|
|
5
|
+
import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';
|
|
6
|
+
import { useZoraTheme } from '../../../theme/composition/useZoraTheme';
|
|
7
|
+
import { createTabletopColorScheme } from '../../utils/createTabletopColorScheme';
|
|
8
|
+
import { getPlayingCardLabel } from '../../utils/getPlayingCardLabel';
|
|
9
|
+
import { getTabletopCardDimensions } from '../../utils/getTabletopCardDimensions';
|
|
10
|
+
|
|
11
|
+
const suitMarks = { clubs: '♣', diamonds: '♦', hearts: '♥', spades: '♠' } as const;
|
|
12
|
+
|
|
13
|
+
/*** Renders a face-up playing card with an accessible rank and suit. */
|
|
14
|
+
export const PlayingCard = withZoraThemeScope(PlayingCardInner);
|
|
15
|
+
|
|
16
|
+
/*** Renders the card face using the active ZORA theme. */
|
|
17
|
+
function PlayingCardInner({
|
|
18
|
+
card,
|
|
19
|
+
size = 'medium',
|
|
20
|
+
selected = false,
|
|
21
|
+
muted = false,
|
|
22
|
+
accessibilityLabel,
|
|
23
|
+
colorScheme,
|
|
24
|
+
testID,
|
|
25
|
+
}: PlayingCardProps) {
|
|
26
|
+
const { theme } = useZoraTheme();
|
|
27
|
+
const colors = React.useMemo(
|
|
28
|
+
() => createTabletopColorScheme(theme, colorScheme),
|
|
29
|
+
[colorScheme, theme],
|
|
30
|
+
);
|
|
31
|
+
const dimensions = getTabletopCardDimensions(size);
|
|
32
|
+
const suitColor =
|
|
33
|
+
card.suit === 'hearts' || card.suit === 'diamonds' ? colors.redSuitText : colors.cardText;
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<View
|
|
37
|
+
accessibilityLabel={accessibilityLabel ?? getPlayingCardLabel(card)}
|
|
38
|
+
accessibilityRole="image"
|
|
39
|
+
style={[
|
|
40
|
+
styles.card,
|
|
41
|
+
{
|
|
42
|
+
backgroundColor: colors.cardSurface,
|
|
43
|
+
borderColor: selected ? colors.seatSelectedBorder : colors.cardBorder,
|
|
44
|
+
borderRadius: dimensions.radius,
|
|
45
|
+
height: dimensions.height,
|
|
46
|
+
opacity: muted ? 0.48 : 1,
|
|
47
|
+
width: dimensions.width,
|
|
48
|
+
},
|
|
49
|
+
]}
|
|
50
|
+
testID={testID}
|
|
51
|
+
>
|
|
52
|
+
<Text
|
|
53
|
+
selectable={false}
|
|
54
|
+
style={[
|
|
55
|
+
styles.rank,
|
|
56
|
+
{
|
|
57
|
+
color: suitColor,
|
|
58
|
+
fontSize: dimensions.rankFontSize,
|
|
59
|
+
lineHeight: dimensions.rankFontSize + 4,
|
|
60
|
+
},
|
|
61
|
+
]}
|
|
62
|
+
>
|
|
63
|
+
{card.rank}
|
|
64
|
+
</Text>
|
|
65
|
+
<Text
|
|
66
|
+
selectable={false}
|
|
67
|
+
style={[
|
|
68
|
+
styles.suit,
|
|
69
|
+
{
|
|
70
|
+
color: suitColor,
|
|
71
|
+
fontSize: dimensions.suitFontSize,
|
|
72
|
+
lineHeight: dimensions.suitFontSize + 3,
|
|
73
|
+
},
|
|
74
|
+
]}
|
|
75
|
+
>
|
|
76
|
+
{suitMarks[card.suit]}
|
|
77
|
+
</Text>
|
|
78
|
+
</View>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const styles = StyleSheet.create({
|
|
83
|
+
card: {
|
|
84
|
+
alignItems: 'center',
|
|
85
|
+
borderWidth: 1,
|
|
86
|
+
justifyContent: 'center',
|
|
87
|
+
},
|
|
88
|
+
rank: {
|
|
89
|
+
fontWeight: '800',
|
|
90
|
+
},
|
|
91
|
+
suit: {
|
|
92
|
+
fontWeight: '700',
|
|
93
|
+
marginTop: -2,
|
|
94
|
+
},
|
|
95
|
+
});
|