feat: Add overlap detection plugin with visual helpers and performance optimizations#233
Conversation
🦋 Changeset detectedLatest commit: 5dae68f The changes in this PR will be included in the next version bump. This PR includes no changesetsWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@aayushchouhan24 is attempting to deploy a commit to the Purus Projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Hi @PuruVJ , I hope you're doing well! Just wanted to follow up on the overlap detection plugin PR. I've put significant effort into this feature and believe it would be a valuable addition to neodrag. Would you be able to review it when you have a moment? If any changes are needed, I'm available to make adjustments quickly. Thanks for your time! Best regards, |
|
Hey Ayush, thanks for contributing. I work on Open source stuff like this in my free time and in cycles, and am not focusing on neodrag for the current cycle. I will gladly review and merge this into core after a thorough inspection, which might take some time. Please have some patience :) Thanks! |
|
Hi @PuruVJ , Thank you for getting back to me! I completely understand open source work takes time, and priorities can shift. I appreciate you letting me know, and I’m happy to wait for your review whenever your schedule allows. If you have any questions or need further info when you get to it, feel free to tag me. Thanks again for maintaining neodrag and for your openness! Best, |
|
Hi @PuruVJ , Hope you’re doing well! I wanted to follow up on the overlap detection plugin PR. I know open source work often happens in cycles, but I’m really excited about this feature and believe it could bring a lot of value to neodrag users. If it helps, I can provide additional examples, benchmarks, or documentation to make the review process quicker. My goal is to make this as easy as possible for you so it can be reviewed and merged when feasible. Thanks again for your time and for all the effort you put into maintaining neodrag — it’s greatly appreciated! Best regards, |
🎯 Overview
This PR introduces a new overlap detection plugin that enables real-time detection when draggable elements intersect with other elements on the page. The plugin provides comprehensive event callbacks, visual debugging helpers, and performance optimizations for smooth user experiences.
✨ Features Added
Core Functionality
onOverlapStart,onOverlapEnd, andonOverlapUpdatecallbacksVisual Debugging
Performance Optimizations
🚀 Usage Examples
Basic Implementation
Advanced Configuration
📋 Implementation Details
📚 Documentation
/docs/src/content/plugin/13-overlap/+page.mdx🎮 Demo Integration
🛠 Technical Highlights
Observer-Based Optimization
Ultra-Fast Collision Detection
🔧 Configuration Options
targetsstring | string[] | HTMLElement[]undefinedthresholdnumber0.01oncePerTargetbooleantruecheckFrequencynumber | 'frame''frame'showOverlapShowOverlapConfig{ enabled: false }🎯 Use Cases
✅ Testing
🏗 Future Enhancements
Developed and maintained by Sheryians
Author: Aayush Chouhan