@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../../src/features/card/adapters/inbound/Card.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAQxD
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../../src/features/card/adapters/inbound/Card.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAQxD;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,iDAAgC,CAAC"}
|
|
@@ -13,10 +13,6 @@ import { resolveCardVariant } from '../../utils/resolveCardVariant';
|
|
|
13
13
|
* Use `Card` for reusable content blocks that should inherit ZORA spacing,
|
|
14
14
|
* radius, tone, and responsive header layout without hand-assembling primitives.
|
|
15
15
|
*
|
|
16
|
-
* @example Content card
|
|
17
|
-
* ```tsx
|
|
18
|
-
* <Card title="Project" description="Latest activity">...</Card>
|
|
19
|
-
* ```
|
|
20
16
|
*/
|
|
21
17
|
export const Card = withZoraThemeScope(CardInner);
|
|
22
18
|
function CardInner({ themeId: _themeId, mode: _mode, children, title, description, eyebrow, actions, footer, tone, compact, padding, radius, onPress, interactionPolicy, ...props }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../../../src/features/card/adapters/inbound/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE
|
|
1
|
+
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../../../src/features/card/ad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I,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACR;gBAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CACzE;gBAAA,CAAC,WAAW,CAAC,CAAC,CAAC,CACb,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CACxC;oBAAA,CAAC,WAAW,CACd;kBAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACV;cAAA,EAAE,IAAI,CACR;YAAA,EAAE,IAAI,CACN;YAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAC1C;UAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CAER;;QAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAE1C;;QAAA,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CACnD;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,WAAW,CAAC,CACf,CAAC;AACJ,CAAC","sourcesContent":["import { Card as SurfaceCard } from '@ankhorage/surface';\nimport React from 'react';\n\nimport type { CardProps } from '../../../../types/card';\nimport { View } from '../../../layout/public';\nimport { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';\nimport { useZoraThemeRecipe } from '../../../theme/composition/useZoraThemeRecipe';\nimport { Heading } from '../../../typography/public';\nimport { Text } from '../../../typography/public';\nimport { resolveCardThemeRecipe } from '../../utils/resolveCardThemeRecipe';\nimport { resolveCardVariant } from '../../utils/resolveCardVariant';\n/***\n * Structured content container with built-in heading, description, actions, and footer slots.\n *\n * Use `Card` for reusable content blocks that should inherit ZORA spacing,\n * radius, tone, and responsive header layout without hand-assembling primitives.\n *\n */\nexport const Card = withZoraThemeScope(CardInner);\n\nfunction CardInner({\n themeId: _themeId,\n mode: _mode,\n children,\n title,\n description,\n eyebrow,\n actions,\n footer,\n tone,\n compact,\n padding,\n radius,\n onPress,\n interactionPolicy,\n ...props\n}: CardProps) {\n const themeFields = useZoraThemeRecipe('Card');\n const recipe = resolveCardThemeRecipe({ tone, compact, padding, radius, themeFields });\n const hasHeader = [eyebrow, title, description, actions].some((item) => item != null);\n const hasFooter = footer !== undefined;\n const gap = recipe.compact ? 's' : 'm';\n const isInteractive = Boolean(onPress) && !actions;\n const passive = interactionPolicy === 'passive';\n\n return (\n <SurfaceCard\n {...props}\n onPress={isInteractive && !passive ? onPress : undefined}\n p={recipe.padding}\n radius={recipe.radius}\n variant={resolveCardVariant(recipe.tone)}\n >\n <View gap={gap}>\n {hasHeader ? (\n <View\n align={{ base: 'flex-start', md: 'center' }}\n direction={{ base: 'column', md: 'row' }}\n gap=\"m\"\n justify=\"space-between\"\n >\n <View flex={{ md: 1 }} width={{ base: '100%', md: 'auto' }}>\n <View gap=\"xs\">\n {eyebrow ? (\n <Text emphasis=\"muted\" variant=\"caption\" weight=\"semiBold\">\n {eyebrow}\n </Text>\n ) : null}\n {title ? <Heading level={recipe.compact ? 4 : 3}>{title}</Heading> : null}\n {description ? (\n <Text emphasis=\"muted\" variant=\"bodySmall\">\n {description}\n </Text>\n ) : null}\n </View>\n </View>\n {actions ? <View>{actions}</View> : null}\n </View>\n ) : null}\n\n {children ? <View>{children}</View> : null}\n\n {hasFooter ? <View pt=\"xs\">{footer}</View> : null}\n </View>\n </SurfaceCard>\n );\n}\n"]}
|
|
@@ -2,7 +2,7 @@ export declare const cardMeta: {
|
|
|
2
2
|
readonly name: "Card";
|
|
3
3
|
readonly category: "component";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement", "ChessBoard", "OpeningBook", "Game", "GameField", "TabletopTable", "PokerTrainingTable"];
|
|
6
6
|
readonly blueprint: {
|
|
7
7
|
readonly label: "Card";
|
|
8
8
|
readonly defaultProps: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cardMeta.d.ts","sourceRoot":"","sources":["../../../src/features/card/cardMeta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cardMeta.d.ts","sourceRoot":"","sources":["../../../src/features/card/cardMeta.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDiB,CAAC"}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { CONTAINER_ALLOWED_CHILDREN } from '../authoring/allowedChildren';
|
|
1
|
+
import { CHESS_ALLOWED_CHILDREN, CONTAINER_ALLOWED_CHILDREN, GAME_ALLOWED_CHILDREN, TABLETOP_ALLOWED_CHILDREN, } from '../authoring/allowedChildren';
|
|
2
2
|
import { COMPONENT_THEME_AUTHORING } from '../authoring/constants';
|
|
3
3
|
export const cardMeta = {
|
|
4
4
|
name: 'Card',
|
|
5
5
|
category: 'component',
|
|
6
6
|
directManifestNode: true,
|
|
7
|
-
allowedChildren: [
|
|
7
|
+
allowedChildren: [
|
|
8
|
+
...CONTAINER_ALLOWED_CHILDREN,
|
|
9
|
+
...CHESS_ALLOWED_CHILDREN,
|
|
10
|
+
...GAME_ALLOWED_CHILDREN,
|
|
11
|
+
...TABLETOP_ALLOWED_CHILDREN,
|
|
12
|
+
],
|
|
8
13
|
blueprint: { label: 'Card', defaultProps: { title: 'Card' } },
|
|
9
14
|
events: { press: { label: 'Press', eventType: 'card.press', payloadFields: [] } },
|
|
10
15
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cardMeta.js","sourceRoot":"","sources":["../../../src/features/card/cardMeta.ts"],"names":[],"mappings":"AACA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E,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC;YACtC,SAAS,EAAE,yBAAyB;SACrC;QACD,OAAO,EAAE;YACP,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,yBAAyB;SACrC;QACD,OAAO,EAAE;YACP,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,yBAAyB;SACrC;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,eAAe;YACtB,SAAS,EAAE,yBAAyB;SACrC;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../authoring';\nimport {\n CHESS_ALLOWED_CHILDREN,\n CONTAINER_ALLOWED_CHILDREN,\n GAME_ALLOWED_CHILDREN,\n TABLETOP_ALLOWED_CHILDREN,\n} from '../authoring/allowedChildren';\nimport { COMPONENT_THEME_AUTHORING } from '../authoring/constants';\n\nexport const cardMeta = {\n name: 'Card',\n category: 'component',\n directManifestNode: true,\n allowedChildren: [\n ...CONTAINER_ALLOWED_CHILDREN,\n ...CHESS_ALLOWED_CHILDREN,\n ...GAME_ALLOWED_CHILDREN,\n ...TABLETOP_ALLOWED_CHILDREN,\n ],\n blueprint: { label: 'Card', defaultProps: { title: 'Card' } },\n events: { press: { label: 'Press', eventType: 'card.press', payloadFields: [] } },\n props: {\n title: {\n type: 'string',\n category: 'Content',\n label: 'Title',\n authoring: { authority: 'instance' },\n },\n description: {\n type: 'string',\n category: 'Content',\n label: 'Description',\n authoring: { authority: 'instance' },\n },\n eyebrow: {\n type: 'string',\n category: 'Content',\n label: 'Eyebrow',\n authoring: { authority: 'instance' },\n },\n tone: {\n type: 'enum',\n category: 'Style',\n label: 'Tone',\n enum: ['default', 'subtle', 'outline'],\n authoring: COMPONENT_THEME_AUTHORING,\n },\n compact: {\n type: 'boolean',\n category: 'Layout',\n label: 'Compact',\n authoring: COMPONENT_THEME_AUTHORING,\n },\n padding: {\n type: 'spacing',\n category: 'Layout',\n label: 'Padding',\n authoring: COMPONENT_THEME_AUTHORING,\n },\n radius: {\n type: 'radius',\n category: 'Style',\n label: 'Corner radius',\n authoring: COMPONENT_THEME_AUTHORING,\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ChessBoardProps } from '../../../../types/chess';
|
|
3
|
+
/*** Renders caller-owned chess presentation state without chess rule execution. */
|
|
4
|
+
export declare const ChessBoard: (props: ChessBoardProps) => React.ReactElement | null;
|
|
5
|
+
//# sourceMappingURL=ChessBoard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChessBoard.d.ts","sourceRoot":"","sources":["../../../../../src/features/chess/adapters/inbound/ChessBoard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,eAAe,EAAkC,MAAM,yBAAyB,CAAC;AAsB/F,mFAAmF;AACnF,eAAO,MAAM,UAAU,uDAAsC,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Pressable, StyleSheet, Text, View } from 'react-native';
|
|
3
|
+
import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';
|
|
4
|
+
import { useZoraTheme } from '../../../theme/composition/useZoraTheme';
|
|
5
|
+
import { createBoardSquares } from '../../utils/createBoardSquares';
|
|
6
|
+
import { createChessBoardColorScheme } from '../../utils/createChessBoardColorScheme';
|
|
7
|
+
import { isLightSquare } from '../../utils/isLightSquare';
|
|
8
|
+
const symbols = new Map([
|
|
9
|
+
['white:p', '♙'],
|
|
10
|
+
['white:n', '♘'],
|
|
11
|
+
['white:b', '♗'],
|
|
12
|
+
['white:r', '♖'],
|
|
13
|
+
['white:q', '♕'],
|
|
14
|
+
['white:k', '♔'],
|
|
15
|
+
['black:p', '♟'],
|
|
16
|
+
['black:n', '♞'],
|
|
17
|
+
['black:b', '♝'],
|
|
18
|
+
['black:r', '♜'],
|
|
19
|
+
['black:q', '♛'],
|
|
20
|
+
['black:k', '♚'],
|
|
21
|
+
]);
|
|
22
|
+
/*** Renders caller-owned chess presentation state without chess rule execution. */
|
|
23
|
+
export const ChessBoard = withZoraThemeScope(ChessBoardInner);
|
|
24
|
+
/*** Renders the current presentation state without executing chess rules. */
|
|
25
|
+
function ChessBoardInner({ pieces = [], orientation = 'white', selectedSquare = null, legalTargets = [], lastMove = null, disabled = false, showCoordinates = false, colorScheme, onSquarePress, onMoveAttempt, renderPiece, interactionPolicy, testID, }) {
|
|
26
|
+
const { theme } = useZoraTheme();
|
|
27
|
+
const colors = createChessBoardColorScheme(theme, colorScheme);
|
|
28
|
+
const squares = createBoardSquares(orientation);
|
|
29
|
+
const piecesBySquare = new Map(pieces.map((piece) => [piece.square, piece]));
|
|
30
|
+
const legalTargetSet = new Set(legalTargets);
|
|
31
|
+
const pressSquare = (square) => {
|
|
32
|
+
if (disabled || interactionPolicy === 'passive')
|
|
33
|
+
return;
|
|
34
|
+
onSquarePress?.(square);
|
|
35
|
+
if (selectedSquare !== null && selectedSquare !== square)
|
|
36
|
+
onMoveAttempt?.({ from: selectedSquare, to: square });
|
|
37
|
+
};
|
|
38
|
+
return (<View accessibilityLabel="Chess board" style={[styles.board, { borderColor: colors.border, opacity: disabled ? 0.56 : 1 }]} testID={testID}>
|
|
39
|
+
{squares.map((square) => {
|
|
40
|
+
const piece = piecesBySquare.get(square);
|
|
41
|
+
const light = isLightSquare(square);
|
|
42
|
+
const isTarget = legalTargetSet.has(square);
|
|
43
|
+
const backgroundColor = selectedSquare === square
|
|
44
|
+
? colors.selectedSquare
|
|
45
|
+
: isTarget
|
|
46
|
+
? colors.legalTarget
|
|
47
|
+
: lastMove?.from === square
|
|
48
|
+
? colors.lastMoveFrom
|
|
49
|
+
: lastMove?.to === square
|
|
50
|
+
? colors.lastMoveTo
|
|
51
|
+
: light
|
|
52
|
+
? colors.lightSquare
|
|
53
|
+
: colors.darkSquare;
|
|
54
|
+
const pieceContent = piece === undefined
|
|
55
|
+
? null
|
|
56
|
+
: renderPiece
|
|
57
|
+
? renderPiece({
|
|
58
|
+
color: piece.color === 'white' ? colors.lightPiece : colors.darkPiece,
|
|
59
|
+
piece: piece.piece,
|
|
60
|
+
square,
|
|
61
|
+
})
|
|
62
|
+
: (symbols.get(`${piece.color}:${piece.piece.toLowerCase()}`) ?? piece.piece);
|
|
63
|
+
return (<Pressable accessibilityLabel={square} accessibilityRole="button" disabled={disabled || interactionPolicy === 'passive'} key={square} onPress={() => pressSquare(square)} style={[styles.square, { backgroundColor }]} testID={testID ? `${testID}-square-${square}` : undefined}>
|
|
64
|
+
{showCoordinates ? (<Text style={[
|
|
65
|
+
styles.coordinate,
|
|
66
|
+
{ color: light ? colors.lightSquareText : colors.darkSquareText },
|
|
67
|
+
]}>
|
|
68
|
+
{square}
|
|
69
|
+
</Text>) : null}
|
|
70
|
+
{piece === undefined ? null : (<View pointerEvents="none" style={styles.pieceContainer}>
|
|
71
|
+
{renderPiece ? (pieceContent) : (<Text style={[
|
|
72
|
+
styles.piece,
|
|
73
|
+
{ color: piece.color === 'white' ? colors.lightPiece : colors.darkPiece },
|
|
74
|
+
]}>
|
|
75
|
+
{pieceContent}
|
|
76
|
+
</Text>)}
|
|
77
|
+
</View>)}
|
|
78
|
+
</Pressable>);
|
|
79
|
+
})}
|
|
80
|
+
</View>);
|
|
81
|
+
}
|
|
82
|
+
const styles = StyleSheet.create({
|
|
83
|
+
board: {
|
|
84
|
+
aspectRatio: 1,
|
|
85
|
+
borderRadius: 12,
|
|
86
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
87
|
+
flexDirection: 'row',
|
|
88
|
+
flexWrap: 'wrap',
|
|
89
|
+
overflow: 'hidden',
|
|
90
|
+
width: '100%',
|
|
91
|
+
},
|
|
92
|
+
coordinate: {
|
|
93
|
+
fontSize: 9,
|
|
94
|
+
fontWeight: '600',
|
|
95
|
+
left: 3,
|
|
96
|
+
opacity: 0.72,
|
|
97
|
+
position: 'absolute',
|
|
98
|
+
top: 2,
|
|
99
|
+
zIndex: 2,
|
|
100
|
+
},
|
|
101
|
+
piece: { fontSize: 32, fontWeight: '600', lineHeight: 38 },
|
|
102
|
+
pieceContainer: {
|
|
103
|
+
alignItems: 'center',
|
|
104
|
+
bottom: 0,
|
|
105
|
+
justifyContent: 'center',
|
|
106
|
+
left: 0,
|
|
107
|
+
position: 'absolute',
|
|
108
|
+
right: 0,
|
|
109
|
+
top: 0,
|
|
110
|
+
},
|
|
111
|
+
square: {
|
|
112
|
+
alignItems: 'center',
|
|
113
|
+
aspectRatio: 1,
|
|
114
|
+
width: '12.5%',
|
|
115
|
+
justifyContent: 'center',
|
|
116
|
+
position: 'relative',
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
//# sourceMappingURL=ChessBoard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChessBoard.js","sourceRoot":"","sources":["../../../../../src/features/chess/adapters/inbound/ChessBoard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,MAAM,OAAO,GAAG,IAAI,GAAG,CAAiB;IACtC,CAAC,SAAS,EA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AU,EAAE,QAAQ;QACpB,MAAM,EAAE,CAAC;QACT,cAAc,EAAE,QAAQ;QACxB,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,CAAC;QACR,GAAG,EAAE,CAAC;KACP;IACD,MAAM,EAAE;QACN,UAAU,EAAE,QAAQ;QACpB,WAAW,EAAE,CAAC;QACd,KAAK,EAAE,OAAO;QACd,cAAc,EAAE,QAAQ;QACxB,QAAQ,EAAE,UAAU;KACrB;CACF,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { Pressable, StyleSheet, Text, View } from 'react-native';\n\nimport type { ChessBoardProps, ChessPieceState, ChessSquareId } from '../../../../types/chess';\nimport { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';\nimport { useZoraTheme } from '../../../theme/composition/useZoraTheme';\nimport { createBoardSquares } from '../../utils/createBoardSquares';\nimport { createChessBoardColorScheme } from '../../utils/createChessBoardColorScheme';\nimport { isLightSquare } from '../../utils/isLightSquare';\n\nconst symbols = new Map<string, string>([\n ['white:p', '♙'],\n ['white:n', '♘'],\n ['white:b', '♗'],\n ['white:r', '♖'],\n ['white:q', '♕'],\n ['white:k', '♔'],\n ['black:p', '♟'],\n ['black:n', '♞'],\n ['black:b', '♝'],\n ['black:r', '♜'],\n ['black:q', '♛'],\n ['black:k', '♚'],\n]);\n\n/*** Renders caller-owned chess presentation state without chess rule execution. */\nexport const ChessBoard = withZoraThemeScope(ChessBoardInner);\n\n/*** Renders the current presentation state without executing chess rules. */\nfunction ChessBoardInner({\n pieces = [],\n orientation = 'white',\n selectedSquare = null,\n legalTargets = [],\n lastMove = null,\n disabled = false,\n showCoordinates = false,\n colorScheme,\n onSquarePress,\n onMoveAttempt,\n renderPiece,\n interactionPolicy,\n testID,\n}: ChessBoardProps) {\n const { theme } = useZoraTheme();\n const colors = createChessBoardColorScheme(theme, colorScheme);\n const squares = createBoardSquares(orientation);\n const piecesBySquare = new Map<ChessSquareId, ChessPieceState>(\n pieces.map((piece) => [piece.square, piece]),\n );\n const legalTargetSet = new Set(legalTargets);\n const pressSquare = (square: ChessSquareId) => {\n if (disabled || interactionPolicy === 'passive') return;\n onSquarePress?.(square);\n if (selectedSquare !== null && selectedSquare !== square)\n onMoveAttempt?.({ from: selectedSquare, to: square });\n };\n return (\n <View\n accessibilityLabel=\"Chess board\"\n style={[styles.board, { borderColor: colors.border, opacity: disabled ? 0.56 : 1 }]}\n testID={testID}\n >\n {squares.map((square) => {\n const piece = piecesBySquare.get(square);\n const light = isLightSquare(square);\n const isTarget = legalTargetSet.has(square);\n const backgroundColor =\n selectedSquare === square\n ? colors.selectedSquare\n : isTarget\n ? colors.legalTarget\n : lastMove?.from === square\n ? colors.lastMoveFrom\n : lastMove?.to === square\n ? colors.lastMoveTo\n : light\n ? colors.lightSquare\n : colors.darkSquare;\n const pieceContent =\n piece === undefined\n ? null\n : renderPiece\n ? renderPiece({\n color: piece.color === 'white' ? colors.lightPiece : colors.darkPiece,\n piece: piece.piece,\n square,\n })\n : (symbols.get(`${piece.color}:${piece.piece.toLowerCase()}`) ?? piece.piece);\n return (\n <Pressable\n accessibilityLabel={square}\n accessibilityRole=\"button\"\n disabled={disabled || interactionPolicy === 'passive'}\n key={square}\n onPress={() => pressSquare(square)}\n style={[styles.square, { backgroundColor }]}\n testID={testID ? `${testID}-square-${square}` : undefined}\n >\n {showCoordinates ? (\n <Text\n style={[\n styles.coordinate,\n { color: light ? colors.lightSquareText : colors.darkSquareText },\n ]}\n >\n {square}\n </Text>\n ) : null}\n {piece === undefined ? null : (\n <View pointerEvents=\"none\" style={styles.pieceContainer}>\n {renderPiece ? (\n pieceContent\n ) : (\n <Text\n style={[\n styles.piece,\n { color: piece.color === 'white' ? colors.lightPiece : colors.darkPiece },\n ]}\n >\n {pieceContent}\n </Text>\n )}\n </View>\n )}\n </Pressable>\n );\n })}\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n board: {\n aspectRatio: 1,\n borderRadius: 12,\n borderWidth: StyleSheet.hairlineWidth,\n flexDirection: 'row',\n flexWrap: 'wrap',\n overflow: 'hidden',\n width: '100%',\n },\n coordinate: {\n fontSize: 9,\n fontWeight: '600',\n left: 3,\n opacity: 0.72,\n position: 'absolute',\n top: 2,\n zIndex: 2,\n },\n piece: { fontSize: 32, fontWeight: '600', lineHeight: 38 },\n pieceContainer: {\n alignItems: 'center',\n bottom: 0,\n justifyContent: 'center',\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n square: {\n alignItems: 'center',\n aspectRatio: 1,\n width: '12.5%',\n justifyContent: 'center',\n position: 'relative',\n },\n});\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { OpeningBookProps } from '../../../../types/chess';
|
|
3
|
+
/*** Renders caller-owned opening suggestions and their visual states. */
|
|
4
|
+
export declare const OpeningBook: (props: OpeningBookProps) => React.ReactElement | null;
|
|
5
|
+
//# sourceMappingURL=OpeningBook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OpeningBook.d.ts","sourceRoot":"","sources":["../../../../../src/features/chess/adapters/inbound/OpeningBook.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAmB,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAKjF,yEAAyE;AACzE,eAAO,MAAM,WAAW,wDAAuC,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Pressable, StyleSheet, Text, View } from 'react-native';
|
|
3
|
+
import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';
|
|
4
|
+
import { useZoraTheme } from '../../../theme/composition/useZoraTheme';
|
|
5
|
+
import { createOpeningBookColorScheme } from '../../utils/createOpeningBookColorScheme';
|
|
6
|
+
/*** Renders caller-owned opening suggestions and their visual states. */
|
|
7
|
+
export const OpeningBook = withZoraThemeScope(OpeningBookInner);
|
|
8
|
+
/*** Formats an opening result percentage, accepting fractions or percentages. */
|
|
9
|
+
function rate(label, value) {
|
|
10
|
+
if (value === undefined || !Number.isFinite(value))
|
|
11
|
+
return undefined;
|
|
12
|
+
return `${label} ${Math.round(value <= 1 ? value * 100 : value)}%`;
|
|
13
|
+
}
|
|
14
|
+
/*** Resolves an opening move's stable row key. */
|
|
15
|
+
function moveKey(move) {
|
|
16
|
+
return move.uci ?? move.fen ?? move.san;
|
|
17
|
+
}
|
|
18
|
+
/*** Renders the themed opening list without owning chess rules or data loading. */
|
|
19
|
+
function OpeningBookInner({ moves = [], title = 'Opening book', loading = false, errorText, emptyText = 'No book moves for this position.', selectedMove = null, colorScheme, onMovePress, interactionPolicy, testID, }) {
|
|
20
|
+
const { theme } = useZoraTheme();
|
|
21
|
+
const colors = createOpeningBookColorScheme(theme, colorScheme);
|
|
22
|
+
const stateText = loading ? 'Loading opening moves…' : (errorText ?? emptyText);
|
|
23
|
+
const showState = loading || errorText !== undefined || moves.length === 0;
|
|
24
|
+
return (<View accessibilityLabel={title} style={[
|
|
25
|
+
styles.root,
|
|
26
|
+
{
|
|
27
|
+
borderColor: colors.border,
|
|
28
|
+
backgroundColor: colors.surface,
|
|
29
|
+
},
|
|
30
|
+
]} testID={testID}>
|
|
31
|
+
<Text style={[styles.title, { color: colors.titleText }]}>{title}</Text>
|
|
32
|
+
{!showState ? (<View style={styles.moves}>
|
|
33
|
+
{moves.map((move) => {
|
|
34
|
+
const selected = selectedMove !== null &&
|
|
35
|
+
(selectedMove === move.san || selectedMove === move.uci || selectedMove === move.fen);
|
|
36
|
+
const details = [
|
|
37
|
+
move.eco,
|
|
38
|
+
move.name,
|
|
39
|
+
move.games === undefined ? undefined : `${move.games} games`,
|
|
40
|
+
].filter((part) => typeof part === 'string' && part.length > 0);
|
|
41
|
+
const stats = [
|
|
42
|
+
rate('W', move.whiteWinRate),
|
|
43
|
+
rate('D', move.drawRate),
|
|
44
|
+
rate('B', move.blackWinRate),
|
|
45
|
+
].filter((part) => part !== undefined);
|
|
46
|
+
return (<Pressable accessibilityRole="button" disabled={onMovePress === undefined || interactionPolicy === 'passive'} key={moveKey(move)} onPress={() => {
|
|
47
|
+
if (interactionPolicy === 'passive')
|
|
48
|
+
return;
|
|
49
|
+
onMovePress?.(move);
|
|
50
|
+
}} style={[
|
|
51
|
+
styles.move,
|
|
52
|
+
{
|
|
53
|
+
backgroundColor: selected ? colors.selectedSurface : colors.surfaceHover,
|
|
54
|
+
borderColor: colors.border,
|
|
55
|
+
},
|
|
56
|
+
]} testID={testID ? `${testID}-move-${move.san}` : undefined}>
|
|
57
|
+
<View style={styles.moveMain}>
|
|
58
|
+
<Text style={[styles.san, { color: colors.primaryText }]}>{move.san}</Text>
|
|
59
|
+
<Text style={[styles.meta, { color: colors.secondaryText }]}>
|
|
60
|
+
{details.length > 0 ? details.join(' · ') : 'Book move'}
|
|
61
|
+
</Text>
|
|
62
|
+
</View>
|
|
63
|
+
{stats.length > 0 ? (<View style={[styles.metric, { backgroundColor: colors.metricSurface }]}>
|
|
64
|
+
<Text style={[styles.metricText, { color: colors.secondaryText }]}>
|
|
65
|
+
{stats.join(' ')}
|
|
66
|
+
</Text>
|
|
67
|
+
</View>) : null}
|
|
68
|
+
</Pressable>);
|
|
69
|
+
})}
|
|
70
|
+
</View>) : (<Text style={[styles.stateText, { color: colors.secondaryText }]}>{stateText}</Text>)}
|
|
71
|
+
</View>);
|
|
72
|
+
}
|
|
73
|
+
const styles = StyleSheet.create({
|
|
74
|
+
root: { borderRadius: 12, borderWidth: StyleSheet.hairlineWidth, gap: 10, padding: 12 },
|
|
75
|
+
title: { fontSize: 15, fontWeight: '700', lineHeight: 20 },
|
|
76
|
+
stateText: { fontSize: 13, lineHeight: 18 },
|
|
77
|
+
moves: { gap: 8 },
|
|
78
|
+
move: {
|
|
79
|
+
alignItems: 'center',
|
|
80
|
+
borderRadius: 10,
|
|
81
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
82
|
+
flexDirection: 'row',
|
|
83
|
+
gap: 10,
|
|
84
|
+
justifyContent: 'space-between',
|
|
85
|
+
paddingHorizontal: 10,
|
|
86
|
+
paddingVertical: 8,
|
|
87
|
+
},
|
|
88
|
+
moveMain: { flex: 1, gap: 2 },
|
|
89
|
+
san: { fontSize: 16, fontWeight: '700', lineHeight: 20 },
|
|
90
|
+
meta: { fontSize: 12, lineHeight: 16 },
|
|
91
|
+
metric: { borderRadius: 999, paddingHorizontal: 8, paddingVertical: 4 },
|
|
92
|
+
metricText: { fontSize: 11, fontWeight: '600' },
|
|
93
|
+
});
|
|
94
|
+
//# sourceMappingURL=OpeningBook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OpeningBook.js","sourceRoot":"","sources":["../../../../../src/features/chess/adapters/inbound/OpeningBook.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AAExF,yEAAyE;AACzE,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;AAEhE,iFAAiF;AACjF,SAAS,IAAI,CAAC,KAAa,EAAE,KAAyB;IACpD,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IACrE,OAAO,GAAG,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;AACrE,CAAC;AA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EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;IACtC,MAAM,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,iBAAiB,EAAE,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE;IACvE,UAAU,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;CAChD,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { Pressable, StyleSheet, Text, View } from 'react-native';\n\nimport type { OpeningBookMove, OpeningBookProps } from '../../../../types/chess';\nimport { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';\nimport { useZoraTheme } from '../../../theme/composition/useZoraTheme';\nimport { createOpeningBookColorScheme } from '../../utils/createOpeningBookColorScheme';\n\n/*** Renders caller-owned opening suggestions and their visual states. */\nexport const OpeningBook = withZoraThemeScope(OpeningBookInner);\n\n/*** Formats an opening result percentage, accepting fractions or percentages. */\nfunction rate(label: string, value: number | undefined): string | undefined {\n if (value === undefined || !Number.isFinite(value)) return undefined;\n return `${label} ${Math.round(value <= 1 ? value * 100 : value)}%`;\n}\n\n/*** Resolves an opening move's stable row key. */\nfunction moveKey(move: OpeningBookMove): string {\n return move.uci ?? move.fen ?? move.san;\n}\n\n/*** Renders the themed opening list without owning chess rules or data loading. */\nfunction OpeningBookInner({\n moves = [],\n title = 'Opening book',\n loading = false,\n errorText,\n emptyText = 'No book moves for this position.',\n selectedMove = null,\n colorScheme,\n onMovePress,\n interactionPolicy,\n testID,\n}: OpeningBookProps) {\n const { theme } = useZoraTheme();\n const colors = createOpeningBookColorScheme(theme, colorScheme);\n const stateText = loading ? 'Loading opening moves…' : (errorText ?? emptyText);\n const showState = loading || errorText !== undefined || moves.length === 0;\n return (\n <View\n accessibilityLabel={title}\n style={[\n styles.root,\n {\n borderColor: colors.border,\n backgroundColor: colors.surface,\n },\n ]}\n testID={testID}\n >\n <Text style={[styles.title, { color: colors.titleText }]}>{title}</Text>\n {!showState ? (\n <View style={styles.moves}>\n {moves.map((move) => {\n const selected =\n selectedMove !== null &&\n (selectedMove === move.san || selectedMove === move.uci || selectedMove === move.fen);\n const details = [\n move.eco,\n move.name,\n move.games === undefined ? undefined : `${move.games} games`,\n ].filter((part): part is string => typeof part === 'string' && part.length > 0);\n const stats = [\n rate('W', move.whiteWinRate),\n rate('D', move.drawRate),\n rate('B', move.blackWinRate),\n ].filter((part): part is string => part !== undefined);\n return (\n <Pressable\n accessibilityRole=\"button\"\n disabled={onMovePress === undefined || interactionPolicy === 'passive'}\n key={moveKey(move)}\n onPress={() => {\n if (interactionPolicy === 'passive') return;\n onMovePress?.(move);\n }}\n style={[\n styles.move,\n {\n backgroundColor: selected ? colors.selectedSurface : colors.surfaceHover,\n borderColor: colors.border,\n },\n ]}\n testID={testID ? `${testID}-move-${move.san}` : undefined}\n >\n <View style={styles.moveMain}>\n <Text style={[styles.san, { color: colors.primaryText }]}>{move.san}</Text>\n <Text style={[styles.meta, { color: colors.secondaryText }]}>\n {details.length > 0 ? details.join(' · ') : 'Book move'}\n </Text>\n </View>\n {stats.length > 0 ? (\n <View style={[styles.metric, { backgroundColor: colors.metricSurface }]}>\n <Text style={[styles.metricText, { color: colors.secondaryText }]}>\n {stats.join(' ')}\n </Text>\n </View>\n ) : null}\n </Pressable>\n );\n })}\n </View>\n ) : (\n <Text style={[styles.stateText, { color: colors.secondaryText }]}>{stateText}</Text>\n )}\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n root: { borderRadius: 12, borderWidth: StyleSheet.hairlineWidth, gap: 10, padding: 12 },\n title: { fontSize: 15, fontWeight: '700', lineHeight: 20 },\n stateText: { fontSize: 13, lineHeight: 18 },\n moves: { gap: 8 },\n move: {\n alignItems: 'center',\n borderRadius: 10,\n borderWidth: StyleSheet.hairlineWidth,\n flexDirection: 'row',\n gap: 10,\n justifyContent: 'space-between',\n paddingHorizontal: 10,\n paddingVertical: 8,\n },\n moveMain: { flex: 1, gap: 2 },\n san: { fontSize: 16, fontWeight: '700', lineHeight: 20 },\n meta: { fontSize: 12, lineHeight: 16 },\n metric: { borderRadius: 999, paddingHorizontal: 8, paddingVertical: 4 },\n metricText: { fontSize: 11, fontWeight: '600' },\n});\n"]}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
export declare const chessBoardMeta: {
|
|
2
|
+
readonly name: "ChessBoard";
|
|
3
|
+
readonly category: "component";
|
|
4
|
+
readonly description: "Renders caller-owned chess pieces, highlights, and move-attempt interactions without chess rules.";
|
|
5
|
+
readonly directManifestNode: true;
|
|
6
|
+
readonly allowedChildren: readonly [];
|
|
7
|
+
readonly blueprint: {
|
|
8
|
+
readonly label: "Chess board";
|
|
9
|
+
readonly defaultProps: {
|
|
10
|
+
readonly pieces: readonly [];
|
|
11
|
+
readonly orientation: "white";
|
|
12
|
+
readonly showCoordinates: true;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
readonly events: {
|
|
16
|
+
readonly squarePress: {
|
|
17
|
+
readonly label: "Square press";
|
|
18
|
+
readonly eventType: "chess.squarePress";
|
|
19
|
+
readonly payloadFields: readonly [{
|
|
20
|
+
readonly path: "square";
|
|
21
|
+
readonly type: "string";
|
|
22
|
+
readonly label: "Square";
|
|
23
|
+
}];
|
|
24
|
+
};
|
|
25
|
+
readonly moveAttempt: {
|
|
26
|
+
readonly label: "Move attempt";
|
|
27
|
+
readonly eventType: "chess.moveAttempt";
|
|
28
|
+
readonly payloadFields: readonly [{
|
|
29
|
+
readonly path: "from";
|
|
30
|
+
readonly type: "string";
|
|
31
|
+
readonly label: "From";
|
|
32
|
+
}, {
|
|
33
|
+
readonly path: "to";
|
|
34
|
+
readonly type: "string";
|
|
35
|
+
readonly label: "To";
|
|
36
|
+
}];
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
readonly bindings: {
|
|
40
|
+
readonly props: {
|
|
41
|
+
readonly pieces: {
|
|
42
|
+
readonly label: "Pieces";
|
|
43
|
+
readonly value: {
|
|
44
|
+
readonly type: "array";
|
|
45
|
+
readonly itemType: "object";
|
|
46
|
+
};
|
|
47
|
+
readonly acceptsFallback: true;
|
|
48
|
+
readonly acceptsTransforms: true;
|
|
49
|
+
};
|
|
50
|
+
readonly legalTargets: {
|
|
51
|
+
readonly label: "Legal targets";
|
|
52
|
+
readonly value: {
|
|
53
|
+
readonly type: "array";
|
|
54
|
+
readonly itemType: "string";
|
|
55
|
+
};
|
|
56
|
+
readonly acceptsFallback: true;
|
|
57
|
+
readonly acceptsTransforms: true;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
readonly props: {
|
|
62
|
+
readonly pieces: {
|
|
63
|
+
readonly type: "array";
|
|
64
|
+
readonly category: "Board";
|
|
65
|
+
readonly label: "Pieces";
|
|
66
|
+
readonly default: readonly [];
|
|
67
|
+
readonly authoring: {
|
|
68
|
+
readonly authority: "instance";
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
readonly orientation: {
|
|
72
|
+
readonly type: "enum";
|
|
73
|
+
readonly category: "Board";
|
|
74
|
+
readonly label: "Orientation";
|
|
75
|
+
readonly enum: readonly ["white", "black"];
|
|
76
|
+
readonly default: "white";
|
|
77
|
+
readonly authoring: {
|
|
78
|
+
readonly authority: "instance";
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
readonly selectedSquare: {
|
|
82
|
+
readonly type: "string";
|
|
83
|
+
readonly category: "Board";
|
|
84
|
+
readonly label: "Selected square";
|
|
85
|
+
readonly authoring: {
|
|
86
|
+
readonly authority: "instance";
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
readonly legalTargets: {
|
|
90
|
+
readonly type: "array";
|
|
91
|
+
readonly category: "Board";
|
|
92
|
+
readonly label: "Legal targets";
|
|
93
|
+
readonly default: readonly [];
|
|
94
|
+
readonly authoring: {
|
|
95
|
+
readonly authority: "instance";
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
readonly showCoordinates: {
|
|
99
|
+
readonly type: "boolean";
|
|
100
|
+
readonly category: "Style";
|
|
101
|
+
readonly label: "Show coordinates";
|
|
102
|
+
readonly default: false;
|
|
103
|
+
readonly authoring: {
|
|
104
|
+
readonly authority: "instance";
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
readonly disabled: {
|
|
108
|
+
readonly type: "boolean";
|
|
109
|
+
readonly category: "State";
|
|
110
|
+
readonly label: "Disabled";
|
|
111
|
+
readonly default: false;
|
|
112
|
+
readonly authoring: {
|
|
113
|
+
readonly authority: "instance";
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
export declare const openingBookMeta: {
|
|
119
|
+
readonly name: "OpeningBook";
|
|
120
|
+
readonly category: "component";
|
|
121
|
+
readonly description: "Presents caller-owned opening suggestions and their loading, empty, selected, and press states.";
|
|
122
|
+
readonly directManifestNode: true;
|
|
123
|
+
readonly allowedChildren: readonly [];
|
|
124
|
+
readonly blueprint: {
|
|
125
|
+
readonly label: "Opening book";
|
|
126
|
+
readonly defaultProps: {
|
|
127
|
+
readonly moves: readonly [];
|
|
128
|
+
readonly title: "Opening book";
|
|
129
|
+
readonly emptyText: "No book moves for this position.";
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
readonly events: {
|
|
133
|
+
readonly movePress: {
|
|
134
|
+
readonly label: "Move press";
|
|
135
|
+
readonly eventType: "chess.openingMovePress";
|
|
136
|
+
readonly payloadFields: readonly [{
|
|
137
|
+
readonly path: "san";
|
|
138
|
+
readonly type: "string";
|
|
139
|
+
readonly label: "SAN";
|
|
140
|
+
}, {
|
|
141
|
+
readonly path: "uci";
|
|
142
|
+
readonly type: "string";
|
|
143
|
+
readonly label: "UCI";
|
|
144
|
+
}, {
|
|
145
|
+
readonly path: "fen";
|
|
146
|
+
readonly type: "string";
|
|
147
|
+
readonly label: "Position";
|
|
148
|
+
}];
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
readonly bindings: {
|
|
152
|
+
readonly props: {
|
|
153
|
+
readonly moves: {
|
|
154
|
+
readonly label: "Moves";
|
|
155
|
+
readonly value: {
|
|
156
|
+
readonly type: "array";
|
|
157
|
+
readonly itemType: "object";
|
|
158
|
+
};
|
|
159
|
+
readonly acceptsFallback: true;
|
|
160
|
+
readonly acceptsTransforms: true;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
readonly props: {
|
|
165
|
+
readonly moves: {
|
|
166
|
+
readonly type: "array";
|
|
167
|
+
readonly category: "Content";
|
|
168
|
+
readonly label: "Moves";
|
|
169
|
+
readonly default: readonly [];
|
|
170
|
+
readonly authoring: {
|
|
171
|
+
readonly authority: "instance";
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
readonly title: {
|
|
175
|
+
readonly type: "string";
|
|
176
|
+
readonly category: "Content";
|
|
177
|
+
readonly label: "Title";
|
|
178
|
+
readonly default: "Opening book";
|
|
179
|
+
readonly authoring: {
|
|
180
|
+
readonly authority: "instance";
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
readonly emptyText: {
|
|
184
|
+
readonly type: "string";
|
|
185
|
+
readonly category: "Content";
|
|
186
|
+
readonly label: "Empty text";
|
|
187
|
+
readonly default: "No book moves for this position.";
|
|
188
|
+
readonly authoring: {
|
|
189
|
+
readonly authority: "instance";
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
readonly loading: {
|
|
193
|
+
readonly type: "boolean";
|
|
194
|
+
readonly category: "State";
|
|
195
|
+
readonly label: "Loading";
|
|
196
|
+
readonly default: false;
|
|
197
|
+
readonly authoring: {
|
|
198
|
+
readonly authority: "instance";
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
readonly errorText: {
|
|
202
|
+
readonly type: "string";
|
|
203
|
+
readonly category: "State";
|
|
204
|
+
readonly label: "Error text";
|
|
205
|
+
readonly authoring: {
|
|
206
|
+
readonly authority: "instance";
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
readonly selectedMove: {
|
|
210
|
+
readonly type: "string";
|
|
211
|
+
readonly category: "State";
|
|
212
|
+
readonly label: "Selected move";
|
|
213
|
+
readonly authoring: {
|
|
214
|
+
readonly authority: "instance";
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/features/chess/meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsFW,CAAC;AACvC,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8EU,CAAC"}
|