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