@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.
Files changed (639) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +40 -184
  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/button/adapters/inbound/Button.d.ts +0 -4
  15. package/dist/features/button/adapters/inbound/Button.d.ts.map +1 -1
  16. package/dist/features/button/adapters/inbound/Button.js +0 -4
  17. package/dist/features/button/adapters/inbound/Button.js.map +1 -1
  18. package/dist/features/card/adapters/inbound/Card.d.ts +0 -4
  19. package/dist/features/card/adapters/inbound/Card.d.ts.map +1 -1
  20. package/dist/features/card/adapters/inbound/Card.js +0 -4
  21. package/dist/features/card/adapters/inbound/Card.js.map +1 -1
  22. package/dist/features/card/cardMeta.d.ts +1 -1
  23. package/dist/features/card/cardMeta.d.ts.map +1 -1
  24. package/dist/features/card/cardMeta.js +7 -2
  25. package/dist/features/card/cardMeta.js.map +1 -1
  26. package/dist/features/chess/adapters/inbound/ChessBoard.d.ts +5 -0
  27. package/dist/features/chess/adapters/inbound/ChessBoard.d.ts.map +1 -0
  28. package/dist/features/chess/adapters/inbound/ChessBoard.js +119 -0
  29. package/dist/features/chess/adapters/inbound/ChessBoard.js.map +1 -0
  30. package/dist/features/chess/adapters/inbound/OpeningBook.d.ts +5 -0
  31. package/dist/features/chess/adapters/inbound/OpeningBook.d.ts.map +1 -0
  32. package/dist/features/chess/adapters/inbound/OpeningBook.js +94 -0
  33. package/dist/features/chess/adapters/inbound/OpeningBook.js.map +1 -0
  34. package/dist/features/chess/meta.d.ts +219 -0
  35. package/dist/features/chess/meta.d.ts.map +1 -0
  36. package/dist/features/chess/meta.js +165 -0
  37. package/dist/features/chess/meta.js.map +1 -0
  38. package/dist/features/chess/public.d.ts +12 -0
  39. package/dist/features/chess/public.d.ts.map +1 -0
  40. package/dist/features/chess/public.js +10 -0
  41. package/dist/features/chess/public.js.map +1 -0
  42. package/dist/features/chess/utils/chessSquares.d.ts +4 -0
  43. package/dist/features/chess/utils/chessSquares.d.ts.map +1 -0
  44. package/dist/features/chess/utils/chessSquares.js +3 -0
  45. package/dist/features/chess/utils/chessSquares.js.map +1 -0
  46. package/dist/features/chess/utils/createBoardSquares.d.ts +4 -0
  47. package/dist/features/chess/utils/createBoardSquares.d.ts.map +1 -0
  48. package/dist/features/chess/utils/createBoardSquares.js +9 -0
  49. package/dist/features/chess/utils/createBoardSquares.js.map +1 -0
  50. package/dist/features/chess/utils/createChessBoardColorScheme.d.ts +35 -0
  51. package/dist/features/chess/utils/createChessBoardColorScheme.d.ts.map +1 -0
  52. package/dist/features/chess/utils/createChessBoardColorScheme.js +26 -0
  53. package/dist/features/chess/utils/createChessBoardColorScheme.js.map +1 -0
  54. package/dist/features/chess/utils/createOpeningBookColorScheme.d.ts +11 -0
  55. package/dist/features/chess/utils/createOpeningBookColorScheme.d.ts.map +1 -0
  56. package/dist/features/chess/utils/createOpeningBookColorScheme.js +21 -0
  57. package/dist/features/chess/utils/createOpeningBookColorScheme.js.map +1 -0
  58. package/dist/features/chess/utils/getSquareFile.d.ts +4 -0
  59. package/dist/features/chess/utils/getSquareFile.d.ts.map +1 -0
  60. package/dist/features/chess/utils/getSquareFile.js +5 -0
  61. package/dist/features/chess/utils/getSquareFile.js.map +1 -0
  62. package/dist/features/chess/utils/getSquareRank.d.ts +4 -0
  63. package/dist/features/chess/utils/getSquareRank.d.ts.map +1 -0
  64. package/dist/features/chess/utils/getSquareRank.js +5 -0
  65. package/dist/features/chess/utils/getSquareRank.js.map +1 -0
  66. package/dist/features/chess/utils/isLightSquare.d.ts +4 -0
  67. package/dist/features/chess/utils/isLightSquare.d.ts.map +1 -0
  68. package/dist/features/chess/utils/isLightSquare.js +6 -0
  69. package/dist/features/chess/utils/isLightSquare.js.map +1 -0
  70. package/dist/features/empty-state/adapters/inbound/EmptyState.d.ts +0 -4
  71. package/dist/features/empty-state/adapters/inbound/EmptyState.d.ts.map +1 -1
  72. package/dist/features/empty-state/adapters/inbound/EmptyState.js +0 -4
  73. package/dist/features/empty-state/adapters/inbound/EmptyState.js.map +1 -1
  74. package/dist/features/form/text-input/adapters/inbound/TextInput.d.ts +0 -4
  75. package/dist/features/form/text-input/adapters/inbound/TextInput.d.ts.map +1 -1
  76. package/dist/features/form/text-input/adapters/inbound/TextInput.js +0 -4
  77. package/dist/features/form/text-input/adapters/inbound/TextInput.js.map +1 -1
  78. package/dist/features/game/adapters/inbound/Game.d.ts +5 -0
  79. package/dist/features/game/adapters/inbound/Game.d.ts.map +1 -0
  80. package/dist/features/game/adapters/inbound/Game.js +24 -0
  81. package/dist/features/game/adapters/inbound/Game.js.map +1 -0
  82. package/dist/features/game/adapters/inbound/GameEntity.d.ts +5 -0
  83. package/dist/features/game/adapters/inbound/GameEntity.d.ts.map +1 -0
  84. package/dist/features/game/adapters/inbound/GameEntity.js +29 -0
  85. package/dist/features/game/adapters/inbound/GameEntity.js.map +1 -0
  86. package/dist/features/game/adapters/inbound/GameField.d.ts +4 -0
  87. package/dist/features/game/adapters/inbound/GameField.d.ts.map +1 -0
  88. package/dist/features/game/adapters/inbound/GameField.js +32 -0
  89. package/dist/features/game/adapters/inbound/GameField.js.map +1 -0
  90. package/dist/features/game/adapters/inbound/GameInputZone.d.ts +4 -0
  91. package/dist/features/game/adapters/inbound/GameInputZone.d.ts.map +1 -0
  92. package/dist/features/game/adapters/inbound/GameInputZone.js +50 -0
  93. package/dist/features/game/adapters/inbound/GameInputZone.js.map +1 -0
  94. package/dist/features/game/adapters/inbound/GameMeasurementProbe.d.ts +4 -0
  95. package/dist/features/game/adapters/inbound/GameMeasurementProbe.d.ts.map +1 -0
  96. package/dist/features/game/adapters/inbound/GameMeasurementProbe.js +54 -0
  97. package/dist/features/game/adapters/inbound/GameMeasurementProbe.js.map +1 -0
  98. package/dist/features/game/adapters/inbound/GameOverlay.d.ts +4 -0
  99. package/dist/features/game/adapters/inbound/GameOverlay.d.ts.map +1 -0
  100. package/dist/features/game/adapters/inbound/GameOverlay.js +39 -0
  101. package/dist/features/game/adapters/inbound/GameOverlay.js.map +1 -0
  102. package/dist/features/game/adapters/inbound/createGameKeyboardEvent.d.ts +16 -0
  103. package/dist/features/game/adapters/inbound/createGameKeyboardEvent.d.ts.map +1 -0
  104. package/dist/features/game/adapters/inbound/createGameKeyboardEvent.js +16 -0
  105. package/dist/features/game/adapters/inbound/createGameKeyboardEvent.js.map +1 -0
  106. package/dist/features/game/adapters/inbound/createGameMeasurementEvent.d.ts +14 -0
  107. package/dist/features/game/adapters/inbound/createGameMeasurementEvent.d.ts.map +1 -0
  108. package/dist/features/game/adapters/inbound/createGameMeasurementEvent.js +25 -0
  109. package/dist/features/game/adapters/inbound/createGameMeasurementEvent.js.map +1 -0
  110. package/dist/features/game/adapters/inbound/createGamePointerEvent.d.ts +17 -0
  111. package/dist/features/game/adapters/inbound/createGamePointerEvent.d.ts.map +1 -0
  112. package/dist/features/game/adapters/inbound/createGamePointerEvent.js +20 -0
  113. package/dist/features/game/adapters/inbound/createGamePointerEvent.js.map +1 -0
  114. package/dist/features/game/adapters/inbound/measureGameEntity.d.ts +5 -0
  115. package/dist/features/game/adapters/inbound/measureGameEntity.d.ts.map +1 -0
  116. package/dist/features/game/adapters/inbound/measureGameEntity.js +22 -0
  117. package/dist/features/game/adapters/inbound/measureGameEntity.js.map +1 -0
  118. package/dist/features/game/adapters/inbound/useGameInputZoneResponder.d.ts +15 -0
  119. package/dist/features/game/adapters/inbound/useGameInputZoneResponder.d.ts.map +1 -0
  120. package/dist/features/game/adapters/inbound/useGameInputZoneResponder.js +67 -0
  121. package/dist/features/game/adapters/inbound/useGameInputZoneResponder.js.map +1 -0
  122. package/dist/features/game/composition/GameRuntimeContext.d.ts +5 -0
  123. package/dist/features/game/composition/GameRuntimeContext.d.ts.map +1 -0
  124. package/dist/features/game/composition/GameRuntimeContext.js +4 -0
  125. package/dist/features/game/composition/GameRuntimeContext.js.map +1 -0
  126. package/dist/features/game/composition/createGameBindingContext.d.ts +4 -0
  127. package/dist/features/game/composition/createGameBindingContext.d.ts.map +1 -0
  128. package/dist/features/game/composition/createGameBindingContext.js +10 -0
  129. package/dist/features/game/composition/createGameBindingContext.js.map +1 -0
  130. package/dist/features/game/composition/createGameMeasurementRegistry.d.ts +4 -0
  131. package/dist/features/game/composition/createGameMeasurementRegistry.d.ts.map +1 -0
  132. package/dist/features/game/composition/createGameMeasurementRegistry.js +15 -0
  133. package/dist/features/game/composition/createGameMeasurementRegistry.js.map +1 -0
  134. package/dist/features/game/composition/useGameRuntime.d.ts +5 -0
  135. package/dist/features/game/composition/useGameRuntime.d.ts.map +1 -0
  136. package/dist/features/game/composition/useGameRuntime.js +117 -0
  137. package/dist/features/game/composition/useGameRuntime.js.map +1 -0
  138. package/dist/features/game/composition/useGameScheduledEffects.d.ts +17 -0
  139. package/dist/features/game/composition/useGameScheduledEffects.d.ts.map +1 -0
  140. package/dist/features/game/composition/useGameScheduledEffects.js +40 -0
  141. package/dist/features/game/composition/useGameScheduledEffects.js.map +1 -0
  142. package/dist/features/game/meta/gameEntityMeta.d.ts +403 -0
  143. package/dist/features/game/meta/gameEntityMeta.d.ts.map +1 -0
  144. package/dist/features/game/meta/gameEntityMeta.js +224 -0
  145. package/dist/features/game/meta/gameEntityMeta.js.map +1 -0
  146. package/dist/features/game/meta/gameFieldMeta.d.ts +61 -0
  147. package/dist/features/game/meta/gameFieldMeta.d.ts.map +1 -0
  148. package/dist/features/game/meta/gameFieldMeta.js +48 -0
  149. package/dist/features/game/meta/gameFieldMeta.js.map +1 -0
  150. package/dist/features/game/meta/gameInputZoneMeta.d.ts +163 -0
  151. package/dist/features/game/meta/gameInputZoneMeta.d.ts.map +1 -0
  152. package/dist/features/game/meta/gameInputZoneMeta.js +138 -0
  153. package/dist/features/game/meta/gameInputZoneMeta.js.map +1 -0
  154. package/dist/features/game/meta/gameMeasurementProbeMeta.d.ts +112 -0
  155. package/dist/features/game/meta/gameMeasurementProbeMeta.d.ts.map +1 -0
  156. package/dist/features/game/meta/gameMeasurementProbeMeta.js +70 -0
  157. package/dist/features/game/meta/gameMeasurementProbeMeta.js.map +1 -0
  158. package/dist/features/game/meta/gameMeta.d.ts +130 -0
  159. package/dist/features/game/meta/gameMeta.d.ts.map +1 -0
  160. package/dist/features/game/meta/gameMeta.js +113 -0
  161. package/dist/features/game/meta/gameMeta.js.map +1 -0
  162. package/dist/features/game/meta/gameOverlayMeta.d.ts +55 -0
  163. package/dist/features/game/meta/gameOverlayMeta.d.ts.map +1 -0
  164. package/dist/features/game/meta/gameOverlayMeta.js +65 -0
  165. package/dist/features/game/meta/gameOverlayMeta.js.map +1 -0
  166. package/dist/features/game/public.d.ts +8 -0
  167. package/dist/features/game/public.d.ts.map +1 -0
  168. package/dist/features/game/public.js +7 -0
  169. package/dist/features/game/public.js.map +1 -0
  170. package/dist/features/game/utils/clampGamePercentage.d.ts +3 -0
  171. package/dist/features/game/utils/clampGamePercentage.d.ts.map +1 -0
  172. package/dist/features/game/utils/clampGamePercentage.js +5 -0
  173. package/dist/features/game/utils/clampGamePercentage.js.map +1 -0
  174. package/dist/features/game/utils/resolveGameEntityMotionPlan.d.ts +15 -0
  175. package/dist/features/game/utils/resolveGameEntityMotionPlan.d.ts.map +1 -0
  176. package/dist/features/game/utils/resolveGameEntityMotionPlan.js +31 -0
  177. package/dist/features/game/utils/resolveGameEntityMotionPlan.js.map +1 -0
  178. package/dist/features/game/utils/toGamePercentage.d.ts +3 -0
  179. package/dist/features/game/utils/toGamePercentage.d.ts.map +1 -0
  180. package/dist/features/game/utils/toGamePercentage.js +6 -0
  181. package/dist/features/game/utils/toGamePercentage.js.map +1 -0
  182. package/dist/features/game/utils/useAnimatedGameEntityValue.d.ts +5 -0
  183. package/dist/features/game/utils/useAnimatedGameEntityValue.d.ts.map +1 -0
  184. package/dist/features/game/utils/useAnimatedGameEntityValue.js +33 -0
  185. package/dist/features/game/utils/useAnimatedGameEntityValue.js.map +1 -0
  186. package/dist/features/game/utils/useGameEntityAnimatedStyle.d.ts +16 -0
  187. package/dist/features/game/utils/useGameEntityAnimatedStyle.d.ts.map +1 -0
  188. package/dist/features/game/utils/useGameEntityAnimatedStyle.js +52 -0
  189. package/dist/features/game/utils/useGameEntityAnimatedStyle.js.map +1 -0
  190. package/dist/features/game/utils/useGameEntityMeasurement.d.ts +5 -0
  191. package/dist/features/game/utils/useGameEntityMeasurement.d.ts.map +1 -0
  192. package/dist/features/game/utils/useGameEntityMeasurement.js +14 -0
  193. package/dist/features/game/utils/useGameEntityMeasurement.js.map +1 -0
  194. package/dist/features/game/utils/useGameEntityMotionProgress.d.ts +5 -0
  195. package/dist/features/game/utils/useGameEntityMotionProgress.d.ts.map +1 -0
  196. package/dist/features/game/utils/useGameEntityMotionProgress.js +87 -0
  197. package/dist/features/game/utils/useGameEntityMotionProgress.js.map +1 -0
  198. package/dist/features/game/utils/useGameReducedMotion.d.ts +3 -0
  199. package/dist/features/game/utils/useGameReducedMotion.d.ts.map +1 -0
  200. package/dist/features/game/utils/useGameReducedMotion.js +13 -0
  201. package/dist/features/game/utils/useGameReducedMotion.js.map +1 -0
  202. package/dist/features/graph-view/adapters/inbound/web-artifact/GraphView.d.ts +5 -5
  203. package/dist/features/graph-view/adapters/inbound/web-artifact/GraphView.js +5 -5
  204. package/dist/features/graph-view/adapters/inbound/web-artifact/GraphView.js.map +1 -1
  205. package/dist/features/graph-view/adapters/inbound/web-artifact/compactGraphSpacing.d.ts +1 -1
  206. package/dist/features/graph-view/adapters/inbound/web-artifact/compactGraphSpacing.js +1 -1
  207. package/dist/features/graph-view/adapters/inbound/web-artifact/compactGraphSpacing.js.map +1 -1
  208. package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphController.js +1 -1
  209. package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphController.js.map +1 -1
  210. package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphLoopSizer.d.ts +1 -1
  211. package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphLoopSizer.js +1 -1
  212. package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphLoopSizer.js.map +1 -1
  213. package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.js +7 -7
  214. package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.js.map +1 -1
  215. package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphGeometryKey.d.ts +0 -1
  216. package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphGeometryKey.d.ts.map +1 -1
  217. package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphGeometryKey.js +0 -1
  218. package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphGeometryKey.js.map +1 -1
  219. package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphTopologyKey.d.ts +1 -1
  220. package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphTopologyKey.js +1 -1
  221. package/dist/features/graph-view/adapters/inbound/web-artifact/getGraphTopologyKey.js.map +1 -1
  222. package/dist/features/graph-view/adapters/inbound/web-artifact/hasGraphLayoutChanged.d.ts +0 -1
  223. package/dist/features/graph-view/adapters/inbound/web-artifact/hasGraphLayoutChanged.d.ts.map +1 -1
  224. package/dist/features/graph-view/adapters/inbound/web-artifact/hasGraphLayoutChanged.js +0 -1
  225. package/dist/features/graph-view/adapters/inbound/web-artifact/hasGraphLayoutChanged.js.map +1 -1
  226. package/dist/features/graph-view/adapters/inbound/web-artifact/runDetachedGraphLayout.d.ts +1 -1
  227. package/dist/features/graph-view/adapters/inbound/web-artifact/runDetachedGraphLayout.js +1 -1
  228. package/dist/features/graph-view/adapters/inbound/web-artifact/runDetachedGraphLayout.js.map +1 -1
  229. package/dist/features/graph-view/adapters/inbound/web-artifact/sizeGraphNodesToLabels.d.ts +1 -1
  230. package/dist/features/graph-view/adapters/inbound/web-artifact/sizeGraphNodesToLabels.js +1 -1
  231. package/dist/features/graph-view/adapters/inbound/web-artifact/sizeGraphNodesToLabels.js.map +1 -1
  232. package/dist/features/graph-view/adapters/inbound/web-artifact/syncGraphElements.d.ts +0 -1
  233. package/dist/features/graph-view/adapters/inbound/web-artifact/syncGraphElements.d.ts.map +1 -1
  234. package/dist/features/graph-view/adapters/inbound/web-artifact/syncGraphElements.js +0 -1
  235. package/dist/features/graph-view/adapters/inbound/web-artifact/syncGraphElements.js.map +1 -1
  236. package/dist/features/layout/gridMeta.d.ts +1 -1
  237. package/dist/features/layout/gridMeta.d.ts.map +1 -1
  238. package/dist/features/layout/gridMeta.js +7 -2
  239. package/dist/features/layout/gridMeta.js.map +1 -1
  240. package/dist/features/layout/screenMeta.d.ts +1 -1
  241. package/dist/features/layout/viewMeta.d.ts +1 -1
  242. package/dist/features/layout/viewMeta.d.ts.map +1 -1
  243. package/dist/features/layout/viewMeta.js +6 -2
  244. package/dist/features/layout/viewMeta.js.map +1 -1
  245. package/dist/features/registry/ZORA_COMPONENT_REGISTRY.d.ts.map +1 -1
  246. package/dist/features/registry/ZORA_COMPONENT_REGISTRY.js +16 -0
  247. package/dist/features/registry/ZORA_COMPONENT_REGISTRY.js.map +1 -1
  248. package/dist/features/section/screenSectionMeta.d.ts +1 -1
  249. package/dist/features/tabletop/adapters/inbound/CardBack.d.ts +5 -0
  250. package/dist/features/tabletop/adapters/inbound/CardBack.d.ts.map +1 -0
  251. package/dist/features/tabletop/adapters/inbound/CardBack.js +47 -0
  252. package/dist/features/tabletop/adapters/inbound/CardBack.js.map +1 -0
  253. package/dist/features/tabletop/adapters/inbound/CardHand.d.ts +5 -0
  254. package/dist/features/tabletop/adapters/inbound/CardHand.d.ts.map +1 -0
  255. package/dist/features/tabletop/adapters/inbound/CardHand.js +28 -0
  256. package/dist/features/tabletop/adapters/inbound/CardHand.js.map +1 -0
  257. package/dist/features/tabletop/adapters/inbound/PlayingCard.d.ts +5 -0
  258. package/dist/features/tabletop/adapters/inbound/PlayingCard.d.ts.map +1 -0
  259. package/dist/features/tabletop/adapters/inbound/PlayingCard.js +64 -0
  260. package/dist/features/tabletop/adapters/inbound/PlayingCard.js.map +1 -0
  261. package/dist/features/tabletop/adapters/inbound/PokerTrainingTable.d.ts +5 -0
  262. package/dist/features/tabletop/adapters/inbound/PokerTrainingTable.d.ts.map +1 -0
  263. package/dist/features/tabletop/adapters/inbound/PokerTrainingTable.js +12 -0
  264. package/dist/features/tabletop/adapters/inbound/PokerTrainingTable.js.map +1 -0
  265. package/dist/features/tabletop/adapters/inbound/TabletopTable.d.ts +5 -0
  266. package/dist/features/tabletop/adapters/inbound/TabletopTable.d.ts.map +1 -0
  267. package/dist/features/tabletop/adapters/inbound/TabletopTable.js +206 -0
  268. package/dist/features/tabletop/adapters/inbound/TabletopTable.js.map +1 -0
  269. package/dist/features/tabletop/meta.d.ts +353 -0
  270. package/dist/features/tabletop/meta.d.ts.map +1 -0
  271. package/dist/features/tabletop/meta.js +252 -0
  272. package/dist/features/tabletop/meta.js.map +1 -0
  273. package/dist/features/tabletop/public.d.ts +10 -0
  274. package/dist/features/tabletop/public.d.ts.map +1 -0
  275. package/dist/features/tabletop/public.js +9 -0
  276. package/dist/features/tabletop/public.js.map +1 -0
  277. package/dist/features/tabletop/utils/createPokerTrainingTableState.d.ts +13 -0
  278. package/dist/features/tabletop/utils/createPokerTrainingTableState.d.ts.map +1 -0
  279. package/dist/features/tabletop/utils/createPokerTrainingTableState.js +112 -0
  280. package/dist/features/tabletop/utils/createPokerTrainingTableState.js.map +1 -0
  281. package/dist/features/tabletop/utils/createTabletopColorScheme.d.ts +36 -0
  282. package/dist/features/tabletop/utils/createTabletopColorScheme.d.ts.map +1 -0
  283. package/dist/features/tabletop/utils/createTabletopColorScheme.js +144 -0
  284. package/dist/features/tabletop/utils/createTabletopColorScheme.js.map +1 -0
  285. package/dist/features/tabletop/utils/createTabletopGameSeats.d.ts +13 -0
  286. package/dist/features/tabletop/utils/createTabletopGameSeats.d.ts.map +1 -0
  287. package/dist/features/tabletop/utils/createTabletopGameSeats.js +22 -0
  288. package/dist/features/tabletop/utils/createTabletopGameSeats.js.map +1 -0
  289. package/dist/features/tabletop/utils/getPlayingCardLabel.d.ts +4 -0
  290. package/dist/features/tabletop/utils/getPlayingCardLabel.d.ts.map +1 -0
  291. package/dist/features/tabletop/utils/getPlayingCardLabel.js +6 -0
  292. package/dist/features/tabletop/utils/getPlayingCardLabel.js.map +1 -0
  293. package/dist/features/tabletop/utils/getTabletopCardDimensions.d.ts +12 -0
  294. package/dist/features/tabletop/utils/getTabletopCardDimensions.d.ts.map +1 -0
  295. package/dist/features/tabletop/utils/getTabletopCardDimensions.js +35 -0
  296. package/dist/features/tabletop/utils/getTabletopCardDimensions.js.map +1 -0
  297. package/dist/features/tabletop/utils/getTabletopSeatPosition.d.ts +9 -0
  298. package/dist/features/tabletop/utils/getTabletopSeatPosition.d.ts.map +1 -0
  299. package/dist/features/tabletop/utils/getTabletopSeatPosition.js +88 -0
  300. package/dist/features/tabletop/utils/getTabletopSeatPosition.js.map +1 -0
  301. package/dist/features/tree-view/adapters/inbound/TreeView.d.ts +1 -1
  302. package/dist/features/tree-view/adapters/inbound/TreeView.js +1 -1
  303. package/dist/features/tree-view/adapters/inbound/TreeView.js.map +1 -1
  304. package/dist/features/tree-view/adapters/inbound/web-artifact/TreeView.d.ts +1 -1
  305. package/dist/features/tree-view/adapters/inbound/web-artifact/TreeView.js +1 -1
  306. package/dist/features/tree-view/adapters/inbound/web-artifact/TreeView.js.map +1 -1
  307. package/dist/features/typography/adapters/inbound/Heading.d.ts +0 -4
  308. package/dist/features/typography/adapters/inbound/Heading.d.ts.map +1 -1
  309. package/dist/features/typography/adapters/inbound/Heading.js +0 -4
  310. package/dist/features/typography/adapters/inbound/Heading.js.map +1 -1
  311. package/dist/features/typography/adapters/inbound/Text.d.ts +0 -4
  312. package/dist/features/typography/adapters/inbound/Text.d.ts.map +1 -1
  313. package/dist/features/typography/adapters/inbound/Text.js +0 -4
  314. package/dist/features/typography/adapters/inbound/Text.js.map +1 -1
  315. package/dist/index.d.ts +8 -0
  316. package/dist/index.d.ts.map +1 -1
  317. package/dist/index.js +4 -0
  318. package/dist/index.js.map +1 -1
  319. package/dist/types/chess.d.ts +83 -0
  320. package/dist/types/chess.d.ts.map +1 -0
  321. package/dist/types/chess.js +2 -0
  322. package/dist/types/chess.js.map +1 -0
  323. package/dist/types/gamePresentation.d.ts +94 -0
  324. package/dist/types/gamePresentation.d.ts.map +1 -0
  325. package/dist/types/gamePresentation.js +2 -0
  326. package/dist/types/gamePresentation.js.map +1 -0
  327. package/dist/types/gameRuntime.d.ts +29 -0
  328. package/dist/types/gameRuntime.d.ts.map +1 -0
  329. package/dist/types/gameRuntime.js +2 -0
  330. package/dist/types/gameRuntime.js.map +1 -0
  331. package/dist/types/tabletop.d.ts +129 -0
  332. package/dist/types/tabletop.d.ts.map +1 -0
  333. package/dist/types/tabletop.js +2 -0
  334. package/dist/types/tabletop.js.map +1 -0
  335. package/package.json +6 -7
  336. package/src/features/authoring/allowedChildren.ts +15 -2
  337. package/src/features/authoring/componentMeta.test.ts +93 -0
  338. package/src/features/authoring/componentMeta.ts +27 -0
  339. package/src/features/authoring/constants.ts +3 -0
  340. package/src/features/button/adapters/inbound/Button.tsx +0 -4
  341. package/src/features/card/adapters/inbound/Card.tsx +0 -4
  342. package/src/features/card/cardMeta.ts +12 -2
  343. package/src/features/chess/adapters/inbound/ChessBoard.tsx +169 -0
  344. package/src/features/chess/adapters/inbound/OpeningBook.tsx +131 -0
  345. package/src/features/chess/meta.ts +168 -0
  346. package/src/features/chess/public.test.tsx +165 -0
  347. package/src/features/chess/public.ts +27 -0
  348. package/src/features/chess/utils/chessSquares.ts +6 -0
  349. package/src/features/chess/utils/createBoardSquares.ts +13 -0
  350. package/src/features/chess/utils/createChessBoardColorScheme.ts +55 -0
  351. package/src/features/chess/utils/createOpeningBookColorScheme.ts +26 -0
  352. package/src/features/chess/utils/getSquareFile.ts +6 -0
  353. package/src/features/chess/utils/getSquareRank.ts +6 -0
  354. package/src/features/chess/utils/isLightSquare.ts +8 -0
  355. package/src/features/chessTabletopOwnership.test.ts +71 -0
  356. package/src/features/empty-state/adapters/inbound/EmptyState.tsx +0 -4
  357. package/src/features/form/text-input/adapters/inbound/TextInput.tsx +0 -4
  358. package/src/features/game/adapters/inbound/Game.tsx +43 -0
  359. package/src/features/game/adapters/inbound/GameEntity.tsx +44 -0
  360. package/src/features/game/adapters/inbound/GameField.tsx +52 -0
  361. package/src/features/game/adapters/inbound/GameInputZone.tsx +99 -0
  362. package/src/features/game/adapters/inbound/GameMeasurementProbe.tsx +83 -0
  363. package/src/features/game/adapters/inbound/GameOverlay.tsx +58 -0
  364. package/src/features/game/adapters/inbound/createGameKeyboardEvent.test.ts +51 -0
  365. package/src/features/game/adapters/inbound/createGameKeyboardEvent.ts +33 -0
  366. package/src/features/game/adapters/inbound/createGameMeasurementEvent.test.ts +56 -0
  367. package/src/features/game/adapters/inbound/createGameMeasurementEvent.ts +38 -0
  368. package/src/features/game/adapters/inbound/createGamePointerEvent.test.ts +56 -0
  369. package/src/features/game/adapters/inbound/createGamePointerEvent.ts +39 -0
  370. package/src/features/game/adapters/inbound/measureGameEntity.ts +28 -0
  371. package/src/features/game/adapters/inbound/useGameInputZoneResponder.ts +85 -0
  372. package/src/features/game/composition/GameRuntimeContext.ts +6 -0
  373. package/src/features/game/composition/createGameBindingContext.test.ts +66 -0
  374. package/src/features/game/composition/createGameBindingContext.ts +11 -0
  375. package/src/features/game/composition/createGameMeasurementRegistry.test.ts +35 -0
  376. package/src/features/game/composition/createGameMeasurementRegistry.ts +16 -0
  377. package/src/features/game/composition/useGameRuntime.test.tsx +173 -0
  378. package/src/features/game/composition/useGameRuntime.ts +200 -0
  379. package/src/features/game/composition/useGameScheduledEffects.ts +85 -0
  380. package/src/features/game/meta/gameEntityMeta.ts +226 -0
  381. package/src/features/game/meta/gameFieldMeta.ts +49 -0
  382. package/src/features/game/meta/gameInputZoneMeta.ts +140 -0
  383. package/src/features/game/meta/gameMeasurementProbeMeta.ts +72 -0
  384. package/src/features/game/meta/gameMeta.ts +115 -0
  385. package/src/features/game/meta/gameOverlayMeta.ts +66 -0
  386. package/src/features/game/public.test.tsx +64 -0
  387. package/src/features/game/public.ts +19 -0
  388. package/src/features/game/utils/clampGamePercentage.ts +4 -0
  389. package/src/features/game/utils/resolveGameEntityMotionPlan.test.ts +63 -0
  390. package/src/features/game/utils/resolveGameEntityMotionPlan.ts +53 -0
  391. package/src/features/game/utils/toGamePercentage.ts +6 -0
  392. package/src/features/game/utils/useAnimatedGameEntityValue.ts +41 -0
  393. package/src/features/game/utils/useGameEntityAnimatedStyle.ts +87 -0
  394. package/src/features/game/utils/useGameEntityMeasurement.ts +19 -0
  395. package/src/features/game/utils/useGameEntityMotionProgress.ts +114 -0
  396. package/src/features/game/utils/useGameReducedMotion.ts +15 -0
  397. package/src/features/graph-view/adapters/inbound/web-artifact/GraphView.tsx +5 -5
  398. package/src/features/graph-view/adapters/inbound/web-artifact/compactGraphSpacing.ts +1 -1
  399. package/src/features/graph-view/adapters/inbound/web-artifact/createGraphController.ts +1 -1
  400. package/src/features/graph-view/adapters/inbound/web-artifact/createGraphLoopSizer.ts +1 -1
  401. package/src/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.ts +7 -7
  402. package/src/features/graph-view/adapters/inbound/web-artifact/getGraphGeometryKey.ts +0 -1
  403. package/src/features/graph-view/adapters/inbound/web-artifact/getGraphTopologyKey.ts +1 -1
  404. package/src/features/graph-view/adapters/inbound/web-artifact/hasGraphLayoutChanged.ts +0 -1
  405. package/src/features/graph-view/adapters/inbound/web-artifact/runDetachedGraphLayout.ts +1 -1
  406. package/src/features/graph-view/adapters/inbound/web-artifact/sizeGraphNodesToLabels.ts +1 -1
  407. package/src/features/graph-view/adapters/inbound/web-artifact/syncGraphElements.ts +0 -1
  408. package/src/features/layout/gridMeta.ts +12 -2
  409. package/src/features/layout/viewMeta.ts +10 -2
  410. package/src/features/registry/ZORA_COMPONENT_REGISTRY.ts +29 -0
  411. package/src/features/tabletop/adapters/inbound/CardBack.tsx +70 -0
  412. package/src/features/tabletop/adapters/inbound/CardHand.tsx +61 -0
  413. package/src/features/tabletop/adapters/inbound/PlayingCard.tsx +95 -0
  414. package/src/features/tabletop/adapters/inbound/PokerTrainingTable.tsx +34 -0
  415. package/src/features/tabletop/adapters/inbound/TabletopTable.tsx +264 -0
  416. package/src/features/tabletop/meta.ts +254 -0
  417. package/src/features/tabletop/public.test.tsx +127 -0
  418. package/src/features/tabletop/public.ts +32 -0
  419. package/src/features/tabletop/utils/createPokerTrainingTableState.ts +152 -0
  420. package/src/features/tabletop/utils/createTabletopColorScheme.ts +232 -0
  421. package/src/features/tabletop/utils/createTabletopGameSeats.ts +31 -0
  422. package/src/features/tabletop/utils/getPlayingCardLabel.ts +8 -0
  423. package/src/features/tabletop/utils/getTabletopCardDimensions.ts +45 -0
  424. package/src/features/tabletop/utils/getTabletopSeatPosition.ts +100 -0
  425. package/src/features/tree-view/adapters/inbound/TreeView.tsx +1 -1
  426. package/src/features/tree-view/adapters/inbound/web-artifact/TreeView.tsx +1 -1
  427. package/src/features/typography/adapters/inbound/Heading.tsx +0 -4
  428. package/src/features/typography/adapters/inbound/Text.tsx +0 -4
  429. package/src/index.ts +83 -0
  430. package/src/types/chess.ts +95 -0
  431. package/src/types/gamePresentation.ts +103 -0
  432. package/src/types/gameRuntime.ts +34 -0
  433. package/src/types/tabletop.ts +131 -0
  434. package/web-dist/chunks/{Accordion-cscmtcn8.js → Accordion-0txegc16.js} +1 -1
  435. package/web-dist/chunks/{Accordion-06588rzn.js → Accordion-10xw59gm.js} +1 -1
  436. package/web-dist/chunks/{Accordion-8kgtg62g.js → Accordion-2zh15wt9.js} +6 -6
  437. package/web-dist/chunks/{Accordion-pkqj4g3r.js → Accordion-481bknsd.js} +5 -5
  438. package/web-dist/chunks/{Accordion-grfbz6f2.js → Accordion-4fkjn6r5.js} +1 -1
  439. package/web-dist/chunks/{Accordion-ftjkdjqs.js → Accordion-4gx45mn0.js} +3 -3
  440. package/web-dist/chunks/{Accordion-fjnck2tg.js → Accordion-4s69xvqy.js} +6 -6
  441. package/web-dist/chunks/{Accordion-jh7nxehr.js → Accordion-50jz5nhg.js} +1 -1
  442. package/web-dist/chunks/{Accordion-t6sdgmbz.js → Accordion-52xke54s.js} +1 -1
  443. package/web-dist/chunks/{Accordion-far6szrp.js → Accordion-6npzmbgk.js} +5 -5
  444. package/web-dist/chunks/{Accordion-q7c1ryf2.js → Accordion-6z4npcgf.js} +4 -4
  445. package/web-dist/chunks/{Accordion-gbba10rg.js → Accordion-8gw5tkfw.js} +6 -6
  446. package/web-dist/chunks/{Accordion-fmxygyb6.js → Accordion-8qteyww0.js} +4 -4
  447. package/web-dist/chunks/{Accordion-1pp37dtg.js → Accordion-9h5dx3ck.js} +4 -4
  448. package/web-dist/chunks/{Accordion-paha5aje.js → Accordion-9mmqf3wr.js} +2 -2
  449. package/web-dist/chunks/{Accordion-f5swy5bs.js → Accordion-b21zrnzj.js} +1 -1
  450. package/web-dist/chunks/{Accordion-ars389m1.js → Accordion-b8qd23hr.js} +3 -3
  451. package/web-dist/chunks/{Accordion-hxfa71g9.js → Accordion-c79y8g44.js} +7 -7
  452. package/web-dist/chunks/Accordion-ca2csh5r.js +321 -0
  453. package/web-dist/chunks/{Accordion-49gf1zb8.js → Accordion-cjht9dyv.js} +1 -1
  454. package/web-dist/chunks/{Accordion-sz21xsf4.js → Accordion-cq6hn45r.js} +1 -1
  455. package/web-dist/chunks/{Accordion-33rd76r7.js → Accordion-d90g9wcb.js} +8 -8
  456. package/web-dist/chunks/{Accordion-crx58d5n.js → Accordion-f5jb299b.js} +2 -2
  457. package/web-dist/chunks/{Accordion-h95wvyn5.js → Accordion-fe6vmbpf.js} +2 -2
  458. package/web-dist/chunks/{Accordion-jzbq36ec.js → Accordion-fqm027n3.js} +8 -8
  459. package/web-dist/chunks/{Accordion-0jkm3y3w.js → Accordion-gpccarct.js} +1 -1
  460. package/web-dist/chunks/{Accordion-v6ykq9hv.js → Accordion-h95h3xdb.js} +10 -10
  461. package/web-dist/chunks/{Accordion-t3p4ykg7.js → Accordion-j8ab9k8k.js} +8 -8
  462. package/web-dist/chunks/{Accordion-qpwhmqzd.js → Accordion-k5z591wx.js} +13 -13
  463. package/web-dist/chunks/{Accordion-rrpej6sv.js → Accordion-kdncjvc7.js} +7 -7
  464. package/web-dist/chunks/{Accordion-f05a7r28.js → Accordion-ks4a1c6w.js} +5 -5
  465. package/web-dist/chunks/{Accordion-x0j8b2by.js → Accordion-ma1sfe5z.js} +5 -5
  466. package/web-dist/chunks/{Accordion-2dws3778.js → Accordion-mhtyce1k.js} +4 -4
  467. package/web-dist/chunks/{Accordion-1vewf8aa.js → Accordion-n7gtb5ec.js} +2 -2
  468. package/web-dist/chunks/{Accordion-0psdn97s.js → Accordion-p42mm8rr.js} +1 -1
  469. package/web-dist/chunks/{Accordion-3404tth9.js → Accordion-panw5f0q.js} +7 -7
  470. package/web-dist/chunks/{Accordion-4a6wj3ez.js → Accordion-pxq8gfgg.js} +9 -9
  471. package/web-dist/chunks/{Accordion-xshn7k8f.js → Accordion-qwbshc4s.js} +4 -4
  472. package/web-dist/chunks/{Accordion-395r3wra.js → Accordion-r51wsmvy.js} +2 -2
  473. package/web-dist/chunks/Accordion-rt13cqr7.js +830 -0
  474. package/web-dist/chunks/{Accordion-hz4xaqjf.js → Accordion-s1f9hb5a.js} +9 -9
  475. package/web-dist/chunks/{Accordion-7ja4mtbz.js → Accordion-sv87mbqa.js} +1 -1
  476. package/web-dist/chunks/{Accordion-r4c9k9y7.js → Accordion-t4k9egq6.js} +2 -2
  477. package/web-dist/chunks/{Accordion-96cqeekv.js → Accordion-t64m1kca.js} +5 -5
  478. package/web-dist/chunks/Accordion-wg31jkvp.js +1559 -0
  479. package/web-dist/chunks/{Accordion-ch67q4t0.js → Accordion-y9zr4x2x.js} +4 -4
  480. package/web-dist/chunks/{Accordion-31aeqxak.js → Accordion-ye3k55r7.js} +3 -3
  481. package/web-dist/chunks/{Accordion-s42wwh6m.js → Accordion-z29agann.js} +6 -6
  482. package/web-dist/chunks/{Accordion-f1h2f05v.js → Accordion-ze26effy.js} +5 -5
  483. package/web-dist/chunks/{Accordion-tx78txec.js → Accordion-zqzcagxz.js} +5 -5
  484. package/web-dist/components/accordion/Accordion.js +12 -12
  485. package/web-dist/components/accordion-item/AccordionItem.js +12 -12
  486. package/web-dist/components/activity-indicator/ActivityIndicator.js +3 -3
  487. package/web-dist/components/app-bar/AppBar.js +19 -19
  488. package/web-dist/components/app-shell/AppShell.js +6 -6
  489. package/web-dist/components/avatar/Avatar.js +12 -12
  490. package/web-dist/components/avatar-group/AvatarGroup.js +12 -12
  491. package/web-dist/components/badge/Badge.js +7 -7
  492. package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +20 -20
  493. package/web-dist/components/bottom-sheet/BottomSheet.js +8 -8
  494. package/web-dist/components/bottom-sheet-flat-list/BottomSheetFlatList.js +8 -8
  495. package/web-dist/components/bottom-sheet-scroll-view/BottomSheetScrollView.js +8 -8
  496. package/web-dist/components/bottom-sheet-section-list/BottomSheetSectionList.js +8 -8
  497. package/web-dist/components/bottom-sheet-view/BottomSheetView.js +8 -8
  498. package/web-dist/components/bottom-sheet-virtualized-list/BottomSheetVirtualizedList.js +8 -8
  499. package/web-dist/components/breadcrumbs/Breadcrumbs.js +15 -15
  500. package/web-dist/components/button/Button.js +12 -12
  501. package/web-dist/components/button-group/ButtonGroup.js +12 -12
  502. package/web-dist/components/camera-permission-view/CameraPermissionView.js +20 -20
  503. package/web-dist/components/card/Card.js +19 -19
  504. package/web-dist/components/card-back/CardBack.d.ts +7 -0
  505. package/web-dist/components/card-back/CardBack.js +19 -0
  506. package/web-dist/components/card-back/index.d.ts +1 -0
  507. package/web-dist/components/card-back/index.js +2 -0
  508. package/web-dist/components/card-hand/CardHand.d.ts +7 -0
  509. package/web-dist/components/card-hand/CardHand.js +19 -0
  510. package/web-dist/components/card-hand/index.d.ts +1 -0
  511. package/web-dist/components/card-hand/index.js +2 -0
  512. package/web-dist/components/chat-list-item/ChatListItem.js +16 -16
  513. package/web-dist/components/checkbox/Checkbox.js +12 -12
  514. package/web-dist/components/checkbox-group/CheckboxGroup.js +12 -12
  515. package/web-dist/components/chess-board/ChessBoard.d.ts +4 -0
  516. package/web-dist/components/chess-board/ChessBoard.js +13 -0
  517. package/web-dist/components/chess-board/index.d.ts +1 -0
  518. package/web-dist/components/chess-board/index.js +2 -0
  519. package/web-dist/components/chip/Chip.js +13 -13
  520. package/web-dist/components/chip-group/ChipGroup.js +13 -13
  521. package/web-dist/components/collection-editor/CollectionEditor.js +19 -19
  522. package/web-dist/components/content-rail/ContentRail.js +13 -13
  523. package/web-dist/components/data-table/DataTable.js +26 -26
  524. package/web-dist/components/date-picker/DatePicker.js +17 -17
  525. package/web-dist/components/dialog/Dialog.js +12 -12
  526. package/web-dist/components/divider/Divider.js +6 -6
  527. package/web-dist/components/empty-state/EmptyState.js +20 -20
  528. package/web-dist/components/field/Field.js +12 -12
  529. package/web-dist/components/flat-list/FlatList.js +13 -13
  530. package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +18 -18
  531. package/web-dist/components/form/Form.js +16 -16
  532. package/web-dist/components/form-actions/FormActions.js +16 -16
  533. package/web-dist/components/form-error/FormError.js +16 -16
  534. package/web-dist/components/game/Game.d.ts +8 -0
  535. package/web-dist/components/game/Game.js +25 -0
  536. package/web-dist/components/game/index.d.ts +1 -0
  537. package/web-dist/components/game/index.js +2 -0
  538. package/web-dist/components/game-entity/GameEntity.d.ts +8 -0
  539. package/web-dist/components/game-entity/GameEntity.js +25 -0
  540. package/web-dist/components/game-entity/index.d.ts +1 -0
  541. package/web-dist/components/game-entity/index.js +2 -0
  542. package/web-dist/components/game-field/GameField.d.ts +8 -0
  543. package/web-dist/components/game-field/GameField.js +25 -0
  544. package/web-dist/components/game-field/index.d.ts +1 -0
  545. package/web-dist/components/game-field/index.js +2 -0
  546. package/web-dist/components/game-input-zone/GameInputZone.d.ts +8 -0
  547. package/web-dist/components/game-input-zone/GameInputZone.js +25 -0
  548. package/web-dist/components/game-input-zone/index.d.ts +1 -0
  549. package/web-dist/components/game-input-zone/index.js +2 -0
  550. package/web-dist/components/game-measurement-probe/GameMeasurementProbe.d.ts +8 -0
  551. package/web-dist/components/game-measurement-probe/GameMeasurementProbe.js +25 -0
  552. package/web-dist/components/game-measurement-probe/index.d.ts +1 -0
  553. package/web-dist/components/game-measurement-probe/index.js +2 -0
  554. package/web-dist/components/game-overlay/GameOverlay.d.ts +8 -0
  555. package/web-dist/components/game-overlay/GameOverlay.js +25 -0
  556. package/web-dist/components/game-overlay/index.d.ts +1 -0
  557. package/web-dist/components/game-overlay/index.js +2 -0
  558. package/web-dist/components/gradient/Gradient.js +7 -7
  559. package/web-dist/components/gradient-renderer-provider/GradientRendererProvider.js +7 -7
  560. package/web-dist/components/graph-view/GraphView.d.ts +5 -5
  561. package/web-dist/components/grid/Grid.js +6 -6
  562. package/web-dist/components/heading/Heading.js +6 -6
  563. package/web-dist/components/hero/Hero.js +19 -19
  564. package/web-dist/components/icon/Icon.js +4 -4
  565. package/web-dist/components/icon-button/IconButton.js +12 -12
  566. package/web-dist/components/image/Image.js +10 -10
  567. package/web-dist/components/keyboard-avoiding-view/KeyboardAvoidingView.js +2 -2
  568. package/web-dist/components/list/List.js +13 -13
  569. package/web-dist/components/list-item/ListItem.js +13 -13
  570. package/web-dist/components/list-section/ListSection.js +13 -13
  571. package/web-dist/components/media-card/MediaCard.js +19 -19
  572. package/web-dist/components/message-bubble/MessageBubble.js +16 -16
  573. package/web-dist/components/metric-card/MetricCard.js +19 -19
  574. package/web-dist/components/missing-element/MissingElement.js +11 -11
  575. package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +18 -18
  576. package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +18 -18
  577. package/web-dist/components/opening-book/OpeningBook.d.ts +4 -0
  578. package/web-dist/components/opening-book/OpeningBook.js +13 -0
  579. package/web-dist/components/opening-book/index.d.ts +1 -0
  580. package/web-dist/components/opening-book/index.js +2 -0
  581. package/web-dist/components/otp-form/OtpForm.js +18 -18
  582. package/web-dist/components/pagination/Pagination.js +13 -13
  583. package/web-dist/components/palette-item/PaletteItem.js +19 -19
  584. package/web-dist/components/playing-card/PlayingCard.d.ts +7 -0
  585. package/web-dist/components/playing-card/PlayingCard.js +19 -0
  586. package/web-dist/components/playing-card/index.d.ts +1 -0
  587. package/web-dist/components/playing-card/index.js +2 -0
  588. package/web-dist/components/poker-training-table/PokerTrainingTable.d.ts +7 -0
  589. package/web-dist/components/poker-training-table/PokerTrainingTable.js +19 -0
  590. package/web-dist/components/poker-training-table/index.d.ts +1 -0
  591. package/web-dist/components/poker-training-table/index.js +2 -0
  592. package/web-dist/components/popover-menu/PopoverMenu.js +14 -14
  593. package/web-dist/components/post-card/PostCard.js +19 -19
  594. package/web-dist/components/product-card/ProductCard.js +19 -19
  595. package/web-dist/components/progress/Progress.js +10 -10
  596. package/web-dist/components/progress-ring/ProgressRing.js +10 -10
  597. package/web-dist/components/radio/Radio.js +14 -14
  598. package/web-dist/components/radio-group/RadioGroup.js +14 -14
  599. package/web-dist/components/rating/Rating.js +9 -9
  600. package/web-dist/components/reader-surface/ReaderSurface.js +21 -21
  601. package/web-dist/components/scan-overlay/ScanOverlay.js +20 -20
  602. package/web-dist/components/screen/Screen.js +6 -6
  603. package/web-dist/components/screen-section/ScreenSection.js +10 -10
  604. package/web-dist/components/scroll-view/ScrollView.js +6 -6
  605. package/web-dist/components/search-input/SearchInput.js +13 -13
  606. package/web-dist/components/section-header/SectionHeader.js +10 -10
  607. package/web-dist/components/section-list/SectionList.js +13 -13
  608. package/web-dist/components/select/Select.js +16 -16
  609. package/web-dist/components/selectable-item/SelectableItem.js +5 -5
  610. package/web-dist/components/selection-provider/SelectionProvider.js +5 -5
  611. package/web-dist/components/sign-in-form/SignInForm.js +18 -18
  612. package/web-dist/components/sign-up-form/SignUpForm.js +18 -18
  613. package/web-dist/components/skeleton/Skeleton.js +22 -22
  614. package/web-dist/components/skeleton-card/SkeletonCard.js +22 -22
  615. package/web-dist/components/skeleton-list/SkeletonList.js +22 -22
  616. package/web-dist/components/skeleton-text/SkeletonText.js +22 -22
  617. package/web-dist/components/surface/Surface.js +7 -7
  618. package/web-dist/components/switch/Switch.js +7 -7
  619. package/web-dist/components/tab/Tab.js +7 -7
  620. package/web-dist/components/tab-list/TabList.js +7 -7
  621. package/web-dist/components/tab-panel/TabPanel.js +7 -7
  622. package/web-dist/components/tabletop-table/TabletopTable.d.ts +7 -0
  623. package/web-dist/components/tabletop-table/TabletopTable.js +19 -0
  624. package/web-dist/components/tabletop-table/index.d.ts +1 -0
  625. package/web-dist/components/tabletop-table/index.js +2 -0
  626. package/web-dist/components/tabs/Tabs.js +7 -7
  627. package/web-dist/components/text/Text.js +6 -6
  628. package/web-dist/components/text-input/TextInput.js +13 -13
  629. package/web-dist/components/time-picker/TimePicker.js +17 -17
  630. package/web-dist/components/timeline/Timeline.js +11 -11
  631. package/web-dist/components/toast/Toast.js +9 -9
  632. package/web-dist/components/toast-provider/ToastProvider.js +9 -9
  633. package/web-dist/components/toolbar/Toolbar.js +19 -19
  634. package/web-dist/components/tree-item/TreeItem.js +16 -16
  635. package/web-dist/components/tree-view/TreeView.d.ts +1 -1
  636. package/web-dist/components/uploader/Uploader.js +22 -22
  637. package/web-dist/components/view/View.js +6 -6
  638. package/web-dist/manifest.json +1650 -1379
  639. package/web-dist/runtime/ZoraProvider.js +8 -8
