@proyecto-viviana/solidaria-components 0.5.0 → 0.7.0-rc.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/LICENSE-APACHE-2.0 +201 -0
- package/NOTICE +91 -0
- package/README.md +4 -7
- package/dist/ActionBar.d.ts +2 -10
- package/dist/ActionBar.d.ts.map +1 -1
- package/dist/ActionBar.js +95 -59
- package/dist/ActionBar.js.map +1 -1
- package/dist/ActionBar.jsx +42 -15
- package/dist/ActionBar.jsx.map +1 -1
- package/dist/ActionGroup.d.ts +1 -12
- package/dist/ActionGroup.d.ts.map +1 -1
- package/dist/ActionGroup.js +66 -44
- package/dist/ActionGroup.js.map +1 -1
- package/dist/ActionGroup.jsx +25 -10
- package/dist/ActionGroup.jsx.map +1 -1
- package/dist/Alert.d.ts +4 -1
- package/dist/Alert.d.ts.map +1 -1
- package/dist/Alert.js +25 -17
- package/dist/Alert.js.map +1 -1
- package/dist/Alert.jsx +9 -5
- package/dist/Alert.jsx.map +1 -1
- package/dist/Autocomplete.d.ts +2 -9
- package/dist/Autocomplete.d.ts.map +1 -1
- package/dist/Autocomplete.js +18 -5
- package/dist/Autocomplete.js.map +1 -1
- package/dist/Autocomplete.jsx +20 -7
- package/dist/Autocomplete.jsx.map +1 -1
- package/dist/Breadcrumbs.d.ts +2 -7
- package/dist/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs.js +71 -51
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/Breadcrumbs.jsx +25 -12
- package/dist/Breadcrumbs.jsx.map +1 -1
- package/dist/Button.d.ts +1 -7
- package/dist/Button.d.ts.map +1 -1
- package/dist/Button.js +125 -72
- package/dist/Button.js.map +1 -1
- package/dist/Button.jsx +105 -43
- package/dist/Button.jsx.map +1 -1
- package/dist/Calendar.d.ts +1 -7
- package/dist/Calendar.d.ts.map +1 -1
- package/dist/Calendar.js +297 -221
- package/dist/Calendar.js.map +1 -1
- package/dist/Calendar.jsx +52 -32
- package/dist/Calendar.jsx.map +1 -1
- package/dist/CalendarPicker.d.ts +1 -10
- package/dist/CalendarPicker.d.ts.map +1 -1
- package/dist/CalendarPicker.js +12 -0
- package/dist/CalendarPicker.js.map +1 -1
- package/dist/CalendarPicker.jsx +12 -0
- package/dist/CalendarPicker.jsx.map +1 -1
- package/dist/Checkbox.d.ts +2 -7
- package/dist/Checkbox.d.ts.map +1 -1
- package/dist/Checkbox.js +332 -270
- package/dist/Checkbox.js.map +1 -1
- package/dist/Checkbox.jsx +70 -77
- package/dist/Checkbox.jsx.map +1 -1
- package/dist/Collection.d.ts +33 -7
- package/dist/Collection.d.ts.map +1 -1
- package/dist/Collection.js +128 -74
- package/dist/Collection.js.map +1 -1
- package/dist/Collection.jsx +46 -7
- package/dist/Collection.jsx.map +1 -1
- package/dist/Color.d.ts +15 -20
- package/dist/Color.d.ts.map +1 -1
- package/dist/Color.js +572 -334
- package/dist/Color.js.map +1 -1
- package/dist/Color.jsx +205 -85
- package/dist/Color.jsx.map +1 -1
- package/dist/ColorEditor.d.ts +3 -1
- package/dist/ColorEditor.d.ts.map +1 -1
- package/dist/ColorEditor.js +147 -124
- package/dist/ColorEditor.js.map +1 -1
- package/dist/ColorEditor.jsx +4 -1
- package/dist/ColorEditor.jsx.map +1 -1
- package/dist/ComboBox.d.ts +31 -10
- package/dist/ComboBox.d.ts.map +1 -1
- package/dist/ComboBox.js +539 -274
- package/dist/ComboBox.js.map +1 -1
- package/dist/ComboBox.jsx +213 -70
- package/dist/ComboBox.jsx.map +1 -1
- package/dist/ContextualHelpTrigger.d.ts +1 -7
- package/dist/ContextualHelpTrigger.d.ts.map +1 -1
- package/dist/ContextualHelpTrigger.js +102 -72
- package/dist/ContextualHelpTrigger.js.map +1 -1
- package/dist/ContextualHelpTrigger.jsx +36 -16
- package/dist/ContextualHelpTrigger.jsx.map +1 -1
- package/dist/DateField.d.ts +2 -7
- package/dist/DateField.d.ts.map +1 -1
- package/dist/DateField.js +0 -2
- package/dist/DateField.jsx +0 -2
- package/dist/DateField2.js +194 -179
- package/dist/DateField2.js.map +1 -1
- package/dist/DateField2.jsx +58 -55
- package/dist/DateField2.jsx.map +1 -1
- package/dist/DatePicker.d.ts +7 -7
- package/dist/DatePicker.d.ts.map +1 -1
- package/dist/DatePicker.js +2 -2
- package/dist/DatePicker.jsx +2 -2
- package/dist/DatePicker2.js +357 -435
- package/dist/DatePicker2.js.map +1 -1
- package/dist/DatePicker2.jsx +109 -178
- package/dist/DatePicker2.jsx.map +1 -1
- package/dist/DateRangePickerContext.d.ts +7 -0
- package/dist/DateRangePickerContext.d.ts.map +1 -1
- package/dist/Dialog.d.ts +4 -9
- package/dist/Dialog.d.ts.map +1 -1
- package/dist/Dialog.js +168 -101
- package/dist/Dialog.js.map +1 -1
- package/dist/Dialog.jsx +75 -27
- package/dist/Dialog.jsx.map +1 -1
- package/dist/Disclosure.d.ts +1 -9
- package/dist/Disclosure.d.ts.map +1 -1
- package/dist/Disclosure.js +121 -79
- package/dist/Disclosure.js.map +1 -1
- package/dist/Disclosure.jsx +32 -19
- package/dist/Disclosure.jsx.map +1 -1
- package/dist/DragAndDrop.d.ts +9 -6
- package/dist/DragAndDrop.d.ts.map +1 -1
- package/dist/DragAndDrop.js +37 -22
- package/dist/DragAndDrop.js.map +1 -1
- package/dist/DragAndDrop.jsx +20 -4
- package/dist/DragAndDrop.jsx.map +1 -1
- package/dist/DragPreview.d.ts +1 -1
- package/dist/DragPreview.d.ts.map +1 -1
- package/dist/DropZone.d.ts +1 -7
- package/dist/DropZone.d.ts.map +1 -1
- package/dist/DropZone.js +74 -40
- package/dist/DropZone.js.map +1 -1
- package/dist/DropZone.jsx +24 -8
- package/dist/DropZone.jsx.map +1 -1
- package/dist/ElementTag.d.ts +9 -20
- package/dist/ElementTag.d.ts.map +1 -1
- package/dist/ElementTag.js +8 -210
- package/dist/ElementTag.js.map +1 -1
- package/dist/ElementTag.jsx +8 -57
- package/dist/ElementTag.jsx.map +1 -1
- package/dist/FieldError.d.ts +8 -7
- package/dist/FieldError.d.ts.map +1 -1
- package/dist/FieldError.js +33 -13
- package/dist/FieldError.js.map +1 -1
- package/dist/FieldError.jsx +20 -5
- package/dist/FieldError.jsx.map +1 -1
- package/dist/FileTrigger.d.ts +1 -7
- package/dist/FileTrigger.d.ts.map +1 -1
- package/dist/FileTrigger.js +30 -12
- package/dist/FileTrigger.js.map +1 -1
- package/dist/FileTrigger.jsx +15 -2
- package/dist/FileTrigger.jsx.map +1 -1
- package/dist/Focusable.d.ts +2 -8
- package/dist/Focusable.d.ts.map +1 -1
- package/dist/Focusable.js +23 -6
- package/dist/Focusable.js.map +1 -1
- package/dist/Focusable.jsx +22 -5
- package/dist/Focusable.jsx.map +1 -1
- package/dist/Form.d.ts +9 -8
- package/dist/Form.d.ts.map +1 -1
- package/dist/Form.js +66 -43
- package/dist/Form.js.map +1 -1
- package/dist/Form.jsx +36 -16
- package/dist/Form.jsx.map +1 -1
- package/dist/GridList.d.ts +5 -10
- package/dist/GridList.d.ts.map +1 -1
- package/dist/GridList.js +372 -243
- package/dist/GridList.js.map +1 -1
- package/dist/GridList.jsx +177 -99
- package/dist/GridList.jsx.map +1 -1
- package/dist/HiddenDateInput.d.ts +1 -7
- package/dist/HiddenDateInput.d.ts.map +1 -1
- package/dist/Icon.d.ts +4 -1
- package/dist/Icon.d.ts.map +1 -1
- package/dist/Icon.js +41 -37
- package/dist/Icon.js.map +1 -1
- package/dist/Icon.jsx +7 -3
- package/dist/Icon.jsx.map +1 -1
- package/dist/Keyboard.d.ts +1 -7
- package/dist/Keyboard.d.ts.map +1 -1
- package/dist/Keyboard.js +24 -11
- package/dist/Keyboard.js.map +1 -1
- package/dist/Keyboard.jsx +15 -2
- package/dist/Keyboard.jsx.map +1 -1
- package/dist/Label.d.ts +20 -0
- package/dist/Label.d.ts.map +1 -0
- package/dist/Label.js +60 -0
- package/dist/Label.js.map +1 -0
- package/dist/Label.jsx +47 -0
- package/dist/Label.jsx.map +1 -0
- package/dist/Landmark.d.ts +4 -1
- package/dist/Landmark.d.ts.map +1 -1
- package/dist/Landmark.js +10 -4
- package/dist/Landmark.js.map +1 -1
- package/dist/Landmark.jsx +5 -1
- package/dist/Landmark.jsx.map +1 -1
- package/dist/Link.d.ts +2 -7
- package/dist/Link.d.ts.map +1 -1
- package/dist/Link.js +56 -36
- package/dist/Link.js.map +1 -1
- package/dist/Link.jsx +52 -10
- package/dist/Link.jsx.map +1 -1
- package/dist/ListBox.d.ts +17 -13
- package/dist/ListBox.d.ts.map +1 -1
- package/dist/ListBox.js +647 -348
- package/dist/ListBox.js.map +1 -1
- package/dist/ListBox.jsx +339 -236
- package/dist/ListBox.jsx.map +1 -1
- package/dist/ListDropTargetDelegate.d.ts +3 -0
- package/dist/ListDropTargetDelegate.d.ts.map +1 -1
- package/dist/Menu.d.ts +39 -30
- package/dist/Menu.d.ts.map +1 -1
- package/dist/Menu.js +547 -368
- package/dist/Menu.js.map +1 -1
- package/dist/Menu.jsx +328 -230
- package/dist/Menu.jsx.map +1 -1
- package/dist/Meter.d.ts +6 -13
- package/dist/Meter.d.ts.map +1 -1
- package/dist/Meter.js +55 -18
- package/dist/Meter.js.map +1 -1
- package/dist/Meter.jsx +33 -8
- package/dist/Meter.jsx.map +1 -1
- package/dist/Modal.d.ts +1 -7
- package/dist/Modal.d.ts.map +1 -1
- package/dist/Modal.js +104 -56
- package/dist/Modal.js.map +1 -1
- package/dist/Modal.jsx +68 -38
- package/dist/Modal.jsx.map +1 -1
- package/dist/NumberField.d.ts +4 -7
- package/dist/NumberField.d.ts.map +1 -1
- package/dist/NumberField.js +243 -124
- package/dist/NumberField.js.map +1 -1
- package/dist/NumberField.jsx +115 -26
- package/dist/NumberField.jsx.map +1 -1
- package/dist/Popover.d.ts +15 -7
- package/dist/Popover.d.ts.map +1 -1
- package/dist/Popover.js +370 -181
- package/dist/Popover.js.map +1 -1
- package/dist/Popover.jsx +215 -82
- package/dist/Popover.jsx.map +1 -1
- package/dist/Pressable.d.ts +2 -8
- package/dist/Pressable.d.ts.map +1 -1
- package/dist/Pressable.js +23 -6
- package/dist/Pressable.js.map +1 -1
- package/dist/Pressable.jsx +22 -5
- package/dist/Pressable.jsx.map +1 -1
- package/dist/PreviewTrigger.d.ts +24 -0
- package/dist/PreviewTrigger.d.ts.map +1 -0
- package/dist/PreviewTrigger.js +128 -0
- package/dist/PreviewTrigger.js.map +1 -0
- package/dist/PreviewTrigger.jsx +117 -0
- package/dist/PreviewTrigger.jsx.map +1 -0
- package/dist/ProgressBar.d.ts +1 -7
- package/dist/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar.js +34 -14
- package/dist/ProgressBar.js.map +1 -1
- package/dist/ProgressBar.jsx +17 -3
- package/dist/ProgressBar.jsx.map +1 -1
- package/dist/RadioGroup.d.ts +2 -7
- package/dist/RadioGroup.d.ts.map +1 -1
- package/dist/RadioGroup.js +388 -269
- package/dist/RadioGroup.js.map +1 -1
- package/dist/RadioGroup.jsx +110 -99
- package/dist/RadioGroup.jsx.map +1 -1
- package/dist/RangeCalendar.d.ts +3 -7
- package/dist/RangeCalendar.d.ts.map +1 -1
- package/dist/RangeCalendar.js +271 -202
- package/dist/RangeCalendar.js.map +1 -1
- package/dist/RangeCalendar.jsx +56 -37
- package/dist/RangeCalendar.jsx.map +1 -1
- package/dist/RouterProvider.d.ts +3 -9
- package/dist/RouterProvider.d.ts.map +1 -1
- package/dist/RouterProvider.js +15 -14
- package/dist/RouterProvider.js.map +1 -1
- package/dist/RouterProvider.jsx +14 -13
- package/dist/RouterProvider.jsx.map +1 -1
- package/dist/SearchField.d.ts +4 -7
- package/dist/SearchField.d.ts.map +1 -1
- package/dist/SearchField.js +191 -164
- package/dist/SearchField.js.map +1 -1
- package/dist/SearchField.jsx +69 -62
- package/dist/SearchField.jsx.map +1 -1
- package/dist/Select.d.ts +5 -10
- package/dist/Select.d.ts.map +1 -1
- package/dist/Select.js +565 -359
- package/dist/Select.js.map +1 -1
- package/dist/Select.jsx +281 -161
- package/dist/Select.jsx.map +1 -1
- package/dist/SelectionIndicator.d.ts +1 -4
- package/dist/SelectionIndicator.d.ts.map +1 -1
- package/dist/SelectionIndicator.js +29 -13
- package/dist/SelectionIndicator.js.map +1 -1
- package/dist/SelectionIndicator.jsx +18 -4
- package/dist/SelectionIndicator.jsx.map +1 -1
- package/dist/Separator.d.ts +1 -7
- package/dist/Separator.d.ts.map +1 -1
- package/dist/Separator.js +22 -6
- package/dist/Separator.js.map +1 -1
- package/dist/Separator.jsx +16 -3
- package/dist/Separator.jsx.map +1 -1
- package/dist/SharedElementTransition.d.ts +1 -10
- package/dist/SharedElementTransition.d.ts.map +1 -1
- package/dist/SharedElementTransition.js +68 -40
- package/dist/SharedElementTransition.js.map +1 -1
- package/dist/SharedElementTransition.jsx +49 -25
- package/dist/SharedElementTransition.jsx.map +1 -1
- package/dist/Slider.d.ts +2 -8
- package/dist/Slider.d.ts.map +1 -1
- package/dist/Slider.js +155 -97
- package/dist/Slider.js.map +1 -1
- package/dist/Slider.jsx +25 -12
- package/dist/Slider.jsx.map +1 -1
- package/dist/StepList.d.ts +1 -7
- package/dist/StepList.d.ts.map +1 -1
- package/dist/StepList.js +112 -68
- package/dist/StepList.js.map +1 -1
- package/dist/StepList.jsx +58 -20
- package/dist/StepList.jsx.map +1 -1
- package/dist/Switch.d.ts +2 -9
- package/dist/Switch.d.ts.map +1 -1
- package/dist/Switch.js +164 -114
- package/dist/Switch.js.map +1 -1
- package/dist/Switch.jsx +26 -13
- package/dist/Switch.jsx.map +1 -1
- package/dist/Table.d.ts +2 -1
- package/dist/Table.d.ts.map +1 -1
- package/dist/Table.js +689 -592
- package/dist/Table.js.map +1 -1
- package/dist/Table.jsx +317 -237
- package/dist/Table.jsx.map +1 -1
- package/dist/Tabs.d.ts +2 -7
- package/dist/Tabs.d.ts.map +1 -1
- package/dist/Tabs.js +278 -293
- package/dist/Tabs.js.map +1 -1
- package/dist/Tabs.jsx +68 -66
- package/dist/Tabs.jsx.map +1 -1
- package/dist/TagGroup.d.ts +4 -11
- package/dist/TagGroup.d.ts.map +1 -1
- package/dist/TagGroup.js +153 -115
- package/dist/TagGroup.js.map +1 -1
- package/dist/TagGroup.jsx +37 -24
- package/dist/TagGroup.jsx.map +1 -1
- package/dist/Text.d.ts +3 -3
- package/dist/Text.d.ts.map +1 -1
- package/dist/Text.js +24 -7
- package/dist/Text.js.map +1 -1
- package/dist/Text.jsx +17 -5
- package/dist/Text.jsx.map +1 -1
- package/dist/TextField.d.ts +3 -16
- package/dist/TextField.d.ts.map +1 -1
- package/dist/TextField.js +104 -129
- package/dist/TextField.js.map +1 -1
- package/dist/TextField.jsx +76 -102
- package/dist/TextField.jsx.map +1 -1
- package/dist/TimeField.d.ts +2 -15
- package/dist/TimeField.d.ts.map +1 -1
- package/dist/TimeField.js +86 -102
- package/dist/TimeField.js.map +1 -1
- package/dist/TimeField.jsx +32 -49
- package/dist/TimeField.jsx.map +1 -1
- package/dist/Toast.d.ts +10 -13
- package/dist/Toast.d.ts.map +1 -1
- package/dist/Toast.js +209 -108
- package/dist/Toast.js.map +1 -1
- package/dist/Toast.jsx +127 -22
- package/dist/Toast.jsx.map +1 -1
- package/dist/ToggleButton.d.ts +1 -7
- package/dist/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton.js +57 -35
- package/dist/ToggleButton.js.map +1 -1
- package/dist/ToggleButton.jsx +26 -12
- package/dist/ToggleButton.jsx.map +1 -1
- package/dist/ToggleButtonGroup.d.ts +1 -7
- package/dist/ToggleButtonGroup.d.ts.map +1 -1
- package/dist/ToggleButtonGroup.js +59 -44
- package/dist/ToggleButtonGroup.js.map +1 -1
- package/dist/ToggleButtonGroup.jsx +25 -12
- package/dist/ToggleButtonGroup.jsx.map +1 -1
- package/dist/TokenField.d.ts +52 -0
- package/dist/TokenField.d.ts.map +1 -0
- package/dist/TokenField.js +301 -0
- package/dist/TokenField.js.map +1 -0
- package/dist/TokenField.jsx +197 -0
- package/dist/TokenField.jsx.map +1 -0
- package/dist/Toolbar.d.ts +2 -7
- package/dist/Toolbar.d.ts.map +1 -1
- package/dist/Toolbar.js +35 -16
- package/dist/Toolbar.js.map +1 -1
- package/dist/Toolbar.jsx +15 -2
- package/dist/Toolbar.jsx.map +1 -1
- package/dist/Tooltip.d.ts +2 -7
- package/dist/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip.js +105 -68
- package/dist/Tooltip.js.map +1 -1
- package/dist/Tooltip.jsx +60 -36
- package/dist/Tooltip.jsx.map +1 -1
- package/dist/Tree.d.ts +8 -11
- package/dist/Tree.d.ts.map +1 -1
- package/dist/Tree.js +486 -339
- package/dist/Tree.js.map +1 -1
- package/dist/Tree.jsx +155 -107
- package/dist/Tree.jsx.map +1 -1
- package/dist/Virtualizer.d.ts +39 -9
- package/dist/Virtualizer.d.ts.map +1 -1
- package/dist/Virtualizer.js +2 -2
- package/dist/Virtualizer.jsx +2 -2
- package/dist/Virtualizer2.js +491 -136
- package/dist/Virtualizer2.js.map +1 -1
- package/dist/Virtualizer2.jsx +455 -122
- package/dist/Virtualizer2.jsx.map +1 -1
- package/dist/VirtualizerLayouts.d.ts +55 -2
- package/dist/VirtualizerLayouts.d.ts.map +1 -1
- package/dist/VisuallyHidden.d.ts +4 -3
- package/dist/VisuallyHidden.d.ts.map +1 -1
- package/dist/VisuallyHidden.js +18 -11
- package/dist/VisuallyHidden.js.map +1 -1
- package/dist/VisuallyHidden.jsx +15 -9
- package/dist/VisuallyHidden.jsx.map +1 -1
- package/dist/contexts.d.ts +25 -0
- package/dist/contexts.d.ts.map +1 -1
- package/dist/contexts.js +3 -0
- package/dist/contexts.js.map +1 -1
- package/dist/contexts.jsx +3 -0
- package/dist/contexts.jsx.map +1 -1
- package/dist/index.d.ts +11 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -11
- package/dist/index.jsx +14 -11
- package/dist/intl/index.d.ts +16 -0
- package/dist/intl/index.d.ts.map +1 -0
- package/dist/intl.js +212 -0
- package/dist/intl.js.map +1 -0
- package/dist/intl.jsx +212 -0
- package/dist/intl.jsx.map +1 -0
- package/dist/useDragAndDrop.d.ts +4 -2
- package/dist/useDragAndDrop.d.ts.map +1 -1
- package/dist/useDragAndDrop2.js +39 -21
- package/dist/useDragAndDrop2.js.map +1 -1
- package/dist/useDragAndDrop2.jsx +39 -21
- package/dist/useDragAndDrop2.jsx.map +1 -1
- package/dist/utils.d.ts +28 -9
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +96 -24
- package/dist/utils.js.map +1 -1
- package/dist/utils.jsx +81 -24
- package/dist/utils.jsx.map +1 -1
- package/dist/virtualizer/Layout.d.ts +9 -0
- package/dist/virtualizer/Layout.d.ts.map +1 -1
- package/dist/virtualizer/Layout.js +23 -2
- package/dist/virtualizer/Layout.js.map +1 -1
- package/dist/virtualizer/Layout.jsx +23 -2
- package/dist/virtualizer/Layout.jsx.map +1 -1
- package/package.json +29 -10
- package/src/ActionBar.tsx +50 -24
- package/src/ActionGroup.tsx +31 -19
- package/src/Alert.tsx +10 -4
- package/src/Autocomplete.tsx +24 -15
- package/src/Breadcrumbs.tsx +32 -16
- package/src/Button.tsx +182 -67
- package/src/Calendar.tsx +65 -47
- package/src/CalendarPicker.tsx +16 -1
- package/src/Checkbox.tsx +84 -116
- package/src/Collection.tsx +84 -3
- package/src/Color.tsx +282 -104
- package/src/ColorEditor.tsx +5 -1
- package/src/ComboBox.tsx +384 -109
- package/src/ContextualHelpTrigger.tsx +47 -41
- package/src/DateField.tsx +74 -106
- package/src/DatePicker.tsx +156 -352
- package/src/DateRangePickerContext.tsx +8 -0
- package/src/Dialog.tsx +105 -38
- package/src/Disclosure.tsx +29 -19
- package/src/DragAndDrop.tsx +43 -8
- package/src/DragPreview.tsx +20 -1
- package/src/DropZone.tsx +32 -18
- package/src/ElementTag.tsx +14 -104
- package/src/FieldError.tsx +39 -7
- package/src/FileTrigger.tsx +18 -3
- package/src/Focusable.tsx +27 -6
- package/src/Form.tsx +57 -11
- package/src/GridList.tsx +233 -141
- package/src/HiddenDateInput.tsx +19 -3
- package/src/Icon.tsx +8 -2
- package/src/Keyboard.tsx +18 -2
- package/src/Label.tsx +77 -0
- package/src/Landmark.tsx +6 -1
- package/src/Link.tsx +65 -19
- package/src/ListBox.tsx +645 -468
- package/src/ListDropTargetDelegate.ts +4 -0
- package/src/Menu.tsx +512 -349
- package/src/Meter.tsx +42 -8
- package/src/Modal.tsx +85 -42
- package/src/NumberField.tsx +161 -48
- package/src/Popover.tsx +424 -148
- package/src/Pressable.tsx +27 -6
- package/src/PreviewTrigger.tsx +171 -0
- package/src/ProgressBar.tsx +25 -3
- package/src/RadioGroup.tsx +230 -161
- package/src/RangeCalendar.tsx +75 -63
- package/src/RouterProvider.tsx +24 -14
- package/src/SearchField.tsx +118 -121
- package/src/Select.tsx +454 -274
- package/src/SelectionIndicator.tsx +21 -3
- package/src/Separator.tsx +17 -1
- package/src/SharedElementTransition.tsx +115 -97
- package/src/Slider.tsx +35 -17
- package/src/StepList.tsx +71 -32
- package/src/Switch.tsx +45 -29
- package/src/Table.tsx +446 -380
- package/src/Tabs.tsx +132 -155
- package/src/TagGroup.tsx +53 -40
- package/src/Text.tsx +23 -6
- package/src/TextField.tsx +118 -159
- package/src/TimeField.tsx +34 -95
- package/src/Toast.tsx +141 -67
- package/src/ToggleButton.tsx +33 -15
- package/src/ToggleButtonGroup.tsx +27 -9
- package/src/TokenField.tsx +379 -0
- package/src/Toolbar.tsx +19 -9
- package/src/Tooltip.tsx +126 -84
- package/src/Tree.tsx +233 -173
- package/src/Virtualizer.tsx +400 -138
- package/src/VirtualizerLayouts.ts +211 -26
- package/src/VisuallyHidden.tsx +22 -8
- package/src/contexts.ts +13 -0
- package/src/index.ts +32 -11
- package/src/intl/ar-AE.json +6 -0
- package/src/intl/bg-BG.json +6 -0
- package/src/intl/cs-CZ.json +6 -0
- package/src/intl/da-DK.json +6 -0
- package/src/intl/de-DE.json +6 -0
- package/src/intl/el-GR.json +6 -0
- package/src/intl/en-US.json +6 -0
- package/src/intl/es-ES.json +6 -0
- package/src/intl/et-EE.json +6 -0
- package/src/intl/fi-FI.json +6 -0
- package/src/intl/fr-FR.json +6 -0
- package/src/intl/he-IL.json +6 -0
- package/src/intl/hr-HR.json +6 -0
- package/src/intl/hu-HU.json +6 -0
- package/src/intl/index.ts +125 -0
- package/src/intl/it-IT.json +6 -0
- package/src/intl/ja-JP.json +6 -0
- package/src/intl/ko-KR.json +6 -0
- package/src/intl/lt-LT.json +6 -0
- package/src/intl/lv-LV.json +6 -0
- package/src/intl/nb-NO.json +6 -0
- package/src/intl/nl-NL.json +6 -0
- package/src/intl/pl-PL.json +6 -0
- package/src/intl/pt-BR.json +6 -0
- package/src/intl/pt-PT.json +6 -0
- package/src/intl/ro-RO.json +6 -0
- package/src/intl/ru-RU.json +6 -0
- package/src/intl/sk-SK.json +6 -0
- package/src/intl/sl-SI.json +6 -0
- package/src/intl/sr-SP.json +6 -0
- package/src/intl/sv-SE.json +6 -0
- package/src/intl/tr-TR.json +6 -0
- package/src/intl/uk-UA.json +6 -0
- package/src/intl/zh-CN.json +6 -0
- package/src/intl/zh-TW.json +6 -0
- package/src/useDragAndDrop.ts +30 -32
- package/src/utils.tsx +124 -68
- package/src/virtualizer/Layout.ts +29 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Virtualizer2.jsx","names":[],"sources":["../src/VirtualizerLayouts.ts","../src/Virtualizer.tsx"],"sourcesContent":["/**\n * Layout primitives for solidaria-components Virtualizer.\n *\n * These are lightweight parity contracts inspired by RAC virtualizer layout APIs.\n */\n\nexport interface Point {\n x: number;\n y: number;\n}\n\nexport interface Rect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport interface Size {\n width: number;\n height: number;\n}\n\n/**\n * The primary orientation of a linear layout — the axis items stack along, which\n * is usually the direction the collection scrolls. Mirrors React Spectrum's\n * `Orientation` and `ListLayout`'s `orientation` option.\n */\nexport type Orientation = \"horizontal\" | \"vertical\";\n\nexport interface LayoutInfo {\n key: string | number;\n index: number;\n rect: Rect;\n}\n\nexport interface VirtualizerVisibleRange {\n start: number;\n end: number;\n offsetTop: number;\n offsetBottom: number;\n}\n\nexport interface VirtualizerRangeContext {\n itemCount: number;\n scrollOffset: number;\n viewportSize: number;\n overscan: number;\n viewportWidth?: number;\n}\n\nexport interface DefaultVirtualizerLayoutOptions {\n itemSize?: number;\n overscan?: number;\n viewportSize?: number;\n /**\n * The primary orientation of the items. Items offset along `x`/`width` when\n * `horizontal`, and along `y`/`height` when `vertical`.\n *\n * @default 'vertical'\n */\n orientation?: Orientation;\n}\n\nexport interface GridLayoutOptions extends DefaultVirtualizerLayoutOptions {\n rowHeight?: number;\n columnCount?: number;\n viewportWidth?: number;\n}\n\nexport interface WaterfallLayoutOptions extends GridLayoutOptions {\n minColumnWidth?: number;\n viewportWidth?: number;\n gap?: number;\n}\n\nexport interface VirtualizerLayoutInfoContext {\n viewportWidth: number;\n /**\n * The viewport height, used as the cross-axis size for a `horizontal` layout\n * (the analogue of `viewportWidth` for the `vertical` default).\n */\n viewportHeight?: number;\n}\n\nexport interface VirtualizerDropTarget {\n type: \"item\" | \"root\";\n index: number;\n position: \"before\" | \"on\" | \"after\";\n key?: string | number;\n parentKey?: string | number | null;\n level?: number;\n}\n\nfunction clampRange(\n itemCount: number,\n start: number,\n end: number,\n itemSize: number,\n): VirtualizerVisibleRange {\n const safeStart = Math.max(0, Math.min(start, itemCount));\n const safeEnd = Math.max(safeStart, Math.min(end, itemCount));\n return {\n start: safeStart,\n end: safeEnd,\n offsetTop: safeStart * itemSize,\n offsetBottom: Math.max(0, (itemCount - safeEnd) * itemSize),\n };\n}\n\nexport function calculateLinearVisibleRange(\n itemCount: number,\n scrollOffset: number,\n viewportSize: number,\n itemSize: number,\n overscan: number,\n): VirtualizerVisibleRange {\n if (itemCount <= 0) return { start: 0, end: 0, offsetTop: 0, offsetBottom: 0 };\n const safeItemSize = Math.max(1, itemSize);\n const safeViewport = Math.max(1, viewportSize);\n const safeOverscan = Math.max(0, overscan);\n const start = Math.floor(scrollOffset / safeItemSize) - safeOverscan;\n const visibleCount = Math.ceil(safeViewport / safeItemSize) + safeOverscan * 2;\n return clampRange(itemCount, start, start + visibleCount, safeItemSize);\n}\n\nexport class ListLayout {\n getVisibleRange(\n ctx: VirtualizerRangeContext,\n options?: DefaultVirtualizerLayoutOptions,\n ): VirtualizerVisibleRange {\n return calculateLinearVisibleRange(\n ctx.itemCount,\n ctx.scrollOffset,\n ctx.viewportSize,\n options?.itemSize ?? 40,\n options?.overscan ?? ctx.overscan,\n );\n }\n\n getLayoutInfo(\n index: number,\n context: VirtualizerLayoutInfoContext,\n options?: DefaultVirtualizerLayoutOptions,\n ): LayoutInfo {\n const itemSize = Math.max(1, options?.itemSize ?? 40);\n if ((options?.orientation ?? \"vertical\") === \"horizontal\") {\n // Items stack along the x axis; the cross axis (height) fills the viewport.\n return {\n key: String(index),\n index,\n rect: {\n x: index * itemSize,\n y: 0,\n width: itemSize,\n height: Math.max(0, context.viewportHeight ?? 0),\n },\n };\n }\n // Items stack along the y axis; the cross axis (width) fills the viewport.\n return {\n key: String(index),\n index,\n rect: {\n x: 0,\n y: index * itemSize,\n width: Math.max(0, context.viewportWidth),\n height: itemSize,\n },\n };\n }\n\n getDropTargetFromPoint(\n point: Point,\n itemCount: number,\n options?: DefaultVirtualizerLayoutOptions,\n ): VirtualizerDropTarget | null {\n if (itemCount <= 0) return { type: \"root\", index: -1, position: \"on\" };\n const itemSize = Math.max(1, options?.itemSize ?? 40);\n // Measure the drop point along the primary (scroll) axis.\n const offset = (options?.orientation ?? \"vertical\") === \"horizontal\" ? point.x : point.y;\n if (offset < 0) {\n return { type: \"item\", index: 0, position: \"before\" };\n }\n const totalSize = itemCount * itemSize;\n if (offset >= totalSize) {\n return { type: \"item\", index: itemCount - 1, position: \"after\" };\n }\n const rawIndex = Math.floor(offset / itemSize);\n const index = Math.max(0, Math.min(rawIndex, itemCount - 1));\n const offsetWithinItem = Math.max(0, offset - index * itemSize);\n const threshold = itemSize / 3;\n const position: VirtualizerDropTarget[\"position\"] =\n offsetWithinItem < threshold ? \"before\" : offsetWithinItem > threshold * 2 ? \"after\" : \"on\";\n return { type: \"item\", index, position };\n }\n}\n\nexport class TableLayout extends ListLayout {}\n\nexport class GridLayout {\n getVisibleRange(\n ctx: VirtualizerRangeContext,\n options?: GridLayoutOptions,\n ): VirtualizerVisibleRange {\n if (ctx.itemCount <= 0) return { start: 0, end: 0, offsetTop: 0, offsetBottom: 0 };\n const rowHeight = Math.max(1, options?.rowHeight ?? options?.itemSize ?? 40);\n const columns = Math.max(1, options?.columnCount ?? 1);\n const safeViewport = Math.max(1, ctx.viewportSize);\n const safeOverscan = Math.max(0, options?.overscan ?? ctx.overscan);\n\n const startRow = Math.max(0, Math.floor(ctx.scrollOffset / rowHeight) - safeOverscan);\n const visibleRows = Math.ceil(safeViewport / rowHeight) + safeOverscan * 2;\n const endRow = startRow + visibleRows;\n\n const start = startRow * columns;\n const end = Math.min(ctx.itemCount, endRow * columns);\n\n const totalRows = Math.ceil(ctx.itemCount / columns);\n const clampedStartRow = Math.floor(start / columns);\n const renderedRows = Math.ceil((end - start) / columns);\n const offsetTop = clampedStartRow * rowHeight;\n const offsetBottom = Math.max(0, (totalRows - clampedStartRow - renderedRows) * rowHeight);\n\n return { start, end, offsetTop, offsetBottom };\n }\n\n getLayoutInfo(\n index: number,\n context: VirtualizerLayoutInfoContext,\n options?: GridLayoutOptions,\n ): LayoutInfo {\n const rowHeight = Math.max(1, options?.rowHeight ?? options?.itemSize ?? 40);\n const columns = Math.max(1, options?.columnCount ?? 1);\n const row = Math.floor(index / columns);\n const col = index % columns;\n const width = Math.max(1, context.viewportWidth);\n const cellWidth = Math.floor(width / columns);\n return {\n key: String(index),\n index,\n rect: {\n x: col * cellWidth,\n y: row * rowHeight,\n width: cellWidth,\n height: rowHeight,\n },\n };\n }\n\n getDropTargetFromPoint(\n point: Point,\n itemCount: number,\n options?: GridLayoutOptions,\n ): VirtualizerDropTarget | null {\n if (itemCount <= 0) return { type: \"root\", index: -1, position: \"on\" };\n const rowHeight = Math.max(1, options?.rowHeight ?? options?.itemSize ?? 40);\n const columns = Math.max(1, options?.columnCount ?? 1);\n const totalRows = Math.ceil(itemCount / columns);\n const totalHeight = totalRows * rowHeight;\n if (point.y < 0) {\n return { type: \"item\", index: 0, position: \"before\" };\n }\n if (point.y >= totalHeight) {\n return { type: \"item\", index: itemCount - 1, position: \"after\" };\n }\n const width = Math.max(1, options?.viewportWidth ?? 320);\n const cellWidth = width / columns;\n const row = Math.max(0, Math.floor(point.y / rowHeight));\n const col = Math.max(0, Math.min(columns - 1, Math.floor(Math.max(0, point.x) / cellWidth)));\n const index = Math.max(0, Math.min(itemCount - 1, row * columns + col));\n const withinRow = Math.max(0, point.y - row * rowHeight);\n const threshold = rowHeight / 3;\n const position: VirtualizerDropTarget[\"position\"] =\n withinRow < threshold ? \"before\" : withinRow > threshold * 2 ? \"after\" : \"on\";\n return { type: \"item\", index, position };\n }\n}\n\nexport class WaterfallLayout extends GridLayout {\n override getVisibleRange(\n ctx: VirtualizerRangeContext,\n options?: WaterfallLayoutOptions,\n ): VirtualizerVisibleRange {\n const width = Math.max(1, options?.viewportWidth ?? 320);\n const minColumnWidth = Math.max(1, options?.minColumnWidth ?? 200);\n const gap = Math.max(0, options?.gap ?? 0);\n const columnCount = Math.max(1, Math.floor((width + gap) / (minColumnWidth + gap)));\n return super.getVisibleRange(ctx, { ...options, columnCount });\n }\n\n override getLayoutInfo(\n index: number,\n context: VirtualizerLayoutInfoContext,\n options?: WaterfallLayoutOptions,\n ): LayoutInfo {\n const width = Math.max(1, options?.viewportWidth ?? context.viewportWidth);\n const minColumnWidth = Math.max(1, options?.minColumnWidth ?? 200);\n const gap = Math.max(0, options?.gap ?? 0);\n const columnCount = Math.max(1, Math.floor((width + gap) / (minColumnWidth + gap)));\n return super.getLayoutInfo(index, context, { ...options, columnCount });\n }\n\n override getDropTargetFromPoint(\n point: Point,\n itemCount: number,\n options?: WaterfallLayoutOptions,\n ): VirtualizerDropTarget | null {\n const width = Math.max(1, options?.viewportWidth ?? 320);\n const minColumnWidth = Math.max(1, options?.minColumnWidth ?? 200);\n const gap = Math.max(0, options?.gap ?? 0);\n const columnCount = Math.max(1, Math.floor((width + gap) / (minColumnWidth + gap)));\n return super.getDropTargetFromPoint(point, itemCount, { ...options, columnCount });\n }\n}\n","/**\n * Virtualizer primitive for solidaria-components.\n *\n * Phase 1 parity: provides RAC-like API and context contract with\n * a safe non-virtualized fallback render path.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n onCleanup,\n onMount,\n splitProps,\n useContext,\n} from \"solid-js\";\nimport type {\n DragTypes,\n DropOperation,\n DropTarget,\n ItemDropTarget,\n} from \"@proyecto-viviana/solid-stately\";\nimport { CollectionRendererContext, type CollectionRendererContextValue } from \"./Collection\";\nimport { filterDOMProps } from \"./utils\";\nimport {\n GridLayout,\n ListLayout,\n TableLayout,\n WaterfallLayout,\n calculateLinearVisibleRange,\n type DefaultVirtualizerLayoutOptions,\n type GridLayoutOptions,\n type LayoutInfo,\n type Orientation,\n type Point,\n type Rect,\n type Size,\n type VirtualizerRangeContext,\n type VirtualizerLayoutInfoContext,\n type VirtualizerDropTarget,\n type VirtualizerVisibleRange,\n type WaterfallLayoutOptions,\n} from \"./VirtualizerLayouts\";\n\nexport interface LayoutOptionsDelegate<O> {\n useLayoutOptions?(): O;\n}\n\nexport interface VirtualizerLayout<O = unknown> extends LayoutOptionsDelegate<O> {\n getVisibleRange?(context: VirtualizerRangeContext, options?: O): VirtualizerVisibleRange;\n getLayoutInfo?(index: number, context: VirtualizerLayoutInfoContext, options?: O): LayoutInfo;\n getDropTargetFromPoint?(\n point: Point,\n itemCount: number,\n options?: O,\n ): VirtualizerDropTarget | null;\n}\n\nexport interface VirtualizerLayoutClass<O> {\n new (): VirtualizerLayout<O>;\n}\n\nexport type VirtualizerKeyboardNavigationOverride = (\n target: DropTarget | null,\n direction: \"next\" | \"previous\",\n isValidDropTarget: (target: DropTarget) => boolean,\n) => DropTarget | null;\n\nexport interface VirtualizerContextValue<O = unknown> {\n layout: VirtualizerLayout<O>;\n layoutOptions?: O;\n isVirtualized: boolean;\n /**\n * The resolved primary orientation of the layout. Consumers render their\n * windowing spacers along this axis (`width` when `horizontal`, `height`\n * when `vertical`) so the spacer size matches the offsets `getVisibleRange`\n * produced.\n */\n orientation: Orientation;\n getVisibleRange: (itemCount: number) => VirtualizerVisibleRange;\n getLayoutInfo: (index: number) => LayoutInfo;\n getDropTargetFromPoint: (point: Point, itemCount: number) => VirtualizerDropTarget | null;\n setDropTargetResolver: (resolver: VirtualizerDropTargetResolver | undefined) => void;\n setDropTargetItemCountResolver: (resolver: (() => number) | undefined) => void;\n setDropTargetIndexResolver: (\n resolver: ((key: string | number) => number | null) | undefined,\n ) => void;\n setDropOperationResolver: (resolver: VirtualizerDropOperationResolver | undefined) => void;\n setKeyboardNavigationOverride: (\n override: VirtualizerKeyboardNavigationOverride | undefined,\n ) => void;\n getBaseKeyboardNavigationTarget: VirtualizerKeyboardNavigationOverride;\n}\n\nexport type VirtualizerDropTargetResolver = (\n target: VirtualizerDropTarget,\n) => VirtualizerDropTarget;\nexport type VirtualizerDropOperationResolver = (\n target: DropTarget,\n types: DragTypes,\n allowedOperations: DropOperation[],\n) => DropOperation;\n\nexport const VirtualizerContext = createContext<VirtualizerContextValue<unknown> | null>(null);\n\nexport function useVirtualizerContext<O>(): VirtualizerContextValue<O> | null {\n return useContext(VirtualizerContext) as VirtualizerContextValue<O> | null;\n}\n\nexport interface VirtualizerProps<O> extends Omit<\n JSX.HTMLAttributes<HTMLDivElement>,\n \"children\" | \"class\" | \"style\"\n> {\n /** The child collection to virtualize (e.g. ListBox, GridList, or Table). */\n children: JSX.Element;\n /** Layout object or constructor for layout behavior and options delegation. */\n layout: VirtualizerLayoutClass<O> | VirtualizerLayout<O>;\n /** Layout options consumed by the layout implementation. */\n layoutOptions?: O;\n /** Optional renderer for collection drop indicators in virtualized flows. */\n renderDropIndicator?: (\n index: number,\n position: \"before\" | \"after\" | \"on\",\n ) => JSX.Element | undefined;\n /** Optional operation resolver for collection drop target operations. */\n getDropOperation?: VirtualizerDropOperationResolver;\n /**\n * Whether the collection may scroll with the page rather than only within its\n * own scroll container. When enabled (the default, matching react-aria-components),\n * the visible rect is the intersection of the window viewport with the scroll view,\n * so a virtualizer with unbounded height still virtualizes as the page scrolls.\n */\n allowsWindowScrolling?: boolean;\n class?: string;\n style?: string | JSX.CSSProperties;\n}\n\nfunction getObjectValue<T extends object, K extends keyof T>(\n value: T | undefined,\n key: K,\n): T[K] | undefined {\n return value?.[key];\n}\n\nfunction isSameRange(a: VirtualizerVisibleRange, b: VirtualizerVisibleRange): boolean {\n return (\n a.start === b.start &&\n a.end === b.end &&\n a.offsetTop === b.offsetTop &&\n a.offsetBottom === b.offsetBottom\n );\n}\n\nfunction isSameLayoutInfo(a: LayoutInfo, b: LayoutInfo): boolean {\n return (\n a.key === b.key &&\n a.index === b.index &&\n a.rect.x === b.rect.x &&\n a.rect.y === b.rect.y &&\n a.rect.width === b.rect.width &&\n a.rect.height === b.rect.height\n );\n}\n\n/**\n * A Virtualizer renders collection content under a virtualized layout contract.\n * Current implementation supports fixed-size visible range virtualization.\n */\nexport function Virtualizer<O>(props: VirtualizerProps<O>): JSX.Element {\n const [local, domProps] = splitProps(props, [\n \"children\",\n \"layout\",\n \"layoutOptions\",\n \"renderDropIndicator\",\n \"getDropOperation\",\n \"allowsWindowScrolling\",\n \"class\",\n \"style\",\n ]);\n // The scroll view's own scroll position (its scrollTop).\n const [scrollOffset, setScrollOffset] = createSignal(0);\n // The scroll view's horizontal scroll position (its scrollLeft), used as the\n // primary scroll axis when the layout's orientation is horizontal.\n const [scrollOffsetX, setScrollOffsetX] = createSignal(0);\n // How far the scroll view's top edge is above the window viewport, due to the\n // page (or an ancestor) being scrolled. Mirrors upstream ScrollView.viewportOffset.\n const [viewportOffset, setViewportOffset] = createSignal(0);\n // The window viewport height, used as the visible height cap when window scrolling.\n const [windowViewportSize, setWindowViewportSize] = createSignal(0);\n // The scroll view's own measured size (clientHeight/clientWidth).\n const [measuredViewportSize, setMeasuredViewportSize] = createSignal(0);\n const [measuredViewportWidth, setMeasuredViewportWidth] = createSignal(0);\n const allowsWindowScrolling = createMemo(() => local.allowsWindowScrolling ?? true);\n // Whether the scroll view is actively scrolling. Mirrors upstream ScrollView's\n // `isScrolling`: while scrolling, the content gets `pointer-events: none` so pointer\n // events don't hit rows recycling under a stationary cursor (avoiding hover-state\n // flicker and needless hit-testing). It flips back 300ms after the last scroll.\n const [isScrolling, setIsScrolling] = createSignal(false);\n const [dropTargetResolver, setDropTargetResolver] = createSignal<\n VirtualizerDropTargetResolver | undefined\n >(undefined);\n const [dropTargetItemCountResolver, setDropTargetItemCountResolver] = createSignal<\n (() => number) | undefined\n >(undefined);\n const [dropTargetIndexResolver, setDropTargetIndexResolver] = createSignal<\n ((key: string | number) => number | null) | undefined\n >(undefined);\n const [dropOperationResolver, setDropOperationResolver] = createSignal<\n VirtualizerDropOperationResolver | undefined\n >(undefined);\n const [keyboardNavigationOverride, setKeyboardNavigationOverride] = createSignal<\n VirtualizerKeyboardNavigationOverride | undefined\n >(undefined);\n let containerRef: HTMLDivElement | undefined;\n const fallbackLayout = new ListLayout();\n const visibleRangeCache = new Map<number, VirtualizerVisibleRange>();\n const layoutInfoCache = new Map<number, LayoutInfo>();\n\n const layout = createMemo<VirtualizerLayout<O>>(() => {\n if (typeof local.layout === \"function\") {\n return new local.layout();\n }\n return local.layout;\n });\n const resolvedLayout = createMemo<VirtualizerLayout<O>>(() => {\n return layout() ?? (new ListLayout() as VirtualizerLayout<O>);\n });\n\n const resolvedLayoutOptions = createMemo<O | undefined>(() => {\n const fromLayout = resolvedLayout().useLayoutOptions?.();\n if (local.layoutOptions && fromLayout) {\n return { ...local.layoutOptions, ...fromLayout };\n }\n return local.layoutOptions ?? fromLayout;\n });\n\n const virtualOptions = createMemo(\n () => resolvedLayoutOptions() as DefaultVirtualizerLayoutOptions | undefined,\n );\n const layoutOptionsWithViewport = createMemo(() => {\n const options = resolvedLayoutOptions();\n if (options && typeof options === \"object\") {\n return {\n ...(options as Record<string, unknown>),\n viewportWidth: measuredViewportWidth(),\n } as O;\n }\n return { viewportWidth: measuredViewportWidth() } as O;\n });\n const itemSize = createMemo(() => getObjectValue(virtualOptions(), \"itemSize\") ?? 40);\n const overscan = createMemo(() => getObjectValue(virtualOptions(), \"overscan\") ?? 2);\n const orientation = createMemo<Orientation>(\n () => getObjectValue(virtualOptions(), \"orientation\") ?? \"vertical\",\n );\n // The effective visible height. When window scrolling, this is the scroll view's\n // size intersected with the window viewport (capped to what is actually on screen),\n // mirroring upstream ScrollView.updateVisibleRect. Otherwise it is the scroll view's\n // own clientHeight. An explicit `viewportSize` layout option still takes precedence.\n const viewportSize = createMemo(() => {\n const explicit = getObjectValue(virtualOptions(), \"viewportSize\");\n if (explicit != null) return explicit;\n const elementSize = measuredViewportSize() ?? 0;\n if (allowsWindowScrolling()) {\n return Math.max(0, Math.min(elementSize - viewportOffset(), windowViewportSize()));\n }\n return elementSize;\n });\n // The top of the visible rect in content coordinates: the scroll view's own scroll\n // position plus how far it has been pushed above the window viewport by page scroll.\n const effectiveScrollOffset = createMemo(() =>\n allowsWindowScrolling() ? scrollOffset() + viewportOffset() : scrollOffset(),\n );\n // The primary-axis scroll offset and viewport size, selected by orientation.\n // A horizontal layout scrolls along x (scrollLeft / client width); the vertical\n // default scrolls along y (with the window-scrolling adjustments above).\n const mainScrollOffset = createMemo(() =>\n orientation() === \"horizontal\" ? scrollOffsetX() : effectiveScrollOffset(),\n );\n const mainViewportSize = createMemo(() => {\n if (orientation() !== \"horizontal\") return viewportSize();\n const explicit = getObjectValue(virtualOptions(), \"viewportSize\");\n return explicit != null ? explicit : measuredViewportWidth();\n });\n\n const getVisibleRange = (itemCount: number): VirtualizerVisibleRange => {\n const ctx: VirtualizerRangeContext = {\n itemCount,\n scrollOffset: mainScrollOffset(),\n viewportSize: mainViewportSize(),\n overscan: overscan(),\n viewportWidth: measuredViewportWidth(),\n };\n const layoutResult = resolvedLayout().getVisibleRange?.(ctx, layoutOptionsWithViewport());\n const nextRange =\n layoutResult ??\n calculateLinearVisibleRange(\n itemCount,\n ctx.scrollOffset,\n ctx.viewportSize,\n itemSize(),\n ctx.overscan,\n );\n const cachedRange = visibleRangeCache.get(itemCount);\n if (cachedRange && isSameRange(cachedRange, nextRange)) {\n return cachedRange;\n }\n visibleRangeCache.set(itemCount, nextRange);\n return nextRange;\n };\n const getLayoutInfo = (index: number): LayoutInfo => {\n const ctx: VirtualizerLayoutInfoContext = {\n viewportWidth: measuredViewportWidth(),\n viewportHeight: measuredViewportSize(),\n };\n const layoutResult = resolvedLayout().getLayoutInfo?.(index, ctx, layoutOptionsWithViewport());\n const nextInfo =\n layoutResult ??\n (orientation() === \"horizontal\"\n ? {\n key: String(index),\n index,\n rect: {\n x: index * itemSize(),\n y: 0,\n width: itemSize(),\n height: Math.max(0, measuredViewportSize()),\n },\n }\n : {\n key: String(index),\n index,\n rect: {\n x: 0,\n y: index * itemSize(),\n width: Math.max(0, measuredViewportWidth()),\n height: itemSize(),\n },\n });\n const cachedInfo = layoutInfoCache.get(index);\n if (cachedInfo && isSameLayoutInfo(cachedInfo, nextInfo)) {\n return cachedInfo;\n }\n layoutInfoCache.set(index, nextInfo);\n return nextInfo;\n };\n const getDropTargetFromPoint = (\n point: Point,\n itemCount: number,\n ): VirtualizerDropTarget | null => {\n const target =\n resolvedLayout().getDropTargetFromPoint?.(point, itemCount, layoutOptionsWithViewport()) ??\n fallbackLayout.getDropTargetFromPoint(point, itemCount, virtualOptions());\n if (!target) return null;\n const resolver = dropTargetResolver();\n return resolver ? resolver(target) : target;\n };\n const assignDropTargetResolver = (resolver: VirtualizerDropTargetResolver | undefined): void => {\n setDropTargetResolver(() => resolver);\n };\n const assignDropTargetItemCountResolver = (resolver: (() => number) | undefined): void => {\n setDropTargetItemCountResolver(() => resolver);\n };\n const assignDropTargetIndexResolver = (\n resolver: ((key: string | number) => number | null) | undefined,\n ): void => {\n setDropTargetIndexResolver(() => resolver);\n };\n const assignDropOperationResolver = (\n resolver: VirtualizerDropOperationResolver | undefined,\n ): void => {\n setDropOperationResolver(() => resolver);\n };\n const assignKeyboardNavigationOverride = (\n override: VirtualizerKeyboardNavigationOverride | undefined,\n ): void => {\n setKeyboardNavigationOverride(() => override);\n };\n const toCollectionDropTarget = (target: VirtualizerDropTarget): DropTarget => {\n if (target.type === \"root\") return { type: \"root\" };\n const key = target.key ?? target.index;\n return {\n type: \"item\",\n key,\n dropPosition: target.position,\n } as ItemDropTarget;\n };\n const getCollectionDropTargetFromPoint = (\n x: number,\n y: number,\n isValidDropTarget: (target: DropTarget) => boolean,\n ): DropTarget | null => {\n const itemCount = dropTargetItemCountResolver()?.() ?? 0;\n const virtualTarget = getDropTargetFromPoint({ x, y }, itemCount);\n if (!virtualTarget) return null;\n const mappedTarget = toCollectionDropTarget(virtualTarget);\n if (isValidDropTarget(mappedTarget)) return mappedTarget;\n if (mappedTarget.type === \"item\") {\n const alternatePositions: Array<\"before\" | \"after\" | \"on\"> =\n mappedTarget.dropPosition === \"on\"\n ? [\"before\", \"after\"]\n : mappedTarget.dropPosition === \"before\"\n ? [\"on\", \"after\"]\n : [\"on\", \"before\"];\n for (const position of alternatePositions) {\n const alternateTarget: DropTarget = {\n ...mappedTarget,\n dropPosition: position,\n };\n if (isValidDropTarget(alternateTarget)) return alternateTarget;\n }\n const rootTarget: DropTarget = { type: \"root\" };\n if (isValidDropTarget(rootTarget)) return rootTarget;\n }\n return null;\n };\n const getCollectionDropOperation = (\n target: DropTarget,\n types: DragTypes,\n allowedOperations: DropOperation[],\n ): DropOperation => {\n const resolver = dropOperationResolver() ?? local.getDropOperation;\n if (resolver) return resolver(target, types, allowedOperations);\n if (allowedOperations.length === 0) return \"cancel\";\n if (target.type === \"root\") {\n if (allowedOperations.includes(\"copy\")) return \"copy\";\n if (allowedOperations.includes(\"move\")) return \"move\";\n } else if (target.dropPosition === \"on\") {\n if (allowedOperations.includes(\"copy\")) return \"copy\";\n if (allowedOperations.includes(\"move\")) return \"move\";\n } else {\n if (allowedOperations.includes(\"move\")) return \"move\";\n if (allowedOperations.includes(\"copy\")) return \"copy\";\n }\n if (allowedOperations.includes(\"link\")) return \"link\";\n return allowedOperations.find((operation) => operation !== \"cancel\") ?? \"cancel\";\n };\n const getBaseKeyboardNavigationTarget = (\n target: DropTarget | null,\n direction: \"next\" | \"previous\",\n isValidDropTarget: (target: DropTarget) => boolean,\n ): DropTarget | null => {\n const itemCount = dropTargetItemCountResolver()?.() ?? 0;\n if (itemCount <= 0) {\n const rootTarget: DropTarget = { type: \"root\" };\n return isValidDropTarget(rootTarget) ? rootTarget : null;\n }\n\n const resolveCurrentIndex = (currentTarget: DropTarget | null): number | null => {\n if (!currentTarget || currentTarget.type === \"root\") return null;\n const resolver = dropTargetIndexResolver();\n if (resolver) {\n const fromResolver = resolver(currentTarget.key);\n if (fromResolver != null && fromResolver >= 0 && fromResolver < itemCount)\n return fromResolver;\n return null;\n }\n if (\n typeof currentTarget.key === \"number\" &&\n currentTarget.key >= 0 &&\n currentTarget.key < itemCount\n ) {\n return currentTarget.key;\n }\n return null;\n };\n const getCurrentIndex = (currentTarget: DropTarget | null): number => {\n if (!currentTarget || currentTarget.type === \"root\") {\n return direction === \"next\" ? -1 : itemCount;\n }\n const resolvedIndex = resolveCurrentIndex(currentTarget);\n if (resolvedIndex != null) return resolvedIndex;\n return direction === \"next\" ? -1 : itemCount;\n };\n const tryCurrentItemTransition = (currentTarget: DropTarget | null): DropTarget | null => {\n if (!currentTarget || currentTarget.type !== \"item\") return null;\n const tryPosition = (position: \"before\" | \"on\" | \"after\"): DropTarget | null => {\n if (currentTarget.dropPosition === position) return null;\n const nextTarget: DropTarget = {\n type: \"item\",\n key: currentTarget.key,\n dropPosition: position,\n };\n return isValidDropTarget(nextTarget) ? nextTarget : null;\n };\n\n if (direction === \"next\") {\n if (currentTarget.dropPosition === \"before\") {\n return tryPosition(\"on\") ?? tryPosition(\"after\");\n }\n if (currentTarget.dropPosition === \"on\") {\n return tryPosition(\"after\");\n }\n } else {\n if (currentTarget.dropPosition === \"after\") {\n return tryPosition(\"on\") ?? tryPosition(\"before\");\n }\n if (currentTarget.dropPosition === \"on\") {\n return tryPosition(\"before\");\n }\n }\n\n return null;\n };\n const scanFromIndex = (\n startIndex: number,\n step: number,\n directionForInsertion: \"next\" | \"previous\",\n ): DropTarget | null => {\n for (let index = startIndex; index >= 0 && index < itemCount; index += step) {\n const onTarget = tryTarget(index, \"on\");\n if (onTarget) return onTarget;\n\n const insertionOrder: Array<\"before\" | \"after\"> =\n directionForInsertion === \"next\" ? [\"before\", \"after\"] : [\"after\", \"before\"];\n for (const position of insertionOrder) {\n const insertionTarget = tryTarget(index, position);\n if (insertionTarget) return insertionTarget;\n }\n }\n return null;\n };\n const findNavigationTarget = (currentIndex: number, step = 1): DropTarget | null => {\n const delta = direction === \"next\" ? 1 : -1;\n const stepSize = Math.max(1, step);\n const nextStart = currentIndex + delta * stepSize;\n const clampedStart = Math.max(0, Math.min(itemCount - 1, nextStart));\n if (nextStart < 0 || nextStart >= itemCount) {\n const rootTarget: DropTarget = { type: \"root\" };\n return isValidDropTarget(rootTarget) ? rootTarget : null;\n }\n const primaryTarget = scanFromIndex(clampedStart, delta, direction);\n if (primaryTarget) return primaryTarget;\n const oppositeDirection: \"next\" | \"previous\" = direction === \"next\" ? \"previous\" : \"next\";\n const oppositeTarget = scanFromIndex(clampedStart - delta, -delta, oppositeDirection);\n if (oppositeTarget) return oppositeTarget;\n\n const rootTarget: DropTarget = { type: \"root\" };\n return isValidDropTarget(rootTarget) ? rootTarget : null;\n };\n const tryTarget = (index: number, position: \"on\" | \"before\" | \"after\"): DropTarget | null => {\n const layoutInfo = getLayoutInfo(index);\n const virtualTarget = getDropTargetFromPoint(\n {\n x: layoutInfo.rect.x + 1,\n y: layoutInfo.rect.y + layoutInfo.rect.height / 2,\n },\n itemCount,\n );\n if (!virtualTarget || virtualTarget.type === \"root\") return null;\n const nextTarget = toCollectionDropTarget({ ...virtualTarget, position });\n return isValidDropTarget(nextTarget) ? nextTarget : null;\n };\n const tryBoundaryTarget = (boundaryDirection: \"next\" | \"previous\"): DropTarget | null => {\n const boundaryIndex = boundaryDirection === \"next\" ? 0 : itemCount - 1;\n const boundaryOrder: Array<\"before\" | \"on\" | \"after\"> =\n boundaryDirection === \"next\" ? [\"before\", \"on\", \"after\"] : [\"after\", \"on\", \"before\"];\n for (const position of boundaryOrder) {\n const candidate = tryTarget(boundaryIndex, position);\n if (candidate) return candidate;\n }\n return null;\n };\n const directTransition =\n resolveCurrentIndex(target) != null ? tryCurrentItemTransition(target) : null;\n if (directTransition) return directTransition;\n if (!target || target.type === \"root\") {\n const boundaryTarget = tryBoundaryTarget(direction);\n if (boundaryTarget) return boundaryTarget;\n const rootTarget: DropTarget = { type: \"root\" };\n return isValidDropTarget(rootTarget) ? rootTarget : null;\n }\n const currentIndex = getCurrentIndex(target);\n const nextStart = currentIndex + (direction === \"next\" ? 1 : -1);\n if (nextStart < 0 || nextStart >= itemCount) {\n const rootTarget: DropTarget = { type: \"root\" };\n if (isValidDropTarget(rootTarget)) return rootTarget;\n const wrappedBoundary = tryBoundaryTarget(direction);\n if (wrappedBoundary) return wrappedBoundary;\n return null;\n }\n return findNavigationTarget(currentIndex, 1);\n };\n const getKeyboardNavigationTarget = (\n target: DropTarget | null,\n direction: \"next\" | \"previous\",\n isValidDropTarget: (target: DropTarget) => boolean,\n ): DropTarget | null => {\n // If a collection component (e.g. Tree) has installed a keyboard navigation override,\n // delegate to it. This enables collection-aware navigation (tree branch traversal, etc.).\n const override = keyboardNavigationOverride();\n if (override) {\n return override(target, direction, isValidDropTarget);\n }\n return getBaseKeyboardNavigationTarget(target, direction, isValidDropTarget);\n };\n const getKeyboardPageNavigationTarget = (\n target: DropTarget | null,\n direction: \"next\" | \"previous\",\n isValidDropTarget: (target: DropTarget) => boolean,\n ): DropTarget | null => {\n const itemCount = dropTargetItemCountResolver()?.() ?? 0;\n if (itemCount <= 0) {\n const rootTarget: DropTarget = { type: \"root\" };\n return isValidDropTarget(rootTarget) ? rootTarget : null;\n }\n if (!target || target.type === \"root\") {\n const startIndex = direction === \"next\" ? 0 : itemCount - 1;\n const delta = direction === \"next\" ? 1 : -1;\n const boundaryOrder: Array<\"before\" | \"on\" | \"after\"> =\n direction === \"next\" ? [\"before\", \"on\", \"after\"] : [\"after\", \"on\", \"before\"];\n for (let index = startIndex; index >= 0 && index < itemCount; index += delta) {\n const layoutInfo = getLayoutInfo(index);\n const virtualTarget = getDropTargetFromPoint(\n {\n x: layoutInfo.rect.x + 1,\n y: layoutInfo.rect.y + layoutInfo.rect.height / 2,\n },\n itemCount,\n );\n if (!virtualTarget || virtualTarget.type === \"root\") continue;\n for (const position of boundaryOrder) {\n const candidate = toCollectionDropTarget({ ...virtualTarget, position });\n if (isValidDropTarget(candidate)) return candidate;\n }\n }\n const rootTarget: DropTarget = { type: \"root\" };\n return isValidDropTarget(rootTarget) ? rootTarget : null;\n }\n const resolver = dropTargetIndexResolver();\n const resolvedIndex = resolver?.(target.key);\n const currentIndex =\n resolvedIndex != null\n ? resolvedIndex\n : resolver\n ? direction === \"next\"\n ? -1\n : itemCount\n : typeof target.key === \"number\"\n ? target.key\n : direction === \"next\"\n ? -1\n : itemCount;\n const pageSize = Math.max(1, Math.floor(mainViewportSize() / Math.max(1, itemSize())));\n const delta = direction === \"next\" ? 1 : -1;\n const nextStart = currentIndex + delta * pageSize;\n const clampedStart = Math.max(0, Math.min(itemCount - 1, nextStart));\n const tryTarget = (index: number, position: \"on\" | \"before\" | \"after\"): DropTarget | null => {\n const layoutInfo = getLayoutInfo(index);\n const virtualTarget = getDropTargetFromPoint(\n {\n x: layoutInfo.rect.x + 1,\n y: layoutInfo.rect.y + layoutInfo.rect.height / 2,\n },\n itemCount,\n );\n if (!virtualTarget || virtualTarget.type === \"root\") return null;\n const nextTarget = toCollectionDropTarget({ ...virtualTarget, position });\n return isValidDropTarget(nextTarget) ? nextTarget : null;\n };\n const scanFromIndex = (startIndex: number, step: number): DropTarget | null => {\n const insertionOrder: Array<\"before\" | \"after\"> =\n step > 0 ? [\"before\", \"after\"] : [\"after\", \"before\"];\n for (let index = startIndex; index >= 0 && index < itemCount; index += step) {\n const onTarget = tryTarget(index, \"on\");\n if (onTarget) return onTarget;\n for (const position of insertionOrder) {\n const insertionTarget = tryTarget(index, position);\n if (insertionTarget) return insertionTarget;\n }\n }\n return null;\n };\n if (nextStart < 0 || nextStart >= itemCount) {\n if (direction === \"next\") {\n const endBoundaryTarget =\n tryTarget(itemCount - 1, \"after\") ??\n tryTarget(itemCount - 1, \"on\") ??\n tryTarget(itemCount - 1, \"before\");\n if (endBoundaryTarget) return endBoundaryTarget;\n const backwardFallback = scanFromIndex(itemCount - 1, -1);\n if (backwardFallback) return backwardFallback;\n } else {\n if (currentIndex <= 0) {\n const rootTarget: DropTarget = { type: \"root\" };\n if (isValidDropTarget(rootTarget)) return rootTarget;\n }\n const startBoundaryTarget =\n tryTarget(0, \"before\") ?? tryTarget(0, \"on\") ?? tryTarget(0, \"after\");\n if (startBoundaryTarget) return startBoundaryTarget;\n const forwardFallback = scanFromIndex(0, 1);\n if (forwardFallback) return forwardFallback;\n }\n\n const rootTarget: DropTarget = { type: \"root\" };\n return isValidDropTarget(rootTarget) ? rootTarget : null;\n }\n const primaryTarget = scanFromIndex(clampedStart, delta);\n if (primaryTarget) return primaryTarget;\n const oppositeTarget = scanFromIndex(clampedStart - delta, -delta);\n if (oppositeTarget) return oppositeTarget;\n\n const rootTarget: DropTarget = { type: \"root\" };\n return isValidDropTarget(rootTarget) ? rootTarget : null;\n };\n\n const contextValue = createMemo<VirtualizerContextValue<O>>(() => ({\n layout: resolvedLayout(),\n layoutOptions: resolvedLayoutOptions(),\n isVirtualized: true,\n orientation: orientation(),\n getVisibleRange,\n getLayoutInfo,\n getDropTargetFromPoint,\n setDropTargetResolver: assignDropTargetResolver,\n setDropTargetItemCountResolver: assignDropTargetItemCountResolver,\n setDropTargetIndexResolver: assignDropTargetIndexResolver,\n setDropOperationResolver: assignDropOperationResolver,\n setKeyboardNavigationOverride: assignKeyboardNavigationOverride,\n getBaseKeyboardNavigationTarget,\n }));\n const collectionRenderer = createMemo<CollectionRendererContextValue<unknown>>(() => ({\n renderItem: (item) => item as JSX.Element,\n isVirtualized: true,\n layoutDelegate: resolvedLayout(),\n dropTargetDelegate: {\n getDropTargetFromPoint: getCollectionDropTargetFromPoint,\n getDropOperation: getCollectionDropOperation,\n getKeyboardNavigationTarget,\n getKeyboardPageNavigationTarget,\n },\n renderDropIndicator: local.renderDropIndicator,\n }));\n\n const filteredDomProps = createMemo(() => filterDOMProps(domProps, { global: true }));\n\n const updateViewportSize = () => {\n if (!containerRef) return;\n const nextHeight = containerRef.clientHeight;\n const nextWidth = containerRef.clientWidth;\n if (nextHeight !== measuredViewportSize()) setMeasuredViewportSize(nextHeight);\n if (nextWidth !== measuredViewportWidth()) setMeasuredViewportWidth(nextWidth);\n };\n\n const updateWindowViewport = () => {\n if (typeof window === \"undefined\") return;\n const next = window.innerHeight;\n if (next !== windowViewportSize()) setWindowViewportSize(next);\n };\n\n // Recompute how far the scroll view's top edge sits above the window viewport.\n // A negative bounding-rect top means the scroll view has been pushed up by page\n // (or ancestor) scrolling; the offset is the amount scrolled past its top.\n const updateViewportOffset = () => {\n if (!containerRef || !allowsWindowScrolling()) return;\n const rect = containerRef.getBoundingClientRect();\n const next = rect.y < 0 ? -rect.y : 0;\n if (next !== viewportOffset()) setViewportOffset(next);\n };\n\n let scrollFrame: number | undefined;\n // Debounce handle that resets `isScrolling` after scrolling stops.\n let scrollEndTimeout: ReturnType<typeof setTimeout> | undefined;\n onCleanup(() => {\n if (scrollFrame != null) cancelAnimationFrame(scrollFrame);\n if (scrollEndTimeout != null) clearTimeout(scrollEndTimeout);\n });\n\n onMount(() => {\n updateViewportSize();\n updateWindowViewport();\n updateViewportOffset();\n\n const handleResize = () => {\n updateViewportSize();\n updateWindowViewport();\n updateViewportOffset();\n };\n window.addEventListener(\"resize\", handleResize);\n\n const resizeObserver =\n typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(() => updateViewportSize()) : null;\n if (containerRef && resizeObserver) {\n resizeObserver.observe(containerRef);\n }\n\n // A capturing listener on the document sees scroll events on the scroll view\n // itself as well as on any ancestor (including the page), so a single handler\n // can update the local scroll position or the window offset as appropriate.\n const handleDocumentScroll = (e: Event) => {\n if (!containerRef) return;\n const target = e.target as Node | null;\n const isContainer = target === containerRef;\n const isAncestor =\n target === document ||\n target === (window as unknown as Node) ||\n (target instanceof Node && target.contains(containerRef));\n if (!isContainer && !isAncestor) return;\n // An ancestor/page scroll only matters when the collection scrolls with the page.\n if (!isContainer && !allowsWindowScrolling()) return;\n\n // Flag active scrolling and (re)arm the reset for 300ms after the last scroll.\n // Our handler is already rAF-throttled, so a plain clear/reset debounce matches\n // upstream's scrollEndTime bookkeeping without the extra accounting.\n if (!isScrolling()) setIsScrolling(true);\n if (scrollEndTimeout != null) clearTimeout(scrollEndTimeout);\n scrollEndTimeout = setTimeout(() => {\n scrollEndTimeout = undefined;\n setIsScrolling(false);\n }, 300);\n\n if (scrollFrame != null) cancelAnimationFrame(scrollFrame);\n scrollFrame = requestAnimationFrame(() => {\n scrollFrame = undefined;\n if (isContainer) {\n const next = Math.max(0, containerRef!.scrollTop);\n if (next !== scrollOffset()) setScrollOffset(next);\n const nextX = Math.max(0, containerRef!.scrollLeft);\n if (nextX !== scrollOffsetX()) setScrollOffsetX(nextX);\n } else {\n updateViewportOffset();\n }\n updateViewportSize();\n });\n };\n document.addEventListener(\"scroll\", handleDocumentScroll, true);\n\n onCleanup(() => {\n window.removeEventListener(\"resize\", handleResize);\n resizeObserver?.disconnect();\n document.removeEventListener(\"scroll\", handleDocumentScroll, true);\n });\n });\n\n return (\n <CollectionRendererContext.Provider value={collectionRenderer()}>\n <VirtualizerContext.Provider value={contextValue()}>\n <div\n {...filteredDomProps()}\n ref={(el) => {\n containerRef = el;\n }}\n class={local.class}\n style={local.style}\n data-virtualizer\n >\n {/*\n Content wrapper mirroring upstream ScrollView's inner content div. It\n carries the `pointer-events: none` while-scrolling optimization and is\n otherwise a layout-transparent passthrough (the outer div remains the\n scroll container we measure and read scroll offsets from).\n */}\n <div\n data-virtualizer-content\n style={{ \"pointer-events\": isScrolling() ? \"none\" : undefined }}\n >\n {local.children}\n </div>\n </div>\n </VirtualizerContext.Provider>\n </CollectionRendererContext.Provider>\n );\n}\n\nexport { ListLayout, GridLayout, WaterfallLayout, TableLayout };\n\nexport type {\n VirtualizerVisibleRange,\n VirtualizerRangeContext,\n DefaultVirtualizerLayoutOptions,\n GridLayoutOptions,\n WaterfallLayoutOptions,\n VirtualizerDropTarget,\n LayoutInfo,\n Orientation,\n Rect,\n Size,\n Point,\n};\n"],"mappings":";;;;AA8FA,SAAS,WACP,WACA,OACA,KACA,UACyB;CACzB,MAAM,YAAY,KAAK,IAAI,GAAG,KAAK,IAAI,OAAO,SAAS,CAAC;CACxD,MAAM,UAAU,KAAK,IAAI,WAAW,KAAK,IAAI,KAAK,SAAS,CAAC;CAC5D,OAAO;EACL,OAAO;EACP,KAAK;EACL,WAAW,YAAY;EACvB,cAAc,KAAK,IAAI,IAAI,YAAY,WAAW,QAAQ;CAC5D;AACF;AAEA,SAAgB,4BACd,WACA,cACA,cACA,UACA,UACyB;CACzB,IAAI,aAAa,GAAG,OAAO;EAAE,OAAO;EAAG,KAAK;EAAG,WAAW;EAAG,cAAc;CAAE;CAC7E,MAAM,eAAe,KAAK,IAAI,GAAG,QAAQ;CACzC,MAAM,eAAe,KAAK,IAAI,GAAG,YAAY;CAC7C,MAAM,eAAe,KAAK,IAAI,GAAG,QAAQ;CACzC,MAAM,QAAQ,KAAK,MAAM,eAAe,YAAY,IAAI;CAExD,OAAO,WAAW,W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|
1
|
+
{"version":3,"file":"Virtualizer2.jsx","names":[],"sources":["../src/VirtualizerLayouts.ts","../src/Virtualizer.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\n/*\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\n// Ported to SolidJS for Proyecto Viviana; based on packages/react-stately/src/layout/GridLayout.ts\n// Ported to SolidJS for Proyecto Viviana; based on packages/react-stately/src/layout/ListLayout.ts\n// Ported to SolidJS for Proyecto Viviana; based on packages/react-stately/src/layout/TableLayout.ts\n// Ported to SolidJS for Proyecto Viviana; based on packages/react-stately/src/layout/WaterfallLayout.ts\n\n/**\n * Layout primitives for solidaria-components Virtualizer.\n *\n * These layout contracts are based on:\n * - packages/react-stately/src/layout/ListLayout.ts\n * - packages/react-stately/src/layout/GridLayout.ts\n * - packages/react-stately/src/layout/TableLayout.ts\n * - packages/react-stately/src/layout/WaterfallLayout.ts\n */\n\nexport interface Point {\n x: number;\n y: number;\n}\n\nexport interface Rect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport interface Size {\n width: number;\n height: number;\n}\n\n/**\n * The primary orientation of a linear layout — the axis items stack along, which\n * is usually the direction the collection scrolls. Mirrors React Spectrum's\n * `Orientation` and `ListLayout`'s `orientation` option.\n */\nexport type Orientation = \"horizontal\" | \"vertical\";\n\nexport interface LayoutInfo {\n key: string | number;\n index: number;\n rect: Rect;\n /** True while this rect still uses `estimatedRowHeight` / `estimatedRowSize`. */\n estimatedSize?: boolean;\n}\n\nexport interface VirtualizerVisibleRange {\n start: number;\n end: number;\n offsetTop: number;\n offsetBottom: number;\n}\n\nexport interface VirtualizerRangeContext {\n itemCount: number;\n scrollOffset: number;\n viewportSize: number;\n overscan: number;\n viewportWidth?: number;\n}\n\nexport interface DefaultVirtualizerLayoutOptions {\n itemSize?: number;\n overscan?: number;\n viewportSize?: number;\n /**\n * The primary orientation of the items. Items offset along `x`/`width` when\n * `horizontal`, and along `y`/`height` when `vertical`.\n *\n * @default 'vertical'\n */\n orientation?: Orientation;\n /**\n * Fixed row size along the primary axis. Alias of RAC `rowSize` / `rowHeight`.\n * Takes precedence over `estimatedRowHeight`.\n */\n rowSize?: number;\n /** @deprecated Use `rowSize`. */\n rowHeight?: number;\n /**\n * Estimated row size when heights are variable. RAC `estimatedRowSize` /\n * `estimatedRowHeight` — ComboBox/Picker pass `estimatedRowHeight: 32`.\n */\n estimatedRowSize?: number;\n /** @deprecated Use `estimatedRowSize`. */\n estimatedRowHeight?: number;\n /**\n * Padding around the list along both axes. RAC `ListLayoutOptions.padding`.\n * ComboBox/Picker pass `padding: 8`; the listbox element itself is `padding: 0`.\n */\n padding?: number;\n /** Gap between items along the primary axis. */\n gap?: number;\n estimatedHeadingSize?: number;\n estimatedHeadingHeight?: number;\n loaderSize?: number;\n loaderHeight?: number;\n}\n\nexport interface GridLayoutOptions extends DefaultVirtualizerLayoutOptions {\n rowHeight?: number;\n columnCount?: number;\n viewportWidth?: number;\n /** Minimum card/item width used to derive `columnCount` when it is omitted. */\n minItemSize?: number;\n /** Maximum card/item width. Consumed by CardView packing. */\n maxItemSize?: number;\n /** Gutter between items. */\n minSpace?: number;\n}\n\nexport interface WaterfallLayoutOptions extends GridLayoutOptions {\n minColumnWidth?: number;\n viewportWidth?: number;\n gap?: number;\n}\n\nexport interface VirtualizerLayoutInfoContext {\n viewportWidth: number;\n /**\n * The viewport height, used as the cross-axis size for a `horizontal` layout\n * (the analogue of `viewportWidth` for the `vertical` default).\n */\n viewportHeight?: number;\n}\n\nexport interface VirtualizerDropTarget {\n type: \"item\" | \"root\";\n index: number;\n position: \"before\" | \"on\" | \"after\";\n key?: string | number;\n parentKey?: string | number | null;\n level?: number;\n}\n\nfunction clampRange(\n itemCount: number,\n start: number,\n end: number,\n itemSize: number,\n): VirtualizerVisibleRange {\n const safeStart = Math.max(0, Math.min(start, itemCount));\n const safeEnd = Math.max(safeStart, Math.min(end, itemCount));\n return {\n start: safeStart,\n end: safeEnd,\n // Layout padding lives in layoutInfo / contentSize, not in these spacers.\n // RAC CollectionRoot has no CSS padding; items are absolutely inset.\n offsetTop: safeStart * itemSize,\n offsetBottom: Math.max(0, (itemCount - safeEnd) * itemSize),\n };\n}\n\n/**\n * Resolve the primary-axis row size. Fixed `rowSize` / `rowHeight` / `itemSize`\n * win over `estimatedRowHeight`. Default 40 matches the existing Solid fallback\n * (RAC ListLayout defaults to 48 only when neither fixed nor estimated is set).\n */\nexport function resolveListRowSizeInfo(options?: DefaultVirtualizerLayoutOptions): {\n size: number;\n estimated: boolean;\n} {\n const fixed = options?.rowSize ?? options?.rowHeight ?? options?.itemSize;\n if (fixed != null && Number.isFinite(fixed)) {\n return { size: Math.max(1, fixed), estimated: false };\n }\n const estimated = options?.estimatedRowSize ?? options?.estimatedRowHeight;\n if (estimated != null && Number.isFinite(estimated)) {\n return { size: Math.max(1, estimated), estimated: true };\n }\n return { size: 40, estimated: false };\n}\n\nexport function resolveListRowSize(options?: DefaultVirtualizerLayoutOptions): number {\n return resolveListRowSizeInfo(options).size;\n}\n\nexport function calculateLinearVisibleRange(\n itemCount: number,\n scrollOffset: number,\n viewportSize: number,\n itemSize: number,\n overscan: number,\n padding = 0,\n): VirtualizerVisibleRange {\n if (itemCount <= 0) return { start: 0, end: 0, offsetTop: 0, offsetBottom: 0 };\n const safeItemSize = Math.max(1, itemSize);\n const safeViewport = Math.max(1, viewportSize);\n const safeOverscan = Math.max(0, overscan);\n const safePadding = Math.max(0, padding);\n const start = Math.floor((scrollOffset - safePadding) / safeItemSize) - safeOverscan;\n const visibleCount = Math.ceil(safeViewport / safeItemSize) + safeOverscan * 2;\n return clampRange(itemCount, start, start + visibleCount, safeItemSize);\n}\n\nexport class ListLayout {\n /** Measured primary-axis size per index, filled by VirtualizerItem. */\n private measuredMain = new Map<number, number>();\n\n getVisibleRange(\n ctx: VirtualizerRangeContext,\n options?: DefaultVirtualizerLayoutOptions,\n ): VirtualizerVisibleRange {\n return calculateLinearVisibleRange(\n ctx.itemCount,\n ctx.scrollOffset,\n ctx.viewportSize,\n resolveListRowSize(options),\n options?.overscan ?? ctx.overscan,\n Math.max(0, options?.padding ?? 0),\n );\n }\n\n updateItemSize(index: number, mainSize: number): boolean {\n if (!(mainSize > 0)) return false;\n if (this.measuredMain.get(index) === mainSize) return false;\n this.measuredMain.set(index, mainSize);\n return true;\n }\n\n getContentSize(\n itemCount: number,\n context: VirtualizerLayoutInfoContext,\n options?: DefaultVirtualizerLayoutOptions,\n ): Size {\n const { size: rowSize } = resolveListRowSizeInfo(options);\n const padding = Math.max(0, options?.padding ?? 0);\n const gap = Math.max(0, options?.gap ?? 0);\n const horizontal = (options?.orientation ?? \"vertical\") === \"horizontal\";\n let main = 0;\n if (itemCount > 0) {\n main = padding;\n for (let i = 0; i < itemCount; i++) {\n main += this.measuredMain.get(i) ?? rowSize;\n if (i < itemCount - 1) main += gap;\n }\n main += padding;\n }\n if (horizontal) {\n return { width: main, height: Math.max(0, context.viewportHeight ?? 0) };\n }\n return { width: Math.max(0, context.viewportWidth), height: main };\n }\n\n getLayoutInfo(\n index: number,\n context: VirtualizerLayoutInfoContext,\n options?: DefaultVirtualizerLayoutOptions,\n ): LayoutInfo {\n const { size: rowSize, estimated } = resolveListRowSizeInfo(options);\n const padding = Math.max(0, options?.padding ?? 0);\n const gap = Math.max(0, options?.gap ?? 0);\n const measured = this.measuredMain.get(index);\n const main = measured ?? rowSize;\n const estimatedSize = measured == null && estimated;\n const origin = this.offsetForIndex(index, rowSize, padding, gap);\n if ((options?.orientation ?? \"vertical\") === \"horizontal\") {\n return {\n key: String(index),\n index,\n estimatedSize,\n rect: {\n x: origin,\n y: padding,\n width: main,\n height: Math.max(0, (context.viewportHeight ?? 0) - padding * 2),\n },\n };\n }\n return {\n key: String(index),\n index,\n estimatedSize,\n rect: {\n x: padding,\n y: origin,\n width: Math.max(0, context.viewportWidth - padding * 2),\n height: main,\n },\n };\n }\n\n getDropTargetFromPoint(\n point: Point,\n itemCount: number,\n options?: DefaultVirtualizerLayoutOptions,\n ): VirtualizerDropTarget | null {\n if (itemCount <= 0) return { type: \"root\", index: -1, position: \"on\" };\n const itemSize = resolveListRowSize(options);\n const padding = Math.max(0, options?.padding ?? 0);\n const gap = Math.max(0, options?.gap ?? 0);\n const stride = itemSize + gap;\n const offset =\n ((options?.orientation ?? \"vertical\") === \"horizontal\" ? point.x : point.y) - padding;\n if (offset < 0) {\n return { type: \"item\", index: 0, position: \"before\" };\n }\n const totalSize = itemCount * stride - (itemCount > 0 ? gap : 0);\n if (offset >= totalSize) {\n return { type: \"item\", index: itemCount - 1, position: \"after\" };\n }\n const rawIndex = Math.floor(offset / stride);\n const index = Math.max(0, Math.min(rawIndex, itemCount - 1));\n const offsetWithinItem = Math.max(0, offset - index * stride);\n const threshold = itemSize / 3;\n const position: VirtualizerDropTarget[\"position\"] =\n offsetWithinItem < threshold ? \"before\" : offsetWithinItem > threshold * 2 ? \"after\" : \"on\";\n return { type: \"item\", index, position };\n }\n\n private offsetForIndex(index: number, rowSize: number, padding: number, gap: number): number {\n if (this.measuredMain.size === 0) {\n return padding + index * (rowSize + gap);\n }\n let offset = padding;\n for (let i = 0; i < index; i++) {\n offset += (this.measuredMain.get(i) ?? rowSize) + gap;\n }\n return offset;\n }\n}\n\nexport class TableLayout extends ListLayout {}\n\nfunction resolveGridColumnCount(ctxWidth: number | undefined, options?: GridLayoutOptions): number {\n if (options?.columnCount != null && options.columnCount > 0) {\n return Math.max(1, options.columnCount);\n }\n const width = Math.max(1, options?.viewportWidth ?? ctxWidth ?? 320);\n const minItem = Math.max(1, options?.minItemSize ?? options?.itemSize ?? 150);\n const minSpace = Math.max(0, options?.minSpace ?? 0);\n return Math.max(1, Math.floor((width + minSpace) / (minItem + minSpace)));\n}\n\nexport class GridLayout {\n getVisibleRange(\n ctx: VirtualizerRangeContext,\n options?: GridLayoutOptions,\n ): VirtualizerVisibleRange {\n if (ctx.itemCount <= 0) return { start: 0, end: 0, offsetTop: 0, offsetBottom: 0 };\n const rowHeight = Math.max(\n 1,\n options?.rowHeight ?? options?.itemSize ?? options?.minItemSize ?? 40,\n );\n const columns = resolveGridColumnCount(ctx.viewportWidth, options);\n const safeViewport = Math.max(1, ctx.viewportSize);\n const safeOverscan = Math.max(0, options?.overscan ?? ctx.overscan);\n\n const startRow = Math.max(0, Math.floor(ctx.scrollOffset / rowHeight) - safeOverscan);\n const visibleRows = Math.ceil(safeViewport / rowHeight) + safeOverscan * 2;\n const endRow = startRow + visibleRows;\n\n const start = startRow * columns;\n const end = Math.min(ctx.itemCount, endRow * columns);\n\n const totalRows = Math.ceil(ctx.itemCount / columns);\n const clampedStartRow = Math.floor(start / columns);\n const renderedRows = Math.ceil((end - start) / columns);\n const offsetTop = clampedStartRow * rowHeight;\n const offsetBottom = Math.max(0, (totalRows - clampedStartRow - renderedRows) * rowHeight);\n\n return { start, end, offsetTop, offsetBottom };\n }\n\n getContentSize(\n itemCount: number,\n context: VirtualizerLayoutInfoContext,\n options?: GridLayoutOptions,\n ): Size {\n const rowHeight = Math.max(\n 1,\n options?.rowHeight ?? options?.itemSize ?? options?.minItemSize ?? 40,\n );\n const columns = resolveGridColumnCount(context.viewportWidth, options);\n const totalRows = itemCount <= 0 ? 0 : Math.ceil(itemCount / columns);\n return {\n width: Math.max(0, context.viewportWidth),\n height: totalRows * rowHeight,\n };\n }\n\n getLayoutInfo(\n index: number,\n context: VirtualizerLayoutInfoContext,\n options?: GridLayoutOptions,\n ): LayoutInfo {\n const rowHeight = Math.max(\n 1,\n options?.rowHeight ?? options?.itemSize ?? options?.minItemSize ?? 40,\n );\n const columns = resolveGridColumnCount(context.viewportWidth, options);\n const row = Math.floor(index / columns);\n const col = index % columns;\n const width = Math.max(1, context.viewportWidth);\n const cellWidth = Math.floor(width / columns);\n return {\n key: String(index),\n index,\n rect: {\n x: col * cellWidth,\n y: row * rowHeight,\n width: cellWidth,\n height: rowHeight,\n },\n };\n }\n\n getDropTargetFromPoint(\n point: Point,\n itemCount: number,\n options?: GridLayoutOptions,\n ): VirtualizerDropTarget | null {\n if (itemCount <= 0) return { type: \"root\", index: -1, position: \"on\" };\n const rowHeight = Math.max(\n 1,\n options?.rowHeight ?? options?.itemSize ?? options?.minItemSize ?? 40,\n );\n const columns = resolveGridColumnCount(options?.viewportWidth, options);\n const totalRows = Math.ceil(itemCount / columns);\n const totalHeight = totalRows * rowHeight;\n if (point.y < 0) {\n return { type: \"item\", index: 0, position: \"before\" };\n }\n if (point.y >= totalHeight) {\n return { type: \"item\", index: itemCount - 1, position: \"after\" };\n }\n const width = Math.max(1, options?.viewportWidth ?? 320);\n const cellWidth = width / columns;\n const row = Math.max(0, Math.floor(point.y / rowHeight));\n const col = Math.max(0, Math.min(columns - 1, Math.floor(Math.max(0, point.x) / cellWidth)));\n const index = Math.max(0, Math.min(itemCount - 1, row * columns + col));\n const withinRow = Math.max(0, point.y - row * rowHeight);\n const threshold = rowHeight / 3;\n const position: VirtualizerDropTarget[\"position\"] =\n withinRow < threshold ? \"before\" : withinRow > threshold * 2 ? \"after\" : \"on\";\n return { type: \"item\", index, position };\n }\n}\n\nexport class WaterfallLayout extends GridLayout {\n override getVisibleRange(\n ctx: VirtualizerRangeContext,\n options?: WaterfallLayoutOptions,\n ): VirtualizerVisibleRange {\n const width = Math.max(1, options?.viewportWidth ?? 320);\n const minColumnWidth = Math.max(1, options?.minColumnWidth ?? 200);\n const gap = Math.max(0, options?.gap ?? 0);\n const columnCount = Math.max(1, Math.floor((width + gap) / (minColumnWidth + gap)));\n return super.getVisibleRange(ctx, { ...options, columnCount });\n }\n\n override getLayoutInfo(\n index: number,\n context: VirtualizerLayoutInfoContext,\n options?: WaterfallLayoutOptions,\n ): LayoutInfo {\n const width = Math.max(1, options?.viewportWidth ?? context.viewportWidth);\n const minColumnWidth = Math.max(1, options?.minColumnWidth ?? 200);\n const gap = Math.max(0, options?.gap ?? 0);\n const columnCount = Math.max(1, Math.floor((width + gap) / (minColumnWidth + gap)));\n return super.getLayoutInfo(index, context, { ...options, columnCount });\n }\n\n override getDropTargetFromPoint(\n point: Point,\n itemCount: number,\n options?: WaterfallLayoutOptions,\n ): VirtualizerDropTarget | null {\n const width = Math.max(1, options?.viewportWidth ?? 320);\n const minColumnWidth = Math.max(1, options?.minColumnWidth ?? 200);\n const gap = Math.max(0, options?.gap ?? 0);\n const columnCount = Math.max(1, Math.floor((width + gap) / (minColumnWidth + gap)));\n return super.getDropTargetFromPoint(point, itemCount, { ...options, columnCount });\n }\n}\n","/*\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\n/*\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\n// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria-components/src/Virtualizer.tsx\n// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria/src/virtualizer/ScrollView.tsx\n\n/**\n * Virtualizer primitive for solidaria-components.\n *\n * Provides the React Aria Components API and the React Aria scroll-view\n * behavior. Based on:\n * - packages/react-aria-components/src/Virtualizer.tsx\n * - packages/react-aria/src/virtualizer/ScrollView.tsx\n */\n\nimport {\n createContext,\n createEffect,\n createMemo,\n createSignal,\n onCleanup,\n useContext,\n createTrackedEffect,\n} from \"solid-js\";\nimport type { Accessor } from \"solid-js\";\nimport type { JSX } from \"@solidjs/web\";\nimport type {\n DragTypes,\n DropOperation,\n DropTarget,\n ItemDropTarget,\n} from \"@proyecto-viviana/solid-stately\";\nimport { createScrollView, useLocale } from \"@proyecto-viviana/solidaria\";\nimport { isElementVisible } from \"@proyecto-viviana/solidaria/utils\";\nimport {\n CollectionRendererContext,\n DefaultCollectionRenderer,\n type CollectionRendererContextValue,\n type CollectionRootProps,\n type CollectionBranchProps,\n} from \"./Collection\";\nimport { splitProps } from \"@proyecto-viviana/solidaria/utils\";\nimport {\n GridLayout,\n ListLayout,\n TableLayout,\n WaterfallLayout,\n calculateLinearVisibleRange,\n resolveListRowSize,\n type DefaultVirtualizerLayoutOptions,\n type GridLayoutOptions,\n type LayoutInfo,\n type Orientation,\n type Point,\n type Rect,\n type Size,\n type VirtualizerRangeContext,\n type VirtualizerLayoutInfoContext,\n type VirtualizerDropTarget,\n type VirtualizerVisibleRange,\n type WaterfallLayoutOptions,\n} from \"./VirtualizerLayouts\";\n\nexport interface LayoutOptionsDelegate<O> {\n useLayoutOptions?(): O;\n}\n\nexport interface VirtualizerLayout<O = unknown> extends LayoutOptionsDelegate<O> {\n getVisibleRange?(context: VirtualizerRangeContext, options?: O): VirtualizerVisibleRange;\n getLayoutInfo?(index: number, context: VirtualizerLayoutInfoContext, options?: O): LayoutInfo;\n getContentSize?(itemCount: number, context: VirtualizerLayoutInfoContext, options?: O): Size;\n updateItemSize?(index: number, mainSize: number): boolean;\n getDropTargetFromPoint?(\n point: Point,\n itemCount: number,\n options?: O,\n ): VirtualizerDropTarget | null;\n}\n\nexport interface VirtualizerLayoutClass<O> {\n new (): VirtualizerLayout<O>;\n}\n\nexport type VirtualizerKeyboardNavigationOverride = (\n target: DropTarget | null,\n direction: \"next\" | \"previous\",\n isValidDropTarget: (target: DropTarget) => boolean,\n) => DropTarget | null;\n\nexport interface VirtualizerContextValue<O = unknown> {\n layout: VirtualizerLayout<O>;\n layoutOptions?: O;\n isVirtualized: boolean;\n /**\n * The resolved primary orientation of the layout. Consumers render their\n * windowing spacers along this axis (`width` when `horizontal`, `height`\n * when `vertical`) so the spacer size matches the offsets `getVisibleRange`\n * produced.\n */\n orientation: Orientation;\n getVisibleRange: (itemCount: number) => VirtualizerVisibleRange;\n getLayoutInfo: (index: number) => LayoutInfo;\n getContentSize: (itemCount: number) => Size;\n updateItemSize: (index: number, mainSize: number) => boolean;\n getDropTargetFromPoint: (point: Point, itemCount: number) => VirtualizerDropTarget | null;\n setDropTargetResolver: (resolver: VirtualizerDropTargetResolver | undefined) => void;\n setDropTargetItemCountResolver: (resolver: (() => number) | undefined) => void;\n setDropTargetIndexResolver: (\n resolver: ((key: string | number) => number | null) | undefined,\n ) => void;\n setDropOperationResolver: (resolver: VirtualizerDropOperationResolver | undefined) => void;\n setKeyboardNavigationOverride: (\n override: VirtualizerKeyboardNavigationOverride | undefined,\n ) => void;\n getBaseKeyboardNavigationTarget: VirtualizerKeyboardNavigationOverride;\n}\n\nexport type VirtualizerDropTargetResolver = (\n target: VirtualizerDropTarget,\n) => VirtualizerDropTarget;\nexport type VirtualizerDropOperationResolver = (\n target: DropTarget,\n types: DragTypes,\n allowedOperations: DropOperation[],\n) => DropOperation;\n\nexport const VirtualizerContext = createContext<VirtualizerContextValue<unknown> | null>(null);\n\ninterface VirtualizerOptionsContextValue {\n layout: VirtualizerLayout<unknown>;\n layoutOptions?: unknown;\n shouldObserveItemSize?: boolean;\n allowsWindowScrolling: boolean;\n}\n\nconst VirtualizerOptionsContext = createContext<VirtualizerOptionsContextValue | null>(null);\n\ninterface VirtualizerScrollRuntime {\n setScrollOffset: (value: number) => void;\n setScrollOffsetX: (value: number) => void;\n setViewportOffset: (value: number) => void;\n setWindowViewportSize: (value: number) => void;\n setMeasuredViewportSize: (value: number) => void;\n setMeasuredViewportWidth: (value: number) => void;\n allowsWindowScrolling: () => boolean;\n}\n\nconst VirtualizerScrollRuntimeContext = createContext<VirtualizerScrollRuntime | null>(null);\n\nexport function useVirtualizerContext<O>(): VirtualizerContextValue<O> | null {\n return useContext(VirtualizerContext) as VirtualizerContextValue<O> | null;\n}\n\nexport interface VirtualizerProps<O> extends Omit<\n JSX.HTMLAttributes<HTMLDivElement>,\n \"children\" | \"class\" | \"style\"\n> {\n /** The child collection to virtualize (e.g. ListBox, GridList, or Table). */\n children: JSX.Element;\n /** Layout object or constructor for layout behavior and options delegation. */\n layout: VirtualizerLayoutClass<O> | VirtualizerLayout<O>;\n /** Layout options consumed by the layout implementation. */\n layoutOptions?: O;\n /**\n * Whether to observe each item's size with a ResizeObserver and re-measure\n * when it changes. RAC `VirtualizerProps.shouldObserveItemSize`. Estimated\n * rows still measure once even when this is false.\n */\n shouldObserveItemSize?: boolean;\n /** Optional renderer for collection drop indicators in virtualized flows. */\n renderDropIndicator?: (\n index: number,\n position: \"before\" | \"after\" | \"on\",\n ) => JSX.Element | undefined;\n /** Optional operation resolver for collection drop target operations. */\n getDropOperation?: VirtualizerDropOperationResolver;\n /**\n * Whether the collection may scroll with the page rather than only within its\n * own scroll container. When enabled (the default, matching react-aria-components),\n * the visible rect is the intersection of the window viewport with the scroll view,\n * so a virtualizer with unbounded height still virtualizes as the page scrolls.\n */\n allowsWindowScrolling?: boolean;\n}\n\nfunction getObjectValue<T extends object, K extends keyof T>(\n value: T | undefined,\n key: K,\n): T[K] | undefined {\n return value?.[key];\n}\n\nfunction isSameRange(a: VirtualizerVisibleRange, b: VirtualizerVisibleRange): boolean {\n return (\n a.start === b.start &&\n a.end === b.end &&\n a.offsetTop === b.offsetTop &&\n a.offsetBottom === b.offsetBottom\n );\n}\n\nfunction isSameLayoutInfo(a: LayoutInfo, b: LayoutInfo): boolean {\n return (\n a.key === b.key &&\n a.index === b.index &&\n a.rect.x === b.rect.x &&\n a.rect.y === b.rect.y &&\n a.rect.width === b.rect.width &&\n a.rect.height === b.rect.height &&\n a.estimatedSize === b.estimatedSize\n );\n}\n\n/**\n * A Virtualizer renders collection content under a virtualized layout contract.\n * Current implementation supports fixed-size visible range virtualization.\n */\nexport function Virtualizer<O>(props: VirtualizerProps<O>): JSX.Element {\n const [local, domProps] = splitProps(props, [\n \"children\",\n \"layout\",\n \"layoutOptions\",\n \"shouldObserveItemSize\",\n \"renderDropIndicator\",\n \"getDropOperation\",\n \"allowsWindowScrolling\",\n ]);\n // The scroll view's own scroll position (its scrollTop).\n const [scrollOffset, setScrollOffset] = createSignal(0, { ownedWrite: true });\n // The scroll view's horizontal scroll position (its scrollLeft), used as the\n // primary scroll axis when the layout's orientation is horizontal.\n const [scrollOffsetX, setScrollOffsetX] = createSignal(0, { ownedWrite: true });\n // How far the scroll view's top edge is above the window viewport, due to the\n // page (or an ancestor) being scrolled. Mirrors upstream ScrollView.viewportOffset.\n const [viewportOffset, setViewportOffset] = createSignal(0, { ownedWrite: true });\n // The window viewport height, used as the visible height cap when window scrolling.\n const [windowViewportSize, setWindowViewportSize] = createSignal(0, { ownedWrite: true });\n // The scroll view's own measured size (clientHeight/clientWidth).\n const [measuredViewportSize, setMeasuredViewportSize] = createSignal(0, { ownedWrite: true });\n const [measuredViewportWidth, setMeasuredViewportWidth] = createSignal(0, { ownedWrite: true });\n const allowsWindowScrolling = createMemo(() => local.allowsWindowScrolling ?? true);\n const [dropTargetResolver, setDropTargetResolver] = createSignal<\n VirtualizerDropTargetResolver | undefined\n >(undefined, { ownedWrite: true });\n const [dropTargetItemCountResolver, setDropTargetItemCountResolver] = createSignal<\n (() => number) | undefined\n >(undefined, { ownedWrite: true });\n const [dropTargetIndexResolver, setDropTargetIndexResolver] = createSignal<\n ((key: string | number) => number | null) | undefined\n >(undefined, { ownedWrite: true });\n const [dropOperationResolver, setDropOperationResolver] = createSignal<\n VirtualizerDropOperationResolver | undefined\n >(undefined, { ownedWrite: true });\n const [keyboardNavigationOverride, setKeyboardNavigationOverride] = createSignal<\n VirtualizerKeyboardNavigationOverride | undefined\n >(undefined, { ownedWrite: true });\n const fallbackLayout = new ListLayout();\n const visibleRangeCache = new Map<number, VirtualizerVisibleRange>();\n const layoutInfoCache = new Map<number, LayoutInfo>();\n const [layoutEpoch, setLayoutEpoch] = createSignal(0);\n\n const layout = createMemo<VirtualizerLayout<O>>(() => {\n if (typeof local.layout === \"function\") {\n return new local.layout();\n }\n return local.layout;\n });\n const resolvedLayout = createMemo<VirtualizerLayout<O>>(() => {\n return layout() ?? (new ListLayout() as VirtualizerLayout<O>);\n });\n\n const resolvedLayoutOptions = createMemo<O | undefined>(() => {\n const fromLayout = resolvedLayout().useLayoutOptions?.();\n if (local.layoutOptions && fromLayout) {\n return { ...local.layoutOptions, ...fromLayout };\n }\n return local.layoutOptions ?? fromLayout;\n });\n\n const virtualOptions = createMemo(\n () => resolvedLayoutOptions() as DefaultVirtualizerLayoutOptions | undefined,\n );\n const layoutOptionsWithViewport = createMemo(() => {\n const options = resolvedLayoutOptions();\n if (options && typeof options === \"object\") {\n return {\n ...(options as Record<string, unknown>),\n viewportWidth: measuredViewportWidth(),\n } as O;\n }\n return { viewportWidth: measuredViewportWidth() } as O;\n });\n const itemSize = createMemo(() => resolveListRowSize(virtualOptions()));\n const overscan = createMemo(() => getObjectValue(virtualOptions(), \"overscan\") ?? 2);\n const orientation = createMemo<Orientation>(\n () => getObjectValue(virtualOptions(), \"orientation\") ?? \"vertical\",\n );\n // The effective visible height. When window scrolling, this is the scroll view's\n // size intersected with the window viewport (capped to what is actually on screen),\n // mirroring upstream ScrollView.updateVisibleRect. Otherwise it is the scroll view's\n // own clientHeight. An explicit `viewportSize` layout option still takes precedence.\n const viewportSize = createMemo(() => {\n const explicit = getObjectValue(virtualOptions(), \"viewportSize\");\n if (explicit != null) return explicit;\n const elementSize = measuredViewportSize() ?? 0;\n if (allowsWindowScrolling()) {\n return Math.max(0, Math.min(elementSize - viewportOffset(), windowViewportSize()));\n }\n return elementSize;\n });\n // The top of the visible rect in content coordinates: the scroll view's own scroll\n // position plus how far it has been pushed above the window viewport by page scroll.\n const effectiveScrollOffset = createMemo(() =>\n allowsWindowScrolling() ? scrollOffset() + viewportOffset() : scrollOffset(),\n );\n // The primary-axis scroll offset and viewport size, selected by orientation.\n // A horizontal layout scrolls along x (scrollLeft / client width); the vertical\n // default scrolls along y (with the window-scrolling adjustments above).\n const mainScrollOffset = createMemo(() =>\n orientation() === \"horizontal\" ? scrollOffsetX() : effectiveScrollOffset(),\n );\n const mainViewportSize = createMemo(() => {\n if (orientation() !== \"horizontal\") return viewportSize();\n const explicit = getObjectValue(virtualOptions(), \"viewportSize\");\n return explicit != null ? explicit : measuredViewportWidth();\n });\n\n const getVisibleRange = (itemCount: number): VirtualizerVisibleRange => {\n const ctx: VirtualizerRangeContext = {\n itemCount,\n scrollOffset: mainScrollOffset(),\n viewportSize: mainViewportSize(),\n overscan: overscan(),\n viewportWidth: measuredViewportWidth(),\n };\n const layoutResult = resolvedLayout().getVisibleRange?.(ctx, layoutOptionsWithViewport());\n const nextRange =\n layoutResult ??\n calculateLinearVisibleRange(\n itemCount,\n ctx.scrollOffset,\n ctx.viewportSize,\n itemSize(),\n ctx.overscan,\n );\n const cachedRange = visibleRangeCache.get(itemCount);\n if (cachedRange && isSameRange(cachedRange, nextRange)) {\n return cachedRange;\n }\n visibleRangeCache.set(itemCount, nextRange);\n return nextRange;\n };\n const getLayoutInfo = (index: number): LayoutInfo => {\n layoutEpoch();\n const ctx: VirtualizerLayoutInfoContext = {\n viewportWidth: measuredViewportWidth(),\n viewportHeight: measuredViewportSize(),\n };\n const layoutResult = resolvedLayout().getLayoutInfo?.(index, ctx, layoutOptionsWithViewport());\n const nextInfo =\n layoutResult ??\n (orientation() === \"horizontal\"\n ? {\n key: String(index),\n index,\n rect: {\n x: index * itemSize(),\n y: 0,\n width: itemSize(),\n height: Math.max(0, measuredViewportSize()),\n },\n }\n : {\n key: String(index),\n index,\n rect: {\n x: 0,\n y: index * itemSize(),\n width: Math.max(0, measuredViewportWidth()),\n height: itemSize(),\n },\n });\n const cachedInfo = layoutInfoCache.get(index);\n if (cachedInfo && isSameLayoutInfo(cachedInfo, nextInfo)) {\n return cachedInfo;\n }\n layoutInfoCache.set(index, nextInfo);\n return nextInfo;\n };\n const getContentSize = (itemCount: number): Size => {\n layoutEpoch();\n const ctx: VirtualizerLayoutInfoContext = {\n viewportWidth: measuredViewportWidth(),\n viewportHeight: measuredViewportSize(),\n };\n const fromLayout = resolvedLayout().getContentSize?.(\n itemCount,\n ctx,\n layoutOptionsWithViewport(),\n );\n if (fromLayout) return fromLayout;\n const range = getVisibleRange(itemCount);\n const visible = Math.max(0, range.end - range.start);\n const main = range.offsetTop + visible * itemSize() + range.offsetBottom;\n if (orientation() === \"horizontal\") {\n return { width: main, height: Math.max(0, measuredViewportSize()) };\n }\n return { width: Math.max(0, measuredViewportWidth()), height: main };\n };\n const updateItemSize = (index: number, mainSize: number): boolean => {\n const changed = resolvedLayout().updateItemSize?.(index, mainSize) ?? false;\n if (changed) {\n layoutInfoCache.clear();\n visibleRangeCache.clear();\n setLayoutEpoch((epoch) => epoch + 1);\n }\n return changed;\n };\n const getDropTargetFromPoint = (\n point: Point,\n itemCount: number,\n ): VirtualizerDropTarget | null => {\n const target =\n resolvedLayout().getDropTargetFromPoint?.(point, itemCount, layoutOptionsWithViewport()) ??\n fallbackLayout.getDropTargetFromPoint(point, itemCount, virtualOptions());\n if (!target) return null;\n const resolver = dropTargetResolver();\n return resolver ? resolver(target) : target;\n };\n const assignDropTargetResolver = (resolver: VirtualizerDropTargetResolver | undefined): void => {\n setDropTargetResolver(() => resolver);\n };\n const assignDropTargetItemCountResolver = (resolver: (() => number) | undefined): void => {\n setDropTargetItemCountResolver(() => resolver);\n };\n const assignDropTargetIndexResolver = (\n resolver: ((key: string | number) => number | null) | undefined,\n ): void => {\n setDropTargetIndexResolver(() => resolver);\n };\n const assignDropOperationResolver = (\n resolver: VirtualizerDropOperationResolver | undefined,\n ): void => {\n setDropOperationResolver(() => resolver);\n };\n const assignKeyboardNavigationOverride = (\n override: VirtualizerKeyboardNavigationOverride | undefined,\n ): void => {\n setKeyboardNavigationOverride(() => override);\n };\n const toCollectionDropTarget = (target: VirtualizerDropTarget): DropTarget => {\n if (target.type === \"root\") return { type: \"root\" };\n const key = target.key ?? target.index;\n return {\n type: \"item\",\n key,\n dropPosition: target.position,\n } as ItemDropTarget;\n };\n const getCollectionDropTargetFromPoint = (\n x: number,\n y: number,\n isValidDropTarget: (target: DropTarget) => boolean,\n ): DropTarget | null => {\n const itemCount = dropTargetItemCountResolver()?.() ?? 0;\n const virtualTarget = getDropTargetFromPoint({ x, y }, itemCount);\n if (!virtualTarget) return null;\n const mappedTarget = toCollectionDropTarget(virtualTarget);\n if (isValidDropTarget(mappedTarget)) return mappedTarget;\n if (mappedTarget.type === \"item\") {\n const alternatePositions: Array<\"before\" | \"after\" | \"on\"> =\n mappedTarget.dropPosition === \"on\"\n ? [\"before\", \"after\"]\n : mappedTarget.dropPosition === \"before\"\n ? [\"on\", \"after\"]\n : [\"on\", \"before\"];\n for (const position of alternatePositions) {\n const alternateTarget: DropTarget = {\n ...mappedTarget,\n dropPosition: position,\n };\n if (isValidDropTarget(alternateTarget)) return alternateTarget;\n }\n const rootTarget: DropTarget = { type: \"root\" };\n if (isValidDropTarget(rootTarget)) return rootTarget;\n }\n return null;\n };\n const getCollectionDropOperation = (\n target: DropTarget,\n types: DragTypes,\n allowedOperations: DropOperation[],\n ): DropOperation => {\n const resolver = dropOperationResolver() ?? local.getDropOperation;\n if (resolver) return resolver(target, types, allowedOperations);\n if (allowedOperations.length === 0) return \"cancel\";\n if (target.type === \"root\") {\n if (allowedOperations.includes(\"copy\")) return \"copy\";\n if (allowedOperations.includes(\"move\")) return \"move\";\n } else if (target.dropPosition === \"on\") {\n if (allowedOperations.includes(\"copy\")) return \"copy\";\n if (allowedOperations.includes(\"move\")) return \"move\";\n } else {\n if (allowedOperations.includes(\"move\")) return \"move\";\n if (allowedOperations.includes(\"copy\")) return \"copy\";\n }\n if (allowedOperations.includes(\"link\")) return \"link\";\n return allowedOperations.find((operation) => operation !== \"cancel\") ?? \"cancel\";\n };\n const getBaseKeyboardNavigationTarget = (\n target: DropTarget | null,\n direction: \"next\" | \"previous\",\n isValidDropTarget: (target: DropTarget) => boolean,\n ): DropTarget | null => {\n const itemCount = dropTargetItemCountResolver()?.() ?? 0;\n if (itemCount <= 0) {\n const rootTarget: DropTarget = { type: \"root\" };\n return isValidDropTarget(rootTarget) ? rootTarget : null;\n }\n\n const resolveCurrentIndex = (currentTarget: DropTarget | null): number | null => {\n if (!currentTarget || currentTarget.type === \"root\") return null;\n const resolver = dropTargetIndexResolver();\n if (resolver) {\n const fromResolver = resolver(currentTarget.key);\n if (fromResolver != null && fromResolver >= 0 && fromResolver < itemCount)\n return fromResolver;\n return null;\n }\n if (\n typeof currentTarget.key === \"number\" &&\n currentTarget.key >= 0 &&\n currentTarget.key < itemCount\n ) {\n return currentTarget.key;\n }\n return null;\n };\n const getCurrentIndex = (currentTarget: DropTarget | null): number => {\n if (!currentTarget || currentTarget.type === \"root\") {\n return direction === \"next\" ? -1 : itemCount;\n }\n const resolvedIndex = resolveCurrentIndex(currentTarget);\n if (resolvedIndex != null) return resolvedIndex;\n return direction === \"next\" ? -1 : itemCount;\n };\n const tryCurrentItemTransition = (currentTarget: DropTarget | null): DropTarget | null => {\n if (!currentTarget || currentTarget.type !== \"item\") return null;\n const tryPosition = (position: \"before\" | \"on\" | \"after\"): DropTarget | null => {\n if (currentTarget.dropPosition === position) return null;\n const nextTarget: DropTarget = {\n type: \"item\",\n key: currentTarget.key,\n dropPosition: position,\n };\n return isValidDropTarget(nextTarget) ? nextTarget : null;\n };\n\n if (direction === \"next\") {\n if (currentTarget.dropPosition === \"before\") {\n return tryPosition(\"on\") ?? tryPosition(\"after\");\n }\n if (currentTarget.dropPosition === \"on\") {\n return tryPosition(\"after\");\n }\n } else {\n if (currentTarget.dropPosition === \"after\") {\n return tryPosition(\"on\") ?? tryPosition(\"before\");\n }\n if (currentTarget.dropPosition === \"on\") {\n return tryPosition(\"before\");\n }\n }\n\n return null;\n };\n const scanFromIndex = (\n startIndex: number,\n step: number,\n directionForInsertion: \"next\" | \"previous\",\n ): DropTarget | null => {\n for (let index = startIndex; index >= 0 && index < itemCount; index += step) {\n const onTarget = tryTarget(index, \"on\");\n if (onTarget) return onTarget;\n\n const insertionOrder: Array<\"before\" | \"after\"> =\n directionForInsertion === \"next\" ? [\"before\", \"after\"] : [\"after\", \"before\"];\n for (const position of insertionOrder) {\n const insertionTarget = tryTarget(index, position);\n if (insertionTarget) return insertionTarget;\n }\n }\n return null;\n };\n const findNavigationTarget = (currentIndex: number, step = 1): DropTarget | null => {\n const delta = direction === \"next\" ? 1 : -1;\n const stepSize = Math.max(1, step);\n const nextStart = currentIndex + delta * stepSize;\n const clampedStart = Math.max(0, Math.min(itemCount - 1, nextStart));\n if (nextStart < 0 || nextStart >= itemCount) {\n const rootTarget: DropTarget = { type: \"root\" };\n return isValidDropTarget(rootTarget) ? rootTarget : null;\n }\n const primaryTarget = scanFromIndex(clampedStart, delta, direction);\n if (primaryTarget) return primaryTarget;\n const oppositeDirection: \"next\" | \"previous\" = direction === \"next\" ? \"previous\" : \"next\";\n const oppositeTarget = scanFromIndex(clampedStart - delta, -delta, oppositeDirection);\n if (oppositeTarget) return oppositeTarget;\n\n const rootTarget: DropTarget = { type: \"root\" };\n return isValidDropTarget(rootTarget) ? rootTarget : null;\n };\n const tryTarget = (index: number, position: \"on\" | \"before\" | \"after\"): DropTarget | null => {\n const layoutInfo = getLayoutInfo(index);\n const virtualTarget = getDropTargetFromPoint(\n {\n x: layoutInfo.rect.x + 1,\n y: layoutInfo.rect.y + layoutInfo.rect.height / 2,\n },\n itemCount,\n );\n if (!virtualTarget || virtualTarget.type === \"root\") return null;\n const nextTarget = toCollectionDropTarget({ ...virtualTarget, position });\n return isValidDropTarget(nextTarget) ? nextTarget : null;\n };\n const tryBoundaryTarget = (boundaryDirection: \"next\" | \"previous\"): DropTarget | null => {\n const boundaryIndex = boundaryDirection === \"next\" ? 0 : itemCount - 1;\n const boundaryOrder: Array<\"before\" | \"on\" | \"after\"> =\n boundaryDirection === \"next\" ? [\"before\", \"on\", \"after\"] : [\"after\", \"on\", \"before\"];\n for (const position of boundaryOrder) {\n const candidate = tryTarget(boundaryIndex, position);\n if (candidate) return candidate;\n }\n return null;\n };\n const directTransition =\n resolveCurrentIndex(target) != null ? tryCurrentItemTransition(target) : null;\n if (directTransition) return directTransition;\n if (!target || target.type === \"root\") {\n const boundaryTarget = tryBoundaryTarget(direction);\n if (boundaryTarget) return boundaryTarget;\n const rootTarget: DropTarget = { type: \"root\" };\n return isValidDropTarget(rootTarget) ? rootTarget : null;\n }\n const currentIndex = getCurrentIndex(target);\n const nextStart = currentIndex + (direction === \"next\" ? 1 : -1);\n if (nextStart < 0 || nextStart >= itemCount) {\n const rootTarget: DropTarget = { type: \"root\" };\n if (isValidDropTarget(rootTarget)) return rootTarget;\n const wrappedBoundary = tryBoundaryTarget(direction);\n if (wrappedBoundary) return wrappedBoundary;\n return null;\n }\n return findNavigationTarget(currentIndex, 1);\n };\n const getKeyboardNavigationTarget = (\n target: DropTarget | null,\n direction: \"next\" | \"previous\",\n isValidDropTarget: (target: DropTarget) => boolean,\n ): DropTarget | null => {\n // If a collection component (e.g. Tree) has installed a keyboard navigation override,\n // delegate to it. This enables collection-aware navigation (tree branch traversal, etc.).\n const override = keyboardNavigationOverride();\n if (override) {\n return override(target, direction, isValidDropTarget);\n }\n return getBaseKeyboardNavigationTarget(target, direction, isValidDropTarget);\n };\n const getKeyboardPageNavigationTarget = (\n target: DropTarget | null,\n direction: \"next\" | \"previous\",\n isValidDropTarget: (target: DropTarget) => boolean,\n ): DropTarget | null => {\n const itemCount = dropTargetItemCountResolver()?.() ?? 0;\n if (itemCount <= 0) {\n const rootTarget: DropTarget = { type: \"root\" };\n return isValidDropTarget(rootTarget) ? rootTarget : null;\n }\n if (!target || target.type === \"root\") {\n const startIndex = direction === \"next\" ? 0 : itemCount - 1;\n const delta = direction === \"next\" ? 1 : -1;\n const boundaryOrder: Array<\"before\" | \"on\" | \"after\"> =\n direction === \"next\" ? [\"before\", \"on\", \"after\"] : [\"after\", \"on\", \"before\"];\n for (let index = startIndex; index >= 0 && index < itemCount; index += delta) {\n const layoutInfo = getLayoutInfo(index);\n const virtualTarget = getDropTargetFromPoint(\n {\n x: layoutInfo.rect.x + 1,\n y: layoutInfo.rect.y + layoutInfo.rect.height / 2,\n },\n itemCount,\n );\n if (!virtualTarget || virtualTarget.type === \"root\") continue;\n for (const position of boundaryOrder) {\n const candidate = toCollectionDropTarget({ ...virtualTarget, position });\n if (isValidDropTarget(candidate)) return candidate;\n }\n }\n const rootTarget: DropTarget = { type: \"root\" };\n return isValidDropTarget(rootTarget) ? rootTarget : null;\n }\n const resolver = dropTargetIndexResolver();\n const resolvedIndex = resolver?.(target.key);\n const currentIndex =\n resolvedIndex != null\n ? resolvedIndex\n : resolver\n ? direction === \"next\"\n ? -1\n : itemCount\n : typeof target.key === \"number\"\n ? target.key\n : direction === \"next\"\n ? -1\n : itemCount;\n const pageSize = Math.max(1, Math.floor(mainViewportSize() / Math.max(1, itemSize())));\n const delta = direction === \"next\" ? 1 : -1;\n const nextStart = currentIndex + delta * pageSize;\n const clampedStart = Math.max(0, Math.min(itemCount - 1, nextStart));\n const tryTarget = (index: number, position: \"on\" | \"before\" | \"after\"): DropTarget | null => {\n const layoutInfo = getLayoutInfo(index);\n const virtualTarget = getDropTargetFromPoint(\n {\n x: layoutInfo.rect.x + 1,\n y: layoutInfo.rect.y + layoutInfo.rect.height / 2,\n },\n itemCount,\n );\n if (!virtualTarget || virtualTarget.type === \"root\") return null;\n const nextTarget = toCollectionDropTarget({ ...virtualTarget, position });\n return isValidDropTarget(nextTarget) ? nextTarget : null;\n };\n const scanFromIndex = (startIndex: number, step: number): DropTarget | null => {\n const insertionOrder: Array<\"before\" | \"after\"> =\n step > 0 ? [\"before\", \"after\"] : [\"after\", \"before\"];\n for (let index = startIndex; index >= 0 && index < itemCount; index += step) {\n const onTarget = tryTarget(index, \"on\");\n if (onTarget) return onTarget;\n for (const position of insertionOrder) {\n const insertionTarget = tryTarget(index, position);\n if (insertionTarget) return insertionTarget;\n }\n }\n return null;\n };\n if (nextStart < 0 || nextStart >= itemCount) {\n if (direction === \"next\") {\n const endBoundaryTarget =\n tryTarget(itemCount - 1, \"after\") ??\n tryTarget(itemCount - 1, \"on\") ??\n tryTarget(itemCount - 1, \"before\");\n if (endBoundaryTarget) return endBoundaryTarget;\n const backwardFallback = scanFromIndex(itemCount - 1, -1);\n if (backwardFallback) return backwardFallback;\n } else {\n if (currentIndex <= 0) {\n const rootTarget: DropTarget = { type: \"root\" };\n if (isValidDropTarget(rootTarget)) return rootTarget;\n }\n const startBoundaryTarget =\n tryTarget(0, \"before\") ?? tryTarget(0, \"on\") ?? tryTarget(0, \"after\");\n if (startBoundaryTarget) return startBoundaryTarget;\n const forwardFallback = scanFromIndex(0, 1);\n if (forwardFallback) return forwardFallback;\n }\n\n const rootTarget: DropTarget = { type: \"root\" };\n return isValidDropTarget(rootTarget) ? rootTarget : null;\n }\n const primaryTarget = scanFromIndex(clampedStart, delta);\n if (primaryTarget) return primaryTarget;\n const oppositeTarget = scanFromIndex(clampedStart - delta, -delta);\n if (oppositeTarget) return oppositeTarget;\n\n const rootTarget: DropTarget = { type: \"root\" };\n return isValidDropTarget(rootTarget) ? rootTarget : null;\n };\n\n const contextValue = createMemo<VirtualizerContextValue<O>>(() => ({\n layout: resolvedLayout(),\n layoutOptions: resolvedLayoutOptions(),\n isVirtualized: true,\n orientation: orientation(),\n getVisibleRange,\n getLayoutInfo,\n getContentSize,\n updateItemSize,\n getDropTargetFromPoint,\n setDropTargetResolver: assignDropTargetResolver,\n setDropTargetItemCountResolver: assignDropTargetItemCountResolver,\n setDropTargetIndexResolver: assignDropTargetIndexResolver,\n setDropOperationResolver: assignDropOperationResolver,\n setKeyboardNavigationOverride: assignKeyboardNavigationOverride,\n getBaseKeyboardNavigationTarget,\n }));\n const collectionRenderer = createMemo<CollectionRendererContextValue<unknown>>(() => ({\n renderItem: (item) => item as JSX.Element,\n isVirtualized: true,\n layoutDelegate: resolvedLayout(),\n dropTargetDelegate: {\n getDropTargetFromPoint: getCollectionDropTargetFromPoint,\n getDropOperation: getCollectionDropOperation,\n getKeyboardNavigationTarget,\n getKeyboardPageNavigationTarget,\n },\n renderDropIndicator: local.renderDropIndicator,\n CollectionRoot,\n CollectionBranch,\n }));\n\n const scrollRuntime: VirtualizerScrollRuntime = {\n setScrollOffset,\n setScrollOffsetX,\n setViewportOffset,\n setWindowViewportSize,\n setMeasuredViewportSize,\n setMeasuredViewportWidth,\n allowsWindowScrolling,\n };\n\n // RAC `Virtualizer.tsx:71-96`: context-only — no DOM. The collection element\n // is the scroller; CollectionRoot owns useScrollView against that ref.\n return (\n <CollectionRendererContext value={collectionRenderer()}>\n <VirtualizerContext value={contextValue()}>\n <VirtualizerOptionsContext\n value={{\n layout: resolvedLayout() as VirtualizerLayout<unknown>,\n layoutOptions: resolvedLayoutOptions(),\n shouldObserveItemSize: local.shouldObserveItemSize,\n allowsWindowScrolling: allowsWindowScrolling(),\n }}\n >\n <VirtualizerScrollRuntimeContext value={scrollRuntime}>\n {local.children}\n </VirtualizerScrollRuntimeContext>\n </VirtualizerOptionsContext>\n </VirtualizerContext>\n </CollectionRendererContext>\n );\n}\n\nfunction resolveScrollRef(\n scrollRef: CollectionRootProps<unknown>[\"scrollRef\"],\n): HTMLElement | null {\n if (!scrollRef) return null;\n return scrollRef() ?? null;\n}\n\n/**\n * RAC `Virtualizer.tsx:99-151` CollectionRoot: owns virtualizer scroll against\n * `scrollRef` (the collection element) and renders the single content div.\n */\nfunction CollectionRoot<T>(props: CollectionRootProps<T>): JSX.Element {\n const virtualizer = useVirtualizerContext();\n const runtime = useContext(VirtualizerScrollRuntimeContext);\n\n const scrollView = createScrollView({\n getScrollElement: () => resolveScrollRef(props.scrollRef),\n allowsWindowScrolling: () => runtime?.allowsWindowScrolling() ?? true,\n onScrollPositionChange: (position) => {\n runtime?.setScrollOffset(position.y);\n runtime?.setScrollOffsetX(position.x);\n },\n onViewportOffsetChange: (offset) => runtime?.setViewportOffset(offset),\n onSizeChange: (size) => {\n runtime?.setMeasuredViewportSize(size.height);\n runtime?.setMeasuredViewportWidth(size.width);\n },\n onWindowViewportChange: (height) => runtime?.setWindowViewportSize(height),\n });\n\n const itemCount = () => {\n try {\n return Array.from(props.collection ?? []).length;\n } catch {\n return 0;\n }\n };\n\n const range = createMemo(() => {\n if (!virtualizer) return null;\n const count = itemCount();\n if (count <= 0) return null;\n // Geometry window only. Persisted focused keys render as absolutely\n // positioned extras (PersistedVirtualItem) so scrollHeight stays the\n // content extent. RAC VirtualizerItem does the same with layoutInfo.\n return virtualizer.getVisibleRange(count);\n });\n\n // Keep collection getter allocations in a stable owner, independent of the\n // wrapper's hydration-key order.\n const contentProps = createMemo<JSX.HTMLAttributes<HTMLDivElement>>(() => {\n const base = scrollView.contentProps();\n const nextRange = range();\n const count = itemCount();\n const size = virtualizer && count > 0 ? virtualizer.getContentSize(count) : null;\n const horizontal = virtualizer?.orientation === \"horizontal\";\n const padStart = nextRange?.offsetTop ?? 0;\n const padEnd = nextRange?.offsetBottom ?? 0;\n // RAC `useScrollView` sizes the content div from `contentSize`. Windowing\n // spacers stay so in-flow collections (GridList) still skip scrolled-off\n // rows; `box-sizing: border-box` keeps that padding inside contentSize so\n // absolute VirtualizerItem coordinates and the scroll extent agree.\n return {\n ...base,\n style: {\n ...(base.style as JSX.CSSProperties | undefined),\n position: \"relative\",\n \"box-sizing\": \"border-box\",\n ...(size && size.width > 0 ? { width: `${size.width}px` } : null),\n ...(size && size.height > 0 ? { height: `${size.height}px` } : null),\n ...(horizontal\n ? { \"padding-left\": `${padStart}px`, \"padding-right\": `${padEnd}px` }\n : { \"padding-top\": `${padStart}px`, \"padding-bottom\": `${padEnd}px` }),\n },\n };\n });\n\n return (\n <div {...contentProps()}>\n {props.children ??\n DefaultCollectionRenderer.CollectionRoot({\n collection: props.collection,\n renderDropIndicator: props.renderDropIndicator,\n })}\n </div>\n );\n}\n\nfunction CollectionBranch<T>(props: CollectionBranchProps<T>): JSX.Element {\n return DefaultCollectionRenderer.CollectionBranch(props);\n}\n\n/**\n * RAC `layoutInfoToStyle` (`react-aria/src/virtualizer/VirtualizerItem.tsx`).\n * ListLayout sets `allowOverflow`, so overflow stays visible.\n */\nexport function layoutInfoToStyle(layoutInfo: LayoutInfo, dir: \"ltr\" | \"rtl\"): JSX.CSSProperties {\n const xProperty = dir === \"rtl\" ? \"right\" : \"left\";\n return {\n position: \"absolute\",\n overflow: \"visible\",\n contain: \"size layout style\",\n \"z-index\": 0,\n top: `${layoutInfo.rect.y}px`,\n [xProperty]: `${layoutInfo.rect.x}px`,\n width: `${layoutInfo.rect.width}px`,\n height: `${layoutInfo.rect.height}px`,\n };\n}\n\n/**\n * RAC VirtualizerItem (`react-aria/src/virtualizer/VirtualizerItem.tsx` +\n * `layoutInfoToStyle`) wraps every visible view in `role=\"presentation\"` with\n * `contain: size layout style` and a definite width/height from layoutInfo.\n * Pass `index` so the item is absolutely positioned; without it the wrapper\n * stays in-flow (GridList still windows with CollectionRoot padding spacers).\n * jsdom reports 0 for unstyled offsetHeight; skip containment then so\n * collection tests keep seeing the children.\n */\nexport function VirtualizerItem(props: {\n children: JSX.Element;\n index?: number | Accessor<number>;\n}): JSX.Element {\n const virtualizer = useVirtualizerContext();\n const options = useContext(VirtualizerOptionsContext);\n const locale = useLocale();\n const [box, setBox] = createSignal<{ width: number; height: number } | null>(null);\n const [el, setEl] = createSignal<HTMLDivElement | null>(null);\n const resolvedIndex = (): number | null => {\n const value = props.index;\n if (value == null) return null;\n return typeof value === \"function\" ? value() : value;\n };\n const layout = (): LayoutInfo | null => {\n const index = resolvedIndex();\n if (index == null || !virtualizer) return null;\n return virtualizer.getLayoutInfo(index);\n };\n\n createTrackedEffect(() => {\n const _s2Cleanups: Array<() => void> = [];\n\n const node = el();\n if (!node) return;\n const info = layout();\n const index = resolvedIndex();\n\n const measureIndexed = () => {\n if (info == null || index == null || !virtualizer) return;\n // RAC useVirtualizerItem.ts:37-42 — a hidden collection reports 0 and\n // then never recovers when shown. Skip the write.\n if (!isElementVisible(node)) return;\n if (!info.estimatedSize && !options?.shouldObserveItemSize) return;\n const prevHeight = node.style.height;\n const prevWidth = node.style.width;\n const prevContain = node.style.contain;\n node.style.contain = \"\";\n node.style.height = \"\";\n node.style.width = \"\";\n const width = node.scrollWidth;\n const height = node.scrollHeight;\n node.style.height = prevHeight;\n node.style.width = prevWidth;\n node.style.contain = prevContain;\n if (height <= 0 || width <= 0) return;\n const main = virtualizer.orientation === \"horizontal\" ? width : height;\n virtualizer.updateItemSize(index, main);\n };\n\n if (info != null && index != null && virtualizer) {\n // RAC layout effect: estimated rows measure once even when observation\n // is off. Two rAFs cover jsdom's first 0-height layout.\n if (info.estimatedSize) {\n measureIndexed();\n const frame = requestAnimationFrame(() => {\n measureIndexed();\n requestAnimationFrame(measureIndexed);\n });\n _s2Cleanups.push(() => cancelAnimationFrame(frame));\n }\n // RAC ResizeObserver on the wrapper's direct children, not the wrapper\n // (`useVirtualizerItem.ts:63-87`). The wrapper height is layout-fixed.\n if (options?.shouldObserveItemSize && typeof ResizeObserver !== \"undefined\") {\n const resizeObserver = new ResizeObserver(() => measureIndexed());\n for (const child of node.children) {\n resizeObserver.observe(child);\n }\n _s2Cleanups.push(() => resizeObserver.disconnect());\n }\n // A tracked effect's cleanup is its return value; a bare return here\n // would strand the frame and the observer registered above.\n return () => {\n for (const c of _s2Cleanups) c();\n };\n }\n\n const readBox = () => {\n const child = node.firstElementChild as HTMLElement | null;\n const height = child?.offsetHeight ?? 0;\n const width = node.clientWidth;\n if (height <= 0 || width <= 0) return;\n setBox((current) => {\n if (current?.width === width && current.height === height) return current;\n return { width, height };\n });\n };\n readBox();\n const frame = requestAnimationFrame(() => {\n readBox();\n requestAnimationFrame(readBox);\n });\n _s2Cleanups.push(() => cancelAnimationFrame(frame));\n\n return () => {\n for (const c of _s2Cleanups) c();\n };\n });\n\n const style = (): JSX.CSSProperties => {\n const info = layout();\n if (info) return layoutInfoToStyle(info, locale().direction);\n return {\n position: \"relative\",\n \"z-index\": 0,\n overflow: \"visible\",\n contain: box() ? \"size layout style\" : undefined,\n width: \"100%\",\n height: box() ? `${box()!.height}px` : undefined,\n };\n };\n\n return (\n <div role=\"presentation\" ref={setEl} style={style()}>\n {props.children}\n </div>\n );\n}\n\n/**\n * RAC VirtualizerItem lays persisted (focused / drop-target) views with\n * layoutInfo absolute coordinates so they stay mounted off-screen without\n * expanding the in-flow window or the content extent.\n */\nexport function PersistedVirtualItem(props: { index: number; children: JSX.Element }): JSX.Element {\n const virtualizer = useVirtualizerContext();\n const layout = () => virtualizer?.getLayoutInfo(props.index);\n const horizontal = () => virtualizer?.orientation === \"horizontal\";\n return (\n <div\n data-persisted-virtual-item=\"\"\n style={{\n position: \"absolute\",\n top: horizontal() ? 0 : `${layout()?.rect.y ?? 0}px`,\n left: horizontal() ? `${layout()?.rect.x ?? 0}px` : 0,\n width: layout()?.rect.width ? `${layout()?.rect.width}px` : undefined,\n height: layout()?.rect.height ? `${layout()?.rect.height}px` : undefined,\n }}\n >\n {props.children}\n </div>\n );\n}\n\nexport { ListLayout, GridLayout, WaterfallLayout, TableLayout };\n\nexport type {\n VirtualizerVisibleRange,\n VirtualizerRangeContext,\n DefaultVirtualizerLayoutOptions,\n GridLayoutOptions,\n WaterfallLayoutOptions,\n VirtualizerDropTarget,\n LayoutInfo,\n Orientation,\n Rect,\n Size,\n Point,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgKA,SAAS,WACP,WACA,OACA,KACA,UACyB;CACzB,MAAM,YAAY,KAAK,IAAI,GAAG,KAAK,IAAI,OAAO,SAAS,CAAC;CACxD,MAAM,UAAU,KAAK,IAAI,WAAW,KAAK,IAAI,KAAK,SAAS,CAAC;CAC5D,OAAO;EACL,OAAO;EACP,KAAK;EAGL,WAAW,YAAY;EACvB,cAAc,KAAK,IAAI,IAAI,YAAY,WAAW,QAAQ;CAC5D;AACF;;;;;;AAOA,SAAgB,uBAAuB,SAGrC;CACA,MAAM,QAAQ,SAAS,WAAW,SAAS,aAAa,SAAS;CACjE,IAAI,SAAS,QAAQ,OAAO,SAAS,KAAK,GACxC,OAAO;EAAE,MAAM,KAAK,IAAI,GAAG,KAAK;EAAG,WAAW;CAAM;CAEtD,MAAM,YAAY,SAAS,oBAAoB,SAAS;CACxD,IAAI,aAAa,QAAQ,OAAO,SAAS,SAAS,GAChD,OAAO;EAAE,MAAM,KAAK,IAAI,GAAG,SAAS;EAAG,WAAW;CAAK;CAEzD,OAAO;EAAE,MAAM;EAAI,WAAW;CAAM;AACtC;AAEA,SAAgB,mBAAmB,SAAmD;CACpF,OAAO,uBAAuB,OAAO,CAAC,CAAC;AACzC;AAEA,SAAgB,4BACd,WACA,cACA,cACA,UACA,UACA,UAAU,GACe;CACzB,IAAI,aAAa,GAAG,OAAO;EAAE,OAAO;EAAG,KAAK;EAAG,WAAW;EAAG,cAAc;CAAE;CAC7E,MAAM,eAAe,KAAK,IAAI,GAAG,QAAQ;CACzC,MAAM,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OAAO,CAAC,EAAE,KAAK,KAAK,EAAE;EACjD,MAAM,WAAW,IAAI,GAAG,OAAO,CAAC,EAAE,KAAK,KAAK,EAAE,MAAM;EACpD,OAAO,OAAO,CAAC,EAAE,KAAK,QAAQ,GAAG,OAAO,CAAC,EAAE,KAAK,MAAM,MAAM,KAAA;EAC5D,QAAQ,OAAO,CAAC,EAAE,KAAK,SAAS,GAAG,OAAO,CAAC,EAAE,KAAK,OAAO,MAAM,KAAA;CACjE,GACD;OACE,MAAM,SAAS;IAClB,EAAE;AAEN"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Layout primitives for solidaria-components Virtualizer.
|
|
3
3
|
*
|
|
4
|
-
* These
|
|
4
|
+
* These layout contracts are based on:
|
|
5
|
+
* - packages/react-stately/src/layout/ListLayout.ts
|
|
6
|
+
* - packages/react-stately/src/layout/GridLayout.ts
|
|
7
|
+
* - packages/react-stately/src/layout/TableLayout.ts
|
|
8
|
+
* - packages/react-stately/src/layout/WaterfallLayout.ts
|
|
5
9
|
*/
|
|
6
10
|
export interface Point {
|
|
7
11
|
x: number;
|
|
@@ -27,6 +31,8 @@ export interface LayoutInfo {
|
|
|
27
31
|
key: string | number;
|
|
28
32
|
index: number;
|
|
29
33
|
rect: Rect;
|
|
34
|
+
/** True while this rect still uses `estimatedRowHeight` / `estimatedRowSize`. */
|
|
35
|
+
estimatedSize?: boolean;
|
|
30
36
|
}
|
|
31
37
|
export interface VirtualizerVisibleRange {
|
|
32
38
|
start: number;
|
|
@@ -52,11 +58,42 @@ export interface DefaultVirtualizerLayoutOptions {
|
|
|
52
58
|
* @default 'vertical'
|
|
53
59
|
*/
|
|
54
60
|
orientation?: Orientation;
|
|
61
|
+
/**
|
|
62
|
+
* Fixed row size along the primary axis. Alias of RAC `rowSize` / `rowHeight`.
|
|
63
|
+
* Takes precedence over `estimatedRowHeight`.
|
|
64
|
+
*/
|
|
65
|
+
rowSize?: number;
|
|
66
|
+
/** @deprecated Use `rowSize`. */
|
|
67
|
+
rowHeight?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Estimated row size when heights are variable. RAC `estimatedRowSize` /
|
|
70
|
+
* `estimatedRowHeight` — ComboBox/Picker pass `estimatedRowHeight: 32`.
|
|
71
|
+
*/
|
|
72
|
+
estimatedRowSize?: number;
|
|
73
|
+
/** @deprecated Use `estimatedRowSize`. */
|
|
74
|
+
estimatedRowHeight?: number;
|
|
75
|
+
/**
|
|
76
|
+
* Padding around the list along both axes. RAC `ListLayoutOptions.padding`.
|
|
77
|
+
* ComboBox/Picker pass `padding: 8`; the listbox element itself is `padding: 0`.
|
|
78
|
+
*/
|
|
79
|
+
padding?: number;
|
|
80
|
+
/** Gap between items along the primary axis. */
|
|
81
|
+
gap?: number;
|
|
82
|
+
estimatedHeadingSize?: number;
|
|
83
|
+
estimatedHeadingHeight?: number;
|
|
84
|
+
loaderSize?: number;
|
|
85
|
+
loaderHeight?: number;
|
|
55
86
|
}
|
|
56
87
|
export interface GridLayoutOptions extends DefaultVirtualizerLayoutOptions {
|
|
57
88
|
rowHeight?: number;
|
|
58
89
|
columnCount?: number;
|
|
59
90
|
viewportWidth?: number;
|
|
91
|
+
/** Minimum card/item width used to derive `columnCount` when it is omitted. */
|
|
92
|
+
minItemSize?: number;
|
|
93
|
+
/** Maximum card/item width. Consumed by CardView packing. */
|
|
94
|
+
maxItemSize?: number;
|
|
95
|
+
/** Gutter between items. */
|
|
96
|
+
minSpace?: number;
|
|
60
97
|
}
|
|
61
98
|
export interface WaterfallLayoutOptions extends GridLayoutOptions {
|
|
62
99
|
minColumnWidth?: number;
|
|
@@ -79,16 +116,32 @@ export interface VirtualizerDropTarget {
|
|
|
79
116
|
parentKey?: string | number | null;
|
|
80
117
|
level?: number;
|
|
81
118
|
}
|
|
82
|
-
|
|
119
|
+
/**
|
|
120
|
+
* Resolve the primary-axis row size. Fixed `rowSize` / `rowHeight` / `itemSize`
|
|
121
|
+
* win over `estimatedRowHeight`. Default 40 matches the existing Solid fallback
|
|
122
|
+
* (RAC ListLayout defaults to 48 only when neither fixed nor estimated is set).
|
|
123
|
+
*/
|
|
124
|
+
export declare function resolveListRowSizeInfo(options?: DefaultVirtualizerLayoutOptions): {
|
|
125
|
+
size: number;
|
|
126
|
+
estimated: boolean;
|
|
127
|
+
};
|
|
128
|
+
export declare function resolveListRowSize(options?: DefaultVirtualizerLayoutOptions): number;
|
|
129
|
+
export declare function calculateLinearVisibleRange(itemCount: number, scrollOffset: number, viewportSize: number, itemSize: number, overscan: number, padding?: number): VirtualizerVisibleRange;
|
|
83
130
|
export declare class ListLayout {
|
|
131
|
+
/** Measured primary-axis size per index, filled by VirtualizerItem. */
|
|
132
|
+
private measuredMain;
|
|
84
133
|
getVisibleRange(ctx: VirtualizerRangeContext, options?: DefaultVirtualizerLayoutOptions): VirtualizerVisibleRange;
|
|
134
|
+
updateItemSize(index: number, mainSize: number): boolean;
|
|
135
|
+
getContentSize(itemCount: number, context: VirtualizerLayoutInfoContext, options?: DefaultVirtualizerLayoutOptions): Size;
|
|
85
136
|
getLayoutInfo(index: number, context: VirtualizerLayoutInfoContext, options?: DefaultVirtualizerLayoutOptions): LayoutInfo;
|
|
86
137
|
getDropTargetFromPoint(point: Point, itemCount: number, options?: DefaultVirtualizerLayoutOptions): VirtualizerDropTarget | null;
|
|
138
|
+
private offsetForIndex;
|
|
87
139
|
}
|
|
88
140
|
export declare class TableLayout extends ListLayout {
|
|
89
141
|
}
|
|
90
142
|
export declare class GridLayout {
|
|
91
143
|
getVisibleRange(ctx: VirtualizerRangeContext, options?: GridLayoutOptions): VirtualizerVisibleRange;
|
|
144
|
+
getContentSize(itemCount: number, context: VirtualizerLayoutInfoContext, options?: GridLayoutOptions): Size;
|
|
92
145
|
getLayoutInfo(index: number, context: VirtualizerLayoutInfoContext, options?: GridLayoutOptions): LayoutInfo;
|
|
93
146
|
getDropTargetFromPoint(point: Point, itemCount: number, options?: GridLayoutOptions): VirtualizerDropTarget | null;
|
|
94
147
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizerLayouts.d.ts","sourceRoot":"","sources":["../src/VirtualizerLayouts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VirtualizerLayouts.d.ts","sourceRoot":"","sources":["../src/VirtualizerLayouts.ts"],"names":[],"mappings":"AA6BA;;;;;;;;GAQG;AAEH,MAAM,WAAW,KAAK;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,IAAI;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,UAAU,CAAC;AAEpD,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IACX,iFAAiF;IACjF,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC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WAAY,SAAQ,UAAU;CAAG;AAY9C,qBAAa,UAAU;IACrB,eAAe,CACb,GAAG,EAAE,uBAAuB,EAC5B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,uBAAuB;IA0B1B,cAAc,CACZ,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,4BAA4B,EACrC,OAAO,CAAC,EAAE,iBAAiB,GAC1B,IAAI;IAaP,aAAa,CACX,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,4BAA4B,EACrC,OAAO,CAAC,EAAE,iBAAiB,GAC1B,UAAU;IAsBb,sBAAsB,CACpB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,qBAAqB,GAAG,IAAI;CA0BhC;AAED,qBAAa,eAAgB,SAAQ,UAAU;IACpC,eAAe,CACtB,GAAG,EAAE,uBAAuB,EAC5B,OAAO,CAAC,EAAE,sBAAsB,GAC/B,uBAAuB;IAQjB,aAAa,CACpB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,4BAA4B,EACrC,OAAO,CAAC,EAAE,sBAAsB,GAC/B,UAAU;IAQJ,sBAAsB,CAC7B,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,qBAAqB,GAAG,IAAI;CAOhC"}
|
package/dist/VisuallyHidden.d.ts
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
* VisuallyHidden component for solidaria-components
|
|
3
3
|
*
|
|
4
4
|
* Hides content visually but keeps it accessible to screen readers.
|
|
5
|
-
*
|
|
5
|
+
* Solid adaptation of the pinned VisuallyHidden component.
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
8
|
-
|
|
7
|
+
import type { ParentProps } from "solid-js";
|
|
8
|
+
import type { JSX } from "@solidjs/web";
|
|
9
|
+
export interface VisuallyHiddenProps extends ParentProps, Omit<JSX.HTMLAttributes<HTMLElement>, "children"> {
|
|
9
10
|
/** The element type to render. @default 'span' */
|
|
10
11
|
elementType?: keyof JSX.IntrinsicElements;
|
|
11
12
|
/** Whether the element should be focusable when focused. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisuallyHidden.d.ts","sourceRoot":"","sources":["../src/VisuallyHidden.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VisuallyHidden.d.ts","sourceRoot":"","sources":["../src/VisuallyHidden.tsx"],"names":[],"mappings":"AAcA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAKxC,MAAM,WAAW,mBACf,SAAQ,WAAW,EAAE,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;IACtE,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,iBAAiB,CAAC;IAC1C,4DAA4D;IAC5D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,GAAG,CAAC,aAAa,CAAC;CAC3B;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAuBtE"}
|
package/dist/VisuallyHidden.js
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* VisuallyHidden component for solidaria-components
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
6
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
+
// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria/src/visually-hidden/VisuallyHidden.tsx
|
|
13
|
+
import { ElementTag } from "./ElementTag.js";
|
|
14
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
15
|
+
import { createVisuallyHidden, mergeProps as mergeProps$1 } from "@proyecto-viviana/solidaria";
|
|
16
|
+
import { splitProps } from "@proyecto-viviana/solidaria/utils";
|
|
17
|
+
//#region src/VisuallyHidden.tsx
|
|
12
18
|
/**
|
|
13
19
|
* VisuallyHidden hides its children visually, while keeping content visible to screen readers.
|
|
14
20
|
*/
|
|
@@ -23,8 +29,9 @@ function VisuallyHidden(props) {
|
|
|
23
29
|
style: local.style,
|
|
24
30
|
isFocusable: local.isFocusable
|
|
25
31
|
}));
|
|
26
|
-
const mergedProps = () => mergeProps$
|
|
27
|
-
|
|
32
|
+
const mergedProps = () => mergeProps$1(others, visuallyHiddenProps());
|
|
33
|
+
const tag = local.elementType ?? "span";
|
|
34
|
+
return createComponent(ElementTag, mergeProps({ tag }, mergedProps, { get children() {
|
|
28
35
|
return local.children;
|
|
29
36
|
} }));
|
|
30
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisuallyHidden.js","names":["
|
|
1
|
+
{"version":3,"file":"VisuallyHidden.js","names":["<ElementTag tag={tag} {...mergedProps()}>\n {local.children}\n </ElementTag>"],"sources":["../src/VisuallyHidden.tsx"],"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\n// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria/src/visually-hidden/VisuallyHidden.tsx\n\n/**\n * VisuallyHidden component for solidaria-components\n *\n * Hides content visually but keeps it accessible to screen readers.\n * Solid adaptation of the pinned VisuallyHidden component.\n */\n\nimport type { ParentProps } from \"solid-js\";\nimport type { JSX } from \"@solidjs/web\";\nimport { ElementTag } from \"./ElementTag\";\nimport { createVisuallyHidden, mergeProps } from \"@proyecto-viviana/solidaria\";\nimport { splitProps } from \"@proyecto-viviana/solidaria/utils\";\n\nexport interface VisuallyHiddenProps\n extends ParentProps, Omit<JSX.HTMLAttributes<HTMLElement>, \"children\"> {\n /** The element type to render. @default 'span' */\n elementType?: keyof JSX.IntrinsicElements;\n /** Whether the element should be focusable when focused. */\n isFocusable?: boolean;\n /** Inline style object merged with visually hidden styles. */\n style?: JSX.CSSProperties;\n}\n\n/**\n * VisuallyHidden hides its children visually, while keeping content visible to screen readers.\n */\nexport function VisuallyHidden(props: VisuallyHiddenProps): JSX.Element {\n // Split children so the getter is not read once through `{...mergedProps()}`\n // and again during explicit rendering. Hydration code is sensitive to that.\n const [local, others] = splitProps(props, [\"elementType\", \"isFocusable\", \"style\", \"children\"]);\n const { visuallyHiddenProps } = createVisuallyHidden(() => ({\n style: local.style,\n isFocusable: local.isFocusable,\n }));\n\n const mergedProps = () =>\n mergeProps<Record<string, unknown>>(\n others as unknown as Record<string, unknown>,\n visuallyHiddenProps() as unknown as Record<string, unknown>,\n );\n\n // elementType is read once (structural, not reactive). ElementTag delegates\n // element creation and hydration adoption to Solid 2's native dynamic helper.\n const tag = local.elementType ?? \"span\";\n return (\n <ElementTag tag={tag} {...mergedProps()}>\n {local.children}\n </ElementTag>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAwCA,SAAgB,eAAe,OAAyC;CAGtE,MAAM,CAAC,OAAO,UAAU,WAAW,OAAO;EAAC;EAAe;EAAe;EAAS;CAAU,CAAC;CAC7F,MAAM,EAAE,wBAAwB,4BAA4B;EAC1D,OAAO,MAAM;EACb,aAAa,MAAM;CACrB,EAAE;CAEF,MAAM,oBACJ,aACE,QACA,oBAAoB,CACtB;CAIF,MAAM,MAAM,MAAM,eAAe;CACjC,OACEA,gBAAAA,YAAAA,WAAAA,EAAiB,IAEL,GAFc,aAA1B,EAAA,IAAA,WAAA;EACG,OAAA,MAAM;CACG,EAAA,CAAA,CAAA;AAEhB"}
|