@astryxdesign/core 0.7.17-canary.gffd1c8e → 0.7.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +334 -0
- package/README.md +26 -9
- package/dist/AlertDialog/AlertDialog.d.ts +1 -1
- package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +6 -8
- package/dist/AppShell/AppShell.d.ts +7 -3
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +74 -36
- package/dist/AppShell/unreadWidthPoint.d.ts +29 -0
- package/dist/AppShell/unreadWidthPoint.d.ts.map +1 -0
- package/dist/AppShell/unreadWidthPoint.js +134 -0
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.js +5 -1
- package/dist/Badge/Badge.d.ts.map +1 -1
- package/dist/Badge/Badge.js +2 -2
- package/dist/Banner/Banner.d.ts +6 -4
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +32 -29
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +3 -1
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +11 -7
- package/dist/BottomSheet/BottomSheetSwitcher.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetSwitcher.js +57 -2
- package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts +5 -0
- package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetStack.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetStack.js +6 -14
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +12 -1
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +4 -0
- package/dist/Calendar/Calendar.js +8 -2
- package/dist/Calendar/styles.d.ts +10 -6
- package/dist/Calendar/styles.d.ts.map +1 -1
- package/dist/Calendar/styles.js +7 -3
- package/dist/Card/Card.d.ts.map +1 -1
- package/dist/Card/Card.js +23 -4
- package/dist/Chat/ChatComposer.d.ts +1 -1
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +4 -4
- package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
- package/dist/Chat/ChatComposerDrawer.js +8 -4
- package/dist/Chat/ChatDictationButton.d.ts.map +1 -1
- package/dist/Chat/ChatDictationButton.js +7 -0
- package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
- package/dist/Chat/ChatPastedTextToken.js +3 -9
- package/dist/Chat/ChatSendButton.d.ts.map +1 -1
- package/dist/Chat/ChatSendButton.js +3 -0
- package/dist/Chat/ChatSystemMessage.d.ts.map +1 -1
- package/dist/Chat/ChatSystemMessage.js +1 -0
- package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
- package/dist/Chat/ChatToolCalls.js +8 -0
- package/dist/Chat/pastedTextLabel.d.ts +4 -0
- package/dist/Chat/pastedTextLabel.d.ts.map +1 -0
- package/dist/Chat/pastedTextLabel.js +21 -0
- package/dist/Chat/useChatPasteAsToken.d.ts.map +1 -1
- package/dist/Chat/useChatPasteAsToken.js +8 -8
- package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
- package/dist/Chat/useTriggerMenu.js +3 -3
- package/dist/CheckboxInput/CheckboxInput.d.ts +2 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +69 -18
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +8 -1
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +17 -3
- package/dist/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/Collapsible/Collapsible.js +2 -0
- package/dist/CommandPalette/CommandPaletteItem.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteItem.js +1 -0
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +8 -1
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +32 -5
- package/dist/DateInput/MonthScroller.d.ts.map +1 -1
- package/dist/DateInput/MonthScroller.js +1 -0
- package/dist/DateInput/PickerWheel.d.ts.map +1 -1
- package/dist/DateInput/PickerWheel.js +3 -2
- 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 +8 -8
- package/dist/DateInput/usePointerDragScroll.d.ts.map +1 -1
- package/dist/DateInput/usePointerDragScroll.js +5 -2
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +7 -0
- package/dist/DateTimeInput/TouchDateTimeField.d.ts.map +1 -1
- package/dist/DateTimeInput/TouchDateTimeField.js +2 -1
- package/dist/DateTimeInput/nativePickerSegmentStyles.d.ts +2 -2
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +104 -18
- package/dist/Dialog/DialogContext.d.ts +5 -4
- package/dist/Dialog/DialogContext.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.js +38 -12
- package/dist/Drawer/DrawerHeader.d.ts.map +1 -1
- package/dist/Drawer/DrawerHeader.js +23 -8
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +23 -17
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +3 -3
- package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.js +3 -2
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +3 -3
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +19 -2
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts +6 -3
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts.map +1 -1
- package/dist/DropdownMenu/lazyMenuBottomSheet.js +31 -7
- package/dist/DropdownMenu/menuRowCorners.stylex.d.ts +24 -0
- package/dist/DropdownMenu/menuRowCorners.stylex.d.ts.map +1 -0
- package/dist/DropdownMenu/menuRowCorners.stylex.js +29 -0
- package/dist/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/EmptyState/EmptyState.js +2 -2
- package/dist/Field/FieldLabel.d.ts.map +1 -1
- package/dist/Field/FieldLabel.js +2 -2
- package/dist/Field/inputDisabledFocus.d.ts +4 -0
- package/dist/Field/inputDisabledFocus.d.ts.map +1 -1
- package/dist/Field/inputDisabledFocus.js +5 -0
- package/dist/Field/inputStyles.stylex.d.ts +31 -4
- package/dist/Field/inputStyles.stylex.d.ts.map +1 -1
- package/dist/Field/inputStyles.stylex.js +30 -5
- package/dist/Grid/Grid.d.ts +2 -1
- package/dist/Grid/Grid.d.ts.map +1 -1
- package/dist/Grid/Grid.js +5 -2
- package/dist/Heading/Heading.d.ts +1 -1
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/Heading/Heading.js +15 -1
- package/dist/Icon/Icon.d.ts +1 -1
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +32 -2
- package/dist/Indicator/CheckboxIndicator.d.ts.map +1 -1
- package/dist/Indicator/CheckboxIndicator.js +12 -6
- package/dist/Indicator/RadioIndicator.d.ts.map +1 -1
- package/dist/Indicator/RadioIndicator.js +18 -4
- package/dist/Indicator/indicatorRegistry.d.ts +3 -26
- package/dist/Indicator/indicatorRegistry.d.ts.map +1 -1
- package/dist/Indicator/indicatorRegistry.js +2 -11
- package/dist/Indicator/themeIndicators.d.ts +15 -0
- package/dist/Indicator/themeIndicators.d.ts.map +1 -0
- package/dist/Indicator/themeIndicators.js +21 -0
- package/dist/Indicator/types.d.ts +14 -0
- package/dist/Indicator/types.d.ts.map +1 -1
- package/dist/Indicator/useThemeIndicator.d.ts +3 -0
- package/dist/Indicator/useThemeIndicator.d.ts.map +1 -0
- package/dist/Indicator/useThemeIndicator.js +19 -0
- package/dist/Item/Item.d.ts +6 -2
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +30 -2
- package/dist/Kbd/Kbd.d.ts.map +1 -1
- package/dist/Kbd/Kbd.js +9 -2
- package/dist/Layer/layerExitCopy.d.ts.map +1 -1
- package/dist/Layer/layerExitCopy.js +1 -1
- package/dist/Layer/layerSlideRules.d.ts +23 -15
- package/dist/Layer/layerSlideRules.d.ts.map +1 -1
- package/dist/Layer/layerSlideRules.js +54 -54
- package/dist/Layer/useLayer.d.ts +41 -29
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +199 -126
- package/dist/Layer/useLayerKeyboardClearance.d.ts +5 -5
- package/dist/Layer/useLayerKeyboardClearance.d.ts.map +1 -1
- package/dist/Layer/useLayerKeyboardClearance.js +5 -5
- package/dist/Layout/LayoutContainerContext.d.ts +4 -0
- package/dist/Layout/LayoutContainerContext.d.ts.map +1 -0
- package/dist/Layout/LayoutContainerContext.js +20 -0
- package/dist/Layout/LayoutContainerScope.d.ts +15 -0
- package/dist/Layout/LayoutContainerScope.d.ts.map +1 -0
- package/dist/Layout/LayoutContainerScope.js +23 -0
- package/dist/Layout/LayoutContent.d.ts +2 -1
- package/dist/Layout/LayoutContent.d.ts.map +1 -1
- package/dist/Layout/LayoutContent.js +7 -2
- package/dist/Layout/LayoutFooter.d.ts.map +1 -1
- package/dist/Layout/LayoutFooter.js +5 -1
- package/dist/Layout/LayoutHeader.d.ts.map +1 -1
- package/dist/Layout/LayoutHeader.js +5 -1
- package/dist/Layout/containerCorners.stylex.d.ts +15 -7
- package/dist/Layout/containerCorners.stylex.d.ts.map +1 -1
- package/dist/Layout/containerCorners.stylex.js +16 -7
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +324 -6
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +1 -1
- package/dist/List/List.d.ts.map +1 -1
- package/dist/List/List.js +14 -6
- package/dist/List/ListContext.d.ts +38 -1
- package/dist/List/ListContext.d.ts.map +1 -1
- package/dist/List/ListContext.js +50 -2
- package/dist/List/ListItem.js +2 -2
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +85 -96
- package/dist/Markdown/plugins/HeadingLinksRenderer.d.ts.map +1 -1
- package/dist/Markdown/plugins/HeadingLinksRenderer.js +12 -5
- package/dist/Markdown/plugins/protocol.js +3 -3
- package/dist/MetadataList/MetadataListItem.d.ts.map +1 -1
- package/dist/MetadataList/MetadataListItem.js +11 -3
- package/dist/MobileNav/MobileNav.d.ts +1 -1
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +6 -3
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +33 -9
- package/dist/NavMenu/NavHeadingMenu.d.ts.map +1 -1
- package/dist/NavMenu/NavHeadingMenu.js +5 -2
- package/dist/NavMenu/NavHeadingMenuItem.d.ts.map +1 -1
- package/dist/NavMenu/NavHeadingMenuItem.js +1 -0
- package/dist/NavMenu/NavMenuContext.d.ts +7 -0
- package/dist/NavMenu/NavMenuContext.d.ts.map +1 -1
- package/dist/NavMenu/NavMenuContext.js +9 -0
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +8 -2
- package/dist/Outline/Outline.d.ts +7 -3
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +11 -3
- package/dist/Outline/useScrollSpy.d.ts +1 -1
- package/dist/Outline/useScrollSpy.d.ts.map +1 -1
- package/dist/Outline/useScrollSpy.js +6 -2
- package/dist/OverflowList/OverflowList.d.ts.map +1 -1
- package/dist/OverflowList/OverflowList.js +51 -25
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +33 -13
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/Popover/Popover.js +5 -1
- package/dist/Popover/popoverAnchor.d.ts +11 -0
- package/dist/Popover/popoverAnchor.d.ts.map +1 -0
- package/dist/Popover/popoverAnchor.js +33 -0
- package/dist/Popover/usePopover.d.ts +20 -3
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +110 -10
- package/dist/PowerSearch/PowerSearch.d.ts +1 -0
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +46 -9
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +1 -1
- package/dist/PowerSearch/PowerSearchFilterEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchFilterEditor.js +7 -1
- package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchToken.js +7 -0
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts +2 -4
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +6 -13
- package/dist/ProgressBar/ProgressBar.d.ts +5 -4
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +26 -26
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +51 -0
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +1 -1
- package/dist/Resizable/ResizeHandle.d.ts +1 -1
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +1 -1
- package/dist/Resizable/resizableModel.d.ts +45 -3
- package/dist/Resizable/resizableModel.d.ts.map +1 -1
- package/dist/Resizable/resizableModel.js +91 -3
- package/dist/Resizable/resizeGesture.d.ts +3 -0
- package/dist/Resizable/resizeGesture.d.ts.map +1 -1
- package/dist/Resizable/resizeGesture.js +6 -0
- package/dist/Resizable/useResizable.d.ts +1 -33
- package/dist/Resizable/useResizable.d.ts.map +1 -1
- package/dist/Resizable/useResizable.js +8 -72
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +1 -0
- package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts +27 -5
- package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts.map +1 -1
- package/dist/SegmentedControl/useSegmentedTouchTracking.js +70 -8
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +34 -14
- package/dist/Selector/hooks.d.ts +5 -0
- package/dist/Selector/hooks.d.ts.map +1 -1
- package/dist/Selector/hooks.js +72 -16
- package/dist/Selector/useSelectorPresentation.d.ts.map +1 -1
- package/dist/Selector/useSelectorPresentation.js +9 -3
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +18 -5
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +2 -2
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +47 -33
- package/dist/Stepper/Step.d.ts.map +1 -1
- package/dist/Stepper/Step.js +21 -12
- package/dist/Swipe/useSwipeAction.js +3 -3
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +64 -46
- package/dist/Switch/useSwitchTouch.d.ts +22 -1
- package/dist/Switch/useSwitchTouch.d.ts.map +1 -1
- package/dist/Switch/useSwitchTouch.js +54 -3
- package/dist/TabList/Tab.d.ts.map +1 -1
- package/dist/TabList/Tab.js +3 -3
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +37 -18
- package/dist/Table/Table.d.ts +4 -3
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +32 -14
- package/dist/Table/TableBody.d.ts.map +1 -1
- package/dist/Table/TableBody.js +5 -1
- package/dist/Table/TableCell.d.ts.map +1 -1
- package/dist/Table/TableCell.js +6 -0
- package/dist/Table/TableHeaderCell.d.ts +1 -1
- package/dist/Table/TableHeaderCell.d.ts.map +1 -1
- package/dist/Table/TableHeaderCell.js +42 -9
- package/dist/Table/TableRow.d.ts.map +1 -1
- package/dist/Table/TableRow.js +9 -1
- package/dist/Table/TableRowPlacementContext.d.ts +18 -0
- package/dist/Table/TableRowPlacementContext.d.ts.map +1 -0
- package/dist/Table/TableRowPlacementContext.js +41 -0
- package/dist/Table/TableSelectionToolbar.d.ts.map +1 -1
- package/dist/Table/TableSelectionToolbar.js +7 -0
- package/dist/Table/columnUtils.d.ts +5 -0
- package/dist/Table/columnUtils.d.ts.map +1 -1
- package/dist/Table/columnUtils.js +9 -1
- package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts.map +1 -1
- package/dist/Table/plugins/rowIndex/useTableRowIndex.js +2 -2
- package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortable.js +8 -3
- package/dist/Table/plugins/sortable/useTableSortableState.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortableState.js +10 -6
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +5 -1
- package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
- package/dist/Table/plugins/tree/useTableTreeData.js +2 -1
- package/dist/Table/table.stylex.d.ts +31 -5
- package/dist/Table/table.stylex.d.ts.map +1 -1
- package/dist/Table/table.stylex.js +33 -5
- package/dist/Table/types.d.ts +3 -1
- package/dist/Table/types.d.ts.map +1 -1
- package/dist/Text/TruncationTooltip.d.ts.map +1 -1
- package/dist/Text/TruncationTooltip.js +17 -6
- package/dist/Text/text.stylex.d.ts +2 -2
- package/dist/Text/useTruncation.d.ts.map +1 -1
- package/dist/Text/useTruncation.js +23 -4
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +15 -1
- package/dist/TextInput/TextInput.d.ts +9 -3
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +19 -18
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +13 -4
- package/dist/Timer/Timer.d.ts.map +1 -1
- package/dist/Timer/Timer.js +10 -7
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +55 -4
- package/dist/Toast/Toast.d.ts +1 -6
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +77 -44
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +48 -21
- package/dist/Toast/types.d.ts +8 -0
- package/dist/Toast/types.d.ts.map +1 -1
- package/dist/Toast/useToast.d.ts.map +1 -1
- package/dist/Toast/useToast.js +14 -7
- package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButton.js +2 -1
- package/dist/Token/Token.d.ts +1 -1
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +6 -2
- package/dist/Tokenizer/Tokenizer.d.ts +2 -2
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +102 -62
- package/dist/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/Toolbar/Toolbar.js +33 -5
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +20 -1
- package/dist/TopNav/TopNav.d.ts.map +1 -1
- package/dist/TopNav/TopNav.js +24 -8
- package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
- package/dist/TopNav/TopNavHeading.js +21 -9
- package/dist/TopNav/TopNavMegaMenu.js +1 -1
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +9 -2
- package/dist/TopNav/TopNavRenderContext.d.ts +13 -0
- package/dist/TopNav/TopNavRenderContext.d.ts.map +1 -1
- package/dist/TopNav/TopNavRenderContext.js +24 -9
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +7 -1
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +20 -2
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +2 -1
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +24 -9
- package/dist/Typeahead/TypeaheadItem.d.ts.map +1 -1
- package/dist/Typeahead/TypeaheadItem.js +7 -0
- package/dist/astryx.css +211 -56
- package/dist/gestures/GestureHost.d.ts +7 -0
- package/dist/gestures/GestureHost.d.ts.map +1 -1
- package/dist/gestures/GestureHost.js +37 -0
- package/dist/hooks/anchoredHint.d.ts.map +1 -1
- package/dist/hooks/anchoredHint.js +0 -1
- package/dist/hooks/computeOverflow.d.ts.map +1 -1
- package/dist/hooks/computeOverflow.js +7 -0
- package/dist/hooks/focusableSelector.d.ts +16 -9
- package/dist/hooks/focusableSelector.d.ts.map +1 -1
- package/dist/hooks/focusableSelector.js +53 -2
- package/dist/hooks/scrollEdgeFade.d.ts +34 -0
- package/dist/hooks/scrollEdgeFade.d.ts.map +1 -0
- package/dist/hooks/scrollEdgeFade.js +173 -0
- package/dist/hooks/statusButtonPress.d.ts +15 -0
- package/dist/hooks/statusButtonPress.d.ts.map +1 -0
- package/dist/hooks/statusButtonPress.js +19 -0
- package/dist/hooks/useAnnounce.d.ts.map +1 -1
- package/dist/hooks/useAnnounce.js +2 -1
- package/dist/hooks/useFocusTrap.d.ts +26 -16
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +75 -112
- package/dist/hooks/useGroupPressTracking.d.ts +1 -1
- package/dist/hooks/useGroupPressTracking.js +1 -1
- package/dist/hooks/useOverflow.d.ts +25 -2
- package/dist/hooks/useOverflow.d.ts.map +1 -1
- package/dist/hooks/useOverflow.js +137 -8
- package/dist/hooks/useResolvedRequired.d.ts +27 -0
- package/dist/hooks/useResolvedRequired.d.ts.map +1 -1
- package/dist/hooks/useResolvedRequired.js +30 -1
- package/dist/hooks/useTreeFocus.d.ts.map +1 -1
- package/dist/hooks/useTreeFocus.js +4 -2
- package/dist/hooks/useTypeahead.d.ts.map +1 -1
- package/dist/hooks/useTypeahead.js +8 -8
- package/dist/i18n/InternationalizationContext.d.ts +13 -6
- package/dist/i18n/InternationalizationContext.d.ts.map +1 -1
- package/dist/i18n/InternationalizationContext.js +11 -6
- package/dist/i18n/InternationalizationProvider.d.ts.map +1 -1
- package/dist/i18n/InternationalizationProvider.js +7 -0
- package/dist/i18n/defaultTranslator.d.ts +17 -0
- package/dist/i18n/defaultTranslator.d.ts.map +1 -0
- package/dist/i18n/defaultTranslator.js +18 -0
- package/dist/i18n/firstStrongDirection.d.ts +3 -2
- package/dist/i18n/firstStrongDirection.d.ts.map +1 -1
- package/dist/i18n/firstStrongDirection.js +50 -12
- package/dist/i18n/generated-english/Chat/ChatPastedTextToken.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Chat/ChatPastedTextToken.generated.js +1 -2
- package/dist/i18n/generated-english/Chat/pastedTextLabel.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Chat/pastedTextLabel.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Chat/pastedTextLabel.generated.js +12 -0
- package/dist/i18n/generated-english/Chat/useTriggerMenu.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Chat/useTriggerMenu.generated.js +1 -0
- package/dist/i18n/generated-english/CodeBlock/CodeBlock.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/CodeBlock/CodeBlock.generated.js +2 -1
- package/dist/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.js +2 -1
- package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.js +1 -0
- package/dist/i18n/generated-english/Slider/Slider.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Slider/Slider.generated.js +2 -1
- package/dist/i18n/generated-english/TextArea/TextArea.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/TextArea/TextArea.generated.js +1 -0
- package/dist/i18n/generated-english/TextInput/TextInput.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/TextInput/TextInput.generated.js +1 -0
- package/dist/i18n/generated-english/Timestamp/Timestamp.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Timestamp/Timestamp.generated.js +2 -1
- package/dist/i18n/generated-english/Tokenizer/Tokenizer.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Tokenizer/Tokenizer.generated.js +1 -0
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +9 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +9 -0
- package/dist/i18n/publicContext.d.ts.map +1 -1
- package/dist/i18n/publicContext.js +4 -2
- package/dist/i18n/translatingContext.d.ts +2 -0
- package/dist/i18n/translatingContext.d.ts.map +1 -0
- package/dist/i18n/translatingContext.js +25 -0
- package/dist/i18n/useComponentTranslator.d.ts.map +1 -1
- package/dist/i18n/useComponentTranslator.js +3 -2
- package/dist/i18n/useListFormatter.d.ts.map +1 -1
- package/dist/i18n/useListFormatter.js +3 -2
- package/dist/i18n/useTranslator.d.ts.map +1 -1
- package/dist/i18n/useTranslator.js +3 -2
- package/dist/internal/touch.d.ts +2 -0
- package/dist/internal/touch.d.ts.map +1 -1
- package/dist/internal/touch.js +5 -1
- package/dist/keyboard/keyboardHeight.d.ts +34 -3
- package/dist/keyboard/keyboardHeight.d.ts.map +1 -1
- package/dist/keyboard/keyboardHeight.js +101 -24
- package/dist/keyboard/keyboardTarget.d.ts +19 -16
- package/dist/keyboard/keyboardTarget.d.ts.map +1 -1
- package/dist/keyboard/keyboardTarget.js +529 -72
- package/dist/keyboard/useMobileKeyboard.d.ts.map +1 -1
- package/dist/keyboard/useMobileKeyboard.js +1 -8
- package/dist/palette/color.d.ts +23 -0
- package/dist/palette/color.d.ts.map +1 -0
- package/dist/palette/color.js +126 -0
- package/dist/palette/generator.d.ts +69 -0
- package/dist/palette/generator.d.ts.map +1 -0
- package/dist/palette/generator.js +778 -0
- package/dist/palette/index.d.ts +12 -0
- package/dist/palette/index.d.ts.map +1 -0
- package/dist/palette/index.js +13 -0
- package/dist/palette/mapping.d.ts +319 -0
- package/dist/palette/mapping.d.ts.map +1 -0
- package/dist/palette/mapping.js +1312 -0
- package/dist/palette/themePalette.d.ts +20 -0
- package/dist/palette/themePalette.d.ts.map +1 -0
- package/dist/palette/themePalette.js +145 -0
- package/dist/palette/types.d.ts +178 -0
- package/dist/palette/types.d.ts.map +1 -0
- package/dist/palette/types.js +1 -0
- package/dist/privateAttributes/mediaDarkPage.d.ts +5 -0
- package/dist/privateAttributes/mediaDarkPage.d.ts.map +1 -0
- package/dist/privateAttributes/mediaDarkPage.js +27 -0
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts +2 -1
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts.map +1 -1
- package/dist/privateAttributes/pressGroupItem.stylex.js +2 -1
- package/dist/privateAttributes/scheme.d.ts +10 -0
- package/dist/privateAttributes/scheme.d.ts.map +1 -0
- package/dist/privateAttributes/scheme.js +34 -0
- package/dist/privateAttributes/travelling.stylex.d.ts.map +1 -1
- package/dist/privateAttributes/travelling.stylex.js +2 -2
- package/dist/theme/MediaDarkPage.d.ts +18 -0
- package/dist/theme/MediaDarkPage.d.ts.map +1 -0
- package/dist/theme/MediaDarkPage.js +35 -0
- package/dist/theme/MediaTheme.d.ts.map +1 -1
- package/dist/theme/MediaTheme.js +9 -1
- package/dist/theme/Theme.d.ts.map +1 -1
- package/dist/theme/Theme.js +99 -31
- package/dist/theme/defineTheme.d.ts +31 -6
- package/dist/theme/defineTheme.d.ts.map +1 -1
- package/dist/theme/defineTheme.js +65 -29
- package/dist/theme/derivedVarRegistry.d.ts +19 -0
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +49 -4
- package/dist/theme/expandRadiusScale.d.ts +1 -2
- package/dist/theme/expandRadiusScale.d.ts.map +1 -1
- package/dist/theme/expandRadiusScale.js +1 -5
- package/dist/theme/generateThemeRules.d.ts +10 -3
- package/dist/theme/generateThemeRules.d.ts.map +1 -1
- package/dist/theme/generateThemeRules.js +310 -207
- package/dist/theme/index.d.ts +2 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +2 -1
- package/dist/theme/invertedSurfaceSide.d.ts +17 -0
- package/dist/theme/invertedSurfaceSide.d.ts.map +1 -0
- package/dist/theme/invertedSurfaceSide.js +47 -0
- package/dist/theme/resolveThemeValues.d.ts +5 -2
- package/dist/theme/resolveThemeValues.d.ts.map +1 -1
- package/dist/theme/resolveThemeValues.js +7 -1
- package/dist/theme/statusRoleDefaults.d.ts +43 -0
- package/dist/theme/statusRoleDefaults.d.ts.map +1 -0
- package/dist/theme/statusRoleDefaults.js +196 -0
- package/dist/theme/statusRoleDerivation.d.ts +4 -0
- package/dist/theme/statusRoleDerivation.d.ts.map +1 -1
- package/dist/theme/statusRoleDerivation.js +3 -1
- package/dist/theme/syntax/SyntaxTheme.d.ts.map +1 -1
- package/dist/theme/syntax/SyntaxTheme.js +7 -0
- package/dist/theme/themeAdaptations.d.ts +24 -1
- package/dist/theme/themeAdaptations.d.ts.map +1 -1
- package/dist/theme/themeAdaptations.js +48 -5
- package/dist/theme/tokenDefaults.d.ts +3 -0
- package/dist/theme/tokenDefaults.d.ts.map +1 -0
- package/dist/theme/tokenDefaults.js +30 -0
- package/dist/theme/tokenValues.d.ts +26 -0
- package/dist/theme/tokenValues.d.ts.map +1 -0
- package/dist/theme/tokenValues.js +180 -0
- package/dist/theme/tokens.d.ts +3 -2
- package/dist/theme/tokens.d.ts.map +1 -1
- package/dist/theme/tokens.js +7 -161
- package/dist/theme/tokens.stylex.d.ts +4 -4
- package/dist/theme/tokens.stylex.d.ts.map +1 -1
- package/dist/theme/tokens.stylex.js +7 -5
- package/dist/theme/useTheme.d.ts +40 -3
- package/dist/theme/useTheme.d.ts.map +1 -1
- package/dist/theme/useTheme.js +137 -32
- package/dist/utils/devWarning.d.ts +17 -0
- package/dist/utils/devWarning.d.ts.map +1 -1
- package/dist/utils/devWarning.js +20 -0
- package/dist/utils/focusOutline.stylex.d.ts.map +1 -1
- package/dist/utils/focusOutline.stylex.js +7 -4
- package/dist/utils/focusReturn.d.ts +110 -0
- package/dist/utils/focusReturn.d.ts.map +1 -1
- package/dist/utils/focusReturn.js +418 -12
- package/dist/utils/hitArea.d.ts +28 -0
- package/dist/utils/hitArea.d.ts.map +1 -1
- package/dist/utils/hitArea.js +52 -18
- package/dist/utils/inputStream.d.ts +27 -0
- package/dist/utils/inputStream.d.ts.map +1 -1
- package/dist/utils/inputStream.js +72 -5
- package/dist/utils/nodeType.d.ts +2 -0
- package/dist/utils/nodeType.d.ts.map +1 -1
- package/dist/utils/nodeType.js +10 -0
- package/dist/utils/timeFormat.d.ts +14 -4
- package/dist/utils/timeFormat.d.ts.map +1 -1
- package/dist/utils/timeFormat.js +42 -4
- package/dist/utils/touchPresentation.d.ts +2 -2
- package/dist/utils/touchPresentation.d.ts.map +1 -1
- package/dist/utils/touchPresentation.js +10 -7
- package/dist/utils/touchPresentation.stylex.d.ts +4 -3
- package/dist/utils/touchPresentation.stylex.d.ts.map +1 -1
- package/dist/utils/touchPresentation.stylex.js +3 -3
- package/dist/utils/touchQueries.d.ts +3 -2
- package/dist/utils/touchQueries.d.ts.map +1 -1
- package/dist/utils/touchQueries.js +3 -2
- package/dist/utils/typeaheadMatch.d.ts +13 -0
- package/dist/utils/typeaheadMatch.d.ts.map +1 -1
- package/dist/utils/typeaheadMatch.js +15 -1
- package/dist/virtualization/useInlineListWindow.d.ts.map +1 -1
- package/dist/virtualization/useInlineListWindow.js +38 -22
- package/locales/en.json +36 -0
- package/locales/pseudo.json +27 -0
- package/package.json +10 -5
- package/scripts/agent-doc-state.mjs +71 -4
- package/src/AlertDialog/AlertDialog.doc.mjs +5 -1
- package/src/AlertDialog/AlertDialog.tsx +34 -7
- package/src/AppShell/AppShell.doc.mjs +22 -0
- package/src/AppShell/AppShell.tsx +112 -65
- package/src/AppShell/unreadWidthPoint.ts +162 -0
- package/src/AvatarGroup/AvatarGroupOverflow.tsx +6 -1
- package/src/Badge/Badge.tsx +5 -2
- package/src/Banner/Banner.doc.mjs +15 -0
- package/src/Banner/Banner.tsx +56 -45
- package/src/BottomSheet/BottomSheet.doc.mjs +6 -3
- package/src/BottomSheet/BottomSheet.tsx +3 -0
- package/src/BottomSheet/BottomSheetPanel.tsx +15 -7
- package/src/BottomSheet/BottomSheetSwitcher.tsx +73 -1
- package/src/BottomSheet/BottomSheetSwitcherContext.ts +5 -0
- package/src/BottomSheet/bottomSheetStack.ts +6 -14
- package/src/Breadcrumbs/BreadcrumbItem.tsx +14 -1
- package/src/Button/Button.doc.mjs +6 -0
- package/src/Button/Button.tsx +6 -0
- package/src/Calendar/Calendar.doc.mjs +16 -0
- package/src/Calendar/Calendar.tsx +32 -20
- package/src/Calendar/styles.ts +12 -3
- package/src/Card/Card.doc.mjs +2 -2
- package/src/Card/Card.tsx +22 -3
- package/src/Chat/Chat.doc.mjs +1 -1
- package/src/Chat/ChatComposer.doc.mjs +3 -3
- package/src/Chat/ChatComposer.tsx +11 -5
- package/src/Chat/ChatComposerDrawer.tsx +11 -7
- package/src/Chat/ChatDictationButton.tsx +12 -0
- package/src/Chat/ChatMessageBubble.tsx +2 -2
- package/src/Chat/ChatPastedTextToken.tsx +3 -9
- package/src/Chat/ChatSendButton.tsx +5 -0
- package/src/Chat/ChatSystemMessage.tsx +1 -0
- package/src/Chat/ChatToolCalls.tsx +16 -0
- package/src/Chat/pastedTextLabel.ts +23 -0
- package/src/Chat/useChatPasteAsToken.ts +9 -8
- package/src/Chat/useTriggerMenu.tsx +4 -1
- package/src/CheckboxInput/CheckboxInput.doc.mjs +20 -0
- package/src/CheckboxInput/CheckboxInput.tsx +83 -26
- package/src/CheckboxList/CheckboxList.doc.mjs +15 -0
- package/src/CheckboxList/CheckboxListItem.doc.mjs +3 -3
- package/src/Citation/Citation.tsx +16 -1
- package/src/CodeBlock/CodeBlock.tsx +29 -2
- package/src/Collapsible/Collapsible.tsx +2 -0
- package/src/CommandPalette/CommandPaletteItem.tsx +1 -0
- package/src/ComplexSelector/ComplexSelector.doc.mjs +30 -2
- package/src/ComplexSelector/ComplexSelector.tsx +19 -1
- package/src/ContextMenu/ContextMenu.doc.mjs +5 -1
- package/src/ContextMenu/ContextMenu.tsx +44 -5
- package/src/ContextMenu/ContextMenuItem.doc.mjs +55 -5
- package/src/DateInput/MonthScroller.tsx +1 -0
- package/src/DateInput/PickerWheel.tsx +1 -0
- package/src/DateInput/TouchDateField.tsx +2 -0
- package/src/DateInput/Wheel.tsx +1 -0
- package/src/DateInput/usePointerDragScroll.ts +6 -2
- package/src/DateRangeInput/DateRangeInput.tsx +16 -0
- package/src/DateTimeInput/TouchDateTimeField.tsx +2 -0
- package/src/Dialog/Dialog.doc.mjs +11 -1
- package/src/Dialog/Dialog.tsx +116 -19
- package/src/Dialog/DialogContext.ts +5 -4
- package/src/Dialog/DialogHeader.tsx +50 -12
- package/src/Drawer/DrawerHeader.tsx +31 -6
- package/src/DropdownMenu/DropdownMenu.doc.mjs +20 -1
- package/src/DropdownMenu/DropdownMenu.tsx +29 -22
- package/src/DropdownMenu/DropdownMenuCheckboxItem.doc.mjs +4 -4
- package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +3 -2
- package/src/DropdownMenu/DropdownMenuItem.doc.mjs +5 -5
- package/src/DropdownMenu/DropdownMenuItem.tsx +3 -1
- package/src/DropdownMenu/DropdownMenuRadioItem.doc.mjs +4 -4
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +3 -2
- package/src/DropdownMenu/DropdownMenuSubMenu.doc.mjs +3 -3
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +23 -1
- package/src/DropdownMenu/lazyMenuBottomSheet.ts +37 -9
- package/src/DropdownMenu/menuRowCorners.stylex.ts +40 -0
- package/src/EmptyState/EmptyState.tsx +2 -0
- package/src/Field/Field.doc.mjs +1 -1
- package/src/Field/FieldLabel.doc.mjs +3 -3
- package/src/Field/FieldLabel.tsx +9 -2
- package/src/Field/inputDisabledFocus.ts +18 -0
- package/src/Field/inputStyles.stylex.ts +52 -1
- package/src/Grid/Grid.doc.mjs +6 -3
- package/src/Grid/Grid.tsx +5 -2
- package/src/Heading/Heading.tsx +24 -1
- package/src/Icon/Icon.doc.mjs +1 -1
- package/src/Icon/Icon.tsx +40 -2
- package/src/Indicator/CheckboxIndicator.tsx +11 -6
- package/src/Indicator/Indicator.doc.mjs +1 -1
- package/src/Indicator/RadioIndicator.tsx +31 -4
- package/src/Indicator/indicatorRegistry.ts +7 -23
- package/src/Indicator/themeIndicators.ts +29 -0
- package/src/Indicator/types.ts +14 -0
- package/src/Indicator/useThemeIndicator.ts +24 -0
- package/src/Item/Item.doc.mjs +3 -3
- package/src/Item/Item.tsx +48 -7
- package/src/Kbd/Kbd.doc.mjs +6 -2
- package/src/Kbd/Kbd.tsx +16 -1
- package/src/Layer/layerExitCopy.ts +0 -1
- package/src/Layer/layerSlideRules.ts +62 -74
- package/src/Layer/useLayer.doc.mjs +2 -2
- package/src/Layer/useLayer.tsx +293 -137
- package/src/Layer/useLayerKeyboardClearance.ts +9 -12
- package/src/Layout/Layout.doc.mjs +3 -3
- package/src/Layout/LayoutContainerContext.ts +27 -0
- package/src/Layout/LayoutContainerScope.tsx +32 -0
- package/src/Layout/LayoutContent.tsx +5 -2
- package/src/Layout/LayoutFooter.tsx +3 -1
- package/src/Layout/LayoutHeader.tsx +3 -1
- package/src/Layout/containerCorners.stylex.ts +44 -7
- package/src/Lightbox/Lightbox.tsx +460 -8
- package/src/Link/Link.doc.mjs +18 -0
- package/src/Link/Link.tsx +3 -1
- package/src/List/List.tsx +14 -2
- package/src/List/ListContext.tsx +60 -1
- package/src/List/ListItem.doc.mjs +11 -9
- package/src/List/ListItem.tsx +4 -4
- package/src/Markdown/Markdown.doc.mjs +1 -1
- package/src/Markdown/Markdown.tsx +189 -190
- package/src/Markdown/plugins/HeadingLinksRenderer.tsx +14 -4
- package/src/Markdown/plugins/protocol.ts +3 -3
- package/src/MetadataList/MetadataListItem.tsx +18 -3
- package/src/MobileNav/MobileNav.doc.mjs +134 -52
- package/src/MobileNav/MobileNav.tsx +13 -9
- package/src/MultiSelector/MultiSelector.doc.mjs +2 -2
- package/src/MultiSelector/MultiSelector.tsx +51 -8
- package/src/NavMenu/NavHeadingMenu.tsx +5 -1
- package/src/NavMenu/NavHeadingMenuItem.tsx +1 -0
- package/src/NavMenu/NavMenu.doc.mjs +105 -2
- package/src/NavMenu/NavMenuContext.tsx +13 -0
- package/src/NumberInput/NumberInput.doc.mjs +12 -10
- package/src/NumberInput/NumberInput.tsx +19 -11
- package/src/Outline/Outline.doc.mjs +26 -8
- package/src/Outline/Outline.tsx +35 -5
- package/src/Outline/useScrollSpy.ts +8 -3
- package/src/OverflowList/OverflowList.doc.mjs +15 -0
- package/src/OverflowList/OverflowList.tsx +62 -26
- package/src/Pagination/Pagination.doc.mjs +12 -0
- package/src/Pagination/Pagination.tsx +40 -6
- package/src/Popover/Popover.doc.mjs +10 -0
- package/src/Popover/Popover.tsx +8 -4
- package/src/Popover/popoverAnchor.ts +47 -0
- package/src/Popover/usePopover.doc.mjs +16 -2
- package/src/Popover/usePopover.tsx +152 -16
- package/src/PowerSearch/PowerSearch.doc.mjs +8 -8
- package/src/PowerSearch/PowerSearch.tsx +65 -12
- package/src/PowerSearch/PowerSearchEditPopover.tsx +1 -0
- package/src/PowerSearch/PowerSearchFilterEditor.tsx +12 -0
- package/src/PowerSearch/PowerSearchToken.tsx +12 -0
- package/src/PowerSearch/PowerSearchValueEditor.tsx +14 -19
- package/src/ProgressBar/ProgressBar.doc.mjs +2 -2
- package/src/ProgressBar/ProgressBar.tsx +44 -30
- package/src/RadioList/RadioList.tsx +63 -0
- package/src/RadioList/RadioListItem.tsx +4 -1
- package/src/Resizable/ResizeHandle.tsx +2 -3
- package/src/Resizable/resizableModel.ts +105 -3
- package/src/Resizable/resizeGesture.ts +14 -0
- package/src/Resizable/useResizable.ts +14 -75
- package/src/SegmentedControl/SegmentedControlItem.tsx +1 -0
- package/src/SegmentedControl/useSegmentedTouchTracking.ts +76 -12
- package/src/Selector/Selector.doc.mjs +34 -7
- package/src/Selector/Selector.tsx +55 -25
- package/src/Selector/SelectorOption.doc.mjs +5 -5
- package/src/Selector/hooks.ts +92 -17
- package/src/Selector/useSelectorPresentation.ts +18 -3
- package/src/SideNav/SideNavHeading.tsx +15 -4
- package/src/SideNav/SideNavItem.doc.mjs +10 -10
- package/src/Slider/Slider.tsx +4 -1
- package/src/Spinner/Spinner.tsx +56 -41
- package/src/Stepper/Step.tsx +18 -3
- package/src/Stepper/Stepper.doc.mjs +14 -2
- package/src/Swipe/useSwipeAction.ts +3 -3
- package/src/Switch/Switch.doc.mjs +61 -5
- package/src/Switch/Switch.tsx +72 -35
- package/src/Switch/useSwitchTouch.ts +68 -3
- package/src/TabList/Tab.tsx +6 -0
- package/src/Table/BaseTable.tsx +73 -35
- package/src/Table/Table.doc.mjs +109 -5
- package/src/Table/Table.tsx +42 -17
- package/src/Table/TableBody.tsx +10 -1
- package/src/Table/TableCell.tsx +6 -0
- package/src/Table/TableHeaderCell.tsx +52 -7
- package/src/Table/TableRow.tsx +8 -1
- package/src/Table/TableRowPlacementContext.ts +58 -0
- package/src/Table/TableSelectionToolbar.tsx +12 -0
- package/src/Table/columnUtils.ts +9 -1
- package/src/Table/plugins/columnSettings/useTableColumnSettingsState.doc.mjs +1 -1
- package/src/Table/plugins/rowIndex/useTableRowIndex.tsx +1 -0
- package/src/Table/plugins/sortable/useTableSortable.tsx +15 -2
- package/src/Table/plugins/sortable/useTableSortableState.doc.mjs +5 -5
- package/src/Table/plugins/sortable/useTableSortableState.tsx +15 -8
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +8 -0
- package/src/Table/plugins/tree/useTableTreeData.tsx +2 -4
- package/src/Table/table.stylex.ts +44 -5
- package/src/Table/types.ts +3 -1
- package/src/Table/useTableColumnResize.doc.mjs +3 -3
- package/src/Table/useTableColumnSettings.doc.mjs +3 -3
- package/src/Table/useTableFilterState.doc.mjs +6 -3
- package/src/Table/useTableFiltering.doc.mjs +71 -4
- package/src/Table/useTableInfiniteScroll.doc.mjs +2 -2
- package/src/Table/useTablePagination.doc.mjs +24 -3
- package/src/Table/useTableSelection.doc.mjs +30 -6
- package/src/Table/useTableSelectionState.doc.mjs +30 -2
- package/src/Table/useTableSortable.doc.mjs +104 -17
- package/src/Table/useTableStickyColumns.doc.mjs +3 -3
- package/src/Text/Heading.doc.mjs +2 -2
- package/src/Text/Text.doc.mjs +1 -1
- package/src/Text/TruncationTooltip.tsx +18 -11
- package/src/Text/useTruncation.ts +20 -4
- package/src/TextArea/TextArea.doc.mjs +5 -5
- package/src/TextArea/TextArea.tsx +20 -1
- package/src/TextInput/TextInput.doc.mjs +5 -5
- package/src/TextInput/TextInput.tsx +23 -18
- package/src/Thumbnail/Thumbnail.tsx +2 -1
- package/src/Timer/Timer.tsx +21 -6
- package/src/Timestamp/Timestamp.tsx +67 -4
- package/src/Toast/Toast.doc.mjs +15 -5
- package/src/Toast/Toast.tsx +83 -62
- package/src/Toast/ToastViewport.tsx +62 -23
- package/src/Toast/types.ts +8 -0
- package/src/Toast/useToast.doc.mjs +80 -15
- package/src/Toast/useToast.tsx +18 -7
- package/src/ToggleButton/ToggleButton.doc.mjs +1 -1
- package/src/ToggleButton/ToggleButton.tsx +1 -0
- package/src/Token/Token.tsx +5 -1
- package/src/Tokenizer/Tokenizer.doc.mjs +15 -3
- package/src/Tokenizer/Tokenizer.tsx +130 -75
- package/src/Toolbar/Toolbar.tsx +55 -4
- package/src/Tooltip/useTooltip.tsx +26 -0
- package/src/TopNav/TopNav.doc.mjs +1 -1
- package/src/TopNav/TopNav.tsx +13 -3
- package/src/TopNav/TopNavHeading.tsx +22 -9
- package/src/TopNav/TopNavMegaMenu.tsx +4 -4
- package/src/TopNav/TopNavMenu.tsx +13 -0
- package/src/TopNav/TopNavRenderContext.ts +30 -9
- package/src/TreeList/TreeList.tsx +12 -0
- package/src/TreeList/TreeListItem.tsx +26 -5
- package/src/Typeahead/BaseTypeahead.doc.mjs +6 -0
- package/src/Typeahead/BaseTypeahead.tsx +2 -0
- package/src/Typeahead/Typeahead.doc.mjs +15 -2
- package/src/Typeahead/Typeahead.tsx +37 -13
- package/src/Typeahead/TypeaheadItem.tsx +12 -0
- package/src/gestures/GestureHost.ts +34 -0
- package/src/gestures/README.md +9 -6
- package/src/hooks/anchoredHint.tsx +1 -2
- package/src/hooks/computeOverflow.ts +10 -0
- package/src/hooks/focusableSelector.ts +59 -2
- package/src/hooks/scrollEdgeFade.ts +129 -0
- package/src/hooks/statusButtonPress.ts +26 -0
- package/src/hooks/useAnnounce.ts +2 -1
- package/src/hooks/useFocusTrap.ts +110 -141
- package/src/hooks/useGroupPressTracking.ts +1 -1
- package/src/hooks/useOverflow.ts +227 -13
- package/src/hooks/useResolvedRequired.ts +50 -1
- package/src/hooks/useTreeFocus.ts +8 -4
- package/src/hooks/useTypeahead.ts +12 -10
- package/src/i18n/InternationalizationContext.ts +16 -7
- package/src/i18n/InternationalizationProvider.doc.mjs +1 -1
- package/src/i18n/InternationalizationProvider.tsx +12 -0
- package/src/i18n/defaultTranslator.ts +25 -0
- package/src/i18n/firstStrongDirection.ts +54 -13
- package/src/i18n/generated-english/Chat/ChatPastedTextToken.generated.ts +1 -2
- package/src/i18n/generated-english/Chat/pastedTextLabel.generated.ts +13 -0
- package/src/i18n/generated-english/Chat/useTriggerMenu.generated.ts +1 -0
- package/src/i18n/generated-english/CodeBlock/CodeBlock.generated.ts +2 -1
- package/src/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.ts +2 -1
- package/src/i18n/generated-english/MultiSelector/MultiSelector.generated.ts +1 -0
- package/src/i18n/generated-english/Slider/Slider.generated.ts +2 -1
- package/src/i18n/generated-english/TextArea/TextArea.generated.ts +1 -0
- package/src/i18n/generated-english/TextInput/TextInput.generated.ts +1 -0
- package/src/i18n/generated-english/Timestamp/Timestamp.generated.ts +2 -1
- package/src/i18n/generated-english/Tokenizer/Tokenizer.generated.ts +1 -0
- package/src/i18n/generated-locales/en.generated.ts +11 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +11 -0
- package/src/i18n/publicContext.ts +4 -2
- package/src/i18n/translatingContext.ts +28 -0
- package/src/i18n/useComponentTranslator.ts +3 -2
- package/src/i18n/useListFormatter.ts +3 -2
- package/src/i18n/useTranslator.ts +3 -2
- package/src/internal/touch.ts +7 -0
- package/src/keyboard/README.md +58 -16
- package/src/keyboard/keyboardHeight.ts +138 -26
- package/src/keyboard/keyboardTarget.ts +667 -71
- package/src/keyboard/useMobileKeyboard.ts +1 -7
- package/src/palette/color.ts +205 -0
- package/src/palette/generator.ts +1134 -0
- package/src/palette/index.ts +35 -0
- package/src/palette/mapping.ts +1630 -0
- package/src/palette/themePalette.ts +175 -0
- package/src/palette/types.ts +194 -0
- package/src/privateAttributes/mediaDarkPage.ts +27 -0
- package/src/privateAttributes/pressGroupItem.stylex.ts +2 -1
- package/src/privateAttributes/scheme.ts +37 -0
- package/src/privateAttributes/travelling.stylex.ts +6 -4
- package/src/reset.css +1 -1
- package/src/theme/MediaDarkPage.tsx +41 -0
- package/src/theme/MediaTheme.tsx +8 -1
- package/src/theme/Theme.doc.mjs +4 -4
- package/src/theme/Theme.tsx +140 -35
- package/src/theme/defineTheme.ts +103 -40
- package/src/theme/derivedVarRegistry.ts +61 -4
- package/src/theme/expandRadiusScale.ts +1 -5
- package/src/theme/generateThemeRules.ts +398 -342
- package/src/theme/index.ts +2 -4
- package/src/theme/invertedSurfaceSide.ts +65 -0
- package/src/theme/resolveThemeValues.ts +8 -2
- package/src/theme/statusRoleDefaults.ts +330 -0
- package/src/theme/statusRoleDerivation.ts +2 -1
- package/src/theme/syntax/SyntaxTheme.tsx +12 -0
- package/src/theme/themeAdaptations.ts +53 -5
- package/src/theme/tokenDefaults.ts +44 -0
- package/src/theme/tokenValues.ts +193 -0
- package/src/theme/tokens.stylex.ts +7 -5
- package/src/theme/tokens.ts +14 -176
- package/src/theme/useTheme.ts +164 -35
- package/src/utils/devWarning.ts +24 -0
- package/src/utils/focusOutline.stylex.ts +7 -4
- package/src/utils/focusReturn.ts +578 -16
- package/src/utils/hitArea.ts +70 -33
- package/src/utils/inputStream.ts +81 -5
- package/src/utils/nodeType.ts +10 -0
- package/src/utils/timeFormat.ts +54 -4
- package/src/utils/touchPresentation.stylex.ts +7 -6
- package/src/utils/touchPresentation.ts +10 -7
- package/src/utils/touchQueries.ts +3 -2
- package/src/utils/typeaheadMatch.ts +20 -1
- package/src/virtualization/useInlineListWindow.ts +57 -33
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* @file inputStream.ts
|
|
5
5
|
* @input A window, and subscribers to its input events (the press feedback
|
|
6
|
-
* controller, the gesture host)
|
|
7
|
-
* @output subscribeInput
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
6
|
+
* controller, the gesture host, the keyboard module)
|
|
7
|
+
* @output subscribeInput. Its readers: getLastPointerType, the latest
|
|
8
|
+
* pointer's type; getLastMousePoint, the latest mouse point; getDownPresses,
|
|
9
|
+
* each finger and pen press that is down; getTouches, the fingers on the
|
|
10
|
+
* screen and how many touches started.
|
|
11
11
|
* @position The one entry for document-wide input listeners in core: one
|
|
12
12
|
* native listener per event type on the window's capture phase, shared by
|
|
13
13
|
* every subscriber
|
|
@@ -61,6 +61,20 @@ const {
|
|
|
61
61
|
} = inputState;
|
|
62
62
|
const NO_PRESSES = new Map();
|
|
63
63
|
|
|
64
|
+
/** The fingers on a window's screen, and the touches that started there. */
|
|
65
|
+
|
|
66
|
+
const NO_TOUCHES = {
|
|
67
|
+
fingers: 0,
|
|
68
|
+
starts: 0
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* How many fingers are on each window's screen, and how many touches have
|
|
73
|
+
* started, from its touch events. Its own key keeps the stream's first state
|
|
74
|
+
* readable by copies built before it.
|
|
75
|
+
*/
|
|
76
|
+
const touchRecords = realmValue(sharedKey('input-stream/touches', 1), () => new WeakMap());
|
|
77
|
+
|
|
64
78
|
/** A point in the viewport, in CSS pixels. */
|
|
65
79
|
|
|
66
80
|
/**
|
|
@@ -93,6 +107,26 @@ export function getDownPresses(view) {
|
|
|
93
107
|
return downPresses.get(view) ?? NO_PRESSES;
|
|
94
108
|
}
|
|
95
109
|
|
|
110
|
+
/**
|
|
111
|
+
* The fingers on `view`'s screen and the touches that started there, from the
|
|
112
|
+
* touch events its stream delivered. A native pan keeps the finger on the
|
|
113
|
+
* screen, though the pan's `pointercancel` drops its press from
|
|
114
|
+
* getDownPresses. The stream counts only while subscribers listen to
|
|
115
|
+
* `touchstart`, `touchend` and `touchcancel`, as the keyboard module does.
|
|
116
|
+
* Reading it adds no listener. It counts a stylus too, since a stylus drag
|
|
117
|
+
* moves the page as a finger does. The gesture host's own count skips a
|
|
118
|
+
* stylus, and it listens only while a recognizer needs input, so it cannot
|
|
119
|
+
* serve here.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```
|
|
123
|
+
* const isFingerDown = getTouches(window).fingers > 0;
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
export function getTouches(view) {
|
|
127
|
+
return touchRecords.get(view) ?? NO_TOUCHES;
|
|
128
|
+
}
|
|
129
|
+
|
|
96
130
|
/**
|
|
97
131
|
* Listen to `type` on `view`'s capture phase through its shared native
|
|
98
132
|
* listener. Returns the unsubscribe; calling it again does nothing.
|
|
@@ -148,6 +182,9 @@ export function subscribeInput(view, type, listener, {
|
|
|
148
182
|
if (type === 'pointerup' || type === 'pointercancel') {
|
|
149
183
|
downPresses.delete(view);
|
|
150
184
|
}
|
|
185
|
+
if (type === 'touchend' || type === 'touchcancel') {
|
|
186
|
+
forgetFingers(view);
|
|
187
|
+
}
|
|
151
188
|
}
|
|
152
189
|
};
|
|
153
190
|
}
|
|
@@ -200,6 +237,9 @@ function dispatch(view, channel, event) {
|
|
|
200
237
|
if (pointerType === 'touch' || pointerType === 'pen') {
|
|
201
238
|
recordPress(view, event);
|
|
202
239
|
}
|
|
240
|
+
if (event.type === 'touchstart' || event.type === 'touchend' || event.type === 'touchcancel') {
|
|
241
|
+
recordTouches(view, event);
|
|
242
|
+
}
|
|
203
243
|
// A subscriber may subscribe or unsubscribe while the event runs; the
|
|
204
244
|
// event goes to those subscribed when it arrived.
|
|
205
245
|
for (const subscriber of [...channel.subscribers]) {
|
|
@@ -215,6 +255,33 @@ function dispatch(view, channel, event) {
|
|
|
215
255
|
}
|
|
216
256
|
}
|
|
217
257
|
}
|
|
258
|
+
|
|
259
|
+
// The count stays only while both ends are heard: a missed `touchend` would
|
|
260
|
+
// otherwise leave a finger on the screen.
|
|
261
|
+
function recordTouches(view, event) {
|
|
262
|
+
const channels = streams.get(view);
|
|
263
|
+
if (channels?.has('touchend') !== true || !channels.has('touchcancel')) {
|
|
264
|
+
forgetFingers(view);
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
const {
|
|
268
|
+
touches
|
|
269
|
+
} = event;
|
|
270
|
+
const starts = touchRecords.get(view)?.starts ?? 0;
|
|
271
|
+
touchRecords.set(view, {
|
|
272
|
+
fingers: touches?.length ?? 0,
|
|
273
|
+
starts: event.type === 'touchstart' ? starts + 1 : starts
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
function forgetFingers(view) {
|
|
277
|
+
const record = touchRecords.get(view);
|
|
278
|
+
if (record != null) {
|
|
279
|
+
touchRecords.set(view, {
|
|
280
|
+
fingers: 0,
|
|
281
|
+
starts: record.starts
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
}
|
|
218
285
|
function recordPress(view, event) {
|
|
219
286
|
const {
|
|
220
287
|
pointerId,
|
package/dist/utils/nodeType.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ export declare function isShadowRoot(value: unknown): value is ShadowRoot;
|
|
|
27
27
|
export declare function isHTMLElement(value: unknown): value is HTMLElement;
|
|
28
28
|
/** Whether `element` is shown as a popover (`:popover-open`). */
|
|
29
29
|
export declare function isShownAsPopover(element: Element): boolean;
|
|
30
|
+
/** Whether `element` is a modal dialog: open with `showModal()`. */
|
|
31
|
+
export declare function isModalDialog(element: Element): boolean;
|
|
30
32
|
/**
|
|
31
33
|
* Whether `dialog` is in the top layer: open, or shown as a popover. A
|
|
32
34
|
* non-modal Drawer is shown with `showPopover()` and never sets `open`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeType.d.ts","sourceRoot":"","sources":["../../src/utils/nodeType.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH,sEAAsE;AACtE,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,IAAI,CAMpD;AAED,sEAAsE;AACtE,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,OAAO,CAE1D;AAED,sEAAsE;AACtE,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CAE5D;AAED,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAIlE;AAED,iEAAiE;AACjE,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAO1D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAEhE;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAEzE"}
|
|
1
|
+
{"version":3,"file":"nodeType.d.ts","sourceRoot":"","sources":["../../src/utils/nodeType.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH,sEAAsE;AACtE,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,IAAI,CAMpD;AAED,sEAAsE;AACtE,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,OAAO,CAE1D;AAED,sEAAsE;AACtE,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CAE5D;AAED,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAIlE;AAED,iEAAiE;AACjE,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAO1D;AAED,oEAAoE;AACpE,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAOvD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAEhE;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAEzE"}
|
package/dist/utils/nodeType.js
CHANGED
|
@@ -53,6 +53,16 @@ export function isShownAsPopover(element) {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
/** Whether `element` is a modal dialog: open with `showModal()`. */
|
|
57
|
+
export function isModalDialog(element) {
|
|
58
|
+
try {
|
|
59
|
+
return element.tagName === 'DIALOG' && element.matches(':modal');
|
|
60
|
+
} catch {
|
|
61
|
+
// An engine without `:modal` reports no modal dialog.
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
56
66
|
/**
|
|
57
67
|
* Whether `dialog` is in the top layer: open, or shown as a popover. A
|
|
58
68
|
* non-modal Drawer is shown with `showPopover()` and never sets `open`.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file timeFormat.ts
|
|
3
3
|
* @input An ISO time or typed text, plus the provider's BCP 47 locale
|
|
4
|
-
* @output Exports resolveHourFormat, formatLocaleTime, parseLocaleTime,
|
|
5
|
-
* isLocaleTimeComplete
|
|
6
|
-
* @position Internal shared helper for TimeInput and
|
|
7
|
-
* of the public surface
|
|
4
|
+
* @output Exports resolveHourFormat, formatLocaleTime, parseLocaleTime,
|
|
5
|
+
* isLocaleTimeComplete, and formatElapsedDuration
|
|
6
|
+
* @position Internal shared helper for TimeInput, DateTimeInput, and Timer;
|
|
7
|
+
* not part of the public surface
|
|
8
8
|
*
|
|
9
9
|
* The hour cycle, digits, separator and day-period words come from Intl, so a
|
|
10
10
|
* field reads like `Timestamp`. A `-u-hc-` extension on the provider locale
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* - /packages/core/src/utils/timeFormat.test.ts
|
|
17
17
|
* - /packages/core/src/TimeInput/TimeInput.tsx
|
|
18
18
|
* - /packages/core/src/DateTimeInput/DateTimeInput.tsx
|
|
19
|
+
* - /packages/core/src/Timer/Timer.tsx
|
|
19
20
|
*/
|
|
20
21
|
import type { Locale } from '../i18n/types.js';
|
|
21
22
|
import { type ISOTimeString } from './timeParser.js';
|
|
@@ -44,4 +45,13 @@ export declare function parseLocaleTime(input: string, locale: Locale, includeSe
|
|
|
44
45
|
* Text that holds every part can still name no time ("25:99").
|
|
45
46
|
*/
|
|
46
47
|
export declare function isLocaleTimeComplete(input: string, locale: Locale, hourFormat: HourFormat, includeSeconds?: boolean): boolean;
|
|
48
|
+
export type ElapsedDurationUnit = 'hour' | 'minute' | 'second';
|
|
49
|
+
/**
|
|
50
|
+
* Formats a compact elapsed duration as the locale writes it, from its parts,
|
|
51
|
+
* largest unit first. Each part after the first has two digits.
|
|
52
|
+
* en: [["minute", 2], ["second", 8]] → "2m 08s"; [["hour", 1], ["minute", 2]]
|
|
53
|
+
* → "1h 02m"; [["second", 34]] → "34s". Unit names, digits and joining come
|
|
54
|
+
* from Intl, so no catalog string is involved.
|
|
55
|
+
*/
|
|
56
|
+
export declare function formatElapsedDuration(locale: Locale, parts: ReadonlyArray<readonly [ElapsedDurationUnit, number]>): string;
|
|
47
57
|
//# sourceMappingURL=timeFormat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeFormat.d.ts","sourceRoot":"","sources":["../../src/utils/timeFormat.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"timeFormat.d.ts","sourceRoot":"","sources":["../../src/utils/timeFormat.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAA+B,KAAK,aAAa,EAAC,MAAM,cAAc,CAAC;AAG9E,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,KAAK,CAAC;AAsLvC;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,UAAU,GACtB,UAAU,CAEZ;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,aAAa,GAAG,SAAS,EAC/B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,cAAc,GAAE,OAAe,GAC9B,MAAM,CAeR;AA4DD;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,cAAc,GAAE,OAAe,GAC9B,aAAa,GAAG,IAAI,CAGtB;AAOD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,cAAc,GAAE,OAAe,GAC9B,OAAO,CAgBT;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AA0B/D;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,aAAa,CAAC,SAAS,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC,GAC3D,MAAM,CAWR"}
|
package/dist/utils/timeFormat.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* @file timeFormat.ts
|
|
5
5
|
* @input An ISO time or typed text, plus the provider's BCP 47 locale
|
|
6
|
-
* @output Exports resolveHourFormat, formatLocaleTime, parseLocaleTime,
|
|
7
|
-
* isLocaleTimeComplete
|
|
8
|
-
* @position Internal shared helper for TimeInput and
|
|
9
|
-
* of the public surface
|
|
6
|
+
* @output Exports resolveHourFormat, formatLocaleTime, parseLocaleTime,
|
|
7
|
+
* isLocaleTimeComplete, and formatElapsedDuration
|
|
8
|
+
* @position Internal shared helper for TimeInput, DateTimeInput, and Timer;
|
|
9
|
+
* not part of the public surface
|
|
10
10
|
*
|
|
11
11
|
* The hour cycle, digits, separator and day-period words come from Intl, so a
|
|
12
12
|
* field reads like `Timestamp`. A `-u-hc-` extension on the provider locale
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
* - /packages/core/src/utils/timeFormat.test.ts
|
|
19
19
|
* - /packages/core/src/TimeInput/TimeInput.tsx
|
|
20
20
|
* - /packages/core/src/DateTimeInput/DateTimeInput.tsx
|
|
21
|
+
* - /packages/core/src/Timer/Timer.tsx
|
|
21
22
|
*/
|
|
22
23
|
|
|
23
24
|
import { parseISOTime, parseTimeInput } from "./timeParser.js";
|
|
@@ -269,4 +270,41 @@ export function isLocaleTimeComplete(input, locale, hourFormat, includeSeconds =
|
|
|
269
270
|
}
|
|
270
271
|
const hour = Number(parts[1]);
|
|
271
272
|
return hour === 0 || hour >= 13 && hour <= 23;
|
|
273
|
+
}
|
|
274
|
+
const unitFormats = new Map();
|
|
275
|
+
const unitLists = new Map();
|
|
276
|
+
function unitFormat(locale, unit, isPadded) {
|
|
277
|
+
const key = `${locale}|${unit}|${String(isPadded)}`;
|
|
278
|
+
let format = unitFormats.get(key);
|
|
279
|
+
if (format == null) {
|
|
280
|
+
format = new Intl.NumberFormat(locale, {
|
|
281
|
+
style: 'unit',
|
|
282
|
+
unit,
|
|
283
|
+
unitDisplay: 'narrow',
|
|
284
|
+
minimumIntegerDigits: isPadded ? 2 : 1,
|
|
285
|
+
// A count is never grouped: 1000 hours reads "1000h".
|
|
286
|
+
useGrouping: false
|
|
287
|
+
});
|
|
288
|
+
unitFormats.set(key, format);
|
|
289
|
+
}
|
|
290
|
+
return format;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Formats a compact elapsed duration as the locale writes it, from its parts,
|
|
295
|
+
* largest unit first. Each part after the first has two digits.
|
|
296
|
+
* en: [["minute", 2], ["second", 8]] → "2m 08s"; [["hour", 1], ["minute", 2]]
|
|
297
|
+
* → "1h 02m"; [["second", 34]] → "34s". Unit names, digits and joining come
|
|
298
|
+
* from Intl, so no catalog string is involved.
|
|
299
|
+
*/
|
|
300
|
+
export function formatElapsedDuration(locale, parts) {
|
|
301
|
+
let list = unitLists.get(locale);
|
|
302
|
+
if (list == null) {
|
|
303
|
+
list = new Intl.ListFormat(locale, {
|
|
304
|
+
type: 'unit',
|
|
305
|
+
style: 'narrow'
|
|
306
|
+
});
|
|
307
|
+
unitLists.set(locale, list);
|
|
308
|
+
}
|
|
309
|
+
return list.format(parts.map(([unit, value], index) => unitFormat(locale, unit, index > 0).format(value)));
|
|
272
310
|
}
|
|
@@ -3,8 +3,8 @@ import { IOS_SUPPORTS_QUERY, TOUCH_QUERY } from './touchQueries.js';
|
|
|
3
3
|
export { TOUCH_QUERY };
|
|
4
4
|
/**
|
|
5
5
|
* The viewport is compact at the default width points: layout behaviours.
|
|
6
|
-
* A StyleX
|
|
7
|
-
*
|
|
6
|
+
* A StyleX key, which cannot read the theme, spells the same condition as
|
|
7
|
+
* `touchKeys.compact`; behaviour reads the active theme's definition
|
|
8
8
|
* (useCompactDefinition), so a theme that moves `md` moves compact with it.
|
|
9
9
|
*/
|
|
10
10
|
export declare const COMPACT_QUERY: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"touchPresentation.d.ts","sourceRoot":"","sources":["../../src/utils/touchPresentation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"touchPresentation.d.ts","sourceRoot":"","sources":["../../src/utils/touchPresentation.ts"],"names":[],"mappings":"AA6CA,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAC,kBAAkB,EAAE,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAI/D,OAAO,EAAC,WAAW,EAAC,CAAC;AAErB;;;;;GAKG;AACH,eAAO,MAAM,aAAa,QAAmC,CAAC;AAE9D,wEAAwE;AACxE,eAAO,MAAM,mBAAmB,QACe,CAAC;AAIhD,OAAO,EAAC,kBAAkB,EAAC,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,oBAAoB,kFAGvB,CAAC;AAEX,MAAM,WAAW,iBAAiB;IAChC,gDAAgD;IAChD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,+BAA+B;IAC/B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,iBAAiB,CAOxD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,aAAa,GAAE,OAAO,CAAC,iBAAiB,CAAM,GAC7C,iBAAiB,CAQnB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,OAAO,EAAE,iBAAiB,GACzB,iBAAiB,CAOnB"}
|
|
@@ -23,9 +23,12 @@
|
|
|
23
23
|
// compact by its height.
|
|
24
24
|
// - A presentation that needs both asks for both. No platform is chosen.
|
|
25
25
|
//
|
|
26
|
-
// A style that changes with these conditions uses the same
|
|
27
|
-
// media key, so the right rule paints before hydration.
|
|
28
|
-
//
|
|
26
|
+
// A style that changes with these conditions uses the same condition as a
|
|
27
|
+
// StyleX media key, so the right rule paints before hydration. Touch uses
|
|
28
|
+
// TOUCH_QUERY as written. Compact uses `touchKeys.compact`, not the range
|
|
29
|
+
// query: StyleX rewrites a range query to a length that matches at the edge.
|
|
30
|
+
// Compact touch nests the compact key inside the touch key. The iOS gate is
|
|
31
|
+
// two nested keys, the media query outside and the supports query inside:
|
|
29
32
|
//
|
|
30
33
|
// '@media (pointer: coarse)': {
|
|
31
34
|
// '@supports (-webkit-touch-callout: none)': value,
|
|
@@ -34,8 +37,8 @@
|
|
|
34
37
|
// One combined `@supports` never matches, because `pointer` is not a
|
|
35
38
|
// property. The iOS gate is only for a style that iOS WebKit requires (the
|
|
36
39
|
// 16px input floor). Core spells the keys literally, because an imported
|
|
37
|
-
// `defineConsts` key gets a different StyleX priority. Tests
|
|
38
|
-
// literals
|
|
40
|
+
// `defineConsts` key gets a different StyleX priority. Tests pin the
|
|
41
|
+
// literals to `touchKeys`. The hook answers the
|
|
39
42
|
// server default until hydrated, unless the caller passes a hint.
|
|
40
43
|
import { useMemo } from 'react';
|
|
41
44
|
import { useMediaQuery } from "../hooks/useMediaQuery.js";
|
|
@@ -49,8 +52,8 @@ export { TOUCH_QUERY };
|
|
|
49
52
|
|
|
50
53
|
/**
|
|
51
54
|
* The viewport is compact at the default width points: layout behaviours.
|
|
52
|
-
* A StyleX
|
|
53
|
-
*
|
|
55
|
+
* A StyleX key, which cannot read the theme, spells the same condition as
|
|
56
|
+
* `touchKeys.compact`; behaviour reads the active theme's definition
|
|
54
57
|
* (useCompactDefinition), so a theme that moves `md` moves compact with it.
|
|
55
58
|
*/
|
|
56
59
|
export const COMPACT_QUERY = DEFAULT_COMPACT_DEFINITION.query;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export declare const touchKeys: {
|
|
2
2
|
/** The primary pointer is coarse (TOUCH_QUERY). */
|
|
3
3
|
touch: string;
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* The viewport is compact: COMPACT_QUERY as a StyleX key (belowStyleKey).
|
|
6
|
+
* For compact and touch, nest this key inside `touch`.
|
|
7
|
+
*/
|
|
5
8
|
compact: string;
|
|
6
|
-
/** Both: a presentation such as a sheet in place of a popover. */
|
|
7
|
-
compactTouch: string;
|
|
8
9
|
/**
|
|
9
10
|
* The iOS WebKit gate, inside `touch` (IOS_SUPPORTS_QUERY): only for a
|
|
10
11
|
* style iOS WebKit itself requires (the 16px input floor), never a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"touchPresentation.stylex.d.ts","sourceRoot":"","sources":["../../src/utils/touchPresentation.stylex.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"touchPresentation.stylex.d.ts","sourceRoot":"","sources":["../../src/utils/touchPresentation.stylex.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,SAAS;IACpB,mDAAmD;;IAEnD;;;OAGG;;IAEH;;;;OAIG;;CAEH,CAAC"}
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* @output Exports touchKeys: the touch presentation resolver's queries as
|
|
7
7
|
* StyleX at-rule keys
|
|
8
8
|
* @position The reference spellings of the touch, compact and iOS-gate
|
|
9
|
-
* conditions. utils/touchPresentation.ts holds the same
|
|
9
|
+
* conditions. utils/touchPresentation.ts holds the same conditions for
|
|
10
|
+
* script; theme/themeAdaptations.ts spells the compact key.
|
|
10
11
|
*
|
|
11
12
|
* SYNC: When modified, update touchPresentation.ts and
|
|
12
13
|
* touchPresentation.test.ts.
|
|
@@ -21,7 +22,6 @@
|
|
|
21
22
|
import * as stylex from '@stylexjs/stylex';
|
|
22
23
|
export const touchKeys = {
|
|
23
24
|
touch: "@media (pointer: coarse)",
|
|
24
|
-
compact: "@media (width
|
|
25
|
-
compactTouch: "@media (width < 768px) and (pointer: coarse), (height < 500px) and (pointer: coarse)",
|
|
25
|
+
compact: "@media (not ((min-width: 768px) and (min-height: 500px)))",
|
|
26
26
|
iosSupports: "@supports (-webkit-touch-callout: none)"
|
|
27
27
|
};
|
|
@@ -20,8 +20,9 @@ export declare const IOS_SUPPORTS_QUERY = "(-webkit-touch-callout: none)";
|
|
|
20
20
|
/**
|
|
21
21
|
* Whether `view`'s engine is iOS WebKit, by IOS_SUPPORTS_QUERY. Only for an
|
|
22
22
|
* engine workaround a record names (`spec:AST-013` FR6): the selection
|
|
23
|
-
* lock's inline style, and the gesture host's presented hit testing.
|
|
24
|
-
*
|
|
23
|
+
* lock's inline style, and the gesture host's presented hit testing. The
|
|
24
|
+
* keyboard's rise and its scroll back from the blur read it too. False where
|
|
25
|
+
* `CSS.supports` is missing (jsdom has `CSS.escape` only).
|
|
25
26
|
*/
|
|
26
27
|
export declare function isIosWebKit(view?: {
|
|
27
28
|
CSS?: Partial<Pick<typeof CSS, 'supports'>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"touchQueries.d.ts","sourceRoot":"","sources":["../../src/utils/touchQueries.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,uDAAuD;AACvD,eAAO,MAAM,WAAW,sBAAsB,CAAC;AAE/C;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,kCAAkC,CAAC;AAElE
|
|
1
|
+
{"version":3,"file":"touchQueries.d.ts","sourceRoot":"","sources":["../../src/utils/touchQueries.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,uDAAuD;AACvD,eAAO,MAAM,WAAW,sBAAsB,CAAC;AAE/C;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,kCAAkC,CAAC;AAElE;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,IAAI,GACA;IAAC,GAAG,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO,GAAG,EAAE,UAAU,CAAC,CAAC,CAAA;CAAC,GAC7C,IAAI,GACJ,SAAsB,GACzB,OAAO,CAET"}
|
|
@@ -25,8 +25,9 @@ export const IOS_SUPPORTS_QUERY = '(-webkit-touch-callout: none)';
|
|
|
25
25
|
/**
|
|
26
26
|
* Whether `view`'s engine is iOS WebKit, by IOS_SUPPORTS_QUERY. Only for an
|
|
27
27
|
* engine workaround a record names (`spec:AST-013` FR6): the selection
|
|
28
|
-
* lock's inline style, and the gesture host's presented hit testing.
|
|
29
|
-
*
|
|
28
|
+
* lock's inline style, and the gesture host's presented hit testing. The
|
|
29
|
+
* keyboard's rise and its scroll back from the blur read it too. False where
|
|
30
|
+
* `CSS.supports` is missing (jsdom has `CSS.escape` only).
|
|
30
31
|
*/
|
|
31
32
|
export function isIosWebKit(view = globalThis) {
|
|
32
33
|
return view?.CSS?.supports?.(IOS_SUPPORTS_QUERY) === true;
|
|
@@ -21,4 +21,17 @@ export declare function typeaheadPrefixMatch(label: string, typed: string, exact
|
|
|
21
21
|
* İ, an exact match anywhere in the order wins over a folded one.
|
|
22
22
|
*/
|
|
23
23
|
export declare function findTypeaheadMatch(order: ReadonlyArray<number>, getLabel: (index: number) => string | null | undefined, typed: string): number;
|
|
24
|
+
/** The modifier state a key event reports, as the DOM and React both expose it. */
|
|
25
|
+
interface ModifierKeyEvent {
|
|
26
|
+
readonly ctrlKey: boolean;
|
|
27
|
+
readonly metaKey: boolean;
|
|
28
|
+
getModifierState?(key: string): boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Whether a key is a Control or Command shortcut, not a typed character.
|
|
32
|
+
* AltGr on Windows reports Control too, with the AltGraph modifier set; the
|
|
33
|
+
* key it gives is a letter the person typed, such as ł.
|
|
34
|
+
*/
|
|
35
|
+
export declare function isShortcutChord(e: ModifierKeyEvent): boolean;
|
|
36
|
+
export {};
|
|
24
37
|
//# sourceMappingURL=typeaheadMatch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeaheadMatch.d.ts","sourceRoot":"","sources":["../../src/utils/typeaheadMatch.ts"],"names":[],"mappings":"AAwCA;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAWrD;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,GACV,MAAM,GAAG,IAAI,CAYf;AAsBD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,KAAK,UAAQ,GACZ,OAAO,CAWT;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,EAC5B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,EACtD,KAAK,EAAE,MAAM,GACZ,MAAM,CAWR"}
|
|
1
|
+
{"version":3,"file":"typeaheadMatch.d.ts","sourceRoot":"","sources":["../../src/utils/typeaheadMatch.ts"],"names":[],"mappings":"AAwCA;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAWrD;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,GACV,MAAM,GAAG,IAAI,CAYf;AAsBD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,KAAK,UAAQ,GACZ,OAAO,CAWT;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,EAC5B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,EACtD,KAAK,EAAE,MAAM,GACZ,MAAM,CAWR;AAED,mFAAmF;AACnF,UAAU,gBAAgB;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACzC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAK5D"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @file typeaheadMatch.ts
|
|
5
5
|
* @input Plain strings (an item label and the letters a person typed)
|
|
6
6
|
* @output foldForTypeahead, nextTypeaheadBuffer, typeaheadPrefixMatch,
|
|
7
|
-
* findTypeaheadMatch
|
|
7
|
+
* findTypeaheadMatch, isShortcutChord
|
|
8
8
|
* @position Shared type-to-select matching for useTypeahead, useTreeFocus and
|
|
9
9
|
* MultiSelector
|
|
10
10
|
*
|
|
@@ -110,4 +110,18 @@ export function findTypeaheadMatch(order, getLabel, typed) {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
return -1;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** The modifier state a key event reports, as the DOM and React both expose it. */
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Whether a key is a Control or Command shortcut, not a typed character.
|
|
119
|
+
* AltGr on Windows reports Control too, with the AltGraph modifier set; the
|
|
120
|
+
* key it gives is a letter the person typed, such as ł.
|
|
121
|
+
*/
|
|
122
|
+
export function isShortcutChord(e) {
|
|
123
|
+
if (e.metaKey) {
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
return e.ctrlKey && e.getModifierState?.('AltGraph') !== true;
|
|
113
127
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInlineListWindow.d.ts","sourceRoot":"","sources":["../../src/virtualization/useInlineListWindow.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AACH,OAAO,EAA0C,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAE9E,OAAO,EAKL,KAAK,iBAAiB,EACvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAqB,KAAK,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAE5E,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,OAAO,CAAC;IACpB,kCAAkC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,8BAA8B;IAC7C,mFAAmF;IACnF,eAAe,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;IACtD,WAAW,EAAE,MAAM,wBAAwB,CAAC;IAC5C,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;CACnD;AAED,MAAM,WAAW,0BAA0B;IACzC,8EAA8E;IAC9E,IAAI,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IACnC,gFAAgF;IAChF,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/B,wFAAwF;IACxF,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,yDAAyD;IACzD,QAAQ,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,8BAA8B,CAAC;IACzC,0EAA0E;IAC1E,QAAQ,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACxC,sEAAsE;IACtE,cAAc,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,sBAAsB;IACrC,mDAAmD;IACnD,UAAU,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,aAAa,EAAE,WAAW,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC;IACrE,2EAA2E;IAC3E,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;
|
|
1
|
+
{"version":3,"file":"useInlineListWindow.d.ts","sourceRoot":"","sources":["../../src/virtualization/useInlineListWindow.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AACH,OAAO,EAA0C,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAE9E,OAAO,EAKL,KAAK,iBAAiB,EACvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAqB,KAAK,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAE5E,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,OAAO,CAAC;IACpB,kCAAkC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,8BAA8B;IAC7C,mFAAmF;IACnF,eAAe,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;IACtD,WAAW,EAAE,MAAM,wBAAwB,CAAC;IAC5C,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;CACnD;AAED,MAAM,WAAW,0BAA0B;IACzC,8EAA8E;IAC9E,IAAI,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IACnC,gFAAgF;IAChF,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/B,wFAAwF;IACxF,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,yDAAyD;IACzD,QAAQ,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,8BAA8B,CAAC;IACzC,0EAA0E;IAC1E,QAAQ,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACxC,sEAAsE;IACtE,cAAc,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,sBAAsB;IACrC,mDAAmD;IACnD,UAAU,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,aAAa,EAAE,WAAW,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC;IACrE,2EAA2E;IAC3E,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAsCD,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,OAAO,EACP,UAAU,EACV,QAAQ,EACR,oBAAoB,EACpB,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,cAAc,GACf,EAAE,0BAA0B,GAAG,sBAAsB,CA+JrD"}
|
|
@@ -18,6 +18,10 @@ import { useMemo, useState, useSyncExternalStore } from 'react';
|
|
|
18
18
|
import { useIsomorphicLayoutEffect } from "../hooks/useIsomorphicLayoutEffect.js";
|
|
19
19
|
import { calculateVariableListRange, createListWindowSegments, isPositiveFinite, reconcileListAnchor } from "./listWindow.js";
|
|
20
20
|
import { useListFocusIsland } from "./useListFocusIsland.js";
|
|
21
|
+
|
|
22
|
+
// The items the window last planned for, and an anchor scroll still to land.
|
|
23
|
+
// A scroll changes none of it, so a scroll sets no state.
|
|
24
|
+
|
|
21
25
|
const UNMEASURED = Object.freeze({
|
|
22
26
|
isMeasured: false
|
|
23
27
|
});
|
|
@@ -68,19 +72,33 @@ export function useInlineListWindow({
|
|
|
68
72
|
// so a caller that rebuilds its items on each render gets no scroll write.
|
|
69
73
|
const last = tracking;
|
|
70
74
|
const hasItemChange = last !== undefined && (!hasSameValues(last.keys, keys) || !hasSameValues(last.offsets, offsets));
|
|
71
|
-
const anchorScroll = canWindow && isMeasured && last !== undefined && hasItemChange ? reconcileListAnchor({
|
|
72
|
-
previousKeys: last.keys,
|
|
73
|
-
keys,
|
|
74
|
-
keyIndices,
|
|
75
|
-
firstVisibleIndex: last.firstVisibleIndex,
|
|
76
|
-
offset: last.fraction,
|
|
77
|
-
offsets,
|
|
78
|
-
rowHeight: 0,
|
|
79
|
-
viewportHeight: viewportSize,
|
|
80
|
-
startOffset: 0
|
|
81
|
-
}) : undefined;
|
|
82
75
|
const pending = tracking?.pending;
|
|
83
76
|
const isAwaitingAnchor = tracking?.source === geometry && pending !== undefined && pending.snapshot.scrollLeft === snapshot.scrollLeft && (pending.to !== snapshot.scrollLeft || pending.snapshot === snapshot);
|
|
77
|
+
// The first visible item before the change, read from the previous items
|
|
78
|
+
// at the scroll position the window shows.
|
|
79
|
+
const previousRange = canWindow && isMeasured && last !== undefined && hasItemChange ? calculateVariableListRange({
|
|
80
|
+
offsets: last.offsets,
|
|
81
|
+
// The previous items showed between the previous insets.
|
|
82
|
+
viewportSize: viewportSize + insetStart + insetEnd - last.insetStart - last.insetEnd,
|
|
83
|
+
scrollOffset: isAwaitingAnchor ? pending.to : snapshot.scrollLeft ?? 0,
|
|
84
|
+
isMeasured,
|
|
85
|
+
overscan
|
|
86
|
+
}) : undefined;
|
|
87
|
+
let anchorScroll;
|
|
88
|
+
if (previousRange !== undefined && last !== undefined) {
|
|
89
|
+
const firstSize = last.offsets[previousRange.firstVisibleIndex + 1] - last.offsets[previousRange.firstVisibleIndex];
|
|
90
|
+
anchorScroll = reconcileListAnchor({
|
|
91
|
+
previousKeys: last.keys,
|
|
92
|
+
keys,
|
|
93
|
+
keyIndices,
|
|
94
|
+
firstVisibleIndex: previousRange.firstVisibleIndex,
|
|
95
|
+
offset: firstSize > 0 ? previousRange.offset / firstSize : 0,
|
|
96
|
+
offsets,
|
|
97
|
+
rowHeight: 0,
|
|
98
|
+
viewportHeight: viewportSize,
|
|
99
|
+
startOffset: 0
|
|
100
|
+
});
|
|
101
|
+
}
|
|
84
102
|
const pendingScroll = anchorScroll ?? (isAwaitingAnchor ? pending.to : undefined);
|
|
85
103
|
const range = canWindow ? calculateVariableListRange({
|
|
86
104
|
offsets,
|
|
@@ -89,22 +107,20 @@ export function useInlineListWindow({
|
|
|
89
107
|
isMeasured,
|
|
90
108
|
overscan
|
|
91
109
|
}) : undefined;
|
|
92
|
-
// The
|
|
93
|
-
// limit this update to one extra render.
|
|
110
|
+
// The planned items feed the anchor, so they live in state.
|
|
94
111
|
if (range !== undefined && isMeasured) {
|
|
95
|
-
|
|
96
|
-
|
|
112
|
+
const nextPending = anchorScroll !== undefined ? {
|
|
113
|
+
snapshot,
|
|
114
|
+
to: anchorScroll
|
|
115
|
+
} : isAwaitingAnchor ? pending : undefined;
|
|
116
|
+
if (tracking === undefined || tracking.source !== geometry || hasItemChange || tracking.insetStart !== insetStart || tracking.insetEnd !== insetEnd || tracking.pending !== nextPending) {
|
|
97
117
|
setTracking({
|
|
98
118
|
source: geometry,
|
|
99
|
-
snapshot,
|
|
100
119
|
keys,
|
|
101
120
|
offsets,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
pending:
|
|
105
|
-
snapshot,
|
|
106
|
-
to: anchorScroll
|
|
107
|
-
} : isAwaitingAnchor ? pending : undefined
|
|
121
|
+
insetStart,
|
|
122
|
+
insetEnd,
|
|
123
|
+
pending: nextPending
|
|
108
124
|
});
|
|
109
125
|
}
|
|
110
126
|
} else if (tracking !== undefined && !canWindow) {
|
package/locales/en.json
CHANGED
|
@@ -831,6 +831,10 @@
|
|
|
831
831
|
"defaultMessage": "Link copied",
|
|
832
832
|
"description": "Accessible name on the Markdown heading copy button and text announced to a polite live region for ~1.5s after a successful copy. Sentence meaning \"Link copied\"; pairs with `markdownHeadingLinks.copy`."
|
|
833
833
|
},
|
|
834
|
+
"@astryx.markdownHeadingLinks.copyFailed": {
|
|
835
|
+
"defaultMessage": "Failed to copy value to clipboard.",
|
|
836
|
+
"description": "Accessible name on the Markdown heading copy button and text announced once to the assertive live region after the clipboard write fails; the name shows for ~1.5s. Pairs with `markdownHeadingLinks.copy` and `markdownHeadingLinks.copied`."
|
|
837
|
+
},
|
|
834
838
|
"@astryx.markdownHeadingLinks.copy": {
|
|
835
839
|
"defaultMessage": "Copy link to {heading}",
|
|
836
840
|
"description": "Accessible name on the Markdown heading copy button in its default state. `{heading}` is the heading's plain text, or its generated id when the text is empty; pairs with `markdownHeadingLinks.copied`."
|
|
@@ -1023,6 +1027,10 @@
|
|
|
1023
1027
|
"defaultMessage": "Maximum value",
|
|
1024
1028
|
"description": "Accessible name of the upper thumb of a range Slider (two thumbs), announced together with the Slider's own label, for example \"Price range, Maximum value, 80\". Never shown on screen."
|
|
1025
1029
|
},
|
|
1030
|
+
"@astryx.slider.required": {
|
|
1031
|
+
"defaultMessage": "Required",
|
|
1032
|
+
"description": "Screen-reader-only text that a required Slider adds to its description. One word, neutral tone."
|
|
1033
|
+
},
|
|
1026
1034
|
"@astryx.tabBar.badgedItem": {
|
|
1027
1035
|
"defaultMessage": "{label}, {badge}",
|
|
1028
1036
|
"description": "Screen-reader name of a bottom tab bar item that shows a badge (\"Library, 3\"). {label} is the tab's visible name; {badge} is the badge's count or its own label (\"3 unread\"). Translators may reorder the two or change the separator."
|
|
@@ -1507,6 +1515,10 @@
|
|
|
1507
1515
|
"defaultMessage": "{count} tool calls",
|
|
1508
1516
|
"description": "Summary label shown in the group header when multiple tool calls are expanded. {count} is the number of calls."
|
|
1509
1517
|
},
|
|
1518
|
+
"@astryx.chatTriggerMenu.noResults": {
|
|
1519
|
+
"defaultMessage": "No results",
|
|
1520
|
+
"description": "Shown in a chat composer's @-mention or slash-command menu when the typed query matches no suggestion and the trigger sets no empty message of its own. Very short (2 words); neutral tone."
|
|
1521
|
+
},
|
|
1510
1522
|
"@astryx.chatTriggerMenu.searching": {
|
|
1511
1523
|
"defaultMessage": "Searching…",
|
|
1512
1524
|
"description": "Shown, and announced politely to screen readers, while a chat composer's @-mention or slash-command menu waits for async search results. Present participle; trailing `…` is one character."
|
|
@@ -1535,6 +1547,10 @@
|
|
|
1535
1547
|
"defaultMessage": "Code",
|
|
1536
1548
|
"description": "Screen-reader-only fallback name for a code-snippet scroll container when the code's language is unknown. \"Code\" = source code, not secret code or code of conduct."
|
|
1537
1549
|
},
|
|
1550
|
+
"@astryx.codeBlock.diffLabel": {
|
|
1551
|
+
"defaultMessage": "{language} diff",
|
|
1552
|
+
"description": "Header label of a CodeBlock that shows a diff of code in a language, for example `tsx diff`. {language} is the language's name. \"diff\" is also the name of the diff code format and is usually left untranslated; reorder if your language needs it."
|
|
1553
|
+
},
|
|
1538
1554
|
"@astryx.field.optional": {
|
|
1539
1555
|
"defaultMessage": "Optional",
|
|
1540
1556
|
"description": "Visible indicator shown next to a form field's label when the field is optional (isOptional). Mutually exclusive with the required indicator. Very short — appears inline after the label text."
|
|
@@ -1543,6 +1559,10 @@
|
|
|
1543
1559
|
"defaultMessage": "About {label}",
|
|
1544
1560
|
"description": "Screen-reader name of the small info button after a form field's label; the button shows help about the field. {label} is the field's visible label. Example: `About Auto-save`."
|
|
1545
1561
|
},
|
|
1562
|
+
"@astryx.field.errorFallback": {
|
|
1563
|
+
"defaultMessage": "Invalid value",
|
|
1564
|
+
"description": "Screen-reader-only text that describes a text field whose error status has no message, so assistive technology hears that the value has an error. Short, no punctuation; read after the field's label."
|
|
1565
|
+
},
|
|
1546
1566
|
"@astryx.field.required": {
|
|
1547
1567
|
"defaultMessage": "Required",
|
|
1548
1568
|
"description": "Visible indicator shown next to a form field's label when the field must be filled in (isRequired). Mutually exclusive with the optional indicator. Very short — appears inline after the label text."
|
|
@@ -1939,6 +1959,10 @@
|
|
|
1939
1959
|
"defaultMessage": "Copied",
|
|
1940
1960
|
"description": "Aria label on a Timestamp copy button for ~1.5s after a successful copy, and the text announced to a polite live region. Past-participle (\"has been copied\"); pairs with `timestamp.copyValue`."
|
|
1941
1961
|
},
|
|
1962
|
+
"@astryx.timestamp.relativeLabel": {
|
|
1963
|
+
"defaultMessage": "{relative}, {date}",
|
|
1964
|
+
"description": "Accessible name of a relative Timestamp: the words it shows, then the full date (\"2 hours ago, March 25, 2026 at 10:00:00 AM Coordinated Universal Time\"). {relative} must come first and stay unchanged, so voice control can find a control named by it. Translators may change the separator."
|
|
1965
|
+
},
|
|
1942
1966
|
"@astryx.timestamp.detailsLabel": {
|
|
1943
1967
|
"defaultMessage": "Timestamp details",
|
|
1944
1968
|
"description": "Accessible name for the Timestamp copyable hover card popup, which lists the instant in the configured time zones/formats with a copy button per row."
|
|
@@ -2003,6 +2027,10 @@
|
|
|
2003
2027
|
"defaultMessage": "{count, number} {count, plural, one {result} other {results}}",
|
|
2004
2028
|
"description": "Polite screen-reader announcement of how many suggestions a Typeahead search returned. Live-region text, never shown on screen; example: `1 result`, `12 results`."
|
|
2005
2029
|
},
|
|
2030
|
+
"@astryx.tokenizer.overflowCount": {
|
|
2031
|
+
"defaultMessage": "+{count, number} more",
|
|
2032
|
+
"description": "Shown at the end of a one-line Tokenizer when tokens do not fit, for example `+3 more`. {count} is the number of hidden tokens. Keep it short."
|
|
2033
|
+
},
|
|
2006
2034
|
"@astryx.tokenizer.tokenAdded": {
|
|
2007
2035
|
"defaultMessage": "Added {label}",
|
|
2008
2036
|
"description": "Polite screen-reader announcement after a token is added to a Tokenizer, either picked from the suggestions or newly created. Live-region text, never shown on screen; `{label}` is the token's visible text."
|
|
@@ -2715,6 +2743,14 @@
|
|
|
2715
2743
|
"defaultMessage": "Back",
|
|
2716
2744
|
"description": "Label of the back button in a lab NavigationStack's bar when the screen it returns to has no title of its own. Returns to the previous screen; keep it short, as on an iOS navigation bar."
|
|
2717
2745
|
},
|
|
2746
|
+
"@astryx.rating.starLabel": {
|
|
2747
|
+
"defaultMessage": "{value, number} of {max, plural, one {# star} other {# stars}}",
|
|
2748
|
+
"description": "Accessible name of a Rating star or fractional read-only rating. value is the rating and max is the total number of stars; max picks the plural form of star."
|
|
2749
|
+
},
|
|
2750
|
+
"@astryx.rating.readOnlyLabel": {
|
|
2751
|
+
"defaultMessage": "{label}: {rating}",
|
|
2752
|
+
"description": "Complete accessible name of a read-only Rating. label is the caller-supplied group name and rating is the localized rating text, or the caller override. Translators may reorder both parts."
|
|
2753
|
+
},
|
|
2718
2754
|
"@astryx.searchField.cancel": {
|
|
2719
2755
|
"defaultMessage": "Cancel",
|
|
2720
2756
|
"description": "Accessible name of a lab SearchField's close button, which ends the search: it clears the query, ends editing and deactivates the field."
|