tradewind 1.2 → 1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e14f108b286fbe1cbc8a4452277c123426146a41
4
- data.tar.gz: a6a4d8cac49ccb505fd031f30673e5ff0c1a73c4
3
+ metadata.gz: 6de59fa1b69be11fd0681ac42732aeb0d6f7b776
4
+ data.tar.gz: e4c4ade198e76da7d960d9222a24744f5a527d85
5
5
  SHA512:
6
- metadata.gz: effc930ac27207435ceff90df1cd9cb99469ad7f675710fbaafd179313051701da05062594f8ef53feda99bc5bce4678996b0187b104f9db16f9bab5e6adb57b
7
- data.tar.gz: 8a671d85268185a6d3bcac6cb326fee20fe96d8f97980f4db62a1d6cc73c07d636dfa9e96af06e84e7804ae94817844a03c7808732bc094b65c5da5156846369
6
+ metadata.gz: e0507cd745dea262cc2482fe31bd04d63e7e68bfe91e66cecae80c400a9945b1f3d23aa833400f59e2bf14a61e95602aca16626f6be0d459f6e8095613648ff5
7
+ data.tar.gz: 866d995fe54a598ee8d78b66d7e13dfc5e38d07d43e8286f7eaac71bb42e9d94f8b5941a8e3130d515863d7975db8f2f43cc9c802da72287537071f76f6a3861
data/README.md CHANGED
@@ -1,13 +1,15 @@
1
1
  # Tradewind
2
2
 
