@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,39 +96,47 @@
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.js";
124
+ import { isRtlElement } from "../hooks/isRtlElement.js";
125
+ import { presentedElements, presentedOffsetOf, resolvePresented, watchPresentedElements } from "../motion/presentation.js";
126
+ import { UIKIT_PRESS, UIKIT_TAP } from "../motion/uikit/gestures.js";
95
127
  import { browserClock, GestureArena } from "./GestureArena.js";
96
- import { HAPTIC_SWITCH_ATTRIBUTE } from "./haptics.js";
97
- import { isPrimaryClick } from "../utils/primaryClick.js";
98
128
  import { createNativeScrollProbe, parentAcrossShadow } from "./nativeScroll.js";
99
- import { gestureHostStyle, holdSelectionStyle, intersectTouchAction } from "./touchAction.js";
129
+ import { containsAlongFlatTree } from "../utils/flatTree.js";
130
+ import { isIosWebKit } from "../utils/touchQueries.js";
131
+ import { gestureHostStyle, intersectTouchAction } from "./touchAction.js";
100
132
  import { markTouchAction, TOUCH_ACTION_ATTRIBUTE, unmarkTouchAction } from "./touchActionRule.js";
101
-
102
- /**
103
- * A kind of view-level consumer found by attribute instead of attached to
104
- * each element.
105
- */
106
-
133
+ import { internals } from "./recognizerInternals.js";
134
+ import { armClickGuard, disarmClickGuard, withoutClickGuard } from "../utils/clickGuard.js";
135
+ import { subscribeInput } from "../utils/inputStream.js";
136
+ import { isPrimaryClick } from "../utils/primaryClick.js";
137
+ import { locksSelectionFor } from "../utils/selectionLock.js";
138
+ import { isCoarsePointer, watchCoarsePointer } from "../utils/coarsePointer.js";
139
+ import { gestureHosts } from "./hostRegistry.js";
107
140
  const STYLE_PROPERTIES = {
108
141
  touchAction: 'touch-action',
109
142
  WebkitTouchCallout: '-webkit-touch-callout',
@@ -111,15 +144,6 @@ const STYLE_PROPERTIES = {
111
144
  userSelect: 'user-select'
112
145
  };
113
146
 
114
- /**
115
- * Whether a recognizer can take a touch while it moves, and so needs the
116
- * blocking `touchmove` listener that stops the browser's pan. A tap claims
117
- * only at the lift (it fails once the finger travels), so it needs none.
118
- */
119
- function claimsWhileMoving(recognizer) {
120
- return recognizer.acceptsTouchInput && recognizer.kind !== 'tap';
121
- }
122
-
123
147
  /**
124
148
  * A CSS-wide keyword, which names no touch-action of its own: the value in
125
149
  * force resolves it (`initial` and `unset` to `auto`, `inherit` to the
@@ -136,16 +160,36 @@ const CSS_WIDE_KEYWORDS = new Set(['initial', 'inherit', 'unset', 'revert', 'rev
136
160
  */
137
161
  function inNextFrame(view, task) {
138
162
  if (view != null && typeof view.requestAnimationFrame === 'function') {
139
- view.requestAnimationFrame(task);
140
- } else {
141
- setTimeout(task, 0);
163
+ const frame = view.requestAnimationFrame(task);
164
+ return () => view.cancelAnimationFrame(frame);
142
165
  }
166
+ const timeout = setTimeout(task, 0);
167
+ return () => clearTimeout(timeout);
143
168
  }
169
+
170
+ /** An armed press tracker's own element listeners: they never cancel. */
144
171
  const PASSIVE_CAPTURE = {
145
172
  capture: true,
146
173
  passive: true
147
174
  };
148
175
 
176
+ /**
177
+ * Whether a recognizer can take a touch while it moves, and so needs the
178
+ * blocking `touchmove` listener that stops the browser's pan. A tap claims
179
+ * only at the lift (it fails once the finger travels), so it needs none.
180
+ */
181
+ function claimsWhileMoving(recognizer) {
182
+ return recognizer.claimsTouches && internals(recognizer).acceptsTouchInput && internals(recognizer).family !== 'tap';
183
+ }
184
+
185
+ /**
186
+ * A pan (or a pan subclass), told apart by its family rather than its class,
187
+ * so a page that constructs no pan never ships PanGestureRecognizer.
188
+ */
189
+ function isPanRecognizer(recognizer) {
190
+ return internals(recognizer).family === 'pan';
191
+ }
192
+
149
193
  /**
150
194
  * A screen-edge pan, told apart by its kind (architecture:react-component-runtime
151
195
  * INV13), so the host can report its layout changes without importing it.
@@ -153,16 +197,19 @@ const PASSIVE_CAPTURE = {
153
197
  function asScreenEdgePan(recognizer) {
154
198
  return recognizer.kind === 'screenEdgePan' ? recognizer : null;
155
199
  }
200
+ function hasStylusTouch(event) {
201
+ return touchesOf(event.changedTouches).some(touch => touch.touchType === 'stylus');
202
+ }
203
+ /**
204
+ * How long a claimed finger's lift waits for its `touchend`, ms. The touchend
205
+ * follows its pointerup in the same frame; a browser that sends pointer events
206
+ * alone for a finger never sends it, and the record goes.
207
+ */
208
+ const CLAIMED_LIFT_MS = 500;
156
209
 
157
- /** The inline properties a held press sets to none (holdSelectionStyle). */
158
- const HOLD_SELECTION_PROPERTIES = ['-webkit-touch-callout', '-webkit-user-select', 'user-select'];
210
+ /** At most this many claimed lifts wait for their `touchend` at once (FR24). */
211
+ const CLAIMED_LIFT_LIMIT = 8;
159
212
 
160
- /** Elements a held press turned selection off on, and what to restore. */
161
- const heldSelection = new WeakMap();
162
- const ACTIVE_CAPTURE = {
163
- capture: true,
164
- passive: false
165
- };
166
213
  /** A touchstart and a pointerdown describe one finger: same target, same spot. */
167
214
  function isSamePlace(a, b) {
168
215
  return a.target === b.target && Math.abs(a.x - b.x) <= 1 && Math.abs(a.y - b.y) <= 1;
@@ -171,6 +218,20 @@ function isPointerKind(type) {
171
218
  return type === 'touch' || type === 'mouse' || type === 'pen';
172
219
  }
173
220
 
221
+ /**
222
+ * What an event, or one of its touches, landed on. Inside an open shadow root
223
+ * the document's listeners see the shadow host, in `event.target` and in a
224
+ * touch's `target` alike, while the composed path starts at the element
225
+ * itself. A touch whose target is not the event's (another finger) keeps its
226
+ * own.
227
+ */
228
+ function landedOn(event, retargeted = event.target) {
229
+ if (retargeted !== event.target) {
230
+ return retargeted;
231
+ }
232
+ return event.composedPath()[0] ?? retargeted;
233
+ }
234
+
174
235
  /**
175
236
  * An event's time on the arena's clock (`performance.now()`). Some engines
176
237
  * and DOM emulators stamp events in epoch milliseconds instead.
@@ -189,9 +250,30 @@ function touchesOf(list) {
189
250
  }
190
251
  export class GestureHost {
191
252
  registry = new Map();
192
- delegated = new Set();
253
+ /** Stops following the animator's moving elements (iOS WebKit only). */
254
+ stopWatchingMovers = null;
255
+ /** Whether the document carries the blocking touchmove for a mover. */
256
+ stopBlockingForMovers = null;
257
+ /** Elements whose caller touch-action waits for a read after paint. */
258
+ pendingCallerReads = new Set();
259
+ isCallerReadScheduled = false;
260
+ /** Cancels the scheduled next-frame read (readCallerTouchActionInNextFrame). */
261
+ cancelCallerRead = null;
262
+ /** The selection lock each contact holds, by host contact id. */
263
+ lockedBy = new Map();
264
+ /**
265
+ * Contacts sent to what is drawn instead of what the engine hit, by host
266
+ * contact id, with where they landed (for their click).
267
+ */
268
+ retargeted = new Map();
193
269
  /** Touch.identifier → arena id, for live fingers. */
194
270
  touchIds = new Map();
271
+ /**
272
+ * Fingers cancelled because the app lost focus, kept until the browser
273
+ * ends them: a browser that keeps such a touch alive must not let its
274
+ * lift click (`spec:AST-094` FR28: nothing acts).
275
+ */
276
+ cancelledFingers = new Set();
195
277
  /** Touch.identifier → the element the finger landed on. */
196
278
  touchTargets = new Map();
197
279
  /**
@@ -202,13 +284,17 @@ export class GestureHost {
202
284
  watched = new Map();
203
285
  /** Fingers whose target listener is the blocking one. */
204
286
  blockingFingers = new Set();
287
+ /**
288
+ * Fingers a participant could claim (a recognizer that claims touches, or
289
+ * a press consumer): only their target's `touchend` may need cancelling,
290
+ * so a touch only watchers follow gets a passive one (`spec:AST-094`
291
+ * FR20).
292
+ */
293
+ claimingFingers = new Set();
205
294
  /** Touch events already handled (the document's and the target's listeners both see one). */
206
295
  processed = new WeakSet();
207
296
  /** pointerId → arena id, for live mouse and pen contacts. */
208
297
  pointerIds = new Map();
209
- /** Elements whose caller touch-action waits for a read after paint. */
210
- pendingCallerReads = new Set();
211
- isCallerReadScheduled = false;
212
298
  /**
213
299
  * The boxes the host watches for screen-edge pans (syncLayoutWatch): each
214
300
  * element with an enabled one, and the root for one whose band moves with
@@ -222,55 +308,98 @@ export class GestureHost {
222
308
  /**
223
309
  * A finger's pointerId → its arena id, once its pointerdown and its
224
310
  * touchstart are paired. Chromium sends no `touchmove` until a finger has
225
- * travelled its slop (about 16 px), but sends every `pointermove`, so the
226
- * finger's movement comes from both channels; and its `pointercancel` is
227
- * the browser's claim of exactly that finger.
311
+ * travelled its slop (about 16 px), but sends every `pointermove`, so a
312
+ * paired finger is sampled from its pointer events (`pointerFed`); and its
313
+ * `pointercancel` is the browser's claim of exactly that finger.
228
314
  */
229
315
  fingerPointers = new Map();
230
316
  /** Finger pointerdowns still waiting for their touchstart. */
231
317
  pendingPointers = new Map();
232
318
  /**
233
- * Under `inputMode: 'pointer-events'`, where claimed fingers lifted: the
234
- * `touchend` that follows their `pointerup` is cancelled (FR21).
319
+ * Where fingers come from their pointer events, where claimed fingers
320
+ * lifted and when: the `touchend` that follows each `pointerup` is
321
+ * cancelled (FR21). A record no `touchend` consumed expires
322
+ * (CLAIMED_LIFT_MS).
235
323
  */
236
324
  claimedLifts = [];
325
+ /** The one timer that drops claimed lifts whose `touchend` never came. */
326
+ claimedLiftTimer = null;
327
+ /** The arena's clock, which the claimed lifts' timer runs on too. */
328
+
237
329
  /** Fingers still waiting for their pointerdown, by arena id. */
238
330
  unpairedTouches = new Map();
239
- /** The elements each held contact turned selection off on. */
240
- heldSelectionBy = new Map();
241
- isWatchingPointer = false;
242
- onPointerKindChange = () => this.refreshAll();
243
- /** The last position fed per contact, so one channel's echo is dropped. */
331
+
332
+ /** Whether the host follows `(pointer: coarse)` (no read was passed). */
333
+
334
+ /** The last sample fed per contact: a contact's time never runs back. */
244
335
  lastFed = new Map();
336
+ /**
337
+ * Fingers whose samples come from their pointer events. A finger the
338
+ * browser reports on both channels is sampled from ONE: the pointer
339
+ * channel, where its pointerdown paired with its touchstart; touch events
340
+ * sample only a finger no pointer event reported (no Pointer Events). The
341
+ * other channel keeps its control duties (cancelling, claiming, the
342
+ * browser's takeover) but never feeds a sample, so the two copies of one
343
+ * move cannot both reach a velocity, however far apart they arrive.
344
+ */
345
+ pointerFed = new Set();
245
346
  /** When a finger was last down or lifted, and where it landed. */
246
347
  lastTouch = null;
247
348
  /** Scrollers a recognizer is scrolling itself this frame (ownScroll). */
248
- ownedScrolls = new Set();
349
+ ownedScrolls = new Map();
350
+ /** Numbers each ownScroll call: only the newest one's timer clears it. */
351
+ ownScrollCalls = 0;
352
+ /** Cancels each scroller's pending ownScroll frames. */
353
+ ownScrollFrames = new Map();
249
354
  /** The last scroll a finger drove, and when. */
250
355
  lastScroll = null;
356
+ /** Predicates that hold a touch's target away from every participant. */
357
+ touchGates = new Set();
358
+ /** Who keeps the listeners installed without a registration (retain). */
359
+ retainers = 0;
360
+ /** Told after every touch event that changed the fingers on the screen. */
361
+ fingerListeners = new Set();
362
+ /**
363
+ * Where each finger now on the screen landed, from the last touch event's
364
+ * `touches` (every finger, whether or not a recognizer tracks it).
365
+ */
366
+ fingerTargets = [];
251
367
  nextId = 1;
252
368
  isInstalled = false;
253
- usesTouchEvents = true;
254
- swallowDeadline = Number.NEGATIVE_INFINITY;
255
369
  /**
256
- * Where the primary pointer is fine: what listens for a press itself (the
257
- * elements that use a gesture, and the document for delegated consumers),
258
- * with its removal; whether a press one armed is held, the page's
259
- * listeners lasting that long; and the pending removal of the click
260
- * listener a released press kept (FR21, FR24).
370
+ * Whether the primary pointer is coarse (`spec:AST-094` FR19), read when
371
+ * something first attaches and kept current while anything is attached.
372
+ */
373
+ isCoarse = false;
374
+ stopWatchingPointer = null;
375
+ /** The input stream subscriptions while installed. */
376
+ unsubscribers = [];
377
+ /**
378
+ * Where the primary pointer is fine, each element that uses a gesture
379
+ * listens for a press itself; the page's listeners last that press (FR24).
261
380
  */
262
- armed = new Map();
381
+ armedElements = new Map();
263
382
  isArmedPress = false;
264
- clickRemoval = null;
383
+ /**
384
+ * Whether the installed listeners include the cancelable ones (the
385
+ * document's touchend, contextmenu and the window's click): only while a
386
+ * participant that can claim is attached (`spec:AST-094` FR20).
387
+ */
388
+ isClaimingInstalled = false;
389
+ /** The input stream subscriptions syncClaimingListeners keeps. */
390
+ claimingUnsubscribers = [];
391
+ usesTouchEvents = true;
265
392
  constructor(doc, options = {}) {
266
393
  this.doc = doc;
267
394
  this.inputMode = options.inputMode ?? 'auto';
395
+ this.presentedHitTesting = options.presentedHitTesting ?? 'auto';
268
396
  const environment = {
269
397
  viewportSize: () => ({
270
398
  width: doc.defaultView?.innerWidth ?? 0,
271
399
  height: doc.defaultView?.innerHeight ?? 0
272
400
  }),
273
- isRtl: view => view instanceof Element && doc.defaultView?.getComputedStyle(view).direction === 'rtl',
401
+ // The writing direction through core's one helper.
402
+ isRtl: view => view instanceof Element && isRtlElement(view),
274
403
  // A screen-edge pan tells a view within its edge band from any other
275
404
  // by its box (spec:AST-094 FR18).
276
405
  viewRect: view => {
@@ -291,24 +420,21 @@ export class GestureHost {
291
420
  };
292
421
  }
293
422
  };
423
+ this.clock = options.clock ?? browserClock;
294
424
  this.arena = new GestureArena({
295
- clock: options.clock ?? browserClock,
425
+ clock: this.clock,
296
426
  environment,
297
427
  onDeferredClick: (touch, allowed) => this.replayClick(touch, allowed),
428
+ // A press whose decision waited on a timer (a tap waiting on a double
429
+ // tap) ends here: an armed press stops listening (FR24).
430
+ onIdle: () => this.releaseArmedPress(),
298
431
  onTransition: options.onTransition
299
432
  });
300
433
  const view = doc.defaultView;
301
- const coarseQuery = options.isPrimaryPointerCoarse == null && typeof view?.matchMedia === 'function' ? view.matchMedia('(pointer: coarse)') : null;
302
- this.isPrimaryPointerCoarse = options.isPrimaryPointerCoarse ?? (() => coarseQuery?.matches ?? false);
303
- this.coarseQuery = coarseQuery;
304
- }
305
-
306
- /** Re-derive every element's styles and the host's listeners. */
307
- refreshAll() {
308
- for (const [element, registration] of this.registry) {
309
- this.refresh(element, registration);
310
- }
311
- this.syncListeners();
434
+ // A test may pass its own read; otherwise the one coarse-pointer gate,
435
+ // followed as it changes.
436
+ this.followsPointer = options.isPrimaryPointerCoarse == null;
437
+ this.isPrimaryPointerCoarse = options.isPrimaryPointerCoarse ?? (() => isCoarsePointer(view));
312
438
  }
313
439
 
314
440
  // --- Attachment ------------------------------------------------------------
@@ -317,7 +443,12 @@ export class GestureHost {
317
443
  attach(element, recognizer, options = {}) {
318
444
  const registration = this.registrationFor(element);
319
445
  registration.manageStyle = options.manageStyle ?? registration.manageStyle;
320
- registration.actionGroup = options.actionGroup ?? registration.actionGroup;
446
+ // An action group while any attachment asks, whatever their order.
447
+ const asksForGroup = options.actionGroup === true;
448
+ if (asksForGroup) {
449
+ registration.actionGroupAsks += 1;
450
+ registration.actionGroup = true;
451
+ }
321
452
  recognizer.view = element;
322
453
  registration.recognizers.push(recognizer);
323
454
  recognizer.onEnabledChange = () => {
@@ -338,6 +469,10 @@ export class GestureHost {
338
469
  this.syncListeners();
339
470
  return () => {
340
471
  recognizer.onEnabledChange = null;
472
+ if (asksForGroup) {
473
+ registration.actionGroupAsks -= 1;
474
+ registration.actionGroup = registration.actionGroupAsks > 0;
475
+ }
341
476
  if (edgePan != null) {
342
477
  edgePan.onTouchBehaviorChange = null;
343
478
  }
@@ -422,14 +557,18 @@ export class GestureHost {
422
557
  };
423
558
 
424
559
  /** Attach the view-level touch consumer of an element (a pressable control). */
425
- attachConsumer(element, consumer) {
560
+ attachConsumer(element, consumer, _options = {}) {
426
561
  const registration = this.registrationFor(element);
427
562
  registration.consumer = consumer;
563
+ this.refresh(element, registration);
428
564
  this.syncListeners();
429
565
  return () => {
430
566
  if (registration.consumer === consumer) {
431
567
  registration.consumer = null;
432
568
  }
569
+ // A keepsTouch consumer's blocking touchmove goes with it, even while
570
+ // the element keeps its recognizers.
571
+ this.refresh(element, registration);
433
572
  // Even when the element keeps a recognizer: one left disabled keeps
434
573
  // no listener or observer (FR24).
435
574
  this.syncListeners();
@@ -438,23 +577,190 @@ export class GestureHost {
438
577
  }
439
578
 
440
579
  /**
441
- * Find consumers of a kind by attribute, one instance per contact. Returns
442
- * the function that stops it.
580
+ * @internal The document this host serves.
443
581
  */
444
- addDelegatedConsumer(type) {
445
- this.delegated.add(type);
446
- this.syncListeners();
447
- return () => {
448
- this.delegated.delete(type);
449
- this.syncListeners();
582
+ get document() {
583
+ return this.doc;
584
+ }
585
+
586
+ /**
587
+ * @internal Whether a recognizer owns the touch with this Touch Events
588
+ * `identifier`, so the browser must not pan it (pageHold.ts asks).
589
+ */
590
+ isTouchClaimed(identifier) {
591
+ const id = this.touchIds.get(identifier);
592
+ return id != null && this.arena.isClaimed(id);
593
+ }
594
+
595
+ /**
596
+ * An element's box where it is drawn: the box the engine reports, moved
597
+ * by the compositor animations of it and its ancestors on engines that
598
+ * report and hit-test those where they started (iOS WebKit). Elsewhere
599
+ * `getBoundingClientRect` already reports the drawn box. Press trackers
600
+ * read their bounds through it.
601
+ */
602
+ presentedRect(element) {
603
+ const box = element.getBoundingClientRect();
604
+ if (!this.hitTestsLayout()) {
605
+ return box;
606
+ }
607
+ const {
608
+ x,
609
+ y
610
+ } = presentedOffsetOf(element);
611
+ if (x === 0 && y === 0) {
612
+ return box;
613
+ }
614
+ return {
615
+ left: box.left + x,
616
+ top: box.top + y,
617
+ right: box.right + x,
618
+ bottom: box.bottom + y
450
619
  };
451
620
  }
452
621
 
622
+ /** Whether this engine hit-tests a compositor-moved element at layout. */
623
+ hitTestsLayout() {
624
+ return this.presentedHitTesting === 'always' || this.presentedHitTesting === 'auto' && isIosWebKit(this.doc.defaultView);
625
+ }
626
+
627
+ /**
628
+ * Where a contact lands among what is drawn. iOS WebKit hit-tests an
629
+ * element that a compositor animation moves where the animation started:
630
+ * a finger on a settling sheet lands on whatever sat under the sheet's
631
+ * start (the scrim, which closes it), and a finger where the sheet was
632
+ * lands on the sheet. UIKit keeps an interruptible animation hit-testable
633
+ * where it is drawn (UIViewPropertyAnimator). The touch goes to what was
634
+ * drawn under the finger when it landed (`time`, its event's timestamp),
635
+ * even when a busy main thread hands it over later, and content that slid
636
+ * under the finger since takes nothing (`spec:AST-094` FR11).
637
+ */
638
+ presentedTarget(native, x, y, time) {
639
+ if (!this.hitTestsLayout()) {
640
+ return native;
641
+ }
642
+ const movers = presentedElements().filter(element => {
643
+ if (!element.isConnected || element.ownerDocument !== this.doc) {
644
+ return false;
645
+ }
646
+ const {
647
+ x: dx,
648
+ y: dy
649
+ } = presentedOffsetOf(element);
650
+ return Math.abs(dx) >= 0.5 || Math.abs(dy) >= 0.5;
651
+ });
652
+ if (movers.length === 0) {
653
+ return native;
654
+ }
655
+ // One style write per mover makes the engine hit-test it where it is
656
+ // drawn now; the hit test below flushes them. The engine then gets
657
+ // z-order, pointer-events and clipping right, which no box math would.
658
+ resolvePresented(movers);
659
+ let hit = this.drawnAt(x, y);
660
+ // A mover kept going while the touch waited for the main thread: what
661
+ // was under the finger when it landed is now that far along. A timestamp
662
+ // on another clock, or older than a second, is not corrected.
663
+ const age = (this.doc.defaultView?.performance.now() ?? time) - time;
664
+ if (age > 0 && age < 1000) {
665
+ const movedSince = mover => {
666
+ const then = presentedOffsetOf(mover, time);
667
+ return Math.abs(then.x) >= 0.5 || Math.abs(then.y) >= 0.5 ? then : null;
668
+ };
669
+ const now = hit;
670
+ const under = now == null ? undefined : movers.find(mover => containsAlongFlatTree(mover, now));
671
+ let landedOnMover = false;
672
+ for (const mover of movers) {
673
+ const then = movedSince(mover);
674
+ if (then == null) {
675
+ continue;
676
+ }
677
+ const landed = this.drawnAt(x - then.x, y - then.y);
678
+ if (landed != null && containsAlongFlatTree(mover, landed)) {
679
+ hit = landed;
680
+ landedOnMover = true;
681
+ break;
682
+ }
683
+ }
684
+ // Content that slid under the finger after it landed takes nothing:
685
+ // the touch goes to what was there, beneath it.
686
+ if (!landedOnMover && under != null && movedSince(under) != null) {
687
+ hit = this.drawnBeneath(x, y, movers);
688
+ }
689
+ }
690
+ if (hit == null || hit === native) {
691
+ return native;
692
+ }
693
+ const found = hit;
694
+ const node = native instanceof Node ? native : null;
695
+ const isAboutMover = movers.some(mover => containsAlongFlatTree(mover, found) || node != null && containsAlongFlatTree(mover, node));
696
+ return isAboutMover ? found : native;
697
+ }
698
+
699
+ /** What is drawn at a point beneath every mover. */
700
+ drawnBeneath(x, y, movers) {
701
+ if (typeof this.doc.elementsFromPoint !== 'function') {
702
+ return null;
703
+ }
704
+ return this.doc.elementsFromPoint(x, y).find(element => !movers.some(mover => containsAlongFlatTree(mover, element))) ?? null;
705
+ }
706
+
707
+ /** What is drawn at a point, inside open shadow roots too. */
708
+ drawnAt(x, y) {
709
+ let hit = this.doc.elementFromPoint(x, y);
710
+ // The document answers a shadow host for anything inside its open root:
711
+ // descend to what is drawn there.
712
+ while (hit?.shadowRoot != null) {
713
+ const inner = hit.shadowRoot.elementFromPoint(x, y);
714
+ if (inner == null || inner === hit) {
715
+ break;
716
+ }
717
+ hit = inner;
718
+ }
719
+ return hit;
720
+ }
721
+
722
+ /** The browser took these touches (a scroll): no click of ours for them. */
723
+ browserTook(ids, time) {
724
+ for (const id of ids) {
725
+ this.retargeted.delete(id);
726
+ }
727
+ this.arena.browserTookOver(ids, time);
728
+ }
729
+
730
+ /**
731
+ * The click a retargeted tap earned, on what was drawn under the finger.
732
+ * The engine's own click would hit the start position, so the caller
733
+ * cancels it (or the click guard drops it, a late one included) and this one
734
+ * is the tap's single activation.
735
+ */
736
+ clickRetargeted(target, x, y) {
737
+ const view = this.doc.defaultView;
738
+ if (!(target instanceof Element) || !target.isConnected || view == null) {
739
+ return;
740
+ }
741
+ armClickGuard(this.doc);
742
+ if (target instanceof view.HTMLElement && target.matches('input, textarea, select, [contenteditable]')) {
743
+ target.focus();
744
+ }
745
+ withoutClickGuard(() => target.dispatchEvent(new view.MouseEvent('click', {
746
+ bubbles: true,
747
+ cancelable: true,
748
+ composed: true,
749
+ detail: 1,
750
+ clientX: x,
751
+ clientY: y
752
+ })));
753
+ }
754
+
453
755
  /**
454
756
  * Re-derive an element's styles and the host's listeners after its
455
757
  * recognizers' options or its consumer's enabled state changed.
456
758
  */
457
759
  update(element) {
760
+ if (!this.followsPointer) {
761
+ // A read passed in (a test's) is not followed: an update reads it again.
762
+ this.isCoarse = this.isPrimaryPointerCoarse();
763
+ }
458
764
  const registration = this.registry.get(element);
459
765
  if (registration != null) {
460
766
  this.refresh(element, registration);
@@ -489,66 +795,137 @@ export class GestureHost {
489
795
  * `window` ms. A touch there now brakes the scroll rather than pressing
490
796
  * whatever is under it: a native list highlights nothing for one.
491
797
  */
492
- isScrollBraking(node, window = UIKIT_GESTURES.press.scrollBrake.value) {
798
+ isScrollBraking(node, window = UIKIT_PRESS.scrollBrake.value) {
493
799
  const last = this.lastScroll;
494
- return last != null && this.arena.now() - last.time < window && last.scroller.contains(node);
800
+ return last != null && this.arena.now() - last.time < window && containsAlongFlatTree(last.scroller, node);
801
+ }
802
+
803
+ /**
804
+ * @internal Keep the host's listeners installed until the returned
805
+ * function runs, with no recognizer attached (fingerScroll.ts reads the
806
+ * finger record meanwhile).
807
+ */
808
+ retain() {
809
+ this.retainers += 1;
810
+ // A watch is not an attach: no warning where the pointer is fine.
811
+ this.watchPointer();
812
+ this.syncListeners();
813
+ let isRetained = true;
814
+ return () => {
815
+ if (!isRetained) {
816
+ return;
817
+ }
818
+ isRetained = false;
819
+ this.retainers -= 1;
820
+ this.uninstallIfIdle();
821
+ };
822
+ }
823
+
824
+ /**
825
+ * @internal Call `listener` after each touch event the host hears, once
826
+ * the finger record is up to date. Returns the unsubscribe.
827
+ */
828
+ onFingersChange(listener) {
829
+ this.fingerListeners.add(listener);
830
+ return () => {
831
+ this.fingerListeners.delete(listener);
832
+ };
833
+ }
834
+
835
+ /** @internal Whether a finger that landed inside `node` is down now. */
836
+ isFingerDownIn(node) {
837
+ // Along the flat tree: a finger on content inside an open shadow root is
838
+ // in the scroller around that root.
839
+ return this.fingerTargets.some(target => containsAlongFlatTree(node, target));
495
840
  }
496
841
  registrationFor(element) {
842
+ this.watchPointer();
497
843
  let registration = this.registry.get(element);
498
844
  if (registration == null) {
499
845
  registration = {
500
846
  recognizers: [],
501
847
  consumer: null,
502
- touchMoveListener: null,
503
- touchEndListener: null,
848
+ hasTouchEndListener: false,
849
+ hasTouchMoveListener: false,
504
850
  savedStyle: new Map(),
505
851
  authorTouchAction: null,
506
852
  manageStyle: true,
507
- actionGroup: false
853
+ actionGroup: false,
854
+ actionGroupAsks: 0
508
855
  };
509
856
  this.registry.set(element, registration);
510
857
  }
511
858
  return registration;
512
859
  }
860
+
861
+ /** Whether anything attached could take input. */
862
+ needsInput() {
863
+ return this.registry.size > 0 || this.retainers > 0;
864
+ }
513
865
  refresh(element, registration) {
514
866
  if (registration.manageStyle && element instanceof HTMLElement) {
515
867
  this.applyStyle(element, registration);
516
868
  }
517
- // For every pointer (FR43): a finger's claim cancels its moves here
518
- // (FR19), a listener FR24 counts apart from the one an element keeps for
519
- // its press.
520
- const needsListener = registration.recognizers.some(r => r.isEnabled && claimsWhileMoving(r));
521
- if (needsListener && registration.touchMoveListener == null) {
522
- const listener = event => this.cancelIfClaimed(event);
523
- registration.touchMoveListener = listener;
524
- element.addEventListener('touchmove', listener, {
869
+ this.syncTouchMoveListener(element, registration);
870
+ }
871
+
872
+ /**
873
+ * The element's blocking `touchmove`. For every pointer a claiming
874
+ * recognizer keeps it: a finger's claim cancels its moves here (FR19), a
875
+ * listener FR24 counts outside the one-listener budget a fine pointer's
876
+ * element keeps for its press (syncArmed). A kept press needs it only
877
+ * while a press is held: a phone's before every touch (Safari honours a
878
+ * blocking listener only when registered before the touch began), a fine
879
+ * pointer's only during an armed press, whose `pointerdown` comes before
880
+ * the touch it brings (FR24).
881
+ */
882
+ syncTouchMoveListener(element, registration) {
883
+ // Where fingers come from their pointer events (Pointer Events input, or
884
+ // a window with no ontouchstart), a claimed finger's touchend is not the
885
+ // host's own document listener's to cancel, so the element cancels it
886
+ // (FR21). Under a coarse pointer always: touch emulation turned on after
887
+ // load hides ontouchstart yet sends touches. Under a fine one wherever
888
+ // the browser sends Touch Events, as a touchscreen laptop does (FR43);
889
+ // elsewhere no touchend ever comes, and the element keeps no listener
890
+ // (FR24).
891
+ const needsEndListener = this.readsFingersFromPointerEvents() && (this.isCoarse || this.sendsTouchEvents()) && registration.recognizers.some(recognizer => recognizer.isEnabled && internals(recognizer).acceptsTouchInput);
892
+ if (needsEndListener && !registration.hasTouchEndListener) {
893
+ element.addEventListener('touchend', this.onClaimedTouchEnd, {
525
894
  passive: false
526
895
  });
527
- } else if (!needsListener && registration.touchMoveListener != null) {
528
- element.removeEventListener('touchmove', registration.touchMoveListener);
529
- registration.touchMoveListener = null;
530
- }
531
- // Pointer Events only: a claimed finger's touchend is not the host's
532
- // own document listener's to cancel, so the element cancels it.
533
- const needsEndListener = this.inputMode === 'pointer-events' && registration.recognizers.some(r => r.isEnabled && r.acceptsTouchInput);
534
- if (needsEndListener && registration.touchEndListener == null) {
535
- const listener = event => this.cancelClaimedLift(event);
536
- registration.touchEndListener = listener;
537
- element.addEventListener('touchend', listener, {
896
+ registration.hasTouchEndListener = true;
897
+ } else if (!needsEndListener && registration.hasTouchEndListener) {
898
+ element.removeEventListener('touchend', this.onClaimedTouchEnd);
899
+ registration.hasTouchEndListener = false;
900
+ }
901
+ const needsListener = registration.recognizers.some(recognizer => recognizer.isEnabled && claimsWhileMoving(recognizer)) || registration.consumer?.keepsTouch != null && registration.consumer.isEnabled?.() !== false && (this.isCoarse || this.isArmedPress);
902
+ // The blocking listener sits on the element itself (FR19: a scroll that
903
+ // starts elsewhere never waits on it), but every element shares the
904
+ // host's one handler, which routes through the arena.
905
+ if (needsListener && !registration.hasTouchMoveListener) {
906
+ element.addEventListener('touchmove', this.onBlockingTouchMove, {
538
907
  passive: false
539
908
  });
540
- } else if (!needsEndListener && registration.touchEndListener != null) {
541
- element.removeEventListener('touchend', registration.touchEndListener);
542
- registration.touchEndListener = null;
909
+ registration.hasTouchMoveListener = true;
910
+ } else if (!needsListener && registration.hasTouchMoveListener) {
911
+ element.removeEventListener('touchmove', this.onBlockingTouchMove);
912
+ registration.hasTouchMoveListener = false;
543
913
  }
544
914
  }
545
915
  applyStyle(element, registration) {
546
- // Where no attached recognizer is enabled the host manages no style: the
547
- // element keeps its own touch-action, and any value set before is
548
- // restored (FR24). Every pointer gets it: a touchscreen laptop's finger
549
- // as a phone's (spec:AST-094 FR43).
550
- const enabled = registration.recognizers.filter(r => r.isEnabled);
551
- const style = enabled.length > 0 ? gestureHostStyle(enabled) : {};
916
+ // A disabled recognizer leaves the browser everything (FR24).
917
+ // Every pointer gets it: a touchscreen laptop's finger as a phone's (FR43).
918
+ const active = registration.recognizers.filter(recognizer => recognizer.isEnabled);
919
+ let style = active.length > 0 ? gestureHostStyle(active) : {};
920
+ // A control that keeps its touch (a stepper's hold-repeat) takes taps in
921
+ // quick succession: the browser's double-tap zoom goes, as for a tap
922
+ // recognizer (`spec:AST-094` FR18), for every pointer (FR43).
923
+ if (style.touchAction == null && registration.consumer?.keepsTouch != null) {
924
+ style = {
925
+ ...style,
926
+ touchAction: 'manipulation'
927
+ };
928
+ }
552
929
  for (const key of Object.keys(STYLE_PROPERTIES)) {
553
930
  const property = STYLE_PROPERTIES[key];
554
931
  let value = style[key];
@@ -632,8 +1009,9 @@ export class GestureHost {
632
1009
  return;
633
1010
  }
634
1011
  this.isCallerReadScheduled = true;
635
- inNextFrame(this.doc.defaultView, () => {
1012
+ this.cancelCallerRead = inNextFrame(this.doc.defaultView, () => {
636
1013
  this.isCallerReadScheduled = false;
1014
+ this.cancelCallerRead = null;
637
1015
  const pending = [];
638
1016
  for (const candidate of this.pendingCallerReads) {
639
1017
  const registration = this.registry.get(candidate);
@@ -661,56 +1039,84 @@ export class GestureHost {
661
1039
  }
662
1040
  cleanup(element, registration) {
663
1041
  if (registration.recognizers.length > 0 || registration.consumer != null) {
1042
+ // What stays may take nothing (only disabled recognizers): FR24.
1043
+ this.syncListeners();
664
1044
  return;
665
1045
  }
666
- if (registration.touchMoveListener != null) {
667
- element.removeEventListener('touchmove', registration.touchMoveListener);
1046
+ if (registration.hasTouchEndListener) {
1047
+ element.removeEventListener('touchend', this.onClaimedTouchEnd);
1048
+ registration.hasTouchEndListener = false;
668
1049
  }
669
- if (registration.touchEndListener != null) {
670
- element.removeEventListener('touchend', registration.touchEndListener);
671
- registration.touchEndListener = null;
1050
+ if (registration.hasTouchMoveListener) {
1051
+ element.removeEventListener('touchmove', this.onBlockingTouchMove);
672
1052
  }
673
1053
  this.registry.delete(element);
674
- this.syncListeners();
1054
+ this.uninstallIfIdle();
675
1055
  }
676
1056
 
677
1057
  /**
678
1058
  * Listen only while something could take a touch now (`spec:AST-094`
679
- * FR24, FR43): where the primary pointer is coarse, while an enabled
680
- * recognizer or consumer, or a delegated consumer, is attached; where it is
681
- * fine, only during a press something armed (syncArmed). Otherwise no page
682
- * listener is registered, so an idle page and a disabled control pay
683
- * nothing.
1059
+ * FR24, FR43): where the primary pointer is coarse, an enabled recognizer
1060
+ * or consumer, or a finger-scroll watch; where it is fine, only during a
1061
+ * press an element armed (syncArmed). Otherwise no document listener is
1062
+ * registered, so an idle page and a disabled control pay nothing.
684
1063
  */
685
1064
  syncListeners() {
686
1065
  this.syncLayoutWatch();
687
- // The primary pointer can change (a tablet's keyboard attached or
688
- // removed): while anything is attached, styles and listeners follow it.
689
- // Nothing touch-related stays once the last attachment goes (FR24).
690
- const hasAttachments = this.registry.size > 0 || this.delegated.size > 0;
691
- if (hasAttachments && !this.isWatchingPointer) {
692
- this.coarseQuery?.addEventListener?.('change', this.onPointerKindChange);
693
- this.isWatchingPointer = true;
694
- } else if (!hasAttachments && this.isWatchingPointer) {
695
- this.coarseQuery?.removeEventListener?.('change', this.onPointerKindChange);
696
- this.isWatchingPointer = false;
697
- }
698
1066
  this.syncArmed();
699
1067
  if (this.shouldListen()) {
700
1068
  this.install();
701
- } else if (this.isInstalled) {
1069
+ this.syncClaimingListeners();
1070
+ } else {
702
1071
  this.uninstall();
703
1072
  }
1073
+ this.syncMoverBlocking();
704
1074
  }
705
- shouldListen() {
706
- if (!this.isPrimaryPointerCoarse()) {
707
- return this.isArmedPress;
1075
+
1076
+ /**
1077
+ * Safari honours a blocking `touchmove` only where it was registered before
1078
+ * the touch began, on the engine's own target, and on iOS WebKit a finger
1079
+ * on an element a compositor animation moves lands, for the engine, on
1080
+ * whatever sits under the motion's start (see presentedTarget). So while an
1081
+ * element a recognizer that claims moving touches lives in (or around) is
1082
+ * moving, the blocking listener subscribes to the window's capturing
1083
+ * `touchmove` through the shared input stream with `{cancels: true}`,
1084
+ * which sees every touch on the page whatever the engine targets and makes
1085
+ * that one listener non-passive (`spec:AST-094` FR19;
1086
+ * architecture:react-component-runtime INV13). It leaves when the motion
1087
+ * ends: only while it is subscribed does a scroll starting anywhere wait on
1088
+ * the main thread.
1089
+ */
1090
+ syncMoverBlocking() {
1091
+ const isWatching = this.isInstalled && this.hitTestsLayout();
1092
+ if (isWatching && this.stopWatchingMovers == null) {
1093
+ this.stopWatchingMovers = watchPresentedElements(() => this.syncMoverBlocking());
1094
+ } else if (!isWatching && this.stopWatchingMovers != null) {
1095
+ this.stopWatchingMovers();
1096
+ this.stopWatchingMovers = null;
1097
+ }
1098
+ const needed = isWatching && presentedElements().some(mover => this.hasClaimingRecognizerAround(mover));
1099
+ if (needed === (this.stopBlockingForMovers != null)) {
1100
+ return;
708
1101
  }
709
- if (this.delegated.size > 0) {
710
- return true;
1102
+ const view = this.doc.defaultView;
1103
+ if (needed && view != null) {
1104
+ this.stopBlockingForMovers = subscribeInput(view, 'touchmove', this.onBlockingTouchMove, {
1105
+ cancels: true
1106
+ });
1107
+ } else if (!needed) {
1108
+ this.stopBlockingForMovers?.();
1109
+ this.stopBlockingForMovers = null;
711
1110
  }
712
- for (const registration of this.registry.values()) {
713
- if (isServed(registration)) {
1111
+ }
1112
+
1113
+ /** Whether a recognizer that claims moving touches lives in or around `mover`. */
1114
+ hasClaimingRecognizerAround(mover) {
1115
+ if (!mover.isConnected || mover.ownerDocument !== this.doc) {
1116
+ return false;
1117
+ }
1118
+ for (const [element, registration] of this.registry) {
1119
+ if ((containsAlongFlatTree(mover, element) || containsAlongFlatTree(element, mover)) && registration.recognizers.some(recognizer => recognizer.isEnabled && claimsWhileMoving(recognizer))) {
714
1120
  return true;
715
1121
  }
716
1122
  }
@@ -720,155 +1126,280 @@ export class GestureHost {
720
1126
  /**
721
1127
  * Where the primary pointer is fine, each element with an enabled
722
1128
  * recognizer or press consumer listens for a press itself: one passive
723
- * `pointerdown` listener, in the capture phase, so the outermost one hears
724
- * a press first and serves every recognizer on its path. Delegated
725
- * consumer types, which have no element, arm the document once. A press
726
- * installs the host's page listeners for as long as its contacts last
727
- * (`spec:AST-094` FR24, FR43). Where the primary pointer is coarse the
728
- * page's listeners serve every press, and nothing is armed.
1129
+ * `pointerdown` listener on the element. The host's page listeners come at
1130
+ * that press and go once its contacts end and the arena drops their last
1131
+ * record (onIdle: a decision that waited on a timer), so an idle page has none
1132
+ * (`spec:AST-094` FR24, FR43). A finger on a touchscreen whose primary
1133
+ * pointer is fine sends its `pointerdown` before its `touchstart`, so the
1134
+ * host hears both.
729
1135
  */
730
1136
  syncArmed() {
731
1137
  const wanted = new Set();
732
- if (!this.isPrimaryPointerCoarse()) {
1138
+ if (!this.isCoarse) {
733
1139
  for (const [element, registration] of this.registry) {
734
- if (isServed(registration)) {
1140
+ const consumer = registration.consumer;
1141
+ if (registration.recognizers.some(recognizer => recognizer.isEnabled) || consumer != null && consumer.isEnabled?.() !== false) {
735
1142
  wanted.add(element);
736
1143
  }
737
1144
  }
738
- if (this.delegated.size > 0) {
739
- wanted.add(this.doc);
740
- }
741
1145
  }
742
- for (const [target, disarm] of [...this.armed]) {
743
- if (!wanted.has(target)) {
744
- disarm();
745
- this.armed.delete(target);
1146
+ for (const [element, release] of this.armedElements) {
1147
+ if (!wanted.has(element)) {
1148
+ release();
1149
+ this.armedElements.delete(element);
746
1150
  }
747
1151
  }
748
- for (const target of wanted) {
749
- if (this.armed.has(target)) {
1152
+ for (const element of wanted) {
1153
+ if (this.armedElements.has(element)) {
750
1154
  continue;
751
1155
  }
752
- target.addEventListener('pointerdown', this.onArmedPress, PASSIVE_CAPTURE);
753
- this.armed.set(target, () => {
754
- target.removeEventListener('pointerdown', this.onArmedPress, PASSIVE_CAPTURE);
1156
+ element.addEventListener('pointerdown', this.onArmedPress, PASSIVE_CAPTURE);
1157
+ this.armedElements.set(element, () => {
1158
+ element.removeEventListener('pointerdown', this.onArmedPress, PASSIVE_CAPTURE);
755
1159
  });
756
1160
  }
1161
+ if (wanted.size === 0 && this.isArmedPress) {
1162
+ this.isArmedPress = false;
1163
+ this.syncKeptPresses();
1164
+ }
757
1165
  }
758
1166
 
759
- /**
760
- * A press on something armed, where the primary pointer is fine: a
761
- * mouse's primary button, a pen, or a finger. The page's listeners come
762
- * for this press, and the press goes on to them, its capture phase on the
763
- * page being over.
764
- */
1167
+ /** A press on an armed element, a mouse's primary button, a pen or a finger: listen for this press. */
765
1168
  onArmedPress = event => {
766
1169
  const press = event;
767
1170
  if (this.isInstalled || !isPointerKind(press.pointerType) || press.pointerType !== 'touch' && !isPrimaryClick(press)) {
768
1171
  return;
769
1172
  }
770
1173
  this.isArmedPress = true;
1174
+ this.syncKeptPresses();
771
1175
  this.install();
1176
+ // A finger's or a pen's press brings the cancelable touchend and the
1177
+ // contextmenu canceller, as wherever the host installs, so a claimed
1178
+ // lift clicks nothing and a claimed hold opens no browser menu (FR21). A
1179
+ // mouse's press needs neither.
1180
+ if (press.pointerType !== 'mouse') {
1181
+ this.syncClaimingListeners();
1182
+ }
1183
+ // The window's capture phase is over for this event: hand it on.
772
1184
  this.onPointerDown(press);
773
- // A mouse's or a pen's press that nothing took has nothing to wait for;
774
- // a finger's contact begins at its touchstart, which comes next.
775
- if (press.pointerType !== 'touch') {
776
- this.releaseArmedPress();
777
- }
778
1185
  };
779
1186
 
780
- /**
781
- * After a contact ends: once no contact of the press that armed the page's
782
- * listeners is down, they go (FR24). A recognizer still deciding after the
783
- * lift needs no input; the click it may owe keeps its listener
784
- * (releaseClickListener).
785
- */
1187
+ /** A kept press's blocking `touchmove` follows the armed press (syncTouchMoveListener). */
1188
+ syncKeptPresses() {
1189
+ for (const [element, registration] of this.registry) {
1190
+ if (registration.consumer?.keepsTouch != null) {
1191
+ this.syncTouchMoveListener(element, registration);
1192
+ }
1193
+ }
1194
+ }
1195
+
1196
+ /** After a contact ends: an armed press that is over stops listening. */
786
1197
  releaseArmedPress() {
787
- if (this.isArmedPress && !this.arena.touches.some(touch => touch.phase !== 'ended' && touch.phase !== 'cancelled')) {
788
- this.isArmedPress = false;
789
- this.syncListeners();
1198
+ if (!this.isArmedPress) {
1199
+ return;
1200
+ }
1201
+ queueMicrotask(() => {
1202
+ if (this.isArmedPress && this.arena.touches.length === 0) {
1203
+ this.isArmedPress = false;
1204
+ this.syncKeptPresses();
1205
+ this.syncListeners();
1206
+ }
1207
+ });
1208
+ }
1209
+
1210
+ /** With nothing attached, stop listening and stop following the pointer. */
1211
+ uninstallIfIdle() {
1212
+ this.syncListeners();
1213
+ if (this.registry.size === 0 && this.retainers === 0) {
1214
+ this.uninstall();
1215
+ this.stopWatchingPointer?.();
1216
+ this.stopWatchingPointer = null;
1217
+ this.releaseWhenIdle();
790
1218
  }
791
1219
  }
792
1220
 
793
1221
  /**
794
- * The click listener outlives the page's others while the swallower is
795
- * armed: a claimed lift's click comes after its pointerup or touchend
796
- * (`spec:AST-094` FR21; FR24 counts it as press work). It goes when that
797
- * window closes, unless the host listens again by then.
1222
+ * In the microtask after the last detach, unless something attached again
1223
+ * in the same task (a component that remounts mid-press keeps its notes):
1224
+ * nothing the host holds outlives it, no note and no pending frame or
1225
+ * timer (`spec:AST-094` FR24).
798
1226
  */
799
- releaseClickListener() {
1227
+ releaseWhenIdle() {
1228
+ queueMicrotask(() => {
1229
+ if (this.registry.size > 0 || this.retainers > 0) {
1230
+ return;
1231
+ }
1232
+ this.cancelledFingers.clear();
1233
+ this.clearClaimedLifts();
1234
+ this.cancelCallerRead?.();
1235
+ this.cancelCallerRead = null;
1236
+ this.isCallerReadScheduled = false;
1237
+ this.pendingCallerReads.clear();
1238
+ for (const cancel of this.ownScrollFrames.values()) {
1239
+ cancel();
1240
+ }
1241
+ this.ownScrollFrames.clear();
1242
+ this.ownedScrolls.clear();
1243
+ });
1244
+ }
1245
+
1246
+ /** Read the primary pointer, and follow it while anything is attached. */
1247
+ watchPointer() {
1248
+ if (this.stopWatchingPointer != null) {
1249
+ return;
1250
+ }
800
1251
  const view = this.doc.defaultView;
801
- if (this.clickRemoval != null) {
802
- clearTimeout(this.clickRemoval);
803
- this.clickRemoval = null;
1252
+ this.isCoarse = this.isPrimaryPointerCoarse();
1253
+ this.stopWatchingPointer = this.followsPointer ? watchCoarsePointer(view, isCoarse => this.pointerChanged(isCoarse)) : () => {};
1254
+ }
1255
+
1256
+ /**
1257
+ * The primary pointer turned coarse or fine (a tablet docking a mouse):
1258
+ * install or remove everything, as if each attach happened now.
1259
+ */
1260
+ pointerChanged(isCoarse) {
1261
+ if (isCoarse === this.isCoarse) {
1262
+ return;
1263
+ }
1264
+ this.isCoarse = isCoarse;
1265
+ if (!isCoarse) {
1266
+ this.cancelEverything(this.arena.now());
1267
+ }
1268
+ for (const [element, registration] of this.registry) {
1269
+ this.refresh(element, registration);
1270
+ }
1271
+ this.syncListeners();
1272
+ }
1273
+
1274
+ /**
1275
+ * Whether an enabled participant could claim a touch or cancel a lift: a
1276
+ * consumer, or a recognizer that claims touches. With only watchers
1277
+ * attached, the host's listeners are all passive (`spec:AST-094` FR20).
1278
+ */
1279
+ hasClaimer() {
1280
+ for (const registration of this.registry.values()) {
1281
+ const consumer = registration.consumer;
1282
+ if (consumer != null && consumer.isEnabled?.() !== false || registration.recognizers.some(recognizer => recognizer.isEnabled && recognizer.claimsTouches)) {
1283
+ return true;
1284
+ }
1285
+ }
1286
+ return false;
1287
+ }
1288
+
1289
+ /**
1290
+ * Keeps the touchend cancelable, and the contextmenu subscription on,
1291
+ * only while a claimer is attached; with only watchers the touchend is
1292
+ * passive and the contextmenu is off. Clicks are the click guard's
1293
+ * (utils/clickGuard.ts), whose one listener a window gets only once a
1294
+ * gesture first arms it.
1295
+ */
1296
+ syncClaimingListeners() {
1297
+ if (!this.isInstalled) {
1298
+ return;
804
1299
  }
805
- const remaining = this.swallowDeadline - browserClock.now();
806
- if (view == null || remaining < 0) {
807
- view?.removeEventListener('click', this.onClick, ACTIVE_CAPTURE);
1300
+ const isClaiming = this.hasClaimer();
1301
+ if (isClaiming === this.isClaimingInstalled) {
808
1302
  return;
809
1303
  }
810
- this.clickRemoval = setTimeout(() => {
811
- this.clickRemoval = null;
812
- if (!this.isInstalled) {
813
- view.removeEventListener('click', this.onClick, ACTIVE_CAPTURE);
1304
+ const view = this.doc.defaultView;
1305
+ for (const unsubscribe of this.claimingUnsubscribers.splice(0)) {
1306
+ unsubscribe();
1307
+ }
1308
+ if (view != null) {
1309
+ if (this.inputMode === 'auto') {
1310
+ this.claimingUnsubscribers.push(subscribeInput(view, 'touchend', this.onTouchEnd, {
1311
+ cancels: isClaiming
1312
+ }));
1313
+ }
1314
+ if (isClaiming) {
1315
+ this.claimingUnsubscribers.push(subscribeInput(view, 'contextmenu', this.onContextMenu, {
1316
+ cancels: true
1317
+ }));
1318
+ }
1319
+ }
1320
+ this.isClaimingInstalled = isClaiming;
1321
+ }
1322
+ shouldListen() {
1323
+ if (!this.needsInput()) {
1324
+ return false;
1325
+ }
1326
+ // A retainer (a finger-scroll watch) listens only where the pointer is
1327
+ // coarse: it follows a finger's scroll, which a fine pointer's page
1328
+ // leaves to the browser (FR24).
1329
+ if (this.isCoarse && this.retainers > 0) {
1330
+ return true;
1331
+ }
1332
+ let isUsed = false;
1333
+ for (const registration of this.registry.values()) {
1334
+ const consumer = registration.consumer;
1335
+ if (consumer != null && consumer.isEnabled?.() !== false || registration.recognizers.some(recognizer => recognizer.isEnabled)) {
1336
+ isUsed = true;
1337
+ break;
814
1338
  }
815
- }, remaining + 1);
1339
+ }
1340
+ // Where the primary pointer is fine, only while a press an element armed
1341
+ // is held (syncArmed, FR24, FR43).
1342
+ return isUsed && (this.isCoarse || this.isArmedPress);
816
1343
  }
817
1344
 
818
1345
  // --- Listeners -------------------------------------------------------------
819
1346
 
820
1347
  install() {
821
- if (this.isInstalled) {
1348
+ this.watchPointer();
1349
+ if (!this.needsInput()) {
822
1350
  return;
823
1351
  }
824
- if (this.clickRemoval != null) {
825
- clearTimeout(this.clickRemoval);
826
- this.clickRemoval = null;
1352
+ if (this.isInstalled) {
1353
+ return;
827
1354
  }
828
1355
  const view = this.doc.defaultView;
829
1356
  this.isInstalled = true;
830
1357
  this.usesTouchEvents = this.inputMode === 'auto' && view != null && 'ontouchstart' in view;
831
- const doc = this.doc;
1358
+ if (view == null) {
1359
+ // A document without a window receives no input.
1360
+ return;
1361
+ }
1362
+ // The window's capture phase, through the shared input stream
1363
+ // (utils/inputStream.ts): ahead of any document listener, so an app's
1364
+ // window-capture stopPropagation, or a document-capture
1365
+ // stopImmediatePropagation registered first, no longer hides a touch
1366
+ // from the recognizers. A recognizer that must claim mid-gesture still
1367
+ // needs the touch to reach its element, where its blocking touchmove
1368
+ // sits. Only the listeners that cancel are non-passive, and only while a
1369
+ // claimer is attached (syncClaimingListeners); none of them is a
1370
+ // touchstart or touchmove, so none of them holds a scroll.
1371
+ this.unsubscribers = [
832
1372
  // Pointer Events only: a finger comes from its pointer events alone. A
833
- // browser that has Touch Events still sends them for the same finger, and
834
- // reading both would track it twice (a long press needs one touch).
835
- if (this.inputMode === 'auto') {
836
- doc.addEventListener('touchstart', this.onTouchStart, PASSIVE_CAPTURE);
837
- doc.addEventListener('touchmove', this.onTouchMove, PASSIVE_CAPTURE);
838
- doc.addEventListener('touchend', this.onTouchEnd, ACTIVE_CAPTURE);
839
- doc.addEventListener('touchcancel', this.onTouchCancel, PASSIVE_CAPTURE);
840
- }
841
- doc.addEventListener('pointerdown', this.onPointerDown, PASSIVE_CAPTURE);
842
- doc.addEventListener('pointermove', this.onPointerMove, PASSIVE_CAPTURE);
843
- doc.addEventListener('pointerup', this.onPointerUp, PASSIVE_CAPTURE);
844
- doc.addEventListener('pointercancel', this.onPointerCancel, PASSIVE_CAPTURE);
845
- doc.addEventListener('contextmenu', this.onContextMenu, ACTIVE_CAPTURE);
846
- doc.addEventListener('scroll', this.onScroll, PASSIVE_CAPTURE);
847
- doc.addEventListener('visibilitychange', this.onVisibilityChange);
848
- view?.addEventListener('click', this.onClick, ACTIVE_CAPTURE);
849
- view?.addEventListener('blur', this.onBlur);
1373
+ // browser that has Touch Events still sends them for the same finger,
1374
+ // and reading both would track it twice (a long press needs one touch).
1375
+ ...(this.inputMode === 'auto' ? [subscribeInput(view, 'touchstart', this.onTouchStart), subscribeInput(view, 'touchmove', this.onTouchMove), subscribeInput(view, 'touchcancel', this.onTouchCancel)] : []), subscribeInput(view, 'pointerdown', this.onPointerDown), subscribeInput(view, 'pointermove', this.onPointerMove), subscribeInput(view, 'pointerup', this.onPointerUp), subscribeInput(view, 'pointercancel', this.onPointerCancel), subscribeInput(view, 'scroll', this.onScroll), subscribeInput(view, 'visibilitychange', this.onVisibilityChange),
1376
+ // The window's own blur; an element's blur (a Node's) reaches the
1377
+ // window's capture phase too and means nothing here.
1378
+ subscribeInput(view, 'blur', event => {
1379
+ if (!(event.target instanceof view.Node)) {
1380
+ this.onBlur();
1381
+ }
1382
+ })];
1383
+ // Passive until a claimer is attached (syncClaimingListeners).
1384
+ this.isClaimingInstalled = false;
1385
+ this.claimingUnsubscribers = this.inputMode === 'auto' ? [subscribeInput(view, 'touchend', this.onTouchEnd)] : [];
850
1386
  }
851
1387
  uninstall() {
852
1388
  if (!this.isInstalled) {
853
1389
  return;
854
1390
  }
855
1391
  this.isInstalled = false;
856
- const doc = this.doc;
857
- const view = doc.defaultView;
858
- doc.removeEventListener('touchstart', this.onTouchStart, PASSIVE_CAPTURE);
859
- doc.removeEventListener('touchmove', this.onTouchMove, PASSIVE_CAPTURE);
860
- doc.removeEventListener('touchend', this.onTouchEnd, ACTIVE_CAPTURE);
861
- doc.removeEventListener('touchcancel', this.onTouchCancel, PASSIVE_CAPTURE);
862
- doc.removeEventListener('pointerdown', this.onPointerDown, PASSIVE_CAPTURE);
863
- doc.removeEventListener('pointermove', this.onPointerMove, PASSIVE_CAPTURE);
864
- doc.removeEventListener('pointerup', this.onPointerUp, PASSIVE_CAPTURE);
865
- doc.removeEventListener('pointercancel', this.onPointerCancel, PASSIVE_CAPTURE);
866
- doc.removeEventListener('contextmenu', this.onContextMenu, ACTIVE_CAPTURE);
867
- doc.removeEventListener('scroll', this.onScroll, PASSIVE_CAPTURE);
868
- doc.removeEventListener('visibilitychange', this.onVisibilityChange);
869
- this.releaseClickListener();
870
- view?.removeEventListener('blur', this.onBlur);
1392
+ // Unheard from here on: no fingers to keep.
1393
+ this.fingerTargets = [];
1394
+ this.isClaimingInstalled = false;
1395
+ for (const unsubscribe of [...this.unsubscribers.splice(0), ...this.claimingUnsubscribers.splice(0)]) {
1396
+ unsubscribe();
1397
+ }
871
1398
  this.cancelEverything(this.arena.now());
1399
+ // A claimed lift's note stays: an armed press's listeners go in the
1400
+ // microtask after its pointerup, the touchend comes after that microtask
1401
+ // in the same task (iOS and WebKit), and the element's own listener still
1402
+ // takes it (noteClaimedLift).
872
1403
  this.lastTouch = null;
873
1404
  this.lastScroll = null;
874
1405
  }
@@ -878,11 +1409,19 @@ export class GestureHost {
878
1409
  /**
879
1410
  * The recognizers on the path from `target` to the document, innermost
880
1411
  * first, and (for a contact) its consumer: the innermost element with an
881
- * attached consumer or a delegated consumer type's attribute.
1412
+ * attached consumer.
882
1413
  */
883
1414
  participantsAt(target, pointerType) {
884
1415
  const recognizers = [];
885
1416
  let consumer = null;
1417
+ let consumerElement = null;
1418
+ if (target instanceof Node && [...this.touchGates].some(gate => gate(target))) {
1419
+ return {
1420
+ recognizers,
1421
+ consumer,
1422
+ consumerElement
1423
+ };
1424
+ }
886
1425
  let hasConsumerOwner = pointerType == null;
887
1426
  for (let node = target instanceof Node ? target : null; node != null; node = parentAcrossShadow(node)) {
888
1427
  if (!(node instanceof Element)) {
@@ -890,32 +1429,107 @@ export class GestureHost {
890
1429
  }
891
1430
  const registration = this.registry.get(node);
892
1431
  if (registration != null) {
1432
+ // Every pointer (`spec:AST-094` FR43), hover included.
893
1433
  recognizers.push(...registration.recognizers);
894
1434
  }
895
1435
  if (hasConsumerOwner || pointerType == null) {
896
1436
  continue;
897
1437
  }
1438
+ // A press consumer takes every pointer's press, a mouse's too
1439
+ // (`spec:AST-094` FR43, DEC-21).
898
1440
  if (registration?.consumer != null) {
899
1441
  consumer = registration.consumer;
1442
+ consumerElement = node;
900
1443
  hasConsumerOwner = true;
901
1444
  continue;
902
1445
  }
903
- for (const type of this.delegated) {
904
- if (node.hasAttribute(type.attribute)) {
905
- consumer = type.create(node, pointerType);
906
- hasConsumerOwner = true;
907
- break;
908
- }
909
- }
910
1446
  }
911
1447
  return {
912
1448
  recognizers,
913
- consumer
1449
+ consumer,
1450
+ consumerElement
914
1451
  };
915
1452
  }
916
1453
 
1454
+ /**
1455
+ * Turn text selection and the touch callout off, for as long as this
1456
+ * finger or pen is down, only on the elements whose hold does something:
1457
+ * a long press's (a menu, a hold-repeat), those of recognizers created
1458
+ * with a `selectionLock` (a slider's thumb, a switch's drag, a tab bar's
1459
+ * zero-delay lens) and that of a press tracker created with one (a
1460
+ * stepper's hold-repeat). Anything whose hold does nothing, a plain
1461
+ * press-tracked control or row included, keeps the browser's long-press
1462
+ * selection (`spec:AST-094` FR41). Restored when the contact ends. Callers
1463
+ * lock for a finger or a pen under any primary pointer, never for a mouse
1464
+ * (locksSelectionFor), and only once the arena has admitted the contact:
1465
+ * `recognizers` and `consumer` are the ones that took it.
1466
+ */
1467
+ lockSelection(id, recognizers, target, consumer, consumerElement) {
1468
+ // Each recognizer whose hold does something brings its lock; the host
1469
+ // never imports one (a component without such a hold does not bundle
1470
+ // it). Only one that took this contact locks for it: a recognizer that
1471
+ // declined it (its pointer, or its own shouldReceiveTouch) has no hold
1472
+ // here.
1473
+ // An element attached with manageStyle: false keeps its own styles, the
1474
+ // lock included (AttachOptions.manageStyle).
1475
+ const managed = element => this.registry.get(element)?.manageStyle !== false;
1476
+ const byLock = new Map();
1477
+ for (const recognizer of recognizers) {
1478
+ const lock = recognizer.selectionLock;
1479
+ if (lock != null && recognizer.view instanceof Element && managed(recognizer.view)) {
1480
+ const elements = byLock.get(lock) ?? new Set();
1481
+ elements.add(recognizer.view);
1482
+ byLock.set(lock, elements);
1483
+ }
1484
+ }
1485
+ const consumerLock = consumer?.selectionLock;
1486
+ if (consumerLock != null && consumerElement != null && managed(consumerElement)) {
1487
+ const elements = byLock.get(consumerLock) ?? new Set();
1488
+ elements.add(consumerElement);
1489
+ byLock.set(consumerLock, elements);
1490
+ }
1491
+ if (byLock.size > 0) {
1492
+ const undo = [...byLock].map(([lock, elements]) => lock(elements, target));
1493
+ this.lockedBy.set(id, () => {
1494
+ for (const release of undo) {
1495
+ release();
1496
+ }
1497
+ });
1498
+ }
1499
+ }
1500
+
1501
+ /** Undo `lockSelection` for a contact that ended; idempotent. */
1502
+ unlockSelection(id) {
1503
+ this.lockedBy.get(id)?.();
1504
+ this.lockedBy.delete(id);
1505
+ }
1506
+
917
1507
  // --- Touch events ----------------------------------------------------------
918
1508
 
1509
+ /**
1510
+ * Hold touches away from every participant while `gate(target)` answers
1511
+ * true (a presentation running in a layer: its content takes no touch
1512
+ * until it settles). Returns the release.
1513
+ */
1514
+ addTouchGate(gate) {
1515
+ this.touchGates.add(gate);
1516
+ return () => {
1517
+ this.touchGates.delete(gate);
1518
+ };
1519
+ }
1520
+
1521
+ /**
1522
+ * How many fingers are on the screen: the length of `touches` in the last
1523
+ * touch event the host's listeners heard (`touchstart`, `touchmove`,
1524
+ * `touchend`, `touchcancel`), whatever its target, so a finger on an
1525
+ * element with no recognizer counts too. 0 before any, and while no
1526
+ * listener is installed. A recognizer that must not begin under a second
1527
+ * finger reads it in `shouldBegin`.
1528
+ */
1529
+ fingersDown() {
1530
+ return this.fingerTargets.length;
1531
+ }
1532
+
919
1533
  /** Whether this event is new to the host (and mark it handled). */
920
1534
  takeEvent(event) {
921
1535
  if (this.processed.has(event)) {
@@ -925,27 +1539,38 @@ export class GestureHost {
925
1539
  return true;
926
1540
  }
927
1541
  onTouchStart = event => {
928
- if (!this.takeEvent(event)) {
1542
+ this.noteFingersDown(event);
1543
+ // Where the host reads a finger from its pointer events (no ontouchstart,
1544
+ // as after touch emulation turns on), its Touch Events would track it twice.
1545
+ if (!this.usesTouchEvents || !this.takeEvent(event)) {
929
1546
  return;
930
1547
  }
1548
+ if (this.fingerTargets.length > 1) {
1549
+ this.failUnclaimedLoneFingerPans();
1550
+ }
931
1551
  const time = eventTime(event);
932
1552
  const inputs = [];
933
1553
  const untracked = [];
934
1554
  const stale = [];
1555
+ // Locked once the arena knows which recognizers took each finger.
1556
+ const toLock = [];
935
1557
  for (const touch of touchesOf(event.changedTouches)) {
936
1558
  if (touch.touchType === 'stylus') {
937
1559
  continue;
938
1560
  }
939
1561
  // A finger number still tracked here began again: the touch it named
940
1562
  // ended where no listener of ours could hear it.
1563
+ this.cancelledFingers.delete(touch.identifier);
941
1564
  const previous = this.forgetFinger(touch.identifier);
942
1565
  if (previous != null) {
943
1566
  stale.push(previous);
944
1567
  }
945
- const target = touch.target instanceof Node ? touch.target : event.target;
1568
+ const native = touch.target instanceof Node ? landedOn(event, touch.target) : landedOn(event);
1569
+ const target = this.presentedTarget(native, touch.clientX, touch.clientY, event.timeStamp);
946
1570
  const {
947
1571
  recognizers,
948
- consumer
1572
+ consumer,
1573
+ consumerElement
949
1574
  } = this.participantsAt(target, 'touch');
950
1575
  if (recognizers.length === 0 && consumer == null) {
951
1576
  // Nothing here takes part: the touch stays the page's, but a
@@ -963,8 +1588,15 @@ export class GestureHost {
963
1588
  }
964
1589
  const id = this.nextId++;
965
1590
  this.touchIds.set(touch.identifier, id);
966
- this.holdSelection(id, recognizers);
967
- this.watchTarget(touch.identifier, target, recognizers.some(claimsWhileMoving));
1591
+ if (locksSelectionFor('touch')) {
1592
+ toLock.push({
1593
+ id,
1594
+ target,
1595
+ consumerElement
1596
+ });
1597
+ }
1598
+ // The finger's events keep going to what the engine hit.
1599
+ this.watchTarget(touch.identifier, native, recognizers.some(claimsWhileMoving) || consumer?.keepsTouch != null, consumer != null || recognizers.some(recognizer => recognizer.claimsTouches));
968
1600
  this.lastFed.set(id, {
969
1601
  x: touch.clientX,
970
1602
  y: touch.clientY,
@@ -973,8 +1605,15 @@ export class GestureHost {
973
1605
  this.pairTouch(id, {
974
1606
  x: touch.clientX,
975
1607
  y: touch.clientY,
976
- target
1608
+ target: native
977
1609
  });
1610
+ if (target !== native && target != null) {
1611
+ this.retargeted.set(id, {
1612
+ x: touch.clientX,
1613
+ y: touch.clientY,
1614
+ target
1615
+ });
1616
+ }
978
1617
  inputs.push({
979
1618
  id,
980
1619
  x: touch.clientX,
@@ -991,20 +1630,31 @@ export class GestureHost {
991
1630
  this.arena.cancelled(stale, time);
992
1631
  }
993
1632
  this.arena.began(inputs);
1633
+ for (const {
1634
+ id,
1635
+ target,
1636
+ consumerElement
1637
+ } of toLock) {
1638
+ this.lockSelection(id, this.arena.participantsOf(id), target, this.arena.consumerOf(id) ?? null, consumerElement);
1639
+ }
994
1640
  for (const input of untracked) {
995
1641
  this.arena.untrackedBegan(input);
996
1642
  }
997
1643
  // Stamped after the consumers judged the touch: the brake asks whether
998
1644
  // an EARLIER finger is still driving a scroll.
999
- if (event.target instanceof Node) {
1645
+ const landed = landedOn(event);
1646
+ if (landed instanceof Node) {
1000
1647
  this.lastTouch = {
1001
- target: event.target,
1648
+ target: landed,
1002
1649
  time
1003
1650
  };
1004
1651
  }
1005
1652
  };
1006
1653
  onTouchMove = event => {
1007
- if (!this.takeEvent(event)) {
1654
+ this.noteFingersDown(event);
1655
+ // Where the host reads a finger from its pointer events (no ontouchstart,
1656
+ // as after touch emulation turns on), its Touch Events would track it twice.
1657
+ if (!this.usesTouchEvents || !this.takeEvent(event)) {
1008
1658
  return;
1009
1659
  }
1010
1660
  this.dropFingersNotDown(event);
@@ -1052,12 +1702,25 @@ export class GestureHost {
1052
1702
  return Math.abs(dx) >= Math.abs(dy) ? touch.scroll.canScroll(dx, 0) : touch.scroll.canScroll(0, dy);
1053
1703
  });
1054
1704
  if (taken.length > 0) {
1055
- this.arena.browserTookOver(taken, time);
1705
+ this.browserTook(taken, time);
1056
1706
  }
1057
1707
  }
1058
- this.feedMoves(inputs);
1708
+ // A finger its pointer events sample is fed from there, never from here.
1709
+ this.feedMoves(inputs.filter(input => !this.pointerFed.has(input.id)));
1059
1710
  };
1060
1711
 
1712
+ /** The one blocking `touchmove` handler every claiming element shares. */
1713
+ onBlockingTouchMove = event => {
1714
+ this.cancelIfClaimed(event);
1715
+ };
1716
+
1717
+ /**
1718
+ * Cancel a `touchmove` while a recognizer owns one of its fingers. A touch
1719
+ * no recognizer owns keeps its moves (`spec:AST-094` FR19): nothing is
1720
+ * cancelled before a recognizer begins, or for a touch it does not track,
1721
+ * unless a recognizer holds that finger already (a scroll-edge pan pulling
1722
+ * away from an edge every scroller under it is at; FR19, DEC-18).
1723
+ */
1061
1724
  /**
1062
1725
  * Under `inputMode: 'pointer-events'` a finger comes from its pointer
1063
1726
  * events, so its touches carry no id of ours: the live finger it is, the
@@ -1068,7 +1731,10 @@ export class GestureHost {
1068
1731
  let best = null;
1069
1732
  let bestDistance = Number.POSITIVE_INFINITY;
1070
1733
  for (const finger of this.arena.touches) {
1071
- if (finger.pointerType !== 'touch' || finger.phase === 'ended' || finger.phase === 'cancelled' || !(finger.target instanceof Node) || !(touch.target instanceof Node) || !(finger.target === touch.target || finger.target.contains(touch.target) || touch.target.contains(finger.target))) {
1734
+ if (finger.pointerType !== 'touch' || finger.phase === 'ended' || finger.phase === 'cancelled' || !(finger.target instanceof Node) || !(touch.target instanceof Node) ||
1735
+ // Along the flat tree, both ways: the finger's target can be inside
1736
+ // an open shadow root while its touches reach the host retargeted.
1737
+ !(containsAlongFlatTree(finger.target, touch.target) || containsAlongFlatTree(touch.target, finger.target))) {
1072
1738
  continue;
1073
1739
  }
1074
1740
  const d = Math.hypot(finger.x - touch.clientX, finger.y - touch.clientY);
@@ -1083,31 +1749,38 @@ export class GestureHost {
1083
1749
  /**
1084
1750
  * Cancel the `touchend` of a finger a recognizer owned when it lifted
1085
1751
  * (`inputMode: 'pointer-events'`): its `pointerup` came first, at the same
1086
- * place on the same target (`spec:AST-094` FR21).
1752
+ * place on the same target (`spec:AST-094` FR21). Records older than
1753
+ * CLAIMED_LIFT_MS are dropped first: their touchend never came.
1087
1754
  */
1088
- cancelClaimedLift(event) {
1089
- if (!event.cancelable || event.defaultPrevented) {
1755
+ onClaimedTouchEnd = event => {
1756
+ const end = event;
1757
+ const time = eventTime(end);
1758
+ for (let i = this.claimedLifts.length - 1; i >= 0; i--) {
1759
+ if (time - this.claimedLifts[i].time > CLAIMED_LIFT_MS) {
1760
+ this.claimedLifts.splice(i, 1);
1761
+ }
1762
+ }
1763
+ if (!end.cancelable || end.defaultPrevented) {
1090
1764
  return;
1091
1765
  }
1092
- for (const touch of touchesOf(event.changedTouches)) {
1766
+ for (const touch of touchesOf(end.changedTouches)) {
1767
+ // As its pointer landed: inside an open shadow root this listener
1768
+ // sees the touch retargeted to the host.
1093
1769
  const index = this.claimedLifts.findIndex(lift => isSamePlace(lift, {
1094
1770
  x: touch.clientX,
1095
1771
  y: touch.clientY,
1096
- target: touch.target
1772
+ target: landedOn(end, touch.target)
1097
1773
  }));
1098
1774
  if (index >= 0) {
1099
1775
  this.claimedLifts.splice(index, 1);
1100
- event.preventDefault();
1776
+ if (this.claimedLifts.length === 0) {
1777
+ this.clearClaimedLifts();
1778
+ }
1779
+ end.preventDefault();
1101
1780
  return;
1102
1781
  }
1103
1782
  }
1104
- }
1105
-
1106
- /**
1107
- * Cancel a `touchmove` while a recognizer owns one of its fingers. A touch
1108
- * no recognizer owns keeps its moves (`spec:AST-094` FR19): nothing is
1109
- * cancelled before a recognizer begins, or for a touch it does not track.
1110
- */
1783
+ };
1111
1784
  cancelIfClaimed(event) {
1112
1785
  if (!event.cancelable || event.defaultPrevented) {
1113
1786
  return;
@@ -1116,13 +1789,24 @@ export class GestureHost {
1116
1789
  // does not make this one its own.
1117
1790
  const moved = touchesOf(event.changedTouches);
1118
1791
  for (const touch of moved) {
1119
- const id = this.touchIds.get(touch.identifier) ?? (this.inputMode === 'pointer-events' ? this.pointerFingerAt(touch) : undefined);
1120
- if (id != null && this.arena.isClaimed(id)) {
1792
+ const id = this.touchIds.get(touch.identifier) ?? (
1793
+ // Where fingers come from pointer events (inputMode 'pointer-events',
1794
+ // or 'auto' with no ontouchstart), the touch is matched to its pointer.
1795
+ this.usesTouchEvents ? undefined : this.pointerFingerAt(touch));
1796
+ if (id != null && (this.arena.isClaimed(id) ||
1797
+ // A kept press keeps its finger under any pointer (FR11, DEC-21).
1798
+ this.arena.consumerOf(id)?.keepsTouch?.(id) === true ||
1799
+ // A recognizer that holds the finger before it begins: a
1800
+ // scroll-edge pan pulling away from an edge (FR19, DEC-18), only
1801
+ // while this is the one finger on the screen: with a second one
1802
+ // down anywhere, even off the recognizer's element, the moves stay
1803
+ // the browser's, for its pinch (FR10).
1804
+ event.touches.length === 1 && this.arena.participantsOf(id).some(recognizer => internals(recognizer).keepsTouch(id)))) {
1121
1805
  event.preventDefault();
1122
1806
  return;
1123
1807
  }
1124
1808
  }
1125
- if (moved.some(touch => touch.touchType === 'stylus')) {
1809
+ if (hasStylusTouch(event)) {
1126
1810
  for (const id of this.pointerIds.values()) {
1127
1811
  if (this.arena.isClaimed(id)) {
1128
1812
  // A pen whose pointer a recognizer owns: its stylus touches too,
@@ -1134,13 +1818,25 @@ export class GestureHost {
1134
1818
  }
1135
1819
  }
1136
1820
  onTouchEnd = event => {
1137
- if (!this.takeEvent(event)) {
1821
+ this.releaseArmedPress();
1822
+ this.noteFingersDown(event);
1823
+ // Where the host reads a finger from its pointer events (no ontouchstart,
1824
+ // as after touch emulation turns on), its Touch Events would track it twice.
1825
+ if (!this.usesTouchEvents || !this.takeEvent(event)) {
1138
1826
  return;
1139
1827
  }
1140
1828
  this.dropFingersNotDown(event);
1141
1829
  const time = eventTime(event);
1142
1830
  const inputs = [];
1831
+ const retargetedEnds = [];
1832
+ let isRefused = false;
1143
1833
  for (const touch of touchesOf(event.changedTouches)) {
1834
+ if (this.cancelledFingers.delete(touch.identifier)) {
1835
+ isRefused = true;
1836
+ continue;
1837
+ }
1838
+ const tracked = this.touchIds.get(touch.identifier);
1839
+ const landed = tracked == null ? undefined : this.retargeted.get(tracked);
1144
1840
  const id = this.forgetFinger(touch.identifier);
1145
1841
  if (id == null) {
1146
1842
  continue;
@@ -1151,34 +1847,74 @@ export class GestureHost {
1151
1847
  y: touch.clientY,
1152
1848
  time
1153
1849
  });
1850
+ if (landed != null) {
1851
+ retargetedEnds.push({
1852
+ id,
1853
+ landed,
1854
+ x: touch.clientX,
1855
+ y: touch.clientY
1856
+ });
1857
+ }
1154
1858
  }
1155
1859
  // The lift is when momentum starts: the clock the brake wants most.
1156
- if (event.target instanceof Node) {
1860
+ const landed = landedOn(event);
1861
+ if (landed instanceof Node) {
1157
1862
  this.lastTouch = {
1158
- target: event.target,
1863
+ target: landed,
1159
1864
  time
1160
1865
  };
1161
1866
  }
1162
- if (inputs.length === 0) {
1163
- this.releaseArmedPress();
1164
- return;
1867
+ const dispositions = inputs.length > 0 ? this.arena.ended(inputs) : new Map();
1868
+ let cancelsClick = isRefused || needsSuppression(dispositions);
1869
+ // A tap sent to what is drawn: the engine's click would hit the layout
1870
+ // position, so it is cancelled and the tap clicks what it touched.
1871
+ for (const end of retargetedEnds) {
1872
+ if (this.clickRetargetedTap(end.landed, end, dispositions.get(end.id))) {
1873
+ cancelsClick = true;
1874
+ }
1165
1875
  }
1166
- const dispositions = this.arena.ended(inputs);
1167
- if (needsSuppression(dispositions)) {
1876
+ if (cancelsClick) {
1168
1877
  if (event.cancelable) {
1169
1878
  event.preventDefault();
1170
1879
  }
1171
- this.armSwallower();
1880
+ armClickGuard(this.doc);
1172
1881
  }
1173
- this.releaseArmedPress();
1174
1882
  };
1883
+
1884
+ /**
1885
+ * Clicks what a retargeted contact touched if it ended as a tap the
1886
+ * engine would click: nothing claimed it, the browser did not take it
1887
+ * (a taken contact is no longer retargeted), and the finger stayed within
1888
+ * a tap's movement. Returns whether it clicked.
1889
+ */
1890
+ clickRetargetedTap(landed, end, disposition) {
1891
+ if (landed == null || disposition !== 'allow') {
1892
+ return false;
1893
+ }
1894
+ const moved = Math.hypot(end.x - landed.x, end.y - landed.y);
1895
+ if (moved > UIKIT_TAP.allowableMovement.value) {
1896
+ return false;
1897
+ }
1898
+ this.clickRetargeted(landed.target, end.x, end.y);
1899
+ return true;
1900
+ }
1175
1901
  onTouchCancel = event => {
1176
- if (!this.takeEvent(event)) {
1902
+ this.releaseArmedPress();
1903
+ this.noteFingersDown(event);
1904
+ // Where the host reads a finger from its pointer events (no ontouchstart,
1905
+ // as after touch emulation turns on), its Touch Events would track it twice.
1906
+ if (!this.usesTouchEvents || !this.takeEvent(event)) {
1177
1907
  return;
1178
1908
  }
1179
1909
  const listed = touchesOf(event.changedTouches);
1180
1910
  // A cancel that names no finger is the system taking them all.
1181
1911
  const identifiers = listed.length > 0 ? listed.map(touch => touch.identifier) : [...this.touchIds.keys()];
1912
+ if (listed.length === 0) {
1913
+ this.cancelledFingers.clear();
1914
+ }
1915
+ for (const identifier of identifiers) {
1916
+ this.cancelledFingers.delete(identifier);
1917
+ }
1182
1918
  const ids = [];
1183
1919
  for (const identifier of identifiers) {
1184
1920
  const id = this.forgetFinger(identifier);
@@ -1189,7 +1925,6 @@ export class GestureHost {
1189
1925
  if (ids.length > 0) {
1190
1926
  this.arena.cancelled(ids, eventTime(event));
1191
1927
  }
1192
- this.releaseArmedPress();
1193
1928
  };
1194
1929
 
1195
1930
  /** The target's own listeners, for a target that left the document. */
@@ -1205,6 +1940,11 @@ export class GestureHost {
1205
1940
  onTargetTouchEnd = event => {
1206
1941
  this.onTouchEnd(event);
1207
1942
  };
1943
+
1944
+ /** The same, registered passively for a touch only watchers follow. */
1945
+ onTargetTouchEndPassive = event => {
1946
+ this.onTouchEnd(event);
1947
+ };
1208
1948
  onTargetTouchCancel = event => {
1209
1949
  this.onTouchCancel(event);
1210
1950
  };
@@ -1215,7 +1955,7 @@ export class GestureHost {
1215
1955
  * in this very event) ended where we could not see it.
1216
1956
  */
1217
1957
  dropFingersNotDown(event) {
1218
- if (event.touches == null || this.touchIds.size === 0) {
1958
+ if (event.touches == null || this.touchIds.size === 0 && this.cancelledFingers.size === 0) {
1219
1959
  return;
1220
1960
  }
1221
1961
  const down = new Set();
@@ -1225,6 +1965,11 @@ export class GestureHost {
1225
1965
  for (const touch of touchesOf(event.changedTouches)) {
1226
1966
  down.add(touch.identifier);
1227
1967
  }
1968
+ for (const identifier of [...this.cancelledFingers]) {
1969
+ if (!down.has(identifier)) {
1970
+ this.cancelledFingers.delete(identifier);
1971
+ }
1972
+ }
1228
1973
  const gone = [...this.touchIds.keys()].filter(identifier => !down.has(identifier));
1229
1974
  const ids = [];
1230
1975
  for (const identifier of gone) {
@@ -1237,7 +1982,7 @@ export class GestureHost {
1237
1982
  this.arena.cancelled(ids, eventTime(event));
1238
1983
  }
1239
1984
  }
1240
- watchTarget(identifier, target, isBlocking) {
1985
+ watchTarget(identifier, target, isBlocking, isClaiming) {
1241
1986
  if (target == null || typeof target.addEventListener !== 'function') {
1242
1987
  return;
1243
1988
  }
@@ -1246,16 +1991,20 @@ export class GestureHost {
1246
1991
  if (state == null) {
1247
1992
  this.watched.set(target, {
1248
1993
  count: 1,
1249
- blocking: isBlocking ? 1 : 0
1994
+ blocking: isBlocking ? 1 : 0,
1995
+ claiming: isClaiming ? 1 : 0
1250
1996
  });
1251
1997
  if (isBlocking) {
1252
1998
  this.blockingFingers.add(identifier);
1253
1999
  }
2000
+ if (isClaiming) {
2001
+ this.claimingFingers.add(identifier);
2002
+ }
1254
2003
  target.addEventListener('touchmove', isBlocking ? this.onTargetTouchMove : this.onTargetTouchMovePassive, {
1255
2004
  passive: !isBlocking
1256
2005
  });
1257
- target.addEventListener('touchend', this.onTargetTouchEnd, {
1258
- passive: false
2006
+ target.addEventListener('touchend', isClaiming ? this.onTargetTouchEnd : this.onTargetTouchEndPassive, {
2007
+ passive: !isClaiming
1259
2008
  });
1260
2009
  target.addEventListener('touchcancel', this.onTargetTouchCancel, {
1261
2010
  passive: true
@@ -1263,12 +2012,18 @@ export class GestureHost {
1263
2012
  return;
1264
2013
  }
1265
2014
  const wasBlocking = state.blocking > 0;
2015
+ const wasClaiming = state.claiming > 0;
1266
2016
  state.count += 1;
1267
2017
  if (isBlocking) {
1268
2018
  state.blocking += 1;
1269
2019
  this.blockingFingers.add(identifier);
1270
2020
  }
2021
+ if (isClaiming) {
2022
+ state.claiming += 1;
2023
+ this.claimingFingers.add(identifier);
2024
+ }
1271
2025
  this.swapTargetTouchMove(target, wasBlocking, state.blocking > 0);
2026
+ this.swapTargetTouchEnd(target, wasClaiming, state.claiming > 0);
1272
2027
  }
1273
2028
  unwatchTarget(identifier) {
1274
2029
  const target = this.touchTargets.get(identifier);
@@ -1281,17 +2036,22 @@ export class GestureHost {
1281
2036
  return;
1282
2037
  }
1283
2038
  const wasBlocking = state.blocking > 0;
2039
+ const wasClaiming = state.claiming > 0;
1284
2040
  state.count -= 1;
1285
2041
  if (this.blockingFingers.delete(identifier)) {
1286
2042
  state.blocking -= 1;
1287
2043
  }
2044
+ if (this.claimingFingers.delete(identifier)) {
2045
+ state.claiming -= 1;
2046
+ }
1288
2047
  if (state.count > 0) {
1289
2048
  this.swapTargetTouchMove(target, wasBlocking, state.blocking > 0);
2049
+ this.swapTargetTouchEnd(target, wasClaiming, state.claiming > 0);
1290
2050
  return;
1291
2051
  }
1292
2052
  this.watched.delete(target);
1293
2053
  target.removeEventListener('touchmove', wasBlocking ? this.onTargetTouchMove : this.onTargetTouchMovePassive);
1294
- target.removeEventListener('touchend', this.onTargetTouchEnd);
2054
+ target.removeEventListener('touchend', wasClaiming ? this.onTargetTouchEnd : this.onTargetTouchEndPassive);
1295
2055
  target.removeEventListener('touchcancel', this.onTargetTouchCancel);
1296
2056
  }
1297
2057
 
@@ -1311,6 +2071,22 @@ export class GestureHost {
1311
2071
  });
1312
2072
  }
1313
2073
 
2074
+ /**
2075
+ * Keeps one `touchend` listener on a watched target: the cancelable one
2076
+ * while a finger on it has a participant that could claim (a lift whose
2077
+ * click must not happen cancels its `touchend`), a passive one while only
2078
+ * watchers follow its fingers (`spec:AST-094` FR20).
2079
+ */
2080
+ swapTargetTouchEnd(target, wasClaiming, isClaiming) {
2081
+ if (wasClaiming === isClaiming) {
2082
+ return;
2083
+ }
2084
+ target.removeEventListener('touchend', wasClaiming ? this.onTargetTouchEnd : this.onTargetTouchEndPassive);
2085
+ target.addEventListener('touchend', isClaiming ? this.onTargetTouchEnd : this.onTargetTouchEndPassive, {
2086
+ passive: !isClaiming
2087
+ });
2088
+ }
2089
+
1314
2090
  /** Stop tracking a finger by its Touch.identifier; returns its arena id. */
1315
2091
  forgetFinger(identifier) {
1316
2092
  const id = this.touchIds.get(identifier);
@@ -1326,6 +2102,7 @@ export class GestureHost {
1326
2102
  if (isSamePlace(pending, place)) {
1327
2103
  this.pendingPointers.delete(pointerId);
1328
2104
  this.fingerPointers.set(pointerId, id);
2105
+ this.pointerFed.add(id);
1329
2106
  return;
1330
2107
  }
1331
2108
  }
@@ -1336,17 +2113,18 @@ export class GestureHost {
1336
2113
  if (isSamePlace(unpaired, place)) {
1337
2114
  this.unpairedTouches.delete(id);
1338
2115
  this.fingerPointers.set(pointerId, id);
2116
+ this.pointerFed.add(id);
1339
2117
  return;
1340
2118
  }
1341
2119
  }
1342
2120
  this.pendingPointers.set(pointerId, place);
1343
2121
  }
1344
2122
 
1345
- /** Feed moves, dropping the echo of a move the other channel delivered. */
2123
+ /** Feed moves from a contact's sampling channel, in time order. */
1346
2124
  feedMoves(inputs) {
1347
2125
  const fresh = inputs.filter(input => {
1348
2126
  const last = this.lastFed.get(input.id);
1349
- if (last != null && (input.time < last.time || input.time === last.time && input.x === last.x && input.y === last.y)) {
2127
+ if (last != null && input.time < last.time) {
1350
2128
  return false;
1351
2129
  }
1352
2130
  this.lastFed.set(input.id, {
@@ -1361,83 +2139,12 @@ export class GestureHost {
1361
2139
  }
1362
2140
  }
1363
2141
 
1364
- /**
1365
- * For one held press by a finger or a pen: text selection and the touch
1366
- * callout off on the elements whose hold does something (a long press),
1367
- * as `holdSelectionStyle` decides (`spec:AST-094` FR41, DEC-9).
1368
- * Everything else keeps the browser's long-press selection. Restored when
1369
- * the contact ends; refcounted across contacts on one element.
1370
- */
1371
- holdSelection(id, recognizers) {
1372
- const elements = new Set();
1373
- for (const recognizer of recognizers) {
1374
- if (recognizer.view instanceof HTMLElement && recognizer.isEnabled &&
1375
- // An element attached with manageStyle: false keeps its own styles.
1376
- this.registry.get(recognizer.view)?.manageStyle !== false && holdSelectionStyle([recognizer]) != null) {
1377
- elements.add(recognizer.view);
1378
- }
1379
- }
1380
- if (elements.size === 0) {
1381
- return;
1382
- }
1383
- const held = [...elements];
1384
- for (const element of held) {
1385
- const entry = heldSelection.get(element);
1386
- if (entry != null) {
1387
- entry.count += 1;
1388
- continue;
1389
- }
1390
- const saved = HOLD_SELECTION_PROPERTIES.map(name => ({
1391
- name,
1392
- value: element.style.getPropertyValue(name),
1393
- priority: element.style.getPropertyPriority(name)
1394
- }));
1395
- for (const name of HOLD_SELECTION_PROPERTIES) {
1396
- element.style.setProperty(name, 'none');
1397
- }
1398
- heldSelection.set(element, {
1399
- count: 1,
1400
- saved
1401
- });
1402
- }
1403
- this.heldSelectionBy.set(id, held);
1404
- }
1405
-
1406
- /** Undo `holdSelection` for a contact that ended; idempotent. */
1407
- releaseSelection(id) {
1408
- const held = this.heldSelectionBy.get(id);
1409
- if (held == null) {
1410
- return;
1411
- }
1412
- this.heldSelectionBy.delete(id);
1413
- for (const element of held) {
1414
- const entry = heldSelection.get(element);
1415
- if (entry == null) {
1416
- continue;
1417
- }
1418
- entry.count -= 1;
1419
- if (entry.count > 0) {
1420
- continue;
1421
- }
1422
- heldSelection.delete(element);
1423
- for (const {
1424
- name,
1425
- value,
1426
- priority
1427
- } of entry.saved) {
1428
- if (value === '') {
1429
- element.style.removeProperty(name);
1430
- } else {
1431
- element.style.setProperty(name, value, priority);
1432
- }
1433
- }
1434
- }
1435
- }
1436
-
1437
2142
  /** Forget a contact's pairing and echo state. */
1438
2143
  forgetContact(id) {
1439
- this.releaseSelection(id);
2144
+ this.unlockSelection(id);
2145
+ this.retargeted.delete(id);
1440
2146
  this.lastFed.delete(id);
2147
+ this.pointerFed.delete(id);
1441
2148
  this.judgedUncancelable.delete(id);
1442
2149
  this.unpairedTouches.delete(id);
1443
2150
  for (const [pointerId, paired] of this.fingerPointers) {
@@ -1451,7 +2158,7 @@ export class GestureHost {
1451
2158
 
1452
2159
  onPointerDown = event => {
1453
2160
  // A new press: whatever click is still owed to the last one is not this.
1454
- this.disarmSwallower();
2161
+ disarmClickGuard(this.doc);
1455
2162
  if (!isPointerKind(event.pointerType)) {
1456
2163
  return;
1457
2164
  }
@@ -1459,26 +2166,33 @@ export class GestureHost {
1459
2166
  this.pairPointer(event.pointerId, {
1460
2167
  x: event.clientX,
1461
2168
  y: event.clientY,
1462
- target: event.target
2169
+ target: landedOn(event)
1463
2170
  });
1464
2171
  return;
1465
2172
  }
1466
- // A right click, a pen's barrel button and a ctrl-click on macOS start
1467
- // no press (FR43).
2173
+ // A right click, a pen's barrel button, or a ctrl-click on macOS (its
2174
+ // context click) starts no press (FR43).
1468
2175
  if (event.pointerType !== 'touch' && !isPrimaryClick(event)) {
1469
2176
  return;
1470
2177
  }
2178
+ const landed = landedOn(event);
2179
+ const target = this.presentedTarget(landed, event.clientX, event.clientY, event.timeStamp);
1471
2180
  const {
1472
2181
  recognizers,
1473
- consumer
1474
- } = this.participantsAt(event.target, event.pointerType);
2182
+ consumer,
2183
+ consumerElement
2184
+ } = this.participantsAt(target, event.pointerType);
1475
2185
  if (recognizers.length === 0 && consumer == null) {
1476
2186
  return;
1477
2187
  }
1478
2188
  const id = this.nextId++;
1479
2189
  this.pointerIds.set(event.pointerId, id);
1480
- if (event.pointerType !== 'mouse') {
1481
- this.holdSelection(id, recognizers);
2190
+ if (target !== landed && target != null) {
2191
+ this.retargeted.set(id, {
2192
+ x: event.clientX,
2193
+ y: event.clientY,
2194
+ target
2195
+ });
1482
2196
  }
1483
2197
  this.arena.began([{
1484
2198
  id,
@@ -1486,11 +2200,16 @@ export class GestureHost {
1486
2200
  y: event.clientY,
1487
2201
  time: eventTime(event),
1488
2202
  pointerType: event.pointerType,
1489
- target: event.target,
1490
- scroll: createNativeScrollProbe(event.target),
2203
+ target,
2204
+ scroll: createNativeScrollProbe(target),
1491
2205
  recognizers,
1492
2206
  consumer
1493
2207
  }]);
2208
+ if (locksSelectionFor(event.pointerType)) {
2209
+ // The presented target: what the pen is on, where the engine's own
2210
+ // hit test may still see the motion's start.
2211
+ this.lockSelection(id, this.arena.participantsOf(id), target, this.arena.consumerOf(id) ?? null, consumerElement);
2212
+ }
1494
2213
  };
1495
2214
  onPointerMove = event => {
1496
2215
  if (event.pointerType === 'touch' && this.usesTouchEvents) {
@@ -1519,6 +2238,7 @@ export class GestureHost {
1519
2238
  }
1520
2239
  };
1521
2240
  onPointerUp = event => {
2241
+ this.releaseArmedPress();
1522
2242
  if (event.pointerType === 'touch' && this.usesTouchEvents) {
1523
2243
  // The lift itself is the touchend's: it alone can cancel the click.
1524
2244
  this.fingerPointers.delete(event.pointerId);
@@ -1527,49 +2247,108 @@ export class GestureHost {
1527
2247
  }
1528
2248
  const id = this.pointerIds.get(event.pointerId);
1529
2249
  if (id == null) {
1530
- this.releaseArmedPress();
1531
2250
  return;
1532
2251
  }
1533
2252
  this.pointerIds.delete(event.pointerId);
1534
- this.releaseSelection(id);
1535
- if (event.pointerType === 'touch' && this.arena.isClaimed(id)) {
1536
- this.claimedLifts.push({
1537
- x: event.clientX,
1538
- y: event.clientY,
1539
- target: event.target
1540
- });
1541
- if (this.claimedLifts.length > 8) {
1542
- this.claimedLifts.shift();
1543
- }
1544
- }
2253
+ this.unlockSelection(id);
1545
2254
  const dispositions = this.arena.ended([{
1546
2255
  id,
1547
2256
  x: event.clientX,
1548
2257
  y: event.clientY,
1549
2258
  time: eventTime(event)
1550
2259
  }]);
1551
- if (needsSuppression(dispositions)) {
1552
- this.armSwallower();
2260
+ // A retargeted tap's own click arms the click guard for the engine's.
2261
+ const landed = this.retargeted.get(id);
2262
+ this.retargeted.delete(id);
2263
+ const clicked = this.clickRetargetedTap(landed, {
2264
+ x: event.clientX,
2265
+ y: event.clientY
2266
+ }, dispositions.get(id));
2267
+ if (!clicked && needsSuppression(dispositions)) {
2268
+ armClickGuard(this.doc);
2269
+ }
2270
+ // A finger read from its pointer events: the touchend that follows the
2271
+ // lift is cancelled when a gesture took it, which the lift itself may
2272
+ // decide (a hold whose time came with it), or when its tap was retargeted
2273
+ // (FR21).
2274
+ if (event.pointerType === 'touch' && (clicked || needsSuppression(dispositions))) {
2275
+ this.noteClaimedLift(event);
1553
2276
  }
1554
- this.releaseArmedPress();
1555
2277
  };
2278
+
2279
+ /**
2280
+ * Note a claimed finger's lift, so the `touchend` that follows its
2281
+ * `pointerup` is cancelled (FR21). Only where an element's listener can take
2282
+ * that touchend: elsewhere none comes, and the note would hold its node for
2283
+ * nothing. At most CLAIMED_LIFT_LIMIT wait, the oldest going first, and one
2284
+ * timer drops each once CLAIMED_LIFT_MS has passed (FR24); the host's
2285
+ * uninstall keeps them, as it can run in the microtask after the pointerup,
2286
+ * before the touchend that comes later in the same task.
2287
+ */
2288
+ noteClaimedLift(event) {
2289
+ if (!this.readsFingersFromPointerEvents() || !(this.isCoarse || this.sendsTouchEvents())) {
2290
+ return;
2291
+ }
2292
+ this.claimedLifts.push({
2293
+ x: event.clientX,
2294
+ y: event.clientY,
2295
+ target: landedOn(event),
2296
+ time: eventTime(event)
2297
+ });
2298
+ if (this.claimedLifts.length > CLAIMED_LIFT_LIMIT) {
2299
+ this.claimedLifts.shift();
2300
+ }
2301
+ this.armClaimedLiftTimer();
2302
+ }
2303
+
2304
+ /** Arm the one timer for the oldest claimed lift still waiting. */
2305
+ armClaimedLiftTimer() {
2306
+ if (this.claimedLiftTimer != null || this.claimedLifts.length === 0) {
2307
+ return;
2308
+ }
2309
+ const due = this.claimedLifts[0].time + CLAIMED_LIFT_MS;
2310
+ this.claimedLiftTimer = this.clock.setTimeout(() => {
2311
+ this.claimedLiftTimer = null;
2312
+ const now = this.clock.now();
2313
+ for (let i = this.claimedLifts.length - 1; i >= 0; i--) {
2314
+ if (now - this.claimedLifts[i].time >= CLAIMED_LIFT_MS) {
2315
+ this.claimedLifts.splice(i, 1);
2316
+ }
2317
+ }
2318
+ this.armClaimedLiftTimer();
2319
+ }, Math.max(0, due - this.clock.now()));
2320
+ }
2321
+
2322
+ /** Drop every claimed lift and its timer, once the last one is taken. */
2323
+ clearClaimedLifts() {
2324
+ this.claimedLifts.length = 0;
2325
+ if (this.claimedLiftTimer != null) {
2326
+ this.clock.clearTimeout(this.claimedLiftTimer);
2327
+ this.claimedLiftTimer = null;
2328
+ }
2329
+ }
1556
2330
  onPointerCancel = event => {
2331
+ this.releaseArmedPress();
1557
2332
  if (event.pointerType === 'touch' && this.usesTouchEvents) {
1558
2333
  const id = this.fingerPointers.get(event.pointerId) ?? this.touchForCancelledPointer(event);
1559
2334
  this.fingerPointers.delete(event.pointerId);
1560
2335
  this.pendingPointers.delete(event.pointerId);
1561
2336
  if (id != null) {
1562
- this.arena.browserTookOver([id], eventTime(event));
2337
+ // The pointer channel ends here while the finger keeps moving (the
2338
+ // browser scrolls with it): its touch events, now the only channel,
2339
+ // sample it, as a watcher following the scroll to the lift needs.
2340
+ this.pointerFed.delete(id);
2341
+ this.browserTook([id], eventTime(event));
1563
2342
  }
1564
2343
  return;
1565
2344
  }
1566
2345
  const id = this.pointerIds.get(event.pointerId);
1567
2346
  if (id != null) {
1568
2347
  this.pointerIds.delete(event.pointerId);
1569
- this.releaseSelection(id);
2348
+ this.unlockSelection(id);
2349
+ this.retargeted.delete(id);
1570
2350
  this.arena.cancelled([id], eventTime(event));
1571
2351
  }
1572
- this.releaseArmedPress();
1573
2352
  };
1574
2353
 
1575
2354
  /**
@@ -1582,7 +2361,7 @@ export class GestureHost {
1582
2361
  let best = null;
1583
2362
  let bestDistance = Number.POSITIVE_INFINITY;
1584
2363
  for (const touch of this.arena.touches) {
1585
- if (touch.pointerType !== 'touch' || touch.phase === 'ended' || touch.phase === 'cancelled' || touch.target !== event.target) {
2364
+ if (touch.pointerType !== 'touch' || touch.phase === 'ended' || touch.phase === 'cancelled' || touch.target !== landedOn(event)) {
1586
2365
  continue;
1587
2366
  }
1588
2367
  const d = Math.hypot(touch.x - event.clientX, touch.y - event.clientY);
@@ -1599,46 +2378,26 @@ export class GestureHost {
1599
2378
 
1600
2379
  // --- Clicks, menus, scrolls, focus -----------------------------------------
1601
2380
 
1602
- armSwallower() {
1603
- this.swallowDeadline = browserClock.now() + UIKIT_GESTURES.click.strayClickWindow.value;
1604
- }
1605
- disarmSwallower() {
1606
- this.swallowDeadline = Number.NEGATIVE_INFINITY;
1607
- }
1608
- onClick = event => {
1609
- if (browserClock.now() > this.swallowDeadline) {
1610
- return;
1611
- }
1612
- if (!event.isTrusted || event.detail === 0) {
1613
- return;
1614
- }
1615
- if (event.target instanceof Element && event.target.hasAttribute(HAPTIC_SWITCH_ATTRIBUTE)) {
1616
- return;
1617
- }
1618
- this.disarmSwallower();
1619
- event.preventDefault();
1620
- event.stopImmediatePropagation();
1621
- };
1622
2381
  replayClick(touch, allowed) {
1623
2382
  if (!allowed) {
1624
2383
  return;
1625
2384
  }
1626
2385
  // The browser's own click was swallowed while recognizers decided; they
1627
2386
  // all failed, so the click the touch earned is delivered now.
1628
- this.disarmSwallower();
2387
+ disarmClickGuard(this.doc);
1629
2388
  const target = touch.target;
1630
2389
  const view = this.doc.defaultView;
1631
2390
  if (!(target instanceof Element) || !target.isConnected || view == null) {
1632
2391
  return;
1633
2392
  }
1634
- target.dispatchEvent(new view.MouseEvent('click', {
2393
+ withoutClickGuard(() => target.dispatchEvent(new view.MouseEvent('click', {
1635
2394
  bubbles: true,
1636
2395
  cancelable: true,
1637
2396
  composed: true,
1638
2397
  detail: 1,
1639
2398
  clientX: touch.x,
1640
2399
  clientY: touch.y
1641
- }));
2400
+ })));
1642
2401
  }
1643
2402
  onContextMenu = event => {
1644
2403
  for (const touch of this.arena.touches) {
@@ -1657,16 +2416,38 @@ export class GestureHost {
1657
2416
  * reports itself through pointercancel or touchcancel.
1658
2417
  */
1659
2418
  ownScroll(scroller) {
1660
- this.ownedScrolls.add(scroller);
2419
+ const call = ++this.ownScrollCalls;
2420
+ this.ownedScrolls.set(scroller, call);
1661
2421
  const view = this.doc.defaultView;
1662
2422
  if (view == null) {
1663
2423
  return;
1664
2424
  }
1665
- view.requestAnimationFrame(() => {
1666
- view.requestAnimationFrame(() => {
1667
- this.ownedScrolls.delete(scroller);
2425
+ // A newer call keeps it until its own frame has passed: its frames
2426
+ // replace the older call's.
2427
+ this.ownScrollFrames.get(scroller)?.();
2428
+ let inner = 0;
2429
+ const outer = view.requestAnimationFrame(() => {
2430
+ inner = view.requestAnimationFrame(() => {
2431
+ this.ownScrollFrames.delete(scroller);
2432
+ if (this.ownedScrolls.get(scroller) === call) {
2433
+ this.ownedScrolls.delete(scroller);
2434
+ }
1668
2435
  });
1669
2436
  });
2437
+ this.ownScrollFrames.set(scroller, () => {
2438
+ view.cancelAnimationFrame(outer);
2439
+ if (inner !== 0) {
2440
+ view.cancelAnimationFrame(inner);
2441
+ }
2442
+ });
2443
+ }
2444
+
2445
+ /**
2446
+ * @internal Whether a recognizer is scrolling `scroller` itself now
2447
+ * (ownScroll): that scroll is not a finger's (fingerScroll.ts reads it).
2448
+ */
2449
+ isOwnScroll(scroller) {
2450
+ return this.ownedScrolls.has(scroller);
1670
2451
  }
1671
2452
  onScroll = event => {
1672
2453
  const time = eventTime(event);
@@ -1677,7 +2458,7 @@ export class GestureHost {
1677
2458
  // A scroll is a finger's only if that finger was inside this scroller,
1678
2459
  // recently; anything else is the program moving something.
1679
2460
  const last = this.lastTouch;
1680
- if (last != null && time - last.time < UIKIT_GESTURES.press.momentumMemory.value && scroller.contains(last.target)) {
2461
+ if (last != null && time - last.time < UIKIT_PRESS.momentumMemory.value && containsAlongFlatTree(scroller, last.target)) {
1681
2462
  this.lastScroll = {
1682
2463
  scroller,
1683
2464
  time
@@ -1688,59 +2469,108 @@ export class GestureHost {
1688
2469
  if (touch.takenByBrowser || touch.phase === 'ended' || touch.phase === 'cancelled' || touch.pointerType !== 'touch' || this.arena.isClaimed(touch.id)) {
1689
2470
  continue;
1690
2471
  }
1691
- if (touch.target instanceof Node && scroller.contains(touch.target) &&
2472
+ if (touch.target instanceof Node && containsAlongFlatTree(scroller, touch.target) &&
1692
2473
  // Only a pan this finger drove takes the touch: the browser starts
1693
2474
  // one only once the finger has travelled the take distance
1694
2475
  // (spec:AST-094 FR20). A scroll under a finger that has not
1695
2476
  // (scrollIntoView, a transcript pinned to its end, scroll
1696
2477
  // anchoring) is the page's own: the touch, and the click it earns,
1697
2478
  // stay where they are.
1698
- Math.hypot(touch.x - touch.startX, touch.y - touch.startY) >= UIKIT_GESTURES.press.slop.value) {
2479
+ Math.hypot(touch.x - touch.startX, touch.y - touch.startY) >= UIKIT_PRESS.slop.value) {
1699
2480
  taken.push(touch.id);
1700
2481
  }
1701
2482
  }
1702
2483
  if (taken.length > 0) {
1703
- this.arena.browserTookOver(taken, time);
2484
+ this.browserTook(taken, time);
1704
2485
  }
1705
2486
  };
2487
+ noteFingersDown(event) {
2488
+ const fingers = [];
2489
+ for (const touch of touchesOf(event.touches)) {
2490
+ if (touch.touchType !== 'stylus') {
2491
+ if (touch.target instanceof Node) {
2492
+ fingers.push(touch.target);
2493
+ }
2494
+ }
2495
+ }
2496
+ this.fingerTargets = fingers;
2497
+ for (const listener of [...this.fingerListeners]) {
2498
+ listener();
2499
+ }
2500
+ }
2501
+
2502
+ /**
2503
+ * A second finger landed somewhere (wherever: often on a plain row): a
2504
+ * pan that takes one finger only and has not claimed its touch fails, so
2505
+ * the two fingers stay the browser's pinch (WCAG 1.4.4) instead of the
2506
+ * pan claiming them midway. A drag a recognizer has claimed keeps its
2507
+ * finger: a second finger never cancels or redirects it (`spec:AST-094`
2508
+ * FR10), and no claim is released here.
2509
+ */
2510
+ failUnclaimedLoneFingerPans() {
2511
+ for (const recognizer of [...this.arena.involvedRecognizers]) {
2512
+ if (isPanRecognizer(recognizer) && recognizer.state === 'possible' && recognizer.maximumNumberOfTouches === 1 && recognizer.trackedTouches.length > 0 && recognizer.trackedTouches.every(touch => touch.pointerType === 'touch' && !this.arena.isClaimed(touch.id))) {
2513
+ recognizer.cancel();
2514
+ }
2515
+ }
2516
+ }
1706
2517
  onVisibilityChange = () => {
1707
2518
  if (this.doc.visibilityState === 'hidden') {
1708
2519
  this.cancelEverything(this.arena.now());
2520
+ // As at a blur: the press sends no further pointer event, so an armed
2521
+ // press's page listeners go now (FR24).
1709
2522
  this.releaseArmedPress();
1710
2523
  }
1711
2524
  };
1712
2525
  onBlur = () => {
1713
2526
  this.cancelEverything(this.arena.now());
2527
+ // The press a blur ends sends no further pointer event: an armed press's
2528
+ // page listeners go now, as at its lift (FR24).
1714
2529
  this.releaseArmedPress();
1715
2530
  };
1716
2531
 
2532
+ /** Whether the browser sends Touch Events at all (`ontouchstart`). */
2533
+ sendsTouchEvents() {
2534
+ const view = this.doc.defaultView;
2535
+ return view != null && 'ontouchstart' in view;
2536
+ }
2537
+
2538
+ /**
2539
+ * Whether the host reads fingers from their pointer events: Pointer Events
2540
+ * input, or a window with no `ontouchstart` (touch emulation turned on
2541
+ * after load), as the move path does.
2542
+ */
2543
+ readsFingersFromPointerEvents() {
2544
+ const view = this.doc.defaultView;
2545
+ return this.inputMode === 'pointer-events' || view != null && !('ontouchstart' in view);
2546
+ }
2547
+
1717
2548
  /** The app lost focus: UIKit cancels every touch in flight. */
1718
2549
  cancelEverything(time) {
1719
2550
  const ids = [...this.pointerIds.values()];
1720
2551
  for (const id of ids) {
1721
- this.releaseSelection(id);
2552
+ this.unlockSelection(id);
1722
2553
  }
1723
2554
  for (const identifier of [...this.touchIds.keys()]) {
2555
+ // The browser may keep the touch alive: its lift must not click.
2556
+ this.cancelledFingers.add(identifier);
1724
2557
  const id = this.forgetFinger(identifier);
1725
2558
  if (id != null) {
1726
2559
  ids.push(id);
1727
2560
  }
1728
2561
  }
1729
2562
  this.pointerIds.clear();
2563
+ this.retargeted.clear();
1730
2564
  this.fingerPointers.clear();
1731
2565
  this.pendingPointers.clear();
1732
2566
  this.unpairedTouches.clear();
1733
2567
  this.lastFed.clear();
2568
+ this.pointerFed.clear();
1734
2569
  if (ids.length > 0) {
1735
2570
  this.arena.cancelled(ids, time);
1736
2571
  }
1737
2572
  }
1738
2573
  }
1739
-
1740
- /** Whether an attachment could take a press now: something on it is enabled. */
1741
- function isServed(registration) {
1742
- return registration.recognizers.some(r => r.isEnabled) || registration.consumer != null && registration.consumer.isEnabled?.() !== false;
1743
- }
1744
2574
  function needsSuppression(dispositions) {
1745
2575
  for (const disposition of dispositions.values()) {
1746
2576
  if (disposition !== 'allow') {
@@ -1760,14 +2590,13 @@ function coalescedHistory(event) {
1760
2590
  time: eventTime(sample)
1761
2591
  }));
1762
2592
  }
1763
- const hosts = new WeakMap();
1764
2593
 
1765
2594
  /** The gesture host of a document, created on first use. */
1766
2595
  export function getGestureHost(doc) {
1767
- let host = hosts.get(doc);
2596
+ let host = gestureHosts.get(doc);
1768
2597
  if (host == null) {
1769
2598
  host = new GestureHost(doc);
1770
- hosts.set(doc, host);
2599
+ gestureHosts.set(doc, host);
1771
2600
  }
1772
2601
  return host;
1773
2602
  }