Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
mithril-transition
Advanced tools
A lightweight library for MithrilJS to create your own custom transitions based on the lifecycle of your components.
A lightweight library for MithrilJS to create your own custom transitions based on the lifecycle of your components.
NOTE: This package was updated for the rewrite of Mithril, if you are looking for the old and unmaintained package can be found it here
With npm and browserify/webpack do:
npm install --save mithril-transition
Or you can use the UMD bundle
<script src="/lib/mithril-transition/dist/mithril-transition.min.js" type="text/javascript"></script>
mithril-transition is a function factory that returns an object
with an oncreate
and onremove
hooks to add in the vnode lifecycle (where you want animate it) of mithril.
Check our live example
Factory function to create a new transition. The options are defined below.
Function that you need hook up to the lifecycle of the vnode
Function that you need hook up to the lifecycle of the vnode
Method to enable the animation. By default is enabled.
Method to disable the animation.
Callback function where you define the animation for the next/prev component.
The callback has an object argument {} with the next properties:
lastElm: The last DOM element that is removing.
nextElm: The new DOM element that is inserting.
direction: This option allow to you define differents animations based of next/prev direction of the lifecycle components. Is required have at least useHistory
in true.
cbLast: Callback to complete the remove of the lastElm. (is required call it)
cbNext: Callback to complete the insert of the nextElm. (is required call it)
When is enabled the library keep the history of your components, to know if the next element in the transition is really the next element or a prev element.
Save the history in the sessionStorage identified by a key.
Before that the transition begin, the library set a list of classes for each parent|element and remove it when the transition is finished.
default = {
parent: 'm-transition-parent',
lastElem: 'm-transition-last-element',
newElem: 'm-transition-next-element',
direction: 'm-transition-<direction>'
}
MIT
FAQs
A lightweight library for MithrilJS to create your own custom transitions based on the lifecycle of your components.
The npm package mithril-transition receives a total of 2 weekly downloads. As such, mithril-transition popularity was classified as not popular.
We found that mithril-transition demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.