react-aria 3.50.0 → 3.51.0
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/exports/index.cjs +15 -0
- package/dist/exports/index.cjs.map +1 -1
- package/dist/exports/index.js +9 -1
- package/dist/exports/index.js.map +1 -1
- package/dist/exports/index.mjs +9 -1
- package/dist/exports/index.mjs.map +1 -1
- package/dist/exports/private/utils/domHelpers.cjs +1 -0
- package/dist/exports/private/utils/domHelpers.cjs.map +1 -1
- package/dist/exports/private/utils/domHelpers.js +2 -2
- package/dist/exports/private/utils/domHelpers.js.map +1 -1
- package/dist/exports/private/utils/domHelpers.mjs +2 -2
- package/dist/exports/private/utils/domHelpers.mjs.map +1 -1
- package/dist/exports/private/utils/platform.cjs +1 -0
- package/dist/exports/private/utils/platform.cjs.map +1 -1
- package/dist/exports/private/utils/platform.js +2 -2
- package/dist/exports/private/utils/platform.js.map +1 -1
- package/dist/exports/private/utils/platform.mjs +2 -2
- package/dist/exports/private/utils/platform.mjs.map +1 -1
- package/dist/exports/private/utils/shadowdom/DOMFunctions.cjs +1 -0
- package/dist/exports/private/utils/shadowdom/DOMFunctions.cjs.map +1 -1
- package/dist/exports/private/utils/shadowdom/DOMFunctions.js +2 -2
- package/dist/exports/private/utils/shadowdom/DOMFunctions.js.map +1 -1
- package/dist/exports/private/utils/shadowdom/DOMFunctions.mjs +2 -2
- package/dist/exports/private/utils/shadowdom/DOMFunctions.mjs.map +1 -1
- package/dist/exports/useContextMenu.cjs +22 -0
- package/dist/exports/useContextMenu.cjs.map +1 -0
- package/dist/exports/useContextMenu.js +17 -0
- package/dist/exports/useContextMenu.js.map +1 -0
- package/dist/exports/useContextMenu.mjs +17 -0
- package/dist/exports/useContextMenu.mjs.map +1 -0
- package/dist/exports/usePreviewTrigger.cjs +22 -0
- package/dist/exports/usePreviewTrigger.cjs.map +1 -0
- package/dist/exports/usePreviewTrigger.js +17 -0
- package/dist/exports/usePreviewTrigger.js.map +1 -0
- package/dist/exports/usePreviewTrigger.mjs +17 -0
- package/dist/exports/usePreviewTrigger.mjs.map +1 -0
- package/dist/exports/useTokenField.cjs +27 -0
- package/dist/exports/useTokenField.cjs.map +1 -0
- package/dist/exports/useTokenField.js +19 -0
- package/dist/exports/useTokenField.js.map +1 -0
- package/dist/exports/useTokenField.mjs +19 -0
- package/dist/exports/useTokenField.mjs.map +1 -0
- package/dist/private/actiongroup/useActionGroup.cjs +24 -19
- package/dist/private/actiongroup/useActionGroup.cjs.map +1 -1
- package/dist/private/actiongroup/useActionGroup.js +24 -19
- package/dist/private/actiongroup/useActionGroup.js.map +1 -1
- package/dist/private/actiongroup/useActionGroup.mjs +24 -19
- package/dist/private/actiongroup/useActionGroup.mjs.map +1 -1
- package/dist/private/autocomplete/useAutocomplete.cjs +2 -1
- package/dist/private/autocomplete/useAutocomplete.cjs.map +1 -1
- package/dist/private/autocomplete/useAutocomplete.js +2 -1
- package/dist/private/autocomplete/useAutocomplete.js.map +1 -1
- package/dist/private/autocomplete/useAutocomplete.mjs +2 -1
- package/dist/private/autocomplete/useAutocomplete.mjs.map +1 -1
- package/dist/private/breadcrumbs/useBreadcrumbItem.cjs +2 -0
- package/dist/private/breadcrumbs/useBreadcrumbItem.cjs.map +1 -1
- package/dist/private/breadcrumbs/useBreadcrumbItem.js +2 -0
- package/dist/private/breadcrumbs/useBreadcrumbItem.js.map +1 -1
- package/dist/private/breadcrumbs/useBreadcrumbItem.mjs +2 -0
- package/dist/private/breadcrumbs/useBreadcrumbItem.mjs.map +1 -1
- package/dist/private/button/useButton.cjs +2 -1
- package/dist/private/button/useButton.cjs.map +1 -1
- package/dist/private/button/useButton.js +2 -1
- package/dist/private/button/useButton.js.map +1 -1
- package/dist/private/button/useButton.mjs +2 -1
- package/dist/private/button/useButton.mjs.map +1 -1
- package/dist/private/button/useToggleButtonGroup.cjs +3 -0
- package/dist/private/button/useToggleButtonGroup.cjs.map +1 -1
- package/dist/private/button/useToggleButtonGroup.js +3 -0
- package/dist/private/button/useToggleButtonGroup.js.map +1 -1
- package/dist/private/button/useToggleButtonGroup.mjs +3 -0
- package/dist/private/button/useToggleButtonGroup.mjs.map +1 -1
- package/dist/private/calendar/useCalendarCell.cjs +3 -0
- package/dist/private/calendar/useCalendarCell.cjs.map +1 -1
- package/dist/private/calendar/useCalendarCell.js +3 -0
- package/dist/private/calendar/useCalendarCell.js.map +1 -1
- package/dist/private/calendar/useCalendarCell.mjs +3 -0
- package/dist/private/calendar/useCalendarCell.mjs.map +1 -1
- package/dist/private/calendar/useCalendarGrid.cjs +47 -52
- package/dist/private/calendar/useCalendarGrid.cjs.map +1 -1
- package/dist/private/calendar/useCalendarGrid.js +47 -52
- package/dist/private/calendar/useCalendarGrid.js.map +1 -1
- package/dist/private/calendar/useCalendarGrid.mjs +47 -52
- package/dist/private/calendar/useCalendarGrid.mjs.map +1 -1
- package/dist/private/calendar/useRangeCalendar.cjs +1 -0
- package/dist/private/calendar/useRangeCalendar.cjs.map +1 -1
- package/dist/private/calendar/useRangeCalendar.js +1 -0
- package/dist/private/calendar/useRangeCalendar.js.map +1 -1
- package/dist/private/calendar/useRangeCalendar.mjs +1 -0
- package/dist/private/calendar/useRangeCalendar.mjs.map +1 -1
- package/dist/private/collections/CollectionBuilder.cjs +8 -3
- package/dist/private/collections/CollectionBuilder.cjs.map +1 -1
- package/dist/private/collections/CollectionBuilder.js +8 -3
- package/dist/private/collections/CollectionBuilder.js.map +1 -1
- package/dist/private/collections/CollectionBuilder.mjs +8 -3
- package/dist/private/collections/CollectionBuilder.mjs.map +1 -1
- package/dist/private/collections/Document.cjs +4 -0
- package/dist/private/collections/Document.cjs.map +1 -1
- package/dist/private/collections/Document.js +4 -0
- package/dist/private/collections/Document.js.map +1 -1
- package/dist/private/collections/Document.mjs +4 -0
- package/dist/private/collections/Document.mjs.map +1 -1
- package/dist/private/collections/Hidden.cjs +1 -0
- package/dist/private/collections/Hidden.cjs.map +1 -1
- package/dist/private/collections/Hidden.js +1 -0
- package/dist/private/collections/Hidden.js.map +1 -1
- package/dist/private/collections/Hidden.mjs +1 -0
- package/dist/private/collections/Hidden.mjs.map +1 -1
- package/dist/private/collections/useCachedChildren.cjs +1 -0
- package/dist/private/collections/useCachedChildren.cjs.map +1 -1
- package/dist/private/collections/useCachedChildren.js +1 -0
- package/dist/private/collections/useCachedChildren.js.map +1 -1
- package/dist/private/collections/useCachedChildren.mjs +1 -0
- package/dist/private/collections/useCachedChildren.mjs.map +1 -1
- package/dist/private/color/useColorArea.cjs +31 -34
- package/dist/private/color/useColorArea.cjs.map +1 -1
- package/dist/private/color/useColorArea.js +31 -34
- package/dist/private/color/useColorArea.js.map +1 -1
- package/dist/private/color/useColorArea.mjs +31 -34
- package/dist/private/color/useColorArea.mjs.map +1 -1
- package/dist/private/color/useColorSlider.cjs +4 -2
- package/dist/private/color/useColorSlider.cjs.map +1 -1
- package/dist/private/color/useColorSlider.js +4 -2
- package/dist/private/color/useColorSlider.js.map +1 -1
- package/dist/private/color/useColorSlider.mjs +4 -2
- package/dist/private/color/useColorSlider.mjs.map +1 -1
- package/dist/private/color/useColorWheel.cjs +16 -23
- package/dist/private/color/useColorWheel.cjs.map +1 -1
- package/dist/private/color/useColorWheel.js +16 -23
- package/dist/private/color/useColorWheel.js.map +1 -1
- package/dist/private/color/useColorWheel.mjs +16 -23
- package/dist/private/color/useColorWheel.mjs.map +1 -1
- package/dist/private/combobox/useComboBox.cjs +92 -29
- package/dist/private/combobox/useComboBox.cjs.map +1 -1
- package/dist/private/combobox/useComboBox.js +93 -29
- package/dist/private/combobox/useComboBox.js.map +1 -1
- package/dist/private/combobox/useComboBox.mjs +92 -29
- package/dist/private/combobox/useComboBox.mjs.map +1 -1
- package/dist/private/datepicker/useDateField.cjs +3 -6
- package/dist/private/datepicker/useDateField.cjs.map +1 -1
- package/dist/private/datepicker/useDateField.js +3 -6
- package/dist/private/datepicker/useDateField.js.map +1 -1
- package/dist/private/datepicker/useDateField.mjs +3 -6
- package/dist/private/datepicker/useDateField.mjs.map +1 -1
- package/dist/private/datepicker/useDatePickerGroup.cjs +48 -27
- package/dist/private/datepicker/useDatePickerGroup.cjs.map +1 -1
- package/dist/private/datepicker/useDatePickerGroup.js +49 -28
- package/dist/private/datepicker/useDatePickerGroup.js.map +1 -1
- package/dist/private/datepicker/useDatePickerGroup.mjs +49 -28
- package/dist/private/datepicker/useDatePickerGroup.mjs.map +1 -1
- package/dist/private/datepicker/useDateSegment.cjs +21 -16
- package/dist/private/datepicker/useDateSegment.cjs.map +1 -1
- package/dist/private/datepicker/useDateSegment.js +22 -17
- package/dist/private/datepicker/useDateSegment.js.map +1 -1
- package/dist/private/datepicker/useDateSegment.mjs +22 -17
- package/dist/private/datepicker/useDateSegment.mjs.map +1 -1
- package/dist/private/dialog/useDialog.cjs +8 -1
- package/dist/private/dialog/useDialog.cjs.map +1 -1
- package/dist/private/dialog/useDialog.js +10 -1
- package/dist/private/dialog/useDialog.js.map +1 -1
- package/dist/private/dialog/useDialog.mjs +8 -1
- package/dist/private/dialog/useDialog.mjs.map +1 -1
- package/dist/private/dnd/DragManager.cjs +3 -1
- package/dist/private/dnd/DragManager.cjs.map +1 -1
- package/dist/private/dnd/DragManager.js +3 -1
- package/dist/private/dnd/DragManager.js.map +1 -1
- package/dist/private/dnd/DragManager.mjs +3 -1
- package/dist/private/dnd/DragManager.mjs.map +1 -1
- package/dist/private/dnd/useAutoScroll.cjs +3 -1
- package/dist/private/dnd/useAutoScroll.cjs.map +1 -1
- package/dist/private/dnd/useAutoScroll.js +3 -1
- package/dist/private/dnd/useAutoScroll.js.map +1 -1
- package/dist/private/dnd/useAutoScroll.mjs +3 -1
- package/dist/private/dnd/useAutoScroll.mjs.map +1 -1
- package/dist/private/dnd/useDrag.cjs +4 -1
- package/dist/private/dnd/useDrag.cjs.map +1 -1
- package/dist/private/dnd/useDrag.js +4 -1
- package/dist/private/dnd/useDrag.js.map +1 -1
- package/dist/private/dnd/useDrag.mjs +4 -1
- package/dist/private/dnd/useDrag.mjs.map +1 -1
- package/dist/private/dnd/useDraggableItem.cjs +4 -0
- package/dist/private/dnd/useDraggableItem.cjs.map +1 -1
- package/dist/private/dnd/useDraggableItem.js +4 -0
- package/dist/private/dnd/useDraggableItem.js.map +1 -1
- package/dist/private/dnd/useDraggableItem.mjs +4 -0
- package/dist/private/dnd/useDraggableItem.mjs.map +1 -1
- package/dist/private/dnd/useDroppableCollection.cjs +4 -0
- package/dist/private/dnd/useDroppableCollection.cjs.map +1 -1
- package/dist/private/dnd/useDroppableCollection.js +4 -0
- package/dist/private/dnd/useDroppableCollection.js.map +1 -1
- package/dist/private/dnd/useDroppableCollection.mjs +4 -0
- package/dist/private/dnd/useDroppableCollection.mjs.map +1 -1
- package/dist/private/focus/FocusScope.cjs +5 -3
- package/dist/private/focus/FocusScope.cjs.map +1 -1
- package/dist/private/focus/FocusScope.js +5 -4
- package/dist/private/focus/FocusScope.js.map +1 -1
- package/dist/private/focus/FocusScope.mjs +5 -3
- package/dist/private/focus/FocusScope.mjs.map +1 -1
- package/dist/private/focus/useFocusRing.cjs +2 -1
- package/dist/private/focus/useFocusRing.cjs.map +1 -1
- package/dist/private/focus/useFocusRing.js +2 -1
- package/dist/private/focus/useFocusRing.js.map +1 -1
- package/dist/private/focus/useFocusRing.mjs +2 -1
- package/dist/private/focus/useFocusRing.mjs.map +1 -1
- package/dist/private/form/useFormValidation.cjs +6 -0
- package/dist/private/form/useFormValidation.cjs.map +1 -1
- package/dist/private/form/useFormValidation.js +6 -0
- package/dist/private/form/useFormValidation.js.map +1 -1
- package/dist/private/form/useFormValidation.mjs +6 -0
- package/dist/private/form/useFormValidation.mjs.map +1 -1
- package/dist/private/grid/useGrid.cjs +3 -2
- package/dist/private/grid/useGrid.cjs.map +1 -1
- package/dist/private/grid/useGrid.js +3 -2
- package/dist/private/grid/useGrid.js.map +1 -1
- package/dist/private/grid/useGrid.mjs +3 -2
- package/dist/private/grid/useGrid.mjs.map +1 -1
- package/dist/private/grid/useGridCell.cjs +44 -8
- package/dist/private/grid/useGridCell.cjs.map +1 -1
- package/dist/private/grid/useGridCell.js +44 -8
- package/dist/private/grid/useGridCell.js.map +1 -1
- package/dist/private/grid/useGridCell.mjs +44 -8
- package/dist/private/grid/useGridCell.mjs.map +1 -1
- package/dist/private/grid/utils.cjs.map +1 -1
- package/dist/private/grid/utils.js.map +1 -1
- package/dist/private/grid/utils.mjs.map +1 -1
- package/dist/private/gridlist/useGridListItem.cjs +38 -30
- package/dist/private/gridlist/useGridListItem.cjs.map +1 -1
- package/dist/private/gridlist/useGridListItem.js +38 -30
- package/dist/private/gridlist/useGridListItem.js.map +1 -1
- package/dist/private/gridlist/useGridListItem.mjs +38 -30
- package/dist/private/gridlist/useGridListItem.mjs.map +1 -1
- package/dist/private/interactions/PressResponder.cjs +1 -0
- package/dist/private/interactions/PressResponder.cjs.map +1 -1
- package/dist/private/interactions/PressResponder.js +1 -0
- package/dist/private/interactions/PressResponder.js.map +1 -1
- package/dist/private/interactions/PressResponder.mjs +1 -0
- package/dist/private/interactions/PressResponder.mjs.map +1 -1
- package/dist/private/interactions/Pressable.cjs +1 -0
- package/dist/private/interactions/Pressable.cjs.map +1 -1
- package/dist/private/interactions/Pressable.js +1 -0
- package/dist/private/interactions/Pressable.js.map +1 -1
- package/dist/private/interactions/Pressable.mjs +1 -0
- package/dist/private/interactions/Pressable.mjs.map +1 -1
- package/dist/private/interactions/createEventHandler.cjs +3 -2
- package/dist/private/interactions/createEventHandler.cjs.map +1 -1
- package/dist/private/interactions/createEventHandler.js +3 -2
- package/dist/private/interactions/createEventHandler.js.map +1 -1
- package/dist/private/interactions/createEventHandler.mjs +3 -2
- package/dist/private/interactions/createEventHandler.mjs.map +1 -1
- package/dist/private/interactions/createKeyboardShortcutHandler.cjs +130 -0
- package/dist/private/interactions/createKeyboardShortcutHandler.cjs.map +1 -0
- package/dist/private/interactions/createKeyboardShortcutHandler.js +125 -0
- package/dist/private/interactions/createKeyboardShortcutHandler.js.map +1 -0
- package/dist/private/interactions/createKeyboardShortcutHandler.mjs +125 -0
- package/dist/private/interactions/createKeyboardShortcutHandler.mjs.map +1 -0
- package/dist/private/interactions/textSelection.cjs +2 -2
- package/dist/private/interactions/textSelection.cjs.map +1 -1
- package/dist/private/interactions/textSelection.js +3 -3
- package/dist/private/interactions/textSelection.js.map +1 -1
- package/dist/private/interactions/textSelection.mjs +3 -3
- package/dist/private/interactions/textSelection.mjs.map +1 -1
- package/dist/private/interactions/useContextMenu.cjs +104 -0
- package/dist/private/interactions/useContextMenu.cjs.map +1 -0
- package/dist/private/interactions/useContextMenu.js +99 -0
- package/dist/private/interactions/useContextMenu.js.map +1 -0
- package/dist/private/interactions/useContextMenu.mjs +99 -0
- package/dist/private/interactions/useContextMenu.mjs.map +1 -0
- package/dist/private/interactions/useFocusVisible.cjs +2 -2
- package/dist/private/interactions/useFocusVisible.cjs.map +1 -1
- package/dist/private/interactions/useFocusVisible.js +2 -2
- package/dist/private/interactions/useFocusVisible.js.map +1 -1
- package/dist/private/interactions/useFocusVisible.mjs +2 -2
- package/dist/private/interactions/useFocusVisible.mjs.map +1 -1
- package/dist/private/interactions/useFocusable.cjs +1 -0
- package/dist/private/interactions/useFocusable.cjs.map +1 -1
- package/dist/private/interactions/useFocusable.js +1 -0
- package/dist/private/interactions/useFocusable.js.map +1 -1
- package/dist/private/interactions/useFocusable.mjs +1 -0
- package/dist/private/interactions/useFocusable.mjs.map +1 -1
- package/dist/private/interactions/useHover.cjs +2 -1
- package/dist/private/interactions/useHover.cjs.map +1 -1
- package/dist/private/interactions/useHover.js +2 -1
- package/dist/private/interactions/useHover.js.map +1 -1
- package/dist/private/interactions/useHover.mjs +2 -1
- package/dist/private/interactions/useHover.mjs.map +1 -1
- package/dist/private/interactions/useKeyboard.cjs +46 -2
- package/dist/private/interactions/useKeyboard.cjs.map +1 -1
- package/dist/private/interactions/useKeyboard.js +48 -2
- package/dist/private/interactions/useKeyboard.js.map +1 -1
- package/dist/private/interactions/useKeyboard.mjs +46 -2
- package/dist/private/interactions/useKeyboard.mjs.map +1 -1
- package/dist/private/interactions/useLongPress.cjs +22 -22
- package/dist/private/interactions/useLongPress.cjs.map +1 -1
- package/dist/private/interactions/useLongPress.js +22 -22
- package/dist/private/interactions/useLongPress.js.map +1 -1
- package/dist/private/interactions/useLongPress.mjs +22 -22
- package/dist/private/interactions/useLongPress.mjs.map +1 -1
- package/dist/private/interactions/useMove.cjs +1 -8
- package/dist/private/interactions/useMove.cjs.map +1 -1
- package/dist/private/interactions/useMove.js +1 -8
- package/dist/private/interactions/useMove.js.map +1 -1
- package/dist/private/interactions/useMove.mjs +1 -8
- package/dist/private/interactions/useMove.mjs.map +1 -1
- package/dist/private/interactions/usePress.cjs +18 -33
- package/dist/private/interactions/usePress.cjs.map +1 -1
- package/dist/private/interactions/usePress.js +18 -33
- package/dist/private/interactions/usePress.js.map +1 -1
- package/dist/private/interactions/usePress.mjs +18 -33
- package/dist/private/interactions/usePress.mjs.map +1 -1
- package/dist/private/interactions/utils.cjs +10 -10
- package/dist/private/interactions/utils.cjs.map +1 -1
- package/dist/private/interactions/utils.js +10 -10
- package/dist/private/interactions/utils.js.map +1 -1
- package/dist/private/interactions/utils.mjs +10 -10
- package/dist/private/interactions/utils.mjs.map +1 -1
- package/dist/private/intl/combobox/fi-FI.cjs +5 -5
- package/dist/private/intl/combobox/fi-FI.cjs.map +1 -1
- package/dist/private/intl/combobox/fi-FI.js +5 -5
- package/dist/private/intl/combobox/fi-FI.js.map +1 -1
- package/dist/private/intl/combobox/fi-FI.mjs +5 -5
- package/dist/private/intl/combobox/fi-FI.mjs.map +1 -1
- package/dist/private/intl/previewtrigger/ar-AE.cjs +6 -0
- package/dist/private/intl/previewtrigger/ar-AE.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/ar-AE.js +8 -0
- package/dist/private/intl/previewtrigger/ar-AE.js.map +1 -0
- package/dist/private/intl/previewtrigger/ar-AE.mjs +8 -0
- package/dist/private/intl/previewtrigger/ar-AE.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/bg-BG.cjs +6 -0
- package/dist/private/intl/previewtrigger/bg-BG.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/bg-BG.js +8 -0
- package/dist/private/intl/previewtrigger/bg-BG.js.map +1 -0
- package/dist/private/intl/previewtrigger/bg-BG.mjs +8 -0
- package/dist/private/intl/previewtrigger/bg-BG.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/cs-CZ.cjs +6 -0
- package/dist/private/intl/previewtrigger/cs-CZ.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/cs-CZ.js +8 -0
- package/dist/private/intl/previewtrigger/cs-CZ.js.map +1 -0
- package/dist/private/intl/previewtrigger/cs-CZ.mjs +8 -0
- package/dist/private/intl/previewtrigger/cs-CZ.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/da-DK.cjs +6 -0
- package/dist/private/intl/previewtrigger/da-DK.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/da-DK.js +8 -0
- package/dist/private/intl/previewtrigger/da-DK.js.map +1 -0
- package/dist/private/intl/previewtrigger/da-DK.mjs +8 -0
- package/dist/private/intl/previewtrigger/da-DK.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/de-DE.cjs +6 -0
- package/dist/private/intl/previewtrigger/de-DE.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/de-DE.js +8 -0
- package/dist/private/intl/previewtrigger/de-DE.js.map +1 -0
- package/dist/private/intl/previewtrigger/de-DE.mjs +8 -0
- package/dist/private/intl/previewtrigger/de-DE.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/el-GR.cjs +6 -0
- package/dist/private/intl/previewtrigger/el-GR.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/el-GR.js +8 -0
- package/dist/private/intl/previewtrigger/el-GR.js.map +1 -0
- package/dist/private/intl/previewtrigger/el-GR.mjs +8 -0
- package/dist/private/intl/previewtrigger/el-GR.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/en-US.cjs +6 -0
- package/dist/private/intl/previewtrigger/en-US.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/en-US.js +8 -0
- package/dist/private/intl/previewtrigger/en-US.js.map +1 -0
- package/dist/private/intl/previewtrigger/en-US.mjs +8 -0
- package/dist/private/intl/previewtrigger/en-US.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/es-ES.cjs +6 -0
- package/dist/private/intl/previewtrigger/es-ES.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/es-ES.js +8 -0
- package/dist/private/intl/previewtrigger/es-ES.js.map +1 -0
- package/dist/private/intl/previewtrigger/es-ES.mjs +8 -0
- package/dist/private/intl/previewtrigger/es-ES.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/et-EE.cjs +6 -0
- package/dist/private/intl/previewtrigger/et-EE.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/et-EE.js +8 -0
- package/dist/private/intl/previewtrigger/et-EE.js.map +1 -0
- package/dist/private/intl/previewtrigger/et-EE.mjs +8 -0
- package/dist/private/intl/previewtrigger/et-EE.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/fi-FI.cjs +6 -0
- package/dist/private/intl/previewtrigger/fi-FI.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/fi-FI.js +8 -0
- package/dist/private/intl/previewtrigger/fi-FI.js.map +1 -0
- package/dist/private/intl/previewtrigger/fi-FI.mjs +8 -0
- package/dist/private/intl/previewtrigger/fi-FI.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/fr-FR.cjs +6 -0
- package/dist/private/intl/previewtrigger/fr-FR.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/fr-FR.js +8 -0
- package/dist/private/intl/previewtrigger/fr-FR.js.map +1 -0
- package/dist/private/intl/previewtrigger/fr-FR.mjs +8 -0
- package/dist/private/intl/previewtrigger/fr-FR.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/he-IL.cjs +6 -0
- package/dist/private/intl/previewtrigger/he-IL.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/he-IL.js +8 -0
- package/dist/private/intl/previewtrigger/he-IL.js.map +1 -0
- package/dist/private/intl/previewtrigger/he-IL.mjs +8 -0
- package/dist/private/intl/previewtrigger/he-IL.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/hr-HR.cjs +6 -0
- package/dist/private/intl/previewtrigger/hr-HR.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/hr-HR.js +8 -0
- package/dist/private/intl/previewtrigger/hr-HR.js.map +1 -0
- package/dist/private/intl/previewtrigger/hr-HR.mjs +8 -0
- package/dist/private/intl/previewtrigger/hr-HR.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/hu-HU.cjs +6 -0
- package/dist/private/intl/previewtrigger/hu-HU.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/hu-HU.js +8 -0
- package/dist/private/intl/previewtrigger/hu-HU.js.map +1 -0
- package/dist/private/intl/previewtrigger/hu-HU.mjs +8 -0
- package/dist/private/intl/previewtrigger/hu-HU.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/it-IT.cjs +6 -0
- package/dist/private/intl/previewtrigger/it-IT.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/it-IT.js +8 -0
- package/dist/private/intl/previewtrigger/it-IT.js.map +1 -0
- package/dist/private/intl/previewtrigger/it-IT.mjs +8 -0
- package/dist/private/intl/previewtrigger/it-IT.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/ja-JP.cjs +6 -0
- package/dist/private/intl/previewtrigger/ja-JP.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/ja-JP.js +8 -0
- package/dist/private/intl/previewtrigger/ja-JP.js.map +1 -0
- package/dist/private/intl/previewtrigger/ja-JP.mjs +8 -0
- package/dist/private/intl/previewtrigger/ja-JP.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/ko-KR.cjs +6 -0
- package/dist/private/intl/previewtrigger/ko-KR.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/ko-KR.js +8 -0
- package/dist/private/intl/previewtrigger/ko-KR.js.map +1 -0
- package/dist/private/intl/previewtrigger/ko-KR.mjs +8 -0
- package/dist/private/intl/previewtrigger/ko-KR.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/lt-LT.cjs +6 -0
- package/dist/private/intl/previewtrigger/lt-LT.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/lt-LT.js +8 -0
- package/dist/private/intl/previewtrigger/lt-LT.js.map +1 -0
- package/dist/private/intl/previewtrigger/lt-LT.mjs +8 -0
- package/dist/private/intl/previewtrigger/lt-LT.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/lv-LV.cjs +6 -0
- package/dist/private/intl/previewtrigger/lv-LV.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/lv-LV.js +8 -0
- package/dist/private/intl/previewtrigger/lv-LV.js.map +1 -0
- package/dist/private/intl/previewtrigger/lv-LV.mjs +8 -0
- package/dist/private/intl/previewtrigger/lv-LV.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/nb-NO.cjs +6 -0
- package/dist/private/intl/previewtrigger/nb-NO.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/nb-NO.js +8 -0
- package/dist/private/intl/previewtrigger/nb-NO.js.map +1 -0
- package/dist/private/intl/previewtrigger/nb-NO.mjs +8 -0
- package/dist/private/intl/previewtrigger/nb-NO.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/nl-NL.cjs +6 -0
- package/dist/private/intl/previewtrigger/nl-NL.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/nl-NL.js +8 -0
- package/dist/private/intl/previewtrigger/nl-NL.js.map +1 -0
- package/dist/private/intl/previewtrigger/nl-NL.mjs +8 -0
- package/dist/private/intl/previewtrigger/nl-NL.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/pl-PL.cjs +6 -0
- package/dist/private/intl/previewtrigger/pl-PL.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/pl-PL.js +8 -0
- package/dist/private/intl/previewtrigger/pl-PL.js.map +1 -0
- package/dist/private/intl/previewtrigger/pl-PL.mjs +8 -0
- package/dist/private/intl/previewtrigger/pl-PL.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/pt-BR.cjs +6 -0
- package/dist/private/intl/previewtrigger/pt-BR.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/pt-BR.js +8 -0
- package/dist/private/intl/previewtrigger/pt-BR.js.map +1 -0
- package/dist/private/intl/previewtrigger/pt-BR.mjs +8 -0
- package/dist/private/intl/previewtrigger/pt-BR.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/pt-PT.cjs +6 -0
- package/dist/private/intl/previewtrigger/pt-PT.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/pt-PT.js +8 -0
- package/dist/private/intl/previewtrigger/pt-PT.js.map +1 -0
- package/dist/private/intl/previewtrigger/pt-PT.mjs +8 -0
- package/dist/private/intl/previewtrigger/pt-PT.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/ro-RO.cjs +6 -0
- package/dist/private/intl/previewtrigger/ro-RO.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/ro-RO.js +8 -0
- package/dist/private/intl/previewtrigger/ro-RO.js.map +1 -0
- package/dist/private/intl/previewtrigger/ro-RO.mjs +8 -0
- package/dist/private/intl/previewtrigger/ro-RO.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/ru-RU.cjs +6 -0
- package/dist/private/intl/previewtrigger/ru-RU.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/ru-RU.js +8 -0
- package/dist/private/intl/previewtrigger/ru-RU.js.map +1 -0
- package/dist/private/intl/previewtrigger/ru-RU.mjs +8 -0
- package/dist/private/intl/previewtrigger/ru-RU.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/sk-SK.cjs +6 -0
- package/dist/private/intl/previewtrigger/sk-SK.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/sk-SK.js +8 -0
- package/dist/private/intl/previewtrigger/sk-SK.js.map +1 -0
- package/dist/private/intl/previewtrigger/sk-SK.mjs +8 -0
- package/dist/private/intl/previewtrigger/sk-SK.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/sl-SI.cjs +6 -0
- package/dist/private/intl/previewtrigger/sl-SI.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/sl-SI.js +8 -0
- package/dist/private/intl/previewtrigger/sl-SI.js.map +1 -0
- package/dist/private/intl/previewtrigger/sl-SI.mjs +8 -0
- package/dist/private/intl/previewtrigger/sl-SI.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/sr-SP.cjs +6 -0
- package/dist/private/intl/previewtrigger/sr-SP.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/sr-SP.js +8 -0
- package/dist/private/intl/previewtrigger/sr-SP.js.map +1 -0
- package/dist/private/intl/previewtrigger/sr-SP.mjs +8 -0
- package/dist/private/intl/previewtrigger/sr-SP.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/sv-SE.cjs +6 -0
- package/dist/private/intl/previewtrigger/sv-SE.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/sv-SE.js +8 -0
- package/dist/private/intl/previewtrigger/sv-SE.js.map +1 -0
- package/dist/private/intl/previewtrigger/sv-SE.mjs +8 -0
- package/dist/private/intl/previewtrigger/sv-SE.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/tr-TR.cjs +6 -0
- package/dist/private/intl/previewtrigger/tr-TR.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/tr-TR.js +8 -0
- package/dist/private/intl/previewtrigger/tr-TR.js.map +1 -0
- package/dist/private/intl/previewtrigger/tr-TR.mjs +8 -0
- package/dist/private/intl/previewtrigger/tr-TR.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/uk-UA.cjs +6 -0
- package/dist/private/intl/previewtrigger/uk-UA.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/uk-UA.js +8 -0
- package/dist/private/intl/previewtrigger/uk-UA.js.map +1 -0
- package/dist/private/intl/previewtrigger/uk-UA.mjs +8 -0
- package/dist/private/intl/previewtrigger/uk-UA.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/zh-CN.cjs +6 -0
- package/dist/private/intl/previewtrigger/zh-CN.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/zh-CN.js +8 -0
- package/dist/private/intl/previewtrigger/zh-CN.js.map +1 -0
- package/dist/private/intl/previewtrigger/zh-CN.mjs +8 -0
- package/dist/private/intl/previewtrigger/zh-CN.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/zh-TW.cjs +6 -0
- package/dist/private/intl/previewtrigger/zh-TW.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/zh-TW.js +8 -0
- package/dist/private/intl/previewtrigger/zh-TW.js.map +1 -0
- package/dist/private/intl/previewtrigger/zh-TW.mjs +8 -0
- package/dist/private/intl/previewtrigger/zh-TW.mjs.map +1 -0
- package/dist/private/intl/table/ar-AE.cjs +3 -3
- package/dist/private/intl/table/ar-AE.cjs.map +1 -1
- package/dist/private/intl/table/ar-AE.js +3 -3
- package/dist/private/intl/table/ar-AE.js.map +1 -1
- package/dist/private/intl/table/ar-AE.mjs +3 -3
- package/dist/private/intl/table/ar-AE.mjs.map +1 -1
- package/dist/private/intl/table/bg-BG.cjs +3 -3
- package/dist/private/intl/table/bg-BG.cjs.map +1 -1
- package/dist/private/intl/table/bg-BG.js +3 -3
- package/dist/private/intl/table/bg-BG.js.map +1 -1
- package/dist/private/intl/table/bg-BG.mjs +3 -3
- package/dist/private/intl/table/bg-BG.mjs.map +1 -1
- package/dist/private/intl/table/cs-CZ.cjs +3 -3
- package/dist/private/intl/table/cs-CZ.cjs.map +1 -1
- package/dist/private/intl/table/cs-CZ.js +3 -3
- package/dist/private/intl/table/cs-CZ.js.map +1 -1
- package/dist/private/intl/table/cs-CZ.mjs +3 -3
- package/dist/private/intl/table/cs-CZ.mjs.map +1 -1
- package/dist/private/intl/table/da-DK.cjs +3 -3
- package/dist/private/intl/table/da-DK.cjs.map +1 -1
- package/dist/private/intl/table/da-DK.js +3 -3
- package/dist/private/intl/table/da-DK.js.map +1 -1
- package/dist/private/intl/table/da-DK.mjs +3 -3
- package/dist/private/intl/table/da-DK.mjs.map +1 -1
- package/dist/private/intl/table/de-DE.cjs +3 -3
- package/dist/private/intl/table/de-DE.cjs.map +1 -1
- package/dist/private/intl/table/de-DE.js +3 -3
- package/dist/private/intl/table/de-DE.js.map +1 -1
- package/dist/private/intl/table/de-DE.mjs +3 -3
- package/dist/private/intl/table/de-DE.mjs.map +1 -1
- package/dist/private/intl/table/el-GR.cjs +3 -3
- package/dist/private/intl/table/el-GR.cjs.map +1 -1
- package/dist/private/intl/table/el-GR.js +3 -3
- package/dist/private/intl/table/el-GR.js.map +1 -1
- package/dist/private/intl/table/el-GR.mjs +3 -3
- package/dist/private/intl/table/el-GR.mjs.map +1 -1
- package/dist/private/intl/table/es-ES.cjs +3 -3
- package/dist/private/intl/table/es-ES.cjs.map +1 -1
- package/dist/private/intl/table/es-ES.js +3 -3
- package/dist/private/intl/table/es-ES.js.map +1 -1
- package/dist/private/intl/table/es-ES.mjs +3 -3
- package/dist/private/intl/table/es-ES.mjs.map +1 -1
- package/dist/private/intl/table/et-EE.cjs +3 -3
- package/dist/private/intl/table/et-EE.cjs.map +1 -1
- package/dist/private/intl/table/et-EE.js +3 -3
- package/dist/private/intl/table/et-EE.js.map +1 -1
- package/dist/private/intl/table/et-EE.mjs +3 -3
- package/dist/private/intl/table/et-EE.mjs.map +1 -1
- package/dist/private/intl/table/fi-FI.cjs +3 -3
- package/dist/private/intl/table/fi-FI.cjs.map +1 -1
- package/dist/private/intl/table/fi-FI.js +3 -3
- package/dist/private/intl/table/fi-FI.js.map +1 -1
- package/dist/private/intl/table/fi-FI.mjs +3 -3
- package/dist/private/intl/table/fi-FI.mjs.map +1 -1
- package/dist/private/intl/table/fr-FR.cjs +3 -3
- package/dist/private/intl/table/fr-FR.cjs.map +1 -1
- package/dist/private/intl/table/fr-FR.js +3 -3
- package/dist/private/intl/table/fr-FR.js.map +1 -1
- package/dist/private/intl/table/fr-FR.mjs +3 -3
- package/dist/private/intl/table/fr-FR.mjs.map +1 -1
- package/dist/private/intl/table/he-IL.cjs +3 -3
- package/dist/private/intl/table/he-IL.cjs.map +1 -1
- package/dist/private/intl/table/he-IL.js +3 -3
- package/dist/private/intl/table/he-IL.js.map +1 -1
- package/dist/private/intl/table/he-IL.mjs +3 -3
- package/dist/private/intl/table/he-IL.mjs.map +1 -1
- package/dist/private/intl/table/hr-HR.cjs +3 -3
- package/dist/private/intl/table/hr-HR.cjs.map +1 -1
- package/dist/private/intl/table/hr-HR.js +3 -3
- package/dist/private/intl/table/hr-HR.js.map +1 -1
- package/dist/private/intl/table/hr-HR.mjs +3 -3
- package/dist/private/intl/table/hr-HR.mjs.map +1 -1
- package/dist/private/intl/table/hu-HU.cjs +3 -3
- package/dist/private/intl/table/hu-HU.cjs.map +1 -1
- package/dist/private/intl/table/hu-HU.js +3 -3
- package/dist/private/intl/table/hu-HU.js.map +1 -1
- package/dist/private/intl/table/hu-HU.mjs +3 -3
- package/dist/private/intl/table/hu-HU.mjs.map +1 -1
- package/dist/private/intl/table/it-IT.cjs +3 -3
- package/dist/private/intl/table/it-IT.cjs.map +1 -1
- package/dist/private/intl/table/it-IT.js +3 -3
- package/dist/private/intl/table/it-IT.js.map +1 -1
- package/dist/private/intl/table/it-IT.mjs +3 -3
- package/dist/private/intl/table/it-IT.mjs.map +1 -1
- package/dist/private/intl/table/ja-JP.cjs +3 -3
- package/dist/private/intl/table/ja-JP.cjs.map +1 -1
- package/dist/private/intl/table/ja-JP.js +3 -3
- package/dist/private/intl/table/ja-JP.js.map +1 -1
- package/dist/private/intl/table/ja-JP.mjs +3 -3
- package/dist/private/intl/table/ja-JP.mjs.map +1 -1
- package/dist/private/intl/table/ko-KR.cjs +3 -3
- package/dist/private/intl/table/ko-KR.cjs.map +1 -1
- package/dist/private/intl/table/ko-KR.js +3 -3
- package/dist/private/intl/table/ko-KR.js.map +1 -1
- package/dist/private/intl/table/ko-KR.mjs +3 -3
- package/dist/private/intl/table/ko-KR.mjs.map +1 -1
- package/dist/private/intl/table/lt-LT.cjs +3 -3
- package/dist/private/intl/table/lt-LT.cjs.map +1 -1
- package/dist/private/intl/table/lt-LT.js +3 -3
- package/dist/private/intl/table/lt-LT.js.map +1 -1
- package/dist/private/intl/table/lt-LT.mjs +3 -3
- package/dist/private/intl/table/lt-LT.mjs.map +1 -1
- package/dist/private/intl/table/lv-LV.cjs +3 -3
- package/dist/private/intl/table/lv-LV.cjs.map +1 -1
- package/dist/private/intl/table/lv-LV.js +3 -3
- package/dist/private/intl/table/lv-LV.js.map +1 -1
- package/dist/private/intl/table/lv-LV.mjs +3 -3
- package/dist/private/intl/table/lv-LV.mjs.map +1 -1
- package/dist/private/intl/table/nb-NO.cjs +3 -3
- package/dist/private/intl/table/nb-NO.cjs.map +1 -1
- package/dist/private/intl/table/nb-NO.js +3 -3
- package/dist/private/intl/table/nb-NO.js.map +1 -1
- package/dist/private/intl/table/nb-NO.mjs +3 -3
- package/dist/private/intl/table/nb-NO.mjs.map +1 -1
- package/dist/private/intl/table/nl-NL.cjs +3 -3
- package/dist/private/intl/table/nl-NL.cjs.map +1 -1
- package/dist/private/intl/table/nl-NL.js +3 -3
- package/dist/private/intl/table/nl-NL.js.map +1 -1
- package/dist/private/intl/table/nl-NL.mjs +3 -3
- package/dist/private/intl/table/nl-NL.mjs.map +1 -1
- package/dist/private/intl/table/pl-PL.cjs +3 -3
- package/dist/private/intl/table/pl-PL.cjs.map +1 -1
- package/dist/private/intl/table/pl-PL.js +3 -3
- package/dist/private/intl/table/pl-PL.js.map +1 -1
- package/dist/private/intl/table/pl-PL.mjs +3 -3
- package/dist/private/intl/table/pl-PL.mjs.map +1 -1
- package/dist/private/intl/table/pt-BR.cjs +3 -3
- package/dist/private/intl/table/pt-BR.cjs.map +1 -1
- package/dist/private/intl/table/pt-BR.js +3 -3
- package/dist/private/intl/table/pt-BR.js.map +1 -1
- package/dist/private/intl/table/pt-BR.mjs +3 -3
- package/dist/private/intl/table/pt-BR.mjs.map +1 -1
- package/dist/private/intl/table/pt-PT.cjs +3 -3
- package/dist/private/intl/table/pt-PT.cjs.map +1 -1
- package/dist/private/intl/table/pt-PT.js +3 -3
- package/dist/private/intl/table/pt-PT.js.map +1 -1
- package/dist/private/intl/table/pt-PT.mjs +3 -3
- package/dist/private/intl/table/pt-PT.mjs.map +1 -1
- package/dist/private/intl/table/ro-RO.cjs +3 -3
- package/dist/private/intl/table/ro-RO.cjs.map +1 -1
- package/dist/private/intl/table/ro-RO.js +3 -3
- package/dist/private/intl/table/ro-RO.js.map +1 -1
- package/dist/private/intl/table/ro-RO.mjs +3 -3
- package/dist/private/intl/table/ro-RO.mjs.map +1 -1
- package/dist/private/intl/table/ru-RU.cjs +3 -3
- package/dist/private/intl/table/ru-RU.cjs.map +1 -1
- package/dist/private/intl/table/ru-RU.js +3 -3
- package/dist/private/intl/table/ru-RU.js.map +1 -1
- package/dist/private/intl/table/ru-RU.mjs +3 -3
- package/dist/private/intl/table/ru-RU.mjs.map +1 -1
- package/dist/private/intl/table/sk-SK.cjs +3 -3
- package/dist/private/intl/table/sk-SK.cjs.map +1 -1
- package/dist/private/intl/table/sk-SK.js +3 -3
- package/dist/private/intl/table/sk-SK.js.map +1 -1
- package/dist/private/intl/table/sk-SK.mjs +3 -3
- package/dist/private/intl/table/sk-SK.mjs.map +1 -1
- package/dist/private/intl/table/sl-SI.cjs +3 -3
- package/dist/private/intl/table/sl-SI.cjs.map +1 -1
- package/dist/private/intl/table/sl-SI.js +3 -3
- package/dist/private/intl/table/sl-SI.js.map +1 -1
- package/dist/private/intl/table/sl-SI.mjs +3 -3
- package/dist/private/intl/table/sl-SI.mjs.map +1 -1
- package/dist/private/intl/table/sr-SP.cjs +3 -3
- package/dist/private/intl/table/sr-SP.cjs.map +1 -1
- package/dist/private/intl/table/sr-SP.js +3 -3
- package/dist/private/intl/table/sr-SP.js.map +1 -1
- package/dist/private/intl/table/sr-SP.mjs +3 -3
- package/dist/private/intl/table/sr-SP.mjs.map +1 -1
- package/dist/private/intl/table/sv-SE.cjs +3 -3
- package/dist/private/intl/table/sv-SE.cjs.map +1 -1
- package/dist/private/intl/table/sv-SE.js +3 -3
- package/dist/private/intl/table/sv-SE.js.map +1 -1
- package/dist/private/intl/table/sv-SE.mjs +3 -3
- package/dist/private/intl/table/sv-SE.mjs.map +1 -1
- package/dist/private/intl/table/tr-TR.cjs +3 -3
- package/dist/private/intl/table/tr-TR.cjs.map +1 -1
- package/dist/private/intl/table/tr-TR.js +3 -3
- package/dist/private/intl/table/tr-TR.js.map +1 -1
- package/dist/private/intl/table/tr-TR.mjs +3 -3
- package/dist/private/intl/table/tr-TR.mjs.map +1 -1
- package/dist/private/intl/table/uk-UA.cjs +3 -3
- package/dist/private/intl/table/uk-UA.cjs.map +1 -1
- package/dist/private/intl/table/uk-UA.js +3 -3
- package/dist/private/intl/table/uk-UA.js.map +1 -1
- package/dist/private/intl/table/uk-UA.mjs +3 -3
- package/dist/private/intl/table/uk-UA.mjs.map +1 -1
- package/dist/private/intl/table/zh-CN.cjs +4 -4
- package/dist/private/intl/table/zh-CN.cjs.map +1 -1
- package/dist/private/intl/table/zh-CN.js +4 -4
- package/dist/private/intl/table/zh-CN.js.map +1 -1
- package/dist/private/intl/table/zh-CN.mjs +4 -4
- package/dist/private/intl/table/zh-CN.mjs.map +1 -1
- package/dist/private/intl/table/zh-TW.cjs +3 -3
- package/dist/private/intl/table/zh-TW.cjs.map +1 -1
- package/dist/private/intl/table/zh-TW.js +3 -3
- package/dist/private/intl/table/zh-TW.js.map +1 -1
- package/dist/private/intl/table/zh-TW.mjs +3 -3
- package/dist/private/intl/table/zh-TW.mjs.map +1 -1
- package/dist/private/intl/tree/es-ES.cjs +1 -1
- package/dist/private/intl/tree/es-ES.cjs.map +1 -1
- package/dist/private/intl/tree/es-ES.js +1 -1
- package/dist/private/intl/tree/es-ES.js.map +1 -1
- package/dist/private/intl/tree/es-ES.mjs +1 -1
- package/dist/private/intl/tree/es-ES.mjs.map +1 -1
- package/dist/private/link/useLink.cjs +2 -1
- package/dist/private/link/useLink.cjs.map +1 -1
- package/dist/private/link/useLink.js +2 -1
- package/dist/private/link/useLink.js.map +1 -1
- package/dist/private/link/useLink.mjs +2 -1
- package/dist/private/link/useLink.mjs.map +1 -1
- package/dist/private/menu/useMenuItem.cjs +33 -33
- package/dist/private/menu/useMenuItem.cjs.map +1 -1
- package/dist/private/menu/useMenuItem.js +33 -33
- package/dist/private/menu/useMenuItem.js.map +1 -1
- package/dist/private/menu/useMenuItem.mjs +33 -33
- package/dist/private/menu/useMenuItem.mjs.map +1 -1
- package/dist/private/menu/useMenuTrigger.cjs +96 -30
- package/dist/private/menu/useMenuTrigger.cjs.map +1 -1
- package/dist/private/menu/useMenuTrigger.js +96 -30
- package/dist/private/menu/useMenuTrigger.js.map +1 -1
- package/dist/private/menu/useMenuTrigger.mjs +96 -30
- package/dist/private/menu/useMenuTrigger.mjs.map +1 -1
- package/dist/private/menu/useSubmenuTrigger.cjs +44 -36
- package/dist/private/menu/useSubmenuTrigger.cjs.map +1 -1
- package/dist/private/menu/useSubmenuTrigger.js +44 -36
- package/dist/private/menu/useSubmenuTrigger.js.map +1 -1
- package/dist/private/menu/useSubmenuTrigger.mjs +44 -36
- package/dist/private/menu/useSubmenuTrigger.mjs.map +1 -1
- package/dist/private/numberfield/useNumberField.cjs +24 -19
- package/dist/private/numberfield/useNumberField.cjs.map +1 -1
- package/dist/private/numberfield/useNumberField.js +24 -19
- package/dist/private/numberfield/useNumberField.js.map +1 -1
- package/dist/private/numberfield/useNumberField.mjs +24 -19
- package/dist/private/numberfield/useNumberField.mjs.map +1 -1
- package/dist/private/overlays/Overlay.cjs +5 -1
- package/dist/private/overlays/Overlay.cjs.map +1 -1
- package/dist/private/overlays/Overlay.js +5 -1
- package/dist/private/overlays/Overlay.js.map +1 -1
- package/dist/private/overlays/Overlay.mjs +5 -1
- package/dist/private/overlays/Overlay.mjs.map +1 -1
- package/dist/private/overlays/ariaHideOutside.cjs +12 -8
- package/dist/private/overlays/ariaHideOutside.cjs.map +1 -1
- package/dist/private/overlays/ariaHideOutside.js +13 -9
- package/dist/private/overlays/ariaHideOutside.js.map +1 -1
- package/dist/private/overlays/ariaHideOutside.mjs +13 -9
- package/dist/private/overlays/ariaHideOutside.mjs.map +1 -1
- package/dist/private/overlays/useCloseOnScroll.cjs +3 -4
- package/dist/private/overlays/useCloseOnScroll.cjs.map +1 -1
- package/dist/private/overlays/useCloseOnScroll.js +4 -5
- package/dist/private/overlays/useCloseOnScroll.js.map +1 -1
- package/dist/private/overlays/useCloseOnScroll.mjs +4 -5
- package/dist/private/overlays/useCloseOnScroll.mjs.map +1 -1
- package/dist/private/overlays/useOverlay.cjs +13 -7
- package/dist/private/overlays/useOverlay.cjs.map +1 -1
- package/dist/private/overlays/useOverlay.js +13 -7
- package/dist/private/overlays/useOverlay.js.map +1 -1
- package/dist/private/overlays/useOverlay.mjs +13 -7
- package/dist/private/overlays/useOverlay.mjs.map +1 -1
- package/dist/private/overlays/useOverlayPosition.cjs +6 -0
- package/dist/private/overlays/useOverlayPosition.cjs.map +1 -1
- package/dist/private/overlays/useOverlayPosition.js +6 -0
- package/dist/private/overlays/useOverlayPosition.js.map +1 -1
- package/dist/private/overlays/useOverlayPosition.mjs +6 -0
- package/dist/private/overlays/useOverlayPosition.mjs.map +1 -1
- package/dist/private/overlays/usePopover.cjs +6 -2
- package/dist/private/overlays/usePopover.cjs.map +1 -1
- package/dist/private/overlays/usePopover.js +7 -2
- package/dist/private/overlays/usePopover.js.map +1 -1
- package/dist/private/overlays/usePopover.mjs +6 -2
- package/dist/private/overlays/usePopover.mjs.map +1 -1
- package/dist/private/overlays/usePreventScroll.cjs +2 -5
- package/dist/private/overlays/usePreventScroll.cjs.map +1 -1
- package/dist/private/overlays/usePreventScroll.js +3 -6
- package/dist/private/overlays/usePreventScroll.js.map +1 -1
- package/dist/private/overlays/usePreventScroll.mjs +3 -6
- package/dist/private/overlays/usePreventScroll.mjs.map +1 -1
- package/dist/private/progress/useProgressBar.cjs +2 -1
- package/dist/private/progress/useProgressBar.cjs.map +1 -1
- package/dist/private/progress/useProgressBar.js +2 -1
- package/dist/private/progress/useProgressBar.js.map +1 -1
- package/dist/private/progress/useProgressBar.mjs +2 -1
- package/dist/private/progress/useProgressBar.mjs.map +1 -1
- package/dist/private/radio/useRadioGroup.cjs +26 -23
- package/dist/private/radio/useRadioGroup.cjs.map +1 -1
- package/dist/private/radio/useRadioGroup.js +26 -23
- package/dist/private/radio/useRadioGroup.js.map +1 -1
- package/dist/private/radio/useRadioGroup.mjs +26 -23
- package/dist/private/radio/useRadioGroup.mjs.map +1 -1
- package/dist/private/searchfield/useSearchField.cjs +28 -22
- package/dist/private/searchfield/useSearchField.cjs.map +1 -1
- package/dist/private/searchfield/useSearchField.js +28 -22
- package/dist/private/searchfield/useSearchField.js.map +1 -1
- package/dist/private/searchfield/useSearchField.mjs +28 -22
- package/dist/private/searchfield/useSearchField.mjs.map +1 -1
- package/dist/private/select/useSelect.cjs +21 -23
- package/dist/private/select/useSelect.cjs.map +1 -1
- package/dist/private/select/useSelect.js +23 -25
- package/dist/private/select/useSelect.js.map +1 -1
- package/dist/private/select/useSelect.mjs +21 -23
- package/dist/private/select/useSelect.mjs.map +1 -1
- package/dist/private/selection/useSelectableCollection.cjs +203 -146
- package/dist/private/selection/useSelectableCollection.cjs.map +1 -1
- package/dist/private/selection/useSelectableCollection.js +207 -150
- package/dist/private/selection/useSelectableCollection.js.map +1 -1
- package/dist/private/selection/useSelectableCollection.mjs +203 -146
- package/dist/private/selection/useSelectableCollection.mjs.map +1 -1
- package/dist/private/selection/useSelectableItem.cjs +58 -13
- package/dist/private/selection/useSelectableItem.cjs.map +1 -1
- package/dist/private/selection/useSelectableItem.js +58 -13
- package/dist/private/selection/useSelectableItem.js.map +1 -1
- package/dist/private/selection/useSelectableItem.mjs +58 -13
- package/dist/private/selection/useSelectableItem.mjs.map +1 -1
- package/dist/private/slider/useSlider.cjs.map +1 -1
- package/dist/private/slider/useSlider.js.map +1 -1
- package/dist/private/slider/useSlider.mjs.map +1 -1
- package/dist/private/slider/useSliderThumb.cjs +28 -26
- package/dist/private/slider/useSliderThumb.cjs.map +1 -1
- package/dist/private/slider/useSliderThumb.js +28 -26
- package/dist/private/slider/useSliderThumb.js.map +1 -1
- package/dist/private/slider/useSliderThumb.mjs +28 -26
- package/dist/private/slider/useSliderThumb.mjs.map +1 -1
- package/dist/private/spinbutton/useSpinButton.cjs +49 -34
- package/dist/private/spinbutton/useSpinButton.cjs.map +1 -1
- package/dist/private/spinbutton/useSpinButton.js +49 -34
- package/dist/private/spinbutton/useSpinButton.js.map +1 -1
- package/dist/private/spinbutton/useSpinButton.mjs +49 -34
- package/dist/private/spinbutton/useSpinButton.mjs.map +1 -1
- package/dist/private/ssr/SSRProvider.cjs +12 -3
- package/dist/private/ssr/SSRProvider.cjs.map +1 -1
- package/dist/private/ssr/SSRProvider.js +12 -3
- package/dist/private/ssr/SSRProvider.js.map +1 -1
- package/dist/private/ssr/SSRProvider.mjs +12 -3
- package/dist/private/ssr/SSRProvider.mjs.map +1 -1
- package/dist/private/steplist/useStepListItem.cjs +0 -9
- package/dist/private/steplist/useStepListItem.cjs.map +1 -1
- package/dist/private/steplist/useStepListItem.js +0 -10
- package/dist/private/steplist/useStepListItem.js.map +1 -1
- package/dist/private/steplist/useStepListItem.mjs +0 -9
- package/dist/private/steplist/useStepListItem.mjs.map +1 -1
- package/dist/private/table/useTable.cjs +4 -2
- package/dist/private/table/useTable.cjs.map +1 -1
- package/dist/private/table/useTable.js +4 -2
- package/dist/private/table/useTable.js.map +1 -1
- package/dist/private/table/useTable.mjs +4 -2
- package/dist/private/table/useTable.mjs.map +1 -1
- package/dist/private/table/useTableCell.cjs +2 -0
- package/dist/private/table/useTableCell.cjs.map +1 -1
- package/dist/private/table/useTableCell.js +2 -0
- package/dist/private/table/useTableCell.js.map +1 -1
- package/dist/private/table/useTableCell.mjs +2 -0
- package/dist/private/table/useTableCell.mjs.map +1 -1
- package/dist/private/table/useTableColumnHeader.cjs +2 -3
- package/dist/private/table/useTableColumnHeader.cjs.map +1 -1
- package/dist/private/table/useTableColumnHeader.js +2 -3
- package/dist/private/table/useTableColumnHeader.js.map +1 -1
- package/dist/private/table/useTableColumnHeader.mjs +2 -3
- package/dist/private/table/useTableColumnHeader.mjs.map +1 -1
- package/dist/private/table/useTableColumnResize.cjs +32 -14
- package/dist/private/table/useTableColumnResize.cjs.map +1 -1
- package/dist/private/table/useTableColumnResize.js +33 -15
- package/dist/private/table/useTableColumnResize.js.map +1 -1
- package/dist/private/table/useTableColumnResize.mjs +33 -15
- package/dist/private/table/useTableColumnResize.mjs.map +1 -1
- package/dist/private/table/useTableRow.cjs +4 -2
- package/dist/private/table/useTableRow.cjs.map +1 -1
- package/dist/private/table/useTableRow.js +4 -2
- package/dist/private/table/useTableRow.js.map +1 -1
- package/dist/private/table/useTableRow.mjs +4 -2
- package/dist/private/table/useTableRow.mjs.map +1 -1
- package/dist/private/tag/useTag.cjs +21 -11
- package/dist/private/tag/useTag.cjs.map +1 -1
- package/dist/private/tag/useTag.js +21 -11
- package/dist/private/tag/useTag.js.map +1 -1
- package/dist/private/tag/useTag.mjs +21 -11
- package/dist/private/tag/useTag.mjs.map +1 -1
- package/dist/private/textfield/useFormattedTextField.cjs +1 -0
- package/dist/private/textfield/useFormattedTextField.cjs.map +1 -1
- package/dist/private/textfield/useFormattedTextField.js +1 -0
- package/dist/private/textfield/useFormattedTextField.js.map +1 -1
- package/dist/private/textfield/useFormattedTextField.mjs +1 -0
- package/dist/private/textfield/useFormattedTextField.mjs.map +1 -1
- package/dist/private/toast/useToastRegion.cjs +5 -0
- package/dist/private/toast/useToastRegion.cjs.map +1 -1
- package/dist/private/toast/useToastRegion.js +5 -0
- package/dist/private/toast/useToastRegion.js.map +1 -1
- package/dist/private/toast/useToastRegion.mjs +5 -0
- package/dist/private/toast/useToastRegion.mjs.map +1 -1
- package/dist/private/toggle/useToggle.cjs +1 -0
- package/dist/private/toggle/useToggle.cjs.map +1 -1
- package/dist/private/toggle/useToggle.js +1 -0
- package/dist/private/toggle/useToggle.js.map +1 -1
- package/dist/private/toggle/useToggle.mjs +1 -0
- package/dist/private/toggle/useToggle.mjs.map +1 -1
- package/dist/private/tokenfield/useToken.cjs +46 -0
- package/dist/private/tokenfield/useToken.cjs.map +1 -0
- package/dist/private/tokenfield/useToken.js +41 -0
- package/dist/private/tokenfield/useToken.js.map +1 -0
- package/dist/private/tokenfield/useToken.mjs +41 -0
- package/dist/private/tokenfield/useToken.mjs.map +1 -0
- package/dist/private/tokenfield/useTokenField.cjs +587 -0
- package/dist/private/tokenfield/useTokenField.cjs.map +1 -0
- package/dist/private/tokenfield/useTokenField.js +590 -0
- package/dist/private/tokenfield/useTokenField.js.map +1 -0
- package/dist/private/tokenfield/useTokenField.mjs +579 -0
- package/dist/private/tokenfield/useTokenField.mjs.map +1 -0
- package/dist/private/toolbar/useToolbar.cjs +1 -0
- package/dist/private/toolbar/useToolbar.cjs.map +1 -1
- package/dist/private/toolbar/useToolbar.js +1 -0
- package/dist/private/toolbar/useToolbar.js.map +1 -1
- package/dist/private/toolbar/useToolbar.mjs +1 -0
- package/dist/private/toolbar/useToolbar.mjs.map +1 -1
- package/dist/private/tooltip/intlStrings.cjs +108 -0
- package/dist/private/tooltip/intlStrings.cjs.map +1 -0
- package/dist/private/tooltip/intlStrings.js +110 -0
- package/dist/private/tooltip/intlStrings.js.map +1 -0
- package/dist/private/tooltip/intlStrings.mjs +110 -0
- package/dist/private/tooltip/intlStrings.mjs.map +1 -0
- package/dist/private/tooltip/usePreviewTrigger.cjs +212 -0
- package/dist/private/tooltip/usePreviewTrigger.cjs.map +1 -0
- package/dist/private/tooltip/usePreviewTrigger.js +208 -0
- package/dist/private/tooltip/usePreviewTrigger.js.map +1 -0
- package/dist/private/tooltip/usePreviewTrigger.mjs +207 -0
- package/dist/private/tooltip/usePreviewTrigger.mjs.map +1 -0
- package/dist/private/tooltip/useSafeArea.cjs +134 -0
- package/dist/private/tooltip/useSafeArea.cjs.map +1 -0
- package/dist/private/tooltip/useSafeArea.js +130 -0
- package/dist/private/tooltip/useSafeArea.js.map +1 -0
- package/dist/private/tooltip/useSafeArea.mjs +129 -0
- package/dist/private/tooltip/useSafeArea.mjs.map +1 -0
- package/dist/private/tooltip/useTooltipTrigger.cjs +1 -0
- package/dist/private/tooltip/useTooltipTrigger.cjs.map +1 -1
- package/dist/private/tooltip/useTooltipTrigger.js +1 -0
- package/dist/private/tooltip/useTooltipTrigger.js.map +1 -1
- package/dist/private/tooltip/useTooltipTrigger.mjs +1 -0
- package/dist/private/tooltip/useTooltipTrigger.mjs.map +1 -1
- package/dist/private/tree/useTree.cjs +1 -0
- package/dist/private/tree/useTree.cjs.map +1 -1
- package/dist/private/tree/useTree.js +1 -0
- package/dist/private/tree/useTree.js.map +1 -1
- package/dist/private/tree/useTree.mjs +1 -0
- package/dist/private/tree/useTree.mjs.map +1 -1
- package/dist/private/utils/domHelpers.cjs +43 -12
- package/dist/private/utils/domHelpers.cjs.map +1 -1
- package/dist/private/utils/domHelpers.js +45 -14
- package/dist/private/utils/domHelpers.js.map +1 -1
- package/dist/private/utils/domHelpers.mjs +43 -13
- package/dist/private/utils/domHelpers.mjs.map +1 -1
- package/dist/private/utils/isVirtualEvent.cjs +1 -1
- package/dist/private/utils/isVirtualEvent.cjs.map +1 -1
- package/dist/private/utils/isVirtualEvent.js +1 -1
- package/dist/private/utils/isVirtualEvent.js.map +1 -1
- package/dist/private/utils/isVirtualEvent.mjs +1 -1
- package/dist/private/utils/isVirtualEvent.mjs.map +1 -1
- package/dist/private/utils/openLink.cjs +4 -2
- package/dist/private/utils/openLink.cjs.map +1 -1
- package/dist/private/utils/openLink.js +4 -2
- package/dist/private/utils/openLink.js.map +1 -1
- package/dist/private/utils/openLink.mjs +4 -2
- package/dist/private/utils/openLink.mjs.map +1 -1
- package/dist/private/utils/platform.cjs +8 -4
- package/dist/private/utils/platform.cjs.map +1 -1
- package/dist/private/utils/platform.js +7 -4
- package/dist/private/utils/platform.js.map +1 -1
- package/dist/private/utils/platform.mjs +7 -4
- package/dist/private/utils/platform.mjs.map +1 -1
- package/dist/private/utils/scrollIntoView.cjs +3 -3
- package/dist/private/utils/scrollIntoView.cjs.map +1 -1
- package/dist/private/utils/scrollIntoView.js +4 -4
- package/dist/private/utils/scrollIntoView.js.map +1 -1
- package/dist/private/utils/scrollIntoView.mjs +4 -4
- package/dist/private/utils/scrollIntoView.mjs.map +1 -1
- package/dist/private/utils/shadowdom/DOMFunctions.cjs +28 -1
- package/dist/private/utils/shadowdom/DOMFunctions.cjs.map +1 -1
- package/dist/private/utils/shadowdom/DOMFunctions.js +30 -2
- package/dist/private/utils/shadowdom/DOMFunctions.js.map +1 -1
- package/dist/private/utils/shadowdom/DOMFunctions.mjs +28 -2
- package/dist/private/utils/shadowdom/DOMFunctions.mjs.map +1 -1
- package/dist/private/utils/useDeepMemo.cjs +4 -1
- package/dist/private/utils/useDeepMemo.cjs.map +1 -1
- package/dist/private/utils/useDeepMemo.js +4 -1
- package/dist/private/utils/useDeepMemo.js.map +1 -1
- package/dist/private/utils/useDeepMemo.mjs +4 -1
- package/dist/private/utils/useDeepMemo.mjs.map +1 -1
- package/dist/private/utils/useDrag1D.cjs +2 -0
- package/dist/private/utils/useDrag1D.cjs.map +1 -1
- package/dist/private/utils/useDrag1D.js +2 -0
- package/dist/private/utils/useDrag1D.js.map +1 -1
- package/dist/private/utils/useDrag1D.mjs +2 -0
- package/dist/private/utils/useDrag1D.mjs.map +1 -1
- package/dist/private/utils/useFormReset.cjs +4 -0
- package/dist/private/utils/useFormReset.cjs.map +1 -1
- package/dist/private/utils/useFormReset.js +4 -0
- package/dist/private/utils/useFormReset.js.map +1 -1
- package/dist/private/utils/useFormReset.mjs +4 -0
- package/dist/private/utils/useFormReset.mjs.map +1 -1
- package/dist/private/utils/useId.cjs +23 -4
- package/dist/private/utils/useId.cjs.map +1 -1
- package/dist/private/utils/useId.js +23 -4
- package/dist/private/utils/useId.js.map +1 -1
- package/dist/private/utils/useId.mjs +23 -4
- package/dist/private/utils/useId.mjs.map +1 -1
- package/dist/private/utils/useLoadMoreSentinel.cjs +7 -3
- package/dist/private/utils/useLoadMoreSentinel.cjs.map +1 -1
- package/dist/private/utils/useLoadMoreSentinel.js +7 -3
- package/dist/private/utils/useLoadMoreSentinel.js.map +1 -1
- package/dist/private/utils/useLoadMoreSentinel.mjs +7 -3
- package/dist/private/utils/useLoadMoreSentinel.mjs.map +1 -1
- package/dist/private/utils/useObjectRef.cjs +3 -1
- package/dist/private/utils/useObjectRef.cjs.map +1 -1
- package/dist/private/utils/useObjectRef.js +3 -1
- package/dist/private/utils/useObjectRef.js.map +1 -1
- package/dist/private/utils/useObjectRef.mjs +3 -1
- package/dist/private/utils/useObjectRef.mjs.map +1 -1
- package/dist/private/utils/useSyncRef.cjs +2 -0
- package/dist/private/utils/useSyncRef.cjs.map +1 -1
- package/dist/private/utils/useSyncRef.js +2 -0
- package/dist/private/utils/useSyncRef.js.map +1 -1
- package/dist/private/utils/useSyncRef.mjs +2 -0
- package/dist/private/utils/useSyncRef.mjs.map +1 -1
- package/dist/private/utils/useViewportSize.cjs +3 -3
- package/dist/private/utils/useViewportSize.cjs.map +1 -1
- package/dist/private/utils/useViewportSize.js +4 -4
- package/dist/private/utils/useViewportSize.js.map +1 -1
- package/dist/private/utils/useViewportSize.mjs +4 -4
- package/dist/private/utils/useViewportSize.mjs.map +1 -1
- package/dist/private/virtualizer/ScrollView.cjs +7 -4
- package/dist/private/virtualizer/ScrollView.cjs.map +1 -1
- package/dist/private/virtualizer/ScrollView.js +8 -5
- package/dist/private/virtualizer/ScrollView.js.map +1 -1
- package/dist/private/virtualizer/ScrollView.mjs +8 -5
- package/dist/private/virtualizer/ScrollView.mjs.map +1 -1
- package/dist/private/virtualizer/VirtualizerItem.cjs +3 -2
- package/dist/private/virtualizer/VirtualizerItem.cjs.map +1 -1
- package/dist/private/virtualizer/VirtualizerItem.js +3 -2
- package/dist/private/virtualizer/VirtualizerItem.js.map +1 -1
- package/dist/private/virtualizer/VirtualizerItem.mjs +3 -2
- package/dist/private/virtualizer/VirtualizerItem.mjs.map +1 -1
- package/dist/private/virtualizer/useVirtualizerItem.cjs +35 -2
- package/dist/private/virtualizer/useVirtualizerItem.cjs.map +1 -1
- package/dist/private/virtualizer/useVirtualizerItem.js +36 -3
- package/dist/private/virtualizer/useVirtualizerItem.js.map +1 -1
- package/dist/private/virtualizer/useVirtualizerItem.mjs +36 -3
- package/dist/private/virtualizer/useVirtualizerItem.mjs.map +1 -1
- package/dist/private/visually-hidden/VisuallyHidden.cjs +2 -1
- package/dist/private/visually-hidden/VisuallyHidden.cjs.map +1 -1
- package/dist/private/visually-hidden/VisuallyHidden.js +2 -1
- package/dist/private/visually-hidden/VisuallyHidden.js.map +1 -1
- package/dist/private/visually-hidden/VisuallyHidden.mjs +2 -1
- package/dist/private/visually-hidden/VisuallyHidden.mjs.map +1 -1
- package/dist/types/exports/index.d.ts +9 -0
- package/dist/types/exports/private/utils/domHelpers.d.ts +1 -1
- package/dist/types/exports/private/utils/platform.d.ts +1 -1
- package/dist/types/exports/private/utils/shadowdom/DOMFunctions.d.ts +1 -1
- package/dist/types/exports/useContextMenu.d.ts +2 -0
- package/dist/types/exports/usePreviewTrigger.d.ts +2 -0
- package/dist/types/exports/useTokenField.d.ts +4 -0
- package/dist/types/src/button/useToggleButtonGroup.d.ts +8 -0
- package/dist/types/src/combobox/useComboBox.d.ts +7 -1
- package/dist/types/src/dialog/useDialog.d.ts +2 -0
- package/dist/types/src/grid/useGrid.d.ts +7 -0
- package/dist/types/src/grid/useGridCell.d.ts +8 -1
- package/dist/types/src/grid/utils.d.ts +1 -0
- package/dist/types/src/gridlist/useGridListItem.d.ts +13 -0
- package/dist/types/src/interactions/createKeyboardShortcutHandler.d.ts +56 -0
- package/dist/types/src/interactions/useContextMenu.d.ts +21 -0
- package/dist/types/src/interactions/useKeyboard.d.ts +7 -0
- package/dist/types/src/interactions/useLongPress.d.ts +2 -0
- package/dist/types/src/overlays/usePopover.d.ts +2 -1
- package/dist/types/src/table/useTableCell.d.ts +12 -0
- package/dist/types/src/table/useTableColumnHeader.d.ts +12 -0
- package/dist/types/src/table/useTableColumnResize.d.ts +5 -0
- package/dist/types/src/tokenfield/useToken.d.ts +14 -0
- package/dist/types/src/tokenfield/useTokenField.d.ts +57 -0
- package/dist/types/src/tooltip/usePreviewTrigger.d.ts +27 -0
- package/dist/types/src/tooltip/useSafeArea.d.ts +26 -0
- package/dist/types/src/utils/domHelpers.d.ts +20 -5
- package/dist/types/src/utils/platform.d.ts +1 -0
- package/dist/types/src/utils/shadowdom/DOMFunctions.d.ts +11 -0
- package/dist/types/src/utils/useLoadMoreSentinel.d.ts +7 -0
- package/dist/types/src/virtualizer/VirtualizerItem.d.ts +1 -0
- package/dist/types/src/virtualizer/useVirtualizerItem.d.ts +1 -0
- package/i18n/ar-AE.js +1 -1
- package/i18n/ar-AE.mjs +1 -1
- package/i18n/bg-BG.js +1 -1
- package/i18n/bg-BG.mjs +1 -1
- package/i18n/cs-CZ.js +1 -1
- package/i18n/cs-CZ.mjs +1 -1
- package/i18n/da-DK.js +1 -1
- package/i18n/da-DK.mjs +1 -1
- package/i18n/de-DE.js +1 -1
- package/i18n/de-DE.mjs +1 -1
- package/i18n/el-GR.js +1 -1
- package/i18n/el-GR.mjs +1 -1
- package/i18n/en-US.js +1 -1
- package/i18n/en-US.mjs +1 -1
- package/i18n/es-ES.js +1 -1
- package/i18n/es-ES.mjs +1 -1
- package/i18n/et-EE.js +1 -1
- package/i18n/et-EE.mjs +1 -1
- package/i18n/fi-FI.js +1 -1
- package/i18n/fi-FI.mjs +1 -1
- package/i18n/fr-FR.js +1 -1
- package/i18n/fr-FR.mjs +1 -1
- package/i18n/he-IL.js +1 -1
- package/i18n/he-IL.mjs +1 -1
- package/i18n/hr-HR.js +1 -1
- package/i18n/hr-HR.mjs +1 -1
- package/i18n/hu-HU.js +1 -1
- package/i18n/hu-HU.mjs +1 -1
- package/i18n/it-IT.js +1 -1
- package/i18n/it-IT.mjs +1 -1
- package/i18n/ja-JP.js +1 -1
- package/i18n/ja-JP.mjs +1 -1
- package/i18n/ko-KR.js +1 -1
- package/i18n/ko-KR.mjs +1 -1
- package/i18n/lt-LT.js +1 -1
- package/i18n/lt-LT.mjs +1 -1
- package/i18n/lv-LV.js +1 -1
- package/i18n/lv-LV.mjs +1 -1
- package/i18n/nb-NO.js +1 -1
- package/i18n/nb-NO.mjs +1 -1
- package/i18n/nl-NL.js +1 -1
- package/i18n/nl-NL.mjs +1 -1
- package/i18n/pl-PL.js +1 -1
- package/i18n/pl-PL.mjs +1 -1
- package/i18n/pt-BR.js +1 -1
- package/i18n/pt-BR.mjs +1 -1
- package/i18n/pt-PT.js +1 -1
- package/i18n/pt-PT.mjs +1 -1
- package/i18n/ro-RO.js +1 -1
- package/i18n/ro-RO.mjs +1 -1
- package/i18n/ru-RU.js +1 -1
- package/i18n/ru-RU.mjs +1 -1
- package/i18n/sk-SK.js +1 -1
- package/i18n/sk-SK.mjs +1 -1
- package/i18n/sl-SI.js +1 -1
- package/i18n/sl-SI.mjs +1 -1
- package/i18n/sr-SP.js +1 -1
- package/i18n/sr-SP.mjs +1 -1
- package/i18n/sv-SE.js +1 -1
- package/i18n/sv-SE.mjs +1 -1
- package/i18n/tr-TR.js +1 -1
- package/i18n/tr-TR.mjs +1 -1
- package/i18n/uk-UA.js +1 -1
- package/i18n/uk-UA.mjs +1 -1
- package/i18n/zh-CN.js +1 -1
- package/i18n/zh-CN.mjs +1 -1
- package/i18n/zh-TW.js +1 -1
- package/i18n/zh-TW.mjs +1 -1
- package/package.json +6 -6
- package/useContextMenu/package.json +5 -0
- package/usePreviewTrigger/package.json +5 -0
- package/useTokenField/package.json +5 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;;AAAA;;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3G,eAAe;QACjB;kBACA;sBACA;IACF;AACF","sources":["packages/react-aria/src/calendar/useCalendarGrid.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarDate, startOfWeek, today} from '@internationalized/date';\nimport {CalendarSelectionMode, CalendarState} from 'react-stately/useCalendarState';\nimport {DOMAttributes} from '@react-types/shared';\nimport {hookData, useVisibleRangeDescription} from './utils';\nimport {mergeProps} from '../utils/mergeProps';\nimport {RangeCalendarState} from 'react-stately/useRangeCalendarState';\nimport {useDateFormatter} from '../i18n/useDateFormatter';\nimport {useKeyboard} from '../interactions/useKeyboard';\nimport {useLabels} from '../utils/useLabels';\nimport {useLocale} from '../i18n/I18nProvider';\nimport {useMemo} from 'react';\n\nexport interface AriaCalendarGridProps {\n /**\n * The first date displayed in the calendar grid.\n * Defaults to the first visible date in the calendar.\n * Override this to display multiple date grids in a calendar.\n */\n startDate?: CalendarDate;\n /**\n * The last date displayed in the calendar grid.\n * Defaults to the last visible date in the calendar.\n * Override this to display multiple date grids in a calendar.\n */\n endDate?: CalendarDate;\n /**\n * The style of weekday names to display in the calendar grid header,\n * e.g. single letter, abbreviation, or full day name.\n *\n * @default 'narrow'\n */\n weekdayStyle?: 'narrow' | 'short' | 'long';\n /**\n * The day that starts the week.\n */\n firstDayOfWeek?: 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat';\n}\n\nexport interface CalendarGridAria {\n /** Props for the date grid element (e.g. `<table>`). */\n gridProps: DOMAttributes;\n /** Props for the grid header element (e.g. `<thead>`). */\n headerProps: DOMAttributes;\n /**\n * A list of week day abbreviations formatted for the current locale, typically used in column\n * headers.\n */\n weekDays: string[];\n /** The number of weeks in the month. */\n weeksInMonth: number;\n}\n\n/**\n * Provides the behavior and accessibility implementation for a calendar grid component.\n * A calendar grid displays a single grid of days within a calendar or range calendar which\n * can be keyboard navigated and selected by the user.\n */\nexport function useCalendarGrid(\n props: AriaCalendarGridProps,\n state: CalendarState<CalendarSelectionMode> | RangeCalendarState\n): CalendarGridAria {\n let {\n startDate = state.visibleRange.start,\n endDate = state.visibleRange.end,\n firstDayOfWeek\n } = props;\n\n let {direction} = useLocale();\n\n let {keyboardProps} = useKeyboard({\n shortcuts: {\n End: () => {\n state.focusSectionEnd();\n },\n Home: () => {\n state.focusSectionStart();\n },\n Escape: () => {\n // Cancel the selection.\n if ('setAnchorDate' in state) {\n state.setAnchorDate(null);\n }\n return false; // TODO: is this really correct? or should it return true when we cancel and only propagate if there's nothing to do\n }\n }\n });\n\n let {keyboardProps: repeatKeyboardProps} = useKeyboard({\n shortcuts: {\n Enter: () => {\n state.selectFocusedDate();\n },\n ' ': () => {\n state.selectFocusedDate();\n },\n PageUp: () => {\n state.focusPreviousSection();\n },\n 'Shift+PageUp': () => {\n state.focusPreviousSection(true);\n },\n PageDown: () => {\n state.focusNextSection();\n },\n 'Shift+PageDown': () => {\n state.focusNextSection(true);\n },\n ArrowLeft: () => {\n if (direction === 'rtl') {\n state.focusNextDay();\n } else {\n state.focusPreviousDay();\n }\n },\n ArrowUp: () => {\n state.focusPreviousRow();\n },\n ArrowRight: () => {\n if (direction === 'rtl') {\n state.focusPreviousDay();\n } else {\n state.focusNextDay();\n }\n },\n ArrowDown: () => {\n state.focusNextRow();\n }\n },\n allowRepeats: true\n });\n\n let visibleRangeDescription = useVisibleRangeDescription(\n startDate,\n endDate,\n state.timeZone,\n true\n );\n\n let {ariaLabel, ariaLabelledBy} = hookData.get(state)!;\n let labelProps = useLabels({\n 'aria-label': [ariaLabel, visibleRangeDescription].filter(Boolean).join(', '),\n 'aria-labelledby': ariaLabelledBy\n });\n\n let dayFormatter = useDateFormatter({\n weekday: props.weekdayStyle || 'narrow',\n timeZone: state.timeZone\n });\n let {locale} = useLocale();\n let weekDays = useMemo(() => {\n let isDayView = state.visibleDuration.days && state.visibleDuration.days < 7;\n let weekStart = isDayView\n ? startDate\n : startOfWeek(today(state.timeZone), locale, firstDayOfWeek);\n let days = isDayView ? state.visibleDuration.days! : 7;\n return [...new Array(days).keys()].map(index => {\n let date = weekStart.add({days: index});\n let dateDay = date.toDate(state.timeZone);\n return dayFormatter.format(dateDay);\n });\n }, [locale, state.timeZone, dayFormatter, firstDayOfWeek, startDate, state.visibleDuration.days]);\n let weeksInMonth = state.getWeeksInMonth(startDate);\n\n return {\n gridProps: mergeProps(\n labelProps,\n {\n role: 'grid',\n 'aria-readonly': state.isReadOnly || undefined,\n 'aria-disabled': state.isDisabled || undefined,\n 'aria-multiselectable':\n 'highlightedRange' in state || state.selectionMode === 'multiple' || undefined,\n onFocus: () => state.setFocused(true),\n onBlur: () => state.setFocused(false)\n },\n keyboardProps,\n repeatKeyboardProps\n ),\n headerProps: {\n // Column headers are hidden to screen readers to make navigating with a touch screen reader easier.\n // The day names are already included in the label of each cell, so there's no need to announce them twice.\n 'aria-hidden': true\n },\n weekDays,\n weeksInMonth\n };\n}\n"],"names":[],"version":3,"file":"useCalendarGrid.mjs.map"}
|
|
@@ -57,6 +57,7 @@ function $c552d0e45aac5890$export$87e0539f600c24e5(props, state, ref) {
|
|
|
57
57
|
(0, $6e76e65001bbcda2$exports.useEvent)(windowRef, 'pointerup', endDragging);
|
|
58
58
|
// Also execute method corresponding to `commitBehavior` on blur,
|
|
59
59
|
// e.g. tabbing away from the calendar.
|
|
60
|
+
// oxlint-disable-next-line react/react-compiler
|
|
60
61
|
res.calendarProps.onBlur = (e)=>{
|
|
61
62
|
if (!ref.current) return;
|
|
62
63
|
if ((!e.relatedTarget || !(0, $da02ee888921bc9e$exports.nodeContains)(ref.current, e.related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,MAAM,GAAG,CAAA;QACzB,IAAI,CAAC,IAAI,OAAO,EACd;QAGF,IAAI,AAAC,CAAA,CAAC,EAAE,aAAa,IAAI,CAAC,CAAA,GAAA,sCAAW,EAAE,IAAI,OAAO,EAAE,EAAE,aAAa,CAAA,KAAM,MAAM,UAAU,EACvF,qBAAqB,CAAC,eAAe;IAEzC;IAEA,yCAAyC;IACzC,CAAA,GAAA,kCAAO,EACL,KACA,aACA,CAAA;QACE,IAAI,MAAM,UAAU,EAClB,EAAE,cAAc;IAEpB,GACA;QAAC,SAAS;QAAO,SAAS;IAAI;IAGhC,OAAO;AACT","sources":["packages/react-aria/src/calendar/useRangeCalendar.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, FocusableElement, RefObject} from '@react-types/shared';\nimport {CalendarAria, useCalendarBase} from './useCalendarBase';\nimport {DateValue, RangeCalendarState} from 'react-stately/useRangeCalendarState';\nimport {isFocusWithin, nodeContains} from '../utils/shadowdom/DOMFunctions';\nimport {RangeCalendarProps} from 'react-stately/useRangeCalendarState';\nimport {useEvent} from '../utils/useEvent';\nimport {useRef} from 'react';\n\nexport interface AriaRangeCalendarProps<T extends DateValue>\n extends RangeCalendarProps<T>, DOMProps, AriaLabelingProps {\n /**\n * Controls the behavior when a pointer is released outside the calendar or a blur occurs mid\n * selection:\n *\n * - `clear`: clear the currently selected range of dates.\n * - `reset`: reset the selection to the previously selected range of dates.\n * - `select`: select the currently hovered range of dates.\n *\n * @default 'select'\n */\n commitBehavior?: 'clear' | 'reset' | 'select';\n}\n\n/**\n * Provides the behavior and accessibility implementation for a range calendar component. A range\n * calendar displays one or more date grids and allows users to select a contiguous range of dates.\n */\nexport function useRangeCalendar<T extends DateValue>(\n props: AriaRangeCalendarProps<T>,\n state: RangeCalendarState,\n ref: RefObject<FocusableElement | null>\n): CalendarAria {\n let {commitBehavior = 'select', ...otherProps} = props;\n let res = useCalendarBase(otherProps, state);\n\n // We need to ignore virtual pointer events from VoiceOver due to these bugs.\n // https://bugs.webkit.org/show_bug.cgi?id=222627\n // https://bugs.webkit.org/show_bug.cgi?id=223202\n // usePress also does this and waits for the following click event before firing.\n // We need to match that here otherwise this will fire before the press event in\n // useCalendarCell, causing range selection to not work properly.\n let isVirtualClick = useRef(false);\n let windowRef = useRef(typeof window !== 'undefined' ? window : null);\n useEvent(windowRef, 'pointerdown', e => {\n isVirtualClick.current = e.width === 0 && e.height === 0;\n });\n\n const commitBehaviorMapping = {\n clear: () => state.clearSelection(),\n reset: () => state.setAnchorDate(null),\n select: () => state.commitSelection()\n };\n\n // Execute method corresponding to `commitBehavior` when pressing or releasing a pointer outside the calendar body,\n // except when pressing the next or previous buttons to switch months.\n let endDragging = (e: PointerEvent) => {\n if (isVirtualClick.current) {\n isVirtualClick.current = false;\n return;\n }\n\n state.setDragging(false);\n if (!state.anchorDate) {\n return;\n }\n\n let target = e.target as Element;\n if (\n ref.current &&\n isFocusWithin(ref.current) &&\n (!nodeContains(ref.current, target) || !target.closest('button, [role=\"button\"]'))\n ) {\n commitBehaviorMapping[commitBehavior]();\n }\n };\n\n useEvent(windowRef, 'pointerup', endDragging);\n\n // Also execute method corresponding to `commitBehavior` on blur,\n // e.g. tabbing away from the calendar.\n res.calendarProps.onBlur = e => {\n if (!ref.current) {\n return;\n }\n\n if ((!e.relatedTarget || !nodeContains(ref.current, e.relatedTarget)) && state.anchorDate) {\n commitBehaviorMapping[commitBehavior]();\n }\n };\n\n // Prevent touch scrolling while dragging\n useEvent(\n ref,\n 'touchmove',\n e => {\n if (state.isDragging) {\n e.preventDefault();\n }\n },\n {passive: false, capture: true}\n );\n\n return res;\n}\n"],"names":[],"version":3,"file":"useRangeCalendar.cjs.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AA6BM,SAAS,0CACd,KAAgC,EAChC,KAAyB,EACzB,GAAuC;IAEvC,IAAI,kBAAC,iBAAiB,UAAU,GAAG,YAAW,GAAG;IACjD,IAAI,MAAM,CAAA,GAAA,yCAAc,EAAE,YAAY;IAEtC,6EAA6E;IAC7E,iDAAiD;IACjD,iDAAiD;IACjD,iFAAiF;IACjF,gFAAgF;IAChF,iEAAiE;IACjE,IAAI,iBAAiB,CAAA,GAAA,mBAAK,EAAE;IAC5B,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE,OAAO,WAAW,cAAc,SAAS;IAChE,CAAA,GAAA,kCAAO,EAAE,WAAW,eAAe,CAAA;QACjC,eAAe,OAAO,GAAG,EAAE,KAAK,KAAK,KAAK,EAAE,MAAM,KAAK;IACzD;IAEA,MAAM,wBAAwB;QAC5B,OAAO,IAAM,MAAM,cAAc;QACjC,OAAO,IAAM,MAAM,aAAa,CAAC;QACjC,QAAQ,IAAM,MAAM,eAAe;IACrC;IAEA,mHAAmH;IACnH,sEAAsE;IACtE,IAAI,cAAc,CAAC;QACjB,IAAI,eAAe,OAAO,EAAE;YAC1B,eAAe,OAAO,GAAG;YACzB;QACF;QAEA,MAAM,WAAW,CAAC;QAClB,IAAI,CAAC,MAAM,UAAU,EACnB;QAGF,IAAI,SAAS,EAAE,MAAM;QACrB,IACE,IAAI,OAAO,IACX,CAAA,GAAA,uCAAY,EAAE,IAAI,OAAO,KACxB,CAAA,CAAC,CAAA,GAAA,sCAAW,EAAE,IAAI,OAAO,EAAE,WAAW,CAAC,OAAO,OAAO,CAAC,0BAAyB,GAEhF,qBAAqB,CAAC,eAAe;IAEzC;IAEA,CAAA,GAAA,kCAAO,EAAE,WAAW,aAAa;IAEjC,iEAAiE;IACjE,uCAAuC;IACvC,gDAAgD;IAChD,IAAI,aAAa,CAAC,MAAM,GAAG,CAAA;QACzB,IAAI,CAAC,IAAI,OAAO,EACd;QAGF,IAAI,AAAC,CAAA,CAAC,EAAE,aAAa,IAAI,CAAC,CAAA,GAAA,sCAAW,EAAE,IAAI,OAAO,EAAE,EAAE,aAAa,CAAA,KAAM,MAAM,UAAU,EACvF,qBAAqB,CAAC,eAAe;IAEzC;IAEA,yCAAyC;IACzC,CAAA,GAAA,kCAAO,EACL,KACA,aACA,CAAA;QACE,IAAI,MAAM,UAAU,EAClB,EAAE,cAAc;IAEpB,GACA;QAAC,SAAS;QAAO,SAAS;IAAI;IAGhC,OAAO;AACT","sources":["packages/react-aria/src/calendar/useRangeCalendar.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, FocusableElement, RefObject} from '@react-types/shared';\nimport {CalendarAria, useCalendarBase} from './useCalendarBase';\nimport {DateValue, RangeCalendarState} from 'react-stately/useRangeCalendarState';\nimport {isFocusWithin, nodeContains} from '../utils/shadowdom/DOMFunctions';\nimport {RangeCalendarProps} from 'react-stately/useRangeCalendarState';\nimport {useEvent} from '../utils/useEvent';\nimport {useRef} from 'react';\n\nexport interface AriaRangeCalendarProps<T extends DateValue>\n extends RangeCalendarProps<T>, DOMProps, AriaLabelingProps {\n /**\n * Controls the behavior when a pointer is released outside the calendar or a blur occurs mid\n * selection:\n *\n * - `clear`: clear the currently selected range of dates.\n * - `reset`: reset the selection to the previously selected range of dates.\n * - `select`: select the currently hovered range of dates.\n *\n * @default 'select'\n */\n commitBehavior?: 'clear' | 'reset' | 'select';\n}\n\n/**\n * Provides the behavior and accessibility implementation for a range calendar component. A range\n * calendar displays one or more date grids and allows users to select a contiguous range of dates.\n */\nexport function useRangeCalendar<T extends DateValue>(\n props: AriaRangeCalendarProps<T>,\n state: RangeCalendarState,\n ref: RefObject<FocusableElement | null>\n): CalendarAria {\n let {commitBehavior = 'select', ...otherProps} = props;\n let res = useCalendarBase(otherProps, state);\n\n // We need to ignore virtual pointer events from VoiceOver due to these bugs.\n // https://bugs.webkit.org/show_bug.cgi?id=222627\n // https://bugs.webkit.org/show_bug.cgi?id=223202\n // usePress also does this and waits for the following click event before firing.\n // We need to match that here otherwise this will fire before the press event in\n // useCalendarCell, causing range selection to not work properly.\n let isVirtualClick = useRef(false);\n let windowRef = useRef(typeof window !== 'undefined' ? window : null);\n useEvent(windowRef, 'pointerdown', e => {\n isVirtualClick.current = e.width === 0 && e.height === 0;\n });\n\n const commitBehaviorMapping = {\n clear: () => state.clearSelection(),\n reset: () => state.setAnchorDate(null),\n select: () => state.commitSelection()\n };\n\n // Execute method corresponding to `commitBehavior` when pressing or releasing a pointer outside the calendar body,\n // except when pressing the next or previous buttons to switch months.\n let endDragging = (e: PointerEvent) => {\n if (isVirtualClick.current) {\n isVirtualClick.current = false;\n return;\n }\n\n state.setDragging(false);\n if (!state.anchorDate) {\n return;\n }\n\n let target = e.target as Element;\n if (\n ref.current &&\n isFocusWithin(ref.current) &&\n (!nodeContains(ref.current, target) || !target.closest('button, [role=\"button\"]'))\n ) {\n commitBehaviorMapping[commitBehavior]();\n }\n };\n\n useEvent(windowRef, 'pointerup', endDragging);\n\n // Also execute method corresponding to `commitBehavior` on blur,\n // e.g. tabbing away from the calendar.\n // oxlint-disable-next-line react/react-compiler\n res.calendarProps.onBlur = e => {\n if (!ref.current) {\n return;\n }\n\n if ((!e.relatedTarget || !nodeContains(ref.current, e.relatedTarget)) && state.anchorDate) {\n commitBehaviorMapping[commitBehavior]();\n }\n };\n\n // Prevent touch scrolling while dragging\n useEvent(\n ref,\n 'touchmove',\n e => {\n if (state.isDragging) {\n e.preventDefault();\n }\n },\n {passive: false, capture: true}\n );\n\n return res;\n}\n"],"names":[],"version":3,"file":"useRangeCalendar.cjs.map"}
|
|
@@ -51,6 +51,7 @@ function $6be926a37aeba1bf$export$87e0539f600c24e5(props, state, ref) {
|
|
|
51
51
|
(0, $c3cab330536504ec$export$90fc3a17d93f704c)(windowRef, 'pointerup', endDragging);
|
|
52
52
|
// Also execute method corresponding to `commitBehavior` on blur,
|
|
53
53
|
// e.g. tabbing away from the calendar.
|
|
54
|
+
// oxlint-disable-next-line react/react-compiler
|
|
54
55
|
res.calendarProps.onBlur = (e)=>{
|
|
55
56
|
if (!ref.current) return;
|
|
56
57
|
if ((!e.relatedTarget || !(0, $d8ac7ed472840322$export$4282f70798064fe0)(ref.current, e.relatedTarget)) && state.anchorDate) commitBehaviorMapping[commitBehavior]();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AA6BM,SAAS,0CACd,KAAgC,EAChC,KAAyB,EACzB,GAAuC;IAEvC,IAAI,kBAAC,iBAAiB,UAAU,GAAG,YAAW,GAAG;IACjD,IAAI,MAAM,CAAA,GAAA,yCAAc,EAAE,YAAY;IAEtC,6EAA6E;IAC7E,iDAAiD;IACjD,iDAAiD;IACjD,iFAAiF;IACjF,gFAAgF;IAChF,iEAAiE;IACjE,IAAI,iBAAiB,CAAA,GAAA,aAAK,EAAE;IAC5B,IAAI,YAAY,CAAA,GAAA,aAAK,EAAE,OAAO,WAAW,cAAc,SAAS;IAChE,CAAA,GAAA,yCAAO,EAAE,WAAW,eAAe,CAAA;QACjC,eAAe,OAAO,GAAG,EAAE,KAAK,KAAK,KAAK,EAAE,MAAM,KAAK;IACzD;IAEA,MAAM,wBAAwB;QAC5B,OAAO,IAAM,MAAM,cAAc;QACjC,OAAO,IAAM,MAAM,aAAa,CAAC;QACjC,QAAQ,IAAM,MAAM,eAAe;IACrC;IAEA,mHAAmH;IACnH,sEAAsE;IACtE,IAAI,cAAc,CAAC;QACjB,IAAI,eAAe,OAAO,EAAE;YAC1B,eAAe,OAAO,GAAG;YACzB;QACF;QAEA,MAAM,WAAW,CAAC;QAClB,IAAI,CAAC,MAAM,UAAU,EACnB;QAGF,IAAI,SAAS,EAAE,MAAM;QACrB,IACE,IAAI,OAAO,IACX,CAAA,GAAA,yCAAY,EAAE,IAAI,OAAO,KACxB,CAAA,CAAC,CAAA,GAAA,yCAAW,EAAE,IAAI,OAAO,EAAE,WAAW,CAAC,OAAO,OAAO,CAAC,0BAAyB,GAEhF,qBAAqB,CAAC,eAAe;IAEzC;IAEA,CAAA,GAAA,yCAAO,EAAE,WAAW,aAAa;IAEjC,iEAAiE;IACjE,uCAAuC;IACvC,IAAI,aAAa,CAAC,MAAM,GAAG,CAAA;QACzB,IAAI,CAAC,IAAI,OAAO,EACd;QAGF,IAAI,AAAC,CAAA,CAAC,EAAE,aAAa,IAAI,CAAC,CAAA,GAAA,yCAAW,EAAE,IAAI,OAAO,EAAE,EAAE,aAAa,CAAA,KAAM,MAAM,UAAU,EACvF,qBAAqB,CAAC,eAAe;IAEzC;IAEA,yCAAyC;IACzC,CAAA,GAAA,yCAAO,EACL,KACA,aACA,CAAA;QACE,IAAI,MAAM,UAAU,EAClB,EAAE,cAAc;IAEpB,GACA;QAAC,SAAS;QAAO,SAAS;IAAI;IAGhC,OAAO;AACT","sources":["packages/react-aria/src/calendar/useRangeCalendar.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, FocusableElement, RefObject} from '@react-types/shared';\nimport {CalendarAria, useCalendarBase} from './useCalendarBase';\nimport {DateValue, RangeCalendarState} from 'react-stately/useRangeCalendarState';\nimport {isFocusWithin, nodeContains} from '../utils/shadowdom/DOMFunctions';\nimport {RangeCalendarProps} from 'react-stately/useRangeCalendarState';\nimport {useEvent} from '../utils/useEvent';\nimport {useRef} from 'react';\n\nexport interface AriaRangeCalendarProps<T extends DateValue>\n extends RangeCalendarProps<T>, DOMProps, AriaLabelingProps {\n /**\n * Controls the behavior when a pointer is released outside the calendar or a blur occurs mid\n * selection:\n *\n * - `clear`: clear the currently selected range of dates.\n * - `reset`: reset the selection to the previously selected range of dates.\n * - `select`: select the currently hovered range of dates.\n *\n * @default 'select'\n */\n commitBehavior?: 'clear' | 'reset' | 'select';\n}\n\n/**\n * Provides the behavior and accessibility implementation for a range calendar component. A range\n * calendar displays one or more date grids and allows users to select a contiguous range of dates.\n */\nexport function useRangeCalendar<T extends DateValue>(\n props: AriaRangeCalendarProps<T>,\n state: RangeCalendarState,\n ref: RefObject<FocusableElement | null>\n): CalendarAria {\n let {commitBehavior = 'select', ...otherProps} = props;\n let res = useCalendarBase(otherProps, state);\n\n // We need to ignore virtual pointer events from VoiceOver due to these bugs.\n // https://bugs.webkit.org/show_bug.cgi?id=222627\n // https://bugs.webkit.org/show_bug.cgi?id=223202\n // usePress also does this and waits for the following click event before firing.\n // We need to match that here otherwise this will fire before the press event in\n // useCalendarCell, causing range selection to not work properly.\n let isVirtualClick = useRef(false);\n let windowRef = useRef(typeof window !== 'undefined' ? window : null);\n useEvent(windowRef, 'pointerdown', e => {\n isVirtualClick.current = e.width === 0 && e.height === 0;\n });\n\n const commitBehaviorMapping = {\n clear: () => state.clearSelection(),\n reset: () => state.setAnchorDate(null),\n select: () => state.commitSelection()\n };\n\n // Execute method corresponding to `commitBehavior` when pressing or releasing a pointer outside the calendar body,\n // except when pressing the next or previous buttons to switch months.\n let endDragging = (e: PointerEvent) => {\n if (isVirtualClick.current) {\n isVirtualClick.current = false;\n return;\n }\n\n state.setDragging(false);\n if (!state.anchorDate) {\n return;\n }\n\n let target = e.target as Element;\n if (\n ref.current &&\n isFocusWithin(ref.current) &&\n (!nodeContains(ref.current, target) || !target.closest('button, [role=\"button\"]'))\n ) {\n commitBehaviorMapping[commitBehavior]();\n }\n };\n\n useEvent(windowRef, 'pointerup', endDragging);\n\n // Also execute method corresponding to `commitBehavior` on blur,\n // e.g. tabbing away from the calendar.\n res.calendarProps.onBlur = e => {\n if (!ref.current) {\n return;\n }\n\n if ((!e.relatedTarget || !nodeContains(ref.current, e.relatedTarget)) && state.anchorDate) {\n commitBehaviorMapping[commitBehavior]();\n }\n };\n\n // Prevent touch scrolling while dragging\n useEvent(\n ref,\n 'touchmove',\n e => {\n if (state.isDragging) {\n e.preventDefault();\n }\n },\n {passive: false, capture: true}\n );\n\n return res;\n}\n"],"names":[],"version":3,"file":"useRangeCalendar.js.map"}
|
|
1
|
+
{"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AA6BM,SAAS,0CACd,KAAgC,EAChC,KAAyB,EACzB,GAAuC;IAEvC,IAAI,kBAAC,iBAAiB,UAAU,GAAG,YAAW,GAAG;IACjD,IAAI,MAAM,CAAA,GAAA,yCAAc,EAAE,YAAY;IAEtC,6EAA6E;IAC7E,iDAAiD;IACjD,iDAAiD;IACjD,iFAAiF;IACjF,gFAAgF;IAChF,iEAAiE;IACjE,IAAI,iBAAiB,CAAA,GAAA,aAAK,EAAE;IAC5B,IAAI,YAAY,CAAA,GAAA,aAAK,EAAE,OAAO,WAAW,cAAc,SAAS;IAChE,CAAA,GAAA,yCAAO,EAAE,WAAW,eAAe,CAAA;QACjC,eAAe,OAAO,GAAG,EAAE,KAAK,KAAK,KAAK,EAAE,MAAM,KAAK;IACzD;IAEA,MAAM,wBAAwB;QAC5B,OAAO,IAAM,MAAM,cAAc;QACjC,OAAO,IAAM,MAAM,aAAa,CAAC;QACjC,QAAQ,IAAM,MAAM,eAAe;IACrC;IAEA,mHAAmH;IACnH,sEAAsE;IACtE,IAAI,cAAc,CAAC;QACjB,IAAI,eAAe,OAAO,EAAE;YAC1B,eAAe,OAAO,GAAG;YACzB;QACF;QAEA,MAAM,WAAW,CAAC;QAClB,IAAI,CAAC,MAAM,UAAU,EACnB;QAGF,IAAI,SAAS,EAAE,MAAM;QACrB,IACE,IAAI,OAAO,IACX,CAAA,GAAA,yCAAY,EAAE,IAAI,OAAO,KACxB,CAAA,CAAC,CAAA,GAAA,yCAAW,EAAE,IAAI,OAAO,EAAE,WAAW,CAAC,OAAO,OAAO,CAAC,0BAAyB,GAEhF,qBAAqB,CAAC,eAAe;IAEzC;IAEA,CAAA,GAAA,yCAAO,EAAE,WAAW,aAAa;IAEjC,iEAAiE;IACjE,uCAAuC;IACvC,gDAAgD;IAChD,IAAI,aAAa,CAAC,MAAM,GAAG,CAAA;QACzB,IAAI,CAAC,IAAI,OAAO,EACd;QAGF,IAAI,AAAC,CAAA,CAAC,EAAE,aAAa,IAAI,CAAC,CAAA,GAAA,yCAAW,EAAE,IAAI,OAAO,EAAE,EAAE,aAAa,CAAA,KAAM,MAAM,UAAU,EACvF,qBAAqB,CAAC,eAAe;IAEzC;IAEA,yCAAyC;IACzC,CAAA,GAAA,yCAAO,EACL,KACA,aACA,CAAA;QACE,IAAI,MAAM,UAAU,EAClB,EAAE,cAAc;IAEpB,GACA;QAAC,SAAS;QAAO,SAAS;IAAI;IAGhC,OAAO;AACT","sources":["packages/react-aria/src/calendar/useRangeCalendar.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, FocusableElement, RefObject} from '@react-types/shared';\nimport {CalendarAria, useCalendarBase} from './useCalendarBase';\nimport {DateValue, RangeCalendarState} from 'react-stately/useRangeCalendarState';\nimport {isFocusWithin, nodeContains} from '../utils/shadowdom/DOMFunctions';\nimport {RangeCalendarProps} from 'react-stately/useRangeCalendarState';\nimport {useEvent} from '../utils/useEvent';\nimport {useRef} from 'react';\n\nexport interface AriaRangeCalendarProps<T extends DateValue>\n extends RangeCalendarProps<T>, DOMProps, AriaLabelingProps {\n /**\n * Controls the behavior when a pointer is released outside the calendar or a blur occurs mid\n * selection:\n *\n * - `clear`: clear the currently selected range of dates.\n * - `reset`: reset the selection to the previously selected range of dates.\n * - `select`: select the currently hovered range of dates.\n *\n * @default 'select'\n */\n commitBehavior?: 'clear' | 'reset' | 'select';\n}\n\n/**\n * Provides the behavior and accessibility implementation for a range calendar component. A range\n * calendar displays one or more date grids and allows users to select a contiguous range of dates.\n */\nexport function useRangeCalendar<T extends DateValue>(\n props: AriaRangeCalendarProps<T>,\n state: RangeCalendarState,\n ref: RefObject<FocusableElement | null>\n): CalendarAria {\n let {commitBehavior = 'select', ...otherProps} = props;\n let res = useCalendarBase(otherProps, state);\n\n // We need to ignore virtual pointer events from VoiceOver due to these bugs.\n // https://bugs.webkit.org/show_bug.cgi?id=222627\n // https://bugs.webkit.org/show_bug.cgi?id=223202\n // usePress also does this and waits for the following click event before firing.\n // We need to match that here otherwise this will fire before the press event in\n // useCalendarCell, causing range selection to not work properly.\n let isVirtualClick = useRef(false);\n let windowRef = useRef(typeof window !== 'undefined' ? window : null);\n useEvent(windowRef, 'pointerdown', e => {\n isVirtualClick.current = e.width === 0 && e.height === 0;\n });\n\n const commitBehaviorMapping = {\n clear: () => state.clearSelection(),\n reset: () => state.setAnchorDate(null),\n select: () => state.commitSelection()\n };\n\n // Execute method corresponding to `commitBehavior` when pressing or releasing a pointer outside the calendar body,\n // except when pressing the next or previous buttons to switch months.\n let endDragging = (e: PointerEvent) => {\n if (isVirtualClick.current) {\n isVirtualClick.current = false;\n return;\n }\n\n state.setDragging(false);\n if (!state.anchorDate) {\n return;\n }\n\n let target = e.target as Element;\n if (\n ref.current &&\n isFocusWithin(ref.current) &&\n (!nodeContains(ref.current, target) || !target.closest('button, [role=\"button\"]'))\n ) {\n commitBehaviorMapping[commitBehavior]();\n }\n };\n\n useEvent(windowRef, 'pointerup', endDragging);\n\n // Also execute method corresponding to `commitBehavior` on blur,\n // e.g. tabbing away from the calendar.\n // oxlint-disable-next-line react/react-compiler\n res.calendarProps.onBlur = e => {\n if (!ref.current) {\n return;\n }\n\n if ((!e.relatedTarget || !nodeContains(ref.current, e.relatedTarget)) && state.anchorDate) {\n commitBehaviorMapping[commitBehavior]();\n }\n };\n\n // Prevent touch scrolling while dragging\n useEvent(\n ref,\n 'touchmove',\n e => {\n if (state.isDragging) {\n e.preventDefault();\n }\n },\n {passive: false, capture: true}\n );\n\n return res;\n}\n"],"names":[],"version":3,"file":"useRangeCalendar.js.map"}
|
|
@@ -51,6 +51,7 @@ function $be0fc2ab732b9d1a$export$87e0539f600c24e5(props, state, ref) {
|
|
|
51
51
|
(0, $600b3cf69ae46262$export$90fc3a17d93f704c)(windowRef, 'pointerup', endDragging);
|
|
52
52
|
// Also execute method corresponding to `commitBehavior` on blur,
|
|
53
53
|
// e.g. tabbing away from the calendar.
|
|
54
|
+
// oxlint-disable-next-line react/react-compiler
|
|
54
55
|
res.calendarProps.onBlur = (e)=>{
|
|
55
56
|
if (!ref.current) return;
|
|
56
57
|
if ((!e.relatedTarget || !(0, $23f2114a1b82827e$export$4282f70798064fe0)(ref.current, e.relatedTarget)) && state.anchorDate) commitBehaviorMapping[commitBehavior]();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AA6BM,SAAS,0CACd,KA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EAAE,EAAE,aAAa,CAAA,KAAM,MAAM,UAAU,EACvF,qBAAqB,CAAC,eAAe;IAEzC;IAEA,yCAAyC;IACzC,CAAA,GAAA,yCAAO,EACL,KACA,aACA,CAAA;QACE,IAAI,MAAM,UAAU,EAClB,EAAE,cAAc;IAEpB,GACA;QAAC,SAAS;QAAO,SAAS;IAAI;IAGhC,OAAO;AACT","sources":["packages/react-aria/src/calendar/useRangeCalendar.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, FocusableElement, RefObject} from '@react-types/shared';\nimport {CalendarAria, useCalendarBase} from './useCalendarBase';\nimport {DateValue, RangeCalendarState} from 'react-stately/useRangeCalendarState';\nimport {isFocusWithin, nodeContains} from '../utils/shadowdom/DOMFunctions';\nimport {RangeCalendarProps} from 'react-stately/useRangeCalendarState';\nimport {useEvent} from '../utils/useEvent';\nimport {useRef} from 'react';\n\nexport interface AriaRangeCalendarProps<T extends DateValue>\n extends RangeCalendarProps<T>, DOMProps, AriaLabelingProps {\n /**\n * Controls the behavior when a pointer is released outside the calendar or a blur occurs mid\n * selection:\n *\n * - `clear`: clear the currently selected range of dates.\n * - `reset`: reset the selection to the previously selected range of dates.\n * - `select`: select the currently hovered range of dates.\n *\n * @default 'select'\n */\n commitBehavior?: 'clear' | 'reset' | 'select';\n}\n\n/**\n * Provides the behavior and accessibility implementation for a range calendar component. A range\n * calendar displays one or more date grids and allows users to select a contiguous range of dates.\n */\nexport function useRangeCalendar<T extends DateValue>(\n props: AriaRangeCalendarProps<T>,\n state: RangeCalendarState,\n ref: RefObject<FocusableElement | null>\n): CalendarAria {\n let {commitBehavior = 'select', ...otherProps} = props;\n let res = useCalendarBase(otherProps, state);\n\n // We need to ignore virtual pointer events from VoiceOver due to these bugs.\n // https://bugs.webkit.org/show_bug.cgi?id=222627\n // https://bugs.webkit.org/show_bug.cgi?id=223202\n // usePress also does this and waits for the following click event before firing.\n // We need to match that here otherwise this will fire before the press event in\n // useCalendarCell, causing range selection to not work properly.\n let isVirtualClick = useRef(false);\n let windowRef = useRef(typeof window !== 'undefined' ? window : null);\n useEvent(windowRef, 'pointerdown', e => {\n isVirtualClick.current = e.width === 0 && e.height === 0;\n });\n\n const commitBehaviorMapping = {\n clear: () => state.clearSelection(),\n reset: () => state.setAnchorDate(null),\n select: () => state.commitSelection()\n };\n\n // Execute method corresponding to `commitBehavior` when pressing or releasing a pointer outside the calendar body,\n // except when pressing the next or previous buttons to switch months.\n let endDragging = (e: PointerEvent) => {\n if (isVirtualClick.current) {\n isVirtualClick.current = false;\n return;\n }\n\n state.setDragging(false);\n if (!state.anchorDate) {\n return;\n }\n\n let target = e.target as Element;\n if (\n ref.current &&\n isFocusWithin(ref.current) &&\n (!nodeContains(ref.current, target) || !target.closest('button, [role=\"button\"]'))\n ) {\n commitBehaviorMapping[commitBehavior]();\n }\n };\n\n useEvent(windowRef, 'pointerup', endDragging);\n\n // Also execute method corresponding to `commitBehavior` on blur,\n // e.g. tabbing away from the calendar.\n res.calendarProps.onBlur = e => {\n if (!ref.current) {\n return;\n }\n\n if ((!e.relatedTarget || !nodeContains(ref.current, e.relatedTarget)) && state.anchorDate) {\n commitBehaviorMapping[commitBehavior]();\n }\n };\n\n // Prevent touch scrolling while dragging\n useEvent(\n ref,\n 'touchmove',\n e => {\n if (state.isDragging) {\n e.preventDefault();\n }\n },\n {passive: false, capture: true}\n );\n\n return res;\n}\n"],"names":[],"version":3,"file":"useRangeCalendar.mjs.map"}
|
|
1
|
+
{"mappings":";;;;;AAAA;;;;;;;;;;CAUC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AC,CAAA,GAAA,yCAAW,EAAE,IAAI,OAAO,EAAE,EAAE,aAAa,CAAA,KAAM,MAAM,UAAU,EACvF,qBAAqB,CAAC,eAAe;IAEzC;IAEA,yCAAyC;IACzC,CAAA,GAAA,yCAAO,EACL,KACA,aACA,CAAA;QACE,IAAI,MAAM,UAAU,EAClB,EAAE,cAAc;IAEpB,GACA;QAAC,SAAS;QAAO,SAAS;IAAI;IAGhC,OAAO;AACT","sources":["packages/react-aria/src/calendar/useRangeCalendar.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, FocusableElement, RefObject} from '@react-types/shared';\nimport {CalendarAria, useCalendarBase} from './useCalendarBase';\nimport {DateValue, RangeCalendarState} from 'react-stately/useRangeCalendarState';\nimport {isFocusWithin, nodeContains} from '../utils/shadowdom/DOMFunctions';\nimport {RangeCalendarProps} from 'react-stately/useRangeCalendarState';\nimport {useEvent} from '../utils/useEvent';\nimport {useRef} from 'react';\n\nexport interface AriaRangeCalendarProps<T extends DateValue>\n extends RangeCalendarProps<T>, DOMProps, AriaLabelingProps {\n /**\n * Controls the behavior when a pointer is released outside the calendar or a blur occurs mid\n * selection:\n *\n * - `clear`: clear the currently selected range of dates.\n * - `reset`: reset the selection to the previously selected range of dates.\n * - `select`: select the currently hovered range of dates.\n *\n * @default 'select'\n */\n commitBehavior?: 'clear' | 'reset' | 'select';\n}\n\n/**\n * Provides the behavior and accessibility implementation for a range calendar component. A range\n * calendar displays one or more date grids and allows users to select a contiguous range of dates.\n */\nexport function useRangeCalendar<T extends DateValue>(\n props: AriaRangeCalendarProps<T>,\n state: RangeCalendarState,\n ref: RefObject<FocusableElement | null>\n): CalendarAria {\n let {commitBehavior = 'select', ...otherProps} = props;\n let res = useCalendarBase(otherProps, state);\n\n // We need to ignore virtual pointer events from VoiceOver due to these bugs.\n // https://bugs.webkit.org/show_bug.cgi?id=222627\n // https://bugs.webkit.org/show_bug.cgi?id=223202\n // usePress also does this and waits for the following click event before firing.\n // We need to match that here otherwise this will fire before the press event in\n // useCalendarCell, causing range selection to not work properly.\n let isVirtualClick = useRef(false);\n let windowRef = useRef(typeof window !== 'undefined' ? window : null);\n useEvent(windowRef, 'pointerdown', e => {\n isVirtualClick.current = e.width === 0 && e.height === 0;\n });\n\n const commitBehaviorMapping = {\n clear: () => state.clearSelection(),\n reset: () => state.setAnchorDate(null),\n select: () => state.commitSelection()\n };\n\n // Execute method corresponding to `commitBehavior` when pressing or releasing a pointer outside the calendar body,\n // except when pressing the next or previous buttons to switch months.\n let endDragging = (e: PointerEvent) => {\n if (isVirtualClick.current) {\n isVirtualClick.current = false;\n return;\n }\n\n state.setDragging(false);\n if (!state.anchorDate) {\n return;\n }\n\n let target = e.target as Element;\n if (\n ref.current &&\n isFocusWithin(ref.current) &&\n (!nodeContains(ref.current, target) || !target.closest('button, [role=\"button\"]'))\n ) {\n commitBehaviorMapping[commitBehavior]();\n }\n };\n\n useEvent(windowRef, 'pointerup', endDragging);\n\n // Also execute method corresponding to `commitBehavior` on blur,\n // e.g. tabbing away from the calendar.\n // oxlint-disable-next-line react/react-compiler\n res.calendarProps.onBlur = e => {\n if (!ref.current) {\n return;\n }\n\n if ((!e.relatedTarget || !nodeContains(ref.current, e.relatedTarget)) && state.anchorDate) {\n commitBehaviorMapping[commitBehavior]();\n }\n };\n\n // Prevent touch scrolling while dragging\n useEvent(\n ref,\n 'touchmove',\n e => {\n if (state.isDragging) {\n e.preventDefault();\n }\n },\n {passive: false, capture: true}\n );\n\n return res;\n}\n"],"names":[],"version":3,"file":"useRangeCalendar.mjs.map"}
|
|
@@ -54,7 +54,7 @@ function $e44165de1d1c1606$export$bf788dd355e3a401(props) {
|
|
|
54
54
|
// Otherwise, render a hidden copy of the children so that we can build the collection before constructing the state.
|
|
55
55
|
// This should always come before the real DOM content so we have built the collection by the time it renders during SSR.
|
|
56
56
|
// This is fine. CollectionDocumentContext never changes after mounting.
|
|
57
|
-
//
|
|
57
|
+
// oxlint-disable-next-line react/react-compiler, react-hooks/rules-of-hooks
|
|
58
58
|
let { collection: collection, document: document } = $e44165de1d1c1606$var$useCollectionDocument(props.createCollection);
|
|
59
59
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($i5fXx$react))).createElement((0, ($parcel$interopDefault($i5fXx$react))).Fragment, null, /*#__PURE__*/ (0, ($parcel$interopDefault($i5fXx$react))).createElement((0, $680d2e5e7cbb12b5$exports.Hidden), null, /*#__PURE__*/ (0, ($parcel$interopDefault($i5fXx$react))).createElement($e44165de1d1c1606$var$CollectionDocumentContext.Provider, {
|
|
60
60
|
value: document
|
|
@@ -75,6 +75,7 @@ function $e44165de1d1c1606$var$useSyncExternalStoreFallback(subscribe, getSnapsh
|
|
|
75
75
|
// We just need a ref to avoid invalidating the callback itself, which
|
|
76
76
|
// would cause React to re-run the callback more than necessary.
|
|
77
77
|
// eslint-disable-next-line rsp-rules/pure-render
|
|
78
|
+
// oxlint-disable-next-line react/react-compiler, rsp-rules/pure-render
|
|
78
79
|
isSSRRef.current = isSSR;
|
|
79
80
|
let getSnapshotWrapper = (0, $i5fXx$react.useCallback)(()=>{
|
|
80
81
|
return isSSRRef.current ? getServerSnapshot() : getSnapshot();
|
|
@@ -103,6 +104,7 @@ function $e44165de1d1c1606$var$useCollectionDocument(createCollection) {
|
|
|
103
104
|
document
|
|
104
105
|
]);
|
|
105
106
|
let getServerSnapshot = (0, $i5fXx$react.useCallback)(()=>{
|
|
107
|
+
// oxlint-disable-next-line react/react-compiler
|
|
106
108
|
document.isSSR = true;
|
|
107
109
|
return document.getCollection();
|
|
108
110
|
}, [
|
|
@@ -125,7 +127,8 @@ function $e44165de1d1c1606$var$createCollectionNodeClass(type) {
|
|
|
125
127
|
}
|
|
126
128
|
function $e44165de1d1c1606$var$useSSRCollectionNode(CollectionNodeClass, props, ref, rendered, children, render) {
|
|
127
129
|
// To prevent breaking change, if CollectionNodeClass is a string, create a CollectionNodeClass using the string as the type
|
|
128
|
-
if (typeof CollectionNodeClass === 'string')
|
|
130
|
+
if (typeof CollectionNodeClass === 'string') // oxlint-disable-next-line react/react-compiler
|
|
131
|
+
CollectionNodeClass = $e44165de1d1c1606$var$createCollectionNodeClass(CollectionNodeClass);
|
|
129
132
|
// During SSR, portals are not supported, so the collection children will be wrapped in an SSRContext.
|
|
130
133
|
// Since SSR occurs only once, we assume that the elements are rendered in order and never re-render.
|
|
131
134
|
// Therefore we can create elements in our collection document during render so that they are in the
|
|
@@ -212,9 +215,11 @@ function $e44165de1d1c1606$export$fb8073518f34e6ec(props) {
|
|
|
212
215
|
if (doc) children = /*#__PURE__*/ (0, ($parcel$interopDefault($i5fXx$react))).createElement($e44165de1d1c1606$var$CollectionRoot, null, children);
|
|
213
216
|
// Propagate dependencies and idScope to child collections.
|
|
214
217
|
ctx = (0, $i5fXx$react.useMemo)(()=>({
|
|
215
|
-
dependencies:
|
|
218
|
+
dependencies: // oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
219
|
+
dependencies,
|
|
216
220
|
idScope: idScope
|
|
217
221
|
}), // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
222
|
+
// oxlint-disable-next-line react/react-compiler, react-hooks/exhaustive-deps
|
|
218
223
|
[
|
|
219
224
|
idScope,
|
|
220
225
|
...dependencies
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAyBD,MAAM,2DAAuB,CAAA,GAAA,0BAAY,EAAE;AAC3C,MAAM,gEAA4B,CAAA,GAAA,0BAAY,E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O,CAAA,GAAA,kCAAO,oBACZ,0DAAC,iCAAW,QAAQ;QAAC,OAAO;OAAM,iCAElC,CAAA,GAAA,4BAAW,EAAE,iBAAiB;AAElC","sources":["packages/react-aria/src/collections/CollectionBuilder.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {BaseCollection, CollectionNode} from './BaseCollection';\nimport {BaseNode, Document, ElementNode} from './Document';\nimport {CachedChildrenOptions, useCachedChildren} from './useCachedChildren';\nimport {createPortal} from 'react-dom';\nimport {FocusableContext} from '../interactions/useFocusable';\nimport {forwardRefType, Key, Node} from '@react-types/shared';\nimport {Hidden} from './Hidden';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n JSX,\n ReactElement,\n ReactNode,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState\n} from 'react';\nimport {useIsSSR} from '../ssr/SSRProvider';\nimport {useSyncExternalStore as useSyncExternalStoreShim} from 'use-sync-external-store/shim/index.js';\n\nconst ShallowRenderContext = createContext(false);\nconst CollectionDocumentContext = createContext<Document<any, BaseCollection<any>> | null>(null);\n\nexport interface CollectionBuilderProps<C extends BaseCollection<any>> {\n content: ReactNode;\n children: (collection: C) => ReactNode;\n createCollection?: () => C;\n}\n\n/**\n * Builds a `Collection` from the children provided to the `content` prop, and passes it to the\n * child render prop function.\n */\nexport function CollectionBuilder<C extends BaseCollection<any>>(\n props: CollectionBuilderProps<C>\n): ReactElement {\n // If a document was provided above us, we're already in a hidden tree. Just render the content.\n let doc = useContext(CollectionDocumentContext);\n if (doc) {\n // The React types prior to 18 did not allow returning ReactNode from components\n // even though the actual implementation since React 16 did.\n // We must return ReactElement so that TS does not complain that <CollectionBuilder>\n // is not a valid JSX element with React 16 and 17 types.\n // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/20544\n return props.content as ReactElement;\n }\n\n // Otherwise, render a hidden copy of the children so that we can build the collection before constructing the state.\n // This should always come before the real DOM content so we have built the collection by the time it renders during SSR.\n\n // This is fine. CollectionDocumentContext never changes after mounting.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n let {collection, document} = useCollectionDocument(props.createCollection);\n return (\n <>\n <Hidden>\n <CollectionDocumentContext.Provider value={document}>\n {props.content}\n </CollectionDocumentContext.Provider>\n </Hidden>\n <CollectionInner render={props.children} collection={collection} />\n </>\n );\n}\n\nfunction CollectionInner({collection, render}) {\n return render(collection);\n}\n\ninterface CollectionDocumentResult<T, C extends BaseCollection<T>> {\n collection: C;\n document: Document<T, C>;\n}\n\n// React 16 and 17 don't support useSyncExternalStore natively, and the shim provided by React does not support getServerSnapshot.\n// This wrapper uses the shim, but additionally calls getServerSnapshot during SSR (according to SSRProvider).\nfunction useSyncExternalStoreFallback<C>(\n subscribe: (onStoreChange: () => void) => () => void,\n getSnapshot: () => C,\n getServerSnapshot: () => C\n): C {\n let isSSR = useIsSSR();\n let isSSRRef = useRef(isSSR);\n // This is read immediately inside the wrapper, which also runs during render.\n // We just need a ref to avoid invalidating the callback itself, which\n // would cause React to re-run the callback more than necessary.\n // eslint-disable-next-line rsp-rules/pure-render\n isSSRRef.current = isSSR;\n\n let getSnapshotWrapper = useCallback(() => {\n return isSSRRef.current ? getServerSnapshot() : getSnapshot();\n }, [getSnapshot, getServerSnapshot]);\n return useSyncExternalStoreShim(subscribe, getSnapshotWrapper);\n}\n\nconst useSyncExternalStore =\n typeof React['useSyncExternalStore'] === 'function'\n ? React['useSyncExternalStore']\n : useSyncExternalStoreFallback;\n\nfunction useCollectionDocument<T extends object, C extends BaseCollection<T>>(\n createCollection?: () => C\n): CollectionDocumentResult<T, C> {\n // The document instance is mutable, and should never change between renders.\n // useSyncExternalStore is used to subscribe to updates, which vends immutable Collection objects.\n let [document] = useState(\n () => new Document<T, C>(createCollection?.() || (new BaseCollection() as C))\n );\n let subscribe = useCallback((fn: () => void) => document.subscribe(fn), [document]);\n let getSnapshot = useCallback(() => {\n let collection = document.getCollection();\n if (document.isSSR) {\n // After SSR is complete, reset the document to empty so it is ready for React to render the portal into.\n // We do this _after_ getting the collection above so that the collection still has content in it from SSR\n // during the current render, before React has finished the client render.\n document.resetAfterSSR();\n }\n return collection;\n }, [document]);\n let getServerSnapshot = useCallback(() => {\n document.isSSR = true;\n return document.getCollection();\n }, [document]);\n let collection = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n return {collection, document};\n}\n\nconst SSRContext = createContext<BaseNode<any> | null>(null);\n\nexport type CollectionNodeClass<T> = {\n new (key: Key): CollectionNode<T>;\n readonly type: string;\n};\n\nfunction createCollectionNodeClass(type: string): CollectionNodeClass<any> {\n let NodeClass = class extends CollectionNode<any> {\n static readonly type = type;\n };\n return NodeClass;\n}\n\nfunction useSSRCollectionNode<T extends Element>(\n CollectionNodeClass: CollectionNodeClass<T> | string,\n props: object,\n ref: ForwardedRef<T>,\n rendered?: any,\n children?: ReactNode,\n render?: (node: Node<any>) => ReactElement\n) {\n // To prevent breaking change, if CollectionNodeClass is a string, create a CollectionNodeClass using the string as the type\n if (typeof CollectionNodeClass === 'string') {\n CollectionNodeClass = createCollectionNodeClass(CollectionNodeClass);\n }\n\n // During SSR, portals are not supported, so the collection children will be wrapped in an SSRContext.\n // Since SSR occurs only once, we assume that the elements are rendered in order and never re-render.\n // Therefore we can create elements in our collection document during render so that they are in the\n // collection by the time we need to use the collection to render to the real DOM.\n // After hydration, we switch to client rendering using the portal.\n let itemRef = useCallback(\n (element: ElementNode<any> | null) => {\n element?.setProps(props, ref, CollectionNodeClass, rendered, render);\n },\n [props, ref, rendered, render, CollectionNodeClass]\n );\n let parentNode = useContext(SSRContext);\n if (parentNode) {\n // Guard against double rendering in strict mode.\n let element = parentNode.ownerDocument.nodesByProps.get(props);\n if (!element) {\n element = parentNode.ownerDocument.createElement(CollectionNodeClass.type);\n element.setProps(props, ref, CollectionNodeClass, rendered, render);\n parentNode.appendChild(element);\n parentNode.ownerDocument.updateCollection();\n parentNode.ownerDocument.nodesByProps.set(props, element);\n }\n\n return children ? <SSRContext.Provider value={element}>{children}</SSRContext.Provider> : null;\n }\n\n // @ts-ignore\n return <CollectionNodeClass.type ref={itemRef}>{children}</CollectionNodeClass.type>;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function createLeafComponent<T, P extends object, E extends Element>(\n CollectionNodeClass: CollectionNodeClass<any> | string,\n render: (props: P, ref: ForwardedRef<E>) => ReactElement | null\n): (props: P & React.RefAttributes<E>) => ReactElement | null;\nexport function createLeafComponent<T, P extends object, E extends Element>(\n CollectionNodeClass: CollectionNodeClass<any> | string,\n render: (props: P, ref: ForwardedRef<E>, node: Node<T>) => ReactElement | null\n): (props: P & React.RefAttributes<E>) => ReactElement | null;\nexport function createLeafComponent<P extends object, E extends Element>(\n CollectionNodeClass: CollectionNodeClass<any> | string,\n render: (props: P, ref: ForwardedRef<E>, node?: any) => ReactElement | null\n): (props: P & React.RefAttributes<any>) => ReactElement | null {\n let Component = ({node}) => render(node.props, node.props.ref, node);\n let Result = (forwardRef as forwardRefType)((props: P, ref: ForwardedRef<E>) => {\n let focusableProps = useContext(FocusableContext);\n let isShallow = useContext(ShallowRenderContext);\n if (!isShallow) {\n if (render.length >= 3) {\n throw new Error(render.name + ' cannot be rendered outside a collection.');\n }\n return render(props, ref);\n }\n\n return useSSRCollectionNode(\n CollectionNodeClass,\n props,\n ref,\n 'children' in props ? props.children : null,\n null,\n node => (\n // Forward FocusableContext to real DOM tree so tooltips work.\n <FocusableContext.Provider value={focusableProps}>\n <Component node={node} />\n </FocusableContext.Provider>\n )\n );\n });\n // @ts-ignore\n Result.displayName = render.name;\n return Result;\n}\n\nexport function createBranchComponent<T, P extends {children?: any}, E extends Element>(\n CollectionNodeClass: CollectionNodeClass<any> | string,\n render: (props: P, ref: ForwardedRef<E>, node: Node<T>) => ReactElement | null,\n useChildren: (props: P) => ReactNode = useCollectionChildren\n): (props: P & React.RefAttributes<E>) => ReactElement | null {\n let Component = ({node}) => render(node.props, node.props.ref, node);\n let Result = (forwardRef as forwardRefType)((props: P, ref: ForwardedRef<E>) => {\n let children = useChildren(props);\n return (\n useSSRCollectionNode(CollectionNodeClass, props, ref, null, children, node => (\n <Component node={node} />\n )) ?? <></>\n );\n });\n // @ts-ignore\n Result.displayName = render.name;\n return Result;\n}\n\nfunction useCollectionChildren<T>(options: CachedChildrenOptions<T>) {\n return useCachedChildren({...options, addIdAndValue: true});\n}\n\nexport interface CollectionProps<T> extends CachedChildrenOptions<T> {}\n\nconst CollectionContext = createContext<CachedChildrenOptions<unknown> | null>(null);\n\n/** A Collection renders a list of items, automatically managing caching and keys. */\nexport function Collection<T>(props: CollectionProps<T>): JSX.Element {\n let ctx = useContext(CollectionContext)!;\n let dependencies = (ctx?.dependencies || []).concat(props.dependencies);\n let idScope = props.idScope ?? ctx?.idScope;\n let children = useCollectionChildren({\n ...props,\n idScope,\n dependencies\n });\n\n let doc = useContext(CollectionDocumentContext);\n if (doc) {\n children = <CollectionRoot>{children}</CollectionRoot>;\n }\n\n // Propagate dependencies and idScope to child collections.\n ctx = useMemo(\n () => ({\n dependencies,\n idScope\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [idScope, ...dependencies]\n );\n\n return <CollectionContext.Provider value={ctx}>{children}</CollectionContext.Provider>;\n}\n\nfunction CollectionRoot({children}) {\n let doc = useContext(CollectionDocumentContext);\n let wrappedChildren = useMemo(\n () => (\n <CollectionDocumentContext.Provider value={null}>\n <ShallowRenderContext.Provider value>{children}</ShallowRenderContext.Provider>\n </CollectionDocumentContext.Provider>\n ),\n [children]\n );\n // During SSR, we render the content directly, and append nodes to the document during render.\n // The collection children return null so that nothing is actually rendered into the HTML.\n return useIsSSR() ? (\n <SSRContext.Provider value={doc}>{wrappedChildren}</SSRContext.Provider>\n ) : (\n createPortal(wrappedChildren, doc as unknown as Element)\n );\n}\n"],"names":[],"version":3,"file":"CollectionBuilder.cjs.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAyBD,MAAM,2DAAuB,CAAA,GAAA,0BAAY,EAAE;AAC3C,MAAM,gEAA4B,CAAA,GAAA,0BAAY,EAA6C;AAYpF,SAAS,0CACd,KAAgC;IAEhC,gGAAgG;IAChG,IAAI,MAAM,CAAA,GAAA,uBAAS,EAAE;IACrB,IAAI,KACF,gFAAgF;IAChF,4DAA4D;IAC5D,oFAAoF;IACpF,yDAAyD;IACzD,kEAAkE;IAClE,OAAO,MAAM,OAAO;IAGtB,qHAAqH;IACrH,yHAAyH;IAEzH,wEAAwE;IACxE,4EAA4E;IAC5E,IAAI,cAAC,UAAU,YAAE,QAAQ,EAAC,GAAG,4CAAsB,MAAM,gBAAgB;IACzE,qBACE,oIACE,0DAAC,CAAA,GAAA,gCAAK,uBACJ,0DAAC,gDAA0B,QAAQ;QAAC,OAAO;OACxC,MAAM,OAAO,kBAGlB,0DAAC;QAAgB,QAAQ,MAAM,QAAQ;QAAE,YAAY;;AAG3D;AAEA,SAAS,sCAAgB,cAAC,UAAU,UAAE,MAAM,EAAC;IAC3C,OAAO,OAAO;AAChB;AAOA,kIAAkI;AAClI,8GAA8G;AAC9G,SAAS,mDACP,SAAoD,EACpD,WAAoB,EACpB,iBAA0B;IAE1B,IAAI,QAAQ,CAAA,GAAA,kCAAO;IACnB,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAE;IACtB,8EAA8E;IAC9E,sEAAsE;IACtE,gEAAgE;IAChE,iDAAiD;IACjD,uEAAuE;IACvE,SAAS,OAAO,GAAG;IAEnB,IAAI,qBAAqB,CAAA,GAAA,wBAAU,EAAE;QACnC,OA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YACvD;qBACA;QACF,CAAA,GACA,uDAAuD;IACvD,6EAA6E;IAC7E;QAAC;WAAY;KAAa;IAG5B,qBAAO,0DAAC,wCAAkB,QAAQ;QAAC,OAAO;OAAM;AAClD;AAEA,SAAS,qCAAe,YAAC,QAAQ,EAAC;IAChC,IAAI,MAAM,CAAA,GAAA,uBAAS,EAAE;IACrB,IAAI,kBAAkB,CAAA,GAAA,oBAAM,EAC1B,kBACE,0DAAC,gDAA0B,QAAQ;YAAC,OAAO;yBACzC,0DAAC,2CAAqB,QAAQ;YAAC,OAAA;WAAO,YAG1C;QAAC;KAAS;IAEZ,8FAA8F;IAC9F,0FAA0F;IAC1F,OAAO,CAAA,GAAA,kCAAO,oBACZ,0DAAC,iCAAW,QAAQ;QAAC,OAAO;OAAM,iCAElC,CAAA,GAAA,4BAAW,EAAE,iBAAiB;AAElC","sources":["packages/react-aria/src/collections/CollectionBuilder.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {BaseCollection, CollectionNode} from './BaseCollection';\nimport {BaseNode, Document, ElementNode} from './Document';\nimport {CachedChildrenOptions, useCachedChildren} from './useCachedChildren';\nimport {createPortal} from 'react-dom';\nimport {FocusableContext} from '../interactions/useFocusable';\nimport {forwardRefType, Key, Node} from '@react-types/shared';\nimport {Hidden} from './Hidden';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n JSX,\n ReactElement,\n ReactNode,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState\n} from 'react';\nimport {useIsSSR} from '../ssr/SSRProvider';\nimport {useSyncExternalStore as useSyncExternalStoreShim} from 'use-sync-external-store/shim/index.js';\n\nconst ShallowRenderContext = createContext(false);\nconst CollectionDocumentContext = createContext<Document<any, BaseCollection<any>> | null>(null);\n\nexport interface CollectionBuilderProps<C extends BaseCollection<any>> {\n content: ReactNode;\n children: (collection: C) => ReactNode;\n createCollection?: () => C;\n}\n\n/**\n * Builds a `Collection` from the children provided to the `content` prop, and passes it to the\n * child render prop function.\n */\nexport function CollectionBuilder<C extends BaseCollection<any>>(\n props: CollectionBuilderProps<C>\n): ReactElement {\n // If a document was provided above us, we're already in a hidden tree. Just render the content.\n let doc = useContext(CollectionDocumentContext);\n if (doc) {\n // The React types prior to 18 did not allow returning ReactNode from components\n // even though the actual implementation since React 16 did.\n // We must return ReactElement so that TS does not complain that <CollectionBuilder>\n // is not a valid JSX element with React 16 and 17 types.\n // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/20544\n return props.content as ReactElement;\n }\n\n // Otherwise, render a hidden copy of the children so that we can build the collection before constructing the state.\n // This should always come before the real DOM content so we have built the collection by the time it renders during SSR.\n\n // This is fine. CollectionDocumentContext never changes after mounting.\n // oxlint-disable-next-line react/react-compiler, react-hooks/rules-of-hooks\n let {collection, document} = useCollectionDocument(props.createCollection);\n return (\n <>\n <Hidden>\n <CollectionDocumentContext.Provider value={document}>\n {props.content}\n </CollectionDocumentContext.Provider>\n </Hidden>\n <CollectionInner render={props.children} collection={collection} />\n </>\n );\n}\n\nfunction CollectionInner({collection, render}) {\n return render(collection);\n}\n\ninterface CollectionDocumentResult<T, C extends BaseCollection<T>> {\n collection: C;\n document: Document<T, C>;\n}\n\n// React 16 and 17 don't support useSyncExternalStore natively, and the shim provided by React does not support getServerSnapshot.\n// This wrapper uses the shim, but additionally calls getServerSnapshot during SSR (according to SSRProvider).\nfunction useSyncExternalStoreFallback<C>(\n subscribe: (onStoreChange: () => void) => () => void,\n getSnapshot: () => C,\n getServerSnapshot: () => C\n): C {\n let isSSR = useIsSSR();\n let isSSRRef = useRef(isSSR);\n // This is read immediately inside the wrapper, which also runs during render.\n // We just need a ref to avoid invalidating the callback itself, which\n // would cause React to re-run the callback more than necessary.\n // eslint-disable-next-line rsp-rules/pure-render\n // oxlint-disable-next-line react/react-compiler, rsp-rules/pure-render\n isSSRRef.current = isSSR;\n\n let getSnapshotWrapper = useCallback(() => {\n return isSSRRef.current ? getServerSnapshot() : getSnapshot();\n }, [getSnapshot, getServerSnapshot]);\n return useSyncExternalStoreShim(subscribe, getSnapshotWrapper);\n}\n\nconst useSyncExternalStore =\n typeof React['useSyncExternalStore'] === 'function'\n ? React['useSyncExternalStore']\n : useSyncExternalStoreFallback;\n\nfunction useCollectionDocument<T extends object, C extends BaseCollection<T>>(\n createCollection?: () => C\n): CollectionDocumentResult<T, C> {\n // The document instance is mutable, and should never change between renders.\n // useSyncExternalStore is used to subscribe to updates, which vends immutable Collection objects.\n let [document] = useState(\n () => new Document<T, C>(createCollection?.() || (new BaseCollection() as C))\n );\n let subscribe = useCallback((fn: () => void) => document.subscribe(fn), [document]);\n let getSnapshot = useCallback(() => {\n let collection = document.getCollection();\n if (document.isSSR) {\n // After SSR is complete, reset the document to empty so it is ready for React to render the portal into.\n // We do this _after_ getting the collection above so that the collection still has content in it from SSR\n // during the current render, before React has finished the client render.\n document.resetAfterSSR();\n }\n return collection;\n }, [document]);\n let getServerSnapshot = useCallback(() => {\n // oxlint-disable-next-line react/react-compiler\n document.isSSR = true;\n return document.getCollection();\n }, [document]);\n let collection = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n return {collection, document};\n}\n\nconst SSRContext = createContext<BaseNode<any> | null>(null);\n\nexport type CollectionNodeClass<T> = {\n new (key: Key): CollectionNode<T>;\n readonly type: string;\n};\n\nfunction createCollectionNodeClass(type: string): CollectionNodeClass<any> {\n let NodeClass = class extends CollectionNode<any> {\n static readonly type = type;\n };\n return NodeClass;\n}\n\nfunction useSSRCollectionNode<T extends Element>(\n CollectionNodeClass: CollectionNodeClass<T> | string,\n props: object,\n ref: ForwardedRef<T>,\n rendered?: any,\n children?: ReactNode,\n render?: (node: Node<any>) => ReactElement\n) {\n // To prevent breaking change, if CollectionNodeClass is a string, create a CollectionNodeClass using the string as the type\n if (typeof CollectionNodeClass === 'string') {\n // oxlint-disable-next-line react/react-compiler\n CollectionNodeClass = createCollectionNodeClass(CollectionNodeClass);\n }\n\n // During SSR, portals are not supported, so the collection children will be wrapped in an SSRContext.\n // Since SSR occurs only once, we assume that the elements are rendered in order and never re-render.\n // Therefore we can create elements in our collection document during render so that they are in the\n // collection by the time we need to use the collection to render to the real DOM.\n // After hydration, we switch to client rendering using the portal.\n let itemRef = useCallback(\n (element: ElementNode<any> | null) => {\n element?.setProps(props, ref, CollectionNodeClass, rendered, render);\n },\n [props, ref, rendered, render, CollectionNodeClass]\n );\n let parentNode = useContext(SSRContext);\n if (parentNode) {\n // Guard against double rendering in strict mode.\n let element = parentNode.ownerDocument.nodesByProps.get(props);\n if (!element) {\n element = parentNode.ownerDocument.createElement(CollectionNodeClass.type);\n element.setProps(props, ref, CollectionNodeClass, rendered, render);\n parentNode.appendChild(element);\n parentNode.ownerDocument.updateCollection();\n parentNode.ownerDocument.nodesByProps.set(props, element);\n }\n\n return children ? <SSRContext.Provider value={element}>{children}</SSRContext.Provider> : null;\n }\n\n // @ts-ignore\n return <CollectionNodeClass.type ref={itemRef}>{children}</CollectionNodeClass.type>;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function createLeafComponent<T, P extends object, E extends Element>(\n CollectionNodeClass: CollectionNodeClass<any> | string,\n render: (props: P, ref: ForwardedRef<E>) => ReactElement | null\n): (props: P & React.RefAttributes<E>) => ReactElement | null;\nexport function createLeafComponent<T, P extends object, E extends Element>(\n CollectionNodeClass: CollectionNodeClass<any> | string,\n render: (props: P, ref: ForwardedRef<E>, node: Node<T>) => ReactElement | null\n): (props: P & React.RefAttributes<E>) => ReactElement | null;\nexport function createLeafComponent<P extends object, E extends Element>(\n CollectionNodeClass: CollectionNodeClass<any> | string,\n render: (props: P, ref: ForwardedRef<E>, node?: any) => ReactElement | null\n): (props: P & React.RefAttributes<any>) => ReactElement | null {\n let Component = ({node}) => render(node.props, node.props.ref, node);\n let Result = (forwardRef as forwardRefType)((props: P, ref: ForwardedRef<E>) => {\n let focusableProps = useContext(FocusableContext);\n let isShallow = useContext(ShallowRenderContext);\n if (!isShallow) {\n if (render.length >= 3) {\n throw new Error(render.name + ' cannot be rendered outside a collection.');\n }\n return render(props, ref);\n }\n\n return useSSRCollectionNode(\n CollectionNodeClass,\n props,\n ref,\n 'children' in props ? props.children : null,\n null,\n node => (\n // Forward FocusableContext to real DOM tree so tooltips work.\n <FocusableContext.Provider value={focusableProps}>\n <Component node={node} />\n </FocusableContext.Provider>\n )\n );\n });\n // @ts-ignore\n Result.displayName = render.name;\n return Result;\n}\n\nexport function createBranchComponent<T, P extends {children?: any}, E extends Element>(\n CollectionNodeClass: CollectionNodeClass<any> | string,\n render: (props: P, ref: ForwardedRef<E>, node: Node<T>) => ReactElement | null,\n useChildren: (props: P) => ReactNode = useCollectionChildren\n): (props: P & React.RefAttributes<E>) => ReactElement | null {\n let Component = ({node}) => render(node.props, node.props.ref, node);\n let Result = (forwardRef as forwardRefType)((props: P, ref: ForwardedRef<E>) => {\n let children = useChildren(props);\n return (\n useSSRCollectionNode(CollectionNodeClass, props, ref, null, children, node => (\n <Component node={node} />\n )) ?? <></>\n );\n });\n // @ts-ignore\n Result.displayName = render.name;\n return Result;\n}\n\nfunction useCollectionChildren<T>(options: CachedChildrenOptions<T>) {\n return useCachedChildren({...options, addIdAndValue: true});\n}\n\nexport interface CollectionProps<T> extends CachedChildrenOptions<T> {}\n\nconst CollectionContext = createContext<CachedChildrenOptions<unknown> | null>(null);\n\n/** A Collection renders a list of items, automatically managing caching and keys. */\nexport function Collection<T>(props: CollectionProps<T>): JSX.Element {\n let ctx = useContext(CollectionContext)!;\n let dependencies = (ctx?.dependencies || []).concat(props.dependencies);\n let idScope = props.idScope ?? ctx?.idScope;\n let children = useCollectionChildren({\n ...props,\n idScope,\n dependencies\n });\n\n let doc = useContext(CollectionDocumentContext);\n if (doc) {\n children = <CollectionRoot>{children}</CollectionRoot>;\n }\n\n // Propagate dependencies and idScope to child collections.\n ctx = useMemo(\n () => ({\n // oxlint-disable-next-line react-hooks/exhaustive-deps\n dependencies,\n idScope\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n // oxlint-disable-next-line react/react-compiler, react-hooks/exhaustive-deps\n [idScope, ...dependencies]\n );\n\n return <CollectionContext.Provider value={ctx}>{children}</CollectionContext.Provider>;\n}\n\nfunction CollectionRoot({children}) {\n let doc = useContext(CollectionDocumentContext);\n let wrappedChildren = useMemo(\n () => (\n <CollectionDocumentContext.Provider value={null}>\n <ShallowRenderContext.Provider value>{children}</ShallowRenderContext.Provider>\n </CollectionDocumentContext.Provider>\n ),\n [children]\n );\n // During SSR, we render the content directly, and append nodes to the document during render.\n // The collection children return null so that nothing is actually rendered into the HTML.\n return useIsSSR() ? (\n <SSRContext.Provider value={doc}>{wrappedChildren}</SSRContext.Provider>\n ) : (\n createPortal(wrappedChildren, doc as unknown as Element)\n );\n}\n"],"names":[],"version":3,"file":"CollectionBuilder.cjs.map"}
|
|
@@ -41,7 +41,7 @@ function $d0e72a6e56b3c41b$export$bf788dd355e3a401(props) {
|
|
|
41
41
|
// Otherwise, render a hidden copy of the children so that we can build the collection before constructing the state.
|
|
42
42
|
// This should always come before the real DOM content so we have built the collection by the time it renders during SSR.
|
|
43
43
|
// This is fine. CollectionDocumentContext never changes after mounting.
|
|
44
|
-
//
|
|
44
|
+
// oxlint-disable-next-line react/react-compiler, react-hooks/rules-of-hooks
|
|
45
45
|
let { collection: collection, document: document } = $d0e72a6e56b3c41b$var$useCollectionDocument(props.createCollection);
|
|
46
46
|
return /*#__PURE__*/ (0, $87Tar$react).createElement((0, $87Tar$react).Fragment, null, /*#__PURE__*/ (0, $87Tar$react).createElement((0, $dd46fb4c3e047f13$export$8dc98ba7eadeaa56), null, /*#__PURE__*/ (0, $87Tar$react).createElement($d0e72a6e56b3c41b$var$CollectionDocumentContext.Provider, {
|
|
47
47
|
value: document
|
|
@@ -62,6 +62,7 @@ function $d0e72a6e56b3c41b$var$useSyncExternalStoreFallback(subscribe, getSnapsh
|
|
|
62
62
|
// We just need a ref to avoid invalidating the callback itself, which
|
|
63
63
|
// would cause React to re-run the callback more than necessary.
|
|
64
64
|
// eslint-disable-next-line rsp-rules/pure-render
|
|
65
|
+
// oxlint-disable-next-line react/react-compiler, rsp-rules/pure-render
|
|
65
66
|
isSSRRef.current = isSSR;
|
|
66
67
|
let getSnapshotWrapper = (0, $87Tar$useCallback)(()=>{
|
|
67
68
|
return isSSRRef.current ? getServerSnapshot() : getSnapshot();
|
|
@@ -90,6 +91,7 @@ function $d0e72a6e56b3c41b$var$useCollectionDocument(createCollection) {
|
|
|
90
91
|
document
|
|
91
92
|
]);
|
|
92
93
|
let getServerSnapshot = (0, $87Tar$useCallback)(()=>{
|
|
94
|
+
// oxlint-disable-next-line react/react-compiler
|
|
93
95
|
document.isSSR = true;
|
|
94
96
|
return document.getCollection();
|
|
95
97
|
}, [
|
|
@@ -110,7 +112,8 @@ function $d0e72a6e56b3c41b$var$createCollectionNodeClass(type) {
|
|
|
110
112
|
}
|
|
111
113
|
function $d0e72a6e56b3c41b$var$useSSRCollectionNode(CollectionNodeClass, props, ref, rendered, children, render) {
|
|
112
114
|
// To prevent breaking change, if CollectionNodeClass is a string, create a CollectionNodeClass using the string as the type
|
|
113
|
-
if (typeof CollectionNodeClass === 'string')
|
|
115
|
+
if (typeof CollectionNodeClass === 'string') // oxlint-disable-next-line react/react-compiler
|
|
116
|
+
CollectionNodeClass = $d0e72a6e56b3c41b$var$createCollectionNodeClass(CollectionNodeClass);
|
|
114
117
|
// During SSR, portals are not supported, so the collection children will be wrapped in an SSRContext.
|
|
115
118
|
// Since SSR occurs only once, we assume that the elements are rendered in order and never re-render.
|
|
116
119
|
// Therefore we can create elements in our collection document during render so that they are in the
|
|
@@ -199,9 +202,11 @@ function $d0e72a6e56b3c41b$export$fb8073518f34e6ec(props) {
|
|
|
199
202
|
if (doc) children = /*#__PURE__*/ (0, $87Tar$react).createElement($d0e72a6e56b3c41b$var$CollectionRoot, null, children);
|
|
200
203
|
// Propagate dependencies and idScope to child collections.
|
|
201
204
|
ctx = (0, $87Tar$useMemo)(()=>({
|
|
202
|
-
dependencies:
|
|
205
|
+
dependencies: // oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
206
|
+
dependencies,
|
|
203
207
|
idScope: idScope
|
|
204
208
|
}), // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
209
|
+
// oxlint-disable-next-line react/react-compiler, react-hooks/exhaustive-deps
|
|
205
210
|
[
|
|
206
211
|
idScope,
|
|
207
212
|
...dependencies
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAyBD,MAAM,2DAAuB,CAAA,GAAA,oBAAY,EAAE;AAC3C,MAAM,gEAA4B,CAAA,GAAA,oBAAY,EAA6C;AAYpF,SAAS,0CACd,KAAgC;IAEhC,gGAAgG;IAChG,IAAI,MAAM,CAAA,GAAA,iBAAS,EAAE;IACrB,IAAI,KACF,gFAAgF;IAChF,4DAA4D;IAC5D,oFAAoF;IACpF,yDAAyD;IACzD,kEAAkE;IAClE,OAAO,MAAM,OAAO;IAGtB,qHAAqH;IACrH,yHAAyH;IAEzH,wEAAwE;IACxE,sDAAsD;IACtD,IAAI,cAAC,UAAU,YAAE,QAAQ,EAAC,GAAG,4CAAsB,MAAM,gBAAgB;IACzE,qBACE,gFACE,gCAAC,CAAA,GAAA,yCAAK,uBACJ,gCAAC,gDAA0B,QAAQ;QAAC,OAAO;OACxC,MAAM,OAAO,kBAGlB,gCAAC;QAAgB,QAAQ,MAAM,QAAQ;QAAE,YAAY;;AAG3D;AAEA,SAAS,sCAAgB,cAAC,UAAU,UAAE,MAAM,EAAC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AA,iBAAS,EAAE;IACrB,IAAI,eAAe,AAAC,CAAA,CAAA,gBAAA,0BAAA,IAAK,YAAY,KAAI,EAAE,AAAD,EAAG,MAAM,CAAC,MAAM,YAAY;QACxD;IAAd,IAAI,UAAU,CAAA,iBAAA,MAAM,OAAO,cAAb,4BAAA,iBAAiB,gBAAA,0BAAA,IAAK,OAAO;IAC3C,IAAI,WAAW,4CAAsB;QACnC,GAAG,KAAK;iBACR;sBACA;IACF;IAEA,IAAI,MAAM,CAAA,GAAA,iBAAS,EAAE;IACrB,IAAI,KACF,yBAAW,gCAAC,4CAAgB;IAG9B,2DAA2D;IAC3D,MAAM,CAAA,GAAA,cAAM,EACV,IAAO,CAAA;0BACL;qBACA;QACF,CAAA,GACA,uDAAuD;IACvD;QAAC;WAAY;KAAa;IAG5B,qBAAO,gCAAC,wCAAkB,QAAQ;QAAC,OAAO;OAAM;AAClD;AAEA,SAAS,qCAAe,YAAC,QAAQ,EAAC;IAChC,IAAI,MAAM,CAAA,GAAA,iBAAS,EAAE;IACrB,IAAI,kBAAkB,CAAA,GAAA,cAAM,EAC1B,kBACE,gCAAC,gDAA0B,QAAQ;YAAC,OAAO;yBACzC,gCAAC,2CAAqB,QAAQ;YAAC,OAAA;WAAO,YAG1C;QAAC;KAAS;IAEZ,8FAA8F;IAC9F,0FAA0F;IAC1F,OAAO,CAAA,GAAA,yCAAO,oBACZ,gCAAC,iCAAW,QAAQ;QAAC,OAAO;OAAM,iCAElC,CAAA,GAAA,mBAAW,EAAE,iBAAiB;AAElC","sources":["packages/react-aria/src/collections/CollectionBuilder.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {BaseCollection, CollectionNode} from './BaseCollection';\nimport {BaseNode, Document, ElementNode} from './Document';\nimport {CachedChildrenOptions, useCachedChildren} from './useCachedChildren';\nimport {createPortal} from 'react-dom';\nimport {FocusableContext} from '../interactions/useFocusable';\nimport {forwardRefType, Key, Node} from '@react-types/shared';\nimport {Hidden} from './Hidden';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n JSX,\n ReactElement,\n ReactNode,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState\n} from 'react';\nimport {useIsSSR} from '../ssr/SSRProvider';\nimport {useSyncExternalStore as useSyncExternalStoreShim} from 'use-sync-external-store/shim/index.js';\n\nconst ShallowRenderContext = createContext(false);\nconst CollectionDocumentContext = createContext<Document<any, BaseCollection<any>> | null>(null);\n\nexport interface CollectionBuilderProps<C extends BaseCollection<any>> {\n content: ReactNode;\n children: (collection: C) => ReactNode;\n createCollection?: () => C;\n}\n\n/**\n * Builds a `Collection` from the children provided to the `content` prop, and passes it to the\n * child render prop function.\n */\nexport function CollectionBuilder<C extends BaseCollection<any>>(\n props: CollectionBuilderProps<C>\n): ReactElement {\n // If a document was provided above us, we're already in a hidden tree. Just render the content.\n let doc = useContext(CollectionDocumentContext);\n if (doc) {\n // The React types prior to 18 did not allow returning ReactNode from components\n // even though the actual implementation since React 16 did.\n // We must return ReactElement so that TS does not complain that <CollectionBuilder>\n // is not a valid JSX element with React 16 and 17 types.\n // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/20544\n return props.content as ReactElement;\n }\n\n // Otherwise, render a hidden copy of the children so that we can build the collection before constructing the state.\n // This should always come before the real DOM content so we have built the collection by the time it renders during SSR.\n\n // This is fine. CollectionDocumentContext never changes after mounting.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n let {collection, document} = useCollectionDocument(props.createCollection);\n return (\n <>\n <Hidden>\n <CollectionDocumentContext.Provider value={document}>\n {props.content}\n </CollectionDocumentContext.Provider>\n </Hidden>\n <CollectionInner render={props.children} collection={collection} />\n </>\n );\n}\n\nfunction CollectionInner({collection, render}) {\n return render(collection);\n}\n\ninterface CollectionDocumentResult<T, C extends BaseCollection<T>> {\n collection: C;\n document: Document<T, C>;\n}\n\n// React 16 and 17 don't support useSyncExternalStore natively, and the shim provided by React does not support getServerSnapshot.\n// This wrapper uses the shim, but additionally calls getServerSnapshot during SSR (according to SSRProvider).\nfunction useSyncExternalStoreFallback<C>(\n subscribe: (onStoreChange: () => void) => () => void,\n getSnapshot: () => C,\n getServerSnapshot: () => C\n): C {\n let isSSR = useIsSSR();\n let isSSRRef = useRef(isSSR);\n // This is read immediately inside the wrapper, which also runs during render.\n // We just need a ref to avoid invalidating the callback itself, which\n // would cause React to re-run the callback more than necessary.\n // eslint-disable-next-line rsp-rules/pure-render\n isSSRRef.current = isSSR;\n\n let getSnapshotWrapper = useCallback(() => {\n return isSSRRef.current ? getServerSnapshot() : getSnapshot();\n }, [getSnapshot, getServerSnapshot]);\n return useSyncExternalStoreShim(subscribe, getSnapshotWrapper);\n}\n\nconst useSyncExternalStore =\n typeof React['useSyncExternalStore'] === 'function'\n ? React['useSyncExternalStore']\n : useSyncExternalStoreFallback;\n\nfunction useCollectionDocument<T extends object, C extends BaseCollection<T>>(\n createCollection?: () => C\n): CollectionDocumentResult<T, C> {\n // The document instance is mutable, and should never change between renders.\n // useSyncExternalStore is used to subscribe to updates, which vends immutable Collection objects.\n let [document] = useState(\n () => new Document<T, C>(createCollection?.() || (new BaseCollection() as C))\n );\n let subscribe = useCallback((fn: () => void) => document.subscribe(fn), [document]);\n let getSnapshot = useCallback(() => {\n let collection = document.getCollection();\n if (document.isSSR) {\n // After SSR is complete, reset the document to empty so it is ready for React to render the portal into.\n // We do this _after_ getting the collection above so that the collection still has content in it from SSR\n // during the current render, before React has finished the client render.\n document.resetAfterSSR();\n }\n return collection;\n }, [document]);\n let getServerSnapshot = useCallback(() => {\n document.isSSR = true;\n return document.getCollection();\n }, [document]);\n let collection = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n return {collection, document};\n}\n\nconst SSRContext = createContext<BaseNode<any> | null>(null);\n\nexport type CollectionNodeClass<T> = {\n new (key: Key): CollectionNode<T>;\n readonly type: string;\n};\n\nfunction createCollectionNodeClass(type: string): CollectionNodeClass<any> {\n let NodeClass = class extends CollectionNode<any> {\n static readonly type = type;\n };\n return NodeClass;\n}\n\nfunction useSSRCollectionNode<T extends Element>(\n CollectionNodeClass: CollectionNodeClass<T> | string,\n props: object,\n ref: ForwardedRef<T>,\n rendered?: any,\n children?: ReactNode,\n render?: (node: Node<any>) => ReactElement\n) {\n // To prevent breaking change, if CollectionNodeClass is a string, create a CollectionNodeClass using the string as the type\n if (typeof CollectionNodeClass === 'string') {\n CollectionNodeClass = createCollectionNodeClass(CollectionNodeClass);\n }\n\n // During SSR, portals are not supported, so the collection children will be wrapped in an SSRContext.\n // Since SSR occurs only once, we assume that the elements are rendered in order and never re-render.\n // Therefore we can create elements in our collection document during render so that they are in the\n // collection by the time we need to use the collection to render to the real DOM.\n // After hydration, we switch to client rendering using the portal.\n let itemRef = useCallback(\n (element: ElementNode<any> | null) => {\n element?.setProps(props, ref, CollectionNodeClass, rendered, render);\n },\n [props, ref, rendered, render, CollectionNodeClass]\n );\n let parentNode = useContext(SSRContext);\n if (parentNode) {\n // Guard against double rendering in strict mode.\n let element = parentNode.ownerDocument.nodesByProps.get(props);\n if (!element) {\n element = parentNode.ownerDocument.createElement(CollectionNodeClass.type);\n element.setProps(props, ref, CollectionNodeClass, rendered, render);\n parentNode.appendChild(element);\n parentNode.ownerDocument.updateCollection();\n parentNode.ownerDocument.nodesByProps.set(props, element);\n }\n\n return children ? <SSRContext.Provider value={element}>{children}</SSRContext.Provider> : null;\n }\n\n // @ts-ignore\n return <CollectionNodeClass.type ref={itemRef}>{children}</CollectionNodeClass.type>;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function createLeafComponent<T, P extends object, E extends Element>(\n CollectionNodeClass: CollectionNodeClass<any> | string,\n render: (props: P, ref: ForwardedRef<E>) => ReactElement | null\n): (props: P & React.RefAttributes<E>) => ReactElement | null;\nexport function createLeafComponent<T, P extends object, E extends Element>(\n CollectionNodeClass: CollectionNodeClass<any> | string,\n render: (props: P, ref: ForwardedRef<E>, node: Node<T>) => ReactElement | null\n): (props: P & React.RefAttributes<E>) => ReactElement | null;\nexport function createLeafComponent<P extends object, E extends Element>(\n CollectionNodeClass: CollectionNodeClass<any> | string,\n render: (props: P, ref: ForwardedRef<E>, node?: any) => ReactElement | null\n): (props: P & React.RefAttributes<any>) => ReactElement | null {\n let Component = ({node}) => render(node.props, node.props.ref, node);\n let Result = (forwardRef as forwardRefType)((props: P, ref: ForwardedRef<E>) => {\n let focusableProps = useContext(FocusableContext);\n let isShallow = useContext(ShallowRenderContext);\n if (!isShallow) {\n if (render.length >= 3) {\n throw new Error(render.name + ' cannot be rendered outside a collection.');\n }\n return render(props, ref);\n }\n\n return useSSRCollectionNode(\n CollectionNodeClass,\n props,\n ref,\n 'children' in props ? props.children : null,\n null,\n node => (\n // Forward FocusableContext to real DOM tree so tooltips work.\n <FocusableContext.Provider value={focusableProps}>\n <Component node={node} />\n </FocusableContext.Provider>\n )\n );\n });\n // @ts-ignore\n Result.displayName = render.name;\n return Result;\n}\n\nexport function createBranchComponent<T, P extends {children?: any}, E extends Element>(\n CollectionNodeClass: CollectionNodeClass<any> | string,\n render: (props: P, ref: ForwardedRef<E>, node: Node<T>) => ReactElement | null,\n useChildren: (props: P) => ReactNode = useCollectionChildren\n): (props: P & React.RefAttributes<E>) => ReactElement | null {\n let Component = ({node}) => render(node.props, node.props.ref, node);\n let Result = (forwardRef as forwardRefType)((props: P, ref: ForwardedRef<E>) => {\n let children = useChildren(props);\n return (\n useSSRCollectionNode(CollectionNodeClass, props, ref, null, children, node => (\n <Component node={node} />\n )) ?? <></>\n );\n });\n // @ts-ignore\n Result.displayName = render.name;\n return Result;\n}\n\nfunction useCollectionChildren<T>(options: CachedChildrenOptions<T>) {\n return useCachedChildren({...options, addIdAndValue: true});\n}\n\nexport interface CollectionProps<T> extends CachedChildrenOptions<T> {}\n\nconst CollectionContext = createContext<CachedChildrenOptions<unknown> | null>(null);\n\n/** A Collection renders a list of items, automatically managing caching and keys. */\nexport function Collection<T>(props: CollectionProps<T>): JSX.Element {\n let ctx = useContext(CollectionContext)!;\n let dependencies = (ctx?.dependencies || []).concat(props.dependencies);\n let idScope = props.idScope ?? ctx?.idScope;\n let children = useCollectionChildren({\n ...props,\n idScope,\n dependencies\n });\n\n let doc = useContext(CollectionDocumentContext);\n if (doc) {\n children = <CollectionRoot>{children}</CollectionRoot>;\n }\n\n // Propagate dependencies and idScope to child collections.\n ctx = useMemo(\n () => ({\n dependencies,\n idScope\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [idScope, ...dependencies]\n );\n\n return <CollectionContext.Provider value={ctx}>{children}</CollectionContext.Provider>;\n}\n\nfunction CollectionRoot({children}) {\n let doc = useContext(CollectionDocumentContext);\n let wrappedChildren = useMemo(\n () => (\n <CollectionDocumentContext.Provider value={null}>\n <ShallowRenderContext.Provider value>{children}</ShallowRenderContext.Provider>\n </CollectionDocumentContext.Provider>\n ),\n [children]\n );\n // During SSR, we render the content directly, and append nodes to the document during render.\n // The collection children return null so that nothing is actually rendered into the HTML.\n return useIsSSR() ? (\n <SSRContext.Provider value={doc}>{wrappedChildren}</SSRContext.Provider>\n ) : (\n createPortal(wrappedChildren, doc as unknown as Element)\n );\n}\n"],"names":[],"version":3,"file":"CollectionBuilder.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAyBD,MAAM,2DAAuB,CAAA,GAAA,oBAAY,EAAE;AAC3C,MAAM,gEAA4B,CAAA,GAAA,oBAAY,EAA6C;AAYpF,SAAS,0CACd,KAAgC;IAEhC,gGAAgG;IAChG,IAAI,MAAM,CAAA,GAAA,iB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,kBACE,gCAAC,gDAA0B,QAAQ;YAAC,OAAO;yBACzC,gCAAC,2CAAqB,QAAQ;YAAC,OAAA;WAAO,YAG1C;QAAC;KAAS;IAEZ,8FAA8F;IAC9F,0FAA0F;IAC1F,OAAO,CAAA,GAAA,yCAAO,oBACZ,gCAAC,iCAAW,QAAQ;QAAC,OAAO;OAAM,iCAElC,CAAA,GAAA,mBAAW,EAAE,iBAAiB;AAElC","sources":["packages/react-aria/src/collections/CollectionBuilder.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {BaseCollection, CollectionNode} from './BaseCollection';\nimport {BaseNode, Document, ElementNode} from './Document';\nimport {CachedChildrenOptions, useCachedChildren} from './useCachedChildren';\nimport {createPortal} from 'react-dom';\nimport {FocusableContext} from '../interactions/useFocusable';\nimport {forwardRefType, Key, Node} from '@react-types/shared';\nimport {Hidden} from './Hidden';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n JSX,\n ReactElement,\n ReactNode,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState\n} from 'react';\nimport {useIsSSR} from '../ssr/SSRProvider';\nimport {useSyncExternalStore as useSyncExternalStoreShim} from 'use-sync-external-store/shim/index.js';\n\nconst ShallowRenderContext = createContext(false);\nconst CollectionDocumentContext = createContext<Document<any, BaseCollection<any>> | null>(null);\n\nexport interface CollectionBuilderProps<C extends BaseCollection<any>> {\n content: ReactNode;\n children: (collection: C) => ReactNode;\n createCollection?: () => C;\n}\n\n/**\n * Builds a `Collection` from the children provided to the `content` prop, and passes it to the\n * child render prop function.\n */\nexport function CollectionBuilder<C extends BaseCollection<any>>(\n props: CollectionBuilderProps<C>\n): ReactElement {\n // If a document was provided above us, we're already in a hidden tree. Just render the content.\n let doc = useContext(CollectionDocumentContext);\n if (doc) {\n // The React types prior to 18 did not allow returning ReactNode from components\n // even though the actual implementation since React 16 did.\n // We must return ReactElement so that TS does not complain that <CollectionBuilder>\n // is not a valid JSX element with React 16 and 17 types.\n // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/20544\n return props.content as ReactElement;\n }\n\n // Otherwise, render a hidden copy of the children so that we can build the collection before constructing the state.\n // This should always come before the real DOM content so we have built the collection by the time it renders during SSR.\n\n // This is fine. CollectionDocumentContext never changes after mounting.\n // oxlint-disable-next-line react/react-compiler, react-hooks/rules-of-hooks\n let {collection, document} = useCollectionDocument(props.createCollection);\n return (\n <>\n <Hidden>\n <CollectionDocumentContext.Provider value={document}>\n {props.content}\n </CollectionDocumentContext.Provider>\n </Hidden>\n <CollectionInner render={props.children} collection={collection} />\n </>\n );\n}\n\nfunction CollectionInner({collection, render}) {\n return render(collection);\n}\n\ninterface CollectionDocumentResult<T, C extends BaseCollection<T>> {\n collection: C;\n document: Document<T, C>;\n}\n\n// React 16 and 17 don't support useSyncExternalStore natively, and the shim provided by React does not support getServerSnapshot.\n// This wrapper uses the shim, but additionally calls getServerSnapshot during SSR (according to SSRProvider).\nfunction useSyncExternalStoreFallback<C>(\n subscribe: (onStoreChange: () => void) => () => void,\n getSnapshot: () => C,\n getServerSnapshot: () => C\n): C {\n let isSSR = useIsSSR();\n let isSSRRef = useRef(isSSR);\n // This is read immediately inside the wrapper, which also runs during render.\n // We just need a ref to avoid invalidating the callback itself, which\n // would cause React to re-run the callback more than necessary.\n // eslint-disable-next-line rsp-rules/pure-render\n // oxlint-disable-next-line react/react-compiler, rsp-rules/pure-render\n isSSRRef.current = isSSR;\n\n let getSnapshotWrapper = useCallback(() => {\n return isSSRRef.current ? getServerSnapshot() : getSnapshot();\n }, [getSnapshot, getServerSnapshot]);\n return useSyncExternalStoreShim(subscribe, getSnapshotWrapper);\n}\n\nconst useSyncExternalStore =\n typeof React['useSyncExternalStore'] === 'function'\n ? React['useSyncExternalStore']\n : useSyncExternalStoreFallback;\n\nfunction useCollectionDocument<T extends object, C extends BaseCollection<T>>(\n createCollection?: () => C\n): CollectionDocumentResult<T, C> {\n // The document instance is mutable, and should never change between renders.\n // useSyncExternalStore is used to subscribe to updates, which vends immutable Collection objects.\n let [document] = useState(\n () => new Document<T, C>(createCollection?.() || (new BaseCollection() as C))\n );\n let subscribe = useCallback((fn: () => void) => document.subscribe(fn), [document]);\n let getSnapshot = useCallback(() => {\n let collection = document.getCollection();\n if (document.isSSR) {\n // After SSR is complete, reset the document to empty so it is ready for React to render the portal into.\n // We do this _after_ getting the collection above so that the collection still has content in it from SSR\n // during the current render, before React has finished the client render.\n document.resetAfterSSR();\n }\n return collection;\n }, [document]);\n let getServerSnapshot = useCallback(() => {\n // oxlint-disable-next-line react/react-compiler\n document.isSSR = true;\n return document.getCollection();\n }, [document]);\n let collection = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n return {collection, document};\n}\n\nconst SSRContext = createContext<BaseNode<any> | null>(null);\n\nexport type CollectionNodeClass<T> = {\n new (key: Key): CollectionNode<T>;\n readonly type: string;\n};\n\nfunction createCollectionNodeClass(type: string): CollectionNodeClass<any> {\n let NodeClass = class extends CollectionNode<any> {\n static readonly type = type;\n };\n return NodeClass;\n}\n\nfunction useSSRCollectionNode<T extends Element>(\n CollectionNodeClass: CollectionNodeClass<T> | string,\n props: object,\n ref: ForwardedRef<T>,\n rendered?: any,\n children?: ReactNode,\n render?: (node: Node<any>) => ReactElement\n) {\n // To prevent breaking change, if CollectionNodeClass is a string, create a CollectionNodeClass using the string as the type\n if (typeof CollectionNodeClass === 'string') {\n // oxlint-disable-next-line react/react-compiler\n CollectionNodeClass = createCollectionNodeClass(CollectionNodeClass);\n }\n\n // During SSR, portals are not supported, so the collection children will be wrapped in an SSRContext.\n // Since SSR occurs only once, we assume that the elements are rendered in order and never re-render.\n // Therefore we can create elements in our collection document during render so that they are in the\n // collection by the time we need to use the collection to render to the real DOM.\n // After hydration, we switch to client rendering using the portal.\n let itemRef = useCallback(\n (element: ElementNode<any> | null) => {\n element?.setProps(props, ref, CollectionNodeClass, rendered, render);\n },\n [props, ref, rendered, render, CollectionNodeClass]\n );\n let parentNode = useContext(SSRContext);\n if (parentNode) {\n // Guard against double rendering in strict mode.\n let element = parentNode.ownerDocument.nodesByProps.get(props);\n if (!element) {\n element = parentNode.ownerDocument.createElement(CollectionNodeClass.type);\n element.setProps(props, ref, CollectionNodeClass, rendered, render);\n parentNode.appendChild(element);\n parentNode.ownerDocument.updateCollection();\n parentNode.ownerDocument.nodesByProps.set(props, element);\n }\n\n return children ? <SSRContext.Provider value={element}>{children}</SSRContext.Provider> : null;\n }\n\n // @ts-ignore\n return <CollectionNodeClass.type ref={itemRef}>{children}</CollectionNodeClass.type>;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function createLeafComponent<T, P extends object, E extends Element>(\n CollectionNodeClass: CollectionNodeClass<any> | string,\n render: (props: P, ref: ForwardedRef<E>) => ReactElement | null\n): (props: P & React.RefAttributes<E>) => ReactElement | null;\nexport function createLeafComponent<T, P extends object, E extends Element>(\n CollectionNodeClass: CollectionNodeClass<any> | string,\n render: (props: P, ref: ForwardedRef<E>, node: Node<T>) => ReactElement | null\n): (props: P & React.RefAttributes<E>) => ReactElement | null;\nexport function createLeafComponent<P extends object, E extends Element>(\n CollectionNodeClass: CollectionNodeClass<any> | string,\n render: (props: P, ref: ForwardedRef<E>, node?: any) => ReactElement | null\n): (props: P & React.RefAttributes<any>) => ReactElement | null {\n let Component = ({node}) => render(node.props, node.props.ref, node);\n let Result = (forwardRef as forwardRefType)((props: P, ref: ForwardedRef<E>) => {\n let focusableProps = useContext(FocusableContext);\n let isShallow = useContext(ShallowRenderContext);\n if (!isShallow) {\n if (render.length >= 3) {\n throw new Error(render.name + ' cannot be rendered outside a collection.');\n }\n return render(props, ref);\n }\n\n return useSSRCollectionNode(\n CollectionNodeClass,\n props,\n ref,\n 'children' in props ? props.children : null,\n null,\n node => (\n // Forward FocusableContext to real DOM tree so tooltips work.\n <FocusableContext.Provider value={focusableProps}>\n <Component node={node} />\n </FocusableContext.Provider>\n )\n );\n });\n // @ts-ignore\n Result.displayName = render.name;\n return Result;\n}\n\nexport function createBranchComponent<T, P extends {children?: any}, E extends Element>(\n CollectionNodeClass: CollectionNodeClass<any> | string,\n render: (props: P, ref: ForwardedRef<E>, node: Node<T>) => ReactElement | null,\n useChildren: (props: P) => ReactNode = useCollectionChildren\n): (props: P & React.RefAttributes<E>) => ReactElement | null {\n let Component = ({node}) => render(node.props, node.props.ref, node);\n let Result = (forwardRef as forwardRefType)((props: P, ref: ForwardedRef<E>) => {\n let children = useChildren(props);\n return (\n useSSRCollectionNode(CollectionNodeClass, props, ref, null, children, node => (\n <Component node={node} />\n )) ?? <></>\n );\n });\n // @ts-ignore\n Result.displayName = render.name;\n return Result;\n}\n\nfunction useCollectionChildren<T>(options: CachedChildrenOptions<T>) {\n return useCachedChildren({...options, addIdAndValue: true});\n}\n\nexport interface CollectionProps<T> extends CachedChildrenOptions<T> {}\n\nconst CollectionContext = createContext<CachedChildrenOptions<unknown> | null>(null);\n\n/** A Collection renders a list of items, automatically managing caching and keys. */\nexport function Collection<T>(props: CollectionProps<T>): JSX.Element {\n let ctx = useContext(CollectionContext)!;\n let dependencies = (ctx?.dependencies || []).concat(props.dependencies);\n let idScope = props.idScope ?? ctx?.idScope;\n let children = useCollectionChildren({\n ...props,\n idScope,\n dependencies\n });\n\n let doc = useContext(CollectionDocumentContext);\n if (doc) {\n children = <CollectionRoot>{children}</CollectionRoot>;\n }\n\n // Propagate dependencies and idScope to child collections.\n ctx = useMemo(\n () => ({\n // oxlint-disable-next-line react-hooks/exhaustive-deps\n dependencies,\n idScope\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n // oxlint-disable-next-line react/react-compiler, react-hooks/exhaustive-deps\n [idScope, ...dependencies]\n );\n\n return <CollectionContext.Provider value={ctx}>{children}</CollectionContext.Provider>;\n}\n\nfunction CollectionRoot({children}) {\n let doc = useContext(CollectionDocumentContext);\n let wrappedChildren = useMemo(\n () => (\n <CollectionDocumentContext.Provider value={null}>\n <ShallowRenderContext.Provider value>{children}</ShallowRenderContext.Provider>\n </CollectionDocumentContext.Provider>\n ),\n [children]\n );\n // During SSR, we render the content directly, and append nodes to the document during render.\n // The collection children return null so that nothing is actually rendered into the HTML.\n return useIsSSR() ? (\n <SSRContext.Provider value={doc}>{wrappedChildren}</SSRContext.Provider>\n ) : (\n createPortal(wrappedChildren, doc as unknown as Element)\n );\n}\n"],"names":[],"version":3,"file":"CollectionBuilder.js.map"}
|
|
@@ -41,7 +41,7 @@ function $42ceafc619f9c3ba$export$bf788dd355e3a401(props) {
|
|
|
41
41
|
// Otherwise, render a hidden copy of the children so that we can build the collection before constructing the state.
|
|
42
42
|
// This should always come before the real DOM content so we have built the collection by the time it renders during SSR.
|
|
43
43
|
// This is fine. CollectionDocumentContext never changes after mounting.
|
|
44
|
-
//
|
|
44
|
+
// oxlint-disable-next-line react/react-compiler, react-hooks/rules-of-hooks
|
|
45
45
|
let { collection: collection, document: document } = $42ceafc619f9c3ba$var$useCollectionDocument(props.createCollection);
|
|
46
46
|
return /*#__PURE__*/ (0, $kT5Ur$react).createElement((0, $kT5Ur$react).Fragment, null, /*#__PURE__*/ (0, $kT5Ur$react).createElement((0, $d7f64c32b702fe2c$export$8dc98ba7eadeaa56), null, /*#__PURE__*/ (0, $kT5Ur$react).createElement($42ceafc619f9c3ba$var$CollectionDocumentContext.Provider, {
|
|
47
47
|
value: document
|
|
@@ -62,6 +62,7 @@ function $42ceafc619f9c3ba$var$useSyncExternalStoreFallback(subscribe, getSnapsh
|
|
|
62
62
|
// We just need a ref to avoid invalidating the callback itself, which
|
|
63
63
|
// would cause React to re-run the callback more than necessary.
|
|
64
64
|
// eslint-disable-next-line rsp-rules/pure-render
|
|
65
|
+
// oxlint-disable-next-line react/react-compiler, rsp-rules/pure-render
|
|
65
66
|
isSSRRef.current = isSSR;
|
|
66
67
|
let getSnapshotWrapper = (0, $kT5Ur$useCallback)(()=>{
|
|
67
68
|
return isSSRRef.current ? getServerSnapshot() : getSnapshot();
|
|
@@ -90,6 +91,7 @@ function $42ceafc619f9c3ba$var$useCollectionDocument(createCollection) {
|
|
|
90
91
|
document
|
|
91
92
|
]);
|
|
92
93
|
let getServerSnapshot = (0, $kT5Ur$useCallback)(()=>{
|
|
94
|
+
// oxlint-disable-next-line react/react-compiler
|
|
93
95
|
document.isSSR = true;
|
|
94
96
|
return document.getCollection();
|
|
95
97
|
}, [
|
|
@@ -112,7 +114,8 @@ function $42ceafc619f9c3ba$var$createCollectionNodeClass(type) {
|
|
|
112
114
|
}
|
|
113
115
|
function $42ceafc619f9c3ba$var$useSSRCollectionNode(CollectionNodeClass, props, ref, rendered, children, render) {
|
|
114
116
|
// To prevent breaking change, if CollectionNodeClass is a string, create a CollectionNodeClass using the string as the type
|
|
115
|
-
if (typeof CollectionNodeClass === 'string')
|
|
117
|
+
if (typeof CollectionNodeClass === 'string') // oxlint-disable-next-line react/react-compiler
|
|
118
|
+
CollectionNodeClass = $42ceafc619f9c3ba$var$createCollectionNodeClass(CollectionNodeClass);
|
|
116
119
|
// During SSR, portals are not supported, so the collection children will be wrapped in an SSRContext.
|
|
117
120
|
// Since SSR occurs only once, we assume that the elements are rendered in order and never re-render.
|
|
118
121
|
// Therefore we can create elements in our collection document during render so that they are in the
|
|
@@ -199,9 +202,11 @@ function $42ceafc619f9c3ba$export$fb8073518f34e6ec(props) {
|
|
|
199
202
|
if (doc) children = /*#__PURE__*/ (0, $kT5Ur$react).createElement($42ceafc619f9c3ba$var$CollectionRoot, null, children);
|
|
200
203
|
// Propagate dependencies and idScope to child collections.
|
|
201
204
|
ctx = (0, $kT5Ur$useMemo)(()=>({
|
|
202
|
-
dependencies:
|
|
205
|
+
dependencies: // oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
206
|
+
dependencies,
|
|
203
207
|
idScope: idScope
|
|
204
208
|
}), // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
209
|
+
// oxlint-disable-next-line react/react-compiler, react-hooks/exhaustive-deps
|
|
205
210
|
[
|
|
206
211
|
idScope,
|
|
207
212
|
...dependencies
|