feat: v2.0.0 major refactor with pluggable architecture and 10+ enhancements#64
Open
qmhc wants to merge 11 commits into
Open
feat: v2.0.0 major refactor with pluggable architecture and 10+ enhancements#64qmhc wants to merge 11 commits into
qmhc wants to merge 11 commits into
Conversation
…nd core subpackage export
…gThreshold and Droppable support
…component interactions
…ition updates - getEdgesForHandles: use per-direction CSS selectors so interactjs correctly identifies handle elements and passes event.edges - track resizeCurrX/Y/W/H during resize for smooth position updates - update createStyle() to use tracked coords during resizing - resizeEvent: sync l.x/l.y updates for n/w/nw directions - TODO: placeholder visual jitter during n/w/nw resize
- handleDragOver: check mouse coordinates directly instead of relying on dragover trigger area (ghost image can cover div outside mouse) - handleDragOver: center-align drop placeholder to mouse for natural UX - handleDragLeave: use coordinate check instead of relatedTarget - demo(native-drop): add isDroppable checkbox for quick toggling
…nes in margins - Replace SVG pattern with CSS linear-gradient for cleaner rendering - Move grid lines to margin centers (cellWidth + 1.5*margin) so they don't overlap GridItem boundaries - Clamp cellWidth to 0 in calcGridCellDimensions to prevent negative values - Update demo to render GridItem manually when default slot is used - Update tests to match new div+CSS implementation
- Remove default values from withDefaults for props that participate in config merging (autoSize, colNum, rowHeight, maxRows, margin, isDraggable, isResizable, restoreOnDrag, resizeHandles, isDroppable, dropItem, dragThreshold) - Add effective* computed props that implement flat prop > group config > default value priority - Replace all internal usages of props.xxx with effectiveXxx.value - Update provide(LAYOUT_KEY) to expose merged values to GridItem - Update tests to verify effectiveConfig instead of
✅ Deploy Preview for grid-layout-plus ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…ht se handle BREAKING CHANGE: resizeHandles prop and ResizeHandle type removed. Only bottom-right (se) resize is supported. Left/top resize was unperformant due to compactLayout being called on every resizemove.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Features
verticalCompactor(默认)、horizontalCompactor、noCompactor、fastVerticalCompactor、fastHorizontalCompactor,以及withOverlap()包装器支持元素重叠transformStrategy(默认)、absoluteStrategy、scaledStrategy(scale)gridConfig/dragConfig/resizeConfig/dropConfig分组配置,扁平 prop > 分组 config > 默认值useGridLayout、useResponsiveLayout、useContainerWidth三个组合式函数grid-layout-plus/core入口,导出所有纯函数和类型,支持 Tree-shakingverticalCompactprop,改用:compactor="verticalCompactor"useCssTransformsprop,改用:positionStrategy="transformStrategy"或absoluteStrategytransformScaleprop,改用:positionStrategy="scaledStrategy(scale)"📝 Migration
🐛 Bug Fixes
📚 Documentation
✅ Tests
compactors.spec.ts(46 个测试)position-strategies.spec.ts(16 个测试)composables.spec.ts(15 个测试)config-merge.spec.tsx(10 个测试)drag-threshold.spec.tsx(5 个测试)drop-zone.spec.tsx(7 个测试)grid-background.spec.tsx(8 个测试)grid-item-handles.spec.tsx(3 个测试)🔧 Build
es/+lib/+dist/+core子包全部构建通过Closes #51, closes #38, closes #39, closes #5