@astryxdesign/core 0.7.11 → 0.7.12-canary.ccb4a6d
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/dist/AppShell/AppShellMobileContext.d.ts.map +1 -1
- package/dist/AppShell/AppShellMobileContext.js +4 -3
- package/dist/AppShell/useAppShellMainId.d.ts.map +1 -1
- package/dist/AppShell/useAppShellMainId.js +3 -2
- package/dist/Avatar/AvatarSizeContext.d.ts.map +1 -1
- package/dist/Avatar/AvatarSizeContext.js +2 -2
- package/dist/Avatar/AvatarStatusLabelContext.d.ts +2 -2
- package/dist/Avatar/AvatarStatusLabelContext.d.ts.map +1 -1
- package/dist/Avatar/AvatarStatusLabelContext.js +3 -3
- package/dist/AvatarGroup/AvatarGroupContext.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupContext.js +2 -2
- package/dist/BottomSheet/BottomSheetHostContext.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetHostContext.js +3 -2
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +48 -4
- package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetSwitcherContext.js +2 -2
- package/dist/BottomSheet/bottomSheetEscape.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetEscape.js +2 -2
- package/dist/BottomSheet/bottomSheetStack.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetStack.js +2 -13
- package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
- package/dist/BottomSheet/useSheetGestures.js +25 -42
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +2 -2
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +12 -21
- package/dist/Button/buttonHitArea.d.ts.map +1 -1
- package/dist/Button/buttonHitArea.js +3 -3
- package/dist/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/ButtonGroup/ButtonGroup.js +13 -7
- package/dist/ButtonGroup/ButtonGroupContext.d.ts.map +1 -1
- package/dist/ButtonGroup/ButtonGroupContext.js +2 -2
- package/dist/Carousel/Carousel.d.ts.map +1 -1
- package/dist/Carousel/Carousel.js +24 -15
- package/dist/Chat/ChatContext.d.ts.map +1 -1
- package/dist/Chat/ChatContext.js +6 -5
- package/dist/Chat/useChatStreamScroll.d.ts.map +1 -1
- package/dist/Chat/useChatStreamScroll.js +7 -22
- package/dist/CheckboxInput/CheckboxRowPressContext.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxRowPressContext.js +1 -1
- package/dist/CheckboxList/CheckboxListContext.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListContext.js +1 -1
- package/dist/Collapsible/CollapsibleGroupContext.d.ts.map +1 -1
- package/dist/Collapsible/CollapsibleGroupContext.js +3 -3
- package/dist/CommandPalette/CommandPaletteContext.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteContext.js +4 -3
- package/dist/CommandPalette/busyStartSettle.d.ts.map +1 -1
- package/dist/CommandPalette/busyStartSettle.js +2 -2
- package/dist/DateInput/TouchDateField.d.ts.map +1 -1
- package/dist/DateInput/TouchDateField.js +41 -4
- package/dist/Dialog/DialogContext.d.ts.map +1 -1
- package/dist/Dialog/DialogContext.js +3 -2
- package/dist/DropdownMenu/DropdownMenuContext.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuContext.js +6 -5
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts.map +1 -1
- package/dist/DropdownMenu/lazyMenuBottomSheet.js +4 -15
- package/dist/DropdownMenu/menuRegionStops.d.ts.map +1 -1
- package/dist/DropdownMenu/menuRegionStops.js +2 -37
- package/dist/FormLayout/FormLayoutContext.d.ts.map +1 -1
- package/dist/FormLayout/FormLayoutContext.js +2 -2
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/Heading/Heading.js +19 -16
- package/dist/HoverCard/HoverCard.d.ts +1 -2
- package/dist/HoverCard/HoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.d.ts +1 -2
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +5 -1
- package/dist/Icon/IconDefaultSizeContext.d.ts.map +1 -1
- package/dist/Icon/IconDefaultSizeContext.js +2 -2
- package/dist/InputGroup/InputGroupContext.d.ts.map +1 -1
- package/dist/InputGroup/InputGroupContext.js +2 -2
- package/dist/InputGroup/InputGroupInternalContext.d.ts.map +1 -1
- package/dist/InputGroup/InputGroupInternalContext.js +2 -2
- package/dist/InteractiveRoleContext/InteractiveRoleContext.d.ts.map +1 -1
- package/dist/InteractiveRoleContext/InteractiveRoleContext.js +5 -3
- package/dist/Item/ItemDescriptionContext.d.ts.map +1 -1
- package/dist/Item/ItemDescriptionContext.js +3 -3
- package/dist/Item/ItemListRowContext.d.ts.map +1 -1
- package/dist/Item/ItemListRowContext.js +3 -3
- package/dist/Item/ItemMarkerColumnsContext.d.ts +1 -1
- package/dist/Item/ItemMarkerColumnsContext.d.ts.map +1 -1
- package/dist/Item/ItemMarkerColumnsContext.js +2 -2
- package/dist/Layer/LayerContext.d.ts.map +1 -1
- package/dist/Layer/LayerContext.js +3 -2
- package/dist/Layer/LayerDepthContext.d.ts.map +1 -1
- package/dist/Layer/LayerDepthContext.js +3 -2
- package/dist/Layer/LayerTouch.d.ts +3 -2
- package/dist/Layer/LayerTouch.d.ts.map +1 -1
- package/dist/Layer/LayerTouch.js +3 -2
- package/dist/Layer/anchorName.d.ts.map +1 -1
- package/dist/Layer/anchorName.js +5 -1
- package/dist/Layer/inputHold.d.ts.map +1 -1
- package/dist/Layer/inputHold.js +115 -13
- package/dist/Layer/layerScopedContext.d.ts +5 -2
- package/dist/Layer/layerScopedContext.d.ts.map +1 -1
- package/dist/Layer/layerScopedContext.js +27 -10
- package/dist/Layer/layerSlideRules.d.ts +28 -26
- package/dist/Layer/layerSlideRules.d.ts.map +1 -1
- package/dist/Layer/layerSlideRules.js +41 -40
- package/dist/Layer/outsidePress.d.ts +21 -3
- package/dist/Layer/outsidePress.d.ts.map +1 -1
- package/dist/Layer/outsidePress.js +119 -29
- package/dist/Layer/settledBox.d.ts +9 -8
- package/dist/Layer/settledBox.d.ts.map +1 -1
- package/dist/Layer/settledBox.js +169 -49
- package/dist/Layer/toastHost.d.ts.map +1 -1
- package/dist/Layer/toastHost.js +3 -2
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +172 -60
- package/dist/Layer/useLayerKeyboardClearance.d.ts +14 -2
- package/dist/Layer/useLayerKeyboardClearance.d.ts.map +1 -1
- package/dist/Layer/useLayerKeyboardClearance.js +83 -12
- package/dist/Layer/useTouchTrigger.d.ts +21 -1
- package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
- package/dist/Layer/useTouchTrigger.js +61 -37
- package/dist/Layout/Layout.d.ts +1 -1
- package/dist/Layout/Layout.d.ts.map +1 -1
- package/dist/Layout/Layout.js +10 -6
- package/dist/Layout/LayoutAreaContext.d.ts.map +1 -1
- package/dist/Layout/LayoutAreaContext.js +3 -3
- package/dist/Layout/LayoutContent.d.ts +6 -6
- package/dist/Layout/LayoutContent.js +9 -9
- package/dist/Layout/LayoutDividerContext.d.ts.map +1 -1
- package/dist/Layout/LayoutDividerContext.js +2 -2
- package/dist/Layout/LayoutSlotsContext.d.ts.map +1 -1
- package/dist/Layout/LayoutSlotsContext.js +2 -2
- package/dist/Link/LinkContext.d.ts +16 -0
- package/dist/Link/LinkContext.d.ts.map +1 -1
- package/dist/Link/LinkContext.js +3 -3
- package/dist/List/List.d.ts +12 -1
- package/dist/List/List.d.ts.map +1 -1
- package/dist/List/List.js +29 -10
- package/dist/List/ListContext.d.ts +18 -3
- package/dist/List/ListContext.d.ts.map +1 -1
- package/dist/List/ListContext.js +9 -6
- package/dist/List/ListItem.d.ts +13 -4
- package/dist/List/ListItem.d.ts.map +1 -1
- package/dist/List/ListItem.js +37 -10
- package/dist/List/listLayoutUpdates.d.ts +34 -0
- package/dist/List/listLayoutUpdates.d.ts.map +1 -0
- package/dist/List/listLayoutUpdates.js +539 -0
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +57 -10
- package/dist/Markdown/blockDirection.d.ts +26 -0
- package/dist/Markdown/blockDirection.d.ts.map +1 -0
- package/dist/Markdown/blockDirection.js +68 -0
- package/dist/Markdown/plugins/HeadingLinksRenderer.d.ts +3 -1
- package/dist/Markdown/plugins/HeadingLinksRenderer.d.ts.map +1 -1
- package/dist/Markdown/plugins/HeadingLinksRenderer.js +3 -1
- package/dist/MetadataList/MetadataListContext.d.ts.map +1 -1
- package/dist/MetadataList/MetadataListContext.js +2 -2
- package/dist/NavMenu/NavMenuContext.d.ts.map +1 -1
- package/dist/NavMenu/NavMenuContext.js +5 -4
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/Popover/Popover.js +9 -9
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +11 -8
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +2 -2
- package/dist/RadioList/RadioListReasonContext.d.ts.map +1 -1
- package/dist/RadioList/RadioListReasonContext.js +1 -1
- package/dist/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlContext.js +2 -2
- package/dist/SelectableCard/selectableCardInput.d.ts.map +1 -1
- package/dist/SelectableCard/selectableCardInput.js +2 -2
- package/dist/Selector/SelectorRowLayoutContext.d.ts.map +1 -1
- package/dist/Selector/SelectorRowLayoutContext.js +2 -2
- package/dist/SideNav/SideNavCollapseButton.d.ts +4 -3
- package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
- package/dist/SideNav/SideNavCollapseContext.d.ts.map +1 -1
- package/dist/SideNav/SideNavCollapseContext.js +4 -3
- package/dist/SideNav/SideNavFocusTargetsContext.d.ts.map +1 -1
- package/dist/SideNav/SideNavFocusTargetsContext.js +2 -2
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +3 -2
- package/dist/SideNav/SideNavRenderContext.d.ts.map +1 -1
- package/dist/SideNav/SideNavRenderContext.js +4 -3
- package/dist/SideNav/railMotion.d.ts +40 -0
- package/dist/SideNav/railMotion.d.ts.map +1 -1
- package/dist/SideNav/railMotion.js +2 -2
- package/dist/SizeContext/SizeContext.d.ts.map +1 -1
- package/dist/SizeContext/SizeContext.js +2 -2
- package/dist/SnapPaging/SnapPaging.d.ts.map +1 -1
- package/dist/SnapPaging/SnapPaging.js +162 -36
- package/dist/SnapPaging/snapPagingValue.d.ts +29 -3
- package/dist/SnapPaging/snapPagingValue.d.ts.map +1 -1
- package/dist/SnapPaging/snapPagingValue.js +38 -6
- package/dist/Spinner/SpinnerOwnerContext.d.ts.map +1 -1
- package/dist/Spinner/SpinnerOwnerContext.js +2 -2
- package/dist/Stepper/StepperContext.d.ts.map +1 -1
- package/dist/Stepper/StepperContext.js +3 -3
- package/dist/Switch/useSwitchTouch.d.ts.map +1 -1
- package/dist/Switch/useSwitchTouch.js +8 -3
- package/dist/TabList/TabListContext.d.ts.map +1 -1
- package/dist/TabList/TabListContext.js +2 -2
- package/dist/Table/BaseTable.d.ts +3 -2
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +73 -16
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +3 -2
- package/dist/Table/TableContext.d.ts.map +1 -1
- package/dist/Table/TableContext.js +2 -2
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.d.ts.map +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.d.ts.map +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.js +4 -3
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +5 -3
- package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts +16 -18
- package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts.map +1 -1
- package/dist/Table/plugins/rowIndex/useTableRowIndex.js +48 -39
- package/dist/Table/plugins/selection/useTableSelection.d.ts.map +1 -1
- package/dist/Table/plugins/selection/useTableSelection.js +4 -2
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +1 -0
- package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
- package/dist/Table/plugins/tree/useTableTreeData.js +3 -2
- package/dist/Table/tableRowContextUsage.d.ts +21 -0
- package/dist/Table/tableRowContextUsage.d.ts.map +1 -0
- package/dist/Table/tableRowContextUsage.js +88 -0
- package/dist/Table/types.d.ts +58 -5
- package/dist/Table/types.d.ts.map +1 -1
- package/dist/Table/useBaseTablePlugins.d.ts.map +1 -1
- package/dist/Table/useBaseTablePlugins.js +5 -2
- package/dist/Text/Text.d.ts.map +1 -1
- package/dist/Text/Text.js +18 -14
- package/dist/Text/TruncationTooltip.d.ts +45 -0
- package/dist/Text/TruncationTooltip.d.ts.map +1 -0
- package/dist/Text/TruncationTooltip.js +123 -0
- package/dist/Text/textClampContext.d.ts.map +1 -1
- package/dist/Text/textClampContext.js +1 -1
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +4 -0
- package/dist/ToggleButton/ToggleButtonGroup.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.js +2 -2
- package/dist/Token/TokenNamingContext.d.ts.map +1 -1
- package/dist/Token/TokenNamingContext.js +2 -2
- package/dist/Tokenizer/TokenizerClearAllMessageContext.d.ts.map +1 -1
- package/dist/Tokenizer/TokenizerClearAllMessageContext.js +2 -2
- package/dist/Tokenizer/TokenizerItemRemovableContext.d.ts +12 -0
- package/dist/Tokenizer/TokenizerItemRemovableContext.d.ts.map +1 -1
- package/dist/Tokenizer/TokenizerItemRemovableContext.js +2 -2
- package/dist/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/Toolbar/Toolbar.js +12 -6
- package/dist/Tooltip/tooltipPresentInterest.d.ts +29 -0
- package/dist/Tooltip/tooltipPresentInterest.d.ts.map +1 -0
- package/dist/Tooltip/tooltipPresentInterest.js +29 -0
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +30 -4
- package/dist/TopNav/TopNavContext.d.ts.map +1 -1
- package/dist/TopNav/TopNavContext.js +2 -2
- package/dist/TopNav/TopNavMobileContentContext.d.ts +1 -1
- package/dist/TopNav/TopNavMobileContentContext.d.ts.map +1 -1
- package/dist/TopNav/TopNavMobileContentContext.js +4 -3
- package/dist/TopNav/TopNavRenderContext.d.ts.map +1 -1
- package/dist/TopNav/TopNavRenderContext.js +4 -3
- package/dist/Typeahead/busyIndicatorLane.d.ts.map +1 -1
- package/dist/Typeahead/busyIndicatorLane.js +3 -2
- package/dist/Typeahead/committedChoicesKey.d.ts.map +1 -1
- package/dist/Typeahead/committedChoicesKey.js +3 -2
- package/dist/Typeahead/trailingKeyDown.d.ts.map +1 -1
- package/dist/Typeahead/trailingKeyDown.js +3 -2
- package/dist/astryx.css +18 -8
- package/dist/gestures/GestureArena.d.ts +2 -0
- package/dist/gestures/GestureArena.d.ts.map +1 -1
- package/dist/gestures/GestureArena.js +8 -1
- package/dist/gestures/GestureRecognizer.d.ts +6 -0
- package/dist/gestures/GestureRecognizer.d.ts.map +1 -1
- package/dist/gestures/GestureRecognizer.js +9 -0
- package/dist/gestures/PressTracker.d.ts.map +1 -1
- package/dist/gestures/PressTracker.js +9 -4
- package/dist/hooks/focusableSelector.d.ts +13 -1
- package/dist/hooks/focusableSelector.d.ts.map +1 -1
- package/dist/hooks/focusableSelector.js +22 -2
- package/dist/hooks/longPressDetector.d.ts.map +1 -1
- package/dist/hooks/longPressDetector.js +1 -25
- package/dist/hooks/pressGroupContext.d.ts.map +1 -1
- package/dist/hooks/pressGroupContext.js +1 -1
- package/dist/hooks/useActionGroupTracking.d.ts +18 -1
- package/dist/hooks/useActionGroupTracking.d.ts.map +1 -1
- package/dist/hooks/useActionGroupTracking.js +13 -2
- package/dist/hooks/useAnnounce.d.ts.map +1 -1
- package/dist/hooks/useAnnounce.js +3 -2
- package/dist/hooks/useFocusTrap.d.ts +11 -0
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +47 -2
- package/dist/hooks/useListFocus.d.ts +7 -0
- package/dist/hooks/useListFocus.d.ts.map +1 -1
- package/dist/hooks/useListFocus.js +20 -3
- package/dist/hooks/usePager.d.ts.map +1 -1
- package/dist/hooks/usePager.js +26 -3
- package/dist/hooks/useScrollOverflow.d.ts +22 -0
- package/dist/hooks/useScrollOverflow.d.ts.map +1 -1
- package/dist/hooks/useScrollOverflow.js +67 -11
- package/dist/i18n/InternationalizationContext.d.ts +19 -0
- package/dist/i18n/InternationalizationContext.d.ts.map +1 -1
- package/dist/i18n/InternationalizationContext.js +3 -3
- package/dist/i18n/englishFallback.d.ts.map +1 -1
- package/dist/i18n/englishFallback.js +5 -1
- package/dist/i18n/firstStrongDirection.d.ts +7 -0
- package/dist/i18n/firstStrongDirection.d.ts.map +1 -0
- package/dist/i18n/firstStrongDirection.js +65 -0
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +1 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +1 -0
- package/dist/internal/scroll-anchoring.d.ts +16 -0
- package/dist/internal/scroll-anchoring.d.ts.map +1 -0
- package/dist/internal/scroll-anchoring.js +16 -0
- package/dist/internal/touch.d.ts +2 -0
- package/dist/internal/touch.d.ts.map +1 -1
- package/dist/internal/touch.js +4 -1
- package/dist/motion/animatedLayout.d.ts +8 -0
- package/dist/motion/animatedLayout.d.ts.map +1 -1
- package/dist/motion/animatedLayout.js +51 -3
- package/dist/motion/animator.d.ts +19 -2
- package/dist/motion/animator.d.ts.map +1 -1
- package/dist/motion/animator.js +72 -7
- package/dist/privateAttributes/itemKey.stylex.d.ts +5 -0
- package/dist/privateAttributes/itemKey.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/itemKey.stylex.js +25 -0
- package/dist/privateAttributes/leaving.stylex.d.ts +5 -0
- package/dist/privateAttributes/leaving.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/leaving.stylex.js +23 -0
- package/dist/privateAttributes/press.stylex.d.ts.map +1 -1
- package/dist/privateAttributes/press.stylex.js +13 -3
- package/dist/privateAttributes/scrollAnchoring.stylex.d.ts +7 -0
- package/dist/privateAttributes/scrollAnchoring.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/scrollAnchoring.stylex.js +50 -0
- package/dist/privateAttributes/travelling.stylex.d.ts +27 -0
- package/dist/privateAttributes/travelling.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/travelling.stylex.js +51 -0
- package/dist/theme/Theme.d.ts.map +1 -1
- package/dist/theme/Theme.js +95 -49
- package/dist/theme/syntax/SyntaxTheme.d.ts.map +1 -1
- package/dist/theme/syntax/SyntaxTheme.js +3 -2
- package/dist/theme/useTheme.d.ts.map +1 -1
- package/dist/theme/useTheme.js +3 -2
- package/dist/utils/calendarSystem.d.ts.map +1 -1
- package/dist/utils/calendarSystem.js +4 -1
- package/dist/utils/flatTree.d.ts +13 -0
- package/dist/utils/flatTree.d.ts.map +1 -1
- package/dist/utils/flatTree.js +28 -4
- package/dist/utils/inputAge.d.ts +22 -0
- package/dist/utils/inputAge.d.ts.map +1 -0
- package/dist/utils/inputAge.js +54 -0
- package/dist/utils/inputStream.d.ts +8 -0
- package/dist/utils/inputStream.d.ts.map +1 -1
- package/dist/utils/inputStream.js +53 -3
- package/dist/utils/moduleLoader.d.ts +23 -0
- package/dist/utils/moduleLoader.d.ts.map +1 -0
- package/dist/utils/moduleLoader.js +31 -0
- package/dist/utils/pressFeedback.d.ts.map +1 -1
- package/dist/utils/pressFeedback.js +13 -8
- package/dist/utils/selectionLock.d.ts.map +1 -1
- package/dist/utils/selectionLock.js +7 -14
- package/dist/utils/sharedContext.d.ts +18 -0
- package/dist/utils/sharedContext.d.ts.map +1 -0
- package/dist/utils/sharedContext.js +33 -0
- package/dist/utils/sharedRealm.d.ts +24 -0
- package/dist/utils/sharedRealm.d.ts.map +1 -0
- package/dist/utils/sharedRealm.js +38 -0
- package/locales/en.json +4 -0
- package/locales/pseudo.json +3 -0
- package/package.json +10 -5
- package/src/AppShell/AppShellMobileContext.tsx +8 -3
- package/src/AppShell/useAppShellMainId.ts +7 -2
- package/src/Avatar/AvatarSizeContext.ts +6 -2
- package/src/Avatar/AvatarStatusLabelContext.ts +8 -3
- package/src/AvatarGroup/AvatarGroupContext.ts +7 -4
- package/src/BottomSheet/BottomSheetHostContext.ts +7 -3
- package/src/BottomSheet/BottomSheetPanel.tsx +56 -7
- package/src/BottomSheet/BottomSheetSwitcherContext.ts +7 -2
- package/src/BottomSheet/bottomSheetEscape.ts +6 -2
- package/src/BottomSheet/bottomSheetStack.ts +6 -14
- package/src/BottomSheet/useSheetGestures.ts +28 -48
- package/src/Breadcrumbs/Breadcrumbs.tsx +6 -5
- package/src/Button/Button.doc.mjs +3 -3
- package/src/Button/Button.tsx +10 -22
- package/src/Button/buttonHitArea.ts +7 -4
- package/src/ButtonGroup/ButtonGroup.doc.mjs +3 -3
- package/src/ButtonGroup/ButtonGroup.tsx +27 -16
- package/src/ButtonGroup/ButtonGroupContext.ts +7 -4
- package/src/Carousel/Carousel.tsx +33 -15
- package/src/Chat/ChatContext.tsx +23 -7
- package/src/Chat/useChatStreamScroll.ts +7 -26
- package/src/CheckboxInput/CheckboxRowPressContext.ts +5 -1
- package/src/CheckboxList/CheckboxListContext.tsx +5 -1
- package/src/Collapsible/CollapsibleGroupContext.tsx +11 -3
- package/src/CommandPalette/CommandPaletteContext.ts +8 -3
- package/src/CommandPalette/busyStartSettle.ts +6 -2
- package/src/DateInput/TouchDateField.tsx +62 -4
- package/src/Dialog/DialogContext.ts +7 -2
- package/src/DropdownMenu/DropdownMenuContext.tsx +18 -5
- package/src/DropdownMenu/lazyMenuBottomSheet.ts +6 -18
- package/src/DropdownMenu/menuRegionStops.ts +1 -49
- package/src/FormLayout/FormLayoutContext.ts +3 -3
- package/src/Heading/Heading.tsx +34 -18
- package/src/HoverCard/HoverCard.doc.mjs +3 -3
- package/src/HoverCard/HoverCard.tsx +1 -2
- package/src/HoverCard/useHoverCard.tsx +6 -2
- package/src/Icon/IconDefaultSizeContext.ts +6 -2
- package/src/IconButton/IconButton.doc.mjs +2 -2
- package/src/InputGroup/InputGroupContext.ts +7 -4
- package/src/InputGroup/InputGroupInternalContext.ts +6 -2
- package/src/InteractiveRoleContext/InteractiveRoleContext.ts +8 -3
- package/src/Item/ItemDescriptionContext.tsx +7 -3
- package/src/Item/ItemListRowContext.tsx +7 -3
- package/src/Item/ItemMarkerColumnsContext.tsx +7 -2
- package/src/Layer/LayerContext.ts +7 -2
- package/src/Layer/LayerDepthContext.tsx +3 -2
- package/src/Layer/LayerTouch.ts +6 -2
- package/src/Layer/anchorName.ts +8 -4
- package/src/Layer/inputHold.ts +138 -21
- package/src/Layer/layerScopedContext.tsx +34 -7
- package/src/Layer/layerSlideRules.ts +43 -40
- package/src/Layer/outsidePress.ts +144 -28
- package/src/Layer/settledBox.ts +216 -54
- package/src/Layer/toastHost.tsx +6 -2
- package/src/Layer/useLayer.tsx +200 -69
- package/src/Layer/useLayerKeyboardClearance.ts +90 -12
- package/src/Layer/useTouchTrigger.ts +89 -40
- package/src/Layout/Layout.doc.mjs +17 -0
- package/src/Layout/Layout.tsx +13 -9
- package/src/Layout/LayoutAreaContext.ts +8 -9
- package/src/Layout/LayoutContent.doc.mjs +11 -0
- package/src/Layout/LayoutContent.tsx +9 -9
- package/src/Layout/LayoutDividerContext.ts +6 -2
- package/src/Layout/LayoutSlotsContext.ts +6 -3
- package/src/Link/LinkContext.ts +7 -3
- package/src/List/List.doc.mjs +5 -0
- package/src/List/List.tsx +53 -5
- package/src/List/ListContext.tsx +28 -6
- package/src/List/ListItem.doc.mjs +11 -0
- package/src/List/ListItem.tsx +51 -14
- package/src/List/listLayoutUpdates.ts +603 -0
- package/src/Markdown/Markdown.tsx +93 -5
- package/src/Markdown/blockDirection.ts +100 -0
- package/src/Markdown/plugins/HeadingLinksRenderer.tsx +4 -0
- package/src/MetadataList/MetadataListContext.tsx +6 -2
- package/src/NavMenu/NavMenuContext.tsx +14 -5
- package/src/Popover/Popover.tsx +23 -16
- package/src/Popover/usePopover.tsx +21 -7
- package/src/RadioList/RadioList.tsx +7 -4
- package/src/RadioList/RadioListReasonContext.ts +1 -1
- package/src/Section/Section.doc.mjs +22 -0
- package/src/SegmentedControl/SegmentedControlContext.ts +6 -2
- package/src/SelectableCard/selectableCardInput.ts +6 -2
- package/src/Selector/SelectorRowLayoutContext.ts +6 -2
- package/src/SideNav/SideNavCollapseButton.doc.mjs +5 -5
- package/src/SideNav/SideNavCollapseButton.tsx +4 -3
- package/src/SideNav/SideNavCollapseContext.ts +12 -7
- package/src/SideNav/SideNavFocusTargetsContext.ts +6 -2
- package/src/SideNav/SideNavItem.tsx +6 -2
- package/src/SideNav/SideNavRenderContext.ts +9 -8
- package/src/SideNav/railMotion.ts +6 -2
- package/src/SizeContext/SizeContext.ts +6 -2
- package/src/SnapPaging/SnapPaging.ts +164 -39
- package/src/SnapPaging/snapPagingValue.ts +59 -12
- package/src/Spinner/SpinnerOwnerContext.ts +6 -2
- package/src/Stepper/StepperContext.ts +12 -3
- package/src/Switch/useSwitchTouch.ts +7 -5
- package/src/TabList/TabListContext.ts +7 -2
- package/src/Table/BaseTable.tsx +143 -19
- package/src/Table/Table.tsx +4 -3
- package/src/Table/TableContext.ts +6 -2
- package/src/Table/index.ts +2 -0
- package/src/Table/plugins/filtering/useTableFiltering.tsx +11 -3
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +10 -3
- package/src/Table/plugins/rowIndex/useTableRowIndex.tsx +38 -29
- package/src/Table/plugins/selection/useTableSelection.tsx +7 -2
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +1 -0
- package/src/Table/plugins/tree/useTableTreeData.tsx +6 -2
- package/src/Table/tableRowContextUsage.ts +105 -0
- package/src/Table/types.ts +60 -2
- package/src/Table/useBaseTablePlugins.ts +5 -2
- package/src/Table/useTableRowIndex.doc.mjs +6 -7
- package/src/Text/Text.tsx +34 -18
- package/src/Text/TruncationTooltip.tsx +179 -0
- package/src/Text/textClampContext.ts +5 -1
- package/src/TimeInput/TimeInput.tsx +4 -0
- package/src/ToggleButton/ToggleButtonGroup.tsx +6 -2
- package/src/Token/TokenNamingContext.ts +6 -2
- package/src/Tokenizer/TokenizerClearAllMessageContext.ts +4 -4
- package/src/Tokenizer/TokenizerItemRemovableContext.ts +3 -3
- package/src/Toolbar/Toolbar.tsx +16 -9
- package/src/Tooltip/tooltipPresentInterest.ts +43 -0
- package/src/Tooltip/useTooltip.tsx +33 -0
- package/src/TopNav/TopNavContext.ts +6 -2
- package/src/TopNav/TopNavMobileContentContext.ts +8 -3
- package/src/TopNav/TopNavRenderContext.ts +8 -4
- package/src/Typeahead/busyIndicatorLane.tsx +7 -2
- package/src/Typeahead/committedChoicesKey.tsx +4 -3
- package/src/Typeahead/trailingKeyDown.tsx +7 -2
- package/src/gestures/GestureArena.ts +8 -1
- package/src/gestures/GestureRecognizer.ts +9 -0
- package/src/gestures/PressTracker.ts +13 -4
- package/src/hooks/focusableSelector.ts +29 -1
- package/src/hooks/longPressDetector.ts +1 -35
- package/src/hooks/pressGroupContext.ts +5 -1
- package/src/hooks/useActionGroupTracking.ts +29 -2
- package/src/hooks/useAnnounce.ts +8 -4
- package/src/hooks/useFocusTrap.ts +62 -2
- package/src/hooks/useListFocus.ts +34 -7
- package/src/hooks/usePager.ts +30 -3
- package/src/hooks/useScrollOverflow.ts +65 -7
- package/src/i18n/InternationalizationContext.ts +12 -8
- package/src/i18n/englishFallback.ts +7 -1
- package/src/i18n/firstStrongDirection.ts +69 -0
- package/src/i18n/generated-locales/en.generated.ts +1 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +1 -0
- package/src/internal/scroll-anchoring.ts +16 -0
- package/src/internal/touch.ts +4 -0
- package/src/motion/animatedLayout.ts +44 -3
- package/src/motion/animator.ts +97 -9
- package/src/privateAttributes/itemKey.stylex.ts +25 -0
- package/src/privateAttributes/leaving.stylex.ts +23 -0
- package/src/privateAttributes/press.stylex.ts +19 -7
- package/src/privateAttributes/scrollAnchoring.stylex.ts +50 -0
- package/src/privateAttributes/travelling.stylex.ts +88 -0
- package/src/theme/Theme.tsx +124 -60
- package/src/theme/syntax/SyntaxTheme.tsx +7 -2
- package/src/theme/useTheme.ts +7 -8
- package/src/utils/calendarSystem.ts +7 -1
- package/src/utils/flatTree.ts +31 -4
- package/src/utils/inputAge.ts +66 -0
- package/src/utils/inputStream.ts +52 -3
- package/src/utils/moduleLoader.ts +47 -0
- package/src/utils/pressFeedback.ts +16 -7
- package/src/utils/selectionLock.ts +8 -18
- package/src/utils/sharedContext.ts +42 -0
- package/src/utils/sharedRealm.ts +42 -0
|
@@ -124,6 +124,48 @@ export function getFocusableElements(container) {
|
|
|
124
124
|
return Array.from(container.querySelectorAll(FOCUSABLE_SELECTOR)).filter(isVisiblyFocusable);
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
+
/**
|
|
128
|
+
* The name of a named native radio, or null for any other element and for an
|
|
129
|
+
* unnamed radio, which is its own Tab stop.
|
|
130
|
+
*/
|
|
131
|
+
function radioNameOf(el) {
|
|
132
|
+
if (!el.matches('input[type="radio"][name]')) {
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
return el.name || null;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Whether two radios are one group: the same name and the same form owner (or
|
|
140
|
+
* both with no form).
|
|
141
|
+
*/
|
|
142
|
+
function isSameRadioGroup(a, b) {
|
|
143
|
+
const name = radioNameOf(a);
|
|
144
|
+
return name != null && name === radioNameOf(b) && a.form === b.form;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Drop the radios the browser skips for Tab, leaving every other element, and
|
|
149
|
+
* each kept radio, at its own place. In a named group the browser stops only at
|
|
150
|
+
* the focused radio, else the checked one; a group with nothing checked keeps
|
|
151
|
+
* every radio, so a forward entry reaches its first and a backward entry its
|
|
152
|
+
* last.
|
|
153
|
+
*
|
|
154
|
+
* Exported for menus that walk their own Tab stops (DropdownMenu's header and
|
|
155
|
+
* footer), so they skip radios exactly as the focus region does.
|
|
156
|
+
*/
|
|
157
|
+
export function collapseRadioGroups(elements, active) {
|
|
158
|
+
return elements.filter(el => {
|
|
159
|
+
if (radioNameOf(el) == null) {
|
|
160
|
+
return true;
|
|
161
|
+
}
|
|
162
|
+
if (active != null && isSameRadioGroup(el, active)) {
|
|
163
|
+
return el === active;
|
|
164
|
+
}
|
|
165
|
+
return el.checked || !elements.some(other => isSameRadioGroup(el, other) && other.checked);
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
|
|
127
169
|
/**
|
|
128
170
|
* The document a trap lives in: its container's. An app that renders into a
|
|
129
171
|
* same-origin iframe or a Document Picture-in-Picture window through a portal
|
|
@@ -338,8 +380,11 @@ export function useFocusRegionContainment(containerRef, isActive) {
|
|
|
338
380
|
isKeyboardNavigationRef.current = false;
|
|
339
381
|
return;
|
|
340
382
|
}
|
|
341
|
-
|
|
342
|
-
|
|
383
|
+
|
|
384
|
+
// jsdom groups a selector list by selector, not in document order.
|
|
385
|
+
const stops = collapseRadioGroups([...focusable].sort((a, b) => precedes(a, b) ? -1 : 1), active);
|
|
386
|
+
const first = stops[0];
|
|
387
|
+
const last = stops[stops.length - 1];
|
|
343
388
|
if (doc.activeElement === container) {
|
|
344
389
|
// Programmatic initial focus can sit on the trap container itself
|
|
345
390
|
// (for example a dialog panel with no content controls). Move into
|
|
@@ -202,6 +202,13 @@ export interface UseListFocusReturn<T extends HTMLElement = HTMLElement> {
|
|
|
202
202
|
* ```
|
|
203
203
|
*/
|
|
204
204
|
export declare function useListFocus<T extends HTMLElement = HTMLElement>(options?: UseListFocusOptions): UseListFocusReturn<T>;
|
|
205
|
+
/**
|
|
206
|
+
* A `tabStopOrder` for a group whose disabled items stay focusable, such as a
|
|
207
|
+
* row of disabled Buttons. The group keeps one Tab stop while every item is
|
|
208
|
+
* disabled: the item that holds the stop, else the first enabled item, else
|
|
209
|
+
* the first item. With an enabled item it places the stop as the default does.
|
|
210
|
+
*/
|
|
211
|
+
export declare function oneTabStopAmong(itemSelector: string, boundarySelector: string): (list: HTMLElement) => HTMLElement[];
|
|
205
212
|
/**
|
|
206
213
|
* {@link useListFocus} with the Core-only {@link InternalListFocusOptions}.
|
|
207
214
|
* Not re-exported from `hooks/index.ts`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useListFocus.d.ts","sourceRoot":"","sources":["../../src/hooks/useListFocus.ts"],"names":[],"mappings":"AAyBA;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAAG,UAAU,GAAG,MAAM,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;;;;;;;;;;;;OAgBG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAEtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC;IAEnC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;;;;;;OAYG;IACH,iBAAiB,CAAC,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AEhD;;;;OAIG;IACH,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAE3C;;OAEG;IACH,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEnC;;OAEG;IACH,UAAU,EAAE,MAAM,OAAO,CAAC;IAE1B;;OAEG;IACH,SAAS,EAAE,MAAM,OAAO,CAAC;IAEzB;;;;;;OAMG;IACH,SAAS,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,KAAK,OAAO,CAAC;IAE/C;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,WAAW,EAAE,CAAC;CAC/B;AA0GD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAC9D,OAAO,GAAE,mBAAwB,GAChC,kBAAkB,CAAC,CAAC,CAAC,CAEvB;AAUD;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,MAAM,GACvB,CAAC,IAAI,EAAE,WAAW,KAAK,WAAW,EAAE,CActC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EACtE,OAAO,GAAE,wBAA6B,GACrC,kBAAkB,CAAC,CAAC,CAAC,CAudvB"}
|
|
@@ -185,6 +185,25 @@ function shouldDeferToCaret(target, key) {
|
|
|
185
185
|
export function useListFocus(options = {}) {
|
|
186
186
|
return useInternalListFocus(options);
|
|
187
187
|
}
|
|
188
|
+
function isDisabledItem(el) {
|
|
189
|
+
return el.getAttribute('aria-disabled') === 'true' || el.disabled === true || el.hasAttribute('disabled');
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* A `tabStopOrder` for a group whose disabled items stay focusable, such as a
|
|
194
|
+
* row of disabled Buttons. The group keeps one Tab stop while every item is
|
|
195
|
+
* disabled: the item that holds the stop, else the first enabled item, else
|
|
196
|
+
* the first item. With an enabled item it places the stop as the default does.
|
|
197
|
+
*/
|
|
198
|
+
export function oneTabStopAmong(itemSelector, boundarySelector) {
|
|
199
|
+
return list => {
|
|
200
|
+
const items = Array.from(list.querySelectorAll(itemSelector)).filter(el => !isHiddenWithin(el, list) && el.closest(boundarySelector) === list);
|
|
201
|
+
const enabled = items.filter(el => !isDisabledItem(el));
|
|
202
|
+
const candidates = enabled.length > 0 ? enabled : items;
|
|
203
|
+
const stop = candidates.find(el => el.getAttribute('tabindex') === '0') ?? candidates[0];
|
|
204
|
+
return stop == null ? items : [stop, ...items.filter(el => el !== stop)];
|
|
205
|
+
};
|
|
206
|
+
}
|
|
188
207
|
|
|
189
208
|
/**
|
|
190
209
|
* {@link useListFocus} with the Core-only {@link InternalListFocusOptions}.
|
|
@@ -211,9 +230,7 @@ export function useInternalListFocus(options = {}) {
|
|
|
211
230
|
* A `.focus()` call on such an element silently no-ops, so navigation must
|
|
212
231
|
* skip these to avoid freezing on a disabled item (menus-4, navigation-5).
|
|
213
232
|
*/
|
|
214
|
-
const isItemDisabled =
|
|
215
|
-
return el.getAttribute('aria-disabled') === 'true' || el.disabled === true || el.hasAttribute('disabled');
|
|
216
|
-
}, []);
|
|
233
|
+
const isItemDisabled = isDisabledItem;
|
|
217
234
|
|
|
218
235
|
/**
|
|
219
236
|
* Get all focusable items in the list.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePager.d.ts","sourceRoot":"","sources":["../../src/hooks/usePager.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAA8B,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAClE,OAAO,EAAiB,KAAK,WAAW,EAAC,MAAM,yBAAyB,CAAC;AAKzE,OAAO,EACL,oBAAoB,EACpB,KAAK,2BAA2B,EACjC,MAAM,kCAAkC,CAAC;AAO1C,OAAO,EAEL,KAAK,Q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mEzB"}
|
package/dist/hooks/usePager.js
CHANGED
|
@@ -220,6 +220,14 @@ class SettleCatcher extends LongPressGestureRecognizer {
|
|
|
220
220
|
disarmCatch() {
|
|
221
221
|
this.clearTimer();
|
|
222
222
|
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Takes the touch from the content under it: no press and no click. In
|
|
226
|
+
* UIKit, the touch that stops a scroll view never reaches its content.
|
|
227
|
+
*/
|
|
228
|
+
takeFromContent() {
|
|
229
|
+
this.cancelTouchesInView();
|
|
230
|
+
}
|
|
223
231
|
touchesBegan(touches, event) {
|
|
224
232
|
if (this.state === 'possible' && touches.length > 0) {
|
|
225
233
|
this.pointerType = touches[0].pointerType;
|
|
@@ -431,6 +439,8 @@ export function createPager(initial, environment = {}) {
|
|
|
431
439
|
let settled = target;
|
|
432
440
|
let settleHandle = null;
|
|
433
441
|
let isSwipeSettle = false;
|
|
442
|
+
// Whether the running settle follows a release, not the program's `goTo`.
|
|
443
|
+
let isReleaseSettle = false;
|
|
434
444
|
let settleToken = 0;
|
|
435
445
|
let isDragging = false;
|
|
436
446
|
let dragStart = 0;
|
|
@@ -494,6 +504,7 @@ export function createPager(initial, environment = {}) {
|
|
|
494
504
|
clearCatchTimer();
|
|
495
505
|
flushReport();
|
|
496
506
|
isSwipeSettle = false;
|
|
507
|
+
isReleaseSettle = false;
|
|
497
508
|
if (settleHandle != null) {
|
|
498
509
|
settleToken += 1;
|
|
499
510
|
settleHandle = null;
|
|
@@ -636,10 +647,12 @@ export function createPager(initial, environment = {}) {
|
|
|
636
647
|
* travel. A settle that a touch's release starts (`touchRelease`)
|
|
637
648
|
* cross-fades on any pointer. Any other motion, such as `goTo` or a mouse's
|
|
638
649
|
* or a pen's release, cross-fades on a coarse pointer. It lands at once on
|
|
639
|
-
* any other pointer.
|
|
650
|
+
* any other pointer. `isRelease` marks a release's settle, which a finger
|
|
651
|
+
* that catches it takes from the content.
|
|
640
652
|
*/
|
|
641
|
-
function play(curve, touchRelease = false) {
|
|
653
|
+
function play(curve, touchRelease = false, isRelease = false) {
|
|
642
654
|
isSwipeSettle = false;
|
|
655
|
+
isReleaseSettle = isRelease;
|
|
643
656
|
if (animator == null) {
|
|
644
657
|
return;
|
|
645
658
|
}
|
|
@@ -690,7 +703,7 @@ export function createPager(initial, environment = {}) {
|
|
|
690
703
|
rest();
|
|
691
704
|
return;
|
|
692
705
|
}
|
|
693
|
-
play(curve, touchRelease);
|
|
706
|
+
play(curve, touchRelease, true);
|
|
694
707
|
}
|
|
695
708
|
function measure() {
|
|
696
709
|
if (viewport == null) {
|
|
@@ -705,7 +718,13 @@ export function createPager(initial, environment = {}) {
|
|
|
705
718
|
if (isChildPages()) {
|
|
706
719
|
const offsets = measureChildOffsets();
|
|
707
720
|
if (!sameOffsets(offsets, childOffsets)) {
|
|
721
|
+
// A drag's release moves at most one page from where the drag began.
|
|
722
|
+
// New pages renumber, so the drag keeps the page nearest that offset.
|
|
723
|
+
const dragFrom = isDragging ? offsetOf(dragStartIndex) : null;
|
|
708
724
|
childOffsets = offsets;
|
|
725
|
+
if (dragFrom != null) {
|
|
726
|
+
dragStartIndex = nearestPage(dragFrom);
|
|
727
|
+
}
|
|
709
728
|
changed = true;
|
|
710
729
|
const pageCount = offsets.length;
|
|
711
730
|
deliver(() => options.onPagesChange?.(pageCount));
|
|
@@ -821,6 +840,10 @@ export function createPager(initial, environment = {}) {
|
|
|
821
840
|
function onCatch(recognizer) {
|
|
822
841
|
if (recognizer.state === 'began') {
|
|
823
842
|
holdSelection(true);
|
|
843
|
+
// A mouse keeps its click. A finger or a pen loses it.
|
|
844
|
+
if (isReleaseSettle && catcher.pointerType !== 'mouse') {
|
|
845
|
+
catcher.takeFromContent();
|
|
846
|
+
}
|
|
824
847
|
clearCatchTimer();
|
|
825
848
|
caughtSettle = false;
|
|
826
849
|
isCatchTimerArmed = true;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the content is shown while something other than scrolling moves it:
|
|
3
|
+
* its offset toward the end, and how far it travels.
|
|
4
|
+
*/
|
|
5
|
+
export interface ShownPosition {
|
|
6
|
+
readonly offset: number;
|
|
7
|
+
readonly travel: number;
|
|
8
|
+
}
|
|
1
9
|
export interface ScrollOverflowState {
|
|
2
10
|
/** Content overflows the start (left in LTR, right in RTL) */
|
|
3
11
|
overflowStart: boolean;
|
|
@@ -20,6 +28,19 @@ export interface ScrollOverflowState {
|
|
|
20
28
|
* ```
|
|
21
29
|
*/
|
|
22
30
|
export declare function useScrollOverflow(): {
|
|
31
|
+
scrollRef: (el: HTMLElement | null) => void;
|
|
32
|
+
overflowStart: boolean;
|
|
33
|
+
overflowEnd: boolean;
|
|
34
|
+
hasOverflow: boolean;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* `useScrollOverflow`, plus `followShown`: while snap paging holds a row, its
|
|
38
|
+
* scroll offset stays where the hold began and its items move. The caller
|
|
39
|
+
* reports where the row is shown, and the edges follow it. Null measures the
|
|
40
|
+
* scroll offset again from the next frame, when the handed-back offset is
|
|
41
|
+
* current. Internal: not exported from the hooks entry.
|
|
42
|
+
*/
|
|
43
|
+
export declare function useShownScrollOverflow(): {
|
|
23
44
|
/** Content overflows the start (left in LTR, right in RTL) */
|
|
24
45
|
overflowStart: boolean;
|
|
25
46
|
/** Content overflows the end (right in LTR, left in RTL) */
|
|
@@ -27,5 +48,6 @@ export declare function useScrollOverflow(): {
|
|
|
27
48
|
/** Whether the container has any overflow at all */
|
|
28
49
|
hasOverflow: boolean;
|
|
29
50
|
scrollRef: (el: HTMLElement | null) => void;
|
|
51
|
+
followShown: (shown: ShownPosition | null) => void;
|
|
30
52
|
};
|
|
31
53
|
//# sourceMappingURL=useScrollOverflow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollOverflow.d.ts","sourceRoot":"","sources":["../../src/hooks/useScrollOverflow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useScrollOverflow.d.ts","sourceRoot":"","sources":["../../src/hooks/useScrollOverflow.ts"],"names":[],"mappings":"AAoBA;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,8DAA8D;IAC9D,aAAa,EAAE,OAAO,CAAC;IACvB,4DAA4D;IAC5D,WAAW,EAAE,OAAO,CAAC;IACrB,oDAAoD;IACpD,WAAW,EAAE,OAAO,CAAC;CACtB;AA4DD;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB;oBAgGxB,WAAW,GAAG,IAAI;;;;EA5F1B;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB;IA5FpC,8DAA8D;mBAC/C,OAAO;IACtB,4DAA4D;iBAC/C,OAAO;IACpB,oDAAoD;iBACvC,OAAO;oBA0Kb,WAAW,GAAG,IAAI;yBAzBf,aAAa,GAAG,IAAI;EA4D/B"}
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @file useScrollOverflow.ts
|
|
7
7
|
* @input React refs, state and effects
|
|
8
|
-
* @output useScrollOverflow, which tracks the overflow at the scroll edges
|
|
8
|
+
* @output useScrollOverflow, which tracks the overflow at the scroll edges,
|
|
9
|
+
* and the internal useShownScrollOverflow, which can also measure from a
|
|
10
|
+
* position its caller reports
|
|
9
11
|
* @position Core hook; used by Carousel and TabList for fade-edge and button
|
|
10
12
|
* state
|
|
11
13
|
*
|
|
@@ -14,6 +16,12 @@
|
|
|
14
16
|
*/
|
|
15
17
|
import { useState, useCallback, useEffect, useRef } from 'react';
|
|
16
18
|
import { observeResize } from "../utils/sharedResizeObserver.js";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Where the content is shown while something other than scrolling moves it:
|
|
22
|
+
* its offset toward the end, and how far it travels.
|
|
23
|
+
*/
|
|
24
|
+
|
|
17
25
|
/**
|
|
18
26
|
* Whether the browser is rendering `el`, so a layout read on it answers for a
|
|
19
27
|
* real box. `checkVisibility()` is false under a `display: none` ancestor and
|
|
@@ -83,8 +91,32 @@ function observeContent(el, measure) {
|
|
|
83
91
|
* ```
|
|
84
92
|
*/
|
|
85
93
|
export function useScrollOverflow() {
|
|
94
|
+
const {
|
|
95
|
+
scrollRef,
|
|
96
|
+
overflowStart,
|
|
97
|
+
overflowEnd,
|
|
98
|
+
hasOverflow
|
|
99
|
+
} = useShownScrollOverflow();
|
|
100
|
+
return {
|
|
101
|
+
scrollRef,
|
|
102
|
+
overflowStart,
|
|
103
|
+
overflowEnd,
|
|
104
|
+
hasOverflow
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* `useScrollOverflow`, plus `followShown`: while snap paging holds a row, its
|
|
110
|
+
* scroll offset stays where the hold began and its items move. The caller
|
|
111
|
+
* reports where the row is shown, and the edges follow it. Null measures the
|
|
112
|
+
* scroll offset again from the next frame, when the handed-back offset is
|
|
113
|
+
* current. Internal: not exported from the hooks entry.
|
|
114
|
+
*/
|
|
115
|
+
export function useShownScrollOverflow() {
|
|
86
116
|
const elRef = useRef(null);
|
|
87
117
|
const unobserveRef = useRef(null);
|
|
118
|
+
const shownRef = useRef(null);
|
|
119
|
+
const releaseFrameRef = useRef(0);
|
|
88
120
|
const [state, setState] = useState({
|
|
89
121
|
overflowStart: false,
|
|
90
122
|
overflowEnd: false,
|
|
@@ -92,15 +124,12 @@ export function useScrollOverflow() {
|
|
|
92
124
|
});
|
|
93
125
|
const measureNow = useCallback(el => {
|
|
94
126
|
const tolerance = 1;
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
const overflowStart = Math.abs(scrollLeft) > tolerance;
|
|
102
|
-
const overflowEnd = Math.abs(scrollLeft) < maxScroll - tolerance;
|
|
103
|
-
const hasOverflow = scrollWidth > clientWidth + tolerance;
|
|
127
|
+
const shown = shownRef.current;
|
|
128
|
+
const offset = shown?.offset ?? Math.abs(el.scrollLeft);
|
|
129
|
+
const maxScroll = shown?.travel ?? el.scrollWidth - el.clientWidth;
|
|
130
|
+
const overflowStart = offset > tolerance;
|
|
131
|
+
const overflowEnd = offset < maxScroll - tolerance;
|
|
132
|
+
const hasOverflow = maxScroll > tolerance;
|
|
104
133
|
setState(prev => {
|
|
105
134
|
if (prev.overflowStart === overflowStart && prev.overflowEnd === overflowEnd && prev.hasOverflow === hasOverflow) {
|
|
106
135
|
return prev;
|
|
@@ -119,7 +148,9 @@ export function useScrollOverflow() {
|
|
|
119
148
|
// again.
|
|
120
149
|
const measure = useCallback(() => {
|
|
121
150
|
const el = elRef.current;
|
|
122
|
-
|
|
151
|
+
// A held row's edges come from where it is shown, which reads no layout.
|
|
152
|
+
// So the paging's own style writes force no layout here.
|
|
153
|
+
if (el && (shownRef.current != null || isRendered(el))) {
|
|
123
154
|
measureNow(el);
|
|
124
155
|
}
|
|
125
156
|
}, [measureNow]);
|
|
@@ -133,11 +164,34 @@ export function useScrollOverflow() {
|
|
|
133
164
|
measureNow(el);
|
|
134
165
|
}
|
|
135
166
|
}, [measureNow]);
|
|
167
|
+
const followShown = useCallback(shown => {
|
|
168
|
+
cancelAnimationFrame(releaseFrameRef.current);
|
|
169
|
+
const el = elRef.current;
|
|
170
|
+
if (shown != null) {
|
|
171
|
+
shownRef.current = shown;
|
|
172
|
+
if (el) {
|
|
173
|
+
measureNow(el);
|
|
174
|
+
}
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
if (shownRef.current == null || el == null) {
|
|
178
|
+
shownRef.current = null;
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
// Keep the reported edges until the next frame, when the scroll offset
|
|
182
|
+
// is current. Otherwise an edge flickers.
|
|
183
|
+
releaseFrameRef.current = requestAnimationFrame(() => {
|
|
184
|
+
shownRef.current = null;
|
|
185
|
+
measure();
|
|
186
|
+
});
|
|
187
|
+
}, [measure, measureNow]);
|
|
136
188
|
const scrollRef = useCallback(el => {
|
|
137
189
|
if (elRef.current) {
|
|
138
190
|
unobserveRef.current?.();
|
|
139
191
|
unobserveRef.current = null;
|
|
140
192
|
elRef.current.removeEventListener('scroll', measureOnScroll);
|
|
193
|
+
cancelAnimationFrame(releaseFrameRef.current);
|
|
194
|
+
shownRef.current = null;
|
|
141
195
|
}
|
|
142
196
|
elRef.current = el;
|
|
143
197
|
if (el) {
|
|
@@ -149,6 +203,7 @@ export function useScrollOverflow() {
|
|
|
149
203
|
}, [measure, measureOnScroll]);
|
|
150
204
|
useEffect(() => {
|
|
151
205
|
return () => {
|
|
206
|
+
cancelAnimationFrame(releaseFrameRef.current);
|
|
152
207
|
if (elRef.current) {
|
|
153
208
|
unobserveRef.current?.();
|
|
154
209
|
unobserveRef.current = null;
|
|
@@ -158,6 +213,7 @@ export function useScrollOverflow() {
|
|
|
158
213
|
}, [measureOnScroll]);
|
|
159
214
|
return {
|
|
160
215
|
scrollRef,
|
|
216
|
+
followShown,
|
|
161
217
|
...state
|
|
162
218
|
};
|
|
163
219
|
}
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file InternationalizationContext.ts
|
|
3
|
+
* @input createSharedContext, i18n types
|
|
4
|
+
* @output Exports InternationalizationContext and InternationalizationContextValue
|
|
5
|
+
* @position Context definition for client-side locale + messages
|
|
6
|
+
*
|
|
7
|
+
* Separated from InternationalizationProvider.tsx so components can consume
|
|
8
|
+
* the context without pulling in the full provider implementation.
|
|
9
|
+
* Follows the LinkContext.ts / ThemeContext.ts pattern.
|
|
10
|
+
*
|
|
11
|
+
* SYNC: When modified, update these files to stay in sync:
|
|
12
|
+
* - /packages/core/src/i18n/InternationalizationProvider.tsx
|
|
13
|
+
* - /packages/core/src/i18n/t.client.ts
|
|
14
|
+
* - /packages/core/src/i18n/useDirection.ts
|
|
15
|
+
* - /packages/core/src/i18n/useLocale.ts
|
|
16
|
+
* - /packages/core/src/i18n/useCollator.ts
|
|
17
|
+
* - /packages/core/src/i18n/getLocaleDirection.ts
|
|
18
|
+
* - /packages/core/src/i18n/index.ts
|
|
19
|
+
*/
|
|
1
20
|
import { getResolve } from './resolve.js';
|
|
2
21
|
import type { Locale, MessagesByLocale, Overrides } from './types.js';
|
|
3
22
|
import type { CalendarSystem } from '../utils/calendarSystem.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternationalizationContext.d.ts","sourceRoot":"","sources":["../../src/i18n/InternationalizationContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InternationalizationContext.d.ts","sourceRoot":"","sources":["../../src/i18n/InternationalizationContext.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAC,UAAU,EAAC,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,EAAC,MAAM,EAAE,gBAAgB,EAAE,SAAS,EAAC,MAAM,SAAS,CAAC;AACjE,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AAG5D,MAAM,WAAW,gCAAgC;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,KAAK,GAAG,KAAK,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;CAC1C;AAED;;;GAGG;AACH,eAAO,MAAM,2BAA2B,2DAUrC,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file InternationalizationContext.ts
|
|
7
|
-
* @input
|
|
7
|
+
* @input createSharedContext, i18n types
|
|
8
8
|
* @output Exports InternationalizationContext and InternationalizationContextValue
|
|
9
9
|
* @position Context definition for client-side locale + messages
|
|
10
10
|
*
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
* - /packages/core/src/i18n/getLocaleDirection.ts
|
|
22
22
|
* - /packages/core/src/i18n/index.ts
|
|
23
23
|
*/
|
|
24
|
-
import { createContext } from 'react';
|
|
25
24
|
import { getResolve } from "./resolve.js";
|
|
25
|
+
import { createSharedContext } from "../utils/sharedContext.js";
|
|
26
26
|
/**
|
|
27
27
|
* Default value falls through to the shipped English fallback in resolve().
|
|
28
28
|
* A consumer that doesn't render a provider still gets English defaults.
|
|
29
29
|
*/
|
|
30
|
-
export const InternationalizationContext =
|
|
30
|
+
export const InternationalizationContext = createSharedContext('InternationalizationContext', 1, {
|
|
31
31
|
locale: 'en',
|
|
32
32
|
direction: 'ltr',
|
|
33
33
|
messages: {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"englishFallback.d.ts","sourceRoot":"","sources":["../../src/i18n/englishFallback.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"englishFallback.d.ts","sourceRoot":"","sources":["../../src/i18n/englishFallback.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,SAAS,CAAC;AAU5C,2DAA2D;AAC3D,eAAO,MAAM,eAAe,EAAE,cAA2B,CAAC;AAE1D,sDAAsD;AACtD,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAEtE"}
|
|
@@ -27,7 +27,11 @@
|
|
|
27
27
|
* - /scripts/i18n-english-fallback.mjs
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
import { realmValue, sharedKey } from "../utils/sharedRealm.js";
|
|
31
|
+
|
|
32
|
+
// Every copy of Core registers into one map, so a context that one copy
|
|
33
|
+
// created resolves the English of another copy's components.
|
|
34
|
+
const registered = realmValue(sharedKey('i18n/english-fallback', 1), () => ({}));
|
|
31
35
|
|
|
32
36
|
/** The English registered so far, keyed by catalog key. */
|
|
33
37
|
export const englishFallback = registered;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rules P2 and P3 of the Unicode Bidirectional Algorithm: the direction of
|
|
3
|
+
* the first strongly directional character, or null when there is none. The
|
|
4
|
+
* loop reads whole code points, so a surrogate pair counts as one character.
|
|
5
|
+
*/
|
|
6
|
+
export declare function firstStrongDirection(text: string): 'ltr' | 'rtl' | null;
|
|
7
|
+
//# sourceMappingURL=firstStrongDirection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"firstStrongDirection.d.ts","sourceRoot":"","sources":["../../src/i18n/firstStrongDirection.ts"],"names":[],"mappings":"AAkDA;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,CAavE"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file firstStrongDirection.ts
|
|
5
|
+
* @input A string of text
|
|
6
|
+
* @output 'ltr' | 'rtl' | null — the direction of the text's first strongly
|
|
7
|
+
* directional character, or null when it has none
|
|
8
|
+
* @position Shared classifier for components that give a block of prose the
|
|
9
|
+
* direction of its own text (Markdown blocks). Server-safe: it reads no
|
|
10
|
+
* context.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
// Each expression with a Unicode property escape is built at runtime: a
|
|
14
|
+
// source build may rewrite a regular expression literal with one, and the
|
|
15
|
+
// Babel copy that Next.js bundles has no Unicode data to do that.
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The strongly right-to-left characters of the Unicode Bidirectional
|
|
19
|
+
* Algorithm: Bidi_Class `R` and `AL`. The living scripts are named. The two
|
|
20
|
+
* ranges cover the historic right-to-left scripts in the Supplementary
|
|
21
|
+
* Multilingual Plane, which have no script escapes that every engine knows.
|
|
22
|
+
*/
|
|
23
|
+
const STRONG_RTL = new RegExp(String.raw`[\p{Script=Adlam}\p{Script=Arabic}\p{Script=Hebrew}\p{Script=Mandaic}\p{Script=Nko}\p{Script=Samaritan}\p{Script=Syriac}\p{Script=Thaana}\u200F\u061C\u{10800}-\u{10FFF}\u{1E800}-\u{1EFFF}]`, 'u');
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The weak characters of the Arabic script: its digits, the number signs
|
|
27
|
+
* before them, and the currency and per-cent marks beside them. They are
|
|
28
|
+
* Bidi_Class `AN`, `EN` or `ET`, so the scan skips them. NKo and Adlam digits
|
|
29
|
+
* are Bidi_Class `R` and are not here.
|
|
30
|
+
*/
|
|
31
|
+
const WEAK_ARABIC_NUMBER = /[\u0600-\u0605\u0609\u060A\u0660-\u0669\u066A-\u066C\u06DD\u06F0-\u06F9\u0890\u0891\u08E2]/u;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Bidi_Class `L`: every other letter, the letter numbers (`\p{Letter}` does
|
|
35
|
+
* not include them), and the left-to-right mark. Digits, punctuation and
|
|
36
|
+
* symbols are not here, so the scan skips them.
|
|
37
|
+
*/
|
|
38
|
+
const STRONG_LTR = new RegExp(String.raw`[\p{Letter}\p{Nl}\u200E]`, 'u');
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Bidi_Class `NSM`: a combining mark takes the direction of its base
|
|
42
|
+
* character. A mark has its base letter's script, so without this check a
|
|
43
|
+
* leading Hebrew point would read as right-to-left.
|
|
44
|
+
*/
|
|
45
|
+
const COMBINING_MARK = new RegExp(String.raw`\p{Mark}`, 'u');
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Rules P2 and P3 of the Unicode Bidirectional Algorithm: the direction of
|
|
49
|
+
* the first strongly directional character, or null when there is none. The
|
|
50
|
+
* loop reads whole code points, so a surrogate pair counts as one character.
|
|
51
|
+
*/
|
|
52
|
+
export function firstStrongDirection(text) {
|
|
53
|
+
for (const character of text) {
|
|
54
|
+
if (COMBINING_MARK.test(character) || WEAK_ARABIC_NUMBER.test(character)) {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
if (STRONG_RTL.test(character)) {
|
|
58
|
+
return 'rtl';
|
|
59
|
+
}
|
|
60
|
+
if (STRONG_LTR.test(character)) {
|
|
61
|
+
return 'ltr';
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.generated.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated-locales/en.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"en.generated.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated-locales/en.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA8qBpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -243,6 +243,7 @@ const runtimeCatalog = {
|
|
|
243
243
|
'@astryx.sideNav.heading.openMenu': '{heading}, Open menu',
|
|
244
244
|
'@astryx.slider.minimumThumb': 'Minimum value',
|
|
245
245
|
'@astryx.slider.maximumThumb': 'Maximum value',
|
|
246
|
+
'@astryx.tabBar.badgedItem': '{label}, {badge}',
|
|
246
247
|
'@astryx.tabList.label': 'Tabs',
|
|
247
248
|
'@astryx.table.label': 'Table',
|
|
248
249
|
'@astryx.table.noData': 'No data',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pseudo.generated.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated-locales/pseudo.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"pseudo.generated.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated-locales/pseudo.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA0rBpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -243,6 +243,7 @@ const runtimeCatalog = {
|
|
|
243
243
|
'@astryx.sideNav.heading.openMenu': '⟦{heading}, Óþéñ ɱéñú⟧',
|
|
244
244
|
'@astryx.slider.minimumThumb': '⟦Ṁíñíɱúɱ ṽàłúé⟧',
|
|
245
245
|
'@astryx.slider.maximumThumb': '⟦Ṁàẋíɱúɱ ṽàłúé⟧',
|
|
246
|
+
'@astryx.tabBar.badgedItem': '⟦{label}, {badge}⟧',
|
|
246
247
|
'@astryx.tabList.label': '⟦Ţàƀš⟧',
|
|
247
248
|
'@astryx.table.label': '⟦Ţàƀłé⟧',
|
|
248
249
|
'@astryx.table.noData': '⟦Ñó ðàţà⟧',
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file scroll-anchoring.ts
|
|
3
|
+
* @input The scroll-anchoring owner module
|
|
4
|
+
* @output `@astryxdesign/core/internal/scroll-anchoring`: setScrollAnchoringOff,
|
|
5
|
+
* re-exported by name for Lab
|
|
6
|
+
* @position An internal entry reserved for Astryx's own packages. It is
|
|
7
|
+
* undocumented, outside the public API and its compatibility promise, and
|
|
8
|
+
* versioned in lockstep with Core. The `@astryx/no-core-internal-import`
|
|
9
|
+
* lint rule allows it only in Core and Lab. Core components import the
|
|
10
|
+
* owner module by relative path. Named re-exports only: the writer, never
|
|
11
|
+
* the attribute's name.
|
|
12
|
+
*
|
|
13
|
+
* SYNC: When modified, update scripts/sync-exports.js.
|
|
14
|
+
*/
|
|
15
|
+
export { setScrollAnchoringOff } from '../privateAttributes/scrollAnchoring.stylex.js';
|
|
16
|
+
//# sourceMappingURL=scroll-anchoring.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-anchoring.d.ts","sourceRoot":"","sources":["../../src/internal/scroll-anchoring.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAC,qBAAqB,EAAC,MAAM,6CAA6C,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
/**
|
|
3
|
+
* @file scroll-anchoring.ts
|
|
4
|
+
* @input The scroll-anchoring owner module
|
|
5
|
+
* @output `@astryxdesign/core/internal/scroll-anchoring`: setScrollAnchoringOff,
|
|
6
|
+
* re-exported by name for Lab
|
|
7
|
+
* @position An internal entry reserved for Astryx's own packages. It is
|
|
8
|
+
* undocumented, outside the public API and its compatibility promise, and
|
|
9
|
+
* versioned in lockstep with Core. The `@astryx/no-core-internal-import`
|
|
10
|
+
* lint rule allows it only in Core and Lab. Core components import the
|
|
11
|
+
* owner module by relative path. Named re-exports only: the writer, never
|
|
12
|
+
* the attribute's name.
|
|
13
|
+
*
|
|
14
|
+
* SYNC: When modified, update scripts/sync-exports.js.
|
|
15
|
+
*/
|
|
16
|
+
export { setScrollAnchoringOff } from "../privateAttributes/scrollAnchoring.stylex.js";
|
package/dist/internal/touch.d.ts
CHANGED
|
@@ -57,4 +57,6 @@ export { animatorFor } from '../motion/animator.js';
|
|
|
57
57
|
export { reducedMotionFade } from '../motion/reducedMotion.js';
|
|
58
58
|
export { useTouchHitArea } from '../utils/touchHitArea.js';
|
|
59
59
|
export { touchHitAreaStyles } from './touchHitArea.stylex.js';
|
|
60
|
+
export { useActionGroupTracking } from '../hooks/useActionGroupTracking.js';
|
|
61
|
+
export type { ActionGroupTrackingOptions } from '../hooks/useActionGroupTracking.js';
|
|
60
62
|
//# sourceMappingURL=touch.d.ts.map
|