@mk-drag-and-drop/dom 0.4.3 → 0.4.4

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 CHANGED
@@ -374,9 +374,10 @@ sortable axis: above or left of midpoint places before, while below or right of
374
374
  midpoint places after. Pointer-based targeting uses the pointer as that position;
375
375
  rect-based targeting such as `centerToCenter` uses the overlay center.
376
376
 
377
- `placementBoundary` is used after a preview placement already exists to control
378
- same-target reversal and hysteresis thresholds. It does not decide the initial
379
- side for cross-container sortable entry.
377
+ `placementBoundary` is used after a preview placement already has an established
378
+ movement direction to control same-target reversal and hysteresis thresholds. It
379
+ does not decide the initial side for cross-container sortable entry or delay the
380
+ first movement that follows midpoint-based entry into a list.
380
381
 
381
382
  ## Modifiers
382
383
 
@@ -187,7 +187,7 @@ export function getSortablePreviewPlacement(input) {
187
187
  });
188
188
  return {
189
189
  placement,
190
- movementDirection: getMovementDirectionFromPlacementSide(placement),
190
+ movementDirection: "none",
191
191
  };
192
192
  }
193
193
  return {
@@ -256,9 +256,6 @@ function getPlacementSideFromTargetMidpoint(input) {
256
256
  const midpoint = targetStart + targetSize / 2;
257
257
  return input.axisPosition < midpoint ? "before" : "after";
258
258
  }
259
- function getMovementDirectionFromPlacementSide(placement) {
260
- return placement === "before" ? "backward" : "forward";
261
- }
262
259
  function getCurrentAxisMovementDirection(input) {
263
260
  const axisPosition = getAxisPosition(input.placementPosition, input.axis);
264
261
  const previousAxisPosition = input.movement
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mk-drag-and-drop/dom",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "Headless DOM drag-and-drop primitives for draggable, droppable, sortable, and grouped interactions.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://mkramer.dev",