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.
v3.0.1 (2025-02-11)
- withScrolledInView: fix
scrolledInView
method not being triggered on mount (#584, 244f1c57) - Base: fix types (c83219b0)
v3.0.0 (2025-01-16)
After 9 months of development, v3.0 is finally here! It is packed with more stability, capabilities and without previously deprecated APIs. Make sure to read the migration guide to learn more about all the changes and how to upgrade, as you will need to edit some parts of existing components.
- Base: add a
$config
getter to access the resolved configuration (#543, e4b0fe4d) - Add loading helpers (#520, c52bbab)
- Add support for custom DOM element name to register components (#514, fe3518a)
- withResponsiveOptions: add support for defining responsive options in the decorator (e6543c4)
- Add
camelCase
,pascalCase
,snakeCase
anddashCase
functions (#506, c753a16) - Add a
memo
function as a simpler and smallermemoize
alternative (#506, 980a0b3) - Add support for defining an option default value with a function (#478)
- Add shorthand props on the scroll service for easier destructuring (#432)
- Add a
getInstances
helper function (#428) - Add a
createRange
utility function (#426, 2cb2bac) - Add an
easeLinear
function (#425) - Add support for
Symbol
as service keys (#559, 7ce96a41) - Add a
withMutation
decorator (#559, fdce27a2) - Add a
useMutation
service (#559, 0c804b79) - Add a
cache
utility function (#559, b3fe8080) - Add a
createElement
function (#548, a6417f2f) - Add support for defining breakpoints when using the resize service (#323)
- Add
randomInt
andrandomItem
utility functions (#398) - Add
isNull
andisEmpty
utility functions (#320) - Add an
isEmptyString
utility function (9f8a9f5, 9be5528) - Add support for a
smooth
option fortween
andanimate
(#419) - Add support for a
delay
option fortween
(#419) - Add support for a
stagger
option foranimate
(#419) - Add support for
duration
andstagger
options as functions foranimate
(#419) - Add a
mean
utility function (#419) - Add support for custom duration and easing function for
scrollTo
(#418)
- Fix a circular dependency (#573, 93791018)
- Base: prevent callling the
$mount
method multiple times (#543, da1fa92a) - Base: fix
$mount
and$update
method never resolving (#542, #543, c2749610) - Base: fix order of component lifecycle hooks (#542, #543, b4dfc4d5)
- useDrag: prevent drop when not dragging (#538, #539, 63ba2350)
- useDrag: fix the delta props on multiple drag actions (#532, #533, c97a8a51)
- Fix caching of options property names (d1822c0)
- Fix triggering of event hook with bubbling events (#515, #516, 016b305)
- Fix a bug where unexisting methods were called on event dispatch (#512, fe65d3d)
- Fix a bug where refs could be undefined (c11eb49)
⚠️ Fix listening to unconfigured events (#505, a1e8dc9)- Fix component resolution strategy (close #403, #404)
- Terminate instances whose root element has been removed from the DOM (#552, #560, 93e5607b)
- Refactor service instances cache handling (#559, e87dca16)
- Refactor decorators to not override the name config (#549, #550, 6436ef7d)
- Refactor all exports to be named exports (#551, 2e046016)
⚠️ Base: refactor manager dynamic properties (#543, 926738ee)- Base: refactor constructor access (#543, e445e2f0)
- Refactor services to classes (#535, #537)
- withBreakpointObserver: test breakpoint on attribute change (#523, bc45db0)
- Refactor ref event listener binding (#523, 5f3fe04)
⚠️ Dispatch custom events on the root element (#509, 3cdc607)- Convert ref names to camelCase (#338, #506, 1f5dbd9)
- Refactor attributes handling with methods (#494, 5c5c3ae)
- Migrate tests to Vitest (#501, 70e1b52)
- Make the HTML attributes configurable (#495, 823da97)
⚠️ Refactor event callbacks parameters (#499, 06df6b0)⚠️ Make the lifecycle methods async (#502, 1e0d9ac)- Change behaviour of the
getInstances
helper (#484) ⚠️ Enable theasyncChildren
feature by default (#427)⚠️ Rename theasyncChildren
feature toblocking
(#427)⚠️ Rename the static$factory
method to$register
and make its single argument optional (#416)⚠️ Refactor definition of breakpoints for the resize service (#323)⚠️ RefactorfocusTrap
for simpler exports (#406)- Migrate tests from Jest to Bun (#411)
- Refactor the requestAnimationFrame polyfill (#411, dfd62b6, 34bb2c5)
- Improve raf service usage (#411, 352f509)
- Migrate legacy
pageXOffset
andpageYOffset
to their equivalentscrollX
andscrollY
(#413) - Update dependencies (#422)
⚠️ Change the return value fromscrollTo
fromPromise<number>
toPromise<{ left: number, top: number }>
(#418)
⚠️ Remove theuseService
export in favor of theAbstractService
class (#535)⚠️ Remove thewithVue2
decorator (#395)⚠️ Remove thevue
dependency (#395)⚠️ Remove CJS files from the package (#394)⚠️ Remove theloaded
hook (#412)- Remove unnecessary manager instance type check (#414)
⚠️ Remove deprecated methods from thewithScrolledInView
decorator (#415)
v3.0.0-beta.4 (2025-01-15)
v3.0.0-beta.3 (2024-12-04)
- Add support for
Symbol
as service keys (#559, 7ce96a41) - Add a
withMutation
decorator (#559, fdce27a2) - Add a
useMutation
service (#559, 0c804b79) - Add a
cache
utility function (#559, b3fe8080) - Add a
createElement
function (#548, a6417f2f)
- Terminate instances whose root element has been removed from the DOM (#552, #560, 93e5607b)
- Refactor service instances cache handling (#559, e87dca16)
- Refactor decorators to not override the name config (#549, #550, 6436ef7d)
- Refactor all exports to be named exports (#551, 2e046016)
v3.0.0-beta.2 (2024-11-21)
- Base: prevent callling the
$mount
method multiple times (#543, da1fa92a) - Base: fix
$mount
and$update
method never resolving (#542, #543, c2749610) - Base: fix order of component lifecycle hooks (#542, #543, b4dfc4d5)
⚠️ Base: refactor manager dynamic properties (#543, 926738ee)- Base: refactor constructor access (#543, e445e2f0)
- loadElement : add examples on how to use the memo function with the loadElement function (1bc3363a)
v3.0.0-beta.1 (2024-11-18)
v3.0.0-beta.0 (2024-11-16)
⚠️ Remove theuseService
export in favor of theAbstractService
class (#535)
v3.0.0-alpha.12 (2024-11-15)
v3.0.0-alpha.11 (2024-11-12)
- Add loading helpers (#520, c52bbab)
- Add support for custom DOM element name to register components (#514, fe3518a)
- withResponsiveOptions: add support for defining responsive options in the decorator (e6543c4)
- withBreakpointObserver: test breakpoint on attribute change (#523, bc45db0)
- Refactor ref event listener binding (#523, 5f3fe04)
- Update happy-dom dependencies (#523, 2391e4a)
- Fix caching of options property names (d1822c0)
v3.0.0-alpha.10 (2024-08-27)
v3.0.0-alpha.9 (2024-08-22)
v3.0.0-alpha.8 (2024-08-21)
v3.0.0-alpha.7 (2024-08-06)
- Add
camelCase
,pascalCase
,snakeCase
anddashCase
functions (#506, c753a16) - Add a
memo
function as a simpler and smallermemoize
alternative (#506, 980a0b3)
v3.0.0-alpha.6 (2024-08-02)
- Refactor attributes handling with methods (#494, 5c5c3ae)
- Migrate tests to Vitest (#501, 70e1b52)
- Make the HTML attributes configurable (#495, 823da97)
⚠️ Refactor event callbacks parameters (#499, 06df6b0)⚠️ Make the lifecycle methods async (#502, 1e0d9ac)
- Fix a bug where refs could be undefined (c11eb49)
⚠️ Fix listening to unconfigured events (#505, a1e8dc9)
v3.0.0-alpha.5 (2024-07-16)
- Change behaviour of the
getInstances
helper (#484)
v3.0.0-alpha.4 (2024-07-05)
- Add support for defining an option default value with a function (#478)
- Add shorthand props on the scroll service for easier destructuring (#432)
- Fix code coverage reports (#474)
v3.0.0-alpha.3 (2024-04-17)
- Add a
getInstances
helper function (#428)
⚠️ Enable theasyncChildren
feature by default (#427)⚠️ Rename theasyncChildren
feature toblocking
(#427)
v3.0.0-alpha.2 (2024-04-04)
v3.0.0-alpha.1 (2024-04-04)
- Add an
easeLinear
function (#425)
- Fix
ease...
tests (#425)
v3.0.0-alpha.0 (2024-04-03)
- Add support for defining breakpoints when using the resize service (#323)
- Add
randomInt
andrandomItem
utility functions (#398) - Add
isNull
andisEmpty
utility functions (#320) - Add an
isEmptyString
utility function (9f8a9f5, 9be5528) - Add support for a
smooth
option fortween
andanimate
(#419) - Add support for a
delay
option fortween
(#419) - Add support for a
stagger
option foranimate
(#419) - Add support for
duration
andstagger
options as functions foranimate
(#419) - Add a
mean
utility function (#419) - Add support for custom duration and easing function for
scrollTo
(#418)
⚠️ Rename the static$factory
method to$register
and make its single argument optional (#416)⚠️ Refactor definition of breakpoints for the resize service (#323)⚠️ RefactorfocusTrap
for simpler exports (#406)- Migrate tests from Jest to Bun (#411)
- Refactor the requestAnimationFrame polyfill (#411, dfd62b6, 34bb2c5)
- Improve raf service usage (#411, 352f509)
- Migrate legacy
pageXOffset
andpageYOffset
to their equivalentscrollX
andscrollY
(#413) - Update dependencies (#422)
⚠️ Change the return value fromscrollTo
fromPromise<number>
toPromise<{ left: number, top: number }>
(#418)
⚠️ Remove thewithVue2
decorator (#395)⚠️ Remove thevue
dependency (#395)⚠️ Remove CJS files from the package (#394)⚠️ Remove theloaded
hook (#412)- Remove unnecessary manager instance type check (#414)
⚠️ Remove deprecated methods from thewithScrolledInView
decorator (#415)
v2.12.0 (2023-12-01)
- Add
startsWith
andendsWith
utils (#389)
- Improve performance by migrating from
forEach
tofor…of
for loops (#391) - Update NPM dependencies (#392)
v2.11.2 (2023-07-13)
- Fix packages version (ee0db8b)
v2.11.1 (2023-07-13)
v2.11.0 (2023-07-13)
- usePointer: add support for props relative to an element (#377)
- Add a
withRelativePointer
decorator (#377)
- Fix refs name normalization when used with prefix (#361)
- Update dependencies (#378)
v2.10.3 (2023-05-17)
- Loosen the Vue version constraint (da22e8a)
v2.10.2 (2023-04-19)
- Fix missing extension throwing error in ESM (3c08d58)
v2.10.1 (2023-04-19)
- Fix missing extension throwing error in ESM (055bde4)
v2.10.0 (2023-04-17)
- Add an
importOnMediaQuery
helper function to import a component based on a provided media query (#313) - Add an
importWhenPrefersMotion
helper function to import a component when the user accepts motion (#313) - Add a
withMountOnMediaQuery
decorator that mounts a component based on a provided media query (#313) - Add a
withMountWhenPrefersMotion
decorator that mounts a component when the user accepts motion (#313)
- easeInExpo: fix the expo easing functions never reaching 0 or 1 (#353)
- Fix doc layout being broken on some pages (3c88cbc)
- Use VitePress native local search (84d3e44)
- Change Vue from a dev to a peer dependency (ecffe63)
- Update NPM dependencies (#355, #358, 5701a4c, d0bfa0c)
v2.9.1 (2023-02-08)
- useDrag: listen for drop events on the window instead of the target element (#348)
- getInstanceFromElement: fix getting an instance from a falsy element (#349)
- withScrolledInView: fix division by 0 resulting in
NaN
progress value (#350)
- createApp: improve timing of app instanciation when using the
asyncChildren
feature (#351)
v2.9.0 (2023-01-28)
- Add a
SmartQueue
utility class (f179d8b) - Add a
wait
utility function (7c9d038) - Base: add a
$warn()
helper (#335) - Queue: add support for promises for easier task orchestration (#341)
- Base: fix and improve the async children feature (#328, 79f295f)
- withScrolledInView: fix props sometimes not being defined (#343)
- Improve the
nextTick
utility function (ca35e6b)
v2.8.0 (2023-01-19)
- Base:
- withScrolledInView: add support for defining offsets (#321)
- animate: add support for animating CSS Custom Properties (#332)
- isNumber: fix
NaN
values being considered as numbers (deccdd1) - getOffsetSizes: fix a bug where the width was used instead of the height (c95885b)
v2.7.0 (2022-12-02)
- Add support for feature flags (dbb865a)
- Add an
AsyncChildrenManager
to improve performance of initial app creation (#309)
createApp(App, { features: { asyncChildren: true } });
- Migrate remaining JS files to TypeScript (#310)
v2.6.5 (2022-11-30)
- Fix tween never triggering the
onFinish
callback (5f4632b)
- Release notes are now kept in a CHANGELOG.md file
- service(drag): fix drag service on chrome when using touch by adding touchend event (#306)
- Fix types (#305, 0b0137e)
- Fix return function of the
useRaf
service not executing (#304, 22d92d7)
- Update NPM dependencies (#304, dbbd1a9)
- addClass, removeClass, toggleClass: fix a bug where empty classes could be used (#298, fix ##283)
- Ship ESNext JavaScript (#296)
- Add sourcemaps (#296)
- Add support for multiple target for the following utilities (#282):
transition
animate
transform
addStyle
removeStyle
addClass
removeClass
toggleClass
- Add support for
onDocument…
andonWindow…
hook methods (#265) - Add a
getClosestParent
helper (#260)
- Fix drag service with touch events (#290)
- Limit drag service to left-click (#263)
- Fix exports definition (d4efde9)
- Fix a recursive type definition (90fdf96, #280)
- Fix a bug where refs could be undefined (#279, fixes #278)
- Fix release GitHub Action (20998cf)
- Improve types (#275, closes #273)
- Improve new types introduced in v2.4.2 (1df4452)
- withScrolledInView
- Use damping on the current value instead of the progress (dd51924, #270)
- Fix a bug where damped values were not updated on destroy (ba93c1b, #270)
- transition
- Fix transition utility waiting too long between updates (74db79a)
- Types
- Improve types definition for components (#271)
- Add service props types to the main entrypoint (23b6fe2)
- Update NPM dependencies (1e5fdfa, f6b0e52)
- Fix docs title (b4709e2)
- Add a
getDirectChildren(parentInstance, parentName, childrenName)
helper function (#253, c89e123) - Add a
isDirectChild(parentInstance, parentName, childInstance, childName)
helper function (#253, 04693b0)
- Revert "Change build target to ES2022" (c51f580)
- Add a
tween
utility function (#249) - Add support for native event methods on child components (fix #248, #247, 3b6026d)
- Add
is...
utility functions:isObject
,isBoolean
,isString
,isNumber
,isArray
andhasWindow
(#247) - Add an export of the
isDev
constant (#247)
- Limit errors and warnings to dev environements (presence of a
__DEV__
global var) (#247) - Refactor
is...
andhas...
test functions (#247) - Change build target to ES2022 (fa4ebd6)
- Add missing support for access to the
event.detail
data when working with CustomEvent with the event hooks (#250) - Only bind event methods to the root element for defined or native events (#247, 0e202c4)
- Refactor services (#244)
- Export
noop
,noopValue
anduseService
internal functions (#244) - Reduce log messages lengths (#244, 8492038)
- Fix usage of the package server-side (#240, 88fa448)
- Fix a circular type reference (#240, cf487e8)
- Add example on how to pass a component option as a prop
withVue2
decorator (#238)
- Fix
ease
export to contain only easing functions (#239, d6720f9)
- Add a
useScheduler
utility function to create schedulers (#232) - Add a
domScheduler
utility scheduler object to group read and write DOM interactions (#232) - Add support for scheduled actions for the
useRaf
service by returning a function inside callbacks (#232)
- Improve performance of the animate function (#232)
- Improve
EventsManager
performance by caching function results (#235)
- Add a
withResponsiveOptions
decorator (#225) - Add an
animate(el, keyframes[, options])
utility function (#230) - Add a
transform(el, props)
utility function (#230) - Add a before-mounted internal event (#230)
- Fix overriding methods with the
withScrolledInView
decorator (#230)
- Fix usage of the scroll service props (8d34ecf)
- Fix transition failing to add the active classes (63f4476)
- Allow overriding options with the
withFreezedOptions
decorator (f1fd094)
- Add support for accessing registered services' props (#220)
- Add a
getInstanceFromElement
helper (4b034a0)
- Update dependencies (#221, 88a36a7, 17690cd, 1672157, 818ad6d)
- Add support for
vueConfig
as getter (#190, #217, ebfa90d) - Allow configuration of the freezed options (#217, a01daf3)
- Fix release of RC version with the next tag (#217, 4a459a5)
- Override deployment of
2.0.0-rc.1
to the latest tag on NPM
- Add a
withFreezedOptions
decorator to make the$options
property read-only (#215) - Add support for control over
Array
andObject
options mergeability (#214)
- Add support for multiple instance on a single HTML element (#206)
- Add support for optional root element for the
createApp
helper (4bee699) - Add
nextTick
schedule utility function (#207) - Add
nextMicrotask
schedule utility function (#207) - Add exports for the class and style utility functions (#208)
- Add support for array of classes for the transition function object parameter (#208)
nextFrame
waits only for one frame instead of chaining tworequestAnimationFrame
calls (#207)- Improve types of the
transition
function (#208)
- Services (drag): remove a forbidden
preventDefault()
call (the event is passive) (a275700)
- Fix links and images usage in drag element (5c42eb5, #203)
- Add the
dragTreshold
option to theuseDrag
service (da7c20b, #203)
- Allow usage of the
withIntersectionObserver
decorator without defining the intersected method (#197)
- Remove the obsolete
@babel/runtime
dependency (d814c38) - Lower the build target to es2019 (4032a5e)
- Fix CJS build (c7c7d46)
- Fix extensions of built files in CJS format (56a6ee5)
- Add support for CommonJS usage (#193)
- Improve docs (#168)
- Add a missing export (213f4ce)
- Fix the calculation of the scroll target offsets (1e072a1)
- Add a search bar to the doc with
vue-kbar
(#188)
- Add easing functions (#184)
- Add support for custom
IntersectionObserver
options for thewithScrolledInView
decorator (#185) - Add missing doc for decorators
- Fix a bug where refs could be undefined (#183, #186, 9e891bf)
- Add a missing event definition (#183, #186, fc8ef57)
- Fix types (b28a39e)
- Improve
withScrolledInView
decorator performance (#180)
- Improve services performances (#176)
- Breaking: Events emitted by a component must be configured (#178)
class Foo extends Base {
static config = {
name: 'Foo',
+ emits: ['open', 'close'],
};
open() {
this.$emit('open');
}
close() {
this.$emit('close);
}
}
- Update NPM dependencies (#177)
- Breaking: Remove
get:...
events to alter$refs
,$options
,$services
and$children
getters (4e29610) The getters should be overwritten in child classes to alter their value:
class Foo extends Base {
static config = {
name: 'Foo',
};
get $refs() {
const $refs = super.$refs;
$refs.myCustomRef = document.querySelector('.my-custom-ref');
return $refs;
}
}
- Fix the
scrollTo
utility calculations (8c03043)
- Update NPM dependencies (#171)
- Bump version number in
package.json
files (b25cd3f)
- Fix changelog generation in release action (8226d9a)
- Improve GitHub actions performances (746c4d4)
- Fix release action (f8895e7)
- Doc: Add a migration guide from v1 to v2 (#164)
- Doc: Fix a broken link (#163)
- Breaking: Refs are searched from the ones defined in the config only
<div data-component="Foo">
<div data-ref="defined"></div>
<div data-ref="undefined"></div>
</div>
<script>
class Foo extends Base {
static config = {
name: 'Foo',
refs: ['defined'],
};
mounted() {
console.log(this.$refs); // Before: { defined: HTMLElement, undefined: HTMLElement }
console.log(this.$refs); // After: { defined: HTMLElement }
}
}
</script>
- Breaking: Refs are no longer resolved to the element's attached Base instance if it exists
<div data-component="Foo">
<div data-ref="bar" data-component="Bar"></div>
</div>
<script>
class Bar extends Base {
static config = { name: 'Bar' };
}
class Foo extends Base {
static config = {
name: 'Foo',
refs: ['bar'],
components: { Bar },
};
mounted() {
console.log(this.$refs); // Before: { bar: Bar }
console.log(this.$refs); // After: { bar: HTMLElement }
}
}
</script>
- Breaking: Refs are only resolved when the component is mounted (#137)
- Breaking: Children components are only resolved when the component is mounted (#137)
- Improve typings (2642ab5, #137)
- Improve
Accordion
component tests (08bc1f2, #137) - Breaking: remove the autobind of all methods (21d24e3, #137)
- Breaking: change build target to browsers supporting ESM (359cd84, #137)
- Breaking: Replace default export with named export (3a0a22c, #137)
- Breaking: Refactor
OptionsManager
to not update the DOM when settingArray
orObject
options (56ffe0b, #137) - Improve
withBreakpointManager
decorator (633d2c5, #137) - Refactor
EventsManager
to useEventListener
objects (8c0644c, #137) - Refactor the debug method (977b5d3, #137)
- Replace private properties by public properties prefixed by
__
(5d0d064, #137) - Breaking: Refactor the config and options management (7556c2f, #137)
- Breaking: Refactor the events' management (b37bc9c, #137)
- Refactor the
Service
abstract class (b0eeb1e, #137) - Refactor child components management (05f9040, #137)
- Breaking: Flatten the exports of the
@studiometa/js-toolkit/utils
path (#154) - Breaking: Rename the
push
andreplace
function from the history utils tohistoryPush
andhistoryReplace
(#154)
- Add a
memoize(fn)
utility (cb6848d, db6bb74, b62deb8, #137) - Add helpers exports to the main entry point (0e7407b, #137)
- Add support for negated boolean options with
data-option-no-...
(#143) - Add a
withVue2
decorator (#148) - Add a
withScrolledInView
decorator (#156) - Add a
scrollTo
utility (#135)
- Breaking: remove legacy helpers (bbbd9cc, #137)
- Breaking: Remove the
$once()
method (aee1acc, #137) - Breaking: Remove the full build (13af657, #137)
- Breaking: Delete an obsolete folder level (3aeebb8, #137)
- Breaking: Remove the legacy options management (d9806a1, #137)
- Remove an obsolete import/export (02a1979, #137)
- Breaking: Remove refs resolution to component instance (131c20d, #137)
- Fix a bug where the
withBreakpointManager
was mixing its child instances (8875db6, #137) - Fix a bug where the resize event was triggered by an infinite loop (9006fc2, #137)