Releases: nuclearpasta/react-native-drax
Releases · nuclearpasta/react-native-drax
v1.1.0
Added
- Mixed-size grid support:
getItemSpanprop onuseSortableList/DraxList— return{ colSpan, rowSpan }per item for variable-width/height sortable grids packGridutility: bin-packing algorithm that places items left-to-right, top-to-bottom into a 2D occupancy grid — exported fromreact-native-draxfor computing grid positions in render functions- ScrollView auto-scroll:
SortableContainernow supportsScrollViewin addition toFlatList/FlashList/LegendListfor auto-scrolling during drag - Hover position reset: hover content now strips positioning styles (
position,left,top,right,bottom) and margins — prevents double-displacement when items useposition: 'absolute'with offsets
Fixed
- npm homepage now correctly points to the documentation site
- Color drag-drop example: centered snap alignment on drop
Changed
- Updated branding to NuclearPasta across docs site and example app (logos, favicons, social cards)
- Example app now includes 11 screens (added mixed-size grid example)
- Corrected Reanimated and Gesture Handler version numbers in documentation comparison tables
v1.0.0
Complete rewrite of the library. This is a major release with breaking changes from all prior versions.
Architecture
- Rewritten on Reanimated 4 and Gesture Handler 3 (beta)
- UI-thread-first architecture: spatial index worklet for hit-testing, SharedValues split by update frequency
- New Architecture (Fabric) compatible
- Web platform support
- Single
HoverLayer, per-view gesture handlers - Gesture Handler v2 supported via compatibility layer (v3 recommended for best performance)
Added
- List-agnostic sortable API:
useSortableListhook +SortableContainer+SortableItemcomposable primitives — works with FlatList, FlashList, LegendList, or any list component DraxListconvenience wrapper: list-agnostic sortable list withcomponentprop to swap list implementations- Cross-container sortable (experimental):
useSortableBoard+SortableBoardContainerfor cross-list reorder patterns - Drag handles:
DraxHandlecomponent +dragHandleprop — only the handle area starts a drag - Drag bounds:
dragBoundsRefprop constrains drags within a boundary view - Collision algorithms:
collisionAlgorithmprop —'center'(default),'intersect','contain' - Drop zone acceptance:
acceptsDragconvenience prop +dynamicReceptiveCallbackfor conditional drop acceptance - Hover styles: 5 hover-specific style props —
hoverStyle,hoverDraggingStyle,hoverDraggingWithReceiverStyle,hoverDraggingWithoutReceiverStyle,hoverDragReleasedStyle - Snap alignment:
snapToAlignment()utility for 9-point alignment within receivers - Animation presets:
'default','spring','gentle','snappy','none'— plus custom spring/timing config - Continuous drag callbacks:
onDrag,onDragOver,onReceiveDragOverfire every gesture frame - Accessibility: auto-generated
accessibilityLabel/accessibilityHinton sortable items,useReducedMotion()support - Namespace API:
import { Drax } from 'react-native-drax'forDrax.View,Drax.Provider, etc. - Drop indicator support:
renderDropIndicatorprop onSortableContainer - Insert + swap reorder strategies
- 10 example screens in the bundled Expo Router example app
Changed
- (BREAKING) Peer dependency:
react-native-reanimated ^4.0.0required - (BREAKING) Peer dependency:
react-native-gesture-handler >=2.0.0required (v3 recommended) - (BREAKING) Peer dependency:
react >=18.0.0required - (BREAKING)
DraxListis completely new — list-agnostic wrapper using the new sortable architecture - (BREAKING)
dynamicReceptiveCallbacksignature changed: receivesdraggedPayloadparameter
Removed
- (BREAKING) Old
DraxListcomponent (v0.10.x API withrenderItemContent/renderHoverContentand v0.11.0-alpha API withrenderItem(info, itemProps)) - (BREAKING)
DraxListItemcomponent — replaced bySortableItem - (BREAKING) All legacy list types:
DraxListProps(old),DraxListItemProps,DraxListDraggedItemData,DraxListOnItemDragStartEventData,DraxListOnItemDragPositionChangeEventData,DraxListOnItemDragEndEventData,DraxListOnItemReorderEventData,DraxListRenderItemContent,DraxListRenderItemHoverContent,DraxListOnItemReorder