@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.
- package/CHANGELOG.md +270 -0
- package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +4 -2
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +48 -36
- package/dist/Avatar/Avatar.d.ts +1 -1
- package/dist/Avatar/Avatar.d.ts.map +1 -1
- package/dist/Avatar/Avatar.js +6 -4
- package/dist/AvatarGroup/AvatarGroup.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroup.js +4 -2
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.js +5 -3
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +10 -7
- package/dist/BottomSheet/BottomSheet.d.ts +3 -51
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +95 -91
- package/dist/BottomSheet/BottomSheetEdgeTint.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetEdgeTint.js +10 -21
- package/dist/BottomSheet/BottomSheetHostContext.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetHostContext.js +6 -10
- package/dist/BottomSheet/BottomSheetPanel.d.ts +14 -8
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +73 -50
- package/dist/BottomSheet/BottomSheetSwitcher.d.ts +16 -62
- package/dist/BottomSheet/BottomSheetSwitcher.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetSwitcher.js +54 -72
- package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts +8 -0
- package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetEscape.js +3 -3
- package/dist/BottomSheet/bottomSheetStack.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetStack.js +42 -96
- package/dist/BottomSheet/useMobileKeyboard.d.ts +0 -14
- package/dist/BottomSheet/useMobileKeyboard.d.ts.map +1 -1
- package/dist/BottomSheet/useMobileKeyboard.js +56 -22
- package/dist/BottomSheet/useSheetGestures.d.ts +34 -68
- package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
- package/dist/BottomSheet/useSheetGestures.js +111 -100
- package/dist/Breadcrumbs/BreadcrumbItem.js +4 -2
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +6 -3
- package/dist/Button/Button.d.ts +1 -1
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +19 -10
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +14 -12
- package/dist/Calendar/hooks/useCalendarNavigation.d.ts.map +1 -1
- package/dist/Calendar/hooks/useCalendarNavigation.js +4 -7
- package/dist/Carousel/Carousel.d.ts.map +1 -1
- package/dist/Carousel/Carousel.js +6 -3
- package/dist/Center/Center.d.ts +1 -1
- package/dist/Center/Center.js +1 -1
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +16 -8
- package/dist/Chat/ChatComposerDrawer.d.ts +1 -1
- package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
- package/dist/Chat/ChatComposerDrawer.js +5 -3
- package/dist/Chat/ChatComposerInput.d.ts +1 -1
- package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
- package/dist/Chat/ChatComposerInput.js +16 -4
- package/dist/Chat/ChatDictationButton.d.ts.map +1 -1
- package/dist/Chat/ChatDictationButton.js +6 -3
- package/dist/Chat/ChatLayout.d.ts.map +1 -1
- package/dist/Chat/ChatLayout.js +7 -4
- package/dist/Chat/ChatLayoutScrollButton.d.ts.map +1 -1
- package/dist/Chat/ChatLayoutScrollButton.js +6 -3
- package/dist/Chat/ChatMessage.d.ts.map +1 -1
- package/dist/Chat/ChatMessage.js +12 -4
- package/dist/Chat/ChatMessageList.d.ts.map +1 -1
- package/dist/Chat/ChatMessageList.js +7 -3
- package/dist/Chat/ChatMessageMetadata.d.ts.map +1 -1
- package/dist/Chat/ChatMessageMetadata.js +4 -2
- package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
- package/dist/Chat/ChatPastedTextToken.js +23 -7
- package/dist/Chat/ChatSendButton.d.ts.map +1 -1
- package/dist/Chat/ChatSendButton.js +6 -3
- package/dist/Chat/ChatSystemMessage.d.ts.map +1 -1
- package/dist/Chat/ChatSystemMessage.js +2 -1
- package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
- package/dist/Chat/ChatToolCalls.js +7 -4
- package/dist/Chat/chatMessage.vars.stylex.d.ts +16 -0
- package/dist/Chat/chatMessage.vars.stylex.d.ts.map +1 -0
- package/dist/Chat/chatMessage.vars.stylex.js +19 -0
- package/dist/Chat/useSpeechRecognition.d.ts.map +1 -1
- package/dist/Chat/useSpeechRecognition.js +5 -2
- package/dist/Chat/useTriggerMenu.d.ts +1 -1
- package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
- package/dist/Chat/useTriggerMenu.js +37 -35
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +5 -3
- package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxList.js +5 -2
- package/dist/CheckboxList/CheckboxListContext.d.ts +8 -0
- package/dist/CheckboxList/CheckboxListContext.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +10 -4
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +4 -2
- package/dist/Code/Code.d.ts +1 -1
- package/dist/Code/Code.js +1 -1
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +30 -8
- package/dist/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/Collapsible/Collapsible.js +23 -3
- package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPalette.js +24 -8
- package/dist/CommandPalette/CommandPaletteEmpty.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteEmpty.js +1 -0
- package/dist/CommandPalette/CommandPaletteFooter.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteFooter.js +4 -2
- package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteInput.js +12 -7
- package/dist/CommandPalette/CommandPaletteList.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteList.js +4 -2
- package/dist/ComplexSelector/ComplexSelector.d.ts +2 -2
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +5 -3
- package/dist/ContextMenu/ContextMenu.d.ts +6 -0
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +35 -9
- package/dist/DateInput/DateInput.d.ts +3 -2
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +60 -15
- package/dist/DateInput/MonthScroller.d.ts.map +1 -1
- package/dist/DateInput/MonthScroller.js +4 -3
- package/dist/DateInput/NativeDateField.d.ts.map +1 -1
- package/dist/DateInput/NativeDateField.js +7 -8
- package/dist/DateInput/TouchDateField.d.ts.map +1 -1
- package/dist/DateInput/TouchDateField.js +12 -12
- package/dist/DateRangeInput/DateRangeInput.d.ts +3 -2
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +7 -8
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +41 -26
- package/dist/DateTimeInput/NativeDateSegment.d.ts.map +1 -1
- package/dist/DateTimeInput/NativeDateSegment.js +5 -2
- package/dist/DateTimeInput/NativeTimeSegment.d.ts.map +1 -1
- package/dist/DateTimeInput/NativeTimeSegment.js +5 -2
- package/dist/DateTimeInput/TouchDateTimeField.d.ts.map +1 -1
- package/dist/DateTimeInput/TouchDateTimeField.js +12 -12
- package/dist/Dialog/Dialog.d.ts +1 -1
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +35 -19
- package/dist/Dialog/DialogHeader.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.js +4 -2
- package/dist/Drawer/Drawer.d.ts +2 -2
- package/dist/Drawer/Drawer.d.ts.map +1 -1
- package/dist/Drawer/Drawer.js +27 -5
- package/dist/Drawer/DrawerHeader.d.ts.map +1 -1
- package/dist/Drawer/DrawerHeader.js +4 -2
- package/dist/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +31 -73
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts +3 -2
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +4 -3
- package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.js +4 -3
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts +4 -3
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +4 -3
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +15 -9
- package/dist/DropdownMenu/MenuBottomSheetActionList.d.ts.map +1 -1
- package/dist/DropdownMenu/MenuBottomSheetActionList.js +9 -3
- package/dist/Field/Field.d.ts +2 -2
- package/dist/Field/Field.d.ts.map +1 -1
- package/dist/Field/FieldLabel.d.ts +1 -1
- package/dist/Field/FieldLabel.d.ts.map +1 -1
- package/dist/Field/FieldLabel.js +10 -16
- package/dist/Field/InputClearButton.d.ts.map +1 -1
- package/dist/Field/InputClearButton.js +5 -3
- package/dist/Field/PanelSearchInput.d.ts.map +1 -1
- package/dist/Field/PanelSearchInput.js +10 -5
- package/dist/Field/fieldStatusPlacement.d.ts +15 -0
- package/dist/Field/fieldStatusPlacement.d.ts.map +1 -0
- package/dist/Field/fieldStatusPlacement.js +1 -0
- package/dist/Field/index.d.ts +4 -1
- package/dist/Field/index.d.ts.map +1 -1
- package/dist/Field/index.js +2 -1
- package/dist/Field/inputDisabledFocus.d.ts +16 -3
- package/dist/Field/inputDisabledFocus.d.ts.map +1 -1
- package/dist/Field/inputDisabledFocus.js +19 -3
- package/dist/Field/inputStyles.stylex.d.ts +12 -9
- package/dist/Field/inputStyles.stylex.d.ts.map +1 -1
- package/dist/Field/inputStyles.stylex.js +12 -9
- package/dist/Field/textEntryTraits.d.ts +86 -0
- package/dist/Field/textEntryTraits.d.ts.map +1 -0
- package/dist/Field/textEntryTraits.js +81 -0
- package/dist/FieldStatus/FieldStatus.d.ts +13 -28
- package/dist/FieldStatus/FieldStatus.d.ts.map +1 -1
- package/dist/FieldStatus/FieldStatus.js +25 -3
- package/dist/FieldStatus/index.d.ts +7 -0
- package/dist/FieldStatus/index.d.ts.map +1 -1
- package/dist/FileInput/FileInput.d.ts +7 -2
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +31 -4
- package/dist/Grid/Grid.d.ts +6 -4
- package/dist/Grid/Grid.d.ts.map +1 -1
- package/dist/Grid/GridSpan.d.ts +2 -0
- package/dist/Grid/GridSpan.d.ts.map +1 -1
- package/dist/Grid/GridSpan.js +2 -0
- package/dist/HStack/HStack.d.ts +2 -1
- package/dist/HStack/HStack.d.ts.map +1 -1
- package/dist/HStack/HStack.js +2 -1
- package/dist/Heading/Heading.d.ts +5 -3
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/Heading/Heading.js +5 -3
- package/dist/HoverCard/HoverCard.d.ts +8 -5
- package/dist/HoverCard/HoverCard.d.ts.map +1 -1
- package/dist/HoverCard/HoverCard.js +1 -0
- package/dist/HoverCard/useHoverCard.d.ts +3 -2
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +7 -0
- package/dist/InputGroup/groupStyles.d.ts.map +1 -1
- package/dist/InputGroup/groupStyles.js +12 -6
- package/dist/Item/Item.js +5 -5
- package/dist/Item/ItemSwipeLayer.d.ts.map +1 -1
- package/dist/Item/ItemSwipeLayer.js +8 -2
- package/dist/Kbd/Kbd.d.ts.map +1 -1
- package/dist/Kbd/Kbd.js +7 -3
- package/dist/Layer/layerClickBoundary.d.ts +35 -0
- package/dist/Layer/layerClickBoundary.d.ts.map +1 -0
- package/dist/Layer/layerClickBoundary.js +61 -0
- package/dist/Layer/layerStructureReset.stylex.d.ts +1 -0
- package/dist/Layer/layerStructureReset.stylex.d.ts.map +1 -1
- package/dist/Layer/layerStructureReset.stylex.js +1 -0
- package/dist/Layer/layerSurfacePress.d.ts +9 -0
- package/dist/Layer/layerSurfacePress.d.ts.map +1 -0
- package/dist/Layer/layerSurfacePress.js +35 -0
- package/dist/Layer/outsidePress.d.ts +45 -0
- package/dist/Layer/outsidePress.d.ts.map +1 -0
- package/dist/Layer/outsidePress.js +132 -0
- package/dist/Layer/useLayer.d.ts +8 -0
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +17 -6
- package/dist/Layer/useTouchTrigger.d.ts +26 -3
- package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
- package/dist/Layer/useTouchTrigger.js +79 -10
- package/dist/Layout/LayoutSlotsContext.d.ts +5 -0
- package/dist/Layout/LayoutSlotsContext.d.ts.map +1 -1
- package/dist/Layout/LayoutSlotsContext.js +3 -2
- package/dist/Layout/layoutReset.d.ts +44 -0
- package/dist/Layout/layoutReset.d.ts.map +1 -0
- package/dist/Layout/layoutReset.js +40 -0
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +14 -7
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +5 -3
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +5 -2
- package/dist/Markdown/plugins/HeadingLinksRenderer.d.ts.map +1 -1
- package/dist/Markdown/plugins/HeadingLinksRenderer.js +4 -2
- package/dist/MetadataList/MetadataList.d.ts +1 -1
- package/dist/MetadataList/MetadataList.d.ts.map +1 -1
- package/dist/MetadataList/MetadataList.js +9 -5
- package/dist/MetadataList/MetadataListItem.d.ts.map +1 -1
- package/dist/MetadataList/MetadataListItem.js +2 -1
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +15 -5
- package/dist/MobileNav/MobileNavToggle.d.ts.map +1 -1
- package/dist/MobileNav/MobileNavToggle.js +4 -2
- package/dist/MoreMenu/MoreMenu.d.ts.map +1 -1
- package/dist/MoreMenu/MoreMenu.js +4 -2
- package/dist/MultiSelector/MultiSelector.d.ts +2 -2
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +22 -23
- package/dist/MultiSelector/hooks.d.ts.map +1 -1
- package/dist/MultiSelector/hooks.js +4 -2
- package/dist/NavMenu/NavHeadingMenuItem.d.ts.map +1 -1
- package/dist/NavMenu/NavHeadingMenuItem.js +2 -1
- package/dist/NumberInput/NumberInput.d.ts +3 -2
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +7 -3
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +4 -2
- package/dist/OverflowList/OverflowList.d.ts.map +1 -1
- package/dist/OverflowList/OverflowList.js +2 -1
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +6 -3
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/Popover/Popover.js +8 -5
- package/dist/Popover/usePopover.d.ts +7 -1
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +12 -4
- package/dist/PowerSearch/PowerSearch.d.ts +3 -2
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +8 -4
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +7 -4
- package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchToken.js +2 -2
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +16 -13
- package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatFilterValue.js +3 -0
- package/dist/PowerSearch/resolveOperatorLabel.d.ts +4 -1
- package/dist/PowerSearch/resolveOperatorLabel.d.ts.map +1 -1
- package/dist/PowerSearch/resolveOperatorLabel.js +5 -0
- package/dist/PowerSearch/usePowerSearchConfig.d.ts.map +1 -1
- package/dist/PowerSearch/usePowerSearchConfig.js +3 -0
- package/dist/PowerSearch/usePowerSearchSource.d.ts.map +1 -1
- package/dist/PowerSearch/usePowerSearchSource.js +3 -2
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +3 -1
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +7 -2
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +8 -2
- package/dist/RadioList/RadioListReasonContext.d.ts +2 -0
- package/dist/RadioList/RadioListReasonContext.d.ts.map +1 -0
- package/dist/RadioList/RadioListReasonContext.js +22 -0
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +4 -2
- package/dist/Resizable/resizableModel.d.ts +64 -0
- package/dist/Resizable/resizableModel.d.ts.map +1 -0
- package/dist/Resizable/resizableModel.js +287 -0
- package/dist/Resizable/useResizable.d.ts +2 -2
- package/dist/Resizable/useResizable.d.ts.map +1 -1
- package/dist/Resizable/useResizable.js +1 -284
- package/dist/SegmentedControl/SegmentedControl.d.ts +7 -5
- package/dist/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControl.js +26 -16
- package/dist/SegmentedControl/SegmentedControlContext.d.ts +4 -5
- package/dist/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.d.ts +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +16 -13
- package/dist/SelectableCard/SelectableCard.d.ts.map +1 -1
- package/dist/SelectableCard/SelectableCard.js +59 -0
- package/dist/Selector/Selector.d.ts +3 -3
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +11 -10
- package/dist/Selector/useSelectorPresentation.d.ts +7 -1
- package/dist/Selector/useSelectorPresentation.d.ts.map +1 -1
- package/dist/Selector/useSelectorPresentation.js +2 -1
- package/dist/SideNav/SideNav.d.ts.map +1 -1
- package/dist/SideNav/SideNav.js +156 -23
- package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
- package/dist/SideNav/SideNavCollapseButton.js +16 -4
- package/dist/SideNav/SideNavFocusTargetsContext.d.ts +11 -0
- package/dist/SideNav/SideNavFocusTargetsContext.d.ts.map +1 -0
- package/dist/SideNav/SideNavFocusTargetsContext.js +16 -0
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +26 -17
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +21 -5
- package/dist/SideNav/SideNavSection.d.ts.map +1 -1
- package/dist/SideNav/SideNavSection.js +2 -1
- package/dist/SideNav/railMotion.d.ts +5 -5
- package/dist/SideNav/railMotion.d.ts.map +1 -1
- package/dist/SideNav/railMotion.js +69 -177
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +16 -10
- package/dist/Spinner/Spinner.d.ts +1 -1
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +6 -4
- package/dist/Stack/Stack.d.ts +1 -1
- package/dist/Stack/stack.stylex.d.ts +1 -1
- package/dist/Stack/stack.stylex.js +1 -1
- package/dist/Stepper/Step.d.ts.map +1 -1
- package/dist/Stepper/Step.js +6 -3
- package/dist/Stepper/Stepper.d.ts.map +1 -1
- package/dist/Stepper/Stepper.js +5 -3
- package/dist/Switch/Switch.d.ts +1 -1
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +5 -3
- package/dist/TabList/TabList.d.ts.map +1 -1
- package/dist/TabList/TabList.js +5 -3
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +11 -8
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +6 -3
- package/dist/Table/TableSelectionToolbar.d.ts.map +1 -1
- package/dist/Table/TableSelectionToolbar.js +4 -2
- package/dist/Table/glidingDivider.d.ts +8 -1
- package/dist/Table/glidingDivider.d.ts.map +1 -1
- package/dist/Table/glidingDivider.js +8 -3
- package/dist/Table/plugins/columnResize/useTableColumnResize.d.ts.map +1 -1
- package/dist/Table/plugins/columnResize/useTableColumnResize.js +6 -3
- package/dist/Table/plugins/filtering/useTableFiltering.d.ts.map +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.js +14 -10
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -1
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +5 -3
- package/dist/Table/plugins/pagination/useTablePagination.d.ts.map +1 -1
- package/dist/Table/plugins/pagination/useTablePagination.js +6 -3
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +8 -5
- package/dist/Table/plugins/rowStatus/useTableRowStatus.d.ts.map +1 -1
- package/dist/Table/plugins/rowStatus/useTableRowStatus.js +6 -3
- package/dist/Table/plugins/selection/useTableSelection.d.ts.map +1 -1
- package/dist/Table/plugins/selection/useTableSelection.js +7 -4
- package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortable.js +8 -5
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +1 -2
- package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
- package/dist/Table/plugins/tree/useTableTreeData.js +8 -5
- package/dist/Text/text.stylex.d.ts +2 -0
- package/dist/Text/text.stylex.d.ts.map +1 -1
- package/dist/Text/text.stylex.js +11 -0
- package/dist/TextArea/TextArea.d.ts +7 -5
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +25 -7
- package/dist/TextInput/TextInput.d.ts +23 -8
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +30 -5
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +4 -2
- package/dist/TimeInput/TimeInput.d.ts +3 -2
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +7 -10
- package/dist/TimeInput/TouchTimeField.d.ts.map +1 -1
- package/dist/TimeInput/TouchTimeField.js +8 -9
- package/dist/Timer/Timer.js +1 -1
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +5 -3
- package/dist/Timestamp/TimestampHoverCard.d.ts.map +1 -1
- package/dist/Timestamp/TimestampHoverCard.js +4 -2
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +5 -3
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +6 -2
- package/dist/Toast/useToast.d.ts.map +1 -1
- package/dist/Toast/useToast.js +8 -2
- package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButton.js +11 -3
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +8 -3
- package/dist/Token/TokenLink.d.ts +9 -2
- package/dist/Token/TokenLink.d.ts.map +1 -1
- package/dist/Token/TokenLink.js +2 -0
- package/dist/Tokenizer/Tokenizer.d.ts +12 -5
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +81 -54
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts +1 -1
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts.map +1 -1
- package/dist/Tokenizer/TokenizerBottomSheet.js +6 -4
- package/dist/Tooltip/Tooltip.d.ts +4 -3
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.d.ts +4 -3
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +40 -8
- package/dist/TopNav/TopNav.d.ts.map +1 -1
- package/dist/TopNav/TopNav.js +19 -13
- package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
- package/dist/TopNav/TopNavHeading.js +23 -13
- package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenu.js +4 -3
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.js +9 -2
- package/dist/TopNav/TopNavMegaMenuItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenuItem.js +3 -2
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +2 -1
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +68 -7
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +10 -6
- package/dist/Typeahead/BaseTypeahead.d.ts +8 -5
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +432 -68
- package/dist/Typeahead/Typeahead.d.ts +13 -8
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.disabled.a11y.chromium.spec.d.ts.map +1 -0
- package/dist/Typeahead/Typeahead.js +13 -9
- package/dist/Typeahead/committedChoicesKey.d.ts +12 -0
- package/dist/Typeahead/committedChoicesKey.d.ts.map +1 -0
- package/dist/Typeahead/committedChoicesKey.js +24 -0
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.d.ts.map +1 -1
- package/dist/Typeahead/types.d.ts +26 -3
- package/dist/Typeahead/types.d.ts.map +1 -1
- package/dist/astryx.css +27 -7
- package/dist/gestures/GestureArena.d.ts +17 -3
- package/dist/gestures/GestureArena.d.ts.map +1 -1
- package/dist/gestures/GestureArena.js +70 -38
- package/dist/gestures/GestureHost.d.ts +330 -95
- package/dist/gestures/GestureHost.d.ts.map +1 -1
- package/dist/gestures/GestureHost.js +1304 -475
- package/dist/gestures/GestureRecognizer.d.ts +56 -17
- package/dist/gestures/GestureRecognizer.d.ts.map +1 -1
- package/dist/gestures/GestureRecognizer.js +28 -2
- package/dist/gestures/LongPressGestureRecognizer.d.ts +2 -0
- package/dist/gestures/LongPressGestureRecognizer.d.ts.map +1 -1
- package/dist/gestures/LongPressGestureRecognizer.js +14 -1
- package/dist/gestures/PanGestureRecognizer.d.ts +11 -0
- package/dist/gestures/PanGestureRecognizer.d.ts.map +1 -1
- package/dist/gestures/PanGestureRecognizer.js +25 -0
- package/dist/gestures/PinchGestureRecognizer.d.ts +3 -2
- package/dist/gestures/PinchGestureRecognizer.d.ts.map +1 -1
- package/dist/gestures/PinchGestureRecognizer.js +10 -8
- package/dist/gestures/PressTracker.d.ts +31 -3
- package/dist/gestures/PressTracker.d.ts.map +1 -1
- package/dist/gestures/PressTracker.js +25 -6
- package/dist/gestures/TapGestureRecognizer.d.ts +2 -0
- package/dist/gestures/TapGestureRecognizer.d.ts.map +1 -1
- package/dist/gestures/TapGestureRecognizer.js +5 -0
- package/dist/gestures/VelocityTracker.d.ts +12 -0
- package/dist/gestures/VelocityTracker.d.ts.map +1 -1
- package/dist/gestures/VelocityTracker.js +38 -0
- package/dist/gestures/fingerScroll.d.ts +14 -0
- package/dist/gestures/fingerScroll.d.ts.map +1 -0
- package/dist/gestures/fingerScroll.js +181 -0
- package/dist/gestures/gestureSync.d.ts +12 -0
- package/dist/gestures/gestureSync.d.ts.map +1 -0
- package/dist/gestures/gestureSync.js +59 -0
- package/dist/gestures/haptics.d.ts +6 -3
- package/dist/gestures/haptics.d.ts.map +1 -1
- package/dist/gestures/haptics.js +9 -10
- package/dist/gestures/hostRegistry.d.ts +15 -0
- package/dist/gestures/hostRegistry.d.ts.map +1 -0
- package/dist/gestures/hostRegistry.js +16 -0
- package/dist/gestures/index.d.ts +6 -2
- package/dist/gestures/index.d.ts.map +1 -1
- package/dist/gestures/index.js +3 -1
- package/dist/gestures/nativeScroll.d.ts +2 -32
- package/dist/gestures/nativeScroll.d.ts.map +1 -1
- package/dist/gestures/nativeScroll.js +5 -17
- package/dist/gestures/pageHold.d.ts +21 -0
- package/dist/gestures/pageHold.d.ts.map +1 -0
- package/dist/gestures/pageHold.js +216 -0
- package/dist/gestures/recognizerInternals.d.ts +52 -0
- package/dist/gestures/recognizerInternals.d.ts.map +1 -0
- package/dist/gestures/recognizerInternals.js +33 -0
- package/dist/gestures/selectionLock.d.ts +10 -0
- package/dist/gestures/selectionLock.d.ts.map +1 -0
- package/dist/gestures/selectionLock.js +12 -0
- package/dist/gestures/touchAction.d.ts +10 -12
- package/dist/gestures/touchAction.d.ts.map +1 -1
- package/dist/gestures/touchAction.js +13 -21
- package/dist/gestures/types.d.ts +17 -0
- package/dist/gestures/types.d.ts.map +1 -1
- package/dist/gestures/useFingerScroll.d.ts +35 -0
- package/dist/gestures/useFingerScroll.d.ts.map +1 -0
- package/dist/gestures/useFingerScroll.js +70 -0
- package/dist/gestures/useGestureRecognizer.d.ts +23 -15
- package/dist/gestures/useGestureRecognizer.d.ts.map +1 -1
- package/dist/gestures/useGestureRecognizer.js +51 -160
- package/dist/gestures/usePressTracker.d.ts +34 -0
- package/dist/gestures/usePressTracker.d.ts.map +1 -0
- package/dist/gestures/usePressTracker.js +168 -0
- package/dist/hooks/ModalAnnounceProvider.d.ts +5 -6
- package/dist/hooks/ModalAnnounceProvider.d.ts.map +1 -1
- package/dist/hooks/ModalAnnounceProvider.js +13 -13
- package/dist/hooks/actionGroupTracker.d.ts +12 -0
- package/dist/hooks/actionGroupTracker.d.ts.map +1 -1
- package/dist/hooks/actionGroupTracker.js +23 -55
- package/dist/hooks/menuPressGesture.d.ts +21 -26
- package/dist/hooks/menuPressGesture.d.ts.map +1 -1
- package/dist/hooks/menuPressGesture.js +25 -30
- package/dist/hooks/menuPressMarker.d.ts +13 -0
- package/dist/hooks/menuPressMarker.d.ts.map +1 -0
- package/dist/hooks/menuPressMarker.js +15 -0
- package/dist/hooks/menuPressOnItems.d.ts +2 -9
- package/dist/hooks/menuPressOnItems.d.ts.map +1 -1
- package/dist/hooks/menuPressOnItems.js +7 -9
- package/dist/hooks/modalAnnounce.d.ts +1 -1
- package/dist/hooks/modalAnnounce.d.ts.map +1 -1
- package/dist/hooks/modalAnnounce.js +20 -39
- package/dist/hooks/scrollbarGutter.d.ts.map +1 -1
- package/dist/hooks/scrollbarGutter.js +9 -16
- package/dist/hooks/useAnimatedLayout.d.ts +2 -3
- package/dist/hooks/useAnimatedLayout.d.ts.map +1 -1
- package/dist/hooks/useAnimatedLayout.js +2 -3
- package/dist/hooks/useAnnounce.d.ts +16 -37
- package/dist/hooks/useAnnounce.d.ts.map +1 -1
- package/dist/hooks/useAnnounce.js +56 -92
- package/dist/hooks/useAnnounceRenderedText.d.ts +17 -48
- package/dist/hooks/useAnnounceRenderedText.d.ts.map +1 -1
- package/dist/hooks/useAnnounceRenderedText.js +22 -42
- package/dist/hooks/useAttachment.d.ts +22 -0
- package/dist/hooks/useAttachment.d.ts.map +1 -0
- package/dist/hooks/useAttachment.js +50 -0
- package/dist/hooks/useAutoMediaMode.d.ts.map +1 -1
- package/dist/hooks/useAutoMediaMode.js +29 -54
- package/dist/hooks/useBusyAnnouncement.d.ts +2 -16
- package/dist/hooks/useBusyAnnouncement.d.ts.map +1 -1
- package/dist/hooks/useBusyAnnouncement.js +13 -20
- package/dist/hooks/useClickableContainer.d.ts +30 -13
- package/dist/hooks/useClickableContainer.d.ts.map +1 -1
- package/dist/hooks/useClickableContainer.js +59 -34
- package/dist/hooks/useContainerReveal.d.ts +9 -36
- package/dist/hooks/useContainerReveal.d.ts.map +1 -1
- package/dist/hooks/useContainerReveal.js +9 -36
- package/dist/hooks/useDevWarning.d.ts.map +1 -1
- package/dist/hooks/useDevWarning.js +3 -8
- package/dist/hooks/useEntryAnimation.d.ts.map +1 -1
- package/dist/hooks/useEntryAnimation.js +1 -3
- package/dist/hooks/useFocusReturnVisibility.d.ts +8 -1
- package/dist/hooks/useFocusReturnVisibility.d.ts.map +1 -1
- package/dist/hooks/useFocusReturnVisibility.js +14 -8
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +2 -3
- package/dist/hooks/useHighlightedOptionScroll.d.ts +2 -4
- package/dist/hooks/useHighlightedOptionScroll.d.ts.map +1 -1
- package/dist/hooks/useHighlightedOptionScroll.js +1 -1
- package/dist/hooks/useHotkeys.d.ts.map +1 -1
- package/dist/hooks/useHotkeys.js +4 -16
- package/dist/hooks/useImageMode.d.ts.map +1 -1
- package/dist/hooks/useImageMode.js +6 -45
- package/dist/hooks/useIndicatorFocusRing.d.ts.map +1 -1
- package/dist/hooks/useIndicatorFocusRing.js +13 -38
- package/dist/hooks/useInputStatusIcon.d.ts +11 -3
- package/dist/hooks/useInputStatusIcon.d.ts.map +1 -1
- package/dist/hooks/useInputStatusIcon.js +21 -35
- package/dist/hooks/useInteractiveRole.d.ts.map +1 -1
- package/dist/hooks/useInteractiveRole.js +6 -24
- package/dist/hooks/useKeyboardHint.d.ts +1 -1
- package/dist/hooks/useKeyboardHint.d.ts.map +1 -1
- package/dist/hooks/useKeyboardHint.js +14 -5
- package/dist/hooks/useListFocus.d.ts +29 -0
- package/dist/hooks/useListFocus.d.ts.map +1 -1
- package/dist/hooks/useListFocus.js +53 -10
- package/dist/hooks/useLongPress.d.ts +21 -0
- package/dist/hooks/useLongPress.d.ts.map +1 -1
- package/dist/hooks/useLongPress.js +55 -28
- package/dist/hooks/useMenuHover.d.ts.map +1 -1
- package/dist/hooks/useMenuHover.js +38 -52
- package/dist/hooks/useMenuPress.d.ts +33 -40
- package/dist/hooks/useMenuPress.d.ts.map +1 -1
- package/dist/hooks/useMenuPress.js +108 -182
- package/dist/hooks/useOverflow.d.ts.map +1 -1
- package/dist/hooks/useOverflow.js +3 -8
- package/dist/hooks/useRenamedProp.d.ts.map +1 -1
- package/dist/hooks/useRenamedProp.js +8 -17
- package/dist/hooks/useScrollOverflow.d.ts.map +1 -1
- package/dist/hooks/useScrollOverflow.js +9 -27
- package/dist/hooks/useScrollableArea.d.ts +2 -4
- package/dist/hooks/useScrollableArea.d.ts.map +1 -1
- package/dist/hooks/useScrollableArea.js +14 -21
- package/dist/hooks/useSettledOpen.d.ts +16 -0
- package/dist/hooks/useSettledOpen.d.ts.map +1 -0
- package/dist/hooks/useSettledOpen.js +44 -0
- package/dist/hooks/useStreamingText.d.ts.map +1 -1
- package/dist/hooks/useStreamingText.js +14 -36
- package/dist/hooks/useTreeFocus.d.ts +11 -1
- package/dist/hooks/useTreeFocus.d.ts.map +1 -1
- package/dist/hooks/useTreeFocus.js +32 -8
- package/dist/hooks/useTypeahead.d.ts +3 -1
- package/dist/hooks/useTypeahead.d.ts.map +1 -1
- package/dist/hooks/useTypeahead.js +21 -15
- package/dist/i18n/InternationalizationContext.d.ts +1 -1
- package/dist/i18n/InternationalizationContext.js +1 -1
- package/dist/i18n/englishFallback.d.ts +32 -0
- package/dist/i18n/englishFallback.d.ts.map +1 -0
- package/dist/i18n/englishFallback.js +38 -0
- package/dist/i18n/fullEnglishFallback.d.ts +3 -0
- package/dist/i18n/fullEnglishFallback.d.ts.map +1 -0
- package/dist/i18n/fullEnglishFallback.js +26 -0
- package/dist/i18n/generated-english/AlertDialog/AlertDialog.generated.d.ts +8 -0
- package/dist/i18n/generated-english/AlertDialog/AlertDialog.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/AlertDialog/AlertDialog.generated.js +12 -0
- package/dist/i18n/generated-english/AppShell/AppShell.generated.d.ts +8 -0
- package/dist/i18n/generated-english/AppShell/AppShell.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/AppShell/AppShell.generated.js +13 -0
- package/dist/i18n/generated-english/Avatar/Avatar.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Avatar/Avatar.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Avatar/Avatar.generated.js +12 -0
- package/dist/i18n/generated-english/AvatarGroup/AvatarGroup.generated.d.ts +8 -0
- package/dist/i18n/generated-english/AvatarGroup/AvatarGroup.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/AvatarGroup/AvatarGroup.generated.js +13 -0
- package/dist/i18n/generated-english/AvatarGroup/AvatarGroupOverflow.generated.d.ts +8 -0
- package/dist/i18n/generated-english/AvatarGroup/AvatarGroupOverflow.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/AvatarGroup/AvatarGroupOverflow.generated.js +12 -0
- package/dist/i18n/generated-english/Banner/Banner.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Banner/Banner.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Banner/Banner.generated.js +15 -0
- package/dist/i18n/generated-english/Breadcrumbs/Breadcrumbs.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Breadcrumbs/Breadcrumbs.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Breadcrumbs/Breadcrumbs.generated.js +12 -0
- package/dist/i18n/generated-english/Button/Button.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Button/Button.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Button/Button.generated.js +12 -0
- package/dist/i18n/generated-english/Calendar/Calendar.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Calendar/Calendar.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Calendar/Calendar.generated.js +21 -0
- package/dist/i18n/generated-english/Carousel/Carousel.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Carousel/Carousel.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Carousel/Carousel.generated.js +15 -0
- package/dist/i18n/generated-english/Chat/ChatComposer.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Chat/ChatComposer.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Chat/ChatComposer.generated.js +12 -0
- package/dist/i18n/generated-english/Chat/ChatComposerDrawer.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Chat/ChatComposerDrawer.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Chat/ChatComposerDrawer.generated.js +14 -0
- package/dist/i18n/generated-english/Chat/ChatComposerInput.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Chat/ChatComposerInput.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Chat/ChatComposerInput.generated.js +13 -0
- package/dist/i18n/generated-english/Chat/ChatDictationButton.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Chat/ChatDictationButton.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Chat/ChatDictationButton.generated.js +13 -0
- package/dist/i18n/generated-english/Chat/ChatLayout.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Chat/ChatLayout.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Chat/ChatLayout.generated.js +12 -0
- package/dist/i18n/generated-english/Chat/ChatLayoutScrollButton.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Chat/ChatLayoutScrollButton.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Chat/ChatLayoutScrollButton.generated.js +12 -0
- package/dist/i18n/generated-english/Chat/ChatMessage.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Chat/ChatMessage.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Chat/ChatMessage.generated.js +12 -0
- package/dist/i18n/generated-english/Chat/ChatMessageList.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Chat/ChatMessageList.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Chat/ChatMessageList.generated.js +12 -0
- package/dist/i18n/generated-english/Chat/ChatMessageMetadata.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Chat/ChatMessageMetadata.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Chat/ChatMessageMetadata.generated.js +17 -0
- package/dist/i18n/generated-english/Chat/ChatPastedTextToken.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Chat/ChatPastedTextToken.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Chat/ChatPastedTextToken.generated.js +13 -0
- package/dist/i18n/generated-english/Chat/ChatSendButton.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Chat/ChatSendButton.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Chat/ChatSendButton.generated.js +13 -0
- package/dist/i18n/generated-english/Chat/ChatToolCalls.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Chat/ChatToolCalls.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Chat/ChatToolCalls.generated.js +17 -0
- package/dist/i18n/generated-english/Chat/useSpeechRecognition.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Chat/useSpeechRecognition.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Chat/useSpeechRecognition.generated.js +12 -0
- package/dist/i18n/generated-english/Chat/useTriggerMenu.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Chat/useTriggerMenu.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Chat/useTriggerMenu.generated.js +13 -0
- package/dist/i18n/generated-english/CheckboxInput/CheckboxInput.generated.d.ts +8 -0
- package/dist/i18n/generated-english/CheckboxInput/CheckboxInput.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/CheckboxInput/CheckboxInput.generated.js +12 -0
- package/dist/i18n/generated-english/CheckboxList/CheckboxListItem.generated.d.ts +8 -0
- package/dist/i18n/generated-english/CheckboxList/CheckboxListItem.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/CheckboxList/CheckboxListItem.generated.js +12 -0
- package/dist/i18n/generated-english/Citation/Citation.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Citation/Citation.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Citation/Citation.generated.js +12 -0
- package/dist/i18n/generated-english/CodeBlock/CodeBlock.generated.d.ts +8 -0
- package/dist/i18n/generated-english/CodeBlock/CodeBlock.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/CodeBlock/CodeBlock.generated.js +14 -0
- package/dist/i18n/generated-english/CommandPalette/CommandPalette.generated.d.ts +8 -0
- package/dist/i18n/generated-english/CommandPalette/CommandPalette.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/CommandPalette/CommandPalette.generated.js +15 -0
- package/dist/i18n/generated-english/CommandPalette/CommandPaletteFooter.generated.d.ts +8 -0
- package/dist/i18n/generated-english/CommandPalette/CommandPaletteFooter.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/CommandPalette/CommandPaletteFooter.generated.js +14 -0
- package/dist/i18n/generated-english/CommandPalette/CommandPaletteInput.generated.d.ts +8 -0
- package/dist/i18n/generated-english/CommandPalette/CommandPaletteInput.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/CommandPalette/CommandPaletteInput.generated.js +14 -0
- package/dist/i18n/generated-english/CommandPalette/CommandPaletteList.generated.d.ts +8 -0
- package/dist/i18n/generated-english/CommandPalette/CommandPaletteList.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/CommandPalette/CommandPaletteList.generated.js +12 -0
- package/dist/i18n/generated-english/ComplexSelector/ComplexSelector.generated.d.ts +8 -0
- package/dist/i18n/generated-english/ComplexSelector/ComplexSelector.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/ComplexSelector/ComplexSelector.generated.js +13 -0
- package/dist/i18n/generated-english/ContextMenu/ContextMenu.generated.d.ts +8 -0
- package/dist/i18n/generated-english/ContextMenu/ContextMenu.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/ContextMenu/ContextMenu.generated.js +13 -0
- package/dist/i18n/generated-english/DateInput/DateInput.generated.d.ts +8 -0
- package/dist/i18n/generated-english/DateInput/DateInput.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/DateInput/DateInput.generated.js +19 -0
- package/dist/i18n/generated-english/DateInput/NativeDateField.generated.d.ts +8 -0
- package/dist/i18n/generated-english/DateInput/NativeDateField.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/DateInput/NativeDateField.generated.js +16 -0
- package/dist/i18n/generated-english/DateInput/TouchDateField.generated.d.ts +8 -0
- package/dist/i18n/generated-english/DateInput/TouchDateField.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/DateInput/TouchDateField.generated.js +24 -0
- package/dist/i18n/generated-english/DateRangeInput/DateRangeInput.generated.d.ts +8 -0
- package/dist/i18n/generated-english/DateRangeInput/DateRangeInput.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/DateRangeInput/DateRangeInput.generated.js +20 -0
- package/dist/i18n/generated-english/DateTimeInput/DateTimeInput.generated.d.ts +8 -0
- package/dist/i18n/generated-english/DateTimeInput/DateTimeInput.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/DateTimeInput/DateTimeInput.generated.js +26 -0
- package/dist/i18n/generated-english/DateTimeInput/NativeDateSegment.generated.d.ts +8 -0
- package/dist/i18n/generated-english/DateTimeInput/NativeDateSegment.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/DateTimeInput/NativeDateSegment.generated.js +13 -0
- package/dist/i18n/generated-english/DateTimeInput/NativeTimeSegment.generated.d.ts +8 -0
- package/dist/i18n/generated-english/DateTimeInput/NativeTimeSegment.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/DateTimeInput/NativeTimeSegment.generated.js +12 -0
- package/dist/i18n/generated-english/DateTimeInput/TouchDateTimeField.generated.d.ts +8 -0
- package/dist/i18n/generated-english/DateTimeInput/TouchDateTimeField.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/DateTimeInput/TouchDateTimeField.generated.js +37 -0
- package/dist/i18n/generated-english/Dialog/DialogHeader.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Dialog/DialogHeader.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Dialog/DialogHeader.generated.js +12 -0
- package/dist/i18n/generated-english/Drawer/DrawerHeader.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Drawer/DrawerHeader.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Drawer/DrawerHeader.generated.js +12 -0
- package/dist/i18n/generated-english/DropdownMenu/DropdownMenu.generated.d.ts +8 -0
- package/dist/i18n/generated-english/DropdownMenu/DropdownMenu.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/DropdownMenu/DropdownMenu.generated.js +13 -0
- package/dist/i18n/generated-english/DropdownMenu/DropdownMenuSubMenu.generated.d.ts +8 -0
- package/dist/i18n/generated-english/DropdownMenu/DropdownMenuSubMenu.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/DropdownMenu/DropdownMenuSubMenu.generated.js +14 -0
- package/dist/i18n/generated-english/Field/FieldLabel.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Field/FieldLabel.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Field/FieldLabel.generated.js +13 -0
- package/dist/i18n/generated-english/Field/InputClearButton.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Field/InputClearButton.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Field/InputClearButton.generated.js +12 -0
- package/dist/i18n/generated-english/FileInput/FileInput.generated.d.ts +8 -0
- package/dist/i18n/generated-english/FileInput/FileInput.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/FileInput/FileInput.generated.js +26 -0
- package/dist/i18n/generated-english/Kbd/Kbd.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Kbd/Kbd.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Kbd/Kbd.generated.js +27 -0
- package/dist/i18n/generated-english/Lightbox/Lightbox.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Lightbox/Lightbox.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Lightbox/Lightbox.generated.js +20 -0
- package/dist/i18n/generated-english/Link/Link.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Link/Link.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Link/Link.generated.js +12 -0
- package/dist/i18n/generated-english/Markdown/Markdown.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Markdown/Markdown.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Markdown/Markdown.generated.js +12 -0
- package/dist/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.js +13 -0
- package/dist/i18n/generated-english/MetadataList/MetadataList.generated.d.ts +8 -0
- package/dist/i18n/generated-english/MetadataList/MetadataList.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/MetadataList/MetadataList.generated.js +13 -0
- package/dist/i18n/generated-english/MobileNav/MobileNav.generated.d.ts +8 -0
- package/dist/i18n/generated-english/MobileNav/MobileNav.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/MobileNav/MobileNav.generated.js +13 -0
- package/dist/i18n/generated-english/MobileNav/MobileNavToggle.generated.d.ts +8 -0
- package/dist/i18n/generated-english/MobileNav/MobileNavToggle.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/MobileNav/MobileNavToggle.generated.js +12 -0
- package/dist/i18n/generated-english/MoreMenu/MoreMenu.generated.d.ts +8 -0
- package/dist/i18n/generated-english/MoreMenu/MoreMenu.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/MoreMenu/MoreMenu.generated.js +12 -0
- package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.d.ts +8 -0
- package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.js +32 -0
- package/dist/i18n/generated-english/NumberInput/NumberInput.generated.d.ts +8 -0
- package/dist/i18n/generated-english/NumberInput/NumberInput.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/NumberInput/NumberInput.generated.js +15 -0
- package/dist/i18n/generated-english/Outline/Outline.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Outline/Outline.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Outline/Outline.generated.js +12 -0
- package/dist/i18n/generated-english/Pagination/Pagination.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Pagination/Pagination.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Pagination/Pagination.generated.js +27 -0
- package/dist/i18n/generated-english/Popover/Popover.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Popover/Popover.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Popover/Popover.generated.js +12 -0
- package/dist/i18n/generated-english/Popover/usePopover.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Popover/usePopover.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Popover/usePopover.generated.js +12 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearch.generated.d.ts +8 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearch.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearch.generated.js +16 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchEditPopover.generated.d.ts +8 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchEditPopover.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchEditPopover.generated.js +20 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.d.ts +8 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.js +23 -0
- package/dist/i18n/generated-english/PowerSearch/formatFilterValue.generated.d.ts +8 -0
- package/dist/i18n/generated-english/PowerSearch/formatFilterValue.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/PowerSearch/formatFilterValue.generated.js +15 -0
- package/dist/i18n/generated-english/PowerSearch/usePowerSearchConfig.generated.d.ts +8 -0
- package/dist/i18n/generated-english/PowerSearch/usePowerSearchConfig.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/PowerSearch/usePowerSearchConfig.generated.js +32 -0
- package/dist/i18n/generated-english/Resizable/ResizeHandle.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Resizable/ResizeHandle.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Resizable/ResizeHandle.generated.js +13 -0
- package/dist/i18n/generated-english/Selector/Selector.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Selector/Selector.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Selector/Selector.generated.js +24 -0
- package/dist/i18n/generated-english/SideNav/SideNav.generated.d.ts +8 -0
- package/dist/i18n/generated-english/SideNav/SideNav.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/SideNav/SideNav.generated.js +13 -0
- package/dist/i18n/generated-english/SideNav/SideNavCollapseButton.generated.d.ts +8 -0
- package/dist/i18n/generated-english/SideNav/SideNavCollapseButton.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/SideNav/SideNavCollapseButton.generated.js +13 -0
- package/dist/i18n/generated-english/SideNav/SideNavHeading.generated.d.ts +8 -0
- package/dist/i18n/generated-english/SideNav/SideNavHeading.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/SideNav/SideNavHeading.generated.js +13 -0
- package/dist/i18n/generated-english/SideNav/SideNavItem.generated.d.ts +8 -0
- package/dist/i18n/generated-english/SideNav/SideNavItem.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/SideNav/SideNavItem.generated.js +14 -0
- package/dist/i18n/generated-english/Slider/Slider.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Slider/Slider.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Slider/Slider.generated.js +13 -0
- package/dist/i18n/generated-english/Spinner/Spinner.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Spinner/Spinner.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Spinner/Spinner.generated.js +12 -0
- package/dist/i18n/generated-english/Stepper/Step.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Stepper/Step.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Stepper/Step.generated.js +17 -0
- package/dist/i18n/generated-english/Stepper/Stepper.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Stepper/Stepper.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Stepper/Stepper.generated.js +14 -0
- package/dist/i18n/generated-english/Switch/Switch.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Switch/Switch.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Switch/Switch.generated.js +12 -0
- package/dist/i18n/generated-english/TabList/TabList.generated.d.ts +8 -0
- package/dist/i18n/generated-english/TabList/TabList.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/TabList/TabList.generated.js +12 -0
- package/dist/i18n/generated-english/Table/BaseTable.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Table/BaseTable.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Table/BaseTable.generated.js +12 -0
- package/dist/i18n/generated-english/Table/Table.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Table/Table.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Table/Table.generated.js +12 -0
- package/dist/i18n/generated-english/Table/TableSelectionToolbar.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Table/TableSelectionToolbar.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Table/TableSelectionToolbar.generated.js +14 -0
- package/dist/i18n/generated-english/Table/plugins/columnResize/useTableColumnResize.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Table/plugins/columnResize/useTableColumnResize.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Table/plugins/columnResize/useTableColumnResize.generated.js +12 -0
- package/dist/i18n/generated-english/Table/plugins/filtering/useTableFiltering.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Table/plugins/filtering/useTableFiltering.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Table/plugins/filtering/useTableFiltering.generated.js +15 -0
- package/dist/i18n/generated-english/Table/plugins/groupedRows/useTableGroupedRows.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Table/plugins/groupedRows/useTableGroupedRows.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Table/plugins/groupedRows/useTableGroupedRows.generated.js +13 -0
- package/dist/i18n/generated-english/Table/plugins/pagination/useTablePagination.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Table/plugins/pagination/useTablePagination.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Table/plugins/pagination/useTablePagination.generated.js +14 -0
- package/dist/i18n/generated-english/Table/plugins/rowExpansion/useTableRowExpansion.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Table/plugins/rowExpansion/useTableRowExpansion.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Table/plugins/rowExpansion/useTableRowExpansion.generated.js +14 -0
- package/dist/i18n/generated-english/Table/plugins/rowStatus/useTableRowStatus.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Table/plugins/rowStatus/useTableRowStatus.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Table/plugins/rowStatus/useTableRowStatus.generated.js +12 -0
- package/dist/i18n/generated-english/Table/plugins/selection/useTableSelection.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Table/plugins/selection/useTableSelection.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Table/plugins/selection/useTableSelection.generated.js +14 -0
- package/dist/i18n/generated-english/Table/plugins/sortable/useTableSortable.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Table/plugins/sortable/useTableSortable.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Table/plugins/sortable/useTableSortable.generated.js +15 -0
- package/dist/i18n/generated-english/Table/plugins/tree/useTableTreeData.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Table/plugins/tree/useTableTreeData.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Table/plugins/tree/useTableTreeData.generated.js +15 -0
- package/dist/i18n/generated-english/TextArea/TextArea.generated.d.ts +8 -0
- package/dist/i18n/generated-english/TextArea/TextArea.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/TextArea/TextArea.generated.js +15 -0
- package/dist/i18n/generated-english/TextInput/TextInput.generated.d.ts +8 -0
- package/dist/i18n/generated-english/TextInput/TextInput.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/TextInput/TextInput.generated.js +13 -0
- package/dist/i18n/generated-english/Thumbnail/Thumbnail.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Thumbnail/Thumbnail.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Thumbnail/Thumbnail.generated.js +15 -0
- package/dist/i18n/generated-english/TimeInput/TimeInput.generated.d.ts +8 -0
- package/dist/i18n/generated-english/TimeInput/TimeInput.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/TimeInput/TimeInput.generated.js +18 -0
- package/dist/i18n/generated-english/TimeInput/TouchTimeField.generated.d.ts +8 -0
- package/dist/i18n/generated-english/TimeInput/TouchTimeField.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/TimeInput/TouchTimeField.generated.js +22 -0
- package/dist/i18n/generated-english/Timestamp/Timestamp.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Timestamp/Timestamp.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Timestamp/Timestamp.generated.js +12 -0
- package/dist/i18n/generated-english/Timestamp/TimestampHoverCard.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Timestamp/TimestampHoverCard.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Timestamp/TimestampHoverCard.generated.js +14 -0
- package/dist/i18n/generated-english/Toast/Toast.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Toast/Toast.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Toast/Toast.generated.js +12 -0
- package/dist/i18n/generated-english/Toast/ToastViewport.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Toast/ToastViewport.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Toast/ToastViewport.generated.js +12 -0
- package/dist/i18n/generated-english/Token/Token.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Token/Token.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Token/Token.generated.js +12 -0
- package/dist/i18n/generated-english/Tokenizer/Tokenizer.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Tokenizer/Tokenizer.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Tokenizer/Tokenizer.generated.js +18 -0
- package/dist/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.js +30 -0
- package/dist/i18n/generated-english/TopNav/TopNav.generated.d.ts +8 -0
- package/dist/i18n/generated-english/TopNav/TopNav.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/TopNav/TopNav.generated.js +12 -0
- package/dist/i18n/generated-english/TopNav/TopNavHeading.generated.d.ts +8 -0
- package/dist/i18n/generated-english/TopNav/TopNavHeading.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/TopNav/TopNavHeading.generated.js +13 -0
- package/dist/i18n/generated-english/TreeList/TreeListItem.generated.d.ts +8 -0
- package/dist/i18n/generated-english/TreeList/TreeListItem.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/TreeList/TreeListItem.generated.js +12 -0
- package/dist/i18n/generated-english/Typeahead/BaseTypeahead.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Typeahead/BaseTypeahead.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Typeahead/BaseTypeahead.generated.js +16 -0
- package/dist/i18n/generated-english/Typeahead/Typeahead.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Typeahead/Typeahead.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Typeahead/Typeahead.generated.js +13 -0
- package/dist/i18n/generated-english/hooks/useInputStatusIcon.generated.d.ts +8 -0
- package/dist/i18n/generated-english/hooks/useInputStatusIcon.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/hooks/useInputStatusIcon.generated.js +14 -0
- package/dist/i18n/generated-english/hooks/useKeyboardHint.generated.d.ts +8 -0
- package/dist/i18n/generated-english/hooks/useKeyboardHint.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/hooks/useKeyboardHint.generated.js +12 -0
- package/dist/i18n/generated-locales/af-ZA.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/af-ZA.generated.js +2 -2
- package/dist/i18n/generated-locales/ar-SA.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/ar-SA.generated.js +2 -2
- package/dist/i18n/generated-locales/ca-ES.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/ca-ES.generated.js +2 -2
- package/dist/i18n/generated-locales/cs-CZ.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/cs-CZ.generated.js +2 -2
- package/dist/i18n/generated-locales/da-DK.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/da-DK.generated.js +2 -2
- package/dist/i18n/generated-locales/de-DE.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/de-DE.generated.js +2 -2
- package/dist/i18n/generated-locales/el-GR.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/el-GR.generated.js +2 -2
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +11 -2
- package/dist/i18n/generated-locales/es-ES.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/es-ES.generated.js +2 -2
- package/dist/i18n/generated-locales/fi-FI.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/fi-FI.generated.js +2 -2
- package/dist/i18n/generated-locales/fr-FR.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/fr-FR.generated.js +2 -2
- package/dist/i18n/generated-locales/he-IL.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/he-IL.generated.js +2 -2
- package/dist/i18n/generated-locales/hu-HU.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/hu-HU.generated.js +2 -2
- package/dist/i18n/generated-locales/it-IT.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/it-IT.generated.js +2 -2
- package/dist/i18n/generated-locales/ja-JP.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/ja-JP.generated.js +2 -2
- package/dist/i18n/generated-locales/ko-KR.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/ko-KR.generated.js +2 -2
- package/dist/i18n/generated-locales/nl-NL.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/nl-NL.generated.js +2 -2
- package/dist/i18n/generated-locales/no-NO.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/no-NO.generated.js +2 -2
- package/dist/i18n/generated-locales/pl-PL.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pl-PL.generated.js +2 -2
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +11 -2
- package/dist/i18n/generated-locales/pt-BR.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pt-BR.generated.js +2 -2
- package/dist/i18n/generated-locales/pt-PT.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pt-PT.generated.js +2 -2
- package/dist/i18n/generated-locales/ro-RO.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/ro-RO.generated.js +2 -2
- package/dist/i18n/generated-locales/ru-RU.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/ru-RU.generated.js +2 -2
- package/dist/i18n/generated-locales/sr-SP.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/sr-SP.generated.js +2 -2
- package/dist/i18n/generated-locales/sv-SE.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/sv-SE.generated.js +2 -2
- package/dist/i18n/generated-locales/tr-TR.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/tr-TR.generated.js +2 -2
- package/dist/i18n/generated-locales/uk-UA.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/uk-UA.generated.js +2 -2
- package/dist/i18n/generated-locales/vi-VN.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/vi-VN.generated.js +2 -2
- package/dist/i18n/generated-locales/zh-CN.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/zh-CN.generated.js +2 -2
- package/dist/i18n/generated-locales/zh-TW.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/zh-TW.generated.js +2 -2
- package/dist/i18n/index.d.ts +6 -1
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +6 -1
- package/dist/i18n/publicContext.d.ts +2 -0
- package/dist/i18n/publicContext.d.ts.map +1 -0
- package/dist/i18n/publicContext.js +26 -0
- package/dist/i18n/resolve.d.ts +6 -2
- package/dist/i18n/resolve.d.ts.map +1 -1
- package/dist/i18n/resolve.js +12 -4
- package/dist/i18n/useComponentTranslator.d.ts +8 -0
- package/dist/i18n/useComponentTranslator.d.ts.map +1 -0
- package/dist/i18n/useComponentTranslator.js +42 -0
- package/dist/i18n/useTranslator.d.ts.map +1 -1
- package/dist/i18n/useTranslator.js +7 -1
- package/dist/motion/animatedLayout.d.ts +130 -5
- package/dist/motion/animatedLayout.d.ts.map +1 -1
- package/dist/motion/animatedLayout.js +867 -47
- package/dist/motion/animator.d.ts.map +1 -1
- package/dist/motion/animator.js +197 -5
- package/dist/motion/presentation.d.ts +44 -0
- package/dist/motion/presentation.d.ts.map +1 -0
- package/dist/motion/presentation.js +127 -0
- package/dist/motion/uikit/gestures.d.ts +9 -18
- package/dist/motion/uikit/gestures.d.ts.map +1 -1
- package/dist/motion/uikit/gestures.js +14 -9
- package/dist/motion/uikit/index.d.ts +1 -1
- package/dist/motion/uikit/index.d.ts.map +1 -1
- package/dist/motion/uikit/index.js +1 -1
- package/dist/motion/uikit/longPress.d.ts +26 -0
- package/dist/motion/uikit/longPress.d.ts.map +1 -0
- package/dist/motion/uikit/longPress.js +29 -0
- package/dist/motion/uikit/springs.d.ts +18 -0
- package/dist/motion/uikit/springs.d.ts.map +1 -1
- package/dist/motion/uikit/springs.js +20 -1
- package/dist/privateAttributes/hapticSwitch.stylex.d.ts +5 -0
- package/dist/privateAttributes/hapticSwitch.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/hapticSwitch.stylex.js +27 -0
- package/dist/privateAttributes/layerRoot.stylex.d.ts +9 -0
- package/dist/privateAttributes/layerRoot.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/layerRoot.stylex.js +28 -0
- package/dist/privateAttributes/segmentDisabled.stylex.d.ts +5 -0
- package/dist/privateAttributes/segmentDisabled.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/segmentDisabled.stylex.js +28 -0
- package/dist/theme/Theme.d.ts +10 -0
- package/dist/theme/Theme.d.ts.map +1 -1
- package/dist/theme/Theme.js +8 -4
- package/dist/theme/useTheme.d.ts.map +1 -1
- package/dist/theme/useTheme.js +7 -1
- package/dist/utils/accessibleName.d.ts +8 -0
- package/dist/utils/accessibleName.d.ts.map +1 -0
- package/dist/utils/accessibleName.js +72 -0
- package/dist/utils/clickGuard.d.ts +33 -0
- package/dist/utils/clickGuard.d.ts.map +1 -0
- package/dist/utils/clickGuard.js +141 -0
- package/dist/utils/coarsePointer.d.ts +8 -0
- package/dist/utils/coarsePointer.d.ts.map +1 -0
- package/dist/utils/coarsePointer.js +45 -0
- package/dist/utils/devWarning.d.ts.map +1 -1
- package/dist/utils/devWarning.js +4 -9
- package/dist/utils/flatTree.d.ts +17 -0
- package/dist/utils/flatTree.d.ts.map +1 -0
- package/dist/utils/flatTree.js +38 -0
- package/dist/utils/focusOutline.stylex.d.ts +0 -16
- package/dist/utils/focusOutline.stylex.d.ts.map +1 -1
- package/dist/utils/focusOutline.stylex.js +7 -16
- package/dist/utils/focusReturn.d.ts +41 -7
- package/dist/utils/focusReturn.d.ts.map +1 -1
- package/dist/utils/focusReturn.js +60 -8
- package/dist/utils/getNodeText.d.ts.map +1 -1
- package/dist/utils/getNodeText.js +2 -1
- package/dist/utils/hitArea.d.ts.map +1 -1
- package/dist/utils/hitArea.js +14 -17
- package/dist/utils/ime.d.ts.map +1 -1
- package/dist/utils/ime.js +23 -51
- package/dist/utils/inputPresentation.d.ts +5 -5
- package/dist/utils/inputPresentation.d.ts.map +1 -1
- package/dist/utils/inputPresentation.js +5 -5
- package/dist/utils/inputStream.d.ts +17 -0
- package/dist/utils/inputStream.d.ts.map +1 -0
- package/dist/utils/inputStream.js +136 -0
- package/dist/utils/interactionModality.d.ts +49 -7
- package/dist/utils/interactionModality.d.ts.map +1 -1
- package/dist/utils/interactionModality.js +133 -66
- package/dist/utils/interactionOverlay.stylex.d.ts +26 -92
- package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
- package/dist/utils/interactionOverlay.stylex.js +58 -85
- package/dist/utils/plainDate.d.ts +9 -0
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +26 -1
- package/dist/utils/presentation.d.ts +3 -4
- package/dist/utils/presentation.d.ts.map +1 -1
- package/dist/utils/presentation.js +30 -45
- package/dist/utils/pressDisabled.d.ts +21 -0
- package/dist/utils/pressDisabled.d.ts.map +1 -0
- package/dist/utils/pressDisabled.js +32 -0
- package/dist/utils/pressFeedback.d.ts.map +1 -1
- package/dist/utils/pressFeedback.js +117 -112
- package/dist/utils/pressGesture.d.ts.map +1 -1
- package/dist/utils/pressGesture.js +11 -21
- package/dist/utils/rtlStyles.d.ts +0 -24
- package/dist/utils/rtlStyles.d.ts.map +1 -1
- package/dist/utils/rtlStyles.js +13 -24
- package/dist/utils/selectionLock.d.ts +13 -0
- package/dist/utils/selectionLock.d.ts.map +1 -0
- package/dist/utils/selectionLock.js +159 -0
- package/dist/utils/sharedMutationObserver.d.ts +2 -2
- package/dist/utils/sharedMutationObserver.js +2 -2
- package/dist/utils/standaloneMonthCapitals.generated.d.ts +7 -0
- package/dist/utils/standaloneMonthCapitals.generated.d.ts.map +1 -0
- package/dist/utils/standaloneMonthCapitals.generated.js +9 -0
- package/dist/utils/timeFormat.d.ts +5 -13
- package/dist/utils/timeFormat.d.ts.map +1 -1
- package/dist/utils/timeFormat.js +5 -13
- package/dist/utils/touchPresentation.d.ts +6 -11
- package/dist/utils/touchPresentation.d.ts.map +1 -1
- package/dist/utils/touchPresentation.js +37 -62
- package/dist/utils/touchPresentation.stylex.d.ts +1 -1
- package/dist/utils/touchPresentation.stylex.d.ts.map +1 -1
- package/dist/utils/touchPresentation.stylex.js +7 -13
- package/dist/utils/touchQueries.d.ts +17 -1
- package/dist/utils/touchQueries.d.ts.map +1 -1
- package/dist/utils/touchQueries.js +20 -2
- package/dist/utils/typeaheadMatch.d.ts +24 -0
- package/dist/utils/typeaheadMatch.d.ts.map +1 -0
- package/dist/utils/typeaheadMatch.js +113 -0
- package/dist/utils/useFocusLeavingChange.d.ts +13 -0
- package/dist/utils/useFocusLeavingChange.d.ts.map +1 -0
- package/dist/utils/useFocusLeavingChange.js +48 -0
- package/locales/af-ZA.json +2 -2
- package/locales/ar-SA.json +2 -2
- package/locales/ca-ES.json +2 -2
- package/locales/cs-CZ.json +2 -2
- package/locales/da-DK.json +2 -2
- package/locales/de-DE.json +2 -2
- package/locales/el-GR.json +2 -2
- package/locales/en.json +41 -5
- package/locales/es-ES.json +2 -2
- package/locales/fi-FI.json +2 -2
- package/locales/fr-FR.json +2 -2
- package/locales/he-IL.json +2 -2
- package/locales/hu-HU.json +2 -2
- package/locales/it-IT.json +2 -2
- package/locales/ja-JP.json +2 -2
- package/locales/ko-KR.json +2 -2
- package/locales/nl-NL.json +2 -2
- package/locales/no-NO.json +2 -2
- package/locales/pl-PL.json +2 -2
- package/locales/pseudo.json +29 -2
- package/locales/pt-BR.json +2 -2
- package/locales/pt-PT.json +2 -2
- package/locales/ro-RO.json +2 -2
- package/locales/ru-RU.json +2 -2
- package/locales/sr-SP.json +2 -2
- package/locales/sv-SE.json +2 -2
- package/locales/tr-TR.json +2 -2
- package/locales/uk-UA.json +2 -2
- package/locales/vi-VN.json +2 -2
- package/locales/zh-CN.json +2 -2
- package/locales/zh-TW.json +2 -2
- package/package.json +6 -5
- package/src/AlertDialog/AlertDialog.tsx +8 -2
- package/src/AppShell/AppShell.tsx +73 -57
- package/src/Avatar/Avatar.tsx +10 -3
- package/src/AvatarGroup/AvatarGroup.tsx +8 -2
- package/src/AvatarGroup/AvatarGroupOverflow.tsx +9 -3
- package/src/Banner/Banner.tsx +12 -2
- package/src/BottomSheet/BottomSheet.tsx +106 -104
- package/src/BottomSheet/BottomSheetEdgeTint.tsx +10 -21
- package/src/BottomSheet/BottomSheetHostContext.ts +6 -10
- package/src/BottomSheet/BottomSheetPanel.tsx +109 -86
- package/src/BottomSheet/BottomSheetSwitcher.tsx +64 -78
- package/src/BottomSheet/BottomSheetSwitcherContext.ts +8 -0
- package/src/BottomSheet/bottomSheetEscape.ts +3 -3
- package/src/BottomSheet/bottomSheetStack.ts +42 -96
- package/src/BottomSheet/useMobileKeyboard.ts +63 -24
- package/src/BottomSheet/useSheetGestures.ts +138 -108
- package/src/Breadcrumbs/BreadcrumbItem.tsx +2 -1
- package/src/Breadcrumbs/Breadcrumbs.tsx +8 -2
- package/src/Button/Button.tsx +19 -6
- package/src/Calendar/Calendar.tsx +21 -13
- package/src/Calendar/hooks/useCalendarNavigation.ts +9 -10
- package/src/Carousel/Carousel.tsx +8 -2
- package/src/Center/Center.tsx +1 -1
- package/src/Chat/ChatComposer.tsx +14 -11
- package/src/Chat/ChatComposerDrawer.tsx +9 -3
- package/src/Chat/ChatComposerInput.tsx +18 -3
- package/src/Chat/ChatDictationButton.tsx +8 -2
- package/src/Chat/ChatLayout.tsx +9 -8
- package/src/Chat/ChatLayoutScrollButton.tsx +8 -2
- package/src/Chat/ChatMessage.tsx +21 -5
- package/src/Chat/ChatMessageList.tsx +9 -2
- package/src/Chat/ChatMessageMetadata.tsx +8 -2
- package/src/Chat/ChatPastedTextToken.tsx +23 -6
- package/src/Chat/ChatSendButton.tsx +8 -2
- package/src/Chat/ChatSystemMessage.tsx +4 -1
- package/src/Chat/ChatToolCalls.tsx +15 -4
- package/src/Chat/chatMessage.vars.stylex.ts +18 -0
- package/src/Chat/useSpeechRecognition.ts +9 -2
- package/src/Chat/useTriggerMenu.tsx +46 -33
- package/src/CheckboxInput/CheckboxInput.tsx +8 -2
- package/src/CheckboxList/CheckboxList.tsx +7 -1
- package/src/CheckboxList/CheckboxListContext.tsx +8 -0
- package/src/CheckboxList/CheckboxListItem.tsx +16 -4
- package/src/Citation/Citation.tsx +8 -2
- package/src/Code/Code.tsx +1 -1
- package/src/CodeBlock/CodeBlock.tsx +14 -4
- package/src/Collapsible/Collapsible.tsx +33 -4
- package/src/CommandPalette/CommandPalette.tsx +28 -8
- package/src/CommandPalette/CommandPaletteEmpty.tsx +2 -0
- package/src/CommandPalette/CommandPaletteFooter.tsx +8 -2
- package/src/CommandPalette/CommandPaletteInput.tsx +13 -10
- package/src/CommandPalette/CommandPaletteList.tsx +8 -2
- package/src/ComplexSelector/ComplexSelector.tsx +11 -4
- package/src/ContextMenu/ContextMenu.tsx +38 -8
- package/src/DateInput/DateInput.tsx +86 -25
- package/src/DateInput/MonthScroller.tsx +2 -3
- package/src/DateInput/NativeDateField.tsx +11 -15
- package/src/DateInput/TouchDateField.tsx +13 -18
- package/src/DateRangeInput/DateRangeInput.tsx +13 -17
- package/src/DateTimeInput/DateTimeInput.tsx +56 -38
- package/src/DateTimeInput/NativeDateSegment.tsx +9 -2
- package/src/DateTimeInput/NativeTimeSegment.tsx +9 -2
- package/src/DateTimeInput/TouchDateTimeField.tsx +14 -18
- package/src/Dialog/Dialog.tsx +36 -28
- package/src/Dialog/DialogHeader.tsx +8 -2
- package/src/Drawer/Drawer.tsx +32 -4
- package/src/Drawer/DrawerHeader.tsx +8 -2
- package/src/DropdownMenu/DropdownMenu.doc.mjs +2 -2
- package/src/DropdownMenu/DropdownMenu.tsx +38 -87
- package/src/DropdownMenu/DropdownMenuCheckboxItem.doc.mjs +2 -2
- package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +15 -5
- package/src/DropdownMenu/DropdownMenuItem.tsx +7 -1
- package/src/DropdownMenu/DropdownMenuRadioItem.doc.mjs +2 -2
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +16 -6
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +19 -6
- package/src/DropdownMenu/MenuBottomSheetActionList.tsx +6 -3
- package/src/Field/Field.tsx +2 -2
- package/src/Field/FieldLabel.tsx +13 -25
- package/src/Field/InputClearButton.tsx +9 -3
- package/src/Field/PanelSearchInput.tsx +7 -8
- package/src/Field/fieldStatusPlacement.ts +18 -0
- package/src/Field/index.ts +4 -1
- package/src/Field/inputDisabledFocus.ts +62 -4
- package/src/Field/inputStyles.stylex.ts +46 -9
- package/src/Field/textEntryTraits.ts +116 -0
- package/src/FieldStatus/FieldStatus.tsx +28 -3
- package/src/FieldStatus/index.ts +7 -0
- package/src/FileInput/FileInput.doc.mjs +3 -3
- package/src/FileInput/FileInput.tsx +42 -10
- package/src/Grid/Grid.doc.mjs +4 -4
- package/src/Grid/Grid.tsx +6 -4
- package/src/Grid/GridSpan.doc.mjs +51 -2
- package/src/Grid/GridSpan.tsx +2 -0
- package/src/HStack/HStack.tsx +2 -1
- package/src/Heading/Heading.tsx +5 -3
- package/src/HoverCard/HoverCard.doc.mjs +61 -10
- package/src/HoverCard/HoverCard.tsx +8 -5
- package/src/HoverCard/useHoverCard.doc.mjs +1 -1
- package/src/HoverCard/useHoverCard.tsx +10 -2
- package/src/InputGroup/groupStyles.ts +9 -2
- package/src/Item/Item.tsx +5 -5
- package/src/Item/ItemSwipeLayer.tsx +8 -1
- package/src/Kbd/Kbd.tsx +12 -3
- package/src/Layer/layerClickBoundary.ts +97 -0
- package/src/Layer/layerStructureReset.stylex.ts +5 -0
- package/src/Layer/layerSurfacePress.ts +35 -0
- package/src/Layer/outsidePress.ts +179 -0
- package/src/Layer/useLayer.tsx +32 -6
- package/src/Layer/useTouchTrigger.ts +106 -17
- package/src/Layout/LayoutSlotsContext.ts +4 -2
- package/src/Layout/layoutReset.ts +45 -0
- package/src/Lightbox/Lightbox.tsx +19 -7
- package/src/Link/Link.tsx +8 -2
- package/src/Markdown/Markdown.tsx +10 -2
- package/src/Markdown/plugins/HeadingLinksRenderer.tsx +8 -2
- package/src/MetadataList/MetadataList.tsx +13 -5
- package/src/MetadataList/MetadataListItem.tsx +2 -1
- package/src/MobileNav/MobileNav.tsx +15 -3
- package/src/MobileNav/MobileNavToggle.tsx +8 -2
- package/src/MoreMenu/MoreMenu.tsx +8 -2
- package/src/MultiSelector/MultiSelector.tsx +48 -49
- package/src/MultiSelector/hooks.ts +7 -5
- package/src/NavMenu/NavHeadingMenuItem.tsx +2 -1
- package/src/NumberInput/NumberInput.tsx +11 -4
- package/src/Outline/Outline.tsx +8 -2
- package/src/OverflowList/OverflowList.tsx +2 -1
- package/src/Pagination/Pagination.tsx +9 -2
- package/src/Popover/Popover.tsx +10 -4
- package/src/Popover/usePopover.tsx +15 -4
- package/src/PowerSearch/PowerSearch.tsx +12 -4
- package/src/PowerSearch/PowerSearchEditPopover.tsx +10 -4
- package/src/PowerSearch/PowerSearchToken.tsx +2 -2
- package/src/PowerSearch/PowerSearchValueEditor.tsx +20 -13
- package/src/PowerSearch/formatFilterValue.ts +4 -0
- package/src/PowerSearch/resolveOperatorLabel.ts +7 -1
- package/src/PowerSearch/usePowerSearchConfig.ts +4 -0
- package/src/PowerSearch/usePowerSearchSource.ts +2 -2
- package/src/ProgressBar/ProgressBar.tsx +3 -1
- package/src/RadioList/RadioList.tsx +13 -2
- package/src/RadioList/RadioListItem.tsx +9 -1
- package/src/RadioList/RadioListReasonContext.ts +25 -0
- package/src/Resizable/ResizeHandle.tsx +8 -2
- package/src/Resizable/resizableModel.ts +364 -0
- package/src/Resizable/useResizable.ts +17 -348
- package/src/SegmentedControl/SegmentedControl.doc.mjs +5 -5
- package/src/SegmentedControl/SegmentedControl.tsx +58 -30
- package/src/SegmentedControl/SegmentedControlContext.ts +4 -5
- package/src/SegmentedControl/SegmentedControlItem.doc.mjs +1 -1
- package/src/SegmentedControl/SegmentedControlItem.tsx +12 -14
- package/src/SelectableCard/SelectableCard.tsx +66 -1
- package/src/Selector/Selector.tsx +17 -21
- package/src/Selector/useSelectorPresentation.ts +8 -1
- package/src/SideNav/SideNav.tsx +230 -33
- package/src/SideNav/SideNavCollapseButton.tsx +26 -4
- package/src/SideNav/SideNavFocusTargetsContext.ts +29 -0
- package/src/SideNav/SideNavHeading.tsx +33 -16
- package/src/SideNav/SideNavItem.tsx +29 -6
- package/src/SideNav/SideNavSection.tsx +2 -1
- package/src/SideNav/railMotion.ts +73 -179
- package/src/Slider/Slider.tsx +15 -12
- package/src/Spinner/Spinner.tsx +9 -3
- package/src/Stack/Stack.doc.mjs +83 -11
- package/src/Stack/Stack.tsx +1 -1
- package/src/Stack/stack.stylex.ts +1 -1
- package/src/Stepper/Step.tsx +8 -2
- package/src/Stepper/Stepper.tsx +8 -2
- package/src/Switch/Switch.tsx +9 -3
- package/src/TabList/TabList.tsx +8 -2
- package/src/Table/BaseTable.tsx +18 -8
- package/src/Table/Table.tsx +8 -2
- package/src/Table/TableSelectionToolbar.tsx +8 -2
- package/src/Table/glidingDivider.ts +8 -3
- package/src/Table/plugins/columnResize/useTableColumnResize.tsx +8 -2
- package/src/Table/plugins/filtering/useTableFiltering.tsx +16 -9
- package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +8 -2
- package/src/Table/plugins/pagination/useTablePagination.tsx +8 -2
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +10 -4
- package/src/Table/plugins/rowStatus/useTableRowStatus.tsx +8 -2
- package/src/Table/plugins/selection/useTableSelection.tsx +9 -3
- package/src/Table/plugins/sortable/useTableSortable.tsx +12 -4
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +1 -2
- package/src/Table/plugins/tree/useTableTreeData.tsx +10 -4
- package/src/Text/Heading.doc.mjs +52 -3
- package/src/Text/Text.doc.mjs +1 -1
- package/src/Text/text.stylex.ts +12 -0
- package/src/TextArea/TextArea.doc.mjs +65 -1
- package/src/TextArea/TextArea.tsx +38 -11
- package/src/TextInput/TextInput.doc.mjs +70 -6
- package/src/TextInput/TextInput.tsx +55 -13
- package/src/Thumbnail/Thumbnail.tsx +8 -2
- package/src/TimeInput/TimeInput.tsx +13 -17
- package/src/TimeInput/TouchTimeField.tsx +12 -15
- package/src/Timer/Timer.tsx +1 -1
- package/src/Timestamp/Timestamp.tsx +8 -2
- package/src/Timestamp/TimestampHoverCard.tsx +8 -2
- package/src/Toast/Toast.tsx +10 -2
- package/src/Toast/ToastViewport.tsx +12 -3
- package/src/Toast/useToast.tsx +8 -3
- package/src/ToggleButton/ToggleButton.tsx +10 -3
- package/src/Token/Token.tsx +10 -2
- package/src/Token/TokenLink.tsx +16 -1
- package/src/Tokenizer/Tokenizer.doc.mjs +16 -11
- package/src/Tokenizer/Tokenizer.tsx +117 -70
- package/src/Tokenizer/TokenizerBottomSheet.tsx +9 -3
- package/src/Tooltip/Tooltip.doc.mjs +3 -3
- package/src/Tooltip/Tooltip.tsx +4 -3
- package/src/Tooltip/useTooltip.doc.mjs +3 -3
- package/src/Tooltip/useTooltip.tsx +58 -15
- package/src/TopNav/TopNav.tsx +24 -13
- package/src/TopNav/TopNavHeading.tsx +31 -12
- package/src/TopNav/TopNavMegaMenu.tsx +4 -3
- package/src/TopNav/TopNavMegaMenuFeaturedCard.tsx +9 -2
- package/src/TopNav/TopNavMegaMenuItem.tsx +7 -2
- package/src/TopNav/TopNavMenu.tsx +2 -1
- package/src/TreeList/TreeList.tsx +91 -11
- package/src/TreeList/TreeListItem.tsx +13 -5
- package/src/Typeahead/BaseTypeahead.doc.mjs +7 -4
- package/src/Typeahead/BaseTypeahead.tsx +523 -68
- package/src/Typeahead/Typeahead.doc.mjs +24 -6
- package/src/Typeahead/Typeahead.tsx +27 -15
- package/src/Typeahead/TypeaheadItem.doc.mjs +6 -3
- package/src/Typeahead/committedChoicesKey.tsx +37 -0
- package/src/Typeahead/index.ts +1 -1
- package/src/Typeahead/types.ts +27 -3
- package/src/gestures/GestureArena.ts +91 -38
- package/src/gestures/GestureHost.ts +1561 -561
- package/src/gestures/GestureRecognizer.ts +69 -18
- package/src/gestures/LongPressGestureRecognizer.ts +20 -1
- package/src/gestures/PanGestureRecognizer.ts +35 -0
- package/src/gestures/PinchGestureRecognizer.ts +13 -8
- package/src/gestures/PressTracker.ts +55 -8
- package/src/gestures/README.md +313 -51
- package/src/gestures/TapGestureRecognizer.ts +5 -0
- package/src/gestures/VelocityTracker.ts +35 -0
- package/src/gestures/fingerScroll.ts +208 -0
- package/src/gestures/gestureSync.ts +60 -0
- package/src/gestures/haptics.ts +9 -13
- package/src/gestures/hostRegistry.ts +18 -0
- package/src/gestures/index.ts +6 -5
- package/src/gestures/nativeScroll.ts +6 -20
- package/src/gestures/pageHold.ts +265 -0
- package/src/gestures/recognizerInternals.ts +77 -0
- package/src/gestures/selectionLock.ts +12 -0
- package/src/gestures/touchAction.ts +12 -24
- package/src/gestures/types.ts +18 -0
- package/src/gestures/useFingerScroll.ts +78 -0
- package/src/gestures/useGestureRecognizer.ts +70 -209
- package/src/gestures/usePressTracker.ts +212 -0
- package/src/hooks/ModalAnnounceProvider.tsx +19 -19
- package/src/hooks/actionGroupTracker.ts +23 -55
- package/src/hooks/menuPressGesture.ts +25 -30
- package/src/hooks/menuPressMarker.ts +15 -0
- package/src/hooks/menuPressOnItems.ts +7 -9
- package/src/hooks/modalAnnounce.ts +20 -39
- package/src/hooks/scrollbarGutter.ts +9 -16
- package/src/hooks/useAnimatedLayout.ts +2 -3
- package/src/hooks/useAnnounce.ts +65 -106
- package/src/hooks/useAnnounceRenderedText.ts +32 -53
- package/src/hooks/useAttachment.ts +59 -0
- package/src/hooks/useAutoMediaMode.ts +29 -54
- package/src/hooks/useBusyAnnouncement.ts +13 -20
- package/src/hooks/useClickableContainer.ts +66 -34
- package/src/hooks/useContainerReveal.ts +9 -36
- package/src/hooks/useDevWarning.ts +3 -8
- package/src/hooks/useEntryAnimation.ts +1 -3
- package/src/hooks/useFocusReturnVisibility.ts +15 -12
- package/src/hooks/useFocusTrap.ts +2 -8
- package/src/hooks/useHighlightedOptionScroll.ts +2 -4
- package/src/hooks/useHotkeys.ts +4 -16
- package/src/hooks/useImageMode.ts +6 -43
- package/src/hooks/useIndicatorFocusRing.tsx +13 -38
- package/src/hooks/useInputStatusIcon.tsx +29 -42
- package/src/hooks/useInteractiveRole.ts +6 -22
- package/src/hooks/useKeyboardHint.tsx +16 -4
- package/src/hooks/useListFocus.ts +87 -8
- package/src/hooks/useLongPress.ts +69 -28
- package/src/hooks/useMenuHover.ts +38 -52
- package/src/hooks/useMenuPress.ts +117 -186
- package/src/hooks/useOverflow.ts +3 -8
- package/src/hooks/useRenamedProp.ts +8 -17
- package/src/hooks/useScrollOverflow.ts +9 -27
- package/src/hooks/useScrollableArea.ts +14 -21
- package/src/hooks/useSettledOpen.ts +51 -0
- package/src/hooks/useStreamingText.ts +14 -33
- package/src/hooks/useTreeFocus.doc.mjs +2 -2
- package/src/hooks/useTreeFocus.ts +49 -13
- package/src/hooks/useTypeahead.doc.mjs +2 -2
- package/src/hooks/useTypeahead.ts +21 -20
- package/src/i18n/InternationalizationContext.ts +1 -1
- package/src/i18n/englishFallback.ts +40 -0
- package/src/i18n/fullEnglishFallback.ts +26 -0
- package/src/i18n/generated-english/AlertDialog/AlertDialog.generated.ts +13 -0
- package/src/i18n/generated-english/AppShell/AppShell.generated.ts +14 -0
- package/src/i18n/generated-english/Avatar/Avatar.generated.ts +13 -0
- package/src/i18n/generated-english/AvatarGroup/AvatarGroup.generated.ts +14 -0
- package/src/i18n/generated-english/AvatarGroup/AvatarGroupOverflow.generated.ts +13 -0
- package/src/i18n/generated-english/Banner/Banner.generated.ts +16 -0
- package/src/i18n/generated-english/Breadcrumbs/Breadcrumbs.generated.ts +13 -0
- package/src/i18n/generated-english/Button/Button.generated.ts +13 -0
- package/src/i18n/generated-english/Calendar/Calendar.generated.ts +22 -0
- package/src/i18n/generated-english/Carousel/Carousel.generated.ts +16 -0
- package/src/i18n/generated-english/Chat/ChatComposer.generated.ts +13 -0
- package/src/i18n/generated-english/Chat/ChatComposerDrawer.generated.ts +15 -0
- package/src/i18n/generated-english/Chat/ChatComposerInput.generated.ts +14 -0
- package/src/i18n/generated-english/Chat/ChatDictationButton.generated.ts +14 -0
- package/src/i18n/generated-english/Chat/ChatLayout.generated.ts +13 -0
- package/src/i18n/generated-english/Chat/ChatLayoutScrollButton.generated.ts +13 -0
- package/src/i18n/generated-english/Chat/ChatMessage.generated.ts +13 -0
- package/src/i18n/generated-english/Chat/ChatMessageList.generated.ts +13 -0
- package/src/i18n/generated-english/Chat/ChatMessageMetadata.generated.ts +18 -0
- package/src/i18n/generated-english/Chat/ChatPastedTextToken.generated.ts +14 -0
- package/src/i18n/generated-english/Chat/ChatSendButton.generated.ts +14 -0
- package/src/i18n/generated-english/Chat/ChatToolCalls.generated.ts +18 -0
- package/src/i18n/generated-english/Chat/useSpeechRecognition.generated.ts +13 -0
- package/src/i18n/generated-english/Chat/useTriggerMenu.generated.ts +14 -0
- package/src/i18n/generated-english/CheckboxInput/CheckboxInput.generated.ts +13 -0
- package/src/i18n/generated-english/CheckboxList/CheckboxListItem.generated.ts +13 -0
- package/src/i18n/generated-english/Citation/Citation.generated.ts +13 -0
- package/src/i18n/generated-english/CodeBlock/CodeBlock.generated.ts +15 -0
- package/src/i18n/generated-english/CommandPalette/CommandPalette.generated.ts +16 -0
- package/src/i18n/generated-english/CommandPalette/CommandPaletteFooter.generated.ts +15 -0
- package/src/i18n/generated-english/CommandPalette/CommandPaletteInput.generated.ts +15 -0
- package/src/i18n/generated-english/CommandPalette/CommandPaletteList.generated.ts +13 -0
- package/src/i18n/generated-english/ComplexSelector/ComplexSelector.generated.ts +14 -0
- package/src/i18n/generated-english/ContextMenu/ContextMenu.generated.ts +14 -0
- package/src/i18n/generated-english/DateInput/DateInput.generated.ts +20 -0
- package/src/i18n/generated-english/DateInput/NativeDateField.generated.ts +17 -0
- package/src/i18n/generated-english/DateInput/TouchDateField.generated.ts +25 -0
- package/src/i18n/generated-english/DateRangeInput/DateRangeInput.generated.ts +21 -0
- package/src/i18n/generated-english/DateTimeInput/DateTimeInput.generated.ts +27 -0
- package/src/i18n/generated-english/DateTimeInput/NativeDateSegment.generated.ts +14 -0
- package/src/i18n/generated-english/DateTimeInput/NativeTimeSegment.generated.ts +13 -0
- package/src/i18n/generated-english/DateTimeInput/TouchDateTimeField.generated.ts +38 -0
- package/src/i18n/generated-english/Dialog/DialogHeader.generated.ts +13 -0
- package/src/i18n/generated-english/Drawer/DrawerHeader.generated.ts +13 -0
- package/src/i18n/generated-english/DropdownMenu/DropdownMenu.generated.ts +14 -0
- package/src/i18n/generated-english/DropdownMenu/DropdownMenuSubMenu.generated.ts +15 -0
- package/src/i18n/generated-english/Field/FieldLabel.generated.ts +14 -0
- package/src/i18n/generated-english/Field/InputClearButton.generated.ts +13 -0
- package/src/i18n/generated-english/FileInput/FileInput.generated.ts +27 -0
- package/src/i18n/generated-english/Kbd/Kbd.generated.ts +28 -0
- package/src/i18n/generated-english/Lightbox/Lightbox.generated.ts +21 -0
- package/src/i18n/generated-english/Link/Link.generated.ts +13 -0
- package/src/i18n/generated-english/Markdown/Markdown.generated.ts +13 -0
- package/src/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.ts +14 -0
- package/src/i18n/generated-english/MetadataList/MetadataList.generated.ts +14 -0
- package/src/i18n/generated-english/MobileNav/MobileNav.generated.ts +14 -0
- package/src/i18n/generated-english/MobileNav/MobileNavToggle.generated.ts +13 -0
- package/src/i18n/generated-english/MoreMenu/MoreMenu.generated.ts +13 -0
- package/src/i18n/generated-english/MultiSelector/MultiSelector.generated.ts +33 -0
- package/src/i18n/generated-english/NumberInput/NumberInput.generated.ts +16 -0
- package/src/i18n/generated-english/Outline/Outline.generated.ts +13 -0
- package/src/i18n/generated-english/Pagination/Pagination.generated.ts +28 -0
- package/src/i18n/generated-english/Popover/Popover.generated.ts +13 -0
- package/src/i18n/generated-english/Popover/usePopover.generated.ts +13 -0
- package/src/i18n/generated-english/PowerSearch/PowerSearch.generated.ts +17 -0
- package/src/i18n/generated-english/PowerSearch/PowerSearchEditPopover.generated.ts +21 -0
- package/src/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.ts +24 -0
- package/src/i18n/generated-english/PowerSearch/formatFilterValue.generated.ts +16 -0
- package/src/i18n/generated-english/PowerSearch/usePowerSearchConfig.generated.ts +33 -0
- package/src/i18n/generated-english/Resizable/ResizeHandle.generated.ts +14 -0
- package/src/i18n/generated-english/Selector/Selector.generated.ts +25 -0
- package/src/i18n/generated-english/SideNav/SideNav.generated.ts +14 -0
- package/src/i18n/generated-english/SideNav/SideNavCollapseButton.generated.ts +14 -0
- package/src/i18n/generated-english/SideNav/SideNavHeading.generated.ts +14 -0
- package/src/i18n/generated-english/SideNav/SideNavItem.generated.ts +15 -0
- package/src/i18n/generated-english/Slider/Slider.generated.ts +14 -0
- package/src/i18n/generated-english/Spinner/Spinner.generated.ts +13 -0
- package/src/i18n/generated-english/Stepper/Step.generated.ts +18 -0
- package/src/i18n/generated-english/Stepper/Stepper.generated.ts +15 -0
- package/src/i18n/generated-english/Switch/Switch.generated.ts +13 -0
- package/src/i18n/generated-english/TabList/TabList.generated.ts +13 -0
- package/src/i18n/generated-english/Table/BaseTable.generated.ts +13 -0
- package/src/i18n/generated-english/Table/Table.generated.ts +13 -0
- package/src/i18n/generated-english/Table/TableSelectionToolbar.generated.ts +15 -0
- package/src/i18n/generated-english/Table/plugins/columnResize/useTableColumnResize.generated.ts +13 -0
- package/src/i18n/generated-english/Table/plugins/filtering/useTableFiltering.generated.ts +16 -0
- package/src/i18n/generated-english/Table/plugins/groupedRows/useTableGroupedRows.generated.ts +14 -0
- package/src/i18n/generated-english/Table/plugins/pagination/useTablePagination.generated.ts +15 -0
- package/src/i18n/generated-english/Table/plugins/rowExpansion/useTableRowExpansion.generated.ts +15 -0
- package/src/i18n/generated-english/Table/plugins/rowStatus/useTableRowStatus.generated.ts +13 -0
- package/src/i18n/generated-english/Table/plugins/selection/useTableSelection.generated.ts +15 -0
- package/src/i18n/generated-english/Table/plugins/sortable/useTableSortable.generated.ts +16 -0
- package/src/i18n/generated-english/Table/plugins/tree/useTableTreeData.generated.ts +16 -0
- package/src/i18n/generated-english/TextArea/TextArea.generated.ts +16 -0
- package/src/i18n/generated-english/TextInput/TextInput.generated.ts +14 -0
- package/src/i18n/generated-english/Thumbnail/Thumbnail.generated.ts +16 -0
- package/src/i18n/generated-english/TimeInput/TimeInput.generated.ts +19 -0
- package/src/i18n/generated-english/TimeInput/TouchTimeField.generated.ts +23 -0
- package/src/i18n/generated-english/Timestamp/Timestamp.generated.ts +13 -0
- package/src/i18n/generated-english/Timestamp/TimestampHoverCard.generated.ts +15 -0
- package/src/i18n/generated-english/Toast/Toast.generated.ts +13 -0
- package/src/i18n/generated-english/Toast/ToastViewport.generated.ts +13 -0
- package/src/i18n/generated-english/Token/Token.generated.ts +13 -0
- package/src/i18n/generated-english/Tokenizer/Tokenizer.generated.ts +19 -0
- package/src/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.ts +31 -0
- package/src/i18n/generated-english/TopNav/TopNav.generated.ts +13 -0
- package/src/i18n/generated-english/TopNav/TopNavHeading.generated.ts +14 -0
- package/src/i18n/generated-english/TreeList/TreeListItem.generated.ts +13 -0
- package/src/i18n/generated-english/Typeahead/BaseTypeahead.generated.ts +17 -0
- package/src/i18n/generated-english/Typeahead/Typeahead.generated.ts +14 -0
- package/src/i18n/generated-english/hooks/useInputStatusIcon.generated.ts +15 -0
- package/src/i18n/generated-english/hooks/useKeyboardHint.generated.ts +13 -0
- package/src/i18n/generated-locales/af-ZA.generated.ts +3 -2
- package/src/i18n/generated-locales/ar-SA.generated.ts +3 -2
- package/src/i18n/generated-locales/ca-ES.generated.ts +3 -2
- package/src/i18n/generated-locales/cs-CZ.generated.ts +3 -2
- package/src/i18n/generated-locales/da-DK.generated.ts +3 -2
- package/src/i18n/generated-locales/de-DE.generated.ts +3 -2
- package/src/i18n/generated-locales/el-GR.generated.ts +3 -2
- package/src/i18n/generated-locales/en.generated.ts +15 -2
- package/src/i18n/generated-locales/es-ES.generated.ts +3 -2
- package/src/i18n/generated-locales/fi-FI.generated.ts +3 -2
- package/src/i18n/generated-locales/fr-FR.generated.ts +3 -2
- package/src/i18n/generated-locales/he-IL.generated.ts +3 -2
- package/src/i18n/generated-locales/hu-HU.generated.ts +3 -2
- package/src/i18n/generated-locales/it-IT.generated.ts +3 -2
- package/src/i18n/generated-locales/ja-JP.generated.ts +3 -2
- package/src/i18n/generated-locales/ko-KR.generated.ts +3 -2
- package/src/i18n/generated-locales/nl-NL.generated.ts +3 -2
- package/src/i18n/generated-locales/no-NO.generated.ts +3 -2
- package/src/i18n/generated-locales/pl-PL.generated.ts +3 -2
- package/src/i18n/generated-locales/pseudo.generated.ts +15 -2
- package/src/i18n/generated-locales/pt-BR.generated.ts +3 -2
- package/src/i18n/generated-locales/pt-PT.generated.ts +3 -2
- package/src/i18n/generated-locales/ro-RO.generated.ts +3 -2
- package/src/i18n/generated-locales/ru-RU.generated.ts +3 -2
- package/src/i18n/generated-locales/sr-SP.generated.ts +3 -2
- package/src/i18n/generated-locales/sv-SE.generated.ts +3 -2
- package/src/i18n/generated-locales/tr-TR.generated.ts +3 -2
- package/src/i18n/generated-locales/uk-UA.generated.ts +3 -2
- package/src/i18n/generated-locales/vi-VN.generated.ts +3 -2
- package/src/i18n/generated-locales/zh-CN.generated.ts +3 -2
- package/src/i18n/generated-locales/zh-TW.generated.ts +3 -2
- package/src/i18n/index.ts +6 -1
- package/src/i18n/publicContext.ts +29 -0
- package/src/i18n/resolve.ts +17 -4
- package/src/i18n/useComponentTranslator.ts +45 -0
- package/src/i18n/useTranslator.ts +8 -1
- package/src/motion/MEASUREMENTS.md +1 -1
- package/src/motion/README.md +11 -0
- package/src/motion/animatedLayout.ts +1079 -48
- package/src/motion/animator.ts +225 -13
- package/src/motion/presentation.ts +149 -0
- package/src/motion/uikit/gestures.ts +15 -8
- package/src/motion/uikit/index.ts +1 -0
- package/src/motion/uikit/longPress.ts +29 -0
- package/src/motion/uikit/springs.ts +19 -0
- package/src/privateAttributes/hapticSwitch.stylex.ts +27 -0
- package/src/privateAttributes/layerRoot.stylex.ts +28 -0
- package/src/privateAttributes/segmentDisabled.stylex.ts +28 -0
- package/src/theme/Theme.tsx +8 -4
- package/src/theme/useTheme.ts +6 -1
- package/src/utils/accessibleName.ts +87 -0
- package/src/utils/clickGuard.ts +157 -0
- package/src/utils/coarsePointer.ts +51 -0
- package/src/utils/devWarning.ts +4 -9
- package/src/utils/flatTree.ts +40 -0
- package/src/utils/focusOutline.stylex.ts +9 -19
- package/src/utils/focusReturn.ts +74 -8
- package/src/utils/getNodeText.ts +2 -1
- package/src/utils/hitArea.ts +14 -17
- package/src/utils/ime.ts +23 -51
- package/src/utils/inputPresentation.ts +5 -5
- package/src/utils/inputStream.ts +155 -0
- package/src/utils/interactionModality.ts +173 -68
- package/src/utils/interactionOverlay.stylex.ts +72 -88
- package/src/utils/plainDate.ts +29 -1
- package/src/utils/presentation.ts +31 -47
- package/src/utils/pressDisabled.ts +32 -0
- package/src/utils/pressFeedback.ts +118 -107
- package/src/utils/pressGesture.ts +11 -21
- package/src/utils/rtlStyles.ts +13 -24
- package/src/utils/selectionLock.ts +188 -0
- package/src/utils/sharedMutationObserver.ts +2 -2
- package/src/utils/standaloneMonthCapitals.generated.ts +17 -0
- package/src/utils/timeFormat.ts +5 -13
- package/src/utils/touchPresentation.stylex.ts +8 -14
- package/src/utils/touchPresentation.ts +37 -62
- package/src/utils/touchQueries.ts +24 -1
- package/src/utils/typeaheadMatch.ts +142 -0
- package/src/utils/useFocusLeavingChange.ts +53 -0
- package/src/AlertDialog/AlertDialog.spec.md +0 -259
- package/src/AppShell/AppShell.spec.md +0 -331
- package/src/AspectRatio/AspectRatio.spec.md +0 -179
- package/src/Avatar/Avatar.spec.md +0 -253
- package/src/Avatar/AvatarStatusDot.spec.md +0 -208
- package/src/AvatarGroup/AvatarGroup.spec.md +0 -205
- package/src/AvatarGroup/AvatarGroupOverflow.spec.md +0 -210
- package/src/Badge/Badge.spec.md +0 -207
- package/src/Banner/Banner.spec.md +0 -282
- package/src/Blockquote/Blockquote.spec.md +0 -171
- package/src/BottomSheet/BottomSheet.spec.md +0 -457
- package/src/BottomSheet/BottomSheetSwitcher.spec.md +0 -367
- package/src/Breadcrumbs/BreadcrumbItem.spec.md +0 -269
- package/src/Breadcrumbs/Breadcrumbs.spec.md +0 -165
- package/src/Button/Button.spec.md +0 -322
- package/src/ButtonGroup/ButtonGroup.spec.md +0 -220
- package/src/Calendar/Calendar.spec.md +0 -248
- package/src/Card/Card.spec.md +0 -205
- package/src/Carousel/Carousel.spec.md +0 -146
- package/src/Center/Center.spec.md +0 -205
- package/src/Chat/ChatComposer.spec.md +0 -246
- package/src/Chat/ChatComposerDrawer.spec.md +0 -267
- package/src/Chat/ChatComposerInput.spec.md +0 -224
- package/src/Chat/ChatComposerTokenElement.spec.md +0 -164
- package/src/Chat/ChatDictationButton.spec.md +0 -205
- package/src/Chat/ChatLayout.spec.md +0 -276
- package/src/Chat/ChatLayoutScrollButton.spec.md +0 -322
- package/src/Chat/ChatMessage.spec.md +0 -264
- package/src/Chat/ChatMessageBubble.spec.md +0 -263
- package/src/Chat/ChatMessageList.spec.md +0 -222
- package/src/Chat/ChatMessageMetadata.spec.md +0 -220
- package/src/Chat/ChatSendButton.spec.md +0 -238
- package/src/Chat/ChatSystemMessage.spec.md +0 -224
- package/src/Chat/ChatTokenizedText.spec.md +0 -190
- package/src/Chat/ChatToolCalls.spec.md +0 -194
- package/src/CheckboxInput/CheckboxInput.spec.md +0 -218
- package/src/CheckboxList/CheckboxList.spec.md +0 -332
- package/src/CheckboxList/CheckboxListItem.spec.md +0 -302
- package/src/Citation/Citation.spec.md +0 -192
- package/src/ClickableCard/ClickableCard.spec.md +0 -241
- package/src/Code/Code.spec.md +0 -170
- package/src/CodeBlock/CodeBlock.spec.md +0 -243
- package/src/Collapsible/Collapsible.spec.md +0 -247
- package/src/Collapsible/CollapsibleGroup.spec.md +0 -229
- package/src/CommandPalette/CommandPalette.spec.md +0 -278
- package/src/CommandPalette/CommandPaletteEmpty.spec.md +0 -190
- package/src/CommandPalette/CommandPaletteInput.spec.md +0 -215
- package/src/CommandPalette/CommandPaletteItem.spec.md +0 -223
- package/src/CommandPalette/CommandPaletteList.spec.md +0 -194
- package/src/ComplexSelector/ComplexSelector.spec.md +0 -266
- package/src/ContextMenu/ContextMenu.spec.md +0 -279
- package/src/ContextMenu/ContextMenuItem.spec.md +0 -132
- package/src/DateInput/DateInput.spec.md +0 -336
- package/src/DateRangeInput/DateRangeInput.spec.md +0 -203
- package/src/DateTimeInput/DateTimeInput.spec.md +0 -270
- package/src/Dialog/Dialog.spec.md +0 -189
- package/src/Dialog/modules/DialogHeader.spec.md +0 -211
- package/src/Divider/Divider.spec.md +0 -252
- package/src/Drawer/Drawer.spec.md +0 -388
- package/src/Drawer/DrawerHeader.spec.md +0 -181
- package/src/DropdownMenu/DropdownMenu.spec.md +0 -562
- package/src/DropdownMenu/DropdownMenuCheckboxItem.spec.md +0 -192
- package/src/DropdownMenu/DropdownMenuDivider.spec.md +0 -186
- package/src/DropdownMenu/DropdownMenuGroup.spec.md +0 -145
- package/src/DropdownMenu/DropdownMenuItem.spec.md +0 -215
- package/src/DropdownMenu/DropdownMenuRadioGroup.spec.md +0 -187
- package/src/DropdownMenu/DropdownMenuRadioItem.spec.md +0 -227
- package/src/DropdownMenu/DropdownMenuSubMenu.spec.md +0 -231
- package/src/DropdownMenu/modules/useMenuHover.spec.md +0 -283
- package/src/DropdownMenu/modules/useMenuPress.spec.md +0 -348
- package/src/EmptyState/EmptyState.spec.md +0 -203
- package/src/Field/Field.spec.md +0 -226
- package/src/Field/FieldLabel.spec.md +0 -192
- package/src/FieldStatus/FieldStatus.spec.md +0 -224
- package/src/FileInput/FileInput.spec.md +0 -199
- package/src/FormLayout/FormLayout.spec.md +0 -201
- package/src/Grid/Grid.spec.md +0 -193
- package/src/Grid/GridSpan.spec.md +0 -158
- package/src/Heading/Heading.spec.md +0 -198
- package/src/HoverCard/HoverCard.spec.md +0 -244
- package/src/Icon/Icon.spec.md +0 -244
- package/src/IconButton/IconButton.spec.md +0 -197
- package/src/Indicator/CheckIndicator.spec.md +0 -164
- package/src/Indicator/CheckboxIndicator.spec.md +0 -164
- package/src/Indicator/Indicator.spec.md +0 -188
- package/src/InputGroup/InputGroup.spec.md +0 -199
- package/src/InputGroup/InputGroupText.spec.md +0 -139
- package/src/Item/Item.spec.md +0 -226
- package/src/Kbd/Kbd.spec.md +0 -185
- package/src/Layer/LayerProvider.spec.md +0 -149
- package/src/Layout/Layout.spec.md +0 -243
- package/src/Layout/LayoutContent.spec.md +0 -205
- package/src/Layout/LayoutFooter.spec.md +0 -190
- package/src/Layout/LayoutHeader.spec.md +0 -193
- package/src/Layout/LayoutPanel.spec.md +0 -194
- package/src/Lightbox/Lightbox.spec.md +0 -387
- package/src/Link/Link.spec.md +0 -230
- package/src/Link/LinkProvider.spec.md +0 -167
- package/src/List/List.spec.md +0 -336
- package/src/List/ListItem.spec.md +0 -205
- package/src/Markdown/Markdown.spec.md +0 -595
- package/src/Markdown/modules/headingLinks.spec.md +0 -262
- package/src/Markdown/modules/remark.spec.md +0 -269
- package/src/Markdown/modules/softBreaks.spec.md +0 -137
- package/src/Markdown/modules/sourceLines.spec.md +0 -162
- package/src/MetadataList/MetadataList.spec.md +0 -187
- package/src/MetadataList/MetadataListItem.spec.md +0 -165
- package/src/MobileNav/MobileNav.spec.md +0 -306
- package/src/MoreMenu/MoreMenu.spec.md +0 -268
- package/src/MultiSelector/MultiSelector.spec.md +0 -364
- package/src/NavIcon/NavIcon.spec.md +0 -158
- package/src/NavMenu/NavHeadingMenu.spec.md +0 -264
- package/src/NumberInput/NumberInput.spec.md +0 -270
- package/src/Outline/Outline.spec.md +0 -258
- package/src/Outline/modules/parseOutlineFromMarkdown.spec.md +0 -150
- package/src/OverflowList/OverflowList.spec.md +0 -204
- package/src/Overlay/Overlay.spec.md +0 -304
- package/src/Pagination/Pagination.spec.md +0 -300
- package/src/Popover/Popover.spec.md +0 -525
- package/src/PowerSearch/PowerSearch.spec.md +0 -661
- package/src/ProgressBar/ProgressBar.spec.md +0 -285
- package/src/RadioList/RadioList.spec.md +0 -227
- package/src/RadioList/RadioListItem.spec.md +0 -223
- package/src/Resizable/Resizable.spec.md +0 -298
- package/src/ScrollableArea/ScrollableArea.spec.md +0 -190
- package/src/ScrollableArea/modules/useScrollableArea.spec.md +0 -149
- package/src/Section/Section.spec.md +0 -197
- package/src/SegmentedControl/SegmentedControl.spec.md +0 -261
- package/src/SegmentedControl/SegmentedControlItem.spec.md +0 -206
- package/src/SelectableCard/SelectableCard.spec.md +0 -230
- package/src/Selector/Selector.spec.md +0 -379
- package/src/SideNav/SideNav.spec.md +0 -247
- package/src/SideNav/SideNavCollapseButton.spec.md +0 -161
- package/src/SideNav/SideNavHeading.spec.md +0 -226
- package/src/SideNav/SideNavItem.spec.md +0 -236
- package/src/SideNav/SideNavSection.spec.md +0 -153
- package/src/Skeleton/Skeleton.spec.md +0 -184
- package/src/Slider/Slider.spec.md +0 -287
- package/src/Spinner/Spinner.spec.md +0 -231
- package/src/Stack/Stack.spec.md +0 -203
- package/src/StatusDot/StatusDot.spec.md +0 -224
- package/src/Stepper/Step.spec.md +0 -200
- package/src/Stepper/Stepper.spec.md +0 -327
- package/src/Switch/Switch.spec.md +0 -277
- package/src/TabList/Tab.spec.md +0 -201
- package/src/TabList/TabList.spec.md +0 -217
- package/src/TabList/TabMenu.spec.md +0 -198
- package/src/Table/Table.spec.md +0 -395
- package/src/Table/plugins/activation/useTableActivation.spec.md +0 -254
- package/src/Table/plugins/columnResize/useTableColumnResize.spec.md +0 -373
- package/src/Table/plugins/infiniteScroll/useTableInfiniteScroll.spec.md +0 -244
- package/src/Table/plugins/rowStatus/useTableRowStatus.spec.md +0 -355
- package/src/Table/plugins/virtualization/useTableVirtualization.spec.md +0 -266
- package/src/Text/Text.spec.md +0 -193
- package/src/TextArea/TextArea.spec.md +0 -300
- package/src/TextInput/TextInput.spec.md +0 -260
- package/src/Thumbnail/Thumbnail.spec.md +0 -244
- package/src/TimeInput/TimeInput.spec.md +0 -270
- package/src/Timer/Timer.spec.md +0 -215
- package/src/Timestamp/Timestamp.spec.md +0 -246
- package/src/Toast/Toast.spec.md +0 -291
- package/src/ToggleButton/ToggleButton.spec.md +0 -256
- package/src/ToggleButton/ToggleButtonGroup.spec.md +0 -195
- package/src/Token/Token.spec.md +0 -262
- package/src/Tokenizer/Tokenizer.spec.md +0 -615
- package/src/Toolbar/Toolbar.spec.md +0 -227
- package/src/Tooltip/Tooltip.spec.md +0 -267
- package/src/TopNav/TopNav.spec.md +0 -190
- package/src/TopNav/TopNavHeading.spec.md +0 -211
- package/src/TopNav/TopNavItem.spec.md +0 -189
- package/src/TopNav/TopNavMegaMenu.spec.md +0 -190
- package/src/TopNav/TopNavMegaMenuFeaturedCard.spec.md +0 -150
- package/src/TopNav/TopNavMegaMenuItem.spec.md +0 -155
- package/src/TopNav/TopNavMenu.spec.md +0 -202
- package/src/TreeList/TreeList.spec.md +0 -328
- package/src/Typeahead/BaseTypeahead.spec.md +0 -270
- package/src/Typeahead/Typeahead.spec.md +0 -257
- package/src/VisuallyHidden/VisuallyHidden.spec.md +0 -170
- 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
|
|
7
|
-
*
|
|
8
|
-
*
|
|
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
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* counts apart
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* touch in flight.
|
|
32
|
-
* -
|
|
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
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
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),
|
|
64
|
-
*
|
|
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)
|
|
75
|
-
*
|
|
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
|
|
78
|
-
*
|
|
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
|
-
*
|
|
85
|
-
*
|
|
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 {
|
|
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 {
|
|
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
|
-
|
|
104
|
-
|
|
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
|
-
|
|
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
|
-
/**
|
|
158
|
-
const
|
|
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
|
-
|
|
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
|
|
226
|
-
* finger
|
|
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
|
-
*
|
|
234
|
-
* `touchend` that follows
|
|
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
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
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
|
|
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
|
-
*
|
|
257
|
-
*
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
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
|
-
|
|
381
|
+
armedElements = new Map();
|
|
263
382
|
isArmedPress = false;
|
|
264
|
-
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
302
|
-
|
|
303
|
-
this.
|
|
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
|
-
|
|
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
|
-
*
|
|
442
|
-
* the function that stops it.
|
|
580
|
+
* @internal The document this host serves.
|
|
443
581
|
*/
|
|
444
|
-
|
|
445
|
-
this.
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
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 =
|
|
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
|
|
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
|
-
|
|
503
|
-
|
|
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
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
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
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
element.addEventListener('
|
|
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
|
-
|
|
541
|
-
|
|
542
|
-
|
|
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
|
-
//
|
|
547
|
-
//
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
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.
|
|
667
|
-
element.removeEventListener('
|
|
1046
|
+
if (registration.hasTouchEndListener) {
|
|
1047
|
+
element.removeEventListener('touchend', this.onClaimedTouchEnd);
|
|
1048
|
+
registration.hasTouchEndListener = false;
|
|
668
1049
|
}
|
|
669
|
-
if (registration.
|
|
670
|
-
element.removeEventListener('
|
|
671
|
-
registration.touchEndListener = null;
|
|
1050
|
+
if (registration.hasTouchMoveListener) {
|
|
1051
|
+
element.removeEventListener('touchmove', this.onBlockingTouchMove);
|
|
672
1052
|
}
|
|
673
1053
|
this.registry.delete(element);
|
|
674
|
-
this.
|
|
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,
|
|
680
|
-
*
|
|
681
|
-
*
|
|
682
|
-
*
|
|
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
|
-
|
|
1069
|
+
this.syncClaimingListeners();
|
|
1070
|
+
} else {
|
|
702
1071
|
this.uninstall();
|
|
703
1072
|
}
|
|
1073
|
+
this.syncMoverBlocking();
|
|
704
1074
|
}
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
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
|
-
|
|
710
|
-
|
|
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
|
-
|
|
713
|
-
|
|
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
|
|
724
|
-
*
|
|
725
|
-
*
|
|
726
|
-
*
|
|
727
|
-
*
|
|
728
|
-
*
|
|
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.
|
|
1138
|
+
if (!this.isCoarse) {
|
|
733
1139
|
for (const [element, registration] of this.registry) {
|
|
734
|
-
|
|
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 [
|
|
743
|
-
if (!wanted.has(
|
|
744
|
-
|
|
745
|
-
this.
|
|
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
|
|
749
|
-
if (this.
|
|
1152
|
+
for (const element of wanted) {
|
|
1153
|
+
if (this.armedElements.has(element)) {
|
|
750
1154
|
continue;
|
|
751
1155
|
}
|
|
752
|
-
|
|
753
|
-
this.
|
|
754
|
-
|
|
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
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
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
|
|
788
|
-
|
|
789
|
-
|
|
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
|
-
*
|
|
795
|
-
*
|
|
796
|
-
*
|
|
797
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
802
|
-
|
|
803
|
-
|
|
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
|
|
806
|
-
if (
|
|
807
|
-
view?.removeEventListener('click', this.onClick, ACTIVE_CAPTURE);
|
|
1300
|
+
const isClaiming = this.hasClaimer();
|
|
1301
|
+
if (isClaiming === this.isClaimingInstalled) {
|
|
808
1302
|
return;
|
|
809
1303
|
}
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
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
|
-
}
|
|
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
|
-
|
|
1348
|
+
this.watchPointer();
|
|
1349
|
+
if (!this.needsInput()) {
|
|
822
1350
|
return;
|
|
823
1351
|
}
|
|
824
|
-
if (this.
|
|
825
|
-
|
|
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
|
-
|
|
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,
|
|
834
|
-
// reading both would track it twice (a long press needs one touch).
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
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
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
967
|
-
|
|
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
|
-
|
|
1645
|
+
const landed = landedOn(event);
|
|
1646
|
+
if (landed instanceof Node) {
|
|
1000
1647
|
this.lastTouch = {
|
|
1001
|
-
target:
|
|
1648
|
+
target: landed,
|
|
1002
1649
|
time
|
|
1003
1650
|
};
|
|
1004
1651
|
}
|
|
1005
1652
|
};
|
|
1006
1653
|
onTouchMove = event => {
|
|
1007
|
-
|
|
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.
|
|
1705
|
+
this.browserTook(taken, time);
|
|
1056
1706
|
}
|
|
1057
1707
|
}
|
|
1058
|
-
|
|
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) ||
|
|
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
|
-
|
|
1089
|
-
|
|
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(
|
|
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
|
-
|
|
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) ?? (
|
|
1120
|
-
|
|
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 (
|
|
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
|
-
|
|
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
|
-
|
|
1860
|
+
const landed = landedOn(event);
|
|
1861
|
+
if (landed instanceof Node) {
|
|
1157
1862
|
this.lastTouch = {
|
|
1158
|
-
target:
|
|
1863
|
+
target: landed,
|
|
1159
1864
|
time
|
|
1160
1865
|
};
|
|
1161
1866
|
}
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
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
|
-
|
|
1167
|
-
if (needsSuppression(dispositions)) {
|
|
1876
|
+
if (cancelsClick) {
|
|
1168
1877
|
if (event.cancelable) {
|
|
1169
1878
|
event.preventDefault();
|
|
1170
1879
|
}
|
|
1171
|
-
this.
|
|
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
|
-
|
|
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:
|
|
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
|
|
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 &&
|
|
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.
|
|
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.
|
|
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
|
|
2169
|
+
target: landedOn(event)
|
|
1463
2170
|
});
|
|
1464
2171
|
return;
|
|
1465
2172
|
}
|
|
1466
|
-
// A right click, a pen's barrel button
|
|
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
|
-
|
|
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 (
|
|
1481
|
-
this.
|
|
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
|
|
1490
|
-
scroll: createNativeScrollProbe(
|
|
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.
|
|
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
|
-
|
|
1552
|
-
|
|
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
|
-
|
|
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.
|
|
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
|
|
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.
|
|
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.
|
|
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
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
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 <
|
|
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
|
|
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) >=
|
|
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.
|
|
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.
|
|
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 =
|
|
2596
|
+
let host = gestureHosts.get(doc);
|
|
1768
2597
|
if (host == null) {
|
|
1769
2598
|
host = new GestureHost(doc);
|
|
1770
|
-
|
|
2599
|
+
gestureHosts.set(doc, host);
|
|
1771
2600
|
}
|
|
1772
2601
|
return host;
|
|
1773
2602
|
}
|