@@ -0,0 +1,72 @@
1
+ import type { ZoraComponentMeta } from '../../../types/authoring';
2
+
3
+ /*** Describe a non-visual source/target geometry sampling adapter for one Game instance. */
4
+ export const gameMeasurementProbeMeta = {
5
+ name: 'GameMeasurementProbe',
6
+ category: 'component',
7
+ description:
8
+ 'Measures two registered game entities and reports their raw rendered bounds through a generic Game event.',
9
+ directManifestNode: true,
10
+ allowedChildren: [],
11
+ blueprint: {
12
+ label: 'Game measurement probe',
13
+ defaultProps: {
14
+ sourceId: 'source',
15
+ targetId: 'target',
16
+ eventType: 'game.measurement',
17
+ delayMs: 0,
18
+ enabled: true,
19
+ },
20
+ },
21
+ bindings: {
22
+ props: {
23
+ sourceId: { value: { type: 'string' }, acceptsFallback: true },
24
+ targetId: { value: { type: 'string' }, acceptsFallback: true },
25
+ eventType: { value: { type: 'string' }, acceptsFallback: true },
26
+ entityId: { value: { type: 'string' }, acceptsFallback: true },
27
+ delayMs: { value: { type: 'number' }, acceptsFallback: true },
28
+ enabled: { value: { type: 'boolean' }, acceptsFallback: true },
29
+ },
30
+ },
31
+ props: {
32
+ sourceId: {
33
+ type: 'string',
34
+ category: 'Measurement',
35
+ label: 'Source id',
36
+ authoring: { authority: 'instance' },
37
+ },
38
+ targetId: {
39
+ type: 'string',
40
+ category: 'Measurement',
41
+ label: 'Target id',
42
+ authoring: { authority: 'instance' },
43
+ },
44
+ eventType: {
45
+ type: 'string',
46
+ category: 'Measurement',
47
+ label: 'Event type',
48
+ default: 'game.measurement',
49
+ authoring: { authority: 'instance' },
50
+ },
51
+ entityId: {
52
+ type: 'string',
53
+ category: 'Measurement',
54
+ label: 'Game entity id',
55
+ authoring: { authority: 'instance' },
56
+ },
57
+ delayMs: {
58
+ type: 'number',
59
+ category: 'Measurement',
60
+ label: 'Delay (ms)',
61
+ default: 0,
62
+ authoring: { authority: 'instance' },
63
+ },
64
+ enabled: {
65
+ type: 'boolean',
66
+ category: 'State',
67
+ label: 'Enabled',
68
+ default: true,
69
+ authoring: { authority: 'instance' },
70
+ },
71
+ },
72
+ } as const satisfies ZoraComponentMeta;
@@ -0,0 +1,115 @@
1
+ import type { ZoraComponentMeta } from '../../../types/authoring';
2
+
3
+ /*** Describe the embeddable config-driven Game runtime/presentation boundary for ZORA authoring. */
4
+ export const gameMeta = {
5
+ name: 'Game',
6
+ category: 'pattern',
7
+ description:
8
+ 'Embeds one config-driven game session inside ordinary ZORA layout and emits domain-neutral game outputs.',
9
+ directManifestNode: true,
10
+ allowedChildren: [
11
+ 'GameEntity',
12
+ 'GameInputZone',
13
+ 'GameMeasurementProbe',
14
+ 'GameOverlay',
15
+ 'Gradient',
16
+ 'Image',
17
+ 'View',
18
+ ],
19
+ blueprint: {
20
+ label: 'Game',
21
+ defaultProps: {
22
+ definition: {
23
+ id: 'game',
24
+ initialPhase: 'playing',
25
+ stages: [{ id: 'main' }],
26
+ rules: [],
27
+ },
28
+ seed: 0,
29
+ resetKey: '',
30
+ autoAdvanceTime: true,
31
+ minHeight: 320,
32
+ fill: false,
33
+ clip: true,
34
+ },
35
+ },
36
+ bindings: {
37
+ props: {
38
+ definition: {
39
+ value: { type: 'object' },
40
+ acceptsFallback: true,
41
+ },
42
+ input: {
43
+ value: { type: 'record' },
44
+ acceptsFallback: true,
45
+ },
46
+ },
47
+ },
48
+ events: {
49
+ output: {
50
+ label: 'Game output',
51
+ eventType: 'game.output',
52
+ description: 'Emitted when the platform-neutral game runtime produces an app/domain output.',
53
+ payloadFields: [
54
+ { path: 'type', type: 'string' },
55
+ { path: 'payload', type: 'record' },
56
+ ],
57
+ },
58
+ },
59
+ props: {
60
+ seed: {
61
+ type: 'number',
62
+ category: 'Runtime',
63
+ label: 'Initial seed',
64
+ default: 0,
65
+ authoring: { authority: 'instance' },
66
+ },
67
+ resetKey: {
68
+ type: 'string',
69
+ category: 'Runtime',
70
+ label: 'Reset key',
71
+ default: '',
72
+ authoring: { authority: 'instance' },
73
+ },
74
+ autoAdvanceTime: {
75
+ type: 'boolean',
76
+ category: 'Runtime',
77
+ label: 'Advance scheduled effects',
78
+ default: true,
79
+ authoring: { authority: 'instance' },
80
+ },
81
+ aspectRatio: {
82
+ type: 'number',
83
+ category: 'Layout',
84
+ label: 'Aspect ratio',
85
+ authoring: { authority: 'instance' },
86
+ },
87
+ minHeight: {
88
+ type: 'number',
89
+ category: 'Layout',
90
+ label: 'Minimum height',
91
+ default: 320,
92
+ authoring: { authority: 'instance' },
93
+ },
94
+ fill: {
95
+ type: 'boolean',
96
+ category: 'Layout',
97
+ label: 'Fill available space',
98
+ default: false,
99
+ authoring: { authority: 'instance' },
100
+ },
101
+ clip: {
102
+ type: 'boolean',
103
+ category: 'Layout',
104
+ label: 'Clip overflow',
105
+ default: true,
106
+ authoring: { authority: 'instance' },
107
+ },
108
+ accessibilityLabel: {
109
+ type: 'string',
110
+ category: 'Accessibility',
111
+ label: 'Accessibility label',
112
+ authoring: { authority: 'instance' },
113
+ },
114
+ },
115
+ } as const satisfies ZoraComponentMeta;
@@ -0,0 +1,66 @@
1
+ import type { ZoraComponentMeta } from '../../../types/authoring';
2
+
3
+ /*** Describe a generic absolute game layer for HUD, feedback, and phase content. */
4
+ export const gameOverlayMeta = {
5
+ name: 'GameOverlay',
6
+ category: 'layout',
7
+ description: 'Absolute presentation layer for HUD, feedback, controls, and phase content.',
8
+ directManifestNode: true,
9
+ allowedChildren: [
10
+ 'Badge',
11
+ 'Button',
12
+ 'ButtonGroup',
13
+ 'Card',
14
+ 'GameEntity',
15
+ 'Heading',
16
+ 'Icon',
17
+ 'Image',
18
+ 'Progress',
19
+ 'ProgressRing',
20
+ 'Text',
21
+ 'View',
22
+ ],
23
+ blueprint: {
24
+ label: 'Game overlay',
25
+ defaultProps: { placement: 'fill', blocking: false, padding: 0 },
26
+ },
27
+ props: {
28
+ placement: {
29
+ type: 'enum',
30
+ category: 'Layout',
31
+ label: 'Placement',
32
+ enum: [
33
+ 'fill',
34
+ 'center',
35
+ 'top',
36
+ 'bottom',
37
+ 'top-left',
38
+ 'top-right',
39
+ 'bottom-left',
40
+ 'bottom-right',
41
+ ],
42
+ default: 'fill',
43
+ authoring: { authority: 'instance' },
44
+ },
45
+ blocking: {
46
+ type: 'boolean',
47
+ category: 'Interaction',
48
+ label: 'Block pointer input',
49
+ default: false,
50
+ authoring: { authority: 'instance' },
51
+ },
52
+ padding: {
53
+ type: 'number',
54
+ category: 'Layout',
55
+ label: 'Padding',
56
+ default: 0,
57
+ authoring: { authority: 'instance' },
58
+ },
59
+ accessibilityLabel: {
60
+ type: 'string',
61
+ category: 'Accessibility',
62
+ label: 'Accessibility label',
63
+ authoring: { authority: 'instance' },
64
+ },
65
+ },
66
+ } as const satisfies ZoraComponentMeta;
@@ -0,0 +1,64 @@
1
+ import { join } from 'node:path';
2
+ import { pathToFileURL } from 'node:url';
3
+
4
+ import { expect, test } from 'bun:test';
5
+ import { Window } from 'happy-dom';
6
+ import React from 'react';
7
+ import { renderToStaticMarkup } from 'react-dom/server';
8
+
9
+ import type { ZoraProvider as ZoraProviderComponent } from '../theme/runtime';
10
+ import type { GameEntity as GameEntityComponent, GameField as GameFieldComponent } from './public';
11
+
12
+ const webDistRoot = join(import.meta.dir, '../../../web-dist');
13
+
14
+ test('generic web materialization renders Game field and entity without a plugin catalog', async () => {
15
+ const manifest: unknown = await Bun.file(join(webDistRoot, 'manifest.json')).json();
16
+ if (
17
+ typeof manifest !== 'object' ||
18
+ manifest === null ||
19
+ !('artifacts' in manifest) ||
20
+ !Array.isArray(manifest.artifacts)
21
+ ) {
22
+ throw new Error('Expected a generated web artifact catalog.');
23
+ }
24
+ const artifactNames = Object.values(manifest.artifacts as readonly unknown[])
25
+ .filter(
26
+ (artifact) => typeof artifact === 'object' && artifact !== null && 'exportName' in artifact,
27
+ )
28
+ .map((artifact) => artifact.exportName);
29
+ const exports = new Set(artifactNames);
30
+ for (const name of [
31
+ 'Game',
32
+ 'GameField',
33
+ 'GameEntity',
34
+ 'GameInputZone',
35
+ 'GameMeasurementProbe',
36
+ 'GameOverlay',
37
+ ]) {
38
+ expect(exports.has(name), name).toBe(true);
39
+ }
40
+
41
+ const { GameField } = (await import(
42
+ pathToFileURL(join(webDistRoot, 'components/game-field/index.js')).href
43
+ )) as { GameField: typeof GameFieldComponent };
44
+ const { GameEntity } = (await import(
45
+ pathToFileURL(join(webDistRoot, 'components/game-entity/index.js')).href
46
+ )) as { GameEntity: typeof GameEntityComponent };
47
+ const { ZoraProvider } = (await import(
48
+ pathToFileURL(join(webDistRoot, 'runtime/ZoraProvider.js')).href
49
+ )) as { ZoraProvider: typeof ZoraProviderComponent };
50
+ const browser = new Window();
51
+ browser.document.body.innerHTML = renderToStaticMarkup(
52
+ <ZoraProvider mode="light">
53
+ <GameField testID="field">
54
+ <GameEntity x={25} y={40} testID="entity" />
55
+ </GameField>
56
+ </ZoraProvider>,
57
+ );
58
+ expect(browser.document.querySelector('[data-testid="field"]')).not.toBeNull();
59
+ expect(browser.document.querySelector('[data-testid="field"]')?.getAttribute('style')).toContain(
60
+ 'min-height:320px',
61
+ );
62
+ expect(browser.document.querySelector('[data-testid="entity"]')).not.toBeNull();
63
+ browser.close();
64
+ });
@@ -0,0 +1,19 @@
1
+ export type {
2
+ GameEntityEasing,
3
+ GameEntityMotionProps,
4
+ GameEntityProps,
5
+ GameFieldProps,
6
+ GameInputZoneProps,
7
+ GameKeyboardBinding,
8
+ GameMeasurementProbeProps,
9
+ GameOverlayPlacement,
10
+ GameOverlayProps,
11
+ GamePointerEvents,
12
+ GameProps,
13
+ } from '../../types/gamePresentation';
14
+ export { Game } from './adapters/inbound/Game';
15
+ export { GameEntity } from './adapters/inbound/GameEntity';
16
+ export { GameField } from './adapters/inbound/GameField';
17
+ export { GameInputZone } from './adapters/inbound/GameInputZone';
18
+ export { GameMeasurementProbe } from './adapters/inbound/GameMeasurementProbe';
19
+ export { GameOverlay } from './adapters/inbound/GameOverlay';
@@ -0,0 +1,4 @@
1
+ /*** Clamp one game presentation coordinate to the inclusive field-percentage range. */
2
+ export function clampGamePercentage(value: number): number {
3
+ return Math.min(100, Math.max(0, value));
4
+ }
@@ -0,0 +1,63 @@
1
+ import { describe, expect, test } from 'bun:test';
2
+
3
+ import { resolveGameEntityMotionPlan } from './resolveGameEntityMotionPlan';
4
+
5
+ describe('resolveGameEntityMotionPlan configuration', () => {
6
+ test('preserves explicit transition and repeating alternate motion', () => {
7
+ expect(
8
+ resolveGameEntityMotionPlan(
9
+ {
10
+ transitionDurationMs: 70,
11
+ transitionEasing: 'ease-out',
12
+ motionOffsetY: 8,
13
+ motionDurationMs: 1200,
14
+ motionDelayMs: 100,
15
+ motionEasing: 'ease-in-out',
16
+ motionRepeat: true,
17
+ motionAlternate: true,
18
+ },
19
+ false,
20
+ ),
21
+ ).toEqual({
22
+ transitionDurationMs: 70,
23
+ transitionEasing: 'ease-out',
24
+ motionDurationMs: 1200,
25
+ motionDelayMs: 100,
26
+ motionEasing: 'ease-in-out',
27
+ motionEnabled: true,
28
+ motionRepeat: true,
29
+ motionAlternate: true,
30
+ motionPaused: false,
31
+ });
32
+ });
33
+
34
+ test('uses alternate only for repeating motion', () => {
35
+ expect(
36
+ resolveGameEntityMotionPlan(
37
+ { motionOffsetY: 5, motionDurationMs: 100, motionAlternate: true },
38
+ false,
39
+ ).motionAlternate,
40
+ ).toBe(false);
41
+ });
42
+ });
43
+
44
+ describe('resolveGameEntityMotionPlan reduced motion', () => {
45
+ test('disables decorative motion and transitions', () => {
46
+ const plan = resolveGameEntityMotionPlan(
47
+ { transitionDurationMs: 80, motionOffsetX: 12, motionDurationMs: 500 },
48
+ true,
49
+ );
50
+
51
+ expect(plan.transitionDurationMs).toBe(0);
52
+ expect(plan.motionEnabled).toBe(false);
53
+ });
54
+
55
+ test('keeps essential trajectories enabled', () => {
56
+ const plan = resolveGameEntityMotionPlan(
57
+ { motionOffsetY: 70, motionDurationMs: 600, motionEssential: true },
58
+ true,
59
+ );
60
+
61
+ expect(plan.motionEnabled).toBe(true);
62
+ });
63
+ });
@@ -0,0 +1,53 @@
1
+ import type { GameEntityEasing, GameEntityMotionProps } from '../../../types/gamePresentation';
2
+
3
+ export interface GameEntityMotionPlan {
4
+ readonly transitionDurationMs: number;
5
+ readonly transitionEasing: GameEntityEasing;
6
+ readonly motionDurationMs: number;
7
+ readonly motionDelayMs: number;
8
+ readonly motionEasing: GameEntityEasing;
9
+ readonly motionEnabled: boolean;
10
+ readonly motionRepeat: boolean;
11
+ readonly motionAlternate: boolean;
12
+ readonly motionPaused: boolean;
13
+ }
14
+
15
+ /*** Normalize serializable GameEntity motion props against the current reduced-motion preference. */
16
+ export function resolveGameEntityMotionPlan(
17
+ props: GameEntityMotionProps,
18
+ reduceMotion: boolean,
19
+ ): GameEntityMotionPlan {
20
+ const essential = props.motionEssential === true;
21
+ const motionEnabled =
22
+ hasMotionOffset(props) &&
23
+ normalizeDuration(props.motionDurationMs) > 0 &&
24
+ (!reduceMotion || essential);
25
+
26
+ return {
27
+ transitionDurationMs: reduceMotion ? 0 : normalizeDuration(props.transitionDurationMs),
28
+ transitionEasing: props.transitionEasing ?? 'linear',
29
+ motionDurationMs: normalizeDuration(props.motionDurationMs),
30
+ motionDelayMs: normalizeDuration(props.motionDelayMs),
31
+ motionEasing: props.motionEasing ?? 'linear',
32
+ motionEnabled,
33
+ motionRepeat: props.motionRepeat === true,
34
+ motionAlternate: props.motionRepeat === true && props.motionAlternate === true,
35
+ motionPaused: props.motionPaused === true,
36
+ };
37
+ }
38
+
39
+ /*** Return whether any relative presentation offset requires a motion timeline. */
40
+ function hasMotionOffset(props: GameEntityMotionProps): boolean {
41
+ return (
42
+ (props.motionOffsetX ?? 0) !== 0 ||
43
+ (props.motionOffsetY ?? 0) !== 0 ||
44
+ (props.motionOpacityDelta ?? 0) !== 0 ||
45
+ (props.motionScaleDelta ?? 0) !== 0 ||
46
+ (props.motionRotationDelta ?? 0) !== 0
47
+ );
48
+ }
49
+
50
+ /*** Clamp an optional duration to a finite non-negative millisecond value. */
51
+ function normalizeDuration(value: number | undefined): number {
52
+ return value === undefined || !Number.isFinite(value) ? 0 : Math.max(0, value);
53
+ }
@@ -0,0 +1,6 @@
1
+ import { clampGamePercentage } from './clampGamePercentage';
2
+
3
+ /*** Convert one game percentage coordinate to React Native percentage style syntax. */
4
+ export function toGamePercentage(value: number): `${number}%` {
5
+ return `${clampGamePercentage(value)}%`;
6
+ }
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { Animated, Easing } from 'react-native';
3
+
4
+ import type { GameEntityEasing } from '../../../types/gamePresentation';
5
+
6
+ /*** Animate one bound numeric GameEntity presentation value toward its latest session-driven target. */
7
+ export function useAnimatedGameEntityValue(
8
+ target: number,
9
+ durationMs: number,
10
+ easing: GameEntityEasing,
11
+ ): Animated.Value {
12
+ const [value] = React.useState(() => new Animated.Value(target));
13
+
14
+ React.useEffect(() => {
15
+ value.stopAnimation();
16
+
17
+ if (durationMs === 0) {
18
+ value.setValue(target);
19
+ return undefined;
20
+ }
21
+
22
+ const animation = Animated.timing(value, {
23
+ toValue: target,
24
+ duration: durationMs,
25
+ easing: resolveGameEntityEasing(easing),
26
+ useNativeDriver: false,
27
+ });
28
+ animation.start();
29
+ return () => animation.stop();
30
+ }, [durationMs, easing, target, value]);
31
+
32
+ return value;
33
+ }
34
+
35
+ /*** Map serializable easing names onto React Native easing functions. */
36
+ function resolveGameEntityEasing(easing: GameEntityEasing) {
37
+ if (easing === 'ease-in') return Easing.in(Easing.ease);
38
+ if (easing === 'ease-out') return Easing.out(Easing.ease);
39
+ if (easing === 'ease-in-out') return Easing.inOut(Easing.ease);
40
+ return Easing.linear;
41
+ }
@@ -0,0 +1,87 @@
1
+ import { Animated } from 'react-native';
2
+
3
+ import type { GameEntityProps } from '../../../types/gamePresentation';
4
+ import { resolveGameEntityMotionPlan } from './resolveGameEntityMotionPlan';
5
+ import { useAnimatedGameEntityValue } from './useAnimatedGameEntityValue';
6
+ import { useGameEntityMotionProgress } from './useGameEntityMotionProgress';
7
+ import { useGameReducedMotion } from './useGameReducedMotion';
8
+
9
+ interface GameEntityAnimatedValues {
10
+ readonly x: Animated.Value;
11
+ readonly y: Animated.Value;
12
+ readonly opacity: Animated.Value;
13
+ readonly scale: Animated.Value;
14
+ readonly rotation: Animated.Value;
15
+ readonly progress: Animated.Value;
16
+ }
17
+
18
+ /*** Compose bound GameEntity values with optional relative presentation motion. */
19
+ export function useGameEntityAnimatedStyle(input: GameEntityProps) {
20
+ const reduceMotion = useGameReducedMotion();
21
+ const plan = resolveGameEntityMotionPlan(input, reduceMotion);
22
+ const values: GameEntityAnimatedValues = {
23
+ x: useAnimatedGameEntityValue(input.x ?? 0, plan.transitionDurationMs, plan.transitionEasing),
24
+ y: useAnimatedGameEntityValue(input.y ?? 0, plan.transitionDurationMs, plan.transitionEasing),
25
+ opacity: useAnimatedGameEntityValue(
26
+ input.opacity ?? 1,
27
+ plan.transitionDurationMs,
28
+ plan.transitionEasing,
29
+ ),
30
+ scale: useAnimatedGameEntityValue(
31
+ input.scale ?? 1,
32
+ plan.transitionDurationMs,
33
+ plan.transitionEasing,
34
+ ),
35
+ rotation: useAnimatedGameEntityValue(
36
+ input.rotation ?? 0,
37
+ plan.transitionDurationMs,
38
+ plan.transitionEasing,
39
+ ),
40
+ progress: useGameEntityMotionProgress(plan),
41
+ };
42
+
43
+ return createGameEntityAnimatedStyle(values, input);
44
+ }
45
+
46
+ /*** Build one animated React Native style from base values and relative motion progress. */
47
+ function createGameEntityAnimatedStyle(values: GameEntityAnimatedValues, input: GameEntityProps) {
48
+ const left = Animated.add(values.x, Animated.multiply(values.progress, input.motionOffsetX ?? 0));
49
+ const top = Animated.add(values.y, Animated.multiply(values.progress, input.motionOffsetY ?? 0));
50
+ const opacity = Animated.add(
51
+ values.opacity,
52
+ Animated.multiply(values.progress, input.motionOpacityDelta ?? 0),
53
+ );
54
+ const scale = Animated.add(
55
+ values.scale,
56
+ Animated.multiply(values.progress, input.motionScaleDelta ?? 0),
57
+ );
58
+ const rotation = Animated.add(
59
+ values.rotation,
60
+ Animated.multiply(values.progress, input.motionRotationDelta ?? 0),
61
+ );
62
+
63
+ return {
64
+ left: left.interpolate({
65
+ inputRange: [-10_000, 10_000],
66
+ outputRange: ['-10000%', '10000%'],
67
+ }),
68
+ top: top.interpolate({
69
+ inputRange: [-10_000, 10_000],
70
+ outputRange: ['-10000%', '10000%'],
71
+ }),
72
+ opacity: opacity.interpolate({
73
+ inputRange: [0, 1],
74
+ outputRange: [0, 1],
75
+ extrapolate: 'clamp',
76
+ }),
77
+ transform: [
78
+ { scale },
79
+ {
80
+ rotate: rotation.interpolate({
81
+ inputRange: [-36_000, 36_000],
82
+ outputRange: ['-36000deg', '36000deg'],
83
+ }),
84
+ },
85
+ ],
86
+ };
87
+ }
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import type { View } from 'react-native';
3
+
4
+ import { measureGameEntity } from '../adapters/inbound/measureGameEntity';
5
+ import { GameRuntimeContext } from '../composition/GameRuntimeContext';
6
+
7
+ /*** Register one optional measurable GameEntity view inside its local Game scope. */
8
+ export function useGameEntityMeasurement(
9
+ elementRef: React.RefObject<View | null>,
10
+ measurementId: string | undefined,
11
+ ): void {
12
+ const runtime = React.useContext(GameRuntimeContext);
13
+ const registerMeasurement = runtime?.registerMeasurement;
14
+
15
+ React.useEffect(() => {
16
+ if (measurementId === undefined || registerMeasurement === undefined) return undefined;
17
+ return registerMeasurement(measurementId, () => measureGameEntity(elementRef.current));
18
+ }, [elementRef, measurementId, registerMeasurement]);
19
+ }