@astryxdesign/core 0.7.6-canary.fdabeba → 0.7.6

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 (1871) hide show
  1. package/CHANGELOG.md +270 -0
  2. package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
  3. package/dist/AlertDialog/AlertDialog.js +4 -2
  4. package/dist/AppShell/AppShell.d.ts.map +1 -1
  5. package/dist/AppShell/AppShell.js +48 -36
  6. package/dist/Avatar/Avatar.d.ts +1 -1
  7. package/dist/Avatar/Avatar.d.ts.map +1 -1
  8. package/dist/Avatar/Avatar.js +6 -4
  9. package/dist/AvatarGroup/AvatarGroup.d.ts.map +1 -1
  10. package/dist/AvatarGroup/AvatarGroup.js +4 -2
  11. package/dist/AvatarGroup/AvatarGroupOverflow.d.ts +1 -1
  12. package/dist/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -1
  13. package/dist/AvatarGroup/AvatarGroupOverflow.js +5 -3
  14. package/dist/Banner/Banner.d.ts.map +1 -1
  15. package/dist/Banner/Banner.js +10 -7
  16. package/dist/BottomSheet/BottomSheet.d.ts +3 -51
  17. package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
  18. package/dist/BottomSheet/BottomSheet.js +95 -91
  19. package/dist/BottomSheet/BottomSheetEdgeTint.d.ts.map +1 -1
  20. package/dist/BottomSheet/BottomSheetEdgeTint.js +10 -21
  21. package/dist/BottomSheet/BottomSheetHostContext.d.ts.map +1 -1
  22. package/dist/BottomSheet/BottomSheetHostContext.js +6 -10
  23. package/dist/BottomSheet/BottomSheetPanel.d.ts +14 -8
  24. package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
  25. package/dist/BottomSheet/BottomSheetPanel.js +73 -50
  26. package/dist/BottomSheet/BottomSheetSwitcher.d.ts +16 -62
  27. package/dist/BottomSheet/BottomSheetSwitcher.d.ts.map +1 -1
  28. package/dist/BottomSheet/BottomSheetSwitcher.js +54 -72
  29. package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts +8 -0
  30. package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts.map +1 -1
  31. package/dist/BottomSheet/bottomSheetEscape.js +3 -3
  32. package/dist/BottomSheet/bottomSheetStack.d.ts.map +1 -1
  33. package/dist/BottomSheet/bottomSheetStack.js +42 -96
  34. package/dist/BottomSheet/useMobileKeyboard.d.ts +0 -14
  35. package/dist/BottomSheet/useMobileKeyboard.d.ts.map +1 -1
  36. package/dist/BottomSheet/useMobileKeyboard.js +56 -22
  37. package/dist/BottomSheet/useSheetGestures.d.ts +34 -68
  38. package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
  39. package/dist/BottomSheet/useSheetGestures.js +111 -100
  40. package/dist/Breadcrumbs/BreadcrumbItem.js +4 -2
  41. package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  42. package/dist/Breadcrumbs/Breadcrumbs.js +6 -3
  43. package/dist/Button/Button.d.ts +1 -1
  44. package/dist/Button/Button.d.ts.map +1 -1
  45. package/dist/Button/Button.js +19 -10
  46. package/dist/Calendar/Calendar.d.ts.map +1 -1
  47. package/dist/Calendar/Calendar.js +14 -12
  48. package/dist/Calendar/hooks/useCalendarNavigation.d.ts.map +1 -1
  49. package/dist/Calendar/hooks/useCalendarNavigation.js +4 -7
  50. package/dist/Carousel/Carousel.d.ts.map +1 -1
  51. package/dist/Carousel/Carousel.js +6 -3
  52. package/dist/Center/Center.d.ts +1 -1
  53. package/dist/Center/Center.js +1 -1
  54. package/dist/Chat/ChatComposer.d.ts.map +1 -1
  55. package/dist/Chat/ChatComposer.js +16 -8
  56. package/dist/Chat/ChatComposerDrawer.d.ts +1 -1
  57. package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
  58. package/dist/Chat/ChatComposerDrawer.js +5 -3
  59. package/dist/Chat/ChatComposerInput.d.ts +1 -1
  60. package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
  61. package/dist/Chat/ChatComposerInput.js +16 -4
  62. package/dist/Chat/ChatDictationButton.d.ts.map +1 -1
  63. package/dist/Chat/ChatDictationButton.js +6 -3
  64. package/dist/Chat/ChatLayout.d.ts.map +1 -1
  65. package/dist/Chat/ChatLayout.js +7 -4
  66. package/dist/Chat/ChatLayoutScrollButton.d.ts.map +1 -1
  67. package/dist/Chat/ChatLayoutScrollButton.js +6 -3
  68. package/dist/Chat/ChatMessage.d.ts.map +1 -1
  69. package/dist/Chat/ChatMessage.js +12 -4
  70. package/dist/Chat/ChatMessageList.d.ts.map +1 -1
  71. package/dist/Chat/ChatMessageList.js +7 -3
  72. package/dist/Chat/ChatMessageMetadata.d.ts.map +1 -1
  73. package/dist/Chat/ChatMessageMetadata.js +4 -2
  74. package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
  75. package/dist/Chat/ChatPastedTextToken.js +23 -7
  76. package/dist/Chat/ChatSendButton.d.ts.map +1 -1
  77. package/dist/Chat/ChatSendButton.js +6 -3
  78. package/dist/Chat/ChatSystemMessage.d.ts.map +1 -1
  79. package/dist/Chat/ChatSystemMessage.js +2 -1
  80. package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
  81. package/dist/Chat/ChatToolCalls.js +7 -4
  82. package/dist/Chat/chatMessage.vars.stylex.d.ts +16 -0
  83. package/dist/Chat/chatMessage.vars.stylex.d.ts.map +1 -0
  84. package/dist/Chat/chatMessage.vars.stylex.js +19 -0
  85. package/dist/Chat/useSpeechRecognition.d.ts.map +1 -1
  86. package/dist/Chat/useSpeechRecognition.js +5 -2
  87. package/dist/Chat/useTriggerMenu.d.ts +1 -1
  88. package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
  89. package/dist/Chat/useTriggerMenu.js +37 -35
  90. package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
  91. package/dist/CheckboxInput/CheckboxInput.js +5 -3
  92. package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
  93. package/dist/CheckboxList/CheckboxList.js +5 -2
  94. package/dist/CheckboxList/CheckboxListContext.d.ts +8 -0
  95. package/dist/CheckboxList/CheckboxListContext.d.ts.map +1 -1
  96. package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
  97. package/dist/CheckboxList/CheckboxListItem.js +10 -4
  98. package/dist/Citation/Citation.d.ts.map +1 -1
  99. package/dist/Citation/Citation.js +4 -2
  100. package/dist/Code/Code.d.ts +1 -1
  101. package/dist/Code/Code.js +1 -1
  102. package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
  103. package/dist/CodeBlock/CodeBlock.js +30 -8
  104. package/dist/Collapsible/Collapsible.d.ts.map +1 -1
  105. package/dist/Collapsible/Collapsible.js +23 -3
  106. package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
  107. package/dist/CommandPalette/CommandPalette.js +24 -8
  108. package/dist/CommandPalette/CommandPaletteEmpty.d.ts.map +1 -1
  109. package/dist/CommandPalette/CommandPaletteEmpty.js +1 -0
  110. package/dist/CommandPalette/CommandPaletteFooter.d.ts.map +1 -1
  111. package/dist/CommandPalette/CommandPaletteFooter.js +4 -2
  112. package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
  113. package/dist/CommandPalette/CommandPaletteInput.js +12 -7
  114. package/dist/CommandPalette/CommandPaletteList.d.ts.map +1 -1
  115. package/dist/CommandPalette/CommandPaletteList.js +4 -2
  116. package/dist/ComplexSelector/ComplexSelector.d.ts +2 -2
  117. package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
  118. package/dist/ComplexSelector/ComplexSelector.js +5 -3
  119. package/dist/ContextMenu/ContextMenu.d.ts +6 -0
  120. package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
  121. package/dist/ContextMenu/ContextMenu.js +35 -9
  122. package/dist/DateInput/DateInput.d.ts +3 -2
  123. package/dist/DateInput/DateInput.d.ts.map +1 -1
  124. package/dist/DateInput/DateInput.js +60 -15
  125. package/dist/DateInput/MonthScroller.d.ts.map +1 -1
  126. package/dist/DateInput/MonthScroller.js +4 -3
  127. package/dist/DateInput/NativeDateField.d.ts.map +1 -1
  128. package/dist/DateInput/NativeDateField.js +7 -8
  129. package/dist/DateInput/TouchDateField.d.ts.map +1 -1
  130. package/dist/DateInput/TouchDateField.js +12 -12
  131. package/dist/DateRangeInput/DateRangeInput.d.ts +3 -2
  132. package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
  133. package/dist/DateRangeInput/DateRangeInput.js +7 -8
  134. package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
  135. package/dist/DateTimeInput/DateTimeInput.js +41 -26
  136. package/dist/DateTimeInput/NativeDateSegment.d.ts.map +1 -1
  137. package/dist/DateTimeInput/NativeDateSegment.js +5 -2
  138. package/dist/DateTimeInput/NativeTimeSegment.d.ts.map +1 -1
  139. package/dist/DateTimeInput/NativeTimeSegment.js +5 -2
  140. package/dist/DateTimeInput/TouchDateTimeField.d.ts.map +1 -1
  141. package/dist/DateTimeInput/TouchDateTimeField.js +12 -12
  142. package/dist/Dialog/Dialog.d.ts +1 -1
  143. package/dist/Dialog/Dialog.d.ts.map +1 -1
  144. package/dist/Dialog/Dialog.js +35 -19
  145. package/dist/Dialog/DialogHeader.d.ts.map +1 -1
  146. package/dist/Dialog/DialogHeader.js +4 -2
  147. package/dist/Drawer/Drawer.d.ts +2 -2
  148. package/dist/Drawer/Drawer.d.ts.map +1 -1
  149. package/dist/Drawer/Drawer.js +27 -5
  150. package/dist/Drawer/DrawerHeader.d.ts.map +1 -1
  151. package/dist/Drawer/DrawerHeader.js +4 -2
  152. package/dist/DropdownMenu/DropdownMenu.d.ts +1 -1
  153. package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  154. package/dist/DropdownMenu/DropdownMenu.js +31 -73
  155. package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts +3 -2
  156. package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
  157. package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +4 -3
  158. package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
  159. package/dist/DropdownMenu/DropdownMenuItem.js +4 -3
  160. package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts +4 -3
  161. package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
  162. package/dist/DropdownMenu/DropdownMenuRadioItem.js +4 -3
  163. package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
  164. package/dist/DropdownMenu/DropdownMenuSubMenu.js +15 -9
  165. package/dist/DropdownMenu/MenuBottomSheetActionList.d.ts.map +1 -1
  166. package/dist/DropdownMenu/MenuBottomSheetActionList.js +9 -3
  167. package/dist/Field/Field.d.ts +2 -2
  168. package/dist/Field/Field.d.ts.map +1 -1
  169. package/dist/Field/FieldLabel.d.ts +1 -1
  170. package/dist/Field/FieldLabel.d.ts.map +1 -1
  171. package/dist/Field/FieldLabel.js +10 -16
  172. package/dist/Field/InputClearButton.d.ts.map +1 -1
  173. package/dist/Field/InputClearButton.js +5 -3
  174. package/dist/Field/PanelSearchInput.d.ts.map +1 -1
  175. package/dist/Field/PanelSearchInput.js +10 -5
  176. package/dist/Field/fieldStatusPlacement.d.ts +15 -0
  177. package/dist/Field/fieldStatusPlacement.d.ts.map +1 -0
  178. package/dist/Field/fieldStatusPlacement.js +1 -0
  179. package/dist/Field/index.d.ts +4 -1
  180. package/dist/Field/index.d.ts.map +1 -1
  181. package/dist/Field/index.js +2 -1
  182. package/dist/Field/inputDisabledFocus.d.ts +16 -3
  183. package/dist/Field/inputDisabledFocus.d.ts.map +1 -1
  184. package/dist/Field/inputDisabledFocus.js +19 -3
  185. package/dist/Field/inputStyles.stylex.d.ts +12 -9
  186. package/dist/Field/inputStyles.stylex.d.ts.map +1 -1
  187. package/dist/Field/inputStyles.stylex.js +12 -9
  188. package/dist/Field/textEntryTraits.d.ts +86 -0
  189. package/dist/Field/textEntryTraits.d.ts.map +1 -0
  190. package/dist/Field/textEntryTraits.js +81 -0
  191. package/dist/FieldStatus/FieldStatus.d.ts +13 -28
  192. package/dist/FieldStatus/FieldStatus.d.ts.map +1 -1
  193. package/dist/FieldStatus/FieldStatus.js +25 -3
  194. package/dist/FieldStatus/index.d.ts +7 -0
  195. package/dist/FieldStatus/index.d.ts.map +1 -1
  196. package/dist/FileInput/FileInput.d.ts +7 -2
  197. package/dist/FileInput/FileInput.d.ts.map +1 -1
  198. package/dist/FileInput/FileInput.js +31 -4
  199. package/dist/Grid/Grid.d.ts +6 -4
  200. package/dist/Grid/Grid.d.ts.map +1 -1
  201. package/dist/Grid/GridSpan.d.ts +2 -0
  202. package/dist/Grid/GridSpan.d.ts.map +1 -1
  203. package/dist/Grid/GridSpan.js +2 -0
  204. package/dist/HStack/HStack.d.ts +2 -1
  205. package/dist/HStack/HStack.d.ts.map +1 -1
  206. package/dist/HStack/HStack.js +2 -1
  207. package/dist/Heading/Heading.d.ts +5 -3
  208. package/dist/Heading/Heading.d.ts.map +1 -1
  209. package/dist/Heading/Heading.js +5 -3
  210. package/dist/HoverCard/HoverCard.d.ts +8 -5
  211. package/dist/HoverCard/HoverCard.d.ts.map +1 -1
  212. package/dist/HoverCard/HoverCard.js +1 -0
  213. package/dist/HoverCard/useHoverCard.d.ts +3 -2
  214. package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
  215. package/dist/HoverCard/useHoverCard.js +7 -0
  216. package/dist/InputGroup/groupStyles.d.ts.map +1 -1
  217. package/dist/InputGroup/groupStyles.js +12 -6
  218. package/dist/Item/Item.js +5 -5
  219. package/dist/Item/ItemSwipeLayer.d.ts.map +1 -1
  220. package/dist/Item/ItemSwipeLayer.js +8 -2
  221. package/dist/Kbd/Kbd.d.ts.map +1 -1
  222. package/dist/Kbd/Kbd.js +7 -3
  223. package/dist/Layer/layerClickBoundary.d.ts +35 -0
  224. package/dist/Layer/layerClickBoundary.d.ts.map +1 -0
  225. package/dist/Layer/layerClickBoundary.js +61 -0
  226. package/dist/Layer/layerStructureReset.stylex.d.ts +1 -0
  227. package/dist/Layer/layerStructureReset.stylex.d.ts.map +1 -1
  228. package/dist/Layer/layerStructureReset.stylex.js +1 -0
  229. package/dist/Layer/layerSurfacePress.d.ts +9 -0
  230. package/dist/Layer/layerSurfacePress.d.ts.map +1 -0
  231. package/dist/Layer/layerSurfacePress.js +35 -0
  232. package/dist/Layer/outsidePress.d.ts +45 -0
  233. package/dist/Layer/outsidePress.d.ts.map +1 -0
  234. package/dist/Layer/outsidePress.js +132 -0
  235. package/dist/Layer/useLayer.d.ts +8 -0
  236. package/dist/Layer/useLayer.d.ts.map +1 -1
  237. package/dist/Layer/useLayer.js +17 -6
  238. package/dist/Layer/useTouchTrigger.d.ts +26 -3
  239. package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
  240. package/dist/Layer/useTouchTrigger.js +79 -10
  241. package/dist/Layout/LayoutSlotsContext.d.ts +5 -0
  242. package/dist/Layout/LayoutSlotsContext.d.ts.map +1 -1
  243. package/dist/Layout/LayoutSlotsContext.js +3 -2
  244. package/dist/Layout/layoutReset.d.ts +44 -0
  245. package/dist/Layout/layoutReset.d.ts.map +1 -0
  246. package/dist/Layout/layoutReset.js +40 -0
  247. package/dist/Lightbox/Lightbox.d.ts.map +1 -1
  248. package/dist/Lightbox/Lightbox.js +14 -7
  249. package/dist/Link/Link.d.ts.map +1 -1
  250. package/dist/Link/Link.js +5 -3
  251. package/dist/Markdown/Markdown.d.ts.map +1 -1
  252. package/dist/Markdown/Markdown.js +5 -2
  253. package/dist/Markdown/plugins/HeadingLinksRenderer.d.ts.map +1 -1
  254. package/dist/Markdown/plugins/HeadingLinksRenderer.js +4 -2
  255. package/dist/MetadataList/MetadataList.d.ts +1 -1
  256. package/dist/MetadataList/MetadataList.d.ts.map +1 -1
  257. package/dist/MetadataList/MetadataList.js +9 -5
  258. package/dist/MetadataList/MetadataListItem.d.ts.map +1 -1
  259. package/dist/MetadataList/MetadataListItem.js +2 -1
  260. package/dist/MobileNav/MobileNav.d.ts.map +1 -1
  261. package/dist/MobileNav/MobileNav.js +15 -5
  262. package/dist/MobileNav/MobileNavToggle.d.ts.map +1 -1
  263. package/dist/MobileNav/MobileNavToggle.js +4 -2
  264. package/dist/MoreMenu/MoreMenu.d.ts.map +1 -1
  265. package/dist/MoreMenu/MoreMenu.js +4 -2
  266. package/dist/MultiSelector/MultiSelector.d.ts +2 -2
  267. package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
  268. package/dist/MultiSelector/MultiSelector.js +22 -23
  269. package/dist/MultiSelector/hooks.d.ts.map +1 -1
  270. package/dist/MultiSelector/hooks.js +4 -2
  271. package/dist/NavMenu/NavHeadingMenuItem.d.ts.map +1 -1
  272. package/dist/NavMenu/NavHeadingMenuItem.js +2 -1
  273. package/dist/NumberInput/NumberInput.d.ts +3 -2
  274. package/dist/NumberInput/NumberInput.d.ts.map +1 -1
  275. package/dist/NumberInput/NumberInput.js +7 -3
  276. package/dist/Outline/Outline.d.ts.map +1 -1
  277. package/dist/Outline/Outline.js +4 -2
  278. package/dist/OverflowList/OverflowList.d.ts.map +1 -1
  279. package/dist/OverflowList/OverflowList.js +2 -1
  280. package/dist/Pagination/Pagination.d.ts.map +1 -1
  281. package/dist/Pagination/Pagination.js +6 -3
  282. package/dist/Popover/Popover.d.ts.map +1 -1
  283. package/dist/Popover/Popover.js +8 -5
  284. package/dist/Popover/usePopover.d.ts +7 -1
  285. package/dist/Popover/usePopover.d.ts.map +1 -1
  286. package/dist/Popover/usePopover.js +12 -4
  287. package/dist/PowerSearch/PowerSearch.d.ts +3 -2
  288. package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
  289. package/dist/PowerSearch/PowerSearch.js +8 -4
  290. package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
  291. package/dist/PowerSearch/PowerSearchEditPopover.js +7 -4
  292. package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
  293. package/dist/PowerSearch/PowerSearchToken.js +2 -2
  294. package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
  295. package/dist/PowerSearch/PowerSearchValueEditor.js +16 -13
  296. package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
  297. package/dist/PowerSearch/formatFilterValue.js +3 -0
  298. package/dist/PowerSearch/resolveOperatorLabel.d.ts +4 -1
  299. package/dist/PowerSearch/resolveOperatorLabel.d.ts.map +1 -1
  300. package/dist/PowerSearch/resolveOperatorLabel.js +5 -0
  301. package/dist/PowerSearch/usePowerSearchConfig.d.ts.map +1 -1
  302. package/dist/PowerSearch/usePowerSearchConfig.js +3 -0
  303. package/dist/PowerSearch/usePowerSearchSource.d.ts.map +1 -1
  304. package/dist/PowerSearch/usePowerSearchSource.js +3 -2
  305. package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
  306. package/dist/ProgressBar/ProgressBar.js +3 -1
  307. package/dist/RadioList/RadioList.d.ts.map +1 -1
  308. package/dist/RadioList/RadioList.js +7 -2
  309. package/dist/RadioList/RadioListItem.d.ts.map +1 -1
  310. package/dist/RadioList/RadioListItem.js +8 -2
  311. package/dist/RadioList/RadioListReasonContext.d.ts +2 -0
  312. package/dist/RadioList/RadioListReasonContext.d.ts.map +1 -0
  313. package/dist/RadioList/RadioListReasonContext.js +22 -0
  314. package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
  315. package/dist/Resizable/ResizeHandle.js +4 -2
  316. package/dist/Resizable/resizableModel.d.ts +64 -0
  317. package/dist/Resizable/resizableModel.d.ts.map +1 -0
  318. package/dist/Resizable/resizableModel.js +287 -0
  319. package/dist/Resizable/useResizable.d.ts +2 -2
  320. package/dist/Resizable/useResizable.d.ts.map +1 -1
  321. package/dist/Resizable/useResizable.js +1 -284
  322. package/dist/SegmentedControl/SegmentedControl.d.ts +7 -5
  323. package/dist/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  324. package/dist/SegmentedControl/SegmentedControl.js +26 -16
  325. package/dist/SegmentedControl/SegmentedControlContext.d.ts +4 -5
  326. package/dist/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
  327. package/dist/SegmentedControl/SegmentedControlItem.d.ts +1 -1
  328. package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
  329. package/dist/SegmentedControl/SegmentedControlItem.js +16 -13
  330. package/dist/SelectableCard/SelectableCard.d.ts.map +1 -1
  331. package/dist/SelectableCard/SelectableCard.js +59 -0
  332. package/dist/Selector/Selector.d.ts +3 -3
  333. package/dist/Selector/Selector.d.ts.map +1 -1
  334. package/dist/Selector/Selector.js +11 -10
  335. package/dist/Selector/useSelectorPresentation.d.ts +7 -1
  336. package/dist/Selector/useSelectorPresentation.d.ts.map +1 -1
  337. package/dist/Selector/useSelectorPresentation.js +2 -1
  338. package/dist/SideNav/SideNav.d.ts.map +1 -1
  339. package/dist/SideNav/SideNav.js +156 -23
  340. package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
  341. package/dist/SideNav/SideNavCollapseButton.js +16 -4
  342. package/dist/SideNav/SideNavFocusTargetsContext.d.ts +11 -0
  343. package/dist/SideNav/SideNavFocusTargetsContext.d.ts.map +1 -0
  344. package/dist/SideNav/SideNavFocusTargetsContext.js +16 -0
  345. package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
  346. package/dist/SideNav/SideNavHeading.js +26 -17
  347. package/dist/SideNav/SideNavItem.d.ts.map +1 -1
  348. package/dist/SideNav/SideNavItem.js +21 -5
  349. package/dist/SideNav/SideNavSection.d.ts.map +1 -1
  350. package/dist/SideNav/SideNavSection.js +2 -1
  351. package/dist/SideNav/railMotion.d.ts +5 -5
  352. package/dist/SideNav/railMotion.d.ts.map +1 -1
  353. package/dist/SideNav/railMotion.js +69 -177
  354. package/dist/Slider/Slider.d.ts.map +1 -1
  355. package/dist/Slider/Slider.js +16 -10
  356. package/dist/Spinner/Spinner.d.ts +1 -1
  357. package/dist/Spinner/Spinner.d.ts.map +1 -1
  358. package/dist/Spinner/Spinner.js +6 -4
  359. package/dist/Stack/Stack.d.ts +1 -1
  360. package/dist/Stack/stack.stylex.d.ts +1 -1
  361. package/dist/Stack/stack.stylex.js +1 -1
  362. package/dist/Stepper/Step.d.ts.map +1 -1
  363. package/dist/Stepper/Step.js +6 -3
  364. package/dist/Stepper/Stepper.d.ts.map +1 -1
  365. package/dist/Stepper/Stepper.js +5 -3
  366. package/dist/Switch/Switch.d.ts +1 -1
  367. package/dist/Switch/Switch.d.ts.map +1 -1
  368. package/dist/Switch/Switch.js +5 -3
  369. package/dist/TabList/TabList.d.ts.map +1 -1
  370. package/dist/TabList/TabList.js +5 -3
  371. package/dist/Table/BaseTable.d.ts.map +1 -1
  372. package/dist/Table/BaseTable.js +11 -8
  373. package/dist/Table/Table.d.ts.map +1 -1
  374. package/dist/Table/Table.js +6 -3
  375. package/dist/Table/TableSelectionToolbar.d.ts.map +1 -1
  376. package/dist/Table/TableSelectionToolbar.js +4 -2
  377. package/dist/Table/glidingDivider.d.ts +8 -1
  378. package/dist/Table/glidingDivider.d.ts.map +1 -1
  379. package/dist/Table/glidingDivider.js +8 -3
  380. package/dist/Table/plugins/columnResize/useTableColumnResize.d.ts.map +1 -1
  381. package/dist/Table/plugins/columnResize/useTableColumnResize.js +6 -3
  382. package/dist/Table/plugins/filtering/useTableFiltering.d.ts.map +1 -1
  383. package/dist/Table/plugins/filtering/useTableFiltering.js +14 -10
  384. package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -1
  385. package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +5 -3
  386. package/dist/Table/plugins/pagination/useTablePagination.d.ts.map +1 -1
  387. package/dist/Table/plugins/pagination/useTablePagination.js +6 -3
  388. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts +1 -1
  389. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
  390. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +8 -5
  391. package/dist/Table/plugins/rowStatus/useTableRowStatus.d.ts.map +1 -1
  392. package/dist/Table/plugins/rowStatus/useTableRowStatus.js +6 -3
  393. package/dist/Table/plugins/selection/useTableSelection.d.ts.map +1 -1
  394. package/dist/Table/plugins/selection/useTableSelection.js +7 -4
  395. package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
  396. package/dist/Table/plugins/sortable/useTableSortable.js +8 -5
  397. package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
  398. package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +1 -2
  399. package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
  400. package/dist/Table/plugins/tree/useTableTreeData.js +8 -5
  401. package/dist/Text/text.stylex.d.ts +2 -0
  402. package/dist/Text/text.stylex.d.ts.map +1 -1
  403. package/dist/Text/text.stylex.js +11 -0
  404. package/dist/TextArea/TextArea.d.ts +7 -5
  405. package/dist/TextArea/TextArea.d.ts.map +1 -1
  406. package/dist/TextArea/TextArea.js +25 -7
  407. package/dist/TextInput/TextInput.d.ts +23 -8
  408. package/dist/TextInput/TextInput.d.ts.map +1 -1
  409. package/dist/TextInput/TextInput.js +30 -5
  410. package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
  411. package/dist/Thumbnail/Thumbnail.js +4 -2
  412. package/dist/TimeInput/TimeInput.d.ts +3 -2
  413. package/dist/TimeInput/TimeInput.d.ts.map +1 -1
  414. package/dist/TimeInput/TimeInput.js +7 -10
  415. package/dist/TimeInput/TouchTimeField.d.ts.map +1 -1
  416. package/dist/TimeInput/TouchTimeField.js +8 -9
  417. package/dist/Timer/Timer.js +1 -1
  418. package/dist/Timestamp/Timestamp.d.ts.map +1 -1
  419. package/dist/Timestamp/Timestamp.js +5 -3
  420. package/dist/Timestamp/TimestampHoverCard.d.ts.map +1 -1
  421. package/dist/Timestamp/TimestampHoverCard.js +4 -2
  422. package/dist/Toast/Toast.d.ts.map +1 -1
  423. package/dist/Toast/Toast.js +5 -3
  424. package/dist/Toast/ToastViewport.d.ts.map +1 -1
  425. package/dist/Toast/ToastViewport.js +6 -2
  426. package/dist/Toast/useToast.d.ts.map +1 -1
  427. package/dist/Toast/useToast.js +8 -2
  428. package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
  429. package/dist/ToggleButton/ToggleButton.js +11 -3
  430. package/dist/Token/Token.d.ts.map +1 -1
  431. package/dist/Token/Token.js +8 -3
  432. package/dist/Token/TokenLink.d.ts +9 -2
  433. package/dist/Token/TokenLink.d.ts.map +1 -1
  434. package/dist/Token/TokenLink.js +2 -0
  435. package/dist/Tokenizer/Tokenizer.d.ts +12 -5
  436. package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
  437. package/dist/Tokenizer/Tokenizer.js +81 -54
  438. package/dist/Tokenizer/TokenizerBottomSheet.d.ts +1 -1
  439. package/dist/Tokenizer/TokenizerBottomSheet.d.ts.map +1 -1
  440. package/dist/Tokenizer/TokenizerBottomSheet.js +6 -4
  441. package/dist/Tooltip/Tooltip.d.ts +4 -3
  442. package/dist/Tooltip/Tooltip.d.ts.map +1 -1
  443. package/dist/Tooltip/useTooltip.d.ts +4 -3
  444. package/dist/Tooltip/useTooltip.d.ts.map +1 -1
  445. package/dist/Tooltip/useTooltip.js +40 -8
  446. package/dist/TopNav/TopNav.d.ts.map +1 -1
  447. package/dist/TopNav/TopNav.js +19 -13
  448. package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
  449. package/dist/TopNav/TopNavHeading.js +23 -13
  450. package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
  451. package/dist/TopNav/TopNavMegaMenu.js +4 -3
  452. package/dist/TopNav/TopNavMegaMenuFeaturedCard.d.ts.map +1 -1
  453. package/dist/TopNav/TopNavMegaMenuFeaturedCard.js +9 -2
  454. package/dist/TopNav/TopNavMegaMenuItem.d.ts.map +1 -1
  455. package/dist/TopNav/TopNavMegaMenuItem.js +3 -2
  456. package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
  457. package/dist/TopNav/TopNavMenu.js +2 -1
  458. package/dist/TreeList/TreeList.d.ts.map +1 -1
  459. package/dist/TreeList/TreeList.js +68 -7
  460. package/dist/TreeList/TreeListItem.d.ts.map +1 -1
  461. package/dist/TreeList/TreeListItem.js +10 -6
  462. package/dist/Typeahead/BaseTypeahead.d.ts +8 -5
  463. package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
  464. package/dist/Typeahead/BaseTypeahead.js +432 -68
  465. package/dist/Typeahead/Typeahead.d.ts +13 -8
  466. package/dist/Typeahead/Typeahead.d.ts.map +1 -1
  467. package/dist/Typeahead/Typeahead.disabled.a11y.chromium.spec.d.ts.map +1 -0
  468. package/dist/Typeahead/Typeahead.js +13 -9
  469. package/dist/Typeahead/committedChoicesKey.d.ts +12 -0
  470. package/dist/Typeahead/committedChoicesKey.d.ts.map +1 -0
  471. package/dist/Typeahead/committedChoicesKey.js +24 -0
  472. package/dist/Typeahead/index.d.ts +1 -1
  473. package/dist/Typeahead/index.d.ts.map +1 -1
  474. package/dist/Typeahead/types.d.ts +26 -3
  475. package/dist/Typeahead/types.d.ts.map +1 -1
  476. package/dist/astryx.css +27 -7
  477. package/dist/gestures/GestureArena.d.ts +17 -3
  478. package/dist/gestures/GestureArena.d.ts.map +1 -1
  479. package/dist/gestures/GestureArena.js +70 -38
  480. package/dist/gestures/GestureHost.d.ts +330 -95
  481. package/dist/gestures/GestureHost.d.ts.map +1 -1
  482. package/dist/gestures/GestureHost.js +1304 -475
  483. package/dist/gestures/GestureRecognizer.d.ts +56 -17
  484. package/dist/gestures/GestureRecognizer.d.ts.map +1 -1
  485. package/dist/gestures/GestureRecognizer.js +28 -2
  486. package/dist/gestures/LongPressGestureRecognizer.d.ts +2 -0
  487. package/dist/gestures/LongPressGestureRecognizer.d.ts.map +1 -1
  488. package/dist/gestures/LongPressGestureRecognizer.js +14 -1
  489. package/dist/gestures/PanGestureRecognizer.d.ts +11 -0
  490. package/dist/gestures/PanGestureRecognizer.d.ts.map +1 -1
  491. package/dist/gestures/PanGestureRecognizer.js +25 -0
  492. package/dist/gestures/PinchGestureRecognizer.d.ts +3 -2
  493. package/dist/gestures/PinchGestureRecognizer.d.ts.map +1 -1
  494. package/dist/gestures/PinchGestureRecognizer.js +10 -8
  495. package/dist/gestures/PressTracker.d.ts +31 -3
  496. package/dist/gestures/PressTracker.d.ts.map +1 -1
  497. package/dist/gestures/PressTracker.js +25 -6
  498. package/dist/gestures/TapGestureRecognizer.d.ts +2 -0
  499. package/dist/gestures/TapGestureRecognizer.d.ts.map +1 -1
  500. package/dist/gestures/TapGestureRecognizer.js +5 -0
  501. package/dist/gestures/VelocityTracker.d.ts +12 -0
  502. package/dist/gestures/VelocityTracker.d.ts.map +1 -1
  503. package/dist/gestures/VelocityTracker.js +38 -0
  504. package/dist/gestures/fingerScroll.d.ts +14 -0
  505. package/dist/gestures/fingerScroll.d.ts.map +1 -0
  506. package/dist/gestures/fingerScroll.js +181 -0
  507. package/dist/gestures/gestureSync.d.ts +12 -0
  508. package/dist/gestures/gestureSync.d.ts.map +1 -0
  509. package/dist/gestures/gestureSync.js +59 -0
  510. package/dist/gestures/haptics.d.ts +6 -3
  511. package/dist/gestures/haptics.d.ts.map +1 -1
  512. package/dist/gestures/haptics.js +9 -10
  513. package/dist/gestures/hostRegistry.d.ts +15 -0
  514. package/dist/gestures/hostRegistry.d.ts.map +1 -0
  515. package/dist/gestures/hostRegistry.js +16 -0
  516. package/dist/gestures/index.d.ts +6 -2
  517. package/dist/gestures/index.d.ts.map +1 -1
  518. package/dist/gestures/index.js +3 -1
  519. package/dist/gestures/nativeScroll.d.ts +2 -32
  520. package/dist/gestures/nativeScroll.d.ts.map +1 -1
  521. package/dist/gestures/nativeScroll.js +5 -17
  522. package/dist/gestures/pageHold.d.ts +21 -0
  523. package/dist/gestures/pageHold.d.ts.map +1 -0
  524. package/dist/gestures/pageHold.js +216 -0
  525. package/dist/gestures/recognizerInternals.d.ts +52 -0
  526. package/dist/gestures/recognizerInternals.d.ts.map +1 -0
  527. package/dist/gestures/recognizerInternals.js +33 -0
  528. package/dist/gestures/selectionLock.d.ts +10 -0
  529. package/dist/gestures/selectionLock.d.ts.map +1 -0
  530. package/dist/gestures/selectionLock.js +12 -0
  531. package/dist/gestures/touchAction.d.ts +10 -12
  532. package/dist/gestures/touchAction.d.ts.map +1 -1
  533. package/dist/gestures/touchAction.js +13 -21
  534. package/dist/gestures/types.d.ts +17 -0
  535. package/dist/gestures/types.d.ts.map +1 -1
  536. package/dist/gestures/useFingerScroll.d.ts +35 -0
  537. package/dist/gestures/useFingerScroll.d.ts.map +1 -0
  538. package/dist/gestures/useFingerScroll.js +70 -0
  539. package/dist/gestures/useGestureRecognizer.d.ts +23 -15
  540. package/dist/gestures/useGestureRecognizer.d.ts.map +1 -1
  541. package/dist/gestures/useGestureRecognizer.js +51 -160
  542. package/dist/gestures/usePressTracker.d.ts +34 -0
  543. package/dist/gestures/usePressTracker.d.ts.map +1 -0
  544. package/dist/gestures/usePressTracker.js +168 -0
  545. package/dist/hooks/ModalAnnounceProvider.d.ts +5 -6
  546. package/dist/hooks/ModalAnnounceProvider.d.ts.map +1 -1
  547. package/dist/hooks/ModalAnnounceProvider.js +13 -13
  548. package/dist/hooks/actionGroupTracker.d.ts +12 -0
  549. package/dist/hooks/actionGroupTracker.d.ts.map +1 -1
  550. package/dist/hooks/actionGroupTracker.js +23 -55
  551. package/dist/hooks/menuPressGesture.d.ts +21 -26
  552. package/dist/hooks/menuPressGesture.d.ts.map +1 -1
  553. package/dist/hooks/menuPressGesture.js +25 -30
  554. package/dist/hooks/menuPressMarker.d.ts +13 -0
  555. package/dist/hooks/menuPressMarker.d.ts.map +1 -0
  556. package/dist/hooks/menuPressMarker.js +15 -0
  557. package/dist/hooks/menuPressOnItems.d.ts +2 -9
  558. package/dist/hooks/menuPressOnItems.d.ts.map +1 -1
  559. package/dist/hooks/menuPressOnItems.js +7 -9
  560. package/dist/hooks/modalAnnounce.d.ts +1 -1
  561. package/dist/hooks/modalAnnounce.d.ts.map +1 -1
  562. package/dist/hooks/modalAnnounce.js +20 -39
  563. package/dist/hooks/scrollbarGutter.d.ts.map +1 -1
  564. package/dist/hooks/scrollbarGutter.js +9 -16
  565. package/dist/hooks/useAnimatedLayout.d.ts +2 -3
  566. package/dist/hooks/useAnimatedLayout.d.ts.map +1 -1
  567. package/dist/hooks/useAnimatedLayout.js +2 -3
  568. package/dist/hooks/useAnnounce.d.ts +16 -37
  569. package/dist/hooks/useAnnounce.d.ts.map +1 -1
  570. package/dist/hooks/useAnnounce.js +56 -92
  571. package/dist/hooks/useAnnounceRenderedText.d.ts +17 -48
  572. package/dist/hooks/useAnnounceRenderedText.d.ts.map +1 -1
  573. package/dist/hooks/useAnnounceRenderedText.js +22 -42
  574. package/dist/hooks/useAttachment.d.ts +22 -0
  575. package/dist/hooks/useAttachment.d.ts.map +1 -0
  576. package/dist/hooks/useAttachment.js +50 -0
  577. package/dist/hooks/useAutoMediaMode.d.ts.map +1 -1
  578. package/dist/hooks/useAutoMediaMode.js +29 -54
  579. package/dist/hooks/useBusyAnnouncement.d.ts +2 -16
  580. package/dist/hooks/useBusyAnnouncement.d.ts.map +1 -1
  581. package/dist/hooks/useBusyAnnouncement.js +13 -20
  582. package/dist/hooks/useClickableContainer.d.ts +30 -13
  583. package/dist/hooks/useClickableContainer.d.ts.map +1 -1
  584. package/dist/hooks/useClickableContainer.js +59 -34
  585. package/dist/hooks/useContainerReveal.d.ts +9 -36
  586. package/dist/hooks/useContainerReveal.d.ts.map +1 -1
  587. package/dist/hooks/useContainerReveal.js +9 -36
  588. package/dist/hooks/useDevWarning.d.ts.map +1 -1
  589. package/dist/hooks/useDevWarning.js +3 -8
  590. package/dist/hooks/useEntryAnimation.d.ts.map +1 -1
  591. package/dist/hooks/useEntryAnimation.js +1 -3
  592. package/dist/hooks/useFocusReturnVisibility.d.ts +8 -1
  593. package/dist/hooks/useFocusReturnVisibility.d.ts.map +1 -1
  594. package/dist/hooks/useFocusReturnVisibility.js +14 -8
  595. package/dist/hooks/useFocusTrap.d.ts.map +1 -1
  596. package/dist/hooks/useFocusTrap.js +2 -3
  597. package/dist/hooks/useHighlightedOptionScroll.d.ts +2 -4
  598. package/dist/hooks/useHighlightedOptionScroll.d.ts.map +1 -1
  599. package/dist/hooks/useHighlightedOptionScroll.js +1 -1
  600. package/dist/hooks/useHotkeys.d.ts.map +1 -1
  601. package/dist/hooks/useHotkeys.js +4 -16
  602. package/dist/hooks/useImageMode.d.ts.map +1 -1
  603. package/dist/hooks/useImageMode.js +6 -45
  604. package/dist/hooks/useIndicatorFocusRing.d.ts.map +1 -1
  605. package/dist/hooks/useIndicatorFocusRing.js +13 -38
  606. package/dist/hooks/useInputStatusIcon.d.ts +11 -3
  607. package/dist/hooks/useInputStatusIcon.d.ts.map +1 -1
  608. package/dist/hooks/useInputStatusIcon.js +21 -35
  609. package/dist/hooks/useInteractiveRole.d.ts.map +1 -1
  610. package/dist/hooks/useInteractiveRole.js +6 -24
  611. package/dist/hooks/useKeyboardHint.d.ts +1 -1
  612. package/dist/hooks/useKeyboardHint.d.ts.map +1 -1
  613. package/dist/hooks/useKeyboardHint.js +14 -5
  614. package/dist/hooks/useListFocus.d.ts +29 -0
  615. package/dist/hooks/useListFocus.d.ts.map +1 -1
  616. package/dist/hooks/useListFocus.js +53 -10
  617. package/dist/hooks/useLongPress.d.ts +21 -0
  618. package/dist/hooks/useLongPress.d.ts.map +1 -1
  619. package/dist/hooks/useLongPress.js +55 -28
  620. package/dist/hooks/useMenuHover.d.ts.map +1 -1
  621. package/dist/hooks/useMenuHover.js +38 -52
  622. package/dist/hooks/useMenuPress.d.ts +33 -40
  623. package/dist/hooks/useMenuPress.d.ts.map +1 -1
  624. package/dist/hooks/useMenuPress.js +108 -182
  625. package/dist/hooks/useOverflow.d.ts.map +1 -1
  626. package/dist/hooks/useOverflow.js +3 -8
  627. package/dist/hooks/useRenamedProp.d.ts.map +1 -1
  628. package/dist/hooks/useRenamedProp.js +8 -17
  629. package/dist/hooks/useScrollOverflow.d.ts.map +1 -1
  630. package/dist/hooks/useScrollOverflow.js +9 -27
  631. package/dist/hooks/useScrollableArea.d.ts +2 -4
  632. package/dist/hooks/useScrollableArea.d.ts.map +1 -1
  633. package/dist/hooks/useScrollableArea.js +14 -21
  634. package/dist/hooks/useSettledOpen.d.ts +16 -0
  635. package/dist/hooks/useSettledOpen.d.ts.map +1 -0
  636. package/dist/hooks/useSettledOpen.js +44 -0
  637. package/dist/hooks/useStreamingText.d.ts.map +1 -1
  638. package/dist/hooks/useStreamingText.js +14 -36
  639. package/dist/hooks/useTreeFocus.d.ts +11 -1
  640. package/dist/hooks/useTreeFocus.d.ts.map +1 -1
  641. package/dist/hooks/useTreeFocus.js +32 -8
  642. package/dist/hooks/useTypeahead.d.ts +3 -1
  643. package/dist/hooks/useTypeahead.d.ts.map +1 -1
  644. package/dist/hooks/useTypeahead.js +21 -15
  645. package/dist/i18n/InternationalizationContext.d.ts +1 -1
  646. package/dist/i18n/InternationalizationContext.js +1 -1
  647. package/dist/i18n/englishFallback.d.ts +32 -0
  648. package/dist/i18n/englishFallback.d.ts.map +1 -0
  649. package/dist/i18n/englishFallback.js +38 -0
  650. package/dist/i18n/fullEnglishFallback.d.ts +3 -0
  651. package/dist/i18n/fullEnglishFallback.d.ts.map +1 -0
  652. package/dist/i18n/fullEnglishFallback.js +26 -0
  653. package/dist/i18n/generated-english/AlertDialog/AlertDialog.generated.d.ts +8 -0
  654. package/dist/i18n/generated-english/AlertDialog/AlertDialog.generated.d.ts.map +1 -0
  655. package/dist/i18n/generated-english/AlertDialog/AlertDialog.generated.js +12 -0
  656. package/dist/i18n/generated-english/AppShell/AppShell.generated.d.ts +8 -0
  657. package/dist/i18n/generated-english/AppShell/AppShell.generated.d.ts.map +1 -0
  658. package/dist/i18n/generated-english/AppShell/AppShell.generated.js +13 -0
  659. package/dist/i18n/generated-english/Avatar/Avatar.generated.d.ts +8 -0
  660. package/dist/i18n/generated-english/Avatar/Avatar.generated.d.ts.map +1 -0
  661. package/dist/i18n/generated-english/Avatar/Avatar.generated.js +12 -0
  662. package/dist/i18n/generated-english/AvatarGroup/AvatarGroup.generated.d.ts +8 -0
  663. package/dist/i18n/generated-english/AvatarGroup/AvatarGroup.generated.d.ts.map +1 -0
  664. package/dist/i18n/generated-english/AvatarGroup/AvatarGroup.generated.js +13 -0
  665. package/dist/i18n/generated-english/AvatarGroup/AvatarGroupOverflow.generated.d.ts +8 -0
  666. package/dist/i18n/generated-english/AvatarGroup/AvatarGroupOverflow.generated.d.ts.map +1 -0
  667. package/dist/i18n/generated-english/AvatarGroup/AvatarGroupOverflow.generated.js +12 -0
  668. package/dist/i18n/generated-english/Banner/Banner.generated.d.ts +8 -0
  669. package/dist/i18n/generated-english/Banner/Banner.generated.d.ts.map +1 -0
  670. package/dist/i18n/generated-english/Banner/Banner.generated.js +15 -0
  671. package/dist/i18n/generated-english/Breadcrumbs/Breadcrumbs.generated.d.ts +8 -0
  672. package/dist/i18n/generated-english/Breadcrumbs/Breadcrumbs.generated.d.ts.map +1 -0
  673. package/dist/i18n/generated-english/Breadcrumbs/Breadcrumbs.generated.js +12 -0
  674. package/dist/i18n/generated-english/Button/Button.generated.d.ts +8 -0
  675. package/dist/i18n/generated-english/Button/Button.generated.d.ts.map +1 -0
  676. package/dist/i18n/generated-english/Button/Button.generated.js +12 -0
  677. package/dist/i18n/generated-english/Calendar/Calendar.generated.d.ts +8 -0
  678. package/dist/i18n/generated-english/Calendar/Calendar.generated.d.ts.map +1 -0
  679. package/dist/i18n/generated-english/Calendar/Calendar.generated.js +21 -0
  680. package/dist/i18n/generated-english/Carousel/Carousel.generated.d.ts +8 -0
  681. package/dist/i18n/generated-english/Carousel/Carousel.generated.d.ts.map +1 -0
  682. package/dist/i18n/generated-english/Carousel/Carousel.generated.js +15 -0
  683. package/dist/i18n/generated-english/Chat/ChatComposer.generated.d.ts +8 -0
  684. package/dist/i18n/generated-english/Chat/ChatComposer.generated.d.ts.map +1 -0
  685. package/dist/i18n/generated-english/Chat/ChatComposer.generated.js +12 -0
  686. package/dist/i18n/generated-english/Chat/ChatComposerDrawer.generated.d.ts +8 -0
  687. package/dist/i18n/generated-english/Chat/ChatComposerDrawer.generated.d.ts.map +1 -0
  688. package/dist/i18n/generated-english/Chat/ChatComposerDrawer.generated.js +14 -0
  689. package/dist/i18n/generated-english/Chat/ChatComposerInput.generated.d.ts +8 -0
  690. package/dist/i18n/generated-english/Chat/ChatComposerInput.generated.d.ts.map +1 -0
  691. package/dist/i18n/generated-english/Chat/ChatComposerInput.generated.js +13 -0
  692. package/dist/i18n/generated-english/Chat/ChatDictationButton.generated.d.ts +8 -0
  693. package/dist/i18n/generated-english/Chat/ChatDictationButton.generated.d.ts.map +1 -0
  694. package/dist/i18n/generated-english/Chat/ChatDictationButton.generated.js +13 -0
  695. package/dist/i18n/generated-english/Chat/ChatLayout.generated.d.ts +8 -0
  696. package/dist/i18n/generated-english/Chat/ChatLayout.generated.d.ts.map +1 -0
  697. package/dist/i18n/generated-english/Chat/ChatLayout.generated.js +12 -0
  698. package/dist/i18n/generated-english/Chat/ChatLayoutScrollButton.generated.d.ts +8 -0
  699. package/dist/i18n/generated-english/Chat/ChatLayoutScrollButton.generated.d.ts.map +1 -0
  700. package/dist/i18n/generated-english/Chat/ChatLayoutScrollButton.generated.js +12 -0
  701. package/dist/i18n/generated-english/Chat/ChatMessage.generated.d.ts +8 -0
  702. package/dist/i18n/generated-english/Chat/ChatMessage.generated.d.ts.map +1 -0
  703. package/dist/i18n/generated-english/Chat/ChatMessage.generated.js +12 -0
  704. package/dist/i18n/generated-english/Chat/ChatMessageList.generated.d.ts +8 -0
  705. package/dist/i18n/generated-english/Chat/ChatMessageList.generated.d.ts.map +1 -0
  706. package/dist/i18n/generated-english/Chat/ChatMessageList.generated.js +12 -0
  707. package/dist/i18n/generated-english/Chat/ChatMessageMetadata.generated.d.ts +8 -0
  708. package/dist/i18n/generated-english/Chat/ChatMessageMetadata.generated.d.ts.map +1 -0
  709. package/dist/i18n/generated-english/Chat/ChatMessageMetadata.generated.js +17 -0
  710. package/dist/i18n/generated-english/Chat/ChatPastedTextToken.generated.d.ts +8 -0
  711. package/dist/i18n/generated-english/Chat/ChatPastedTextToken.generated.d.ts.map +1 -0
  712. package/dist/i18n/generated-english/Chat/ChatPastedTextToken.generated.js +13 -0
  713. package/dist/i18n/generated-english/Chat/ChatSendButton.generated.d.ts +8 -0
  714. package/dist/i18n/generated-english/Chat/ChatSendButton.generated.d.ts.map +1 -0
  715. package/dist/i18n/generated-english/Chat/ChatSendButton.generated.js +13 -0
  716. package/dist/i18n/generated-english/Chat/ChatToolCalls.generated.d.ts +8 -0
  717. package/dist/i18n/generated-english/Chat/ChatToolCalls.generated.d.ts.map +1 -0
  718. package/dist/i18n/generated-english/Chat/ChatToolCalls.generated.js +17 -0
  719. package/dist/i18n/generated-english/Chat/useSpeechRecognition.generated.d.ts +8 -0
  720. package/dist/i18n/generated-english/Chat/useSpeechRecognition.generated.d.ts.map +1 -0
  721. package/dist/i18n/generated-english/Chat/useSpeechRecognition.generated.js +12 -0
  722. package/dist/i18n/generated-english/Chat/useTriggerMenu.generated.d.ts +8 -0
  723. package/dist/i18n/generated-english/Chat/useTriggerMenu.generated.d.ts.map +1 -0
  724. package/dist/i18n/generated-english/Chat/useTriggerMenu.generated.js +13 -0
  725. package/dist/i18n/generated-english/CheckboxInput/CheckboxInput.generated.d.ts +8 -0
  726. package/dist/i18n/generated-english/CheckboxInput/CheckboxInput.generated.d.ts.map +1 -0
  727. package/dist/i18n/generated-english/CheckboxInput/CheckboxInput.generated.js +12 -0
  728. package/dist/i18n/generated-english/CheckboxList/CheckboxListItem.generated.d.ts +8 -0
  729. package/dist/i18n/generated-english/CheckboxList/CheckboxListItem.generated.d.ts.map +1 -0
  730. package/dist/i18n/generated-english/CheckboxList/CheckboxListItem.generated.js +12 -0
  731. package/dist/i18n/generated-english/Citation/Citation.generated.d.ts +8 -0
  732. package/dist/i18n/generated-english/Citation/Citation.generated.d.ts.map +1 -0
  733. package/dist/i18n/generated-english/Citation/Citation.generated.js +12 -0
  734. package/dist/i18n/generated-english/CodeBlock/CodeBlock.generated.d.ts +8 -0
  735. package/dist/i18n/generated-english/CodeBlock/CodeBlock.generated.d.ts.map +1 -0
  736. package/dist/i18n/generated-english/CodeBlock/CodeBlock.generated.js +14 -0
  737. package/dist/i18n/generated-english/CommandPalette/CommandPalette.generated.d.ts +8 -0
  738. package/dist/i18n/generated-english/CommandPalette/CommandPalette.generated.d.ts.map +1 -0
  739. package/dist/i18n/generated-english/CommandPalette/CommandPalette.generated.js +15 -0
  740. package/dist/i18n/generated-english/CommandPalette/CommandPaletteFooter.generated.d.ts +8 -0
  741. package/dist/i18n/generated-english/CommandPalette/CommandPaletteFooter.generated.d.ts.map +1 -0
  742. package/dist/i18n/generated-english/CommandPalette/CommandPaletteFooter.generated.js +14 -0
  743. package/dist/i18n/generated-english/CommandPalette/CommandPaletteInput.generated.d.ts +8 -0
  744. package/dist/i18n/generated-english/CommandPalette/CommandPaletteInput.generated.d.ts.map +1 -0
  745. package/dist/i18n/generated-english/CommandPalette/CommandPaletteInput.generated.js +14 -0
  746. package/dist/i18n/generated-english/CommandPalette/CommandPaletteList.generated.d.ts +8 -0
  747. package/dist/i18n/generated-english/CommandPalette/CommandPaletteList.generated.d.ts.map +1 -0
  748. package/dist/i18n/generated-english/CommandPalette/CommandPaletteList.generated.js +12 -0
  749. package/dist/i18n/generated-english/ComplexSelector/ComplexSelector.generated.d.ts +8 -0
  750. package/dist/i18n/generated-english/ComplexSelector/ComplexSelector.generated.d.ts.map +1 -0
  751. package/dist/i18n/generated-english/ComplexSelector/ComplexSelector.generated.js +13 -0
  752. package/dist/i18n/generated-english/ContextMenu/ContextMenu.generated.d.ts +8 -0
  753. package/dist/i18n/generated-english/ContextMenu/ContextMenu.generated.d.ts.map +1 -0
  754. package/dist/i18n/generated-english/ContextMenu/ContextMenu.generated.js +13 -0
  755. package/dist/i18n/generated-english/DateInput/DateInput.generated.d.ts +8 -0
  756. package/dist/i18n/generated-english/DateInput/DateInput.generated.d.ts.map +1 -0
  757. package/dist/i18n/generated-english/DateInput/DateInput.generated.js +19 -0
  758. package/dist/i18n/generated-english/DateInput/NativeDateField.generated.d.ts +8 -0
  759. package/dist/i18n/generated-english/DateInput/NativeDateField.generated.d.ts.map +1 -0
  760. package/dist/i18n/generated-english/DateInput/NativeDateField.generated.js +16 -0
  761. package/dist/i18n/generated-english/DateInput/TouchDateField.generated.d.ts +8 -0
  762. package/dist/i18n/generated-english/DateInput/TouchDateField.generated.d.ts.map +1 -0
  763. package/dist/i18n/generated-english/DateInput/TouchDateField.generated.js +24 -0
  764. package/dist/i18n/generated-english/DateRangeInput/DateRangeInput.generated.d.ts +8 -0
  765. package/dist/i18n/generated-english/DateRangeInput/DateRangeInput.generated.d.ts.map +1 -0
  766. package/dist/i18n/generated-english/DateRangeInput/DateRangeInput.generated.js +20 -0
  767. package/dist/i18n/generated-english/DateTimeInput/DateTimeInput.generated.d.ts +8 -0
  768. package/dist/i18n/generated-english/DateTimeInput/DateTimeInput.generated.d.ts.map +1 -0
  769. package/dist/i18n/generated-english/DateTimeInput/DateTimeInput.generated.js +26 -0
  770. package/dist/i18n/generated-english/DateTimeInput/NativeDateSegment.generated.d.ts +8 -0
  771. package/dist/i18n/generated-english/DateTimeInput/NativeDateSegment.generated.d.ts.map +1 -0
  772. package/dist/i18n/generated-english/DateTimeInput/NativeDateSegment.generated.js +13 -0
  773. package/dist/i18n/generated-english/DateTimeInput/NativeTimeSegment.generated.d.ts +8 -0
  774. package/dist/i18n/generated-english/DateTimeInput/NativeTimeSegment.generated.d.ts.map +1 -0
  775. package/dist/i18n/generated-english/DateTimeInput/NativeTimeSegment.generated.js +12 -0
  776. package/dist/i18n/generated-english/DateTimeInput/TouchDateTimeField.generated.d.ts +8 -0
  777. package/dist/i18n/generated-english/DateTimeInput/TouchDateTimeField.generated.d.ts.map +1 -0
  778. package/dist/i18n/generated-english/DateTimeInput/TouchDateTimeField.generated.js +37 -0
  779. package/dist/i18n/generated-english/Dialog/DialogHeader.generated.d.ts +8 -0
  780. package/dist/i18n/generated-english/Dialog/DialogHeader.generated.d.ts.map +1 -0
  781. package/dist/i18n/generated-english/Dialog/DialogHeader.generated.js +12 -0
  782. package/dist/i18n/generated-english/Drawer/DrawerHeader.generated.d.ts +8 -0
  783. package/dist/i18n/generated-english/Drawer/DrawerHeader.generated.d.ts.map +1 -0
  784. package/dist/i18n/generated-english/Drawer/DrawerHeader.generated.js +12 -0
  785. package/dist/i18n/generated-english/DropdownMenu/DropdownMenu.generated.d.ts +8 -0
  786. package/dist/i18n/generated-english/DropdownMenu/DropdownMenu.generated.d.ts.map +1 -0
  787. package/dist/i18n/generated-english/DropdownMenu/DropdownMenu.generated.js +13 -0
  788. package/dist/i18n/generated-english/DropdownMenu/DropdownMenuSubMenu.generated.d.ts +8 -0
  789. package/dist/i18n/generated-english/DropdownMenu/DropdownMenuSubMenu.generated.d.ts.map +1 -0
  790. package/dist/i18n/generated-english/DropdownMenu/DropdownMenuSubMenu.generated.js +14 -0
  791. package/dist/i18n/generated-english/Field/FieldLabel.generated.d.ts +8 -0
  792. package/dist/i18n/generated-english/Field/FieldLabel.generated.d.ts.map +1 -0
  793. package/dist/i18n/generated-english/Field/FieldLabel.generated.js +13 -0
  794. package/dist/i18n/generated-english/Field/InputClearButton.generated.d.ts +8 -0
  795. package/dist/i18n/generated-english/Field/InputClearButton.generated.d.ts.map +1 -0
  796. package/dist/i18n/generated-english/Field/InputClearButton.generated.js +12 -0
  797. package/dist/i18n/generated-english/FileInput/FileInput.generated.d.ts +8 -0
  798. package/dist/i18n/generated-english/FileInput/FileInput.generated.d.ts.map +1 -0
  799. package/dist/i18n/generated-english/FileInput/FileInput.generated.js +26 -0
  800. package/dist/i18n/generated-english/Kbd/Kbd.generated.d.ts +8 -0
  801. package/dist/i18n/generated-english/Kbd/Kbd.generated.d.ts.map +1 -0
  802. package/dist/i18n/generated-english/Kbd/Kbd.generated.js +27 -0
  803. package/dist/i18n/generated-english/Lightbox/Lightbox.generated.d.ts +8 -0
  804. package/dist/i18n/generated-english/Lightbox/Lightbox.generated.d.ts.map +1 -0
  805. package/dist/i18n/generated-english/Lightbox/Lightbox.generated.js +20 -0
  806. package/dist/i18n/generated-english/Link/Link.generated.d.ts +8 -0
  807. package/dist/i18n/generated-english/Link/Link.generated.d.ts.map +1 -0
  808. package/dist/i18n/generated-english/Link/Link.generated.js +12 -0
  809. package/dist/i18n/generated-english/Markdown/Markdown.generated.d.ts +8 -0
  810. package/dist/i18n/generated-english/Markdown/Markdown.generated.d.ts.map +1 -0
  811. package/dist/i18n/generated-english/Markdown/Markdown.generated.js +12 -0
  812. package/dist/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.d.ts +8 -0
  813. package/dist/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.d.ts.map +1 -0
  814. package/dist/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.js +13 -0
  815. package/dist/i18n/generated-english/MetadataList/MetadataList.generated.d.ts +8 -0
  816. package/dist/i18n/generated-english/MetadataList/MetadataList.generated.d.ts.map +1 -0
  817. package/dist/i18n/generated-english/MetadataList/MetadataList.generated.js +13 -0
  818. package/dist/i18n/generated-english/MobileNav/MobileNav.generated.d.ts +8 -0
  819. package/dist/i18n/generated-english/MobileNav/MobileNav.generated.d.ts.map +1 -0
  820. package/dist/i18n/generated-english/MobileNav/MobileNav.generated.js +13 -0
  821. package/dist/i18n/generated-english/MobileNav/MobileNavToggle.generated.d.ts +8 -0
  822. package/dist/i18n/generated-english/MobileNav/MobileNavToggle.generated.d.ts.map +1 -0
  823. package/dist/i18n/generated-english/MobileNav/MobileNavToggle.generated.js +12 -0
  824. package/dist/i18n/generated-english/MoreMenu/MoreMenu.generated.d.ts +8 -0
  825. package/dist/i18n/generated-english/MoreMenu/MoreMenu.generated.d.ts.map +1 -0
  826. package/dist/i18n/generated-english/MoreMenu/MoreMenu.generated.js +12 -0
  827. package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.d.ts +8 -0
  828. package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.d.ts.map +1 -0
  829. package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.js +32 -0
  830. package/dist/i18n/generated-english/NumberInput/NumberInput.generated.d.ts +8 -0
  831. package/dist/i18n/generated-english/NumberInput/NumberInput.generated.d.ts.map +1 -0
  832. package/dist/i18n/generated-english/NumberInput/NumberInput.generated.js +15 -0
  833. package/dist/i18n/generated-english/Outline/Outline.generated.d.ts +8 -0
  834. package/dist/i18n/generated-english/Outline/Outline.generated.d.ts.map +1 -0
  835. package/dist/i18n/generated-english/Outline/Outline.generated.js +12 -0
  836. package/dist/i18n/generated-english/Pagination/Pagination.generated.d.ts +8 -0
  837. package/dist/i18n/generated-english/Pagination/Pagination.generated.d.ts.map +1 -0
  838. package/dist/i18n/generated-english/Pagination/Pagination.generated.js +27 -0
  839. package/dist/i18n/generated-english/Popover/Popover.generated.d.ts +8 -0
  840. package/dist/i18n/generated-english/Popover/Popover.generated.d.ts.map +1 -0
  841. package/dist/i18n/generated-english/Popover/Popover.generated.js +12 -0
  842. package/dist/i18n/generated-english/Popover/usePopover.generated.d.ts +8 -0
  843. package/dist/i18n/generated-english/Popover/usePopover.generated.d.ts.map +1 -0
  844. package/dist/i18n/generated-english/Popover/usePopover.generated.js +12 -0
  845. package/dist/i18n/generated-english/PowerSearch/PowerSearch.generated.d.ts +8 -0
  846. package/dist/i18n/generated-english/PowerSearch/PowerSearch.generated.d.ts.map +1 -0
  847. package/dist/i18n/generated-english/PowerSearch/PowerSearch.generated.js +16 -0
  848. package/dist/i18n/generated-english/PowerSearch/PowerSearchEditPopover.generated.d.ts +8 -0
  849. package/dist/i18n/generated-english/PowerSearch/PowerSearchEditPopover.generated.d.ts.map +1 -0
  850. package/dist/i18n/generated-english/PowerSearch/PowerSearchEditPopover.generated.js +20 -0
  851. package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.d.ts +8 -0
  852. package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.d.ts.map +1 -0
  853. package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.js +23 -0
  854. package/dist/i18n/generated-english/PowerSearch/formatFilterValue.generated.d.ts +8 -0
  855. package/dist/i18n/generated-english/PowerSearch/formatFilterValue.generated.d.ts.map +1 -0
  856. package/dist/i18n/generated-english/PowerSearch/formatFilterValue.generated.js +15 -0
  857. package/dist/i18n/generated-english/PowerSearch/usePowerSearchConfig.generated.d.ts +8 -0
  858. package/dist/i18n/generated-english/PowerSearch/usePowerSearchConfig.generated.d.ts.map +1 -0
  859. package/dist/i18n/generated-english/PowerSearch/usePowerSearchConfig.generated.js +32 -0
  860. package/dist/i18n/generated-english/Resizable/ResizeHandle.generated.d.ts +8 -0
  861. package/dist/i18n/generated-english/Resizable/ResizeHandle.generated.d.ts.map +1 -0
  862. package/dist/i18n/generated-english/Resizable/ResizeHandle.generated.js +13 -0
  863. package/dist/i18n/generated-english/Selector/Selector.generated.d.ts +8 -0
  864. package/dist/i18n/generated-english/Selector/Selector.generated.d.ts.map +1 -0
  865. package/dist/i18n/generated-english/Selector/Selector.generated.js +24 -0
  866. package/dist/i18n/generated-english/SideNav/SideNav.generated.d.ts +8 -0
  867. package/dist/i18n/generated-english/SideNav/SideNav.generated.d.ts.map +1 -0
  868. package/dist/i18n/generated-english/SideNav/SideNav.generated.js +13 -0
  869. package/dist/i18n/generated-english/SideNav/SideNavCollapseButton.generated.d.ts +8 -0
  870. package/dist/i18n/generated-english/SideNav/SideNavCollapseButton.generated.d.ts.map +1 -0
  871. package/dist/i18n/generated-english/SideNav/SideNavCollapseButton.generated.js +13 -0
  872. package/dist/i18n/generated-english/SideNav/SideNavHeading.generated.d.ts +8 -0
  873. package/dist/i18n/generated-english/SideNav/SideNavHeading.generated.d.ts.map +1 -0
  874. package/dist/i18n/generated-english/SideNav/SideNavHeading.generated.js +13 -0
  875. package/dist/i18n/generated-english/SideNav/SideNavItem.generated.d.ts +8 -0
  876. package/dist/i18n/generated-english/SideNav/SideNavItem.generated.d.ts.map +1 -0
  877. package/dist/i18n/generated-english/SideNav/SideNavItem.generated.js +14 -0
  878. package/dist/i18n/generated-english/Slider/Slider.generated.d.ts +8 -0
  879. package/dist/i18n/generated-english/Slider/Slider.generated.d.ts.map +1 -0
  880. package/dist/i18n/generated-english/Slider/Slider.generated.js +13 -0
  881. package/dist/i18n/generated-english/Spinner/Spinner.generated.d.ts +8 -0
  882. package/dist/i18n/generated-english/Spinner/Spinner.generated.d.ts.map +1 -0
  883. package/dist/i18n/generated-english/Spinner/Spinner.generated.js +12 -0
  884. package/dist/i18n/generated-english/Stepper/Step.generated.d.ts +8 -0
  885. package/dist/i18n/generated-english/Stepper/Step.generated.d.ts.map +1 -0
  886. package/dist/i18n/generated-english/Stepper/Step.generated.js +17 -0
  887. package/dist/i18n/generated-english/Stepper/Stepper.generated.d.ts +8 -0
  888. package/dist/i18n/generated-english/Stepper/Stepper.generated.d.ts.map +1 -0
  889. package/dist/i18n/generated-english/Stepper/Stepper.generated.js +14 -0
  890. package/dist/i18n/generated-english/Switch/Switch.generated.d.ts +8 -0
  891. package/dist/i18n/generated-english/Switch/Switch.generated.d.ts.map +1 -0
  892. package/dist/i18n/generated-english/Switch/Switch.generated.js +12 -0
  893. package/dist/i18n/generated-english/TabList/TabList.generated.d.ts +8 -0
  894. package/dist/i18n/generated-english/TabList/TabList.generated.d.ts.map +1 -0
  895. package/dist/i18n/generated-english/TabList/TabList.generated.js +12 -0
  896. package/dist/i18n/generated-english/Table/BaseTable.generated.d.ts +8 -0
  897. package/dist/i18n/generated-english/Table/BaseTable.generated.d.ts.map +1 -0
  898. package/dist/i18n/generated-english/Table/BaseTable.generated.js +12 -0
  899. package/dist/i18n/generated-english/Table/Table.generated.d.ts +8 -0
  900. package/dist/i18n/generated-english/Table/Table.generated.d.ts.map +1 -0
  901. package/dist/i18n/generated-english/Table/Table.generated.js +12 -0
  902. package/dist/i18n/generated-english/Table/TableSelectionToolbar.generated.d.ts +8 -0
  903. package/dist/i18n/generated-english/Table/TableSelectionToolbar.generated.d.ts.map +1 -0
  904. package/dist/i18n/generated-english/Table/TableSelectionToolbar.generated.js +14 -0
  905. package/dist/i18n/generated-english/Table/plugins/columnResize/useTableColumnResize.generated.d.ts +8 -0
  906. package/dist/i18n/generated-english/Table/plugins/columnResize/useTableColumnResize.generated.d.ts.map +1 -0
  907. package/dist/i18n/generated-english/Table/plugins/columnResize/useTableColumnResize.generated.js +12 -0
  908. package/dist/i18n/generated-english/Table/plugins/filtering/useTableFiltering.generated.d.ts +8 -0
  909. package/dist/i18n/generated-english/Table/plugins/filtering/useTableFiltering.generated.d.ts.map +1 -0
  910. package/dist/i18n/generated-english/Table/plugins/filtering/useTableFiltering.generated.js +15 -0
  911. package/dist/i18n/generated-english/Table/plugins/groupedRows/useTableGroupedRows.generated.d.ts +8 -0
  912. package/dist/i18n/generated-english/Table/plugins/groupedRows/useTableGroupedRows.generated.d.ts.map +1 -0
  913. package/dist/i18n/generated-english/Table/plugins/groupedRows/useTableGroupedRows.generated.js +13 -0
  914. package/dist/i18n/generated-english/Table/plugins/pagination/useTablePagination.generated.d.ts +8 -0
  915. package/dist/i18n/generated-english/Table/plugins/pagination/useTablePagination.generated.d.ts.map +1 -0
  916. package/dist/i18n/generated-english/Table/plugins/pagination/useTablePagination.generated.js +14 -0
  917. package/dist/i18n/generated-english/Table/plugins/rowExpansion/useTableRowExpansion.generated.d.ts +8 -0
  918. package/dist/i18n/generated-english/Table/plugins/rowExpansion/useTableRowExpansion.generated.d.ts.map +1 -0
  919. package/dist/i18n/generated-english/Table/plugins/rowExpansion/useTableRowExpansion.generated.js +14 -0
  920. package/dist/i18n/generated-english/Table/plugins/rowStatus/useTableRowStatus.generated.d.ts +8 -0
  921. package/dist/i18n/generated-english/Table/plugins/rowStatus/useTableRowStatus.generated.d.ts.map +1 -0
  922. package/dist/i18n/generated-english/Table/plugins/rowStatus/useTableRowStatus.generated.js +12 -0
  923. package/dist/i18n/generated-english/Table/plugins/selection/useTableSelection.generated.d.ts +8 -0
  924. package/dist/i18n/generated-english/Table/plugins/selection/useTableSelection.generated.d.ts.map +1 -0
  925. package/dist/i18n/generated-english/Table/plugins/selection/useTableSelection.generated.js +14 -0
  926. package/dist/i18n/generated-english/Table/plugins/sortable/useTableSortable.generated.d.ts +8 -0
  927. package/dist/i18n/generated-english/Table/plugins/sortable/useTableSortable.generated.d.ts.map +1 -0
  928. package/dist/i18n/generated-english/Table/plugins/sortable/useTableSortable.generated.js +15 -0
  929. package/dist/i18n/generated-english/Table/plugins/tree/useTableTreeData.generated.d.ts +8 -0
  930. package/dist/i18n/generated-english/Table/plugins/tree/useTableTreeData.generated.d.ts.map +1 -0
  931. package/dist/i18n/generated-english/Table/plugins/tree/useTableTreeData.generated.js +15 -0
  932. package/dist/i18n/generated-english/TextArea/TextArea.generated.d.ts +8 -0
  933. package/dist/i18n/generated-english/TextArea/TextArea.generated.d.ts.map +1 -0
  934. package/dist/i18n/generated-english/TextArea/TextArea.generated.js +15 -0
  935. package/dist/i18n/generated-english/TextInput/TextInput.generated.d.ts +8 -0
  936. package/dist/i18n/generated-english/TextInput/TextInput.generated.d.ts.map +1 -0
  937. package/dist/i18n/generated-english/TextInput/TextInput.generated.js +13 -0
  938. package/dist/i18n/generated-english/Thumbnail/Thumbnail.generated.d.ts +8 -0
  939. package/dist/i18n/generated-english/Thumbnail/Thumbnail.generated.d.ts.map +1 -0
  940. package/dist/i18n/generated-english/Thumbnail/Thumbnail.generated.js +15 -0
  941. package/dist/i18n/generated-english/TimeInput/TimeInput.generated.d.ts +8 -0
  942. package/dist/i18n/generated-english/TimeInput/TimeInput.generated.d.ts.map +1 -0
  943. package/dist/i18n/generated-english/TimeInput/TimeInput.generated.js +18 -0
  944. package/dist/i18n/generated-english/TimeInput/TouchTimeField.generated.d.ts +8 -0
  945. package/dist/i18n/generated-english/TimeInput/TouchTimeField.generated.d.ts.map +1 -0
  946. package/dist/i18n/generated-english/TimeInput/TouchTimeField.generated.js +22 -0
  947. package/dist/i18n/generated-english/Timestamp/Timestamp.generated.d.ts +8 -0
  948. package/dist/i18n/generated-english/Timestamp/Timestamp.generated.d.ts.map +1 -0
  949. package/dist/i18n/generated-english/Timestamp/Timestamp.generated.js +12 -0
  950. package/dist/i18n/generated-english/Timestamp/TimestampHoverCard.generated.d.ts +8 -0
  951. package/dist/i18n/generated-english/Timestamp/TimestampHoverCard.generated.d.ts.map +1 -0
  952. package/dist/i18n/generated-english/Timestamp/TimestampHoverCard.generated.js +14 -0
  953. package/dist/i18n/generated-english/Toast/Toast.generated.d.ts +8 -0
  954. package/dist/i18n/generated-english/Toast/Toast.generated.d.ts.map +1 -0
  955. package/dist/i18n/generated-english/Toast/Toast.generated.js +12 -0
  956. package/dist/i18n/generated-english/Toast/ToastViewport.generated.d.ts +8 -0
  957. package/dist/i18n/generated-english/Toast/ToastViewport.generated.d.ts.map +1 -0
  958. package/dist/i18n/generated-english/Toast/ToastViewport.generated.js +12 -0
  959. package/dist/i18n/generated-english/Token/Token.generated.d.ts +8 -0
  960. package/dist/i18n/generated-english/Token/Token.generated.d.ts.map +1 -0
  961. package/dist/i18n/generated-english/Token/Token.generated.js +12 -0
  962. package/dist/i18n/generated-english/Tokenizer/Tokenizer.generated.d.ts +8 -0
  963. package/dist/i18n/generated-english/Tokenizer/Tokenizer.generated.d.ts.map +1 -0
  964. package/dist/i18n/generated-english/Tokenizer/Tokenizer.generated.js +18 -0
  965. package/dist/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.d.ts +8 -0
  966. package/dist/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.d.ts.map +1 -0
  967. package/dist/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.js +30 -0
  968. package/dist/i18n/generated-english/TopNav/TopNav.generated.d.ts +8 -0
  969. package/dist/i18n/generated-english/TopNav/TopNav.generated.d.ts.map +1 -0
  970. package/dist/i18n/generated-english/TopNav/TopNav.generated.js +12 -0
  971. package/dist/i18n/generated-english/TopNav/TopNavHeading.generated.d.ts +8 -0
  972. package/dist/i18n/generated-english/TopNav/TopNavHeading.generated.d.ts.map +1 -0
  973. package/dist/i18n/generated-english/TopNav/TopNavHeading.generated.js +13 -0
  974. package/dist/i18n/generated-english/TreeList/TreeListItem.generated.d.ts +8 -0
  975. package/dist/i18n/generated-english/TreeList/TreeListItem.generated.d.ts.map +1 -0
  976. package/dist/i18n/generated-english/TreeList/TreeListItem.generated.js +12 -0
  977. package/dist/i18n/generated-english/Typeahead/BaseTypeahead.generated.d.ts +8 -0
  978. package/dist/i18n/generated-english/Typeahead/BaseTypeahead.generated.d.ts.map +1 -0
  979. package/dist/i18n/generated-english/Typeahead/BaseTypeahead.generated.js +16 -0
  980. package/dist/i18n/generated-english/Typeahead/Typeahead.generated.d.ts +8 -0
  981. package/dist/i18n/generated-english/Typeahead/Typeahead.generated.d.ts.map +1 -0
  982. package/dist/i18n/generated-english/Typeahead/Typeahead.generated.js +13 -0
  983. package/dist/i18n/generated-english/hooks/useInputStatusIcon.generated.d.ts +8 -0
  984. package/dist/i18n/generated-english/hooks/useInputStatusIcon.generated.d.ts.map +1 -0
  985. package/dist/i18n/generated-english/hooks/useInputStatusIcon.generated.js +14 -0
  986. package/dist/i18n/generated-english/hooks/useKeyboardHint.generated.d.ts +8 -0
  987. package/dist/i18n/generated-english/hooks/useKeyboardHint.generated.d.ts.map +1 -0
  988. package/dist/i18n/generated-english/hooks/useKeyboardHint.generated.js +12 -0
  989. package/dist/i18n/generated-locales/af-ZA.generated.d.ts.map +1 -1
  990. package/dist/i18n/generated-locales/af-ZA.generated.js +2 -2
  991. package/dist/i18n/generated-locales/ar-SA.generated.d.ts.map +1 -1
  992. package/dist/i18n/generated-locales/ar-SA.generated.js +2 -2
  993. package/dist/i18n/generated-locales/ca-ES.generated.d.ts.map +1 -1
  994. package/dist/i18n/generated-locales/ca-ES.generated.js +2 -2
  995. package/dist/i18n/generated-locales/cs-CZ.generated.d.ts.map +1 -1
  996. package/dist/i18n/generated-locales/cs-CZ.generated.js +2 -2
  997. package/dist/i18n/generated-locales/da-DK.generated.d.ts.map +1 -1
  998. package/dist/i18n/generated-locales/da-DK.generated.js +2 -2
  999. package/dist/i18n/generated-locales/de-DE.generated.d.ts.map +1 -1
  1000. package/dist/i18n/generated-locales/de-DE.generated.js +2 -2
  1001. package/dist/i18n/generated-locales/el-GR.generated.d.ts.map +1 -1
  1002. package/dist/i18n/generated-locales/el-GR.generated.js +2 -2
  1003. package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
  1004. package/dist/i18n/generated-locales/en.generated.js +11 -2
  1005. package/dist/i18n/generated-locales/es-ES.generated.d.ts.map +1 -1
  1006. package/dist/i18n/generated-locales/es-ES.generated.js +2 -2
  1007. package/dist/i18n/generated-locales/fi-FI.generated.d.ts.map +1 -1
  1008. package/dist/i18n/generated-locales/fi-FI.generated.js +2 -2
  1009. package/dist/i18n/generated-locales/fr-FR.generated.d.ts.map +1 -1
  1010. package/dist/i18n/generated-locales/fr-FR.generated.js +2 -2
  1011. package/dist/i18n/generated-locales/he-IL.generated.d.ts.map +1 -1
  1012. package/dist/i18n/generated-locales/he-IL.generated.js +2 -2
  1013. package/dist/i18n/generated-locales/hu-HU.generated.d.ts.map +1 -1
  1014. package/dist/i18n/generated-locales/hu-HU.generated.js +2 -2
  1015. package/dist/i18n/generated-locales/it-IT.generated.d.ts.map +1 -1
  1016. package/dist/i18n/generated-locales/it-IT.generated.js +2 -2
  1017. package/dist/i18n/generated-locales/ja-JP.generated.d.ts.map +1 -1
  1018. package/dist/i18n/generated-locales/ja-JP.generated.js +2 -2
  1019. package/dist/i18n/generated-locales/ko-KR.generated.d.ts.map +1 -1
  1020. package/dist/i18n/generated-locales/ko-KR.generated.js +2 -2
  1021. package/dist/i18n/generated-locales/nl-NL.generated.d.ts.map +1 -1
  1022. package/dist/i18n/generated-locales/nl-NL.generated.js +2 -2
  1023. package/dist/i18n/generated-locales/no-NO.generated.d.ts.map +1 -1
  1024. package/dist/i18n/generated-locales/no-NO.generated.js +2 -2
  1025. package/dist/i18n/generated-locales/pl-PL.generated.d.ts.map +1 -1
  1026. package/dist/i18n/generated-locales/pl-PL.generated.js +2 -2
  1027. package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
  1028. package/dist/i18n/generated-locales/pseudo.generated.js +11 -2
  1029. package/dist/i18n/generated-locales/pt-BR.generated.d.ts.map +1 -1
  1030. package/dist/i18n/generated-locales/pt-BR.generated.js +2 -2
  1031. package/dist/i18n/generated-locales/pt-PT.generated.d.ts.map +1 -1
  1032. package/dist/i18n/generated-locales/pt-PT.generated.js +2 -2
  1033. package/dist/i18n/generated-locales/ro-RO.generated.d.ts.map +1 -1
  1034. package/dist/i18n/generated-locales/ro-RO.generated.js +2 -2
  1035. package/dist/i18n/generated-locales/ru-RU.generated.d.ts.map +1 -1
  1036. package/dist/i18n/generated-locales/ru-RU.generated.js +2 -2
  1037. package/dist/i18n/generated-locales/sr-SP.generated.d.ts.map +1 -1
  1038. package/dist/i18n/generated-locales/sr-SP.generated.js +2 -2
  1039. package/dist/i18n/generated-locales/sv-SE.generated.d.ts.map +1 -1
  1040. package/dist/i18n/generated-locales/sv-SE.generated.js +2 -2
  1041. package/dist/i18n/generated-locales/tr-TR.generated.d.ts.map +1 -1
  1042. package/dist/i18n/generated-locales/tr-TR.generated.js +2 -2
  1043. package/dist/i18n/generated-locales/uk-UA.generated.d.ts.map +1 -1
  1044. package/dist/i18n/generated-locales/uk-UA.generated.js +2 -2
  1045. package/dist/i18n/generated-locales/vi-VN.generated.d.ts.map +1 -1
  1046. package/dist/i18n/generated-locales/vi-VN.generated.js +2 -2
  1047. package/dist/i18n/generated-locales/zh-CN.generated.d.ts.map +1 -1
  1048. package/dist/i18n/generated-locales/zh-CN.generated.js +2 -2
  1049. package/dist/i18n/generated-locales/zh-TW.generated.d.ts.map +1 -1
  1050. package/dist/i18n/generated-locales/zh-TW.generated.js +2 -2
  1051. package/dist/i18n/index.d.ts +6 -1
  1052. package/dist/i18n/index.d.ts.map +1 -1
  1053. package/dist/i18n/index.js +6 -1
  1054. package/dist/i18n/publicContext.d.ts +2 -0
  1055. package/dist/i18n/publicContext.d.ts.map +1 -0
  1056. package/dist/i18n/publicContext.js +26 -0
  1057. package/dist/i18n/resolve.d.ts +6 -2
  1058. package/dist/i18n/resolve.d.ts.map +1 -1
  1059. package/dist/i18n/resolve.js +12 -4
  1060. package/dist/i18n/useComponentTranslator.d.ts +8 -0
  1061. package/dist/i18n/useComponentTranslator.d.ts.map +1 -0
  1062. package/dist/i18n/useComponentTranslator.js +42 -0
  1063. package/dist/i18n/useTranslator.d.ts.map +1 -1
  1064. package/dist/i18n/useTranslator.js +7 -1
  1065. package/dist/motion/animatedLayout.d.ts +130 -5
  1066. package/dist/motion/animatedLayout.d.ts.map +1 -1
  1067. package/dist/motion/animatedLayout.js +867 -47
  1068. package/dist/motion/animator.d.ts.map +1 -1
  1069. package/dist/motion/animator.js +197 -5
  1070. package/dist/motion/presentation.d.ts +44 -0
  1071. package/dist/motion/presentation.d.ts.map +1 -0
  1072. package/dist/motion/presentation.js +127 -0
  1073. package/dist/motion/uikit/gestures.d.ts +9 -18
  1074. package/dist/motion/uikit/gestures.d.ts.map +1 -1
  1075. package/dist/motion/uikit/gestures.js +14 -9
  1076. package/dist/motion/uikit/index.d.ts +1 -1
  1077. package/dist/motion/uikit/index.d.ts.map +1 -1
  1078. package/dist/motion/uikit/index.js +1 -1
  1079. package/dist/motion/uikit/longPress.d.ts +26 -0
  1080. package/dist/motion/uikit/longPress.d.ts.map +1 -0
  1081. package/dist/motion/uikit/longPress.js +29 -0
  1082. package/dist/motion/uikit/springs.d.ts +18 -0
  1083. package/dist/motion/uikit/springs.d.ts.map +1 -1
  1084. package/dist/motion/uikit/springs.js +20 -1
  1085. package/dist/privateAttributes/hapticSwitch.stylex.d.ts +5 -0
  1086. package/dist/privateAttributes/hapticSwitch.stylex.d.ts.map +1 -0
  1087. package/dist/privateAttributes/hapticSwitch.stylex.js +27 -0
  1088. package/dist/privateAttributes/layerRoot.stylex.d.ts +9 -0
  1089. package/dist/privateAttributes/layerRoot.stylex.d.ts.map +1 -0
  1090. package/dist/privateAttributes/layerRoot.stylex.js +28 -0
  1091. package/dist/privateAttributes/segmentDisabled.stylex.d.ts +5 -0
  1092. package/dist/privateAttributes/segmentDisabled.stylex.d.ts.map +1 -0
  1093. package/dist/privateAttributes/segmentDisabled.stylex.js +28 -0
  1094. package/dist/theme/Theme.d.ts +10 -0
  1095. package/dist/theme/Theme.d.ts.map +1 -1
  1096. package/dist/theme/Theme.js +8 -4
  1097. package/dist/theme/useTheme.d.ts.map +1 -1
  1098. package/dist/theme/useTheme.js +7 -1
  1099. package/dist/utils/accessibleName.d.ts +8 -0
  1100. package/dist/utils/accessibleName.d.ts.map +1 -0
  1101. package/dist/utils/accessibleName.js +72 -0
  1102. package/dist/utils/clickGuard.d.ts +33 -0
  1103. package/dist/utils/clickGuard.d.ts.map +1 -0
  1104. package/dist/utils/clickGuard.js +141 -0
  1105. package/dist/utils/coarsePointer.d.ts +8 -0
  1106. package/dist/utils/coarsePointer.d.ts.map +1 -0
  1107. package/dist/utils/coarsePointer.js +45 -0
  1108. package/dist/utils/devWarning.d.ts.map +1 -1
  1109. package/dist/utils/devWarning.js +4 -9
  1110. package/dist/utils/flatTree.d.ts +17 -0
  1111. package/dist/utils/flatTree.d.ts.map +1 -0
  1112. package/dist/utils/flatTree.js +38 -0
  1113. package/dist/utils/focusOutline.stylex.d.ts +0 -16
  1114. package/dist/utils/focusOutline.stylex.d.ts.map +1 -1
  1115. package/dist/utils/focusOutline.stylex.js +7 -16
  1116. package/dist/utils/focusReturn.d.ts +41 -7
  1117. package/dist/utils/focusReturn.d.ts.map +1 -1
  1118. package/dist/utils/focusReturn.js +60 -8
  1119. package/dist/utils/getNodeText.d.ts.map +1 -1
  1120. package/dist/utils/getNodeText.js +2 -1
  1121. package/dist/utils/hitArea.d.ts.map +1 -1
  1122. package/dist/utils/hitArea.js +14 -17
  1123. package/dist/utils/ime.d.ts.map +1 -1
  1124. package/dist/utils/ime.js +23 -51
  1125. package/dist/utils/inputPresentation.d.ts +5 -5
  1126. package/dist/utils/inputPresentation.d.ts.map +1 -1
  1127. package/dist/utils/inputPresentation.js +5 -5
  1128. package/dist/utils/inputStream.d.ts +17 -0
  1129. package/dist/utils/inputStream.d.ts.map +1 -0
  1130. package/dist/utils/inputStream.js +136 -0
  1131. package/dist/utils/interactionModality.d.ts +49 -7
  1132. package/dist/utils/interactionModality.d.ts.map +1 -1
  1133. package/dist/utils/interactionModality.js +133 -66
  1134. package/dist/utils/interactionOverlay.stylex.d.ts +26 -92
  1135. package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
  1136. package/dist/utils/interactionOverlay.stylex.js +58 -85
  1137. package/dist/utils/plainDate.d.ts +9 -0
  1138. package/dist/utils/plainDate.d.ts.map +1 -1
  1139. package/dist/utils/plainDate.js +26 -1
  1140. package/dist/utils/presentation.d.ts +3 -4
  1141. package/dist/utils/presentation.d.ts.map +1 -1
  1142. package/dist/utils/presentation.js +30 -45
  1143. package/dist/utils/pressDisabled.d.ts +21 -0
  1144. package/dist/utils/pressDisabled.d.ts.map +1 -0
  1145. package/dist/utils/pressDisabled.js +32 -0
  1146. package/dist/utils/pressFeedback.d.ts.map +1 -1
  1147. package/dist/utils/pressFeedback.js +117 -112
  1148. package/dist/utils/pressGesture.d.ts.map +1 -1
  1149. package/dist/utils/pressGesture.js +11 -21
  1150. package/dist/utils/rtlStyles.d.ts +0 -24
  1151. package/dist/utils/rtlStyles.d.ts.map +1 -1
  1152. package/dist/utils/rtlStyles.js +13 -24
  1153. package/dist/utils/selectionLock.d.ts +13 -0
  1154. package/dist/utils/selectionLock.d.ts.map +1 -0
  1155. package/dist/utils/selectionLock.js +159 -0
  1156. package/dist/utils/sharedMutationObserver.d.ts +2 -2
  1157. package/dist/utils/sharedMutationObserver.js +2 -2
  1158. package/dist/utils/standaloneMonthCapitals.generated.d.ts +7 -0
  1159. package/dist/utils/standaloneMonthCapitals.generated.d.ts.map +1 -0
  1160. package/dist/utils/standaloneMonthCapitals.generated.js +9 -0
  1161. package/dist/utils/timeFormat.d.ts +5 -13
  1162. package/dist/utils/timeFormat.d.ts.map +1 -1
  1163. package/dist/utils/timeFormat.js +5 -13
  1164. package/dist/utils/touchPresentation.d.ts +6 -11
  1165. package/dist/utils/touchPresentation.d.ts.map +1 -1
  1166. package/dist/utils/touchPresentation.js +37 -62
  1167. package/dist/utils/touchPresentation.stylex.d.ts +1 -1
  1168. package/dist/utils/touchPresentation.stylex.d.ts.map +1 -1
  1169. package/dist/utils/touchPresentation.stylex.js +7 -13
  1170. package/dist/utils/touchQueries.d.ts +17 -1
  1171. package/dist/utils/touchQueries.d.ts.map +1 -1
  1172. package/dist/utils/touchQueries.js +20 -2
  1173. package/dist/utils/typeaheadMatch.d.ts +24 -0
  1174. package/dist/utils/typeaheadMatch.d.ts.map +1 -0
  1175. package/dist/utils/typeaheadMatch.js +113 -0
  1176. package/dist/utils/useFocusLeavingChange.d.ts +13 -0
  1177. package/dist/utils/useFocusLeavingChange.d.ts.map +1 -0
  1178. package/dist/utils/useFocusLeavingChange.js +48 -0
  1179. package/locales/af-ZA.json +2 -2
  1180. package/locales/ar-SA.json +2 -2
  1181. package/locales/ca-ES.json +2 -2
  1182. package/locales/cs-CZ.json +2 -2
  1183. package/locales/da-DK.json +2 -2
  1184. package/locales/de-DE.json +2 -2
  1185. package/locales/el-GR.json +2 -2
  1186. package/locales/en.json +41 -5
  1187. package/locales/es-ES.json +2 -2
  1188. package/locales/fi-FI.json +2 -2
  1189. package/locales/fr-FR.json +2 -2
  1190. package/locales/he-IL.json +2 -2
  1191. package/locales/hu-HU.json +2 -2
  1192. package/locales/it-IT.json +2 -2
  1193. package/locales/ja-JP.json +2 -2
  1194. package/locales/ko-KR.json +2 -2
  1195. package/locales/nl-NL.json +2 -2
  1196. package/locales/no-NO.json +2 -2
  1197. package/locales/pl-PL.json +2 -2
  1198. package/locales/pseudo.json +29 -2
  1199. package/locales/pt-BR.json +2 -2
  1200. package/locales/pt-PT.json +2 -2
  1201. package/locales/ro-RO.json +2 -2
  1202. package/locales/ru-RU.json +2 -2
  1203. package/locales/sr-SP.json +2 -2
  1204. package/locales/sv-SE.json +2 -2
  1205. package/locales/tr-TR.json +2 -2
  1206. package/locales/uk-UA.json +2 -2
  1207. package/locales/vi-VN.json +2 -2
  1208. package/locales/zh-CN.json +2 -2
  1209. package/locales/zh-TW.json +2 -2
  1210. package/package.json +6 -5
  1211. package/src/AlertDialog/AlertDialog.tsx +8 -2
  1212. package/src/AppShell/AppShell.tsx +73 -57
  1213. package/src/Avatar/Avatar.tsx +10 -3
  1214. package/src/AvatarGroup/AvatarGroup.tsx +8 -2
  1215. package/src/AvatarGroup/AvatarGroupOverflow.tsx +9 -3
  1216. package/src/Banner/Banner.tsx +12 -2
  1217. package/src/BottomSheet/BottomSheet.tsx +106 -104
  1218. package/src/BottomSheet/BottomSheetEdgeTint.tsx +10 -21
  1219. package/src/BottomSheet/BottomSheetHostContext.ts +6 -10
  1220. package/src/BottomSheet/BottomSheetPanel.tsx +109 -86
  1221. package/src/BottomSheet/BottomSheetSwitcher.tsx +64 -78
  1222. package/src/BottomSheet/BottomSheetSwitcherContext.ts +8 -0
  1223. package/src/BottomSheet/bottomSheetEscape.ts +3 -3
  1224. package/src/BottomSheet/bottomSheetStack.ts +42 -96
  1225. package/src/BottomSheet/useMobileKeyboard.ts +63 -24
  1226. package/src/BottomSheet/useSheetGestures.ts +138 -108
  1227. package/src/Breadcrumbs/BreadcrumbItem.tsx +2 -1
  1228. package/src/Breadcrumbs/Breadcrumbs.tsx +8 -2
  1229. package/src/Button/Button.tsx +19 -6
  1230. package/src/Calendar/Calendar.tsx +21 -13
  1231. package/src/Calendar/hooks/useCalendarNavigation.ts +9 -10
  1232. package/src/Carousel/Carousel.tsx +8 -2
  1233. package/src/Center/Center.tsx +1 -1
  1234. package/src/Chat/ChatComposer.tsx +14 -11
  1235. package/src/Chat/ChatComposerDrawer.tsx +9 -3
  1236. package/src/Chat/ChatComposerInput.tsx +18 -3
  1237. package/src/Chat/ChatDictationButton.tsx +8 -2
  1238. package/src/Chat/ChatLayout.tsx +9 -8
  1239. package/src/Chat/ChatLayoutScrollButton.tsx +8 -2
  1240. package/src/Chat/ChatMessage.tsx +21 -5
  1241. package/src/Chat/ChatMessageList.tsx +9 -2
  1242. package/src/Chat/ChatMessageMetadata.tsx +8 -2
  1243. package/src/Chat/ChatPastedTextToken.tsx +23 -6
  1244. package/src/Chat/ChatSendButton.tsx +8 -2
  1245. package/src/Chat/ChatSystemMessage.tsx +4 -1
  1246. package/src/Chat/ChatToolCalls.tsx +15 -4
  1247. package/src/Chat/chatMessage.vars.stylex.ts +18 -0
  1248. package/src/Chat/useSpeechRecognition.ts +9 -2
  1249. package/src/Chat/useTriggerMenu.tsx +46 -33
  1250. package/src/CheckboxInput/CheckboxInput.tsx +8 -2
  1251. package/src/CheckboxList/CheckboxList.tsx +7 -1
  1252. package/src/CheckboxList/CheckboxListContext.tsx +8 -0
  1253. package/src/CheckboxList/CheckboxListItem.tsx +16 -4
  1254. package/src/Citation/Citation.tsx +8 -2
  1255. package/src/Code/Code.tsx +1 -1
  1256. package/src/CodeBlock/CodeBlock.tsx +14 -4
  1257. package/src/Collapsible/Collapsible.tsx +33 -4
  1258. package/src/CommandPalette/CommandPalette.tsx +28 -8
  1259. package/src/CommandPalette/CommandPaletteEmpty.tsx +2 -0
  1260. package/src/CommandPalette/CommandPaletteFooter.tsx +8 -2
  1261. package/src/CommandPalette/CommandPaletteInput.tsx +13 -10
  1262. package/src/CommandPalette/CommandPaletteList.tsx +8 -2
  1263. package/src/ComplexSelector/ComplexSelector.tsx +11 -4
  1264. package/src/ContextMenu/ContextMenu.tsx +38 -8
  1265. package/src/DateInput/DateInput.tsx +86 -25
  1266. package/src/DateInput/MonthScroller.tsx +2 -3
  1267. package/src/DateInput/NativeDateField.tsx +11 -15
  1268. package/src/DateInput/TouchDateField.tsx +13 -18
  1269. package/src/DateRangeInput/DateRangeInput.tsx +13 -17
  1270. package/src/DateTimeInput/DateTimeInput.tsx +56 -38
  1271. package/src/DateTimeInput/NativeDateSegment.tsx +9 -2
  1272. package/src/DateTimeInput/NativeTimeSegment.tsx +9 -2
  1273. package/src/DateTimeInput/TouchDateTimeField.tsx +14 -18
  1274. package/src/Dialog/Dialog.tsx +36 -28
  1275. package/src/Dialog/DialogHeader.tsx +8 -2
  1276. package/src/Drawer/Drawer.tsx +32 -4
  1277. package/src/Drawer/DrawerHeader.tsx +8 -2
  1278. package/src/DropdownMenu/DropdownMenu.doc.mjs +2 -2
  1279. package/src/DropdownMenu/DropdownMenu.tsx +38 -87
  1280. package/src/DropdownMenu/DropdownMenuCheckboxItem.doc.mjs +2 -2
  1281. package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +15 -5
  1282. package/src/DropdownMenu/DropdownMenuItem.tsx +7 -1
  1283. package/src/DropdownMenu/DropdownMenuRadioItem.doc.mjs +2 -2
  1284. package/src/DropdownMenu/DropdownMenuRadioItem.tsx +16 -6
  1285. package/src/DropdownMenu/DropdownMenuSubMenu.tsx +19 -6
  1286. package/src/DropdownMenu/MenuBottomSheetActionList.tsx +6 -3
  1287. package/src/Field/Field.tsx +2 -2
  1288. package/src/Field/FieldLabel.tsx +13 -25
  1289. package/src/Field/InputClearButton.tsx +9 -3
  1290. package/src/Field/PanelSearchInput.tsx +7 -8
  1291. package/src/Field/fieldStatusPlacement.ts +18 -0
  1292. package/src/Field/index.ts +4 -1
  1293. package/src/Field/inputDisabledFocus.ts +62 -4
  1294. package/src/Field/inputStyles.stylex.ts +46 -9
  1295. package/src/Field/textEntryTraits.ts +116 -0
  1296. package/src/FieldStatus/FieldStatus.tsx +28 -3
  1297. package/src/FieldStatus/index.ts +7 -0
  1298. package/src/FileInput/FileInput.doc.mjs +3 -3
  1299. package/src/FileInput/FileInput.tsx +42 -10
  1300. package/src/Grid/Grid.doc.mjs +4 -4
  1301. package/src/Grid/Grid.tsx +6 -4
  1302. package/src/Grid/GridSpan.doc.mjs +51 -2
  1303. package/src/Grid/GridSpan.tsx +2 -0
  1304. package/src/HStack/HStack.tsx +2 -1
  1305. package/src/Heading/Heading.tsx +5 -3
  1306. package/src/HoverCard/HoverCard.doc.mjs +61 -10
  1307. package/src/HoverCard/HoverCard.tsx +8 -5
  1308. package/src/HoverCard/useHoverCard.doc.mjs +1 -1
  1309. package/src/HoverCard/useHoverCard.tsx +10 -2
  1310. package/src/InputGroup/groupStyles.ts +9 -2
  1311. package/src/Item/Item.tsx +5 -5
  1312. package/src/Item/ItemSwipeLayer.tsx +8 -1
  1313. package/src/Kbd/Kbd.tsx +12 -3
  1314. package/src/Layer/layerClickBoundary.ts +97 -0
  1315. package/src/Layer/layerStructureReset.stylex.ts +5 -0
  1316. package/src/Layer/layerSurfacePress.ts +35 -0
  1317. package/src/Layer/outsidePress.ts +179 -0
  1318. package/src/Layer/useLayer.tsx +32 -6
  1319. package/src/Layer/useTouchTrigger.ts +106 -17
  1320. package/src/Layout/LayoutSlotsContext.ts +4 -2
  1321. package/src/Layout/layoutReset.ts +45 -0
  1322. package/src/Lightbox/Lightbox.tsx +19 -7
  1323. package/src/Link/Link.tsx +8 -2
  1324. package/src/Markdown/Markdown.tsx +10 -2
  1325. package/src/Markdown/plugins/HeadingLinksRenderer.tsx +8 -2
  1326. package/src/MetadataList/MetadataList.tsx +13 -5
  1327. package/src/MetadataList/MetadataListItem.tsx +2 -1
  1328. package/src/MobileNav/MobileNav.tsx +15 -3
  1329. package/src/MobileNav/MobileNavToggle.tsx +8 -2
  1330. package/src/MoreMenu/MoreMenu.tsx +8 -2
  1331. package/src/MultiSelector/MultiSelector.tsx +48 -49
  1332. package/src/MultiSelector/hooks.ts +7 -5
  1333. package/src/NavMenu/NavHeadingMenuItem.tsx +2 -1
  1334. package/src/NumberInput/NumberInput.tsx +11 -4
  1335. package/src/Outline/Outline.tsx +8 -2
  1336. package/src/OverflowList/OverflowList.tsx +2 -1
  1337. package/src/Pagination/Pagination.tsx +9 -2
  1338. package/src/Popover/Popover.tsx +10 -4
  1339. package/src/Popover/usePopover.tsx +15 -4
  1340. package/src/PowerSearch/PowerSearch.tsx +12 -4
  1341. package/src/PowerSearch/PowerSearchEditPopover.tsx +10 -4
  1342. package/src/PowerSearch/PowerSearchToken.tsx +2 -2
  1343. package/src/PowerSearch/PowerSearchValueEditor.tsx +20 -13
  1344. package/src/PowerSearch/formatFilterValue.ts +4 -0
  1345. package/src/PowerSearch/resolveOperatorLabel.ts +7 -1
  1346. package/src/PowerSearch/usePowerSearchConfig.ts +4 -0
  1347. package/src/PowerSearch/usePowerSearchSource.ts +2 -2
  1348. package/src/ProgressBar/ProgressBar.tsx +3 -1
  1349. package/src/RadioList/RadioList.tsx +13 -2
  1350. package/src/RadioList/RadioListItem.tsx +9 -1
  1351. package/src/RadioList/RadioListReasonContext.ts +25 -0
  1352. package/src/Resizable/ResizeHandle.tsx +8 -2
  1353. package/src/Resizable/resizableModel.ts +364 -0
  1354. package/src/Resizable/useResizable.ts +17 -348
  1355. package/src/SegmentedControl/SegmentedControl.doc.mjs +5 -5
  1356. package/src/SegmentedControl/SegmentedControl.tsx +58 -30
  1357. package/src/SegmentedControl/SegmentedControlContext.ts +4 -5
  1358. package/src/SegmentedControl/SegmentedControlItem.doc.mjs +1 -1
  1359. package/src/SegmentedControl/SegmentedControlItem.tsx +12 -14
  1360. package/src/SelectableCard/SelectableCard.tsx +66 -1
  1361. package/src/Selector/Selector.tsx +17 -21
  1362. package/src/Selector/useSelectorPresentation.ts +8 -1
  1363. package/src/SideNav/SideNav.tsx +230 -33
  1364. package/src/SideNav/SideNavCollapseButton.tsx +26 -4
  1365. package/src/SideNav/SideNavFocusTargetsContext.ts +29 -0
  1366. package/src/SideNav/SideNavHeading.tsx +33 -16
  1367. package/src/SideNav/SideNavItem.tsx +29 -6
  1368. package/src/SideNav/SideNavSection.tsx +2 -1
  1369. package/src/SideNav/railMotion.ts +73 -179
  1370. package/src/Slider/Slider.tsx +15 -12
  1371. package/src/Spinner/Spinner.tsx +9 -3
  1372. package/src/Stack/Stack.doc.mjs +83 -11
  1373. package/src/Stack/Stack.tsx +1 -1
  1374. package/src/Stack/stack.stylex.ts +1 -1
  1375. package/src/Stepper/Step.tsx +8 -2
  1376. package/src/Stepper/Stepper.tsx +8 -2
  1377. package/src/Switch/Switch.tsx +9 -3
  1378. package/src/TabList/TabList.tsx +8 -2
  1379. package/src/Table/BaseTable.tsx +18 -8
  1380. package/src/Table/Table.tsx +8 -2
  1381. package/src/Table/TableSelectionToolbar.tsx +8 -2
  1382. package/src/Table/glidingDivider.ts +8 -3
  1383. package/src/Table/plugins/columnResize/useTableColumnResize.tsx +8 -2
  1384. package/src/Table/plugins/filtering/useTableFiltering.tsx +16 -9
  1385. package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +8 -2
  1386. package/src/Table/plugins/pagination/useTablePagination.tsx +8 -2
  1387. package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +10 -4
  1388. package/src/Table/plugins/rowStatus/useTableRowStatus.tsx +8 -2
  1389. package/src/Table/plugins/selection/useTableSelection.tsx +9 -3
  1390. package/src/Table/plugins/sortable/useTableSortable.tsx +12 -4
  1391. package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +1 -2
  1392. package/src/Table/plugins/tree/useTableTreeData.tsx +10 -4
  1393. package/src/Text/Heading.doc.mjs +52 -3
  1394. package/src/Text/Text.doc.mjs +1 -1
  1395. package/src/Text/text.stylex.ts +12 -0
  1396. package/src/TextArea/TextArea.doc.mjs +65 -1
  1397. package/src/TextArea/TextArea.tsx +38 -11
  1398. package/src/TextInput/TextInput.doc.mjs +70 -6
  1399. package/src/TextInput/TextInput.tsx +55 -13
  1400. package/src/Thumbnail/Thumbnail.tsx +8 -2
  1401. package/src/TimeInput/TimeInput.tsx +13 -17
  1402. package/src/TimeInput/TouchTimeField.tsx +12 -15
  1403. package/src/Timer/Timer.tsx +1 -1
  1404. package/src/Timestamp/Timestamp.tsx +8 -2
  1405. package/src/Timestamp/TimestampHoverCard.tsx +8 -2
  1406. package/src/Toast/Toast.tsx +10 -2
  1407. package/src/Toast/ToastViewport.tsx +12 -3
  1408. package/src/Toast/useToast.tsx +8 -3
  1409. package/src/ToggleButton/ToggleButton.tsx +10 -3
  1410. package/src/Token/Token.tsx +10 -2
  1411. package/src/Token/TokenLink.tsx +16 -1
  1412. package/src/Tokenizer/Tokenizer.doc.mjs +16 -11
  1413. package/src/Tokenizer/Tokenizer.tsx +117 -70
  1414. package/src/Tokenizer/TokenizerBottomSheet.tsx +9 -3
  1415. package/src/Tooltip/Tooltip.doc.mjs +3 -3
  1416. package/src/Tooltip/Tooltip.tsx +4 -3
  1417. package/src/Tooltip/useTooltip.doc.mjs +3 -3
  1418. package/src/Tooltip/useTooltip.tsx +58 -15
  1419. package/src/TopNav/TopNav.tsx +24 -13
  1420. package/src/TopNav/TopNavHeading.tsx +31 -12
  1421. package/src/TopNav/TopNavMegaMenu.tsx +4 -3
  1422. package/src/TopNav/TopNavMegaMenuFeaturedCard.tsx +9 -2
  1423. package/src/TopNav/TopNavMegaMenuItem.tsx +7 -2
  1424. package/src/TopNav/TopNavMenu.tsx +2 -1
  1425. package/src/TreeList/TreeList.tsx +91 -11
  1426. package/src/TreeList/TreeListItem.tsx +13 -5
  1427. package/src/Typeahead/BaseTypeahead.doc.mjs +7 -4
  1428. package/src/Typeahead/BaseTypeahead.tsx +523 -68
  1429. package/src/Typeahead/Typeahead.doc.mjs +24 -6
  1430. package/src/Typeahead/Typeahead.tsx +27 -15
  1431. package/src/Typeahead/TypeaheadItem.doc.mjs +6 -3
  1432. package/src/Typeahead/committedChoicesKey.tsx +37 -0
  1433. package/src/Typeahead/index.ts +1 -1
  1434. package/src/Typeahead/types.ts +27 -3
  1435. package/src/gestures/GestureArena.ts +91 -38
  1436. package/src/gestures/GestureHost.ts +1561 -561
  1437. package/src/gestures/GestureRecognizer.ts +69 -18
  1438. package/src/gestures/LongPressGestureRecognizer.ts +20 -1
  1439. package/src/gestures/PanGestureRecognizer.ts +35 -0
  1440. package/src/gestures/PinchGestureRecognizer.ts +13 -8
  1441. package/src/gestures/PressTracker.ts +55 -8
  1442. package/src/gestures/README.md +313 -51
  1443. package/src/gestures/TapGestureRecognizer.ts +5 -0
  1444. package/src/gestures/VelocityTracker.ts +35 -0
  1445. package/src/gestures/fingerScroll.ts +208 -0
  1446. package/src/gestures/gestureSync.ts +60 -0
  1447. package/src/gestures/haptics.ts +9 -13
  1448. package/src/gestures/hostRegistry.ts +18 -0
  1449. package/src/gestures/index.ts +6 -5
  1450. package/src/gestures/nativeScroll.ts +6 -20
  1451. package/src/gestures/pageHold.ts +265 -0
  1452. package/src/gestures/recognizerInternals.ts +77 -0
  1453. package/src/gestures/selectionLock.ts +12 -0
  1454. package/src/gestures/touchAction.ts +12 -24
  1455. package/src/gestures/types.ts +18 -0
  1456. package/src/gestures/useFingerScroll.ts +78 -0
  1457. package/src/gestures/useGestureRecognizer.ts +70 -209
  1458. package/src/gestures/usePressTracker.ts +212 -0
  1459. package/src/hooks/ModalAnnounceProvider.tsx +19 -19
  1460. package/src/hooks/actionGroupTracker.ts +23 -55
  1461. package/src/hooks/menuPressGesture.ts +25 -30
  1462. package/src/hooks/menuPressMarker.ts +15 -0
  1463. package/src/hooks/menuPressOnItems.ts +7 -9
  1464. package/src/hooks/modalAnnounce.ts +20 -39
  1465. package/src/hooks/scrollbarGutter.ts +9 -16
  1466. package/src/hooks/useAnimatedLayout.ts +2 -3
  1467. package/src/hooks/useAnnounce.ts +65 -106
  1468. package/src/hooks/useAnnounceRenderedText.ts +32 -53
  1469. package/src/hooks/useAttachment.ts +59 -0
  1470. package/src/hooks/useAutoMediaMode.ts +29 -54
  1471. package/src/hooks/useBusyAnnouncement.ts +13 -20
  1472. package/src/hooks/useClickableContainer.ts +66 -34
  1473. package/src/hooks/useContainerReveal.ts +9 -36
  1474. package/src/hooks/useDevWarning.ts +3 -8
  1475. package/src/hooks/useEntryAnimation.ts +1 -3
  1476. package/src/hooks/useFocusReturnVisibility.ts +15 -12
  1477. package/src/hooks/useFocusTrap.ts +2 -8
  1478. package/src/hooks/useHighlightedOptionScroll.ts +2 -4
  1479. package/src/hooks/useHotkeys.ts +4 -16
  1480. package/src/hooks/useImageMode.ts +6 -43
  1481. package/src/hooks/useIndicatorFocusRing.tsx +13 -38
  1482. package/src/hooks/useInputStatusIcon.tsx +29 -42
  1483. package/src/hooks/useInteractiveRole.ts +6 -22
  1484. package/src/hooks/useKeyboardHint.tsx +16 -4
  1485. package/src/hooks/useListFocus.ts +87 -8
  1486. package/src/hooks/useLongPress.ts +69 -28
  1487. package/src/hooks/useMenuHover.ts +38 -52
  1488. package/src/hooks/useMenuPress.ts +117 -186
  1489. package/src/hooks/useOverflow.ts +3 -8
  1490. package/src/hooks/useRenamedProp.ts +8 -17
  1491. package/src/hooks/useScrollOverflow.ts +9 -27
  1492. package/src/hooks/useScrollableArea.ts +14 -21
  1493. package/src/hooks/useSettledOpen.ts +51 -0
  1494. package/src/hooks/useStreamingText.ts +14 -33
  1495. package/src/hooks/useTreeFocus.doc.mjs +2 -2
  1496. package/src/hooks/useTreeFocus.ts +49 -13
  1497. package/src/hooks/useTypeahead.doc.mjs +2 -2
  1498. package/src/hooks/useTypeahead.ts +21 -20
  1499. package/src/i18n/InternationalizationContext.ts +1 -1
  1500. package/src/i18n/englishFallback.ts +40 -0
  1501. package/src/i18n/fullEnglishFallback.ts +26 -0
  1502. package/src/i18n/generated-english/AlertDialog/AlertDialog.generated.ts +13 -0
  1503. package/src/i18n/generated-english/AppShell/AppShell.generated.ts +14 -0
  1504. package/src/i18n/generated-english/Avatar/Avatar.generated.ts +13 -0
  1505. package/src/i18n/generated-english/AvatarGroup/AvatarGroup.generated.ts +14 -0
  1506. package/src/i18n/generated-english/AvatarGroup/AvatarGroupOverflow.generated.ts +13 -0
  1507. package/src/i18n/generated-english/Banner/Banner.generated.ts +16 -0
  1508. package/src/i18n/generated-english/Breadcrumbs/Breadcrumbs.generated.ts +13 -0
  1509. package/src/i18n/generated-english/Button/Button.generated.ts +13 -0
  1510. package/src/i18n/generated-english/Calendar/Calendar.generated.ts +22 -0
  1511. package/src/i18n/generated-english/Carousel/Carousel.generated.ts +16 -0
  1512. package/src/i18n/generated-english/Chat/ChatComposer.generated.ts +13 -0
  1513. package/src/i18n/generated-english/Chat/ChatComposerDrawer.generated.ts +15 -0
  1514. package/src/i18n/generated-english/Chat/ChatComposerInput.generated.ts +14 -0
  1515. package/src/i18n/generated-english/Chat/ChatDictationButton.generated.ts +14 -0
  1516. package/src/i18n/generated-english/Chat/ChatLayout.generated.ts +13 -0
  1517. package/src/i18n/generated-english/Chat/ChatLayoutScrollButton.generated.ts +13 -0
  1518. package/src/i18n/generated-english/Chat/ChatMessage.generated.ts +13 -0
  1519. package/src/i18n/generated-english/Chat/ChatMessageList.generated.ts +13 -0
  1520. package/src/i18n/generated-english/Chat/ChatMessageMetadata.generated.ts +18 -0
  1521. package/src/i18n/generated-english/Chat/ChatPastedTextToken.generated.ts +14 -0
  1522. package/src/i18n/generated-english/Chat/ChatSendButton.generated.ts +14 -0
  1523. package/src/i18n/generated-english/Chat/ChatToolCalls.generated.ts +18 -0
  1524. package/src/i18n/generated-english/Chat/useSpeechRecognition.generated.ts +13 -0
  1525. package/src/i18n/generated-english/Chat/useTriggerMenu.generated.ts +14 -0
  1526. package/src/i18n/generated-english/CheckboxInput/CheckboxInput.generated.ts +13 -0
  1527. package/src/i18n/generated-english/CheckboxList/CheckboxListItem.generated.ts +13 -0
  1528. package/src/i18n/generated-english/Citation/Citation.generated.ts +13 -0
  1529. package/src/i18n/generated-english/CodeBlock/CodeBlock.generated.ts +15 -0
  1530. package/src/i18n/generated-english/CommandPalette/CommandPalette.generated.ts +16 -0
  1531. package/src/i18n/generated-english/CommandPalette/CommandPaletteFooter.generated.ts +15 -0
  1532. package/src/i18n/generated-english/CommandPalette/CommandPaletteInput.generated.ts +15 -0
  1533. package/src/i18n/generated-english/CommandPalette/CommandPaletteList.generated.ts +13 -0
  1534. package/src/i18n/generated-english/ComplexSelector/ComplexSelector.generated.ts +14 -0
  1535. package/src/i18n/generated-english/ContextMenu/ContextMenu.generated.ts +14 -0
  1536. package/src/i18n/generated-english/DateInput/DateInput.generated.ts +20 -0
  1537. package/src/i18n/generated-english/DateInput/NativeDateField.generated.ts +17 -0
  1538. package/src/i18n/generated-english/DateInput/TouchDateField.generated.ts +25 -0
  1539. package/src/i18n/generated-english/DateRangeInput/DateRangeInput.generated.ts +21 -0
  1540. package/src/i18n/generated-english/DateTimeInput/DateTimeInput.generated.ts +27 -0
  1541. package/src/i18n/generated-english/DateTimeInput/NativeDateSegment.generated.ts +14 -0
  1542. package/src/i18n/generated-english/DateTimeInput/NativeTimeSegment.generated.ts +13 -0
  1543. package/src/i18n/generated-english/DateTimeInput/TouchDateTimeField.generated.ts +38 -0
  1544. package/src/i18n/generated-english/Dialog/DialogHeader.generated.ts +13 -0
  1545. package/src/i18n/generated-english/Drawer/DrawerHeader.generated.ts +13 -0
  1546. package/src/i18n/generated-english/DropdownMenu/DropdownMenu.generated.ts +14 -0
  1547. package/src/i18n/generated-english/DropdownMenu/DropdownMenuSubMenu.generated.ts +15 -0
  1548. package/src/i18n/generated-english/Field/FieldLabel.generated.ts +14 -0
  1549. package/src/i18n/generated-english/Field/InputClearButton.generated.ts +13 -0
  1550. package/src/i18n/generated-english/FileInput/FileInput.generated.ts +27 -0
  1551. package/src/i18n/generated-english/Kbd/Kbd.generated.ts +28 -0
  1552. package/src/i18n/generated-english/Lightbox/Lightbox.generated.ts +21 -0
  1553. package/src/i18n/generated-english/Link/Link.generated.ts +13 -0
  1554. package/src/i18n/generated-english/Markdown/Markdown.generated.ts +13 -0
  1555. package/src/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.ts +14 -0
  1556. package/src/i18n/generated-english/MetadataList/MetadataList.generated.ts +14 -0
  1557. package/src/i18n/generated-english/MobileNav/MobileNav.generated.ts +14 -0
  1558. package/src/i18n/generated-english/MobileNav/MobileNavToggle.generated.ts +13 -0
  1559. package/src/i18n/generated-english/MoreMenu/MoreMenu.generated.ts +13 -0
  1560. package/src/i18n/generated-english/MultiSelector/MultiSelector.generated.ts +33 -0
  1561. package/src/i18n/generated-english/NumberInput/NumberInput.generated.ts +16 -0
  1562. package/src/i18n/generated-english/Outline/Outline.generated.ts +13 -0
  1563. package/src/i18n/generated-english/Pagination/Pagination.generated.ts +28 -0
  1564. package/src/i18n/generated-english/Popover/Popover.generated.ts +13 -0
  1565. package/src/i18n/generated-english/Popover/usePopover.generated.ts +13 -0
  1566. package/src/i18n/generated-english/PowerSearch/PowerSearch.generated.ts +17 -0
  1567. package/src/i18n/generated-english/PowerSearch/PowerSearchEditPopover.generated.ts +21 -0
  1568. package/src/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.ts +24 -0
  1569. package/src/i18n/generated-english/PowerSearch/formatFilterValue.generated.ts +16 -0
  1570. package/src/i18n/generated-english/PowerSearch/usePowerSearchConfig.generated.ts +33 -0
  1571. package/src/i18n/generated-english/Resizable/ResizeHandle.generated.ts +14 -0
  1572. package/src/i18n/generated-english/Selector/Selector.generated.ts +25 -0
  1573. package/src/i18n/generated-english/SideNav/SideNav.generated.ts +14 -0
  1574. package/src/i18n/generated-english/SideNav/SideNavCollapseButton.generated.ts +14 -0
  1575. package/src/i18n/generated-english/SideNav/SideNavHeading.generated.ts +14 -0
  1576. package/src/i18n/generated-english/SideNav/SideNavItem.generated.ts +15 -0
  1577. package/src/i18n/generated-english/Slider/Slider.generated.ts +14 -0
  1578. package/src/i18n/generated-english/Spinner/Spinner.generated.ts +13 -0
  1579. package/src/i18n/generated-english/Stepper/Step.generated.ts +18 -0
  1580. package/src/i18n/generated-english/Stepper/Stepper.generated.ts +15 -0
  1581. package/src/i18n/generated-english/Switch/Switch.generated.ts +13 -0
  1582. package/src/i18n/generated-english/TabList/TabList.generated.ts +13 -0
  1583. package/src/i18n/generated-english/Table/BaseTable.generated.ts +13 -0
  1584. package/src/i18n/generated-english/Table/Table.generated.ts +13 -0
  1585. package/src/i18n/generated-english/Table/TableSelectionToolbar.generated.ts +15 -0
  1586. package/src/i18n/generated-english/Table/plugins/columnResize/useTableColumnResize.generated.ts +13 -0
  1587. package/src/i18n/generated-english/Table/plugins/filtering/useTableFiltering.generated.ts +16 -0
  1588. package/src/i18n/generated-english/Table/plugins/groupedRows/useTableGroupedRows.generated.ts +14 -0
  1589. package/src/i18n/generated-english/Table/plugins/pagination/useTablePagination.generated.ts +15 -0
  1590. package/src/i18n/generated-english/Table/plugins/rowExpansion/useTableRowExpansion.generated.ts +15 -0
  1591. package/src/i18n/generated-english/Table/plugins/rowStatus/useTableRowStatus.generated.ts +13 -0
  1592. package/src/i18n/generated-english/Table/plugins/selection/useTableSelection.generated.ts +15 -0
  1593. package/src/i18n/generated-english/Table/plugins/sortable/useTableSortable.generated.ts +16 -0
  1594. package/src/i18n/generated-english/Table/plugins/tree/useTableTreeData.generated.ts +16 -0
  1595. package/src/i18n/generated-english/TextArea/TextArea.generated.ts +16 -0
  1596. package/src/i18n/generated-english/TextInput/TextInput.generated.ts +14 -0
  1597. package/src/i18n/generated-english/Thumbnail/Thumbnail.generated.ts +16 -0
  1598. package/src/i18n/generated-english/TimeInput/TimeInput.generated.ts +19 -0
  1599. package/src/i18n/generated-english/TimeInput/TouchTimeField.generated.ts +23 -0
  1600. package/src/i18n/generated-english/Timestamp/Timestamp.generated.ts +13 -0
  1601. package/src/i18n/generated-english/Timestamp/TimestampHoverCard.generated.ts +15 -0
  1602. package/src/i18n/generated-english/Toast/Toast.generated.ts +13 -0
  1603. package/src/i18n/generated-english/Toast/ToastViewport.generated.ts +13 -0
  1604. package/src/i18n/generated-english/Token/Token.generated.ts +13 -0
  1605. package/src/i18n/generated-english/Tokenizer/Tokenizer.generated.ts +19 -0
  1606. package/src/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.ts +31 -0
  1607. package/src/i18n/generated-english/TopNav/TopNav.generated.ts +13 -0
  1608. package/src/i18n/generated-english/TopNav/TopNavHeading.generated.ts +14 -0
  1609. package/src/i18n/generated-english/TreeList/TreeListItem.generated.ts +13 -0
  1610. package/src/i18n/generated-english/Typeahead/BaseTypeahead.generated.ts +17 -0
  1611. package/src/i18n/generated-english/Typeahead/Typeahead.generated.ts +14 -0
  1612. package/src/i18n/generated-english/hooks/useInputStatusIcon.generated.ts +15 -0
  1613. package/src/i18n/generated-english/hooks/useKeyboardHint.generated.ts +13 -0
  1614. package/src/i18n/generated-locales/af-ZA.generated.ts +3 -2
  1615. package/src/i18n/generated-locales/ar-SA.generated.ts +3 -2
  1616. package/src/i18n/generated-locales/ca-ES.generated.ts +3 -2
  1617. package/src/i18n/generated-locales/cs-CZ.generated.ts +3 -2
  1618. package/src/i18n/generated-locales/da-DK.generated.ts +3 -2
  1619. package/src/i18n/generated-locales/de-DE.generated.ts +3 -2
  1620. package/src/i18n/generated-locales/el-GR.generated.ts +3 -2
  1621. package/src/i18n/generated-locales/en.generated.ts +15 -2
  1622. package/src/i18n/generated-locales/es-ES.generated.ts +3 -2
  1623. package/src/i18n/generated-locales/fi-FI.generated.ts +3 -2
  1624. package/src/i18n/generated-locales/fr-FR.generated.ts +3 -2
  1625. package/src/i18n/generated-locales/he-IL.generated.ts +3 -2
  1626. package/src/i18n/generated-locales/hu-HU.generated.ts +3 -2
  1627. package/src/i18n/generated-locales/it-IT.generated.ts +3 -2
  1628. package/src/i18n/generated-locales/ja-JP.generated.ts +3 -2
  1629. package/src/i18n/generated-locales/ko-KR.generated.ts +3 -2
  1630. package/src/i18n/generated-locales/nl-NL.generated.ts +3 -2
  1631. package/src/i18n/generated-locales/no-NO.generated.ts +3 -2
  1632. package/src/i18n/generated-locales/pl-PL.generated.ts +3 -2
  1633. package/src/i18n/generated-locales/pseudo.generated.ts +15 -2
  1634. package/src/i18n/generated-locales/pt-BR.generated.ts +3 -2
  1635. package/src/i18n/generated-locales/pt-PT.generated.ts +3 -2
  1636. package/src/i18n/generated-locales/ro-RO.generated.ts +3 -2
  1637. package/src/i18n/generated-locales/ru-RU.generated.ts +3 -2
  1638. package/src/i18n/generated-locales/sr-SP.generated.ts +3 -2
  1639. package/src/i18n/generated-locales/sv-SE.generated.ts +3 -2
  1640. package/src/i18n/generated-locales/tr-TR.generated.ts +3 -2
  1641. package/src/i18n/generated-locales/uk-UA.generated.ts +3 -2
  1642. package/src/i18n/generated-locales/vi-VN.generated.ts +3 -2
  1643. package/src/i18n/generated-locales/zh-CN.generated.ts +3 -2
  1644. package/src/i18n/generated-locales/zh-TW.generated.ts +3 -2
  1645. package/src/i18n/index.ts +6 -1
  1646. package/src/i18n/publicContext.ts +29 -0
  1647. package/src/i18n/resolve.ts +17 -4
  1648. package/src/i18n/useComponentTranslator.ts +45 -0
  1649. package/src/i18n/useTranslator.ts +8 -1
  1650. package/src/motion/MEASUREMENTS.md +1 -1
  1651. package/src/motion/README.md +11 -0
  1652. package/src/motion/animatedLayout.ts +1079 -48
  1653. package/src/motion/animator.ts +225 -13
  1654. package/src/motion/presentation.ts +149 -0
  1655. package/src/motion/uikit/gestures.ts +15 -8
  1656. package/src/motion/uikit/index.ts +1 -0
  1657. package/src/motion/uikit/longPress.ts +29 -0
  1658. package/src/motion/uikit/springs.ts +19 -0
  1659. package/src/privateAttributes/hapticSwitch.stylex.ts +27 -0
  1660. package/src/privateAttributes/layerRoot.stylex.ts +28 -0
  1661. package/src/privateAttributes/segmentDisabled.stylex.ts +28 -0
  1662. package/src/theme/Theme.tsx +8 -4
  1663. package/src/theme/useTheme.ts +6 -1
  1664. package/src/utils/accessibleName.ts +87 -0
  1665. package/src/utils/clickGuard.ts +157 -0
  1666. package/src/utils/coarsePointer.ts +51 -0
  1667. package/src/utils/devWarning.ts +4 -9
  1668. package/src/utils/flatTree.ts +40 -0
  1669. package/src/utils/focusOutline.stylex.ts +9 -19
  1670. package/src/utils/focusReturn.ts +74 -8
  1671. package/src/utils/getNodeText.ts +2 -1
  1672. package/src/utils/hitArea.ts +14 -17
  1673. package/src/utils/ime.ts +23 -51
  1674. package/src/utils/inputPresentation.ts +5 -5
  1675. package/src/utils/inputStream.ts +155 -0
  1676. package/src/utils/interactionModality.ts +173 -68
  1677. package/src/utils/interactionOverlay.stylex.ts +72 -88
  1678. package/src/utils/plainDate.ts +29 -1
  1679. package/src/utils/presentation.ts +31 -47
  1680. package/src/utils/pressDisabled.ts +32 -0
  1681. package/src/utils/pressFeedback.ts +118 -107
  1682. package/src/utils/pressGesture.ts +11 -21
  1683. package/src/utils/rtlStyles.ts +13 -24
  1684. package/src/utils/selectionLock.ts +188 -0
  1685. package/src/utils/sharedMutationObserver.ts +2 -2
  1686. package/src/utils/standaloneMonthCapitals.generated.ts +17 -0
  1687. package/src/utils/timeFormat.ts +5 -13
  1688. package/src/utils/touchPresentation.stylex.ts +8 -14
  1689. package/src/utils/touchPresentation.ts +37 -62
  1690. package/src/utils/touchQueries.ts +24 -1
  1691. package/src/utils/typeaheadMatch.ts +142 -0
  1692. package/src/utils/useFocusLeavingChange.ts +53 -0
  1693. package/src/AlertDialog/AlertDialog.spec.md +0 -259
  1694. package/src/AppShell/AppShell.spec.md +0 -331
  1695. package/src/AspectRatio/AspectRatio.spec.md +0 -179
  1696. package/src/Avatar/Avatar.spec.md +0 -253
  1697. package/src/Avatar/AvatarStatusDot.spec.md +0 -208
  1698. package/src/AvatarGroup/AvatarGroup.spec.md +0 -205
  1699. package/src/AvatarGroup/AvatarGroupOverflow.spec.md +0 -210
  1700. package/src/Badge/Badge.spec.md +0 -207
  1701. package/src/Banner/Banner.spec.md +0 -282
  1702. package/src/Blockquote/Blockquote.spec.md +0 -171
  1703. package/src/BottomSheet/BottomSheet.spec.md +0 -457
  1704. package/src/BottomSheet/BottomSheetSwitcher.spec.md +0 -367
  1705. package/src/Breadcrumbs/BreadcrumbItem.spec.md +0 -269
  1706. package/src/Breadcrumbs/Breadcrumbs.spec.md +0 -165
  1707. package/src/Button/Button.spec.md +0 -322
  1708. package/src/ButtonGroup/ButtonGroup.spec.md +0 -220
  1709. package/src/Calendar/Calendar.spec.md +0 -248
  1710. package/src/Card/Card.spec.md +0 -205
  1711. package/src/Carousel/Carousel.spec.md +0 -146
  1712. package/src/Center/Center.spec.md +0 -205
  1713. package/src/Chat/ChatComposer.spec.md +0 -246
  1714. package/src/Chat/ChatComposerDrawer.spec.md +0 -267
  1715. package/src/Chat/ChatComposerInput.spec.md +0 -224
  1716. package/src/Chat/ChatComposerTokenElement.spec.md +0 -164
  1717. package/src/Chat/ChatDictationButton.spec.md +0 -205
  1718. package/src/Chat/ChatLayout.spec.md +0 -276
  1719. package/src/Chat/ChatLayoutScrollButton.spec.md +0 -322
  1720. package/src/Chat/ChatMessage.spec.md +0 -264
  1721. package/src/Chat/ChatMessageBubble.spec.md +0 -263
  1722. package/src/Chat/ChatMessageList.spec.md +0 -222
  1723. package/src/Chat/ChatMessageMetadata.spec.md +0 -220
  1724. package/src/Chat/ChatSendButton.spec.md +0 -238
  1725. package/src/Chat/ChatSystemMessage.spec.md +0 -224
  1726. package/src/Chat/ChatTokenizedText.spec.md +0 -190
  1727. package/src/Chat/ChatToolCalls.spec.md +0 -194
  1728. package/src/CheckboxInput/CheckboxInput.spec.md +0 -218
  1729. package/src/CheckboxList/CheckboxList.spec.md +0 -332
  1730. package/src/CheckboxList/CheckboxListItem.spec.md +0 -302
  1731. package/src/Citation/Citation.spec.md +0 -192
  1732. package/src/ClickableCard/ClickableCard.spec.md +0 -241
  1733. package/src/Code/Code.spec.md +0 -170
  1734. package/src/CodeBlock/CodeBlock.spec.md +0 -243
  1735. package/src/Collapsible/Collapsible.spec.md +0 -247
  1736. package/src/Collapsible/CollapsibleGroup.spec.md +0 -229
  1737. package/src/CommandPalette/CommandPalette.spec.md +0 -278
  1738. package/src/CommandPalette/CommandPaletteEmpty.spec.md +0 -190
  1739. package/src/CommandPalette/CommandPaletteInput.spec.md +0 -215
  1740. package/src/CommandPalette/CommandPaletteItem.spec.md +0 -223
  1741. package/src/CommandPalette/CommandPaletteList.spec.md +0 -194
  1742. package/src/ComplexSelector/ComplexSelector.spec.md +0 -266
  1743. package/src/ContextMenu/ContextMenu.spec.md +0 -279
  1744. package/src/ContextMenu/ContextMenuItem.spec.md +0 -132
  1745. package/src/DateInput/DateInput.spec.md +0 -336
  1746. package/src/DateRangeInput/DateRangeInput.spec.md +0 -203
  1747. package/src/DateTimeInput/DateTimeInput.spec.md +0 -270
  1748. package/src/Dialog/Dialog.spec.md +0 -189
  1749. package/src/Dialog/modules/DialogHeader.spec.md +0 -211
  1750. package/src/Divider/Divider.spec.md +0 -252
  1751. package/src/Drawer/Drawer.spec.md +0 -388
  1752. package/src/Drawer/DrawerHeader.spec.md +0 -181
  1753. package/src/DropdownMenu/DropdownMenu.spec.md +0 -562
  1754. package/src/DropdownMenu/DropdownMenuCheckboxItem.spec.md +0 -192
  1755. package/src/DropdownMenu/DropdownMenuDivider.spec.md +0 -186
  1756. package/src/DropdownMenu/DropdownMenuGroup.spec.md +0 -145
  1757. package/src/DropdownMenu/DropdownMenuItem.spec.md +0 -215
  1758. package/src/DropdownMenu/DropdownMenuRadioGroup.spec.md +0 -187
  1759. package/src/DropdownMenu/DropdownMenuRadioItem.spec.md +0 -227
  1760. package/src/DropdownMenu/DropdownMenuSubMenu.spec.md +0 -231
  1761. package/src/DropdownMenu/modules/useMenuHover.spec.md +0 -283
  1762. package/src/DropdownMenu/modules/useMenuPress.spec.md +0 -348
  1763. package/src/EmptyState/EmptyState.spec.md +0 -203
  1764. package/src/Field/Field.spec.md +0 -226
  1765. package/src/Field/FieldLabel.spec.md +0 -192
  1766. package/src/FieldStatus/FieldStatus.spec.md +0 -224
  1767. package/src/FileInput/FileInput.spec.md +0 -199
  1768. package/src/FormLayout/FormLayout.spec.md +0 -201
  1769. package/src/Grid/Grid.spec.md +0 -193
  1770. package/src/Grid/GridSpan.spec.md +0 -158
  1771. package/src/Heading/Heading.spec.md +0 -198
  1772. package/src/HoverCard/HoverCard.spec.md +0 -244
  1773. package/src/Icon/Icon.spec.md +0 -244
  1774. package/src/IconButton/IconButton.spec.md +0 -197
  1775. package/src/Indicator/CheckIndicator.spec.md +0 -164
  1776. package/src/Indicator/CheckboxIndicator.spec.md +0 -164
  1777. package/src/Indicator/Indicator.spec.md +0 -188
  1778. package/src/InputGroup/InputGroup.spec.md +0 -199
  1779. package/src/InputGroup/InputGroupText.spec.md +0 -139
  1780. package/src/Item/Item.spec.md +0 -226
  1781. package/src/Kbd/Kbd.spec.md +0 -185
  1782. package/src/Layer/LayerProvider.spec.md +0 -149
  1783. package/src/Layout/Layout.spec.md +0 -243
  1784. package/src/Layout/LayoutContent.spec.md +0 -205
  1785. package/src/Layout/LayoutFooter.spec.md +0 -190
  1786. package/src/Layout/LayoutHeader.spec.md +0 -193
  1787. package/src/Layout/LayoutPanel.spec.md +0 -194
  1788. package/src/Lightbox/Lightbox.spec.md +0 -387
  1789. package/src/Link/Link.spec.md +0 -230
  1790. package/src/Link/LinkProvider.spec.md +0 -167
  1791. package/src/List/List.spec.md +0 -336
  1792. package/src/List/ListItem.spec.md +0 -205
  1793. package/src/Markdown/Markdown.spec.md +0 -595
  1794. package/src/Markdown/modules/headingLinks.spec.md +0 -262
  1795. package/src/Markdown/modules/remark.spec.md +0 -269
  1796. package/src/Markdown/modules/softBreaks.spec.md +0 -137
  1797. package/src/Markdown/modules/sourceLines.spec.md +0 -162
  1798. package/src/MetadataList/MetadataList.spec.md +0 -187
  1799. package/src/MetadataList/MetadataListItem.spec.md +0 -165
  1800. package/src/MobileNav/MobileNav.spec.md +0 -306
  1801. package/src/MoreMenu/MoreMenu.spec.md +0 -268
  1802. package/src/MultiSelector/MultiSelector.spec.md +0 -364
  1803. package/src/NavIcon/NavIcon.spec.md +0 -158
  1804. package/src/NavMenu/NavHeadingMenu.spec.md +0 -264
  1805. package/src/NumberInput/NumberInput.spec.md +0 -270
  1806. package/src/Outline/Outline.spec.md +0 -258
  1807. package/src/Outline/modules/parseOutlineFromMarkdown.spec.md +0 -150
  1808. package/src/OverflowList/OverflowList.spec.md +0 -204
  1809. package/src/Overlay/Overlay.spec.md +0 -304
  1810. package/src/Pagination/Pagination.spec.md +0 -300
  1811. package/src/Popover/Popover.spec.md +0 -525
  1812. package/src/PowerSearch/PowerSearch.spec.md +0 -661
  1813. package/src/ProgressBar/ProgressBar.spec.md +0 -285
  1814. package/src/RadioList/RadioList.spec.md +0 -227
  1815. package/src/RadioList/RadioListItem.spec.md +0 -223
  1816. package/src/Resizable/Resizable.spec.md +0 -298
  1817. package/src/ScrollableArea/ScrollableArea.spec.md +0 -190
  1818. package/src/ScrollableArea/modules/useScrollableArea.spec.md +0 -149
  1819. package/src/Section/Section.spec.md +0 -197
  1820. package/src/SegmentedControl/SegmentedControl.spec.md +0 -261
  1821. package/src/SegmentedControl/SegmentedControlItem.spec.md +0 -206
  1822. package/src/SelectableCard/SelectableCard.spec.md +0 -230
  1823. package/src/Selector/Selector.spec.md +0 -379
  1824. package/src/SideNav/SideNav.spec.md +0 -247
  1825. package/src/SideNav/SideNavCollapseButton.spec.md +0 -161
  1826. package/src/SideNav/SideNavHeading.spec.md +0 -226
  1827. package/src/SideNav/SideNavItem.spec.md +0 -236
  1828. package/src/SideNav/SideNavSection.spec.md +0 -153
  1829. package/src/Skeleton/Skeleton.spec.md +0 -184
  1830. package/src/Slider/Slider.spec.md +0 -287
  1831. package/src/Spinner/Spinner.spec.md +0 -231
  1832. package/src/Stack/Stack.spec.md +0 -203
  1833. package/src/StatusDot/StatusDot.spec.md +0 -224
  1834. package/src/Stepper/Step.spec.md +0 -200
  1835. package/src/Stepper/Stepper.spec.md +0 -327
  1836. package/src/Switch/Switch.spec.md +0 -277
  1837. package/src/TabList/Tab.spec.md +0 -201
  1838. package/src/TabList/TabList.spec.md +0 -217
  1839. package/src/TabList/TabMenu.spec.md +0 -198
  1840. package/src/Table/Table.spec.md +0 -395
  1841. package/src/Table/plugins/activation/useTableActivation.spec.md +0 -254
  1842. package/src/Table/plugins/columnResize/useTableColumnResize.spec.md +0 -373
  1843. package/src/Table/plugins/infiniteScroll/useTableInfiniteScroll.spec.md +0 -244
  1844. package/src/Table/plugins/rowStatus/useTableRowStatus.spec.md +0 -355
  1845. package/src/Table/plugins/virtualization/useTableVirtualization.spec.md +0 -266
  1846. package/src/Text/Text.spec.md +0 -193
  1847. package/src/TextArea/TextArea.spec.md +0 -300
  1848. package/src/TextInput/TextInput.spec.md +0 -260
  1849. package/src/Thumbnail/Thumbnail.spec.md +0 -244
  1850. package/src/TimeInput/TimeInput.spec.md +0 -270
  1851. package/src/Timer/Timer.spec.md +0 -215
  1852. package/src/Timestamp/Timestamp.spec.md +0 -246
  1853. package/src/Toast/Toast.spec.md +0 -291
  1854. package/src/ToggleButton/ToggleButton.spec.md +0 -256
  1855. package/src/ToggleButton/ToggleButtonGroup.spec.md +0 -195
  1856. package/src/Token/Token.spec.md +0 -262
  1857. package/src/Tokenizer/Tokenizer.spec.md +0 -615
  1858. package/src/Toolbar/Toolbar.spec.md +0 -227
  1859. package/src/Tooltip/Tooltip.spec.md +0 -267
  1860. package/src/TopNav/TopNav.spec.md +0 -190
  1861. package/src/TopNav/TopNavHeading.spec.md +0 -211
  1862. package/src/TopNav/TopNavItem.spec.md +0 -189
  1863. package/src/TopNav/TopNavMegaMenu.spec.md +0 -190
  1864. package/src/TopNav/TopNavMegaMenuFeaturedCard.spec.md +0 -150
  1865. package/src/TopNav/TopNavMegaMenuItem.spec.md +0 -155
  1866. package/src/TopNav/TopNavMenu.spec.md +0 -202
  1867. package/src/TreeList/TreeList.spec.md +0 -328
  1868. package/src/Typeahead/BaseTypeahead.spec.md +0 -270
  1869. package/src/Typeahead/Typeahead.spec.md +0 -257
  1870. package/src/VisuallyHidden/VisuallyHidden.spec.md +0 -170
  1871. package/src/i18n/InternationalizationProvider.spec.md +0 -252
