@ankhorage/zora 25.7.0 → 25.8.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 (311) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +1 -1
  3. package/dist/capabilities/index.d.ts +2 -74
  4. package/dist/capabilities/index.d.ts.map +1 -1
  5. package/dist/capabilities/index.js +6170 -59
  6. package/dist/capabilities/index.js.map +119 -1
  7. package/dist/cli/index.d.ts +2 -74
  8. package/dist/cli/index.d.ts.map +1 -1
  9. package/dist/cli/index.js +2 -1
  10. package/dist/cli/index.js.map +1 -1
  11. package/dist/features/grid-interactions/adapters/inbound/GridInteractions.d.ts +5 -0
  12. package/dist/features/grid-interactions/adapters/inbound/GridInteractions.d.ts.map +1 -0
  13. package/dist/features/grid-interactions/adapters/inbound/GridInteractions.js +40 -0
  14. package/dist/features/grid-interactions/adapters/inbound/GridInteractions.js.map +1 -0
  15. package/dist/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.d.ts +2 -0
  16. package/dist/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.d.ts.map +1 -0
  17. package/dist/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.js +2 -0
  18. package/dist/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.js.map +1 -0
  19. package/dist/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.native.d.ts +11 -0
  20. package/dist/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.native.d.ts.map +1 -0
  21. package/dist/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.native.js +5 -0
  22. package/dist/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.native.js.map +1 -0
  23. package/dist/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.web.d.ts +11 -0
  24. package/dist/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.web.d.ts.map +1 -0
  25. package/dist/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.web.js +20 -0
  26. package/dist/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.web.js.map +1 -0
  27. package/dist/features/grid-interactions/adapters/inbound/createGridInteractionsPointerQueue.d.ts +17 -0
  28. package/dist/features/grid-interactions/adapters/inbound/createGridInteractionsPointerQueue.d.ts.map +1 -0
  29. package/dist/features/grid-interactions/adapters/inbound/createGridInteractionsPointerQueue.js +76 -0
  30. package/dist/features/grid-interactions/adapters/inbound/createGridInteractionsPointerQueue.js.map +1 -0
  31. package/dist/features/grid-interactions/adapters/inbound/resolveGridInteractionPointer.d.ts +21 -0
  32. package/dist/features/grid-interactions/adapters/inbound/resolveGridInteractionPointer.d.ts.map +1 -0
  33. package/dist/features/grid-interactions/adapters/inbound/resolveGridInteractionPointer.js +20 -0
  34. package/dist/features/grid-interactions/adapters/inbound/resolveGridInteractionPointer.js.map +1 -0
  35. package/dist/features/grid-interactions/application/createGridInteractionsController.d.ts +4 -0
  36. package/dist/features/grid-interactions/application/createGridInteractionsController.d.ts.map +1 -0
  37. package/dist/features/grid-interactions/application/createGridInteractionsController.js +200 -0
  38. package/dist/features/grid-interactions/application/createGridInteractionsController.js.map +1 -0
  39. package/dist/features/grid-interactions/meta.d.ts +11 -0
  40. package/dist/features/grid-interactions/meta.d.ts.map +1 -0
  41. package/dist/features/grid-interactions/meta.js +11 -0
  42. package/dist/features/grid-interactions/meta.js.map +1 -0
  43. package/dist/features/grid-interactions/public.d.ts +4 -0
  44. package/dist/features/grid-interactions/public.d.ts.map +1 -0
  45. package/dist/features/grid-interactions/public.js +3 -0
  46. package/dist/features/grid-interactions/public.js.map +1 -0
  47. package/dist/features/matrix-grid/adapters/inbound/MatrixGrid.d.ts.map +1 -1
  48. package/dist/features/matrix-grid/adapters/inbound/MatrixGrid.js +73 -19
  49. package/dist/features/matrix-grid/adapters/inbound/MatrixGrid.js.map +1 -1
  50. package/dist/features/matrix-grid/adapters/inbound/MatrixGridKeyboardProxy.d.ts +9 -0
  51. package/dist/features/matrix-grid/adapters/inbound/MatrixGridKeyboardProxy.d.ts.map +1 -0
  52. package/dist/features/matrix-grid/adapters/inbound/MatrixGridKeyboardProxy.js +5 -0
  53. package/dist/features/matrix-grid/adapters/inbound/MatrixGridKeyboardProxy.js.map +1 -0
  54. package/dist/features/matrix-grid/adapters/inbound/MatrixGridKeyboardProxy.native.d.ts +9 -0
  55. package/dist/features/matrix-grid/adapters/inbound/MatrixGridKeyboardProxy.native.d.ts.map +1 -0
  56. package/dist/features/matrix-grid/adapters/inbound/MatrixGridKeyboardProxy.native.js +5 -0
  57. package/dist/features/matrix-grid/adapters/inbound/MatrixGridKeyboardProxy.native.js.map +1 -0
  58. package/dist/features/matrix-grid/adapters/inbound/MatrixGridKeyboardProxy.web.d.ts +9 -0
  59. package/dist/features/matrix-grid/adapters/inbound/MatrixGridKeyboardProxy.web.d.ts.map +1 -0
  60. package/dist/features/matrix-grid/adapters/inbound/MatrixGridKeyboardProxy.web.js +28 -0
  61. package/dist/features/matrix-grid/adapters/inbound/MatrixGridKeyboardProxy.web.js.map +1 -0
  62. package/dist/features/matrix-grid/adapters/inbound/useMatrixGridKeyboardFocus.d.ts +14 -0
  63. package/dist/features/matrix-grid/adapters/inbound/useMatrixGridKeyboardFocus.d.ts.map +1 -0
  64. package/dist/features/matrix-grid/adapters/inbound/useMatrixGridKeyboardFocus.js +50 -0
  65. package/dist/features/matrix-grid/adapters/inbound/useMatrixGridKeyboardFocus.js.map +1 -0
  66. package/dist/features/matrix-grid/application/createMatrixGridSparseIndex.d.ts +18 -0
  67. package/dist/features/matrix-grid/application/createMatrixGridSparseIndex.d.ts.map +1 -0
  68. package/dist/features/matrix-grid/application/createMatrixGridSparseIndex.js +56 -0
  69. package/dist/features/matrix-grid/application/createMatrixGridSparseIndex.js.map +1 -0
  70. package/dist/features/matrix-grid/application/getMatrixGridNextFocusId.d.ts +4 -0
  71. package/dist/features/matrix-grid/application/getMatrixGridNextFocusId.d.ts.map +1 -0
  72. package/dist/features/matrix-grid/application/getMatrixGridNextFocusId.js +65 -0
  73. package/dist/features/matrix-grid/application/getMatrixGridNextFocusId.js.map +1 -0
  74. package/dist/features/matrix-grid/application/resolveMatrixGridSelection.d.ts +8 -1
  75. package/dist/features/matrix-grid/application/resolveMatrixGridSelection.d.ts.map +1 -1
  76. package/dist/features/matrix-grid/application/resolveMatrixGridSelection.js +15 -4
  77. package/dist/features/matrix-grid/application/resolveMatrixGridSelection.js.map +1 -1
  78. package/dist/features/registry/ZORA_COMPONENT_REGISTRY.d.ts.map +1 -1
  79. package/dist/features/registry/ZORA_COMPONENT_REGISTRY.js +2 -0
  80. package/dist/features/registry/ZORA_COMPONENT_REGISTRY.js.map +1 -1
  81. package/dist/features/registry/componentMeta.d.ts.map +1 -1
  82. package/dist/features/registry/componentMeta.js +2 -0
  83. package/dist/features/registry/componentMeta.js.map +1 -1
  84. package/dist/features/registry/createEventCapabilities.d.ts +4 -0
  85. package/dist/features/registry/createEventCapabilities.d.ts.map +1 -0
  86. package/dist/features/registry/createEventCapabilities.js +76 -0
  87. package/dist/features/registry/createEventCapabilities.js.map +1 -0
  88. package/dist/index.d.ts +1 -0
  89. package/dist/index.d.ts.map +1 -1
  90. package/dist/index.js +1 -0
  91. package/dist/index.js.map +1 -1
  92. package/dist/types/grid-interactions.d.ts +58 -0
  93. package/dist/types/grid-interactions.d.ts.map +1 -0
  94. package/dist/types/grid-interactions.js +2 -0
  95. package/dist/types/grid-interactions.js.map +1 -0
  96. package/dist/types/matrix-grid.d.ts +2 -0
  97. package/dist/types/matrix-grid.d.ts.map +1 -1
  98. package/dist/types/matrix-grid.js.map +1 -1
  99. package/package.json +1825 -7
  100. package/src/capabilities/index.test.ts +87 -15
  101. package/src/capabilities/index.ts +5 -2
  102. package/src/cli/index.test.ts +5 -3
  103. package/src/cli/index.ts +5 -2
  104. package/src/features/grid-interactions/adapters/inbound/GridInteractions.test.tsx +143 -0
  105. package/src/features/grid-interactions/adapters/inbound/GridInteractions.tsx +79 -0
  106. package/src/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.native.tsx +14 -0
  107. package/src/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.tsx +1 -0
  108. package/src/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.web.tsx +41 -0
  109. package/src/features/grid-interactions/adapters/inbound/createGridInteractionsPointerQueue.test.ts +98 -0
  110. package/src/features/grid-interactions/adapters/inbound/createGridInteractionsPointerQueue.ts +94 -0
  111. package/src/features/grid-interactions/adapters/inbound/resolveGridInteractionPointer.test.ts +33 -0
  112. package/src/features/grid-interactions/adapters/inbound/resolveGridInteractionPointer.ts +45 -0
  113. package/src/features/grid-interactions/application/createGridInteractionsController.test.ts +229 -0
  114. package/src/features/grid-interactions/application/createGridInteractionsController.ts +248 -0
  115. package/src/features/grid-interactions/meta.ts +12 -0
  116. package/src/features/grid-interactions/public.ts +11 -0
  117. package/src/features/matrix-grid/adapters/inbound/MatrixGrid.test.tsx +280 -2
  118. package/src/features/matrix-grid/adapters/inbound/MatrixGrid.tsx +121 -31
  119. package/src/features/matrix-grid/adapters/inbound/MatrixGridKeyboardProxy.native.tsx +11 -0
  120. package/src/features/matrix-grid/adapters/inbound/MatrixGridKeyboardProxy.tsx +11 -0
  121. package/src/features/matrix-grid/adapters/inbound/MatrixGridKeyboardProxy.web.tsx +43 -0
  122. package/src/features/matrix-grid/adapters/inbound/useMatrixGridKeyboardFocus.ts +70 -0
  123. package/src/features/matrix-grid/application/createMatrixGridSparseIndex.test.ts +35 -0
  124. package/src/features/matrix-grid/application/createMatrixGridSparseIndex.ts +105 -0
  125. package/src/features/matrix-grid/application/getMatrixGridNextFocusId.test.ts +93 -0
  126. package/src/features/matrix-grid/application/getMatrixGridNextFocusId.ts +112 -0
  127. package/src/features/matrix-grid/application/resolveMatrixGridSelection.test.ts +63 -2
  128. package/src/features/matrix-grid/application/resolveMatrixGridSelection.ts +27 -4
  129. package/src/features/registry/ZORA_COMPONENT_REGISTRY.ts +2 -0
  130. package/src/features/registry/componentMeta.ts +2 -0
  131. package/src/features/registry/createEventCapabilities.ts +108 -0
  132. package/src/index.ts +11 -0
  133. package/src/structureOwnership.test.ts +5 -0
  134. package/src/types/grid-interactions.ts +72 -0
  135. package/src/types/matrix-grid.ts +2 -0
  136. package/web-dist/chunks/{Accordion-5g05kfmx.js → Accordion-0q2wzjdd.js} +4 -4
  137. package/web-dist/chunks/{Accordion-b96evb46.js → Accordion-1fsrnq73.js} +1 -1
  138. package/web-dist/chunks/{Accordion-h3y8qev2.js → Accordion-38ts3gnn.js} +2 -2
  139. package/web-dist/chunks/{Accordion-jnc315h7.js → Accordion-8pkw32q9.js} +2 -2
  140. package/web-dist/chunks/{Accordion-h7zsx9eg.js → Accordion-9jrxktne.js} +3 -3
  141. package/web-dist/chunks/{Accordion-9w8wg9mf.js → Accordion-9rnsg9pk.js} +1 -1
  142. package/web-dist/chunks/{Accordion-4zqd7twp.js → Accordion-9ygakvwk.js} +5 -5
  143. package/web-dist/chunks/{Accordion-fhnazn3n.js → Accordion-b74j4hdt.js} +1 -1
  144. package/web-dist/chunks/{Accordion-nssr5gep.js → Accordion-c50pywj3.js} +2 -2
  145. package/web-dist/chunks/{Accordion-pvj5npzc.js → Accordion-ddrn94v3.js} +3 -3
  146. package/web-dist/chunks/{Accordion-090y18cv.js → Accordion-dk0dtyc0.js} +3 -3
  147. package/web-dist/chunks/{Accordion-59pa0677.js → Accordion-fcczvwgg.js} +0 -1
  148. package/web-dist/chunks/{Accordion-sp4k08kw.js → Accordion-geah5s4f.js} +4 -4
  149. package/web-dist/chunks/{Accordion-6rrqpb2h.js → Accordion-h4ekm5cp.js} +2 -2
  150. package/web-dist/chunks/{Accordion-3d4wkzg7.js → Accordion-hecpczme.js} +5 -5
  151. package/web-dist/chunks/{Accordion-a6551mh4.js → Accordion-hn43wt45.js} +1 -1
  152. package/web-dist/chunks/{Accordion-sw7ep29d.js → Accordion-hnx7hx55.js} +2 -2
  153. package/web-dist/chunks/{Accordion-rsvphbe4.js → Accordion-j1chy29e.js} +1 -1
  154. package/web-dist/chunks/{Accordion-ewf1zen9.js → Accordion-k9cxpg08.js} +5 -5
  155. package/web-dist/chunks/{Accordion-5df6cgyf.js → Accordion-md1g54wg.js} +1 -1
  156. package/web-dist/chunks/{Accordion-kjtcbe09.js → Accordion-p1ebrt17.js} +3 -3
  157. package/web-dist/chunks/{Accordion-qn398m1x.js → Accordion-r2g18vxa.js} +1 -1
  158. package/web-dist/chunks/{Accordion-zt9yghdz.js → Accordion-rctfgyfv.js} +4 -4
  159. package/web-dist/chunks/{Accordion-88t8fgxv.js → Accordion-rfc5mdbv.js} +1 -1
  160. package/web-dist/chunks/{Accordion-fmzxat3v.js → Accordion-sdnzqktc.js} +4 -4
  161. package/web-dist/chunks/{Accordion-v0grdh6q.js → Accordion-sq7ya2ye.js} +2 -2
  162. package/web-dist/chunks/{Accordion-ejx5gcf9.js → Accordion-t5scffdr.js} +9 -9
  163. package/web-dist/chunks/{Accordion-sy1cc5my.js → Accordion-ts788t7b.js} +3 -3
  164. package/web-dist/chunks/{Accordion-4s68t3h7.js → Accordion-v3rzy273.js} +6 -6
  165. package/web-dist/chunks/{Accordion-7tjz25jh.js → Accordion-vbzjq3z8.js} +1 -1
  166. package/web-dist/chunks/{Accordion-jh72azm2.js → Accordion-vg337250.js} +2 -2
  167. package/web-dist/chunks/{Accordion-42jfy1a1.js → Accordion-vj1m2wck.js} +1 -1
  168. package/web-dist/chunks/{Accordion-tqpsmdrk.js → Accordion-vxg5sw01.js} +4 -4
  169. package/web-dist/chunks/{Accordion-61ntvh14.js → Accordion-w59y0jdf.js} +4 -4
  170. package/web-dist/chunks/{Accordion-fjxcn6g9.js → Accordion-wcmrasqx.js} +8 -8
  171. package/web-dist/chunks/{Accordion-r1cj2w9e.js → Accordion-wpk8dxqp.js} +3 -3
  172. package/web-dist/chunks/{Accordion-w6qedeba.js → Accordion-x055n3b3.js} +1 -1
  173. package/web-dist/chunks/{Accordion-dbf93gxh.js → Accordion-xcm1qc39.js} +1 -1
  174. package/web-dist/chunks/{Accordion-7kq500r1.js → Accordion-xgxxg1hz.js} +1 -1
  175. package/web-dist/chunks/{Accordion-a4cma5b6.js → Accordion-y3083394.js} +3 -3
  176. package/web-dist/chunks/{Accordion-40tenzcg.js → Accordion-yexfbrzg.js} +4 -4
  177. package/web-dist/chunks/{Accordion-2r0gqk3x.js → Accordion-ztw7zp6v.js} +5 -5
  178. package/web-dist/chunks/{Accordion-bz04casa.js → Accordion-zypyr9xw.js} +211 -6
  179. package/web-dist/components/accordion/Accordion.js +5 -5
  180. package/web-dist/components/accordion-item/AccordionItem.js +5 -5
  181. package/web-dist/components/activity-indicator/ActivityIndicator.js +1 -1
  182. package/web-dist/components/app-bar/AppBar.js +7 -7
  183. package/web-dist/components/app-header/AppHeader.js +7 -7
  184. package/web-dist/components/app-shell/AppShell.js +2 -2
  185. package/web-dist/components/auth-screen/AuthScreen.js +10 -10
  186. package/web-dist/components/avatar/Avatar.js +5 -5
  187. package/web-dist/components/avatar-group/AvatarGroup.js +5 -5
  188. package/web-dist/components/badge/Badge.js +2 -2
  189. package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +10 -10
  190. package/web-dist/components/bottom-sheet/BottomSheet.js +3 -3
  191. package/web-dist/components/bottom-sheet-flat-list/BottomSheetFlatList.js +3 -3
  192. package/web-dist/components/bottom-sheet-scroll-view/BottomSheetScrollView.js +3 -3
  193. package/web-dist/components/bottom-sheet-section-list/BottomSheetSectionList.js +3 -3
  194. package/web-dist/components/bottom-sheet-view/BottomSheetView.js +3 -3
  195. package/web-dist/components/bottom-sheet-virtualized-list/BottomSheetVirtualizedList.js +3 -3
  196. package/web-dist/components/breadcrumbs/Breadcrumbs.js +5 -5
  197. package/web-dist/components/button/Button.js +3 -3
  198. package/web-dist/components/button-group/ButtonGroup.js +3 -3
  199. package/web-dist/components/camera-permission-view/CameraPermissionView.js +10 -10
  200. package/web-dist/components/card/Card.js +9 -9
  201. package/web-dist/components/card-back/CardBack.js +2 -2
  202. package/web-dist/components/card-hand/CardHand.js +2 -2
  203. package/web-dist/components/chat-list-item/ChatListItem.js +7 -7
  204. package/web-dist/components/checkbox/Checkbox.js +4 -4
  205. package/web-dist/components/checkbox-group/CheckboxGroup.js +4 -4
  206. package/web-dist/components/chess-board/ChessBoard.js +2 -2
  207. package/web-dist/components/chip/Chip.js +5 -5
  208. package/web-dist/components/chip-group/ChipGroup.js +5 -5
  209. package/web-dist/components/collection-editor/CollectionEditor.js +9 -9
  210. package/web-dist/components/content-rail/ContentRail.js +4 -4
  211. package/web-dist/components/data-table/DataTable.js +14 -14
  212. package/web-dist/components/date-picker/DatePicker.js +5 -5
  213. package/web-dist/components/dialog/Dialog.js +4 -4
  214. package/web-dist/components/divider/Divider.js +2 -2
  215. package/web-dist/components/empty-state/EmptyState.js +10 -10
  216. package/web-dist/components/explorer/Explorer.js +7 -7
  217. package/web-dist/components/field/Field.js +4 -4
  218. package/web-dist/components/file-explorer/FileExplorer.js +7 -7
  219. package/web-dist/components/flat-list/FlatList.js +5 -5
  220. package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +10 -10
  221. package/web-dist/components/form/Form.js +6 -6
  222. package/web-dist/components/form-actions/FormActions.js +6 -6
  223. package/web-dist/components/form-error/FormError.js +6 -6
  224. package/web-dist/components/game/Game.js +3 -3
  225. package/web-dist/components/game-entity/GameEntity.js +3 -3
  226. package/web-dist/components/game-field/GameField.js +3 -3
  227. package/web-dist/components/game-input-zone/GameInputZone.js +3 -3
  228. package/web-dist/components/game-measurement-probe/GameMeasurementProbe.js +3 -3
  229. package/web-dist/components/game-overlay/GameOverlay.js +3 -3
  230. package/web-dist/components/gradient/Gradient.js +3 -3
  231. package/web-dist/components/gradient-renderer-provider/GradientRendererProvider.js +3 -3
  232. package/web-dist/components/graph-view/GraphView.js +2 -2
  233. package/web-dist/components/grid/Grid.js +2 -2
  234. package/web-dist/components/grid-interactions/GridInteractions.d.ts +3 -0
  235. package/web-dist/components/grid-interactions/GridInteractions.js +379 -0
  236. package/web-dist/components/grid-interactions/index.d.ts +1 -0
  237. package/web-dist/components/grid-interactions/index.js +2 -0
  238. package/web-dist/components/grid-line-overlay/GridLineOverlay.js +2 -2
  239. package/web-dist/components/grid-ruler/GridRuler.js +2 -2
  240. package/web-dist/components/grid-view/GridView.js +1 -1
  241. package/web-dist/components/heading/Heading.js +2 -2
  242. package/web-dist/components/hero/Hero.js +9 -9
  243. package/web-dist/components/icon/Icon.js +2 -2
  244. package/web-dist/components/icon-button/IconButton.js +3 -3
  245. package/web-dist/components/image/Image.js +4 -4
  246. package/web-dist/components/keyboard-avoiding-view/KeyboardAvoidingView.js +2 -2
  247. package/web-dist/components/list/List.js +5 -5
  248. package/web-dist/components/list-item/ListItem.js +5 -5
  249. package/web-dist/components/list-section/ListSection.js +5 -5
  250. package/web-dist/components/matrix-grid/MatrixGrid.js +296 -47
  251. package/web-dist/components/media-card/MediaCard.js +9 -9
  252. package/web-dist/components/media-explorer/MediaExplorer.js +7 -7
  253. package/web-dist/components/message-bubble/MessageBubble.js +7 -7
  254. package/web-dist/components/metric-card/MetricCard.js +9 -9
  255. package/web-dist/components/missing-element/MissingElement.js +4 -4
  256. package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +10 -10
  257. package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +10 -10
  258. package/web-dist/components/opening-book/OpeningBook.js +2 -2
  259. package/web-dist/components/otp-form/OtpForm.js +10 -10
  260. package/web-dist/components/pagination/Pagination.js +4 -4
  261. package/web-dist/components/palette-item/PaletteItem.js +9 -9
  262. package/web-dist/components/playing-card/PlayingCard.js +2 -2
  263. package/web-dist/components/poker-training-table/PokerTrainingTable.js +2 -2
  264. package/web-dist/components/popover-menu/PopoverMenu.js +4 -4
  265. package/web-dist/components/post-card/PostCard.js +9 -9
  266. package/web-dist/components/product-card/ProductCard.js +9 -9
  267. package/web-dist/components/progress/Progress.js +4 -4
  268. package/web-dist/components/progress-ring/ProgressRing.js +4 -4
  269. package/web-dist/components/radio/Radio.js +5 -5
  270. package/web-dist/components/radio-group/RadioGroup.js +5 -5
  271. package/web-dist/components/rating/Rating.js +3 -3
  272. package/web-dist/components/reader/Reader.js +10 -10
  273. package/web-dist/components/scan-overlay/ScanOverlay.js +10 -10
  274. package/web-dist/components/screen/Screen.js +2 -2
  275. package/web-dist/components/screen-section/ScreenSection.js +4 -4
  276. package/web-dist/components/scroll-view/ScrollView.js +2 -2
  277. package/web-dist/components/search-input/SearchInput.js +4 -4
  278. package/web-dist/components/section-header/SectionHeader.js +4 -4
  279. package/web-dist/components/section-list/SectionList.js +5 -5
  280. package/web-dist/components/select/Select.js +4 -4
  281. package/web-dist/components/selectable-item/SelectableItem.js +2 -2
  282. package/web-dist/components/selection-provider/SelectionProvider.js +2 -2
  283. package/web-dist/components/sign-in-form/SignInForm.js +10 -10
  284. package/web-dist/components/sign-up-form/SignUpForm.js +10 -10
  285. package/web-dist/components/skeleton/Skeleton.js +12 -12
  286. package/web-dist/components/skeleton-card/SkeletonCard.js +12 -12
  287. package/web-dist/components/skeleton-list/SkeletonList.js +12 -12
  288. package/web-dist/components/skeleton-text/SkeletonText.js +12 -12
  289. package/web-dist/components/spatial-grid/SpatialGrid.js +1 -1
  290. package/web-dist/components/surface/Surface.js +2 -2
  291. package/web-dist/components/switch/Switch.js +1 -1
  292. package/web-dist/components/tab/Tab.js +2 -2
  293. package/web-dist/components/tab-list/TabList.js +2 -2
  294. package/web-dist/components/tab-panel/TabPanel.js +2 -2
  295. package/web-dist/components/tabletop-table/TabletopTable.js +2 -2
  296. package/web-dist/components/tabs/Tabs.js +2 -2
  297. package/web-dist/components/text/Text.js +2 -2
  298. package/web-dist/components/text-input/TextInput.js +4 -4
  299. package/web-dist/components/tile-grid/TileGrid.js +1 -1
  300. package/web-dist/components/time-grid/TimeGrid.js +2 -2
  301. package/web-dist/components/time-picker/TimePicker.js +5 -5
  302. package/web-dist/components/timeline/Timeline.js +4 -4
  303. package/web-dist/components/toast/Toast.js +2 -2
  304. package/web-dist/components/toast-provider/ToastProvider.js +2 -2
  305. package/web-dist/components/toolbar/Toolbar.js +9 -9
  306. package/web-dist/components/tree-item/TreeItem.js +9 -9
  307. package/web-dist/components/tree-view/TreeView.js +1 -1
  308. package/web-dist/components/uploader/Uploader.js +12 -12
  309. package/web-dist/components/view/View.js +2 -2
  310. package/web-dist/manifest.json +787 -772
  311. package/web-dist/runtime/ZoraProvider.js +3 -3
