@mk-drag-and-drop/react 0.4.0 → 0.4.2
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/README.md +17 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -453,6 +453,18 @@ Preview movement does not trigger full target remeasurement. The app still
|
|
|
453
453
|
commits data on drop, using placement derived from the current preview DOM
|
|
454
454
|
order. React rendering should then reflect the final data.
|
|
455
455
|
|
|
456
|
+
React uses the DOM package placement rules. Same-container sortable preview
|
|
457
|
+
keeps its movement-responsive first-placement behavior: forward movement places
|
|
458
|
+
after a newly active target, backward movement places before, and no
|
|
459
|
+
sortable-axis movement uses the target midpoint. When a sortable item first
|
|
460
|
+
enters a different DOM container, the initial side is based on the pointer
|
|
461
|
+
position against the target midpoint on the sortable axis: above or left of
|
|
462
|
+
midpoint places before, while below or right of midpoint places after.
|
|
463
|
+
Rect-based targeting such as `centerToCenter` still selects the active target;
|
|
464
|
+
cross-container initial preview side follows the pointer. `placementBoundary`
|
|
465
|
+
remains a same-target reversal and hysteresis control after preview placement
|
|
466
|
+
exists; it does not decide the initial side for cross-container sortable entry.
|
|
467
|
+
|
|
456
468
|
Examples may rerender a full list for simplicity, but granular state management,
|
|
457
469
|
external stores, server commits, and imperative rendering strategies are
|
|
458
470
|
compatible. The package does not require React state.
|
|
@@ -552,6 +564,11 @@ DOM registry may narrow measured candidates to relevant sortable item, neighbor,
|
|
|
552
564
|
or container entries before the targeting algorithm runs; the algorithm still
|
|
553
565
|
chooses from that narrowed measured list.
|
|
554
566
|
|
|
567
|
+
The before/after side follows the DOM package sortable placement behavior
|
|
568
|
+
described above, including pointer-vs-midpoint initial placement for
|
|
569
|
+
cross-container entry and `placementBoundary` for later same-target reversal
|
|
570
|
+
behavior.
|
|
571
|
+
|
|
555
572
|
- `lockToXAxis()`
|
|
556
573
|
- `lockToYAxis()`
|
|
557
574
|
- `restrictToContainer(refOrResolver)`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mk-drag-and-drop/react",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "React hooks and provider for the mk drag-and-drop DOM runtime.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://mkramer.dev",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
],
|
|
40
40
|
"sideEffects": false,
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@mk-drag-and-drop/dom": "^0.4.
|
|
42
|
+
"@mk-drag-and-drop/dom": "^0.4.2"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": "^19.0.0"
|