@@ -3,10 +3,9 @@
3
3
  /**
4
4
  * @file GestureHost.ts
5
5
  * @input DOM touch, pointer, click, contextmenu, scroll and focus events of
6
- * one document; elements with recognizers and consumers attached, and
7
- * consumer types found by attribute
8
- * @output Exports GestureHost (the DOM side of the gesture system),
9
- * getGestureHost (one host per document) and the delegated consumer type
6
+ * one document; elements with recognizers and consumers attached
7
+ * @output Exports GestureHost (the DOM side of the gesture system) and
8
+ * getGestureHost (one host per document)
10
9
  * @position Browser adapter of packages/core/src/gestures: turns real events
11
10
  * into GestureArena input, and carries out what the arena decides
12
11
  *
@@ -14,36 +13,36 @@
14
13
  *
15
14
  * - Recognizers and press consumers attach for a mouse, a pen and a finger
16
15
  * alike (`spec:AST-094` FR43, FR19). Where the primary pointer is coarse
17
- * the host listens on the page while something enabled could take a
18
- * touch. Where it is fine, each element with an enabled recognizer or
19
- * consumer keeps one passive `pointerdown` listener and the page has none:
20
- * a press on it (a mouse's primary button, a pen, or a finger, whose
21
- * `pointerdown` comes before its `touchstart`) installs the host's page
22
- * listeners, which go once that press's contacts end; the click listener
23
- * alone stays through the swallower's window, for the click a claimed lift
24
- * owes (FR21, FR24). An element whose recognizer claims a moving finger
25
- * keeps its blocking `touchmove` under every pointer, a listener FR24
26
- * counts apart.
27
- * - A right click, a pen's barrel button and a ctrl-click on macOS start no
28
- * press (primaryClick.ts).
29
- * - The host follows the primary pointer (a tablet docking a mouse): turning
30
- * fine with no press held removes the page listeners and cancels every
31
- * touch in flight.
32
- * - A delegated consumer type has no element to listen on: where the
33
- * primary pointer is fine, the document keeps one passive `pointerdown`
34
- * listener for every type, counted once per page (FR24).
16
+ * the host listens while something enabled could take a touch. Where it
17
+ * is fine, each element with an enabled recognizer or consumer keeps one
18
+ * passive `pointerdown` listener and the page has none; a press on it (a
19
+ * mouse's primary button, a pen, or a finger, whose `pointerdown` comes
20
+ * before its `touchstart`) installs the host's page listeners, which go
21
+ * once that press's contacts end and the arena has decided them, a tap
22
+ * that waits on a double tap included (FR24). After the last detach the
23
+ * host holds nothing: no listener, note, frame or timer (releaseWhenIdle).
24
+ * Under every pointer, an element whose recognizer claims a moving finger
25
+ * also keeps its blocking `touchmove`, a listener FR24 counts apart from
26
+ * the press's one.
27
+ * - A press consumer takes a mouse press as a press (DEC-21): PressTracker's
28
+ * fine-pointer profile paints at once and brakes no scroll (FR11).
29
+ * - The host follows the query (a tablet docking or undocking a mouse):
30
+ * turning fine cancels every touch in flight.
31
+ * - `perEventPointer` (AttachOptions), from before FR43, changes nothing.
35
32
  *
36
33
  * INPUT CHANNELS
37
34
  *
38
35
  * - Fingers begin and end with Touch Events: they are the only cancelable
39
36
  * channel (a pointer event's preventDefault cannot stop a scroll or a
40
- * click), they keep arriving after the browser takes a pan (which a scroll
41
- * handoff needs), and every event lists all the fingers at once. A
42
- * finger's movement comes from BOTH its `touchmove`s and its
43
- * `pointermove`s (paired at touchstart by target and position), the echo
44
- * of one in the other dropped: Chromium sends no `touchmove` until a
45
- * finger has travelled about 16 px, while a tap fails and a pan begins at
46
- * 10.
37
+ * click), they keep arriving after the browser takes a pan (which a
38
+ * watcher following the scroll to the lift needs, `spec:AST-094` FR20,
39
+ * DEC-7), and every event lists all the fingers at once. A
40
+ * finger's movement is sampled from ONE channel: its `pointermove`s, once
41
+ * its pointerdown has paired with its touchstart (by target and
42
+ * position), since Chromium sends no `touchmove` until a finger has
43
+ * travelled about 16 px while a tap fails and a pan begins at 10; touch
44
+ * events sample only a finger no pointer event reported. The other
45
+ * channel keeps its control duties but feeds no sample.
47
46
  * - A finger's events go to the element it landed on even after that
48
47
  * element leaves the document, and then never reach the document. Each
49
48
  * tracked finger's target therefore gets its own listeners, and a finger
@@ -51,17 +50,43 @@
51
50
  * removed target never strands a gesture.
52
51
  * - Mice and pens come from Pointer Events, with coalesced samples for
53
52
  * velocity. A pen on an iPad also produces `stylus` touches; those are left
54
- * to the pointer path.
53
+ * to the pointer path, except that a claimed pen's stylus moves are
54
+ * cancelled as a finger's.
55
55
  * - `pointercancel` on a finger is the browser saying it took that finger
56
56
  * for its own pan or zoom; so is a `touchmove` that can no longer be
57
57
  * cancelled where `touch-action` let the browser pan, and a scroll above
58
58
  * the touch.
59
59
  *
60
+ * FINGERS
61
+ *
62
+ * - The host keeps one record of where each finger on the screen landed
63
+ * (`fingersDown()`). Finger scrolls (fingerScroll.ts) read it, and a
64
+ * scroll lock's page hold (pageHold.ts) asks which touches a recognizer
65
+ * owns; both live in their own modules, so a page that needs neither
66
+ * never ships them.
67
+ *
68
+ * TOUCHES ON MOVING ELEMENTS
69
+ *
70
+ * - iOS WebKit hit-tests an element a compositor animation moves where the
71
+ * animation started. There, at touch-down, the host resolves the moving
72
+ * elements (motion/presentation.ts: one style write each) and asks the
73
+ * engine again, so a contact goes to what is drawn under it; press
74
+ * trackers read `presentedRect`, and a retargeted tap clicks what it
75
+ * touched once, with the engine's own click cancelled or swallowed.
76
+ *
60
77
  * WHAT THE BROWSER IS TOLD
61
78
  *
62
79
  * - Each element gets the `touch-action` its recognizers leave the browser
63
- * (touchAction.ts), set inline when they attach and restored when they
64
- * detach.
80
+ * (touchAction.ts), never wider than the element's own value (a caller's
81
+ * explicit `touch-action` stays in force), set inline when they attach and
82
+ * restored when they detach.
83
+ * - While a finger or a pen is down, text selection and the touch callout
84
+ * are off only where the hold does something (`spec:AST-094` FR41): on the
85
+ * elements of recognizers that bring a `selectionLock`, and on a non-text
86
+ * input under the finger inside them (WebKit's own style makes every
87
+ * input selectable); restored when the contact ends. A finger or a pen
88
+ * takes it under any primary pointer; a mouse never does (`spec:AST-017`
89
+ * FR59).
65
90
  * - Each element with a recognizer that can claim a touch while it moves (a
66
91
  * pan, a swipe, a long press that then drags, a pinch) gets a
67
92
  * NON-passive `touchmove` listener that cancels the event only while a
@@ -71,27 +96,39 @@
71
96
  * known cost: a scroll that BEGINS on such an element waits for a busy main
72
97
  * thread (measured in iOS Safari; a passive listener would hand every
73
98
  * diagonal to the scroll instead). Elements whose recognizers only claim
74
- * at the lift (taps) and press consumers get no blocking listener, so a
75
- * scroll starting on them never waits.
99
+ * at the lift (taps), recognizers that never claim (`claimsTouches` false)
100
+ * and press consumers get no blocking listener, and the listener a
101
+ * finger's target gets at touch-down is passive for them too, so a scroll
102
+ * starting on them never waits.
103
+ * - The browser took a finger on `pointercancel`, on its first uncancelable
104
+ * `touchmove` where it could pan, or on a scroll above it once the finger
105
+ * has travelled the slop; a scroll under a finger that has not moved is
106
+ * the page's own and leaves the touch alone.
76
107
  * - A lift whose click must not happen cancels its `touchend` (no click, no
77
- * compatibility mouse events) and arms a one-shot swallower for the next
78
- * trusted click; a click held for a recognizer that may still recognize is
108
+ * compatibility mouse events) and arms the shared click guard
109
+ * (utils/clickGuard.ts, the menu press model's too) for the browser's next
110
+ * click; a click held for a recognizer that may still recognize is
79
111
  * replayed if they all fail. Keyboard and assistive-technology clicks
80
112
  * (`detail === 0`) always pass.
81
113
  * - A `contextmenu` while a recognizer owns a touch is cancelled, so a long
82
114
  * press never also opens the browser's menu.
83
- *
84
- * DELEGATED CONSUMERS. A consumer type registered with an attribute (a
85
- * pressable row) is found at touch-down by walking up from the touch target,
86
- * and an instance is created for that one touch: a list of a thousand rows
87
- * costs nothing until a finger lands on one.
115
+ * - When the app loses focus (a window blur, a hidden page), every touch in
116
+ * flight is cancelled, as in UIKit; a finger the browser keeps alive lifts
117
+ * on nothing: its `touchend` is cancelled (`spec:AST-094` FR28).
88
118
  *
89
119
  * SSR-safe: nothing touches `window` or `document` until something attaches.
90
120
  *
91
121
  * SYNC: When modified, update GestureHost.test.ts and README.md.
92
122
  */
