@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,32 @@
|
|
|
1
|
+
export type {
|
|
2
|
+
CardBackProps,
|
|
3
|
+
CardHandProps,
|
|
4
|
+
CreatePokerTrainingTableStateOptions,
|
|
5
|
+
CreateTabletopGameSeatsInput,
|
|
6
|
+
PlayingCardProps,
|
|
7
|
+
PlayingCardSuit,
|
|
8
|
+
PlayingCardValue,
|
|
9
|
+
PokerTrainingPlayer,
|
|
10
|
+
PokerTrainingTableProps,
|
|
11
|
+
PokerTrainingTableSize,
|
|
12
|
+
PokerTrainingTableState,
|
|
13
|
+
PokerTrainingTaskTableData,
|
|
14
|
+
TabletopCardSize,
|
|
15
|
+
TabletopColorOverrides,
|
|
16
|
+
TabletopColorScheme,
|
|
17
|
+
TabletopGameParticipantState,
|
|
18
|
+
TabletopGameSeatDefinition,
|
|
19
|
+
TabletopGameSeatPresentation,
|
|
20
|
+
TabletopSeatCount,
|
|
21
|
+
TabletopSeatState,
|
|
22
|
+
TabletopShape,
|
|
23
|
+
TabletopTableProps,
|
|
24
|
+
} from '../../types/tabletop';
|
|
25
|
+
export { CardBack } from './adapters/inbound/CardBack';
|
|
26
|
+
export { CardHand } from './adapters/inbound/CardHand';
|
|
27
|
+
export { PlayingCard } from './adapters/inbound/PlayingCard';
|
|
28
|
+
export { PokerTrainingTable } from './adapters/inbound/PokerTrainingTable';
|
|
29
|
+
export { TabletopTable } from './adapters/inbound/TabletopTable';
|
|
30
|
+
export { createPokerTrainingTableState } from './utils/createPokerTrainingTableState';
|
|
31
|
+
export { createTabletopColorScheme } from './utils/createTabletopColorScheme';
|
|
32
|
+
export { createTabletopGameSeats } from './utils/createTabletopGameSeats';
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
CreatePokerTrainingTableStateOptions,
|
|
3
|
+
PokerTrainingPlayer,
|
|
4
|
+
PokerTrainingTableSize,
|
|
5
|
+
PokerTrainingTableState,
|
|
6
|
+
PokerTrainingTaskTableData,
|
|
7
|
+
TabletopGameParticipantState,
|
|
8
|
+
} from '../../../types/tabletop';
|
|
9
|
+
import { createTabletopGameSeats } from './createTabletopGameSeats';
|
|
10
|
+
|
|
11
|
+
/***
|
|
12
|
+
* Adapts the table-relevant subset of a poker training task to generic tabletop presentation state.
|
|
13
|
+
*
|
|
14
|
+
* The canonical poker ring for the task table size is rotated so the hero occupies the first
|
|
15
|
+
* (bottom) tabletop seat. Players omitted by the task are reconstructed as folded with the
|
|
16
|
+
* configured default stack.
|
|
17
|
+
*
|
|
18
|
+
* Accepts serializable poker training task data plus presentation defaults for omitted fields and
|
|
19
|
+
* returns seats and shared-table content ready for `TabletopTable`.
|
|
20
|
+
*/
|
|
21
|
+
export function createPokerTrainingTableState(
|
|
22
|
+
task: PokerTrainingTaskTableData,
|
|
23
|
+
{ defaultStackBigBlinds = 100 }: CreatePokerTrainingTableStateOptions = {},
|
|
24
|
+
): PokerTrainingTableState {
|
|
25
|
+
const tableSize = task.tableSize ?? '9max';
|
|
26
|
+
const positions = tableSize === '6max' ? sixMaxPokerPositions : nineMaxPokerPositions;
|
|
27
|
+
const bigBlind = task.blinds?.big;
|
|
28
|
+
const heroPosition = task.heroPosition ?? task.players?.find((player) => player.isHero)?.position;
|
|
29
|
+
const orderedPositions = rotatePokerPositions(positions, heroPosition);
|
|
30
|
+
const defaultStack = `${formatAmount(defaultStackBigBlinds)} BB`;
|
|
31
|
+
const participants = (task.players ?? []).map((player) =>
|
|
32
|
+
createPokerParticipantState(player, task, bigBlind),
|
|
33
|
+
);
|
|
34
|
+
const seats = createTabletopGameSeats({
|
|
35
|
+
seats: orderedPositions.map((position) => ({
|
|
36
|
+
id: position,
|
|
37
|
+
defaultState: {
|
|
38
|
+
label: position,
|
|
39
|
+
tokenLabel: position === 'BTN' ? 'D' : undefined,
|
|
40
|
+
},
|
|
41
|
+
})),
|
|
42
|
+
participants,
|
|
43
|
+
missingParticipantState: {
|
|
44
|
+
disabled: true,
|
|
45
|
+
muted: true,
|
|
46
|
+
sublabel: `${defaultStack} · Folded`,
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
return {
|
|
51
|
+
seatCount: positions.length,
|
|
52
|
+
seats,
|
|
53
|
+
centerCards: task.communityCards ?? [],
|
|
54
|
+
centerLabel: task.pot === undefined ? undefined : `Pot ${formatAmount(task.pot)}`,
|
|
55
|
+
centerSublabel:
|
|
56
|
+
task.blinds === undefined
|
|
57
|
+
? undefined
|
|
58
|
+
: `Blinds ${formatAmount(task.blinds.small)} / ${formatAmount(task.blinds.big)}`,
|
|
59
|
+
accessibilityLabel: createPokerAccessibilityLabel(tableSize, heroPosition, task),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const sixMaxPokerPositions = ['BTN', 'SB', 'BB', 'UTG', 'HJ', 'CO'] as const;
|
|
64
|
+
const nineMaxPokerPositions = [
|
|
65
|
+
'BTN',
|
|
66
|
+
'SB',
|
|
67
|
+
'BB',
|
|
68
|
+
'UTG',
|
|
69
|
+
'UTG+1',
|
|
70
|
+
'UTG+2',
|
|
71
|
+
'MP',
|
|
72
|
+
'HJ',
|
|
73
|
+
'CO',
|
|
74
|
+
] as const;
|
|
75
|
+
|
|
76
|
+
/*** Rotates one canonical poker ring to place the hero at the bottom seat. */
|
|
77
|
+
function rotatePokerPositions(
|
|
78
|
+
positions: readonly string[],
|
|
79
|
+
heroPosition: string | undefined,
|
|
80
|
+
): readonly string[] {
|
|
81
|
+
const heroIndex = positions.findIndex((position) => position === heroPosition);
|
|
82
|
+
if (heroIndex <= 0) return positions;
|
|
83
|
+
|
|
84
|
+
return [...positions.slice(heroIndex), ...positions.slice(0, heroIndex)];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/*** Converts one poker participant record into a generic seat-state override. */
|
|
88
|
+
function createPokerParticipantState(
|
|
89
|
+
player: PokerTrainingPlayer,
|
|
90
|
+
task: PokerTrainingTaskTableData,
|
|
91
|
+
bigBlind: number | undefined,
|
|
92
|
+
): TabletopGameParticipantState {
|
|
93
|
+
const isHero = player.isHero === true || player.position === task.heroPosition;
|
|
94
|
+
const cards = player.cards ?? (isHero ? task.heroCards : undefined);
|
|
95
|
+
const folded = player.folded === true;
|
|
96
|
+
|
|
97
|
+
return {
|
|
98
|
+
seatId: player.position,
|
|
99
|
+
state: {
|
|
100
|
+
cards,
|
|
101
|
+
disabled: folded,
|
|
102
|
+
faceDownCards: cards === undefined && !folded && !isHero ? 2 : undefined,
|
|
103
|
+
muted: folded,
|
|
104
|
+
selected: isHero,
|
|
105
|
+
sublabel: formatPlayerSublabel(player, bigBlind),
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/*** Formats stack and optional committed chips as a compact seat sublabel. */
|
|
111
|
+
function formatPlayerSublabel(
|
|
112
|
+
player: PokerTrainingPlayer,
|
|
113
|
+
bigBlind: number | undefined,
|
|
114
|
+
): string | undefined {
|
|
115
|
+
const stack = player.stack === undefined ? undefined : formatChipStack(player.stack, bigBlind);
|
|
116
|
+
const bet = player.bet === undefined ? undefined : `Bet ${formatChipStack(player.bet, bigBlind)}`;
|
|
117
|
+
const parts = [stack, bet, player.folded === true ? 'Folded' : undefined].filter(
|
|
118
|
+
(part): part is string => part !== undefined,
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
return parts.length === 0 ? undefined : parts.join(' · ');
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/*** Formats chips as big blinds when a positive blind is known, otherwise as an amount. */
|
|
125
|
+
function formatChipStack(amount: number, bigBlind: number | undefined): string {
|
|
126
|
+
if (bigBlind !== undefined && bigBlind > 0) {
|
|
127
|
+
return `${formatAmount(amount / bigBlind)} BB`;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return `${formatAmount(amount)} chips`;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/*** Formats a numeric poker amount consistently across native and web runtimes. */
|
|
134
|
+
function formatAmount(amount: number): string {
|
|
135
|
+
return new Intl.NumberFormat('en-US', { maximumFractionDigits: 2 }).format(amount);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/*** Summarizes the reconstructed table for assistive technologies. */
|
|
139
|
+
function createPokerAccessibilityLabel(
|
|
140
|
+
tableSize: PokerTrainingTableSize,
|
|
141
|
+
heroPosition: string | undefined,
|
|
142
|
+
task: PokerTrainingTaskTableData,
|
|
143
|
+
): string {
|
|
144
|
+
const parts = [`${tableSize === '6max' ? 'Six' : 'Nine'}-player poker table`];
|
|
145
|
+
if (heroPosition !== undefined) parts.push(`Hero ${heroPosition}`);
|
|
146
|
+
if (task.pot !== undefined) parts.push(`Pot ${formatAmount(task.pot)}`);
|
|
147
|
+
if (task.blinds !== undefined) {
|
|
148
|
+
parts.push(`Blinds ${formatAmount(task.blinds.small)} / ${formatAmount(task.blinds.big)}`);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return `${parts.join('. ')}.`;
|
|
152
|
+
}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getReadableForeground,
|
|
3
|
+
parseHexColor as parseCanonicalHexColor,
|
|
4
|
+
} from '@ankhorage/color-theory';
|
|
5
|
+
|
|
6
|
+
import type { TabletopColorOverrides, TabletopColorScheme } from '../../../types/tabletop';
|
|
7
|
+
|
|
8
|
+
interface TabletopColorThemeShape {
|
|
9
|
+
semantics: {
|
|
10
|
+
action: {
|
|
11
|
+
primary: {
|
|
12
|
+
base: string;
|
|
13
|
+
softBg: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
content: {
|
|
17
|
+
default: string;
|
|
18
|
+
muted: string;
|
|
19
|
+
};
|
|
20
|
+
neutral: {
|
|
21
|
+
border: string;
|
|
22
|
+
divider: string;
|
|
23
|
+
surface: string;
|
|
24
|
+
surfaceHover: string;
|
|
25
|
+
};
|
|
26
|
+
warning: {
|
|
27
|
+
base: string;
|
|
28
|
+
softBg: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface RgbColor {
|
|
34
|
+
readonly red: number;
|
|
35
|
+
readonly green: number;
|
|
36
|
+
readonly blue: number;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const MINIMUM_READABLE_CONTRAST = 4.5;
|
|
40
|
+
|
|
41
|
+
/***
|
|
42
|
+
* Creates the theme-derived color palette used by tabletop primitives.
|
|
43
|
+
*
|
|
44
|
+
* Use `createTabletopColorScheme` when custom components need to align with the
|
|
45
|
+
* same card, table, seat, token, and contrast-aware foreground colors as the
|
|
46
|
+
* built-in tabletop components.
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
export function createTabletopColorScheme(
|
|
50
|
+
theme: TabletopColorThemeShape,
|
|
51
|
+
overrides: TabletopColorOverrides = {},
|
|
52
|
+
): TabletopColorScheme {
|
|
53
|
+
const cardSurface = overrides.cardSurface ?? theme.semantics.neutral.surface;
|
|
54
|
+
const seatSurface = overrides.seatSurface ?? theme.semantics.neutral.surface;
|
|
55
|
+
const tableFelt = overrides.tableFelt ?? theme.semantics.action.primary.softBg;
|
|
56
|
+
const tokenSurface = overrides.tokenSurface ?? theme.semantics.warning.softBg;
|
|
57
|
+
|
|
58
|
+
const cardText =
|
|
59
|
+
overrides.cardText ??
|
|
60
|
+
resolveReadableTextColor(
|
|
61
|
+
cardSurface,
|
|
62
|
+
theme.semantics.content.default,
|
|
63
|
+
theme.semantics.content.muted,
|
|
64
|
+
);
|
|
65
|
+
const seatText =
|
|
66
|
+
overrides.seatText ??
|
|
67
|
+
resolveReadableTextColor(
|
|
68
|
+
seatSurface,
|
|
69
|
+
theme.semantics.content.default,
|
|
70
|
+
theme.semantics.content.muted,
|
|
71
|
+
);
|
|
72
|
+
const tableText =
|
|
73
|
+
overrides.tableText ??
|
|
74
|
+
resolveReadableTextColor(
|
|
75
|
+
tableFelt,
|
|
76
|
+
theme.semantics.content.default,
|
|
77
|
+
theme.semantics.content.muted,
|
|
78
|
+
);
|
|
79
|
+
const tokenText =
|
|
80
|
+
overrides.tokenText ??
|
|
81
|
+
resolveReadableTextColor(
|
|
82
|
+
tokenSurface,
|
|
83
|
+
theme.semantics.content.default,
|
|
84
|
+
theme.semantics.content.muted,
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
cardBack: overrides.cardBack ?? theme.semantics.warning.base,
|
|
89
|
+
cardBackBorder: overrides.cardBackBorder ?? theme.semantics.neutral.border,
|
|
90
|
+
cardBorder: overrides.cardBorder ?? theme.semantics.neutral.border,
|
|
91
|
+
cardSurface,
|
|
92
|
+
cardText,
|
|
93
|
+
mutedText:
|
|
94
|
+
overrides.mutedText ??
|
|
95
|
+
resolveReadableTextColor(cardSurface, theme.semantics.content.muted, cardText),
|
|
96
|
+
redSuitText:
|
|
97
|
+
overrides.redSuitText ??
|
|
98
|
+
resolveReadableTextColor(cardSurface, theme.semantics.warning.base, cardText),
|
|
99
|
+
seatBorder: overrides.seatBorder ?? theme.semantics.neutral.divider,
|
|
100
|
+
seatMutedText:
|
|
101
|
+
overrides.seatMutedText ??
|
|
102
|
+
resolveReadableTextColor(seatSurface, theme.semantics.content.muted, seatText),
|
|
103
|
+
seatSelectedBorder: overrides.seatSelectedBorder ?? theme.semantics.action.primary.base,
|
|
104
|
+
seatSurface,
|
|
105
|
+
seatText,
|
|
106
|
+
tableBorder: overrides.tableBorder ?? theme.semantics.warning.base,
|
|
107
|
+
tableFelt,
|
|
108
|
+
tableInnerBorder: overrides.tableInnerBorder ?? theme.semantics.neutral.divider,
|
|
109
|
+
tableMutedText:
|
|
110
|
+
overrides.tableMutedText ??
|
|
111
|
+
resolveReadableTextColor(tableFelt, theme.semantics.content.muted, tableText),
|
|
112
|
+
tableText,
|
|
113
|
+
tokenSurface,
|
|
114
|
+
tokenText,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/*** Chooses the most legible supplied foreground for a themed surface. */
|
|
119
|
+
function resolveReadableTextColor(background: string, preferred: string, fallback: string): string {
|
|
120
|
+
const preferredContrast = getContrastRatio(background, preferred);
|
|
121
|
+
if (preferredContrast !== null && preferredContrast >= MINIMUM_READABLE_CONTRAST) {
|
|
122
|
+
return preferred;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const parsedBackground = parseHexColor(background);
|
|
126
|
+
const normalizedBackground =
|
|
127
|
+
parsedBackground === null ? null : parseCanonicalHexColor(toHexColor(parsedBackground));
|
|
128
|
+
const strongestForeground =
|
|
129
|
+
normalizedBackground === null
|
|
130
|
+
? undefined
|
|
131
|
+
: getReadableForeground(normalizedBackground).foreground;
|
|
132
|
+
const candidates = uniqueColors([
|
|
133
|
+
preferred,
|
|
134
|
+
fallback,
|
|
135
|
+
...(strongestForeground === undefined ? [] : [strongestForeground]),
|
|
136
|
+
]);
|
|
137
|
+
const [readableCandidate] = candidates
|
|
138
|
+
.map((candidate) => ({ candidate, contrast: getContrastRatio(background, candidate) }))
|
|
139
|
+
.filter(
|
|
140
|
+
(entry): entry is { readonly candidate: string; readonly contrast: number } =>
|
|
141
|
+
entry.contrast !== null,
|
|
142
|
+
)
|
|
143
|
+
.sort((left, right) => right.contrast - left.contrast);
|
|
144
|
+
|
|
145
|
+
return readableCandidate?.candidate ?? preferred;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/*** Converts a parsed color to Color Theory's canonical six-digit input. */
|
|
149
|
+
function toHexColor(color: RgbColor): string {
|
|
150
|
+
return `#${[color.red, color.green, color.blue].map((channel) => channel.toString(16).padStart(2, '0')).join('')}`;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/*** Removes duplicate contrast candidates without changing their order. */
|
|
154
|
+
function uniqueColors(colors: readonly string[]): string[] {
|
|
155
|
+
return [...new Set(colors)];
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/*** Measures contrast when both colors can be parsed as hex. */
|
|
159
|
+
function getContrastRatio(background: string, foreground: string): number | null {
|
|
160
|
+
const backgroundColor = parseHexColor(background);
|
|
161
|
+
const foregroundColor = parseHexColor(foreground);
|
|
162
|
+
|
|
163
|
+
if (backgroundColor === null || foregroundColor === null) return null;
|
|
164
|
+
|
|
165
|
+
const backgroundLuminance = getRelativeLuminance(backgroundColor);
|
|
166
|
+
const foregroundLuminance = getRelativeLuminance(foregroundColor);
|
|
167
|
+
const lighter = Math.max(backgroundLuminance, foregroundLuminance);
|
|
168
|
+
const darker = Math.min(backgroundLuminance, foregroundLuminance);
|
|
169
|
+
|
|
170
|
+
return (lighter + 0.05) / (darker + 0.05);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/*** Parses the hex colors supported by the tabletop palette. */
|
|
174
|
+
function parseHexColor(color: string): RgbColor | null {
|
|
175
|
+
const value = color.trim();
|
|
176
|
+
const hex = value.startsWith('#') ? value.slice(1) : '';
|
|
177
|
+
if (!isSupportedHexLength(hex) || !isHexColorValue(hex)) return null;
|
|
178
|
+
|
|
179
|
+
if (hex.length === 3) {
|
|
180
|
+
const red = hex.slice(0, 1);
|
|
181
|
+
const green = hex.slice(1, 2);
|
|
182
|
+
const blue = hex.slice(2, 3);
|
|
183
|
+
|
|
184
|
+
return {
|
|
185
|
+
red: parseInt(red + red, 16),
|
|
186
|
+
green: parseInt(green + green, 16),
|
|
187
|
+
blue: parseInt(blue + blue, 16),
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
return {
|
|
192
|
+
red: parseInt(hex.slice(0, 2), 16),
|
|
193
|
+
green: parseInt(hex.slice(2, 4), 16),
|
|
194
|
+
blue: parseInt(hex.slice(4, 6), 16),
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/*** Checks the supported short, full, and alpha hex lengths. */
|
|
199
|
+
function isSupportedHexLength(hex: string): boolean {
|
|
200
|
+
return hex.length === 3 || hex.length === 6 || hex.length === 8;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/*** Rejects non-hexadecimal color digits. */
|
|
204
|
+
function isHexColorValue(hex: string): boolean {
|
|
205
|
+
return [...hex].every((character) => isHexCharacter(character));
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/*** Checks whether a character is a hexadecimal digit. */
|
|
209
|
+
function isHexCharacter(character: string): boolean {
|
|
210
|
+
const code = character.charCodeAt(0);
|
|
211
|
+
const isDigit = code >= 48 && code <= 57;
|
|
212
|
+
const isUpperHex = code >= 65 && code <= 70;
|
|
213
|
+
const isLowerHex = code >= 97 && code <= 102;
|
|
214
|
+
|
|
215
|
+
return isDigit || isUpperHex || isLowerHex;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/*** Computes relative luminance for one RGB color. */
|
|
219
|
+
function getRelativeLuminance(color: RgbColor): number {
|
|
220
|
+
const red = normalizeColorChannel(color.red);
|
|
221
|
+
const green = normalizeColorChannel(color.green);
|
|
222
|
+
const blue = normalizeColorChannel(color.blue);
|
|
223
|
+
|
|
224
|
+
return 0.2126 * red + 0.7152 * green + 0.0722 * blue;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/*** Converts an RGB channel into linear light. */
|
|
228
|
+
function normalizeColorChannel(value: number): number {
|
|
229
|
+
const normalized = value / 255;
|
|
230
|
+
if (normalized <= 0.03928) return normalized / 12.92;
|
|
231
|
+
return ((normalized + 0.055) / 1.055) ** 2.4;
|
|
232
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { CreateTabletopGameSeatsInput, TabletopSeatState } from '../../../types/tabletop';
|
|
2
|
+
|
|
3
|
+
/***
|
|
4
|
+
* Joins an ordered game layout with the participant states currently present in a scene.
|
|
5
|
+
*
|
|
6
|
+
* Missing participants retain their seat definition and receive the configured fallback state,
|
|
7
|
+
* which lets card games represent folded, eliminated, disconnected, or otherwise inactive seats
|
|
8
|
+
* without embedding those game rules in the tabletop renderer.
|
|
9
|
+
*
|
|
10
|
+
* Accepts ordered seats, participant overrides, and the fallback for missing participants, then
|
|
11
|
+
* returns normalized tabletop seats in the same order as the supplied seat definitions.
|
|
12
|
+
*/
|
|
13
|
+
export function createTabletopGameSeats({
|
|
14
|
+
seats,
|
|
15
|
+
participants,
|
|
16
|
+
missingParticipantState = { disabled: true, muted: true },
|
|
17
|
+
}: CreateTabletopGameSeatsInput): readonly TabletopSeatState[] {
|
|
18
|
+
const participantsBySeat = new Map(
|
|
19
|
+
participants.map((participant) => [participant.seatId, participant] as const),
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
return seats.map((seat) => {
|
|
23
|
+
const participant = participantsBySeat.get(seat.id);
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
id: seat.id,
|
|
27
|
+
...seat.defaultState,
|
|
28
|
+
...(participant === undefined ? missingParticipantState : participant.state),
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PlayingCardValue } from '../../../types/tabletop';
|
|
2
|
+
|
|
3
|
+
const rankLabels: Readonly<Record<string, string>> = { A: 'ace', J: 'jack', K: 'king', Q: 'queen' };
|
|
4
|
+
|
|
5
|
+
/*** Gives a face-up card a spoken rank and suit. */
|
|
6
|
+
export function getPlayingCardLabel(card: PlayingCardValue): string {
|
|
7
|
+
return `${rankLabels[card.rank] ?? card.rank} of ${card.suit}`;
|
|
8
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { TabletopCardSize } from '../../../types/tabletop';
|
|
2
|
+
|
|
3
|
+
interface TabletopCardDimensions {
|
|
4
|
+
readonly width: number;
|
|
5
|
+
readonly height: number;
|
|
6
|
+
readonly radius: number;
|
|
7
|
+
readonly rankFontSize: number;
|
|
8
|
+
readonly suitFontSize: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const cardDimensions: Readonly<Record<TabletopCardSize, TabletopCardDimensions>> = {
|
|
12
|
+
large: {
|
|
13
|
+
width: 56,
|
|
14
|
+
height: 80,
|
|
15
|
+
radius: 8,
|
|
16
|
+
rankFontSize: 20,
|
|
17
|
+
suitFontSize: 16,
|
|
18
|
+
},
|
|
19
|
+
medium: {
|
|
20
|
+
width: 40,
|
|
21
|
+
height: 56,
|
|
22
|
+
radius: 6,
|
|
23
|
+
rankFontSize: 15,
|
|
24
|
+
suitFontSize: 12,
|
|
25
|
+
},
|
|
26
|
+
small: {
|
|
27
|
+
width: 28,
|
|
28
|
+
height: 40,
|
|
29
|
+
radius: 5,
|
|
30
|
+
rankFontSize: 11,
|
|
31
|
+
suitFontSize: 9,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/*** Returns the published dimensions for a tabletop card size. */
|
|
36
|
+
export function getTabletopCardDimensions(size: TabletopCardSize): TabletopCardDimensions {
|
|
37
|
+
switch (size) {
|
|
38
|
+
case 'small':
|
|
39
|
+
return cardDimensions.small;
|
|
40
|
+
case 'large':
|
|
41
|
+
return cardDimensions.large;
|
|
42
|
+
case 'medium':
|
|
43
|
+
return cardDimensions.medium;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { TabletopSeatCount } from '../../../types/tabletop';
|
|
2
|
+
|
|
3
|
+
type TabletopSeatPositionValue = `${number}%`;
|
|
4
|
+
|
|
5
|
+
interface TabletopSeatPosition {
|
|
6
|
+
readonly top: TabletopSeatPositionValue;
|
|
7
|
+
readonly left: TabletopSeatPositionValue;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const fallbackSeatPosition: TabletopSeatPosition = { top: '82%', left: '50%' };
|
|
11
|
+
|
|
12
|
+
const seatPositions: Readonly<Record<TabletopSeatCount, readonly TabletopSeatPosition[]>> = {
|
|
13
|
+
2: [fallbackSeatPosition, { top: '18%', left: '50%' }],
|
|
14
|
+
3: [fallbackSeatPosition, { top: '28%', left: '18%' }, { top: '28%', left: '82%' }],
|
|
15
|
+
4: [
|
|
16
|
+
fallbackSeatPosition,
|
|
17
|
+
{ top: '50%', left: '12%' },
|
|
18
|
+
{ top: '18%', left: '50%' },
|
|
19
|
+
{ top: '50%', left: '88%' },
|
|
20
|
+
],
|
|
21
|
+
5: [
|
|
22
|
+
{ top: '84%', left: '50%' },
|
|
23
|
+
{ top: '62%', left: '12%' },
|
|
24
|
+
{ top: '18%', left: '24%' },
|
|
25
|
+
{ top: '18%', left: '76%' },
|
|
26
|
+
{ top: '62%', left: '88%' },
|
|
27
|
+
],
|
|
28
|
+
6: [
|
|
29
|
+
{ top: '84%', left: '50%' },
|
|
30
|
+
{ top: '68%', left: '16%' },
|
|
31
|
+
{ top: '26%', left: '16%' },
|
|
32
|
+
{ top: '16%', left: '50%' },
|
|
33
|
+
{ top: '26%', left: '84%' },
|
|
34
|
+
{ top: '68%', left: '84%' },
|
|
35
|
+
],
|
|
36
|
+
7: [
|
|
37
|
+
{ top: '86%', left: '50%' },
|
|
38
|
+
{ top: '70%', left: '14%' },
|
|
39
|
+
{ top: '34%', left: '10%' },
|
|
40
|
+
{ top: '14%', left: '34%' },
|
|
41
|
+
{ top: '14%', left: '66%' },
|
|
42
|
+
{ top: '34%', left: '90%' },
|
|
43
|
+
{ top: '70%', left: '86%' },
|
|
44
|
+
],
|
|
45
|
+
8: [
|
|
46
|
+
{ top: '86%', left: '50%' },
|
|
47
|
+
{ top: '72%', left: '16%' },
|
|
48
|
+
{ top: '50%', left: '8%' },
|
|
49
|
+
{ top: '20%', left: '20%' },
|
|
50
|
+
{ top: '14%', left: '50%' },
|
|
51
|
+
{ top: '20%', left: '80%' },
|
|
52
|
+
{ top: '50%', left: '92%' },
|
|
53
|
+
{ top: '72%', left: '84%' },
|
|
54
|
+
],
|
|
55
|
+
9: [
|
|
56
|
+
{ top: '88%', left: '50%' },
|
|
57
|
+
{ top: '78%', left: '12%' },
|
|
58
|
+
{ top: '50%', left: '4%' },
|
|
59
|
+
{ top: '18%', left: '10%' },
|
|
60
|
+
{ top: '8%', left: '28%' },
|
|
61
|
+
{ top: '8%', left: '50%' },
|
|
62
|
+
{ top: '8%', left: '72%' },
|
|
63
|
+
{ top: '18%', left: '90%' },
|
|
64
|
+
{ top: '50%', left: '96%' },
|
|
65
|
+
],
|
|
66
|
+
10: [
|
|
67
|
+
{ top: '88%', left: '50%' },
|
|
68
|
+
{ top: '80%', left: '20%' },
|
|
69
|
+
{ top: '58%', left: '6%' },
|
|
70
|
+
{ top: '30%', left: '8%' },
|
|
71
|
+
{ top: '10%', left: '30%' },
|
|
72
|
+
{ top: '8%', left: '50%' },
|
|
73
|
+
{ top: '10%', left: '70%' },
|
|
74
|
+
{ top: '30%', left: '92%' },
|
|
75
|
+
{ top: '58%', left: '94%' },
|
|
76
|
+
{ top: '80%', left: '80%' },
|
|
77
|
+
],
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/*** Clamps the requested tabletop seat count to a supported ring. */
|
|
81
|
+
function normalizeTabletopSeatCount(count: number): TabletopSeatCount {
|
|
82
|
+
const rounded = Math.round(count);
|
|
83
|
+
if (rounded <= 2) return 2;
|
|
84
|
+
if (rounded >= 10) return 10;
|
|
85
|
+
|
|
86
|
+
return rounded as TabletopSeatCount;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/*** Returns the canonical seat positions for a ring size. */
|
|
90
|
+
function getTabletopSeatPositions(count: number): readonly TabletopSeatPosition[] {
|
|
91
|
+
return seatPositions[normalizeTabletopSeatCount(count)];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/*** Returns a seat's canonical position with the hero at the bottom. */
|
|
95
|
+
export function getTabletopSeatPosition(index: number, count: number): TabletopSeatPosition {
|
|
96
|
+
const positions = getTabletopSeatPositions(count);
|
|
97
|
+
const position = positions[index % positions.length];
|
|
98
|
+
|
|
99
|
+
return position ?? fallbackSeatPosition;
|
|
100
|
+
}
|
|
@@ -60,7 +60,7 @@ function TreeViewInner<TId extends string = string>({
|
|
|
60
60
|
|
|
61
61
|
/***
|
|
62
62
|
* Tree view pattern for hierarchical navigation and expandable lists.
|
|
63
|
-
*
|
|
63
|
+
* expansionIndicator Select `folder` (default) or `chevron` for leading expansion controls.
|
|
64
64
|
* Expansion controls are separate from row selection, including when rendering custom row content.
|
|
65
65
|
*/
|
|
66
66
|
export const TreeView = withZoraThemeScope(TreeViewInner);
|
|
@@ -37,7 +37,7 @@ export interface TreeViewProps<TId extends string = string> {
|
|
|
37
37
|
|
|
38
38
|
/***
|
|
39
39
|
* Render the standalone browser TreeView artifact without React Native runtime dependencies.
|
|
40
|
-
*
|
|
40
|
+
* expansionIndicator Use `chevron` beside custom node icons, or `folder` (default) for
|
|
41
41
|
* built-in folder/file indicators. Expansion is leading and independent from row selection.
|
|
42
42
|
*/
|
|
43
43
|
export function TreeView<TId extends string = string>({
|
|
@@ -15,10 +15,6 @@ import { resolveHeadingThemeRecipe } from '../../utils/resolveHeadingThemeRecipe
|
|
|
15
15
|
* `Heading` gives consumers a ZORA-owned title API with semantic levels,
|
|
16
16
|
* responsive sizes, and theme-aware emphasis while preserving header semantics.
|
|
17
17
|
*
|
|
18
|
-
* @example Section title
|
|
19
|
-
* ```tsx
|
|
20
|
-
* <Heading level={2} size="xl">Account settings</Heading>
|
|
21
|
-
* ```
|
|
22
18
|
*/
|
|
23
19
|
export const Heading = withZoraThemeScope(HeadingInner);
|
|
24
20
|
|
|
@@ -14,10 +14,6 @@ import { resolveTextThemeRecipe } from '../../utils/resolveTextThemeRecipe';
|
|
|
14
14
|
* `Text` owns normal body, caption, label, code, and supporting-copy variants so
|
|
15
15
|
* consumers do not need to import lower-level Surface typography directly.
|
|
16
16
|
*
|
|
17
|
-
* @example Muted supporting copy
|
|
18
|
-
* ```tsx
|
|
19
|
-
* <Text variant="bodySmall" emphasis="muted">Updated just now</Text>
|
|
20
|
-
* ```
|
|
21
17
|
*/
|
|
22
18
|
export const Text = withZoraThemeScope(TextInner);
|
|
23
19
|
|