@builder.io/sdk 1.1.29-1 → 1.1.29-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.
package/dist/index.esm.js CHANGED
@@ -123,7 +123,7 @@ function assertAllowedPropertyName(name) {
123
123
  throw new Error("Property name \"".concat(name, "\" is not allowed"));
124
124
  }
125
125
 
126
- var version = "1.1.29-0";
126
+ var version = "1.1.29-2";
127
127
 
128
128
  var Subscription = /** @class */ (function () {
129
129
  function Subscription(listeners, listener) {
@@ -672,14 +672,17 @@ var Animator = /** @class */ (function () {
672
672
  }
673
673
  setTimeout(function () {
674
674
  pendingAnimation = false;
675
- element.style.transition = '';
676
- element.style.transitionDelay = '';
677
- }, (animation.duration * 1000 + (animation.delay || 0)) * 1000 + 100);
675
+ if (!animation.repeat) {
676
+ element.style.transition = '';
677
+ element.style.transitionDelay = '';
678
+ }
679
+ }, (animation.duration + (animation.delay || 0)) * 1000 + 100);
678
680
  });
679
681
  }
680
682
  else if (animation.repeat && triggered && !pendingAnimation && !isScrolledIntoView(element)) {
681
683
  // we want to repeat the animation everytime the the element is out of vide and back again
682
684
  triggered = false;
685
+ assign(element.style, animation.steps[0].styles);
683
686
  }
684
687
  }
685
688
  // TODO: roll all of these in one for more efficiency of checking all the rects
@@ -688,8 +691,8 @@ var Animator = /** @class */ (function () {
688
691
  function isScrolledIntoView(elem) {
689
692
  var rect = elem.getBoundingClientRect();
690
693
  var windowHeight = window.innerHeight;
691
- var thresholdPrecent = animation.thresholdPrecent || 0;
692
- var threshold = thresholdPrecent * windowHeight;
694
+ var thresholdPercent = animation.thresholdPercent || 0;
695
+ var threshold = thresholdPercent * windowHeight;
693
696
  // TODO: partial in view? or what if element is larger than screen itself
694
697
  return (rect.bottom > threshold && rect.top < windowHeight - threshold // Element is peeking top or bottom
695
698
  // (rect.top > 0 && rect.bottom < window.innerHeight) || // element fits within the screen and is fully on screen (not hanging off at all)