@proyecto26/animatable-component
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,1 +0,1 @@ | ||
import{p as a,b as t}from"./p-b300bf53.js";a().then(a=>t([["p-eomz2zw7",[[4,"animatable-component",{animation:[1],keyFrames:[1040],keyFramesData:[1,"key-frames-data"],options:[1040],optionsData:[1,"options-data"],animateId:[1025,"animate-id"],delay:[1026],endDelay:[1026,"end-delay"],duration:[1026],direction:[1025],composite:[1025],easing:[1025],fill:[1025],iterations:[1026],iterationStart:[1026,"iteration-start"],iterationComposite:[1025,"iteration-composite"],autoPlay:[1540,"autoplay"],currentTime:[2,"current-time"],startTime:[2,"start-time"],playbackRate:[2,"playback-rate"],getCurrentTime:[64],getStartTime:[64],getPending:[64],getPlaybackRate:[64],getPlayState:[64],cancel:[64],finish:[64],pause:[64],play:[64],reverse:[64],clear:[64],destroy:[64]}]]]],a)); | ||
import{p as a,b as t}from"./p-b300bf53.js";a().then(a=>t([["p-o2svhulb",[[4,"animatable-component",{animation:[1],keyFrames:[1040],keyFramesData:[1,"key-frames-data"],options:[1040],optionsData:[1,"options-data"],animateId:[1025,"animate-id"],delay:[1026],endDelay:[1026,"end-delay"],duration:[1026],direction:[1025],composite:[1025],easing:[1025],fill:[1025],iterations:[1026],iterationStart:[1026,"iteration-start"],iterationComposite:[1025,"iteration-composite"],autoPlay:[1540,"autoplay"],currentTime:[2,"current-time"],startTime:[2,"start-time"],playbackRate:[2,"playback-rate"],getCurrentTime:[64],getStartTime:[64],getPending:[64],getPlaybackRate:[64],getPlayState:[64],cancel:[64],finish:[64],pause:[64],play:[64],reverse:[64],clear:[64],destroy:[64]}]]]],a)); |
@@ -1,1 +0,1 @@ | ||
import{h as t}from"./p-b300bf53.js";export{A as ANIMATIONS,E as EASING,a as EASING_FUNCTIONS}from"./p-0fffbc16.js";var e=function(t,a){var e={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&a.indexOf(i)<0&&(e[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)a.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(e[i[o]]=t[i[o]])}return e};function i(a){return i=>{const{ref:o,keyFrames:n,keyFramesData:r,options:s,optionsData:c,animateId:m,delay:l,endDelay:p,duration:f,direction:y,composite:u,easing:d,fill:b,iterations:F,iterationStart:S,iterationComposite:k,autoPlay:D,currentTime:I,startTime:T,playbackRate:j,onStart:C,onCancel:O,onFinish:N}=i,A=e(i,["ref","keyFrames","keyFramesData","options","optionsData","animateId","delay","endDelay","duration","direction","composite","easing","fill","iterations","iterationStart","iterationComposite","autoPlay","currentTime","startTime","playbackRate","onStart","onCancel","onFinish"]);return t("animatable-component",{ref:o,keyFrames:n,keyFramesData:r,options:s,optionsData:c,animateId:m,delay:l,endDelay:p,duration:f,direction:y,composite:u,easing:d,fill:b,iterations:F,iterationStart:S,iterationComposite:k,autoPlay:D,currentTime:I,startTime:T,playbackRate:j,onStart:C,onCancel:O,onFinish:N},t(a,Object.assign({},A)))}}export{i as createAnimatableComponent}; | ||
import{h as t}from"./p-b300bf53.js";export{A as ANIMATIONS,E as EASING,a as EASING_FUNCTIONS}from"./p-852201b0.js";var e=function(t,a){var e={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&a.indexOf(i)<0&&(e[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)a.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(e[i[o]]=t[i[o]])}return e};function i(a){return i=>{const{ref:o,keyFrames:n,keyFramesData:r,options:s,optionsData:m,animateId:c,delay:l,endDelay:p,duration:y,direction:f,composite:u,easing:d,fill:b,iterations:F,iterationStart:S,iterationComposite:k,autoPlay:D,currentTime:I,startTime:T,playbackRate:j,onStart:C,onCancel:O,onFinish:N}=i,A=e(i,["ref","keyFrames","keyFramesData","options","optionsData","animateId","delay","endDelay","duration","direction","composite","easing","fill","iterations","iterationStart","iterationComposite","autoPlay","currentTime","startTime","playbackRate","onStart","onCancel","onFinish"]);return t("animatable-component",{ref:o,keyFrames:n,keyFramesData:r,options:s,optionsData:m,animateId:c,delay:l,endDelay:p,duration:y,direction:f,composite:u,easing:d,fill:b,iterations:F,iterationStart:S,iterationComposite:k,autoPlay:D,currentTime:I,startTime:T,playbackRate:j,onStart:C,onCancel:O,onFinish:N},t(a,Object.assign({},A)))}}export{i as createAnimatableComponent}; |
@@ -1,1 +0,1 @@ | ||
System.register(["./p-fca08e7d.system.js"],(function(){"use strict";var t,e;return{setters:[function(a){t=a.p;e=a.b}],execute:function(){t().then((function(t){return e([["p-9zjba5re.system",[[4,"animatable-component",{animation:[1],keyFrames:[1040],keyFramesData:[1,"key-frames-data"],options:[1040],optionsData:[1,"options-data"],animateId:[1025,"animate-id"],delay:[1026],endDelay:[1026,"end-delay"],duration:[1026],direction:[1025],composite:[1025],easing:[1025],fill:[1025],iterations:[1026],iterationStart:[1026,"iteration-start"],iterationComposite:[1025,"iteration-composite"],autoPlay:[1540,"autoplay"],currentTime:[2,"current-time"],startTime:[2,"start-time"],playbackRate:[2,"playback-rate"],getCurrentTime:[64],getStartTime:[64],getPending:[64],getPlaybackRate:[64],getPlayState:[64],cancel:[64],finish:[64],pause:[64],play:[64],reverse:[64],clear:[64],destroy:[64]}]]]],t)}))}}})); | ||
System.register(["./p-fca08e7d.system.js"],(function(){"use strict";var t,e;return{setters:[function(a){t=a.p;e=a.b}],execute:function(){t().then((function(t){return e([["p-snsy4wge.system",[[4,"animatable-component",{animation:[1],keyFrames:[1040],keyFramesData:[1,"key-frames-data"],options:[1040],optionsData:[1,"options-data"],animateId:[1025,"animate-id"],delay:[1026],endDelay:[1026,"end-delay"],duration:[1026],direction:[1025],composite:[1025],easing:[1025],fill:[1025],iterations:[1026],iterationStart:[1026,"iteration-start"],iterationComposite:[1025,"iteration-composite"],autoPlay:[1540,"autoplay"],currentTime:[2,"current-time"],startTime:[2,"start-time"],playbackRate:[2,"playback-rate"],getCurrentTime:[64],getStartTime:[64],getPending:[64],getPlaybackRate:[64],getPlayState:[64],cancel:[64],finish:[64],pause:[64],play:[64],reverse:[64],clear:[64],destroy:[64]}]]]],t)}))}}})); |
@@ -6,3 +6,3 @@ 'use strict'; | ||
const core = require('./core-93aa29d3.js'); | ||
const animations = require('./animations-c68afb62.js'); | ||
const index = require('./index-4d3a1b53.js'); | ||
@@ -34,3 +34,4 @@ const AnimatableComponent = class { | ||
animationDidChangeHandler(animation) { | ||
const keyFrames = animations.Animations[animation]; | ||
debugger; | ||
const keyFrames = index.Animations[animation]; | ||
if (keyFrames) { | ||
@@ -40,3 +41,3 @@ this.keyFrames = keyFrames; | ||
else { | ||
throw new Error(animations.ANIMATION_KEY_ERROR); | ||
throw new Error(index.ANIMATION_KEY_ERROR); | ||
} | ||
@@ -187,3 +188,3 @@ } | ||
const defaultEasing = this.easing; | ||
animationOptions.easing = animations.EASING_FUNCTIONS[defaultEasing] || this.easing; | ||
animationOptions.easing = index.EASING_FUNCTIONS[defaultEasing] || this.easing; | ||
} | ||
@@ -208,3 +209,3 @@ if (this.endDelay !== undefined) | ||
const keyFrames = this.keyFrames | ||
|| (this.animation && animations.Animations[this.animation]) | ||
|| (this.animation && index.Animations[this.animation]) | ||
|| (this.keyFramesData && JSON.parse(this.keyFramesData)) | ||
@@ -211,0 +212,0 @@ || []; |
@@ -6,3 +6,3 @@ 'use strict'; | ||
const core = require('./core-93aa29d3.js'); | ||
const animations = require('./animations-c68afb62.js'); | ||
const index = require('./index-4d3a1b53.js'); | ||
@@ -28,5 +28,5 @@ var __rest = (undefined && undefined.__rest) || function (s, e) { | ||
exports.ANIMATIONS = animations.ANIMATIONS; | ||
exports.EASING = animations.EASING; | ||
exports.EASING_FUNCTIONS = animations.EASING_FUNCTIONS; | ||
exports.ANIMATIONS = index.ANIMATIONS; | ||
exports.EASING = index.EASING; | ||
exports.EASING_FUNCTIONS = index.EASING_FUNCTIONS; | ||
exports.createAnimatableComponent = createAnimatableComponent; |
import { h } from "@stencil/core"; | ||
import Animations, { ANIMATION_KEY_ERROR } from '../../animations/animations'; | ||
import Animations, { ANIMATION_KEY_ERROR } from '../../animations'; | ||
import { EASING_FUNCTIONS } from '../../easing/easing'; | ||
@@ -28,2 +28,3 @@ /** | ||
animationDidChangeHandler(animation) { | ||
debugger; | ||
const keyFrames = Animations[animation]; | ||
@@ -264,3 +265,3 @@ if (keyFrames) { | ||
"location": "import", | ||
"path": "../../animations/animations" | ||
"path": "../../animations" | ||
} | ||
@@ -267,0 +268,0 @@ } |
export * from './easing/easing'; | ||
export { ANIMATIONS } from './animations/animations'; | ||
export { ANIMATIONS } from './animations'; | ||
export { createAnimatableComponent } from './utils/utils'; |
@@ -38,3 +38,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
import { r as registerInstance, c as createEvent, h, g as getElement } from './core-8eb39732.js'; | ||
import { b as ANIMATION_KEY_ERROR, a as EASING_FUNCTIONS, c as Animations } from './animations-7e6f3b58.js'; | ||
import { b as ANIMATION_KEY_ERROR, a as EASING_FUNCTIONS, c as Animations } from './index-5103ef5c.js'; | ||
var AnimatableComponent = /** @class */ (function () { | ||
@@ -70,2 +70,3 @@ function class_1(hostRef) { | ||
class_1.prototype.animationDidChangeHandler = function (animation) { | ||
debugger; | ||
var keyFrames = Animations[animation]; | ||
@@ -72,0 +73,0 @@ if (keyFrames) { |
import { r as registerInstance, c as createEvent, h, g as getElement } from './core-8eb39732.js'; | ||
import { b as ANIMATION_KEY_ERROR, a as EASING_FUNCTIONS, c as Animations } from './animations-7e6f3b58.js'; | ||
import { b as ANIMATION_KEY_ERROR, a as EASING_FUNCTIONS, c as Animations } from './index-5103ef5c.js'; | ||
@@ -29,2 +29,3 @@ const AnimatableComponent = class { | ||
animationDidChangeHandler(animation) { | ||
debugger; | ||
const keyFrames = Animations[animation]; | ||
@@ -31,0 +32,0 @@ if (keyFrames) { |
@@ -12,3 +12,3 @@ /* eslint-disable */ | ||
AnimationsType, | ||
} from './animations/animations'; | ||
} from './animations'; | ||
@@ -15,0 +15,0 @@ export namespace Components { |
import { ComponentInterface, EventEmitter } from '../../stencil.core'; | ||
import { AnimationsType } from '../../animations/animations'; | ||
import { AnimationsType } from '../../animations'; | ||
/** | ||
@@ -4,0 +4,0 @@ * animatable-component |
export * from './components'; | ||
export * from './easing/easing'; | ||
export { ANIMATIONS } from './animations/animations'; | ||
export { ANIMATIONS } from './animations'; | ||
export { createAnimatableComponent } from './utils/utils'; |
{ | ||
"name": "@proyecto26/animatable-component", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "A WebComponent to use Web Animations API in a declarative way! 💅", |
@@ -77,2 +77,4 @@ ![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D&colorA=16161d&style=flat-square) | ||
- Meet `<animatable />`, a tiny Web Component: https://dev.to/jdnichollsc/meet-animatable-a-tiny-web-component-to-use-web-animations-api-as-a-component-1glh | ||
## Properties | ||
@@ -221,3 +223,3 @@ | ||
- Put a script tag similar to this `<script src='https://unpkg.com/animatable-component@0.10.0/dist/animatable-component.js'></script>` in the head of your index.html | ||
- Put a script tag similar to this `<script src='https://unpkg.com/animatable-component@1.0.0/dist/animatable-component.js'></script>` in the head of your index.html | ||
- Then you can use the element anywhere in your template, JSX, html etc | ||
@@ -224,0 +226,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1042012
102
16468
331