@ankhorage/zora 21.0.23 → 21.1.1

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.
Files changed (554) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +6 -2
  3. package/dist/features/authoring/allowedChildren.d.ts +5 -2
  4. package/dist/features/authoring/allowedChildren.d.ts.map +1 -1
  5. package/dist/features/authoring/allowedChildren.js +13 -2
  6. package/dist/features/authoring/allowedChildren.js.map +1 -1
  7. package/dist/features/authoring/componentMeta.d.ts.map +1 -1
  8. package/dist/features/authoring/componentMeta.js +21 -0
  9. package/dist/features/authoring/componentMeta.js.map +1 -1
  10. package/dist/features/authoring/constants.d.ts +3 -0
  11. package/dist/features/authoring/constants.d.ts.map +1 -1
  12. package/dist/features/authoring/constants.js +3 -0
  13. package/dist/features/authoring/constants.js.map +1 -1
  14. package/dist/features/card/cardMeta.d.ts +1 -1
  15. package/dist/features/card/cardMeta.d.ts.map +1 -1
  16. package/dist/features/card/cardMeta.js +7 -2
  17. package/dist/features/card/cardMeta.js.map +1 -1
  18. package/dist/features/chess/adapters/inbound/ChessBoard.d.ts +5 -0
  19. package/dist/features/chess/adapters/inbound/ChessBoard.d.ts.map +1 -0
  20. package/dist/features/chess/adapters/inbound/ChessBoard.js +119 -0
  21. package/dist/features/chess/adapters/inbound/ChessBoard.js.map +1 -0
  22. package/dist/features/chess/adapters/inbound/OpeningBook.d.ts +5 -0
  23. package/dist/features/chess/adapters/inbound/OpeningBook.d.ts.map +1 -0
  24. package/dist/features/chess/adapters/inbound/OpeningBook.js +94 -0
  25. package/dist/features/chess/adapters/inbound/OpeningBook.js.map +1 -0
  26. package/dist/features/chess/meta.d.ts +219 -0
  27. package/dist/features/chess/meta.d.ts.map +1 -0
  28. package/dist/features/chess/meta.js +165 -0
  29. package/dist/features/chess/meta.js.map +1 -0
  30. package/dist/features/chess/public.d.ts +12 -0
  31. package/dist/features/chess/public.d.ts.map +1 -0
  32. package/dist/features/chess/public.js +10 -0
  33. package/dist/features/chess/public.js.map +1 -0
  34. package/dist/features/chess/utils/chessSquares.d.ts +4 -0
  35. package/dist/features/chess/utils/chessSquares.d.ts.map +1 -0
  36. package/dist/features/chess/utils/chessSquares.js +3 -0
  37. package/dist/features/chess/utils/chessSquares.js.map +1 -0
  38. package/dist/features/chess/utils/createBoardSquares.d.ts +4 -0
  39. package/dist/features/chess/utils/createBoardSquares.d.ts.map +1 -0
  40. package/dist/features/chess/utils/createBoardSquares.js +9 -0
  41. package/dist/features/chess/utils/createBoardSquares.js.map +1 -0
  42. package/dist/features/chess/utils/createChessBoardColorScheme.d.ts +35 -0
  43. package/dist/features/chess/utils/createChessBoardColorScheme.d.ts.map +1 -0
  44. package/dist/features/chess/utils/createChessBoardColorScheme.js +26 -0
  45. package/dist/features/chess/utils/createChessBoardColorScheme.js.map +1 -0
  46. package/dist/features/chess/utils/createOpeningBookColorScheme.d.ts +11 -0
  47. package/dist/features/chess/utils/createOpeningBookColorScheme.d.ts.map +1 -0
  48. package/dist/features/chess/utils/createOpeningBookColorScheme.js +21 -0
  49. package/dist/features/chess/utils/createOpeningBookColorScheme.js.map +1 -0
  50. package/dist/features/chess/utils/getSquareFile.d.ts +4 -0
  51. package/dist/features/chess/utils/getSquareFile.d.ts.map +1 -0
  52. package/dist/features/chess/utils/getSquareFile.js +5 -0
  53. package/dist/features/chess/utils/getSquareFile.js.map +1 -0
  54. package/dist/features/chess/utils/getSquareRank.d.ts +4 -0
  55. package/dist/features/chess/utils/getSquareRank.d.ts.map +1 -0
  56. package/dist/features/chess/utils/getSquareRank.js +5 -0
  57. package/dist/features/chess/utils/getSquareRank.js.map +1 -0
  58. package/dist/features/chess/utils/isLightSquare.d.ts +4 -0
  59. package/dist/features/chess/utils/isLightSquare.d.ts.map +1 -0
  60. package/dist/features/chess/utils/isLightSquare.js +6 -0
  61. package/dist/features/chess/utils/isLightSquare.js.map +1 -0
  62. package/dist/features/game/adapters/inbound/Game.d.ts +5 -0
  63. package/dist/features/game/adapters/inbound/Game.d.ts.map +1 -0
  64. package/dist/features/game/adapters/inbound/Game.js +24 -0
  65. package/dist/features/game/adapters/inbound/Game.js.map +1 -0
  66. package/dist/features/game/adapters/inbound/GameEntity.d.ts +5 -0
  67. package/dist/features/game/adapters/inbound/GameEntity.d.ts.map +1 -0
  68. package/dist/features/game/adapters/inbound/GameEntity.js +29 -0
  69. package/dist/features/game/adapters/inbound/GameEntity.js.map +1 -0
  70. package/dist/features/game/adapters/inbound/GameField.d.ts +4 -0
  71. package/dist/features/game/adapters/inbound/GameField.d.ts.map +1 -0
  72. package/dist/features/game/adapters/inbound/GameField.js +32 -0
  73. package/dist/features/game/adapters/inbound/GameField.js.map +1 -0
  74. package/dist/features/game/adapters/inbound/GameInputZone.d.ts +4 -0
  75. package/dist/features/game/adapters/inbound/GameInputZone.d.ts.map +1 -0
  76. package/dist/features/game/adapters/inbound/GameInputZone.js +50 -0
  77. package/dist/features/game/adapters/inbound/GameInputZone.js.map +1 -0
  78. package/dist/features/game/adapters/inbound/GameMeasurementProbe.d.ts +4 -0
  79. package/dist/features/game/adapters/inbound/GameMeasurementProbe.d.ts.map +1 -0
  80. package/dist/features/game/adapters/inbound/GameMeasurementProbe.js +54 -0
  81. package/dist/features/game/adapters/inbound/GameMeasurementProbe.js.map +1 -0
  82. package/dist/features/game/adapters/inbound/GameOverlay.d.ts +4 -0
  83. package/dist/features/game/adapters/inbound/GameOverlay.d.ts.map +1 -0
  84. package/dist/features/game/adapters/inbound/GameOverlay.js +39 -0
  85. package/dist/features/game/adapters/inbound/GameOverlay.js.map +1 -0
  86. package/dist/features/game/adapters/inbound/createGameKeyboardEvent.d.ts +16 -0
  87. package/dist/features/game/adapters/inbound/createGameKeyboardEvent.d.ts.map +1 -0
  88. package/dist/features/game/adapters/inbound/createGameKeyboardEvent.js +16 -0
  89. package/dist/features/game/adapters/inbound/createGameKeyboardEvent.js.map +1 -0
  90. package/dist/features/game/adapters/inbound/createGameMeasurementEvent.d.ts +14 -0
  91. package/dist/features/game/adapters/inbound/createGameMeasurementEvent.d.ts.map +1 -0
  92. package/dist/features/game/adapters/inbound/createGameMeasurementEvent.js +25 -0
  93. package/dist/features/game/adapters/inbound/createGameMeasurementEvent.js.map +1 -0
  94. package/dist/features/game/adapters/inbound/createGamePointerEvent.d.ts +17 -0
  95. package/dist/features/game/adapters/inbound/createGamePointerEvent.d.ts.map +1 -0
  96. package/dist/features/game/adapters/inbound/createGamePointerEvent.js +20 -0
  97. package/dist/features/game/adapters/inbound/createGamePointerEvent.js.map +1 -0
  98. package/dist/features/game/adapters/inbound/measureGameEntity.d.ts +5 -0
  99. package/dist/features/game/adapters/inbound/measureGameEntity.d.ts.map +1 -0
  100. package/dist/features/game/adapters/inbound/measureGameEntity.js +22 -0
  101. package/dist/features/game/adapters/inbound/measureGameEntity.js.map +1 -0
  102. package/dist/features/game/adapters/inbound/useGameInputZoneResponder.d.ts +15 -0
  103. package/dist/features/game/adapters/inbound/useGameInputZoneResponder.d.ts.map +1 -0
  104. package/dist/features/game/adapters/inbound/useGameInputZoneResponder.js +67 -0
  105. package/dist/features/game/adapters/inbound/useGameInputZoneResponder.js.map +1 -0
  106. package/dist/features/game/composition/GameRuntimeContext.d.ts +5 -0
  107. package/dist/features/game/composition/GameRuntimeContext.d.ts.map +1 -0
  108. package/dist/features/game/composition/GameRuntimeContext.js +4 -0
  109. package/dist/features/game/composition/GameRuntimeContext.js.map +1 -0
  110. package/dist/features/game/composition/createGameBindingContext.d.ts +4 -0
  111. package/dist/features/game/composition/createGameBindingContext.d.ts.map +1 -0
  112. package/dist/features/game/composition/createGameBindingContext.js +10 -0
  113. package/dist/features/game/composition/createGameBindingContext.js.map +1 -0
  114. package/dist/features/game/composition/createGameMeasurementRegistry.d.ts +4 -0
  115. package/dist/features/game/composition/createGameMeasurementRegistry.d.ts.map +1 -0
  116. package/dist/features/game/composition/createGameMeasurementRegistry.js +15 -0
  117. package/dist/features/game/composition/createGameMeasurementRegistry.js.map +1 -0
  118. package/dist/features/game/composition/useGameRuntime.d.ts +5 -0
  119. package/dist/features/game/composition/useGameRuntime.d.ts.map +1 -0
  120. package/dist/features/game/composition/useGameRuntime.js +117 -0
  121. package/dist/features/game/composition/useGameRuntime.js.map +1 -0
  122. package/dist/features/game/composition/useGameScheduledEffects.d.ts +17 -0
  123. package/dist/features/game/composition/useGameScheduledEffects.d.ts.map +1 -0
  124. package/dist/features/game/composition/useGameScheduledEffects.js +40 -0
  125. package/dist/features/game/composition/useGameScheduledEffects.js.map +1 -0
  126. package/dist/features/game/meta/gameEntityMeta.d.ts +403 -0
  127. package/dist/features/game/meta/gameEntityMeta.d.ts.map +1 -0
  128. package/dist/features/game/meta/gameEntityMeta.js +224 -0
  129. package/dist/features/game/meta/gameEntityMeta.js.map +1 -0
  130. package/dist/features/game/meta/gameFieldMeta.d.ts +61 -0
  131. package/dist/features/game/meta/gameFieldMeta.d.ts.map +1 -0
  132. package/dist/features/game/meta/gameFieldMeta.js +48 -0
  133. package/dist/features/game/meta/gameFieldMeta.js.map +1 -0
  134. package/dist/features/game/meta/gameInputZoneMeta.d.ts +163 -0
  135. package/dist/features/game/meta/gameInputZoneMeta.d.ts.map +1 -0
  136. package/dist/features/game/meta/gameInputZoneMeta.js +138 -0
  137. package/dist/features/game/meta/gameInputZoneMeta.js.map +1 -0
  138. package/dist/features/game/meta/gameMeasurementProbeMeta.d.ts +112 -0
  139. package/dist/features/game/meta/gameMeasurementProbeMeta.d.ts.map +1 -0
  140. package/dist/features/game/meta/gameMeasurementProbeMeta.js +70 -0
  141. package/dist/features/game/meta/gameMeasurementProbeMeta.js.map +1 -0
  142. package/dist/features/game/meta/gameMeta.d.ts +130 -0
  143. package/dist/features/game/meta/gameMeta.d.ts.map +1 -0
  144. package/dist/features/game/meta/gameMeta.js +113 -0
  145. package/dist/features/game/meta/gameMeta.js.map +1 -0
  146. package/dist/features/game/meta/gameOverlayMeta.d.ts +55 -0
  147. package/dist/features/game/meta/gameOverlayMeta.d.ts.map +1 -0
  148. package/dist/features/game/meta/gameOverlayMeta.js +65 -0
  149. package/dist/features/game/meta/gameOverlayMeta.js.map +1 -0
  150. package/dist/features/game/public.d.ts +8 -0
  151. package/dist/features/game/public.d.ts.map +1 -0
  152. package/dist/features/game/public.js +7 -0
  153. package/dist/features/game/public.js.map +1 -0
  154. package/dist/features/game/utils/clampGamePercentage.d.ts +3 -0
  155. package/dist/features/game/utils/clampGamePercentage.d.ts.map +1 -0
  156. package/dist/features/game/utils/clampGamePercentage.js +5 -0
  157. package/dist/features/game/utils/clampGamePercentage.js.map +1 -0
  158. package/dist/features/game/utils/resolveGameEntityMotionPlan.d.ts +15 -0
  159. package/dist/features/game/utils/resolveGameEntityMotionPlan.d.ts.map +1 -0
  160. package/dist/features/game/utils/resolveGameEntityMotionPlan.js +31 -0
  161. package/dist/features/game/utils/resolveGameEntityMotionPlan.js.map +1 -0
  162. package/dist/features/game/utils/toGamePercentage.d.ts +3 -0
  163. package/dist/features/game/utils/toGamePercentage.d.ts.map +1 -0
  164. package/dist/features/game/utils/toGamePercentage.js +6 -0
  165. package/dist/features/game/utils/toGamePercentage.js.map +1 -0
  166. package/dist/features/game/utils/useAnimatedGameEntityValue.d.ts +5 -0
  167. package/dist/features/game/utils/useAnimatedGameEntityValue.d.ts.map +1 -0
  168. package/dist/features/game/utils/useAnimatedGameEntityValue.js +33 -0
  169. package/dist/features/game/utils/useAnimatedGameEntityValue.js.map +1 -0
  170. package/dist/features/game/utils/useGameEntityAnimatedStyle.d.ts +16 -0
  171. package/dist/features/game/utils/useGameEntityAnimatedStyle.d.ts.map +1 -0
  172. package/dist/features/game/utils/useGameEntityAnimatedStyle.js +52 -0
  173. package/dist/features/game/utils/useGameEntityAnimatedStyle.js.map +1 -0
  174. package/dist/features/game/utils/useGameEntityMeasurement.d.ts +5 -0
  175. package/dist/features/game/utils/useGameEntityMeasurement.d.ts.map +1 -0
  176. package/dist/features/game/utils/useGameEntityMeasurement.js +14 -0
  177. package/dist/features/game/utils/useGameEntityMeasurement.js.map +1 -0
  178. package/dist/features/game/utils/useGameEntityMotionProgress.d.ts +5 -0
  179. package/dist/features/game/utils/useGameEntityMotionProgress.d.ts.map +1 -0
  180. package/dist/features/game/utils/useGameEntityMotionProgress.js +87 -0
  181. package/dist/features/game/utils/useGameEntityMotionProgress.js.map +1 -0
  182. package/dist/features/game/utils/useGameReducedMotion.d.ts +3 -0
  183. package/dist/features/game/utils/useGameReducedMotion.d.ts.map +1 -0
  184. package/dist/features/game/utils/useGameReducedMotion.js +13 -0
  185. package/dist/features/game/utils/useGameReducedMotion.js.map +1 -0
  186. package/dist/features/layout/gridMeta.d.ts +1 -1
  187. package/dist/features/layout/gridMeta.d.ts.map +1 -1
  188. package/dist/features/layout/gridMeta.js +7 -2
  189. package/dist/features/layout/gridMeta.js.map +1 -1
  190. package/dist/features/layout/screenMeta.d.ts +1 -1
  191. package/dist/features/layout/viewMeta.d.ts +1 -1
  192. package/dist/features/layout/viewMeta.d.ts.map +1 -1
  193. package/dist/features/layout/viewMeta.js +6 -2
  194. package/dist/features/layout/viewMeta.js.map +1 -1
  195. package/dist/features/registry/ZORA_COMPONENT_REGISTRY.d.ts.map +1 -1
  196. package/dist/features/registry/ZORA_COMPONENT_REGISTRY.js +16 -0
  197. package/dist/features/registry/ZORA_COMPONENT_REGISTRY.js.map +1 -1
  198. package/dist/features/section/screenSectionMeta.d.ts +1 -1
  199. package/dist/features/tabletop/adapters/inbound/CardBack.d.ts +5 -0
  200. package/dist/features/tabletop/adapters/inbound/CardBack.d.ts.map +1 -0
  201. package/dist/features/tabletop/adapters/inbound/CardBack.js +47 -0
  202. package/dist/features/tabletop/adapters/inbound/CardBack.js.map +1 -0
  203. package/dist/features/tabletop/adapters/inbound/CardHand.d.ts +5 -0
  204. package/dist/features/tabletop/adapters/inbound/CardHand.d.ts.map +1 -0
  205. package/dist/features/tabletop/adapters/inbound/CardHand.js +28 -0
  206. package/dist/features/tabletop/adapters/inbound/CardHand.js.map +1 -0
  207. package/dist/features/tabletop/adapters/inbound/PlayingCard.d.ts +5 -0
  208. package/dist/features/tabletop/adapters/inbound/PlayingCard.d.ts.map +1 -0
  209. package/dist/features/tabletop/adapters/inbound/PlayingCard.js +64 -0
  210. package/dist/features/tabletop/adapters/inbound/PlayingCard.js.map +1 -0
  211. package/dist/features/tabletop/adapters/inbound/PokerTrainingTable.d.ts +5 -0
  212. package/dist/features/tabletop/adapters/inbound/PokerTrainingTable.d.ts.map +1 -0
  213. package/dist/features/tabletop/adapters/inbound/PokerTrainingTable.js +12 -0
  214. package/dist/features/tabletop/adapters/inbound/PokerTrainingTable.js.map +1 -0
  215. package/dist/features/tabletop/adapters/inbound/TabletopTable.d.ts +5 -0
  216. package/dist/features/tabletop/adapters/inbound/TabletopTable.d.ts.map +1 -0
  217. package/dist/features/tabletop/adapters/inbound/TabletopTable.js +206 -0
  218. package/dist/features/tabletop/adapters/inbound/TabletopTable.js.map +1 -0
  219. package/dist/features/tabletop/meta.d.ts +353 -0
  220. package/dist/features/tabletop/meta.d.ts.map +1 -0
  221. package/dist/features/tabletop/meta.js +252 -0
  222. package/dist/features/tabletop/meta.js.map +1 -0
  223. package/dist/features/tabletop/public.d.ts +10 -0
  224. package/dist/features/tabletop/public.d.ts.map +1 -0
  225. package/dist/features/tabletop/public.js +9 -0
  226. package/dist/features/tabletop/public.js.map +1 -0
  227. package/dist/features/tabletop/utils/createPokerTrainingTableState.d.ts +13 -0
  228. package/dist/features/tabletop/utils/createPokerTrainingTableState.d.ts.map +1 -0
  229. package/dist/features/tabletop/utils/createPokerTrainingTableState.js +112 -0
  230. package/dist/features/tabletop/utils/createPokerTrainingTableState.js.map +1 -0
  231. package/dist/features/tabletop/utils/createTabletopColorScheme.d.ts +36 -0
  232. package/dist/features/tabletop/utils/createTabletopColorScheme.d.ts.map +1 -0
  233. package/dist/features/tabletop/utils/createTabletopColorScheme.js +144 -0
  234. package/dist/features/tabletop/utils/createTabletopColorScheme.js.map +1 -0
  235. package/dist/features/tabletop/utils/createTabletopGameSeats.d.ts +13 -0
  236. package/dist/features/tabletop/utils/createTabletopGameSeats.d.ts.map +1 -0
  237. package/dist/features/tabletop/utils/createTabletopGameSeats.js +22 -0
  238. package/dist/features/tabletop/utils/createTabletopGameSeats.js.map +1 -0
  239. package/dist/features/tabletop/utils/getPlayingCardLabel.d.ts +4 -0
  240. package/dist/features/tabletop/utils/getPlayingCardLabel.d.ts.map +1 -0
  241. package/dist/features/tabletop/utils/getPlayingCardLabel.js +6 -0
  242. package/dist/features/tabletop/utils/getPlayingCardLabel.js.map +1 -0
  243. package/dist/features/tabletop/utils/getTabletopCardDimensions.d.ts +12 -0
  244. package/dist/features/tabletop/utils/getTabletopCardDimensions.d.ts.map +1 -0
  245. package/dist/features/tabletop/utils/getTabletopCardDimensions.js +35 -0
  246. package/dist/features/tabletop/utils/getTabletopCardDimensions.js.map +1 -0
  247. package/dist/features/tabletop/utils/getTabletopSeatPosition.d.ts +9 -0
  248. package/dist/features/tabletop/utils/getTabletopSeatPosition.d.ts.map +1 -0
  249. package/dist/features/tabletop/utils/getTabletopSeatPosition.js +88 -0
  250. package/dist/features/tabletop/utils/getTabletopSeatPosition.js.map +1 -0
  251. package/dist/index.d.ts +8 -0
  252. package/dist/index.d.ts.map +1 -1
  253. package/dist/index.js +4 -0
  254. package/dist/index.js.map +1 -1
  255. package/dist/types/chess.d.ts +83 -0
  256. package/dist/types/chess.d.ts.map +1 -0
  257. package/dist/types/chess.js +2 -0
  258. package/dist/types/chess.js.map +1 -0
  259. package/dist/types/gamePresentation.d.ts +94 -0
  260. package/dist/types/gamePresentation.d.ts.map +1 -0
  261. package/dist/types/gamePresentation.js +2 -0
  262. package/dist/types/gamePresentation.js.map +1 -0
  263. package/dist/types/gameRuntime.d.ts +29 -0
  264. package/dist/types/gameRuntime.d.ts.map +1 -0
  265. package/dist/types/gameRuntime.js +2 -0
  266. package/dist/types/gameRuntime.js.map +1 -0
  267. package/dist/types/tabletop.d.ts +129 -0
  268. package/dist/types/tabletop.d.ts.map +1 -0
  269. package/dist/types/tabletop.js +2 -0
  270. package/dist/types/tabletop.js.map +1 -0
  271. package/package.json +13 -11
  272. package/src/features/authoring/allowedChildren.ts +15 -2
  273. package/src/features/authoring/componentMeta.test.ts +93 -0
  274. package/src/features/authoring/componentMeta.ts +27 -0
  275. package/src/features/authoring/constants.ts +3 -0
  276. package/src/features/card/cardMeta.ts +12 -2
  277. package/src/features/chess/adapters/inbound/ChessBoard.tsx +169 -0
  278. package/src/features/chess/adapters/inbound/OpeningBook.tsx +131 -0
  279. package/src/features/chess/meta.ts +168 -0
  280. package/src/features/chess/public.test.tsx +165 -0
  281. package/src/features/chess/public.ts +27 -0
  282. package/src/features/chess/utils/chessSquares.ts +6 -0
  283. package/src/features/chess/utils/createBoardSquares.ts +13 -0
  284. package/src/features/chess/utils/createChessBoardColorScheme.ts +55 -0
  285. package/src/features/chess/utils/createOpeningBookColorScheme.ts +26 -0
  286. package/src/features/chess/utils/getSquareFile.ts +6 -0
  287. package/src/features/chess/utils/getSquareRank.ts +6 -0
  288. package/src/features/chess/utils/isLightSquare.ts +8 -0
  289. package/src/features/chessTabletopOwnership.test.ts +71 -0
  290. package/src/features/game/adapters/inbound/Game.tsx +43 -0
  291. package/src/features/game/adapters/inbound/GameEntity.tsx +44 -0
  292. package/src/features/game/adapters/inbound/GameField.tsx +52 -0
  293. package/src/features/game/adapters/inbound/GameInputZone.tsx +99 -0
  294. package/src/features/game/adapters/inbound/GameMeasurementProbe.tsx +83 -0
  295. package/src/features/game/adapters/inbound/GameOverlay.tsx +58 -0
  296. package/src/features/game/adapters/inbound/createGameKeyboardEvent.test.ts +51 -0
  297. package/src/features/game/adapters/inbound/createGameKeyboardEvent.ts +33 -0
  298. package/src/features/game/adapters/inbound/createGameMeasurementEvent.test.ts +56 -0
  299. package/src/features/game/adapters/inbound/createGameMeasurementEvent.ts +38 -0
  300. package/src/features/game/adapters/inbound/createGamePointerEvent.test.ts +56 -0
  301. package/src/features/game/adapters/inbound/createGamePointerEvent.ts +39 -0
  302. package/src/features/game/adapters/inbound/measureGameEntity.ts +28 -0
  303. package/src/features/game/adapters/inbound/useGameInputZoneResponder.ts +85 -0
  304. package/src/features/game/composition/GameRuntimeContext.ts +6 -0
  305. package/src/features/game/composition/createGameBindingContext.test.ts +66 -0
  306. package/src/features/game/composition/createGameBindingContext.ts +11 -0
  307. package/src/features/game/composition/createGameMeasurementRegistry.test.ts +35 -0
  308. package/src/features/game/composition/createGameMeasurementRegistry.ts +16 -0
  309. package/src/features/game/composition/useGameRuntime.test.tsx +173 -0
  310. package/src/features/game/composition/useGameRuntime.ts +200 -0
  311. package/src/features/game/composition/useGameScheduledEffects.ts +85 -0
  312. package/src/features/game/meta/gameEntityMeta.ts +226 -0
  313. package/src/features/game/meta/gameFieldMeta.ts +49 -0
  314. package/src/features/game/meta/gameInputZoneMeta.ts +140 -0
  315. package/src/features/game/meta/gameMeasurementProbeMeta.ts +72 -0
  316. package/src/features/game/meta/gameMeta.ts +115 -0
  317. package/src/features/game/meta/gameOverlayMeta.ts +66 -0
  318. package/src/features/game/public.test.tsx +64 -0
  319. package/src/features/game/public.ts +19 -0
  320. package/src/features/game/utils/clampGamePercentage.ts +4 -0
  321. package/src/features/game/utils/resolveGameEntityMotionPlan.test.ts +63 -0
  322. package/src/features/game/utils/resolveGameEntityMotionPlan.ts +53 -0
  323. package/src/features/game/utils/toGamePercentage.ts +6 -0
  324. package/src/features/game/utils/useAnimatedGameEntityValue.ts +41 -0
  325. package/src/features/game/utils/useGameEntityAnimatedStyle.ts +87 -0
  326. package/src/features/game/utils/useGameEntityMeasurement.ts +19 -0
  327. package/src/features/game/utils/useGameEntityMotionProgress.ts +114 -0
  328. package/src/features/game/utils/useGameReducedMotion.ts +15 -0
  329. package/src/features/layout/gridMeta.ts +12 -2
  330. package/src/features/layout/viewMeta.ts +10 -2
  331. package/src/features/registry/ZORA_COMPONENT_REGISTRY.ts +29 -0
  332. package/src/features/tabletop/adapters/inbound/CardBack.tsx +70 -0
  333. package/src/features/tabletop/adapters/inbound/CardHand.tsx +61 -0
  334. package/src/features/tabletop/adapters/inbound/PlayingCard.tsx +95 -0
  335. package/src/features/tabletop/adapters/inbound/PokerTrainingTable.tsx +34 -0
  336. package/src/features/tabletop/adapters/inbound/TabletopTable.tsx +264 -0
  337. package/src/features/tabletop/meta.ts +254 -0
  338. package/src/features/tabletop/public.test.tsx +127 -0
  339. package/src/features/tabletop/public.ts +32 -0
  340. package/src/features/tabletop/utils/createPokerTrainingTableState.ts +152 -0
  341. package/src/features/tabletop/utils/createTabletopColorScheme.ts +232 -0
  342. package/src/features/tabletop/utils/createTabletopGameSeats.ts +31 -0
  343. package/src/features/tabletop/utils/getPlayingCardLabel.ts +8 -0
  344. package/src/features/tabletop/utils/getTabletopCardDimensions.ts +45 -0
  345. package/src/features/tabletop/utils/getTabletopSeatPosition.ts +100 -0
  346. package/src/index.ts +83 -0
  347. package/src/types/chess.ts +95 -0
  348. package/src/types/gamePresentation.ts +103 -0
  349. package/src/types/gameRuntime.ts +34 -0
  350. package/src/types/tabletop.ts +131 -0
  351. package/web-dist/chunks/{Accordion-paha5aje.js → Accordion-1cgz6f8t.js} +2 -2
  352. package/web-dist/chunks/{Accordion-fjnck2tg.js → Accordion-46jsv73s.js} +6 -6
  353. package/web-dist/chunks/{Accordion-q7c1ryf2.js → Accordion-4aeg9thd.js} +4 -4
  354. package/web-dist/chunks/{Accordion-xshn7k8f.js → Accordion-4p710d7k.js} +4 -4
  355. package/web-dist/chunks/{Accordion-06588rzn.js → Accordion-57akecv2.js} +1 -1
  356. package/web-dist/chunks/Accordion-57mn1j9e.js +830 -0
  357. package/web-dist/chunks/{Accordion-qpwhmqzd.js → Accordion-6aa1argz.js} +13 -13
  358. package/web-dist/chunks/{Accordion-v6ykq9hv.js → Accordion-77j966qb.js} +10 -10
  359. package/web-dist/chunks/{Accordion-49gf1zb8.js → Accordion-7hn324r1.js} +90 -60
  360. package/web-dist/chunks/{Accordion-7ja4mtbz.js → Accordion-7zfskq1s.js} +1 -1
  361. package/web-dist/chunks/Accordion-86z2tvvz.js +321 -0
  362. package/web-dist/chunks/Accordion-8pke1r50.js +1559 -0
  363. package/web-dist/chunks/{Accordion-395r3wra.js → Accordion-8t3hyjre.js} +2 -2
  364. package/web-dist/chunks/{Accordion-s42wwh6m.js → Accordion-94y2x5br.js} +6 -6
  365. package/web-dist/chunks/{Accordion-jzbq36ec.js → Accordion-axewg096.js} +8 -8
  366. package/web-dist/chunks/{Accordion-fmxygyb6.js → Accordion-be000xf6.js} +4 -4
  367. package/web-dist/chunks/{Accordion-0jkm3y3w.js → Accordion-bsy1jrak.js} +1 -1
  368. package/web-dist/chunks/{Accordion-pkqj4g3r.js → Accordion-ctd0h4r8.js} +5 -5
  369. package/web-dist/chunks/{Accordion-ftjkdjqs.js → Accordion-dm99cvz1.js} +3 -3
  370. package/web-dist/chunks/{Accordion-h95wvyn5.js → Accordion-egkpe4d2.js} +2 -2
  371. package/web-dist/chunks/{Accordion-1pp37dtg.js → Accordion-ej3ggc77.js} +4 -4
  372. package/web-dist/chunks/{Accordion-31aeqxak.js → Accordion-eknpf4ac.js} +3 -3
  373. package/web-dist/chunks/{Accordion-f5swy5bs.js → Accordion-epgj2djr.js} +1 -1
  374. package/web-dist/chunks/{Accordion-crx58d5n.js → Accordion-er294z8s.js} +2 -2
  375. package/web-dist/chunks/{Accordion-8kgtg62g.js → Accordion-et2acvzj.js} +6 -6
  376. package/web-dist/chunks/{Accordion-cscmtcn8.js → Accordion-ew71mmkm.js} +1 -1
  377. package/web-dist/chunks/{Accordion-hz4xaqjf.js → Accordion-f77vravp.js} +9 -9
  378. package/web-dist/chunks/{Accordion-ars389m1.js → Accordion-gdxed3b8.js} +3 -3
  379. package/web-dist/chunks/{Accordion-f1h2f05v.js → Accordion-j3fs0yak.js} +5 -5
  380. package/web-dist/chunks/{Accordion-rrpej6sv.js → Accordion-ja4p3a9f.js} +7 -7
  381. package/web-dist/chunks/{Accordion-grfbz6f2.js → Accordion-k3bc4kad.js} +1 -1
  382. package/web-dist/chunks/{Accordion-4a6wj3ez.js → Accordion-kw4dssbm.js} +9 -9
  383. package/web-dist/chunks/{Accordion-x0j8b2by.js → Accordion-m267wpc1.js} +5 -5
  384. package/web-dist/chunks/{Accordion-gbba10rg.js → Accordion-mt5a3fhc.js} +6 -6
  385. package/web-dist/chunks/{Accordion-far6szrp.js → Accordion-nc8fk7hn.js} +5 -5
  386. package/web-dist/chunks/{Accordion-ch67q4t0.js → Accordion-nzqx7f8a.js} +4 -4
  387. package/web-dist/chunks/{Accordion-33rd76r7.js → Accordion-ppv52ctr.js} +8 -8
  388. package/web-dist/chunks/{Accordion-f05a7r28.js → Accordion-pssgp0pq.js} +5 -5
  389. package/web-dist/chunks/{Accordion-1vewf8aa.js → Accordion-st01gxy2.js} +2 -2
  390. package/web-dist/chunks/{Accordion-t3p4ykg7.js → Accordion-szeexyec.js} +8 -8
  391. package/web-dist/chunks/{Accordion-t6sdgmbz.js → Accordion-vq462y0x.js} +1 -1
  392. package/web-dist/chunks/{Accordion-2dws3778.js → Accordion-vr8des0w.js} +4 -4
  393. package/web-dist/chunks/{Accordion-tx78txec.js → Accordion-w3c6g1jx.js} +5 -5
  394. package/web-dist/chunks/{Accordion-0psdn97s.js → Accordion-w6n8e1ff.js} +1 -1
  395. package/web-dist/chunks/{Accordion-sz21xsf4.js → Accordion-wvphg9x4.js} +1 -1
  396. package/web-dist/chunks/{Accordion-3404tth9.js → Accordion-x30jrtfk.js} +7 -7
  397. package/web-dist/chunks/{Accordion-jh7nxehr.js → Accordion-x5ny2aax.js} +1 -1
  398. package/web-dist/chunks/{Accordion-96cqeekv.js → Accordion-ye97yam9.js} +5 -5
  399. package/web-dist/chunks/{Accordion-hxfa71g9.js → Accordion-yjrr96tn.js} +7 -7
  400. package/web-dist/chunks/{Accordion-r4c9k9y7.js → Accordion-z3s5pqdw.js} +2 -2
  401. package/web-dist/components/accordion/Accordion.js +12 -12
  402. package/web-dist/components/accordion-item/AccordionItem.js +12 -12
  403. package/web-dist/components/activity-indicator/ActivityIndicator.js +3 -3
  404. package/web-dist/components/app-bar/AppBar.js +19 -19
  405. package/web-dist/components/app-shell/AppShell.js +6 -6
  406. package/web-dist/components/avatar/Avatar.js +12 -12
  407. package/web-dist/components/avatar-group/AvatarGroup.js +12 -12
  408. package/web-dist/components/badge/Badge.js +7 -7
  409. package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +20 -20
  410. package/web-dist/components/bottom-sheet/BottomSheet.js +8 -8
  411. package/web-dist/components/bottom-sheet-flat-list/BottomSheetFlatList.js +8 -8
  412. package/web-dist/components/bottom-sheet-scroll-view/BottomSheetScrollView.js +8 -8
  413. package/web-dist/components/bottom-sheet-section-list/BottomSheetSectionList.js +8 -8
  414. package/web-dist/components/bottom-sheet-view/BottomSheetView.js +8 -8
  415. package/web-dist/components/bottom-sheet-virtualized-list/BottomSheetVirtualizedList.js +8 -8
  416. package/web-dist/components/breadcrumbs/Breadcrumbs.js +15 -15
  417. package/web-dist/components/button/Button.js +12 -12
  418. package/web-dist/components/button-group/ButtonGroup.js +12 -12
  419. package/web-dist/components/camera-permission-view/CameraPermissionView.js +20 -20
  420. package/web-dist/components/card/Card.js +19 -19
  421. package/web-dist/components/card-back/CardBack.d.ts +7 -0
  422. package/web-dist/components/card-back/CardBack.js +19 -0
  423. package/web-dist/components/card-back/index.d.ts +1 -0
  424. package/web-dist/components/card-back/index.js +2 -0
  425. package/web-dist/components/card-hand/CardHand.d.ts +7 -0
  426. package/web-dist/components/card-hand/CardHand.js +19 -0
  427. package/web-dist/components/card-hand/index.d.ts +1 -0
  428. package/web-dist/components/card-hand/index.js +2 -0
  429. package/web-dist/components/chat-list-item/ChatListItem.js +16 -16
  430. package/web-dist/components/checkbox/Checkbox.js +12 -12
  431. package/web-dist/components/checkbox-group/CheckboxGroup.js +12 -12
  432. package/web-dist/components/chess-board/ChessBoard.d.ts +4 -0
  433. package/web-dist/components/chess-board/ChessBoard.js +13 -0
  434. package/web-dist/components/chess-board/index.d.ts +1 -0
  435. package/web-dist/components/chess-board/index.js +2 -0
  436. package/web-dist/components/chip/Chip.js +13 -13
  437. package/web-dist/components/chip-group/ChipGroup.js +13 -13
  438. package/web-dist/components/collection-editor/CollectionEditor.js +19 -19
  439. package/web-dist/components/content-rail/ContentRail.js +13 -13
  440. package/web-dist/components/data-table/DataTable.js +26 -26
  441. package/web-dist/components/date-picker/DatePicker.js +17 -17
  442. package/web-dist/components/dialog/Dialog.js +12 -12
  443. package/web-dist/components/divider/Divider.js +6 -6
  444. package/web-dist/components/empty-state/EmptyState.js +20 -20
  445. package/web-dist/components/field/Field.js +12 -12
  446. package/web-dist/components/flat-list/FlatList.js +13 -13
  447. package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +18 -18
  448. package/web-dist/components/form/Form.js +16 -16
  449. package/web-dist/components/form-actions/FormActions.js +16 -16
  450. package/web-dist/components/form-error/FormError.js +16 -16
  451. package/web-dist/components/game/Game.d.ts +8 -0
  452. package/web-dist/components/game/Game.js +25 -0
  453. package/web-dist/components/game/index.d.ts +1 -0
  454. package/web-dist/components/game/index.js +2 -0
  455. package/web-dist/components/game-entity/GameEntity.d.ts +8 -0
  456. package/web-dist/components/game-entity/GameEntity.js +25 -0
  457. package/web-dist/components/game-entity/index.d.ts +1 -0
  458. package/web-dist/components/game-entity/index.js +2 -0
  459. package/web-dist/components/game-field/GameField.d.ts +8 -0
  460. package/web-dist/components/game-field/GameField.js +25 -0
  461. package/web-dist/components/game-field/index.d.ts +1 -0
  462. package/web-dist/components/game-field/index.js +2 -0
  463. package/web-dist/components/game-input-zone/GameInputZone.d.ts +8 -0
  464. package/web-dist/components/game-input-zone/GameInputZone.js +25 -0
  465. package/web-dist/components/game-input-zone/index.d.ts +1 -0
  466. package/web-dist/components/game-input-zone/index.js +2 -0
  467. package/web-dist/components/game-measurement-probe/GameMeasurementProbe.d.ts +8 -0
  468. package/web-dist/components/game-measurement-probe/GameMeasurementProbe.js +25 -0
  469. package/web-dist/components/game-measurement-probe/index.d.ts +1 -0
  470. package/web-dist/components/game-measurement-probe/index.js +2 -0
  471. package/web-dist/components/game-overlay/GameOverlay.d.ts +8 -0
  472. package/web-dist/components/game-overlay/GameOverlay.js +25 -0
  473. package/web-dist/components/game-overlay/index.d.ts +1 -0
  474. package/web-dist/components/game-overlay/index.js +2 -0
  475. package/web-dist/components/gradient/Gradient.js +7 -7
  476. package/web-dist/components/gradient-renderer-provider/GradientRendererProvider.js +7 -7
  477. package/web-dist/components/grid/Grid.js +6 -6
  478. package/web-dist/components/heading/Heading.js +6 -6
  479. package/web-dist/components/hero/Hero.js +19 -19
  480. package/web-dist/components/icon/Icon.js +4 -4
  481. package/web-dist/components/icon-button/IconButton.js +12 -12
  482. package/web-dist/components/image/Image.js +10 -10
  483. package/web-dist/components/keyboard-avoiding-view/KeyboardAvoidingView.js +2 -2
  484. package/web-dist/components/list/List.js +13 -13
  485. package/web-dist/components/list-item/ListItem.js +13 -13
  486. package/web-dist/components/list-section/ListSection.js +13 -13
  487. package/web-dist/components/media-card/MediaCard.js +19 -19
  488. package/web-dist/components/message-bubble/MessageBubble.js +16 -16
  489. package/web-dist/components/metric-card/MetricCard.js +19 -19
  490. package/web-dist/components/missing-element/MissingElement.js +11 -11
  491. package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +18 -18
  492. package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +18 -18
  493. package/web-dist/components/opening-book/OpeningBook.d.ts +4 -0
  494. package/web-dist/components/opening-book/OpeningBook.js +13 -0
  495. package/web-dist/components/opening-book/index.d.ts +1 -0
  496. package/web-dist/components/opening-book/index.js +2 -0
  497. package/web-dist/components/otp-form/OtpForm.js +18 -18
  498. package/web-dist/components/pagination/Pagination.js +13 -13
  499. package/web-dist/components/palette-item/PaletteItem.js +19 -19
  500. package/web-dist/components/playing-card/PlayingCard.d.ts +7 -0
  501. package/web-dist/components/playing-card/PlayingCard.js +19 -0
  502. package/web-dist/components/playing-card/index.d.ts +1 -0
  503. package/web-dist/components/playing-card/index.js +2 -0
  504. package/web-dist/components/poker-training-table/PokerTrainingTable.d.ts +7 -0
  505. package/web-dist/components/poker-training-table/PokerTrainingTable.js +19 -0
  506. package/web-dist/components/poker-training-table/index.d.ts +1 -0
  507. package/web-dist/components/poker-training-table/index.js +2 -0
  508. package/web-dist/components/popover-menu/PopoverMenu.js +14 -14
  509. package/web-dist/components/post-card/PostCard.js +19 -19
  510. package/web-dist/components/product-card/ProductCard.js +19 -19
  511. package/web-dist/components/progress/Progress.js +10 -10
  512. package/web-dist/components/progress-ring/ProgressRing.js +10 -10
  513. package/web-dist/components/radio/Radio.js +14 -14
  514. package/web-dist/components/radio-group/RadioGroup.js +14 -14
  515. package/web-dist/components/rating/Rating.js +9 -9
  516. package/web-dist/components/reader-surface/ReaderSurface.js +21 -21
  517. package/web-dist/components/scan-overlay/ScanOverlay.js +20 -20
  518. package/web-dist/components/screen/Screen.js +6 -6
  519. package/web-dist/components/screen-section/ScreenSection.js +10 -10
  520. package/web-dist/components/scroll-view/ScrollView.js +6 -6
  521. package/web-dist/components/search-input/SearchInput.js +13 -13
  522. package/web-dist/components/section-header/SectionHeader.js +10 -10
  523. package/web-dist/components/section-list/SectionList.js +13 -13
  524. package/web-dist/components/select/Select.js +16 -16
  525. package/web-dist/components/selectable-item/SelectableItem.js +5 -5
  526. package/web-dist/components/selection-provider/SelectionProvider.js +5 -5
  527. package/web-dist/components/sign-in-form/SignInForm.js +18 -18
  528. package/web-dist/components/sign-up-form/SignUpForm.js +18 -18
  529. package/web-dist/components/skeleton/Skeleton.js +22 -22
  530. package/web-dist/components/skeleton-card/SkeletonCard.js +22 -22
  531. package/web-dist/components/skeleton-list/SkeletonList.js +22 -22
  532. package/web-dist/components/skeleton-text/SkeletonText.js +22 -22
  533. package/web-dist/components/surface/Surface.js +7 -7
  534. package/web-dist/components/switch/Switch.js +7 -7
  535. package/web-dist/components/tab/Tab.js +7 -7
  536. package/web-dist/components/tab-list/TabList.js +7 -7
  537. package/web-dist/components/tab-panel/TabPanel.js +7 -7
  538. package/web-dist/components/tabletop-table/TabletopTable.d.ts +7 -0
  539. package/web-dist/components/tabletop-table/TabletopTable.js +19 -0
  540. package/web-dist/components/tabletop-table/index.d.ts +1 -0
  541. package/web-dist/components/tabletop-table/index.js +2 -0
  542. package/web-dist/components/tabs/Tabs.js +7 -7
  543. package/web-dist/components/text/Text.js +6 -6
  544. package/web-dist/components/text-input/TextInput.js +13 -13
  545. package/web-dist/components/time-picker/TimePicker.js +17 -17
  546. package/web-dist/components/timeline/Timeline.js +11 -11
  547. package/web-dist/components/toast/Toast.js +9 -9
  548. package/web-dist/components/toast-provider/ToastProvider.js +9 -9
  549. package/web-dist/components/toolbar/Toolbar.js +19 -19
  550. package/web-dist/components/tree-item/TreeItem.js +16 -16
  551. package/web-dist/components/uploader/Uploader.js +22 -22
  552. package/web-dist/components/view/View.js +6 -6
  553. package/web-dist/manifest.json +1648 -1377
  554. package/web-dist/runtime/ZoraProvider.js +8 -8
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { StyleSheet, View } from 'react-native';
3
+ import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';
4
+ import { CardBack } from './CardBack';
5
+ import { PlayingCard } from './PlayingCard';
6
+ /*** Renders a compact row of face-up and face-down cards. */
7
+ export const CardHand = withZoraThemeScope(CardHandInner);
8
+ /*** Creates stable indices for non-revealing card backs. */
9
+ function createFaceDownCards(count) {
10
+ return Array.from({ length: Math.max(0, count) }, (_, index) => index);
11
+ }
12
+ /*** Renders the card row from caller-owned values. */
13
+ function CardHandInner({ cards = [], faceDownCards = 0, size = 'medium', muted = false, colorScheme, accessibilityLabel, testID, }) {
14
+ const hiddenCards = createFaceDownCards(faceDownCards);
15
+ return (<View accessibilityLabel={accessibilityLabel} style={styles.hand} testID={testID}>
16
+ {cards.map((card, index) => (<PlayingCard card={card} colorScheme={colorScheme} key={`${card.rank}-${card.suit}-${index}`} muted={muted} size={size} testID={testID ? `${testID}-card-${index}` : undefined}/>))}
17
+ {hiddenCards.map((index) => (<CardBack colorScheme={colorScheme} key={`hidden-${index}`} muted={muted} size={size} testID={testID ? `${testID}-hidden-${index}` : undefined}/>))}
18
+ </View>);
19
+ }
20
+ const styles = StyleSheet.create({
21
+ hand: {
22
+ alignItems: 'center',
23
+ flexDirection: 'row',
24
+ gap: 4,
25
+ justifyContent: 'center',
26
+ },
27
+ });
28
+ //# sourceMappingURL=CardHand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardHand.js","sourceRoot":"","sources":["../../../../../src/features/tabletop/adapters/inbound/CardHand.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,6DAA6D;AAC7D,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC;AAE1D,4DAA4D;AAC5D,SAAS,mBAAmB,CAAC,KAAa;IACxC,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;AACzE,CAAC;AAED,sDAAsD;AACtD,SAAS,aAAa,CAAC,EACrB,KAAK,GAAG,EAAE,EACV,aAAa,GAAG,CAAC,EACjB,IAAI,GAAG,QAAQ,EACf,KAAK,GAAG,KAAK,EACb,WAAW,EACX,kBAAkB,EAClB,MAAM,GACQ;IACd,MAAM,WAAW,GAAG,mBAAmB,CAAC,aAAa,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AAC,CAAC","sourcesContent":["import React from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nimport type { CardHandProps } from '../../../../types/tabletop';\nimport { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';\nimport { CardBack } from './CardBack';\nimport { PlayingCard } from './PlayingCard';\n\n/*** Renders a compact row of face-up and face-down cards. */\nexport const CardHand = withZoraThemeScope(CardHandInner);\n\n/*** Creates stable indices for non-revealing card backs. */\nfunction createFaceDownCards(count: number): readonly number[] {\n return Array.from({ length: Math.max(0, count) }, (_, index) => index);\n}\n\n/*** Renders the card row from caller-owned values. */\nfunction CardHandInner({\n cards = [],\n faceDownCards = 0,\n size = 'medium',\n muted = false,\n colorScheme,\n accessibilityLabel,\n testID,\n}: CardHandProps) {\n const hiddenCards = createFaceDownCards(faceDownCards);\n\n return (\n <View accessibilityLabel={accessibilityLabel} style={styles.hand} testID={testID}>\n {cards.map((card, index) => (\n <PlayingCard\n card={card}\n colorScheme={colorScheme}\n key={`${card.rank}-${card.suit}-${index}`}\n muted={muted}\n size={size}\n testID={testID ? `${testID}-card-${index}` : undefined}\n />\n ))}\n {hiddenCards.map((index) => (\n <CardBack\n colorScheme={colorScheme}\n key={`hidden-${index}`}\n muted={muted}\n size={size}\n testID={testID ? `${testID}-hidden-${index}` : undefined}\n />\n ))}\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n hand: {\n alignItems: 'center',\n flexDirection: 'row',\n gap: 4,\n justifyContent: 'center',\n },\n});\n"]}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { PlayingCardProps } from '../../../../types/tabletop';
3
+ /*** Renders a face-up playing card with an accessible rank and suit. */
4
+ export declare const PlayingCard: (props: PlayingCardProps) => React.ReactElement | null;
5
+ //# sourceMappingURL=PlayingCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlayingCard.d.ts","sourceRoot":"","sources":["../../../../../src/features/tabletop/adapters/inbound/PlayingCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AASnE,wEAAwE;AACxE,eAAO,MAAM,WAAW,wDAAuC,CAAC"}
@@ -0,0 +1,64 @@
1
+ import React from 'react';
2
+ import { StyleSheet, Text, View } from 'react-native';
3
+ import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';
4
+ import { useZoraTheme } from '../../../theme/composition/useZoraTheme';
5
+ import { createTabletopColorScheme } from '../../utils/createTabletopColorScheme';
6
+ import { getPlayingCardLabel } from '../../utils/getPlayingCardLabel';
7
+ import { getTabletopCardDimensions } from '../../utils/getTabletopCardDimensions';
8
+ const suitMarks = { clubs: '♣', diamonds: '♦', hearts: '♥', spades: '♠' };
9
+ /*** Renders a face-up playing card with an accessible rank and suit. */
10
+ export const PlayingCard = withZoraThemeScope(PlayingCardInner);
11
+ /*** Renders the card face using the active ZORA theme. */
12
+ function PlayingCardInner({ card, size = 'medium', selected = false, muted = false, accessibilityLabel, colorScheme, testID, }) {
13
+ const { theme } = useZoraTheme();
14
+ const colors = React.useMemo(() => createTabletopColorScheme(theme, colorScheme), [colorScheme, theme]);
15
+ const dimensions = getTabletopCardDimensions(size);
16
+ const suitColor = card.suit === 'hearts' || card.suit === 'diamonds' ? colors.redSuitText : colors.cardText;
17
+ return (<View accessibilityLabel={accessibilityLabel ?? getPlayingCardLabel(card)} accessibilityRole="image" style={[
18
+ styles.card,
19
+ {
20
+ backgroundColor: colors.cardSurface,
21
+ borderColor: selected ? colors.seatSelectedBorder : colors.cardBorder,
22
+ borderRadius: dimensions.radius,
23
+ height: dimensions.height,
24
+ opacity: muted ? 0.48 : 1,
25
+ width: dimensions.width,
26
+ },
27
+ ]} testID={testID}>
28
+ <Text selectable={false} style={[
29
+ styles.rank,
30
+ {
31
+ color: suitColor,
32
+ fontSize: dimensions.rankFontSize,
33
+ lineHeight: dimensions.rankFontSize + 4,
34
+ },
35
+ ]}>
36
+ {card.rank}
37
+ </Text>
38
+ <Text selectable={false} style={[
39
+ styles.suit,
40
+ {
41
+ color: suitColor,
42
+ fontSize: dimensions.suitFontSize,
43
+ lineHeight: dimensions.suitFontSize + 3,
44
+ },
45
+ ]}>
46
+ {suitMarks[card.suit]}
47
+ </Text>
48
+ </View>);
49
+ }
50
+ const styles = StyleSheet.create({
51
+ card: {
52
+ alignItems: 'center',
53
+ borderWidth: 1,
54
+ justifyContent: 'center',
55
+ },
56
+ rank: {
57
+ fontWeight: '800',
58
+ },
59
+ suit: {
60
+ fontWeight: '700',
61
+ marginTop: -2,
62
+ },
63
+ });
64
+ //# sourceMappingURL=PlayingCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlayingCard.js","sourceRoot":"","sources":["../../../../../src/features/tabletop/adapters/inbound/PlayingCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAElF,MAAM,SAAS,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAW,CAAC;AAEnF,wEAAwE;AACxE,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;AAEhE,0DAA0D;AAC1D,SAAS,gBAAgB,CAAC,EACxB,IAAI,EACJ,IAAI,GAAG,QAAQ,EACf,QAAQ,GAAG,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;gBACjC,UAAU,EAAE,UAAU,CAAC,YAAY,GAAG,CAAC;aACxC;SACF,CAAC,CAEF;QAAA,CAAC,IAAI,CAAC,IAAI,CACZ;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,IAAI,CACH,UAAU,CAAC,CAAC,KAAK,CAAC,CAClB,KAAK,CAAC,CAAC;YACL,MAAM,CAAC,IAAI;YACX;gBACE,KAAK,EAAE,SAAS;gBAChB,QAAQ,EAAE,UAAU,CAAC,YAAY;gBACjC,UAAU,EAAE,UAAU,CAAC,YAAY,GAAG,CAAC;aACxC;SACF,CAAC,CAEF;QAAA,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CACvB;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,UAAU,EAAE,QAAQ;QACpB,WAAW,EAAE,CAAC;QACd,cAAc,EAAE,QAAQ;KACzB;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,KAAK;KAClB;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,CAAC,CAAC;KACd;CACF,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\n\nimport type { PlayingCardProps } from '../../../../types/tabletop';\nimport { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';\nimport { useZoraTheme } from '../../../theme/composition/useZoraTheme';\nimport { createTabletopColorScheme } from '../../utils/createTabletopColorScheme';\nimport { getPlayingCardLabel } from '../../utils/getPlayingCardLabel';\nimport { getTabletopCardDimensions } from '../../utils/getTabletopCardDimensions';\n\nconst suitMarks = { clubs: '♣', diamonds: '♦', hearts: '♥', spades: '♠' } as const;\n\n/*** Renders a face-up playing card with an accessible rank and suit. */\nexport const PlayingCard = withZoraThemeScope(PlayingCardInner);\n\n/*** Renders the card face using the active ZORA theme. */\nfunction PlayingCardInner({\n card,\n size = 'medium',\n selected = false,\n muted = false,\n accessibilityLabel,\n colorScheme,\n testID,\n}: PlayingCardProps) {\n const { theme } = useZoraTheme();\n const colors = React.useMemo(\n () => createTabletopColorScheme(theme, colorScheme),\n [colorScheme, theme],\n );\n const dimensions = getTabletopCardDimensions(size);\n const suitColor =\n card.suit === 'hearts' || card.suit === 'diamonds' ? colors.redSuitText : colors.cardText;\n\n return (\n <View\n accessibilityLabel={accessibilityLabel ?? getPlayingCardLabel(card)}\n accessibilityRole=\"image\"\n style={[\n styles.card,\n {\n backgroundColor: colors.cardSurface,\n borderColor: selected ? colors.seatSelectedBorder : colors.cardBorder,\n borderRadius: dimensions.radius,\n height: dimensions.height,\n opacity: muted ? 0.48 : 1,\n width: dimensions.width,\n },\n ]}\n testID={testID}\n >\n <Text\n selectable={false}\n style={[\n styles.rank,\n {\n color: suitColor,\n fontSize: dimensions.rankFontSize,\n lineHeight: dimensions.rankFontSize + 4,\n },\n ]}\n >\n {card.rank}\n </Text>\n <Text\n selectable={false}\n style={[\n styles.suit,\n {\n color: suitColor,\n fontSize: dimensions.suitFontSize,\n lineHeight: dimensions.suitFontSize + 3,\n },\n ]}\n >\n {suitMarks[card.suit]}\n </Text>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n card: {\n alignItems: 'center',\n borderWidth: 1,\n justifyContent: 'center',\n },\n rank: {\n fontWeight: '800',\n },\n suit: {\n fontWeight: '700',\n marginTop: -2,\n },\n});\n"]}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { PokerTrainingTableProps } from '../../../../types/tabletop';
3
+ /*** Maps a serializable training task to presentation without running poker or training policy. */
4
+ export declare const PokerTrainingTable: (props: PokerTrainingTableProps) => React.ReactElement | null;
5
+ //# sourceMappingURL=PokerTrainingTable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PokerTrainingTable.d.ts","sourceRoot":"","sources":["../../../../../src/features/tabletop/adapters/inbound/PokerTrainingTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAK1E,mGAAmG;AACnG,eAAO,MAAM,kBAAkB,+DAA8C,CAAC"}
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';
3
+ import { createPokerTrainingTableState } from '../../utils/createPokerTrainingTableState';
4
+ import { TabletopTable } from './TabletopTable';
5
+ /*** Maps a serializable training task to presentation without running poker or training policy. */
6
+ export const PokerTrainingTable = withZoraThemeScope(PokerTrainingTableInner);
7
+ /*** Renders the reconstructed seat ring and shared table content. */
8
+ function PokerTrainingTableInner({ task = {}, defaultStackBigBlinds = 100, accessibilityLabel, ...tableProps }) {
9
+ const state = React.useMemo(() => createPokerTrainingTableState(task, { defaultStackBigBlinds }), [defaultStackBigBlinds, task]);
10
+ return (<TabletopTable {...tableProps} accessibilityLabel={accessibilityLabel ?? state.accessibilityLabel} centerCards={state.centerCards} centerLabel={state.centerLabel} centerSublabel={state.centerSublabel} seatCount={state.seatCount} seats={state.seats}/>);
11
+ }
12
+ //# sourceMappingURL=PokerTrainingTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PokerTrainingTable.js","sourceRoot":"","sources":["../../../../../src/features/tabletop/adapters/inbound/PokerTrainingTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,6BAA6B,EAAE,MAAM,2CAA2C,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,mGAAmG;AACnG,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,uBAAuB,CAAC,CAAC;AAE9E,qEAAqE;AACrE,SAAS,uBAAuB,CAAC,EAC/B,IAAI,GAAG,EAAE,EACT,qBAAqB,GAAG,GAAG,EAC3B,kBAAkB,EAClB,GAAG,UAAU,EACW;IACxB,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CACzB,GAAG,EAAE,CAAC,6BAA6B,CAAC,IAAI,EAAE,EAAE,qBAAqB,EAAE,CAAC,EACpE,CAAC,qBAAqB,EAAE,IAAI,CAAC,CAC9B,CAAC;IAEF,OAAO,CACL,CAAC,aAAa,CACZ,IAAI,UAAU,CAAC,CACf,kBAAkB,CAAC,CAAC,kBAAkB,IAAI,KAAK,CAAC,kBAAkB,CAAC,CACnE,WAAW,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAC/B,WAAW,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAC/B,cAAc,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CACrC,SAAS,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAC3B,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EACnB,CACH,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport type { PokerTrainingTableProps } from '../../../../types/tabletop';\nimport { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';\nimport { createPokerTrainingTableState } from '../../utils/createPokerTrainingTableState';\nimport { TabletopTable } from './TabletopTable';\n\n/*** Maps a serializable training task to presentation without running poker or training policy. */\nexport const PokerTrainingTable = withZoraThemeScope(PokerTrainingTableInner);\n\n/*** Renders the reconstructed seat ring and shared table content. */\nfunction PokerTrainingTableInner({\n task = {},\n defaultStackBigBlinds = 100,\n accessibilityLabel,\n ...tableProps\n}: PokerTrainingTableProps) {\n const state = React.useMemo(\n () => createPokerTrainingTableState(task, { defaultStackBigBlinds }),\n [defaultStackBigBlinds, task],\n );\n\n return (\n <TabletopTable\n {...tableProps}\n accessibilityLabel={accessibilityLabel ?? state.accessibilityLabel}\n centerCards={state.centerCards}\n centerLabel={state.centerLabel}\n centerSublabel={state.centerSublabel}\n seatCount={state.seatCount}\n seats={state.seats}\n />\n );\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { TabletopTableProps } from '../../../../types/tabletop';
3
+ /*** Renders a responsive table surface and caller-owned seats. */
4
+ export declare const TabletopTable: (props: TabletopTableProps) => React.ReactElement | null;
5
+ //# sourceMappingURL=TabletopTable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TabletopTable.d.ts","sourceRoot":"","sources":["../../../../../src/features/tabletop/adapters/inbound/TabletopTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAOrE,kEAAkE;AAClE,eAAO,MAAM,aAAa,0DAAyC,CAAC"}
@@ -0,0 +1,206 @@
1
+ import React from 'react';
2
+ import { StyleSheet, Text, View } from 'react-native';
3
+ import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';
4
+ import { useZoraTheme } from '../../../theme/composition/useZoraTheme';
5
+ import { createTabletopColorScheme } from '../../utils/createTabletopColorScheme';
6
+ import { getTabletopSeatPosition } from '../../utils/getTabletopSeatPosition';
7
+ import { CardHand } from './CardHand';
8
+ /*** Renders a responsive table surface and caller-owned seats. */
9
+ export const TabletopTable = withZoraThemeScope(TabletopTableInner);
10
+ /*** Summarizes the visible seat state for assistive technology. */
11
+ function createSeatAccessibilityLabel(seat) {
12
+ if (seat.accessibilityLabel !== undefined)
13
+ return seat.accessibilityLabel;
14
+ if (typeof seat.label !== 'string')
15
+ return undefined;
16
+ const parts = [seat.label];
17
+ if (typeof seat.sublabel === 'string')
18
+ parts.push(seat.sublabel);
19
+ if (typeof seat.tokenLabel === 'string')
20
+ parts.push(seat.tokenLabel);
21
+ if (seat.selected)
22
+ parts.push('selected');
23
+ if (seat.muted)
24
+ parts.push('muted');
25
+ return parts.join(', ');
26
+ }
27
+ /*** Renders the table geometry using the active ZORA theme. */
28
+ function TabletopTableInner({ seats, centerCards = [], centerLabel, centerSublabel, shape = 'oval', seatCount, cardSize = 'small', disabled = false, colorScheme, accessibilityLabel, testID, }) {
29
+ const { theme } = useZoraTheme();
30
+ const colors = React.useMemo(() => createTabletopColorScheme(theme, colorScheme), [colorScheme, theme]);
31
+ const resolvedSeatCount = seatCount ?? seats.length;
32
+ return (<View accessibilityLabel={accessibilityLabel} style={[
33
+ styles.root,
34
+ { aspectRatio: shape === 'circle' ? 1 : 1.6, opacity: disabled ? 0.56 : 1 },
35
+ ]} testID={testID}>
36
+ <View style={[
37
+ styles.surface,
38
+ shape === 'circle' ? styles.circleSurface : styles.ovalSurface,
39
+ shape === 'rounded' ? styles.roundedSurface : null,
40
+ {
41
+ backgroundColor: colors.tableFelt,
42
+ borderColor: colors.tableBorder,
43
+ },
44
+ ]}>
45
+ <View pointerEvents="none" style={[
46
+ styles.innerSurface,
47
+ shape === 'circle' ? styles.circleSurface : styles.ovalSurface,
48
+ shape === 'rounded' ? styles.roundedSurface : null,
49
+ { borderColor: colors.tableInnerBorder },
50
+ ]}/>
51
+ <View style={styles.centerContent}>
52
+ {centerCards.length > 0 ? (<CardHand cards={centerCards} colorScheme={colorScheme} size={cardSize}/>) : null}
53
+ {centerLabel !== undefined ? (<View style={[styles.centerLabel, { backgroundColor: colors.seatSurface }]}>
54
+ <Text style={[styles.centerLabelText, { color: colors.seatText }]}>
55
+ {centerLabel}
56
+ </Text>
57
+ </View>) : null}
58
+ {centerSublabel !== undefined ? (<Text style={[styles.centerSublabel, { color: colors.tableMutedText }]}>
59
+ {centerSublabel}
60
+ </Text>) : null}
61
+ </View>
62
+ </View>
63
+
64
+ {seats.map((seat, index) => {
65
+ const position = getTabletopSeatPosition(index, resolvedSeatCount);
66
+ const hasCards = seat.cards !== undefined || seat.faceDownCards !== undefined;
67
+ const seatCardSize = seat.selected && cardSize === 'small' ? 'medium' : cardSize;
68
+ return (<View accessibilityLabel={createSeatAccessibilityLabel(seat)} accessibilityRole="summary" key={seat.id} style={[
69
+ styles.seatSlot,
70
+ {
71
+ left: position.left,
72
+ opacity: seat.muted ? 0.48 : 1,
73
+ top: position.top,
74
+ },
75
+ ]} testID={testID ? `${testID}-seat-${seat.id}` : undefined}>
76
+ <View style={[
77
+ styles.seatPanel,
78
+ seat.selected ? styles.selectedSeatPanel : null,
79
+ {
80
+ borderColor: seat.selected ? colors.seatSelectedBorder : colors.seatBorder,
81
+ backgroundColor: colors.seatSurface,
82
+ },
83
+ ]}>
84
+ {hasCards ? (<CardHand cards={seat.cards} colorScheme={colorScheme} faceDownCards={seat.faceDownCards} muted={seat.muted ?? seat.disabled} size={seatCardSize}/>) : null}
85
+ <View style={styles.seatTextGroup}>
86
+ <Text style={[styles.seatLabel, { color: colors.seatText }]}>{seat.label}</Text>
87
+ {seat.sublabel !== undefined ? (<Text style={[styles.seatSublabel, { color: colors.seatMutedText }]}>
88
+ {seat.sublabel}
89
+ </Text>) : null}
90
+ </View>
91
+ </View>
92
+ {seat.tokenLabel !== undefined ? (<View style={[
93
+ styles.token,
94
+ {
95
+ backgroundColor: colors.tokenSurface,
96
+ borderColor: seat.selected
97
+ ? colors.seatSelectedBorder
98
+ : colors.tableInnerBorder,
99
+ },
100
+ ]}>
101
+ <Text style={[styles.tokenText, { color: colors.tokenText }]}>
102
+ {seat.tokenLabel}
103
+ </Text>
104
+ </View>) : null}
105
+ </View>);
106
+ })}
107
+ </View>);
108
+ }
109
+ const styles = StyleSheet.create({
110
+ centerContent: {
111
+ alignItems: 'center',
112
+ gap: 6,
113
+ left: 0,
114
+ position: 'absolute',
115
+ right: 0,
116
+ top: '35%',
117
+ },
118
+ centerLabel: {
119
+ borderRadius: 999,
120
+ paddingHorizontal: 10,
121
+ paddingVertical: 4,
122
+ },
123
+ centerLabelText: {
124
+ fontSize: 12,
125
+ fontWeight: '800',
126
+ },
127
+ centerSublabel: {
128
+ fontSize: 11,
129
+ fontWeight: '700',
130
+ },
131
+ circleSurface: {
132
+ borderRadius: 999,
133
+ },
134
+ innerSurface: {
135
+ borderWidth: 1,
136
+ bottom: 10,
137
+ left: 10,
138
+ opacity: 0.44,
139
+ position: 'absolute',
140
+ right: 10,
141
+ top: 10,
142
+ },
143
+ ovalSurface: {
144
+ borderRadius: 999,
145
+ },
146
+ root: {
147
+ maxWidth: 760,
148
+ position: 'relative',
149
+ width: '100%',
150
+ },
151
+ roundedSurface: {
152
+ borderRadius: 28,
153
+ },
154
+ seatLabel: {
155
+ fontSize: 11,
156
+ fontWeight: '800',
157
+ },
158
+ seatPanel: {
159
+ alignItems: 'center',
160
+ borderRadius: 12,
161
+ borderWidth: 1,
162
+ gap: 4,
163
+ minWidth: 68,
164
+ paddingHorizontal: 7,
165
+ paddingVertical: 6,
166
+ },
167
+ seatSlot: {
168
+ alignItems: 'center',
169
+ gap: 4,
170
+ minWidth: 78,
171
+ position: 'absolute',
172
+ transform: [{ translateX: -39 }, { translateY: -34 }],
173
+ },
174
+ seatSublabel: {
175
+ fontSize: 10,
176
+ fontWeight: '700',
177
+ },
178
+ seatTextGroup: {
179
+ alignItems: 'center',
180
+ gap: 1,
181
+ },
182
+ selectedSeatPanel: {
183
+ borderWidth: 2,
184
+ paddingHorizontal: 9,
185
+ paddingVertical: 7,
186
+ },
187
+ surface: {
188
+ borderWidth: 8,
189
+ bottom: 28,
190
+ left: 24,
191
+ position: 'absolute',
192
+ right: 24,
193
+ top: 24,
194
+ },
195
+ token: {
196
+ borderRadius: 999,
197
+ borderWidth: 1,
198
+ paddingHorizontal: 7,
199
+ paddingVertical: 2,
200
+ },
201
+ tokenText: {
202
+ fontSize: 10,
203
+ fontWeight: '800',
204
+ },
205
+ });
206
+ //# sourceMappingURL=TabletopTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TabletopTable.js","sourceRoot":"","sources":["../../../../../src/features/tabletop/adapters/inbound/TabletopTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE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S,EAAE;QACT,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;IACD,SAAS,EAAE;QACT,UAAU,EAAE,QAAQ;QACpB,YAAY,EAAE,EAAE;QAChB,WAAW,EAAE,CAAC;QACd,GAAG,EAAE,CAAC;QACN,QAAQ,EAAE,EAAE;QACZ,iBAAiB,EAAE,CAAC;QACpB,eAAe,EAAE,CAAC;KACnB;IACD,QAAQ,EAAE;QACR,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,CAAC;QACN,QAAQ,EAAE,EAAE;QACZ,QAAQ,EAAE,UAAU;QACpB,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC;KACtD;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;IACD,aAAa,EAAE;QACb,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,CAAC;KACP;IACD,iBAAiB,EAAE;QACjB,WAAW,EAAE,CAAC;QACd,iBAAiB,EAAE,CAAC;QACpB,eAAe,EAAE,CAAC;KACnB;IACD,OAAO,EAAE;QACP,WAAW,EAAE,CAAC;QACd,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,EAAE;QACR,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,EAAE;QACT,GAAG,EAAE,EAAE;KACR;IACD,KAAK,EAAE;QACL,YAAY,EAAE,GAAG;QACjB,WAAW,EAAE,CAAC;QACd,iBAAiB,EAAE,CAAC;QACpB,eAAe,EAAE,CAAC;KACnB;IACD,SAAS,EAAE;QACT,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;CACF,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\n\nimport type { TabletopSeatState } from '../../../../types/tabletop';\nimport type { TabletopTableProps } from '../../../../types/tabletop';\nimport { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';\nimport { useZoraTheme } from '../../../theme/composition/useZoraTheme';\nimport { createTabletopColorScheme } from '../../utils/createTabletopColorScheme';\nimport { getTabletopSeatPosition } from '../../utils/getTabletopSeatPosition';\nimport { CardHand } from './CardHand';\n\n/*** Renders a responsive table surface and caller-owned seats. */\nexport const TabletopTable = withZoraThemeScope(TabletopTableInner);\n\n/*** Summarizes the visible seat state for assistive technology. */\nfunction createSeatAccessibilityLabel(seat: TabletopSeatState): string | undefined {\n if (seat.accessibilityLabel !== undefined) return seat.accessibilityLabel;\n if (typeof seat.label !== 'string') return undefined;\n const parts = [seat.label];\n if (typeof seat.sublabel === 'string') parts.push(seat.sublabel);\n if (typeof seat.tokenLabel === 'string') parts.push(seat.tokenLabel);\n if (seat.selected) parts.push('selected');\n if (seat.muted) parts.push('muted');\n return parts.join(', ');\n}\n\n/*** Renders the table geometry using the active ZORA theme. */\nfunction TabletopTableInner({\n seats,\n centerCards = [],\n centerLabel,\n centerSublabel,\n shape = 'oval',\n seatCount,\n cardSize = 'small',\n disabled = false,\n colorScheme,\n accessibilityLabel,\n testID,\n}: TabletopTableProps) {\n const { theme } = useZoraTheme();\n const colors = React.useMemo(\n () => createTabletopColorScheme(theme, colorScheme),\n [colorScheme, theme],\n );\n const resolvedSeatCount = seatCount ?? seats.length;\n\n return (\n <View\n accessibilityLabel={accessibilityLabel}\n style={[\n styles.root,\n { aspectRatio: shape === 'circle' ? 1 : 1.6, opacity: disabled ? 0.56 : 1 },\n ]}\n testID={testID}\n >\n <View\n style={[\n styles.surface,\n shape === 'circle' ? styles.circleSurface : styles.ovalSurface,\n shape === 'rounded' ? styles.roundedSurface : null,\n {\n backgroundColor: colors.tableFelt,\n borderColor: colors.tableBorder,\n },\n ]}\n >\n <View\n pointerEvents=\"none\"\n style={[\n styles.innerSurface,\n shape === 'circle' ? styles.circleSurface : styles.ovalSurface,\n shape === 'rounded' ? styles.roundedSurface : null,\n { borderColor: colors.tableInnerBorder },\n ]}\n />\n <View style={styles.centerContent}>\n {centerCards.length > 0 ? (\n <CardHand cards={centerCards} colorScheme={colorScheme} size={cardSize} />\n ) : null}\n {centerLabel !== undefined ? (\n <View style={[styles.centerLabel, { backgroundColor: colors.seatSurface }]}>\n <Text style={[styles.centerLabelText, { color: colors.seatText }]}>\n {centerLabel}\n </Text>\n </View>\n ) : null}\n {centerSublabel !== undefined ? (\n <Text style={[styles.centerSublabel, { color: colors.tableMutedText }]}>\n {centerSublabel}\n </Text>\n ) : null}\n </View>\n </View>\n\n {seats.map((seat, index) => {\n const position = getTabletopSeatPosition(index, resolvedSeatCount);\n const hasCards = seat.cards !== undefined || seat.faceDownCards !== undefined;\n const seatCardSize = seat.selected && cardSize === 'small' ? 'medium' : cardSize;\n\n return (\n <View\n accessibilityLabel={createSeatAccessibilityLabel(seat)}\n accessibilityRole=\"summary\"\n key={seat.id}\n style={[\n styles.seatSlot,\n {\n left: position.left,\n opacity: seat.muted ? 0.48 : 1,\n top: position.top,\n },\n ]}\n testID={testID ? `${testID}-seat-${seat.id}` : undefined}\n >\n <View\n style={[\n styles.seatPanel,\n seat.selected ? styles.selectedSeatPanel : null,\n {\n borderColor: seat.selected ? colors.seatSelectedBorder : colors.seatBorder,\n backgroundColor: colors.seatSurface,\n },\n ]}\n >\n {hasCards ? (\n <CardHand\n cards={seat.cards}\n colorScheme={colorScheme}\n faceDownCards={seat.faceDownCards}\n muted={seat.muted ?? seat.disabled}\n size={seatCardSize}\n />\n ) : null}\n <View style={styles.seatTextGroup}>\n <Text style={[styles.seatLabel, { color: colors.seatText }]}>{seat.label}</Text>\n {seat.sublabel !== undefined ? (\n <Text style={[styles.seatSublabel, { color: colors.seatMutedText }]}>\n {seat.sublabel}\n </Text>\n ) : null}\n </View>\n </View>\n {seat.tokenLabel !== undefined ? (\n <View\n style={[\n styles.token,\n {\n backgroundColor: colors.tokenSurface,\n borderColor: seat.selected\n ? colors.seatSelectedBorder\n : colors.tableInnerBorder,\n },\n ]}\n >\n <Text style={[styles.tokenText, { color: colors.tokenText }]}>\n {seat.tokenLabel}\n </Text>\n </View>\n ) : null}\n </View>\n );\n })}\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n centerContent: {\n alignItems: 'center',\n gap: 6,\n left: 0,\n position: 'absolute',\n right: 0,\n top: '35%',\n },\n centerLabel: {\n borderRadius: 999,\n paddingHorizontal: 10,\n paddingVertical: 4,\n },\n centerLabelText: {\n fontSize: 12,\n fontWeight: '800',\n },\n centerSublabel: {\n fontSize: 11,\n fontWeight: '700',\n },\n circleSurface: {\n borderRadius: 999,\n },\n innerSurface: {\n borderWidth: 1,\n bottom: 10,\n left: 10,\n opacity: 0.44,\n position: 'absolute',\n right: 10,\n top: 10,\n },\n ovalSurface: {\n borderRadius: 999,\n },\n root: {\n maxWidth: 760,\n position: 'relative',\n width: '100%',\n },\n roundedSurface: {\n borderRadius: 28,\n },\n seatLabel: {\n fontSize: 11,\n fontWeight: '800',\n },\n seatPanel: {\n alignItems: 'center',\n borderRadius: 12,\n borderWidth: 1,\n gap: 4,\n minWidth: 68,\n paddingHorizontal: 7,\n paddingVertical: 6,\n },\n seatSlot: {\n alignItems: 'center',\n gap: 4,\n minWidth: 78,\n position: 'absolute',\n transform: [{ translateX: -39 }, { translateY: -34 }],\n },\n seatSublabel: {\n fontSize: 10,\n fontWeight: '700',\n },\n seatTextGroup: {\n alignItems: 'center',\n gap: 1,\n },\n selectedSeatPanel: {\n borderWidth: 2,\n paddingHorizontal: 9,\n paddingVertical: 7,\n },\n surface: {\n borderWidth: 8,\n bottom: 28,\n left: 24,\n position: 'absolute',\n right: 24,\n top: 24,\n },\n token: {\n borderRadius: 999,\n borderWidth: 1,\n paddingHorizontal: 7,\n paddingVertical: 2,\n },\n tokenText: {\n fontSize: 10,\n fontWeight: '800',\n },\n});\n"]}