Releases: Vestride/Shuffle
Releases · Vestride/Shuffle
6.1.1
v6.1.0
New features
- The
package.json
now containssideEffects: false
to improve dead code removal and tree shaking. - The
package.json
now contains an export-map to assist bundlers in choosing the correct file.
Bug fixes
- Update
index.d.ts
(in #402) to be more accurate with the real code.
Internal
- Shuffle is now a monorepo, built with turborepo (#399).
- Rewrote the website with Docusaurus.
Full Changelog: v6.0.0...v6.1.0
v6
Breaking
- Remove IE 11 from browsers list. If you need to support IE 11 (sorry), please use v5. Did you know Microsoft 365 apps and services stopped supporting IE 11 in August 2021?
- Remove
matches-selector
package and use the nativematches
(see browser support). - Remove deprecated
delimeter
option (the misspelled one). Use thedelimiter
option instead. - Replace window resize event listener with
ResizeObserver
(#321). Browser support for it is very good, but if you want to support a browser that doesn't have it, you can manually add a window resize event and callupdate()
within the event callback.- Removed
throttleit
dependency - Removed
throttle
option. - Removed
throttleTime
option.
- Removed
- Changed the method signature for
update()
.-shuffle.update(true); +shuffle.update({ recalculateSizes: false });
- Changed how data attribute are accessed. Previously, Shuffle used
element.getAttribute('data-groups')
. Now, it useselement.dataset.groups
.dataset
is very well supported now.
New features
- Minified file size
- Before: 20.8 kB
- After: 16.9 kB
- Added
force
option toupdate
method to force shuffle to update even if it's disabled (#321).shuffle.update({ force: true });
Other
- Convert demos to ES6 classes.
- Move browsers list to
.browserslistrc
. - Add prettier
- Add BMC button.
- Remove polyfill.io links -- they add nothing with current versions of Chrome and others.
- Run sass division migration
- Remove dist files from git
- Recreate demos to codepen. Collection.
v5.4.1
v5.3.0
Add isRTL
option thanks to @AmirHosseinKarimi
Add TinyEmitter methods to TypeScript definitions
The TypeScript definitions were missing on
, once
, emit
, and off
because the definitions file did not have extends TinyEmitter
. These methods now work correctly and contain type information for the data
object in the event callback.
v5.2.2
Jest
Moved to jest for testing #278
TypeScript definitions #287
Fixes
- Fix bad default parameters for
enable
,update
, andgetSize
. - Fix missing
Css
export onShuffle.ShuffleItem.Css
. - Fix
Shuffle.ALL_ITEMS
andShuffle.FILTER_ATTRIBUTE_KEY
not being overridable.
New
- Add types for
.sort()
method's options:SortOptions
. - Add types for
.filter()
's function signature. - Add types for
ShuffleItem.Css
.
Tests
- Add test
ts
file. - Run
tsc
on test file during tests.
Breaking for TypeScript users:
- Changed all
Element
toHTMLElement
. Shuffle.ShuffleOptions
is now exported top-level.import Shuffle, { ShuffleOptions, SortOptions } from 'shufflejs';
Full changes: v5.2.1...v5.2.2