@builder.io/sdk 1.1.29-2 → 1.1.29-6
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.browser.js +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs.js +15 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +15 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +15 -7
- package/dist/index.umd.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/builder.class.js +8 -3
- package/dist/src/builder.class.js.map +1 -1
- package/dist/src/classes/animator.class.d.ts +1 -1
- package/dist/src/classes/animator.class.js +6 -3
- package/dist/src/classes/animator.class.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
throw new Error("Property name \"".concat(name, "\" is not allowed"));
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
var version = "1.1.29-
|
|
155
|
+
var version = "1.1.29-5";
|
|
156
156
|
|
|
157
157
|
var Subscription = /** @class */ (function () {
|
|
158
158
|
function Subscription(listeners, listener) {
|
|
@@ -708,7 +708,10 @@
|
|
|
708
708
|
}, (animation.duration + (animation.delay || 0)) * 1000 + 100);
|
|
709
709
|
});
|
|
710
710
|
}
|
|
711
|
-
else if (animation.repeat &&
|
|
711
|
+
else if (animation.repeat &&
|
|
712
|
+
triggered &&
|
|
713
|
+
!pendingAnimation &&
|
|
714
|
+
!isScrolledIntoView(element)) {
|
|
712
715
|
// we want to repeat the animation everytime the the element is out of vide and back again
|
|
713
716
|
triggered = false;
|
|
714
717
|
assign(element.style, animation.steps[0].styles);
|
|
@@ -720,8 +723,8 @@
|
|
|
720
723
|
function isScrolledIntoView(elem) {
|
|
721
724
|
var rect = elem.getBoundingClientRect();
|
|
722
725
|
var windowHeight = window.innerHeight;
|
|
723
|
-
var
|
|
724
|
-
var threshold =
|
|
726
|
+
var thresholdPercent = (animation.thresholdPercent || 0) / 100;
|
|
727
|
+
var threshold = thresholdPercent * windowHeight;
|
|
725
728
|
// TODO: partial in view? or what if element is larger than screen itself
|
|
726
729
|
return (rect.bottom > threshold && rect.top < windowHeight - threshold // Element is peeking top or bottom
|
|
727
730
|
// (rect.top > 0 && rect.bottom < window.innerHeight) || // element fits within the screen and is fully on screen (not hanging off at all)
|
|
@@ -1239,9 +1242,14 @@
|
|
|
1239
1242
|
if (isBrowser) {
|
|
1240
1243
|
this.bindMessageListeners();
|
|
1241
1244
|
if (Builder.isEditing) {
|
|
1242
|
-
parent.postMessage({
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
+
parent.postMessage({
|
|
1246
|
+
type: 'builder.animatorOptions',
|
|
1247
|
+
data: {
|
|
1248
|
+
options: {
|
|
1249
|
+
version: 2,
|
|
1250
|
+
},
|
|
1251
|
+
},
|
|
1252
|
+
}, '*');
|
|
1245
1253
|
}
|
|
1246
1254
|
// TODO: postmessage to parent the builder info for every package
|
|
1247
1255
|
// type: 'builder.sdk', data: { name: '@builder.io/react', version: '0.1.23' }
|