Socket
Socket
Sign inDemoInstall

nativescript-lottie

Package Overview
Dependencies
0
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.3 to 4.0.0

12

index.d.ts

@@ -22,8 +22,2 @@ import { Color, View } from 'tns-core-modules/ui/core/view';

/**
* Caching strategy for compositions that will be reused frequently.
* Weak or Strong indicators the GC reference strength of the composition in the cache.
*/
cacheStrategy: EnumCacheStrategy;
/**
* Block to be executed upon completion of the animation.

@@ -99,7 +93,1 @@ * The animation is considered complete when it finishes playing and is no longer looping.

}
export declare enum EnumCacheStrategy {
None = 0,
Weak = 1,
Strong = 2
}

39

nativescript-lottie.android.js

@@ -8,3 +8,3 @@ "use strict";

return extendStatics(d, b);
}
};
return function (d, b) {

@@ -19,2 +19,18 @@ extendStatics(d, b);

var utils_1 = require("./utils");
var LottieProperty;
var LottieKeyPath;
var LottieValueCallback;
function initProps() {
if (!LottieProperty) {
LottieProperty = com.airbnb.lottie.LottieProperty;
}
if (!LottieKeyPath) {
LottieKeyPath = com.airbnb.lottie.model.KeyPath;
}
if (!LottieValueCallback) {
LottieValueCallback = com.airbnb.lottie.value.LottieValueCallback;
}
}
var DEFAULT_MAX_PROGRESS = 1;
var DEFAULT_MIN_PROGRESS = 0;
var LottieView = (function (_super) {

@@ -33,2 +49,3 @@ __extends(LottieView, _super);

LottieView.prototype.createNativeView = function () {
initProps();
return new com.airbnb.lottie.LottieAnimationView(this._context);

@@ -74,8 +91,3 @@ };

src = /.json$/.test(src) ? src : src + ".json";
if (this.cacheStrategy) {
this.nativeView.setAnimation(src, this.cacheStrategy);
}
else {
this.nativeView.setAnimation(src);
}
this.nativeView.setAnimation(src);
if (this.loop) {

@@ -89,5 +101,2 @@ this.setLoopAnimation(this.loop);

};
LottieView.prototype[nativescript_lottie_common_1.cacheStrategyProperty.setNative] = function (_cacheStrategy) {
this.setSrc(this.src);
};
LottieView.prototype[nativescript_lottie_common_1.loopProperty.setNative] = function (loop) {

@@ -125,3 +134,3 @@ this.setLoopAnimation(loop);

});
this.nativeView.addValueCallback(new com.airbnb.lottie.model.KeyPath(nativeKeyPath_1), com.airbnb.lottie.LottieProperty.COLOR, new com.airbnb.lottie.value.LottieValueCallback(new java.lang.Integer(value.android)));
this.nativeView.addValueCallback(new LottieKeyPath(nativeKeyPath_1), LottieProperty.COLOR, new LottieValueCallback(new java.lang.Integer(value.android)));
}

@@ -142,3 +151,3 @@ };

value = utils_1.clamp(value);
this.nativeView.addValueCallback(new com.airbnb.lottie.model.KeyPath(nativeKeyPath_2), com.airbnb.lottie.LottieProperty.OPACITY, new com.airbnb.lottie.value.LottieValueCallback(new java.lang.Integer(value * 100)));
this.nativeView.addValueCallback(new LottieKeyPath(nativeKeyPath_2), LottieProperty.OPACITY, new LottieValueCallback(new java.lang.Integer(value * 100)));
}

@@ -202,8 +211,2 @@ };

exports.LottieView = LottieView;
var CacheStrategy;
(function (CacheStrategy) {
CacheStrategy[CacheStrategy["None"] = com.airbnb.lottie.LottieAnimationView.CacheStrategy.None] = "None";
CacheStrategy[CacheStrategy["Weak"] = com.airbnb.lottie.LottieAnimationView.CacheStrategy.Weak] = "Weak";
CacheStrategy[CacheStrategy["Strong"] = com.airbnb.lottie.LottieAnimationView.CacheStrategy.Strong] = "Strong";
})(CacheStrategy = exports.CacheStrategy || (exports.CacheStrategy = {}));
//# sourceMappingURL=nativescript-lottie.android.js.map

@@ -8,3 +8,3 @@ "use strict";

return extendStatics(d, b);
}
};
return function (d, b) {

@@ -43,6 +43,2 @@ extendStatics(d, b);

exports.autoPlayProperty.register(LottieViewBase);
exports.cacheStrategyProperty = new properties_1.Property({
name: 'cacheStrategy'
});
exports.cacheStrategyProperty.register(LottieViewBase);
//# sourceMappingURL=nativescript-lottie.common.js.map

@@ -8,3 +8,3 @@ "use strict";

return extendStatics(d, b);
}
};
return function (d, b) {

@@ -11,0 +11,0 @@ extendStatics(d, b);

{
"name": "nativescript-lottie",
"version": "3.0.3",
"version": "4.0.0",
"description": "NativeScript plugin to expose AirBnB Lottie library",

@@ -9,4 +9,4 @@ "main": "nativescript-lottie",

"platforms": {
"android": "3.0.1",
"ios": "3.0.1"
"android": "6.0.0",
"ios": "6.0.1"
}

@@ -76,8 +76,8 @@ },

"devDependencies": {
"tns-core-modules": "^5.2.2",
"tns-platform-declarations": "^5.2.2",
"tns-core-modules": "^6.0.0",
"tns-platform-declarations": "^6.0.0",
"lint-staged": "^8.1.5",
"husky": "^1.3.1",
"prettier": "~1.16.4",
"typescript": "~3.1.6",
"typescript": "~3.4.5",
"tslint": "5.13.1",

@@ -84,0 +84,0 @@ "prompt": "^1.0.0",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc