@astryxdesign/core 0.7.4 → 0.7.5-canary.0418c47
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/README.md +12 -9
- package/dist/AlertDialog/AlertDialog.d.ts +2 -2
- package/dist/AlertDialog/AlertDialog.js +1 -1
- package/dist/AlertDialog/index.d.ts +4 -4
- package/dist/AlertDialog/useImperativeAlertDialog.d.ts +1 -1
- package/dist/AppShell/AppShell.d.ts +4 -4
- package/dist/AppShell/index.d.ts +4 -4
- package/dist/AspectRatio/AspectRatio.d.ts +1 -1
- package/dist/AspectRatio/index.d.ts +2 -2
- package/dist/Avatar/Avatar.d.ts +2 -2
- package/dist/Avatar/AvatarStatusDot.d.ts +2 -2
- package/dist/Avatar/AvatarStatusDot.js +2 -2
- package/dist/Avatar/index.d.ts +4 -4
- package/dist/AvatarGroup/AvatarGroup.d.ts +2 -2
- package/dist/AvatarGroup/AvatarGroupContext.d.ts +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts +1 -1
- package/dist/AvatarGroup/index.d.ts +6 -6
- package/dist/Badge/Badge.d.ts +2 -2
- package/dist/Badge/Badge.d.ts.map +1 -1
- package/dist/Badge/Badge.js +18 -2
- package/dist/Badge/index.d.ts +2 -2
- package/dist/Banner/Banner.d.ts +5 -4
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +64 -9
- package/dist/Banner/index.d.ts +2 -2
- package/dist/Blockquote/Blockquote.d.ts +1 -1
- package/dist/Blockquote/index.d.ts +2 -2
- package/dist/BottomSheet/BottomSheet.d.ts +58 -10
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +435 -198
- package/dist/BottomSheet/BottomSheetHostContext.d.ts +8 -0
- package/dist/BottomSheet/BottomSheetHostContext.d.ts.map +1 -0
- package/dist/BottomSheet/BottomSheetHostContext.js +35 -0
- package/dist/BottomSheet/BottomSheetPanel.d.ts +12 -4
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +76 -22
- package/dist/BottomSheet/BottomSheetSwitcher.d.ts +54 -15
- package/dist/BottomSheet/BottomSheetSwitcher.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetSwitcher.js +229 -27
- package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts +8 -2
- package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetEscape.d.ts +3 -0
- package/dist/BottomSheet/bottomSheetEscape.d.ts.map +1 -0
- package/dist/BottomSheet/bottomSheetEscape.js +20 -0
- package/dist/BottomSheet/bottomSheetStack.d.ts +262 -0
- package/dist/BottomSheet/bottomSheetStack.d.ts.map +1 -0
- package/dist/BottomSheet/bottomSheetStack.js +1652 -0
- package/dist/BottomSheet/index.d.ts +4 -4
- package/dist/BottomSheet/useSheetGestures.d.ts +19 -3
- package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
- package/dist/BottomSheet/useSheetGestures.js +43 -14
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts +4 -4
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +5 -0
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/dist/Breadcrumbs/index.d.ts +12 -12
- package/dist/Button/Button.d.ts +4 -4
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +18 -7
- package/dist/Button/index.d.ts +2 -2
- package/dist/ButtonGroup/ButtonGroup.d.ts +4 -4
- package/dist/ButtonGroup/index.d.ts +4 -4
- package/dist/Calendar/Calendar.d.ts +3 -3
- package/dist/Calendar/dayCellUtils.d.ts +1 -1
- package/dist/Calendar/getInitialFocusDate.d.ts +2 -2
- package/dist/Calendar/getStandaloneShortWeekdayNames.d.ts +1 -1
- package/dist/Calendar/hooks/index.d.ts +6 -6
- package/dist/Calendar/hooks/useCalendarConstraints.d.ts +2 -2
- package/dist/Calendar/hooks/useCalendarDays.d.ts +2 -2
- package/dist/Calendar/hooks/useCalendarNavigation.d.ts +2 -2
- package/dist/Calendar/index.d.ts +5 -5
- package/dist/Calendar/utils.d.ts +1 -1
- package/dist/Card/Card.d.ts +4 -4
- package/dist/Card/index.d.ts +2 -2
- package/dist/Carousel/Carousel.d.ts +2 -2
- package/dist/Carousel/index.d.ts +2 -2
- package/dist/Center/Center.d.ts +2 -2
- package/dist/Center/index.d.ts +2 -2
- package/dist/Chat/ChatComposer.d.ts +1 -1
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +25 -32
- package/dist/Chat/ChatComposerDrawer.d.ts +1 -1
- package/dist/Chat/ChatComposerInput.d.ts +4 -4
- package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
- package/dist/Chat/ChatComposerInput.js +55 -16
- package/dist/Chat/ChatDictationButton.d.ts +2 -2
- package/dist/Chat/ChatLayout.d.ts +1 -1
- package/dist/Chat/ChatLayoutScrollButton.d.ts +1 -1
- package/dist/Chat/ChatMessage.d.ts +2 -2
- package/dist/Chat/ChatMessageBubble.d.ts +2 -2
- package/dist/Chat/ChatMessageList.d.ts +3 -3
- package/dist/Chat/ChatMessageMetadata.d.ts +1 -1
- package/dist/Chat/ChatMessageMetadata.js +2 -2
- package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
- package/dist/Chat/ChatPastedTextToken.js +7 -6
- package/dist/Chat/ChatSendButton.d.ts +1 -1
- package/dist/Chat/ChatSystemMessage.d.ts +1 -1
- package/dist/Chat/ChatTokenizedText.d.ts +2 -2
- package/dist/Chat/ChatToolCalls.d.ts +1 -1
- package/dist/Chat/ChatToolCalls.js +4 -4
- package/dist/Chat/index.d.ts +43 -43
- package/dist/Chat/useChatComposerTokens.d.ts +1 -1
- package/dist/Chat/useChatDictation.d.ts +1 -1
- package/dist/Chat/useChatPasteAsToken.d.ts +1 -1
- package/dist/Chat/useTriggerMenu.d.ts +2 -2
- package/dist/CheckboxInput/CheckboxInput.d.ts +4 -4
- package/dist/CheckboxInput/index.d.ts +2 -2
- package/dist/CheckboxList/CheckboxList.d.ts +4 -4
- package/dist/CheckboxList/CheckboxListItem.d.ts +2 -2
- package/dist/CheckboxList/index.d.ts +4 -4
- package/dist/Citation/Citation.d.ts +1 -1
- package/dist/Citation/index.d.ts +2 -2
- package/dist/ClickableCard/ClickableCard.d.ts +3 -3
- package/dist/ClickableCard/ClickableCard.d.ts.map +1 -1
- package/dist/ClickableCard/ClickableCard.js +10 -6
- package/dist/ClickableCard/index.d.ts +2 -2
- package/dist/Code/Code.d.ts +1 -1
- package/dist/Code/index.d.ts +1 -1
- package/dist/CodeBlock/CodeBlock.d.ts +27 -4
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +58 -19
- package/dist/CodeBlock/grammar.d.ts +134 -0
- package/dist/CodeBlock/grammar.d.ts.map +1 -0
- package/dist/CodeBlock/grammar.js +219 -0
- package/dist/CodeBlock/highlightRanges.d.ts +1 -1
- package/dist/CodeBlock/index.d.ts +10 -8
- package/dist/CodeBlock/index.d.ts.map +1 -1
- package/dist/CodeBlock/index.js +1 -0
- package/dist/CodeBlock/languages/dockerfile.d.ts +3 -0
- package/dist/CodeBlock/languages/dockerfile.d.ts.map +1 -0
- package/dist/CodeBlock/languages/dockerfile.js +45 -0
- package/dist/CodeBlock/languages/graphql.d.ts +3 -0
- package/dist/CodeBlock/languages/graphql.d.ts.map +1 -0
- package/dist/CodeBlock/languages/graphql.js +27 -0
- package/dist/CodeBlock/languages/java.d.ts +3 -0
- package/dist/CodeBlock/languages/java.d.ts.map +1 -0
- package/dist/CodeBlock/languages/java.js +24 -0
- package/dist/CodeBlock/languages/lua.d.ts +3 -0
- package/dist/CodeBlock/languages/lua.d.ts.map +1 -0
- package/dist/CodeBlock/languages/lua.js +21 -0
- package/dist/CodeBlock/languages/objective-c.d.ts +3 -0
- package/dist/CodeBlock/languages/objective-c.d.ts.map +1 -0
- package/dist/CodeBlock/languages/objective-c.js +27 -0
- package/dist/CodeBlock/languages/powershell.d.ts +3 -0
- package/dist/CodeBlock/languages/powershell.d.ts.map +1 -0
- package/dist/CodeBlock/languages/powershell.js +30 -0
- package/dist/CodeBlock/languages/ruby.d.ts +3 -0
- package/dist/CodeBlock/languages/ruby.d.ts.map +1 -0
- package/dist/CodeBlock/languages/ruby.js +24 -0
- package/dist/CodeBlock/languages/thrift.d.ts +3 -0
- package/dist/CodeBlock/languages/thrift.d.ts.map +1 -0
- package/dist/CodeBlock/languages/thrift.js +18 -0
- package/dist/CodeBlock/languages/toml.d.ts +3 -0
- package/dist/CodeBlock/languages/toml.d.ts.map +1 -0
- package/dist/CodeBlock/languages/toml.js +53 -0
- package/dist/CodeBlock/tokenizer.d.ts +8 -4
- package/dist/CodeBlock/tokenizer.d.ts.map +1 -1
- package/dist/CodeBlock/tokenizer.js +158 -8
- package/dist/Collapsible/Collapsible.d.ts +10 -3
- package/dist/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/Collapsible/Collapsible.js +84 -2
- package/dist/Collapsible/CollapsibleGroup.d.ts +2 -2
- package/dist/Collapsible/index.d.ts +7 -7
- package/dist/CommandPalette/CommandPalette.d.ts +2 -2
- package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPalette.js +15 -1
- package/dist/CommandPalette/CommandPaletteContext.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteEmpty.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteEmpty.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteEmpty.js +1 -0
- package/dist/CommandPalette/CommandPaletteFooter.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteGroup.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteInput.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteInput.js +14 -2
- package/dist/CommandPalette/CommandPaletteItem.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteList.d.ts +1 -1
- package/dist/CommandPalette/busyStartSettle.d.ts +4 -0
- package/dist/CommandPalette/busyStartSettle.d.ts.map +1 -0
- package/dist/CommandPalette/busyStartSettle.js +23 -0
- package/dist/CommandPalette/index.d.ts +16 -16
- package/dist/ComplexSelector/ComplexSelector.d.ts +25 -7
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +42 -7
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ContextMenu/ContextMenu.d.ts +4 -4
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +48 -13
- package/dist/ContextMenu/index.d.ts +9 -9
- package/dist/DateInput/DateInput.d.ts +7 -7
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +12 -5
- package/dist/DateInput/MonthScroller.d.ts +1 -1
- package/dist/DateInput/NativeDateField.d.ts +1 -1
- package/dist/DateInput/NativeDateField.d.ts.map +1 -1
- package/dist/DateInput/NativeDateField.js +2 -1
- package/dist/DateInput/TouchDateField.d.ts +1 -1
- package/dist/DateInput/TouchDateField.d.ts.map +1 -1
- package/dist/DateInput/TouchDateField.js +2 -1
- package/dist/DateInput/Wheel.d.ts.map +1 -1
- package/dist/DateInput/Wheel.js +1 -1
- package/dist/DateInput/index.d.ts +2 -2
- package/dist/DateInput/monthGeometry.d.ts +1 -1
- package/dist/DateRangeInput/DateRangeInput.d.ts +6 -6
- package/dist/DateRangeInput/index.d.ts +2 -2
- package/dist/DateTimeInput/DateTimeInput.d.ts +6 -6
- package/dist/DateTimeInput/NativeDateSegment.d.ts +3 -3
- package/dist/DateTimeInput/NativeTimeSegment.d.ts +4 -4
- package/dist/DateTimeInput/TouchDateTimeField.d.ts +1 -1
- package/dist/DateTimeInput/index.d.ts +2 -2
- package/dist/Dialog/Dialog.d.ts +7 -3
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +20 -8
- package/dist/Dialog/DialogHeader.d.ts +1 -1
- package/dist/Dialog/index.d.ts +6 -6
- package/dist/Dialog/useImperativeDialog.d.ts +1 -1
- package/dist/Divider/Divider.d.ts +2 -2
- package/dist/Divider/index.d.ts +2 -2
- package/dist/Drawer/Drawer.d.ts +3 -3
- package/dist/Drawer/Drawer.d.ts.map +1 -1
- package/dist/Drawer/Drawer.js +18 -13
- package/dist/Drawer/DrawerHeader.d.ts +1 -1
- package/dist/Drawer/index.d.ts +4 -4
- package/dist/DropdownMenu/DropdownMenu.d.ts +5 -5
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +32 -20
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts +2 -2
- package/dist/DropdownMenu/DropdownMenuDivider.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenuGroup.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.d.ts +2 -2
- package/dist/DropdownMenu/DropdownMenuItem.js +3 -3
- package/dist/DropdownMenu/DropdownMenuRadioGroup.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts +12 -7
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +13 -5
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts +8 -8
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +0 -3
- package/dist/DropdownMenu/MenuBottomSheet.d.ts +11 -4
- package/dist/DropdownMenu/MenuBottomSheet.d.ts.map +1 -1
- package/dist/DropdownMenu/MenuBottomSheet.js +35 -9
- package/dist/DropdownMenu/MenuBottomSheetActionList.d.ts +1 -1
- package/dist/DropdownMenu/MenuBottomSheetActionList.js +3 -3
- package/dist/DropdownMenu/index.d.ts +10 -10
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts +4 -2
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts.map +1 -1
- package/dist/DropdownMenu/lazyMenuBottomSheet.js +25 -3
- package/dist/DropdownMenu/menuBottomSheet.stylex.d.ts +23 -0
- package/dist/DropdownMenu/menuBottomSheet.stylex.d.ts.map +1 -0
- package/dist/DropdownMenu/menuBottomSheet.stylex.js +29 -0
- package/dist/DropdownMenu/menuItemHover.d.ts +3 -0
- package/dist/DropdownMenu/menuItemHover.d.ts.map +1 -1
- package/dist/DropdownMenu/menuItemHover.js +14 -1
- package/dist/DropdownMenu/renderDropdownItems.d.ts +1 -1
- package/dist/DropdownMenu/useMenuDrillIn.d.ts +1 -1
- package/dist/DropdownMenu/useMenuDrillIn.d.ts.map +1 -1
- package/dist/DropdownMenu/useMenuDrillIn.js +7 -5
- package/dist/EmptyState/EmptyState.d.ts +5 -3
- package/dist/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/EmptyState/EmptyState.js +6 -4
- package/dist/EmptyState/index.d.ts +2 -2
- package/dist/Field/Field.d.ts +5 -5
- package/dist/Field/Field.js +1 -1
- package/dist/Field/FieldLabel.d.ts +2 -2
- package/dist/Field/FieldLabel.js +1 -1
- package/dist/Field/PanelSearchInput.d.ts +10 -2
- package/dist/Field/PanelSearchInput.d.ts.map +1 -1
- package/dist/Field/PanelSearchInput.js +31 -22
- package/dist/Field/fieldInputFamily.testing.d.ts +1 -1
- package/dist/Field/fieldParts.d.ts +1 -1
- package/dist/Field/index.d.ts +10 -10
- package/dist/Field/inputDisabledFocus.d.ts +14 -0
- package/dist/Field/inputDisabledFocus.d.ts.map +1 -0
- package/dist/Field/inputDisabledFocus.js +19 -0
- package/dist/Field/inputStyles.stylex.d.ts +9 -9
- package/dist/Field/inputStyles.stylex.js +9 -9
- package/dist/FieldStatus/FieldStatus.d.ts +3 -3
- package/dist/FieldStatus/FieldStatus.d.ts.map +1 -1
- package/dist/FieldStatus/FieldStatus.js +7 -3
- package/dist/FieldStatus/index.d.ts +2 -2
- package/dist/FieldStatus/useFieldStatusAnnouncement.d.ts +1 -1
- package/dist/FileInput/FileInput.d.ts +4 -4
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +15 -9
- package/dist/FileInput/index.d.ts +2 -2
- package/dist/FormLayout/FormLayout.d.ts +2 -2
- package/dist/FormLayout/index.d.ts +4 -4
- package/dist/Grid/Grid.d.ts +3 -3
- package/dist/Grid/GridSpan.d.ts +1 -1
- package/dist/Grid/index.d.ts +4 -4
- package/dist/HStack/HStack.d.ts +2 -2
- package/dist/HStack/index.d.ts +1 -1
- package/dist/Heading/Heading.d.ts +4 -4
- package/dist/Heading/index.d.ts +1 -1
- package/dist/HoverCard/HoverCard.d.ts +4 -4
- package/dist/HoverCard/index.d.ts +4 -4
- package/dist/HoverCard/useHoverCard.d.ts +2 -2
- package/dist/Icon/Icon.d.ts +18 -6
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +55 -9
- package/dist/Icon/IconDefaultSizeContext.d.ts +1 -1
- package/dist/Icon/IconSize.stylex.d.ts +16 -11
- package/dist/Icon/IconSize.stylex.d.ts.map +1 -1
- package/dist/Icon/IconSize.stylex.js +27 -11
- package/dist/Icon/defaultIcons.d.ts +1 -1
- package/dist/Icon/globalIconRegistry.d.ts +69 -5
- package/dist/Icon/globalIconRegistry.d.ts.map +1 -1
- package/dist/Icon/globalIconRegistry.js +108 -24
- package/dist/Icon/index.d.ts +30 -6
- package/dist/Icon/index.d.ts.map +1 -1
- package/dist/Icon/index.js +24 -1
- package/dist/Icon/useIcon.d.ts +6 -2
- package/dist/Icon/useIcon.d.ts.map +1 -1
- package/dist/Icon/useIcon.js +5 -1
- package/dist/IconButton/IconButton.d.ts +1 -1
- package/dist/IconButton/index.d.ts +2 -2
- package/dist/Indicator/CheckIndicator.d.ts +1 -1
- package/dist/Indicator/CheckboxIndicator.d.ts +1 -1
- package/dist/Indicator/RadioIndicator.d.ts +1 -1
- package/dist/Indicator/index.d.ts +8 -8
- package/dist/Indicator/indicatorRegistry.d.ts +2 -2
- package/dist/Indicator/types.d.ts +1 -1
- package/dist/Indicator/useIndicator.d.ts +2 -2
- package/dist/InputGroup/InputGroup.d.ts +3 -3
- package/dist/InputGroup/InputGroup.d.ts.map +1 -1
- package/dist/InputGroup/InputGroup.js +46 -36
- package/dist/InputGroup/InputGroupInternalContext.d.ts +4 -0
- package/dist/InputGroup/InputGroupInternalContext.d.ts.map +1 -0
- package/dist/InputGroup/InputGroupInternalContext.js +15 -0
- package/dist/InputGroup/InputGroupText.d.ts +1 -1
- package/dist/InputGroup/InputGroupText.d.ts.map +1 -1
- package/dist/InputGroup/InputGroupText.js +2 -0
- package/dist/InputGroup/groupStyles.d.ts +9 -0
- package/dist/InputGroup/groupStyles.d.ts.map +1 -1
- package/dist/InputGroup/groupStyles.js +28 -14
- package/dist/InputGroup/index.d.ts +6 -6
- package/dist/InteractiveRoleContext/InteractiveRoleContext.d.ts +1 -1
- package/dist/InteractiveRoleContext/index.d.ts +1 -1
- package/dist/Item/Item.d.ts +1 -1
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +1 -1
- package/dist/Item/ItemSwipeLayer.d.ts +2 -2
- package/dist/Item/ItemSwipeLayer.d.ts.map +1 -1
- package/dist/Item/ItemSwipeLayer.js +3 -0
- package/dist/Item/index.d.ts +2 -2
- package/dist/Item/useSwipeAction.d.ts.map +1 -1
- package/dist/Item/useSwipeAction.js +60 -5
- package/dist/Kbd/Kbd.d.ts +3 -3
- package/dist/Kbd/Kbd.d.ts.map +1 -1
- package/dist/Kbd/Kbd.js +18 -11
- package/dist/Kbd/index.d.ts +2 -2
- package/dist/Layer/LayerProvider.d.ts +1 -1
- package/dist/Layer/index.d.ts +18 -18
- package/dist/Layer/layerAnimations.stylex.d.ts +9 -5
- package/dist/Layer/layerAnimations.stylex.d.ts.map +1 -1
- package/dist/Layer/layerAnimations.stylex.js +23 -10
- package/dist/Layer/layerInset.d.ts +1 -1
- package/dist/Layer/layerSlideRules.d.ts +63 -3
- package/dist/Layer/layerSlideRules.d.ts.map +1 -1
- package/dist/Layer/layerSlideRules.js +124 -3
- package/dist/Layer/layerStack.d.ts +12 -9
- package/dist/Layer/layerStack.d.ts.map +1 -1
- package/dist/Layer/layerStack.js +116 -53
- package/dist/Layer/modalOutlet.d.ts +44 -6
- package/dist/Layer/modalOutlet.d.ts.map +1 -1
- package/dist/Layer/modalOutlet.js +150 -14
- package/dist/Layer/preserveAnimations.d.ts +11 -0
- package/dist/Layer/preserveAnimations.d.ts.map +1 -0
- package/dist/Layer/preserveAnimations.js +245 -0
- package/dist/Layer/useLayer.d.ts +19 -2
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +500 -43
- package/dist/Layer/useLayerDismissal.d.ts +11 -8
- package/dist/Layer/useLayerDismissal.d.ts.map +1 -1
- package/dist/Layer/useLayerDismissal.js +8 -8
- package/dist/Layer/useTouchTrigger.d.ts +14 -1
- package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
- package/dist/Layer/useTouchTrigger.js +72 -17
- package/dist/Layout/Layout.d.ts +2 -2
- package/dist/Layout/Layout.d.ts.map +1 -1
- package/dist/Layout/Layout.js +4 -0
- package/dist/Layout/LayoutContent.d.ts +2 -2
- package/dist/Layout/LayoutContent.d.ts.map +1 -1
- package/dist/Layout/LayoutContent.js +2 -2
- package/dist/Layout/LayoutFooter.d.ts +2 -2
- package/dist/Layout/LayoutFooter.d.ts.map +1 -1
- package/dist/Layout/LayoutFooter.js +2 -1
- package/dist/Layout/LayoutHeader.d.ts +2 -2
- package/dist/Layout/LayoutHeader.d.ts.map +1 -1
- package/dist/Layout/LayoutHeader.js +2 -1
- package/dist/Layout/LayoutPanel.d.ts +3 -3
- package/dist/Layout/index.d.ts +29 -29
- package/dist/Layout/layoutEdges.stylex.d.ts +20 -0
- package/dist/Layout/layoutEdges.stylex.d.ts.map +1 -0
- package/dist/Layout/layoutEdges.stylex.js +28 -0
- package/dist/Layout/padding.stylex.d.ts +1 -1
- package/dist/Lightbox/Lightbox.d.ts +6 -3
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +111 -89
- package/dist/Lightbox/LightboxKeyboard.a11y.browser.spec.d.ts +2 -0
- package/dist/Lightbox/LightboxKeyboard.a11y.browser.spec.d.ts.map +1 -0
- package/dist/Lightbox/LightboxKeyboard.a11y.browser.spec.js +78 -0
- package/dist/Lightbox/LightboxViewport.a11y.browser.spec.d.ts +2 -0
- package/dist/Lightbox/LightboxViewport.a11y.browser.spec.d.ts.map +1 -0
- package/dist/Lightbox/LightboxViewport.a11y.browser.spec.js +65 -0
- package/dist/Lightbox/index.d.ts +4 -4
- package/dist/Lightbox/useLightbox.d.ts +1 -1
- package/dist/Link/Link.d.ts +3 -3
- package/dist/Link/LinkContext.d.ts +1 -1
- package/dist/Link/LinkProvider.d.ts +1 -1
- package/dist/Link/index.d.ts +8 -8
- package/dist/Link/useLinkComponent.d.ts +1 -1
- package/dist/List/List.d.ts +3 -3
- package/dist/List/ListItem.d.ts +2 -2
- package/dist/List/index.d.ts +4 -4
- package/dist/Markdown/Markdown.d.ts +15 -5
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.fr23.bench.js +3 -1
- package/dist/Markdown/Markdown.fr23.sampling.d.ts +16 -0
- package/dist/Markdown/Markdown.fr23.sampling.d.ts.map +1 -1
- package/dist/Markdown/Markdown.fr23.sampling.js +13 -4
- package/dist/Markdown/Markdown.js +23 -9
- package/dist/Markdown/MarkdownTable.a11y.chromium.spec.js +1 -0
- package/dist/Markdown/headingProjection.d.ts +3 -3
- package/dist/Markdown/index.d.ts +7 -7
- package/dist/Markdown/parser/index.d.ts +3 -3
- package/dist/Markdown/parser.d.ts +3 -3
- package/dist/Markdown/plugin-renderer/MarkdownPluginNodeRenderer.d.ts +1 -1
- package/dist/Markdown/plugin-renderer/index.d.ts +2 -2
- package/dist/Markdown/plugins/frontmatter.d.ts +2 -2
- package/dist/Markdown/plugins/headingLinks.d.ts +2 -2
- package/dist/Markdown/plugins/index.d.ts +14 -14
- package/dist/Markdown/plugins/protocol.d.ts +1 -1
- package/dist/Markdown/plugins/semanticFence.d.ts +2 -2
- package/dist/Markdown/plugins/softBreaks.d.ts +1 -1
- package/dist/Markdown/plugins/sourceDecoration.d.ts +2 -2
- package/dist/Markdown/plugins/sourceLines.d.ts +1 -1
- package/dist/Markdown/plugins/textTransform.d.ts +2 -2
- package/dist/Markdown/remark.d.ts +1 -1
- package/dist/Markdown/utils.d.ts +4 -4
- package/dist/MetadataList/MetadataList.d.ts +2 -2
- package/dist/MetadataList/MetadataListItem.d.ts +1 -1
- package/dist/MetadataList/index.d.ts +5 -5
- package/dist/MobileNav/MobileNav.d.ts +3 -2
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +46 -37
- package/dist/MobileNav/MobileNavPinchZoom.a11y.chromium.spec.js +1 -0
- package/dist/MobileNav/MobileNavToggle.d.ts +1 -1
- package/dist/MobileNav/index.d.ts +4 -4
- package/dist/MoreMenu/MoreMenu.d.ts +4 -4
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MultiSelector/CreateRow.a11y.chromium.spec.js +1 -0
- package/dist/MultiSelector/MultiSelector.d.ts +8 -8
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.disabledFocus.a11y.chromium.spec.js +1 -0
- package/dist/MultiSelector/MultiSelector.js +21 -5
- package/dist/MultiSelector/OptionActions.a11y.chromium.spec.js +1 -0
- package/dist/MultiSelector/hooks.d.ts +1 -1
- package/dist/MultiSelector/index.d.ts +3 -3
- package/dist/MultiSelector/types.d.ts +1 -1
- package/dist/NavIcon/NavIcon.d.ts +1 -1
- package/dist/NavIcon/index.d.ts +2 -2
- package/dist/NavMenu/NavHeadingMenu.d.ts +2 -2
- package/dist/NavMenu/NavHeadingMenuItem.d.ts +2 -2
- package/dist/NavMenu/NavHeadingMenuItem.d.ts.map +1 -1
- package/dist/NavMenu/NavHeadingMenuItem.js +46 -7
- package/dist/NavMenu/index.d.ts +6 -6
- package/dist/NumberInput/NumberInput.d.ts +9 -9
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +61 -24
- package/dist/NumberInput/index.d.ts +2 -2
- package/dist/NumberInput/numberInputCommit.d.ts +1 -1
- package/dist/NumberInput/numberParser.d.ts +1 -1
- package/dist/Outline/Outline.d.ts +3 -3
- package/dist/Outline/index.d.ts +7 -7
- package/dist/Outline/parseOutlineFromMarkdown.d.ts +2 -2
- package/dist/Outline/useOutlineFromDOM.d.ts +1 -1
- package/dist/Outline/useOutlineFromMarkdown.d.ts +3 -3
- package/dist/Outline/useScrollSpy.d.ts +1 -1
- package/dist/OverflowList/OverflowList.d.ts +2 -2
- package/dist/OverflowList/index.d.ts +2 -2
- package/dist/Overlay/Overlay.d.ts +2 -2
- package/dist/Overlay/index.d.ts +5 -5
- package/dist/Overlay/useOverlay.d.ts +1 -1
- package/dist/Pagination/Pagination.d.ts +2 -2
- package/dist/Pagination/index.d.ts +2 -2
- package/dist/Popover/Popover.d.ts +44 -5
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/Popover/Popover.js +276 -44
- package/dist/Popover/index.d.ts +4 -4
- package/dist/Popover/index.d.ts.map +1 -1
- package/dist/Popover/lazyPopoverBottomSheet.d.ts +23 -0
- package/dist/Popover/lazyPopoverBottomSheet.d.ts.map +1 -0
- package/dist/Popover/lazyPopoverBottomSheet.js +40 -0
- package/dist/Popover/usePopover.d.ts +2 -2
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +11 -5
- package/dist/PowerSearch/PowerSearch.d.ts +5 -5
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +7 -5
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts +2 -2
- package/dist/PowerSearch/PowerSearchFilterEditor.d.ts +1 -1
- package/dist/PowerSearch/PowerSearchToken.d.ts +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts +2 -2
- package/dist/PowerSearch/formatFilterValue.d.ts +3 -3
- package/dist/PowerSearch/index.d.ts +8 -8
- package/dist/PowerSearch/resolveDateTimeRangePart.d.ts +1 -1
- package/dist/PowerSearch/resolveOperatorLabel.d.ts +2 -2
- package/dist/PowerSearch/types.d.ts +1 -1
- package/dist/PowerSearch/useInternalConfig.d.ts +1 -1
- package/dist/PowerSearch/usePowerSearchConfig.d.ts +1 -1
- package/dist/PowerSearch/usePowerSearchSource.d.ts +3 -3
- package/dist/PowerSearch/utils.d.ts +3 -3
- package/dist/ProgressBar/ProgressBar.d.ts +2 -2
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +8 -0
- package/dist/ProgressBar/index.d.ts +2 -2
- package/dist/RadioList/RadioList.d.ts +3 -3
- package/dist/RadioList/RadioListItem.d.ts +2 -2
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +10 -2
- package/dist/RadioList/index.d.ts +4 -4
- package/dist/Resizable/ResizeHandle.d.ts +2 -2
- package/dist/Resizable/index.d.ts +6 -6
- package/dist/Resizable/useResizable.d.ts +2 -2
- package/dist/Resizable/utils.d.ts +3 -3
- package/dist/ScrollableArea/ScrollableArea.d.ts +3 -3
- package/dist/ScrollableArea/ScrollableArea.d.ts.map +1 -1
- package/dist/ScrollableArea/ScrollableArea.js +1 -1
- package/dist/ScrollableArea/index.d.ts +4 -4
- package/dist/Section/Section.d.ts +3 -3
- package/dist/Section/index.d.ts +2 -2
- package/dist/SegmentedControl/SegmentedControl.d.ts +2 -2
- package/dist/SegmentedControl/SegmentedControlItem.d.ts +1 -1
- package/dist/SegmentedControl/index.d.ts +5 -5
- package/dist/SelectableCard/SelectableCard.d.ts +8 -8
- package/dist/SelectableCard/SelectableCard.d.ts.map +1 -1
- package/dist/SelectableCard/SelectableCard.js +15 -11
- package/dist/SelectableCard/index.d.ts +2 -2
- package/dist/Selector/Selector.d.ts +8 -8
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +16 -5
- package/dist/Selector/SelectorOption.d.ts +1 -1
- package/dist/Selector/hooks.d.ts +1 -1
- package/dist/Selector/index.d.ts +4 -4
- package/dist/Selector/types.d.ts +1 -1
- package/dist/Selector/useSelectorPresentation.d.ts +2 -2
- package/dist/Selector/utils.d.ts +1 -1
- package/dist/SideNav/SideNav.d.ts +3 -3
- package/dist/SideNav/SideNavCollapseButton.d.ts +3 -3
- package/dist/SideNav/SideNavHeading.d.ts +2 -2
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +34 -0
- package/dist/SideNav/SideNavItem.d.ts +9 -5
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +36 -13
- package/dist/SideNav/SideNavSection.d.ts +1 -1
- package/dist/SideNav/index.d.ts +14 -14
- package/dist/SizeContext/index.d.ts +1 -1
- package/dist/Skeleton/Skeleton.d.ts +1 -1
- package/dist/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/Skeleton/Skeleton.js +12 -3
- package/dist/Skeleton/index.d.ts +2 -2
- package/dist/Slider/Slider.d.ts +3 -3
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +45 -12
- package/dist/Slider/index.d.ts +2 -2
- package/dist/Spinner/Spinner.d.ts +1 -1
- package/dist/Spinner/index.d.ts +2 -2
- package/dist/Stack/Stack.d.ts +3 -3
- package/dist/Stack/StackItem.d.ts +2 -2
- package/dist/Stack/index.d.ts +6 -6
- package/dist/Stack/stack.stylex.d.ts +1 -1
- package/dist/StatusDot/StatusDot.d.ts +2 -2
- package/dist/StatusDot/StatusDot.d.ts.map +1 -1
- package/dist/StatusDot/StatusDot.js +12 -0
- package/dist/StatusDot/index.d.ts +2 -2
- package/dist/Stepper/Step.d.ts +2 -2
- package/dist/Stepper/Step.d.ts.map +1 -1
- package/dist/Stepper/Step.js +10 -6
- package/dist/Stepper/Stepper.d.ts +2 -2
- package/dist/Stepper/index.d.ts +7 -7
- package/dist/Switch/Switch.d.ts +4 -4
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +5 -5
- package/dist/Switch/index.d.ts +2 -2
- package/dist/Switch/switch.markers.stylex.d.ts +7 -2
- package/dist/Switch/switch.markers.stylex.d.ts.map +1 -1
- package/dist/Switch/switch.markers.stylex.js +8 -3
- package/dist/TabList/Tab.d.ts +2 -2
- package/dist/TabList/Tab.d.ts.map +1 -1
- package/dist/TabList/Tab.js +5 -1
- package/dist/TabList/TabList.d.ts +3 -3
- package/dist/TabList/TabMenu.d.ts +2 -2
- package/dist/TabList/TabMenu.d.ts.map +1 -1
- package/dist/TabList/TabMenu.js +1 -0
- package/dist/TabList/index.d.ts +8 -8
- package/dist/Table/BaseTable.d.ts +1 -1
- package/dist/Table/Table.d.ts +1 -1
- package/dist/Table/TableBody.d.ts +1 -1
- package/dist/Table/TableCell.d.ts +3 -3
- package/dist/Table/TableCell.d.ts.map +1 -1
- package/dist/Table/TableCell.js +1 -0
- package/dist/Table/TableContext.d.ts +1 -1
- package/dist/Table/TableFooter.d.ts +1 -1
- package/dist/Table/TableHeader.d.ts +1 -1
- package/dist/Table/TableHeaderCell.d.ts +3 -3
- package/dist/Table/TableHeaderCell.d.ts.map +1 -1
- package/dist/Table/TableHeaderCell.js +1 -0
- package/dist/Table/TableRow.d.ts +2 -2
- package/dist/Table/TableSelectionToolbar.d.ts +2 -2
- package/dist/Table/columnUtils.d.ts +1 -1
- package/dist/Table/index.d.ts +54 -54
- package/dist/Table/plugins/columnResize/index.d.ts +2 -2
- package/dist/Table/plugins/columnResize/useTableColumnResize.d.ts +1 -1
- package/dist/Table/plugins/columnResize/useTableColumnResize.d.ts.map +1 -1
- package/dist/Table/plugins/columnResize/useTableColumnResize.js +11 -2
- package/dist/Table/plugins/columnSettings/index.d.ts +4 -4
- package/dist/Table/plugins/columnSettings/useTableColumnSettings.d.ts +2 -2
- package/dist/Table/plugins/columnSettings/useTableColumnSettingsState.d.ts +1 -1
- package/dist/Table/plugins/filtering/index.d.ts +4 -4
- package/dist/Table/plugins/filtering/useTableFilterState.d.ts +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.d.ts +2 -2
- package/dist/Table/plugins/groupedRows/index.d.ts +2 -2
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts +1 -1
- package/dist/Table/plugins/pagination/index.d.ts +3 -3
- package/dist/Table/plugins/pagination/useTablePagination.d.ts +1 -1
- package/dist/Table/plugins/rowExpansion/index.d.ts +2 -2
- 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 +103 -4
- package/dist/Table/plugins/rowIndex/index.d.ts +2 -2
- package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts +1 -1
- package/dist/Table/plugins/rowStatus/index.d.ts +2 -2
- package/dist/Table/plugins/rowStatus/useTableRowStatus.d.ts +2 -2
- package/dist/Table/plugins/selection/index.d.ts +4 -4
- package/dist/Table/plugins/selection/useTableSelection.d.ts +1 -1
- package/dist/Table/plugins/selection/useTableSelectionState.d.ts +1 -1
- package/dist/Table/plugins/sortable/index.d.ts +4 -4
- package/dist/Table/plugins/sortable/useTableSortable.d.ts +1 -1
- package/dist/Table/plugins/sortable/useTableSortableState.d.ts +1 -1
- package/dist/Table/plugins/stickyColumns/index.d.ts +2 -2
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +233 -6
- package/dist/Table/plugins/tree/index.d.ts +4 -4
- package/dist/Table/plugins/tree/useTableTreeData.d.ts +1 -1
- package/dist/Table/plugins/tree/useTableTreeState.d.ts +1 -1
- package/dist/Table/rowDivider.d.ts +34 -0
- package/dist/Table/rowDivider.d.ts.map +1 -0
- package/dist/Table/rowDivider.js +118 -0
- package/dist/Table/tableContextMenu.d.ts +2 -2
- package/dist/Table/types.d.ts +3 -3
- package/dist/Table/useBaseTablePlugins.d.ts +1 -1
- package/dist/Table/useTableCellStyles.d.ts +2 -2
- package/dist/Table/utils.d.ts +2 -2
- package/dist/Text/Text.d.ts +3 -3
- package/dist/Text/index.d.ts +4 -4
- package/dist/TextArea/TextArea.d.ts +10 -8
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +15 -12
- package/dist/TextArea/index.d.ts +2 -2
- package/dist/TextInput/TextInput.d.ts +12 -10
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +35 -21
- package/dist/TextInput/index.d.ts +2 -2
- package/dist/Thumbnail/Thumbnail.d.ts +1 -1
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +45 -11
- package/dist/Thumbnail/index.d.ts +2 -2
- package/dist/TimeInput/TimeInput.d.ts +6 -6
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +12 -4
- package/dist/TimeInput/TouchTimeField.d.ts +1 -1
- package/dist/TimeInput/TouchTimeField.d.ts.map +1 -1
- package/dist/TimeInput/TouchTimeField.js +2 -1
- package/dist/TimeInput/index.d.ts +3 -3
- package/dist/Timer/Timer.d.ts +2 -2
- package/dist/Timer/index.d.ts +2 -2
- package/dist/Timestamp/Timestamp.d.ts +3 -3
- package/dist/Timestamp/TimestampHoverCard.d.ts +1 -1
- package/dist/Timestamp/formatInstant.d.ts +2 -2
- package/dist/Timestamp/formatRelativeTime.d.ts +1 -1
- package/dist/Timestamp/index.d.ts +3 -3
- package/dist/Timestamp/tooltipEntries.d.ts +2 -2
- package/dist/Toast/Toast.d.ts +2 -2
- package/dist/Toast/ToastContext.d.ts +1 -1
- package/dist/Toast/ToastViewport.d.ts +2 -2
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +28 -2
- package/dist/Toast/index.d.ts +6 -6
- package/dist/Toast/useToast.d.ts +1 -1
- package/dist/ToggleButton/ToggleButton.d.ts +3 -3
- package/dist/ToggleButton/ToggleButtonGroup.d.ts +1 -1
- package/dist/ToggleButton/index.d.ts +4 -4
- package/dist/Token/Token.d.ts +2 -2
- package/dist/Token/TokenLink.d.ts +1 -1
- package/dist/Token/index.d.ts +2 -2
- package/dist/Tokenizer/Tokenizer.d.ts +77 -10
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +474 -85
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts +98 -0
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts.map +1 -0
- package/dist/Tokenizer/TokenizerBottomSheet.js +721 -0
- package/dist/Tokenizer/index.d.ts +2 -2
- package/dist/Tokenizer/useEndLaneReserve.d.ts +3 -2
- package/dist/Tokenizer/useEndLaneReserve.d.ts.map +1 -1
- package/dist/Tokenizer/useEndLaneReserve.js +3 -2
- package/dist/Toolbar/Toolbar.d.ts +4 -4
- package/dist/Toolbar/index.d.ts +2 -2
- package/dist/Tooltip/Tooltip.d.ts +3 -3
- package/dist/Tooltip/index.d.ts +4 -4
- package/dist/Tooltip/useTooltip.d.ts +2 -2
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +9 -3
- package/dist/TopNav/TopNav.d.ts +1 -1
- package/dist/TopNav/TopNavHeading.d.ts +2 -2
- package/dist/TopNav/TopNavItem.d.ts +3 -3
- package/dist/TopNav/TopNavMegaMenu.d.ts +1 -1
- package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenu.js +4 -4
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.d.ts +1 -1
- package/dist/TopNav/TopNavMegaMenuItem.d.ts +2 -2
- package/dist/TopNav/TopNavMenu.d.ts +1 -1
- package/dist/TopNav/index.d.ts +16 -16
- package/dist/TreeList/TreeList.d.ts +11 -26
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +175 -3
- package/dist/TreeList/TreeListItem.d.ts +8 -2
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +3 -1
- package/dist/TreeList/TreeListTypes.d.ts +1 -1
- package/dist/TreeList/index.d.ts +3 -3
- package/dist/Typeahead/BaseTypeahead.d.ts +2 -2
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +16 -4
- package/dist/Typeahead/Typeahead.d.ts +7 -7
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +31 -14
- package/dist/Typeahead/TypeaheadItem.d.ts +2 -2
- package/dist/Typeahead/createStaticSource.d.ts +1 -1
- package/dist/Typeahead/index.d.ts +9 -9
- package/dist/Typeahead/utils.d.ts +3 -3
- package/dist/VStack/VStack.d.ts +2 -2
- package/dist/VStack/index.d.ts +1 -1
- package/dist/VisuallyHidden/VisuallyHidden.d.ts +24 -6
- package/dist/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/dist/VisuallyHidden/VisuallyHidden.js +24 -5
- package/dist/VisuallyHidden/index.d.ts +2 -2
- package/dist/astryx.css +138 -51
- package/dist/gestures/GestureArena.d.ts +175 -0
- package/dist/gestures/GestureArena.d.ts.map +1 -0
- package/dist/gestures/GestureArena.js +816 -0
- package/dist/gestures/GestureRecognizer.d.ts +239 -0
- package/dist/gestures/GestureRecognizer.d.ts.map +1 -0
- package/dist/gestures/GestureRecognizer.js +487 -0
- package/dist/gestures/LongPressGestureRecognizer.d.ts +32 -0
- package/dist/gestures/LongPressGestureRecognizer.d.ts.map +1 -0
- package/dist/gestures/LongPressGestureRecognizer.js +135 -0
- package/dist/gestures/PanGestureRecognizer.d.ts +117 -0
- package/dist/gestures/PanGestureRecognizer.d.ts.map +1 -0
- package/dist/gestures/PanGestureRecognizer.js +349 -0
- package/dist/gestures/TapGestureRecognizer.d.ts +39 -0
- package/dist/gestures/TapGestureRecognizer.d.ts.map +1 -0
- package/dist/gestures/TapGestureRecognizer.js +151 -0
- package/dist/gestures/VelocityTracker.d.ts +51 -0
- package/dist/gestures/VelocityTracker.d.ts.map +1 -0
- package/dist/gestures/VelocityTracker.js +186 -0
- package/dist/gestures/geometry.d.ts +17 -0
- package/dist/gestures/geometry.d.ts.map +1 -0
- package/dist/gestures/geometry.js +55 -0
- package/dist/gestures/types.d.ts +139 -0
- package/dist/gestures/types.d.ts.map +1 -0
- package/dist/gestures/types.js +67 -0
- package/dist/hooks/AnnounceRenderedText.d.ts +17 -0
- package/dist/hooks/AnnounceRenderedText.d.ts.map +1 -0
- package/dist/hooks/AnnounceRenderedText.js +32 -0
- package/dist/hooks/ModalAnnounceProvider.d.ts +41 -0
- package/dist/hooks/ModalAnnounceProvider.d.ts.map +1 -0
- package/dist/hooks/ModalAnnounceProvider.js +133 -0
- package/dist/hooks/actionGroupTracker.d.ts +98 -0
- package/dist/hooks/actionGroupTracker.d.ts.map +1 -0
- package/dist/hooks/actionGroupTracker.js +338 -0
- package/dist/hooks/index.d.ts +54 -52
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/modalAnnounce.d.ts +18 -0
- package/dist/hooks/modalAnnounce.d.ts.map +1 -0
- package/dist/hooks/modalAnnounce.js +382 -0
- package/dist/hooks/useAdaptivePresentation.d.ts +9 -1
- package/dist/hooks/useAdaptivePresentation.d.ts.map +1 -1
- package/dist/hooks/useAdaptivePresentation.js +33 -8
- package/dist/hooks/useAnimatedLayout.d.ts +42 -0
- package/dist/hooks/useAnimatedLayout.d.ts.map +1 -0
- package/dist/hooks/useAnimatedLayout.js +46 -0
- package/dist/hooks/useAnnounce.d.ts +132 -1
- package/dist/hooks/useAnnounce.d.ts.map +1 -1
- package/dist/hooks/useAnnounce.js +356 -27
- package/dist/hooks/useAnnounceRenderedText.d.ts +19 -2
- package/dist/hooks/useAnnounceRenderedText.d.ts.map +1 -1
- package/dist/hooks/useAnnounceRenderedText.js +52 -11
- package/dist/hooks/useAutoMediaMode.d.ts +1 -1
- package/dist/hooks/useBusyAnnouncement.d.ts +9 -5
- package/dist/hooks/useBusyAnnouncement.d.ts.map +1 -1
- package/dist/hooks/useBusyAnnouncement.js +58 -46
- package/dist/hooks/useFocusTrap.d.ts +1 -1
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +57 -26
- package/dist/hooks/useInputContainer.d.ts +1 -1
- package/dist/hooks/useInputStatusIcon.d.ts +3 -3
- package/dist/hooks/useMenuPress.d.ts +5 -3
- package/dist/hooks/useMenuPress.d.ts.map +1 -1
- package/dist/hooks/useMenuPress.js +58 -33
- package/dist/hooks/usePressFeedback.d.ts +1 -1
- package/dist/hooks/useScrollableArea.d.ts +1 -1
- package/dist/hooks/useScrollableArea.d.ts.map +1 -1
- package/dist/hooks/useScrollableArea.js +37 -5
- package/dist/i18n/InternationalizationContext.d.ts +2 -2
- package/dist/i18n/InternationalizationProvider.d.ts +1 -1
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +33 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +33 -0
- package/dist/i18n/index.d.ts +12 -12
- package/dist/i18n/resolve.d.ts +1 -1
- package/dist/i18n/useLocale.d.ts +1 -1
- package/dist/index.d.ts +111 -111
- package/dist/internal/tokenizer-presentation.d.ts +21 -0
- package/dist/internal/tokenizer-presentation.d.ts.map +1 -0
- package/dist/internal/tokenizer-presentation.js +21 -0
- package/dist/internal/touch.d.ts +26 -0
- package/dist/internal/touch.d.ts.map +1 -0
- package/dist/internal/touch.js +28 -0
- package/dist/motion/LayoutChangeSnapshot.d.ts +33 -0
- package/dist/motion/LayoutChangeSnapshot.d.ts.map +1 -0
- package/dist/motion/LayoutChangeSnapshot.js +37 -0
- package/dist/motion/animatedLayout.d.ts +94 -0
- package/dist/motion/animatedLayout.d.ts.map +1 -0
- package/dist/motion/animatedLayout.js +1096 -0
- package/dist/motion/animator.d.ts +240 -0
- package/dist/motion/animator.d.ts.map +1 -0
- package/dist/motion/animator.js +2203 -0
- package/dist/motion/bezier.d.ts +18 -0
- package/dist/motion/bezier.d.ts.map +1 -0
- package/dist/motion/bezier.js +60 -0
- package/dist/motion/coast.d.ts +61 -0
- package/dist/motion/coast.d.ts.map +1 -0
- package/dist/motion/coast.js +107 -0
- package/dist/motion/decay.d.ts +41 -0
- package/dist/motion/decay.d.ts.map +1 -0
- package/dist/motion/decay.js +90 -0
- package/dist/motion/projection.d.ts +36 -0
- package/dist/motion/projection.d.ts.map +1 -0
- package/dist/motion/projection.js +92 -0
- package/dist/motion/reducedMotion.d.ts +25 -0
- package/dist/motion/reducedMotion.d.ts.map +1 -0
- package/dist/motion/reducedMotion.js +85 -0
- package/dist/motion/reducedMotion.stylex.d.ts +19 -0
- package/dist/motion/reducedMotion.stylex.d.ts.map +1 -0
- package/dist/motion/reducedMotion.stylex.js +37 -0
- package/dist/motion/reducedMotionPlan.d.ts +89 -0
- package/dist/motion/reducedMotionPlan.d.ts.map +1 -0
- package/dist/motion/reducedMotionPlan.js +194 -0
- package/dist/motion/resolveSnapPoint.d.ts +52 -0
- package/dist/motion/resolveSnapPoint.d.ts.map +1 -0
- package/dist/motion/resolveSnapPoint.js +135 -0
- package/dist/motion/roleValue.d.ts +33 -0
- package/dist/motion/roleValue.d.ts.map +1 -0
- package/dist/motion/roleValue.js +84 -0
- package/dist/motion/roles.d.ts +79 -0
- package/dist/motion/roles.d.ts.map +1 -0
- package/dist/motion/roles.js +199 -0
- package/dist/motion/rubberBand.d.ts +20 -0
- package/dist/motion/rubberBand.d.ts.map +1 -0
- package/dist/motion/rubberBand.js +91 -0
- package/dist/motion/selectPage.d.ts +26 -0
- package/dist/motion/selectPage.d.ts.map +1 -0
- package/dist/motion/selectPage.js +55 -0
- package/dist/motion/spring.d.ts +193 -0
- package/dist/motion/spring.d.ts.map +1 -0
- package/dist/motion/spring.js +442 -0
- package/dist/motion/uikit/gestures.d.ts +642 -0
- package/dist/motion/uikit/gestures.d.ts.map +1 -0
- package/dist/motion/uikit/gestures.js +428 -0
- package/dist/motion/uikit/index.d.ts +24 -0
- package/dist/motion/uikit/index.d.ts.map +1 -0
- package/dist/motion/uikit/index.js +26 -0
- package/dist/motion/uikit/navigation.d.ts +54 -0
- package/dist/motion/uikit/navigation.d.ts.map +1 -0
- package/dist/motion/uikit/navigation.js +83 -0
- package/dist/motion/uikit/scroll.d.ts +116 -0
- package/dist/motion/uikit/scroll.d.ts.map +1 -0
- package/dist/motion/uikit/scroll.js +146 -0
- package/dist/motion/uikit/springs.d.ts +545 -0
- package/dist/motion/uikit/springs.d.ts.map +1 -0
- package/dist/motion/uikit/springs.js +548 -0
- package/dist/motion/uikit/timing.d.ts +202 -0
- package/dist/motion/uikit/timing.d.ts.map +1 -0
- package/dist/motion/uikit/timing.js +201 -0
- package/dist/reset.a11y.chromium.spec.js +1 -0
- package/dist/reset.until-found.a11y.browser.spec.js +1 -0
- package/dist/theme/Theme.d.ts +2 -2
- package/dist/theme/contrast.d.ts +1 -1
- package/dist/theme/declarationBoundary.d.ts +13 -0
- package/dist/theme/declarationBoundary.d.ts.map +1 -1
- package/dist/theme/declarationBoundary.js +264 -1
- package/dist/theme/defineTheme.d.ts +113 -22
- package/dist/theme/defineTheme.d.ts.map +1 -1
- package/dist/theme/defineTheme.js +66 -7
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +9 -0
- package/dist/theme/domainTokens/index.d.ts +6 -6
- package/dist/theme/generateThemeRules.d.ts +7 -3
- package/dist/theme/generateThemeRules.d.ts.map +1 -1
- package/dist/theme/generateThemeRules.js +468 -24
- package/dist/theme/index.d.ts +31 -31
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/theme/localTokens.d.ts +1 -1
- package/dist/theme/mergeComponents.d.ts +1 -1
- package/dist/theme/onMediaTokens.d.ts +1 -1
- package/dist/theme/resolveThemeValues.d.ts +7 -7
- package/dist/theme/statusColor.d.ts +48 -0
- package/dist/theme/statusColor.d.ts.map +1 -0
- package/dist/theme/statusColor.js +203 -0
- package/dist/theme/statusRoleDerivation.d.ts +11 -0
- package/dist/theme/statusRoleDerivation.d.ts.map +1 -0
- package/dist/theme/statusRoleDerivation.js +236 -0
- package/dist/theme/syntax/SyntaxTheme.d.ts +1 -1
- package/dist/theme/syntax/index.d.ts +7 -7
- package/dist/theme/syntax/presets.d.ts +1 -1
- package/dist/theme/themeAdaptations.d.ts +30 -6
- package/dist/theme/themeAdaptations.d.ts.map +1 -1
- package/dist/theme/themeAdaptations.js +30 -1
- package/dist/theme/themeRegistry.d.ts +1 -1
- package/dist/theme/tokens.d.ts +1 -1
- package/dist/theme/tokens.d.ts.map +1 -1
- package/dist/theme/tokens.js +16 -1
- package/dist/theme/tokens.stylex.d.ts +40 -2
- package/dist/theme/tokens.stylex.d.ts.map +1 -1
- package/dist/theme/tokens.stylex.js +47 -2
- package/dist/theme/types.d.ts +1 -1
- package/dist/theme/useTheme.d.ts +6 -4
- package/dist/theme/useTheme.d.ts.map +1 -1
- package/dist/theme/useTheme.js +10 -4
- package/dist/utils/dateParser.d.ts +3 -3
- package/dist/utils/edgeAutoscroll.d.ts +53 -0
- package/dist/utils/edgeAutoscroll.d.ts.map +1 -0
- package/dist/utils/edgeAutoscroll.js +81 -0
- package/dist/utils/groupItems.d.ts +1 -1
- package/dist/utils/hitArea.d.ts +72 -0
- package/dist/utils/hitArea.d.ts.map +1 -0
- package/dist/utils/hitArea.js +681 -0
- package/dist/utils/index.d.ts +29 -29
- package/dist/utils/plainDate.d.ts +3 -3
- package/dist/utils/touchPresentation.d.ts +48 -0
- package/dist/utils/touchPresentation.d.ts.map +1 -0
- package/dist/utils/touchPresentation.js +133 -0
- package/locales/af-ZA.json +1 -1
- package/locales/ar-SA.json +1 -1
- package/locales/ca-ES.json +1 -1
- package/locales/cs-CZ.json +1 -1
- package/locales/da-DK.json +1 -1
- package/locales/de-DE.json +1 -1
- package/locales/el-GR.json +1 -1
- package/locales/en.json +132 -0
- package/locales/es-ES.json +1 -1
- package/locales/fi-FI.json +1 -1
- package/locales/fr-FR.json +1 -1
- package/locales/he-IL.json +1 -1
- package/locales/hu-HU.json +1 -1
- package/locales/it-IT.json +1 -1
- package/locales/ja-JP.json +1 -1
- package/locales/ko-KR.json +1 -1
- package/locales/nl-NL.json +1 -1
- package/locales/no-NO.json +1 -1
- package/locales/pl-PL.json +1 -1
- package/locales/pseudo.json +99 -0
- package/locales/pt-BR.json +1 -1
- package/locales/pt-PT.json +1 -1
- package/locales/ro-RO.json +1 -1
- package/locales/ru-RU.json +1 -1
- package/locales/sr-SP.json +1 -1
- package/locales/sv-SE.json +1 -1
- package/locales/tr-TR.json +1 -1
- package/locales/uk-UA.json +1 -1
- package/locales/vi-VN.json +1 -1
- package/locales/zh-CN.json +1 -1
- package/locales/zh-TW.json +1 -1
- package/package.json +61 -6
- package/src/AlertDialog/AlertDialog.tsx +1 -1
- package/src/AlertDialog/__tests__/AlertDialog.a11y.chromium.spec.ts +1 -0
- package/src/AppShell/AppShell.spec.md +337 -0
- package/src/AspectRatio/AspectRatio.spec.md +179 -0
- package/src/AspectRatio/__tests__/AspectRatioFitLayers.a11y.browser.spec.ts +1 -0
- package/src/Avatar/Avatar.spec.md +253 -0
- package/src/Avatar/AvatarStatusDot.spec.md +93 -79
- package/src/Avatar/AvatarStatusDot.test.tsx +22 -0
- package/src/Avatar/AvatarStatusDot.tsx +2 -2
- package/src/AvatarGroup/AvatarGroup.spec.md +205 -0
- package/src/AvatarGroup/AvatarGroupOverflow.spec.md +123 -120
- package/src/Badge/Badge.doc.mjs +2 -1
- package/src/Badge/Badge.spec.md +207 -0
- package/src/Badge/Badge.test.tsx +13 -0
- package/src/Badge/Badge.tsx +38 -2
- package/src/Banner/Banner.spec.md +38 -27
- package/src/Banner/Banner.test.tsx +118 -16
- package/src/Banner/Banner.tsx +94 -7
- package/src/Blockquote/Blockquote.spec.md +171 -0
- package/src/BottomSheet/BottomSheet.doc.mjs +106 -24
- package/src/BottomSheet/BottomSheet.spec.md +269 -40
- package/src/BottomSheet/BottomSheet.test.tsx +491 -5
- package/src/BottomSheet/BottomSheet.tsx +544 -145
- package/src/BottomSheet/BottomSheetHostContext.ts +44 -0
- package/src/BottomSheet/BottomSheetPanel.test.tsx +21 -10
- package/src/BottomSheet/BottomSheetPanel.tsx +166 -57
- package/src/BottomSheet/BottomSheetReplace.test.tsx +1526 -0
- package/src/BottomSheet/BottomSheetStacking.announce.test.tsx +246 -0
- package/src/BottomSheet/BottomSheetStacking.test.tsx +3184 -0
- package/src/BottomSheet/BottomSheetSwitcher.doc.mjs +27 -31
- package/src/BottomSheet/BottomSheetSwitcher.spec.md +138 -43
- package/src/BottomSheet/BottomSheetSwitcher.tsx +275 -26
- package/src/BottomSheet/BottomSheetSwitcherContext.ts +6 -0
- package/src/BottomSheet/__tests__/BottomSheetDrag.a11y.chromium.spec.ts +1 -0
- package/src/BottomSheet/__tests__/BottomSheetFocusReturn.a11y.browser.spec.ts +1 -0
- package/src/BottomSheet/__tests__/BottomSheetKeyboard.a11y.browser.spec.ts +1 -0
- package/src/BottomSheet/__tests__/BottomSheetNativeModal.a11y.browser.spec.ts +1 -0
- package/src/BottomSheet/__tests__/BottomSheetPinchZoom.a11y.chromium.spec.ts +1 -0
- package/src/BottomSheet/__tests__/BottomSheetToastOutlet.a11y.chromium.spec.ts +83 -0
- package/src/BottomSheet/bottomSheetEscape.ts +21 -0
- package/src/BottomSheet/bottomSheetStack.ts +2031 -0
- package/src/BottomSheet/useSheetGestures.ts +68 -12
- package/src/Breadcrumbs/BreadcrumbItem.spec.md +96 -59
- package/src/Breadcrumbs/BreadcrumbItem.tsx +5 -0
- package/src/Breadcrumbs/Breadcrumbs.spec.md +165 -0
- package/src/Breadcrumbs/Breadcrumbs.test.tsx +22 -0
- package/src/Breadcrumbs/__tests__/Breadcrumbs.a11y.chromium.spec.ts +1 -0
- package/src/Button/Button.spec.md +322 -0
- package/src/Button/Button.test.tsx +8 -1
- package/src/Button/Button.tsx +36 -7
- package/src/Button/__tests__/Button.a11y.chromium.spec.ts +1 -0
- package/src/ButtonGroup/ButtonGroup.spec.md +218 -0
- package/src/Calendar/__tests__/Calendar.a11y.chromium.spec.ts +1 -0
- package/src/Card/Card.spec.md +205 -0
- package/src/Carousel/__tests__/Carousel.a11y.chromium.spec.ts +1 -0
- package/src/Chat/ChatComposer.test.tsx +54 -0
- package/src/Chat/ChatComposer.tsx +41 -27
- package/src/Chat/ChatComposerInput.test.tsx +165 -21
- package/src/Chat/ChatComposerInput.tsx +73 -16
- package/src/Chat/ChatMessageMetadata.tsx +1 -1
- package/src/Chat/ChatPastedTextToken.test.tsx +71 -0
- package/src/Chat/ChatPastedTextToken.tsx +8 -7
- package/src/Chat/ChatToolCalls.tsx +5 -5
- package/src/Chat/__tests__/ChatLayoutScrollButton.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/ChatLayoutScrollButtonSurface.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/ChatMessageList.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/ChatMessageMetadata.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/ChatSendButton.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/ChatSystemMessage.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/ChatTokenizedText.a11y.chromium.spec.ts +1 -0
- package/src/Chat/__tests__/useChatStreamScroll.a11y.chromium.spec.ts +1 -0
- package/src/CheckboxInput/CheckboxInput.spec.md +97 -66
- package/src/CheckboxInput/__tests__/Checkbox.a11y.chromium.spec.ts +1 -0
- package/src/CheckboxList/CheckboxList.spec.md +92 -78
- package/src/CheckboxList/CheckboxListItem.spec.md +86 -60
- package/src/CheckboxList/__tests__/CheckboxList.a11y.chromium.spec.ts +1 -0
- package/src/ClickableCard/ClickableCard.doc.mjs +1 -2
- package/src/ClickableCard/ClickableCard.test.tsx +14 -3
- package/src/ClickableCard/ClickableCard.tsx +44 -28
- package/src/Code/Code.spec.md +30 -32
- package/src/CodeBlock/CodeBlock.doc.mjs +21 -4
- package/src/CodeBlock/CodeBlock.spec.md +96 -61
- package/src/CodeBlock/CodeBlock.test.tsx +97 -1
- package/src/CodeBlock/CodeBlock.tsx +132 -22
- package/src/CodeBlock/CodeLanguage.test.tsx +173 -0
- package/src/CodeBlock/__tests__/CodeBlockCopyClearance.a11y.chromium.spec.ts +290 -0
- package/src/CodeBlock/__tests__/CodeBlockLanguages.a11y.chromium.spec.ts +64 -0
- package/src/CodeBlock/__tests__/CodeBlockOverflowStop.a11y.chromium.spec.ts +1 -0
- package/src/CodeBlock/__tests__/DiffRowPaint.a11y.chromium.spec.ts +1 -0
- package/src/CodeBlock/grammar.ts +291 -0
- package/src/CodeBlock/index.ts +7 -0
- package/src/CodeBlock/languages/dockerfile.ts +43 -0
- package/src/CodeBlock/languages/graphql.ts +30 -0
- package/src/CodeBlock/languages/java.ts +28 -0
- package/src/CodeBlock/languages/lua.ts +21 -0
- package/src/CodeBlock/languages/objective-c.ts +26 -0
- package/src/CodeBlock/languages/powershell.ts +31 -0
- package/src/CodeBlock/languages/ruby.ts +29 -0
- package/src/CodeBlock/languages/thrift.ts +32 -0
- package/src/CodeBlock/languages/toml.ts +36 -0
- package/src/CodeBlock/languages.test.ts +402 -0
- package/src/CodeBlock/tokenizer.ts +176 -16
- package/src/CodeBlock/tokenizerBudget.test.ts +112 -0
- package/src/Collapsible/Collapsible.doc.mjs +6 -0
- package/src/Collapsible/Collapsible.spec.md +26 -23
- package/src/Collapsible/Collapsible.tsx +121 -2
- package/src/Collapsible/__tests__/Collapsible.a11y.chromium.spec.ts +1 -0
- package/src/Collapsible/__tests__/CollapsibleGroup.a11y.chromium.spec.ts +1 -0
- package/src/Collapsible/__tests__/CollapsibleGroupAccordion.a11y.chromium.spec.ts +1 -0
- package/src/CommandPalette/CommandPalette.perf.test.ts +8 -4
- package/src/CommandPalette/CommandPalette.tsx +17 -1
- package/src/CommandPalette/CommandPaletteEmpty.doc.mjs +6 -3
- package/src/CommandPalette/CommandPaletteEmpty.spec.md +190 -0
- package/src/CommandPalette/CommandPaletteEmpty.tsx +4 -0
- package/src/CommandPalette/CommandPaletteInput.tsx +21 -2
- package/src/CommandPalette/__tests__/CommandPalette.a11y.chromium.spec.ts +1 -0
- package/src/CommandPalette/__tests__/CommandPaletteEmptyAudit.a11y.chromium.spec.ts +715 -0
- package/src/CommandPalette/__tests__/CommandPaletteFooter.a11y.chromium.spec.ts +1 -0
- package/src/CommandPalette/__tests__/CommandPaletteInputAudit.a11y.chromium.spec.ts +1 -0
- package/src/CommandPalette/__tests__/CommandPaletteItemAudit.a11y.chromium.spec.ts +1 -0
- package/src/CommandPalette/busyStartSettle.ts +26 -0
- package/src/ComplexSelector/ComplexSelector.doc.mjs +1 -1
- package/src/ComplexSelector/ComplexSelector.focusableDisabled.test.tsx +1 -1
- package/src/ComplexSelector/ComplexSelector.fr10.test.tsx +9 -9
- package/src/ComplexSelector/ComplexSelector.spec.md +161 -107
- package/src/ComplexSelector/ComplexSelector.test.tsx +236 -17
- package/src/ComplexSelector/ComplexSelector.tsx +69 -4
- package/src/ComplexSelector/__tests__/ComplexSelector.a11y.chromium.spec.ts +965 -0
- package/src/ContextMenu/ContextMenu.doc.mjs +1 -1
- package/src/ContextMenu/ContextMenu.spec.md +38 -30
- package/src/ContextMenu/ContextMenu.test.tsx +189 -11
- package/src/ContextMenu/ContextMenu.tsx +75 -17
- package/src/ContextMenu/__tests__/ContextMenuAudit.a11y.chromium.spec.ts +1 -0
- package/src/ContextMenu/__tests__/ContextMenuCursorAnchor.a11y.browser.spec.ts +1 -0
- package/src/ContextMenu/__tests__/ContextMenuLongPress.a11y.chromium.spec.ts +117 -0
- package/src/DateInput/DateInput.tsx +9 -4
- package/src/DateInput/DateInputTouch.test.tsx +10 -1
- package/src/DateInput/NativeDateField.tsx +2 -1
- package/src/DateInput/TouchDateField.tsx +2 -1
- package/src/DateInput/Wheel.tsx +4 -1
- package/src/DateInput/__tests__/DateInputAudit.a11y.chromium.spec.ts +1 -0
- package/src/DateInput/__tests__/WheelPinchZoom.a11y.chromium.spec.ts +171 -0
- package/src/Dialog/Dialog.doc.mjs +201 -47
- package/src/Dialog/Dialog.tsx +37 -10
- package/src/Dialog/__tests__/Dialog.a11y.browser.spec.ts +1 -0
- package/src/Dialog/__tests__/Dialog.a11y.chromium.spec.ts +1 -0
- package/src/Dialog/__tests__/Dialog.reduced-motion.a11y.browser.spec.ts +191 -0
- package/src/Divider/Divider.spec.md +79 -70
- package/src/Drawer/Drawer.tsx +38 -35
- package/src/Drawer/__tests__/DrawerAudit.a11y.chromium.spec.ts +1 -0
- package/src/Drawer/__tests__/DrawerHeaderAudit.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/DropdownMenu.spec.md +14 -6
- package/src/DropdownMenu/DropdownMenu.ssr.test.tsx +44 -8
- package/src/DropdownMenu/DropdownMenu.test.tsx +64 -5
- package/src/DropdownMenu/DropdownMenu.tsx +47 -21
- package/src/DropdownMenu/DropdownMenuItem.tsx +5 -5
- package/src/DropdownMenu/DropdownMenuRadioItem.doc.mjs +5 -2
- package/src/DropdownMenu/DropdownMenuRadioItem.spec.md +226 -0
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +32 -16
- package/src/DropdownMenu/DropdownMenuSelectable.test.tsx +158 -0
- package/src/DropdownMenu/DropdownMenuSheetFirstOpen.test.tsx +72 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.doc.mjs +9 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.spec.md +225 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.test.tsx +105 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +6 -6
- package/src/DropdownMenu/MenuBottomSheet.tsx +42 -7
- package/src/DropdownMenu/MenuBottomSheetActionList.tsx +3 -3
- package/src/DropdownMenu/__tests__/DropdownMenuDividerAudit.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/DropdownMenuDrillIn.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/DropdownMenuFocusReturn.a11y.browser.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/DropdownMenuGroupAudit.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/DropdownMenuItemAudit.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/DropdownMenuRadioGroupAudit.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/DropdownMenuRadioItemAudit.a11y.chromium.spec.ts +540 -0
- package/src/DropdownMenu/__tests__/DropdownMenuSubMenuAudit.a11y.chromium.spec.ts +671 -0
- package/src/DropdownMenu/__tests__/Menu.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/MenuButton.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/MenuHeaderFooter.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/MenuHoverFocus.a11y.chromium.spec.ts +238 -0
- package/src/DropdownMenu/__tests__/MenuPinchZoom.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/MenuPress.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/__tests__/SubMenuHeaderFooter.a11y.chromium.spec.ts +1 -0
- package/src/DropdownMenu/lazyMenuBottomSheet.ts +28 -2
- package/src/DropdownMenu/menuBottomSheet.stylex.ts +33 -0
- package/src/DropdownMenu/menuItemHover.ts +13 -1
- package/src/DropdownMenu/modules/useMenuPress.spec.md +90 -62
- package/src/DropdownMenu/useMenuDrillIn.tsx +7 -5
- package/src/EmptyState/EmptyState.announce.test.tsx +227 -0
- package/src/EmptyState/EmptyState.doc.mjs +1 -1
- package/src/EmptyState/EmptyState.spec.md +22 -14
- package/src/EmptyState/EmptyState.test.tsx +8 -8
- package/src/EmptyState/EmptyState.tsx +7 -5
- package/src/Field/Field.tsx +1 -1
- package/src/Field/FieldLabel.tsx +1 -1
- package/src/Field/PanelSearchInput.tsx +23 -13
- package/src/Field/__tests__/FieldLabelAudit.a11y.chromium.spec.ts +1 -0
- package/src/Field/inputDisabledFocus.ts +28 -0
- package/src/Field/inputStyles.stylex.ts +15 -15
- package/src/FieldStatus/FieldStatus.test.tsx +12 -0
- package/src/FieldStatus/FieldStatus.tsx +12 -3
- package/src/FieldStatus/__tests__/StatusMessage.a11y.chromium.spec.ts +1 -0
- package/src/FileInput/FileInput.test.tsx +78 -0
- package/src/FileInput/FileInput.tsx +11 -9
- package/src/Heading/Heading.spec.md +198 -0
- package/src/HoverCard/HoverCard.test.tsx +93 -3
- package/src/Icon/Icon.doc.mjs +53 -5
- package/src/Icon/Icon.spec.md +40 -29
- package/src/Icon/Icon.test.tsx +266 -9
- package/src/Icon/Icon.tsx +51 -13
- package/src/Icon/IconSize.stylex.ts +27 -11
- package/src/Icon/globalIconRegistry.test.tsx +326 -3
- package/src/Icon/globalIconRegistry.tsx +137 -36
- package/src/Icon/index.ts +29 -1
- package/src/Icon/useIcon.ts +5 -1
- package/src/IconButton/IconButton.spec.md +197 -0
- package/src/IconButton/IconButton.test.tsx +5 -2
- package/src/InputGroup/InputGroup.spec.md +199 -0
- package/src/InputGroup/InputGroup.test.tsx +120 -0
- package/src/InputGroup/InputGroup.tsx +59 -52
- package/src/InputGroup/InputGroupInternalContext.ts +15 -0
- package/src/InputGroup/InputGroupText.spec.md +139 -0
- package/src/InputGroup/InputGroupText.tsx +2 -0
- package/src/InputGroup/groupStyles.ts +22 -11
- package/src/Item/Item.test.tsx +118 -0
- package/src/Item/Item.tsx +5 -3
- package/src/Item/ItemSwipeLayer.tsx +9 -0
- package/src/Item/__tests__/ItemSwipeActions.a11y.chromium.spec.ts +1 -0
- package/src/Item/__tests__/ItemSwipePinchZoom.a11y.chromium.spec.ts +186 -0
- package/src/Item/useSwipeAction.ts +71 -5
- package/src/Kbd/Kbd.test.tsx +95 -0
- package/src/Kbd/Kbd.tsx +30 -23
- package/src/Layer/__tests__/LayerReducedMotion.a11y.chromium.spec.ts +176 -0
- package/src/Layer/__tests__/TouchTrigger.a11y.chromium.spec.ts +200 -0
- package/src/Layer/layerAnimations.stylex.ts +22 -2
- package/src/Layer/layerDismissalInvariants.test.tsx +9 -0
- package/src/Layer/layerSlideRules.ts +141 -8
- package/src/Layer/layerStack.ts +129 -62
- package/src/Layer/modalOutlet.ts +156 -15
- package/src/Layer/preserveAnimations.ts +304 -0
- package/src/Layer/useLayer.doc.mjs +1 -1
- package/src/Layer/useLayer.test.tsx +743 -0
- package/src/Layer/useLayer.tsx +592 -53
- package/src/Layer/useLayerDismissal.test.tsx +85 -2
- package/src/Layer/useLayerDismissal.ts +12 -9
- package/src/Layer/useTouchTrigger.ts +95 -41
- package/src/Layout/Layout.tsx +18 -0
- package/src/Layout/LayoutContent.tsx +5 -14
- package/src/Layout/LayoutFooter.tsx +2 -0
- package/src/Layout/LayoutHeader.tsx +2 -0
- package/src/Layout/__tests__/Layout.a11y.chromium.spec.ts +1 -0
- package/src/Layout/layoutEdges.stylex.ts +25 -0
- package/src/Lightbox/Lightbox.test.tsx +83 -0
- package/src/Lightbox/Lightbox.tsx +149 -125
- package/src/Lightbox/LightboxKeyboard.a11y.browser.spec.ts +78 -0
- package/src/Lightbox/LightboxViewport.a11y.browser.spec.ts +70 -0
- package/src/Link/Link.spec.md +229 -0
- package/src/Link/LinkProvider.spec.md +167 -0
- package/src/Link/__tests__/Link.a11y.chromium.spec.ts +1 -0
- package/src/Link/__tests__/Link.navigation.a11y.chromium.spec.ts +1 -0
- package/src/List/List.spec.md +90 -33
- package/src/List/ListItem.doc.mjs +3 -3
- package/src/Markdown/Markdown.codeLanguages.test.tsx +137 -0
- package/src/Markdown/Markdown.doc.mjs +12 -0
- package/src/Markdown/Markdown.fr23.bench.ts +3 -1
- package/src/Markdown/Markdown.fr23.perf.test.ts +45 -3
- package/src/Markdown/Markdown.fr23.sampling.ts +13 -4
- package/src/Markdown/Markdown.spec.md +71 -59
- package/src/Markdown/Markdown.tsx +32 -2
- package/src/Markdown/MarkdownTable.a11y.chromium.spec.ts +1 -0
- package/src/Markdown/__tests__/MarkdownNesting.a11y.chromium.spec.ts +1 -0
- package/src/MobileNav/MobileNav.spec.md +161 -64
- package/src/MobileNav/MobileNav.test.tsx +27 -10
- package/src/MobileNav/MobileNav.tsx +51 -38
- package/src/MobileNav/MobileNavPinchZoom.a11y.chromium.spec.ts +1 -0
- package/src/MobileNav/__tests__/MobileNavWidth.a11y.chromium.spec.ts +103 -0
- package/src/MoreMenu/MoreMenu.doc.mjs +2 -2
- package/src/MoreMenu/MoreMenu.spec.md +88 -53
- package/src/MultiSelector/CreateRow.a11y.chromium.spec.ts +1 -0
- package/src/MultiSelector/MultiSelector.disabledFocus.a11y.chromium.spec.ts +1 -0
- package/src/MultiSelector/MultiSelector.test.tsx +122 -10
- package/src/MultiSelector/MultiSelector.tsx +24 -4
- package/src/MultiSelector/OptionActions.a11y.chromium.spec.ts +1 -0
- package/src/MultiSelector/__tests__/MultiSelector.a11y.chromium.spec.ts +1 -0
- package/src/NavIcon/NavIcon.spec.md +66 -38
- package/src/NavMenu/NavHeadingMenu.spec.md +100 -44
- package/src/NavMenu/NavHeadingMenu.test.tsx +199 -1
- package/src/NavMenu/NavHeadingMenuItem.tsx +54 -6
- package/src/NumberInput/NumberInput.doc.mjs +6 -6
- package/src/NumberInput/NumberInput.spec.md +248 -0
- package/src/NumberInput/NumberInput.test.tsx +187 -14
- package/src/NumberInput/NumberInput.tsx +86 -24
- package/src/NumberInput/__tests__/NumberInput.a11y.chromium.spec.ts +1 -0
- package/src/Pagination/Pagination.test.tsx +2 -2
- package/src/Popover/Popover.doc.mjs +38 -2
- package/src/Popover/Popover.spec.md +89 -10
- package/src/Popover/Popover.test.tsx +340 -2
- package/src/Popover/Popover.tsx +401 -35
- package/src/Popover/PopoverPresentation.test.tsx +952 -0
- package/src/Popover/__tests__/PopoverSecondDocument.a11y.chromium.spec.ts +205 -0
- package/src/Popover/index.ts +5 -1
- package/src/Popover/lazyPopoverBottomSheet.ts +57 -0
- package/src/Popover/usePopover.tsx +11 -5
- package/src/PowerSearch/PowerSearch.spec.md +423 -53
- package/src/PowerSearch/PowerSearch.test.tsx +77 -1
- package/src/PowerSearch/PowerSearch.tsx +7 -5
- package/src/ProgressBar/ProgressBar.test.tsx +12 -0
- package/src/ProgressBar/ProgressBar.tsx +18 -0
- package/src/ProgressBar/__tests__/ProgressBar.a11y.chromium.spec.ts +1 -0
- package/src/RadioList/RadioList.test.tsx +34 -7
- package/src/RadioList/RadioListItem.press.source-build.test.mjs +80 -0
- package/src/RadioList/RadioListItem.tsx +26 -12
- package/src/RadioList/__tests__/RadioGroup.a11y.chromium.spec.ts +1 -0
- package/src/Resizable/__tests__/ResizeHandle.a11y.chromium.spec.ts +1 -0
- package/src/ScrollableArea/ScrollableArea.spec.md +6 -5
- package/src/ScrollableArea/ScrollableArea.test.tsx +5 -0
- package/src/ScrollableArea/ScrollableArea.tsx +4 -0
- package/src/SelectableCard/SelectableCard.doc.mjs +7 -6
- package/src/SelectableCard/SelectableCard.test.tsx +11 -1
- package/src/SelectableCard/SelectableCard.tsx +49 -33
- package/src/Selector/Selector.spec.md +12 -4
- package/src/Selector/Selector.test.tsx +114 -8
- package/src/Selector/Selector.tsx +19 -4
- package/src/Selector/__tests__/EmptyStateAnnouncement.a11y.chromium.spec.ts +1 -0
- package/src/Selector/__tests__/Listbox.a11y.chromium.spec.ts +1 -0
- package/src/Selector/__tests__/Selector.a11y.chromium.spec.ts +1 -0
- package/src/Selector/__tests__/Selector.combobox.a11y.chromium.spec.ts +1 -0
- package/src/SideNav/SideNav.spec.md +51 -30
- package/src/SideNav/SideNav.test.tsx +290 -25
- package/src/SideNav/SideNavCollapseButton.spec.md +161 -0
- package/src/SideNav/SideNavHeading.spec.md +219 -0
- package/src/SideNav/SideNavHeading.tsx +41 -0
- package/src/SideNav/SideNavItem.spec.md +246 -0
- package/src/SideNav/SideNavItem.tsx +40 -9
- package/src/SideNav/SideNavSection.spec.md +153 -0
- package/src/Skeleton/Skeleton.spec.md +99 -42
- package/src/Skeleton/Skeleton.test.tsx +108 -1
- package/src/Skeleton/Skeleton.tsx +30 -2
- package/src/Slider/Slider.test.tsx +172 -0
- package/src/Slider/Slider.tsx +60 -12
- package/src/Slider/__tests__/Slider.a11y.chromium.spec.ts +1 -0
- package/src/Spinner/Spinner.spec.md +231 -0
- package/src/StatusDot/StatusDot.spec.md +139 -51
- package/src/StatusDot/StatusDot.test.tsx +13 -0
- package/src/StatusDot/StatusDot.tsx +27 -0
- package/src/Stepper/Step.spec.md +206 -0
- package/src/Stepper/Step.tsx +19 -3
- package/src/Stepper/Stepper.test.tsx +50 -0
- package/src/Switch/Switch.focusRing.source-build.test.mjs +81 -0
- package/src/Switch/Switch.tsx +11 -9
- package/src/Switch/__tests__/Switch.a11y.chromium.spec.ts +1 -0
- package/src/Switch/switch.markers.stylex.ts +7 -2
- package/src/TabList/Tab.spec.md +201 -0
- package/src/TabList/Tab.tsx +7 -1
- package/src/TabList/TabList.doc.mjs +3 -3
- package/src/TabList/TabMenu.spec.md +196 -0
- package/src/TabList/TabMenu.tsx +2 -0
- package/src/TabList/__tests__/TabListOverflow.interaction.browser.spec.ts +99 -0
- package/src/TabList/__tests__/Tabs.a11y.chromium.spec.ts +1 -0
- package/src/Table/Table.spec.md +54 -30
- package/src/Table/TableCell.tsx +6 -0
- package/src/Table/TableHeaderCell.tsx +2 -0
- package/src/Table/__tests__/Table.a11y.chromium.spec.ts +129 -0
- package/src/Table/__tests__/Table.a11y.contracts.ts +35 -0
- package/src/Table/__tests__/Table.a11y.renders.tsx +112 -0
- package/src/Table/__tests__/Table.a11y.states.ts +140 -0
- package/src/Table/__tests__/Table.a11y.test.tsx +198 -0
- package/src/Table/__tests__/TableMinWidth.a11y.chromium.spec.ts +1 -0
- package/src/Table/__tests__/TableScroll.a11y.chromium.spec.ts +1 -0
- package/src/Table/__tests__/TableStickyDividers.a11y.browser.spec.ts +560 -0
- package/src/Table/plugins/columnResize/useTableColumnResize.tsx +23 -8
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.test.tsx +91 -9
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +120 -5
- package/src/Table/plugins/sortable/__tests__/useTableSortable.a11y.test.tsx +174 -0
- package/src/Table/plugins/sortable/__tests__/useTableSortable.a11y.ts +86 -0
- package/src/Table/plugins/sortable/useTableSortable.test.tsx +0 -12
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.test.tsx +51 -1
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +291 -12
- package/src/Table/rowDivider.ts +154 -0
- package/src/Text/Text.spec.md +114 -127
- package/src/TextArea/TextArea.doc.mjs +6 -6
- package/src/TextArea/TextArea.spec.md +164 -64
- package/src/TextArea/TextArea.test.tsx +65 -6
- package/src/TextArea/TextArea.tsx +27 -15
- package/src/TextInput/TextInput.doc.mjs +8 -8
- package/src/TextInput/TextInput.spec.md +258 -0
- package/src/TextInput/TextInput.test.tsx +83 -10
- package/src/TextInput/TextInput.tsx +46 -22
- package/src/TextInput/__tests__/TextInput.a11y.chromium.spec.ts +1 -0
- package/src/Thumbnail/Thumbnail.doc.mjs +1 -2
- package/src/Thumbnail/Thumbnail.spec.md +244 -0
- package/src/Thumbnail/Thumbnail.test.tsx +120 -7
- package/src/Thumbnail/Thumbnail.tsx +77 -31
- package/src/TimeInput/TimeInput.spec.md +273 -0
- package/src/TimeInput/TimeInput.tsx +12 -4
- package/src/TimeInput/TouchTimeField.tsx +2 -1
- package/src/Timestamp/Timestamp.spec.md +252 -0
- package/src/Toast/ToastViewport.modalHost.test.tsx +630 -5
- package/src/Toast/ToastViewport.tsx +27 -2
- package/src/ToggleButton/ToggleButton.spec.md +256 -0
- package/src/ToggleButton/ToggleButtonGroup.spec.md +194 -0
- package/src/ToggleButton/__tests__/ToggleButton.a11y.chromium.spec.ts +1 -0
- package/src/Token/Token.spec.md +271 -0
- package/src/Token/__tests__/TokenRemoveTarget.a11y.chromium.spec.ts +1 -0
- package/src/Tokenizer/Tokenizer.props-type.test.tsx +126 -0
- package/src/Tokenizer/Tokenizer.spec.md +312 -71
- package/src/Tokenizer/Tokenizer.ssr.test.tsx +196 -0
- package/src/Tokenizer/Tokenizer.test.tsx +70 -16
- package/src/Tokenizer/Tokenizer.tsx +651 -113
- package/src/Tokenizer/TokenizerBottomSheet.test.tsx +2719 -0
- package/src/Tokenizer/TokenizerBottomSheet.tsx +957 -0
- package/src/Tokenizer/__tests__/TokenizerEndLane.a11y.chromium.spec.ts +505 -0
- package/src/Tokenizer/useEndLaneReserve.ts +3 -2
- package/src/Toolbar/Toolbar.spec.md +101 -48
- package/src/Toolbar/__tests__/Toolbar.a11y.chromium.spec.ts +1 -0
- package/src/Tooltip/Tooltip.test.tsx +171 -3
- package/src/Tooltip/__tests__/Tooltip.a11y.chromium.spec.ts +1 -0
- package/src/Tooltip/__tests__/Tooltip.a11y.states.ts +2 -2
- package/src/Tooltip/__tests__/TooltipFocusReturn.a11y.chromium.spec.ts +1 -0
- package/src/Tooltip/__tests__/TooltipHoverBridge.a11y.chromium.spec.ts +1 -0
- package/src/Tooltip/__tests__/TooltipTallContent.a11y.browser.spec.ts +646 -0
- package/src/Tooltip/__tests__/TooltipTallContentTracking.a11y.browser.spec.ts +1162 -0
- package/src/Tooltip/useTooltip.tsx +7 -2
- package/src/TopNav/TopNav.spec.md +190 -0
- package/src/TopNav/TopNavHeading.spec.md +204 -0
- package/src/TopNav/TopNavItem.spec.md +189 -0
- package/src/TopNav/TopNavMegaMenu.reduced-motion.source-build.test.mjs +83 -0
- package/src/TopNav/TopNavMegaMenu.spec.md +190 -0
- package/src/TopNav/TopNavMegaMenu.tsx +21 -4
- package/src/TopNav/TopNavMegaMenuFeaturedCard.spec.md +150 -0
- package/src/TopNav/TopNavMegaMenuItem.spec.md +155 -0
- package/src/TopNav/TopNavMenu.spec.md +195 -0
- package/src/TopNav/__tests__/TopNavMobileLongHeading.a11y.chromium.spec.ts +1 -0
- package/src/TreeList/TreeList.doc.mjs +13 -0
- package/src/TreeList/TreeList.spec.md +51 -35
- package/src/TreeList/TreeList.tsx +234 -2
- package/src/TreeList/TreeListItem.tsx +12 -2
- package/src/TreeList/__tests__/TreeList.a11y.chromium.spec.ts +1 -0
- package/src/TreeList/__tests__/TreeListRowNames.a11y.chromium.spec.ts +1 -0
- package/src/Typeahead/BaseTypeahead.tsx +14 -2
- package/src/Typeahead/Typeahead.test.tsx +114 -1
- package/src/Typeahead/Typeahead.tsx +34 -16
- package/src/VisuallyHidden/VisuallyHidden.doc.mjs +1 -1
- package/src/VisuallyHidden/VisuallyHidden.spec.md +170 -0
- package/src/VisuallyHidden/VisuallyHidden.test.tsx +39 -0
- package/src/VisuallyHidden/VisuallyHidden.tsx +38 -5
- package/src/__tests__/BusyOwnerAnnouncement.test.tsx +66 -5
- package/src/__tests__/CardPress.a11y.chromium.spec.ts +353 -0
- package/src/__tests__/DisabledTriggerFocus.a11y.chromium.spec.ts +2 -1
- package/src/__tests__/PressedState.a11y.chromium.spec.ts +1 -0
- package/src/__tests__/pressState.ts +43 -1
- package/src/__tests__/unthemedLength.ts +34 -0
- package/src/gestures/GestureArena.ts +966 -0
- package/src/gestures/GestureRecognizer.ts +626 -0
- package/src/gestures/LongPressGestureRecognizer.ts +186 -0
- package/src/gestures/PanGestureRecognizer.ts +410 -0
- package/src/gestures/TapGestureRecognizer.ts +192 -0
- package/src/gestures/VelocityTracker.ts +194 -0
- package/src/gestures/__tests__/LongPressGestureRecognizer.test.ts +141 -0
- package/src/gestures/__tests__/PanGestureRecognizer.test.ts +327 -0
- package/src/gestures/__tests__/TapGestureRecognizer.test.ts +154 -0
- package/src/gestures/__tests__/VelocityTracker.test.ts +261 -0
- package/src/gestures/__tests__/arena.test.ts +824 -0
- package/src/gestures/__tests__/arenaContinuous.test.ts +207 -0
- package/src/gestures/__tests__/arenaTapLongPress.test.ts +211 -0
- package/src/gestures/__tests__/harness.ts +204 -0
- package/src/gestures/geometry.ts +55 -0
- package/src/gestures/types.ts +161 -0
- package/src/hooks/AnnounceRenderedText.tsx +27 -0
- package/src/hooks/ModalAnnounceProvider.tsx +155 -0
- package/src/hooks/__tests__/MenuPressShadowRoot.a11y.chromium.spec.ts +98 -4
- package/src/hooks/actionGroupTracker.exports.test.ts +28 -0
- package/src/hooks/actionGroupTracker.test.ts +510 -0
- package/src/hooks/actionGroupTracker.ts +449 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/modalAnnounce.ts +439 -0
- package/src/hooks/useAdaptivePresentation.ts +46 -9
- package/src/hooks/useAnimatedLayout.doc.mjs +101 -0
- package/src/hooks/useAnimatedLayout.ts +61 -0
- package/src/hooks/useAnnounce.doc.mjs +4 -4
- package/src/hooks/useAnnounce.modal.test.tsx +1291 -0
- package/src/hooks/useAnnounce.test.tsx +64 -4
- package/src/hooks/useAnnounce.ts +452 -28
- package/src/hooks/useAnnounceRenderedText.adopters.test.tsx +226 -0
- package/src/hooks/useAnnounceRenderedText.ts +81 -11
- package/src/hooks/useBusyAnnouncement.adopters.test.tsx +69 -0
- package/src/hooks/useBusyAnnouncement.test.tsx +112 -0
- package/src/hooks/useBusyAnnouncement.ts +64 -54
- package/src/hooks/useFocusTrap.doc.mjs +3 -3
- package/src/hooks/useFocusTrap.test.tsx +135 -2
- package/src/hooks/useFocusTrap.ts +59 -27
- package/src/hooks/useMenuPress.doc.mjs +2 -2
- package/src/hooks/useMenuPress.test.tsx +5 -2
- package/src/hooks/useMenuPress.ts +72 -37
- package/src/hooks/useScrollableArea.test.tsx +159 -0
- package/src/hooks/useScrollableArea.ts +39 -5
- package/src/i18n/generated-locales/en.generated.ts +35 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +37 -0
- package/src/internal/tokenizer-presentation.test.ts +29 -0
- package/src/internal/tokenizer-presentation.ts +25 -0
- package/src/internal/touch.test.ts +44 -0
- package/src/internal/touch.ts +41 -0
- package/src/motion/LayoutChangeSnapshot.tsx +50 -0
- package/src/motion/MEASUREMENTS.md +271 -0
- package/src/motion/README.md +218 -0
- package/src/motion/__tests__/animatedLayout.interaction.browser.spec.ts +1507 -0
- package/src/motion/__tests__/animatedLayoutAdopters.interaction.browser.spec.ts +217 -0
- package/src/motion/__tests__/animatedLayoutBundle.ts +17 -0
- package/src/motion/animatedLayout.boundary.test.ts +139 -0
- package/src/motion/animatedLayout.test.ts +965 -0
- package/src/motion/animatedLayout.ts +1322 -0
- package/src/motion/animatedLayoutAdopters.test.tsx +500 -0
- package/src/motion/animator.test.ts +2653 -0
- package/src/motion/animator.ts +2794 -0
- package/src/motion/bezier.test.ts +52 -0
- package/src/motion/bezier.ts +64 -0
- package/src/motion/coast.test.ts +99 -0
- package/src/motion/coast.ts +150 -0
- package/src/motion/decay.test.ts +120 -0
- package/src/motion/decay.ts +126 -0
- package/src/motion/projection.test.ts +107 -0
- package/src/motion/projection.ts +116 -0
- package/src/motion/reducedMotion.stylex.ts +41 -0
- package/src/motion/reducedMotion.test.ts +129 -0
- package/src/motion/reducedMotion.ts +94 -0
- package/src/motion/reducedMotionPlan.test.ts +182 -0
- package/src/motion/reducedMotionPlan.ts +263 -0
- package/src/motion/resolveSnapPoint.test.ts +189 -0
- package/src/motion/resolveSnapPoint.ts +169 -0
- package/src/motion/roleValue.ts +105 -0
- package/src/motion/roles.test.ts +256 -0
- package/src/motion/roles.ts +262 -0
- package/src/motion/rubberBand.test.ts +88 -0
- package/src/motion/rubberBand.ts +115 -0
- package/src/motion/selectPage.test.ts +31 -0
- package/src/motion/selectPage.ts +55 -0
- package/src/motion/spring.test.ts +650 -0
- package/src/motion/spring.ts +551 -0
- package/src/motion/uikit/gestures.test.ts +89 -0
- package/src/motion/uikit/gestures.ts +359 -0
- package/src/motion/uikit/index.ts +80 -0
- package/src/motion/uikit/navigation.ts +83 -0
- package/src/motion/uikit/scroll.ts +141 -0
- package/src/motion/uikit/springRows.test.ts +71 -0
- package/src/motion/uikit/springs.ts +514 -0
- package/src/motion/uikit/timing.ts +210 -0
- package/src/motion/uikit/uikit.test.ts +364 -0
- package/src/motion/uikit/values.test.ts +110 -0
- package/src/reset.a11y.chromium.spec.ts +1 -0
- package/src/reset.until-found.a11y.browser.spec.ts +1 -0
- package/src/serverSafeComponents.test.ts +10 -0
- package/src/tailwind-theme.css +51 -1
- package/src/tailwind-theme.test.ts +51 -0
- package/src/theme/Theme.test.tsx +28 -0
- package/src/theme/__tests__/SpacingRootFontSize.a11y.chromium.spec.ts +1 -0
- package/src/theme/declarationBoundary.ts +282 -1
- package/src/theme/defineTheme.test.ts +529 -12
- package/src/theme/defineTheme.ts +175 -19
- package/src/theme/derivedVarRegistry.test.ts +28 -5
- package/src/theme/derivedVarRegistry.ts +4 -0
- package/src/theme/expandMotionScale.test.ts +17 -0
- package/src/theme/generateThemeRules.ts +772 -35
- package/src/theme/index.ts +3 -0
- package/src/theme/onMediaTokens.test.ts +186 -0
- package/src/theme/statusColor.ts +189 -0
- package/src/theme/statusRoleDerivation.ts +289 -0
- package/src/theme/themeAdaptations.test.ts +412 -0
- package/src/theme/themeAdaptations.ts +43 -1
- package/src/theme/tokens.stylex.ts +31 -2
- package/src/theme/tokens.test.ts +96 -1
- package/src/theme/tokens.ts +23 -1
- package/src/theme/useTheme.ts +10 -4
- package/src/utils/customPropertyArmLayering.test.ts +131 -0
- package/src/utils/edgeAutoscroll.test.ts +192 -0
- package/src/utils/edgeAutoscroll.ts +111 -0
- package/src/utils/hitArea.test.ts +628 -0
- package/src/utils/hitArea.ts +770 -0
- package/src/utils/touchPresentation.test.ts +323 -0
- package/src/utils/touchPresentation.ts +153 -0
|
@@ -0,0 +1,1096 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file animatedLayout.ts
|
|
5
|
+
* @input The DOM (layout rectangles, computed style), Web Animations, the
|
|
6
|
+
* internal `springs.settle` motion role (motion/roles.ts) and the Reduce Motion
|
|
7
|
+
* cross-fade clock (uikit/timing.ts)
|
|
8
|
+
* @output Exports `createAnimatedLayout` and the opaque `AnimatedLayout`
|
|
9
|
+
* handle, `reportLayoutChange`, `playLayoutChange`, `holdLayoutExit` /
|
|
10
|
+
* `releaseLayoutExit` and `applyLayoutChangeTransition`: the one module
|
|
11
|
+
* that produces the
|
|
12
|
+
* size-change glide `spec:AST-105` defines
|
|
13
|
+
* (`architecture:react-component-runtime` INV12)
|
|
14
|
+
* @position Motion foundation, internal to core. A handle comes from the
|
|
15
|
+
* public `useAnimatedLayout` hook; a component that takes it reports its
|
|
16
|
+
* size changes through this module.
|
|
17
|
+
*
|
|
18
|
+
* How it works:
|
|
19
|
+
* - `measureBefore()` runs before the change commits: from the changed
|
|
20
|
+
* element it walks up to the handle's container and, at each level,
|
|
21
|
+
* records the rectangles of the element siblings after it and before it (a
|
|
22
|
+
* centered, end-aligned or space-between row, or `order`, moves those too),
|
|
23
|
+
* through `parentElement`, `nextElementSibling` and
|
|
24
|
+
* `previousElementSibling`, descending only into an element with
|
|
25
|
+
* `display: contents` (it has no box). Each level's walk stops at the first
|
|
26
|
+
* sibling outside the band a change can move content into view from: the
|
|
27
|
+
* area's visible part plus one viewport, or the changed element's size if
|
|
28
|
+
* larger, above and below. So its cost grows with depth plus the siblings
|
|
29
|
+
* near the visible part, never with a list's length.
|
|
30
|
+
* - `animate()` runs after the commit (a layout effect). Every change in the
|
|
31
|
+
* same area reported in one frame is measured together after the commit,
|
|
32
|
+
* once, in a microtask, so each element moves once, by its total change.
|
|
33
|
+
* - An element moves only when its rectangle changed and it is in the area's
|
|
34
|
+
* visible part, before or after. Absolute, fixed, top-layer, hidden and
|
|
35
|
+
* zero-size elements are skipped (an absolute child rides with its moving
|
|
36
|
+
* parent); a stuck sticky element does not change rectangle, so it stays.
|
|
37
|
+
* - The move is a compositor-only `translate` (replace composition) from the
|
|
38
|
+
* old place to the new one, sampled from `springs.settle` into linear
|
|
39
|
+
* keyframes and corrected for a scaled ancestor. An element already gliding
|
|
40
|
+
* keeps that motion and adds the new move: the rest of its curve and the
|
|
41
|
+
* new move are summed into one new glide, velocity included. Nothing
|
|
42
|
+
* animates height, and nothing scrolls the area.
|
|
43
|
+
* - A measurement no commit claims by the next frame is dropped.
|
|
44
|
+
* - The changed element plays its own entrance on the same spring, started in
|
|
45
|
+
* the same frame (`playLayoutChange`), or its exit: kept where it is while
|
|
46
|
+
* it gives up its space and conceals (`holdLayoutExit`). A disclosure's
|
|
47
|
+
* indicator turns on the same motion (`applyLayoutChangeTransition`).
|
|
48
|
+
* - Every pointer (`spec:AST-105` FR5). Under Reduce Motion nothing travels
|
|
49
|
+
* (`design:reduced-motion` DR1–DR3): a cross-fade under a coarse primary
|
|
50
|
+
* pointer, an immediate change otherwise.
|
|
51
|
+
* - Without a handle nothing happens: the component keeps its jump
|
|
52
|
+
* (`spec:AST-105` FR2).
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
import { motionRole } from "./roles.js";
|
|
56
|
+
import { isSpring } from "./roleValue.js";
|
|
57
|
+
import { solveSpring, toSpring } from "./spring.js";
|
|
58
|
+
import { registerSpringsTable, SETTLE_SPRING } from "./uikit/springs.js";
|
|
59
|
+
import { reducedMotionCrossFade } from "./uikit/timing.js";
|
|
60
|
+
|
|
61
|
+
/** The shared motion role (`spec:AST-105` FR4). */
|
|
62
|
+
const ROLE_ID = 'springs.settle';
|
|
63
|
+
/** Below this many pixels a shift is not worth a move. */
|
|
64
|
+
const MIN_SHIFT_PX = 0.5;
|
|
65
|
+
/** The touch cross-fade's cap (`design:reduced-motion` DR2). */
|
|
66
|
+
const CROSS_FADE_CAP_MS = 200;
|
|
67
|
+
/** Keyframes per second the spring is sampled at. */
|
|
68
|
+
const SAMPLES_PER_SECOND = 60;
|
|
69
|
+
|
|
70
|
+
// ---------------------------------------------------------------------------
|
|
71
|
+
// Motion
|
|
72
|
+
// ---------------------------------------------------------------------------
|
|
73
|
+
|
|
74
|
+
/** How a change plays under the reader's settings. */
|
|
75
|
+
|
|
76
|
+
/** The settle spring as remaining distance (1 → 0) over its duration. */
|
|
77
|
+
|
|
78
|
+
function matches(element, query) {
|
|
79
|
+
const view = element.ownerDocument.defaultView;
|
|
80
|
+
return typeof view?.matchMedia === 'function' && view.matchMedia(query).matches;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* `springs.settle` from the internal role registry: one shared value for the
|
|
85
|
+
* glide, the changed element and the indicator. Motion roles are internal
|
|
86
|
+
* (`spec:AST-094` DEC-11): no theme, scope or custom property changes it.
|
|
87
|
+
*/
|
|
88
|
+
function settleSpring() {
|
|
89
|
+
registerSpringsTable();
|
|
90
|
+
const value = motionRole(ROLE_ID)?.value;
|
|
91
|
+
return isSpring(value) ? value : SETTLE_SPRING;
|
|
92
|
+
}
|
|
93
|
+
function springProgress(description) {
|
|
94
|
+
const curve = solveSpring(toSpring(description), {
|
|
95
|
+
from: 1,
|
|
96
|
+
to: 0
|
|
97
|
+
});
|
|
98
|
+
const durationMs = Math.max(1, curve.settleTime(0.001) * 1000);
|
|
99
|
+
return {
|
|
100
|
+
durationMs,
|
|
101
|
+
remaining: t => t >= durationMs ? 0 : curve.value(t / 1000)
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** The motion a change in `area` plays now. */
|
|
106
|
+
function layoutMotion(area) {
|
|
107
|
+
if (matches(area, '(prefers-reduced-motion: reduce)')) {
|
|
108
|
+
if (!matches(area, '(pointer: coarse)')) {
|
|
109
|
+
return {
|
|
110
|
+
kind: 'instant'
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
const [x1, y1, x2, y2] = reducedMotionCrossFade.curve;
|
|
114
|
+
return {
|
|
115
|
+
kind: 'fade',
|
|
116
|
+
durationMs: Math.min(CROSS_FADE_CAP_MS, reducedMotionCrossFade.durationMs),
|
|
117
|
+
easing: `cubic-bezier(${x1}, ${y1}, ${x2}, ${y2})`
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
kind: 'spring',
|
|
122
|
+
progress: springProgress(settleSpring())
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** Linear keyframes over `durationMs`, one per frame, from `frame(t ms)`. */
|
|
127
|
+
function sampleOver(durationMs, frame) {
|
|
128
|
+
const count = Math.max(2, Math.ceil(durationMs / 1000 * SAMPLES_PER_SECOND) + 1);
|
|
129
|
+
const keyframes = [];
|
|
130
|
+
for (let i = 0; i < count; i++) {
|
|
131
|
+
const offset = i / (count - 1);
|
|
132
|
+
keyframes.push({
|
|
133
|
+
...frame(offset * durationMs),
|
|
134
|
+
offset
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
return keyframes;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/** Linear keyframes sampled from the spring, one per frame. */
|
|
141
|
+
function sampleKeyframes(progress, frame) {
|
|
142
|
+
return sampleOver(progress.durationMs, t => frame(progress.remaining(t)));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** The spring as a CSS `linear()` easing, for a CSS transition. */
|
|
146
|
+
function linearEasing(progress) {
|
|
147
|
+
const stops = [];
|
|
148
|
+
const count = 24;
|
|
149
|
+
for (let i = 0; i <= count; i++) {
|
|
150
|
+
const fraction = i / count;
|
|
151
|
+
const value = 1 - progress.remaining(fraction * progress.durationMs);
|
|
152
|
+
stops.push(`${round(value)} ${round(fraction * 100)}%`);
|
|
153
|
+
}
|
|
154
|
+
return `linear(${stops.join(', ')})`;
|
|
155
|
+
}
|
|
156
|
+
function round(value) {
|
|
157
|
+
return Math.round(value * 1000) / 1000;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// ---------------------------------------------------------------------------
|
|
161
|
+
// Playing
|
|
162
|
+
// ---------------------------------------------------------------------------
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Play `keyframes` on `element`. Every option here (linear easing over sampled
|
|
166
|
+
* keyframes, replace composition) is one any Web Animations engine takes, so
|
|
167
|
+
* a failure means no Web Animations at all: the change then lands at once.
|
|
168
|
+
*/
|
|
169
|
+
function safeAnimate(element, keyframes, options) {
|
|
170
|
+
if (typeof element.animate !== 'function') {
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
173
|
+
let animation;
|
|
174
|
+
try {
|
|
175
|
+
animation = element.animate(keyframes, options);
|
|
176
|
+
} catch {
|
|
177
|
+
return null;
|
|
178
|
+
}
|
|
179
|
+
ours.add(animation);
|
|
180
|
+
// Started on the document timeline's current time, not on the next frame:
|
|
181
|
+
// a retargeted glide keeps moving through the frame it is replaced in, and
|
|
182
|
+
// every animation of one change shares the same start.
|
|
183
|
+
const now = element.ownerDocument.timeline?.currentTime;
|
|
184
|
+
if (now != null) {
|
|
185
|
+
animation.startTime = now;
|
|
186
|
+
}
|
|
187
|
+
return animation;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/** Every animation this module started, so it can tell the app's apart. */
|
|
191
|
+
const ours = new WeakSet();
|
|
192
|
+
const TRANSFORM_PROPERTIES = ['transform', 'translate', 'rotate', 'scale'];
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Whether the app moves `element` itself: its own `transform`, `translate`,
|
|
196
|
+
* `rotate` or `scale`, or a running animation of one this module did not
|
|
197
|
+
* start.
|
|
198
|
+
*/
|
|
199
|
+
function movedByApp(element) {
|
|
200
|
+
const style = element.ownerDocument.defaultView?.getComputedStyle(element);
|
|
201
|
+
if (style != null && TRANSFORM_PROPERTIES.some(property => {
|
|
202
|
+
const value = style.getPropertyValue(property);
|
|
203
|
+
return value !== '' && value !== 'none';
|
|
204
|
+
})) {
|
|
205
|
+
return true;
|
|
206
|
+
}
|
|
207
|
+
if (typeof element.getAnimations !== 'function') {
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
return element.getAnimations().some(animation => {
|
|
211
|
+
if (ours.has(animation)) {
|
|
212
|
+
return false;
|
|
213
|
+
}
|
|
214
|
+
const effect = animation.effect;
|
|
215
|
+
if (!(effect instanceof KeyframeEffect)) {
|
|
216
|
+
return false;
|
|
217
|
+
}
|
|
218
|
+
return effect.getKeyframes().some(frame => TRANSFORM_PROPERTIES.some(property => property in frame));
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** An offset in the element's own px, as a function of ms into a glide. */
|
|
223
|
+
|
|
224
|
+
const AT_REST = () => ({
|
|
225
|
+
x: 0,
|
|
226
|
+
y: 0
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
/** A glide an element is playing, so a new change can retarget it. */
|
|
230
|
+
|
|
231
|
+
const glides = new WeakMap();
|
|
232
|
+
|
|
233
|
+
// ---------------------------------------------------------------------------
|
|
234
|
+
// Handles
|
|
235
|
+
// ---------------------------------------------------------------------------
|
|
236
|
+
|
|
237
|
+
const AREA = Symbol('astryx.animatedLayout.area');
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* The opaque handle `useAnimatedLayout` returns (`spec:AST-105` FR1): no
|
|
241
|
+
* public members. A component that receives it reports its size changes to
|
|
242
|
+
* the handle's container, the area the glide stays inside.
|
|
243
|
+
*/
|
|
244
|
+
|
|
245
|
+
/** A handle over `area` (the container element, read when a change runs). */
|
|
246
|
+
export function createAnimatedLayout(area) {
|
|
247
|
+
// Not enumerable and frozen: the handle shows no fields to a caller.
|
|
248
|
+
return Object.freeze(Object.defineProperty({}, AREA, {
|
|
249
|
+
value: area
|
|
250
|
+
}));
|
|
251
|
+
}
|
|
252
|
+
function areaOf(handle, element) {
|
|
253
|
+
const area = handle[AREA]();
|
|
254
|
+
return area != null && area !== element && area.contains(element) ? area : null;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// ---------------------------------------------------------------------------
|
|
258
|
+
// The walk
|
|
259
|
+
// ---------------------------------------------------------------------------
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Whether `element` takes part: in flow, rendered, not in the top layer.
|
|
263
|
+
* `display: contents` is handled by the caller.
|
|
264
|
+
*/
|
|
265
|
+
function takesPart(element, style) {
|
|
266
|
+
if (style.display === 'none' || style.visibility === 'hidden' || style.position === 'absolute' || style.position === 'fixed') {
|
|
267
|
+
return false;
|
|
268
|
+
}
|
|
269
|
+
try {
|
|
270
|
+
if (element.matches(':popover-open, :modal')) {
|
|
271
|
+
return false;
|
|
272
|
+
}
|
|
273
|
+
} catch {
|
|
274
|
+
// An engine without these pseudo-classes has no top layer to skip.
|
|
275
|
+
}
|
|
276
|
+
return true;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* The band of the page a change can move content into or out of view: the
|
|
281
|
+
* area's visible part, extended above and below by one viewport or by the
|
|
282
|
+
* size of every element changing in the frame, whichever is larger (a
|
|
283
|
+
* collapse pulls content up by at most its size, and changes in one frame
|
|
284
|
+
* add up). Content outside it before the change stays outside it, so the
|
|
285
|
+
* walk stops there.
|
|
286
|
+
*/
|
|
287
|
+
|
|
288
|
+
function bandFor(visible, reach) {
|
|
289
|
+
return {
|
|
290
|
+
start: visible.top - reach,
|
|
291
|
+
end: visible.bottom + reach
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* What one frame's walks read, kept so a level two changes share, or a walk
|
|
297
|
+
* repeated when the band grows, reads each element once.
|
|
298
|
+
*/
|
|
299
|
+
|
|
300
|
+
function partOf(element, cache) {
|
|
301
|
+
let part = cache.parts.get(element);
|
|
302
|
+
if (part === undefined) {
|
|
303
|
+
const style = element.ownerDocument.defaultView?.getComputedStyle(element);
|
|
304
|
+
part = style == null ? false : style.display === 'contents' ? 'contents' : takesPart(element, style);
|
|
305
|
+
cache.parts.set(element, part);
|
|
306
|
+
}
|
|
307
|
+
return part;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Whether a container lays its children out across the block direction, so
|
|
312
|
+
* DOM order does not run down the page: multi-column, a wrapping column flex
|
|
313
|
+
* box, or a grid that flows by column. The band says nothing about where its
|
|
314
|
+
* later children sit, so a walk there runs through the level.
|
|
315
|
+
*/
|
|
316
|
+
function flowsAcross(container) {
|
|
317
|
+
if (container == null) {
|
|
318
|
+
return false;
|
|
319
|
+
}
|
|
320
|
+
const style = container.ownerDocument.defaultView?.getComputedStyle(container);
|
|
321
|
+
if (style == null) {
|
|
322
|
+
return false;
|
|
323
|
+
}
|
|
324
|
+
const count = style.getPropertyValue('column-count');
|
|
325
|
+
const width = style.getPropertyValue('column-width');
|
|
326
|
+
return count !== '' && count !== 'auto' || width !== '' && width !== 'auto' || style.display.includes('flex') && style.flexDirection.startsWith('column') && style.flexWrap.startsWith('wrap') || style.display.includes('grid') && style.getPropertyValue('grid-auto-flow').startsWith('column');
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* The box a sticky element sticks to: its nearest scrolling ancestor's, or
|
|
331
|
+
* the viewport.
|
|
332
|
+
*/
|
|
333
|
+
function scrollportOf(element) {
|
|
334
|
+
const view = element.ownerDocument.defaultView;
|
|
335
|
+
for (let node = element.parentElement; node != null && node !== element.ownerDocument.documentElement; node = node.parentElement) {
|
|
336
|
+
const overflow = view?.getComputedStyle(node).overflowY ?? 'visible';
|
|
337
|
+
if (node === element.ownerDocument.body && view?.getComputedStyle(element.ownerDocument.documentElement).overflowY === 'visible') {
|
|
338
|
+
// The body's overflow applies to the viewport while the root's is
|
|
339
|
+
// visible: the body is no scroller of its own.
|
|
340
|
+
continue;
|
|
341
|
+
}
|
|
342
|
+
if (overflow !== 'visible' && overflow !== 'clip') {
|
|
343
|
+
const box = node.getBoundingClientRect();
|
|
344
|
+
return {
|
|
345
|
+
start: box.top + node.clientTop,
|
|
346
|
+
end: box.top + node.clientTop + node.clientHeight
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
return {
|
|
351
|
+
start: 0,
|
|
352
|
+
end: view?.innerHeight ?? 0
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Whether a sticky element is stuck: resting against its scrollport's edge
|
|
358
|
+
* at its inset. A stuck element takes its final place; an unstuck one is in
|
|
359
|
+
* flow.
|
|
360
|
+
*/
|
|
361
|
+
function isStuck(element, cache) {
|
|
362
|
+
const style = element.ownerDocument.defaultView?.getComputedStyle(element);
|
|
363
|
+
if (style?.position !== 'sticky') {
|
|
364
|
+
return false;
|
|
365
|
+
}
|
|
366
|
+
const rect = rectOf(element, cache);
|
|
367
|
+
const edge = scrollportOf(element);
|
|
368
|
+
const top = Number.parseFloat(style.top);
|
|
369
|
+
const bottom = Number.parseFloat(style.bottom);
|
|
370
|
+
return Number.isFinite(top) && Math.abs(rect.top - (edge.start + top)) < 1 || Number.isFinite(bottom) && Math.abs(rect.bottom - (edge.end - bottom)) < 1;
|
|
371
|
+
}
|
|
372
|
+
function rectOf(element, cache) {
|
|
373
|
+
let rect = cache.rects.get(element);
|
|
374
|
+
if (rect === undefined) {
|
|
375
|
+
rect = element.getBoundingClientRect();
|
|
376
|
+
cache.rects.set(element, rect);
|
|
377
|
+
}
|
|
378
|
+
return rect;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* The elements a change can move, each with its rectangle before the change:
|
|
383
|
+
* the changed element's ancestors up to the area (a centered column moves
|
|
384
|
+
* the card around the change), and at each of their levels the siblings
|
|
385
|
+
* after and before (a centered, end-aligned or space-between row, or
|
|
386
|
+
* `order`, moves those too). A `display: contents` element has no box: its
|
|
387
|
+
* children stand in its place, walked in the same direction. At each level
|
|
388
|
+
* the walk stops at the first sibling outside `band`, so its cost grows with
|
|
389
|
+
* depth plus the siblings near the visible part, never with the length of a
|
|
390
|
+
* list; where the area opts out of scroll anchoring (`walksToBand`), the walk
|
|
391
|
+
* after a change above the band goes on to the band, a cost that grows with
|
|
392
|
+
* that distance. Inside a positioned, stuck sticky or top-layer ancestor only the
|
|
393
|
+
* content after the change is taken.
|
|
394
|
+
*/
|
|
395
|
+
function collectCandidates(changed, area, band, cache, walksToBand, ancestors, befores) {
|
|
396
|
+
const out = new Map();
|
|
397
|
+
/** Takes `element`; returns false once it lies outside the band. */
|
|
398
|
+
/** The current level runs through its siblings, ignoring the band. */
|
|
399
|
+
let runsThrough = false;
|
|
400
|
+
const take = (element, isAfter) => {
|
|
401
|
+
const part = partOf(element, cache);
|
|
402
|
+
if (part === 'contents') {
|
|
403
|
+
for (let child = isAfter ? element.firstElementChild : element.lastElementChild; child != null; child = isAfter ? child.nextElementSibling : child.previousElementSibling) {
|
|
404
|
+
if (!take(child, isAfter)) {
|
|
405
|
+
return false;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
return true;
|
|
409
|
+
}
|
|
410
|
+
if (!part) {
|
|
411
|
+
return true;
|
|
412
|
+
}
|
|
413
|
+
const rect = rectOf(element, cache);
|
|
414
|
+
if (runsThrough) {
|
|
415
|
+
out.set(element, rect);
|
|
416
|
+
return true;
|
|
417
|
+
}
|
|
418
|
+
if (rect.top > band.end) {
|
|
419
|
+
return false;
|
|
420
|
+
}
|
|
421
|
+
if (rect.bottom < band.start) {
|
|
422
|
+
// Above the band. Where the scroller opts out of scroll anchoring, the
|
|
423
|
+
// content after a change above the band shifts the rows in view, so
|
|
424
|
+
// the walk after it goes on to the band; with anchoring, it stops.
|
|
425
|
+
return isAfter && walksToBand;
|
|
426
|
+
}
|
|
427
|
+
out.set(element, rect);
|
|
428
|
+
if (!isAfter) {
|
|
429
|
+
befores.add(element);
|
|
430
|
+
}
|
|
431
|
+
return true;
|
|
432
|
+
};
|
|
433
|
+
// The change's chain up to the area, and from where it is inside a
|
|
434
|
+
// positioned, stuck sticky or top-layer ancestor: that ancestor takes its final
|
|
435
|
+
// place, so inside it only the content after the change moves; the
|
|
436
|
+
// ancestors and the siblings before the change stay with it.
|
|
437
|
+
const chain = [];
|
|
438
|
+
for (let node = changed; node != null && node !== area; node = node.parentElement) {
|
|
439
|
+
chain.push(node);
|
|
440
|
+
}
|
|
441
|
+
// The levels below this index are inside a positioned ancestor.
|
|
442
|
+
let positionedFrom = 0;
|
|
443
|
+
for (let index = chain.length - 1; index > 0; index -= 1) {
|
|
444
|
+
if (partOf(chain[index], cache) === false || isStuck(chain[index], cache)) {
|
|
445
|
+
positionedFrom = index;
|
|
446
|
+
break;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
for (const [level, node] of chain.entries()) {
|
|
450
|
+
runsThrough = flowsAcross(node.parentElement);
|
|
451
|
+
if (node !== changed && level > positionedFrom && partOf(node, cache) === true) {
|
|
452
|
+
// An ancestor of the change in flow: where its layout moves it (a
|
|
453
|
+
// centered column), it glides, and what is inside moves only by its own
|
|
454
|
+
// change. A positioned, stuck sticky or top-layer ancestor, and every
|
|
455
|
+
// ancestor inside it, takes its final place.
|
|
456
|
+
out.set(node, rectOf(node, cache));
|
|
457
|
+
ancestors.add(node);
|
|
458
|
+
}
|
|
459
|
+
for (let sibling = node.nextElementSibling; sibling != null && take(sibling, true); sibling = sibling.nextElementSibling) {
|
|
460
|
+
// The siblings after it, until one lies past the band.
|
|
461
|
+
}
|
|
462
|
+
if (level < positionedFrom) {
|
|
463
|
+
continue;
|
|
464
|
+
}
|
|
465
|
+
for (let sibling = node.previousElementSibling; sibling != null && take(sibling, false); sibling = sibling.previousElementSibling) {
|
|
466
|
+
// The siblings before it, until one lies before the band.
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
return out;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
// ---------------------------------------------------------------------------
|
|
473
|
+
// Batches: every change in one area in one frame moves together
|
|
474
|
+
// ---------------------------------------------------------------------------
|
|
475
|
+
|
|
476
|
+
const batches = new Map();
|
|
477
|
+
function batchFor(area) {
|
|
478
|
+
let batch = batches.get(area);
|
|
479
|
+
if (batch == null) {
|
|
480
|
+
const created = {
|
|
481
|
+
area,
|
|
482
|
+
changed: new Set(),
|
|
483
|
+
before: new Map(),
|
|
484
|
+
candidates: new Map(),
|
|
485
|
+
changedSize: 0,
|
|
486
|
+
reach: 0,
|
|
487
|
+
visible: null,
|
|
488
|
+
walksToBand: null,
|
|
489
|
+
ancestors: new Set(),
|
|
490
|
+
befores: new Set(),
|
|
491
|
+
originBefore: null,
|
|
492
|
+
cache: {
|
|
493
|
+
rects: new Map(),
|
|
494
|
+
parts: new Map()
|
|
495
|
+
},
|
|
496
|
+
scheduled: false
|
|
497
|
+
};
|
|
498
|
+
batches.set(area, created);
|
|
499
|
+
// A measurement no commit claims by the next frame (a controlled owner
|
|
500
|
+
// refused the change) is dropped, so it never moves rows later and holds
|
|
501
|
+
// no elements.
|
|
502
|
+
const view = area.ownerDocument.defaultView;
|
|
503
|
+
const drop = () => {
|
|
504
|
+
if (batches.get(area) === created && !created.scheduled) {
|
|
505
|
+
batches.delete(area);
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
if (typeof view?.requestAnimationFrame === 'function') {
|
|
509
|
+
view.requestAnimationFrame(drop);
|
|
510
|
+
} else {
|
|
511
|
+
setTimeout(drop, 16);
|
|
512
|
+
}
|
|
513
|
+
batch = created;
|
|
514
|
+
}
|
|
515
|
+
return batch;
|
|
516
|
+
}
|
|
517
|
+
function intersects(a, b) {
|
|
518
|
+
return a.width > 0 && a.height > 0 && a.right > b.left && a.left < b.right && a.bottom > b.top && a.top < b.bottom;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
/** The part of the area the person can see: its box within the viewport. */
|
|
522
|
+
/** Where the area's scrolled content starts, in client px. */
|
|
523
|
+
function originOf(area) {
|
|
524
|
+
const box = area.getBoundingClientRect();
|
|
525
|
+
return {
|
|
526
|
+
x: box.left - area.scrollLeft,
|
|
527
|
+
y: box.top - area.scrollTop
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
function visibleRect(area) {
|
|
531
|
+
const box = area.getBoundingClientRect();
|
|
532
|
+
const view = area.ownerDocument.defaultView;
|
|
533
|
+
const width = view?.innerWidth ?? box.right;
|
|
534
|
+
const height = view?.innerHeight ?? box.bottom;
|
|
535
|
+
const left = Math.max(box.left, 0);
|
|
536
|
+
const top = Math.max(box.top, 0);
|
|
537
|
+
return new DOMRect(left, top, Math.max(0, Math.min(box.right, width) - left), Math.max(0, Math.min(box.bottom, height) - top));
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/** The element's rendered scale against its layout size (a scaled ancestor). */
|
|
541
|
+
function scaleOf(element, rect) {
|
|
542
|
+
const html = element;
|
|
543
|
+
const x = html.offsetWidth > 0 && rect.width > 0 ? rect.width / html.offsetWidth : 1;
|
|
544
|
+
const y = html.offsetHeight > 0 && rect.height > 0 ? rect.height / html.offsetHeight : 1;
|
|
545
|
+
// Subpixel rounding makes an unscaled element read a hair off 1; only a
|
|
546
|
+
// real scale is corrected.
|
|
547
|
+
return {
|
|
548
|
+
x: Math.abs(x - 1) < 0.01 ? 1 : x || 1,
|
|
549
|
+
y: Math.abs(y - 1) < 0.01 ? 1 : y || 1
|
|
550
|
+
};
|
|
551
|
+
}
|
|
552
|
+
function flush(batch) {
|
|
553
|
+
batches.delete(batch.area);
|
|
554
|
+
// What each change's walk measured before it: an element added by the
|
|
555
|
+
// change has no old place, and one it removed is gone.
|
|
556
|
+
const followers = new Set();
|
|
557
|
+
for (const changed of batch.changed) {
|
|
558
|
+
for (const element of batch.candidates.get(changed) ?? []) {
|
|
559
|
+
if (element.isConnected) {
|
|
560
|
+
followers.add(element);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
if (followers.size === 0) {
|
|
565
|
+
return;
|
|
566
|
+
}
|
|
567
|
+
const motion = layoutMotion(batch.area);
|
|
568
|
+
if (motion.kind === 'instant') {
|
|
569
|
+
return;
|
|
570
|
+
}
|
|
571
|
+
const visible = visibleRect(batch.area);
|
|
572
|
+
// Every running glide stops first and every new place is read before any
|
|
573
|
+
// glide starts, so no reading includes another's new motion.
|
|
574
|
+
const entries = [];
|
|
575
|
+
for (const element of followers) {
|
|
576
|
+
const before = batch.before.get(element);
|
|
577
|
+
if (before == null || before.width === 0 && before.height === 0) {
|
|
578
|
+
// Added by the change, or not rendered before it: it has no old place.
|
|
579
|
+
// A changed element an earlier change displaced does have one, and
|
|
580
|
+
// moves with its row while it plays its own entrance or exit.
|
|
581
|
+
continue;
|
|
582
|
+
}
|
|
583
|
+
// An element already gliding keeps that motion and adds the new move: the
|
|
584
|
+
// running glide stops (so its rectangle is its new layout place) and the
|
|
585
|
+
// rest of its curve carries into the one new glide, velocity included,
|
|
586
|
+
// summed with the new move.
|
|
587
|
+
const running = glides.get(element);
|
|
588
|
+
let carried = AT_REST;
|
|
589
|
+
let carriedMs = 0;
|
|
590
|
+
if (running != null) {
|
|
591
|
+
const time = Number(running.animation.currentTime);
|
|
592
|
+
const elapsed = Number.isFinite(time) ? Math.max(0, time) : 0;
|
|
593
|
+
if (elapsed < running.durationMs) {
|
|
594
|
+
carried = t => running.offsetAt(elapsed + t);
|
|
595
|
+
carriedMs = running.durationMs - elapsed;
|
|
596
|
+
}
|
|
597
|
+
running.animation.cancel();
|
|
598
|
+
glides.delete(element);
|
|
599
|
+
}
|
|
600
|
+
entries.push({
|
|
601
|
+
element,
|
|
602
|
+
before,
|
|
603
|
+
carried,
|
|
604
|
+
carriedMs
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
const byElement = new Map();
|
|
608
|
+
// An ancestor of the change, and a sibling before it, move by their layout
|
|
609
|
+
// change alone: when scroll anchoring re-scrolls the area, an outer
|
|
610
|
+
// scroller or the page (a change above the visible part), or the area
|
|
611
|
+
// itself moves as its content grows (a dialog re-centered), their place in
|
|
612
|
+
// view shifts by that while their place in the area stays.
|
|
613
|
+
const origin = originOf(batch.area);
|
|
614
|
+
const scrolledX = origin.x - (batch.originBefore?.x ?? origin.x);
|
|
615
|
+
const scrolledY = origin.y - (batch.originBefore?.y ?? origin.y);
|
|
616
|
+
// Netted only where that makes the move smaller: an element the browser
|
|
617
|
+
// kept in place (scroll anchoring for another change in the same frame)
|
|
618
|
+
// stays where it is.
|
|
619
|
+
const nearer = (raw, shift) => Math.abs(raw + shift) < Math.abs(raw) ? raw + shift : raw;
|
|
620
|
+
for (const entry of entries) {
|
|
621
|
+
entry.after = entry.element.getBoundingClientRect();
|
|
622
|
+
const rawX = entry.before.left - entry.after.left;
|
|
623
|
+
const rawY = entry.before.top - entry.after.top;
|
|
624
|
+
// The siblings before the change stay with the ancestors around them.
|
|
625
|
+
const isAncestor = batch.ancestors.has(entry.element) || batch.befores.has(entry.element);
|
|
626
|
+
entry.rawX = isAncestor ? nearer(rawX, scrolledX) : rawX;
|
|
627
|
+
entry.rawY = isAncestor ? nearer(rawY, scrolledY) : rawY;
|
|
628
|
+
byElement.set(entry.element, entry);
|
|
629
|
+
}
|
|
630
|
+
for (const entry of entries) {
|
|
631
|
+
const {
|
|
632
|
+
element,
|
|
633
|
+
before,
|
|
634
|
+
carried,
|
|
635
|
+
carriedMs
|
|
636
|
+
} = entry;
|
|
637
|
+
const after = entry.after;
|
|
638
|
+
// Nested changes compose: an element inside another moving element moves
|
|
639
|
+
// only by its own change, whatever order the changes were reported in.
|
|
640
|
+
let dx = entry.rawX ?? 0;
|
|
641
|
+
let dy = entry.rawY ?? 0;
|
|
642
|
+
for (let ancestor = element.parentElement; ancestor != null && ancestor !== batch.area; ancestor = ancestor.parentElement) {
|
|
643
|
+
const moving = byElement.get(ancestor);
|
|
644
|
+
if (moving != null) {
|
|
645
|
+
dx -= moving.rawX ?? 0;
|
|
646
|
+
dy -= moving.rawY ?? 0;
|
|
647
|
+
break;
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
if (Math.abs(dx) < MIN_SHIFT_PX && Math.abs(dy) < MIN_SHIFT_PX) {
|
|
651
|
+
continue;
|
|
652
|
+
}
|
|
653
|
+
if (!intersects(before, visible) && !intersects(after, visible)) {
|
|
654
|
+
// Outside the visible part before and after: it lands silently.
|
|
655
|
+
continue;
|
|
656
|
+
}
|
|
657
|
+
if (motion.kind === 'fade') {
|
|
658
|
+
safeAnimate(element, [{
|
|
659
|
+
opacity: 0
|
|
660
|
+
}, {
|
|
661
|
+
opacity: 1
|
|
662
|
+
}], {
|
|
663
|
+
duration: motion.durationMs,
|
|
664
|
+
easing: motion.easing
|
|
665
|
+
});
|
|
666
|
+
continue;
|
|
667
|
+
}
|
|
668
|
+
if (movedByApp(element)) {
|
|
669
|
+
// The app moves it itself: it takes its final place at once
|
|
670
|
+
// (`spec:AST-105` Coverage).
|
|
671
|
+
continue;
|
|
672
|
+
}
|
|
673
|
+
// Where it shows now, against its new place, in its own px; the part the
|
|
674
|
+
// carried glide does not cover is the new move.
|
|
675
|
+
const scale = scaleOf(element, after);
|
|
676
|
+
const now = carried(0);
|
|
677
|
+
const moveX = dx / scale.x - now.x;
|
|
678
|
+
const moveY = dy / scale.y - now.y;
|
|
679
|
+
const {
|
|
680
|
+
progress
|
|
681
|
+
} = motion;
|
|
682
|
+
const offsetAt = t => {
|
|
683
|
+
const remaining = progress.remaining(t);
|
|
684
|
+
const carry = carried(t);
|
|
685
|
+
return {
|
|
686
|
+
x: carry.x + moveX * remaining,
|
|
687
|
+
y: carry.y + moveY * remaining
|
|
688
|
+
};
|
|
689
|
+
};
|
|
690
|
+
const durationMs = Math.max(progress.durationMs, carriedMs);
|
|
691
|
+
// One replace-composited `translate`: the compositor runs it (INV12).
|
|
692
|
+
const animation = safeAnimate(element, sampleOver(durationMs, t => {
|
|
693
|
+
const offset = offsetAt(t);
|
|
694
|
+
return {
|
|
695
|
+
translate: `${offset.x}px ${offset.y}px`
|
|
696
|
+
};
|
|
697
|
+
}), {
|
|
698
|
+
duration: durationMs,
|
|
699
|
+
easing: 'linear'
|
|
700
|
+
});
|
|
701
|
+
if (animation != null) {
|
|
702
|
+
const glide = {
|
|
703
|
+
animation,
|
|
704
|
+
offsetAt,
|
|
705
|
+
durationMs
|
|
706
|
+
};
|
|
707
|
+
glides.set(element, glide);
|
|
708
|
+
animation.addEventListener?.('finish', () => {
|
|
709
|
+
if (glides.get(element) === glide) {
|
|
710
|
+
glides.delete(element);
|
|
711
|
+
}
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
function resolve(target) {
|
|
717
|
+
return typeof target === 'function' ? target() : target.current;
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* Report a size change of `target` to the handle's area. Call
|
|
721
|
+
* `measureBefore()` before the change commits and `animate()` after it; the
|
|
722
|
+
* content after `target`, up to the area, glides from its old place.
|
|
723
|
+
* Changes in one area in one frame move together. Without a handle, or
|
|
724
|
+
* outside its container, nothing moves.
|
|
725
|
+
*/
|
|
726
|
+
export function reportLayoutChange(handle, target) {
|
|
727
|
+
return {
|
|
728
|
+
measureBefore() {
|
|
729
|
+
const element = resolve(target);
|
|
730
|
+
if (element == null || handle == null) {
|
|
731
|
+
return;
|
|
732
|
+
}
|
|
733
|
+
const area = areaOf(handle, element);
|
|
734
|
+
if (area == null) {
|
|
735
|
+
return;
|
|
736
|
+
}
|
|
737
|
+
const batch = batchFor(area);
|
|
738
|
+
if (batch.changed.has(element)) {
|
|
739
|
+
return;
|
|
740
|
+
}
|
|
741
|
+
batch.changed.add(element);
|
|
742
|
+
batch.changedSize += rectOf(element, batch.cache).height;
|
|
743
|
+
batch.visible ??= visibleRect(area);
|
|
744
|
+
batch.originBefore ??= originOf(area);
|
|
745
|
+
batch.walksToBand ??= area.ownerDocument.defaultView?.getComputedStyle(area).getPropertyValue('overflow-anchor') === 'none';
|
|
746
|
+
// Changes in one frame add up: every change's walk reaches the band
|
|
747
|
+
// their summed size can pull into view. When that outgrows the band
|
|
748
|
+
// walked so far, the band at least doubles and every change is walked
|
|
749
|
+
// again (from the cache), so a frame of many changes re-walks a few
|
|
750
|
+
// times, not once per change.
|
|
751
|
+
const needed = Math.max(batch.visible.height, batch.changedSize);
|
|
752
|
+
const walks = needed > batch.reach ? [...batch.changed] : [element];
|
|
753
|
+
if (needed > batch.reach) {
|
|
754
|
+
batch.reach = Math.max(needed, batch.reach * 2);
|
|
755
|
+
}
|
|
756
|
+
const band = bandFor(batch.visible, batch.reach);
|
|
757
|
+
for (const changed of walks) {
|
|
758
|
+
const candidates = collectCandidates(changed, area, band, batch.cache, batch.walksToBand, batch.ancestors, batch.befores);
|
|
759
|
+
for (const [candidate, rect] of candidates) {
|
|
760
|
+
if (!batch.before.has(candidate)) {
|
|
761
|
+
batch.before.set(candidate, rect);
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
batch.candidates.set(changed, [...candidates.keys()]);
|
|
765
|
+
}
|
|
766
|
+
},
|
|
767
|
+
animate() {
|
|
768
|
+
const element = resolve(target);
|
|
769
|
+
if (element == null || handle == null) {
|
|
770
|
+
return false;
|
|
771
|
+
}
|
|
772
|
+
const area = areaOf(handle, element);
|
|
773
|
+
const batch = area == null ? undefined : batches.get(area);
|
|
774
|
+
if (batch == null || !batch.changed.has(element)) {
|
|
775
|
+
return false;
|
|
776
|
+
}
|
|
777
|
+
if (!batch.scheduled) {
|
|
778
|
+
batch.scheduled = true;
|
|
779
|
+
// After every layout effect of this commit, before paint.
|
|
780
|
+
queueMicrotask(() => flush(batch));
|
|
781
|
+
}
|
|
782
|
+
return true;
|
|
783
|
+
}
|
|
784
|
+
};
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* The changed element's own animation, on the same motion as the content
|
|
789
|
+
* after it: content that appears reveals downward from its top edge. Plays
|
|
790
|
+
* only with a handle, inside its area and in the area's visible part.
|
|
791
|
+
*/
|
|
792
|
+
export function playLayoutChange(handle, element) {
|
|
793
|
+
if (handle == null) {
|
|
794
|
+
return;
|
|
795
|
+
}
|
|
796
|
+
const area = areaOf(handle, element);
|
|
797
|
+
if (area == null) {
|
|
798
|
+
return;
|
|
799
|
+
}
|
|
800
|
+
if (!intersects(element.getBoundingClientRect(), visibleRect(area))) {
|
|
801
|
+
return;
|
|
802
|
+
}
|
|
803
|
+
const motion = layoutMotion(area);
|
|
804
|
+
if (motion.kind === 'instant') {
|
|
805
|
+
return;
|
|
806
|
+
}
|
|
807
|
+
if (motion.kind === 'fade') {
|
|
808
|
+
safeAnimate(element, [{
|
|
809
|
+
opacity: 0
|
|
810
|
+
}, {
|
|
811
|
+
opacity: 1
|
|
812
|
+
}], {
|
|
813
|
+
duration: motion.durationMs,
|
|
814
|
+
easing: motion.easing
|
|
815
|
+
});
|
|
816
|
+
return;
|
|
817
|
+
}
|
|
818
|
+
safeAnimate(element, sampleKeyframes(motion.progress, remaining => ({
|
|
819
|
+
opacity: 1 - remaining,
|
|
820
|
+
clipPath: `inset(0 0 ${round(remaining * 100)}% 0)`
|
|
821
|
+
})), {
|
|
822
|
+
duration: motion.progress.durationMs,
|
|
823
|
+
easing: 'linear'
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
/** The inline properties an exit sets, so a release removes exactly them. */
|
|
828
|
+
const EXIT_PROPERTIES = ['margin-block-end', 'margin-inline-end', 'pointer-events'];
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* The first element after `element` in the area that takes part in layout:
|
|
832
|
+
* its next sibling, or its nearest ancestor's below the area. A wrapper's
|
|
833
|
+
* edge is not used: a negative end margin can collapse through it.
|
|
834
|
+
*/
|
|
835
|
+
function nextInFlow(element, area) {
|
|
836
|
+
const view = element.ownerDocument.defaultView;
|
|
837
|
+
// The first box at or inside `from` (a `display: contents` element has
|
|
838
|
+
// none of its own: its children stand in its place).
|
|
839
|
+
const firstBox = from => {
|
|
840
|
+
const style = view?.getComputedStyle(from);
|
|
841
|
+
if (style == null) {
|
|
842
|
+
return from;
|
|
843
|
+
}
|
|
844
|
+
if (style.display === 'contents') {
|
|
845
|
+
for (let child = from.firstElementChild; child != null; child = child.nextElementSibling) {
|
|
846
|
+
const box = firstBox(child);
|
|
847
|
+
if (box != null) {
|
|
848
|
+
return box;
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
return null;
|
|
852
|
+
}
|
|
853
|
+
return takesPart(from, style) ? from : null;
|
|
854
|
+
};
|
|
855
|
+
let node = element;
|
|
856
|
+
while (node != null && node !== area) {
|
|
857
|
+
for (let sibling = node.nextElementSibling; sibling != null; sibling = sibling.nextElementSibling) {
|
|
858
|
+
const box = firstBox(sibling);
|
|
859
|
+
if (box != null) {
|
|
860
|
+
return box;
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
node = node.parentElement;
|
|
864
|
+
}
|
|
865
|
+
return null;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* An element's place: its block start, and its inline start (RTL read right
|
|
870
|
+
* to left).
|
|
871
|
+
*/
|
|
872
|
+
function placeOf(element, rtl) {
|
|
873
|
+
const rect = element.getBoundingClientRect();
|
|
874
|
+
return {
|
|
875
|
+
block: rect.top,
|
|
876
|
+
inline: rtl ? -rect.right : rect.left
|
|
877
|
+
};
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* Keeps `element` where it is, in flow (so it scrolls and clips with its
|
|
882
|
+
* container), while the content after it takes the place it takes once the
|
|
883
|
+
* element is hidden: a negative end margin measured against that content,
|
|
884
|
+
* so a gap or collapsing margins come out exact. Returns false, setting
|
|
885
|
+
* nothing, when no margin reaches that place.
|
|
886
|
+
*/
|
|
887
|
+
function giveUpSpace(element, area) {
|
|
888
|
+
const view = element.ownerDocument.defaultView;
|
|
889
|
+
const parent = element.parentElement == null ? undefined : view?.getComputedStyle(element.parentElement);
|
|
890
|
+
const isRow = parent != null && parent.display.includes('flex') && parent.flexDirection.startsWith('row');
|
|
891
|
+
const rtl = view?.getComputedStyle(element).direction === 'rtl';
|
|
892
|
+
const property = isRow ? 'margin-inline-end' : 'margin-block-end';
|
|
893
|
+
const size = isRow ? element.offsetWidth : element.offsetHeight;
|
|
894
|
+
const next = nextInFlow(element, area);
|
|
895
|
+
if (next == null) {
|
|
896
|
+
// Nothing after it in the area to land anywhere.
|
|
897
|
+
element.style.setProperty(property, `${-size}px`);
|
|
898
|
+
return true;
|
|
899
|
+
}
|
|
900
|
+
const own = element.style.getPropertyValue(property);
|
|
901
|
+
const ownPriority = element.style.getPropertyPriority(property);
|
|
902
|
+
const axis = isRow ? 'inline' : 'block';
|
|
903
|
+
// The content after its container must land too: a flex-row item that
|
|
904
|
+
// sets its row's height moves what follows the row.
|
|
905
|
+
const afterParent = element.parentElement == null || element.parentElement === area ? null : nextInFlow(element.parentElement, area);
|
|
906
|
+
const checked = afterParent == null ? [next] : [next, afterParent];
|
|
907
|
+
// Where the content after it goes once it is hidden, read with it taken
|
|
908
|
+
// out of flow (not `display: none`, which would restart the CSS animations
|
|
909
|
+
// inside it).
|
|
910
|
+
const position = element.style.getPropertyValue('position');
|
|
911
|
+
const positionPriority = element.style.getPropertyPriority('position');
|
|
912
|
+
element.style.setProperty('position', 'absolute', 'important');
|
|
913
|
+
const targets = checked.map(box => placeOf(box, rtl));
|
|
914
|
+
const target = targets[0];
|
|
915
|
+
if (position === '') {
|
|
916
|
+
element.style.removeProperty('position');
|
|
917
|
+
} else {
|
|
918
|
+
element.style.setProperty('position', position, positionPriority);
|
|
919
|
+
}
|
|
920
|
+
// A first guess (its box), then one correction from the measured result:
|
|
921
|
+
// a gap, a collapsed margin or the element's own margins.
|
|
922
|
+
element.style.setProperty(property, `${-size}px`);
|
|
923
|
+
const guess = placeOf(next, rtl)[axis];
|
|
924
|
+
// The reading is in screen px, the margin in the element's own: under a
|
|
925
|
+
// scaled ancestor the correction is divided by the scale on this axis.
|
|
926
|
+
const scale = scaleOf(element, element.getBoundingClientRect());
|
|
927
|
+
const correction = (target[axis] - guess) / (isRow ? scale.x : scale.y);
|
|
928
|
+
element.style.setProperty(property, `${-size + correction}px`);
|
|
929
|
+
// Everything checked must land on both axes: a flex-row item that sets
|
|
930
|
+
// its row's height frees no block space with an inline margin.
|
|
931
|
+
const missed = checked.some((box, index) => {
|
|
932
|
+
const landed = placeOf(box, rtl);
|
|
933
|
+
return Math.abs(landed.block - targets[index].block) > 1 || Math.abs(landed.inline - targets[index].inline) > 1;
|
|
934
|
+
});
|
|
935
|
+
if (missed) {
|
|
936
|
+
if (own === '') {
|
|
937
|
+
element.style.removeProperty(property);
|
|
938
|
+
} else {
|
|
939
|
+
element.style.setProperty(property, own, ownPriority);
|
|
940
|
+
}
|
|
941
|
+
return false;
|
|
942
|
+
}
|
|
943
|
+
return true;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
/** Exits holding an element back, so a release can stop one. */
|
|
947
|
+
const exits = new WeakMap();
|
|
948
|
+
|
|
949
|
+
/** What an exit replaced on its element, so a release puts back exactly it. */
|
|
950
|
+
|
|
951
|
+
const replaced = new WeakMap();
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* The changed element's exit (`spec:AST-105` FR4): content that disappears
|
|
955
|
+
* keeps its place on screen but gives up its space (a negative end margin
|
|
956
|
+
* measured against the layout without it, so the content after it glides up
|
|
957
|
+
* at once to exactly where it ends, and it still scrolls and clips with its
|
|
958
|
+
* container), is inert (no focus, no pointer, nothing read), conceals upward
|
|
959
|
+
* from its bottom edge on the same motion, and then `done` runs, when the
|
|
960
|
+
* component hides or unmounts it. Under Reduce Motion with a coarse primary pointer it
|
|
961
|
+
* fades instead. Call it in the layout effect of the commit that closes the
|
|
962
|
+
* element, after the change's `animate()` reported it measured, in the same
|
|
963
|
+
* task: the glide reads the layout once the element has given up its space.
|
|
964
|
+
*
|
|
965
|
+
* Returns false, holding nothing, when the exit lands at once: no handle, a
|
|
966
|
+
* close no change in the area measured, outside the area or its visible part,
|
|
967
|
+
* Reduce Motion with a fine pointer, or a layout no end margin can free (a
|
|
968
|
+
* grid track and its gap, a flex-row item that sets its row's height); in
|
|
969
|
+
* that last case the content after it takes its final place at once too.
|
|
970
|
+
* The component then hides the element itself.
|
|
971
|
+
*/
|
|
972
|
+
export function holdLayoutExit(handle, element, done) {
|
|
973
|
+
if (handle == null) {
|
|
974
|
+
return false;
|
|
975
|
+
}
|
|
976
|
+
const area = areaOf(handle, element);
|
|
977
|
+
if (area == null || !intersects(element.getBoundingClientRect(), visibleRect(area))) {
|
|
978
|
+
return false;
|
|
979
|
+
}
|
|
980
|
+
// Only a measured close exits: the content after it glides into its place.
|
|
981
|
+
const batch = batches.get(area);
|
|
982
|
+
if (batch == null || ![...batch.changed].some(changed => changed === element || changed.contains(element))) {
|
|
983
|
+
return false;
|
|
984
|
+
}
|
|
985
|
+
const motion = layoutMotion(area);
|
|
986
|
+
if (motion.kind === 'instant') {
|
|
987
|
+
return false;
|
|
988
|
+
}
|
|
989
|
+
releaseLayoutExit(element);
|
|
990
|
+
const prior = {
|
|
991
|
+
inert: element.hasAttribute('inert'),
|
|
992
|
+
styles: EXIT_PROPERTIES.map(property => [property, element.style.getPropertyValue(property), element.style.getPropertyPriority(property)])
|
|
993
|
+
};
|
|
994
|
+
if (!giveUpSpace(element, area)) {
|
|
995
|
+
// A layout no end margin can free (a grid track and its gap, a flex-row
|
|
996
|
+
// item that sets its row's height): it hides at once, and the content
|
|
997
|
+
// after it takes its final place at once (`spec:AST-105` out of
|
|
998
|
+
// coverage).
|
|
999
|
+
for (const changed of [...batch.changed]) {
|
|
1000
|
+
if (changed === element || changed.contains(element)) {
|
|
1001
|
+
batch.changed.delete(changed);
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
return false;
|
|
1005
|
+
}
|
|
1006
|
+
replaced.set(element, prior);
|
|
1007
|
+
// Out of reach while it conceals: no focus, no pointer, nothing read.
|
|
1008
|
+
element.setAttribute('inert', '');
|
|
1009
|
+
element.style.setProperty('pointer-events', 'none');
|
|
1010
|
+
const animation = motion.kind === 'fade' ? safeAnimate(element, [{
|
|
1011
|
+
opacity: 1
|
|
1012
|
+
}, {
|
|
1013
|
+
opacity: 0
|
|
1014
|
+
}], {
|
|
1015
|
+
duration: motion.durationMs,
|
|
1016
|
+
easing: motion.easing,
|
|
1017
|
+
fill: 'forwards'
|
|
1018
|
+
}) : safeAnimate(element, sampleKeyframes(motion.progress, remaining => ({
|
|
1019
|
+
opacity: remaining,
|
|
1020
|
+
clipPath: `inset(0 0 ${round((1 - remaining) * 100)}% 0)`
|
|
1021
|
+
})), {
|
|
1022
|
+
duration: motion.progress.durationMs,
|
|
1023
|
+
easing: 'linear',
|
|
1024
|
+
fill: 'forwards'
|
|
1025
|
+
});
|
|
1026
|
+
exits.set(element, animation);
|
|
1027
|
+
if (animation == null) {
|
|
1028
|
+
// No Web Animations: nothing to wait for.
|
|
1029
|
+
done();
|
|
1030
|
+
return true;
|
|
1031
|
+
}
|
|
1032
|
+
animation.addEventListener?.('finish', () => {
|
|
1033
|
+
if (exits.get(element) === animation) {
|
|
1034
|
+
done();
|
|
1035
|
+
}
|
|
1036
|
+
});
|
|
1037
|
+
return true;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
/**
|
|
1041
|
+
* Puts an element `holdLayoutExit` held back: stops its exit and puts back
|
|
1042
|
+
* what the exit replaced (its `inert` and inline values as they were). Called
|
|
1043
|
+
* once the component has hidden the element, or when the element opens again
|
|
1044
|
+
* mid-exit.
|
|
1045
|
+
*/
|
|
1046
|
+
export function releaseLayoutExit(element) {
|
|
1047
|
+
if (!exits.has(element)) {
|
|
1048
|
+
return;
|
|
1049
|
+
}
|
|
1050
|
+
exits.get(element)?.cancel();
|
|
1051
|
+
exits.delete(element);
|
|
1052
|
+
const prior = replaced.get(element);
|
|
1053
|
+
replaced.delete(element);
|
|
1054
|
+
if (prior?.inert !== true) {
|
|
1055
|
+
element.removeAttribute('inert');
|
|
1056
|
+
}
|
|
1057
|
+
for (const [property, value, priority] of prior?.styles ?? []) {
|
|
1058
|
+
if (value === '') {
|
|
1059
|
+
element.style.removeProperty(property);
|
|
1060
|
+
} else {
|
|
1061
|
+
element.style.setProperty(property, value, priority);
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* A disclosure's indicator (its chevron) turns on the same motion as the
|
|
1068
|
+
* glide: its CSS transition takes the spring as a `linear()` easing, and an
|
|
1069
|
+
* immediate change under Reduce Motion. Without a handle the inline values are
|
|
1070
|
+
* cleared, so the component's own transition applies. An engine without
|
|
1071
|
+
* `linear()` drops that value and keeps the component's easing.
|
|
1072
|
+
*/
|
|
1073
|
+
export function applyLayoutChangeTransition(handle, element) {
|
|
1074
|
+
if (element == null) {
|
|
1075
|
+
return;
|
|
1076
|
+
}
|
|
1077
|
+
const area = handle == null ? null : areaOf(handle, element);
|
|
1078
|
+
if (area == null) {
|
|
1079
|
+
element.style.removeProperty('transition-duration');
|
|
1080
|
+
element.style.removeProperty('transition-timing-function');
|
|
1081
|
+
return;
|
|
1082
|
+
}
|
|
1083
|
+
const motion = layoutMotion(area);
|
|
1084
|
+
if (motion.kind !== 'spring') {
|
|
1085
|
+
element.style.setProperty('transition-duration', '0s');
|
|
1086
|
+
element.style.removeProperty('transition-timing-function');
|
|
1087
|
+
return;
|
|
1088
|
+
}
|
|
1089
|
+
element.style.setProperty('transition-duration', `${Math.round(motion.progress.durationMs)}ms`);
|
|
1090
|
+
element.style.setProperty('transition-timing-function', linearEasing(motion.progress));
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
/** @internal For tests: the motion a change in `area` plays. */
|
|
1094
|
+
export function layoutMotionFor(area) {
|
|
1095
|
+
return layoutMotion(area);
|
|
1096
|
+
}
|