@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
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* @file pressFeedback.ts
|
|
5
5
|
* @input The press state machine (pressGesture.ts), the menu-press and
|
|
6
|
-
* press-group markers
|
|
7
|
-
*
|
|
6
|
+
* press-group markers and the scroll-view test (scrollView.ts). Also the
|
|
7
|
+
* input clock (inputAge.ts) and the document's pointer, keyboard, scroll
|
|
8
|
+
* and visibility events
|
|
8
9
|
* @output PRESSABLE_ATTRIBUTE, PRESSED_ATTRIBUTE, pressableProps,
|
|
9
10
|
* pressFadeMs, installPressFeedback, cancelPress and installBoxHold
|
|
10
11
|
* @position The DOM half of the touch press model. usePressFeedback installs
|
|
@@ -28,8 +29,9 @@
|
|
|
28
29
|
//
|
|
29
30
|
// A finger waits only inside a scroller. Outside one, a surface highlights in
|
|
30
31
|
// the frame the finger lands, as a UIControl does. Inside one, it waits the
|
|
31
|
-
// content-touch delay, because the touch can become a scroll.
|
|
32
|
-
//
|
|
32
|
+
// content-touch delay, because the touch can become a scroll. The delay counts
|
|
33
|
+
// from the touch's own timestamp, so a late listener does not add to it. Rows
|
|
34
|
+
// follow the same rule.
|
|
33
35
|
//
|
|
34
36
|
// A surface's hold does nothing, so it keeps the browser's long-press text
|
|
35
37
|
// selection (AST-094). Only an element whose hold does something suppresses
|
|
@@ -43,6 +45,7 @@ import { reducedMotionFadeConsts } from "../motion/reducedMotion.stylex.js";
|
|
|
43
45
|
import { parseMotionRoleValue } from "../motion/roles.js";
|
|
44
46
|
import { subscribeInput } from "./inputStream.js";
|
|
45
47
|
import { isInsideScrollView } from "./scrollView.js";
|
|
48
|
+
import { msSinceInput } from "./inputAge.js";
|
|
46
49
|
import { TOUCH_QUERY } from "./touchPresentation.js";
|
|
47
50
|
import { holdsPressThroughDrag } from "../privateAttributes/pressHoldsDrag.stylex.js";
|
|
48
51
|
import { isTrackedByGroup } from "../privateAttributes/pressGroupItem.stylex.js";
|
|
@@ -269,7 +272,7 @@ function clearTimer(slot) {
|
|
|
269
272
|
* - The same during the fade strands `fading` and the tracking slot, which
|
|
270
273
|
* holds an element that a virtualized list may have unmounted.
|
|
271
274
|
*/
|
|
272
|
-
function apply(slot, step) {
|
|
275
|
+
function apply(slot, step, sinceEventMs = 0) {
|
|
273
276
|
const live = slot.live;
|
|
274
277
|
if (live == null) {
|
|
275
278
|
return;
|
|
@@ -301,8 +304,10 @@ function apply(slot, step) {
|
|
|
301
304
|
} else {
|
|
302
305
|
// A TIMER, never `requestAnimationFrame`: iOS throttles frame callbacks
|
|
303
306
|
// while a scroll runs, so a frame-based delay would fire late, after the
|
|
304
|
-
// scroll, and paint a control nobody is pressing any more.
|
|
305
|
-
|
|
307
|
+
// scroll, and paint a control nobody is pressing any more. The onset
|
|
308
|
+
// counts from the touch, so the time the listener waited comes off it.
|
|
309
|
+
const delay = kind === 'onset' ? Math.max(0, TIMER_MS.onset - sinceEventMs) : TIMER_MS[kind];
|
|
310
|
+
const timer = setTimeout(fire, delay);
|
|
306
311
|
live.timer = () => clearTimeout(timer);
|
|
307
312
|
}
|
|
308
313
|
}
|
|
@@ -537,7 +542,7 @@ function onPointerDown(event) {
|
|
|
537
542
|
x: event.clientX,
|
|
538
543
|
y: event.clientY,
|
|
539
544
|
delayed: isInsideScrollView(element)
|
|
540
|
-
}));
|
|
545
|
+
}), msSinceInput(event.timeStamp, event));
|
|
541
546
|
}
|
|
542
547
|
function onPointerMove(event) {
|
|
543
548
|
const live = finger.live;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectionLock.d.ts","sourceRoot":"","sources":["../../src/utils/selectionLock.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"selectionLock.d.ts","sourceRoot":"","sources":["../../src/utils/selectionLock.ts"],"names":[],"mappings":"AA2DA;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAE9D;AAWD;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,EAC3B,MAAM,EAAE,WAAW,GAAG,IAAI,GACzB,MAAM,IAAI,CA4BZ;AAED,mEAAmE;AACnE,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,4DAA4D;AAC5D,MAAM,WAAW,iBAAiB;IAChC,CAAC,OAAO,CAAC,EAAE,2BAA2B,GAAG,IAAI,CAAC;IAC9C;;;OAGG;IACH,iBAAiB,IAAI,IAAI,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,EAC3B,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,IAAI,EAAE,aAAa,CAAC,aAAa,CAAC,EAClC,UAAU,CAAC,EAAE,MAAM,IAAI,GACtB,iBAAiB,CAuGnB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC9B,aAAa,CAAC,aAAa,CAAC,CAiB9B;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,QAAQ,EACb,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,MAAM,EAAE,WAAW,GAAG,IAAI,GACzB,OAAO,CA6CT;AAYD,sEAAsE;AACtE,wBAAgB,OAAO,CACrB,GAAG,EAAE,QAAQ,EACb,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,WAAW,EAAE,aAAa,CAAC,UAAU,CAAC,GACrC;IAAC,IAAI,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,GAAG,IAAI,CA4BrC"}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
//
|
|
29
29
|
// A mouse never takes the lock, so its released behavior stays (AST-017).
|
|
30
30
|
|
|
31
|
-
import { containsAlongFlatTree, deepActiveElement, parentAcrossShadow } from "./flatTree.js";
|
|
31
|
+
import { containsAlongFlatTree, deepActiveElement, parentAcrossShadow, shadowHostOf, shadowRootsOutward } from "./flatTree.js";
|
|
32
32
|
import { subscribeInput } from "./inputStream.js";
|
|
33
33
|
import { isIosWebKit } from "./touchQueries.js";
|
|
34
34
|
import { isElement, isNode } from "./nodeType.js";
|
|
@@ -256,7 +256,7 @@ export function startsOnSelectableText(doc, x, y, target) {
|
|
|
256
256
|
return false;
|
|
257
257
|
}
|
|
258
258
|
// Text directly under a shadow root takes its host's style.
|
|
259
|
-
const element = node.parentElement ?? (node.parentNode
|
|
259
|
+
const element = node.parentElement ?? (node.parentNode == null ? null : shadowHostOf(node.parentNode));
|
|
260
260
|
if (element == null || !allowsSelection(element) || isInButton(node)) {
|
|
261
261
|
return false;
|
|
262
262
|
}
|
|
@@ -463,19 +463,12 @@ function ownShadowRoot(target) {
|
|
|
463
463
|
|
|
464
464
|
/** The open shadow roots on `target`'s root chain, innermost first. */
|
|
465
465
|
function openShadowRootsOf(target) {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
while (root != null && root.nodeType === 11) {
|
|
469
|
-
const host = root.host;
|
|
470
|
-
if (host == null) {
|
|
471
|
-
break;
|
|
472
|
-
}
|
|
473
|
-
if (root.mode === 'open') {
|
|
474
|
-
roots.push(root);
|
|
475
|
-
}
|
|
476
|
-
root = host.getRootNode();
|
|
466
|
+
if (target == null || typeof target.nodeType !== 'number') {
|
|
467
|
+
return [];
|
|
477
468
|
}
|
|
478
|
-
return
|
|
469
|
+
return shadowRootsOutward(target.getRootNode()).map(({
|
|
470
|
+
root
|
|
471
|
+
}) => root).filter(root => root.mode === 'open');
|
|
479
472
|
}
|
|
480
473
|
|
|
481
474
|
/**
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file sharedContext.ts
|
|
3
|
+
* @input A registered name and its protocol version
|
|
4
|
+
* @output A React context per key and React, shared by every copy of Core
|
|
5
|
+
* that runs on that React
|
|
6
|
+
* @position Shared runtime state: a swizzled copy and the package use the same
|
|
7
|
+
* contexts and stores when their protocol versions match
|
|
8
|
+
*/
|
|
9
|
+
import { type Context } from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* A React context registered under a versioned key, so a provider in one copy
|
|
12
|
+
* of Core reaches consumers in another. Each React gets its own context under
|
|
13
|
+
* the key: a server can load two Reacts, and a streaming render leaves context
|
|
14
|
+
* values that only its own React restores, so requests on two Reacts must not
|
|
15
|
+
* share a context.
|
|
16
|
+
*/
|
|
17
|
+
export declare function createSharedContext<T>(name: string, version: number, defaultValue: T): Context<T>;
|
|
18
|
+
//# sourceMappingURL=sharedContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharedContext.d.ts","sourceRoot":"","sources":["../../src/utils/sharedContext.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH,OAAO,EAAgB,KAAK,OAAO,EAAC,MAAM,OAAO,CAAC;AAGlD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,CAAC,GACd,OAAO,CAAC,CAAC,CAAC,CAcZ"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @file sharedContext.ts
|
|
7
|
+
* @input A registered name and its protocol version
|
|
8
|
+
* @output A React context per key and React, shared by every copy of Core
|
|
9
|
+
* that runs on that React
|
|
10
|
+
* @position Shared runtime state: a swizzled copy and the package use the same
|
|
11
|
+
* contexts and stores when their protocol versions match
|
|
12
|
+
*/
|
|
13
|
+
import { createContext } from 'react';
|
|
14
|
+
import { realmValue, sharedKey } from "./sharedRealm.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A React context registered under a versioned key, so a provider in one copy
|
|
18
|
+
* of Core reaches consumers in another. Each React gets its own context under
|
|
19
|
+
* the key: a server can load two Reacts, and a streaming render leaves context
|
|
20
|
+
* values that only its own React restores, so requests on two Reacts must not
|
|
21
|
+
* share a context.
|
|
22
|
+
*/
|
|
23
|
+
export function createSharedContext(name, version, defaultValue) {
|
|
24
|
+
const byReact = realmValue(sharedKey(`context/${name}`, version), () => new WeakMap(), value => value instanceof WeakMap);
|
|
25
|
+
const existing = byReact.get(createContext);
|
|
26
|
+
if (existing != null) {
|
|
27
|
+
return existing;
|
|
28
|
+
}
|
|
29
|
+
const SharedContext = /*#__PURE__*/createContext(defaultValue);
|
|
30
|
+
SharedContext.displayName = name;
|
|
31
|
+
byReact.set(createContext, SharedContext);
|
|
32
|
+
return SharedContext;
|
|
33
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file sharedRealm.ts
|
|
3
|
+
* @input A registered name and its protocol version
|
|
4
|
+
* @output One value per key in the JavaScript realm, shared by every copy of
|
|
5
|
+
* Core
|
|
6
|
+
* @position Shared runtime state for stores and contexts; no React and no
|
|
7
|
+
* client directive, so server-safe modules can use it
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* The registered key of a shared value. The version names the value's shape.
|
|
11
|
+
* Change it when a copy built against the old shape cannot read the value.
|
|
12
|
+
* Each copy then keeps its own value.
|
|
13
|
+
*/
|
|
14
|
+
export declare function sharedKey(name: string, version: number): symbol;
|
|
15
|
+
/**
|
|
16
|
+
* The value under `key` in this JavaScript realm, created on first use. Every
|
|
17
|
+
* copy of Core that asks for the same key gets the same value.
|
|
18
|
+
*
|
|
19
|
+
* The key names the protocol version, so a value found under it has this
|
|
20
|
+
* protocol's shape. `accepts` guards against a key collision: a value it
|
|
21
|
+
* rejects is left in place, and this copy keeps a value of its own.
|
|
22
|
+
*/
|
|
23
|
+
export declare function realmValue<T>(key: symbol, create: () => T, accepts?: (value: unknown) => boolean): T;
|
|
24
|
+
//# sourceMappingURL=sharedRealm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharedRealm.d.ts","sourceRoot":"","sources":["../../src/utils/sharedRealm.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAC1B,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,CAAC,EACf,OAAO,GAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAoB,GAChD,CAAC,CASH"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file sharedRealm.ts
|
|
5
|
+
* @input A registered name and its protocol version
|
|
6
|
+
* @output One value per key in the JavaScript realm, shared by every copy of
|
|
7
|
+
* Core
|
|
8
|
+
* @position Shared runtime state for stores and contexts; no React and no
|
|
9
|
+
* client directive, so server-safe modules can use it
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The registered key of a shared value. The version names the value's shape.
|
|
14
|
+
* Change it when a copy built against the old shape cannot read the value.
|
|
15
|
+
* Each copy then keeps its own value.
|
|
16
|
+
*/
|
|
17
|
+
export function sharedKey(name, version) {
|
|
18
|
+
return Symbol.for(`@astryxdesign/core/${name}/v${version}`);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The value under `key` in this JavaScript realm, created on first use. Every
|
|
23
|
+
* copy of Core that asks for the same key gets the same value.
|
|
24
|
+
*
|
|
25
|
+
* The key names the protocol version, so a value found under it has this
|
|
26
|
+
* protocol's shape. `accepts` guards against a key collision: a value it
|
|
27
|
+
* rejects is left in place, and this copy keeps a value of its own.
|
|
28
|
+
*/
|
|
29
|
+
export function realmValue(key, create, accepts = () => true) {
|
|
30
|
+
const realm = globalThis;
|
|
31
|
+
if (Object.hasOwn(realm, key)) {
|
|
32
|
+
const existing = realm[key];
|
|
33
|
+
return accepts(existing) ? existing : create();
|
|
34
|
+
}
|
|
35
|
+
const value = create();
|
|
36
|
+
realm[key] = value;
|
|
37
|
+
return value;
|
|
38
|
+
}
|
package/locales/en.json
CHANGED
|
@@ -943,6 +943,10 @@
|
|
|
943
943
|
"defaultMessage": "Maximum value",
|
|
944
944
|
"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."
|
|
945
945
|
},
|
|
946
|
+
"@astryx.tabBar.badgedItem": {
|
|
947
|
+
"defaultMessage": "{label}, {badge}",
|
|
948
|
+
"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."
|
|
949
|
+
},
|
|
946
950
|
"@astryx.tabList.label": {
|
|
947
951
|
"defaultMessage": "Tabs",
|
|
948
952
|
"description": "Screen-reader-only fallback name for a horizontal tab bar. Plural noun; \"Tabs\" here = UI tab panels, not browser tabs or the Tab key."
|
package/locales/pseudo.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/core",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.12-canary.ccb4a6d",
|
|
4
4
|
"displayName": "Astryx Core",
|
|
5
5
|
"description": "The component library. Accessible, themeable React components with built-in spacing, dark mode, and StyleX styling.",
|
|
6
6
|
"author": "Meta Open Source",
|
|
@@ -863,6 +863,11 @@
|
|
|
863
863
|
"source": "./src/internal/dialog-context.ts",
|
|
864
864
|
"types": "./dist/internal/dialog-context.d.ts",
|
|
865
865
|
"default": "./dist/internal/dialog-context.js"
|
|
866
|
+
},
|
|
867
|
+
"./internal/scroll-anchoring": {
|
|
868
|
+
"source": "./src/internal/scroll-anchoring.ts",
|
|
869
|
+
"types": "./dist/internal/scroll-anchoring.d.ts",
|
|
870
|
+
"default": "./dist/internal/scroll-anchoring.js"
|
|
866
871
|
}
|
|
867
872
|
},
|
|
868
873
|
"files": [
|
|
@@ -895,6 +900,9 @@
|
|
|
895
900
|
"react-dom": ">=19.0.0"
|
|
896
901
|
},
|
|
897
902
|
"devDependencies": {
|
|
903
|
+
"@astryxdesign/a11y-spec": "0.7.12-canary.ccb4a6d",
|
|
904
|
+
"@astryxdesign/cli": "0.7.12-canary.ccb4a6d",
|
|
905
|
+
"@astryxdesign/interaction-harness": "0.7.12-canary.ccb4a6d",
|
|
898
906
|
"@babel/cli": "^7.29.7",
|
|
899
907
|
"@babel/core": "^7.29.7",
|
|
900
908
|
"@babel/preset-react": "^7.29.7",
|
|
@@ -906,10 +914,7 @@
|
|
|
906
914
|
"@testing-library/react": "^16.3.2",
|
|
907
915
|
"@types/babel__core": "^7.20.5",
|
|
908
916
|
"tailwindcss": "^4.3.2",
|
|
909
|
-
"temporal-polyfill": "^1.0.6"
|
|
910
|
-
"@astryxdesign/cli": "0.7.11",
|
|
911
|
-
"@astryxdesign/interaction-harness": "0.0.0",
|
|
912
|
-
"@astryxdesign/a11y-spec": "0.0.0"
|
|
917
|
+
"temporal-polyfill": "^1.0.6"
|
|
913
918
|
},
|
|
914
919
|
"dependencies": {
|
|
915
920
|
"intl-messageformat": "^11.2.9"
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file AppShellMobileContext.tsx
|
|
7
|
-
* @input Uses
|
|
7
|
+
* @input Uses createSharedContext, use
|
|
8
8
|
* @output Exports AppShellMobileContext, useAppShellMobile
|
|
9
9
|
* @position Internal context for mobile nav state; consumed by MobileNavToggle, TopNav (future)
|
|
10
10
|
*
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
* to adapt rendering based on mobile context.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import {
|
|
16
|
+
import {use} from 'react';
|
|
17
|
+
import {createSharedContext} from '../utils/sharedContext';
|
|
17
18
|
|
|
18
19
|
export interface AppShellMobileContextValue {
|
|
19
20
|
/** Whether the viewport is below the mobile breakpoint */
|
|
@@ -51,7 +52,11 @@ const defaultValue: AppShellMobileContextValue = {
|
|
|
51
52
|
};
|
|
52
53
|
|
|
53
54
|
export const AppShellMobileContext =
|
|
54
|
-
|
|
55
|
+
createSharedContext<AppShellMobileContextValue>(
|
|
56
|
+
'AppShellMobileContext',
|
|
57
|
+
1,
|
|
58
|
+
defaultValue,
|
|
59
|
+
);
|
|
55
60
|
AppShellMobileContext.displayName = 'AppShellMobileContext';
|
|
56
61
|
|
|
57
62
|
/**
|
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
* @position Private to AppShell; keeps main-region ids unique on a page
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import {
|
|
14
|
+
import {use, useId, useState, useSyncExternalStore} from 'react';
|
|
15
15
|
import {useIsomorphicLayoutEffect} from '../hooks/useIsomorphicLayoutEffect';
|
|
16
|
+
import {createSharedContext} from '../utils/sharedContext';
|
|
16
17
|
|
|
17
18
|
/** The id of the first mounted shell's main region. Consumers link to it. */
|
|
18
19
|
export const MAIN_CONTENT_ID = 'astryx-app-shell-main';
|
|
@@ -21,7 +22,11 @@ export const MAIN_CONTENT_ID = 'astryx-app-shell-main';
|
|
|
21
22
|
* True inside an AppShell. A shell nested in another shell's content never
|
|
22
23
|
* takes the fixed id: the page's own shell keeps it.
|
|
23
24
|
*/
|
|
24
|
-
export const AppShellNestingContext =
|
|
25
|
+
export const AppShellNestingContext = createSharedContext(
|
|
26
|
+
'AppShellNestingContext',
|
|
27
|
+
1,
|
|
28
|
+
false,
|
|
29
|
+
);
|
|
25
30
|
AppShellNestingContext.displayName = 'AppShellNestingContext';
|
|
26
31
|
|
|
27
32
|
const claims: object[] = [];
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* - /packages/core/src/Avatar/Avatar.doc.mjs
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {createLayerScopedContext
|
|
15
|
+
import {createLayerScopedContext} from '../Layer/layerScopedContext';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Context that provides the resolved numeric avatar size (in pixels)
|
|
@@ -20,5 +20,9 @@ import {createLayerScopedContext as createContext} from '../Layer/layerScopedCon
|
|
|
20
20
|
*
|
|
21
21
|
* Default value of 36 matches the default 'md' avatar size.
|
|
22
22
|
*/
|
|
23
|
-
export const AvatarSizeContext =
|
|
23
|
+
export const AvatarSizeContext = createLayerScopedContext<number>(
|
|
24
|
+
'AvatarSizeContext',
|
|
25
|
+
1,
|
|
26
|
+
36,
|
|
27
|
+
);
|
|
24
28
|
AvatarSizeContext.displayName = 'AvatarSizeContext';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file AvatarStatusLabelContext.ts
|
|
7
|
-
* @input Uses
|
|
7
|
+
* @input Uses createSharedContext, RefObject
|
|
8
8
|
* @output Exports AvatarStatusLabelContext, AvatarStatusLabelTarget
|
|
9
9
|
* @position Internal context; provided by Avatar, consumed by AvatarStatusDot
|
|
10
10
|
*
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
* - /packages/core/src/Avatar/Avatar.doc.mjs
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import
|
|
15
|
+
import type {RefObject} from 'react';
|
|
16
|
+
import {createSharedContext} from '../utils/sharedContext';
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* The box a status element writes its label into.
|
|
@@ -43,5 +44,9 @@ export interface AvatarStatusLabelTarget {
|
|
|
43
44
|
* Avatar, where a standalone dot names itself and has nobody to report to.
|
|
44
45
|
*/
|
|
45
46
|
export const AvatarStatusLabelContext =
|
|
46
|
-
|
|
47
|
+
createSharedContext<RefObject<AvatarStatusLabelTarget> | null>(
|
|
48
|
+
'AvatarStatusLabelContext',
|
|
49
|
+
1,
|
|
50
|
+
null,
|
|
51
|
+
);
|
|
47
52
|
AvatarStatusLabelContext.displayName = 'AvatarStatusLabelContext';
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import {use} from 'react';
|
|
12
|
-
import {createLayerScopedContext
|
|
12
|
+
import {createLayerScopedContext} from '../Layer/layerScopedContext';
|
|
13
13
|
import type {AvatarShape, AvatarSize} from '../Avatar';
|
|
14
14
|
|
|
15
15
|
export interface AvatarGroupContextValue {
|
|
@@ -19,9 +19,12 @@ export interface AvatarGroupContextValue {
|
|
|
19
19
|
numericSize: number;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
export const AvatarGroupContext =
|
|
23
|
-
null
|
|
24
|
-
|
|
22
|
+
export const AvatarGroupContext =
|
|
23
|
+
createLayerScopedContext<AvatarGroupContextValue | null>(
|
|
24
|
+
'AvatarGroupContext',
|
|
25
|
+
1,
|
|
26
|
+
null,
|
|
27
|
+
);
|
|
25
28
|
AvatarGroupContext.displayName = 'AvatarGroupContext';
|
|
26
29
|
|
|
27
30
|
export function useAvatarGroup(): AvatarGroupContextValue | null {
|
|
@@ -15,21 +15,25 @@
|
|
|
15
15
|
* - /packages/core/src/BottomSheet/BottomSheetStacking.test.tsx
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
+
import {createSharedContext} from '../utils/sharedContext';
|
|
19
|
+
|
|
18
20
|
// A sheet rendered in another sheet's content is presented only while its
|
|
19
21
|
// host is open. Without this, a host that closes from code would leave the
|
|
20
22
|
// inner dialog open in the top layer with no box: an invisible modal that
|
|
21
23
|
// blocks the page. The host never writes the inner sheet's state. At the
|
|
22
24
|
// root the context is null, which reads as open.
|
|
23
25
|
|
|
24
|
-
import {createContext} from 'react';
|
|
25
|
-
|
|
26
26
|
export interface BottomSheetHostContextValue {
|
|
27
27
|
/** Whether the host sheet is open; a closing host reads false at once. */
|
|
28
28
|
isOpen: boolean;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export const BottomSheetHostContext =
|
|
32
|
-
|
|
32
|
+
createSharedContext<BottomSheetHostContextValue | null>(
|
|
33
|
+
'BottomSheetHostContext',
|
|
34
|
+
1,
|
|
35
|
+
null,
|
|
36
|
+
);
|
|
33
37
|
BottomSheetHostContext.displayName = 'BottomSheetHostContext';
|
|
34
38
|
|
|
35
39
|
export const OPEN_BOTTOM_SHEET_HOST: BottomSheetHostContextValue = {
|
|
@@ -185,8 +185,53 @@ function layoutViewportHeight(): number {
|
|
|
185
185
|
return typeof window === 'undefined' ? 0 : window.innerHeight;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
// The layout viewport's height, as the `resize` listener last read it. While
|
|
189
|
+
// the listener runs, a render reads this value, never `innerHeight`. After a
|
|
190
|
+
// commit's DOM writes, a read of `innerHeight` forces a style recalculation
|
|
191
|
+
// and a layout. Open sheets share one listener. With no sheet open, the value
|
|
192
|
+
// is null, because nothing keeps it current.
|
|
193
|
+
let viewportHeight: number | null = null;
|
|
194
|
+
const viewportHeightListeners = new Set<() => void>();
|
|
195
|
+
let stopViewportResize: (() => void) | null = null;
|
|
196
|
+
|
|
197
|
+
function handleViewportResize(): void {
|
|
198
|
+
viewportHeight = layoutViewportHeight();
|
|
199
|
+
for (const listener of viewportHeightListeners) {
|
|
200
|
+
listener();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
function subscribeToViewportHeight(onChange: () => void): () => void {
|
|
205
|
+
viewportHeightListeners.add(onChange);
|
|
206
|
+
if (stopViewportResize == null) {
|
|
207
|
+
stopViewportResize = subscribeInput(window, 'resize', handleViewportResize);
|
|
208
|
+
// A resize between the first render and this listener has no event left
|
|
209
|
+
// to deliver. So read the height now, and let React compare it with the
|
|
210
|
+
// height it rendered.
|
|
211
|
+
viewportHeight = layoutViewportHeight();
|
|
212
|
+
onChange();
|
|
213
|
+
}
|
|
214
|
+
return () => {
|
|
215
|
+
viewportHeightListeners.delete(onChange);
|
|
216
|
+
if (viewportHeightListeners.size === 0) {
|
|
217
|
+
stopViewportResize?.();
|
|
218
|
+
stopViewportResize = null;
|
|
219
|
+
viewportHeight = null;
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
function readViewportHeight(): number {
|
|
225
|
+
// Without a listener, nothing keeps a stored height current.
|
|
226
|
+
if (stopViewportResize == null) {
|
|
227
|
+
return layoutViewportHeight();
|
|
228
|
+
}
|
|
229
|
+
viewportHeight ??= layoutViewportHeight();
|
|
230
|
+
return viewportHeight;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function readNoViewportHeight(): number {
|
|
234
|
+
return 0;
|
|
190
235
|
}
|
|
191
236
|
|
|
192
237
|
function subscribeToNothing(): () => void {
|
|
@@ -769,13 +814,17 @@ export function BottomSheetPanel({
|
|
|
769
814
|
// sizes, which nothing extends by the reserve; the stretch stops at it.
|
|
770
815
|
const hasTouchPointer = useMediaQuery('(any-pointer: coarse)');
|
|
771
816
|
const tracksViewport = isPresented && hasTouchPointer && !isSizedByCaller;
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
817
|
+
// Each argument is a module function, so React keeps one snapshot function
|
|
818
|
+
// across renders and does not re-read it in the commit.
|
|
819
|
+
const trackedViewportHeight = useSyncExternalStore(
|
|
820
|
+
tracksViewport ? subscribeToViewportHeight : subscribeToNothing,
|
|
821
|
+
tracksViewport ? readViewportHeight : readNoViewportHeight,
|
|
822
|
+
readNoViewportHeight,
|
|
776
823
|
);
|
|
777
824
|
const reserve =
|
|
778
|
-
|
|
825
|
+
trackedViewportHeight > 0
|
|
826
|
+
? sheetReserve(trackedViewportHeight)
|
|
827
|
+
: MIN_RESERVE;
|
|
779
828
|
const {
|
|
780
829
|
contentProps,
|
|
781
830
|
handleProps,
|
|
@@ -19,10 +19,11 @@ import type {
|
|
|
19
19
|
MouseEvent as ReactMouseEvent,
|
|
20
20
|
SyntheticEvent,
|
|
21
21
|
} from 'react';
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
import type {BaseProps} from '../BaseProps';
|
|
24
24
|
import type {DialogPurpose} from '../Dialog';
|
|
25
25
|
import type {BottomSheetStackView} from './bottomSheetStack';
|
|
26
|
+
import {createSharedContext} from '../utils/sharedContext';
|
|
26
27
|
|
|
27
28
|
export type BottomSheetSwitcherPhase =
|
|
28
29
|
| 'entering'
|
|
@@ -115,6 +116,10 @@ export interface BottomSheetSwitcherContextValue {
|
|
|
115
116
|
}
|
|
116
117
|
|
|
117
118
|
export const BottomSheetSwitcherContext =
|
|
118
|
-
|
|
119
|
+
createSharedContext<BottomSheetSwitcherContextValue | null>(
|
|
120
|
+
'BottomSheetSwitcherContext',
|
|
121
|
+
1,
|
|
122
|
+
null,
|
|
123
|
+
);
|
|
119
124
|
|
|
120
125
|
BottomSheetSwitcherContext.displayName = 'BottomSheetSwitcherContext';
|
|
@@ -14,8 +14,12 @@
|
|
|
14
14
|
* is unchanged.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import {createSharedContext} from '../utils/sharedContext';
|
|
18
18
|
|
|
19
19
|
/** Whether Escape may dismiss the sheet; `purpose="required"` still blocks it. */
|
|
20
|
-
export const BottomSheetEscapeContext =
|
|
20
|
+
export const BottomSheetEscapeContext = createSharedContext(
|
|
21
|
+
'BottomSheetEscapeContext',
|
|
22
|
+
1,
|
|
23
|
+
true,
|
|
24
|
+
);
|
|
21
25
|
BottomSheetEscapeContext.displayName = 'BottomSheetEscapeContext';
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
|
|
53
53
|
import {notifyTopLayerEntry} from '../Layer/modalOutlet';
|
|
54
54
|
import {focusForLastInput, returnFocusForLastInput} from '../utils/focusReturn';
|
|
55
|
+
import {realmValue} from '../utils/sharedRealm';
|
|
55
56
|
|
|
56
57
|
export interface BottomSheetStackView {
|
|
57
58
|
/** Another modal sheet is presented alongside this one. */
|
|
@@ -340,20 +341,11 @@ function createStackState(): StackState {
|
|
|
340
341
|
};
|
|
341
342
|
}
|
|
342
343
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
// protocol's; the shape check is the guard against a key collision.
|
|
349
|
-
return shared.shape === STACK_STATE_SHAPE ? shared : createStackState();
|
|
350
|
-
}
|
|
351
|
-
const created = createStackState();
|
|
352
|
-
holder[STACK_STATE_KEY] = created;
|
|
353
|
-
return created;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
const state = acquireStackState();
|
|
344
|
+
const state = realmValue(
|
|
345
|
+
STACK_STATE_KEY,
|
|
346
|
+
createStackState,
|
|
347
|
+
shared => (shared as StackState | null)?.shape === STACK_STATE_SHAPE,
|
|
348
|
+
);
|
|
357
349
|
|
|
358
350
|
function takeRank(): Rank {
|
|
359
351
|
state.isBatchDirty = true;
|