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 +4 -4
- data/README.md +4 -2
- data/app/assets/javascripts/tradewind.js +1 -1
- data/lib/tradewind/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6de59fa1b69be11fd0681ac42732aeb0d6f7b776
|
|
4
|
+
data.tar.gz: e4c4ade198e76da7d960d9222a24744f5a527d85
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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)}}();
|
data/lib/tradewind/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2015-10-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|