93
123
 
94
- import {UIKIT_GESTURES} from '../motion/uikit/gestures';
124
+ import {isRtlElement} from '../hooks/isRtlElement';
125
+ import {
126
+ presentedElements,
127
+ presentedOffsetOf,
128
+ resolvePresented,
129
+ watchPresentedElements,
130
+ } from '../motion/presentation';
131
+ import {UIKIT_PRESS, UIKIT_TAP} from '../motion/uikit/gestures';
95
132
  import {
96
133
  browserClock,
97
134
  GestureArena,
@@ -100,14 +137,15 @@ import {
100
137
  type GestureArenaOptions,
101
138
  type GestureClock,
102
139
  } from './GestureArena';
103
- import type {GestureRecognizer} from './GestureRecognizer';
104
- import {HAPTIC_SWITCH_ATTRIBUTE} from './haptics';
105
- import {isPrimaryClick} from '../utils/primaryClick';
140
+ import type {GestureRecognizer, SelectionLock} from './GestureRecognizer';
141
+ import type {PressBounds} from './PressTracker';
142
+ import type {PanGestureRecognizer} from './PanGestureRecognizer';
106
143
  import {createNativeScrollProbe, parentAcrossShadow} from './nativeScroll';
144
+ import {containsAlongFlatTree} from '../utils/flatTree';
145
+ import {isIosWebKit} from '../utils/touchQueries';
107
146
  import {
108
147
  gestureHostStyle,
109
148
  type GestureHostStyle,
110
- holdSelectionStyle,
111
149
  intersectTouchAction,
112
150
  } from './touchAction';
113
151
  import {
@@ -125,16 +163,29 @@ import type {
125
163
  TouchInput,
126
164
  TouchSample,
127
165
  } from './types';
166
+ import {internals} from './recognizerInternals';
167
+ import {
168
+ armClickGuard,
169
+ disarmClickGuard,
170
+ withoutClickGuard,
171
+ } from '../utils/clickGuard';
172
+ import {subscribeInput} from '../utils/inputStream';
173
+ import {isPrimaryClick} from '../utils/primaryClick';
174
+ import {locksSelectionFor} from '../utils/selectionLock';
175
+ import {isCoarsePointer, watchCoarsePointer} from '../utils/coarsePointer';
176
+ import {gestureHosts} from './hostRegistry';
128
177
 
129
178
  interface Registration {
130
179
  readonly recognizers: GestureRecognizer[];
131
180
  consumer: TouchConsumer | null;
132
- touchMoveListener: EventListener | null;
133
181
  /**
134
- * Under `inputMode: 'pointer-events'`, the element's blocking `touchend`
135
- * listener: it cancels a claimed finger's lift (`spec:AST-094` FR21).
182
+ * Where fingers come from their pointer events, whether the element
183
+ * carries the host's blocking `touchend` handler, which cancels a claimed
184
+ * finger's lift (`spec:AST-094` FR21).
136
185
  */
137
- touchEndListener: EventListener | null;
186
+ hasTouchEndListener: boolean;
187
+ /** Whether the element carries the host's shared blocking touchmove handler. */
188
+ hasTouchMoveListener: boolean;
138
189
  /** Inline values the host replaced, to restore on detach. */
139
190
  readonly savedStyle: Map<string, string>;
140
191
  /**
@@ -147,6 +198,8 @@ interface Registration {
147
198
  manageStyle: boolean;
148
199
  /** An action group (`family:action-groups` FR5). */
149
200
  actionGroup: boolean;
201
+ /** The attachments that asked for the action group; it lasts while one does. */
202
+ actionGroupAsks: number;
150
203
  }
151
204
 
152
205
  export interface GestureHostOptions {
@@ -159,6 +212,13 @@ export interface GestureHostOptions {
159
212
  inputMode?: 'auto' | 'pointer-events';
160
213
  /** Every recognizer transition, for debugging and tests. */
161
214
  onTransition?: GestureArenaOptions['onTransition'];
215
+ /**
216
+ * Send a contact to what is drawn while a compositor animation moves an
217
+ * element (motion/presentation.ts): `auto` where the engine hit-tests such
218
+ * an element where its animation started (iOS WebKit); `always` or
219
+ * `never` for tests. @default 'auto'
220
+ */
221
+ presentedHitTesting?: 'auto' | 'always' | 'never';
162
222
  /**
163
223
  * Whether the primary pointer is coarse (a phone, a tablet). Gestures
164
224
  * attach for every pointer (`spec:AST-094` FR43); where it is fine, an
@@ -178,6 +238,12 @@ export interface AttachOptions {
178
238
  * @default true
179
239
  */
180
240
  manageStyle?: boolean;
241
+ /**
242
+ * Accepted and ignored: every attachment reads each event's pointer
243
+ * (`spec:AST-094` FR43). Kept so callers written before FR43 compile.
244
+ * @deprecated
245
+ */
246
+ perEventPointer?: boolean;
181
247
  /**
182
248
  * The element is an action group, sibling actions a held pointer slides
183
249
  * across (`family:action-groups` FR5). It is served like every
@@ -186,21 +252,6 @@ export interface AttachOptions {
186
252
  actionGroup?: boolean;
187
253
  }
188
254
 
189
- /**
190
- * A kind of view-level consumer found by attribute instead of attached to
191
- * each element.
192
- */
193
- export interface DelegatedConsumerType {
194
- /** Marks an element as this kind of consumer. */
195
- readonly attribute: string;
196
- /**
197
- * The consumer for one contact on `element`, or null for none (a disabled
198
- * control). The innermost marked element decides, even with null: a press
199
- * on a disabled button does not light the row around it.
200
- */
201
- create(element: Element, pointerType: PointerKind): TouchConsumer | null;
202
- }
203
-
204
255
  const STYLE_PROPERTIES: Record<keyof GestureHostStyle, string> = {
205
256
  touchAction: 'touch-action',
206
257
  WebkitTouchCallout: '-webkit-touch-callout',
@@ -208,15 +259,6 @@ const STYLE_PROPERTIES: Record<keyof GestureHostStyle, string> = {
208
259
  userSelect: 'user-select',
209
260
  };
210
261
 
211
- /**
212
- * Whether a recognizer can take a touch while it moves, and so needs the
213
- * blocking `touchmove` listener that stops the browser's pan. A tap claims
214
- * only at the lift (it fails once the finger travels), so it needs none.
215
- */
216
- function claimsWhileMoving(recognizer: GestureRecognizer): boolean {
217
- return recognizer.acceptsTouchInput && recognizer.kind !== 'tap';
218
- }
219
-
220
262
  /**
221
263
  * A CSS-wide keyword, which names no touch-action of its own: the value in
222
264
  * force resolves it (`initial` and `unset` to `auto`, `inherit` to the
@@ -238,16 +280,41 @@ const CSS_WIDE_KEYWORDS: ReadonlySet<string> = new Set([
238
280
  * Run `task` in the next frame, before it paints: a read there styles what
239
281
  * the frame must style anyway, and its writes are what the frame shows.
240
282
  */
241
- function inNextFrame(view: Window | null, task: () => void): void {
283
+ function inNextFrame(view: Window | null, task: () => void): () => void {
242
284
  if (view != null && typeof view.requestAnimationFrame === 'function') {
243
- view.requestAnimationFrame(task);
244
- } else {
245
- setTimeout(task, 0);
285
+ const frame = view.requestAnimationFrame(task);
286
+ return () => view.cancelAnimationFrame(frame);
246
287
  }
288
+ const timeout = setTimeout(task, 0);
289
+ return () => clearTimeout(timeout);
247
290
  }
248
291
 
292
+ /** An armed press tracker's own element listeners: they never cancel. */
249
293
  const PASSIVE_CAPTURE = {capture: true, passive: true} as const;
250
294
 
295
+ /**
296
+ * Whether a recognizer can take a touch while it moves, and so needs the
297
+ * blocking `touchmove` listener that stops the browser's pan. A tap claims
298
+ * only at the lift (it fails once the finger travels), so it needs none.
299
+ */
300
+ function claimsWhileMoving(recognizer: GestureRecognizer): boolean {
301
+ return (
302
+ recognizer.claimsTouches &&
303
+ internals(recognizer).acceptsTouchInput &&
304
+ internals(recognizer).family !== 'tap'
305
+ );
306
+ }
307
+
308
+ /**
309
+ * A pan (or a pan subclass), told apart by its family rather than its class,
310
+ * so a page that constructs no pan never ships PanGestureRecognizer.
311
+ */
312
+ function isPanRecognizer(
313
+ recognizer: GestureRecognizer,
314
+ ): recognizer is PanGestureRecognizer {
315
+ return internals(recognizer).family === 'pan';
316
+ }
317
+
251
318
  /**
252
319
  * A screen-edge pan, told apart by its kind (architecture:react-component-runtime
253
320
  * INV13), so the host can report its layout changes without importing it.
@@ -260,31 +327,30 @@ function asScreenEdgePan(
260
327
  : null;
261
328
  }
262
329
 
263
- /** The inline properties a held press sets to none (holdSelectionStyle). */
264
- const HOLD_SELECTION_PROPERTIES = [
265
- '-webkit-touch-callout',
266
- '-webkit-user-select',
267
- 'user-select',
268
- ] as const;
269
-
270
- /** Elements a held press turned selection off on, and what to restore. */
271
- const heldSelection = new WeakMap<
272
- HTMLElement,
273
- {
274
- count: number;
275
- saved: ReadonlyArray<{name: string; value: string; priority: string}>;
276
- }
277
- >();
278
- const ACTIVE_CAPTURE = {capture: true, passive: false} as const;
279
-
280
330
  type StylusTouch = Touch & {touchType?: string};
281
331
 
332
+ function hasStylusTouch(event: TouchEvent): boolean {
333
+ return touchesOf(event.changedTouches).some(
334
+ touch => (touch as StylusTouch).touchType === 'stylus',
335
+ );
336
+ }
337
+
282
338
  interface PlacedContact {
283
339
  readonly x: number;
284
340
  readonly y: number;
285
341
  readonly target: unknown;
286
342
  }
287
343
 
344
+ /**
345
+ * How long a claimed finger's lift waits for its `touchend`, ms. The touchend
346
+ * follows its pointerup in the same frame; a browser that sends pointer events
347
+ * alone for a finger never sends it, and the record goes.
348
+ */
349
+ const CLAIMED_LIFT_MS = 500;
350
+
351
+ /** At most this many claimed lifts wait for their `touchend` at once (FR24). */
352
+ const CLAIMED_LIFT_LIMIT = 8;
353
+
288
354
  /** A touchstart and a pointerdown describe one finger: same target, same spot. */
289
355
  function isSamePlace(a: PlacedContact, b: PlacedContact): boolean {
290
356
  return (
@@ -298,6 +364,23 @@ function isPointerKind(type: string): type is PointerKind {
298
364
  return type === 'touch' || type === 'mouse' || type === 'pen';
299
365
  }
300
366
 
367
+ /**
368
+ * What an event, or one of its touches, landed on. Inside an open shadow root
369
+ * the document's listeners see the shadow host, in `event.target` and in a
370
+ * touch's `target` alike, while the composed path starts at the element
371
+ * itself. A touch whose target is not the event's (another finger) keeps its
372
+ * own.
373
+ */
374
+ function landedOn(
375
+ event: Event,
376
+ retargeted: EventTarget | null = event.target,
377
+ ): EventTarget | null {
378
+ if (retargeted !== event.target) {
379
+ return retargeted;
380
+ }
381
+ return event.composedPath()[0] ?? retargeted;
382
+ }
383
+
301
384
  /**
302
385
  * An event's time on the arena's clock (`performance.now()`). Some engines
303
386
  * and DOM emulators stamp events in epoch milliseconds instead.
@@ -323,9 +406,34 @@ export class GestureHost {
323
406
  readonly arena: GestureArena;
324
407
  private readonly doc: Document;
325
408
  private readonly registry = new Map<Element, Registration>();
326
- private readonly delegated = new Set<DelegatedConsumerType>();
409
+ /** Stops following the animator's moving elements (iOS WebKit only). */
410
+ private stopWatchingMovers: (() => void) | null = null;
411
+ /** Whether the document carries the blocking touchmove for a mover. */
412
+ private stopBlockingForMovers: (() => void) | null = null;
413
+ /** Elements whose caller touch-action waits for a read after paint. */
414
+ private readonly pendingCallerReads = new Set<HTMLElement>();
415
+ private isCallerReadScheduled = false;
416
+ /** Cancels the scheduled next-frame read (readCallerTouchActionInNextFrame). */
417
+ private cancelCallerRead: (() => void) | null = null;
418
+ /** The selection lock each contact holds, by host contact id. */
419
+ private readonly lockedBy = new Map<number, () => void>();
420
+ private readonly presentedHitTesting: 'auto' | 'always' | 'never';
421
+ /**
422
+ * Contacts sent to what is drawn instead of what the engine hit, by host
423
+ * contact id, with where they landed (for their click).
424
+ */
425
+ private readonly retargeted = new Map<
426
+ number,
427
+ {x: number; y: number; target: EventTarget}
428
+ >();
327
429
  /** Touch.identifier → arena id, for live fingers. */
328
430
  private readonly touchIds = new Map<number, number>();
431
+ /**
432
+ * Fingers cancelled because the app lost focus, kept until the browser
433
+ * ends them: a browser that keeps such a touch alive must not let its
434
+ * lift click (`spec:AST-094` FR28: nothing acts).
435
+ */
436
+ private readonly cancelledFingers = new Set<number>();
329
437
  /** Touch.identifier → the element the finger landed on. */
330
438
  private readonly touchTargets = new Map<number, EventTarget>();
331
439
  /**
@@ -335,17 +443,21 @@ export class GestureHost {
335
443
  */
336
444
  private readonly watched = new Map<
337
445
  EventTarget,
338
- {count: number; blocking: number}
446
+ {count: number; blocking: number; claiming: number}
339
447
  >();
340
448
  /** Fingers whose target listener is the blocking one. */
341
449
  private readonly blockingFingers = new Set<number>();
450
+ /**
451
+ * Fingers a participant could claim (a recognizer that claims touches, or
452
+ * a press consumer): only their target's `touchend` may need cancelling,
453
+ * so a touch only watchers follow gets a passive one (`spec:AST-094`
454
+ * FR20).
455
+ */
456
+ private readonly claimingFingers = new Set<number>();
342
457
  /** Touch events already handled (the document's and the target's listeners both see one). */
343
458
  private readonly processed = new WeakSet<Event>();
344
459
  /** pointerId → arena id, for live mouse and pen contacts. */
345
460
  private readonly pointerIds = new Map<number, number>();
346
- /** Elements whose caller touch-action waits for a read after paint. */
347
- private readonly pendingCallerReads = new Set<HTMLElement>();
348
- private isCallerReadScheduled = false;
349
461
  /**
350
462
  * The boxes the host watches for screen-edge pans (syncLayoutWatch): each
351
463
  * element with an enabled one, and the root for one whose band moves with
@@ -359,63 +471,103 @@ export class GestureHost {
359
471
  /**
360
472
  * A finger's pointerId → its arena id, once its pointerdown and its
361
473
  * touchstart are paired. Chromium sends no `touchmove` until a finger has
362
- * travelled its slop (about 16 px), but sends every `pointermove`, so the
363
- * finger's movement comes from both channels; and its `pointercancel` is
364
- * the browser's claim of exactly that finger.
474
+ * travelled its slop (about 16 px), but sends every `pointermove`, so a
475
+ * paired finger is sampled from its pointer events (`pointerFed`); and its
476
+ * `pointercancel` is the browser's claim of exactly that finger.
365
477
  */
366
478
  private readonly fingerPointers = new Map<number, number>();
367
479
  /** Finger pointerdowns still waiting for their touchstart. */
368
480
  private readonly pendingPointers = new Map<number, PlacedContact>();
369
481
  /**
370
- * Under `inputMode: 'pointer-events'`, where claimed fingers lifted: the
371
- * `touchend` that follows their `pointerup` is cancelled (FR21).
482
+ * Where fingers come from their pointer events, where claimed fingers
483
+ * lifted and when: the `touchend` that follows each `pointerup` is
484
+ * cancelled (FR21). A record no `touchend` consumed expires
485
+ * (CLAIMED_LIFT_MS).
372
486
  */
373
- private readonly claimedLifts: PlacedContact[] = [];
487
+ private readonly claimedLifts: (PlacedContact & {time: number})[] = [];
488
+ /** The one timer that drops claimed lifts whose `touchend` never came. */
489
+ private claimedLiftTimer: unknown = null;
490
+ /** The arena's clock, which the claimed lifts' timer runs on too. */
491
+ private readonly clock: GestureClock;
374
492
  /** Fingers still waiting for their pointerdown, by arena id. */
375
493
  private readonly unpairedTouches = new Map<number, PlacedContact>();
376
- /** The elements each held contact turned selection off on. */
377
- private readonly heldSelectionBy = new Map<number, HTMLElement[]>();
378
494
  private readonly isPrimaryPointerCoarse: () => boolean;
379
- private readonly coarseQuery: MediaQueryList | null;
380
- private isWatchingPointer = false;
381
- private readonly onPointerKindChange = (): void => this.refreshAll();
382
- /** The last position fed per contact, so one channel's echo is dropped. */
495
+ /** Whether the host follows `(pointer: coarse)` (no read was passed). */
496
+ private readonly followsPointer: boolean;
497
+ /** The last sample fed per contact: a contact's time never runs back. */
383
498
  private readonly lastFed = new Map<number, TouchSample>();
499
+ /**
500
+ * Fingers whose samples come from their pointer events. A finger the
501
+ * browser reports on both channels is sampled from ONE: the pointer
502
+ * channel, where its pointerdown paired with its touchstart; touch events
503
+ * sample only a finger no pointer event reported (no Pointer Events). The
504
+ * other channel keeps its control duties (cancelling, claiming, the
505
+ * browser's takeover) but never feeds a sample, so the two copies of one
506
+ * move cannot both reach a velocity, however far apart they arrive.
507
+ */
508
+ private readonly pointerFed = new Set<number>();
384
509
  /** When a finger was last down or lifted, and where it landed. */
385
510
  private lastTouch: {readonly target: Node; readonly time: number} | null =
386
511
  null;
387
512
  /** Scrollers a recognizer is scrolling itself this frame (ownScroll). */
388
- private readonly ownedScrolls = new Set<Node>();
513
+ private readonly ownedScrolls = new Map<Node, number>();
514
+ /** Numbers each ownScroll call: only the newest one's timer clears it. */
515
+ private ownScrollCalls = 0;
516
+ /** Cancels each scroller's pending ownScroll frames. */
517
+ private readonly ownScrollFrames = new Map<Node, () => void>();
389
518
  /** The last scroll a finger drove, and when. */
390
519
  private lastScroll: {readonly scroller: Node; readonly time: number} | null =
391
520
  null;
521
+ /** Predicates that hold a touch's target away from every participant. */
522
+ private readonly touchGates = new Set<(target: Node) => boolean>();
523
+ /** Who keeps the listeners installed without a registration (retain). */
524
+ private retainers = 0;
525
+ /** Told after every touch event that changed the fingers on the screen. */
526
+ private readonly fingerListeners = new Set<() => void>();
527
+ /**
528
+ * Where each finger now on the screen landed, from the last touch event's
529
+ * `touches` (every finger, whether or not a recognizer tracks it).
530
+ */
531
+ private fingerTargets: ReadonlyArray<Node> = [];
392
532
  private nextId = 1;
393
533
  private isInstalled = false;
394
- private readonly inputMode: 'auto' | 'pointer-events';
395
- private usesTouchEvents = true;
396
- private swallowDeadline = Number.NEGATIVE_INFINITY;
397
534
  /**
398
- * Where the primary pointer is fine: what listens for a press itself (the
399
- * elements that use a gesture, and the document for delegated consumers),
400
- * with its removal; whether a press one armed is held, the page's
401
- * listeners lasting that long; and the pending removal of the click
402
- * listener a released press kept (FR21, FR24).
535
+ * Whether the primary pointer is coarse (`spec:AST-094` FR19), read when
536
+ * something first attaches and kept current while anything is attached.
537
+ */
538
+ private isCoarse = false;
539
+ private stopWatchingPointer: (() => void) | null = null;
540
+ /** The input stream subscriptions while installed. */
541
+ private unsubscribers: (() => void)[] = [];
542
+ /**
543
+ * Where the primary pointer is fine, each element that uses a gesture
544
+ * listens for a press itself; the page's listeners last that press (FR24).
403
545
  */
404
- private readonly armed = new Map<EventTarget, () => void>();
546
+ private readonly armedElements = new Map<Element, () => void>();
405
547
  private isArmedPress = false;
406
- private clickRemoval: ReturnType<typeof setTimeout> | null = null;
548
+ /**
549
+ * Whether the installed listeners include the cancelable ones (the
550
+ * document's touchend, contextmenu and the window's click): only while a
551
+ * participant that can claim is attached (`spec:AST-094` FR20).
552
+ */
553
+ private isClaimingInstalled = false;
554
+ /** The input stream subscriptions syncClaimingListeners keeps. */
555
+ private claimingUnsubscribers: (() => void)[] = [];
556
+ private readonly inputMode: 'auto' | 'pointer-events';
557
+ private usesTouchEvents = true;
407
558
 
408
559
  constructor(doc: Document, options: GestureHostOptions = {}) {
409
560
  this.doc = doc;
410
561
  this.inputMode = options.inputMode ?? 'auto';
562
+ this.presentedHitTesting = options.presentedHitTesting ?? 'auto';
411
563
  const environment: GestureEnvironment = {
412
564
  viewportSize: () => ({
413
565
  width: doc.defaultView?.innerWidth ?? 0,
414
566
  height: doc.defaultView?.innerHeight ?? 0,
415
567
  }),
568
+ // The writing direction through core's one helper.
416
569
  isRtl: view =>
417
- view instanceof Element &&
418
- doc.defaultView?.getComputedStyle(view).direction === 'rtl',
570
+ view instanceof Element && isRtlElement(view as HTMLElement),
419
571
  // A screen-edge pan tells a view within its edge band from any other
420
572
  // by its box (spec:AST-094 FR18).
421
573
  viewRect: view => {
@@ -426,29 +578,22 @@ export class GestureHost {
426
578
  return {left, top, width, height};
427
579
  },
428
580
  };
581
+ this.clock = options.clock ?? browserClock;
429
582
  this.arena = new GestureArena({
430
- clock: options.clock ?? browserClock,
583
+ clock: this.clock,
431
584
  environment,
432
585
  onDeferredClick: (touch, allowed) => this.replayClick(touch, allowed),
586
+ // A press whose decision waited on a timer (a tap waiting on a double
587
+ // tap) ends here: an armed press stops listening (FR24).
588
+ onIdle: () => this.releaseArmedPress(),
433
589
  onTransition: options.onTransition,
434
590
  });
435
591
  const view = doc.defaultView;
436
- const coarseQuery =
437
- options.isPrimaryPointerCoarse == null &&
438
- typeof view?.matchMedia === 'function'
439
- ? view.matchMedia('(pointer: coarse)')
440
- : null;
592
+ // A test may pass its own read; otherwise the one coarse-pointer gate,
593
+ // followed as it changes.
594
+ this.followsPointer = options.isPrimaryPointerCoarse == null;
441
595
  this.isPrimaryPointerCoarse =
442
- options.isPrimaryPointerCoarse ?? (() => coarseQuery?.matches ?? false);
443
- this.coarseQuery = coarseQuery;
444
- }
445
-
446
- /** Re-derive every element's styles and the host's listeners. */
447
- private refreshAll(): void {
448
- for (const [element, registration] of this.registry) {
449
- this.refresh(element, registration);
450
- }
451
- this.syncListeners();
596
+ options.isPrimaryPointerCoarse ?? (() => isCoarsePointer(view));
452
597
  }
453
598
 
454
599
  // --- Attachment ------------------------------------------------------------
@@ -461,7 +606,12 @@ export class GestureHost {
461
606
  ): () => void {
462
607
  const registration = this.registrationFor(element);
463
608
  registration.manageStyle = options.manageStyle ?? registration.manageStyle;
464
- registration.actionGroup = options.actionGroup ?? registration.actionGroup;
609
+ // An action group while any attachment asks, whatever their order.
610
+ const asksForGroup = options.actionGroup === true;
611
+ if (asksForGroup) {
612
+ registration.actionGroupAsks += 1;
613
+ registration.actionGroup = true;
614
+ }
465
615
  recognizer.view = element;
466
616
  registration.recognizers.push(recognizer);
467
617
  recognizer.onEnabledChange = () => {
@@ -482,6 +632,10 @@ export class GestureHost {
482
632
  this.syncListeners();
483
633
  return () => {
484
634
  recognizer.onEnabledChange = null;
635
+ if (asksForGroup) {
636
+ registration.actionGroupAsks -= 1;
637
+ registration.actionGroup = registration.actionGroupAsks > 0;
638
+ }
485
639
  if (edgePan != null) {
486
640
  edgePan.onTouchBehaviorChange = null;
487
641
  }
@@ -570,14 +724,22 @@ export class GestureHost {
570
724
  };
571
725
 
572
726
  /** Attach the view-level touch consumer of an element (a pressable control). */
573
- attachConsumer(element: Element, consumer: TouchConsumer): () => void {
727
+ attachConsumer(
728
+ element: Element,
729
+ consumer: TouchConsumer,
730
+ _options: Pick<AttachOptions, 'perEventPointer'> = {},
731
+ ): () => void {
574
732
  const registration = this.registrationFor(element);
575
733
  registration.consumer = consumer;
734
+ this.refresh(element, registration);
576
735
  this.syncListeners();
577
736
  return () => {
578
737
  if (registration.consumer === consumer) {
579
738
  registration.consumer = null;
580
739
  }
740
+ // A keepsTouch consumer's blocking touchmove goes with it, even while
741
+ // the element keeps its recognizers.
742
+ this.refresh(element, registration);
581
743
  // Even when the element keeps a recognizer: one left disabled keeps
582
744
  // no listener or observer (FR24).
583
745
  this.syncListeners();
@@ -586,23 +748,217 @@ export class GestureHost {
586
748
  }
587
749
 
588
750
  /**
589
- * Find consumers of a kind by attribute, one instance per contact. Returns
590
- * the function that stops it.
751
+ * @internal The document this host serves.
591
752
  */
592
- addDelegatedConsumer(type: DelegatedConsumerType): () => void {
593
- this.delegated.add(type);
594
- this.syncListeners();
595
- return () => {
596
- this.delegated.delete(type);
597
- this.syncListeners();
753
+ get document(): Document {
754
+ return this.doc;
755
+ }
756
+
757
+ /**
758
+ * @internal Whether a recognizer owns the touch with this Touch Events
759
+ * `identifier`, so the browser must not pan it (pageHold.ts asks).
760
+ */
761
+ isTouchClaimed(identifier: number): boolean {
762
+ const id = this.touchIds.get(identifier);
763
+ return id != null && this.arena.isClaimed(id);
764
+ }
765
+
766
+ /**
767
+ * An element's box where it is drawn: the box the engine reports, moved
768
+ * by the compositor animations of it and its ancestors on engines that
769
+ * report and hit-test those where they started (iOS WebKit). Elsewhere
770
+ * `getBoundingClientRect` already reports the drawn box. Press trackers
771
+ * read their bounds through it.
772
+ */
773
+ presentedRect(element: Element): PressBounds {
774
+ const box = element.getBoundingClientRect();
775
+ if (!this.hitTestsLayout()) {
776
+ return box;
777
+ }
778
+ const {x, y} = presentedOffsetOf(element);
779
+ if (x === 0 && y === 0) {
780
+ return box;
781
+ }
782
+ return {
783
+ left: box.left + x,
784
+ top: box.top + y,
785
+ right: box.right + x,
786
+ bottom: box.bottom + y,
598
787
  };
599
788
  }
600
789
 
790
+ /** Whether this engine hit-tests a compositor-moved element at layout. */
791
+ private hitTestsLayout(): boolean {
792
+ return (
793
+ this.presentedHitTesting === 'always' ||
794
+ (this.presentedHitTesting === 'auto' && isIosWebKit(this.doc.defaultView))
795
+ );
796
+ }
797
+
798
+ /**
799
+ * Where a contact lands among what is drawn. iOS WebKit hit-tests an
800
+ * element that a compositor animation moves where the animation started:
801
+ * a finger on a settling sheet lands on whatever sat under the sheet's
802
+ * start (the scrim, which closes it), and a finger where the sheet was
803
+ * lands on the sheet. UIKit keeps an interruptible animation hit-testable
804
+ * where it is drawn (UIViewPropertyAnimator). The touch goes to what was
805
+ * drawn under the finger when it landed (`time`, its event's timestamp),
806
+ * even when a busy main thread hands it over later, and content that slid
807
+ * under the finger since takes nothing (`spec:AST-094` FR11).
808
+ */
809
+ private presentedTarget(
810
+ native: EventTarget | null,
811
+ x: number,
812
+ y: number,
813
+ time: number,
814
+ ): EventTarget | null {
815
+ if (!this.hitTestsLayout()) {
816
+ return native;
817
+ }
818
+ const movers = presentedElements().filter(element => {
819
+ if (!element.isConnected || element.ownerDocument !== this.doc) {
820
+ return false;
821
+ }
822
+ const {x: dx, y: dy} = presentedOffsetOf(element);
823
+ return Math.abs(dx) >= 0.5 || Math.abs(dy) >= 0.5;
824
+ });
825
+ if (movers.length === 0) {
826
+ return native;
827
+ }
828
+ // One style write per mover makes the engine hit-test it where it is
829
+ // drawn now; the hit test below flushes them. The engine then gets
830
+ // z-order, pointer-events and clipping right, which no box math would.
831
+ resolvePresented(movers);
832
+ let hit = this.drawnAt(x, y);
833
+ // A mover kept going while the touch waited for the main thread: what
834
+ // was under the finger when it landed is now that far along. A timestamp
835
+ // on another clock, or older than a second, is not corrected.
836
+ const age = (this.doc.defaultView?.performance.now() ?? time) - time;
837
+ if (age > 0 && age < 1000) {
838
+ const movedSince = (mover: Element) => {
839
+ const then = presentedOffsetOf(mover, time);
840
+ return Math.abs(then.x) >= 0.5 || Math.abs(then.y) >= 0.5 ? then : null;
841
+ };
842
+ const now = hit;
843
+ const under =
844
+ now == null
845
+ ? undefined
846
+ : movers.find(mover => containsAlongFlatTree(mover, now));
847
+ let landedOnMover = false;
848
+ for (const mover of movers) {
849
+ const then = movedSince(mover);
850
+ if (then == null) {
851
+ continue;
852
+ }
853
+ const landed = this.drawnAt(x - then.x, y - then.y);
854
+ if (landed != null && containsAlongFlatTree(mover, landed)) {
855
+ hit = landed;
856
+ landedOnMover = true;
857
+ break;
858
+ }
859
+ }
860
+ // Content that slid under the finger after it landed takes nothing:
861
+ // the touch goes to what was there, beneath it.
862
+ if (!landedOnMover && under != null && movedSince(under) != null) {
863
+ hit = this.drawnBeneath(x, y, movers);
864
+ }
865
+ }
866
+ if (hit == null || hit === native) {
867
+ return native;
868
+ }
869
+ const found = hit;
870
+ const node = native instanceof Node ? native : null;
871
+ const isAboutMover = movers.some(
872
+ mover =>
873
+ containsAlongFlatTree(mover, found) ||
874
+ (node != null && containsAlongFlatTree(mover, node)),
875
+ );
876
+ return isAboutMover ? found : native;
877
+ }
878
+
879
+ /** What is drawn at a point beneath every mover. */
880
+ private drawnBeneath(
881
+ x: number,
882
+ y: number,
883
+ movers: ReadonlyArray<Element>,
884
+ ): Element | null {
885
+ if (typeof this.doc.elementsFromPoint !== 'function') {
886
+ return null;
887
+ }
888
+ return (
889
+ this.doc
890
+ .elementsFromPoint(x, y)
891
+ .find(
892
+ element =>
893
+ !movers.some(mover => containsAlongFlatTree(mover, element)),
894
+ ) ?? null
895
+ );
896
+ }
897
+
898
+ /** What is drawn at a point, inside open shadow roots too. */
899
+ private drawnAt(x: number, y: number): Element | null {
900
+ let hit = this.doc.elementFromPoint(x, y);
901
+ // The document answers a shadow host for anything inside its open root:
902
+ // descend to what is drawn there.
903
+ while (hit?.shadowRoot != null) {
904
+ const inner = hit.shadowRoot.elementFromPoint(x, y);
905
+ if (inner == null || inner === hit) {
906
+ break;
907
+ }
908
+ hit = inner;
909
+ }
910
+ return hit;
911
+ }
912
+
913
+ /** The browser took these touches (a scroll): no click of ours for them. */
914
+ private browserTook(ids: ReadonlyArray<number>, time: number): void {
915
+ for (const id of ids) {
916
+ this.retargeted.delete(id);
917
+ }
918
+ this.arena.browserTookOver(ids, time);
919
+ }
920
+
921
+ /**
922
+ * The click a retargeted tap earned, on what was drawn under the finger.
923
+ * The engine's own click would hit the start position, so the caller
924
+ * cancels it (or the click guard drops it, a late one included) and this one
925
+ * is the tap's single activation.
926
+ */
927
+ private clickRetargeted(target: EventTarget, x: number, y: number): void {
928
+ const view = this.doc.defaultView;
929
+ if (!(target instanceof Element) || !target.isConnected || view == null) {
930
+ return;
931
+ }
932
+ armClickGuard(this.doc);
933
+ if (
934
+ target instanceof view.HTMLElement &&
935
+ target.matches('input, textarea, select, [contenteditable]')
936
+ ) {
937
+ target.focus();
938
+ }
939
+ withoutClickGuard(() =>
940
+ target.dispatchEvent(
941
+ new view.MouseEvent('click', {
942
+ bubbles: true,
943
+ cancelable: true,
944
+ composed: true,
945
+ detail: 1,
946
+ clientX: x,
947
+ clientY: y,
948
+ }),
949
+ ),
950
+ );
951
+ }
952
+
601
953
  /**
602
954
  * Re-derive an element's styles and the host's listeners after its
603
955
  * recognizers' options or its consumer's enabled state changed.
604
956
  */
605
957
  update(element: Element): void {
958
+ if (!this.followsPointer) {
959
+ // A read passed in (a test's) is not followed: an update reads it again.
960
+ this.isCoarse = this.isPrimaryPointerCoarse();
961
+ }
606
962
  const registration = this.registry.get(element);
607
963
  if (registration != null) {
608
964
  this.refresh(element, registration);
@@ -639,77 +995,165 @@ export class GestureHost {
639
995
  */
640
996
  isScrollBraking(
641
997
  node: Node,
642
- window: number = UIKIT_GESTURES.press.scrollBrake.value,
998
+ window: number = UIKIT_PRESS.scrollBrake.value,
643
999
  ): boolean {
644
1000
  const last = this.lastScroll;
645
1001
  return (
646
1002
  last != null &&
647
1003
  this.arena.now() - last.time < window &&
648
- last.scroller.contains(node)
1004
+ containsAlongFlatTree(last.scroller, node)
1005
+ );
1006
+ }
1007
+
1008
+ /**
1009
+ * @internal Keep the host's listeners installed until the returned
1010
+ * function runs, with no recognizer attached (fingerScroll.ts reads the
1011
+ * finger record meanwhile).
1012
+ */
1013
+ retain(): () => void {
1014
+ this.retainers += 1;
1015
+ // A watch is not an attach: no warning where the pointer is fine.
1016
+ this.watchPointer();
1017
+ this.syncListeners();
1018
+ let isRetained = true;
1019
+ return () => {
1020
+ if (!isRetained) {
1021
+ return;
1022
+ }
1023
+ isRetained = false;
1024
+ this.retainers -= 1;
1025
+ this.uninstallIfIdle();
1026
+ };
1027
+ }
1028
+
1029
+ /**
1030
+ * @internal Call `listener` after each touch event the host hears, once
1031
+ * the finger record is up to date. Returns the unsubscribe.
1032
+ */
1033
+ onFingersChange(listener: () => void): () => void {
1034
+ this.fingerListeners.add(listener);
1035
+ return () => {
1036
+ this.fingerListeners.delete(listener);
1037
+ };
1038
+ }
1039
+
1040
+ /** @internal Whether a finger that landed inside `node` is down now. */
1041
+ isFingerDownIn(node: Node): boolean {
1042
+ // Along the flat tree: a finger on content inside an open shadow root is
1043
+ // in the scroller around that root.
1044
+ return this.fingerTargets.some(target =>
1045
+ containsAlongFlatTree(node, target),
649
1046
  );
650
1047
  }
651
1048
 
652
1049
  private registrationFor(element: Element): Registration {
1050
+ this.watchPointer();
653
1051
  let registration = this.registry.get(element);
654
1052
  if (registration == null) {
655
1053
  registration = {
656
1054
  recognizers: [],
657
1055
  consumer: null,
658
- touchMoveListener: null,
659
- touchEndListener: null,
1056
+ hasTouchEndListener: false,
1057
+ hasTouchMoveListener: false,
660
1058
  savedStyle: new Map(),
661
1059
  authorTouchAction: null,
662
1060
  manageStyle: true,
663
1061
  actionGroup: false,
1062
+ actionGroupAsks: 0,
664
1063
  };
665
1064
  this.registry.set(element, registration);
666
1065
  }
667
1066
  return registration;
668
1067
  }
669
1068
 
1069
+ /** Whether anything attached could take input. */
1070
+ private needsInput(): boolean {
1071
+ return this.registry.size > 0 || this.retainers > 0;
1072
+ }
1073
+
670
1074
  private refresh(element: Element, registration: Registration): void {
671
1075
  if (registration.manageStyle && element instanceof HTMLElement) {
672
1076
  this.applyStyle(element, registration);
673
1077
  }
674
- // For every pointer (FR43): a finger's claim cancels its moves here
675
- // (FR19), a listener FR24 counts apart from the one an element keeps for
676
- // its press.
677
- const needsListener = registration.recognizers.some(
678
- r => r.isEnabled && claimsWhileMoving(r),
679
- );
680
- if (needsListener && registration.touchMoveListener == null) {
681
- const listener: EventListener = event =>
682
- this.cancelIfClaimed(event as TouchEvent);
683
- registration.touchMoveListener = listener;
684
- element.addEventListener('touchmove', listener, {passive: false});
685
- } else if (!needsListener && registration.touchMoveListener != null) {
686
- element.removeEventListener('touchmove', registration.touchMoveListener);
687
- registration.touchMoveListener = null;
688
- }
689
- // Pointer Events only: a claimed finger's touchend is not the host's
690
- // own document listener's to cancel, so the element cancels it.
1078
+ this.syncTouchMoveListener(element, registration);
1079
+ }
1080
+
1081
+ /**
1082
+ * The element's blocking `touchmove`. For every pointer a claiming
1083
+ * recognizer keeps it: a finger's claim cancels its moves here (FR19), a
1084
+ * listener FR24 counts outside the one-listener budget a fine pointer's
1085
+ * element keeps for its press (syncArmed). A kept press needs it only
1086
+ * while a press is held: a phone's before every touch (Safari honours a
1087
+ * blocking listener only when registered before the touch began), a fine
1088
+ * pointer's only during an armed press, whose `pointerdown` comes before
1089
+ * the touch it brings (FR24).
1090
+ */
1091
+ private syncTouchMoveListener(
1092
+ element: Element,
1093
+ registration: Registration,
1094
+ ): void {
1095
+ // Where fingers come from their pointer events (Pointer Events input, or
1096
+ // a window with no ontouchstart), a claimed finger's touchend is not the
1097
+ // host's own document listener's to cancel, so the element cancels it
1098
+ // (FR21). Under a coarse pointer always: touch emulation turned on after
1099
+ // load hides ontouchstart yet sends touches. Under a fine one wherever
1100
+ // the browser sends Touch Events, as a touchscreen laptop does (FR43);
1101
+ // elsewhere no touchend ever comes, and the element keeps no listener
1102
+ // (FR24).
691
1103
  const needsEndListener =
692
- this.inputMode === 'pointer-events' &&
693
- registration.recognizers.some(r => r.isEnabled && r.acceptsTouchInput);
694
- if (needsEndListener && registration.touchEndListener == null) {
695
- const listener: EventListener = event =>
696
- this.cancelClaimedLift(event as TouchEvent);
697
- registration.touchEndListener = listener;
698
- element.addEventListener('touchend', listener, {passive: false});
699
- } else if (!needsEndListener && registration.touchEndListener != null) {
700
- element.removeEventListener('touchend', registration.touchEndListener);
701
- registration.touchEndListener = null;
1104
+ this.readsFingersFromPointerEvents() &&
1105
+ (this.isCoarse || this.sendsTouchEvents()) &&
1106
+ registration.recognizers.some(
1107
+ recognizer =>
1108
+ recognizer.isEnabled && internals(recognizer).acceptsTouchInput,
1109
+ );
1110
+ if (needsEndListener && !registration.hasTouchEndListener) {
1111
+ element.addEventListener('touchend', this.onClaimedTouchEnd, {
1112
+ passive: false,
1113
+ });
1114
+ registration.hasTouchEndListener = true;
1115
+ } else if (!needsEndListener && registration.hasTouchEndListener) {
1116
+ element.removeEventListener('touchend', this.onClaimedTouchEnd);
1117
+ registration.hasTouchEndListener = false;
1118
+ }
1119
+ const needsListener =
1120
+ registration.recognizers.some(
1121
+ recognizer => recognizer.isEnabled && claimsWhileMoving(recognizer),
1122
+ ) ||
1123
+ (registration.consumer?.keepsTouch != null &&
1124
+ registration.consumer.isEnabled?.() !== false &&
1125
+ (this.isCoarse || this.isArmedPress));
1126
+ // The blocking listener sits on the element itself (FR19: a scroll that
1127
+ // starts elsewhere never waits on it), but every element shares the
1128
+ // host's one handler, which routes through the arena.
1129
+ if (needsListener && !registration.hasTouchMoveListener) {
1130
+ element.addEventListener('touchmove', this.onBlockingTouchMove, {
1131
+ passive: false,
1132
+ });
1133
+ registration.hasTouchMoveListener = true;
1134
+ } else if (!needsListener && registration.hasTouchMoveListener) {
1135
+ element.removeEventListener('touchmove', this.onBlockingTouchMove);
1136
+ registration.hasTouchMoveListener = false;
702
1137
  }
703
1138
  }
704
1139
 
705
1140
  private applyStyle(element: HTMLElement, registration: Registration): void {
706
- // Where no attached recognizer is enabled the host manages no style: the
707
- // element keeps its own touch-action, and any value set before is
708
- // restored (FR24). Every pointer gets it: a touchscreen laptop's finger
709
- // as a phone's (spec:AST-094 FR43).
710
- const enabled = registration.recognizers.filter(r => r.isEnabled);
711
- const style: GestureHostStyle =
712
- enabled.length > 0 ? gestureHostStyle(enabled) : {};
1141
+ // A disabled recognizer leaves the browser everything (FR24).
1142
+ // Every pointer gets it: a touchscreen laptop's finger as a phone's (FR43).
1143
+ const active = registration.recognizers.filter(
1144
+ recognizer => recognizer.isEnabled,
1145
+ );
1146
+ let style: GestureHostStyle =
1147
+ active.length > 0 ? gestureHostStyle(active) : {};
1148
+ // A control that keeps its touch (a stepper's hold-repeat) takes taps in
1149
+ // quick succession: the browser's double-tap zoom goes, as for a tap
1150
+ // recognizer (`spec:AST-094` FR18), for every pointer (FR43).
1151
+ if (
1152
+ style.touchAction == null &&
1153
+ registration.consumer?.keepsTouch != null
1154
+ ) {
1155
+ style = {...style, touchAction: 'manipulation'};
1156
+ }
713
1157
  for (const key of Object.keys(
714
1158
  STYLE_PROPERTIES,
715
1159
  ) as (keyof GestureHostStyle)[]) {
@@ -804,8 +1248,9 @@ export class GestureHost {
804
1248
  return;
805
1249
  }
806
1250
  this.isCallerReadScheduled = true;
807
- inNextFrame(this.doc.defaultView, () => {
1251
+ this.cancelCallerRead = inNextFrame(this.doc.defaultView, () => {
808
1252
  this.isCallerReadScheduled = false;
1253
+ this.cancelCallerRead = null;
809
1254
  const pending: [HTMLElement, Registration][] = [];
810
1255
  for (const candidate of this.pendingCallerReads) {
811
1256
  const registration = this.registry.get(candidate);
@@ -834,60 +1279,99 @@ export class GestureHost {
834
1279
 
835
1280
  private cleanup(element: Element, registration: Registration): void {
836
1281
  if (registration.recognizers.length > 0 || registration.consumer != null) {
1282
+ // What stays may take nothing (only disabled recognizers): FR24.
1283
+ this.syncListeners();
837
1284
  return;
838
1285
  }
839
- if (registration.touchMoveListener != null) {
840
- element.removeEventListener('touchmove', registration.touchMoveListener);
1286
+ if (registration.hasTouchEndListener) {
1287
+ element.removeEventListener('touchend', this.onClaimedTouchEnd);
1288
+ registration.hasTouchEndListener = false;
841
1289
  }
842
- if (registration.touchEndListener != null) {
843
- element.removeEventListener('touchend', registration.touchEndListener);
844
- registration.touchEndListener = null;
1290
+ if (registration.hasTouchMoveListener) {
1291
+ element.removeEventListener('touchmove', this.onBlockingTouchMove);
845
1292
  }
846
1293
  this.registry.delete(element);
847
- this.syncListeners();
1294
+ this.uninstallIfIdle();
848
1295
  }
849
1296
 
850
1297
  /**
851
1298
  * Listen only while something could take a touch now (`spec:AST-094`
852
- * FR24, FR43): where the primary pointer is coarse, while an enabled
853
- * recognizer or consumer, or a delegated consumer, is attached; where it is
854
- * fine, only during a press something armed (syncArmed). Otherwise no page
855
- * listener is registered, so an idle page and a disabled control pay
856
- * nothing.
1299
+ * FR24, FR43): where the primary pointer is coarse, an enabled recognizer
1300
+ * or consumer, or a finger-scroll watch; where it is fine, only during a
1301
+ * press an element armed (syncArmed). Otherwise no document listener is
1302
+ * registered, so an idle page and a disabled control pay nothing.
857
1303
  */
858
1304
  private syncListeners(): void {
859
1305
  this.syncLayoutWatch();
860
- // The primary pointer can change (a tablet's keyboard attached or
861
- // removed): while anything is attached, styles and listeners follow it.
862
- // Nothing touch-related stays once the last attachment goes (FR24).
863
- const hasAttachments = this.registry.size > 0 || this.delegated.size > 0;
864
- if (hasAttachments && !this.isWatchingPointer) {
865
- this.coarseQuery?.addEventListener?.('change', this.onPointerKindChange);
866
- this.isWatchingPointer = true;
867
- } else if (!hasAttachments && this.isWatchingPointer) {
868
- this.coarseQuery?.removeEventListener?.(
869
- 'change',
870
- this.onPointerKindChange,
871
- );
872
- this.isWatchingPointer = false;
873
- }
874
1306
  this.syncArmed();
875
1307
  if (this.shouldListen()) {
876
1308
  this.install();
877
- } else if (this.isInstalled) {
1309
+ this.syncClaimingListeners();
1310
+ } else {
878
1311
  this.uninstall();
879
1312
  }
1313
+ this.syncMoverBlocking();
880
1314
  }
881
1315
 
882
- private shouldListen(): boolean {
883
- if (!this.isPrimaryPointerCoarse()) {
884
- return this.isArmedPress;
1316
+ /**
1317
+ * Safari honours a blocking `touchmove` only where it was registered before
1318
+ * the touch began, on the engine's own target, and on iOS WebKit a finger
1319
+ * on an element a compositor animation moves lands, for the engine, on
1320
+ * whatever sits under the motion's start (see presentedTarget). So while an
1321
+ * element a recognizer that claims moving touches lives in (or around) is
1322
+ * moving, the blocking listener subscribes to the window's capturing
1323
+ * `touchmove` through the shared input stream with `{cancels: true}`,
1324
+ * which sees every touch on the page whatever the engine targets and makes
1325
+ * that one listener non-passive (`spec:AST-094` FR19;
1326
+ * architecture:react-component-runtime INV13). It leaves when the motion
1327
+ * ends: only while it is subscribed does a scroll starting anywhere wait on
1328
+ * the main thread.
1329
+ */
1330
+ private syncMoverBlocking(): void {
1331
+ const isWatching = this.isInstalled && this.hitTestsLayout();
1332
+ if (isWatching && this.stopWatchingMovers == null) {
1333
+ this.stopWatchingMovers = watchPresentedElements(() =>
1334
+ this.syncMoverBlocking(),
1335
+ );
1336
+ } else if (!isWatching && this.stopWatchingMovers != null) {
1337
+ this.stopWatchingMovers();
1338
+ this.stopWatchingMovers = null;
1339
+ }
1340
+ const needed =
1341
+ isWatching &&
1342
+ presentedElements().some(mover =>
1343
+ this.hasClaimingRecognizerAround(mover),
1344
+ );
1345
+ if (needed === (this.stopBlockingForMovers != null)) {
1346
+ return;
885
1347
  }
886
- if (this.delegated.size > 0) {
887
- return true;
1348
+ const view = this.doc.defaultView;
1349
+ if (needed && view != null) {
1350
+ this.stopBlockingForMovers = subscribeInput(
1351
+ view,
1352
+ 'touchmove',
1353
+ this.onBlockingTouchMove,
1354
+ {cancels: true},
1355
+ );
1356
+ } else if (!needed) {
1357
+ this.stopBlockingForMovers?.();
1358
+ this.stopBlockingForMovers = null;
888
1359
  }
889
- for (const registration of this.registry.values()) {
890
- if (isServed(registration)) {
1360
+ }
1361
+
1362
+ /** Whether a recognizer that claims moving touches lives in or around `mover`. */
1363
+ private hasClaimingRecognizerAround(mover: Element): boolean {
1364
+ if (!mover.isConnected || mover.ownerDocument !== this.doc) {
1365
+ return false;
1366
+ }
1367
+ for (const [element, registration] of this.registry) {
1368
+ if (
1369
+ (containsAlongFlatTree(mover, element) ||
1370
+ containsAlongFlatTree(element, mover)) &&
1371
+ registration.recognizers.some(
1372
+ recognizer => recognizer.isEnabled && claimsWhileMoving(recognizer),
1373
+ )
1374
+ ) {
891
1375
  return true;
892
1376
  }
893
1377
  }
@@ -897,56 +1381,56 @@ export class GestureHost {
897
1381
  /**
898
1382
  * Where the primary pointer is fine, each element with an enabled
899
1383
  * recognizer or press consumer listens for a press itself: one passive
900
- * `pointerdown` listener, in the capture phase, so the outermost one hears
901
- * a press first and serves every recognizer on its path. Delegated
902
- * consumer types, which have no element, arm the document once. A press
903
- * installs the host's page listeners for as long as its contacts last
904
- * (`spec:AST-094` FR24, FR43). Where the primary pointer is coarse the
905
- * page's listeners serve every press, and nothing is armed.
1384
+ * `pointerdown` listener on the element. The host's page listeners come at
1385
+ * that press and go once its contacts end and the arena drops their last
1386
+ * record (onIdle: a decision that waited on a timer), so an idle page has none
1387
+ * (`spec:AST-094` FR24, FR43). A finger on a touchscreen whose primary
1388
+ * pointer is fine sends its `pointerdown` before its `touchstart`, so the
1389
+ * host hears both.
906
1390
  */
907
1391
  private syncArmed(): void {
908
- const wanted = new Set<EventTarget>();
909
- if (!this.isPrimaryPointerCoarse()) {
1392
+ const wanted = new Set<Element>();
1393
+ if (!this.isCoarse) {
910
1394
  for (const [element, registration] of this.registry) {
911
- if (isServed(registration)) {
1395
+ const consumer = registration.consumer;
1396
+ if (
1397
+ registration.recognizers.some(recognizer => recognizer.isEnabled) ||
1398
+ (consumer != null && consumer.isEnabled?.() !== false)
1399
+ ) {
912
1400
  wanted.add(element);
913
1401
  }
914
1402
  }
915
- if (this.delegated.size > 0) {
916
- wanted.add(this.doc);
917
- }
918
1403
  }
919
- for (const [target, disarm] of [...this.armed]) {
920
- if (!wanted.has(target)) {
921
- disarm();
922
- this.armed.delete(target);
1404
+ for (const [element, release] of this.armedElements) {
1405
+ if (!wanted.has(element)) {
1406
+ release();
1407
+ this.armedElements.delete(element);
923
1408
  }
924
1409
  }
925
- for (const target of wanted) {
926
- if (this.armed.has(target)) {
1410
+ for (const element of wanted) {
1411
+ if (this.armedElements.has(element)) {
927
1412
  continue;
928
1413
  }
929
- target.addEventListener(
1414
+ element.addEventListener(
930
1415
  'pointerdown',
931
1416
  this.onArmedPress,
932
1417
  PASSIVE_CAPTURE,
933
1418
  );
934
- this.armed.set(target, () => {
935
- target.removeEventListener(
1419
+ this.armedElements.set(element, () => {
1420
+ element.removeEventListener(
936
1421
  'pointerdown',
937
1422
  this.onArmedPress,
938
1423
  PASSIVE_CAPTURE,
939
1424
  );
940
1425
  });
941
1426
  }
1427
+ if (wanted.size === 0 && this.isArmedPress) {
1428
+ this.isArmedPress = false;
1429
+ this.syncKeptPresses();
1430
+ }
942
1431
  }
943
1432
 
944
- /**
945
- * A press on something armed, where the primary pointer is fine: a
946
- * mouse's primary button, a pen, or a finger. The page's listeners come
947
- * for this press, and the press goes on to them, its capture phase on the
948
- * page being over.
949
- */
1433
+ /** A press on an armed element, a mouse's primary button, a pen or a finger: listen for this press. */
950
1434
  private readonly onArmedPress = (event: Event): void => {
951
1435
  const press = event as PointerEvent;
952
1436
  if (
@@ -957,95 +1441,250 @@ export class GestureHost {
957
1441
  return;
958
1442
  }
959
1443
  this.isArmedPress = true;
1444
+ this.syncKeptPresses();
960
1445
  this.install();
1446
+ // A finger's or a pen's press brings the cancelable touchend and the
1447
+ // contextmenu canceller, as wherever the host installs, so a claimed
1448
+ // lift clicks nothing and a claimed hold opens no browser menu (FR21). A
1449
+ // mouse's press needs neither.
1450
+ if (press.pointerType !== 'mouse') {
1451
+ this.syncClaimingListeners();
1452
+ }
1453
+ // The window's capture phase is over for this event: hand it on.
961
1454
  this.onPointerDown(press);
962
- // A mouse's or a pen's press that nothing took has nothing to wait for;
963
- // a finger's contact begins at its touchstart, which comes next.
964
- if (press.pointerType !== 'touch') {
965
- this.releaseArmedPress();
966
- }
967
1455
  };
968
1456
 
969
- /**
970
- * After a contact ends: once no contact of the press that armed the page's
971
- * listeners is down, they go (FR24). A recognizer still deciding after the
972
- * lift needs no input; the click it may owe keeps its listener
973
- * (releaseClickListener).
974
- */
1457
+ /** A kept press's blocking `touchmove` follows the armed press (syncTouchMoveListener). */
1458
+ private syncKeptPresses(): void {
1459
+ for (const [element, registration] of this.registry) {
1460
+ if (registration.consumer?.keepsTouch != null) {
1461
+ this.syncTouchMoveListener(element, registration);
1462
+ }
1463
+ }
1464
+ }
1465
+
1466
+ /** After a contact ends: an armed press that is over stops listening. */
975
1467
  private releaseArmedPress(): void {
976
- if (
977
- this.isArmedPress &&
978
- !this.arena.touches.some(
979
- touch => touch.phase !== 'ended' && touch.phase !== 'cancelled',
980
- )
981
- ) {
982
- this.isArmedPress = false;
983
- this.syncListeners();
1468
+ if (!this.isArmedPress) {
1469
+ return;
1470
+ }
1471
+ queueMicrotask(() => {
1472
+ if (this.isArmedPress && this.arena.touches.length === 0) {
1473
+ this.isArmedPress = false;
1474
+ this.syncKeptPresses();
1475
+ this.syncListeners();
1476
+ }
1477
+ });
1478
+ }
1479
+
1480
+ /** With nothing attached, stop listening and stop following the pointer. */
1481
+ private uninstallIfIdle(): void {
1482
+ this.syncListeners();
1483
+ if (this.registry.size === 0 && this.retainers === 0) {
1484
+ this.uninstall();
1485
+ this.stopWatchingPointer?.();
1486
+ this.stopWatchingPointer = null;
1487
+ this.releaseWhenIdle();
984
1488
  }
985
1489
  }
986
1490
 
987
1491
  /**
988
- * The click listener outlives the page's others while the swallower is
989
- * armed: a claimed lift's click comes after its pointerup or touchend
990
- * (`spec:AST-094` FR21; FR24 counts it as press work). It goes when that
991
- * window closes, unless the host listens again by then.
1492
+ * In the microtask after the last detach, unless something attached again
1493
+ * in the same task (a component that remounts mid-press keeps its notes):
1494
+ * nothing the host holds outlives it, no note and no pending frame or
1495
+ * timer (`spec:AST-094` FR24).
992
1496
  */
993
- private releaseClickListener(): void {
1497
+ private releaseWhenIdle(): void {
1498
+ queueMicrotask(() => {
1499
+ if (this.registry.size > 0 || this.retainers > 0) {
1500
+ return;
1501
+ }
1502
+ this.cancelledFingers.clear();
1503
+ this.clearClaimedLifts();
1504
+ this.cancelCallerRead?.();
1505
+ this.cancelCallerRead = null;
1506
+ this.isCallerReadScheduled = false;
1507
+ this.pendingCallerReads.clear();
1508
+ for (const cancel of this.ownScrollFrames.values()) {
1509
+ cancel();
1510
+ }
1511
+ this.ownScrollFrames.clear();
1512
+ this.ownedScrolls.clear();
1513
+ });
1514
+ }
1515
+
1516
+ /** Read the primary pointer, and follow it while anything is attached. */
1517
+ private watchPointer(): void {
1518
+ if (this.stopWatchingPointer != null) {
1519
+ return;
1520
+ }
994
1521
  const view = this.doc.defaultView;
995
- if (this.clickRemoval != null) {
996
- clearTimeout(this.clickRemoval);
997
- this.clickRemoval = null;
1522
+ this.isCoarse = this.isPrimaryPointerCoarse();
1523
+ this.stopWatchingPointer = this.followsPointer
1524
+ ? watchCoarsePointer(view, isCoarse => this.pointerChanged(isCoarse))
1525
+ : () => {};
1526
+ }
1527
+
1528
+ /**
1529
+ * The primary pointer turned coarse or fine (a tablet docking a mouse):
1530
+ * install or remove everything, as if each attach happened now.
1531
+ */
1532
+ private pointerChanged(isCoarse: boolean): void {
1533
+ if (isCoarse === this.isCoarse) {
1534
+ return;
998
1535
  }
999
- const remaining = this.swallowDeadline - browserClock.now();
1000
- if (view == null || remaining < 0) {
1001
- view?.removeEventListener('click', this.onClick, ACTIVE_CAPTURE);
1536
+ this.isCoarse = isCoarse;
1537
+ if (!isCoarse) {
1538
+ this.cancelEverything(this.arena.now());
1539
+ }
1540
+ for (const [element, registration] of this.registry) {
1541
+ this.refresh(element, registration);
1542
+ }
1543
+ this.syncListeners();
1544
+ }
1545
+
1546
+ /**
1547
+ * Whether an enabled participant could claim a touch or cancel a lift: a
1548
+ * consumer, or a recognizer that claims touches. With only watchers
1549
+ * attached, the host's listeners are all passive (`spec:AST-094` FR20).
1550
+ */
1551
+ private hasClaimer(): boolean {
1552
+ for (const registration of this.registry.values()) {
1553
+ const consumer = registration.consumer;
1554
+ if (
1555
+ (consumer != null && consumer.isEnabled?.() !== false) ||
1556
+ registration.recognizers.some(
1557
+ recognizer => recognizer.isEnabled && recognizer.claimsTouches,
1558
+ )
1559
+ ) {
1560
+ return true;
1561
+ }
1562
+ }
1563
+ return false;
1564
+ }
1565
+
1566
+ /**
1567
+ * Keeps the touchend cancelable, and the contextmenu subscription on,
1568
+ * only while a claimer is attached; with only watchers the touchend is
1569
+ * passive and the contextmenu is off. Clicks are the click guard's
1570
+ * (utils/clickGuard.ts), whose one listener a window gets only once a
1571
+ * gesture first arms it.
1572
+ */
1573
+ private syncClaimingListeners(): void {
1574
+ if (!this.isInstalled) {
1575
+ return;
1576
+ }
1577
+ const isClaiming = this.hasClaimer();
1578
+ if (isClaiming === this.isClaimingInstalled) {
1002
1579
  return;
1003
1580
  }
1004
- this.clickRemoval = setTimeout(() => {
1005
- this.clickRemoval = null;
1006
- if (!this.isInstalled) {
1007
- view.removeEventListener('click', this.onClick, ACTIVE_CAPTURE);
1581
+ const view = this.doc.defaultView;
1582
+ for (const unsubscribe of this.claimingUnsubscribers.splice(0)) {
1583
+ unsubscribe();
1584
+ }
1585
+ if (view != null) {
1586
+ if (this.inputMode === 'auto') {
1587
+ this.claimingUnsubscribers.push(
1588
+ subscribeInput(view, 'touchend', this.onTouchEnd, {
1589
+ cancels: isClaiming,
1590
+ }),
1591
+ );
1592
+ }
1593
+ if (isClaiming) {
1594
+ this.claimingUnsubscribers.push(
1595
+ subscribeInput(view, 'contextmenu', this.onContextMenu, {
1596
+ cancels: true,
1597
+ }),
1598
+ );
1599
+ }
1600
+ }
1601
+ this.isClaimingInstalled = isClaiming;
1602
+ }
1603
+
1604
+ private shouldListen(): boolean {
1605
+ if (!this.needsInput()) {
1606
+ return false;
1607
+ }
1608
+ // A retainer (a finger-scroll watch) listens only where the pointer is
1609
+ // coarse: it follows a finger's scroll, which a fine pointer's page
1610
+ // leaves to the browser (FR24).
1611
+ if (this.isCoarse && this.retainers > 0) {
1612
+ return true;
1613
+ }
1614
+ let isUsed = false;
1615
+ for (const registration of this.registry.values()) {
1616
+ const consumer = registration.consumer;
1617
+ if (
1618
+ (consumer != null && consumer.isEnabled?.() !== false) ||
1619
+ registration.recognizers.some(recognizer => recognizer.isEnabled)
1620
+ ) {
1621
+ isUsed = true;
1622
+ break;
1008
1623
  }
1009
- }, remaining + 1);
1624
+ }
1625
+ // Where the primary pointer is fine, only while a press an element armed
1626
+ // is held (syncArmed, FR24, FR43).
1627
+ return isUsed && (this.isCoarse || this.isArmedPress);
1010
1628
  }
1011
1629
 
1012
1630
  // --- Listeners -------------------------------------------------------------
1013
1631
 
1014
1632
  private install(): void {
1015
- if (this.isInstalled) {
1633
+ this.watchPointer();
1634
+ if (!this.needsInput()) {
1016
1635
  return;
1017
1636
  }
1018
- if (this.clickRemoval != null) {
1019
- clearTimeout(this.clickRemoval);
1020
- this.clickRemoval = null;
1637
+ if (this.isInstalled) {
1638
+ return;
1021
1639
  }
1022
1640
  const view = this.doc.defaultView;
1023
1641
  this.isInstalled = true;
1024
1642
  this.usesTouchEvents =
1025
1643
  this.inputMode === 'auto' && view != null && 'ontouchstart' in view;
1026
- const doc = this.doc;
1027
- // Pointer Events only: a finger comes from its pointer events alone. A
1028
- // browser that has Touch Events still sends them for the same finger, and
1029
- // reading both would track it twice (a long press needs one touch).
1030
- if (this.inputMode === 'auto') {
1031
- doc.addEventListener('touchstart', this.onTouchStart, PASSIVE_CAPTURE);
1032
- doc.addEventListener('touchmove', this.onTouchMove, PASSIVE_CAPTURE);
1033
- doc.addEventListener('touchend', this.onTouchEnd, ACTIVE_CAPTURE);
1034
- doc.addEventListener('touchcancel', this.onTouchCancel, PASSIVE_CAPTURE);
1035
- }
1036
- doc.addEventListener('pointerdown', this.onPointerDown, PASSIVE_CAPTURE);
1037
- doc.addEventListener('pointermove', this.onPointerMove, PASSIVE_CAPTURE);
1038
- doc.addEventListener('pointerup', this.onPointerUp, PASSIVE_CAPTURE);
1039
- doc.addEventListener(
1040
- 'pointercancel',
1041
- this.onPointerCancel,
1042
- PASSIVE_CAPTURE,
1043
- );
1044
- doc.addEventListener('contextmenu', this.onContextMenu, ACTIVE_CAPTURE);
1045
- doc.addEventListener('scroll', this.onScroll, PASSIVE_CAPTURE);
1046
- doc.addEventListener('visibilitychange', this.onVisibilityChange);
1047
- view?.addEventListener('click', this.onClick, ACTIVE_CAPTURE);
1048
- view?.addEventListener('blur', this.onBlur);
1644
+ if (view == null) {
1645
+ // A document without a window receives no input.
1646
+ return;
1647
+ }
1648
+ // The window's capture phase, through the shared input stream
1649
+ // (utils/inputStream.ts): ahead of any document listener, so an app's
1650
+ // window-capture stopPropagation, or a document-capture
1651
+ // stopImmediatePropagation registered first, no longer hides a touch
1652
+ // from the recognizers. A recognizer that must claim mid-gesture still
1653
+ // needs the touch to reach its element, where its blocking touchmove
1654
+ // sits. Only the listeners that cancel are non-passive, and only while a
1655
+ // claimer is attached (syncClaimingListeners); none of them is a
1656
+ // touchstart or touchmove, so none of them holds a scroll.
1657
+ this.unsubscribers = [
1658
+ // Pointer Events only: a finger comes from its pointer events alone. A
1659
+ // browser that has Touch Events still sends them for the same finger,
1660
+ // and reading both would track it twice (a long press needs one touch).
1661
+ ...(this.inputMode === 'auto'
1662
+ ? [
1663
+ subscribeInput(view, 'touchstart', this.onTouchStart),
1664
+ subscribeInput(view, 'touchmove', this.onTouchMove),
1665
+ subscribeInput(view, 'touchcancel', this.onTouchCancel),
1666
+ ]
1667
+ : []),
1668
+ subscribeInput(view, 'pointerdown', this.onPointerDown),
1669
+ subscribeInput(view, 'pointermove', this.onPointerMove),
1670
+ subscribeInput(view, 'pointerup', this.onPointerUp),
1671
+ subscribeInput(view, 'pointercancel', this.onPointerCancel),
1672
+ subscribeInput(view, 'scroll', this.onScroll),
1673
+ subscribeInput(view, 'visibilitychange', this.onVisibilityChange),
1674
+ // The window's own blur; an element's blur (a Node's) reaches the
1675
+ // window's capture phase too and means nothing here.
1676
+ subscribeInput(view, 'blur', event => {
1677
+ if (!(event.target instanceof view.Node)) {
1678
+ this.onBlur();
1679
+ }
1680
+ }),
1681
+ ];
1682
+ // Passive until a claimer is attached (syncClaimingListeners).
1683
+ this.isClaimingInstalled = false;
1684
+ this.claimingUnsubscribers =
1685
+ this.inputMode === 'auto'
1686
+ ? [subscribeInput(view, 'touchend', this.onTouchEnd)]
1687
+ : [];
1049
1688
  }
1050
1689
 
1051
1690
  private uninstall(): void {
@@ -1053,26 +1692,20 @@ export class GestureHost {
1053
1692
  return;
1054
1693
  }
1055
1694
  this.isInstalled = false;
1056
- const doc = this.doc;
1057
- const view = doc.defaultView;
1058
- doc.removeEventListener('touchstart', this.onTouchStart, PASSIVE_CAPTURE);
1059
- doc.removeEventListener('touchmove', this.onTouchMove, PASSIVE_CAPTURE);
1060
- doc.removeEventListener('touchend', this.onTouchEnd, ACTIVE_CAPTURE);
1061
- doc.removeEventListener('touchcancel', this.onTouchCancel, PASSIVE_CAPTURE);
1062
- doc.removeEventListener('pointerdown', this.onPointerDown, PASSIVE_CAPTURE);
1063
- doc.removeEventListener('pointermove', this.onPointerMove, PASSIVE_CAPTURE);
1064
- doc.removeEventListener('pointerup', this.onPointerUp, PASSIVE_CAPTURE);
1065
- doc.removeEventListener(
1066
- 'pointercancel',
1067
- this.onPointerCancel,
1068
- PASSIVE_CAPTURE,
1069
- );
1070
- doc.removeEventListener('contextmenu', this.onContextMenu, ACTIVE_CAPTURE);
1071
- doc.removeEventListener('scroll', this.onScroll, PASSIVE_CAPTURE);
1072
- doc.removeEventListener('visibilitychange', this.onVisibilityChange);
1073
- this.releaseClickListener();
1074
- view?.removeEventListener('blur', this.onBlur);
1695
+ // Unheard from here on: no fingers to keep.
1696
+ this.fingerTargets = [];
1697
+ this.isClaimingInstalled = false;
1698
+ for (const unsubscribe of [
1699
+ ...this.unsubscribers.splice(0),
1700
+ ...this.claimingUnsubscribers.splice(0),
1701
+ ]) {
1702
+ unsubscribe();
1703
+ }
1075
1704
  this.cancelEverything(this.arena.now());
1705
+ // A claimed lift's note stays: an armed press's listeners go in the
1706
+ // microtask after its pointerup, the touchend comes after that microtask
1707
+ // in the same task (iOS and WebKit), and the element's own listener still
1708
+ // takes it (noteClaimedLift).
1076
1709
  this.lastTouch = null;
1077
1710
  this.lastScroll = null;
1078
1711
  }
@@ -1082,7 +1715,7 @@ export class GestureHost {
1082
1715
  /**
1083
1716
  * The recognizers on the path from `target` to the document, innermost
1084
1717
  * first, and (for a contact) its consumer: the innermost element with an
1085
- * attached consumer or a delegated consumer type's attribute.
1718
+ * attached consumer.
1086
1719
  */
1087
1720
  private participantsAt(
1088
1721
  target: unknown,
@@ -1090,9 +1723,17 @@ export class GestureHost {
1090
1723
  ): {
1091
1724
  recognizers: GestureRecognizer[];
1092
1725
  consumer: TouchConsumer | null;
1726
+ consumerElement: Element | null;
1093
1727
  } {
1094
1728
  const recognizers: GestureRecognizer[] = [];
1095
1729
  let consumer: TouchConsumer | null = null;
1730
+ let consumerElement: Element | null = null;
1731
+ if (
1732
+ target instanceof Node &&
1733
+ [...this.touchGates].some(gate => gate(target))
1734
+ ) {
1735
+ return {recognizers, consumer, consumerElement};
1736
+ }
1096
1737
  let hasConsumerOwner = pointerType == null;
1097
1738
  for (
1098
1739
  let node: Node | null = target instanceof Node ? target : null;
@@ -1104,29 +1745,120 @@ export class GestureHost {
1104
1745
  }
1105
1746
  const registration = this.registry.get(node);
1106
1747
  if (registration != null) {
1748
+ // Every pointer (`spec:AST-094` FR43), hover included.
1107
1749
  recognizers.push(...registration.recognizers);
1108
1750
  }
1109
1751
  if (hasConsumerOwner || pointerType == null) {
1110
1752
  continue;
1111
1753
  }
1754
+ // A press consumer takes every pointer's press, a mouse's too
1755
+ // (`spec:AST-094` FR43, DEC-21).
1112
1756
  if (registration?.consumer != null) {
1113
1757
  consumer = registration.consumer;
1758
+ consumerElement = node;
1114
1759
  hasConsumerOwner = true;
1115
1760
  continue;
1116
1761
  }
1117
- for (const type of this.delegated) {
1118
- if (node.hasAttribute(type.attribute)) {
1119
- consumer = type.create(node, pointerType);
1120
- hasConsumerOwner = true;
1121
- break;
1122
- }
1762
+ }
1763
+ return {recognizers, consumer, consumerElement};
1764
+ }
1765
+
1766
+ /**
1767
+ * Turn text selection and the touch callout off, for as long as this
1768
+ * finger or pen is down, only on the elements whose hold does something:
1769
+ * a long press's (a menu, a hold-repeat), those of recognizers created
1770
+ * with a `selectionLock` (a slider's thumb, a switch's drag, a tab bar's
1771
+ * zero-delay lens) and that of a press tracker created with one (a
1772
+ * stepper's hold-repeat). Anything whose hold does nothing, a plain
1773
+ * press-tracked control or row included, keeps the browser's long-press
1774
+ * selection (`spec:AST-094` FR41). Restored when the contact ends. Callers
1775
+ * lock for a finger or a pen under any primary pointer, never for a mouse
1776
+ * (locksSelectionFor), and only once the arena has admitted the contact:
1777
+ * `recognizers` and `consumer` are the ones that took it.
1778
+ */
1779
+ private lockSelection(
1780
+ id: number,
1781
+ recognizers: ReadonlyArray<GestureRecognizer>,
1782
+ target: EventTarget | null,
1783
+ consumer: TouchConsumer | null,
1784
+ consumerElement: Element | null,
1785
+ ): void {
1786
+ // Each recognizer whose hold does something brings its lock; the host
1787
+ // never imports one (a component without such a hold does not bundle
1788
+ // it). Only one that took this contact locks for it: a recognizer that
1789
+ // declined it (its pointer, or its own shouldReceiveTouch) has no hold
1790
+ // here.
1791
+ // An element attached with manageStyle: false keeps its own styles, the
1792
+ // lock included (AttachOptions.manageStyle).
1793
+ const managed = (element: Element) =>
1794
+ this.registry.get(element)?.manageStyle !== false;
1795
+ const byLock = new Map<SelectionLock, Set<Element>>();
1796
+ for (const recognizer of recognizers) {
1797
+ const lock = recognizer.selectionLock;
1798
+ if (
1799
+ lock != null &&
1800
+ recognizer.view instanceof Element &&
1801
+ managed(recognizer.view)
1802
+ ) {
1803
+ const elements = byLock.get(lock) ?? new Set<Element>();
1804
+ elements.add(recognizer.view);
1805
+ byLock.set(lock, elements);
1123
1806
  }
1124
1807
  }
1125
- return {recognizers, consumer};
1808
+ const consumerLock = consumer?.selectionLock;
1809
+ if (
1810
+ consumerLock != null &&
1811
+ consumerElement != null &&
1812
+ managed(consumerElement)
1813
+ ) {
1814
+ const elements = byLock.get(consumerLock) ?? new Set<Element>();
1815
+ elements.add(consumerElement);
1816
+ byLock.set(consumerLock, elements);
1817
+ }
1818
+ if (byLock.size > 0) {
1819
+ const undo = [...byLock].map(([lock, elements]) =>
1820
+ lock(elements, target),
1821
+ );
1822
+ this.lockedBy.set(id, () => {
1823
+ for (const release of undo) {
1824
+ release();
1825
+ }
1826
+ });
1827
+ }
1828
+ }
1829
+
1830
+ /** Undo `lockSelection` for a contact that ended; idempotent. */
1831
+ private unlockSelection(id: number): void {
1832
+ this.lockedBy.get(id)?.();
1833
+ this.lockedBy.delete(id);
1126
1834
  }
1127
1835
 
1128
1836
  // --- Touch events ----------------------------------------------------------
1129
1837
 
1838
+ /**
1839
+ * Hold touches away from every participant while `gate(target)` answers
1840
+ * true (a presentation running in a layer: its content takes no touch
1841
+ * until it settles). Returns the release.
1842
+ */
1843
+ addTouchGate(gate: (target: Node) => boolean): () => void {
1844
+ this.touchGates.add(gate);
1845
+ return () => {
1846
+ this.touchGates.delete(gate);
1847
+ };
1848
+ }
1849
+
1850
+ /**
1851
+ * How many fingers are on the screen: the length of `touches` in the last
1852
+ * touch event the host's listeners heard (`touchstart`, `touchmove`,
1853
+ * `touchend`, `touchcancel`), whatever its target, so a finger on an
1854
+ * element with no recognizer counts too. 0 before any, and while no
1855
+ * listener is installed. A recognizer that must not begin under a second
1856
+ * finger reads it in `shouldBegin`.
1857
+ */
1858
+ fingersDown(): number {
1859
+ return this.fingerTargets.length;
1860
+ }
1861
+
1130
1862
  /** Whether this event is new to the host (and mark it handled). */
1131
1863
  private takeEvent(event: Event): boolean {
1132
1864
  if (this.processed.has(event)) {
@@ -1137,25 +1869,50 @@ export class GestureHost {
1137
1869
  }
1138
1870
 
1139
1871
  private readonly onTouchStart = (event: TouchEvent): void => {
1140
- if (!this.takeEvent(event)) {
1872
+ this.noteFingersDown(event);
1873
+ // Where the host reads a finger from its pointer events (no ontouchstart,
1874
+ // as after touch emulation turns on), its Touch Events would track it twice.
1875
+ if (!this.usesTouchEvents || !this.takeEvent(event)) {
1141
1876
  return;
1142
1877
  }
1878
+ if (this.fingerTargets.length > 1) {
1879
+ this.failUnclaimedLoneFingerPans();
1880
+ }
1143
1881
  const time = eventTime(event);
1144
1882
  const inputs: ArenaBeganInput[] = [];
1145
1883
  const untracked: TouchBeganInput[] = [];
1146
1884
  const stale: number[] = [];
1885
+ // Locked once the arena knows which recognizers took each finger.
1886
+ const toLock: {
1887
+ id: number;
1888
+ target: EventTarget | null;
1889
+ consumerElement: Element | null;
1890
+ }[] = [];
1147
1891
  for (const touch of touchesOf(event.changedTouches)) {
1148
1892
  if ((touch as StylusTouch).touchType === 'stylus') {
1149
1893
  continue;
1150
1894
  }
1151
1895
  // A finger number still tracked here began again: the touch it named
1152
1896
  // ended where no listener of ours could hear it.
1897
+ this.cancelledFingers.delete(touch.identifier);
1153
1898
  const previous = this.forgetFinger(touch.identifier);
1154
1899
  if (previous != null) {
1155
1900
  stale.push(previous);
1156
1901
  }
1157
- const target = touch.target instanceof Node ? touch.target : event.target;
1158
- const {recognizers, consumer} = this.participantsAt(target, 'touch');
1902
+ const native =
1903
+ touch.target instanceof Node
1904
+ ? landedOn(event, touch.target)
1905
+ : landedOn(event);
1906
+ const target = this.presentedTarget(
1907
+ native,
1908
+ touch.clientX,
1909
+ touch.clientY,
1910
+ event.timeStamp,
1911
+ );
1912
+ const {recognizers, consumer, consumerElement} = this.participantsAt(
1913
+ target,
1914
+ 'touch',
1915
+ );
1159
1916
  if (recognizers.length === 0 && consumer == null) {
1160
1917
  // Nothing here takes part: the touch stays the page's, but a
1161
1918
  // recognizer tracking another finger hears it began (a second
@@ -1172,14 +1929,22 @@ export class GestureHost {
1172
1929
  }
1173
1930
  const id = this.nextId++;
1174
1931
  this.touchIds.set(touch.identifier, id);
1175
- this.holdSelection(id, recognizers);
1932
+ if (locksSelectionFor('touch')) {
1933
+ toLock.push({id, target, consumerElement});
1934
+ }
1935
+ // The finger's events keep going to what the engine hit.
1176
1936
  this.watchTarget(
1177
1937
  touch.identifier,
1178
- target,
1179
- recognizers.some(claimsWhileMoving),
1938
+ native,
1939
+ recognizers.some(claimsWhileMoving) || consumer?.keepsTouch != null,
1940
+ consumer != null ||
1941
+ recognizers.some(recognizer => recognizer.claimsTouches),
1180
1942
  );
1181
1943
  this.lastFed.set(id, {x: touch.clientX, y: touch.clientY, time});
1182
- this.pairTouch(id, {x: touch.clientX, y: touch.clientY, target});
1944
+ this.pairTouch(id, {x: touch.clientX, y: touch.clientY, target: native});
1945
+ if (target !== native && target != null) {
1946
+ this.retargeted.set(id, {x: touch.clientX, y: touch.clientY, target});
1947
+ }
1183
1948
  inputs.push({
1184
1949
  id,
1185
1950
  x: touch.clientX,
@@ -1196,18 +1961,31 @@ export class GestureHost {
1196
1961
  this.arena.cancelled(stale, time);
1197
1962
  }
1198
1963
  this.arena.began(inputs);
1964
+ for (const {id, target, consumerElement} of toLock) {
1965
+ this.lockSelection(
1966
+ id,
1967
+ this.arena.participantsOf(id),
1968
+ target,
1969
+ this.arena.consumerOf(id) ?? null,
1970
+ consumerElement,
1971
+ );
1972
+ }
1199
1973
  for (const input of untracked) {
1200
1974
  this.arena.untrackedBegan(input);
1201
1975
  }
1202
1976
  // Stamped after the consumers judged the touch: the brake asks whether
1203
1977
  // an EARLIER finger is still driving a scroll.
1204
- if (event.target instanceof Node) {
1205
- this.lastTouch = {target: event.target, time};
1978
+ const landed = landedOn(event);
1979
+ if (landed instanceof Node) {
1980
+ this.lastTouch = {target: landed, time};
1206
1981
  }
1207
1982
  };
1208
1983
 
1209
1984
  private readonly onTouchMove = (event: TouchEvent): void => {
1210
- if (!this.takeEvent(event)) {
1985
+ this.noteFingersDown(event);
1986
+ // Where the host reads a finger from its pointer events (no ontouchstart,
1987
+ // as after touch emulation turns on), its Touch Events would track it twice.
1988
+ if (!this.usesTouchEvents || !this.takeEvent(event)) {
1211
1989
  return;
1212
1990
  }
1213
1991
  this.dropFingersNotDown(event);
@@ -1258,12 +2036,25 @@ export class GestureHost {
1258
2036
  : touch.scroll.canScroll(0, dy);
1259
2037
  });
1260
2038
  if (taken.length > 0) {
1261
- this.arena.browserTookOver(taken, time);
2039
+ this.browserTook(taken, time);
1262
2040
  }
1263
2041
  }
1264
- this.feedMoves(inputs);
2042
+ // A finger its pointer events sample is fed from there, never from here.
2043
+ this.feedMoves(inputs.filter(input => !this.pointerFed.has(input.id)));
1265
2044
  };
1266
2045
 
2046
+ /** The one blocking `touchmove` handler every claiming element shares. */
2047
+ private readonly onBlockingTouchMove = (event: Event): void => {
2048
+ this.cancelIfClaimed(event as TouchEvent);
2049
+ };
2050
+
2051
+ /**
2052
+ * Cancel a `touchmove` while a recognizer owns one of its fingers. A touch
2053
+ * no recognizer owns keeps its moves (`spec:AST-094` FR19): nothing is
2054
+ * cancelled before a recognizer begins, or for a touch it does not track,
2055
+ * unless a recognizer holds that finger already (a scroll-edge pan pulling
2056
+ * away from an edge every scroller under it is at; FR19, DEC-18).
2057
+ */
1267
2058
  /**
1268
2059
  * Under `inputMode: 'pointer-events'` a finger comes from its pointer
1269
2060
  * events, so its touches carry no id of ours: the live finger it is, the
@@ -1280,10 +2071,11 @@ export class GestureHost {
1280
2071
  finger.phase === 'cancelled' ||
1281
2072
  !(finger.target instanceof Node) ||
1282
2073
  !(touch.target instanceof Node) ||
2074
+ // Along the flat tree, both ways: the finger's target can be inside
2075
+ // an open shadow root while its touches reach the host retargeted.
1283
2076
  !(
1284
- finger.target === touch.target ||
1285
- finger.target.contains(touch.target) ||
1286
- touch.target.contains(finger.target)
2077
+ containsAlongFlatTree(finger.target, touch.target) ||
2078
+ containsAlongFlatTree(touch.target, finger.target)
1287
2079
  )
1288
2080
  ) {
1289
2081
  continue;
@@ -1300,33 +2092,41 @@ export class GestureHost {
1300
2092
  /**
1301
2093
  * Cancel the `touchend` of a finger a recognizer owned when it lifted
1302
2094
  * (`inputMode: 'pointer-events'`): its `pointerup` came first, at the same
1303
- * place on the same target (`spec:AST-094` FR21).
2095
+ * place on the same target (`spec:AST-094` FR21). Records older than
2096
+ * CLAIMED_LIFT_MS are dropped first: their touchend never came.
1304
2097
  */
1305
- private cancelClaimedLift(event: TouchEvent): void {
1306
- if (!event.cancelable || event.defaultPrevented) {
2098
+ private readonly onClaimedTouchEnd = (event: Event): void => {
2099
+ const end = event as TouchEvent;
2100
+ const time = eventTime(end);
2101
+ for (let i = this.claimedLifts.length - 1; i >= 0; i--) {
2102
+ if (time - this.claimedLifts[i].time > CLAIMED_LIFT_MS) {
2103
+ this.claimedLifts.splice(i, 1);
2104
+ }
2105
+ }
2106
+ if (!end.cancelable || end.defaultPrevented) {
1307
2107
  return;
1308
2108
  }
1309
- for (const touch of touchesOf(event.changedTouches)) {
2109
+ for (const touch of touchesOf(end.changedTouches)) {
2110
+ // As its pointer landed: inside an open shadow root this listener
2111
+ // sees the touch retargeted to the host.
1310
2112
  const index = this.claimedLifts.findIndex(lift =>
1311
2113
  isSamePlace(lift, {
1312
2114
  x: touch.clientX,
1313
2115
  y: touch.clientY,
1314
- target: touch.target,
2116
+ target: landedOn(end, touch.target),
1315
2117
  }),
1316
2118
  );
1317
2119
  if (index >= 0) {
1318
2120
  this.claimedLifts.splice(index, 1);
1319
- event.preventDefault();
2121
+ if (this.claimedLifts.length === 0) {
2122
+ this.clearClaimedLifts();
2123
+ }
2124
+ end.preventDefault();
1320
2125
  return;
1321
2126
  }
1322
2127
  }
1323
- }
2128
+ };
1324
2129
 
1325
- /**
1326
- * Cancel a `touchmove` while a recognizer owns one of its fingers. A touch
1327
- * no recognizer owns keeps its moves (`spec:AST-094` FR19): nothing is
1328
- * cancelled before a recognizer begins, or for a touch it does not track.
1329
- */
1330
2130
  private cancelIfClaimed(event: TouchEvent): void {
1331
2131
  if (!event.cancelable || event.defaultPrevented) {
1332
2132
  return;
@@ -1337,15 +2137,29 @@ export class GestureHost {
1337
2137
  for (const touch of moved) {
1338
2138
  const id =
1339
2139
  this.touchIds.get(touch.identifier) ??
1340
- (this.inputMode === 'pointer-events'
1341
- ? this.pointerFingerAt(touch)
1342
- : undefined);
1343
- if (id != null && this.arena.isClaimed(id)) {
2140
+ // Where fingers come from pointer events (inputMode 'pointer-events',
2141
+ // or 'auto' with no ontouchstart), the touch is matched to its pointer.
2142
+ (this.usesTouchEvents ? undefined : this.pointerFingerAt(touch));
2143
+ if (
2144
+ id != null &&
2145
+ (this.arena.isClaimed(id) ||
2146
+ // A kept press keeps its finger under any pointer (FR11, DEC-21).
2147
+ this.arena.consumerOf(id)?.keepsTouch?.(id) === true ||
2148
+ // A recognizer that holds the finger before it begins: a
2149
+ // scroll-edge pan pulling away from an edge (FR19, DEC-18), only
2150
+ // while this is the one finger on the screen: with a second one
2151
+ // down anywhere, even off the recognizer's element, the moves stay
2152
+ // the browser's, for its pinch (FR10).
2153
+ (event.touches.length === 1 &&
2154
+ this.arena
2155
+ .participantsOf(id)
2156
+ .some(recognizer => internals(recognizer).keepsTouch(id))))
2157
+ ) {
1344
2158
  event.preventDefault();
1345
2159
  return;
1346
2160
  }
1347
2161
  }
1348
- if (moved.some(touch => (touch as StylusTouch).touchType === 'stylus')) {
2162
+ if (hasStylusTouch(event)) {
1349
2163
  for (const id of this.pointerIds.values()) {
1350
2164
  if (this.arena.isClaimed(id)) {
1351
2165
  // A pen whose pointer a recognizer owns: its stylus touches too,
@@ -1358,39 +2172,92 @@ export class GestureHost {
1358
2172
  }
1359
2173
 
1360
2174
  private readonly onTouchEnd = (event: TouchEvent): void => {
1361
- if (!this.takeEvent(event)) {
2175
+ this.releaseArmedPress();
2176
+ this.noteFingersDown(event);
2177
+ // Where the host reads a finger from its pointer events (no ontouchstart,
2178
+ // as after touch emulation turns on), its Touch Events would track it twice.
2179
+ if (!this.usesTouchEvents || !this.takeEvent(event)) {
1362
2180
  return;
1363
2181
  }
1364
2182
  this.dropFingersNotDown(event);
1365
2183
  const time = eventTime(event);
1366
2184
  const inputs: TouchInput[] = [];
2185
+ const retargetedEnds: {
2186
+ id: number;
2187
+ landed: {x: number; y: number; target: EventTarget};
2188
+ x: number;
2189
+ y: number;
2190
+ }[] = [];
2191
+ let isRefused = false;
1367
2192
  for (const touch of touchesOf(event.changedTouches)) {
2193
+ if (this.cancelledFingers.delete(touch.identifier)) {
2194
+ isRefused = true;
2195
+ continue;
2196
+ }
2197
+ const tracked = this.touchIds.get(touch.identifier);
2198
+ const landed = tracked == null ? undefined : this.retargeted.get(tracked);
1368
2199
  const id = this.forgetFinger(touch.identifier);
1369
2200
  if (id == null) {
1370
2201
  continue;
1371
2202
  }
1372
2203
  inputs.push({id, x: touch.clientX, y: touch.clientY, time});
2204
+ if (landed != null) {
2205
+ retargetedEnds.push({id, landed, x: touch.clientX, y: touch.clientY});
2206
+ }
1373
2207
  }
1374
2208
  // The lift is when momentum starts: the clock the brake wants most.
1375
- if (event.target instanceof Node) {
1376
- this.lastTouch = {target: event.target, time};
1377
- }
1378
- if (inputs.length === 0) {
1379
- this.releaseArmedPress();
1380
- return;
2209
+ const landed = landedOn(event);
2210
+ if (landed instanceof Node) {
2211
+ this.lastTouch = {target: landed, time};
2212
+ }
2213
+ const dispositions =
2214
+ inputs.length > 0
2215
+ ? this.arena.ended(inputs)
2216
+ : new Map<number, ClickDisposition>();
2217
+ let cancelsClick = isRefused || needsSuppression(dispositions);
2218
+ // A tap sent to what is drawn: the engine's click would hit the layout
2219
+ // position, so it is cancelled and the tap clicks what it touched.
2220
+ for (const end of retargetedEnds) {
2221
+ if (this.clickRetargetedTap(end.landed, end, dispositions.get(end.id))) {
2222
+ cancelsClick = true;
2223
+ }
1381
2224
  }
1382
- const dispositions = this.arena.ended(inputs);
1383
- if (needsSuppression(dispositions)) {
2225
+ if (cancelsClick) {
1384
2226
  if (event.cancelable) {
1385
2227
  event.preventDefault();
1386
2228
  }
1387
- this.armSwallower();
2229
+ armClickGuard(this.doc);
1388
2230
  }
1389
- this.releaseArmedPress();
1390
2231
  };
1391
2232
 
2233
+ /**
2234
+ * Clicks what a retargeted contact touched if it ended as a tap the
2235
+ * engine would click: nothing claimed it, the browser did not take it
2236
+ * (a taken contact is no longer retargeted), and the finger stayed within
2237
+ * a tap's movement. Returns whether it clicked.
2238
+ */
2239
+ private clickRetargetedTap(
2240
+ landed: {x: number; y: number; target: EventTarget} | undefined,
2241
+ end: {x: number; y: number},
2242
+ disposition: ClickDisposition | undefined,
2243
+ ): boolean {
2244
+ if (landed == null || disposition !== 'allow') {
2245
+ return false;
2246
+ }
2247
+ const moved = Math.hypot(end.x - landed.x, end.y - landed.y);
2248
+ if (moved > UIKIT_TAP.allowableMovement.value) {
2249
+ return false;
2250
+ }
2251
+ this.clickRetargeted(landed.target, end.x, end.y);
2252
+ return true;
2253
+ }
2254
+
1392
2255
  private readonly onTouchCancel = (event: TouchEvent): void => {
1393
- if (!this.takeEvent(event)) {
2256
+ this.releaseArmedPress();
2257
+ this.noteFingersDown(event);
2258
+ // Where the host reads a finger from its pointer events (no ontouchstart,
2259
+ // as after touch emulation turns on), its Touch Events would track it twice.
2260
+ if (!this.usesTouchEvents || !this.takeEvent(event)) {
1394
2261
  return;
1395
2262
  }
1396
2263
  const listed = touchesOf(event.changedTouches);
@@ -1399,6 +2266,12 @@ export class GestureHost {
1399
2266
  listed.length > 0
1400
2267
  ? listed.map(touch => touch.identifier)
1401
2268
  : [...this.touchIds.keys()];
2269
+ if (listed.length === 0) {
2270
+ this.cancelledFingers.clear();
2271
+ }
2272
+ for (const identifier of identifiers) {
2273
+ this.cancelledFingers.delete(identifier);
2274
+ }
1402
2275
  const ids: number[] = [];
1403
2276
  for (const identifier of identifiers) {
1404
2277
  const id = this.forgetFinger(identifier);
@@ -1409,7 +2282,6 @@ export class GestureHost {
1409
2282
  if (ids.length > 0) {
1410
2283
  this.arena.cancelled(ids, eventTime(event));
1411
2284
  }
1412
- this.releaseArmedPress();
1413
2285
  };
1414
2286
 
1415
2287
  /** The target's own listeners, for a target that left the document. */
@@ -1427,6 +2299,11 @@ export class GestureHost {
1427
2299
  this.onTouchEnd(event as TouchEvent);
1428
2300
  };
1429
2301
 
2302
+ /** The same, registered passively for a touch only watchers follow. */
2303
+ private readonly onTargetTouchEndPassive = (event: Event): void => {
2304
+ this.onTouchEnd(event as TouchEvent);
2305
+ };
2306
+
1430
2307
  private readonly onTargetTouchCancel = (event: Event): void => {
1431
2308
  this.onTouchCancel(event as TouchEvent);
1432
2309
  };
@@ -1437,7 +2314,10 @@ export class GestureHost {
1437
2314
  * in this very event) ended where we could not see it.
1438
2315
  */
1439
2316
  private dropFingersNotDown(event: TouchEvent): void {
1440
- if (event.touches == null || this.touchIds.size === 0) {
2317
+ if (
2318
+ event.touches == null ||
2319
+ (this.touchIds.size === 0 && this.cancelledFingers.size === 0)
2320
+ ) {
1441
2321
  return;
1442
2322
  }
1443
2323
  const down = new Set<number>();
@@ -1447,6 +2327,11 @@ export class GestureHost {
1447
2327
  for (const touch of touchesOf(event.changedTouches)) {
1448
2328
  down.add(touch.identifier);
1449
2329
  }
2330
+ for (const identifier of [...this.cancelledFingers]) {
2331
+ if (!down.has(identifier)) {
2332
+ this.cancelledFingers.delete(identifier);
2333
+ }
2334
+ }
1450
2335
  const gone = [...this.touchIds.keys()].filter(
1451
2336
  identifier => !down.has(identifier),
1452
2337
  );
@@ -1466,6 +2351,7 @@ export class GestureHost {
1466
2351
  identifier: number,
1467
2352
  target: EventTarget | null,
1468
2353
  isBlocking: boolean,
2354
+ isClaiming: boolean,
1469
2355
  ): void {
1470
2356
  if (target == null || typeof target.addEventListener !== 'function') {
1471
2357
  return;
@@ -1473,30 +2359,45 @@ export class GestureHost {
1473
2359
  this.touchTargets.set(identifier, target);
1474
2360
  const state = this.watched.get(target);
1475
2361
  if (state == null) {
1476
- this.watched.set(target, {count: 1, blocking: isBlocking ? 1 : 0});
2362
+ this.watched.set(target, {
2363
+ count: 1,
2364
+ blocking: isBlocking ? 1 : 0,
2365
+ claiming: isClaiming ? 1 : 0,
2366
+ });
1477
2367
  if (isBlocking) {
1478
2368
  this.blockingFingers.add(identifier);
1479
2369
  }
2370
+ if (isClaiming) {
2371
+ this.claimingFingers.add(identifier);
2372
+ }
1480
2373
  target.addEventListener(
1481
2374
  'touchmove',
1482
2375
  isBlocking ? this.onTargetTouchMove : this.onTargetTouchMovePassive,
1483
2376
  {passive: !isBlocking},
1484
2377
  );
1485
- target.addEventListener('touchend', this.onTargetTouchEnd, {
1486
- passive: false,
1487
- });
2378
+ target.addEventListener(
2379
+ 'touchend',
2380
+ isClaiming ? this.onTargetTouchEnd : this.onTargetTouchEndPassive,
2381
+ {passive: !isClaiming},
2382
+ );
1488
2383
  target.addEventListener('touchcancel', this.onTargetTouchCancel, {
1489
2384
  passive: true,
1490
2385
  });
1491
2386
  return;
1492
2387
  }
1493
2388
  const wasBlocking = state.blocking > 0;
2389
+ const wasClaiming = state.claiming > 0;
1494
2390
  state.count += 1;
1495
2391
  if (isBlocking) {
1496
2392
  state.blocking += 1;
1497
2393
  this.blockingFingers.add(identifier);
1498
2394
  }
2395
+ if (isClaiming) {
2396
+ state.claiming += 1;
2397
+ this.claimingFingers.add(identifier);
2398
+ }
1499
2399
  this.swapTargetTouchMove(target, wasBlocking, state.blocking > 0);
2400
+ this.swapTargetTouchEnd(target, wasClaiming, state.claiming > 0);
1500
2401
  }
1501
2402
 
1502
2403
  private unwatchTarget(identifier: number): void {
@@ -1510,12 +2411,17 @@ export class GestureHost {
1510
2411
  return;
1511
2412
  }
1512
2413
  const wasBlocking = state.blocking > 0;
2414
+ const wasClaiming = state.claiming > 0;
1513
2415
  state.count -= 1;
1514
2416
  if (this.blockingFingers.delete(identifier)) {
1515
2417
  state.blocking -= 1;
1516
2418
  }
2419
+ if (this.claimingFingers.delete(identifier)) {
2420
+ state.claiming -= 1;
2421
+ }
1517
2422
  if (state.count > 0) {
1518
2423
  this.swapTargetTouchMove(target, wasBlocking, state.blocking > 0);
2424
+ this.swapTargetTouchEnd(target, wasClaiming, state.claiming > 0);
1519
2425
  return;
1520
2426
  }
1521
2427
  this.watched.delete(target);
@@ -1523,7 +2429,10 @@ export class GestureHost {
1523
2429
  'touchmove',
1524
2430
  wasBlocking ? this.onTargetTouchMove : this.onTargetTouchMovePassive,
1525
2431
  );
1526
- target.removeEventListener('touchend', this.onTargetTouchEnd);
2432
+ target.removeEventListener(
2433
+ 'touchend',
2434
+ wasClaiming ? this.onTargetTouchEnd : this.onTargetTouchEndPassive,
2435
+ );
1527
2436
  target.removeEventListener('touchcancel', this.onTargetTouchCancel);
1528
2437
  }
1529
2438
 
@@ -1552,6 +2461,31 @@ export class GestureHost {
1552
2461
  );
1553
2462
  }
1554
2463
 
2464
+ /**
2465
+ * Keeps one `touchend` listener on a watched target: the cancelable one
2466
+ * while a finger on it has a participant that could claim (a lift whose
2467
+ * click must not happen cancels its `touchend`), a passive one while only
2468
+ * watchers follow its fingers (`spec:AST-094` FR20).
2469
+ */
2470
+ private swapTargetTouchEnd(
2471
+ target: EventTarget,
2472
+ wasClaiming: boolean,
2473
+ isClaiming: boolean,
2474
+ ): void {
2475
+ if (wasClaiming === isClaiming) {
2476
+ return;
2477
+ }
2478
+ target.removeEventListener(
2479
+ 'touchend',
2480
+ wasClaiming ? this.onTargetTouchEnd : this.onTargetTouchEndPassive,
2481
+ );
2482
+ target.addEventListener(
2483
+ 'touchend',
2484
+ isClaiming ? this.onTargetTouchEnd : this.onTargetTouchEndPassive,
2485
+ {passive: !isClaiming},
2486
+ );
2487
+ }
2488
+
1555
2489
  /** Stop tracking a finger by its Touch.identifier; returns its arena id. */
1556
2490
  private forgetFinger(identifier: number): number | undefined {
1557
2491
  const id = this.touchIds.get(identifier);
@@ -1568,6 +2502,7 @@ export class GestureHost {
1568
2502
  if (isSamePlace(pending, place)) {
1569
2503
  this.pendingPointers.delete(pointerId);
1570
2504
  this.fingerPointers.set(pointerId, id);
2505
+ this.pointerFed.add(id);
1571
2506
  return;
1572
2507
  }
1573
2508
  }
@@ -1579,23 +2514,18 @@ export class GestureHost {
1579
2514
  if (isSamePlace(unpaired, place)) {
1580
2515
  this.unpairedTouches.delete(id);
1581
2516
  this.fingerPointers.set(pointerId, id);
2517
+ this.pointerFed.add(id);
1582
2518
  return;
1583
2519
  }
1584
2520
  }
1585
2521
  this.pendingPointers.set(pointerId, place);
1586
2522
  }
1587
2523
 
1588
- /** Feed moves, dropping the echo of a move the other channel delivered. */
2524
+ /** Feed moves from a contact's sampling channel, in time order. */
1589
2525
  private feedMoves(inputs: ReadonlyArray<TouchInput>): void {
1590
2526
  const fresh = inputs.filter(input => {
1591
2527
  const last = this.lastFed.get(input.id);
1592
- if (
1593
- last != null &&
1594
- (input.time < last.time ||
1595
- (input.time === last.time &&
1596
- input.x === last.x &&
1597
- input.y === last.y))
1598
- ) {
2528
+ if (last != null && input.time < last.time) {
1599
2529
  return false;
1600
2530
  }
1601
2531
  this.lastFed.set(input.id, {x: input.x, y: input.y, time: input.time});
@@ -1606,83 +2536,12 @@ export class GestureHost {
1606
2536
  }
1607
2537
  }
1608
2538
 
1609
- /**
1610
- * For one held press by a finger or a pen: text selection and the touch
1611
- * callout off on the elements whose hold does something (a long press),
1612
- * as `holdSelectionStyle` decides (`spec:AST-094` FR41, DEC-9).
1613
- * Everything else keeps the browser's long-press selection. Restored when
1614
- * the contact ends; refcounted across contacts on one element.
1615
- */
1616
- private holdSelection(
1617
- id: number,
1618
- recognizers: ReadonlyArray<GestureRecognizer>,
1619
- ): void {
1620
- const elements = new Set<HTMLElement>();
1621
- for (const recognizer of recognizers) {
1622
- if (
1623
- recognizer.view instanceof HTMLElement &&
1624
- recognizer.isEnabled &&
1625
- // An element attached with manageStyle: false keeps its own styles.
1626
- this.registry.get(recognizer.view)?.manageStyle !== false &&
1627
- holdSelectionStyle([recognizer]) != null
1628
- ) {
1629
- elements.add(recognizer.view);
1630
- }
1631
- }
1632
- if (elements.size === 0) {
1633
- return;
1634
- }
1635
- const held = [...elements];
1636
- for (const element of held) {
1637
- const entry = heldSelection.get(element);
1638
- if (entry != null) {
1639
- entry.count += 1;
1640
- continue;
1641
- }
1642
- const saved = HOLD_SELECTION_PROPERTIES.map(name => ({
1643
- name,
1644
- value: element.style.getPropertyValue(name),
1645
- priority: element.style.getPropertyPriority(name),
1646
- }));
1647
- for (const name of HOLD_SELECTION_PROPERTIES) {
1648
- element.style.setProperty(name, 'none');
1649
- }
1650
- heldSelection.set(element, {count: 1, saved});
1651
- }
1652
- this.heldSelectionBy.set(id, held);
1653
- }
1654
-
1655
- /** Undo `holdSelection` for a contact that ended; idempotent. */
1656
- private releaseSelection(id: number): void {
1657
- const held = this.heldSelectionBy.get(id);
1658
- if (held == null) {
1659
- return;
1660
- }
1661
- this.heldSelectionBy.delete(id);
1662
- for (const element of held) {
1663
- const entry = heldSelection.get(element);
1664
- if (entry == null) {
1665
- continue;
1666
- }
1667
- entry.count -= 1;
1668
- if (entry.count > 0) {
1669
- continue;
1670
- }
1671
- heldSelection.delete(element);
1672
- for (const {name, value, priority} of entry.saved) {
1673
- if (value === '') {
1674
- element.style.removeProperty(name);
1675
- } else {
1676
- element.style.setProperty(name, value, priority);
1677
- }
1678
- }
1679
- }
1680
- }
1681
-
1682
2539
  /** Forget a contact's pairing and echo state. */
1683
2540
  private forgetContact(id: number): void {
1684
- this.releaseSelection(id);
2541
+ this.unlockSelection(id);
2542
+ this.retargeted.delete(id);
1685
2543
  this.lastFed.delete(id);
2544
+ this.pointerFed.delete(id);
1686
2545
  this.judgedUncancelable.delete(id);
1687
2546
  this.unpairedTouches.delete(id);
1688
2547
  for (const [pointerId, paired] of this.fingerPointers) {
@@ -1696,7 +2555,7 @@ export class GestureHost {
1696
2555
 
1697
2556
  private readonly onPointerDown = (event: PointerEvent): void => {
1698
2557
  // A new press: whatever click is still owed to the last one is not this.
1699
- this.disarmSwallower();
2558
+ disarmClickGuard(this.doc);
1700
2559
  if (!isPointerKind(event.pointerType)) {
1701
2560
  return;
1702
2561
  }
@@ -1704,17 +2563,24 @@ export class GestureHost {
1704
2563
  this.pairPointer(event.pointerId, {
1705
2564
  x: event.clientX,
1706
2565
  y: event.clientY,
1707
- target: event.target,
2566
+ target: landedOn(event),
1708
2567
  });
1709
2568
  return;
1710
2569
  }
1711
- // A right click, a pen's barrel button and a ctrl-click on macOS start
1712
- // no press (FR43).
2570
+ // A right click, a pen's barrel button, or a ctrl-click on macOS (its
2571
+ // context click) starts no press (FR43).
1713
2572
  if (event.pointerType !== 'touch' && !isPrimaryClick(event)) {
1714
2573
  return;
1715
2574
  }
1716
- const {recognizers, consumer} = this.participantsAt(
1717
- event.target,
2575
+ const landed = landedOn(event);
2576
+ const target = this.presentedTarget(
2577
+ landed,
2578
+ event.clientX,
2579
+ event.clientY,
2580
+ event.timeStamp,
2581
+ );
2582
+ const {recognizers, consumer, consumerElement} = this.participantsAt(
2583
+ target,
1718
2584
  event.pointerType,
1719
2585
  );
1720
2586
  if (recognizers.length === 0 && consumer == null) {
@@ -1722,8 +2588,8 @@ export class GestureHost {
1722
2588
  }
1723
2589
  const id = this.nextId++;
1724
2590
  this.pointerIds.set(event.pointerId, id);
1725
- if (event.pointerType !== 'mouse') {
1726
- this.holdSelection(id, recognizers);
2591
+ if (target !== landed && target != null) {
2592
+ this.retargeted.set(id, {x: event.clientX, y: event.clientY, target});
1727
2593
  }
1728
2594
  this.arena.began([
1729
2595
  {
@@ -1732,12 +2598,23 @@ export class GestureHost {
1732
2598
  y: event.clientY,
1733
2599
  time: eventTime(event),
1734
2600
  pointerType: event.pointerType,
1735
- target: event.target,
1736
- scroll: createNativeScrollProbe(event.target),
2601
+ target,
2602
+ scroll: createNativeScrollProbe(target),
1737
2603
  recognizers,
1738
2604
  consumer,
1739
2605
  },
1740
2606
  ]);
2607
+ if (locksSelectionFor(event.pointerType)) {
2608
+ // The presented target: what the pen is on, where the engine's own
2609
+ // hit test may still see the motion's start.
2610
+ this.lockSelection(
2611
+ id,
2612
+ this.arena.participantsOf(id),
2613
+ target,
2614
+ this.arena.consumerOf(id) ?? null,
2615
+ consumerElement,
2616
+ );
2617
+ }
1741
2618
  };
1742
2619
 
1743
2620
  private readonly onPointerMove = (event: PointerEvent): void => {
@@ -1772,6 +2649,7 @@ export class GestureHost {
1772
2649
  };
1773
2650
 
1774
2651
  private readonly onPointerUp = (event: PointerEvent): void => {
2652
+ this.releaseArmedPress();
1775
2653
  if (event.pointerType === 'touch' && this.usesTouchEvents) {
1776
2654
  // The lift itself is the touchend's: it alone can cancel the click.
1777
2655
  this.fingerPointers.delete(event.pointerId);
@@ -1780,31 +2658,96 @@ export class GestureHost {
1780
2658
  }
1781
2659
  const id = this.pointerIds.get(event.pointerId);
1782
2660
  if (id == null) {
1783
- this.releaseArmedPress();
1784
2661
  return;
1785
2662
  }
1786
2663
  this.pointerIds.delete(event.pointerId);
1787
- this.releaseSelection(id);
1788
- if (event.pointerType === 'touch' && this.arena.isClaimed(id)) {
1789
- this.claimedLifts.push({
1790
- x: event.clientX,
1791
- y: event.clientY,
1792
- target: event.target,
1793
- });
1794
- if (this.claimedLifts.length > 8) {
1795
- this.claimedLifts.shift();
1796
- }
1797
- }
2664
+ this.unlockSelection(id);
1798
2665
  const dispositions = this.arena.ended([
1799
2666
  {id, x: event.clientX, y: event.clientY, time: eventTime(event)},
1800
2667
  ]);
1801
- if (needsSuppression(dispositions)) {
1802
- this.armSwallower();
2668
+ // A retargeted tap's own click arms the click guard for the engine's.
2669
+ const landed = this.retargeted.get(id);
2670
+ this.retargeted.delete(id);
2671
+ const clicked = this.clickRetargetedTap(
2672
+ landed,
2673
+ {x: event.clientX, y: event.clientY},
2674
+ dispositions.get(id),
2675
+ );
2676
+ if (!clicked && needsSuppression(dispositions)) {
2677
+ armClickGuard(this.doc);
2678
+ }
2679
+ // A finger read from its pointer events: the touchend that follows the
2680
+ // lift is cancelled when a gesture took it, which the lift itself may
2681
+ // decide (a hold whose time came with it), or when its tap was retargeted
2682
+ // (FR21).
2683
+ if (
2684
+ event.pointerType === 'touch' &&
2685
+ (clicked || needsSuppression(dispositions))
2686
+ ) {
2687
+ this.noteClaimedLift(event);
1803
2688
  }
1804
- this.releaseArmedPress();
1805
2689
  };
1806
2690
 
2691
+ /**
2692
+ * Note a claimed finger's lift, so the `touchend` that follows its
2693
+ * `pointerup` is cancelled (FR21). Only where an element's listener can take
2694
+ * that touchend: elsewhere none comes, and the note would hold its node for
2695
+ * nothing. At most CLAIMED_LIFT_LIMIT wait, the oldest going first, and one
2696
+ * timer drops each once CLAIMED_LIFT_MS has passed (FR24); the host's
2697
+ * uninstall keeps them, as it can run in the microtask after the pointerup,
2698
+ * before the touchend that comes later in the same task.
2699
+ */
2700
+ private noteClaimedLift(event: PointerEvent): void {
2701
+ if (
2702
+ !this.readsFingersFromPointerEvents() ||
2703
+ !(this.isCoarse || this.sendsTouchEvents())
2704
+ ) {
2705
+ return;
2706
+ }
2707
+ this.claimedLifts.push({
2708
+ x: event.clientX,
2709
+ y: event.clientY,
2710
+ target: landedOn(event),
2711
+ time: eventTime(event),
2712
+ });
2713
+ if (this.claimedLifts.length > CLAIMED_LIFT_LIMIT) {
2714
+ this.claimedLifts.shift();
2715
+ }
2716
+ this.armClaimedLiftTimer();
2717
+ }
2718
+
2719
+ /** Arm the one timer for the oldest claimed lift still waiting. */
2720
+ private armClaimedLiftTimer(): void {
2721
+ if (this.claimedLiftTimer != null || this.claimedLifts.length === 0) {
2722
+ return;
2723
+ }
2724
+ const due = this.claimedLifts[0].time + CLAIMED_LIFT_MS;
2725
+ this.claimedLiftTimer = this.clock.setTimeout(
2726
+ () => {
2727
+ this.claimedLiftTimer = null;
2728
+ const now = this.clock.now();
2729
+ for (let i = this.claimedLifts.length - 1; i >= 0; i--) {
2730
+ if (now - this.claimedLifts[i].time >= CLAIMED_LIFT_MS) {
2731
+ this.claimedLifts.splice(i, 1);
2732
+ }
2733
+ }
2734
+ this.armClaimedLiftTimer();
2735
+ },
2736
+ Math.max(0, due - this.clock.now()),
2737
+ );
2738
+ }
2739
+
2740
+ /** Drop every claimed lift and its timer, once the last one is taken. */
2741
+ private clearClaimedLifts(): void {
2742
+ this.claimedLifts.length = 0;
2743
+ if (this.claimedLiftTimer != null) {
2744
+ this.clock.clearTimeout(this.claimedLiftTimer);
2745
+ this.claimedLiftTimer = null;
2746
+ }
2747
+ }
2748
+
1807
2749
  private readonly onPointerCancel = (event: PointerEvent): void => {
2750
+ this.releaseArmedPress();
1808
2751
  if (event.pointerType === 'touch' && this.usesTouchEvents) {
1809
2752
  const id =
1810
2753
  this.fingerPointers.get(event.pointerId) ??
@@ -1812,17 +2755,21 @@ export class GestureHost {
1812
2755
  this.fingerPointers.delete(event.pointerId);
1813
2756
  this.pendingPointers.delete(event.pointerId);
1814
2757
  if (id != null) {
1815
- this.arena.browserTookOver([id], eventTime(event));
2758
+ // The pointer channel ends here while the finger keeps moving (the
2759
+ // browser scrolls with it): its touch events, now the only channel,
2760
+ // sample it, as a watcher following the scroll to the lift needs.
2761
+ this.pointerFed.delete(id);
2762
+ this.browserTook([id], eventTime(event));
1816
2763
  }
1817
2764
  return;
1818
2765
  }
1819
2766
  const id = this.pointerIds.get(event.pointerId);
1820
2767
  if (id != null) {
1821
2768
  this.pointerIds.delete(event.pointerId);
1822
- this.releaseSelection(id);
2769
+ this.unlockSelection(id);
2770
+ this.retargeted.delete(id);
1823
2771
  this.arena.cancelled([id], eventTime(event));
1824
2772
  }
1825
- this.releaseArmedPress();
1826
2773
  };
1827
2774
 
1828
2775
  /**
@@ -1839,7 +2786,7 @@ export class GestureHost {
1839
2786
  touch.pointerType !== 'touch' ||
1840
2787
  touch.phase === 'ended' ||
1841
2788
  touch.phase === 'cancelled' ||
1842
- touch.target !== event.target
2789
+ touch.target !== landedOn(event)
1843
2790
  ) {
1844
2791
  continue;
1845
2792
  }
@@ -1857,54 +2804,29 @@ export class GestureHost {
1857
2804
 
1858
2805
  // --- Clicks, menus, scrolls, focus -----------------------------------------
1859
2806
 
1860
- private armSwallower(): void {
1861
- this.swallowDeadline =
1862
- browserClock.now() + UIKIT_GESTURES.click.strayClickWindow.value;
1863
- }
1864
-
1865
- private disarmSwallower(): void {
1866
- this.swallowDeadline = Number.NEGATIVE_INFINITY;
1867
- }
1868
-
1869
- private readonly onClick = (event: MouseEvent): void => {
1870
- if (browserClock.now() > this.swallowDeadline) {
1871
- return;
1872
- }
1873
- if (!event.isTrusted || event.detail === 0) {
1874
- return;
1875
- }
1876
- if (
1877
- event.target instanceof Element &&
1878
- event.target.hasAttribute(HAPTIC_SWITCH_ATTRIBUTE)
1879
- ) {
1880
- return;
1881
- }
1882
- this.disarmSwallower();
1883
- event.preventDefault();
1884
- event.stopImmediatePropagation();
1885
- };
1886
-
1887
2807
  private replayClick(touch: GestureTouch, allowed: boolean): void {
1888
2808
  if (!allowed) {
1889
2809
  return;
1890
2810
  }
1891
2811
  // The browser's own click was swallowed while recognizers decided; they
1892
2812
  // all failed, so the click the touch earned is delivered now.
1893
- this.disarmSwallower();
2813
+ disarmClickGuard(this.doc);
1894
2814
  const target = touch.target;
1895
2815
  const view = this.doc.defaultView;
1896
2816
  if (!(target instanceof Element) || !target.isConnected || view == null) {
1897
2817
  return;
1898
2818
  }
1899
- target.dispatchEvent(
1900
- new view.MouseEvent('click', {
1901
- bubbles: true,
1902
- cancelable: true,
1903
- composed: true,
1904
- detail: 1,
1905
- clientX: touch.x,
1906
- clientY: touch.y,
1907
- }),
2819
+ withoutClickGuard(() =>
2820
+ target.dispatchEvent(
2821
+ new view.MouseEvent('click', {
2822
+ bubbles: true,
2823
+ cancelable: true,
2824
+ composed: true,
2825
+ detail: 1,
2826
+ clientX: touch.x,
2827
+ clientY: touch.y,
2828
+ }),
2829
+ ),
1908
2830
  );
1909
2831
  }
1910
2832
 
@@ -1925,16 +2847,38 @@ export class GestureHost {
1925
2847
  * reports itself through pointercancel or touchcancel.
1926
2848
  */
1927
2849
  ownScroll(scroller: Node): void {
1928
- this.ownedScrolls.add(scroller);
2850
+ const call = ++this.ownScrollCalls;
2851
+ this.ownedScrolls.set(scroller, call);
1929
2852
  const view = this.doc.defaultView;
1930
2853
  if (view == null) {
1931
2854
  return;
1932
2855
  }
1933
- view.requestAnimationFrame(() => {
1934
- view.requestAnimationFrame(() => {
1935
- this.ownedScrolls.delete(scroller);
2856
+ // A newer call keeps it until its own frame has passed: its frames
2857
+ // replace the older call's.
2858
+ this.ownScrollFrames.get(scroller)?.();
2859
+ let inner = 0;
2860
+ const outer = view.requestAnimationFrame(() => {
2861
+ inner = view.requestAnimationFrame(() => {
2862
+ this.ownScrollFrames.delete(scroller);
2863
+ if (this.ownedScrolls.get(scroller) === call) {
2864
+ this.ownedScrolls.delete(scroller);
2865
+ }
1936
2866
  });
1937
2867
  });
2868
+ this.ownScrollFrames.set(scroller, () => {
2869
+ view.cancelAnimationFrame(outer);
2870
+ if (inner !== 0) {
2871
+ view.cancelAnimationFrame(inner);
2872
+ }
2873
+ });
2874
+ }
2875
+
2876
+ /**
2877
+ * @internal Whether a recognizer is scrolling `scroller` itself now
2878
+ * (ownScroll): that scroll is not a finger's (fingerScroll.ts reads it).
2879
+ */
2880
+ isOwnScroll(scroller: Node): boolean {
2881
+ return this.ownedScrolls.has(scroller);
1938
2882
  }
1939
2883
 
1940
2884
  private readonly onScroll = (event: Event): void => {
@@ -1948,8 +2892,8 @@ export class GestureHost {
1948
2892
  const last = this.lastTouch;
1949
2893
  if (
1950
2894
  last != null &&
1951
- time - last.time < UIKIT_GESTURES.press.momentumMemory.value &&
1952
- scroller.contains(last.target)
2895
+ time - last.time < UIKIT_PRESS.momentumMemory.value &&
2896
+ containsAlongFlatTree(scroller, last.target)
1953
2897
  ) {
1954
2898
  this.lastScroll = {scroller, time};
1955
2899
  }
@@ -1966,7 +2910,7 @@ export class GestureHost {
1966
2910
  }
1967
2911
  if (
1968
2912
  touch.target instanceof Node &&
1969
- scroller.contains(touch.target) &&
2913
+ containsAlongFlatTree(scroller, touch.target) &&
1970
2914
  // Only a pan this finger drove takes the touch: the browser starts
1971
2915
  // one only once the finger has travelled the take distance
1972
2916
  // (spec:AST-094 FR20). A scroll under a finger that has not
@@ -1974,60 +2918,118 @@ export class GestureHost {
1974
2918
  // anchoring) is the page's own: the touch, and the click it earns,
1975
2919
  // stay where they are.
1976
2920
  Math.hypot(touch.x - touch.startX, touch.y - touch.startY) >=
1977
- UIKIT_GESTURES.press.slop.value
2921
+ UIKIT_PRESS.slop.value
1978
2922
  ) {
1979
2923
  taken.push(touch.id);
1980
2924
  }
1981
2925
  }
1982
2926
  if (taken.length > 0) {
1983
- this.arena.browserTookOver(taken, time);
2927
+ this.browserTook(taken, time);
1984
2928
  }
1985
2929
  };
1986
2930
 
2931
+ private noteFingersDown(event: TouchEvent): void {
2932
+ const fingers: Node[] = [];
2933
+ for (const touch of touchesOf(event.touches)) {
2934
+ if ((touch as StylusTouch).touchType !== 'stylus') {
2935
+ if (touch.target instanceof Node) {
2936
+ fingers.push(touch.target);
2937
+ }
2938
+ }
2939
+ }
2940
+ this.fingerTargets = fingers;
2941
+ for (const listener of [...this.fingerListeners]) {
2942
+ listener();
2943
+ }
2944
+ }
2945
+
2946
+ /**
2947
+ * A second finger landed somewhere (wherever: often on a plain row): a
2948
+ * pan that takes one finger only and has not claimed its touch fails, so
2949
+ * the two fingers stay the browser's pinch (WCAG 1.4.4) instead of the
2950
+ * pan claiming them midway. A drag a recognizer has claimed keeps its
2951
+ * finger: a second finger never cancels or redirects it (`spec:AST-094`
2952
+ * FR10), and no claim is released here.
2953
+ */
2954
+ private failUnclaimedLoneFingerPans(): void {
2955
+ for (const recognizer of [...this.arena.involvedRecognizers]) {
2956
+ if (
2957
+ isPanRecognizer(recognizer) &&
2958
+ recognizer.state === 'possible' &&
2959
+ recognizer.maximumNumberOfTouches === 1 &&
2960
+ recognizer.trackedTouches.length > 0 &&
2961
+ recognizer.trackedTouches.every(
2962
+ touch =>
2963
+ touch.pointerType === 'touch' && !this.arena.isClaimed(touch.id),
2964
+ )
2965
+ ) {
2966
+ recognizer.cancel();
2967
+ }
2968
+ }
2969
+ }
2970
+
1987
2971
  private readonly onVisibilityChange = (): void => {
1988
2972
  if (this.doc.visibilityState === 'hidden') {
1989
2973
  this.cancelEverything(this.arena.now());
2974
+ // As at a blur: the press sends no further pointer event, so an armed
2975
+ // press's page listeners go now (FR24).
1990
2976
  this.releaseArmedPress();
1991
2977
  }
1992
2978
  };
1993
2979
 
1994
2980
  private readonly onBlur = (): void => {
1995
2981
  this.cancelEverything(this.arena.now());
2982
+ // The press a blur ends sends no further pointer event: an armed press's
2983
+ // page listeners go now, as at its lift (FR24).
1996
2984
  this.releaseArmedPress();
1997
2985
  };
1998
2986
 
2987
+ /** Whether the browser sends Touch Events at all (`ontouchstart`). */
2988
+ private sendsTouchEvents(): boolean {
2989
+ const view = this.doc.defaultView;
2990
+ return view != null && 'ontouchstart' in view;
2991
+ }
2992
+
2993
+ /**
2994
+ * Whether the host reads fingers from their pointer events: Pointer Events
2995
+ * input, or a window with no `ontouchstart` (touch emulation turned on
2996
+ * after load), as the move path does.
2997
+ */
2998
+ private readsFingersFromPointerEvents(): boolean {
2999
+ const view = this.doc.defaultView;
3000
+ return (
3001
+ this.inputMode === 'pointer-events' ||
3002
+ (view != null && !('ontouchstart' in view))
3003
+ );
3004
+ }
3005
+
1999
3006
  /** The app lost focus: UIKit cancels every touch in flight. */
2000
3007
  private cancelEverything(time: number): void {
2001
3008
  const ids = [...this.pointerIds.values()];
2002
3009
  for (const id of ids) {
2003
- this.releaseSelection(id);
3010
+ this.unlockSelection(id);
2004
3011
  }
2005
3012
  for (const identifier of [...this.touchIds.keys()]) {
3013
+ // The browser may keep the touch alive: its lift must not click.
3014
+ this.cancelledFingers.add(identifier);
2006
3015
  const id = this.forgetFinger(identifier);
2007
3016
  if (id != null) {
2008
3017
  ids.push(id);
2009
3018
  }
2010
3019
  }
2011
3020
  this.pointerIds.clear();
3021
+ this.retargeted.clear();
2012
3022
  this.fingerPointers.clear();
2013
3023
  this.pendingPointers.clear();
2014
3024
  this.unpairedTouches.clear();
2015
3025
  this.lastFed.clear();
3026
+ this.pointerFed.clear();
2016
3027
  if (ids.length > 0) {
2017
3028
  this.arena.cancelled(ids, time);
2018
3029
  }
2019
3030
  }
2020
3031
  }
2021
3032
 
2022
- /** Whether an attachment could take a press now: something on it is enabled. */
2023
- function isServed(registration: Registration): boolean {
2024
- return (
2025
- registration.recognizers.some(r => r.isEnabled) ||
2026
- (registration.consumer != null &&
2027
- registration.consumer.isEnabled?.() !== false)
2028
- );
2029
- }
2030
-
2031
3033
  function needsSuppression(
2032
3034
  dispositions: Map<number, ClickDisposition>,
2033
3035
  ): boolean {
@@ -2051,14 +3053,12 @@ function coalescedHistory(event: PointerEvent): TouchSample[] {
2051
3053
  }));
2052
3054
  }
2053
3055
 
2054
- const hosts = new WeakMap<Document, GestureHost>();
2055
-
2056
3056
  /** The gesture host of a document, created on first use. */
2057
3057
  export function getGestureHost(doc: Document): GestureHost {
2058
- let host = hosts.get(doc);
3058
+ let host = gestureHosts.get(doc);
2059
3059
  if (host == null) {
2060
3060
  host = new GestureHost(doc);
2061
- hosts.set(doc, host);
3061
+ gestureHosts.set(doc, host);
2062
3062
  }
2063
3063
  return host;
2064
3064
  }