The core of this library was written 8 years ago. Although it's by now battle-tested, the first versions were a copy from what I needed for vue-cloudfront and were basically a single-file library without even TypeScript support. A lot has changed since then and no major refactoring was made to maintain compatibility, at the cost of very high complexity and brittle support for frameworks. For example, the reason to not use prettier is right now that there are expressions that are so complex that they look less readable if they are formatted.
The following is a collection of things that I want to change with the (breaking) release of v4. The list is incomplete and will be extended over the course of the next weeks, feel free to comment your thoughts :)
General
Reworking vue/react/preact integration for more flexibility
Externalize features as plugins
The core of this library was written 8 years ago. Although it's by now battle-tested, the first versions were a copy from what I needed for vue-cloudfront and were basically a single-file library without even TypeScript support. A lot has changed since then and no major refactoring was made to maintain compatibility, at the cost of very high complexity and brittle support for frameworks. For example, the reason to not use
prettieris right now that there are expressions that are so complex that they look less readable if they are formatted.The following is a collection of things that I want to change with the (breaking) release of v4. The list is incomplete and will be extended over the course of the next weeks, feel free to comment your thoughts :)
General
SelectionAreaand wrap it increateSelectionAreafunction.addEventListenerandremoveEventListenersoronandoff.Reworking vue/react/preact integration for more flexibility
SelectionAreacomponent withuseSelectionAreacomposable.SelectionAreacomponent withuseSelectionAreahook.Externalize features as plugins
behaviour.triggersto external plugin.behaviour.startThresholdto external plugin.beforemoveevent and movebehaviour.startThresholdto plugin component.