3
- Gem wrapper for [tradewind.js](https://github.com/adrdilauro/tradewind.js)
3
+ Gem wrapper for [tradewind.js](https://github.com/adrdilauro/tradewind.js).
4
+
5
+ Latest release: `1.2`.
4
6
 
5
7
  ## Installation
6
8
 
7
9
  Add this line to your application's Gemfile:
8
10
 
9
11
  ```ruby
10
- gem 'tradewind'
12
+ gem 'tradewind', '1.2'
11
13
  ```
12
14
 
13
15
  And then execute:
@@ -1 +1 @@
1
- !function(){"use strict";function n(n){this.message="TradeWind - you inserted twice the same object in the instructions: "+n}function i(n){this.message="TradeWind - the array of "+n+" cannot be empty"}function t(){this.message="TradeWind - the selector of animated elements cannot be empty"}function e(n,i){this.message="TradeWind - "+n+" is missing the required field '"+i+"'"}function r(){this.message="TradeWind - an instruction is missing array of animations"}function o(n){this.message="TradeWind - Found an empty element in the array of "+n+"s, probably due to an unnecessary comma which is not accepted by IE"}function a(n){this.message="TradeWind - expecting an array of "+n+", got a different object"}function s(){this.message="TradeWind - expecting a selector of animated elements, got a different object"}function d(){this.message="TradeWind - cannot parse an undefined selector of animated elements"}function f(i,t,e){for(var r=0;r<i.length;r++)if(i[r][0]===e)throw new n(j(e));i[t]=[e]}function p(n){for(var i=[],t=0,e=0;e<n.length;e++){for(var r=0;4>r;r++)for(var o=0;4>o;o++)u(n[e][0],window.tradeWind[n[e][1][r][0]].prefixes[o],n[e][1][r][1]);i[t]=[n[e][0],n[e][2]],t+=1}return i}function u(n,i,t){n.style[i]=t}function l(n){for(var i=0;i<n.length;i++)for(var t=0;t<n[i][1].length;t++)u(n[i][0],n[i][1][t][0],n[i][1][t][1])}function c(n){k(n);for(var i=0;i<n.length;i++)if(n[i][3])for(var t=0;t<n[i][3].length;t++)u(n[i][0],n[i][3][t][0],n[i][3][t][1])}function w(n,i){for(var t,e=["property","duration","easing","delay"],r=0;r<n.length;r++)for(var o=0;4>o;o++){t=window.tradeWind[e[o]];for(var a=0;4>a;a++)u(n[r][0],t.prefixes[a],i(e[o]))}}function y(n,i){if(n.preStyling){W(n.preStyling),i.preStyling=!0;for(var t=[],e=0;e<n.preStyling.length;e++)E(n.preStyling[e],"pre-style"),T(n.preStyling[e]),t[e]=[n.preStyling[e].property,n.preStyling[e].value];return t}return void 0}function g(n,i,t){var e=(parseInt(100*parseFloat(n))+parseInt(100*parseFloat(i)))/100;e>t.timing&&(t.timing=e)}function m(n,i){return i?i:window.tradeWind[n].unspecified}function h(n){if(!n)throw new r;if(!(n instanceof Array))throw new a("animations");if(0===n.length)throw new i("animations")}function v(n){if(0===n.length)throw new t}function W(n){if(!(n instanceof Array))throw new a("pre-styling");if(0===n.length)throw new i("pre-styling")}function b(n){if(!n)throw new d;if(!("string"==typeof n||n instanceof String))throw new s}function S(n){if(!n.property)throw new e("animation","property");if(!n["final"])throw new e("animation","final")}function T(n){if(!n.property)throw new e("pre-style","property");if(!n.value)throw new e("pre-style","value")}function E(n,i){if(!n)throw new o(i)}function x(n,i){for(var t=[["property",""],["duration",""],["easing",""],["delay",""]],e=0;e<n.length;e++)E(n[e],"animation"),S(n[e]),n[e].animationDetails||(n[e].animationDetails={}),t[0][1]+=n[e].property+", ",t[1][1]+=m("duration",n[e].animationDetails.duration)+", ",t[2][1]+=m("easing",n[e].animationDetails.easing)+", ",t[3][1]+=m("delay",n[e].animationDetails.delay)+", ",g(m("duration",n[e].animationDetails.duration),m("delay",n[e].animationDetails.delay),i),I.push([n[e].property,n[e]["final"]]);t[0][1]=A(t[0][1]),t[1][1]=A(t[1][1]),t[2][1]=A(t[2][1]),t[3][1]=A(t[3][1]),F=t}function z(n,i,t,e,r){f(t,e,n),F||(h(i.animations),I=[],q=y(i,r),x(i.animations,r)),t[e][1]=F,t[e][2]=I,t[e][3]=q}function D(n){w(n,function(){return""})}function k(n){w(n,function(n){return m(n)})}function j(n){return"#"+n.id+"."+String(n.className).replace(" ",".")}function A(n){return""===n?"":n.substring(0,n.length-2)}window.tradeWind={padding:100,property:{unspecified:"all",prefixes:["-webkit-transition-property","-moz-transition-property","-o-transition-property","transition-property"]},duration:{unspecified:"0s",prefixes:["-webkit-transition-duration","-moz-transition-duration","-o-transition-duration","transition-duration"]},easing:{unspecified:"ease",prefixes:["-webkit-transition-timing-function","-moz-transition-timing-function","-o-transition-timing-function","transition-timing-function"]},delay:{unspecified:"0s",prefixes:["-webkit-transition-delay","-moz-transition-delay","-o-transition-delay","transition-delay"]}};var F,I,q;n.prototype=new Error,i.prototype=new Error,t.prototype=new Error,e.prototype=new Error,r.prototype=new Error,o.prototype=new Error,a.prototype=new Error,s.prototype=new Error,d.prototype=new Error,window.tradeWind.initialize=function(){return{timing:0,preStyling:!1}},window.tradeWind.parse=function(n,i){for(var t=[],e=0,r=0;r<n.length;r++){E(n[r],"instruction"),F=void 0,I=void 0,q=void 0,b(n[r].elements),n[r].elements=document.querySelectorAll(n[r].elements),v(n[r].elements);for(var o=0;o<n[r].elements.length;o++)z(n[r].elements[o],n[r],t,e,i),e+=1}return t},window.tradeWind.apply=function(n,i,t){var e,r=p(n);l(r),e=1e3*t.timing+window.tradeWind.padding,window.Modernizr&&!Modernizr.csstransitions&&(e=window.tradeWind.padding),setTimeout(function(){D(r),void 0!==i&&i()},e)},window.tradeWind.run=function(n,i){var t=window.tradeWind.initialize(),n=window.tradeWind.parse(n,t);t.preStyling?(c(n),setTimeout(function(){window.tradeWind.apply(n,i,t)},window.tradeWind.padding)):window.tradeWind.apply(n,i,t)}}();
1
+ !function(){"use strict";function n(n){this.message="TradeWind - you inserted twice the same object in the instructions: "+n}function t(n){this.message="TradeWind - the array of "+n+" cannot be empty"}function i(){this.message="TradeWind - the selector of animated elements cannot be empty"}function e(n,t){this.message="TradeWind - "+n+" is missing the required field '"+t+"'"}function r(){this.message="TradeWind - an instruction is missing array of animations"}function o(n){this.message="TradeWind - Found an empty element in the array of "+n+"s, probably due to an unnecessary comma which is not accepted by IE"}function a(n){this.message="TradeWind - expecting an array of "+n+", got a different object"}function s(){this.message="TradeWind - expecting a selector of animated elements, got a different object"}function d(){this.message="TradeWind - cannot parse an undefined selector of animated elements"}function f(t,i,e){for(var r=0;r<t.length;r++)if(t[r][0]===e)throw new n(F(e));t[i]=[e]}function p(n){for(var t=[],i=0,e=0;e<n.length;e++){for(var r=0;4>r;r++)for(var o=0;4>o;o++)u(n[e][0],window.tradeWind[n[e][1][r][0]].prefixes[o],n[e][1][r][1]);t[i]=[n[e][0],n[e][2]],i+=1}return t}function u(n,t,i){n.style[t]=i}function l(n){for(var t=0;t<n.length;t++)for(var i=0;i<n[t][1].length;i++)u(n[t][0],n[t][1][i][0],n[t][1][i][1])}function c(n){A(n);for(var t=0;t<n.length;t++)if(n[t][3])for(var i=0;i<n[t][3].length;i++)u(n[t][0],n[t][3][i][0],n[t][3][i][1])}function w(n,t){for(var i,e=["property","duration","easing","delay"],r=0;r<n.length;r++)for(var o=0;4>o;o++){i=window.tradeWind[e[o]];for(var a=0;4>a;a++)u(n[r][0],i.prefixes[a],t(e[o]))}}function y(n,t){if(n.preStyling){b(n.preStyling),t.preStyling=!0;for(var i=[],e=0;e<n.preStyling.length;e++)n.preStyling[e]=h(n.preStyling[e]),x(n.preStyling[e],"pre-style"),E(n.preStyling[e]),i[e]=[n.preStyling[e].property,n.preStyling[e].value];return i}return void 0}function g(n,t,i){var e=(parseInt(100*parseFloat(n))+parseInt(100*parseFloat(t)))/100;e>i.timing&&(i.timing=e)}function m(n){if("string"!=typeof n)return n;var t=n.split(" "),i={property:t[0],"final":t[1]};return t.length<=2?i:(i.animationDetails={duration:t[2]},t.length<=3?i:(i.animationDetails.delay=t[3],t.length<=4?i:(i.animationDetails.easing=t[4],i)))}function h(n){if("string"!=typeof n)return n;var t=n.split(":");return{property:t[0].trim(),value:t[1].trim()}}function v(n,t){return t?t:window.tradeWind[n].unspecified}function W(n){if(!n)throw new r;if(!(n instanceof Array))throw new a("animations");if(0===n.length)throw new t("animations")}function S(n){if(0===n.length)throw new i}function b(n){if(!(n instanceof Array))throw new a("pre-styling");if(0===n.length)throw new t("pre-styling")}function T(n){if(!n)throw new d;if(!("string"==typeof n||n instanceof String))throw new s}function D(n){if(!n.property)throw new e("animation","property");if(!n["final"])throw new e("animation","final")}function E(n){if(!n.property)throw new e("pre-style","property");if(!n.value)throw new e("pre-style","value")}function x(n,t){if(!n)throw new o(t)}function z(n,t){for(var i=[["property",""],["duration",""],["easing",""],["delay",""]],e=0;e<n.length;e++)n[e]=m(n[e]),x(n[e],"animation"),D(n[e]),n[e].animationDetails||(n[e].animationDetails={}),i[0][1]+=n[e].property+", ",i[1][1]+=v("duration",n[e].animationDetails.duration)+", ",i[2][1]+=v("easing",n[e].animationDetails.easing)+", ",i[3][1]+=v("delay",n[e].animationDetails.delay)+", ",g(v("duration",n[e].animationDetails.duration),v("delay",n[e].animationDetails.delay),t),M.push([n[e].property,n[e]["final"]]);i[0][1]=I(i[0][1]),i[1][1]=I(i[1][1]),i[2][1]=I(i[2][1]),i[3][1]=I(i[3][1]),q=i}function k(n,t,i,e,r){f(i,e,n),q||(W(t.animations),M=[],N=y(t,r),z(t.animations,r)),i[e][1]=q,i[e][2]=M,i[e][3]=N}function j(n){w(n,function(){return""})}function A(n){w(n,function(n){return v(n)})}function F(n){return"#"+n.id+"."+String(n.className).replace(" ",".")}function I(n){return""===n?"":n.substring(0,n.length-2)}window.tradeWind={padding:100,property:{unspecified:"all",prefixes:["-webkit-transition-property","-moz-transition-property","-o-transition-property","transition-property"]},duration:{unspecified:"0s",prefixes:["-webkit-transition-duration","-moz-transition-duration","-o-transition-duration","transition-duration"]},easing:{unspecified:"ease",prefixes:["-webkit-transition-timing-function","-moz-transition-timing-function","-o-transition-timing-function","transition-timing-function"]},delay:{unspecified:"0s",prefixes:["-webkit-transition-delay","-moz-transition-delay","-o-transition-delay","transition-delay"]}};var q,M,N;n.prototype=new Error,t.prototype=new Error,i.prototype=new Error,e.prototype=new Error,r.prototype=new Error,o.prototype=new Error,a.prototype=new Error,s.prototype=new Error,d.prototype=new Error,window.tradeWind.initialize=function(){return{timing:0,preStyling:!1}},window.tradeWind.parse=function(n,t){for(var i=[],e=0,r=0;r<n.length;r++){x(n[r],"instruction"),q=void 0,M=void 0,N=void 0,T(n[r].elements),n[r].elements=document.querySelectorAll(n[r].elements),S(n[r].elements);for(var o=0;o<n[r].elements.length;o++)k(n[r].elements[o],n[r],i,e,t),e+=1}return i},window.tradeWind.apply=function(n,t,i){var e,r=p(n);l(r),e=1e3*i.timing+window.tradeWind.padding,window.Modernizr&&!Modernizr.csstransitions&&(e=window.tradeWind.padding),setTimeout(function(){j(r),void 0!==t&&t()},e)},window.tradeWind.run=function(n,t){var i=window.tradeWind.initialize(),n=window.tradeWind.parse(n,i);i.preStyling?(c(n),setTimeout(function(){window.tradeWind.apply(n,t,i)},window.tradeWind.padding)):window.tradeWind.apply(n,t,i)}}();
@@ -1,3 +1,3 @@
1
1
  module Tradewind
2
- VERSION = "1.2"
2
+ VERSION = "1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tradewind
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.2'
4
+ version: '1.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adriano di Lauro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-18 00:00:00.000000000 Z
11
+ date: 2015-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler