All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
2.2.6 (2026-08-12)
- Apply
transitionprop to defaultscaleFly()transition.
- Skip redundant transform/opacity declarations in
scaleFly().
- Keep leading edge still during
scaleFly()custom transition.
- Rename
getCollidingItem()togetCollidingItemRect()for accuracy.
- Distinguish frozen rects from live ones with
Snapshotsuffix.
- Add missing transition duration in “Styled with Tailwind” demo page.
- Updated outdated content in the README.
2.2.5 (2026-07-25)
- Fade dragged item out of bounds when
canRemoveOnDropOutis on in base styles.
- Replace duplicated drag-boundary calculations with
keepWithinBounds. - Simplify
<SortableListItem>getStyleTransform()guards. - Prefer
startsWith/endsWithover includes for prefix/suffix checks. - Convert
portalaction into attachment.
- Stop
canRemoveOnDropOutfrom triggering target clear on drag out. - Stop
targetItem/draggedItemflicker loop on drag out. - Correct
deviceTypedetection on drop.
- Bump svelte peer dependency to
^5.29.0, version which introduced attachments.
- Avoid conflict between bounds and axis decoration in demo pages.
- Align dialog close button with menu button in demo pages.
2.2.4 (2026-07-16)
- Distinguish frozen rects from live ones with
Snapshotsuffix. - Avoid repetition in item translation calculations.
- Simplify translate calculations.
- Recalculate item styles only when necessary.
- Clear target only when dragging outside of the list limits.
- Avoid svelte-check module import error.
- Correctly set select default value in “Interactive elements” page.
2.2.3 (2026-07-07)
- Immediately stop auto-scroll on drop.
- Allow interrupting drop transitions when switching input types (pointer vs. keyboard).
- Clear stale pointermove animation frame before drag cleanup.
- Elevate dragged item above siblings during all keyboard drag states.
2.2.2 (2026-07-05)
- Skip unnecessary layout reads when calculating ghost’s transform.
- Use
$state.rawfor values that are always replaced, not mutated. - Avoid duplicate
getBoundingClientRect()call inscaleFly().
- Unify paired scroll coordinates into objects.
- Prevent concurrent auto-scroll loops from stacking.
- Guard against
nullparentElement inisOrResidesInInteractiveElement().
2.2.1 (2026-07-03)
- Keep the target item updated during all scroll types.
- Improve the
getClosestScrollableAncestor()function guards.
2.2.0 (2026-07-02)
- Allow interrupting any ongoing drop transition so a new drag can be started immediately.
- Update the target item during auto-scroll.
- Update the target item during auto-scroll without re-reading the DOM.
- Clean up the keyboard events handling.
- Add E2E tests for the announcements.
2.1.18 (2026-05-31)
- Increase visibility of the focused outline.
- Allow auto scroll on both axes simultaneously.
- Update the README’s preview image.
- Add a list of limitations to the README.
2.1.17 (2026-05-02)
- Attach drag event listeners to the document to prevent element-level constraints.
- Track
transforminstead ofz-indexto check for the drop transition completion.
- Prevent
lostpointercapturefrom canceling valid drops caused by a race condition in macOS Chromium.
2.1.16 (2026-04-24)
- Throttle
pointermovehandler to reduce its execution frequency. - Remove reactivity from the variables that don’t need it.
- Prevent ghost from freezing on drop (macOS Chromium).
- Reset target item on
pointercancel. - Ensure consistent event listener cleanup on drop.
2.1.15 (2026-04-13)
- Switch to edge-to-center collision detection to improve the predictability of the item swap triggering.
- Set
data-is-between-boundsonly on the dragged item. - Capture transition props at mount time to avoid a
derived_inerterror.
- Remove flakiness in the E2E test for the “Remove item on drop out” page.
2.1.14 (2026-04-02)
- Prevent the context menu from opening on long-press in Chrome for Android.
- Improve README’s header.
2.1.13 (2026-03-06)
- Skip
ptr-predropstate when transition duration is set to0.
- Replace root
refstate with rootrefprop.
- Correct ghost misplacement on drop on mobile.
- Prevent window drag during item drag on mobile Firefox.
- Reduce expected time difference in E2E test for “No transitions” page.
- Remove Netlify configuration file.
- Mark
refprops as bindable. - Simplify Tailwind CSS classes.
- Set background position as fixed in demo pages.
2.1.12 (2026-02-19)
- Expose
<SortableList.Root>ref via bindable prop. - Expose
<SortableList.Item>ref via bindable prop. - Expose
<SortableList.ItemHandle>ref via bindable prop. - Expose
<SortableList.ItemRemove>ref via bindable prop.
2.1.11 (2026-02-18)
- Prevent
dragStateandghostStatefrom breaking after dropping an item when duration is set to0. - Ensure the drag operation completes even if
transitionenddoesn’t fire.
- Adjust E2E tests to drag a minimum of two items.
- Increase the expected time difference to reduce flakiness in the E2E test for the «No transitions» page.
- Add missing await to cursor assertion checks in the E2E tests for the «With handle» page.
- Update the LICENSE to include the current year.
2.1.10 (2026-01-10)
- Allow interaction with interactive elements when their item contains a handle.
- Add E2E tests for the “Interactive items with handle” page.
- Add “Interactive items with handle” demo page.
2.1.9 (2025-11-23)
- Properly ensure even more that
<SortableListGhost>is positioned correctly duringptr-predrop.
2.1.8 (2025-11-22)
- Ensure even more that
<SortableListGhost>is positioned correctly duringptr-predrop. - Prevent ghost flickering on pointer
dragend.
2.1.7 (2025-11-11)
- Ensure
<SortableListGhost>is positioned correctly duringptr-predrop.
- Add the “Styles > CSS frameworks” section REPL examples and to the README.
2.1.6 (2025-10-14)
- Improve “Images” demo page drag visibility.
- Ensure dialog is always centered in “Inside dialog” demo page.
2.1.5 (2025-10-14)
- Adjust “With wrapping” demo page
max-width. - Adjust “Images” demo page
max-widthand add shadow during drag.
2.1.4 (2025-10-14)
- Set
isBetweenBoundsdefault value totrue. - Revert back to solid background color in base styles.
- Add “Images” demo page.
- Add the Netlify badge to the README.
- Generate items with the intended function (
getDefaultItems()) in the “Auto scrolling” demo pages. - Improve the form data handling in the “Custom transitions” and “Dynamic items” demo pages.
- Restore missing CSS color custom property.
2.1.3 (2025-10-07)
- Extend RTL detection (thank you, Daniel Acuña :) (#23).
- Remove link to demo pages hosted on Vercel.
2.1.2 (2025-09-15)
- Prevent possible outdated value for
pointerId.
- Ensure the
lostpointercaptureevent is fired only when necessary. - Remove a repeated call to the
handlePointerAndKeyboardDragEnd()function. - Prevent the ghost from dropping in an outdated target by removing the debounce from the
pointermovehandler.
2.1.1 (2025-09-10)
- Add the correct control type to the
delayprop in demo pages. - Add the missing description for the
delayprop to the in-editor hints.
2.1.0 (2025-09-10)
- Remove the
data-roleattribute from the<SortableList.ItemHandle>and<SortableList.ItemRemove>components.
- Add delay feature.
- Add E2E tests for the “With delay” page.
- Polish the
<SortableList.ItemRemove>type.
- Add “With delay” demo page.
2.0.1 (2025-09-07)
- Extend the
<SortableList.ItemRemove>component to supportrestProps.
- Renovate base styles.
- Switch to the Svelte 5 new objects and arrays
classconversion.
- Prevent item focus when clicking on ghost.
- Update tests to match the latest changes made to the demo pages.
- Upgrade Tailwind to v4.
- Renovate demo pages styles.
- Renovate “Style with Tailwind CSS” demo page.
- Add default values to form fields in the “Interactive items” demo page.
- Correct demo page titles.
2.0.0 (2025-08-30)
- Migrate
<SortableList>to Svelte 5. - Migrate
<SortableListGhost>to Svelte 5. - Migrate
<SortableListItem>to Svelte 5. - Migrate
<SortableListItemHandle>to Svelte 5. - Migrate
<SortableListItemRemove>to Svelte 5. - Switch from Stores + Context API to Classes + Context API for global state management.
- Replace the
textDirectiontype with a native type. - Move render condition inside
<SortableListGhost>. - Increase the default transition duration to
320ms.
- Restrict dragging to the left mouse button only.
- Add the
pointercancelhandler to the dragged item during drag. - Prevent the right-click context menu from opening during drag.
- Prevent the dragged item from being focused during drag (Chromium).
- Attach event listeners to
rootRefto prevent potential memory leaks. - Add a fallback for the
pointerupevent not firing on tap-and-release without movement (Webkit iOS).
- Add test to check that the tabindex in interactive elements is reset after focusing outside of the list.
- Fully check that focused items are actually focused.
- Adjust all tests to make dragging more reliable.
- Reduce flakiness in the “With handle” page cursor test.
- Upgrade dependencies.
- Enable TS error for unread local variables.
- Migrate demo pages to Svelte 5.
- Prevent
<dialog>premature closing (Webkit browsers). - Avoid menus auto-close on window resize.
- Update the README to reflect the latest changes.
1.0.0 (2025-08-22)
- Upgrade dependencies.
- Update the README to describe the use and inspiration of the Compound Component Pattern.
0.17.5 (2025-08-21)
- Add E2E tests for the “Direction horizontal” page.
- Add checks for elements appearance.
- Remove redundant checks.
- Extract states and appearance checks into separate tests for the “Basic” page.
0.17.4 (2025-08-19)
- Align drag states with drag events.
- Adjust the Playwright config to run on Chromium and Mobile Chrome.
- Optimize the auto scrolling container tests for mobile.
- Simplify the conditions for the
getStyleWidth()andgetStyleHeight()functions in<SortableList.Item>. - Make event handlers logic more cohesive.
- Add a fallback timeout to ensure the drag operation completes even if
transitionenddoesn’t fire (also prevents flakiness in several keyboard drag tests).
- Adjust the
scaleFlytransition to work properly whendirectionis set tohorizontal. - Correct wrong calls to
$targetItem. - Add missing event dispatch.
- Prevent item text wrapping in the “Auto scrolling container horizontal” demo page.
- Add full coverage to drag states through Tailwind classes in the «Styled with Tailwind CSS» demo page.
- Make “Styling best practices” in the README more clear.
0.17.3 (2025-08-14)
- Add E2E tests for the “Auto scrolling container” page.
- Add E2E tests for the “Auto scrolling container horizontal” page.
- Adjust the auto scrolling tests to make them more consistent with each other.
- Check that the focused item is still focused after keyboard drop.
- Check for changes on ghost state before drag state.
- Increase maximum duration in the “No transitions” page test.
- Adjust the “Clear target in drag out” and “Remove item on drop out” page tests so they pass on mobile (move the dragged item downwards instead of sideways).
- Ensure
rafIdis cleared on drop (necessary on mobile whentransitionDurationis0ms). - Re-set
itemRectsduring horizontal auto scrolling. - Ensure
scrollableAncestoris always up to date.
- Shorten package test scripts.
- Add “Auto scrolling horizontal” demo page.
- Rename the “Auto scrolling” demo page to “Auto scrolling window”.
- Prevent the layout elements from overflowing the viewport.
- Reduce the layout
min-heightto96svh.
0.17.2 (2025-08-11)
- Add E2E tests for the “No transitions” page.
- Add E2E tests for the “Clear target on drag out” page.
- Add E2E tests for the “Inside dialog” page.
- Add E2E tests for the “Auto scrolling dialog” page.
- Add E2E tests for the “With wrapping” page.
- Add E2E tests for the “RTL” page.
- Adjust the tests logic to make them more consistent with each other.
- Prevent closing the
<dialog>element when pressing the Escape key to cancel a keyboard drag.
- Add more test scripts.
- Capitalize every missing list item text.
- Rename the “No animations” demo page to “No transitions”.
- Rename the “With custom transitions” demo page to Custom transitions”.
- Rename the “With custom announcements” demo page to “Custom announcements”.
0.17.1 (2025-08-11)
- Add more E2E tests for keyboard navigation.
- Revert back to using
childNodeswhen cloning the dragged item content. - Add a missing CSS selector to trigger a drag state change after
kbd-cancel.
0.17.0 (2025-08-10)
- Add base E2E tests.
- Use
childreninstead ofchildNodeswhen cloning the dragged item content. - Improve
ghostRefexistence checks.
- Add Playwright.
- Set up Playwright GitHub actions.
- Update Playwright config to better handle flaky tests.
- Improve feature showcase in the “With boundaries”, “With locked axis” and “With custom transitions” demo pages.
- Replace the vertical bar (
|) with an em dash (—) in the demo page titles. - Capitalize every list item text.
0.16.5 (2025-07-29)
- Shorten the drag states names.
- Rename the ghost states and state data attribute.
- Update the default message of the
<SortableList.Root>slot. - Set every drag state following the same pattern as
pointer-dragging. - Remove unnecessary CSS inline styles in
<SortableListGhost>.
- Reduce the frequency in which the manual focus is triggered.
- Ensure Ghost is fully initialized before pointer-dragging starts (this was causing the transitions for the
<SortableList.Item>content to not be played when a pointer-drag started). - Fully correct the condition for the
data-is-between-boundsattribute in<SortableList.Item>. - Correct the base styles for the
<SortableList.ItemHandle>color transitions.
- Update the demo pages to reflect the latest changes.
- Update the README to reflect the latest changes.
0.16.4 (2025-07-29)
- Support mousewheel scroll during pointer dragging.
- Replace JS with CSS where possible.
- Remove the unnecessary calls to the
getId()function. - Improve and clean up the
<SortableList.ItemHandle>base styles.
- Optimize the
querySelectorAll()argument in thesetInteractiveElementsTabIndex()function.
- Correct the condition for the
data-is-between-boundsattribute in<SortableList.Item>. - Prevent item focus when clicking outside of the item’s handle.
- Add a better safety check to pointer capture release (failing on mobile).
- Avoid having duplicated hashed CSS classes in
<SortableList.Item>ghost. - Prevent item focus when another item is being dragged.
0.16.3 (2025-07-22)
- Ensure pointer capture is released on pointer up.
- Simplify the
getCollidingItem()function.
0.16.2 (2025-07-13)
- Prevent duplicated classes in the
<SortableList.Item>ghost. - Restore the returning transition for the dragged item on drag cancel.
- Create and implement a function to combine CSS classes.
- Fix dark line on the right side of the README’s preview image.
0.16.1 (2025-07-12)
- Rename
ssl-listCSS class tossl-rootfor consistency.
- Update the demo pages to reflect the latest changes.
- Update the README’s preview image.
0.16.0 (2025-07-11)
- Make the
<SortableListGhost>content reactive to state changes. - Combine the 6 drag states into a single one.
- Adjust the components data attributes based on each component’s styling needs.
- Remove the
hasDropMarkerprop from<SortableList.Root>.
- Allow
classandstyleto be passed as props to<SortableList.Root>and<SortableList.Item>. - Allow
styleto be passed as prop and makeclassesreactive in<SortableList.ItemHandle>and<SortableList.ItemRemove>. - Add in-editor hints to props, events, and exposed functions.
- Make the
<SortableListGhost>content reactive to state changes by replacing the cloned draggedItem with the<SortableList.Item>component. - Update and move the components documentation to the top of each file.
- Add “Styled with Tailwind CSS” demo page.
- Update the demo pages to reflect the latest changes.
- Update the README to reflect the latest changes.
0.15.1 (2025-07-11)
- Replace the transition function
scaleFade()withscaleFly()(and remove the first one).
- Move the
<SortableList.Root>outline-offsetdefinition into the base stylesheet.
- Update the README to reflect the latest changes.
0.15.0 (2025-07-04)
- Add transition customization to
<SortableList.Root>. - Add prefix to the CSS custom properties in the base stylesheet.
- Add transitions customization to
<SortableList.Item>. - Expose the
scaleFade()andscaleFly()transition functions.
- Assign a proper default value to announcements.
- Update the demo pages to reflect the latest changes.
- Add “With custom transitions” demo page.
- Update the README to reflect the latest changes.
0.14.1 (2025-07-03)
- Add the
destroyedevent. - Allow for Svelte 5 as a peer dependency.
- Align the
ItemRectshape with theDOMRectshape to stay in line with monomorphism. - Avoid unnecessary coordinates calculations.
- Provide clearer type references in the exposed types and utils.
0.14.0 (2025-06-28)
- Debounce the
pointermovehandler to reduce the frequency in which it is called in<SortableList.Root>. - Avoid unnecessary re-cloning in
<SortableListGhost>. - Move the most common exit conditions to the top in
<SortableList.Item>. - Replace queried root with stored reference.
- Add a few small improvements to utils.
- Rename
itemsDatavariables, stores, functions and types toitemRects.
- Correct reference to
rootRefin<SortableListGhost>hover-over comments.
0.13.2 (2025-06-26)
- Add support for vertical alignment in horizontal wrapping lists.
- Adjust the
<SortableListGhost>transform logic to match the same pattern as in<SortableList.Item>. - Simplify the
<SortableListGhost>and<SortableList.Item>transform calculations. - Unify the
<SortableListGhost>and<SortableList.Item>transform calculations under a couple of common functions:calculateTranslate()andcalculateTranslateWithAlignment().
- Correct the scope of some demo pages styles.
- Correct the fields ids in the “Interactive items” demo page.
0.13.1 (2025-06-20)
- Adjust the dragged item transform to match the same pattern as other related logic.
- Place function declarations above their first usage.
- Correct the
<SortableListGhost>and<SortableList.Item>positioning when wrapping is active.
- Improve the wrapping showcase in the “With wrapping” demo page.
- Correct the wrapping warning in the README.
0.13.0 (2025-06-17)
- Add wrapping support.
- Rename
listReftorootRef,listPropstorootProps, andlistRecttorootRect. - Shrink the
getIntersectionRect()function parameters names fromr1andr2toaandbfor consistency with the other related functions.
- Correct the syntax of the CSS universal selector (
*) in<SortableList.Item>.
- Add the “With wrapping” demo page.
- Generate the demo pages items dynamically.
- Rename
defaultPropstodefaultRootPropsandpropstorootProps. - Update the README to reflect the latest changes.
0.12.8 (2025-06-14)
- Replace
<SortableList.Root>padding with<SortableList.Item>margin. - Switch to a more reliable method to obtain the current item data in
<SortableList.Item>.
- Add in and out transitions to the navigation menu and controls in the demo pages layout.
- Remove unused CSS custom color properties.
0.12.7 (2025-06-09)
- Correct the definition for the
aria-descriptionproperty in theSortableListRootPropstype.
0.12.6 (2025-06-09)
- Adjust the package structure to follow the Compound Pattern.
- Add
sslas suffix for the CSS custom properties.
- Add the available ARIA attributes in the
<SortableList.Root>and<SortableList.Item>components to their props autocomplete.
- Update the demo pages to reflect the latest changes.
- Update the README to reflect the latest changes.
0.12.5 (2025-06-05)
- Adjust the base styles to stretch the list items instead of centering them.
- Revert back to cloning nodes in the
<Ghost>component in order to include text nodes that are not wrapped by an HTML element.
- Replace the default favicon.
0.12.4 (2025-06-04)
- Avoid having an inner container in the
<SortableItem>and<Ghost>components. These were initially added to correctly display the transitions for the<Ghost>component fired onpointerdown. The code was adjusted to simply wait until all the necessary parts are ready before making the<Ghost>’s content visible.
- Set
esm-envas a peer dependency.
- Update the demo pages to reflect the latest changes.
- Avoid full page reload on the “Unstyled” demo page.
- Update the README to reflect the latest changes.
0.12.3 (2025-06-04)
- Correct outdated lockfile.
0.12.2 (2025-06-04)
- Support Svelte outside of SvelteKit by replacing
$app/environmentwithesm-env. SvelteKit #8033.
- Update the LICENSE to include the current year.
0.12.1 (2025-06-03)
- Add screen reader announcements customization.
- Expose
SortableListPropsandSortableItemPropstypes. - Add hover-over comments to all components.
- Improve messages in the
screenReaderText()function and rename it toannounce(). - Improve screen readers support and announcements customization by adjusting ARIA attributes.
- Remove unnecessary CSS custom property from
<SortableItem>:--transition-duration(this one is already inherited from<SortableList>).
- Correct RTL keyboard navigation and screen reader announcements.
- Fix checkbox fields initial value in the demo pages layout controls.
- Add the “RTL” demo page.
- Force a full reload on the “Unstyled” demo page link.
- Add “With custom announcements” demo page.
- Add events handlers to the demo pages layout to close the menu and the controls when the Escape key is pressed and when the window is resized.
- Update the README to reflect the latest changes.
0.12.0 (2025-05-27)
- Replace state CSS classes with data attributes.
- Replace the current
<SortableList>events (sortandremove) with more flexible ones:dragstartdragdropdragend
- Unify the
<IconHandle>and<IconRemove>components under the new<Icon>component. - Add icons as fallback content directly inside the
<Handle>and<Remove>components. - Simplify
canClearTargetOnDragOutandcanRemoveItemOnDropOutprops name tocanClearOnDragOutandcanRemoveOnDropOutin the<SortableList>component. - Remove
swapThresholdprop from the<SortableList>component.
- Reduce
transitionDurationdefault value to240. - Simplify
isCancelingPointerDraggingandisCancelingKeyboardDraggingprops name toisPointerCancelingandisKeyboardCanceling. - Split stores, types and utils into multiple files.
- Replace
structuredClone()withtoSpliced()insortItems()andremoveItem()to avoid an error in Svelte 5.
- Update the demo pages to reflect the latest changes.
- Avoid code repetition for the links and controls in the demo pages layout.
- Correct the
max-heightand add mask to the navigation menu in the demo pages layout. - Replace SCSS with CSS.
- Update the README to reflect the latest changes.
- Smooth the scrolling speed transition by increasing the scrolling speed ratio from
24to32.
0.11.2 (2025-05-24)
- Calculate the scrolling offset based on the scrollable ancestor’s dimensions.
- Smooth the scrolling speed transition by reducing the scrolling speed ratio from
40to24.
0.11.1 (2025-05-19)
- Check if the scrolling element is the document only on init.
- Rename the auto scroll demo pages.
0.11.0 (2025-05-17)
- Add the auto scroll feature (including support for horizontal lists and keyboard navigation).
- Improve the collision detection logic to support auto scroll.
- Add the “Auto scroll” demo page.
- Add the “Auto scroll inside container” demo page.
- Add the “Auto scroll inside dialog” demo page.
- Remove width and height constraints present in the
<main>element of the demo pages layout. - Update the README to reflect the latest changes.
0.10.16 (2025-02-04)
- Avoid preventing click when
<SortableList>or<SortableItem>are locked and the click target is an interactive element.
- Add a minimum height to the layout
<main>section. - Polish “Inside dialog” and “Inside custom dialog” demo pages.
- Update the README to reflect the latest changes.
0.10.15 (2025-01-25)
- Adjust the
<Portal>component to support the HTML native<dialog>element. - Repair the
<Ghost>broken styles.
- Replace the
<Portal>component with theportal()action to remove the wrapping element around<Ghost>.
- Add “Inside dialog” demo page.
- Add “Inside custom dialog” demo page.
- Update the README to reflect the latest changes.
0.10.14 (2025-01-24)
- Create
<Portal>component.
0.10.13 (2025-01-05)
- Remove
<Ghost>contents after dropping an item with a pointing device.
0.10.12 (2025-01-04)
- Display all the children of the dragged item inside
<Ghost>(not just the first one). - Allow touch scrolling when dragging from a
<SortableItem>that contains a<Handle>.
0.10.11 (2024-12-29)
- Retain interactive element values while dragging an item.
0.10.10 (2024-12-11)
- Correct broken demo pages routes.
0.10.9 (2024-12-11)
- Correct imports in a README example.
0.10.8 (2024-10-17)
- Rename the
removestartcustom event torequestremove.
- Add
HomeandEndkeys to keyboard support.
- Rename the
cleanupcustom event toitemfocusout.
- Move the repository link to the top of the navigation and add the package version to the demo layout.
- Reorder the demo layout navigation items.
- Add remove handling to all the demo pages.
- Update the README to reflect the latest changes.
- Avoid controls overlapping with navigation on mobile in demo pages layout.
0.10.7 (2024-10-15)
- Prevent target clearing on drag out by default.
- Rename the
<SortableList>hasRemoveOnDropOutprop tocanRemoveItemOnDropOut.
- Add support for target clearing on drag out:
canClearTargetOnDragOutprop.
- Unify element drop handlings under a single function:
handleElementDrop().
- Prevent sorting after removing has been executed during the pointer drop event.
- Prevent overflow in
<SortableItem>s under the correct conditions. - Prevent locked and disabled items from being focused by a pointing device.
- Add “Clear target on drag out” demo page.
- Update the README to reflect the latest changes.
0.10.6 (2024-10-05)
- Add
not-allowedcursor to disabled items.
- Improve the use of
pointer-events: nonein<SortableList>and<SortableItem>. - Clean up
<SortableItem>style reactive declarations.
- Repair dispatch
removewhen item is dropped outside (whilecanRemoveItemOnDropOutis active) andtransitionDurationis set to0. - Use
transitionDurationas duration value for theintransition of<SortableItem>. - Allow the
<Remove>component click event to be triggered normally. - Keep the
hoverstate appearance consistent for the<Handle>component during drag-and-drop through pointer. - Prevent item overflow during drop out removal while
hasDropMarkeris active. - Handle
<SortableItem>focus in a more reliable way.
0.10.5 (2024-09-29)
- Enforce the
swapThresholdprop to receive a value between0.5and2.
- Update the README to reflect the latest changes.
0.10.4 (2024-09-29)
- Clean up properly after keyboard dragging is canceled or focus is lost.
0.10.3 (2024-09-29)
- Add support for disabled list.
- Add support for locked list.
- Add support for locked items.
- Rename the
hasInteractiveElements()function toisOrResidesInInteractiveElement()and polish it for clarity. - Reduce the number of event listeners by moving
<SortableItem>pointer events to the existing ones in<SortableList>. - Add
has-drop-markerCSS class to<SortableList>. - Handle
<SortableItem>visibility throughopacityinline style (instead ofvisibility).
- Prevent focus loss of the selected
<SortableItem>after dropping it with the keyboard.
- Add “Disabled list” demo page.
- Add “Locked list” demo page.
- Add “Locked items” demo page.
- Add the repository link to the demo layout.
- Update the README to reflect the latest changes.
0.10.2 (2024-09-21)
- Extract and expose the
dispatch()function.
- Allow
<Remove>descendant elements to trigger itsclickevent.
- Prevent the demo pages main content from being cutoff when it overflows its container.
- Update the README to reflect the latest changes.
0.10.1 (2024-09-19)
- Increase the flexibility in the
sortItems()andremoveItem()functions to prevent type errors. - Refactor the
on:sortandon:removeevents to match the latest changes made to thesortItems()andremoveItem()functions.
- Add
on:sortandon:removeevents type definitions.
- Add the
aria-orientationattribute to<SortableList>. - Set the
<SortableList>props as optional. - Prevent the keyboard events assigned to
<SortableList>from interfering with the native behavior of the interactive elements inside<SortableItem>. - Prevent
<SortableItem>from being focused when a<label>is clicked/tapped. - Elevate
<SortableItem>above its siblings when it is focused. - Assign the correct
tabindexto interactive elements inside<SortableItem>s when the dragged item is dropped. - Clean up properly when keyboard dragging is canceled.
- Update the README and the demo pages to reflect the latest changes.
0.10.0 (2024-09-15)
- Rename the elements CSS classes to contain a package prefix.
- Rename props, states and CSS classes to better describe what they are a reference to.
- Rename
<Handle>and<Remove>icon components to<IconHandle>and<IconRemove>. - Extract
<SortableItem>out of<SortableList>.
- Create
<Handle>and<Remove>components. - Create
removeItem()function.
- Switch props for stores + Context API to allow for a more flexible structure.
- Limit the
idprop in<SortableItem>to only admit strings as its value.
- Remove an item only after
isRemovingis set back tofalse. - Prevent
<Ghost>flickering on dropping on mobile devices. - Prevent break down after dropping an item when the
transitionDurationis set to0. - Prevent
<SortableItem>focus onpointerdownonly if the target is the item itself, its content wrapper or its handle.
- Move types to a new
typesdirectory. - Update ESLint, Prettier, TS, and GIT configurations.
- Implement the latest structure in the demo pages.
- Implement the
removeItem()function in the demo pages. - Add “No animations” demo page.
- Add “Interactive items” demo page.
- Update the README to reflect the latest changes.
0.9.6 (2024-07-21)
- Display the expected cursor when dragging from a handle starts.
0.9.5 (2024-07-16)
- Correct the position of the list’s outline when
directionis set tohorizontal.
0.9.4 (2024-07-14)
- Move opinionated ghost and list styles into the CSS stylesheet.
- Update item margin when
directionchanges. - Bound items to the expected list limits when
hasBoundariesis active.
0.9.3 (2024-07-13)
- Create
scaleFadecustom transition.
- Prevent an abrupt drop of the list when the last item is removed.
- Prevent tabbing onto interactive elements if the current item is being dragged through the keyboard.
- Replace
<SortableItem>in and out transitions withscaleFade(which does not involve translation) to prevent possible container overflow when adding/removing an item. - Restore missing transitions during the deletion of an item by dropping it outside of the list’s bounds.
- Add a stable scrollbar to Main.
0.9.2 (2024-07-05)
- Extend CSS classes to all elements associated with states.
- Undo ghost and live region classes renaming.
- Move ghost styles manipulation logic into the
<Ghost>component. - Remove unnecessary
setItemStyles()function.
- Remove “Direction horizontal (has locked axis)” demo page.
0.9.1 (2024-05-28)
- Add package author and repository info.
0.9.0 (2024-05-28)
- Switch items data for nodes.
- Rename
<Ghost>component to<SortableGhost>and change its tag to<div>. - Rename
<SortableGhost>and live region classes. - Rename package.
- Repair broken
<SortableGhost>entrance transition.
- Add “Custom properties” to README.
0.8.3 (2024-04-16)
- Adjust position and add missing transition to Controls toggle button.
0.8.2 (2024-04-14)
- Make Controls collapsible.
0.8.1 (2024-04-09)
- Expose stylesheet to be imported from outside the package.
- Rename
getFocusedItemElement()function togetItemElement(). - Rename
oldIndex/newIndextoprevIndex/nextIndexindispatch('sort')function. - Rename
idtoitemIdindispatch('remove')function. - Rename
reorderItems()function tosortItems().
- Write proper README.
0.8.0 (2024-04-01)
- Extract
itemsto fixtures file. - Add a reset button to demo pages with removable items.
- Add controls to demo pages.
0.7.4 (2024-04-01)
- Add remove on drag out feature.
- Optimize
styleTransformreactive declaration. - Encapsulate collision detection logic into the
areColliding()function. - Rename
checkIfInteractive()function tohasInteractiveElements().
- Add “Has remove on drag out” demo page.
0.7.3 (2024-03-26)
- Add boundaries feature.
- Rename
ghostOriginstate topointerOrigin.
- Rename “With drop marker” demo page to “Has drop marker”.
- Rename “Locked axis” demo page to “Has locked axis”.
- Rename “Direction horizontal (locked axis)” demo page to “Direction horizontal (has locked axis)”.
0.7.2 (2024-03-25)
- Add locked axis feature.
- Add direction feature.
- Repair ghost, items and marker translations when dropping.
- Prevent mutation of the source array in
reorderItems(). - Add consistency to the handling of items focus loss.
- Add “Locked axis” demo page.
- Add “Direction horizontal” demo page.
- Add “Direction horizontal (locked axis)” demo page.
0.7.1 (2024-03-17)
- Add drop marker feature.
- Polish shaky ghost animation when dropping with pointer.
- Add “With drop marker” demo page.
0.7.0 (2024-03-16)
- Add support for disabled items.
- Extract components styles to importable CSS stylesheet (allows reuse of demo styles in a project using this package).
- Avoid data preload on link hover.
- Add
labelto list of elements to be checked incheckIfInteractive().
- Correct slots forwarding structure.
- Prevent item focus when a pointer down event is triggered.
- Correct validations in
dispatchSort().
- Add “Disabled items” demo page.
- Add “Unstyled items” demo page.
0.6.2 (2024-03-14)
- Create and implement SortableListProps and SortableItemProps interfaces.
- Remove
keyprop. - Rename IItemData interface to ItemData.
- Rename most demo pages and routes containing “With”.
0.6.1 (2024-03-14)
- Avoid unnecessary code repetition through
getFocusedItemElement()anddispatchSort(). - Rename
sortThresholdprop toswapThreshold.
- Handle interruption of keyboard navigation caused by pointer interaction.
- Trigger swap consistently when ghost hovers over the adjacent items of the dragged item (by including the dragged item in the list of colliding items).
- Pass down
gapandtransitionDurationprops to the<SortableItem>component to actually make use of the values assigned to the<SortableList>component.
0.6.0 (2024-03-04)
- Add item removal feature.
- Add Handle icon component.
- Add Remove icon component.
- Add
canceledlive text.
- Extract
<SortableItem>component. - Extract
<Ghost>component. - Render
<SortableList>only ifitemsprop is provided. - Add default value to
keyprop. - Ensure
idprop consistency.
- Prevent focus loss after removing a
<SortableItem>. - Allow interactive elements (like buttons) in an item to be tabbable and operate normally only when that item is focused.
- Prevent dragging with pointer while dragging with keyboard is occurring.
- Prevent screen reading of an item’s content after dropping it.
- Add page titles
0.5.2 (2024-02-15)
- Reset list back to its latest state when Escape is pressed.
- Transition items position out when focus is lost (by tabbing or clicking).
- Handle item focus consistently.
0.5.1 (2024-02-12)
- Add support for screen readers.
- Refactor keyboard navigation by implementing the Listbox Pattern to support screen readers.
0.5.0 (2024-02-04)
- Add support for keyboard navigation.
0.4.1 (2024-01-27)
- Reduce the number of event listeners through event delegation.
- Display the correct cursor while dragging.
0.4.0 (2024-01-27)
- Add support for mobile devices.
- Prevent conflicts with events outside the package.
0.3.3 (2024-01-23)
- Keep the demos navigation vertically centered when the page’s height increases.
- Display
grabbingcursor when dragging from a handle. - Prevent CSS transitions flickering in Firefox.
0.3.2 (2024-01-22)
- Add support for items with varying height.
- Add “With varying heights” demo page.
0.3.1 (2024-01-21)
- Add gap feature: control the spacing between items through the new
gapprop. - Create
scaleFlycustom transition. - Animate dynamically added/removed items.
- Add “With dynamic items” demo page.
- Improve overall demos layout.
0.3.0 (2024-01-20)
- Translate the items based on the ghost position as it is being dragged (instead of waiting for it to be dropped to trigger the items translation).
- Simplify and increase the flexibility of the data structure.
0.2.4 (2024-01-15)
- Prevent drag and drop if the target is an interactive element.
0.2.3 (2024-01-14)
- Add sort threshold feature: control the interaction threshold between ghost and items on dragging through the new
sortThresholdprop.
- Improve the collision detection logic to target the item with the largest intersecting area.
- Increase the default
sortThresholdvalue to1.
0.2.2 (2024-01-14)
- Add
transitionDurationprop to the<SortableList>component.
- Prevent crash when an item is dropped in the exact same position it was dragged from.
0.2.1 (2024-01-13)
- Improve overall demos layout.
0.2.0 (2024-01-13)
- Add handle feature: drag and drop items using a handle element.
- Improve transitions handling.
0.1.1 (2024-01-11)
- Move sort handling outside of the
<SortableList>component.
0.1.0 (2024-01-08)
- Create base structure.
- Add custom collision detection logic to be used instead of Drag and Drop API and
mouseenterandmouseleaveMouse Events. This enabled the following:- Setting an overlap threshold.
- Customizing the mouse cursor at each stage of the drag-and-drop process.
- Add a ghost element to represent the item being dragged and dropped.
- Add base animations.