From 41ff81f4aa3bc0d71c6f90a5b8972d016abbe1d7 Mon Sep 17 00:00:00 2001 From: Owen Mills Date: Sun, 17 Mar 2024 11:49:23 +0000 Subject: [PATCH] export expando with utils + include src with npm package --- README.md | 5 +++-- package.json | 3 ++- src/Sortable.js | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9feb83e38..c95740711 100644 --- a/README.md +++ b/README.md @@ -739,8 +739,9 @@ Mounts a plugin to Sortable. * clone(el`:HTMLElement`)`:HTMLElement` — create a deep copy of the set of matched elements * toggleClass(el`:HTMLElement`, name`:String`, state`:Boolean`) — add or remove one classes from each element * detectDirection(el`:HTMLElement`)`:String` — automatically detect the [direction](https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction#direction) of the element as either `'vertical'` or `'horizontal'` - - +* index(el`:HTMLElement`, selector`:String`)`:Number` — index of the element within its parent for a selected set of elements +* getChild(el`:HTMLElement`, childNum`:Number`, options`:Object`, includeDragEl`:Boolean`):`HTMLElement` — get the draggable element at a given index of draggable elements within a Sortable instance +* expando`:String` — expando property name for internal use, sortableListElement[expando] returns the Sortable instance of that elemenet --- diff --git a/package.json b/package.json index fe657dfea..2685b9f94 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,8 @@ "files": [ "Sortable.js", "Sortable.min.js", - "modular/" + "modular/", + "src/" ], "keywords": [ "sortable", diff --git a/src/Sortable.js b/src/Sortable.js index 74045d4f4..5e6018f5c 100644 --- a/src/Sortable.js +++ b/src/Sortable.js @@ -1960,7 +1960,8 @@ Sortable.utils = { nextTick: _nextTick, cancelNextTick: _cancelNextTick, detectDirection: _detectDirection, - getChild + getChild, + expando };