@astryxdesign/core 0.7.6-canary.ec128c4 → 0.7.6-canary.f73623d

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 (454) hide show
  1. package/dist/AppShell/AppShell.d.ts.map +1 -1
  2. package/dist/AppShell/AppShell.js +183 -5
  3. package/dist/AppShell/observeMainOverflow.d.ts +9 -0
  4. package/dist/AppShell/observeMainOverflow.d.ts.map +1 -0
  5. package/dist/AppShell/observeMainOverflow.js +125 -0
  6. package/dist/Carousel/Carousel.d.ts +3 -1
  7. package/dist/Carousel/Carousel.d.ts.map +1 -1
  8. package/dist/Carousel/Carousel.js +12 -3
  9. package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
  10. package/dist/ComplexSelector/ComplexSelector.js +41 -4
  11. package/dist/DateInput/Wheel.d.ts.map +1 -1
  12. package/dist/DateInput/Wheel.js +11 -7
  13. package/dist/DateInput/usePointerDragScroll.d.ts +10 -1
  14. package/dist/DateInput/usePointerDragScroll.d.ts.map +1 -1
  15. package/dist/DateInput/usePointerDragScroll.js +25 -9
  16. package/dist/DateInput/useScrollSettle.d.ts +3 -1
  17. package/dist/DateInput/useScrollSettle.d.ts.map +1 -1
  18. package/dist/DateInput/useScrollSettle.js +37 -8
  19. package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  20. package/dist/DropdownMenu/DropdownMenu.js +28 -19
  21. package/dist/Item/Item.d.ts.map +1 -1
  22. package/dist/Item/Item.js +19 -6
  23. package/dist/Layer/useLayer.d.ts.map +1 -1
  24. package/dist/Layer/useLayer.js +27 -6
  25. package/dist/Link/Link.d.ts.map +1 -1
  26. package/dist/Link/Link.js +8 -3
  27. package/dist/Markdown/plugins/headingLinks.a11y.chromium.spec.js +1 -1
  28. package/dist/NavMenu/NavHeadingMenuItem.d.ts.map +1 -1
  29. package/dist/NavMenu/NavHeadingMenuItem.js +5 -29
  30. package/dist/NumberInput/NumberInput.d.ts.map +1 -1
  31. package/dist/NumberInput/NumberInput.js +23 -2
  32. package/dist/Outline/Outline.d.ts.map +1 -1
  33. package/dist/Outline/Outline.js +27 -0
  34. package/dist/Popover/Popover.d.ts.map +1 -1
  35. package/dist/Popover/Popover.js +32 -12
  36. package/dist/Popover/usePopover.d.ts.map +1 -1
  37. package/dist/Popover/usePopover.js +10 -3
  38. package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
  39. package/dist/PowerSearch/PowerSearch.js +37 -30
  40. package/dist/RadioList/RadioListItem.d.ts.map +1 -1
  41. package/dist/RadioList/RadioListItem.js +11 -3
  42. package/dist/SideNav/SideNavItem.d.ts +2 -2
  43. package/dist/SideNav/SideNavItem.d.ts.map +1 -1
  44. package/dist/SideNav/SideNavItem.js +18 -7
  45. package/dist/Skeleton/Skeleton.d.ts.map +1 -1
  46. package/dist/Skeleton/Skeleton.js +1 -1
  47. package/dist/Spinner/Spinner.d.ts.map +1 -1
  48. package/dist/Spinner/Spinner.js +1 -1
  49. package/dist/Stepper/Step.d.ts.map +1 -1
  50. package/dist/Stepper/Step.js +26 -6
  51. package/dist/Switch/Switch.d.ts.map +1 -1
  52. package/dist/Switch/Switch.js +10 -3
  53. package/dist/Table/Table.d.ts.map +1 -1
  54. package/dist/Table/Table.js +36 -10
  55. package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
  56. package/dist/Table/plugins/sortable/useTableSortable.js +46 -58
  57. package/dist/Toast/ToastViewport.d.ts.map +1 -1
  58. package/dist/Toast/ToastViewport.js +19 -3
  59. package/dist/ToggleButton/ToggleButtonGroup.d.ts +7 -1
  60. package/dist/ToggleButton/ToggleButtonGroup.d.ts.map +1 -1
  61. package/dist/ToggleButton/ToggleButtonGroup.js +16 -2
  62. package/dist/Token/Token.d.ts.map +1 -1
  63. package/dist/Token/Token.js +37 -5
  64. package/dist/Token/TokenLink.d.ts.map +1 -1
  65. package/dist/Token/TokenLink.js +14 -2
  66. package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
  67. package/dist/Tokenizer/Tokenizer.js +15 -4
  68. package/dist/Tokenizer/TokenizerClearAllMessageContext.d.ts +2 -0
  69. package/dist/Tokenizer/TokenizerClearAllMessageContext.d.ts.map +1 -0
  70. package/dist/Tokenizer/TokenizerClearAllMessageContext.js +17 -0
  71. package/dist/TreeList/TreeListItem.d.ts.map +1 -1
  72. package/dist/TreeList/TreeListItem.js +27 -4
  73. package/dist/Typeahead/BaseTypeahead.d.ts +4 -4
  74. package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
  75. package/dist/Typeahead/BaseTypeahead.js +43 -7
  76. package/dist/astryx.css +10 -3
  77. package/dist/gestures/GestureArena.d.ts +26 -1
  78. package/dist/gestures/GestureArena.d.ts.map +1 -1
  79. package/dist/gestures/GestureArena.js +71 -9
  80. package/dist/gestures/GestureHost.d.ts +2 -3
  81. package/dist/gestures/GestureHost.d.ts.map +1 -1
  82. package/dist/gestures/GestureHost.js +7 -7
  83. package/dist/gestures/GestureRecognizer.d.ts +3 -1
  84. package/dist/gestures/GestureRecognizer.d.ts.map +1 -1
  85. package/dist/gestures/GestureRecognizer.js +3 -1
  86. package/dist/gestures/PressTracker.d.ts +112 -0
  87. package/dist/gestures/PressTracker.d.ts.map +1 -0
  88. package/dist/gestures/PressTracker.js +267 -0
  89. package/dist/gestures/index.d.ts +37 -0
  90. package/dist/gestures/index.d.ts.map +1 -0
  91. package/dist/gestures/index.js +25 -0
  92. package/dist/gestures/useGestureRecognizer.d.ts +56 -0
  93. package/dist/gestures/useGestureRecognizer.d.ts.map +1 -0
  94. package/dist/gestures/useGestureRecognizer.js +226 -0
  95. package/dist/hooks/scrollKeyboardDelegation.d.ts.map +1 -1
  96. package/dist/hooks/scrollKeyboardDelegation.js +7 -3
  97. package/dist/hooks/useScrollOverflow.d.ts +2 -1
  98. package/dist/hooks/useScrollOverflow.d.ts.map +1 -1
  99. package/dist/hooks/useScrollOverflow.js +56 -10
  100. package/dist/i18n/generated-locales/af-ZA.generated.d.ts.map +1 -1
  101. package/dist/i18n/generated-locales/af-ZA.generated.js +0 -5
  102. package/dist/i18n/generated-locales/ar-SA.generated.d.ts.map +1 -1
  103. package/dist/i18n/generated-locales/ar-SA.generated.js +0 -5
  104. package/dist/i18n/generated-locales/ca-ES.generated.d.ts.map +1 -1
  105. package/dist/i18n/generated-locales/ca-ES.generated.js +0 -5
  106. package/dist/i18n/generated-locales/cs-CZ.generated.d.ts.map +1 -1
  107. package/dist/i18n/generated-locales/cs-CZ.generated.js +0 -5
  108. package/dist/i18n/generated-locales/da-DK.generated.d.ts.map +1 -1
  109. package/dist/i18n/generated-locales/da-DK.generated.js +0 -5
  110. package/dist/i18n/generated-locales/de-DE.generated.d.ts.map +1 -1
  111. package/dist/i18n/generated-locales/de-DE.generated.js +0 -5
  112. package/dist/i18n/generated-locales/el-GR.generated.d.ts.map +1 -1
  113. package/dist/i18n/generated-locales/el-GR.generated.js +0 -5
  114. package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
  115. package/dist/i18n/generated-locales/en.generated.js +3 -5
  116. package/dist/i18n/generated-locales/es-ES.generated.d.ts.map +1 -1
  117. package/dist/i18n/generated-locales/es-ES.generated.js +0 -5
  118. package/dist/i18n/generated-locales/fi-FI.generated.d.ts.map +1 -1
  119. package/dist/i18n/generated-locales/fi-FI.generated.js +0 -5
  120. package/dist/i18n/generated-locales/fr-FR.generated.d.ts.map +1 -1
  121. package/dist/i18n/generated-locales/fr-FR.generated.js +0 -5
  122. package/dist/i18n/generated-locales/he-IL.generated.d.ts.map +1 -1
  123. package/dist/i18n/generated-locales/he-IL.generated.js +0 -5
  124. package/dist/i18n/generated-locales/hu-HU.generated.d.ts.map +1 -1
  125. package/dist/i18n/generated-locales/hu-HU.generated.js +0 -5
  126. package/dist/i18n/generated-locales/it-IT.generated.d.ts.map +1 -1
  127. package/dist/i18n/generated-locales/it-IT.generated.js +0 -5
  128. package/dist/i18n/generated-locales/ja-JP.generated.d.ts.map +1 -1
  129. package/dist/i18n/generated-locales/ja-JP.generated.js +0 -5
  130. package/dist/i18n/generated-locales/ko-KR.generated.d.ts.map +1 -1
  131. package/dist/i18n/generated-locales/ko-KR.generated.js +0 -5
  132. package/dist/i18n/generated-locales/nl-NL.generated.d.ts.map +1 -1
  133. package/dist/i18n/generated-locales/nl-NL.generated.js +0 -5
  134. package/dist/i18n/generated-locales/no-NO.generated.d.ts.map +1 -1
  135. package/dist/i18n/generated-locales/no-NO.generated.js +0 -5
  136. package/dist/i18n/generated-locales/pl-PL.generated.d.ts.map +1 -1
  137. package/dist/i18n/generated-locales/pl-PL.generated.js +0 -5
  138. package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
  139. package/dist/i18n/generated-locales/pseudo.generated.js +3 -5
  140. package/dist/i18n/generated-locales/pt-BR.generated.d.ts.map +1 -1
  141. package/dist/i18n/generated-locales/pt-BR.generated.js +0 -5
  142. package/dist/i18n/generated-locales/pt-PT.generated.d.ts.map +1 -1
  143. package/dist/i18n/generated-locales/pt-PT.generated.js +0 -5
  144. package/dist/i18n/generated-locales/ro-RO.generated.d.ts.map +1 -1
  145. package/dist/i18n/generated-locales/ro-RO.generated.js +0 -5
  146. package/dist/i18n/generated-locales/ru-RU.generated.d.ts.map +1 -1
  147. package/dist/i18n/generated-locales/ru-RU.generated.js +0 -5
  148. package/dist/i18n/generated-locales/sr-SP.generated.d.ts.map +1 -1
  149. package/dist/i18n/generated-locales/sr-SP.generated.js +0 -5
  150. package/dist/i18n/generated-locales/sv-SE.generated.d.ts.map +1 -1
  151. package/dist/i18n/generated-locales/sv-SE.generated.js +0 -5
  152. package/dist/i18n/generated-locales/tr-TR.generated.d.ts.map +1 -1
  153. package/dist/i18n/generated-locales/tr-TR.generated.js +0 -5
  154. package/dist/i18n/generated-locales/uk-UA.generated.d.ts.map +1 -1
  155. package/dist/i18n/generated-locales/uk-UA.generated.js +0 -5
  156. package/dist/i18n/generated-locales/vi-VN.generated.d.ts.map +1 -1
  157. package/dist/i18n/generated-locales/vi-VN.generated.js +0 -5
  158. package/dist/i18n/generated-locales/zh-CN.generated.d.ts.map +1 -1
  159. package/dist/i18n/generated-locales/zh-CN.generated.js +0 -5
  160. package/dist/i18n/generated-locales/zh-TW.generated.d.ts.map +1 -1
  161. package/dist/i18n/generated-locales/zh-TW.generated.js +0 -5
  162. package/dist/motion/animator.d.ts +76 -7
  163. package/dist/motion/animator.d.ts.map +1 -1
  164. package/dist/motion/animator.js +589 -99
  165. package/dist/motion/coast.d.ts +4 -1
  166. package/dist/motion/coast.d.ts.map +1 -1
  167. package/dist/motion/coast.js +4 -2
  168. package/dist/motion/reducedMotion.d.ts.map +1 -1
  169. package/dist/motion/reducedMotion.js +6 -2
  170. package/dist/motion/reducedMotionPlan.d.ts +7 -0
  171. package/dist/motion/reducedMotionPlan.d.ts.map +1 -1
  172. package/dist/motion/reducedMotionPlan.js +14 -1
  173. package/dist/motion/resolveMotion.d.ts +42 -0
  174. package/dist/motion/resolveMotion.d.ts.map +1 -0
  175. package/dist/motion/resolveMotion.js +43 -0
  176. package/dist/motion/roleValue.d.ts +2 -1
  177. package/dist/motion/roleValue.d.ts.map +1 -1
  178. package/dist/motion/roleValue.js +2 -1
  179. package/dist/motion/uikit/timing.d.ts +7 -1
  180. package/dist/motion/uikit/timing.d.ts.map +1 -1
  181. package/dist/motion/uikit/timing.js +19 -1
  182. package/dist/theme/defineTheme.d.ts +19 -5
  183. package/dist/theme/defineTheme.d.ts.map +1 -1
  184. package/dist/theme/defineTheme.js +63 -3
  185. package/dist/theme/index.d.ts +1 -0
  186. package/dist/theme/index.d.ts.map +1 -1
  187. package/dist/theme/motionKnobs.d.ts +56 -0
  188. package/dist/theme/motionKnobs.d.ts.map +1 -0
  189. package/dist/theme/motionKnobs.js +48 -0
  190. package/dist/theme/resolveThemeValues.d.ts +11 -4
  191. package/dist/theme/resolveThemeValues.d.ts.map +1 -1
  192. package/dist/theme/resolveThemeValues.js +40 -4
  193. package/dist/theme/themeAdaptations.d.ts +7 -3
  194. package/dist/theme/themeAdaptations.d.ts.map +1 -1
  195. package/dist/theme/themeAdaptations.js +36 -7
  196. package/dist/theme/themeMotion.d.ts +96 -0
  197. package/dist/theme/themeMotion.d.ts.map +1 -0
  198. package/dist/theme/themeMotion.js +177 -0
  199. package/dist/theme/tokenReferences.d.ts +31 -0
  200. package/dist/theme/tokenReferences.d.ts.map +1 -0
  201. package/dist/theme/tokenReferences.js +132 -0
  202. package/dist/theme/tokens.d.ts +1 -0
  203. package/dist/theme/tokens.d.ts.map +1 -1
  204. package/dist/theme/tokens.js +9 -129
  205. package/dist/theme/tokens.stylex.d.ts +12 -0
  206. package/dist/theme/tokens.stylex.d.ts.map +1 -1
  207. package/dist/theme/tokens.stylex.js +12 -0
  208. package/dist/utils/focusOutline.stylex.d.ts +6 -0
  209. package/dist/utils/focusOutline.stylex.d.ts.map +1 -1
  210. package/dist/utils/focusOutline.stylex.js +7 -0
  211. package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
  212. package/dist/utils/interactionOverlay.stylex.js +17 -8
  213. package/dist/utils/pressFeedback.d.ts.map +1 -1
  214. package/dist/utils/pressFeedback.js +20 -1
  215. package/dist/utils/sharedMutationObserver.d.ts +19 -11
  216. package/dist/utils/sharedMutationObserver.d.ts.map +1 -1
  217. package/dist/utils/sharedMutationObserver.js +66 -26
  218. package/dist/utils/touchPresentation.d.ts +2 -2
  219. package/dist/utils/touchPresentation.d.ts.map +1 -1
  220. package/dist/utils/touchPresentation.js +8 -5
  221. package/dist/utils/touchQueries.d.ts +13 -0
  222. package/dist/utils/touchQueries.d.ts.map +1 -0
  223. package/dist/utils/touchQueries.js +15 -0
  224. package/dist/utils/useFocusAcrossSwap.d.ts +19 -0
  225. package/dist/utils/useFocusAcrossSwap.d.ts.map +1 -0
  226. package/dist/utils/useFocusAcrossSwap.js +41 -0
  227. package/locales/af-ZA.json +0 -21
  228. package/locales/ar-SA.json +0 -21
  229. package/locales/ca-ES.json +0 -21
  230. package/locales/cs-CZ.json +0 -21
  231. package/locales/da-DK.json +0 -21
  232. package/locales/de-DE.json +0 -21
  233. package/locales/el-GR.json +0 -21
  234. package/locales/en.json +12 -20
  235. package/locales/es-ES.json +0 -21
  236. package/locales/fi-FI.json +0 -21
  237. package/locales/fr-FR.json +0 -21
  238. package/locales/he-IL.json +0 -21
  239. package/locales/hu-HU.json +0 -21
  240. package/locales/it-IT.json +0 -21
  241. package/locales/ja-JP.json +0 -21
  242. package/locales/ko-KR.json +0 -21
  243. package/locales/nl-NL.json +0 -21
  244. package/locales/no-NO.json +0 -21
  245. package/locales/pl-PL.json +0 -21
  246. package/locales/pseudo.json +8 -14
  247. package/locales/pt-BR.json +0 -21
  248. package/locales/pt-PT.json +0 -21
  249. package/locales/ro-RO.json +0 -21
  250. package/locales/ru-RU.json +0 -21
  251. package/locales/sr-SP.json +0 -21
  252. package/locales/sv-SE.json +0 -21
  253. package/locales/tr-TR.json +0 -21
  254. package/locales/uk-UA.json +0 -21
  255. package/locales/vi-VN.json +0 -21
  256. package/locales/zh-CN.json +0 -21
  257. package/locales/zh-TW.json +0 -21
  258. package/package.json +4 -4
  259. package/src/AppShell/AppShell.doc.mjs +1 -1
  260. package/src/AppShell/AppShell.spec.md +9 -12
  261. package/src/AppShell/AppShell.test.tsx +164 -2
  262. package/src/AppShell/AppShell.tsx +225 -5
  263. package/src/AppShell/__tests__/AppShellMainKeyboard.a11y.browser.spec.ts +534 -0
  264. package/src/AppShell/observeMainOverflow.test.ts +173 -0
  265. package/src/AppShell/observeMainOverflow.ts +143 -0
  266. package/src/Carousel/Carousel.doc.mjs +1 -1
  267. package/src/Carousel/Carousel.spec.md +9 -9
  268. package/src/Carousel/Carousel.test.tsx +124 -3
  269. package/src/Carousel/Carousel.tsx +10 -2
  270. package/src/Carousel/__tests__/Carousel.a11y.known-failures.ts +1 -16
  271. package/src/Chat/ChatComposer.spec.md +75 -59
  272. package/src/Chat/ChatComposerTokenElement.spec.md +45 -33
  273. package/src/Chat/ChatDictationButton.spec.md +126 -81
  274. package/src/Chat/ChatLayout.spec.md +41 -36
  275. package/src/Chat/ChatLayoutScrollButton.spec.md +87 -103
  276. package/src/Chat/ChatSendButton.spec.md +78 -67
  277. package/src/CodeBlock/__tests__/CodeBlockCopyClearance.a11y.chromium.spec.ts +38 -3
  278. package/src/ComplexSelector/ComplexSelector.test.tsx +111 -0
  279. package/src/ComplexSelector/ComplexSelector.tsx +41 -4
  280. package/src/ContextMenu/ContextMenu.spec.md +84 -56
  281. package/src/ContextMenu/ContextMenuItem.spec.md +132 -0
  282. package/src/DateInput/DateInputTouch.test.tsx +44 -0
  283. package/src/DateInput/Wheel.tsx +9 -6
  284. package/src/DateInput/usePointerDragScroll.ts +34 -10
  285. package/src/DateInput/useScrollSettle.ts +38 -7
  286. package/src/DropdownMenu/DropdownMenu.spec.md +198 -218
  287. package/src/DropdownMenu/DropdownMenu.test.tsx +117 -0
  288. package/src/DropdownMenu/DropdownMenu.tsx +33 -18
  289. package/src/DropdownMenu/DropdownMenuCheckboxItem.spec.md +192 -0
  290. package/src/DropdownMenu/DropdownMenuDivider.spec.md +25 -31
  291. package/src/DropdownMenu/DropdownMenuGroup.spec.md +145 -0
  292. package/src/DropdownMenu/DropdownMenuItem.spec.md +48 -42
  293. package/src/DropdownMenu/DropdownMenuRadioGroup.spec.md +34 -37
  294. package/src/DropdownMenu/DropdownMenuRadioItem.spec.md +54 -53
  295. package/src/DropdownMenu/DropdownMenuSubMenu.spec.md +47 -41
  296. package/src/EmptyState/EmptyState.spec.md +35 -29
  297. package/src/Item/Item.test.tsx +60 -0
  298. package/src/Item/Item.tsx +14 -7
  299. package/src/Layer/useLayer.test.tsx +78 -3
  300. package/src/Layer/useLayer.tsx +27 -6
  301. package/src/Link/Link.spec.md +3 -2
  302. package/src/Link/Link.tsx +11 -0
  303. package/src/Link/__tests__/Link.truncation.a11y.chromium.spec.ts +58 -0
  304. package/src/Markdown/plugins/headingLinks.a11y.chromium.spec.ts +1 -1
  305. package/src/NavMenu/NavHeadingMenuItem.tsx +5 -39
  306. package/src/NumberInput/NumberInput.test.tsx +68 -7
  307. package/src/NumberInput/NumberInput.tsx +31 -1
  308. package/src/Outline/Outline.spec.md +165 -69
  309. package/src/Outline/Outline.test.tsx +67 -2
  310. package/src/Outline/Outline.tsx +23 -0
  311. package/src/Outline/modules/parseOutlineFromMarkdown.spec.md +3 -4
  312. package/src/OverflowList/OverflowList.spec.md +102 -55
  313. package/src/Pagination/Pagination.spec.md +158 -84
  314. package/src/Popover/Popover.test.tsx +84 -0
  315. package/src/Popover/Popover.tsx +34 -14
  316. package/src/Popover/__tests__/PopoverSecondDocument.a11y.chromium.spec.ts +70 -8
  317. package/src/Popover/usePopover.tsx +10 -3
  318. package/src/PowerSearch/PowerSearch.test.tsx +24 -0
  319. package/src/PowerSearch/PowerSearch.tsx +42 -31
  320. package/src/RadioList/RadioList.spec.md +1 -1
  321. package/src/RadioList/RadioList.test.tsx +84 -0
  322. package/src/RadioList/RadioListItem.tsx +11 -2
  323. package/src/Resizable/Resizable.spec.md +144 -124
  324. package/src/SideNav/SideNav.test.tsx +124 -4
  325. package/src/SideNav/SideNavItem.spec.md +14 -24
  326. package/src/SideNav/SideNavItem.tsx +27 -10
  327. package/src/Skeleton/Skeleton.tsx +3 -1
  328. package/src/Spinner/Spinner.tsx +3 -1
  329. package/src/Stepper/Step.spec.md +36 -42
  330. package/src/Stepper/Step.tsx +33 -6
  331. package/src/Stepper/Stepper.doc.mjs +1 -1
  332. package/src/Stepper/Stepper.test.tsx +69 -7
  333. package/src/Switch/Switch.spec.md +1 -1
  334. package/src/Switch/Switch.test.tsx +66 -1
  335. package/src/Switch/Switch.tsx +11 -3
  336. package/src/Table/Table.spec.md +1 -1
  337. package/src/Table/Table.test.tsx +32 -0
  338. package/src/Table/Table.tsx +43 -11
  339. package/src/Table/__tests__/Table.a11y.states.ts +1 -5
  340. package/src/Table/plugins/sortable/useTableSortable.test.tsx +73 -144
  341. package/src/Table/plugins/sortable/useTableSortable.tsx +44 -73
  342. package/src/Table/plugins/sortable/useTableSortableState.test.tsx +9 -21
  343. package/src/TimeInput/TimeInput.spec.md +13 -13
  344. package/src/Toast/Toast.spec.md +2 -5
  345. package/src/Toast/ToastViewport.test.tsx +79 -0
  346. package/src/Toast/ToastViewport.tsx +21 -3
  347. package/src/ToggleButton/ToggleButton.test.tsx +27 -0
  348. package/src/ToggleButton/ToggleButtonGroup.tsx +20 -1
  349. package/src/Token/Token.doc.mjs +2 -2
  350. package/src/Token/Token.spec.md +41 -51
  351. package/src/Token/Token.test.tsx +67 -0
  352. package/src/Token/Token.tsx +60 -5
  353. package/src/Token/TokenLink.tsx +21 -7
  354. package/src/Tokenizer/Tokenizer.spec.md +13 -1
  355. package/src/Tokenizer/Tokenizer.test.tsx +27 -0
  356. package/src/Tokenizer/Tokenizer.tsx +24 -10
  357. package/src/Tokenizer/TokenizerBottomSheet.test.tsx +8 -0
  358. package/src/Tokenizer/TokenizerClearAllMessageContext.ts +21 -0
  359. package/src/TreeList/TreeList.test.tsx +26 -0
  360. package/src/TreeList/TreeListItem.tsx +26 -4
  361. package/src/Typeahead/BaseTypeahead.doc.mjs +3 -3
  362. package/src/Typeahead/BaseTypeahead.spec.md +45 -45
  363. package/src/Typeahead/BaseTypeahead.tsx +48 -9
  364. package/src/Typeahead/Typeahead.test.tsx +120 -0
  365. package/src/__tests__/internalModulesNotExperimental.test.ts +88 -0
  366. package/src/__tests__/pressState.ts +8 -4
  367. package/src/gestures/GestureArena.ts +76 -11
  368. package/src/gestures/GestureHost.ts +6 -7
  369. package/src/gestures/GestureRecognizer.ts +3 -1
  370. package/src/gestures/PressTracker.ts +386 -0
  371. package/src/gestures/README.md +420 -0
  372. package/src/gestures/__tests__/GestureHost.test.ts +50 -1
  373. package/src/gestures/__tests__/PressTracker.test.ts +275 -0
  374. package/src/gestures/__tests__/arena.test.ts +35 -0
  375. package/src/gestures/__tests__/harness.ts +31 -2
  376. package/src/gestures/__tests__/pressTrackerFactory.test.ts +59 -0
  377. package/src/gestures/__tests__/useGestureRecognizer.test.tsx +570 -0
  378. package/src/gestures/index.ts +79 -0
  379. package/src/gestures/useGestureRecognizer.ts +305 -0
  380. package/src/hooks/scrollKeyboardDelegation.test.ts +33 -0
  381. package/src/hooks/scrollKeyboardDelegation.ts +9 -3
  382. package/src/hooks/useScrollOverflow.doc.mjs +1 -1
  383. package/src/hooks/useScrollOverflow.test.tsx +102 -1
  384. package/src/hooks/useScrollOverflow.ts +59 -10
  385. package/src/i18n/generated-locales/af-ZA.generated.ts +0 -7
  386. package/src/i18n/generated-locales/ar-SA.generated.ts +0 -6
  387. package/src/i18n/generated-locales/ca-ES.generated.ts +0 -7
  388. package/src/i18n/generated-locales/cs-CZ.generated.ts +0 -6
  389. package/src/i18n/generated-locales/da-DK.generated.ts +0 -6
  390. package/src/i18n/generated-locales/de-DE.generated.ts +0 -6
  391. package/src/i18n/generated-locales/el-GR.generated.ts +0 -7
  392. package/src/i18n/generated-locales/en.generated.ts +3 -6
  393. package/src/i18n/generated-locales/es-ES.generated.ts +0 -7
  394. package/src/i18n/generated-locales/fi-FI.generated.ts +0 -6
  395. package/src/i18n/generated-locales/fr-FR.generated.ts +0 -7
  396. package/src/i18n/generated-locales/he-IL.generated.ts +0 -6
  397. package/src/i18n/generated-locales/hu-HU.generated.ts +0 -6
  398. package/src/i18n/generated-locales/it-IT.generated.ts +0 -7
  399. package/src/i18n/generated-locales/ja-JP.generated.ts +0 -6
  400. package/src/i18n/generated-locales/ko-KR.generated.ts +0 -6
  401. package/src/i18n/generated-locales/nl-NL.generated.ts +0 -6
  402. package/src/i18n/generated-locales/no-NO.generated.ts +0 -6
  403. package/src/i18n/generated-locales/pl-PL.generated.ts +0 -7
  404. package/src/i18n/generated-locales/pseudo.generated.ts +3 -6
  405. package/src/i18n/generated-locales/pt-BR.generated.ts +0 -7
  406. package/src/i18n/generated-locales/pt-PT.generated.ts +0 -7
  407. package/src/i18n/generated-locales/ro-RO.generated.ts +0 -6
  408. package/src/i18n/generated-locales/ru-RU.generated.ts +0 -7
  409. package/src/i18n/generated-locales/sr-SP.generated.ts +0 -6
  410. package/src/i18n/generated-locales/sv-SE.generated.ts +0 -6
  411. package/src/i18n/generated-locales/tr-TR.generated.ts +0 -7
  412. package/src/i18n/generated-locales/uk-UA.generated.ts +0 -7
  413. package/src/i18n/generated-locales/vi-VN.generated.ts +0 -6
  414. package/src/i18n/generated-locales/zh-CN.generated.ts +0 -6
  415. package/src/i18n/generated-locales/zh-TW.generated.ts +0 -6
  416. package/src/motion/MEASUREMENTS.md +2 -1
  417. package/src/motion/README.md +102 -32
  418. package/src/motion/__tests__/animator.interaction.browser.spec.ts +843 -0
  419. package/src/motion/__tests__/motionBundle.ts +14 -0
  420. package/src/motion/animator.test.ts +978 -33
  421. package/src/motion/animator.ts +790 -104
  422. package/src/motion/coast.ts +10 -3
  423. package/src/motion/reducedMotion.ts +12 -2
  424. package/src/motion/reducedMotionPlan.test.ts +26 -0
  425. package/src/motion/reducedMotionPlan.ts +20 -1
  426. package/src/motion/resolveMotion.test.ts +123 -0
  427. package/src/motion/resolveMotion.ts +68 -0
  428. package/src/motion/roleValue.ts +2 -1
  429. package/src/motion/roles.test.ts +21 -4
  430. package/src/motion/uikit/tableImports.test.ts +293 -0
  431. package/src/motion/uikit/timing.ts +15 -1
  432. package/src/motion/uikit/values.test.ts +23 -12
  433. package/src/theme/Theme.doc.mjs +1 -1
  434. package/src/theme/defineTheme.ts +116 -7
  435. package/src/theme/expandMotionScale.test.ts +1 -1
  436. package/src/theme/index.ts +5 -0
  437. package/src/theme/motionKnobs.ts +82 -0
  438. package/src/theme/resolveThemeValues.ts +68 -6
  439. package/src/theme/themeAdaptations.ts +52 -12
  440. package/src/theme/themeMotion.test.ts +620 -0
  441. package/src/theme/themeMotion.ts +221 -0
  442. package/src/theme/tokenReferences.ts +149 -0
  443. package/src/theme/tokens.stylex.ts +10 -0
  444. package/src/theme/tokens.ts +15 -158
  445. package/src/utils/focusOutline.stylex.ts +28 -0
  446. package/src/utils/interactionOverlay.stylex.ts +12 -3
  447. package/src/utils/pressFeedback.test.ts +138 -0
  448. package/src/utils/pressFeedback.ts +34 -11
  449. package/src/utils/pressGesture.test.ts +9 -0
  450. package/src/utils/sharedMutationObserver.test.ts +54 -1
  451. package/src/utils/sharedMutationObserver.ts +87 -29
  452. package/src/utils/touchPresentation.ts +8 -5
  453. package/src/utils/touchQueries.ts +15 -0
  454. package/src/utils/useFocusAcrossSwap.ts +55 -0
