@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
|
@@ -41,6 +41,7 @@ import { Citation } from "../Citation/Citation.js";
|
|
|
41
41
|
import { useLinkComponent } from "../Link/useLinkComponent.js";
|
|
42
42
|
import { parseInlineAst, parseMarkdownAst, parseMarkdownAstIncremental, createIncrementalState, trimStreamingArtifacts } from "./parser.js";
|
|
43
43
|
import { getMarkdownAstLegacyCodeLanguage, markdownAstText } from "./ast.js";
|
|
44
|
+
import { blockDirection, innerDirectionScope } from "./blockDirection.js";
|
|
44
45
|
import { applyMarkdownTransforms, getMarkdownExtensionRenderer, markdownExtensionText, prepareMarkdownPlugins, reportMarkdownPluginFailure } from "./plugins/protocol.js";
|
|
45
46
|
import { getMarkdownFenceProposal } from "./plugins/semanticFence.js";
|
|
46
47
|
import { MarkdownPluginBoundary, renderMarkdownPluginNode } from "./plugin-renderer/MarkdownPluginNodeRenderer.js";
|
|
@@ -49,6 +50,7 @@ import { projectMarkdownHeadings } from "./headingProjection.js";
|
|
|
49
50
|
import { HeadingLinksRenderer, headingLinksHeadingStyle } from "./plugins/HeadingLinksRenderer.js";
|
|
50
51
|
import { themeProps } from "../utils/themeProps.js";
|
|
51
52
|
import { registerEnglishFallback, useComponentTranslator } from "../i18n/useComponentTranslator.js";
|
|
53
|
+
import { useDirection } from "../i18n/useDirection.js";
|
|
52
54
|
import english from "../i18n/generated-english/Markdown/Markdown.generated.js";
|
|
53
55
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
54
56
|
registerEnglishFallback(english);
|
|
@@ -146,6 +148,10 @@ const dynamicStyles = {
|
|
|
146
148
|
}]
|
|
147
149
|
};
|
|
148
150
|
const cellAlignStyles = {
|
|
151
|
+
start: {
|
|
152
|
+
k9WMMc: "x1yc453h",
|
|
153
|
+
$$css: true
|
|
154
|
+
},
|
|
149
155
|
center: {
|
|
150
156
|
k9WMMc: "x2b8uid",
|
|
151
157
|
$$css: true
|
|
@@ -203,6 +209,13 @@ const markdownTableCellStyles = {
|
|
|
203
209
|
kTgw9: "x1lldw8n",
|
|
204
210
|
$$css: true
|
|
205
211
|
},
|
|
212
|
+
ruleOnTableEnd: {
|
|
213
|
+
ke9TFa: "x10w94by",
|
|
214
|
+
k2ei4v: "xgbv0en x19mtlqq",
|
|
215
|
+
kVhnKS: "x1t7ytsu",
|
|
216
|
+
kGJrpR: "x1j92z86",
|
|
217
|
+
$$css: true
|
|
218
|
+
},
|
|
206
219
|
tableOuterEdge: {
|
|
207
220
|
kMzoRj: "x1litavf",
|
|
208
221
|
ksu8eU: "x1y0btm7",
|
|
@@ -934,11 +947,20 @@ function computeTableColumnMinWidths(node) {
|
|
|
934
947
|
return Math.min(TABLE_COLUMN_MAX_CH, Math.max(TABLE_COLUMN_MIN_CH, bodyFloor, headerFloor));
|
|
935
948
|
});
|
|
936
949
|
}
|
|
950
|
+
|
|
951
|
+
/**
|
|
952
|
+
* The alignment and column-rule styles for a Markdown table cell. For a cell
|
|
953
|
+
* that reads against its table, the table's start is the cell's end, so an
|
|
954
|
+
* explicit alignment and the rule swap logical sides.
|
|
955
|
+
*/
|
|
956
|
+
function tableCellSideStyles(align, isAgainstTable) {
|
|
957
|
+
return [align === 'center' && cellAlignStyles.center, align === 'right' && (isAgainstTable ? cellAlignStyles.start : cellAlignStyles.end), align === 'left' && isAgainstTable && cellAlignStyles.end, isAgainstTable && markdownTableCellStyles.ruleOnTableEnd];
|
|
958
|
+
}
|
|
937
959
|
function renderBlock(node, index, blockCount, density, headingLevelStart, onLinkClick, cursor, citationCtx, contentWidthValue, contentAlign, linkComponent = 'a', inlinePlugins, components, preparedPlugins, t,
|
|
938
960
|
// Language values fences may name (component:Markdown FR30).
|
|
939
961
|
codeLanguages, headingProjection,
|
|
940
962
|
// How many lists enclose this block (spec:AST-061 DEC-6).
|
|
941
|
-
listDepth = 0) {
|
|
963
|
+
listDepth = 0, directionScope) {
|
|
942
964
|
const blockAlignMargin = BLOCK_ALIGN_MARGIN[contentAlign];
|
|
943
965
|
const blockAlignStyle = blockAlignMargin != null ? dynamicStyles.blockAlign(blockAlignMargin) : null;
|
|
944
966
|
const spacing = getElementSpacing(node, density);
|
|
@@ -973,6 +995,7 @@ listDepth = 0) {
|
|
|
973
995
|
if (permalinkUrl == null || headingId == null) {
|
|
974
996
|
return /*#__PURE__*/_jsx(Tag, {
|
|
975
997
|
id: headingId,
|
|
998
|
+
dir: blockDirection(node, directionScope),
|
|
976
999
|
...mergeProps(themeProps('markdown-heading', {
|
|
977
1000
|
density,
|
|
978
1001
|
level
|
|
@@ -982,6 +1005,7 @@ listDepth = 0) {
|
|
|
982
1005
|
}, index);
|
|
983
1006
|
}
|
|
984
1007
|
return /*#__PURE__*/_jsx(HeadingLinksRenderer, {
|
|
1008
|
+
dir: blockDirection(node, directionScope),
|
|
985
1009
|
headingId: headingId,
|
|
986
1010
|
headingLabel: headingLabel,
|
|
987
1011
|
permalinkUrl: permalinkUrl,
|
|
@@ -1021,6 +1045,7 @@ listDepth = 0) {
|
|
|
1021
1045
|
// element can still pass components={{paragraph: 'p'}}.
|
|
1022
1046
|
return /*#__PURE__*/_jsx("div", {
|
|
1023
1047
|
role: "paragraph",
|
|
1048
|
+
dir: blockDirection(node, directionScope),
|
|
1024
1049
|
...mergeProps(themeProps('markdown-paragraph', {
|
|
1025
1050
|
density
|
|
1026
1051
|
}), stylex.props(spacing, contentWidthValue != null ? dynamicStyles.proseWidth(contentWidthValue) : null, contentAlign !== 'start' ? dynamicStyles.proseAlign(ALIGN_MARGIN[contentAlign]) : null, isFirst && styles.noMarginBlockStart, isLast && styles.noMarginBlockEnd)),
|
|
@@ -1128,19 +1153,20 @@ listDepth = 0) {
|
|
|
1128
1153
|
{
|
|
1129
1154
|
const BlockquoteComp = components?.blockquote;
|
|
1130
1155
|
if (BlockquoteComp) {
|
|
1131
|
-
const bqC = node.children.map((c, i) => renderBlock(c, i, node.children.length, density, headingLevelStart, onLinkClick, cursor, citationCtx, contentWidthValue, contentAlign, linkComponent, inlinePlugins, components, preparedPlugins, t, codeLanguages, headingProjection, listDepth));
|
|
1156
|
+
const bqC = node.children.map((c, i) => renderBlock(c, i, node.children.length, density, headingLevelStart, onLinkClick, cursor, citationCtx, contentWidthValue, contentAlign, linkComponent, inlinePlugins, components, preparedPlugins, t, codeLanguages, headingProjection, listDepth, directionScope));
|
|
1132
1157
|
return /*#__PURE__*/_jsx(BlockquoteComp, {
|
|
1133
1158
|
...lineProp,
|
|
1134
1159
|
children: bqC
|
|
1135
1160
|
}, index);
|
|
1136
1161
|
}
|
|
1137
1162
|
return /*#__PURE__*/_jsx(Blockquote, {
|
|
1163
|
+
dir: blockDirection(node, directionScope),
|
|
1138
1164
|
...themeProps('markdown-blockquote', {
|
|
1139
1165
|
density
|
|
1140
1166
|
}),
|
|
1141
1167
|
...lineStamps,
|
|
1142
1168
|
xstyle: [spacing, contentWidthValue != null ? dynamicStyles.proseWidth(contentWidthValue) : undefined, contentAlign !== 'start' ? dynamicStyles.proseAlign(ALIGN_MARGIN[contentAlign]) : undefined, isFirst && styles.noMarginBlockStart, isLast && styles.noMarginBlockEnd],
|
|
1143
|
-
children: node.children.map((c, i) => renderBlock(c, i, node.children.length, density, headingLevelStart, onLinkClick, cursor, citationCtx, contentWidthValue, contentAlign, linkComponent, inlinePlugins, components, preparedPlugins, t, codeLanguages, headingProjection, listDepth))
|
|
1169
|
+
children: node.children.map((c, i) => renderBlock(c, i, node.children.length, density, headingLevelStart, onLinkClick, cursor, citationCtx, contentWidthValue, contentAlign, linkComponent, inlinePlugins, components, preparedPlugins, t, codeLanguages, headingProjection, listDepth, innerDirectionScope(node, directionScope)))
|
|
1144
1170
|
}, index);
|
|
1145
1171
|
}
|
|
1146
1172
|
case 'list':
|
|
@@ -1162,7 +1188,7 @@ listDepth = 0) {
|
|
|
1162
1188
|
return /*#__PURE__*/_jsx("div", {
|
|
1163
1189
|
...mergeProps(themeProps('markdown-list', {
|
|
1164
1190
|
density
|
|
1165
|
-
}), stylex.props(spacing, isFirst && styles.noMarginBlockStart, isLast && styles.noMarginBlockEnd)),
|
|
1191
|
+
}), stylex.props(spacing, contentWidthValue != null ? dynamicStyles.proseWidth(contentWidthValue) : null, contentAlign !== 'start' ? dynamicStyles.proseAlign(ALIGN_MARGIN[contentAlign]) : null, isFirst && styles.noMarginBlockStart, isLast && styles.noMarginBlockEnd)),
|
|
1166
1192
|
children: /*#__PURE__*/_jsx(CheckboxList, {
|
|
1167
1193
|
label: t('@astryx.markdown.taskList'),
|
|
1168
1194
|
isLabelHidden: true,
|
|
@@ -1176,13 +1202,14 @@ listDepth = 0) {
|
|
|
1176
1202
|
const label = isInline ? /*#__PURE__*/_jsx(_Fragment, {
|
|
1177
1203
|
children: firstChild.children.map((c, j) => renderInline(c, j, onLinkClick, cursor, citationCtx, linkComponent, inlinePlugins, components, preparedPlugins))
|
|
1178
1204
|
}) : /*#__PURE__*/_jsx(_Fragment, {
|
|
1179
|
-
children: item.children.map((c, j) => renderBlock(c, j, item.children.length, density, headingLevelStart, onLinkClick, cursor, citationCtx, contentWidthValue, contentAlign, linkComponent, inlinePlugins, components, preparedPlugins, t, codeLanguages, headingProjection, listDepth + 1))
|
|
1205
|
+
children: item.children.map((c, j) => renderBlock(c, j, item.children.length, density, headingLevelStart, onLinkClick, cursor, citationCtx, contentWidthValue, contentAlign, linkComponent, inlinePlugins, components, preparedPlugins, t, codeLanguages, headingProjection, listDepth + 1, innerDirectionScope(item, directionScope)))
|
|
1180
1206
|
});
|
|
1181
1207
|
return /*#__PURE__*/_jsx(CheckboxListItem
|
|
1182
1208
|
// eslint-disable-next-line @eslint-react/no-array-index-key -- markdown task items are rendered from positional AST nodes
|
|
1183
1209
|
, {
|
|
1184
1210
|
value: `task-${i}`,
|
|
1185
1211
|
label: label,
|
|
1212
|
+
dir: blockDirection(item, directionScope),
|
|
1186
1213
|
...(recordsSourceLines ? sourceLineAttributes(blockSourceLines(item)) : undefined)
|
|
1187
1214
|
}, i);
|
|
1188
1215
|
})
|
|
@@ -1208,7 +1235,7 @@ listDepth = 0) {
|
|
|
1208
1235
|
const label = isInline ? /*#__PURE__*/_jsx(_Fragment, {
|
|
1209
1236
|
children: firstChild.children.map((c, j) => renderInline(c, j, onLinkClick, cursor, citationCtx, linkComponent, inlinePlugins, components, preparedPlugins))
|
|
1210
1237
|
}) : /*#__PURE__*/_jsx(_Fragment, {
|
|
1211
|
-
children: item.children.map((c, j) => renderBlock(c, j, item.children.length, density, headingLevelStart, onLinkClick, cursor, citationCtx, contentWidthValue, contentAlign, linkComponent, inlinePlugins, components, preparedPlugins, t, codeLanguages, headingProjection, listDepth + 1))
|
|
1238
|
+
children: item.children.map((c, j) => renderBlock(c, j, item.children.length, density, headingLevelStart, onLinkClick, cursor, citationCtx, contentWidthValue, contentAlign, linkComponent, inlinePlugins, components, preparedPlugins, t, codeLanguages, headingProjection, listDepth + 1, innerDirectionScope(item, directionScope)))
|
|
1212
1239
|
});
|
|
1213
1240
|
|
|
1214
1241
|
// Each task item on this shared list path keeps its checked state
|
|
@@ -1219,14 +1246,21 @@ listDepth = 0) {
|
|
|
1219
1246
|
isChecked: item.checked,
|
|
1220
1247
|
label: firstParagraph?.type === 'paragraph' ? markdownAstText(firstParagraph.children, extension => markdownExtensionText(preparedPlugins, extension)) : t('@astryx.markdown.taskList')
|
|
1221
1248
|
};
|
|
1249
|
+
const itemDirection = blockDirection(item, directionScope);
|
|
1250
|
+
// A numbered item that reads against its list keeps its counter
|
|
1251
|
+
// beside its own text, so its text never widens the counter
|
|
1252
|
+
// column that the other rows share.
|
|
1253
|
+
const readsAgainstList = node.ordered && itemDirection != null && directionScope != null && itemDirection !== directionScope.around;
|
|
1222
1254
|
return /*#__PURE__*/_jsx(ListMarkerScope
|
|
1223
1255
|
// eslint-disable-next-line @eslint-react/no-array-index-key -- markdown list items are rendered from positional AST nodes
|
|
1224
1256
|
, {
|
|
1225
1257
|
marker: (node.ordered ? NUMBER_MARKERS : BULLET_MARKERS)[listDepth % 3],
|
|
1226
1258
|
task: task,
|
|
1227
1259
|
hasMarkerGutter: node.ordered,
|
|
1260
|
+
isOutsideNumberColumns: readsAgainstList,
|
|
1228
1261
|
children: /*#__PURE__*/_jsx(ListItem, {
|
|
1229
1262
|
label: label,
|
|
1263
|
+
dir: itemDirection,
|
|
1230
1264
|
...(recordsSourceLines ? sourceLineAttributes(blockSourceLines(item)) : undefined)
|
|
1231
1265
|
})
|
|
1232
1266
|
}, i);
|
|
@@ -1237,6 +1271,13 @@ listDepth = 0) {
|
|
|
1237
1271
|
case 'table':
|
|
1238
1272
|
{
|
|
1239
1273
|
const colMinWidths = computeTableColumnMinWidths(node);
|
|
1274
|
+
// A cell whose text reads against its table keeps the table's sides: the
|
|
1275
|
+
// column rule and an explicit alignment resolve in the table's
|
|
1276
|
+
// direction, not the cell's.
|
|
1277
|
+
const readsAgainstTable = cell => {
|
|
1278
|
+
const cellDirection = blockDirection(cell, directionScope);
|
|
1279
|
+
return cellDirection != null && directionScope != null && cellDirection !== directionScope.around;
|
|
1280
|
+
};
|
|
1240
1281
|
const [header, ...rows] = node.children;
|
|
1241
1282
|
// Inline code inside a cell keeps its token whole, through the same
|
|
1242
1283
|
// `components` seam consumers use. A supplied renderer owns its own
|
|
@@ -1259,7 +1300,8 @@ listDepth = 0) {
|
|
|
1259
1300
|
children: header?.children.map((h, i) => /*#__PURE__*/_jsx(TableHeaderCell
|
|
1260
1301
|
// eslint-disable-next-line @eslint-react/no-array-index-key -- markdown table columns are positional by definition
|
|
1261
1302
|
, {
|
|
1262
|
-
|
|
1303
|
+
dir: blockDirection(h, directionScope),
|
|
1304
|
+
xstyle: [markdownTableCellStyles.headerCell, dynamicStyles.cellMinWidth(`${colMinWidths[i]}ch`), ...tableCellSideStyles(node.align[i], readsAgainstTable(h))],
|
|
1263
1305
|
children: h.children.map((c, j) => renderInline(c, j, onLinkClick, cursor, citationCtx, linkComponent, inlinePlugins, cellComponents, preparedPlugins))
|
|
1264
1306
|
}, i))
|
|
1265
1307
|
})
|
|
@@ -1268,7 +1310,8 @@ listDepth = 0) {
|
|
|
1268
1310
|
const cells = row.children.map((cell, j) => /*#__PURE__*/_jsx(TableCell
|
|
1269
1311
|
// eslint-disable-next-line @eslint-react/no-array-index-key -- markdown table cells are positional by row and column
|
|
1270
1312
|
, {
|
|
1271
|
-
|
|
1313
|
+
dir: blockDirection(cell, directionScope),
|
|
1314
|
+
xstyle: [markdownTableCellStyles.cell, ...tableCellSideStyles(node.align[j], readsAgainstTable(cell))],
|
|
1272
1315
|
children: cell.children.map((c, k) => renderInline(c, k, onLinkClick, cursor, citationCtx, linkComponent, inlinePlugins, cellComponents, preparedPlugins))
|
|
1273
1316
|
}, j));
|
|
1274
1317
|
return /*#__PURE__*/_jsx(TableRow
|
|
@@ -1381,6 +1424,7 @@ export function Markdown({
|
|
|
1381
1424
|
...props
|
|
1382
1425
|
}) {
|
|
1383
1426
|
const t = useComponentTranslator();
|
|
1427
|
+
const direction = useDirection();
|
|
1384
1428
|
// Keep one list while it names the same values, so an inline
|
|
1385
1429
|
// `codeLanguages={[…]}` does not re-render every block on each parent
|
|
1386
1430
|
// render (adjusting state during render, not in an Effect).
|
|
@@ -1544,8 +1588,11 @@ export function Markdown({
|
|
|
1544
1588
|
nextNumber: 1,
|
|
1545
1589
|
style: citationStyle
|
|
1546
1590
|
} : null;
|
|
1547
|
-
return blocks.map((block, i) => renderBlock(block, i, blocks.length, density, headingLevelStart, stableOnLinkClick, blockCursor, blockCitationCtx, contentWidthValue, contentAlign, LinkComponent, inlinePlugins, components, preparedPlugins, t, codeLanguages, headingProjection
|
|
1548
|
-
|
|
1591
|
+
return blocks.map((block, i) => renderBlock(block, i, blocks.length, density, headingLevelStart, stableOnLinkClick, blockCursor, blockCitationCtx, contentWidthValue, contentAlign, LinkComponent, inlinePlugins, components, preparedPlugins, t, codeLanguages, headingProjection, undefined, {
|
|
1592
|
+
provider: direction,
|
|
1593
|
+
around: direction
|
|
1594
|
+
}));
|
|
1595
|
+
}, [display, blocks, boundaries, isStreaming, sources, citationStyle, density, headingLevelStart, stableOnLinkClick, contentWidthValue, contentAlign, LinkComponent, inlinePlugins, components, preparedPlugins, t, headingProjection, codeLanguages, direction]);
|
|
1549
1596
|
if (display === 'inline') {
|
|
1550
1597
|
const cursor = {
|
|
1551
1598
|
offset: 0,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
interface DirectionalNode {
|
|
2
|
+
readonly type: string;
|
|
3
|
+
readonly value?: unknown;
|
|
4
|
+
readonly children?: ReadonlyArray<DirectionalNode>;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The direction of a prose block's own text. A list item and a blockquote read
|
|
8
|
+
* everything under them, nested lists included, so a nested step resolves
|
|
9
|
+
* against the item that holds it.
|
|
10
|
+
*/
|
|
11
|
+
export declare function markdownBlockDirection(node: DirectionalNode): 'ltr' | 'rtl' | undefined;
|
|
12
|
+
/** The provider's direction, and the direction of the block around this one. */
|
|
13
|
+
export interface BlockDirectionScope {
|
|
14
|
+
readonly provider: 'ltr' | 'rtl';
|
|
15
|
+
readonly around: 'ltr' | 'rtl';
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The `dir` for a prose block or a table cell. A block with no direction of
|
|
19
|
+
* its own takes the provider's. It needs the attribute only where the block
|
|
20
|
+
* around it reads the other way; elsewhere it inherits the same direction.
|
|
21
|
+
*/
|
|
22
|
+
export declare function blockDirection(node: DirectionalNode, scope: BlockDirectionScope | undefined): 'ltr' | 'rtl' | undefined;
|
|
23
|
+
/** The scope for the blocks inside a quote or a list item. */
|
|
24
|
+
export declare function innerDirectionScope(node: DirectionalNode, scope: BlockDirectionScope | undefined): BlockDirectionScope | undefined;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=blockDirection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blockDirection.d.ts","sourceRoot":"","sources":["../../src/Markdown/blockDirection.ts"],"names":[],"mappings":"AAaA,UAAU,eAAe;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;CACpD;AAmCD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,eAAe,GACpB,KAAK,GAAG,KAAK,GAAG,SAAS,CAE3B;AAED,gFAAgF;AAChF,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,EAAE,KAAK,GAAG,KAAK,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;CAChC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,eAAe,EACrB,KAAK,EAAE,mBAAmB,GAAG,SAAS,GACrC,KAAK,GAAG,KAAK,GAAG,SAAS,CAQ3B;AAED,8DAA8D;AAC9D,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,eAAe,EACrB,KAAK,EAAE,mBAAmB,GAAG,SAAS,GACrC,mBAAmB,GAAG,SAAS,CAQjC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file blockDirection.ts
|
|
5
|
+
* @input A Markdown AST prose block (a paragraph, heading, blockquote or list
|
|
6
|
+
* item) or a table cell
|
|
7
|
+
* @output The `dir` for the block: its own text's direction, or the
|
|
8
|
+
* provider's for a block whose text has no strongly directional character
|
|
9
|
+
* @position Read by Markdown.tsx to set each block's `dir`.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { firstStrongDirection } from "../i18n/firstStrongDirection.js";
|
|
13
|
+
/**
|
|
14
|
+
* Nodes whose text does not count. An image, a code block, math and a table
|
|
15
|
+
* read on their own terms. An extension node or a citation shows text that is
|
|
16
|
+
* not in the tree.
|
|
17
|
+
*/
|
|
18
|
+
const SKIPPED_TYPES = new Set(['image', 'code', 'math', 'inlineMath', 'table', 'thematicBreak', 'citation', 'break', 'extension']);
|
|
19
|
+
function nodeDirection(node) {
|
|
20
|
+
if (SKIPPED_TYPES.has(node.type)) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
if (typeof node.value === 'string') {
|
|
24
|
+
return firstStrongDirection(node.value);
|
|
25
|
+
}
|
|
26
|
+
for (const child of node.children ?? []) {
|
|
27
|
+
const direction = nodeDirection(child);
|
|
28
|
+
if (direction != null) {
|
|
29
|
+
return direction;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The direction of a prose block's own text. A list item and a blockquote read
|
|
37
|
+
* everything under them, nested lists included, so a nested step resolves
|
|
38
|
+
* against the item that holds it.
|
|
39
|
+
*/
|
|
40
|
+
export function markdownBlockDirection(node) {
|
|
41
|
+
return nodeDirection(node) ?? undefined;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** The provider's direction, and the direction of the block around this one. */
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The `dir` for a prose block or a table cell. A block with no direction of
|
|
48
|
+
* its own takes the provider's. It needs the attribute only where the block
|
|
49
|
+
* around it reads the other way; elsewhere it inherits the same direction.
|
|
50
|
+
*/
|
|
51
|
+
export function blockDirection(node, scope) {
|
|
52
|
+
const own = markdownBlockDirection(node);
|
|
53
|
+
if (own != null) {
|
|
54
|
+
return own;
|
|
55
|
+
}
|
|
56
|
+
return scope != null && scope.around !== scope.provider ? scope.provider : undefined;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** The scope for the blocks inside a quote or a list item. */
|
|
60
|
+
export function innerDirectionScope(node, scope) {
|
|
61
|
+
if (scope == null) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
provider: scope.provider,
|
|
66
|
+
around: markdownBlockDirection(node) ?? scope.provider
|
|
67
|
+
};
|
|
68
|
+
}
|
|
@@ -16,8 +16,10 @@ interface HeadingLinksRendererProps {
|
|
|
16
16
|
readonly contentAlign: 'start' | 'center';
|
|
17
17
|
readonly headingTextStyle: StyleXStyles;
|
|
18
18
|
readonly blockSpacingStyle: StyleXStyles;
|
|
19
|
+
/** The heading's own direction; the copy control follows its inline end. */
|
|
20
|
+
readonly dir?: 'ltr' | 'rtl';
|
|
19
21
|
}
|
|
20
22
|
/** @internal Portable renderer composed by Markdown for built-in headings only. */
|
|
21
|
-
export declare function HeadingLinksRenderer({ children, headingId, headingLabel, permalinkUrl, contentWidth, contentAlign, headingTextStyle, blockSpacingStyle, }: HeadingLinksRendererProps): ReactElement;
|
|
23
|
+
export declare function HeadingLinksRenderer({ children, headingId, headingLabel, permalinkUrl, contentWidth, contentAlign, headingTextStyle, blockSpacingStyle, dir, }: HeadingLinksRendererProps): ReactElement;
|
|
22
24
|
export {};
|
|
23
25
|
//# sourceMappingURL=HeadingLinksRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadingLinksRenderer.d.ts","sourceRoot":"","sources":["../../../src/Markdown/plugins/HeadingLinksRenderer.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAa,YAAY,EAAC,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAC3C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAyFnD,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB;;;;EAAiB,CAAC;AAEvD,UAAU,yBAAyB;IACjC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,YAAY,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1C,QAAQ,CAAC,gBAAgB,EAAE,YAAY,CAAC;IACxC,QAAQ,CAAC,iBAAiB,EAAE,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"HeadingLinksRenderer.d.ts","sourceRoot":"","sources":["../../../src/Markdown/plugins/HeadingLinksRenderer.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAa,YAAY,EAAC,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAC3C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAyFnD,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB;;;;EAAiB,CAAC;AAEvD,UAAU,yBAAyB;IACjC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,YAAY,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1C,QAAQ,CAAC,gBAAgB,EAAE,YAAY,CAAC;IACxC,QAAQ,CAAC,iBAAiB,EAAE,YAAY,CAAC;IACzC,4EAA4E;IAC5E,QAAQ,CAAC,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;CAC9B;AAcD,mFAAmF;AACnF,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,GAAG,GACJ,EAAE,yBAAyB,GAAG,YAAY,CA8D1C"}
|
|
@@ -88,7 +88,8 @@ export function HeadingLinksRenderer({
|
|
|
88
88
|
contentWidth,
|
|
89
89
|
contentAlign,
|
|
90
90
|
headingTextStyle,
|
|
91
|
-
blockSpacingStyle
|
|
91
|
+
blockSpacingStyle,
|
|
92
|
+
dir
|
|
92
93
|
}) {
|
|
93
94
|
const t = useComponentTranslator();
|
|
94
95
|
const copiedLabel = t('@astryx.markdownHeadingLinks.copied');
|
|
@@ -116,6 +117,7 @@ export function HeadingLinksRenderer({
|
|
|
116
117
|
void copy(new URL(permalinkUrl, window.location.href).href);
|
|
117
118
|
}, [copy, permalinkUrl]);
|
|
118
119
|
return /*#__PURE__*/_jsxs("div", {
|
|
120
|
+
dir: dir,
|
|
119
121
|
...mergeProps(getContainerProps(), stylex.props(styles.row, headingTextStyle, blockSpacingStyle, contentWidth != null ? dynamicStyles.proseWidth(contentWidth) : null, contentAlign !== 'start' ? dynamicStyles.proseAlign(ALIGN_MARGIN[contentAlign]) : null)),
|
|
120
122
|
children: [children, /*#__PURE__*/_jsxs("span", {
|
|
121
123
|
...{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetadataListContext.d.ts","sourceRoot":"","sources":["../../src/MetadataList/MetadataListContext.tsx"],"names":[],"mappings":"AAaA,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,uBAAuB,CAAC;IACrC,WAAW,EAAE,UAAU,GAAG,YAAY,CAAC;CACxC;AAED,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"MetadataListContext.d.ts","sourceRoot":"","sources":["../../src/MetadataList/MetadataListContext.tsx"],"names":[],"mappings":"AAaA,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,uBAAuB,CAAC;IACrC,WAAW,EAAE,UAAU,GAAG,YAAY,CAAC;CACxC;AAED,eAAO,MAAM,mBAAmB,0DAK7B,CAAC"}
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
* @output Exports MetadataListContext for sharing config between MetadataList and MetadataListItem
|
|
9
9
|
* @position Internal context; consumed by MetadataList.tsx and MetadataListItem.tsx
|
|
10
10
|
*/
|
|
11
|
-
import { createLayerScopedContext
|
|
12
|
-
export const MetadataListContext =
|
|
11
|
+
import { createLayerScopedContext } from "../Layer/layerScopedContext.js";
|
|
12
|
+
export const MetadataListContext = createLayerScopedContext('MetadataListContext', 1, null);
|
|
13
13
|
MetadataListContext.displayName = 'MetadataListContext';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavMenuContext.d.ts","sourceRoot":"","sources":["../../src/NavMenu/NavMenuContext.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NavMenuContext.d.ts","sourceRoot":"","sources":["../../src/NavMenu/NavMenuContext.tsx"],"names":[],"mappings":"AAkBA,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEpD;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,sBAAsB,6DAKhC,CAAC;AAGJ,wBAAgB,yBAAyB,IAAI,2BAA2B,GAAG,IAAI,CAE9E;AAED;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB;aAC1B,MAAM,IAAI;SACyB,CAAC;AAG/C;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,kBAAkB,CAAC;IACzB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,qBAAqB,4DAK/B,CAAC;AAGJ,wBAAgB,wBAAwB,IAAI,0BAA0B,GAAG,IAAI,CAE5E"}
|
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
* SYNC: When modified, update:
|
|
12
12
|
* - /packages/core/src/NavMenu/index.ts
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
14
|
+
import { use } from 'react';
|
|
15
15
|
import { createLayerScopedContext } from "../Layer/layerScopedContext.js";
|
|
16
|
+
import { createSharedContext } from "../utils/sharedContext.js";
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* Close callback provided by the nav heading popover.
|
|
@@ -20,7 +21,7 @@ import { createLayerScopedContext } from "../Layer/layerScopedContext.js";
|
|
|
20
21
|
* and on Escape.
|
|
21
22
|
*/
|
|
22
23
|
|
|
23
|
-
export const NavHeadingCloseContext =
|
|
24
|
+
export const NavHeadingCloseContext = createSharedContext('NavHeadingCloseContext', 1, null);
|
|
24
25
|
NavHeadingCloseContext.displayName = 'NavHeadingCloseContext';
|
|
25
26
|
export function useNavHeadingCloseContext() {
|
|
26
27
|
return use(NavHeadingCloseContext);
|
|
@@ -32,7 +33,7 @@ export function useNavHeadingCloseContext() {
|
|
|
32
33
|
* expanded SideNavHeading, FR7). NavHeadingMenu calls it for a mouse released
|
|
33
34
|
* outside, never on an item's selection.
|
|
34
35
|
*/
|
|
35
|
-
export const NavHeadingDismissContext =
|
|
36
|
+
export const NavHeadingDismissContext = createSharedContext('NavHeadingDismissContext', 1, null);
|
|
36
37
|
NavHeadingDismissContext.displayName = 'NavHeadingDismissContext';
|
|
37
38
|
|
|
38
39
|
/**
|
|
@@ -40,7 +41,7 @@ NavHeadingDismissContext.displayName = 'NavHeadingDismissContext';
|
|
|
40
41
|
* Items read this for consistent padding and dismiss-on-click.
|
|
41
42
|
*/
|
|
42
43
|
|
|
43
|
-
export const NavHeadingMenuContext = createLayerScopedContext(null);
|
|
44
|
+
export const NavHeadingMenuContext = createLayerScopedContext('NavHeadingMenuContext', 1, null);
|
|
44
45
|
NavHeadingMenuContext.displayName = 'NavHeadingMenuContext';
|
|
45
46
|
export function useNavHeadingMenuContext() {
|
|
46
47
|
return use(NavHeadingMenuContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../src/Popover/Popover.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,EAOZ,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EACV,oBAAoB,EAErB,MAAM,kCAAkC,CAAC;AAS1C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../src/Popover/Popover.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;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AS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,GACtB,EAAE,YAAY,GAAG,YAAY,CA8lB7B;yBAtnBe,OAAO"}
|
package/dist/Popover/Popover.js
CHANGED
|
@@ -43,7 +43,7 @@ import { devWarn } from "../utils/devWarning.js";
|
|
|
43
43
|
import { matchesMediaQuery, watchMediaQuery } from "../utils/coarsePointer.js";
|
|
44
44
|
import { FALLBACK_CLOSE_SELECTOR, usePopoverInternal } from "./usePopover.js";
|
|
45
45
|
import { usePopoverSurfaceMotion } from "./PopoverTouch.js";
|
|
46
|
-
import { FOCUSABLE_SELECTOR } from "../hooks/focusableSelector.js";
|
|
46
|
+
import { FOCUSABLE_SELECTOR, isDisabledWithin, preferTabStops } from "../hooks/focusableSelector.js";
|
|
47
47
|
import { layerAnimations } from "../Layer/layerAnimations.stylex.js";
|
|
48
48
|
import "../Layer/layerViewportInset.stylex.js";
|
|
49
49
|
import { layerViewportInset } from "../Layer/layerViewportInset.stylex.js";
|
|
@@ -320,12 +320,12 @@ export function Popover({
|
|
|
320
320
|
sheetPanelRef.current = panel;
|
|
321
321
|
setSheetPanelAttached(panel != null);
|
|
322
322
|
}, []);
|
|
323
|
-
// Focus enters the sheet at each opening as
|
|
324
|
-
//
|
|
325
|
-
//
|
|
326
|
-
// scroll area
|
|
327
|
-
//
|
|
328
|
-
// BottomSheet presents the dialog
|
|
323
|
+
// Focus enters the sheet at each opening, as in the anchored popover (FR2).
|
|
324
|
+
// A caller's `[data-autofocus]` wins. Else the first enabled tab stop in the
|
|
325
|
+
// content takes focus: never the injected fallback close or BottomSheet's
|
|
326
|
+
// own scroll area. Else the scroll area does: it is the sheet's labelled
|
|
327
|
+
// surface and shows the keyboard focus ring. This runs a frame after
|
|
328
|
+
// BottomSheet presents the dialog.
|
|
329
329
|
useEffect(() => {
|
|
330
330
|
if (!isSheetOpen || !isSheetPanelAttached) {
|
|
331
331
|
return;
|
|
@@ -343,10 +343,10 @@ export function Popover({
|
|
|
343
343
|
if (active != null && active !== sheetPanel && active !== dialog && sheetPanel.contains(active)) {
|
|
344
344
|
return;
|
|
345
345
|
}
|
|
346
|
-
const target = sheetPanel.querySelector('[data-autofocus]') ?? Array.from(sheetPanel.querySelectorAll(FOCUSABLE_SELECTOR)).
|
|
346
|
+
const target = sheetPanel.querySelector('[data-autofocus]') ?? preferTabStops(Array.from(sheetPanel.querySelectorAll(FOCUSABLE_SELECTOR)).filter(element =>
|
|
347
347
|
// BottomSheet's scroll area is the panel's own child; content
|
|
348
348
|
// sits inside it.
|
|
349
|
-
element.parentElement !== sheetPanel && element.closest(FALLBACK_CLOSE_SELECTOR) == null);
|
|
349
|
+
element.parentElement !== sheetPanel && element.closest(FALLBACK_CLOSE_SELECTOR) == null && !isDisabledWithin(element, sheetPanel)))[0];
|
|
350
350
|
if (target != null) {
|
|
351
351
|
target.focus({
|
|
352
352
|
preventScroll: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePopover.d.ts","sourceRoot":"","sources":["../../src/Popover/usePopover.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,EAAiC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAmB,KAAK,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AAG5E,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"usePopover.d.ts","sourceRoot":"","sources":["../../src/Popover/usePopover.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,EAAiC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAmB,KAAK,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AAG5E,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAoBnD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAUhD;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,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE;QAAC,aAAa,CAAC,EAAE,OAAO,CAAA;KAAC,KAAK,IAAI,CAAC;IAEpD;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAC;IAEnB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;;;;;;;;OAWG;IACH,MAAM,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,kBAAkB,KAAK,SAAS,CAAC;IAEvE;;OAEG;IACH,YAAY,EAAE;QACZ,eAAe,EAAE,QAAQ,GAAG,MAAM,CAAC;QACnC,eAAe,EAAE,OAAO,CAAC;QACzB,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAED;;;GAGG;AACH,UAAU,sBAAuB,SAAQ,iBAAiB;IACxD;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAkUD,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,GAAG,gBAAgB,CAE5E;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,GAAE,sBAA2B,GACnC,gBAAgB,CAElB"}
|
|
@@ -24,7 +24,7 @@ import { LayerDepthProvider } from "../Layer/LayerDepthContext.js";
|
|
|
24
24
|
import "../theme/tokens.stylex.js";
|
|
25
25
|
import { colorVars, spacingVars, radiusVars, shadowVars } from "../theme/tokens.stylex.js";
|
|
26
26
|
import { Button } from "../Button/index.js";
|
|
27
|
-
import { FOCUSABLE_SELECTOR } from "../hooks/focusableSelector.js";
|
|
27
|
+
import { FOCUSABLE_SELECTOR, isDisabledWithin, preferTabStops } from "../hooks/focusableSelector.js";
|
|
28
28
|
import { rtlStyles } from "../utils/index.js";
|
|
29
29
|
import { useDevWarning } from "../hooks/useDevWarning.js";
|
|
30
30
|
import { focusOutlineProps } from "../utils/focusOutline.stylex.js";
|
|
@@ -54,7 +54,7 @@ function attemptFocus(element) {
|
|
|
54
54
|
return element.ownerDocument.activeElement === element;
|
|
55
55
|
}
|
|
56
56
|
function focusFirstContentControl(container) {
|
|
57
|
-
const focusable = Array.from(container.querySelectorAll(FOCUSABLE_SELECTOR)).filter(element => element.closest(FALLBACK_CLOSE_SELECTOR) == null);
|
|
57
|
+
const focusable = preferTabStops(Array.from(container.querySelectorAll(FOCUSABLE_SELECTOR)).filter(element => element.closest(FALLBACK_CLOSE_SELECTOR) == null && !isDisabledWithin(element, container)));
|
|
58
58
|
for (const element of focusable) {
|
|
59
59
|
if (attemptFocus(element)) {
|
|
60
60
|
return true;
|
|
@@ -306,7 +306,7 @@ function usePopoverImplementation(options = {}) {
|
|
|
306
306
|
|
|
307
307
|
// Dev-time guardrail: a dialog popover should always be labeled.
|
|
308
308
|
useDevWarning('usePopover', 'role="dialog" without a `dialogLabel` renders an unnamed ' + 'dialog. Pass `dialogLabel`, or use `role: "none"` for listbox/menu ' + 'popups whose content already carries its own role.', role === 'dialog' && !dialogLabel);
|
|
309
|
-
|
|
309
|
+
const isDialogShown = role === 'dialog' && layer.isOpen;
|
|
310
310
|
// Wrapped render function that includes surface styles and optional hidden close button
|
|
311
311
|
const render = useCallback((children, props) => {
|
|
312
312
|
// `mergeProps` is positional — a third OBJECT argument is read as
|
|
@@ -316,10 +316,13 @@ function usePopoverImplementation(options = {}) {
|
|
|
316
316
|
const surfaceClassName = surfaceTarget != null && surfaceTarget !== 'popover' ? `${surfaceProps.className} ${stableClassName(surfaceTarget)}` : surfaceProps.className;
|
|
317
317
|
return layer.render(/*#__PURE__*/_jsx(LayerDepthProvider, {
|
|
318
318
|
children: /*#__PURE__*/_jsxs("div", {
|
|
319
|
-
ref: contentRef
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
319
|
+
ref: contentRef
|
|
320
|
+
// A closed surface stays mounted but hidden. It carries no dialog
|
|
321
|
+
// role or name, so selectors find no hidden dialog.
|
|
322
|
+
,
|
|
323
|
+
role: isDialogShown ? 'dialog' : undefined,
|
|
324
|
+
"aria-modal": isDialogShown && isModal ? true : undefined,
|
|
325
|
+
"aria-label": isDialogShown ? dialogLabel : undefined,
|
|
323
326
|
tabIndex: role === 'dialog' ? -1 : undefined,
|
|
324
327
|
...mergeProps({
|
|
325
328
|
...surfaceProps,
|
|
@@ -339,7 +342,7 @@ function usePopoverImplementation(options = {}) {
|
|
|
339
342
|
...props,
|
|
340
343
|
xstyle: props?.xstyle
|
|
341
344
|
});
|
|
342
|
-
}, [layer, hasCloseButton, hasSurface, padding, surfaceTarget, className, style, closeButtonLabel, contentRef, dialogLabel, role, isModal, xstyle]);
|
|
345
|
+
}, [layer, hasCloseButton, hasSurface, padding, surfaceTarget, className, style, closeButtonLabel, contentRef, dialogLabel, isDialogShown, role, isModal, xstyle]);
|
|
343
346
|
return {
|
|
344
347
|
triggerRef,
|
|
345
348
|
contentRef,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioList.d.ts","sourceRoot":"","sources":["../../src/RadioList/RadioList.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,EAKZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAMhD,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAG9C;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,CAAC;AAExC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,UAAU,EAA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+16,7 @@
|
|
|
16
16
|
* - /packages/cli/assets/templates/blocks/components/RadioList/ (showcase blocks)
|
|
17
17
|
*/
|
|
18
18
|
import { RadioListReasonContext } from "./RadioListReasonContext.js";
|
|
19
|
-
import { createLayerScopedContext
|
|
19
|
+
import { createLayerScopedContext } from "../Layer/layerScopedContext.js";
|
|
20
20
|
import React, { useCallback, useId, useMemo, useRef } from 'react';
|
|
21
21
|
import * as stylex from '@stylexjs/stylex';
|
|
22
22
|
import "../theme/tokens.stylex.js";
|
|
@@ -34,7 +34,7 @@ import { themeProps } from "../utils/themeProps.js";
|
|
|
34
34
|
* Size of the radio controls, matching CheckboxInput sizes.
|
|
35
35
|
*/
|
|
36
36
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
37
|
-
export const RadioListContext =
|
|
37
|
+
export const RadioListContext = createLayerScopedContext('RadioListContext', 1, null);
|
|
38
38
|
RadioListContext.displayName = 'RadioListContext';
|
|
39
39
|
const styles = {
|
|
40
40
|
radiogroup: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioListReasonContext.d.ts","sourceRoot":"","sources":["../../src/RadioList/RadioListReasonContext.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"RadioListReasonContext.d.ts","sourceRoot":"","sources":["../../src/RadioList/RadioListReasonContext.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,sBAAsB,6CAEM,CAAC"}
|
|
@@ -18,5 +18,5 @@ import { createLayerScopedContext } from "../Layer/layerScopedContext.js";
|
|
|
18
18
|
|
|
19
19
|
// Layer-scoped like RadioListContext: content in a layer opened from inside the
|
|
20
20
|
// group is not a radio of it.
|
|
21
|
-
export const RadioListReasonContext = createLayerScopedContext(undefined);
|
|
21
|
+
export const RadioListReasonContext = createLayerScopedContext('RadioListReasonContext', 1, undefined);
|
|
22
22
|
RadioListReasonContext.displayName = 'RadioListReasonContext';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControlContext.d.ts","sourceRoot":"","sources":["../../src/SegmentedControl/SegmentedControlContext.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,oBAAoB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACtD,MAAM,MAAM,sBAAsB,GAAG,KAAK,GAAG,MAAM,CAAC;AAEpD,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,MAAM,EAAE,sBAAsB,CAAC;IAC/B,UAAU,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"SegmentedControlContext.d.ts","sourceRoot":"","sources":["../../src/SegmentedControl/SegmentedControlContext.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,oBAAoB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACtD,MAAM,MAAM,sBAAsB,GAAG,KAAK,GAAG,MAAM,CAAC;AAEpD,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,MAAM,EAAE,sBAAsB,CAAC;IAC/B,UAAU,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,eAAO,MAAM,uBAAuB,8DAKjC,CAAC;AAGJ,wBAAgB,0BAA0B,IAAI,4BAA4B,CASzE"}
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* SYNC: When modified, update /packages/core/src/SegmentedControl/SegmentedControl.doc.mjs
|
|
12
12
|
*/
|
|
13
13
|
import { use } from 'react';
|
|
14
|
-
import { createLayerScopedContext
|
|
15
|
-
export const SegmentedControlContext =
|
|
14
|
+
import { createLayerScopedContext } from "../Layer/layerScopedContext.js";
|
|
15
|
+
export const SegmentedControlContext = createLayerScopedContext('SegmentedControlContext', 1, null);
|
|
16
16
|
SegmentedControlContext.displayName = 'SegmentedControlContext';
|
|
17
17
|
export function useSegmentedControlContext() {
|
|
18
18
|
const ctx = use(SegmentedControlContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectableCardInput.d.ts","sourceRoot":"","sources":["../../src/SelectableCard/selectableCardInput.ts"],"names":[],"mappings":"AAgBA,+CAA+C;AAC/C,MAAM,WAAW,mBAAmB;IAClC,gEAAgE;IAChE,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC;IACpC,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,2DAA2D;AAC3D,eAAO,MAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"selectableCardInput.d.ts","sourceRoot":"","sources":["../../src/SelectableCard/selectableCardInput.ts"],"names":[],"mappings":"AAgBA,+CAA+C;AAC/C,MAAM,WAAW,mBAAmB;IAClC,gEAAgE;IAChE,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC;IACpC,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,2DAA2D;AAC3D,eAAO,MAAM,0BAA0B,qDAKpC,CAAC"}
|