Comparing version 1.20.2 to 1.21.0
# Svelte changelog | ||
## 1.21.0 | ||
* Always use `helpers` if referenced, not just for call expressions ([#575](https://github.com/sveltejs/svelte/issues/575)) | ||
* Fix parsing of `<textarea>` children ([#599](https://github.com/sveltejs/svelte/pull/599)) | ||
* Treat `<textarea>` value attributes and children as equivalent, and fail validation if both are present ([#599](https://github.com/sveltejs/svelte/pull/599)) | ||
* Fix `<textarea>` SSR ([#599](https://github.com/sveltejs/svelte/pull/599)) | ||
* Apply CSS transition styles immediately if transition has delay ([#574](https://github.com/sveltejs/svelte/issues/574)) | ||
* Ensure `transitionManager` is treeshakeable ([#593](https://github.com/sveltejs/svelte/issues/593)) | ||
* Fix for environments where `node.style.animation` is undefined ([#587](https://github.com/sveltejs/svelte/issues/587)) | ||
* Fix order of operations when dealing with `<select>` elements ([#590](https://github.com/sveltejs/svelte/issues/590)) | ||
* Downgrade 'invalid callee' to a warning ([#579](https://github.com/sveltejs/svelte/issues/579)) | ||
* Convert to TypeScript ([#573](https://github.com/sveltejs/svelte/pull/573)) | ||
## 1.20.2 | ||
@@ -4,0 +17,0 @@ |
{ | ||
"name": "svelte", | ||
"version": "1.20.2", | ||
"version": "1.21.0", | ||
"description": "The magical disappearing UI framework", | ||
@@ -45,2 +45,4 @@ "main": "compiler/svelte.js", | ||
"devDependencies": { | ||
"@types/mocha": "^2.2.41", | ||
"@types/node": "^7.0.22", | ||
"acorn": "^4.0.4", | ||
@@ -78,5 +80,7 @@ "babel": "^6.23.0", | ||
"rollup-plugin-node-resolve": "^2.0.0", | ||
"rollup-plugin-typescript": "^0.8.1", | ||
"rollup-watch": "^3.2.2", | ||
"source-map": "^0.5.6", | ||
"source-map-support": "^0.4.8" | ||
"source-map-support": "^0.4.8", | ||
"typescript": "^2.3.2" | ||
}, | ||
@@ -83,0 +87,0 @@ "nyc": { |
@@ -94,3 +94,3 @@ function noop () {} | ||
node.style.animation = node.style.animation.split( ',' ) | ||
node.style.animation = ( node.style.animation || '' ).split( ',' ) | ||
.filter( function ( anim ) { | ||
@@ -108,2 +108,3 @@ // when introing, discard old animations if there are any | ||
var ease = obj.easing || linear; | ||
var cssText; | ||
@@ -115,4 +116,11 @@ // TODO share <style> tag between all transitions? | ||
if ( intro && obj.tick ) obj.tick( 0 ); | ||
if ( intro ) { | ||
if ( obj.css && obj.delay ) { | ||
cssText = node.style.cssText; | ||
node.style.cssText += obj.css( 0 ); | ||
} | ||
if ( obj.tick ) obj.tick( 0 ); | ||
} | ||
return { | ||
@@ -149,2 +157,3 @@ t: intro ? 0 : 1, | ||
if ( obj.css ) { | ||
if ( obj.delay ) node.style.cssText = cssText; | ||
generateKeyframes( program.a, program.b, program.delta, program.duration, ease, obj.css, node, style ); | ||
@@ -184,5 +193,6 @@ } | ||
transitions: [], | ||
bound: null, | ||
add: function ( transition ) { | ||
transitionManager.transitions.push( transition ); | ||
this.transitions.push( transition ); | ||
@@ -196,9 +206,9 @@ if ( !this.running ) { | ||
next: function () { | ||
transitionManager.running = false; | ||
this.running = false; | ||
var now = window.performance.now(); | ||
var i = transitionManager.transitions.length; | ||
var i = this.transitions.length; | ||
while ( i-- ) { | ||
var transition = transitionManager.transitions[i]; | ||
var transition = this.transitions[i]; | ||
@@ -215,10 +225,10 @@ if ( transition.program && now >= transition.program.end ) { | ||
transition.update( now ); | ||
transitionManager.running = true; | ||
this.running = true; | ||
} else if ( !transition.pending ) { | ||
transitionManager.transitions.splice( i, 1 ); | ||
this.transitions.splice( i, 1 ); | ||
} | ||
} | ||
if ( transitionManager.running ) { | ||
requestAnimationFrame( transitionManager.next ); | ||
if ( this.running ) { | ||
requestAnimationFrame( this.bound || ( this.bound = this.next.bind( this ) ) ); | ||
} | ||
@@ -225,0 +235,0 @@ } |
Sorry, the diff of this file is too big to display
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
1685460
39
14653