@@ -22,7 +22,8 @@ import { interactionOverlayStyles } from "../utils/interactionOverlay.stylex.js"
22
22
  import { usePressFeedback } from "../hooks/usePressFeedback.js";
23
23
  import { hasInteractiveAncestor, useClickableContainer } from "../hooks/useClickableContainer.js";
24
24
  import { Icon } from "../Icon/index.js";
25
- import { mergeProps } from "../utils/index.js";
25
+ import { mergeProps } from "../utils/mergeProps.js";
26
+ import { useFocusAcrossSwap } from "../utils/useFocusAcrossSwap.js";
26
27
  import { useLinkComponent } from "../Link/useLinkComponent.js";
27
28
  import { TreeListBranches } from "./TreeListBranches.js";
28
29
  import { themeProps } from "../utils/themeProps.js";
@@ -150,6 +151,8 @@ const descriptionSizeStyles = {
150
151
  // Component
151
152
  // =============================================================================
152
153
 
154
+ /** A plain anchor, for a disabled item whose link has no destination. */
155
+ const DisabledAnchor = 'a';
153
156
  export function TreeListItem({
154
157
  id,
155
158
  label,
@@ -185,6 +188,10 @@ export function TreeListItem({
185
188
  const descriptionId = useId();
186
189
  const LinkComponent = useLinkComponent();
187
190
  const linkRef = useRef(null);
191
+ // Disabling the item swaps the router link for a plain anchor, so React
192
+ // replaces it; focus on the inner link (after a pointer click) follows the
193
+ // swap instead of falling to the page (spec:AST-085 FR4).
194
+ const anchorRef = useFocusAcrossSwap(linkRef);
188
195
  const isInteractive = onClick != null || href != null;
189
196
  const handleToggle = useMemo(() => hasChildren && onToggle != null ? e => {
190
197
  e.stopPropagation();
@@ -352,11 +359,27 @@ export function TreeListItem({
352
359
  className: "x2lah0s x78zum5 x6s0dn4"
353
360
  },
354
361
  children: startContent
355
- }), href != null ? /*#__PURE__*/_jsx(LinkComponent, {
356
- ref: linkRef,
362
+ }), href != null && isDisabled ?
363
+ /*#__PURE__*/
364
+ // A disabled item's anchor has no destination, so neither the row's
365
+ // forwarded activation nor a screen reader's click can navigate
366
+ // (spec:AST-085 FR2). Like a disabled Link, it keeps the link role and
367
+ // skips the router link component.
368
+ _jsx(DisabledAnchor, {
369
+ ref: anchorRef,
370
+ role: "link",
371
+ "aria-disabled": true,
372
+ "aria-labelledby": labelId,
373
+ "aria-describedby": description != null ? descriptionId : undefined,
374
+ tabIndex: -1,
375
+ ...{
376
+ className: "xmper1u x16khyan xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz"
377
+ },
378
+ children: labelAndDescription
379
+ }) : href != null ? /*#__PURE__*/_jsx(LinkComponent, {
380
+ ref: anchorRef,
357
381
  href: href,
358
382
  target: target,
359
- "aria-disabled": isDisabled || undefined,
360
383
  "aria-labelledby": labelId,
361
384
  "aria-describedby": description != null ? descriptionId : undefined
362
385
  // Roving tabindex lives on the treeitem row; inner action is not a
@@ -86,10 +86,10 @@ export interface BaseTypeaheadProps<T extends SearchableItem> extends Omit<BaseP
86
86
  * When disabled with a reason, keeps the input focusable via `aria-disabled`
87
87
  * (instead of the native `disabled` attribute) and `readOnly` so an
88
88
  * associated disabled-reason tooltip stays discoverable by keyboard and
89
- * assistive technology. Query and text mutation are blocked, but an
90
- * already-open highlighted option can still be selected with Enter after a
91
- * transition into this state. Consumers (Typeahead) own the tooltip and
92
- * wrapper.
89
+ * assistive technology. Query and text mutation, opening the list, and a
90
+ * pick by Enter or a press are blocked, also from a list that was open
91
+ * before this state applied; Escape or Tab still closes it. Consumers
92
+ * (Typeahead) own the tooltip and wrapper.
93
93
  * @default false
94
94
  */
95
95
  isFocusableDisabled?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"BaseTypeahead.d.ts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H,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAEzC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;IAEtD;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,WAAW,CAAC,EAAE,YAAY,CAAC;IAE3B;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAE1C;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAE/D;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AAoKD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,aAAa,EAi7BrB,CAAC,CAAC,SAAS,cAAc,EAC5B,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,KACzB,KAAK,CAAC,YAAY,CAAC"}
@@ -397,9 +397,22 @@ export const BaseTypeahead = function BaseTypeahead({
397
397
  // Show the layer, deferring past the active click if a pointer is down.
398
398
  // Without this, popover="auto" light-dismiss immediately closes the
399
399
  // dropdown when it opens between pointerdown and pointerup/click.
400
+ // Read at show time, so a search or bootstrap that settles after the field
401
+ // became disabled does not open the list (spec:AST-085 FR2).
402
+ const isDisabledRef = useRef(isDisabled);
403
+ useIsomorphicLayoutEffect(() => {
404
+ isDisabledRef.current = isDisabled;
405
+ }, [isDisabled]);
400
406
  const showLayer = useCallback(() => {
407
+ if (isDisabledRef.current) {
408
+ return;
409
+ }
401
410
  if (pointerActiveRef.current) {
402
- document.addEventListener('click', () => requestAnimationFrame(() => popover.show()), {
411
+ document.addEventListener('click', () => requestAnimationFrame(() => {
412
+ if (!isDisabledRef.current) {
413
+ popover.show();
414
+ }
415
+ }), {
403
416
  once: true
404
417
  });
405
418
  } else {
@@ -574,6 +587,11 @@ export const BaseTypeahead = function BaseTypeahead({
574
587
 
575
588
  // Handle item selection
576
589
  const handleSelect = useCallback(item => {
590
+ // A disabled field changes nothing, also from a list that was open
591
+ // before it became disabled (spec:AST-085 FR2).
592
+ if (isDisabled) {
593
+ return;
594
+ }
577
595
  // Bump generation to invalidate any in-flight async searches
578
596
  searchGenRef.current++;
579
597
  if (searchTimeoutRef.current) {
@@ -591,7 +609,7 @@ export const BaseTypeahead = function BaseTypeahead({
591
609
  setLoading(false);
592
610
  popover.hide();
593
611
  inputRef.current?.focus();
594
- }, [onChange, popover, searchSource, setLoading]);
612
+ }, [isDisabled, onChange, popover, searchSource, setLoading]);
595
613
 
596
614
  // Shared by handleFocus and handleClick: bootstrap entries if none are
597
615
  // loaded yet, or re-show cached results that haven't been invalidated by
@@ -625,7 +643,7 @@ export const BaseTypeahead = function BaseTypeahead({
625
643
  // dropdown never reopens until the user clicks away and back (#6845). See
626
644
  // wasAlreadyFocusedRef above for how the two cases are told apart.
627
645
  const handleClick = useCallback(() => {
628
- if (!wasAlreadyFocusedRef.current || popover.isOpen) {
646
+ if (isDisabled || !wasAlreadyFocusedRef.current || popover.isOpen) {
629
647
  return;
630
648
  }
631
649
  if (hasEntriesOnFocus && query.length === 0 && resultsGenRef.current !== searchGenRef.current) {
@@ -633,7 +651,7 @@ export const BaseTypeahead = function BaseTypeahead({
633
651
  return;
634
652
  }
635
653
  openIfEligible();
636
- }, [popover.isOpen, hasEntriesOnFocus, query.length, performBootstrap, openIfEligible]);
654
+ }, [isDisabled, popover.isOpen, hasEntriesOnFocus, query.length, performBootstrap, openIfEligible]);
637
655
 
638
656
  // Handle blur — close the dropdown when focus leaves the input for an
639
657
  // element that is neither inside the field wrapper (anchor) nor inside the
@@ -676,6 +694,24 @@ export const BaseTypeahead = function BaseTypeahead({
676
694
  if (isImeKeyEvent(e.nativeEvent)) {
677
695
  return;
678
696
  }
697
+
698
+ // A focusable-disabled field opens no list and picks nothing; it only
699
+ // lets a list that was open before it became disabled close
700
+ // (spec:AST-085 FR2).
701
+ if (isDisabled) {
702
+ // Enter on a list that is still open picks nothing, and must not
703
+ // submit an enclosing form either, as it would not while enabled.
704
+ if (popover.isOpen && e.key === 'Enter') {
705
+ e.preventDefault();
706
+ }
707
+ if (popover.isOpen && (e.key === 'Escape' || e.key === 'Tab')) {
708
+ if (e.key === 'Escape') {
709
+ e.preventDefault();
710
+ }
711
+ popover.hide();
712
+ }
713
+ return;
714
+ }
679
715
  if (!popover.isOpen) {
680
716
  if (e.key === 'ArrowDown' && (hasEntriesOnFocus || query.length > 0)) {
681
717
  e.preventDefault();
@@ -740,7 +776,7 @@ export const BaseTypeahead = function BaseTypeahead({
740
776
  }
741
777
  break;
742
778
  }
743
- }, [popover, results, highlightedIndex, handleSelect, hasEntriesOnFocus, query, minQueryLength, performBootstrap, externalOnKeyDown]);
779
+ }, [isDisabled, popover, results, highlightedIndex, handleSelect, hasEntriesOnFocus, query, minQueryLength, performBootstrap, externalOnKeyDown]);
744
780
 
745
781
  // Generate item ID for accessibility
746
782
  const getItemId = useCallback(index => `${listboxId}-option-${index}`, [listboxId]);
@@ -805,8 +841,8 @@ export const BaseTypeahead = function BaseTypeahead({
805
841
  placeholder: placeholder
806
842
  // When a disabled-reason tooltip is shown the input keeps focusability
807
843
  // via aria-disabled + readOnly instead of the native disabled
808
- // attribute. Query and text mutation are blocked, but an already-open
809
- // highlighted option can still be selected with Enter after transition.
844
+ // attribute. Query and text mutation, opening and picking are blocked
845
+ // by the handlers above (spec:AST-085 FR2).
810
846
  ,
811
847
  disabled: isDisabled && !isFocusableDisabled,
812
848
  readOnly: isFocusableDisabled || undefined,
package/dist/astryx.css CHANGED
@@ -81,7 +81,7 @@
81
81
  :root, .xj0fimd{--color-accent:light-dark(#0064E0, #2694FE);--color-accent-muted:light-dark(#0082FB33, #0082FB3F);--color-on-accent:light-dark(#FFFFFF, #FFFFFF);--color-neutral:light-dark(rgba(5, 54, 89, 0.1), rgba(223, 226, 229, 0.2));--color-background-surface:light-dark(#FFFFFF, #1F1F22);--color-background-body:light-dark(#F1F4F7, #111112);--color-overlay:light-dark(#01122866, #11111299);--color-overlay-hover:light-dark(#0536590C, #FFFFFF0C);--color-overlay-pressed:light-dark(#05365919, #FFFFFF19);--color-background-muted:light-dark(#0536590C, #1111127F);--color-text-primary:light-dark(#0A1317, #DFE2E5);--color-text-secondary:light-dark(#4E606F, #AAAFB5);--color-text-disabled:light-dark(#A4B0BC, #6F747C);--color-text-accent:light-dark(#0064E0, #3E9EFB);--color-on-dark:light-dark(#FFFFFF, #FFFFFF);--color-on-light:light-dark(#000000, #000000);--color-icon-accent:light-dark(#0064E0, #2694FE);--color-icon-primary:light-dark(#0A1317, #DFE2E5);--color-icon-secondary:light-dark(#4E606F, #AAAFB5);--color-icon-disabled:light-dark(#A4B0BC, #6F747C);--color-background-card:light-dark(#FFFFFF, #1F1F22);--color-background-popover:light-dark(#FFFFFF, #28292C);--color-background-inverted:light-dark(#0A1317, #FFFFFF);--color-background-error-inverted:light-dark(#AA071E, #E3193B);--color-info:light-dark(#0064E0, #0064E0);--color-info-muted:light-dark(#0082FB33, #0082FB3F);--color-on-info:light-dark(#FFFFFF, #FFFFFF);--color-success:light-dark(#0D8626, #0D8626);--color-success-muted:light-dark(#0B991F33, #0B991F3F);--color-on-success:light-dark(#FFFFFF, #FFFFFF);--color-error:light-dark(#E3193B, #F5394F);--color-error-muted:light-dark(#E3193B33, #F5394F3F);--color-on-error:light-dark(#FFFFFF, #0A1317);--color-warning:light-dark(#E9AF08, #F2C00B);--color-warning-muted:light-dark(#E2A40033, #E2A4003F);--color-on-warning:light-dark(#0A1317, #0A1317);--color-text-info:var(--color-text-blue);--color-text-success:var(--color-text-green);--color-text-warning:var(--color-text-yellow);--color-text-error:var(--color-text-red);--color-icon-info:var(--color-text-info);--color-icon-success:var(--color-text-success);--color-icon-warning:var(--color-text-warning);--color-icon-error:var(--color-text-error);--color-border-info:var(--color-text-info);--color-border-success:var(--color-text-success);--color-border-warning:var(--color-text-warning);--color-border-error:var(--color-text-error);--color-on-info-muted:var(--color-text-blue);--color-on-success-muted:var(--color-text-green);--color-on-warning-muted:var(--color-text-yellow);--color-on-error-muted:var(--color-text-red);--color-border:light-dark(#05365919, #F2F4F619);--color-border-emphasized:light-dark(#CCD3DB, #494D53);--color-skeleton:light-dark(#CCD3DB, #5A5E66);--color-track:light-dark(#CCD3DB, #5A5E66);--color-shadow:light-dark(rgba(5, 54, 89, 0.1), rgba(0, 0, 0, 0.3));--color-tint-hover:light-dark(black, white);--color-background-blue:light-dark(#0171E333, #0171E333);--color-border-blue:light-dark(#0064E0, #2694FE);--color-icon-blue:light-dark(#0064E0, #2694FE);--color-text-blue:light-dark(#042F97, #AFD7FF);--color-background-cyan:light-dark(#03A7D733, #03A7D733);--color-border-cyan:light-dark(#089DD0, #0171A4);--color-icon-cyan:light-dark(#00ACC1, #26C6DA);--color-text-cyan:light-dark(#014975, #A1EEF9);--color-background-gray:light-dark(#0A131733, #666A724C);--color-border-gray:light-dark(#647685, #748695);--color-icon-gray:light-dark(#4E606F, #AAAFB5);--color-text-gray:light-dark(#0A1317, #E7EAED);--color-background-green:light-dark(#24BB5E33, #24BB5E33);--color-border-green:light-dark(#0D8626, #0B991F);--color-icon-green:light-dark(#0D8626, #26A756);--color-text-green:light-dark(#09441F, #A5F690);--color-background-orange:light-dark(#F2790233, #F2790233);--color-border-orange:light-dark(#EB6E00, #B34A01);--color-icon-orange:light-dark(#E9690B, #FB8C00);--color-text-orange:light-dark(#6B2203, #FDB876);--color-background-pink:light-dark(#E638B333, #E638B333);--color-border-pink:light-dark(#F351C0, #C02294);--color-icon-pink:light-dark(#C2185B, #EC407A);--color-text-pink:light-dark(#650053, #FEADE3);--color-background-purple:light-dark(#7952FF33, #7952FF33);--color-border-purple:light-dark(#9081FF, #7340FE);--color-icon-purple:light-dark(#5B08D8, #7952FF);--color-text-purple:light-dark(#3E0697, #B3B0FE);--color-background-red:light-dark(#E3193B33, #E3193B33);--color-border-red:light-dark(#E3193B, #F5394F);--color-icon-red:light-dark(#D31130, #E3193B);--color-text-red:light-dark(#7B0210, #FFB2B8);--color-background-teal:light-dark(#0DB7AF33, #0DB7AF33);--color-border-teal:light-dark(#08A3A3, #08767D);--color-icon-teal:light-dark(#009688, #26A69A);--color-text-teal:light-dark(#083943, #40DCCD);--color-background-yellow:light-dark(#E2A40033, #E2A40033);--color-border-yellow:light-dark(#C58600, #B47700);--color-icon-yellow:light-dark(#FBC02D, #FFEE58);--color-text-yellow:light-dark(#753F07, #FBCE03);}
82
82
  :root, .x7j7z01{--color-data-categorical-blue:light-dark(#0171E3, #0171E3);--color-data-categorical-orange:light-dark(#EB6E00, #EB6E00);--color-data-categorical-purple:light-dark(#6B1EFD, #6B1EFD);--color-data-categorical-green:light-dark(#0B991F, #0B991F);--color-data-categorical-pink:light-dark(#F351C0, #F351C0);--color-data-categorical-cyan:light-dark(#0171A4, #0171A4);--color-data-categorical-red:light-dark(#F5394F, #F5394F);--color-data-categorical-teal:light-dark(#08A3A3, #08A3A3);--color-data-categorical-brown:light-dark(#965E03, #965E03);--color-data-categorical-indigo:light-dark(#6F8AFF, #6F8AFF);--color-data-neutral:light-dark(#8494A3, #8C939B);--color-data-blue-5:light-dark(#02165E, #02165E);--color-data-blue-4:light-dark(#004CBC, #004CBC);--color-data-blue-3:light-dark(#2694FE, #2694FE);--color-data-blue-2:light-dark(#78BEFF, #78BEFF);--color-data-blue-1:light-dark(#DBECFF, #DBECFF);--color-data-shamrock-5:light-dark(#0B603D, #0B603D);--color-data-shamrock-4:light-dark(#138546, #138546);--color-data-shamrock-3:light-dark(#24BB5E, #24BB5E);--color-data-shamrock-2:light-dark(#8EF7AA, #8EF7AA);--color-data-shamrock-1:light-dark(#D6FEE4, #D6FEE4);--color-data-orange-5:light-dark(#A13F04, #A13F04);--color-data-orange-4:light-dark(#D66100, #D66100);--color-data-orange-3:light-dark(#FD9537, #FD9537);--color-data-orange-2:light-dark(#FDB876, #FDB876);--color-data-orange-1:light-dark(#FFE6CF, #FFE6CF);--color-data-pink-5:light-dark(#8E1073, #8E1073);--color-data-pink-4:light-dark(#D123A1, #D123A1);--color-data-pink-3:light-dark(#F989D3, #F989D3);--color-data-pink-2:light-dark(#FEADE3, #FEADE3);--color-data-pink-1:light-dark(#FCE3F4, #FCE3F4);--color-data-purple-5:light-dark(#3E0697, #3E0697);--color-data-purple-4:light-dark(#6B1EFD, #6B1EFD);--color-data-purple-3:light-dark(#9081FF, #9081FF);--color-data-purple-2:light-dark(#B3B0FE, #B3B0FE);--color-data-purple-1:light-dark(#E8E8FB, #E8E8FB);--color-data-red-5:light-dark(#9D0519, #9D0519);--color-data-red-4:light-dark(#D31130, #D31130);--color-data-red-3:light-dark(#FB7D87, #FB7D87);--color-data-red-2:light-dark(#FFB2B8, #FFB2B8);--color-data-red-1:light-dark(#FEE4E6, #FEE4E6);--color-data-teal-5:light-dark(#08767D, #08767D);--color-data-teal-4:light-dark(#0C9293, #0C9293);--color-data-teal-3:light-dark(#0DB7AF, #0DB7AF);--color-data-teal-2:light-dark(#6CE6D8, #6CE6D8);--color-data-teal-1:light-dark(#D7FCF8, #D7FCF8);--color-data-yellow-5:light-dark(#8A5001, #8A5001);--color-data-yellow-4:light-dark(#D69804, #D69804);--color-data-yellow-3:light-dark(#FBCE03, #FBCE03);--color-data-yellow-2:light-dark(#FCEC85, #FCEC85);--color-data-yellow-1:light-dark(#FDF6BA, #FDF6BA);--color-data-gray-5:light-dark(#25363F, #333338);--color-data-gray-4:light-dark(#5D6C7B, #666A72);--color-data-gray-3:light-dark(#AFB9C4, #B2B8BE);--color-data-gray-2:light-dark(#CCD3DB, #D0D3D6);--color-data-gray-1:light-dark(#F1F4F7, #F2F4F6);}
83
83
  :root, .x14lkjui{--duration-fast-min:130ms;--duration-fast:175ms;--duration-fast-max:230ms;--duration-medium-min:310ms;--duration-medium:410ms;--duration-medium-max:550ms;--duration-slow-min:730ms;--duration-slow:975ms;--duration-slow-max:1300ms;}
84
- :root, .xf09i69{--ease-standard:cubic-bezier(0.24, 1, 0.4, 1);--ease-exit:cubic-bezier(0.3, 0, 0.6, 0.6);}
84
+ :root, .xf09i69{--ease-standard:cubic-bezier(0.24, 1, 0.4, 1);--ease-entrance:cubic-bezier(0.24, 1, 0.4, 1);--ease-move:cubic-bezier(0.24, 1, 0.4, 1);--ease-exit:cubic-bezier(0.3, 0, 0.6, 0.6);}
85
85
  :root, .xzxs3qz{--focus-outline-width:2px;--focus-outline-style:solid;--focus-outline-color:var(--color-accent);--focus-outline-offset:3px;}
86
86
  :root, .x5tdzeq{--font-family-body:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;--font-family-code:"SF Mono", Monaco, Consolas, monospace;--font-family-heading:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;}
87
87
  :root, .x1q1ms06{--font-size-4xs:0.375rem;--font-size-3xs:0.4375rem;--font-size-2xs:0.5rem;--font-size-xs:0.625rem;--font-size-sm:0.75rem;--font-size-base:0.875rem;--font-size-lg:1.0625rem;--font-size-xl:1.25rem;--font-size-2xl:1.5rem;--font-size-3xl:1.8125rem;--font-size-4xl:2.1875rem;--font-size-5xl:2.625rem;}
@@ -724,11 +724,12 @@
724
724
  .xjlvqhv:not(#\#):not(#\#):not(#\#){animation-duration:1ms}
725
725
  .x1c74tu6:not(#\#):not(#\#):not(#\#){animation-duration:2s}
726
726
  .xwms9i0:not(#\#):not(#\#):not(#\#){animation-duration:auto}
727
+ .xbs46m1:not(#\#):not(#\#):not(#\#){animation-duration:var(--_astryx-pre-tempo-duration-medium-max,var(--duration-medium-max))}
728
+ .x1qcljrn:not(#\#):not(#\#):not(#\#){animation-duration:var(--_astryx-pre-tempo-duration-slow-min,var(--duration-slow-min))}
727
729
  .x9uej1z:not(#\#):not(#\#):not(#\#){animation-duration:var(--duration-fast-max)}
728
730
  .xb2rp9n:not(#\#):not(#\#):not(#\#){animation-duration:var(--duration-fast)}
729
731
  .xqgcaz:not(#\#):not(#\#):not(#\#){animation-duration:var(--duration-medium-max)}
730
732
  .x12wqnr7:not(#\#):not(#\#):not(#\#){animation-duration:var(--duration-medium)}
731
- .x14qxm4i:not(#\#):not(#\#):not(#\#){animation-duration:var(--duration-slow-min)}
732
733
  .xskzprw:not(#\#):not(#\#):not(#\#){animation-fill-mode:backwards}
733
734
  .x1u6ievf:not(#\#):not(#\#):not(#\#){animation-fill-mode:both}
734
735
  .x10e4vud:not(#\#):not(#\#):not(#\#){animation-fill-mode:forwards}
@@ -1524,6 +1525,7 @@
1524
1525
  .x1wxx7ce.x1wxx7ce:where(.astryx-input-group > [data-astryx-input-group-item]):has(~ *:not([popover]):not(template):not(dialog)):not(#\#):not(#\#):not(#\#){border-start-end-radius:0}
1525
1526
  .x149bkfe:not(:has(~ *:not([popover]):not(template):not(dialog))):not(#\#):not(#\#):not(#\#){border-start-end-radius:var(--radius-element)}
1526
1527
  .x132ell6.x132ell6:where(.astryx-input-group > [data-astryx-input-group-item]):not(:first-child):not(#\#):not(#\#):not(#\#){border-start-start-radius:0}
1528
+ .x9a4xmf:focus-visible:not(#\#):not(#\#):not(#\#){border-start-start-radius:var(--radius-page)}
1527
1529
  .xuihb5h:focus-within:not(#\#):not(#\#):not(#\#){box-shadow:inset 0 0 0 2px var(--color-accent-muted)}
1528
1530
  .x15ysqaf:focus-within:not(#\#):not(#\#):not(#\#){box-shadow:none}
1529
1531
  .xyavpck:focus-within:not(#\#):not(#\#):not(#\#){box-shadow:var(--shadow-med)}
@@ -1587,12 +1589,16 @@
1587
1589
  .x92e2el:has(> [data-astryx-edge-comp]:last-child):not(#\#):not(#\#):not(#\#){margin-inline-end:var(--x-4drmnv)}
1588
1590
  .x1kftj4p:has(> [data-astryx-edge-comp]:first-child):not(#\#):not(#\#):not(#\#){margin-inline-start:var(--x-126w13d)}
1589
1591
  .x1uy843r:has(:focus-visible):not(#\#):not(#\#):not(#\#){outline-color:var(--focus-outline-color)}
1592
+ .x4jz7i8:has(> [role="combobox"]:focus-visible):not(#\#):not(#\#):not(#\#){outline-color:var(--focus-outline-color)}
1590
1593
  .xobxmqy:has(> :first-child:focus-visible):not(#\#):not(#\#):not(#\#){outline-color:var(--focus-outline-color)}
1594
+ .x1fz9cfn:has(> [role="combobox"]:focus-visible):not(#\#):not(#\#):not(#\#){outline-offset:var(--focus-outline-offset)}
1591
1595
  .x1jumodi:has(:focus-visible):not(#\#):not(#\#):not(#\#){outline-offset:var(--focus-outline-offset)}
1592
1596
  .x2vr5qc:has(> :first-child:focus-visible):not(#\#):not(#\#):not(#\#){outline-offset:var(--focus-outline-offset)}
1597
+ .x151uj7h:has(> [role="combobox"]:focus-visible):not(#\#):not(#\#):not(#\#){outline-style:var(--focus-outline-style)}
1593
1598
  .xciu248:has(:focus-visible):not(#\#):not(#\#):not(#\#){outline-style:var(--focus-outline-style)}
1594
1599
  .xfd04fr:has(> :first-child:focus-visible):not(#\#):not(#\#):not(#\#){outline-style:var(--focus-outline-style)}
1595
1600
  .x11j6mr8:has(:focus-visible):not(#\#):not(#\#):not(#\#){outline-width:var(--focus-outline-width)}
1601
+ .x1ufq04b:has(> [role="combobox"]:focus-visible):not(#\#):not(#\#):not(#\#){outline-width:var(--focus-outline-width)}
1596
1602
  .xmmisi4:has(> :first-child:focus-visible):not(#\#):not(#\#):not(#\#){outline-width:var(--focus-outline-width)}
1597
1603
  .xxdn8bs:has(> div > .astryx-layout-content):not(#\#):not(#\#):not(#\#){padding-inline-end:max(0px,calc((100% - var(--layout-content-width)) / 2))}
1598
1604
  .xmnmr5y:has(.astryx-nav-icon):not(#\#):not(#\#):not(#\#){padding-inline-start:0}
@@ -2161,7 +2167,7 @@
2161
2167
  @media (forced-colors: active){.xtyencx.xtyencx:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--_progress-bar-fill,0%)}}
2162
2168
  @media (max-width: 640px){.xci7e5a.xci7e5a:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--x-fqzwsx)}}
2163
2169
  @supports (-webkit-touch-callout: none){@media (pointer: coarse){.x9w4715.x9w4715.x9w4715:not(#\#):not(#\#):not(#\#):not(#\#){height:calc(max(1rem,var(--text-body-size)) * var(--text-body-leading));height:1lh}}}
2164
- .x8s9nux[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){animation-duration:.2s}
2170
+ .x1heh2iz[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){animation-duration:calc(.2s * min(var(--_astryx-motion-tempo,1),1.5))}
2165
2171
  .xziyay6[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){animation-fill-mode:both}
2166
2172
  .x14e4jsf[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){animation-name:x10jkm1t-B}
2167
2173
  .xwkbtvz[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){animation-timing-function:cubic-bezier(0,0,.2,1)}
@@ -2196,6 +2202,7 @@
2196
2202
  @starting-style{.x14gflnl.x14gflnl:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){transform:translateX(100%)}}
2197
2203
  @starting-style{.xrxqmjf.xrxqmjf:dir(rtl):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){transform:translateX(-100%)}}
2198
2204
  @starting-style{.x1r0dqvm.x1r0dqvm:dir(rtl):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){transform:translateX(100%)}}
2205
+ @media (prefers-reduced-motion: reduce){.x1sgdaq5.x1sgdaq5[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){animation-duration:min(.2s,calc(.2s * var(--_astryx-motion-tempo,1)))}}
2199
2206
  @media (forced-colors: active){.x1pjcgc3.x1pjcgc3[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){background-color:Highlight}}
2200
2207
  @media (forced-colors: active){.x1r4mieh.x1r4mieh[data-astryx-press="on"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){background-color:Highlight}}
2201
2208
  @starting-style{@media (prefers-reduced-motion: reduce) and (pointer: coarse){.xgo67oj.xgo67oj.xgo67oj:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){opacity:0}}}
@@ -69,10 +69,15 @@ export interface GestureArenaOptions {
69
69
  /** Every recognizer transition, for debugging and tests. */
70
70
  onTransition?: (recognizer: GestureRecognizer, from: GestureState, to: GestureState) => void;
71
71
  }
72
+ /**
73
+ * The arena that decides which recognizer gets a touch.
74
+ */
72
75
  export declare class GestureArena {
73
76
  readonly environment: GestureEnvironment;
74
77
  private readonly clock;
75
78
  private readonly options;
79
+ /** The touches whose move the arena is delivering right now. */
80
+ private movingIds;
76
81
  private readonly records;
77
82
  /** Recognizers involved in the current interaction, in resolution order. */
78
83
  private active;
@@ -84,6 +89,10 @@ export declare class GestureArena {
84
89
  /** The latest time processed: input never moves the clock backwards. */
85
90
  private latestTime;
86
91
  private depth;
92
+ /** Open `deferResolution` calls: what their stops unblock waits. */
93
+ private deferDepth;
94
+ /** A deferred stop left recognitions, held touches or resets to settle. */
95
+ private owesResolution;
87
96
  constructor(options?: GestureArenaOptions);
88
97
  /** The current time on the event clock. */
89
98
  now(): number;
@@ -129,6 +138,18 @@ export declare class GestureArena {
129
138
  setTimer(recognizer: GestureRecognizer, deadline: number, callback: () => void): void;
130
139
  /** @internal */
131
140
  clearTimer(recognizer: GestureRecognizer): void;
141
+ /**
142
+ * Runs `body`, code outside input that stops recognizers (an Effect that
143
+ * turns one off or detaches it), without resolving what those stops
144
+ * unblock: the recognitions waiting on them, the touches they held from a
145
+ * view, the resets. A pass a microtask later resolves all of it, at the
146
+ * last event's time, so the listeners and consumers it reaches hear it
147
+ * outside the caller's frame and read the recognized state
148
+ * (react-component-runtime INV2).
149
+ */
150
+ deferResolution(body: () => void): void;
151
+ /** The last event's time, or now before any event. */
152
+ private lastEventTime;
132
153
  /** Cancel an active recognizer, or fail a possible one. */
133
154
  stop(recognizer: GestureRecognizer): void;
134
155
  private attemptRecognition;
@@ -141,7 +162,11 @@ export declare class GestureArena {
141
162
  * A recognition that claimed its touches and then fails or is cancelled (a
142
163
  * waiting recognition that fails, a gesture a second finger or the app
143
164
  * cancels) gives them back to the browser unless another recognition owns
144
- * them, so a finger still resting there can pinch-zoom the page.
165
+ * them, so a finger still resting there can pinch-zoom the page. A gesture
166
+ * that cancels itself on a finger's move (a long press past its tolerance)
167
+ * keeps that finger until it lifts: the drag goes on, and the page never
168
+ * takes it over midway (`spec:AST-094` FR14), as UIKit's scroll view never
169
+ * takes a touch another recognizer had.
145
170
  */
146
171
  private releaseClaim;
147
172
  private apply;
@@ -1 +1 @@
1
- {"version":3,"file":"GestureArena.d.ts","sourceRoot":"","sources":["../../src/gestures/GestureArena.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,kBAAkB,EAElB,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,aAAa,EACb,UAAU,EAEX,MAAM,SAAS,CAAC;AAGjB,MAAM,WAAW,YAAY;IAC3B,GAAG,IAAI,MAAM,CAAC;IACd,UAAU,CAAC,QAAQ,EAAE,MAAM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OAAO,CAAC,MAAM;IAyBd,OAAO,CAAC,SAAS;IAMjB;;;;;OAKG;IACH,OAAO,CAAC,GAAG;IAyBX,OAAO,CAAC,WAAW;IA+BnB,4EAA4E;IAC5E,OAAO,CAAC,IAAI;IAKZ,OAAO,CAAC,MAAM;IAoCd,OAAO,CAAC,iBAAiB;CAkC1B"}
@@ -56,7 +56,12 @@ export const browserClock = {
56
56
  * be swallowed now and replayed if the recognizers holding it all fail.
57
57
  */
58
58
 
59
+ /**
60
+ * The arena that decides which recognizer gets a touch.
61
+ */
59
62
  export class GestureArena {
63
+ /** The touches whose move the arena is delivering right now. */
64
+ movingIds = new Set();
60
65
  records = new Map();
61
66
  /** Recognizers involved in the current interaction, in resolution order. */
62
67
  active = [];
@@ -68,6 +73,10 @@ export class GestureArena {
68
73
  /** The latest time processed: input never moves the clock backwards. */
69
74
  latestTime = Number.NEGATIVE_INFINITY;
70
75
  depth = 0;
76
+ /** Open `deferResolution` calls: what their stops unblock waits. */
77
+ deferDepth = 0;
78
+ /** A deferred stop left recognitions, held touches or resets to settle. */
79
+ owesResolution = false;
71
80
  constructor(options = {}) {
72
81
  this.options = options;
73
82
  this.clock = options.clock ?? browserClock;
@@ -245,8 +254,14 @@ export class GestureArena {
245
254
  return;
246
255
  }
247
256
  const context = this.context();
248
- for (const recognizer of [...this.active]) {
249
- recognizer.deliverMoved(changed, context);
257
+ const previous = this.movingIds;
258
+ this.movingIds = new Set(changed.map(touch => touch.id));
259
+ try {
260
+ for (const recognizer of [...this.active]) {
261
+ recognizer.deliverMoved(changed, context);
262
+ }
263
+ } finally {
264
+ this.movingIds = previous;
250
265
  }
251
266
  for (const touch of changed) {
252
267
  const record = this.records.get(touch.id);
@@ -390,11 +405,41 @@ export class GestureArena {
390
405
  }
391
406
  }
392
407
 
408
+ /**
409
+ * Runs `body`, code outside input that stops recognizers (an Effect that
410
+ * turns one off or detaches it), without resolving what those stops
411
+ * unblock: the recognitions waiting on them, the touches they held from a
412
+ * view, the resets. A pass a microtask later resolves all of it, at the
413
+ * last event's time, so the listeners and consumers it reaches hear it
414
+ * outside the caller's frame and read the recognized state
415
+ * (react-component-runtime INV2).
416
+ */
417
+ deferResolution(body) {
418
+ this.deferDepth += 1;
419
+ try {
420
+ body();
421
+ } finally {
422
+ this.deferDepth -= 1;
423
+ }
424
+ if (this.deferDepth === 0 && this.owesResolution) {
425
+ queueMicrotask(() => {
426
+ if (this.owesResolution && this.deferDepth === 0) {
427
+ this.run(this.lastEventTime(), () => {});
428
+ }
429
+ });
430
+ }
431
+ }
432
+
433
+ /** The last event's time, or now before any event. */
434
+ lastEventTime() {
435
+ return Number.isFinite(this.latestTime) ? this.latestTime : this.clock.now();
436
+ }
437
+
393
438
  /** Cancel an active recognizer, or fail a possible one. */
394
439
  stop(recognizer) {
395
440
  // A cancel from code between events happens at the last event's time:
396
441
  // wall time would run deadlines ahead of input still queued (FR16).
397
- const time = this.currentTime ?? (Number.isFinite(this.latestTime) ? this.latestTime : this.clock.now());
442
+ const time = this.currentTime ?? this.lastEventTime();
398
443
  this.run(time, () => {
399
444
  if (isActive(recognizer.state)) {
400
445
  this.apply(recognizer, 'cancelled');
@@ -487,6 +532,11 @@ export class GestureArena {
487
532
  }
488
533
  recognizer.pending = null;
489
534
  this.apply(recognizer, 'failed');
535
+ if (this.deferDepth > 0) {
536
+ // Inside `deferResolution`, the next pass settles.
537
+ this.owesResolution = true;
538
+ return;
539
+ }
490
540
  this.reviewPending();
491
541
  }
492
542
 
@@ -494,12 +544,16 @@ export class GestureArena {
494
544
  * A recognition that claimed its touches and then fails or is cancelled (a
495
545
  * waiting recognition that fails, a gesture a second finger or the app
496
546
  * cancels) gives them back to the browser unless another recognition owns
497
- * them, so a finger still resting there can pinch-zoom the page.
547
+ * them, so a finger still resting there can pinch-zoom the page. A gesture
548
+ * that cancels itself on a finger's move (a long press past its tolerance)
549
+ * keeps that finger until it lifts: the drag goes on, and the page never
550
+ * takes it over midway (`spec:AST-094` FR14), as UIKit's scroll view never
551
+ * takes a touch another recognizer had.
498
552
  */
499
- releaseClaim(recognizer) {
553
+ releaseClaim(recognizer, keep = new Set()) {
500
554
  for (const touch of recognizer.trackedTouches) {
501
555
  const record = this.records.get(touch.id);
502
- if (record == null || !record.isClaimed) {
556
+ if (record == null || !record.isClaimed || keep.has(touch.id)) {
503
557
  continue;
504
558
  }
505
559
  // A recognized discrete gesture (`ended`, a swipe) still owns its
@@ -521,7 +575,9 @@ export class GestureArena {
521
575
  if (isTerminal(next)) {
522
576
  this.clearTimer(recognizer);
523
577
  }
524
- if (next === 'cancelled' || next === 'failed') {
578
+ if (next === 'cancelled') {
579
+ this.releaseClaim(recognizer, this.movingIds);
580
+ } else if (next === 'failed') {
525
581
  this.releaseClaim(recognizer);
526
582
  }
527
583
  }
@@ -740,9 +796,15 @@ export class GestureArena {
740
796
  this.currentTime = this.clampTime(time);
741
797
  body();
742
798
  // Re-entrant calls settle with the outermost one: settling mid-delivery
743
- // would reset recognizers that have not heard the event yet.
799
+ // would reset recognizers that have not heard the event yet. Inside
800
+ // `deferResolution`, the next pass settles.
744
801
  if (this.depth === 1) {
745
- this.settle();
802
+ if (this.deferDepth > 0) {
803
+ this.owesResolution = true;
804
+ } else {
805
+ this.owesResolution = false;
806
+ this.settle();
807
+ }
746
808
  }
747
809
  } finally {
748
810
  this.depth -= 1;
@@ -59,7 +59,6 @@ export declare class GestureHost {
59
59
  private readonly touchIds;
60
60
  /** Touch.identifier → the element the finger landed on. */
61
61
  private readonly touchTargets;
62
- /** Finger targets with listeners of their own, and how many fingers each. */
63
62
  /**
64
63
  * Finger targets with listeners of their own: how many fingers each, and
65
64
  * how many of those a recognizer could claim while they move (only those
@@ -102,19 +101,19 @@ export declare class GestureHost {
102
101
  private readonly claimedLifts;
103
102
  /** Fingers still waiting for their pointerdown, by arena id. */
104
103
  private readonly unpairedTouches;
105
- /** The last position fed per contact, so one channel's echo is dropped. */
106
104
  /** The elements each held contact turned selection off on. */
107
105
  private readonly heldSelectionBy;
108
106
  private readonly isPrimaryPointerCoarse;
109
107
  private readonly coarseQuery;
110
108
  private isWatchingPointer;
111
109
  private readonly onPointerKindChange;
110
+ /** The last position fed per contact, so one channel's echo is dropped. */
112
111
  private readonly lastFed;
113
112
  /** When a finger was last down or lifted, and where it landed. */
114
113
  private lastTouch;
115
- /** The last scroll a finger drove, and when. */
116
114
  /** Scrollers a recognizer is scrolling itself this frame (ownScroll). */
117
115
  private readonly ownedScrolls;
116
+ /** The last scroll a finger drove, and when. */
118
117
  private lastScroll;
119
118
  private nextId;
120
119
  private isInstalled;
@@ -1 +1 @@
1
- {"version":3,"file":"GestureHost.d.ts","sourceRoot":"","sources":["../../src/gestures/GestureHost.ts"],"names":[],"mappings":"AA8FA,OAAO,EAEL,YAAY,EAGZ,KAAK,mBAAmB,EACxB,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAgB3D,OAAO,KAAK,EAEV,YAAY,EACZ,WAAW,EAEX,aAAa,EAGd,MAAM,SAAS,CAAC;AAyBjB,MAAM,WAAW,kBAAkB;IACjC,kDAAkD;IAClD,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAC;IACtC,4DAA4D;IAC5D,YAAY,CAAC,EAAE,mBAAmB,CAAC,cAAc,CAAC,CAAC;IACnD;;;;;;;OAOG;IACH,sBAAsB,CAAC,EAAE,MAAM,OAAO,CAAC;CACxC;AAED,MAAM,WAAW,aAAa;IAC5B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,iDAAiD;IACjD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,MAAM,CAAC,OAAO,EA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aAAa,CA4C5B;IAEF,OAAO,CAAC,QAAQ,CAAC,aAAa,CA6B5B;IAEF,OAAO,CAAC,QAAQ,CAAC,WAAW,CA+B1B;IAEF,OAAO,CAAC,QAAQ,CAAC,eAAe,CAmB9B;IAEF;;;;;OAKG;IACH,OAAO,CAAC,wBAAwB;IA0BhC,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAgBtB;IAEF,OAAO,CAAC,WAAW;IAwBnB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAO5B;IAEF;;;;;;OAMG;IACH,SAAS,CAAC,QAAQ,EAAE,IAAI,GAAG,IAAI;IAa/B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CA6CvB;IAEF,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAKjC;IAEF,OAAO,CAAC,QAAQ,CAAC,MAAM,CAGrB;IAEF,+DAA+D;IAC/D,OAAO,CAAC,gBAAgB;CAoBzB;AAoCD,4DAA4D;AAC5D,wBAAgB,cAAc,CAAC,GAAG,EAAE,QAAQ,GAAG,WAAW,CAOzD"}
@@ -120,10 +120,6 @@ function claimsWhileMoving(recognizer) {
120
120
  return recognizer.acceptsTouchInput && recognizer.kind !== 'tap';
121
121
  }
122
122
 
123
- /**
124
- * Run `task` in the next frame, before it paints: a read there styles what
125
- * the frame must style anyway, and its writes are what the frame shows.
126
- */
127
123
  /**
128
124
  * A CSS-wide keyword, which names no touch-action of its own: the value in
129
125
  * force resolves it (`initial` and `unset` to `auto`, `inherit` to the
@@ -133,6 +129,11 @@ function isCssWideKeyword(value) {
133
129
  return CSS_WIDE_KEYWORDS.has(value.trim().toLowerCase());
134
130
  }
135
131
  const CSS_WIDE_KEYWORDS = new Set(['initial', 'inherit', 'unset', 'revert', 'revert-layer']);
132
+
133
+ /**
134
+ * Run `task` in the next frame, before it paints: a read there styles what
135
+ * the frame must style anyway, and its writes are what the frame shows.
136
+ */
136
137
  function inNextFrame(view, task) {
137
138
  if (view != null && typeof view.requestAnimationFrame === 'function') {
138
139
  view.requestAnimationFrame(task);
@@ -193,7 +194,6 @@ export class GestureHost {
193
194
  touchIds = new Map();
194
195
  /** Touch.identifier → the element the finger landed on. */
195
196
  touchTargets = new Map();
196
- /** Finger targets with listeners of their own, and how many fingers each. */
197
197
  /**
198
198
  * Finger targets with listeners of their own: how many fingers each, and
199
199
  * how many of those a recognizer could claim while they move (only those
@@ -236,17 +236,17 @@ export class GestureHost {
236
236
  claimedLifts = [];
237
237
  /** Fingers still waiting for their pointerdown, by arena id. */
238
238
  unpairedTouches = new Map();
239
- /** The last position fed per contact, so one channel's echo is dropped. */
240
239
  /** The elements each held contact turned selection off on. */
241
240
  heldSelectionBy = new Map();
242
241
  isWatchingPointer = false;
243
242
  onPointerKindChange = () => this.refreshAll();
243
+ /** The last position fed per contact, so one channel's echo is dropped. */
244
244
  lastFed = new Map();
245
245
  /** When a finger was last down or lifted, and where it landed. */
246
246
  lastTouch = null;
247
- /** The last scroll a finger drove, and when. */
248
247
  /** Scrollers a recognizer is scrolling itself this frame (ownScroll). */
249
248
  ownedScrolls = new Set();
249
+ /** The last scroll a finger drove, and when. */
250
250
  lastScroll = null;
251
251
  nextId = 1;
252
252
  isInstalled = false;
@@ -64,7 +64,9 @@ export type GestureTransitionListener<R> = (recognizer: R, from: GestureState, t
64
64
  export declare function isTransitionAllowed(from: GestureState, to: GestureState): boolean;
65
65
  export declare function isTerminal(state: GestureState): boolean;
66
66
  export declare function isActive(state: GestureState): boolean;
67
- /** The browser behaviors `touch-action` can keep or remove. */
67
+ /**
68
+ * The browser behaviors `touch-action` can keep or remove.
69
+ */
68
70
  export interface NativeTouchBehavior {
69
71
  readonly panX: boolean;
70
72
  readonly panY: boolean;