@amazon-devices/lottie-react-native 2.0.1758683737
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/LICENSE +7 -0
- package/SystemBundles/90296ccfe5ff2db2f9fe68a18eca092f8b7c17d1125cfafc612d18788fe9bce6.bundle +10322 -0
- package/SystemBundles/90296ccfe5ff2db2f9fe68a18eca092f8b7c17d1125cfafc612d18788fe9bce6.map +1 -0
- package/SystemModules/amzn__lottie-react-native-2.modules.txt +13 -0
- package/SystemModules/amzn__lottie-react-native-2.private.modules.txt +92 -0
- package/SystemModules/keplerscript-system-bundle-config.json +7 -0
- package/THIRD_PARTY_NOTICES.txt +640 -0
- package/android/build.gradle +120 -0
- package/android/gradle.properties +27 -0
- package/android/src/main/AndroidManifest.xml +6 -0
- package/android/src/main/java/com/airbnb/android/react/lottie/LottieAnimationViewManagerImpl.kt +260 -0
- package/android/src/main/java/com/airbnb/android/react/lottie/LottieAnimationViewPropertyManager.kt +156 -0
- package/android/src/main/java/com/airbnb/android/react/lottie/LottiePackage.kt +18 -0
- package/android/src/newarch/com/airbnb/android/react/lottie/LottieAnimationViewManager.kt +219 -0
- package/android/src/oldarch/com/airbnb/android/react/lottie/LottieAnimationViewManager.kt +187 -0
- package/ios/Fabric/LottieAnimationViewComponentView.h +28 -0
- package/ios/Fabric/LottieAnimationViewComponentView.mm +140 -0
- package/ios/Fabric/LottieContainerView.h +33 -0
- package/ios/Fabric/RNLottieFabricConversions.h +29 -0
- package/ios/LottieReactNative/AnimationViewManagerModule.swift +88 -0
- package/ios/LottieReactNative/Bridging.h +4 -0
- package/ios/LottieReactNative/ContainerView.swift +281 -0
- package/ios/LottieReactNative/LRNAnimationViewManagerObjC.m +25 -0
- package/ios/LottieReactNative/PlatformColor.swift +31 -0
- package/ios/LottieReactNative/RCTConvert+Lottie.h +7 -0
- package/ios/LottieReactNative/RCTConvert+Lottie.m +24 -0
- package/ios/LottieReactNative.xcodeproj/project.pbxproj +449 -0
- package/ios/LottieReactNative.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/LottieReactNative.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/kepler-compatibility.json +8 -0
- package/kepler-transformed-package-info.json +3 -0
- package/lib/commonjs/LottieView.js +207 -0
- package/lib/commonjs/LottieView.js.map +1 -0
- package/lib/commonjs/LottieView.types.js +6 -0
- package/lib/commonjs/LottieView.types.js.map +1 -0
- package/lib/commonjs/index.js +9 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/specs/LottieAnimationViewNativeComponent.js +97 -0
- package/lib/commonjs/specs/LottieAnimationViewNativeComponent.js.map +1 -0
- package/lib/module/LottieView.js +201 -0
- package/lib/module/LottieView.js.map +1 -0
- package/lib/module/LottieView.types.js +2 -0
- package/lib/module/LottieView.types.js.map +1 -0
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/specs/LottieAnimationViewNativeComponent.js +91 -0
- package/lib/module/specs/LottieAnimationViewNativeComponent.js.map +1 -0
- package/lib/typescript/LottieView.d.ts +27 -0
- package/lib/typescript/LottieView.types.d.ts +206 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/specs/LottieAnimationViewNativeComponent.d.ts +61 -0
- package/lottie-react-native.podspec +44 -0
- package/package.json +1 -0
- package/react-native.config.js +32 -0
- package/src/LottieView.tsx +257 -0
- package/src/LottieView.types.ts +275 -0
- package/src/__tests__/__snapshots__/validate-public-api.test.js.snap +248 -0
- package/src/__tests__/validate-public-api.test.js +33 -0
- package/src/index.tsx +2 -0
- package/src/specs/LottieAnimationViewNativeComponent.ts +170 -0
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
// !$*UTF8*$!
|
|
2
|
+
{
|
|
3
|
+
archiveVersion = 1;
|
|
4
|
+
classes = {
|
|
5
|
+
};
|
|
6
|
+
objectVersion = 52;
|
|
7
|
+
objects = {
|
|
8
|
+
|
|
9
|
+
/* Begin PBXBuildFile section */
|
|
10
|
+
6E31134322B3A73000690A5B /* AnimationViewManagerModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E31134022B3A73000690A5B /* AnimationViewManagerModule.swift */; platformFilter = ios; };
|
|
11
|
+
6E31134422B3A73000690A5B /* ContainerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E31134122B3A73000690A5B /* ContainerView.swift */; platformFilter = ios; };
|
|
12
|
+
6E31134522B3A73000690A5B /* LRNAnimationViewManagerObjC.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E31134222B3A73000690A5B /* LRNAnimationViewManagerObjC.m */; platformFilter = ios; };
|
|
13
|
+
74E4DD2324F9677E00F271AF /* AnimationViewManagerModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E31134022B3A73000690A5B /* AnimationViewManagerModule.swift */; };
|
|
14
|
+
74E4DD2424F9678000F271AF /* ContainerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E31134122B3A73000690A5B /* ContainerView.swift */; };
|
|
15
|
+
74E4DD2524F9678100F271AF /* LRNAnimationViewManagerObjC.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E31134222B3A73000690A5B /* LRNAnimationViewManagerObjC.m */; };
|
|
16
|
+
FA8409AE28361B7C00F398C7 /* RCTConvert+Lottie.m in Sources */ = {isa = PBXBuildFile; fileRef = FA8409AB28361B7C00F398C7 /* RCTConvert+Lottie.m */; };
|
|
17
|
+
FA8409AF28361B7C00F398C7 /* PlatformColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA8409AD28361B7C00F398C7 /* PlatformColor.swift */; };
|
|
18
|
+
/* End PBXBuildFile section */
|
|
19
|
+
|
|
20
|
+
/* Begin PBXCopyFilesBuildPhase section */
|
|
21
|
+
11FA5C4F1C4A1296003AC2EE /* CopyFiles */ = {
|
|
22
|
+
isa = PBXCopyFilesBuildPhase;
|
|
23
|
+
buildActionMask = 2147483647;
|
|
24
|
+
dstPath = "include/$(PRODUCT_NAME)";
|
|
25
|
+
dstSubfolderSpec = 16;
|
|
26
|
+
files = (
|
|
27
|
+
);
|
|
28
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
29
|
+
};
|
|
30
|
+
/* End PBXCopyFilesBuildPhase section */
|
|
31
|
+
|
|
32
|
+
/* Begin PBXFileReference section */
|
|
33
|
+
11FA5C511C4A1296003AC2EE /* libLottieReactNative.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libLottieReactNative.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
34
|
+
6E31133F22B3A72F00690A5B /* Bridging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Bridging.h; sourceTree = "<group>"; };
|
|
35
|
+
6E31134022B3A73000690A5B /* AnimationViewManagerModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimationViewManagerModule.swift; sourceTree = "<group>"; };
|
|
36
|
+
6E31134122B3A73000690A5B /* ContainerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContainerView.swift; sourceTree = "<group>"; };
|
|
37
|
+
6E31134222B3A73000690A5B /* LRNAnimationViewManagerObjC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LRNAnimationViewManagerObjC.m; sourceTree = "<group>"; };
|
|
38
|
+
85ABD46724D07DFD0099C9BD /* libLottieReactNativeMacOS.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libLottieReactNativeMacOS.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
39
|
+
FA8409AB28361B7C00F398C7 /* RCTConvert+Lottie.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RCTConvert+Lottie.m"; sourceTree = "<group>"; };
|
|
40
|
+
FA8409AC28361B7C00F398C7 /* RCTConvert+Lottie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RCTConvert+Lottie.h"; sourceTree = "<group>"; };
|
|
41
|
+
FA8409AD28361B7C00F398C7 /* PlatformColor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PlatformColor.swift; sourceTree = "<group>"; };
|
|
42
|
+
/* End PBXFileReference section */
|
|
43
|
+
|
|
44
|
+
/* Begin PBXFrameworksBuildPhase section */
|
|
45
|
+
11FA5C4E1C4A1296003AC2EE /* Frameworks */ = {
|
|
46
|
+
isa = PBXFrameworksBuildPhase;
|
|
47
|
+
buildActionMask = 2147483647;
|
|
48
|
+
files = (
|
|
49
|
+
);
|
|
50
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
51
|
+
};
|
|
52
|
+
85ABD46524D07DFD0099C9BD /* Frameworks */ = {
|
|
53
|
+
isa = PBXFrameworksBuildPhase;
|
|
54
|
+
buildActionMask = 2147483647;
|
|
55
|
+
files = (
|
|
56
|
+
);
|
|
57
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
58
|
+
};
|
|
59
|
+
/* End PBXFrameworksBuildPhase section */
|
|
60
|
+
|
|
61
|
+
/* Begin PBXGroup section */
|
|
62
|
+
11FA5C481C4A1296003AC2EE = {
|
|
63
|
+
isa = PBXGroup;
|
|
64
|
+
children = (
|
|
65
|
+
11FA5C531C4A1296003AC2EE /* LottieReactNative */,
|
|
66
|
+
11FA5C521C4A1296003AC2EE /* Products */,
|
|
67
|
+
8435B7FF1E38377000CD1749 /* Frameworks */,
|
|
68
|
+
);
|
|
69
|
+
sourceTree = "<group>";
|
|
70
|
+
};
|
|
71
|
+
11FA5C521C4A1296003AC2EE /* Products */ = {
|
|
72
|
+
isa = PBXGroup;
|
|
73
|
+
children = (
|
|
74
|
+
11FA5C511C4A1296003AC2EE /* libLottieReactNative.a */,
|
|
75
|
+
85ABD46724D07DFD0099C9BD /* libLottieReactNativeMacOS.dylib */,
|
|
76
|
+
);
|
|
77
|
+
name = Products;
|
|
78
|
+
sourceTree = "<group>";
|
|
79
|
+
};
|
|
80
|
+
11FA5C531C4A1296003AC2EE /* LottieReactNative */ = {
|
|
81
|
+
isa = PBXGroup;
|
|
82
|
+
children = (
|
|
83
|
+
FA8409AD28361B7C00F398C7 /* PlatformColor.swift */,
|
|
84
|
+
FA8409AC28361B7C00F398C7 /* RCTConvert+Lottie.h */,
|
|
85
|
+
FA8409AB28361B7C00F398C7 /* RCTConvert+Lottie.m */,
|
|
86
|
+
6E31134022B3A73000690A5B /* AnimationViewManagerModule.swift */,
|
|
87
|
+
6E31134122B3A73000690A5B /* ContainerView.swift */,
|
|
88
|
+
6E31134222B3A73000690A5B /* LRNAnimationViewManagerObjC.m */,
|
|
89
|
+
6E31133F22B3A72F00690A5B /* Bridging.h */,
|
|
90
|
+
);
|
|
91
|
+
path = LottieReactNative;
|
|
92
|
+
sourceTree = "<group>";
|
|
93
|
+
};
|
|
94
|
+
8435B7FF1E38377000CD1749 /* Frameworks */ = {
|
|
95
|
+
isa = PBXGroup;
|
|
96
|
+
children = (
|
|
97
|
+
);
|
|
98
|
+
name = Frameworks;
|
|
99
|
+
sourceTree = "<group>";
|
|
100
|
+
};
|
|
101
|
+
/* End PBXGroup section */
|
|
102
|
+
|
|
103
|
+
/* Begin PBXHeadersBuildPhase section */
|
|
104
|
+
85ABD46324D07DFD0099C9BD /* Headers */ = {
|
|
105
|
+
isa = PBXHeadersBuildPhase;
|
|
106
|
+
buildActionMask = 2147483647;
|
|
107
|
+
files = (
|
|
108
|
+
);
|
|
109
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
110
|
+
};
|
|
111
|
+
/* End PBXHeadersBuildPhase section */
|
|
112
|
+
|
|
113
|
+
/* Begin PBXNativeTarget section */
|
|
114
|
+
11FA5C501C4A1296003AC2EE /* LottieReactNative */ = {
|
|
115
|
+
isa = PBXNativeTarget;
|
|
116
|
+
buildConfigurationList = 11FA5C5A1C4A1296003AC2EE /* Build configuration list for PBXNativeTarget "LottieReactNative" */;
|
|
117
|
+
buildPhases = (
|
|
118
|
+
11FA5C4D1C4A1296003AC2EE /* Sources */,
|
|
119
|
+
11FA5C4E1C4A1296003AC2EE /* Frameworks */,
|
|
120
|
+
11FA5C4F1C4A1296003AC2EE /* CopyFiles */,
|
|
121
|
+
);
|
|
122
|
+
buildRules = (
|
|
123
|
+
);
|
|
124
|
+
dependencies = (
|
|
125
|
+
);
|
|
126
|
+
name = LottieReactNative;
|
|
127
|
+
productName = LottieReactNative;
|
|
128
|
+
productReference = 11FA5C511C4A1296003AC2EE /* libLottieReactNative.a */;
|
|
129
|
+
productType = "com.apple.product-type.library.static";
|
|
130
|
+
};
|
|
131
|
+
85ABD46624D07DFD0099C9BD /* LottieReactNativeMacOS */ = {
|
|
132
|
+
isa = PBXNativeTarget;
|
|
133
|
+
buildConfigurationList = 85ABD46F24D07DFD0099C9BD /* Build configuration list for PBXNativeTarget "LottieReactNativeMacOS" */;
|
|
134
|
+
buildPhases = (
|
|
135
|
+
85ABD46324D07DFD0099C9BD /* Headers */,
|
|
136
|
+
85ABD46424D07DFD0099C9BD /* Sources */,
|
|
137
|
+
85ABD46524D07DFD0099C9BD /* Frameworks */,
|
|
138
|
+
);
|
|
139
|
+
buildRules = (
|
|
140
|
+
);
|
|
141
|
+
dependencies = (
|
|
142
|
+
);
|
|
143
|
+
name = LottieReactNativeMacOS;
|
|
144
|
+
productName = LottieReactNativeMacOS;
|
|
145
|
+
productReference = 85ABD46724D07DFD0099C9BD /* libLottieReactNativeMacOS.dylib */;
|
|
146
|
+
productType = "com.apple.product-type.library.dynamic";
|
|
147
|
+
};
|
|
148
|
+
/* End PBXNativeTarget section */
|
|
149
|
+
|
|
150
|
+
/* Begin PBXProject section */
|
|
151
|
+
11FA5C491C4A1296003AC2EE /* Project object */ = {
|
|
152
|
+
isa = PBXProject;
|
|
153
|
+
attributes = {
|
|
154
|
+
LastUpgradeCheck = 0720;
|
|
155
|
+
ORGANIZATIONNAME = Airbnb;
|
|
156
|
+
TargetAttributes = {
|
|
157
|
+
11FA5C501C4A1296003AC2EE = {
|
|
158
|
+
CreatedOnToolsVersion = 7.2;
|
|
159
|
+
LastSwiftMigration = 1020;
|
|
160
|
+
};
|
|
161
|
+
85ABD46624D07DFD0099C9BD = {
|
|
162
|
+
CreatedOnToolsVersion = 11.6;
|
|
163
|
+
LastSwiftMigration = 1160;
|
|
164
|
+
ProvisioningStyle = Automatic;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
buildConfigurationList = 11FA5C4C1C4A1296003AC2EE /* Build configuration list for PBXProject "LottieReactNative" */;
|
|
169
|
+
compatibilityVersion = "Xcode 3.2";
|
|
170
|
+
developmentRegion = English;
|
|
171
|
+
hasScannedForEncodings = 0;
|
|
172
|
+
knownRegions = (
|
|
173
|
+
English,
|
|
174
|
+
en,
|
|
175
|
+
);
|
|
176
|
+
mainGroup = 11FA5C481C4A1296003AC2EE;
|
|
177
|
+
productRefGroup = 11FA5C521C4A1296003AC2EE /* Products */;
|
|
178
|
+
projectDirPath = "";
|
|
179
|
+
projectRoot = "";
|
|
180
|
+
targets = (
|
|
181
|
+
11FA5C501C4A1296003AC2EE /* LottieReactNative */,
|
|
182
|
+
85ABD46624D07DFD0099C9BD /* LottieReactNativeMacOS */,
|
|
183
|
+
);
|
|
184
|
+
};
|
|
185
|
+
/* End PBXProject section */
|
|
186
|
+
|
|
187
|
+
/* Begin PBXSourcesBuildPhase section */
|
|
188
|
+
11FA5C4D1C4A1296003AC2EE /* Sources */ = {
|
|
189
|
+
isa = PBXSourcesBuildPhase;
|
|
190
|
+
buildActionMask = 2147483647;
|
|
191
|
+
files = (
|
|
192
|
+
FA8409AE28361B7C00F398C7 /* RCTConvert+Lottie.m in Sources */,
|
|
193
|
+
FA8409AF28361B7C00F398C7 /* PlatformColor.swift in Sources */,
|
|
194
|
+
6E31134422B3A73000690A5B /* ContainerView.swift in Sources */,
|
|
195
|
+
6E31134522B3A73000690A5B /* LRNAnimationViewManagerObjC.m in Sources */,
|
|
196
|
+
6E31134322B3A73000690A5B /* AnimationViewManagerModule.swift in Sources */,
|
|
197
|
+
);
|
|
198
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
199
|
+
};
|
|
200
|
+
85ABD46424D07DFD0099C9BD /* Sources */ = {
|
|
201
|
+
isa = PBXSourcesBuildPhase;
|
|
202
|
+
buildActionMask = 2147483647;
|
|
203
|
+
files = (
|
|
204
|
+
74E4DD2324F9677E00F271AF /* AnimationViewManagerModule.swift in Sources */,
|
|
205
|
+
74E4DD2424F9678000F271AF /* ContainerView.swift in Sources */,
|
|
206
|
+
74E4DD2524F9678100F271AF /* LRNAnimationViewManagerObjC.m in Sources */,
|
|
207
|
+
);
|
|
208
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
209
|
+
};
|
|
210
|
+
/* End PBXSourcesBuildPhase section */
|
|
211
|
+
|
|
212
|
+
/* Begin XCBuildConfiguration section */
|
|
213
|
+
11FA5C581C4A1296003AC2EE /* Debug */ = {
|
|
214
|
+
isa = XCBuildConfiguration;
|
|
215
|
+
buildSettings = {
|
|
216
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
217
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
218
|
+
CLANG_CXX_LIBRARY = "libc++";
|
|
219
|
+
CLANG_ENABLE_MODULES = YES;
|
|
220
|
+
CLANG_ENABLE_OBJC_ARC = YES;
|
|
221
|
+
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
222
|
+
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
223
|
+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
224
|
+
CLANG_WARN_EMPTY_BODY = YES;
|
|
225
|
+
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
226
|
+
CLANG_WARN_INT_CONVERSION = YES;
|
|
227
|
+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
228
|
+
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
229
|
+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
230
|
+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
|
231
|
+
COPY_PHASE_STRIP = NO;
|
|
232
|
+
DEBUG_INFORMATION_FORMAT = dwarf;
|
|
233
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
234
|
+
ENABLE_TESTABILITY = YES;
|
|
235
|
+
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
236
|
+
GCC_DYNAMIC_NO_PIC = NO;
|
|
237
|
+
GCC_NO_COMMON_BLOCKS = YES;
|
|
238
|
+
GCC_OPTIMIZATION_LEVEL = 0;
|
|
239
|
+
GCC_PREPROCESSOR_DEFINITIONS = (
|
|
240
|
+
"DEBUG=1",
|
|
241
|
+
"$(inherited)",
|
|
242
|
+
);
|
|
243
|
+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
244
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
245
|
+
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
246
|
+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
247
|
+
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
248
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
249
|
+
HEADER_SEARCH_PATHS = "";
|
|
250
|
+
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
|
|
251
|
+
MTL_ENABLE_DEBUG_INFO = YES;
|
|
252
|
+
ONLY_ACTIVE_ARCH = YES;
|
|
253
|
+
SDKROOT = iphoneos;
|
|
254
|
+
};
|
|
255
|
+
name = Debug;
|
|
256
|
+
};
|
|
257
|
+
11FA5C591C4A1296003AC2EE /* Release */ = {
|
|
258
|
+
isa = XCBuildConfiguration;
|
|
259
|
+
buildSettings = {
|
|
260
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
261
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
262
|
+
CLANG_CXX_LIBRARY = "libc++";
|
|
263
|
+
CLANG_ENABLE_MODULES = YES;
|
|
264
|
+
CLANG_ENABLE_OBJC_ARC = YES;
|
|
265
|
+
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
266
|
+
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
267
|
+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
268
|
+
CLANG_WARN_EMPTY_BODY = YES;
|
|
269
|
+
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
270
|
+
CLANG_WARN_INT_CONVERSION = YES;
|
|
271
|
+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
272
|
+
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
273
|
+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
274
|
+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
|
275
|
+
COPY_PHASE_STRIP = NO;
|
|
276
|
+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
|
277
|
+
ENABLE_NS_ASSERTIONS = NO;
|
|
278
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
279
|
+
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
280
|
+
GCC_NO_COMMON_BLOCKS = YES;
|
|
281
|
+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
282
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
283
|
+
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
284
|
+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
285
|
+
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
286
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
287
|
+
HEADER_SEARCH_PATHS = "";
|
|
288
|
+
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
|
|
289
|
+
MTL_ENABLE_DEBUG_INFO = NO;
|
|
290
|
+
SDKROOT = iphoneos;
|
|
291
|
+
VALIDATE_PRODUCT = YES;
|
|
292
|
+
};
|
|
293
|
+
name = Release;
|
|
294
|
+
};
|
|
295
|
+
11FA5C5B1C4A1296003AC2EE /* Debug */ = {
|
|
296
|
+
isa = XCBuildConfiguration;
|
|
297
|
+
buildSettings = {
|
|
298
|
+
CLANG_ENABLE_MODULES = YES;
|
|
299
|
+
FRAMEWORK_SEARCH_PATHS = "";
|
|
300
|
+
HEADER_SEARCH_PATHS = "";
|
|
301
|
+
LD_RUNPATH_SEARCH_PATHS = (
|
|
302
|
+
"$(inherited)",
|
|
303
|
+
"@executable_path/Frameworks",
|
|
304
|
+
"@loader_path/Frameworks",
|
|
305
|
+
);
|
|
306
|
+
OTHER_LDFLAGS = "-ObjC";
|
|
307
|
+
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
308
|
+
SKIP_INSTALL = YES;
|
|
309
|
+
SWIFT_OBJC_BRIDGING_HEADER = LottieReactNative/Bridging.h;
|
|
310
|
+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
|
311
|
+
SWIFT_VERSION = 5.0;
|
|
312
|
+
};
|
|
313
|
+
name = Debug;
|
|
314
|
+
};
|
|
315
|
+
11FA5C5C1C4A1296003AC2EE /* Release */ = {
|
|
316
|
+
isa = XCBuildConfiguration;
|
|
317
|
+
buildSettings = {
|
|
318
|
+
CLANG_ENABLE_MODULES = YES;
|
|
319
|
+
FRAMEWORK_SEARCH_PATHS = "";
|
|
320
|
+
HEADER_SEARCH_PATHS = "";
|
|
321
|
+
LD_RUNPATH_SEARCH_PATHS = (
|
|
322
|
+
"$(inherited)",
|
|
323
|
+
"@executable_path/Frameworks",
|
|
324
|
+
"@loader_path/Frameworks",
|
|
325
|
+
);
|
|
326
|
+
OTHER_LDFLAGS = "-ObjC";
|
|
327
|
+
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
328
|
+
SKIP_INSTALL = YES;
|
|
329
|
+
SWIFT_OBJC_BRIDGING_HEADER = LottieReactNative/Bridging.h;
|
|
330
|
+
SWIFT_VERSION = 5.0;
|
|
331
|
+
};
|
|
332
|
+
name = Release;
|
|
333
|
+
};
|
|
334
|
+
85ABD46D24D07DFD0099C9BD /* Debug */ = {
|
|
335
|
+
isa = XCBuildConfiguration;
|
|
336
|
+
buildSettings = {
|
|
337
|
+
CLANG_ANALYZER_NONNULL = YES;
|
|
338
|
+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
|
339
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
|
340
|
+
CLANG_ENABLE_MODULES = YES;
|
|
341
|
+
CLANG_ENABLE_OBJC_WEAK = YES;
|
|
342
|
+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
343
|
+
CLANG_WARN_COMMA = YES;
|
|
344
|
+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
345
|
+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
|
346
|
+
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
347
|
+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
348
|
+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
349
|
+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
350
|
+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
351
|
+
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
352
|
+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
353
|
+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
|
354
|
+
CODE_SIGN_STYLE = Automatic;
|
|
355
|
+
DYLIB_COMPATIBILITY_VERSION = 1;
|
|
356
|
+
DYLIB_CURRENT_VERSION = 1;
|
|
357
|
+
EXECUTABLE_PREFIX = lib;
|
|
358
|
+
GCC_C_LANGUAGE_STANDARD = gnu11;
|
|
359
|
+
LD_RUNPATH_SEARCH_PATHS = (
|
|
360
|
+
"$(inherited)",
|
|
361
|
+
"@executable_path/../Frameworks",
|
|
362
|
+
"@loader_path/../Frameworks",
|
|
363
|
+
);
|
|
364
|
+
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
|
365
|
+
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
|
366
|
+
MTL_FAST_MATH = YES;
|
|
367
|
+
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
368
|
+
SDKROOT = macosx;
|
|
369
|
+
SKIP_INSTALL = YES;
|
|
370
|
+
SWIFT_OBJC_BRIDGING_HEADER = LottieReactNative/Bridging.h;
|
|
371
|
+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
|
372
|
+
SWIFT_VERSION = 5.0;
|
|
373
|
+
};
|
|
374
|
+
name = Debug;
|
|
375
|
+
};
|
|
376
|
+
85ABD46E24D07DFD0099C9BD /* Release */ = {
|
|
377
|
+
isa = XCBuildConfiguration;
|
|
378
|
+
buildSettings = {
|
|
379
|
+
CLANG_ANALYZER_NONNULL = YES;
|
|
380
|
+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
|
381
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
|
382
|
+
CLANG_ENABLE_MODULES = YES;
|
|
383
|
+
CLANG_ENABLE_OBJC_WEAK = YES;
|
|
384
|
+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
385
|
+
CLANG_WARN_COMMA = YES;
|
|
386
|
+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
387
|
+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
|
388
|
+
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
389
|
+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
390
|
+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
391
|
+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
392
|
+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
393
|
+
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
394
|
+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
395
|
+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
|
396
|
+
CODE_SIGN_STYLE = Automatic;
|
|
397
|
+
DYLIB_COMPATIBILITY_VERSION = 1;
|
|
398
|
+
DYLIB_CURRENT_VERSION = 1;
|
|
399
|
+
EXECUTABLE_PREFIX = lib;
|
|
400
|
+
GCC_C_LANGUAGE_STANDARD = gnu11;
|
|
401
|
+
LD_RUNPATH_SEARCH_PATHS = (
|
|
402
|
+
"$(inherited)",
|
|
403
|
+
"@executable_path/../Frameworks",
|
|
404
|
+
"@loader_path/../Frameworks",
|
|
405
|
+
);
|
|
406
|
+
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
|
407
|
+
MTL_FAST_MATH = YES;
|
|
408
|
+
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
409
|
+
SDKROOT = macosx;
|
|
410
|
+
SKIP_INSTALL = YES;
|
|
411
|
+
SWIFT_OBJC_BRIDGING_HEADER = LottieReactNative/Bridging.h;
|
|
412
|
+
SWIFT_VERSION = 5.0;
|
|
413
|
+
};
|
|
414
|
+
name = Release;
|
|
415
|
+
};
|
|
416
|
+
/* End XCBuildConfiguration section */
|
|
417
|
+
|
|
418
|
+
/* Begin XCConfigurationList section */
|
|
419
|
+
11FA5C4C1C4A1296003AC2EE /* Build configuration list for PBXProject "LottieReactNative" */ = {
|
|
420
|
+
isa = XCConfigurationList;
|
|
421
|
+
buildConfigurations = (
|
|
422
|
+
11FA5C581C4A1296003AC2EE /* Debug */,
|
|
423
|
+
11FA5C591C4A1296003AC2EE /* Release */,
|
|
424
|
+
);
|
|
425
|
+
defaultConfigurationIsVisible = 0;
|
|
426
|
+
defaultConfigurationName = Release;
|
|
427
|
+
};
|
|
428
|
+
11FA5C5A1C4A1296003AC2EE /* Build configuration list for PBXNativeTarget "LottieReactNative" */ = {
|
|
429
|
+
isa = XCConfigurationList;
|
|
430
|
+
buildConfigurations = (
|
|
431
|
+
11FA5C5B1C4A1296003AC2EE /* Debug */,
|
|
432
|
+
11FA5C5C1C4A1296003AC2EE /* Release */,
|
|
433
|
+
);
|
|
434
|
+
defaultConfigurationIsVisible = 0;
|
|
435
|
+
defaultConfigurationName = Release;
|
|
436
|
+
};
|
|
437
|
+
85ABD46F24D07DFD0099C9BD /* Build configuration list for PBXNativeTarget "LottieReactNativeMacOS" */ = {
|
|
438
|
+
isa = XCConfigurationList;
|
|
439
|
+
buildConfigurations = (
|
|
440
|
+
85ABD46D24D07DFD0099C9BD /* Debug */,
|
|
441
|
+
85ABD46E24D07DFD0099C9BD /* Release */,
|
|
442
|
+
);
|
|
443
|
+
defaultConfigurationIsVisible = 0;
|
|
444
|
+
defaultConfigurationName = Release;
|
|
445
|
+
};
|
|
446
|
+
/* End XCConfigurationList section */
|
|
447
|
+
};
|
|
448
|
+
rootObject = 11FA5C491C4A1296003AC2EE /* Project object */;
|
|
449
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AnimatedLottieView = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _LottieAnimationViewNativeComponent = _interopRequireWildcard(require("./specs/LottieAnimationViewNativeComponent"));
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
14
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
16
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
17
|
+
* Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its affiliates. All rights reserved.
|
|
18
|
+
*
|
|
19
|
+
* PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO LICENSE TERMS.
|
|
20
|
+
*
|
|
21
|
+
* Amazon modifications are indicated by [amznmod_* comments].
|
|
22
|
+
*/ /*
|
|
23
|
+
* Changelog:
|
|
24
|
+
* Set up lottie-react-native package to build for Kepler
|
|
25
|
+
*/
|
|
26
|
+
const AnimatedNativeLottieView = _reactNative.Animated.createAnimatedComponent(_LottieAnimationViewNativeComponent.default);
|
|
27
|
+
|
|
28
|
+
// amznmod_react - add textFiltersKepler prop for Kepler
|
|
29
|
+
const defaultProps = {
|
|
30
|
+
source: undefined,
|
|
31
|
+
progress: 0,
|
|
32
|
+
speed: 1,
|
|
33
|
+
loop: true,
|
|
34
|
+
autoPlay: false,
|
|
35
|
+
autoSize: false,
|
|
36
|
+
enableMergePathsAndroidForKitKatAndAbove: false,
|
|
37
|
+
cacheComposition: true,
|
|
38
|
+
useNativeLooping: false,
|
|
39
|
+
resizeMode: 'contain',
|
|
40
|
+
colorFilters: [],
|
|
41
|
+
textFiltersAndroid: [],
|
|
42
|
+
textFiltersIOS: [],
|
|
43
|
+
textFiltersKepler: []
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* View hosting the lottie animation.
|
|
48
|
+
*/
|
|
49
|
+
class AnimatedLottieView extends _react.default.PureComponent {
|
|
50
|
+
constructor(props) {
|
|
51
|
+
super(props);
|
|
52
|
+
_defineProperty(this, "_lottieAnimationViewRef", void 0);
|
|
53
|
+
_defineProperty(this, "onAnimationFinish", evt => {
|
|
54
|
+
if (this.props.onAnimationFinish) {
|
|
55
|
+
this.props.onAnimationFinish(evt.nativeEvent.isCancelled);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
// amznmod_react - onAnimationLoad callback
|
|
59
|
+
_defineProperty(this, "onAnimationLoad", () => {
|
|
60
|
+
if (this.props.onAnimationLoad) {
|
|
61
|
+
this.props.onAnimationLoad();
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
// PROJ*-136246 - deprecate onAnimationJsonLoad in MR33
|
|
65
|
+
// amznmod_react - onAnimationLoad callback
|
|
66
|
+
_defineProperty(this, "onAnimationJsonLoad", () => {
|
|
67
|
+
console.warn("onAnimationJsonLoad will be deprecated in favor of onAnimationLoad in MR33. Migrate to use onAnimationLoad.");
|
|
68
|
+
if (this.props.onAnimationJsonLoad) {
|
|
69
|
+
this.props.onAnimationJsonLoad();
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
// amznmod_react - onAnimationPlay callback
|
|
73
|
+
_defineProperty(this, "onAnimationPlay", () => {
|
|
74
|
+
if (this.props.onAnimationPlay) {
|
|
75
|
+
this.props.onAnimationPlay();
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
// amznmod_react - onAnimationPause callback
|
|
79
|
+
_defineProperty(this, "onAnimationPause", () => {
|
|
80
|
+
if (this.props.onAnimationPause) {
|
|
81
|
+
this.props.onAnimationPause();
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
// amznmod_react - onAnimationResume callback
|
|
85
|
+
_defineProperty(this, "onAnimationResume", () => {
|
|
86
|
+
if (this.props.onAnimationResume) {
|
|
87
|
+
this.props.onAnimationResume();
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
this.play = this.play.bind(this);
|
|
91
|
+
this.reset = this.reset.bind(this);
|
|
92
|
+
this.pause = this.pause.bind(this);
|
|
93
|
+
this.resume = this.resume.bind(this);
|
|
94
|
+
this.onAnimationFinish = this.onAnimationFinish.bind(this);
|
|
95
|
+
this._captureRef = this._captureRef.bind(this);
|
|
96
|
+
// amznmod_react - add onAnimation... callbacks
|
|
97
|
+
this.onAnimationLoad = this.onAnimationLoad.bind(this);
|
|
98
|
+
this.onAnimationPlay = this.onAnimationPlay.bind(this);
|
|
99
|
+
this.onAnimationPause = this.onAnimationPause.bind(this);
|
|
100
|
+
this.onAnimationResume = this.onAnimationResume.bind(this);
|
|
101
|
+
this.onAnimationJsonLoad = this.onAnimationJsonLoad.bind(this);
|
|
102
|
+
}
|
|
103
|
+
componentDidUpdate(prevProps) {
|
|
104
|
+
if (this.props.autoPlay === true && this.props.source !== prevProps.source && !!this.props.source) {
|
|
105
|
+
this.play();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
play(startFrame, endFrame) {
|
|
109
|
+
_LottieAnimationViewNativeComponent.Commands.play(this._lottieAnimationViewRef, startFrame !== null && startFrame !== void 0 ? startFrame : -1, endFrame !== null && endFrame !== void 0 ? endFrame : -1);
|
|
110
|
+
}
|
|
111
|
+
reset() {
|
|
112
|
+
_LottieAnimationViewNativeComponent.Commands.reset(this._lottieAnimationViewRef);
|
|
113
|
+
}
|
|
114
|
+
pause() {
|
|
115
|
+
_LottieAnimationViewNativeComponent.Commands.pause(this._lottieAnimationViewRef);
|
|
116
|
+
}
|
|
117
|
+
resume() {
|
|
118
|
+
_LottieAnimationViewNativeComponent.Commands.resume(this._lottieAnimationViewRef);
|
|
119
|
+
}
|
|
120
|
+
_captureRef(ref) {
|
|
121
|
+
if (ref === null) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
this._lottieAnimationViewRef = ref;
|
|
125
|
+
// amznmod_react - Fix for a crash on autoplay + progress with animation
|
|
126
|
+
if (this._lottieAnimationViewRef && this.props.autoPlay === true) {
|
|
127
|
+
this.play();
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
render() {
|
|
131
|
+
var _this$props$colorFilt;
|
|
132
|
+
// amznmod_react - add textFiltersKepler prop
|
|
133
|
+
const {
|
|
134
|
+
style,
|
|
135
|
+
source,
|
|
136
|
+
autoSize,
|
|
137
|
+
autoPlay,
|
|
138
|
+
duration,
|
|
139
|
+
textFiltersAndroid,
|
|
140
|
+
textFiltersIOS,
|
|
141
|
+
textFiltersKepler,
|
|
142
|
+
...rest
|
|
143
|
+
} = this.props;
|
|
144
|
+
const sourceName = typeof source === 'string' ? source : undefined;
|
|
145
|
+
const sourceJson = typeof source === 'object' && !source.uri ? JSON.stringify(source) : undefined;
|
|
146
|
+
const sourceURL = typeof source === 'object' && source.uri ? source.uri : undefined;
|
|
147
|
+
const aspectRatioStyle = sourceJson ? {
|
|
148
|
+
aspectRatio: source.w / source.h
|
|
149
|
+
} : undefined;
|
|
150
|
+
const styleObject = _reactNative.StyleSheet.flatten(style);
|
|
151
|
+
let sizeStyle;
|
|
152
|
+
if (!styleObject || styleObject.width === undefined && styleObject.height === undefined) {
|
|
153
|
+
sizeStyle = autoSize && sourceJson ? {
|
|
154
|
+
width: source.w
|
|
155
|
+
} : _reactNative.StyleSheet.absoluteFill;
|
|
156
|
+
}
|
|
157
|
+
const speed = duration && sourceJson && source.fr ? Math.round(source.op / source.fr * 1000 / duration) : this.props.speed;
|
|
158
|
+
const colorFilters = (_this$props$colorFilt = this.props.colorFilters) === null || _this$props$colorFilt === void 0 ? void 0 : _this$props$colorFilt.map(colorFilter => ({
|
|
159
|
+
...colorFilter,
|
|
160
|
+
color: (0, _reactNative.processColor)(colorFilter.color)
|
|
161
|
+
}));
|
|
162
|
+
// amznmod_react - Clip LottieView on ReactNative
|
|
163
|
+
const baseStyle = {
|
|
164
|
+
overflow: 'hidden'
|
|
165
|
+
};
|
|
166
|
+
return (
|
|
167
|
+
/*#__PURE__*/
|
|
168
|
+
// amznmod_react - Clip LottieView on ReactNative
|
|
169
|
+
_react.default.createElement(_reactNative.View, {
|
|
170
|
+
style: [aspectRatioStyle, sizeStyle, style, baseStyle]
|
|
171
|
+
}, /*#__PURE__*/_react.default.createElement(AnimatedNativeLottieView, _extends({
|
|
172
|
+
ref: this._captureRef
|
|
173
|
+
}, rest, {
|
|
174
|
+
// amznmod_react - add autoPlay prop
|
|
175
|
+
autoPlay: autoPlay,
|
|
176
|
+
colorFilters: colorFilters,
|
|
177
|
+
textFiltersAndroid: textFiltersAndroid,
|
|
178
|
+
textFiltersIOS: textFiltersIOS
|
|
179
|
+
// amznmod_react - add textFiltersKepler prop
|
|
180
|
+
// amznmod_react - Clip LottieView on ReactNative
|
|
181
|
+
,
|
|
182
|
+
textFiltersKepler: textFiltersKepler,
|
|
183
|
+
speed: speed,
|
|
184
|
+
style: [aspectRatioStyle, sizeStyle || {
|
|
185
|
+
width: '100%',
|
|
186
|
+
height: '100%'
|
|
187
|
+
}, style, baseStyle],
|
|
188
|
+
sourceName: sourceName,
|
|
189
|
+
sourceJson: sourceJson,
|
|
190
|
+
sourceURL: sourceURL,
|
|
191
|
+
onAnimationFinish: this.onAnimationFinish
|
|
192
|
+
//amznmod_react - add onAnimation... callbacks
|
|
193
|
+
,
|
|
194
|
+
onAnimationLoad: this.onAnimationLoad,
|
|
195
|
+
onAnimationPlay: this.onAnimationPlay,
|
|
196
|
+
onAnimationPause: this.onAnimationPause,
|
|
197
|
+
onAnimationResume: this.onAnimationResume
|
|
198
|
+
// PROJ*-136246 - deprecate onAnimationJsonLoad in MR33
|
|
199
|
+
,
|
|
200
|
+
onAnimationJsonLoad: this.onAnimationJsonLoad
|
|
201
|
+
})))
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
exports.AnimatedLottieView = AnimatedLottieView;
|
|
206
|
+
_defineProperty(AnimatedLottieView, "defaultProps", defaultProps);
|
|
207
|
+
//# sourceMappingURL=LottieView.js.map
|