@@ -1,83 +1,11 @@
1
+ import type { Capability } from '@ankhorage/contracts/capability';
1
2
  import { create } from './commands/create';
2
3
  import { sync } from './commands/sync';
3
4
  declare const provider: {
4
5
  id: string;
5
6
  category: string;
6
7
  version: string;
7
- capabilities: readonly [{
8
- readonly id: "zora.create";
9
- readonly owner: "@ankhorage/zora";
10
- readonly access: readonly ["invoke"];
11
- readonly binding: {
12
- readonly kind: "action";
13
- readonly bindableAs: readonly ["target"];
14
- };
15
- readonly label: "Materialize ZORA web component";
16
- readonly description: "Materialize a declared ZORA component and reconcile its web runtime.";
17
- readonly input: {
18
- readonly schema: {
19
- readonly type: "object";
20
- readonly required: readonly ["component", "platform"];
21
- readonly properties: {
22
- readonly component: {
23
- readonly type: "string";
24
- };
25
- readonly platform: {
26
- readonly type: "string";
27
- readonly const: "web";
28
- };
29
- };
30
- readonly additionalProperties: false;
31
- };
32
- };
33
- readonly output: {
34
- readonly schema: {
35
- readonly type: "object";
36
- readonly required: readonly ["exitCode"];
37
- readonly properties: {
38
- readonly exitCode: {
39
- readonly type: "integer";
40
- };
41
- };
42
- readonly additionalProperties: false;
43
- };
44
- };
45
- }, {
46
- readonly id: "zora.sync";
47
- readonly owner: "@ankhorage/zora";
48
- readonly access: readonly ["invoke"];
49
- readonly binding: {
50
- readonly kind: "action";
51
- readonly bindableAs: readonly ["target"];
52
- };
53
- readonly label: "Synchronize ZORA web components";
54
- readonly description: "Reconcile the web runtime from the declared ZORA component set.";
55
- readonly input: {
56
- readonly schema: {
57
- readonly type: "object";
58
- readonly required: readonly ["platform"];
59
- readonly properties: {
60
- readonly platform: {
61
- readonly type: "string";
62
- readonly const: "web";
63
- };
64
- };
65
- readonly additionalProperties: false;
66
- };
67
- };
68
- readonly output: {
69
- readonly schema: {
70
- readonly type: "object";
71
- readonly required: readonly ["exitCode"];
72
- readonly properties: {
73
- readonly exitCode: {
74
- readonly type: "integer";
75
- };
76
- };
77
- readonly additionalProperties: false;
78
- };
79
- };
80
- }];
8
+ capabilities: Capability[];
81
9
  commands: ({
82
10
  readonly path: readonly ["create"];
83
11
  readonly capability: "zora.create";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAavC,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBwB,CAAC;AAEvC,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAGlE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAgBvC,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;CAgBwB,CAAC;AAEvC,eAAe,QAAQ,CAAC"}
package/dist/cli/index.js CHANGED
@@ -14,11 +14,12 @@ const SYNC_COMMAND = {
14
14
  capability: 'zora.sync',
15
15
  summary: 'Regenerate the declared ZORA web materialization.',
16
16
  };
17
+ const COMMAND_CAPABILITIES = CAPABILITIES.filter((capability) => capability.access.includes('invoke'));
17
18
  const provider = {
18
19
  id: '@ankhorage/zora',
19
20
  category: 'zora',
20
21
  version: readPackageVersion(),
21
- capabilities: CAPABILITIES,
22
+ capabilities: COMMAND_CAPABILITIES,
22
23
  commands: [CREATE_COMMAND, SYNC_COMMAND],
23
24
  handlers: [
24
25
  {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAKzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,MAAM,cAAc,GAAG;IACrB,IAAI,EAAE,CAAC,QAAQ,CAAC;IAChB,UAAU,EAAE,aAAwC;IACpD,OAAO,EAAE,+DAA+D;CAChE,CAAC;AACX,MAAM,YAAY,GAAG;IACnB,IAAI,EAAE,CAAC,MAAM,CAAC;IACd,UAAU,EAAE,WAAsC;IAClD,OAAO,EAAE,mDAAmD;CACpD,CAAC;AAEX,MAAM,QAAQ,GAAG;IACf,EAAE,EAAE,iBAAiB;IACrB,QAAQ,EAAE,MAAM;IAChB,OAAO,EAAE,kBAAkB,EAAE;IAC7B,YAAY,EAAE,YAAY;IAC1B,QAAQ,EAAE,CAAC,cAAc,EAAE,YAAY,CAAC;IACxC,QAAQ,EAAE;QACR;YACE,IAAI,EAAE,cAAc,CAAC,IAAI;YACzB,OAAO,EAAE,MAAM;SAChB;QACD;YACE,IAAI,EAAE,YAAY,CAAC,IAAI;YACvB,OAAO,EAAE,IAAI;SACd;KACF;CACmC,CAAC;AAEvC,eAAe,QAAQ,CAAC;AAExB,uEAAuE;AACvE,SAAS,kBAAkB;IACzB,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAC5B,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,oBAAoB,CAAC,EAAE,MAAM,CAAC,CAC3D,CAAC;IAEpC,IAAI,OAAO,WAAW,CAAC,OAAO,KAAK,QAAQ,IAAI,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACjF,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,CAAC;IAED,OAAO,WAAW,CAAC,OAAO,CAAC;AAC7B,CAAC","sourcesContent":["import { readFileSync } from 'node:fs';\nimport { dirname, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport type { AnkhRuntimeCommandProvider } from '@ankhorage/ankh';\nimport type { Capability } from '@ankhorage/contracts/capabilities';\n\nimport { CAPABILITIES } from '../capabilities';\nimport { create } from './commands/create';\nimport { sync } from './commands/sync';\n\nconst CREATE_COMMAND = {\n path: ['create'],\n capability: 'zora.create' satisfies Capability['id'],\n summary: 'Materialize a canonical ZORA component for a target platform.',\n} as const;\nconst SYNC_COMMAND = {\n path: ['sync'],\n capability: 'zora.sync' satisfies Capability['id'],\n summary: 'Regenerate the declared ZORA web materialization.',\n} as const;\n\nconst provider = {\n id: '@ankhorage/zora',\n category: 'zora',\n version: readPackageVersion(),\n capabilities: CAPABILITIES,\n commands: [CREATE_COMMAND, SYNC_COMMAND],\n handlers: [\n {\n path: CREATE_COMMAND.path,\n handler: create,\n },\n {\n path: SYNC_COMMAND.path,\n handler: sync,\n },\n ],\n} satisfies AnkhRuntimeCommandProvider;\n\nexport default provider;\n\n/*** Read the installed ZORA version for the Ankh provider manifest. */\nfunction readPackageVersion(): string {\n const packageJson = JSON.parse(\n readFileSync(resolve(dirname(fileURLToPath(import.meta.url)), '../../package.json'), 'utf8'),\n ) as { readonly version?: unknown };\n\n if (typeof packageJson.version !== 'string' || packageJson.version.trim() === '') {\n throw new Error('ZORA package.json must define a non-empty version.');\n }\n\n return packageJson.version;\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAKzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,MAAM,cAAc,GAAG;IACrB,IAAI,EAAE,CAAC,QAAQ,CAAC;IAChB,UAAU,EAAE,aAAwC;IACpD,OAAO,EAAE,+DAA+D;CAChE,CAAC;AACX,MAAM,YAAY,GAAG;IACnB,IAAI,EAAE,CAAC,MAAM,CAAC;IACd,UAAU,EAAE,WAAsC;IAClD,OAAO,EAAE,mDAAmD;CACpD,CAAC;AACX,MAAM,oBAAoB,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAC9D,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CACrC,CAAC;AAEF,MAAM,QAAQ,GAAG;IACf,EAAE,EAAE,iBAAiB;IACrB,QAAQ,EAAE,MAAM;IAChB,OAAO,EAAE,kBAAkB,EAAE;IAC7B,YAAY,EAAE,oBAAoB;IAClC,QAAQ,EAAE,CAAC,cAAc,EAAE,YAAY,CAAC;IACxC,QAAQ,EAAE;QACR;YACE,IAAI,EAAE,cAAc,CAAC,IAAI;YACzB,OAAO,EAAE,MAAM;SAChB;QACD;YACE,IAAI,EAAE,YAAY,CAAC,IAAI;YACvB,OAAO,EAAE,IAAI;SACd;KACF;CACmC,CAAC;AAEvC,eAAe,QAAQ,CAAC;AAExB,uEAAuE;AACvE,SAAS,kBAAkB;IACzB,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAC5B,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,oBAAoB,CAAC,EAAE,MAAM,CAAC,CAC3D,CAAC;IAEpC,IAAI,OAAO,WAAW,CAAC,OAAO,KAAK,QAAQ,IAAI,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACjF,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,CAAC;IAED,OAAO,WAAW,CAAC,OAAO,CAAC;AAC7B,CAAC","sourcesContent":["import { readFileSync } from 'node:fs';\nimport { dirname, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport type { AnkhRuntimeCommandProvider } from '@ankhorage/ankh';\nimport type { Capability } from '@ankhorage/contracts/capability';\n\nimport { CAPABILITIES } from '../capabilities';\nimport { create } from './commands/create';\nimport { sync } from './commands/sync';\n\nconst CREATE_COMMAND = {\n path: ['create'],\n capability: 'zora.create' satisfies Capability['id'],\n summary: 'Materialize a canonical ZORA component for a target platform.',\n} as const;\nconst SYNC_COMMAND = {\n path: ['sync'],\n capability: 'zora.sync' satisfies Capability['id'],\n summary: 'Regenerate the declared ZORA web materialization.',\n} as const;\nconst COMMAND_CAPABILITIES = CAPABILITIES.filter((capability) =>\n capability.access.includes('invoke'),\n);\n\nconst provider = {\n id: '@ankhorage/zora',\n category: 'zora',\n version: readPackageVersion(),\n capabilities: COMMAND_CAPABILITIES,\n commands: [CREATE_COMMAND, SYNC_COMMAND],\n handlers: [\n {\n path: CREATE_COMMAND.path,\n handler: create,\n },\n {\n path: SYNC_COMMAND.path,\n handler: sync,\n },\n ],\n} satisfies AnkhRuntimeCommandProvider;\n\nexport default provider;\n\n/*** Read the installed ZORA version for the Ankh provider manifest. */\nfunction readPackageVersion(): string {\n const packageJson = JSON.parse(\n readFileSync(resolve(dirname(fileURLToPath(import.meta.url)), '../../package.json'), 'utf8'),\n ) as { readonly version?: unknown };\n\n if (typeof packageJson.version !== 'string' || packageJson.version.trim() === '') {\n throw new Error('ZORA package.json must define a non-empty version.');\n }\n\n return packageJson.version;\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { GridInteractionsProps } from '../../../../types/grid-interactions';
3
+ /*** Adapts native responder and keyboard events to the controlled grid interaction boundary. */
4
+ export declare function GridInteractions({ children, interactionPolicy, resizeHandle, testID, ...props }: GridInteractionsProps): React.JSX.Element;
5
+ //# sourceMappingURL=GridInteractions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridInteractions.d.ts","sourceRoot":"","sources":["../../../../../src/features/grid-interactions/adapters/inbound/GridInteractions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAEV,qBAAqB,EACtB,MAAM,qCAAqC,CAAC;AAM7C,gGAAgG;AAChG,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,iBAAiB,EACjB,YAAY,EACZ,MAAM,EACN,GAAG,KAAK,EACT,EAAE,qBAAqB,qBA2DvB"}
@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ import { View } from 'react-native';
3
+ import { createGridInteractionsController } from '../../application/createGridInteractionsController';
4
+ import { createGridInteractionsPointerQueue } from './createGridInteractionsPointerQueue';
5
+ import { GridInteractionsKeyboardProxy } from './GridInteractionsKeyboardProxy';
6
+ import { resolveGridInteractionPointer } from './resolveGridInteractionPointer';
7
+ /*** Adapts native responder and keyboard events to the controlled grid interaction boundary. */
8
+ export function GridInteractions({ children, interactionPolicy, resizeHandle, testID, ...props }) {
9
+ const controllerProps = React.useMemo(() => ({ ...props, interactionPolicy }), [interactionPolicy, props]);
10
+ const [controller] = React.useState(() => createGridInteractionsController(controllerProps));
11
+ const surfaceRef = React.useRef(null);
12
+ const [pointerQueue] = React.useState(() => createGridInteractionsPointerQueue());
13
+ React.useLayoutEffect(() => controller.update(controllerProps), [controller, controllerProps]);
14
+ React.useLayoutEffect(() => {
15
+ pointerQueue.activate();
16
+ return () => {
17
+ pointerQueue.dispose();
18
+ controller.cancel();
19
+ };
20
+ }, [controller, pointerQueue]);
21
+ const withPointer = (event, handlePointer) => {
22
+ const surface = surfaceRef.current;
23
+ if (!surface)
24
+ return;
25
+ const eventSnapshot = { nativeEvent: { ...event.nativeEvent } };
26
+ pointerQueue.enqueue(surface, (origin) => handlePointer(resolveGridInteractionPointer(eventSnapshot, origin)));
27
+ };
28
+ const enabled = interactionPolicy !== 'passive';
29
+ return (<View accessible accessibilityLabel="Grid interaction surface" accessibilityRole="adjustable" ref={surfaceRef} testID={testID} onResponderGrant={(event) => withPointer(event, (pointer) => controller.begin(pointer, resizeHandle))} onResponderMove={(event) => withPointer(event, controller.move)} onResponderRelease={(event) => withPointer(event, controller.end)} onResponderTerminate={() => {
30
+ pointerQueue.cancel();
31
+ controller.cancel();
32
+ }} onStartShouldSetResponder={() => enabled}>
33
+ <GridInteractionsKeyboardProxy enabled={enabled} onKeyDown={(key, keyPointer) => {
34
+ return controller.keyDown(key, keyPointer);
35
+ }}>
36
+ {children}
37
+ </GridInteractionsKeyboardProxy>
38
+ </View>);
39
+ }
40
+ //# sourceMappingURL=GridInteractions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridInteractions.js","sourceRoot":"","sources":["../../../../../src/features/grid-interactions/adapters/inbound/GridInteractions.tsx"],"names":[],"mappings":"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","sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport type {\n GridInteractionsController,\n GridInteractionsProps,\n} from '../../../../types/grid-interactions';\nimport { createGridInteractionsController } from '../../application/createGridInteractionsController';\nimport { createGridInteractionsPointerQueue } from './createGridInteractionsPointerQueue';\nimport { GridInteractionsKeyboardProxy } from './GridInteractionsKeyboardProxy';\nimport { resolveGridInteractionPointer } from './resolveGridInteractionPointer';\n\n/*** Adapts native responder and keyboard events to the controlled grid interaction boundary. */\nexport function GridInteractions({\n children,\n interactionPolicy,\n resizeHandle,\n testID,\n ...props\n}: GridInteractionsProps) {\n const controllerProps = React.useMemo(\n () => ({ ...props, interactionPolicy }),\n [interactionPolicy, props],\n );\n const [controller] = React.useState<GridInteractionsController>(() =>\n createGridInteractionsController(controllerProps),\n );\n const surfaceRef = React.useRef<View>(null);\n const [pointerQueue] = React.useState(() => createGridInteractionsPointerQueue());\n React.useLayoutEffect(() => controller.update(controllerProps), [controller, controllerProps]);\n React.useLayoutEffect(() => {\n pointerQueue.activate();\n return () => {\n pointerQueue.dispose();\n controller.cancel();\n };\n }, [controller, pointerQueue]);\n const withPointer = (\n event: Parameters<typeof resolveGridInteractionPointer>[0],\n handlePointer: (pointer: ReturnType<typeof resolveGridInteractionPointer>) => void,\n ) => {\n const surface = surfaceRef.current;\n if (!surface) return;\n const eventSnapshot = { nativeEvent: { ...event.nativeEvent } };\n pointerQueue.enqueue(surface, (origin) =>\n handlePointer(resolveGridInteractionPointer(eventSnapshot, origin)),\n );\n };\n const enabled = interactionPolicy !== 'passive';\n\n return (\n <View\n accessible\n accessibilityLabel=\"Grid interaction surface\"\n accessibilityRole=\"adjustable\"\n ref={surfaceRef}\n testID={testID}\n onResponderGrant={(event) =>\n withPointer(event, (pointer) => controller.begin(pointer, resizeHandle))\n }\n onResponderMove={(event) => withPointer(event, controller.move)}\n onResponderRelease={(event) => withPointer(event, controller.end)}\n onResponderTerminate={() => {\n pointerQueue.cancel();\n controller.cancel();\n }}\n onStartShouldSetResponder={() => enabled}\n >\n <GridInteractionsKeyboardProxy\n enabled={enabled}\n onKeyDown={(key, keyPointer) => {\n return controller.keyDown(key, keyPointer);\n }}\n >\n {children}\n </GridInteractionsKeyboardProxy>\n </View>\n );\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export { GridInteractionsKeyboardProxy } from './GridInteractionsKeyboardProxy.native';
2
+ //# sourceMappingURL=GridInteractionsKeyboardProxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridInteractionsKeyboardProxy.d.ts","sourceRoot":"","sources":["../../../../../src/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { GridInteractionsKeyboardProxy } from './GridInteractionsKeyboardProxy.native';
2
+ //# sourceMappingURL=GridInteractionsKeyboardProxy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridInteractionsKeyboardProxy.js","sourceRoot":"","sources":["../../../../../src/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC","sourcesContent":["export { GridInteractionsKeyboardProxy } from './GridInteractionsKeyboardProxy.native';\n"]}
@@ -0,0 +1,11 @@
1
+ import type React from 'react';
2
+ import type { GridInteractionPointer } from '../../../../types/grid-interactions';
3
+ /*** Leaves native accessibility focus untouched where browser keyboard events are unavailable. */
4
+ export declare function GridInteractionsKeyboardProxy({ children }: GridInteractionsKeyboardProxyProps): React.JSX.Element;
5
+ interface GridInteractionsKeyboardProxyProps {
6
+ readonly children: React.ReactNode;
7
+ readonly enabled: boolean;
8
+ readonly onKeyDown: (key: string, pointer: GridInteractionPointer) => boolean;
9
+ }
10
+ export {};
11
+ //# sourceMappingURL=GridInteractionsKeyboardProxy.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridInteractionsKeyboardProxy.native.d.ts","sourceRoot":"","sources":["../../../../../src/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAElF,kGAAkG;AAClG,wBAAgB,6BAA6B,CAAC,EAAE,QAAQ,EAAE,EAAE,kCAAkC,qBAE7F;AAED,UAAU,kCAAkC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,sBAAsB,KAAK,OAAO,CAAC;CAC/E"}
@@ -0,0 +1,5 @@
1
+ /*** Leaves native accessibility focus untouched where browser keyboard events are unavailable. */
2
+ export function GridInteractionsKeyboardProxy({ children }) {
3
+ return <>{children}</>;
4
+ }
5
+ //# sourceMappingURL=GridInteractionsKeyboardProxy.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridInteractionsKeyboardProxy.native.js","sourceRoot":"","sources":["../../../../../src/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.native.tsx"],"names":[],"mappings":"AAIA,kGAAkG;AAClG,MAAM,UAAU,6BAA6B,CAAC,EAAE,QAAQ,EAAsC;IAC5F,OAAO,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC;AACzB,CAAC","sourcesContent":["import type React from 'react';\n\nimport type { GridInteractionPointer } from '../../../../types/grid-interactions';\n\n/*** Leaves native accessibility focus untouched where browser keyboard events are unavailable. */\nexport function GridInteractionsKeyboardProxy({ children }: GridInteractionsKeyboardProxyProps) {\n return <>{children}</>;\n}\n\ninterface GridInteractionsKeyboardProxyProps {\n readonly children: React.ReactNode;\n readonly enabled: boolean;\n readonly onKeyDown: (key: string, pointer: GridInteractionPointer) => boolean;\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import type React from 'react';
2
+ import type { GridInteractionPointer } from '../../../../types/grid-interactions';
3
+ /*** Adapts web keyboard movement and resize commands without changing native responder behavior. */
4
+ export declare function GridInteractionsKeyboardProxy({ children, enabled, onKeyDown, }: GridInteractionsKeyboardProxyProps): React.JSX.Element;
5
+ interface GridInteractionsKeyboardProxyProps {
6
+ readonly children: React.ReactNode;
7
+ readonly enabled: boolean;
8
+ readonly onKeyDown: (key: string, pointer: GridInteractionPointer) => boolean;
9
+ }
10
+ export {};
11
+ //# sourceMappingURL=GridInteractionsKeyboardProxy.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridInteractionsKeyboardProxy.web.d.ts","sourceRoot":"","sources":["../../../../../src/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAElF,oGAAoG;AACpG,wBAAgB,6BAA6B,CAAC,EAC5C,QAAQ,EACR,OAAO,EACP,SAAS,GACV,EAAE,kCAAkC,qBAyBpC;AAED,UAAU,kCAAkC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,sBAAsB,KAAK,OAAO,CAAC;CAC/E"}
@@ -0,0 +1,20 @@
1
+ /*** Adapts web keyboard movement and resize commands without changing native responder behavior. */
2
+ export function GridInteractionsKeyboardProxy({ children, enabled, onKeyDown, }) {
3
+ return (<div aria-label="Grid interaction keyboard controls" onKeyDown={(event) => {
4
+ if (!enabled)
5
+ return;
6
+ if (onKeyDown(event.key, {
7
+ altKey: event.altKey,
8
+ ctrlKey: event.ctrlKey,
9
+ metaKey: event.metaKey,
10
+ shiftKey: event.shiftKey,
11
+ x: 0,
12
+ y: 0,
13
+ })) {
14
+ event.preventDefault();
15
+ }
16
+ }} style={{ display: 'contents' }} tabIndex={enabled ? 0 : -1}>
17
+ {children}
18
+ </div>);
19
+ }
20
+ //# sourceMappingURL=GridInteractionsKeyboardProxy.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridInteractionsKeyboardProxy.web.js","sourceRoot":"","sources":["../../../../../src/features/grid-interactions/adapters/inbound/GridInteractionsKeyboardProxy.web.tsx"],"names":[],"mappings":"AAIA,oGAAoG;AACpG,MAAM,UAAU,6BAA6B,CAAC,EAC5C,QAAQ,EACR,OAAO,EACP,SAAS,GAC0B;IACnC,OAAO,CACL,CAAC,GAAG,CACF,UAAU,CAAC,oCAAoC,CAC/C,SAAS,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE;YACnB,IAAI,CAAC,OAAO;gBAAE,OAAO;YACrB,IACE,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE;gBACnB,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,CAAC,EAAE,CAAC;gBACJ,CAAC,EAAE,CAAC;aACL,CAAC,EACF,CAAC;gBACD,KAAK,CAAC,cAAc,EAAE,CAAC;YACzB,CAAC;QACH,CAAC,CAAC,CACF,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAC/B,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAE3B;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC","sourcesContent":["import type React from 'react';\n\nimport type { GridInteractionPointer } from '../../../../types/grid-interactions';\n\n/*** Adapts web keyboard movement and resize commands without changing native responder behavior. */\nexport function GridInteractionsKeyboardProxy({\n children,\n enabled,\n onKeyDown,\n}: GridInteractionsKeyboardProxyProps) {\n return (\n <div\n aria-label=\"Grid interaction keyboard controls\"\n onKeyDown={(event) => {\n if (!enabled) return;\n if (\n onKeyDown(event.key, {\n altKey: event.altKey,\n ctrlKey: event.ctrlKey,\n metaKey: event.metaKey,\n shiftKey: event.shiftKey,\n x: 0,\n y: 0,\n })\n ) {\n event.preventDefault();\n }\n }}\n style={{ display: 'contents' }}\n tabIndex={enabled ? 0 : -1}\n >\n {children}\n </div>\n );\n}\n\ninterface GridInteractionsKeyboardProxyProps {\n readonly children: React.ReactNode;\n readonly enabled: boolean;\n readonly onKeyDown: (key: string, pointer: GridInteractionPointer) => boolean;\n}\n"]}
@@ -0,0 +1,17 @@
1
+ /*** Serializes native responder measurements and invalidates work from canceled interaction lifecycles. */
2
+ export declare function createGridInteractionsPointerQueue(): {
3
+ activate: () => void;
4
+ enqueue: (surface: GridInteractionSurface, handleOrigin: (origin: GridInteractionSurfaceOrigin) => void) => void;
5
+ cancel: () => void;
6
+ dispose: () => void;
7
+ };
8
+ interface GridInteractionSurface {
9
+ readonly getBoundingClientRect?: () => Pick<DOMRect, 'left' | 'top'>;
10
+ readonly measureInWindow?: (callback: (x: number, y: number) => void) => void;
11
+ }
12
+ interface GridInteractionSurfaceOrigin {
13
+ readonly x: number;
14
+ readonly y: number;
15
+ }
16
+ export {};
17
+ //# sourceMappingURL=createGridInteractionsPointerQueue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createGridInteractionsPointerQueue.d.ts","sourceRoot":"","sources":["../../../../../src/features/grid-interactions/adapters/inbound/createGridInteractionsPointerQueue.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAC3G,wBAAgB,kCAAkC;;uBAsCnC,sBAAsB,gBACjB,CAAC,MAAM,EAAE,4BAA4B,KAAK,IAAI;;;EAoBjE;AAQD,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC;IACrE,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,KAAK,IAAI,CAAC;CAC/E;AAED,UAAU,4BAA4B;IACpC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,76 @@
1
+ /*** Serializes native responder measurements and invalidates work from canceled interaction lifecycles. */
2
+ export function createGridInteractionsPointerQueue() {
3
+ let active = true;
4
+ let generation = 0;
5
+ let measuring = false;
6
+ let measurementId = 0;
7
+ let activeMeasurementId;
8
+ let pending = [];
9
+ const processNext = () => {
10
+ if (measuring)
11
+ return;
12
+ const pointerWork = pending.at(0);
13
+ if (pointerWork === undefined)
14
+ return;
15
+ pending = pending.slice(1);
16
+ measuring = true;
17
+ const currentMeasurementId = ++measurementId;
18
+ activeMeasurementId = currentMeasurementId;
19
+ let settled = false;
20
+ measureSurfaceOrigin(pointerWork.surface, (origin) => {
21
+ if (settled)
22
+ return;
23
+ settled = true;
24
+ if (activeMeasurementId !== currentMeasurementId)
25
+ return;
26
+ try {
27
+ if (active && pointerWork.generation === generation) {
28
+ pointerWork.handleOrigin(origin);
29
+ }
30
+ }
31
+ finally {
32
+ activeMeasurementId = undefined;
33
+ measuring = false;
34
+ processNext();
35
+ }
36
+ });
37
+ };
38
+ return {
39
+ activate: () => {
40
+ active = true;
41
+ },
42
+ enqueue: (surface, handleOrigin) => {
43
+ if (!active)
44
+ return;
45
+ pending = [...pending, { generation, handleOrigin, surface }];
46
+ processNext();
47
+ },
48
+ cancel: () => {
49
+ generation += 1;
50
+ pending = [];
51
+ activeMeasurementId = undefined;
52
+ measuring = false;
53
+ },
54
+ dispose: () => {
55
+ active = false;
56
+ generation += 1;
57
+ pending = [];
58
+ activeMeasurementId = undefined;
59
+ measuring = false;
60
+ },
61
+ };
62
+ }
63
+ /*** Resolves the current surface origin through RNW DOM geometry or native asynchronous measurement. */
64
+ function measureSurfaceOrigin(surface, onOrigin) {
65
+ const rect = surface.getBoundingClientRect?.();
66
+ if (rect) {
67
+ onOrigin({ x: rect.left, y: rect.top });
68
+ return;
69
+ }
70
+ if (surface.measureInWindow !== undefined) {
71
+ surface.measureInWindow((x, y) => onOrigin({ x, y }));
72
+ return;
73
+ }
74
+ onOrigin({ x: 0, y: 0 });
75
+ }
76
+ //# sourceMappingURL=createGridInteractionsPointerQueue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createGridInteractionsPointerQueue.js","sourceRoot":"","sources":["../../../../../src/features/grid-interactions/adapters/inbound/createGridInteractionsPointerQueue.ts"],"names":[],"mappings":"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","sourcesContent":["/*** Serializes native responder measurements and invalidates work from canceled interaction lifecycles. */\nexport function createGridInteractionsPointerQueue() {\n let active = true;\n let generation = 0;\n let measuring = false;\n let measurementId = 0;\n let activeMeasurementId: number | undefined;\n let pending: readonly GridInteractionPointerWork[] = [];\n\n const processNext = () => {\n if (measuring) return;\n const pointerWork = pending.at(0);\n if (pointerWork === undefined) return;\n pending = pending.slice(1);\n measuring = true;\n const currentMeasurementId = ++measurementId;\n activeMeasurementId = currentMeasurementId;\n let settled = false;\n measureSurfaceOrigin(pointerWork.surface, (origin) => {\n if (settled) return;\n settled = true;\n if (activeMeasurementId !== currentMeasurementId) return;\n try {\n if (active && pointerWork.generation === generation) {\n pointerWork.handleOrigin(origin);\n }\n } finally {\n activeMeasurementId = undefined;\n measuring = false;\n processNext();\n }\n });\n };\n\n return {\n activate: () => {\n active = true;\n },\n enqueue: (\n surface: GridInteractionSurface,\n handleOrigin: (origin: GridInteractionSurfaceOrigin) => void,\n ) => {\n if (!active) return;\n pending = [...pending, { generation, handleOrigin, surface }];\n processNext();\n },\n cancel: () => {\n generation += 1;\n pending = [];\n activeMeasurementId = undefined;\n measuring = false;\n },\n dispose: () => {\n active = false;\n generation += 1;\n pending = [];\n activeMeasurementId = undefined;\n measuring = false;\n },\n };\n}\n\ninterface GridInteractionPointerWork {\n readonly generation: number;\n readonly handleOrigin: (origin: GridInteractionSurfaceOrigin) => void;\n readonly surface: GridInteractionSurface;\n}\n\ninterface GridInteractionSurface {\n readonly getBoundingClientRect?: () => Pick<DOMRect, 'left' | 'top'>;\n readonly measureInWindow?: (callback: (x: number, y: number) => void) => void;\n}\n\ninterface GridInteractionSurfaceOrigin {\n readonly x: number;\n readonly y: number;\n}\n\n/*** Resolves the current surface origin through RNW DOM geometry or native asynchronous measurement. */\nfunction measureSurfaceOrigin(\n surface: GridInteractionSurface,\n onOrigin: (origin: GridInteractionSurfaceOrigin) => void,\n) {\n const rect = surface.getBoundingClientRect?.();\n if (rect) {\n onOrigin({ x: rect.left, y: rect.top });\n return;\n }\n if (surface.measureInWindow !== undefined) {\n surface.measureInWindow((x, y) => onOrigin({ x, y }));\n return;\n }\n onOrigin({ x: 0, y: 0 });\n}\n"]}
@@ -0,0 +1,21 @@
1
+ import type { GridInteractionPointer } from '../../../../types/grid-interactions';
2
+ /*** Converts a responder event into coordinates local to the interaction surface. */
3
+ export declare function resolveGridInteractionPointer(event: GridInteractionNativePointerEvent, surfaceOrigin: GridInteractionSurfaceOrigin): GridInteractionPointer;
4
+ interface GridInteractionNativePointerEvent {
5
+ readonly nativeEvent: {
6
+ readonly altKey?: boolean;
7
+ readonly ctrlKey?: boolean;
8
+ readonly locationX: number;
9
+ readonly locationY: number;
10
+ readonly metaKey?: boolean;
11
+ readonly pageX?: number;
12
+ readonly pageY?: number;
13
+ readonly shiftKey?: boolean;
14
+ };
15
+ }
16
+ interface GridInteractionSurfaceOrigin {
17
+ readonly x: number;
18
+ readonly y: number;
19
+ }
20
+ export {};
21
+ //# sourceMappingURL=resolveGridInteractionPointer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveGridInteractionPointer.d.ts","sourceRoot":"","sources":["../../../../../src/features/grid-interactions/adapters/inbound/resolveGridInteractionPointer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAElF,qFAAqF;AACrF,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,iCAAiC,EACxC,aAAa,EAAE,4BAA4B,GAC1C,sBAAsB,CAoBxB;AAED,UAAU,iCAAiC;IACzC,QAAQ,CAAC,WAAW,EAAE;QACpB,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;QAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;QAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;QAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;KAC7B,CAAC;CACH;AAED,UAAU,4BAA4B;IACpC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,20 @@
1
+ /*** Converts a responder event into coordinates local to the interaction surface. */
2
+ export function resolveGridInteractionPointer(event, surfaceOrigin) {
3
+ const { nativeEvent } = event;
4
+ const { pageX, pageY } = nativeEvent;
5
+ const x = typeof pageX === 'number' && Number.isFinite(pageX)
6
+ ? pageX - surfaceOrigin.x
7
+ : nativeEvent.locationX;
8
+ const y = typeof pageY === 'number' && Number.isFinite(pageY)
9
+ ? pageY - surfaceOrigin.y
10
+ : nativeEvent.locationY;
11
+ return {
12
+ altKey: nativeEvent.altKey,
13
+ ctrlKey: nativeEvent.ctrlKey,
14
+ metaKey: nativeEvent.metaKey,
15
+ shiftKey: nativeEvent.shiftKey,
16
+ x,
17
+ y,
18
+ };
19
+ }
20
+ //# sourceMappingURL=resolveGridInteractionPointer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveGridInteractionPointer.js","sourceRoot":"","sources":["../../../../../src/features/grid-interactions/adapters/inbound/resolveGridInteractionPointer.ts"],"names":[],"mappings":"AAEA,qFAAqF;AACrF,MAAM,UAAU,6BAA6B,CAC3C,KAAwC,EACxC,aAA2C;IAE3C,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAC9B,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,WAAW,CAAC;IACrC,MAAM,CAAC,GACL,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QACjD,CAAC,CAAC,KAAK,GAAG,aAAa,CAAC,CAAC;QACzB,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC;IAC5B,MAAM,CAAC,GACL,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QACjD,CAAC,CAAC,KAAK,GAAG,aAAa,CAAC,CAAC;QACzB,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC;IAE5B,OAAO;QACL,MAAM,EAAE,WAAW,CAAC,MAAM;QAC1B,OAAO,EAAE,WAAW,CAAC,OAAO;QAC5B,OAAO,EAAE,WAAW,CAAC,OAAO;QAC5B,QAAQ,EAAE,WAAW,CAAC,QAAQ;QAC9B,CAAC;QACD,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { GridInteractionPointer } from '../../../../types/grid-interactions';\n\n/*** Converts a responder event into coordinates local to the interaction surface. */\nexport function resolveGridInteractionPointer(\n event: GridInteractionNativePointerEvent,\n surfaceOrigin: GridInteractionSurfaceOrigin,\n): GridInteractionPointer {\n const { nativeEvent } = event;\n const { pageX, pageY } = nativeEvent;\n const x =\n typeof pageX === 'number' && Number.isFinite(pageX)\n ? pageX - surfaceOrigin.x\n : nativeEvent.locationX;\n const y =\n typeof pageY === 'number' && Number.isFinite(pageY)\n ? pageY - surfaceOrigin.y\n : nativeEvent.locationY;\n\n return {\n altKey: nativeEvent.altKey,\n ctrlKey: nativeEvent.ctrlKey,\n metaKey: nativeEvent.metaKey,\n shiftKey: nativeEvent.shiftKey,\n x,\n y,\n };\n}\n\ninterface GridInteractionNativePointerEvent {\n readonly nativeEvent: {\n readonly altKey?: boolean;\n readonly ctrlKey?: boolean;\n readonly locationX: number;\n readonly locationY: number;\n readonly metaKey?: boolean;\n readonly pageX?: number;\n readonly pageY?: number;\n readonly shiftKey?: boolean;\n };\n}\n\ninterface GridInteractionSurfaceOrigin {\n readonly x: number;\n readonly y: number;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { GridInteractionsController, GridInteractionsControllerProps } from '../../../types/grid-interactions';
2
+ /*** Create a platform-neutral controlled interaction controller using grid-view geometry only. */
3
+ export declare function createGridInteractionsController(props: GridInteractionsControllerProps): GridInteractionsController;
4
+ //# sourceMappingURL=createGridInteractionsController.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createGridInteractionsController.d.ts","sourceRoot":"","sources":["../../../../src/features/grid-interactions/application/createGridInteractionsController.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAIV,0BAA0B,EAC1B,+BAA+B,EAChC,MAAM,kCAAkC,CAAC;AAqB1C,kGAAkG;AAClG,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,+BAA+B,GACrC,0BAA0B,CAoF5B"}