@amazon-devices/lottie-react-native 2.0.9000000000 → 2.0.9000000002

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.
@@ -1,48 +1,41 @@
1
- node_modules/@react-native/js-polyfills_0.83.0/console.js:2d15cb9b42170067dfb8
2
- node_modules/@react-native/js-polyfills_0.83.0/error-guard.js:f1e83584808fa19b4c7a
3
- node_modules/@babel/runtime_7.28.4/helpers/getPrototypeOf.js:ba9efe5c53f1d07f5c9d
4
- node_modules/@babel/runtime_7.28.4/helpers/possibleConstructorReturn.js:aab42168bb4cb23540ec
5
- node_modules/@babel/runtime_7.28.4/helpers/typeof.js:e08c69ed06cf526909e3
6
- node_modules/@babel/runtime_7.28.4/helpers/assertThisInitialized.js:0716ce96f45f287fb302
7
- node_modules/@babel/runtime_7.28.4/helpers/interopRequireDefault.js:277a84013d7e1a1ace05
8
- node_modules/@babel/runtime_7.28.4/helpers/toConsumableArray.js:838d7a057beeb5db50df
9
- node_modules/@babel/runtime_7.28.4/helpers/arrayWithoutHoles.js:a425fd4fe3cf47759e99
10
- node_modules/@babel/runtime_7.28.4/helpers/arrayLikeToArray.js:378be3062418cfac9327
11
- node_modules/@babel/runtime_7.28.4/helpers/iterableToArray.js:67d028b72bb61755baea
12
- node_modules/@babel/runtime_7.28.4/helpers/unsupportedIterableToArray.js:e7044bb724c5bd68e2cc
13
- node_modules/@babel/runtime_7.28.4/helpers/nonIterableSpread.js:b4810fa44dd496b7d9f5
14
- node_modules/@babel/runtime_7.28.4/helpers/classCallCheck.js:cb664999166f9660a878
15
- node_modules/@babel/runtime_7.28.4/helpers/createClass.js:68819e29ebee24bb0e88
16
- node_modules/@babel/runtime_7.28.4/helpers/toPropertyKey.js:cbba112244d360ffda7a
17
- node_modules/@babel/runtime_7.28.4/helpers/toPrimitive.js:ad82d340d0b5dc5f0801
1
+ node_modules/@babel/runtime_7.29.2/helpers/getPrototypeOf.js:9c829ff5032996ffdc8e
2
+ node_modules/@babel/runtime_7.29.2/helpers/possibleConstructorReturn.js:80a4a0ee188e065108c9
3
+ node_modules/@babel/runtime_7.29.2/helpers/typeof.js:7b6247ce00695d888c36
4
+ node_modules/@babel/runtime_7.29.2/helpers/assertThisInitialized.js:7a9699b26019ae7270f5
5
+ node_modules/@babel/runtime_7.29.2/helpers/interopRequireDefault.js:d3b57c8ff490ba8c7c47
6
+ node_modules/@babel/runtime_7.29.2/helpers/classCallCheck.js:2bfb5e99807ec81b822f
7
+ node_modules/@babel/runtime_7.29.2/helpers/createClass.js:cc42269051bc9ff17a63
8
+ node_modules/@babel/runtime_7.29.2/helpers/toPropertyKey.js:7519d1b9ea0de500d604
9
+ node_modules/@babel/runtime_7.29.2/helpers/toPrimitive.js:6c47e04d255cdfb1533c
18
10
  node_modules/invariant_2.2.4/browser.js:fd099686726b2dfb6f66
19
- node_modules/@babel/runtime_7.28.4/helpers/slicedToArray.js:d73b3a84588342abd1b6
20
- node_modules/@babel/runtime_7.28.4/helpers/arrayWithHoles.js:c18fba4833d885627fc3
21
- node_modules/@babel/runtime_7.28.4/helpers/iterableToArrayLimit.js:db861c9134e305a92464
22
- node_modules/@babel/runtime_7.28.4/helpers/nonIterableRest.js:d2c95b166a5bd41ca703
11
+ node_modules/@babel/runtime_7.29.2/helpers/slicedToArray.js:8972a767e9133b0e3a28
12
+ node_modules/@babel/runtime_7.29.2/helpers/arrayWithHoles.js:ee99881fa9643e7bd96f
13
+ node_modules/@babel/runtime_7.29.2/helpers/iterableToArrayLimit.js:1847ec9d510321afd855
14
+ node_modules/@babel/runtime_7.29.2/helpers/unsupportedIterableToArray.js:0c30490eff100ca51d7c
15
+ node_modules/@babel/runtime_7.29.2/helpers/arrayLikeToArray.js:93f664c5afc3b3c0ffb9
16
+ node_modules/@babel/runtime_7.29.2/helpers/nonIterableRest.js:9ef80b625777ecb8d705
23
17
  node_modules/nullthrows_1.1.1/nullthrows.js:afd4874b36ccd4e13961
24
- node_modules/@babel/runtime_7.28.4/helpers/inherits.js:9822a58ca7726d551fe0
25
- node_modules/@babel/runtime_7.28.4/helpers/setPrototypeOf.js:79c731bcf4b10abe8e4d
26
- node_modules/@babel/runtime_7.28.4/helpers/readOnlyError.js:9a3a31f49f0e1fee57b0
27
- node_modules/@babel/runtime_7.28.4/helpers/wrapNativeSuper.js:66be7ef871ad04671969
28
- node_modules/@babel/runtime_7.28.4/helpers/isNativeFunction.js:9cf198b81404c8b483b0
29
- node_modules/@babel/runtime_7.28.4/helpers/construct.js:20524c8783215c6329fe
30
- node_modules/@babel/runtime_7.28.4/helpers/isNativeReflectConstruct.js:df21df9938c0adbd59f1
18
+ node_modules/@babel/runtime_7.29.2/helpers/inherits.js:3ebfecb28bc5857801a2
19
+ node_modules/@babel/runtime_7.29.2/helpers/setPrototypeOf.js:ea37d1dec222e5845b2b
20
+ node_modules/@babel/runtime_7.29.2/helpers/readOnlyError.js:b769be1a7481ccdab905
21
+ node_modules/@babel/runtime_7.29.2/helpers/wrapNativeSuper.js:b510ad86a9e18c7a79b6
22
+ node_modules/@babel/runtime_7.29.2/helpers/isNativeFunction.js:74c2adc9de6e582a35f1
23
+ node_modules/@babel/runtime_7.29.2/helpers/construct.js:d66ad0c399283f558869
24
+ node_modules/@babel/runtime_7.29.2/helpers/isNativeReflectConstruct.js:22840e4117f5dbcb3b06
31
25
  node_modules/stacktrace-parser_0.1.11/dist/stack-trace-parser.cjs.js:aa725aa4c0b37e1add33
32
26
  node_modules/promise_8.3.0/setimmediate/finally.js:15bc4ccb25fc2d0c4428
33
27
  node_modules/promise_8.3.0/setimmediate/core.js:890f60fa94d3f6854a19
34
28
  node_modules/promise_8.3.0/setimmediate/es6-extensions.js:a7846fdeffeb1ebf6241
35
29
  node_modules/regenerator-runtime_0.13.11/runtime.js:af823d9710c534173a4d
36
- node_modules/@babel/runtime_7.28.4/helpers/get.js:55062adb34159de0ea92
37
- node_modules/@babel/runtime_7.28.4/helpers/superPropBase.js:d53f05ad44723a08f608
30
+ node_modules/@babel/runtime_7.29.2/helpers/get.js:659b028086c2c6f074a3
31
+ node_modules/@babel/runtime_7.29.2/helpers/superPropBase.js:263943b885b53437e9e0
38
32
  node_modules/event-target-shim_5.0.1/dist/event-target-shim.js:2bd3f165b1ed6b916de7
39
33
  node_modules/base64-js_1.5.1/index.js:71af70f51435e3e1b37b
40
34
  node_modules/whatwg-fetch_3.6.20/dist/fetch.umd.js:ca4b0363146267ef3e77
41
- node_modules/@babel/runtime_7.28.4/helpers/objectWithoutProperties.js:a2c8e692f78bae5b8b98
42
- node_modules/@babel/runtime_7.28.4/helpers/objectWithoutPropertiesLoose.js:5927789db7c756c318ed
35
+ node_modules/@babel/runtime_7.29.2/helpers/objectWithoutProperties.js:54be67f13f7547a51521
36
+ node_modules/@babel/runtime_7.29.2/helpers/objectWithoutPropertiesLoose.js:ae112a2672a8a53f82e5
43
37
  node_modules/abort-controller_3.0.0/dist/abort-controller.js:ea8fcbd647aab1cfcdaa
44
38
  node_modules/@react-native/normalize-colors_0.72.0/index.js:bab9017c6ff43bb4a95b
45
- node_modules/@babel/runtime_7.28.4/helpers/defineProperty.js:4926d0dbc109dc5bb6c9
46
39
  node_modules/@react-native/assets-registry_0.72.0/registry.js:05d58bec2a6d939f08d8
47
40
  node_modules/@react-native/assets-registry_0.72.0/path-support.js:914260cfb55fe13c431c
48
41
  node_modules/scheduler_0.24.0-canary-efb381bbf-20230505/index.native.js:d57407eff7026d491c8a
@@ -83,9 +76,9 @@ node_modules/@react-native/virtualized-lists_0.72.8/Lists/VirtualizedListCellRen
83
76
  node_modules/@react-native/virtualized-lists_0.72.8/Lists/VirtualizedListContext.js:e6b1ef1f5b720d640981
84
77
  node_modules/@react-native/virtualized-lists_0.72.8/Lists/CellRenderMask.js:de5ab026f9499640d730
85
78
  node_modules/@react-native/virtualized-lists_0.72.8/Lists/VirtualizedSectionList.js:d2355175ff6609a3def1
86
- node_modules/@babel/runtime_7.28.4/helpers/asyncToGenerator.js:77f56f33f638c3751138
79
+ node_modules/@babel/runtime_7.29.2/helpers/asyncToGenerator.js:37d2d0df8e62891cc30d
87
80
  node_modules/use-sync-external-store_1.6.0/shim/index.native.js:962cceb83a0665e556b0
88
81
  node_modules/use-sync-external-store_1.6.0/cjs/use-sync-external-store-shim.native.production.js:882f173eeacafe179433
89
- node_modules/@babel/runtime_7.28.4/helpers/classPrivateFieldLooseKey.js:cb8ece4f72f02a959885
90
- node_modules/@babel/runtime_7.28.4/helpers/classPrivateFieldLooseBase.js:39eb90fd8fb300b049c2
82
+ node_modules/@babel/runtime_7.29.2/helpers/classPrivateFieldLooseKey.js:3998b40f87a7681fa397
83
+ node_modules/@babel/runtime_7.29.2/helpers/classPrivateFieldLooseBase.js:8e4a72d63eec1bceb909
91
84
  node_modules/@react-native-community/cli-platform-android_11.4.1/package.json:247fb6437636250c8b98
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "versions": {
3
3
  "2.0.0": "/com.amazon.kepler.lottie_2@ILottie_0",
4
- "2.0.9000000000": "/com.amazon.kepler.lottie_2@ILottie_0"
4
+ "2.0.9000000000": "/com.amazon.kepler.lottie_2@ILottie_0",
5
+ "2.0.9000000001": "/com.amazon.kepler.lottie_2@ILottie_0",
6
+ "2.0.9000000002": "/com.amazon.kepler.lottie_2@ILottie_0"
5
7
  }
6
- }
8
+ }
@@ -61,10 +61,10 @@ class AnimatedLottieView extends _react.default.PureComponent {
61
61
  this.props.onAnimationLoad();
62
62
  }
63
63
  });
64
- // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33
64
+ // PROJ*-136246 - deprecate onAnimationJsonLoad
65
65
  // amznmod_react - onAnimationLoad callback
66
66
  _defineProperty(this, "onAnimationJsonLoad", () => {
67
- console.warn("onAnimationJsonLoad will be deprecated in favor of onAnimationLoad in MR33. Migrate to use onAnimationLoad.");
67
+ console.warn("onAnimationJsonLoad will be deprecated in favor of onAnimationLoad. Migrate to use onAnimationLoad.");
68
68
  if (this.props.onAnimationJsonLoad) {
69
69
  this.props.onAnimationJsonLoad();
70
70
  }
@@ -195,7 +195,7 @@ class AnimatedLottieView extends _react.default.PureComponent {
195
195
  onAnimationPlay: this.onAnimationPlay,
196
196
  onAnimationPause: this.onAnimationPause,
197
197
  onAnimationResume: this.onAnimationResume
198
- // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33
198
+ // PROJ*-136246 - deprecate onAnimationJsonLoad
199
199
  ,
200
200
  onAnimationJsonLoad: this.onAnimationJsonLoad
201
201
  })))
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_LottieAnimationViewNativeComponent","_interopRequireWildcard","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","_defineProperty","_toPropertyKey","value","enumerable","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","AnimatedNativeLottieView","Animated","createAnimatedComponent","NativeLottieAnimationView","defaultProps","source","undefined","progress","speed","loop","autoPlay","autoSize","enableMergePathsAndroidForKitKatAndAbove","cacheComposition","useNativeLooping","resizeMode","colorFilters","textFiltersAndroid","textFiltersIOS","textFiltersKepler","AnimatedLottieView","React","PureComponent","constructor","props","evt","onAnimationFinish","nativeEvent","isCancelled","onAnimationLoad","console","warn","onAnimationJsonLoad","onAnimationPlay","onAnimationPause","onAnimationResume","play","reset","pause","resume","_captureRef","componentDidUpdate","prevProps","startFrame","endFrame","Commands","_lottieAnimationViewRef","ref","render","_this$props$colorFilt","style","duration","rest","sourceName","sourceJson","uri","JSON","stringify","sourceURL","aspectRatioStyle","aspectRatio","w","h","styleObject","StyleSheet","flatten","sizeStyle","width","height","absoluteFill","fr","Math","round","op","map","colorFilter","color","processColor","baseStyle","overflow","createElement","View","exports"],"sources":["LottieView.tsx"],"sourcesContent":["/*\n * Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its affiliates. All rights reserved.\n *\n * PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO LICENSE TERMS.\n *\n * Amazon modifications are indicated by [amznmod_* comments].\n */\n\n/*\n * Changelog:\n * Set up lottie-react-native package to build for Kepler\n */\n\nimport React from 'react';\nimport {\n View,\n StyleSheet,\n NativeSyntheticEvent,\n Animated,\n processColor,\n} from 'react-native';\n\nimport type { AnimatedLottieViewProps } from './LottieView.types';\n\nimport NativeLottieAnimationView, {\n Commands,\n} from './specs/LottieAnimationViewNativeComponent';\n\nconst AnimatedNativeLottieView = Animated.createAnimatedComponent(\n NativeLottieAnimationView,\n);\n\n// amznmod_react - add textFiltersKepler prop for Kepler\nconst defaultProps: AnimatedLottieViewProps = {\n source: undefined,\n progress: 0,\n speed: 1,\n loop: true,\n autoPlay: false,\n autoSize: false,\n enableMergePathsAndroidForKitKatAndAbove: false,\n cacheComposition: true,\n useNativeLooping: false,\n resizeMode: 'contain',\n colorFilters: [],\n textFiltersAndroid: [],\n textFiltersIOS: [],\n textFiltersKepler: [],\n};\n\n/**\n * View hosting the lottie animation.\n */\nexport class AnimatedLottieView extends React.PureComponent<\n AnimatedLottieViewProps,\n {}\n> {\n static defaultProps = defaultProps;\n\n _lottieAnimationViewRef:\n | React.ElementRef<typeof NativeLottieAnimationView>\n | undefined;\n\n constructor(props: AnimatedLottieViewProps) {\n super(props);\n this.play = this.play.bind(this);\n this.reset = this.reset.bind(this);\n this.pause = this.pause.bind(this);\n this.resume = this.resume.bind(this);\n this.onAnimationFinish = this.onAnimationFinish.bind(this);\n this._captureRef = this._captureRef.bind(this);\n // amznmod_react - add onAnimation... callbacks\n this.onAnimationLoad = this.onAnimationLoad.bind(this);\n this.onAnimationPlay = this.onAnimationPlay.bind(this);\n this.onAnimationPause = this.onAnimationPause.bind(this);\n this.onAnimationResume = this.onAnimationResume.bind(this);\n this.onAnimationJsonLoad = this.onAnimationJsonLoad.bind(this);\n }\n\n componentDidUpdate(prevProps: AnimatedLottieViewProps) {\n if (\n this.props.autoPlay === true &&\n this.props.source !== prevProps.source &&\n !!this.props.source\n ) {\n this.play();\n }\n }\n\n play(startFrame?: number, endFrame?: number): void {\n Commands.play(\n this._lottieAnimationViewRef,\n startFrame ?? -1,\n endFrame ?? -1,\n );\n }\n\n reset() {\n Commands.reset(this._lottieAnimationViewRef);\n }\n\n pause() {\n Commands.pause(this._lottieAnimationViewRef);\n }\n\n resume() {\n Commands.resume(this._lottieAnimationViewRef);\n }\n\n onAnimationFinish = (evt: NativeSyntheticEvent<{ isCancelled: boolean }>) => {\n if (this.props.onAnimationFinish) {\n this.props.onAnimationFinish(evt.nativeEvent.isCancelled);\n }\n };\n\n // amznmod_react - onAnimationLoad callback\n onAnimationLoad = () => {\n if (this.props.onAnimationLoad) {\n this.props.onAnimationLoad();\n }\n };\n\n // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33\n // amznmod_react - onAnimationLoad callback\n onAnimationJsonLoad = () => {\n console.warn(\"onAnimationJsonLoad will be deprecated in favor of onAnimationLoad in MR33. Migrate to use onAnimationLoad.\")\n if (this.props.onAnimationJsonLoad) {\n this.props.onAnimationJsonLoad();\n }\n };\n\n // amznmod_react - onAnimationPlay callback\n onAnimationPlay = () => {\n if (this.props.onAnimationPlay) {\n this.props.onAnimationPlay();\n }\n };\n\n // amznmod_react - onAnimationPause callback\n onAnimationPause = () => {\n if (this.props.onAnimationPause) {\n this.props.onAnimationPause();\n }\n };\n\n // amznmod_react - onAnimationResume callback\n onAnimationResume = () => {\n if (this.props.onAnimationResume) {\n this.props.onAnimationResume();\n }\n };\n\n _captureRef(ref: React.ElementRef<typeof NativeLottieAnimationView>) {\n if (ref === null) {\n return;\n }\n\n this._lottieAnimationViewRef = ref;\n // amznmod_react - Fix for a crash on autoplay + progress with animation\n if (this._lottieAnimationViewRef && this.props.autoPlay === true) {\n this.play();\n }\n }\n\n render(): React.ReactNode {\n // amznmod_react - add textFiltersKepler prop\n const {\n style,\n source,\n autoSize,\n autoPlay,\n duration,\n textFiltersAndroid,\n textFiltersIOS,\n textFiltersKepler,\n ...rest\n } = this.props;\n\n const sourceName = typeof source === 'string' ? source : undefined;\n const sourceJson =\n typeof source === 'object' && !(source as any).uri\n ? JSON.stringify(source)\n : undefined;\n const sourceURL =\n typeof source === 'object' && (source as any).uri\n ? (source as any).uri\n : undefined;\n\n const aspectRatioStyle = sourceJson\n ? { aspectRatio: (source as any).w / (source as any).h }\n : undefined;\n\n const styleObject = StyleSheet.flatten(style);\n let sizeStyle;\n if (\n !styleObject ||\n (styleObject.width === undefined && styleObject.height === undefined)\n ) {\n sizeStyle =\n autoSize && sourceJson\n ? { width: (source as any).w }\n : StyleSheet.absoluteFill;\n }\n\n const speed =\n duration && sourceJson && (source as any).fr\n ? Math.round(\n (((source as any).op / (source as any).fr) * 1000) / duration,\n )\n : this.props.speed;\n\n const colorFilters = this.props.colorFilters?.map((colorFilter) => ({\n ...colorFilter,\n color: processColor(colorFilter.color),\n }));\n // amznmod_react - Clip LottieView on ReactNative\n const baseStyle= {\n overflow: 'hidden',\n };\n\n return (\n // amznmod_react - Clip LottieView on ReactNative\n <View style={[aspectRatioStyle, sizeStyle, style, baseStyle]}>\n <AnimatedNativeLottieView\n ref={this._captureRef}\n {...rest}\n // amznmod_react - add autoPlay prop\n autoPlay={autoPlay}\n colorFilters={colorFilters}\n textFiltersAndroid={textFiltersAndroid}\n textFiltersIOS={textFiltersIOS}\n // amznmod_react - add textFiltersKepler prop\n // amznmod_react - Clip LottieView on ReactNative\n textFiltersKepler={textFiltersKepler}\n speed={speed}\n style={[\n aspectRatioStyle,\n sizeStyle || { width: '100%', height: '100%' },\n style,\n baseStyle\n ]}\n sourceName={sourceName}\n sourceJson={sourceJson}\n sourceURL={sourceURL}\n onAnimationFinish={this.onAnimationFinish}\n //amznmod_react - add onAnimation... callbacks\n onAnimationLoad={this.onAnimationLoad}\n onAnimationPlay={this.onAnimationPlay}\n onAnimationPause={this.onAnimationPause}\n onAnimationResume={this.onAnimationResume}\n // PROJ*-136246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,IAAI,CAACA;QACxB;QAAA;QACAH,mBAAmB,EAAE,IAAI,CAACA;MAAoB,EAC/C,CACG;IAAC;EAEX;AACF;AAACkD,OAAA,CAAA9D,kBAAA,GAAAA,kBAAA;AAAAhC,eAAA,CA3MYgC,kBAAkB,kBAIPhB,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_LottieAnimationViewNativeComponent","_interopRequireWildcard","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","_defineProperty","_toPropertyKey","value","enumerable","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","AnimatedNativeLottieView","Animated","createAnimatedComponent","NativeLottieAnimationView","defaultProps","source","undefined","progress","speed","loop","autoPlay","autoSize","enableMergePathsAndroidForKitKatAndAbove","cacheComposition","useNativeLooping","resizeMode","colorFilters","textFiltersAndroid","textFiltersIOS","textFiltersKepler","AnimatedLottieView","React","PureComponent","constructor","props","evt","onAnimationFinish","nativeEvent","isCancelled","onAnimationLoad","console","warn","onAnimationJsonLoad","onAnimationPlay","onAnimationPause","onAnimationResume","play","reset","pause","resume","_captureRef","componentDidUpdate","prevProps","startFrame","endFrame","Commands","_lottieAnimationViewRef","ref","render","_this$props$colorFilt","style","duration","rest","sourceName","sourceJson","uri","JSON","stringify","sourceURL","aspectRatioStyle","aspectRatio","w","h","styleObject","StyleSheet","flatten","sizeStyle","width","height","absoluteFill","fr","Math","round","op","map","colorFilter","color","processColor","baseStyle","overflow","createElement","View","exports"],"sources":["LottieView.tsx"],"sourcesContent":["/*\n * Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its affiliates. All rights reserved.\n *\n * PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO LICENSE TERMS.\n *\n * Amazon modifications are indicated by [amznmod_* comments].\n */\n\n/*\n * Changelog:\n * Set up lottie-react-native package to build for Kepler\n */\n\nimport React from 'react';\nimport {\n View,\n StyleSheet,\n NativeSyntheticEvent,\n Animated,\n processColor,\n} from 'react-native';\n\nimport type { AnimatedLottieViewProps } from './LottieView.types';\n\nimport NativeLottieAnimationView, {\n Commands,\n} from './specs/LottieAnimationViewNativeComponent';\n\nconst AnimatedNativeLottieView = Animated.createAnimatedComponent(\n NativeLottieAnimationView,\n);\n\n// amznmod_react - add textFiltersKepler prop for Kepler\nconst defaultProps: AnimatedLottieViewProps = {\n source: undefined,\n progress: 0,\n speed: 1,\n loop: true,\n autoPlay: false,\n autoSize: false,\n enableMergePathsAndroidForKitKatAndAbove: false,\n cacheComposition: true,\n useNativeLooping: false,\n resizeMode: 'contain',\n colorFilters: [],\n textFiltersAndroid: [],\n textFiltersIOS: [],\n textFiltersKepler: [],\n};\n\n/**\n * View hosting the lottie animation.\n */\nexport class AnimatedLottieView extends React.PureComponent<\n AnimatedLottieViewProps,\n {}\n> {\n static defaultProps = defaultProps;\n\n _lottieAnimationViewRef:\n | React.ElementRef<typeof NativeLottieAnimationView>\n | undefined;\n\n constructor(props: AnimatedLottieViewProps) {\n super(props);\n this.play = this.play.bind(this);\n this.reset = this.reset.bind(this);\n this.pause = this.pause.bind(this);\n this.resume = this.resume.bind(this);\n this.onAnimationFinish = this.onAnimationFinish.bind(this);\n this._captureRef = this._captureRef.bind(this);\n // amznmod_react - add onAnimation... callbacks\n this.onAnimationLoad = this.onAnimationLoad.bind(this);\n this.onAnimationPlay = this.onAnimationPlay.bind(this);\n this.onAnimationPause = this.onAnimationPause.bind(this);\n this.onAnimationResume = this.onAnimationResume.bind(this);\n this.onAnimationJsonLoad = this.onAnimationJsonLoad.bind(this);\n }\n\n componentDidUpdate(prevProps: AnimatedLottieViewProps) {\n if (\n this.props.autoPlay === true &&\n this.props.source !== prevProps.source &&\n !!this.props.source\n ) {\n this.play();\n }\n }\n\n play(startFrame?: number, endFrame?: number): void {\n Commands.play(\n this._lottieAnimationViewRef,\n startFrame ?? -1,\n endFrame ?? -1,\n );\n }\n\n reset() {\n Commands.reset(this._lottieAnimationViewRef);\n }\n\n pause() {\n Commands.pause(this._lottieAnimationViewRef);\n }\n\n resume() {\n Commands.resume(this._lottieAnimationViewRef);\n }\n\n onAnimationFinish = (evt: NativeSyntheticEvent<{ isCancelled: boolean }>) => {\n if (this.props.onAnimationFinish) {\n this.props.onAnimationFinish(evt.nativeEvent.isCancelled);\n }\n };\n\n // amznmod_react - onAnimationLoad callback\n onAnimationLoad = () => {\n if (this.props.onAnimationLoad) {\n this.props.onAnimationLoad();\n }\n };\n\n // PROJ*-136246 - deprecate onAnimationJsonLoad\n // amznmod_react - onAnimationLoad callback\n onAnimationJsonLoad = () => {\n console.warn(\"onAnimationJsonLoad will be deprecated in favor of onAnimationLoad. Migrate to use onAnimationLoad.\")\n if (this.props.onAnimationJsonLoad) {\n this.props.onAnimationJsonLoad();\n }\n };\n\n // amznmod_react - onAnimationPlay callback\n onAnimationPlay = () => {\n if (this.props.onAnimationPlay) {\n this.props.onAnimationPlay();\n }\n };\n\n // amznmod_react - onAnimationPause callback\n onAnimationPause = () => {\n if (this.props.onAnimationPause) {\n this.props.onAnimationPause();\n }\n };\n\n // amznmod_react - onAnimationResume callback\n onAnimationResume = () => {\n if (this.props.onAnimationResume) {\n this.props.onAnimationResume();\n }\n };\n\n _captureRef(ref: React.ElementRef<typeof NativeLottieAnimationView>) {\n if (ref === null) {\n return;\n }\n\n this._lottieAnimationViewRef = ref;\n // amznmod_react - Fix for a crash on autoplay + progress with animation\n if (this._lottieAnimationViewRef && this.props.autoPlay === true) {\n this.play();\n }\n }\n\n render(): React.ReactNode {\n // amznmod_react - add textFiltersKepler prop\n const {\n style,\n source,\n autoSize,\n autoPlay,\n duration,\n textFiltersAndroid,\n textFiltersIOS,\n textFiltersKepler,\n ...rest\n } = this.props;\n\n const sourceName = typeof source === 'string' ? source : undefined;\n const sourceJson =\n typeof source === 'object' && !(source as any).uri\n ? JSON.stringify(source)\n : undefined;\n const sourceURL =\n typeof source === 'object' && (source as any).uri\n ? (source as any).uri\n : undefined;\n\n const aspectRatioStyle = sourceJson\n ? { aspectRatio: (source as any).w / (source as any).h }\n : undefined;\n\n const styleObject = StyleSheet.flatten(style);\n let sizeStyle;\n if (\n !styleObject ||\n (styleObject.width === undefined && styleObject.height === undefined)\n ) {\n sizeStyle =\n autoSize && sourceJson\n ? { width: (source as any).w }\n : StyleSheet.absoluteFill;\n }\n\n const speed =\n duration && sourceJson && (source as any).fr\n ? Math.round(\n (((source as any).op / (source as any).fr) * 1000) / duration,\n )\n : this.props.speed;\n\n const colorFilters = this.props.colorFilters?.map((colorFilter) => ({\n ...colorFilter,\n color: processColor(colorFilter.color),\n }));\n // amznmod_react - Clip LottieView on ReactNative\n const baseStyle= {\n overflow: 'hidden',\n };\n\n return (\n // amznmod_react - Clip LottieView on ReactNative\n <View style={[aspectRatioStyle, sizeStyle, style, baseStyle]}>\n <AnimatedNativeLottieView\n ref={this._captureRef}\n {...rest}\n // amznmod_react - add autoPlay prop\n autoPlay={autoPlay}\n colorFilters={colorFilters}\n textFiltersAndroid={textFiltersAndroid}\n textFiltersIOS={textFiltersIOS}\n // amznmod_react - add textFiltersKepler prop\n // amznmod_react - Clip LottieView on ReactNative\n textFiltersKepler={textFiltersKepler}\n speed={speed}\n style={[\n aspectRatioStyle,\n sizeStyle || { width: '100%', height: '100%' },\n style,\n baseStyle\n ]}\n sourceName={sourceName}\n sourceJson={sourceJson}\n sourceURL={sourceURL}\n onAnimationFinish={this.onAnimationFinish}\n //amznmod_react - add onAnimation... callbacks\n onAnimationLoad={this.onAnimationLoad}\n onAnimationPlay={this.onAnimationPlay}\n onAnimationPause={this.onAnimationPause}\n onAnimationResume={this.onAnimationResume}\n // PROJ*-136246 - deprecate onAnimationJsonLoad\n onAnimationJsonLoad={this.onAnimationJsonLoad}\n />\n </View>\n );\n }\n}\n"],"mappings":";;;;;;AAaA,IAAAA,MAAA,G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AA,GAAAA,kBAAA;AAAAhC,eAAA,CA3MYgC,kBAAkB,kBAIPhB,YAAY","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["LottieView.types.ts"],"sourcesContent":["/*\n * Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its affiliates. All rights reserved.\n *\n * PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO LICENSE TERMS.\n *\n * Amazon modifications are indicated by [amznmod_* comments].\n */\n\n/*\n * Changelog:\n * Set up lottie-react-native package to build for Kepler\n * Add accessibility props\n */\n\nimport type {\n StyleProp,\n ViewStyle,\n LayoutChangeEvent,\n Animated,\n AccessibilityProps,\n} from 'react-native';\n\n/**\n * Serialized animation as generated from After Effects\n */\nexport interface AnimationObject {\n v: string;\n fr: number;\n ip: number;\n op: number;\n w: number;\n h: number;\n nm?: string;\n ddd?: number;\n assets: any[];\n layers: any[];\n markers?: any[];\n}\n\ntype ColorFilter = {\n keypath: string;\n color: string;\n};\n\ntype TextFilterIOS = {\n keypath: string;\n text: string;\n};\n\ntype TextFilterAndroid = {\n find: string;\n replace: string;\n};\n\n// amznmod_react - TextFilterKepler type\ntype TextFilterKepler = {\n keypath: string;\n text: string;\n};\n\n// Animated.AnimatedInterpolation has been converted to a generic type\n// in @types/react-native 0.70. This way we can maintain compatibility\n// with all versions of @types/react-native`\ntype AnimatedInterpolation = ReturnType<Animated.Value['interpolate']>;\n\n/**\n * Properties of the AnimatedLottieView component\n */\n// amznmod_react LottieView supports all AccessibilityProps\nexport interface AnimatedLottieViewProps extends AccessibilityProps{\n /**\n * The source of animation. Can be referenced as a local asset by a string, or remotely\n * with an object with a `uri` property, or it can be an actual JS object of an\n * animation, obtained (for example) with something like\n * `require('../path/to/animation.json')`\n */\n source: string | AnimationObject | { uri: string };\n\n /**\n * A number between 0 and 1, or an `Animated` number between 0 and 1. This number\n * represents the normalized progress of the animation. If you update this prop, the\n * animation will correspondingly update to the frame at that progress value. This\n * prop is not required if you are using the imperative API.\n */\n progress?: number | Animated.Value | AnimatedInterpolation;\n\n /**\n * The speed the animation will progress. This only affects the imperative API. The\n * default value is 1.\n */\n speed?: number;\n\n /**\n * The duration of the animation in ms. Takes precedence over speed when set.\n * This only works when source is an actual JS object of an animation.\n */\n duration?: number;\n\n /**\n * A boolean flag indicating whether or not the animation should loop.\n */\n loop?: boolean;\n\n /**\n * Style attributes for the view, as expected in a standard `View`:\n * http://facebook.github.io/react-native/releases/0.39/docs/view.html#style\n *\n * **CAVEAT: border styling is not supported.**\n */\n style?: StyleProp<ViewStyle>;\n\n /**\n * Determines how to resize the animated view when the frame doesn't match the raw image\n * dimensions.\n *\n * Refer to https://facebook.github.io/react-native/docs/image.html#resizemode\n */\n resizeMode?: 'cover' | 'contain' | 'center';\n\n /**\n * Determines how Lottie should render\n * Refer to LottieAnimationView#setRenderMode(RenderMode) for more information.\n */\n renderMode?: 'AUTOMATIC' | 'HARDWARE' | 'SOFTWARE';\n\n /**\n * A boolean flag indicating whether or not the animation should start automatically when\n * mounted. This only affects the imperative API.\n */\n autoPlay?: boolean;\n\n /**\n * A boolean flag indicating whether or not the animation should size itself automatically\n * according to the width in the animation's JSON. This only works when source is an actual\n * JS object of an animation.\n */\n autoSize?: boolean;\n\n /**\n * A callback function which will be called when animation is finished. Note that this\n * callback will be called only when `loop` is set to false.\n */\n onAnimationFinish?: (isCancelled: boolean) => void;\n\n /**\n * A callback function which will be called when the view has been laid out.\n */\n onLayout?: (event: LayoutChangeEvent) => void;\n\n /**\n * An array of layers you want to override its color filter.\n */\n colorFilters?: Array<ColorFilter>;\n\n /**\n * A string to identify the component during testing.\n */\n testID?: string;\n\n // Android Props\n\n /**\n * A boolean flag to enable merge patching.\n * @platform android\n */\n enableMergePathsAndroidForKitKatAndAbove?: boolean;\n\n /**\n * A boolean flag indicating whether or not the animation should caching. Defaults to true.\n * Refer to LottieAnimationView#setCacheComposition(boolean) for more information.\n *\n * @platform android\n */\n cacheComposition?: boolean;\n\n /**\n * An array of objects denoting text values to find and replace.\n *\n * @platform android\n */\n textFiltersAndroid?: Array<TextFilterAndroid>;\n\n /**\n * Relative folder inside of assets containing image files to be animated.\n * Make sure that the images that bodymovin export are in that folder with their names unchanged (should be img_#).\n * Refer to https://github.com/airbnb/lottie-android#image-support for more details.\n *\n * @platform android\n */\n imageAssetsFolder?: string;\n\n /**\n * Uses hardware acceleration to perform the animation. This should only\n * be used for animations where your width and height are equal to the composition width\n * and height, e.g. you are not scaling the animation.\n *\n * @platform android\n */\n hardwareAccelerationAndroid?: boolean;\n\n // iOS Props\n\n /**\n * An array of objects denoting text layers by KeyPath and a new string value.\n *\n * @platform ios\n */\n textFiltersIOS?: Array<TextFilterIOS>;\n\n // Windows Props\n\n /**\n * A boolean flag to enable use of platform-level looping on Windows. This improves loop smoothness,\n * but onAnimationLoop will not fire and changing the loop prop will restart playback.\n *\n * @platform windows\n */\n useNativeLooping?: boolean;\n\n /**\n * A callback function which will be called when the animation loops.\n *\n * @platform windows\n */\n onAnimationLoop?: () => void;\n\n // amznmod_react - add onAnimationLoad callback\n /**\n * A callback function which will be called when animation json load is finished.\n *\n * @platform kepler\n */\n onAnimationLoad?: () => void;\n\n // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33\n // amznmod_react - add onAnimationJsonLoad callback\n /**\n * A callback function which will be called when animation json load is finished.\n *\n * @platform kepler\n */\n onAnimationJsonLoad?: () => void;\n\n // amznmod_react - add onAnimationPlay callback\n /**\n * A callback function which will be called when animation play is started.\n *\n * @platform kepler\n */\n onAnimationPlay?: () => void;\n\n // amznmod_react - add onAnimationPause callback\n /**\n * A callback function which will be called when animation is paused.\n *\n * @platform kepler\n */\n onAnimationPause?: () => void;\n\n // amznmod_react - add onAnimationResume callback\n /**\n * A callback function which will be called when animation is resumed.\n *\n * @platform kepler\n */\n onAnimationResume?: () => void;\n\n // amznmod_react - add textFiltersKepler prop\n /**\n * An array of objects denoting text values to find and replace.\n *\n * @platform kepler\n */\n textFiltersKepler?: Array<TextFilterKepler>;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["LottieView.types.ts"],"sourcesContent":["/*\n * Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its affiliates. All rights reserved.\n *\n * PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO LICENSE TERMS.\n *\n * Amazon modifications are indicated by [amznmod_* comments].\n */\n\n/*\n * Changelog:\n * Set up lottie-react-native package to build for Kepler\n * Add accessibility props\n */\n\nimport type {\n StyleProp,\n ViewStyle,\n LayoutChangeEvent,\n Animated,\n AccessibilityProps,\n} from 'react-native';\n\n/**\n * Serialized animation as generated from After Effects\n */\nexport interface AnimationObject {\n v: string;\n fr: number;\n ip: number;\n op: number;\n w: number;\n h: number;\n nm?: string;\n ddd?: number;\n assets: any[];\n layers: any[];\n markers?: any[];\n}\n\ntype ColorFilter = {\n keypath: string;\n color: string;\n};\n\ntype TextFilterIOS = {\n keypath: string;\n text: string;\n};\n\ntype TextFilterAndroid = {\n find: string;\n replace: string;\n};\n\n// amznmod_react - TextFilterKepler type\ntype TextFilterKepler = {\n keypath: string;\n text: string;\n};\n\n// Animated.AnimatedInterpolation has been converted to a generic type\n// in @types/react-native 0.70. This way we can maintain compatibility\n// with all versions of @types/react-native`\ntype AnimatedInterpolation = ReturnType<Animated.Value['interpolate']>;\n\n/**\n * Properties of the AnimatedLottieView component\n */\n// amznmod_react LottieView supports all AccessibilityProps\nexport interface AnimatedLottieViewProps extends AccessibilityProps{\n /**\n * The source of animation. Can be referenced as a local asset by a string, or remotely\n * with an object with a `uri` property, or it can be an actual JS object of an\n * animation, obtained (for example) with something like\n * `require('../path/to/animation.json')`\n */\n source: string | AnimationObject | { uri: string };\n\n /**\n * A number between 0 and 1, or an `Animated` number between 0 and 1. This number\n * represents the normalized progress of the animation. If you update this prop, the\n * animation will correspondingly update to the frame at that progress value. This\n * prop is not required if you are using the imperative API.\n */\n progress?: number | Animated.Value | AnimatedInterpolation;\n\n /**\n * The speed the animation will progress. This only affects the imperative API. The\n * default value is 1.\n */\n speed?: number;\n\n /**\n * The duration of the animation in ms. Takes precedence over speed when set.\n * This only works when source is an actual JS object of an animation.\n */\n duration?: number;\n\n /**\n * A boolean flag indicating whether or not the animation should loop.\n */\n loop?: boolean;\n\n /**\n * Style attributes for the view, as expected in a standard `View`:\n * http://facebook.github.io/react-native/releases/0.39/docs/view.html#style\n *\n * **CAVEAT: border styling is not supported.**\n */\n style?: StyleProp<ViewStyle>;\n\n /**\n * Determines how to resize the animated view when the frame doesn't match the raw image\n * dimensions.\n *\n * Refer to https://facebook.github.io/react-native/docs/image.html#resizemode\n */\n resizeMode?: 'cover' | 'contain' | 'center';\n\n /**\n * Determines how Lottie should render\n * Refer to LottieAnimationView#setRenderMode(RenderMode) for more information.\n */\n renderMode?: 'AUTOMATIC' | 'HARDWARE' | 'SOFTWARE';\n\n /**\n * A boolean flag indicating whether or not the animation should start automatically when\n * mounted. This only affects the imperative API.\n */\n autoPlay?: boolean;\n\n /**\n * A boolean flag indicating whether or not the animation should size itself automatically\n * according to the width in the animation's JSON. This only works when source is an actual\n * JS object of an animation.\n */\n autoSize?: boolean;\n\n /**\n * A callback function which will be called when animation is finished. Note that this\n * callback will be called only when `loop` is set to false.\n */\n onAnimationFinish?: (isCancelled: boolean) => void;\n\n /**\n * A callback function which will be called when the view has been laid out.\n */\n onLayout?: (event: LayoutChangeEvent) => void;\n\n /**\n * An array of layers you want to override its color filter.\n */\n colorFilters?: Array<ColorFilter>;\n\n /**\n * A string to identify the component during testing.\n */\n testID?: string;\n\n // Android Props\n\n /**\n * A boolean flag to enable merge patching.\n * @platform android\n */\n enableMergePathsAndroidForKitKatAndAbove?: boolean;\n\n /**\n * A boolean flag indicating whether or not the animation should caching. Defaults to true.\n * Refer to LottieAnimationView#setCacheComposition(boolean) for more information.\n *\n * @platform android\n */\n cacheComposition?: boolean;\n\n /**\n * An array of objects denoting text values to find and replace.\n *\n * @platform android\n */\n textFiltersAndroid?: Array<TextFilterAndroid>;\n\n /**\n * Relative folder inside of assets containing image files to be animated.\n * Make sure that the images that bodymovin export are in that folder with their names unchanged (should be img_#).\n * Refer to https://github.com/airbnb/lottie-android#image-support for more details.\n *\n * @platform android\n */\n imageAssetsFolder?: string;\n\n /**\n * Uses hardware acceleration to perform the animation. This should only\n * be used for animations where your width and height are equal to the composition width\n * and height, e.g. you are not scaling the animation.\n *\n * @platform android\n */\n hardwareAccelerationAndroid?: boolean;\n\n // iOS Props\n\n /**\n * An array of objects denoting text layers by KeyPath and a new string value.\n *\n * @platform ios\n */\n textFiltersIOS?: Array<TextFilterIOS>;\n\n // Windows Props\n\n /**\n * A boolean flag to enable use of platform-level looping on Windows. This improves loop smoothness,\n * but onAnimationLoop will not fire and changing the loop prop will restart playback.\n *\n * @platform windows\n */\n useNativeLooping?: boolean;\n\n /**\n * A callback function which will be called when the animation loops.\n *\n * @platform windows\n */\n onAnimationLoop?: () => void;\n\n // amznmod_react - add onAnimationLoad callback\n /**\n * A callback function which will be called when animation json load is finished.\n *\n * @platform kepler\n */\n onAnimationLoad?: () => void;\n\n // PROJ*-136246 - deprecate onAnimationJsonLoad\n // amznmod_react - add onAnimationJsonLoad callback\n /**\n * A callback function which will be called when animation json load is finished.\n *\n * @platform kepler\n */\n onAnimationJsonLoad?: () => void;\n\n // amznmod_react - add onAnimationPlay callback\n /**\n * A callback function which will be called when animation play is started.\n *\n * @platform kepler\n */\n onAnimationPlay?: () => void;\n\n // amznmod_react - add onAnimationPause callback\n /**\n * A callback function which will be called when animation is paused.\n *\n * @platform kepler\n */\n onAnimationPause?: () => void;\n\n // amznmod_react - add onAnimationResume callback\n /**\n * A callback function which will be called when animation is resumed.\n *\n * @platform kepler\n */\n onAnimationResume?: () => void;\n\n // amznmod_react - add textFiltersKepler prop\n /**\n * An array of objects denoting text values to find and replace.\n *\n * @platform kepler\n */\n textFiltersKepler?: Array<TextFilterKepler>;\n}\n"],"mappings":"","ignoreList":[]}
@@ -62,7 +62,7 @@ const bubblingEventTypes = {
62
62
  captured: 'onAnimationLoadCapture'
63
63
  }
64
64
  },
65
- // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33
65
+ // PROJ*-136246 - deprecate onAnimationJsonLoad
66
66
  topOnAnimationJsonLoad: {
67
67
  phasedRegistrationNames: {
68
68
  bubbled: 'onAnimationJsonLoad',
@@ -1 +1 @@
1
- {"version":3,"names":["_codegenNativeCommands","_interopRequireDefault","require","_registerGeneratedViewConfig","e","__esModule","default","Commands","exports","codegenNativeCommands","supportedCommands","LottieNativeComponent","viewConfig","autoPlay","sourceName","resizeMode","renderMode","sourceJson","sourceURL","imageAssetsFolder","progress","speed","loop","enableMergePathsAndroidForKitKatAndAbove","hardwareAccelerationAndroid","cacheComposition","colorFilters","textFiltersAndroid","textFiltersIOS","textFiltersKepler","bubblingEventTypes","topOnAnimationFinish","phasedRegistrationNames","bubbled","captured","topOnAnimationLoad","topOnAnimationJsonLoad","topOnAnimationPlay","topOnAnimationPause","topOnAnimationResume","register","uiViewClassName","validAttributes","_default"],"sources":["LottieAnimationViewNativeComponent.ts"],"sourcesContent":["/*\n * Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its affiliates. All rights reserved.\n *\n * PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO LICENSE TERMS.\n *\n * Amazon modifications are indicated by [amznmod_* comments].\n */\n\n/*\n * Changelog:\n * Set up lottie-react-native package to build for Kepler\n */\n\nimport type {\n BubblingEventHandler,\n Int32,\n Double,\n Float,\n} from 'react-native/Libraries/Types/CodegenTypes';\nimport codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';\nimport type { HostComponent, ProcessedColorValue, ViewProps } from 'react-native';\nimport register from '@amazon-devices/react-native-kepler/Libraries/Utilities/registerGeneratedViewConfig';\n\nexport type OnAnimationFinishEvent = Readonly<{\n isCancelled: boolean;\n}>;\n\n// amznmod_react - add EmptyEvent type\nexport type EmptyEvent = {\n // Nothing to return in this event\n};\n\ntype ColorFilterStruct = Readonly<{\n keypath: string;\n color: ProcessedColorValue;\n}>;\n\ntype TextFilterIOSStruct = Readonly<{\n keypath: string;\n text: string;\n}>;\n\ntype TextFilterAndroidStruct = Readonly<{\n find: string;\n replace: string;\n}>;\n\ntype TextFilterKeplerStruct = Readonly<{\n keypath: string;\n text: string;\n}>;\n\nexport interface NativeProps extends ViewProps {\n // amznmod_react - add autoPlay as native prop to avoid component mount race condition\n autoPlay?: boolean;\n resizeMode?: string;\n renderMode?: string;\n sourceName?: string;\n sourceJson?: string;\n sourceURL?: string;\n imageAssetsFolder?: string;\n progress?: Float;\n speed?: Double;\n loop?: boolean;\n enableMergePathsAndroidForKitKatAndAbove?: boolean;\n hardwareAccelerationAndroid?: boolean;\n cacheComposition?: boolean;\n colorFilters?: ReadonlyArray<ColorFilterStruct>;\n // dummy that solves codegen issue when there's a ReadonlyArray<Object> without another Object prop\n // https://github.com/reactwg/react-native-new-architecture/discussions/104\n dummy?: Readonly<{ dummy: boolean }>;\n textFiltersAndroid?: ReadonlyArray<TextFilterAndroidStruct>;\n textFiltersIOS?: ReadonlyArray<TextFilterIOSStruct>;\n // amznmod_react - add textFiltersKepler prop\n textFiltersKepler?: ReadonlyArray<TextFilterKeplerStruct>;\n onAnimationFinish?: BubblingEventHandler<\n OnAnimationFinishEvent,\n 'onAnimationFinish'\n >;\n // amznmod_react - add onAnimation... callbacks\n onAnimationLoad?: BubblingEventHandler<EmptyEvent>;\n onAnimationPlay?: BubblingEventHandler<EmptyEvent>;\n onAnimationPause?: BubblingEventHandler<EmptyEvent>;\n onAnimationResume?: BubblingEventHandler<EmptyEvent>;\n // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33\n onAnimationJsonLoad?: BubblingEventHandler<EmptyEvent>;\n}\n\n// amznmod_react - change NativeComponentType to HostComponent\ntype LottieViewNativeComponentType = HostComponent<NativeProps>;\n\ninterface NativeCommands {\n play: (\n viewRef: React.ElementRef<LottieViewNativeComponentType>,\n startFrame: Int32,\n endFrame: Int32,\n ) => void;\n reset: (viewRef: React.ElementRef<LottieViewNativeComponentType>) => void;\n pause: (viewRef: React.ElementRef<LottieViewNativeComponentType>) => void;\n resume: (viewRef: React.ElementRef<LottieViewNativeComponentType>) => void;\n}\n\nexport const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({\n supportedCommands: ['play', 'reset', 'pause', 'resume'],\n});\n\n// amznmod_react - native component registration to build for Kepler\nconst LottieNativeComponent = 'LottieAnimationView'\nconst viewConfig = {\n autoPlay: true,\n sourceName: true,\n resizeMode: true,\n renderMode: true,\n sourceJson: true,\n sourceURL: true,\n imageAssetsFolder: true,\n progress: true,\n speed: true,\n loop: true,\n enableMergePathsAndroidForKitKatAndAbove: true,\n hardwareAccelerationAndroid: true,\n cacheComposition: true,\n colorFilters: true,\n textFiltersAndroid: true,\n textFiltersIOS: true,\n textFiltersKepler: true,\n};\n\nconst bubblingEventTypes = {\n topOnAnimationFinish: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationFinish',\n captured: 'onAnimationFinishCapture'\n }\n },\n topOnAnimationLoad: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationLoad',\n captured: 'onAnimationLoadCapture'\n }\n },\n // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33\n topOnAnimationJsonLoad: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationJsonLoad',\n captured: 'onAnimationJsonLoadCapture'\n }\n },\n topOnAnimationPlay: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationPlay',\n captured: 'onAnimationPlayCapture'\n }\n },\n topOnAnimationPause: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationPause',\n captured: 'onAnimationPauseCapture'\n }\n },\n topOnAnimationResume: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationResume',\n captured: 'onAnimationResumeCapture'\n }\n }\n};\n\nregister(LottieNativeComponent, {uiViewClassName: LottieNativeComponent, validAttributes: viewConfig, bubblingEventTypes: bubblingEventTypes});\nexport default (LottieNativeComponent as unknown) as HostComponent<NativeProps>;"],"mappings":";;;;;;AAmBA,IAAAA,sBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,4BAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAiG,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AArBjG;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAgBA;;AA6DA;;AAcO,MAAMG,QAAwB,GAAAC,OAAA,CAAAD,QAAA,GAAG,IAAAE,8BAAqB,EAAiB;EAC5EC,iBAAiB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ;AACxD,CAAC,CAAC;;AAEF;AACA,MAAMC,qBAAqB,GAAG,qBAAqB;AACnD,MAAMC,UAAU,GAAG;EACjBC,QAAQ,EAAE,IAAI;EACdC,UAAU,EAAE,IAAI;EAChBC,UAAU,EAAE,IAAI;EAChBC,UAAU,EAAE,IAAI;EAChBC,UAAU,EAAE,IAAI;EAChBC,SAAS,EAAE,IAAI;EACfC,iBAAiB,EAAE,IAAI;EACvBC,QAAQ,EAAE,IAAI;EACdC,KAAK,EAAE,IAAI;EACXC,IAAI,EAAE,IAAI;EACVC,wCAAwC,EAAE,IAAI;EAC9CC,2BAA2B,EAAE,IAAI;EACjCC,gBAAgB,EAAE,IAAI;EACtBC,YAAY,EAAE,IAAI;EAClBC,kBAAkB,EAAE,IAAI;EACxBC,cAAc,EAAE,IAAI;EACpBC,iBAAiB,EAAE;AACrB,CAAC;AAED,MAAMC,kBAAkB,GAAG;EACzBC,oBAAoB,EAAE;IACpBC,uBAAuB,EAAE;MACvBC,OAAO,EAAE,mBAAmB;MAC5BC,QAAQ,EAAE;IACZ;EACF,CAAC;EACDC,kBAAkB,EAAE;IAClBH,uBAAuB,EAAE;MACvBC,OAAO,EAAE,iBAAiB;MAC1BC,QAAQ,EAAE;IACZ;EACF,CAAC;EACD;EACAE,sBAAsB,EAAE;IACtBJ,uBAAuB,EAAE;MACvBC,OAAO,EAAE,qBAAqB;MAC9BC,QAAQ,EAAE;IACZ;EACF,CAAC;EACDG,kBAAkB,EAAE;IAClBL,uBAAuB,EAAE;MACvBC,OAAO,EAAE,iBAAiB;MAC1BC,QAAQ,EAAE;IACZ;EACF,CAAC;EACDI,mBAAmB,EAAE;IACnBN,uBAAuB,EAAE;MACvBC,OAAO,EAAE,kBAAkB;MAC3BC,QAAQ,EAAE;IACZ;EACF,CAAC;EACDK,oBAAoB,EAAE;IACpBP,uBAAuB,EAAE;MACvBC,OAAO,EAAE,mBAAmB;MAC5BC,QAAQ,EAAE;IACZ;EACF;AACF,CAAC;AAED,IAAAM,oCAAQ,EAAC7B,qBAAqB,EAAE;EAAC8B,eAAe,EAAE9B,qBAAqB;EAAE+B,eAAe,EAAE9B,UAAU;EAAEkB,kBAAkB,EAAEA;AAAkB,CAAC,CAAC;AAAC,IAAAa,QAAA,GAAAnC,OAAA,CAAAF,OAAA,GAC/HK,qBAAqB","ignoreList":[]}
1
+ {"version":3,"names":["_codegenNativeCommands","_interopRequireDefault","require","_registerGeneratedViewConfig","e","__esModule","default","Commands","exports","codegenNativeCommands","supportedCommands","LottieNativeComponent","viewConfig","autoPlay","sourceName","resizeMode","renderMode","sourceJson","sourceURL","imageAssetsFolder","progress","speed","loop","enableMergePathsAndroidForKitKatAndAbove","hardwareAccelerationAndroid","cacheComposition","colorFilters","textFiltersAndroid","textFiltersIOS","textFiltersKepler","bubblingEventTypes","topOnAnimationFinish","phasedRegistrationNames","bubbled","captured","topOnAnimationLoad","topOnAnimationJsonLoad","topOnAnimationPlay","topOnAnimationPause","topOnAnimationResume","register","uiViewClassName","validAttributes","_default"],"sources":["LottieAnimationViewNativeComponent.ts"],"sourcesContent":["/*\n * Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its affiliates. All rights reserved.\n *\n * PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO LICENSE TERMS.\n *\n * Amazon modifications are indicated by [amznmod_* comments].\n */\n\n/*\n * Changelog:\n * Set up lottie-react-native package to build for Kepler\n */\n\nimport type {\n BubblingEventHandler,\n Int32,\n Double,\n Float,\n} from 'react-native/Libraries/Types/CodegenTypes';\nimport codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';\nimport type { HostComponent, ProcessedColorValue, ViewProps } from 'react-native';\nimport register from '@amazon-devices/react-native-kepler/Libraries/Utilities/registerGeneratedViewConfig';\n\nexport type OnAnimationFinishEvent = Readonly<{\n isCancelled: boolean;\n}>;\n\n// amznmod_react - add EmptyEvent type\nexport type EmptyEvent = {\n // Nothing to return in this event\n};\n\ntype ColorFilterStruct = Readonly<{\n keypath: string;\n color: ProcessedColorValue;\n}>;\n\ntype TextFilterIOSStruct = Readonly<{\n keypath: string;\n text: string;\n}>;\n\ntype TextFilterAndroidStruct = Readonly<{\n find: string;\n replace: string;\n}>;\n\ntype TextFilterKeplerStruct = Readonly<{\n keypath: string;\n text: string;\n}>;\n\nexport interface NativeProps extends ViewProps {\n // amznmod_react - add autoPlay as native prop to avoid component mount race condition\n autoPlay?: boolean;\n resizeMode?: string;\n renderMode?: string;\n sourceName?: string;\n sourceJson?: string;\n sourceURL?: string;\n imageAssetsFolder?: string;\n progress?: Float;\n speed?: Double;\n loop?: boolean;\n enableMergePathsAndroidForKitKatAndAbove?: boolean;\n hardwareAccelerationAndroid?: boolean;\n cacheComposition?: boolean;\n colorFilters?: ReadonlyArray<ColorFilterStruct>;\n // dummy that solves codegen issue when there's a ReadonlyArray<Object> without another Object prop\n // https://github.com/reactwg/react-native-new-architecture/discussions/104\n dummy?: Readonly<{ dummy: boolean }>;\n textFiltersAndroid?: ReadonlyArray<TextFilterAndroidStruct>;\n textFiltersIOS?: ReadonlyArray<TextFilterIOSStruct>;\n // amznmod_react - add textFiltersKepler prop\n textFiltersKepler?: ReadonlyArray<TextFilterKeplerStruct>;\n onAnimationFinish?: BubblingEventHandler<\n OnAnimationFinishEvent,\n 'onAnimationFinish'\n >;\n // amznmod_react - add onAnimation... callbacks\n onAnimationLoad?: BubblingEventHandler<EmptyEvent>;\n onAnimationPlay?: BubblingEventHandler<EmptyEvent>;\n onAnimationPause?: BubblingEventHandler<EmptyEvent>;\n onAnimationResume?: BubblingEventHandler<EmptyEvent>;\n // PROJ*-136246 - deprecate onAnimationJsonLoad\n onAnimationJsonLoad?: BubblingEventHandler<EmptyEvent>;\n}\n\n// amznmod_react - change NativeComponentType to HostComponent\ntype LottieViewNativeComponentType = HostComponent<NativeProps>;\n\ninterface NativeCommands {\n play: (\n viewRef: React.ElementRef<LottieViewNativeComponentType>,\n startFrame: Int32,\n endFrame: Int32,\n ) => void;\n reset: (viewRef: React.ElementRef<LottieViewNativeComponentType>) => void;\n pause: (viewRef: React.ElementRef<LottieViewNativeComponentType>) => void;\n resume: (viewRef: React.ElementRef<LottieViewNativeComponentType>) => void;\n}\n\nexport const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({\n supportedCommands: ['play', 'reset', 'pause', 'resume'],\n});\n\n// amznmod_react - native component registration to build for Kepler\nconst LottieNativeComponent = 'LottieAnimationView'\nconst viewConfig = {\n autoPlay: true,\n sourceName: true,\n resizeMode: true,\n renderMode: true,\n sourceJson: true,\n sourceURL: true,\n imageAssetsFolder: true,\n progress: true,\n speed: true,\n loop: true,\n enableMergePathsAndroidForKitKatAndAbove: true,\n hardwareAccelerationAndroid: true,\n cacheComposition: true,\n colorFilters: true,\n textFiltersAndroid: true,\n textFiltersIOS: true,\n textFiltersKepler: true,\n};\n\nconst bubblingEventTypes = {\n topOnAnimationFinish: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationFinish',\n captured: 'onAnimationFinishCapture'\n }\n },\n topOnAnimationLoad: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationLoad',\n captured: 'onAnimationLoadCapture'\n }\n },\n // PROJ*-136246 - deprecate onAnimationJsonLoad\n topOnAnimationJsonLoad: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationJsonLoad',\n captured: 'onAnimationJsonLoadCapture'\n }\n },\n topOnAnimationPlay: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationPlay',\n captured: 'onAnimationPlayCapture'\n }\n },\n topOnAnimationPause: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationPause',\n captured: 'onAnimationPauseCapture'\n }\n },\n topOnAnimationResume: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationResume',\n captured: 'onAnimationResumeCapture'\n }\n }\n};\n\nregister(LottieNativeComponent, {uiViewClassName: LottieNativeComponent, validAttributes: viewConfig, bubblingEventTypes: bubblingEventTypes});\nexport default (LottieNativeComponent as unknown) as HostComponent<NativeProps>;"],"mappings":";;;;;;AAmBA,IAAAA,sBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,4BAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAiG,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AArBjG;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAgBA;;AA6DA;;AAcO,MAAMG,QAAwB,GAAAC,OAAA,CAAAD,QAAA,GAAG,IAAAE,8BAAqB,EAAiB;EAC5EC,iBAAiB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ;AACxD,CAAC,CAAC;;AAEF;AACA,MAAMC,qBAAqB,GAAG,qBAAqB;AACnD,MAAMC,UAAU,GAAG;EACjBC,QAAQ,EAAE,IAAI;EACdC,UAAU,EAAE,IAAI;EAChBC,UAAU,EAAE,IAAI;EAChBC,UAAU,EAAE,IAAI;EAChBC,UAAU,EAAE,IAAI;EAChBC,SAAS,EAAE,IAAI;EACfC,iBAAiB,E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ponent {
56
56
  this.props.onAnimationLoad();
57
57
  }
58
58
  });
59
- // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33
59
+ // PROJ*-136246 - deprecate onAnimationJsonLoad
60
60
  // amznmod_react - onAnimationLoad callback
61
61
  _defineProperty(this, "onAnimationJsonLoad", () => {
62
- console.warn("onAnimationJsonLoad will be deprecated in favor of onAnimationLoad in MR33. Migrate to use onAnimationLoad.");
62
+ console.warn("onAnimationJsonLoad will be deprecated in favor of onAnimationLoad. Migrate to use onAnimationLoad.");
63
63
  if (this.props.onAnimationJsonLoad) {
64
64
  this.props.onAnimationJsonLoad();
65
65
  }
@@ -190,7 +190,7 @@ export class AnimatedLottieView extends React.PureComponent {
190
190
  onAnimationPlay: this.onAnimationPlay,
191
191
  onAnimationPause: this.onAnimationPause,
192
192
  onAnimationResume: this.onAnimationResume
193
- // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33
193
+ // PROJ*-136246 - deprecate onAnimationJsonLoad
194
194
  ,
195
195
  onAnimationJsonLoad: this.onAnimationJsonLoad
196
196
  })))
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","StyleSheet","Animated","processColor","NativeLottieAnimationView","Commands","AnimatedNativeLottieView","createAnimatedComponent","defaultProps","source","undefined","progress","speed","loop","autoPlay","autoSize","enableMergePathsAndroidForKitKatAndAbove","cacheComposition","useNativeLooping","resizeMode","colorFilters","textFiltersAndroid","textFiltersIOS","textFiltersKepler","AnimatedLottieView","PureComponent","constructor","props","_defineProperty","evt","onAnimationFinish","nativeEvent","isCancelled","onAnimationLoad","console","warn","onAnimationJsonLoad","onAnimationPlay","onAnimationPause","onAnimationResume","play","bind","reset","pause","resume","_captureRef","componentDidUpdate","prevProps","startFrame","endFrame","_lottieAnimationViewRef","ref","render","_this$props$colorFilt","style","duration","rest","sourceName","sourceJson","uri","JSON","stringify","sourceURL","aspectRatioStyle","aspectRatio","w","h","styleObject","flatten","sizeStyle","width","height","absoluteFill","fr","Math","round","op","map","colorFilter","color","baseStyle","overflow","createElement","_extends"],"sources":["LottieView.tsx"],"sourcesContent":["/*\n * Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its affiliates. All rights reserved.\n *\n * PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO LICENSE TERMS.\n *\n * Amazon modifications are indicated by [amznmod_* comments].\n */\n\n/*\n * Changelog:\n * Set up lottie-react-native package to build for Kepler\n */\n\nimport React from 'react';\nimport {\n View,\n StyleSheet,\n NativeSyntheticEvent,\n Animated,\n processColor,\n} from 'react-native';\n\nimport type { AnimatedLottieViewProps } from './LottieView.types';\n\nimport NativeLottieAnimationView, {\n Commands,\n} from './specs/LottieAnimationViewNativeComponent';\n\nconst AnimatedNativeLottieView = Animated.createAnimatedComponent(\n NativeLottieAnimationView,\n);\n\n// amznmod_react - add textFiltersKepler prop for Kepler\nconst defaultProps: AnimatedLottieViewProps = {\n source: undefined,\n progress: 0,\n speed: 1,\n loop: true,\n autoPlay: false,\n autoSize: false,\n enableMergePathsAndroidForKitKatAndAbove: false,\n cacheComposition: true,\n useNativeLooping: false,\n resizeMode: 'contain',\n colorFilters: [],\n textFiltersAndroid: [],\n textFiltersIOS: [],\n textFiltersKepler: [],\n};\n\n/**\n * View hosting the lottie animation.\n */\nexport class AnimatedLottieView extends React.PureComponent<\n AnimatedLottieViewProps,\n {}\n> {\n static defaultProps = defaultProps;\n\n _lottieAnimationViewRef:\n | React.ElementRef<typeof NativeLottieAnimationView>\n | undefined;\n\n constructor(props: AnimatedLottieViewProps) {\n super(props);\n this.play = this.play.bind(this);\n this.reset = this.reset.bind(this);\n this.pause = this.pause.bind(this);\n this.resume = this.resume.bind(this);\n this.onAnimationFinish = this.onAnimationFinish.bind(this);\n this._captureRef = this._captureRef.bind(this);\n // amznmod_react - add onAnimation... callbacks\n this.onAnimationLoad = this.onAnimationLoad.bind(this);\n this.onAnimationPlay = this.onAnimationPlay.bind(this);\n this.onAnimationPause = this.onAnimationPause.bind(this);\n this.onAnimationResume = this.onAnimationResume.bind(this);\n this.onAnimationJsonLoad = this.onAnimationJsonLoad.bind(this);\n }\n\n componentDidUpdate(prevProps: AnimatedLottieViewProps) {\n if (\n this.props.autoPlay === true &&\n this.props.source !== prevProps.source &&\n !!this.props.source\n ) {\n this.play();\n }\n }\n\n play(startFrame?: number, endFrame?: number): void {\n Commands.play(\n this._lottieAnimationViewRef,\n startFrame ?? -1,\n endFrame ?? -1,\n );\n }\n\n reset() {\n Commands.reset(this._lottieAnimationViewRef);\n }\n\n pause() {\n Commands.pause(this._lottieAnimationViewRef);\n }\n\n resume() {\n Commands.resume(this._lottieAnimationViewRef);\n }\n\n onAnimationFinish = (evt: NativeSyntheticEvent<{ isCancelled: boolean }>) => {\n if (this.props.onAnimationFinish) {\n this.props.onAnimationFinish(evt.nativeEvent.isCancelled);\n }\n };\n\n // amznmod_react - onAnimationLoad callback\n onAnimationLoad = () => {\n if (this.props.onAnimationLoad) {\n this.props.onAnimationLoad();\n }\n };\n\n // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33\n // amznmod_react - onAnimationLoad callback\n onAnimationJsonLoad = () => {\n console.warn(\"onAnimationJsonLoad will be deprecated in favor of onAnimationLoad in MR33. Migrate to use onAnimationLoad.\")\n if (this.props.onAnimationJsonLoad) {\n this.props.onAnimationJsonLoad();\n }\n };\n\n // amznmod_react - onAnimationPlay callback\n onAnimationPlay = () => {\n if (this.props.onAnimationPlay) {\n this.props.onAnimationPlay();\n }\n };\n\n // amznmod_react - onAnimationPause callback\n onAnimationPause = () => {\n if (this.props.onAnimationPause) {\n this.props.onAnimationPause();\n }\n };\n\n // amznmod_react - onAnimationResume callback\n onAnimationResume = () => {\n if (this.props.onAnimationResume) {\n this.props.onAnimationResume();\n }\n };\n\n _captureRef(ref: React.ElementRef<typeof NativeLottieAnimationView>) {\n if (ref === null) {\n return;\n }\n\n this._lottieAnimationViewRef = ref;\n // amznmod_react - Fix for a crash on autoplay + progress with animation\n if (this._lottieAnimationViewRef && this.props.autoPlay === true) {\n this.play();\n }\n }\n\n render(): React.ReactNode {\n // amznmod_react - add textFiltersKepler prop\n const {\n style,\n source,\n autoSize,\n autoPlay,\n duration,\n textFiltersAndroid,\n textFiltersIOS,\n textFiltersKepler,\n ...rest\n } = this.props;\n\n const sourceName = typeof source === 'string' ? source : undefined;\n const sourceJson =\n typeof source === 'object' && !(source as any).uri\n ? JSON.stringify(source)\n : undefined;\n const sourceURL =\n typeof source === 'object' && (source as any).uri\n ? (source as any).uri\n : undefined;\n\n const aspectRatioStyle = sourceJson\n ? { aspectRatio: (source as any).w / (source as any).h }\n : undefined;\n\n const styleObject = StyleSheet.flatten(style);\n let sizeStyle;\n if (\n !styleObject ||\n (styleObject.width === undefined && styleObject.height === undefined)\n ) {\n sizeStyle =\n autoSize && sourceJson\n ? { width: (source as any).w }\n : StyleSheet.absoluteFill;\n }\n\n const speed =\n duration && sourceJson && (source as any).fr\n ? Math.round(\n (((source as any).op / (source as any).fr) * 1000) / duration,\n )\n : this.props.speed;\n\n const colorFilters = this.props.colorFilters?.map((colorFilter) => ({\n ...colorFilter,\n color: processColor(colorFilter.color),\n }));\n // amznmod_react - Clip LottieView on ReactNative\n const baseStyle= {\n overflow: 'hidden',\n };\n\n return (\n // amznmod_react - Clip LottieView on ReactNative\n <View style={[aspectRatioStyle, sizeStyle, style, baseStyle]}>\n <AnimatedNativeLottieView\n ref={this._captureRef}\n {...rest}\n // amznmod_react - add autoPlay prop\n autoPlay={autoPlay}\n colorFilters={colorFilters}\n textFiltersAndroid={textFiltersAndroid}\n textFiltersIOS={textFiltersIOS}\n // amznmod_react - add textFiltersKepler prop\n // amznmod_react - Clip LottieView on ReactNative\n textFiltersKepler={textFiltersKepler}\n speed={speed}\n style={[\n aspectRatioStyle,\n sizeStyle || { width: '100%', height: '100%' },\n style,\n baseStyle\n ]}\n sourceName={sourceName}\n sourceJson={sourceJson}\n sourceURL={sourceURL}\n onAnimationFinish={this.onAnimationFinish}\n //amznmod_react - add onAnimation... callbacks\n onAnimationLoad={this.onAnimationLoad}\n onAnimationPlay={this.onAnimationPlay}\n onAnimationPause={this.onAnimationPause}\n onAnimationResume={this.onAnimationResume}\n // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33\n onAnimationJsonLoad={this.onAnimationJsonLoad}\n />\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,IAAI,EACJC,UAAU,EAEVC,QAAQ,EACRC,YAAY,QACP,cAAc;AAIrB,OAAOC,yBAAyB,IAC9BC,QAAQ,QACH,4CAA4C;AAEnD,MAAMC,wBAAwB,GAAGJ,QAAQ,CAACK,uBAAuB,CAC/DH,yBACF,CAAC;;AAED;AACA,MAAMI,YAAqC,GAAG;EAC5CC,MAAM,EAAEC,SAAS;EACjBC,QAAQ,EAAE,CAAC;EACXC,KAAK,EAAE,CAAC;EACRC,IAAI,EAAE,IAAI;EACVC,QAAQ,EAAE,KAAK;EACfC,QAAQ,EAAE,KAAK;EACfC,wCAAwC,EAAE,KAAK;EAC/CC,gBAAgB,EAAE,IAAI;EACtBC,gBAAgB,EAAE,KAAK;EACvBC,UAAU,EAAE,SAAS;EACrBC,YAAY,EAAE,EAAE;EAChBC,kBAAkB,EAAE,EAAE;EACtBC,cAAc,EAAE,EAAE;EAClBC,iBAAiB,EAAE;AACrB,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,SAASzB,KAAK,CAAC0B,aAAa,CAGzD;EAOAC,WAAWA,CAACC,KAA8B,EAAE;IAC1C,KAAK,CAACA,KAAK,CAAC;IAACC,eAAA;IAAAA,eAAA,4BA6CMC,GAAmD,IAAK;MAC3E,IAAI,IAAI,CAACF,KAAK,CAACG,iBAAiB,EAAE;QAChC,IAAI,CAACH,KAAK,CAACG,iBAAiB,CAACD,GAAG,CAACE,WAAW,CAACC,WAAW,CAA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U,EAAEA,UAAW;QACvBI,SAAS,EAAEA,SAAU;QACrBhC,iBAAiB,EAAE,IAAI,CAACA;QACxB;QAAA;QACAG,eAAe,EAAE,IAAI,CAACA,eAAgB;QACtCI,eAAe,EAAE,IAAI,CAACA,eAAgB;QACtCC,gBAAgB,EAAE,IAAI,CAACA,gBAAiB;QACxCC,iBAAiB,EAAE,IAAI,CAACA;QACxB;QAAA;QACAH,mBAAmB,EAAE,IAAI,CAACA;MAAoB,EAC/C,CACG;IAAC;EAEX;AACF;AAACR,eAAA,CA3MYJ,kBAAkB,kBAIPhB,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["React","View","StyleSheet","Animated","processColor","NativeLottieAnimationView","Commands","AnimatedNativeLottieView","createAnimatedComponent","defaultProps","source","undefined","progress","speed","loop","autoPlay","autoSize","enableMergePathsAndroidForKitKatAndAbove","cacheComposition","useNativeLooping","resizeMode","colorFilters","textFiltersAndroid","textFiltersIOS","textFiltersKepler","AnimatedLottieView","PureComponent","constructor","props","_defineProperty","evt","onAnimationFinish","nativeEvent","isCancelled","onAnimationLoad","console","warn","onAnimationJsonLoad","onAnimationPlay","onAnimationPause","onAnimationResume","play","bind","reset","pause","resume","_captureRef","componentDidUpdate","prevProps","startFrame","endFrame","_lottieAnimationViewRef","ref","render","_this$props$colorFilt","style","duration","rest","sourceName","sourceJson","uri","JSON","stringify","sourceURL","aspectRatioStyle","aspectRatio","w","h","styleObject","flatten","sizeStyle","width","height","absoluteFill","fr","Math","round","op","map","colorFilter","color","baseStyle","overflow","createElement","_extends"],"sources":["LottieView.tsx"],"sourcesContent":["/*\n * Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its affiliates. All rights reserved.\n *\n * PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO LICENSE TERMS.\n *\n * Amazon modifications are indicated by [amznmod_* comments].\n */\n\n/*\n * Changelog:\n * Set up lottie-react-native package to build for Kepler\n */\n\nimport React from 'react';\nimport {\n View,\n StyleSheet,\n NativeSyntheticEvent,\n Animated,\n processColor,\n} from 'react-native';\n\nimport type { AnimatedLottieViewProps } from './LottieView.types';\n\nimport NativeLottieAnimationView, {\n Commands,\n} from './specs/LottieAnimationViewNativeComponent';\n\nconst AnimatedNativeLottieView = Animated.createAnimatedComponent(\n NativeLottieAnimationView,\n);\n\n// amznmod_react - add textFiltersKepler prop for Kepler\nconst defaultProps: AnimatedLottieViewProps = {\n source: undefined,\n progress: 0,\n speed: 1,\n loop: true,\n autoPlay: false,\n autoSize: false,\n enableMergePathsAndroidForKitKatAndAbove: false,\n cacheComposition: true,\n useNativeLooping: false,\n resizeMode: 'contain',\n colorFilters: [],\n textFiltersAndroid: [],\n textFiltersIOS: [],\n textFiltersKepler: [],\n};\n\n/**\n * View hosting the lottie animation.\n */\nexport class AnimatedLottieView extends React.PureComponent<\n AnimatedLottieViewProps,\n {}\n> {\n static defaultProps = defaultProps;\n\n _lottieAnimationViewRef:\n | React.ElementRef<typeof NativeLottieAnimationView>\n | undefined;\n\n constructor(props: AnimatedLottieViewProps) {\n super(props);\n this.play = this.play.bind(this);\n this.reset = this.reset.bind(this);\n this.pause = this.pause.bind(this);\n this.resume = this.resume.bind(this);\n this.onAnimationFinish = this.onAnimationFinish.bind(this);\n this._captureRef = this._captureRef.bind(this);\n // amznmod_react - add onAnimation... callbacks\n this.onAnimationLoad = this.onAnimationLoad.bind(this);\n this.onAnimationPlay = this.onAnimationPlay.bind(this);\n this.onAnimationPause = this.onAnimationPause.bind(this);\n this.onAnimationResume = this.onAnimationResume.bind(this);\n this.onAnimationJsonLoad = this.onAnimationJsonLoad.bind(this);\n }\n\n componentDidUpdate(prevProps: AnimatedLottieViewProps) {\n if (\n this.props.autoPlay === true &&\n this.props.source !== prevProps.source &&\n !!this.props.source\n ) {\n this.play();\n }\n }\n\n play(startFrame?: number, endFrame?: number): void {\n Commands.play(\n this._lottieAnimationViewRef,\n startFrame ?? -1,\n endFrame ?? -1,\n );\n }\n\n reset() {\n Commands.reset(this._lottieAnimationViewRef);\n }\n\n pause() {\n Commands.pause(this._lottieAnimationViewRef);\n }\n\n resume() {\n Commands.resume(this._lottieAnimationViewRef);\n }\n\n onAnimationFinish = (evt: NativeSyntheticEvent<{ isCancelled: boolean }>) => {\n if (this.props.onAnimationFinish) {\n this.props.onAnimationFinish(evt.nativeEvent.isCancelled);\n }\n };\n\n // amznmod_react - onAnimationLoad callback\n onAnimationLoad = () => {\n if (this.props.onAnimationLoad) {\n this.props.onAnimationLoad();\n }\n };\n\n // PROJ*-136246 - deprecate onAnimationJsonLoad\n // amznmod_react - onAnimationLoad callback\n onAnimationJsonLoad = () => {\n console.warn(\"onAnimationJsonLoad will be deprecated in favor of onAnimationLoad. Migrate to use onAnimationLoad.\")\n if (this.props.onAnimationJsonLoad) {\n this.props.onAnimationJsonLoad();\n }\n };\n\n // amznmod_react - onAnimationPlay callback\n onAnimationPlay = () => {\n if (this.props.onAnimationPlay) {\n this.props.onAnimationPlay();\n }\n };\n\n // amznmod_react - onAnimationPause callback\n onAnimationPause = () => {\n if (this.props.onAnimationPause) {\n this.props.onAnimationPause();\n }\n };\n\n // amznmod_react - onAnimationResume callback\n onAnimationResume = () => {\n if (this.props.onAnimationResume) {\n this.props.onAnimationResume();\n }\n };\n\n _captureRef(ref: React.ElementRef<typeof NativeLottieAnimationView>) {\n if (ref === null) {\n return;\n }\n\n this._lottieAnimationViewRef = ref;\n // amznmod_react - Fix for a crash on autoplay + progress with animation\n if (this._lottieAnimationViewRef && this.props.autoPlay === true) {\n this.play();\n }\n }\n\n render(): React.ReactNode {\n // amznmod_react - add textFiltersKepler prop\n const {\n style,\n source,\n autoSize,\n autoPlay,\n duration,\n textFiltersAndroid,\n textFiltersIOS,\n textFiltersKepler,\n ...rest\n } = this.props;\n\n const sourceName = typeof source === 'string' ? source : undefined;\n const sourceJson =\n typeof source === 'object' && !(source as any).uri\n ? JSON.stringify(source)\n : undefined;\n const sourceURL =\n typeof source === 'object' && (source as any).uri\n ? (source as any).uri\n : undefined;\n\n const aspectRatioStyle = sourceJson\n ? { aspectRatio: (source as any).w / (source as any).h }\n : undefined;\n\n const styleObject = StyleSheet.flatten(style);\n let sizeStyle;\n if (\n !styleObject ||\n (styleObject.width === undefined && styleObject.height === undefined)\n ) {\n sizeStyle =\n autoSize && sourceJson\n ? { width: (source as any).w }\n : StyleSheet.absoluteFill;\n }\n\n const speed =\n duration && sourceJson && (source as any).fr\n ? Math.round(\n (((source as any).op / (source as any).fr) * 1000) / duration,\n )\n : this.props.speed;\n\n const colorFilters = this.props.colorFilters?.map((colorFilter) => ({\n ...colorFilter,\n color: processColor(colorFilter.color),\n }));\n // amznmod_react - Clip LottieView on ReactNative\n const baseStyle= {\n overflow: 'hidden',\n };\n\n return (\n // amznmod_react - Clip LottieView on ReactNative\n <View style={[aspectRatioStyle, sizeStyle, style, baseStyle]}>\n <AnimatedNativeLottieView\n ref={this._captureRef}\n {...rest}\n // amznmod_react - add autoPlay prop\n autoPlay={autoPlay}\n colorFilters={colorFilters}\n textFiltersAndroid={textFiltersAndroid}\n textFiltersIOS={textFiltersIOS}\n // amznmod_react - add textFiltersKepler prop\n // amznmod_react - Clip LottieView on ReactNative\n textFiltersKepler={textFiltersKepler}\n speed={speed}\n style={[\n aspectRatioStyle,\n sizeStyle || { width: '100%', height: '100%' },\n style,\n baseStyle\n ]}\n sourceName={sourceName}\n sourceJson={sourceJson}\n sourceURL={sourceURL}\n onAnimationFinish={this.onAnimationFinish}\n //amznmod_react - add onAnimation... callbacks\n onAnimationLoad={this.onAnimationLoad}\n onAnimationPlay={this.onAnimationPlay}\n onAnimationPause={this.onAnimationPause}\n onAnimationResume={this.onAnimationResume}\n // PROJ*-136246 - deprecate onAnimationJsonLoad\n onAnimationJsonLoad={this.onAnimationJsonLoad}\n />\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,MAAM,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EAEX;AACF;AAACR,eAAA,CA3MYJ,kBAAkB,kBAIPhB,YAAY","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["LottieView.types.ts"],"sourcesContent":["/*\n * Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its affiliates. All rights reserved.\n *\n * PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO LICENSE TERMS.\n *\n * Amazon modifications are indicated by [amznmod_* comments].\n */\n\n/*\n * Changelog:\n * Set up lottie-react-native package to build for Kepler\n * Add accessibility props\n */\n\nimport type {\n StyleProp,\n ViewStyle,\n LayoutChangeEvent,\n Animated,\n AccessibilityProps,\n} from 'react-native';\n\n/**\n * Serialized animation as generated from After Effects\n */\nexport interface AnimationObject {\n v: string;\n fr: number;\n ip: number;\n op: number;\n w: number;\n h: number;\n nm?: string;\n ddd?: number;\n assets: any[];\n layers: any[];\n markers?: any[];\n}\n\ntype ColorFilter = {\n keypath: string;\n color: string;\n};\n\ntype TextFilterIOS = {\n keypath: string;\n text: string;\n};\n\ntype TextFilterAndroid = {\n find: string;\n replace: string;\n};\n\n// amznmod_react - TextFilterKepler type\ntype TextFilterKepler = {\n keypath: string;\n text: string;\n};\n\n// Animated.AnimatedInterpolation has been converted to a generic type\n// in @types/react-native 0.70. This way we can maintain compatibility\n// with all versions of @types/react-native`\ntype AnimatedInterpolation = ReturnType<Animated.Value['interpolate']>;\n\n/**\n * Properties of the AnimatedLottieView component\n */\n// amznmod_react LottieView supports all AccessibilityProps\nexport interface AnimatedLottieViewProps extends AccessibilityProps{\n /**\n * The source of animation. Can be referenced as a local asset by a string, or remotely\n * with an object with a `uri` property, or it can be an actual JS object of an\n * animation, obtained (for example) with something like\n * `require('../path/to/animation.json')`\n */\n source: string | AnimationObject | { uri: string };\n\n /**\n * A number between 0 and 1, or an `Animated` number between 0 and 1. This number\n * represents the normalized progress of the animation. If you update this prop, the\n * animation will correspondingly update to the frame at that progress value. This\n * prop is not required if you are using the imperative API.\n */\n progress?: number | Animated.Value | AnimatedInterpolation;\n\n /**\n * The speed the animation will progress. This only affects the imperative API. The\n * default value is 1.\n */\n speed?: number;\n\n /**\n * The duration of the animation in ms. Takes precedence over speed when set.\n * This only works when source is an actual JS object of an animation.\n */\n duration?: number;\n\n /**\n * A boolean flag indicating whether or not the animation should loop.\n */\n loop?: boolean;\n\n /**\n * Style attributes for the view, as expected in a standard `View`:\n * http://facebook.github.io/react-native/releases/0.39/docs/view.html#style\n *\n * **CAVEAT: border styling is not supported.**\n */\n style?: StyleProp<ViewStyle>;\n\n /**\n * Determines how to resize the animated view when the frame doesn't match the raw image\n * dimensions.\n *\n * Refer to https://facebook.github.io/react-native/docs/image.html#resizemode\n */\n resizeMode?: 'cover' | 'contain' | 'center';\n\n /**\n * Determines how Lottie should render\n * Refer to LottieAnimationView#setRenderMode(RenderMode) for more information.\n */\n renderMode?: 'AUTOMATIC' | 'HARDWARE' | 'SOFTWARE';\n\n /**\n * A boolean flag indicating whether or not the animation should start automatically when\n * mounted. This only affects the imperative API.\n */\n autoPlay?: boolean;\n\n /**\n * A boolean flag indicating whether or not the animation should size itself automatically\n * according to the width in the animation's JSON. This only works when source is an actual\n * JS object of an animation.\n */\n autoSize?: boolean;\n\n /**\n * A callback function which will be called when animation is finished. Note that this\n * callback will be called only when `loop` is set to false.\n */\n onAnimationFinish?: (isCancelled: boolean) => void;\n\n /**\n * A callback function which will be called when the view has been laid out.\n */\n onLayout?: (event: LayoutChangeEvent) => void;\n\n /**\n * An array of layers you want to override its color filter.\n */\n colorFilters?: Array<ColorFilter>;\n\n /**\n * A string to identify the component during testing.\n */\n testID?: string;\n\n // Android Props\n\n /**\n * A boolean flag to enable merge patching.\n * @platform android\n */\n enableMergePathsAndroidForKitKatAndAbove?: boolean;\n\n /**\n * A boolean flag indicating whether or not the animation should caching. Defaults to true.\n * Refer to LottieAnimationView#setCacheComposition(boolean) for more information.\n *\n * @platform android\n */\n cacheComposition?: boolean;\n\n /**\n * An array of objects denoting text values to find and replace.\n *\n * @platform android\n */\n textFiltersAndroid?: Array<TextFilterAndroid>;\n\n /**\n * Relative folder inside of assets containing image files to be animated.\n * Make sure that the images that bodymovin export are in that folder with their names unchanged (should be img_#).\n * Refer to https://github.com/airbnb/lottie-android#image-support for more details.\n *\n * @platform android\n */\n imageAssetsFolder?: string;\n\n /**\n * Uses hardware acceleration to perform the animation. This should only\n * be used for animations where your width and height are equal to the composition width\n * and height, e.g. you are not scaling the animation.\n *\n * @platform android\n */\n hardwareAccelerationAndroid?: boolean;\n\n // iOS Props\n\n /**\n * An array of objects denoting text layers by KeyPath and a new string value.\n *\n * @platform ios\n */\n textFiltersIOS?: Array<TextFilterIOS>;\n\n // Windows Props\n\n /**\n * A boolean flag to enable use of platform-level looping on Windows. This improves loop smoothness,\n * but onAnimationLoop will not fire and changing the loop prop will restart playback.\n *\n * @platform windows\n */\n useNativeLooping?: boolean;\n\n /**\n * A callback function which will be called when the animation loops.\n *\n * @platform windows\n */\n onAnimationLoop?: () => void;\n\n // amznmod_react - add onAnimationLoad callback\n /**\n * A callback function which will be called when animation json load is finished.\n *\n * @platform kepler\n */\n onAnimationLoad?: () => void;\n\n // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33\n // amznmod_react - add onAnimationJsonLoad callback\n /**\n * A callback function which will be called when animation json load is finished.\n *\n * @platform kepler\n */\n onAnimationJsonLoad?: () => void;\n\n // amznmod_react - add onAnimationPlay callback\n /**\n * A callback function which will be called when animation play is started.\n *\n * @platform kepler\n */\n onAnimationPlay?: () => void;\n\n // amznmod_react - add onAnimationPause callback\n /**\n * A callback function which will be called when animation is paused.\n *\n * @platform kepler\n */\n onAnimationPause?: () => void;\n\n // amznmod_react - add onAnimationResume callback\n /**\n * A callback function which will be called when animation is resumed.\n *\n * @platform kepler\n */\n onAnimationResume?: () => void;\n\n // amznmod_react - add textFiltersKepler prop\n /**\n * An array of objects denoting text values to find and replace.\n *\n * @platform kepler\n */\n textFiltersKepler?: Array<TextFilterKepler>;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["LottieView.types.ts"],"sourcesContent":["/*\n * Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its affiliates. All rights reserved.\n *\n * PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO LICENSE TERMS.\n *\n * Amazon modifications are indicated by [amznmod_* comments].\n */\n\n/*\n * Changelog:\n * Set up lottie-react-native package to build for Kepler\n * Add accessibility props\n */\n\nimport type {\n StyleProp,\n ViewStyle,\n LayoutChangeEvent,\n Animated,\n AccessibilityProps,\n} from 'react-native';\n\n/**\n * Serialized animation as generated from After Effects\n */\nexport interface AnimationObject {\n v: string;\n fr: number;\n ip: number;\n op: number;\n w: number;\n h: number;\n nm?: string;\n ddd?: number;\n assets: any[];\n layers: any[];\n markers?: any[];\n}\n\ntype ColorFilter = {\n keypath: string;\n color: string;\n};\n\ntype TextFilterIOS = {\n keypath: string;\n text: string;\n};\n\ntype TextFilterAndroid = {\n find: string;\n replace: string;\n};\n\n// amznmod_react - TextFilterKepler type\ntype TextFilterKepler = {\n keypath: string;\n text: string;\n};\n\n// Animated.AnimatedInterpolation has been converted to a generic type\n// in @types/react-native 0.70. This way we can maintain compatibility\n// with all versions of @types/react-native`\ntype AnimatedInterpolation = ReturnType<Animated.Value['interpolate']>;\n\n/**\n * Properties of the AnimatedLottieView component\n */\n// amznmod_react LottieView supports all AccessibilityProps\nexport interface AnimatedLottieViewProps extends AccessibilityProps{\n /**\n * The source of animation. Can be referenced as a local asset by a string, or remotely\n * with an object with a `uri` property, or it can be an actual JS object of an\n * animation, obtained (for example) with something like\n * `require('../path/to/animation.json')`\n */\n source: string | AnimationObject | { uri: string };\n\n /**\n * A number between 0 and 1, or an `Animated` number between 0 and 1. This number\n * represents the normalized progress of the animation. If you update this prop, the\n * animation will correspondingly update to the frame at that progress value. This\n * prop is not required if you are using the imperative API.\n */\n progress?: number | Animated.Value | AnimatedInterpolation;\n\n /**\n * The speed the animation will progress. This only affects the imperative API. The\n * default value is 1.\n */\n speed?: number;\n\n /**\n * The duration of the animation in ms. Takes precedence over speed when set.\n * This only works when source is an actual JS object of an animation.\n */\n duration?: number;\n\n /**\n * A boolean flag indicating whether or not the animation should loop.\n */\n loop?: boolean;\n\n /**\n * Style attributes for the view, as expected in a standard `View`:\n * http://facebook.github.io/react-native/releases/0.39/docs/view.html#style\n *\n * **CAVEAT: border styling is not supported.**\n */\n style?: StyleProp<ViewStyle>;\n\n /**\n * Determines how to resize the animated view when the frame doesn't match the raw image\n * dimensions.\n *\n * Refer to https://facebook.github.io/react-native/docs/image.html#resizemode\n */\n resizeMode?: 'cover' | 'contain' | 'center';\n\n /**\n * Determines how Lottie should render\n * Refer to LottieAnimationView#setRenderMode(RenderMode) for more information.\n */\n renderMode?: 'AUTOMATIC' | 'HARDWARE' | 'SOFTWARE';\n\n /**\n * A boolean flag indicating whether or not the animation should start automatically when\n * mounted. This only affects the imperative API.\n */\n autoPlay?: boolean;\n\n /**\n * A boolean flag indicating whether or not the animation should size itself automatically\n * according to the width in the animation's JSON. This only works when source is an actual\n * JS object of an animation.\n */\n autoSize?: boolean;\n\n /**\n * A callback function which will be called when animation is finished. Note that this\n * callback will be called only when `loop` is set to false.\n */\n onAnimationFinish?: (isCancelled: boolean) => void;\n\n /**\n * A callback function which will be called when the view has been laid out.\n */\n onLayout?: (event: LayoutChangeEvent) => void;\n\n /**\n * An array of layers you want to override its color filter.\n */\n colorFilters?: Array<ColorFilter>;\n\n /**\n * A string to identify the component during testing.\n */\n testID?: string;\n\n // Android Props\n\n /**\n * A boolean flag to enable merge patching.\n * @platform android\n */\n enableMergePathsAndroidForKitKatAndAbove?: boolean;\n\n /**\n * A boolean flag indicating whether or not the animation should caching. Defaults to true.\n * Refer to LottieAnimationView#setCacheComposition(boolean) for more information.\n *\n * @platform android\n */\n cacheComposition?: boolean;\n\n /**\n * An array of objects denoting text values to find and replace.\n *\n * @platform android\n */\n textFiltersAndroid?: Array<TextFilterAndroid>;\n\n /**\n * Relative folder inside of assets containing image files to be animated.\n * Make sure that the images that bodymovin export are in that folder with their names unchanged (should be img_#).\n * Refer to https://github.com/airbnb/lottie-android#image-support for more details.\n *\n * @platform android\n */\n imageAssetsFolder?: string;\n\n /**\n * Uses hardware acceleration to perform the animation. This should only\n * be used for animations where your width and height are equal to the composition width\n * and height, e.g. you are not scaling the animation.\n *\n * @platform android\n */\n hardwareAccelerationAndroid?: boolean;\n\n // iOS Props\n\n /**\n * An array of objects denoting text layers by KeyPath and a new string value.\n *\n * @platform ios\n */\n textFiltersIOS?: Array<TextFilterIOS>;\n\n // Windows Props\n\n /**\n * A boolean flag to enable use of platform-level looping on Windows. This improves loop smoothness,\n * but onAnimationLoop will not fire and changing the loop prop will restart playback.\n *\n * @platform windows\n */\n useNativeLooping?: boolean;\n\n /**\n * A callback function which will be called when the animation loops.\n *\n * @platform windows\n */\n onAnimationLoop?: () => void;\n\n // amznmod_react - add onAnimationLoad callback\n /**\n * A callback function which will be called when animation json load is finished.\n *\n * @platform kepler\n */\n onAnimationLoad?: () => void;\n\n // PROJ*-136246 - deprecate onAnimationJsonLoad\n // amznmod_react - add onAnimationJsonLoad callback\n /**\n * A callback function which will be called when animation json load is finished.\n *\n * @platform kepler\n */\n onAnimationJsonLoad?: () => void;\n\n // amznmod_react - add onAnimationPlay callback\n /**\n * A callback function which will be called when animation play is started.\n *\n * @platform kepler\n */\n onAnimationPlay?: () => void;\n\n // amznmod_react - add onAnimationPause callback\n /**\n * A callback function which will be called when animation is paused.\n *\n * @platform kepler\n */\n onAnimationPause?: () => void;\n\n // amznmod_react - add onAnimationResume callback\n /**\n * A callback function which will be called when animation is resumed.\n *\n * @platform kepler\n */\n onAnimationResume?: () => void;\n\n // amznmod_react - add textFiltersKepler prop\n /**\n * An array of objects denoting text values to find and replace.\n *\n * @platform kepler\n */\n textFiltersKepler?: Array<TextFilterKepler>;\n}\n"],"mappings":"","ignoreList":[]}
@@ -56,7 +56,7 @@ const bubblingEventTypes = {
56
56
  captured: 'onAnimationLoadCapture'
57
57
  }
58
58
  },
59
- // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33
59
+ // PROJ*-136246 - deprecate onAnimationJsonLoad
60
60
  topOnAnimationJsonLoad: {
61
61
  phasedRegistrationNames: {
62
62
  bubbled: 'onAnimationJsonLoad',
@@ -1 +1 @@
1
- {"version":3,"names":["codegenNativeCommands","register","Commands","supportedCommands","LottieNativeComponent","viewConfig","autoPlay","sourceName","resizeMode","renderMode","sourceJson","sourceURL","imageAssetsFolder","progress","speed","loop","enableMergePathsAndroidForKitKatAndAbove","hardwareAccelerationAndroid","cacheComposition","colorFilters","textFiltersAndroid","textFiltersIOS","textFiltersKepler","bubblingEventTypes","topOnAnimationFinish","phasedRegistrationNames","bubbled","captured","topOnAnimationLoad","topOnAnimationJsonLoad","topOnAnimationPlay","topOnAnimationPause","topOnAnimationResume","uiViewClassName","validAttributes"],"sources":["LottieAnimationViewNativeComponent.ts"],"sourcesContent":["/*\n * Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its affiliates. All rights reserved.\n *\n * PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO LICENSE TERMS.\n *\n * Amazon modifications are indicated by [amznmod_* comments].\n */\n\n/*\n * Changelog:\n * Set up lottie-react-native package to build for Kepler\n */\n\nimport type {\n BubblingEventHandler,\n Int32,\n Double,\n Float,\n} from 'react-native/Libraries/Types/CodegenTypes';\nimport codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';\nimport type { HostComponent, ProcessedColorValue, ViewProps } from 'react-native';\nimport register from '@amazon-devices/react-native-kepler/Libraries/Utilities/registerGeneratedViewConfig';\n\nexport type OnAnimationFinishEvent = Readonly<{\n isCancelled: boolean;\n}>;\n\n// amznmod_react - add EmptyEvent type\nexport type EmptyEvent = {\n // Nothing to return in this event\n};\n\ntype ColorFilterStruct = Readonly<{\n keypath: string;\n color: ProcessedColorValue;\n}>;\n\ntype TextFilterIOSStruct = Readonly<{\n keypath: string;\n text: string;\n}>;\n\ntype TextFilterAndroidStruct = Readonly<{\n find: string;\n replace: string;\n}>;\n\ntype TextFilterKeplerStruct = Readonly<{\n keypath: string;\n text: string;\n}>;\n\nexport interface NativeProps extends ViewProps {\n // amznmod_react - add autoPlay as native prop to avoid component mount race condition\n autoPlay?: boolean;\n resizeMode?: string;\n renderMode?: string;\n sourceName?: string;\n sourceJson?: string;\n sourceURL?: string;\n imageAssetsFolder?: string;\n progress?: Float;\n speed?: Double;\n loop?: boolean;\n enableMergePathsAndroidForKitKatAndAbove?: boolean;\n hardwareAccelerationAndroid?: boolean;\n cacheComposition?: boolean;\n colorFilters?: ReadonlyArray<ColorFilterStruct>;\n // dummy that solves codegen issue when there's a ReadonlyArray<Object> without another Object prop\n // https://github.com/reactwg/react-native-new-architecture/discussions/104\n dummy?: Readonly<{ dummy: boolean }>;\n textFiltersAndroid?: ReadonlyArray<TextFilterAndroidStruct>;\n textFiltersIOS?: ReadonlyArray<TextFilterIOSStruct>;\n // amznmod_react - add textFiltersKepler prop\n textFiltersKepler?: ReadonlyArray<TextFilterKeplerStruct>;\n onAnimationFinish?: BubblingEventHandler<\n OnAnimationFinishEvent,\n 'onAnimationFinish'\n >;\n // amznmod_react - add onAnimation... callbacks\n onAnimationLoad?: BubblingEventHandler<EmptyEvent>;\n onAnimationPlay?: BubblingEventHandler<EmptyEvent>;\n onAnimationPause?: BubblingEventHandler<EmptyEvent>;\n onAnimationResume?: BubblingEventHandler<EmptyEvent>;\n // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33\n onAnimationJsonLoad?: BubblingEventHandler<EmptyEvent>;\n}\n\n// amznmod_react - change NativeComponentType to HostComponent\ntype LottieViewNativeComponentType = HostComponent<NativeProps>;\n\ninterface NativeCommands {\n play: (\n viewRef: React.ElementRef<LottieViewNativeComponentType>,\n startFrame: Int32,\n endFrame: Int32,\n ) => void;\n reset: (viewRef: React.ElementRef<LottieViewNativeComponentType>) => void;\n pause: (viewRef: React.ElementRef<LottieViewNativeComponentType>) => void;\n resume: (viewRef: React.ElementRef<LottieViewNativeComponentType>) => void;\n}\n\nexport const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({\n supportedCommands: ['play', 'reset', 'pause', 'resume'],\n});\n\n// amznmod_react - native component registration to build for Kepler\nconst LottieNativeComponent = 'LottieAnimationView'\nconst viewConfig = {\n autoPlay: true,\n sourceName: true,\n resizeMode: true,\n renderMode: true,\n sourceJson: true,\n sourceURL: true,\n imageAssetsFolder: true,\n progress: true,\n speed: true,\n loop: true,\n enableMergePathsAndroidForKitKatAndAbove: true,\n hardwareAccelerationAndroid: true,\n cacheComposition: true,\n colorFilters: true,\n textFiltersAndroid: true,\n textFiltersIOS: true,\n textFiltersKepler: true,\n};\n\nconst bubblingEventTypes = {\n topOnAnimationFinish: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationFinish',\n captured: 'onAnimationFinishCapture'\n }\n },\n topOnAnimationLoad: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationLoad',\n captured: 'onAnimationLoadCapture'\n }\n },\n // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33\n topOnAnimationJsonLoad: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationJsonLoad',\n captured: 'onAnimationJsonLoadCapture'\n }\n },\n topOnAnimationPlay: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationPlay',\n captured: 'onAnimationPlayCapture'\n }\n },\n topOnAnimationPause: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationPause',\n captured: 'onAnimationPauseCapture'\n }\n },\n topOnAnimationResume: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationResume',\n captured: 'onAnimationResumeCapture'\n }\n }\n};\n\nregister(LottieNativeComponent, {uiViewClassName: LottieNativeComponent, validAttributes: viewConfig, bubblingEventTypes: bubblingEventTypes});\nexport default (LottieNativeComponent as unknown) as HostComponent<N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,EAAE,iBAAiB;MAC1BC,QAAQ,EAAE;IACZ;EACF,CAAC;EACDI,mBAAmB,EAAE;IACnBN,uBAAuB,EAAE;MACvBC,OAAO,EAAE,kBAAkB;MAC3BC,QAAQ,EAAE;IACZ;EACF,CAAC;EACDK,oBAAoB,EAAE;IACpBP,uBAAuB,EAAE;MACvBC,OAAO,EAAE,mBAAmB;MAC5BC,QAAQ,EAAE;IACZ;EACF;AACF,CAAC;AAED1B,QAAQ,CAACG,qBAAqB,EAAE;EAAC6B,eAAe,EAAE7B,qBAAqB;EAAE8B,eAAe,EAAE7B,UAAU;EAAEkB,kBAAkB,EAAEA;AAAkB,CAAC,CAAC;AAC9I,eAAgBnB,qBAAqB","ignoreList":[]}
1
+ {"version":3,"names":["codegenNativeCommands","register","Commands","supportedCommands","LottieNativeComponent","viewConfig","autoPlay","sourceName","resizeMode","renderMode","sourceJson","sourceURL","imageAssetsFolder","progress","speed","loop","enableMergePathsAndroidForKitKatAndAbove","hardwareAccelerationAndroid","cacheComposition","colorFilters","textFiltersAndroid","textFiltersIOS","textFiltersKepler","bubblingEventTypes","topOnAnimationFinish","phasedRegistrationNames","bubbled","captured","topOnAnimationLoad","topOnAnimationJsonLoad","topOnAnimationPlay","topOnAnimationPause","topOnAnimationResume","uiViewClassName","validAttributes"],"sources":["LottieAnimationViewNativeComponent.ts"],"sourcesContent":["/*\n * Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its affiliates. All rights reserved.\n *\n * PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO LICENSE TERMS.\n *\n * Amazon modifications are indicated by [amznmod_* comments].\n */\n\n/*\n * Changelog:\n * Set up lottie-react-native package to build for Kepler\n */\n\nimport type {\n BubblingEventHandler,\n Int32,\n Double,\n Float,\n} from 'react-native/Libraries/Types/CodegenTypes';\nimport codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';\nimport type { HostComponent, ProcessedColorValue, ViewProps } from 'react-native';\nimport register from '@amazon-devices/react-native-kepler/Libraries/Utilities/registerGeneratedViewConfig';\n\nexport type OnAnimationFinishEvent = Readonly<{\n isCancelled: boolean;\n}>;\n\n// amznmod_react - add EmptyEvent type\nexport type EmptyEvent = {\n // Nothing to return in this event\n};\n\ntype ColorFilterStruct = Readonly<{\n keypath: string;\n color: ProcessedColorValue;\n}>;\n\ntype TextFilterIOSStruct = Readonly<{\n keypath: string;\n text: string;\n}>;\n\ntype TextFilterAndroidStruct = Readonly<{\n find: string;\n replace: string;\n}>;\n\ntype TextFilterKeplerStruct = Readonly<{\n keypath: string;\n text: string;\n}>;\n\nexport interface NativeProps extends ViewProps {\n // amznmod_react - add autoPlay as native prop to avoid component mount race condition\n autoPlay?: boolean;\n resizeMode?: string;\n renderMode?: string;\n sourceName?: string;\n sourceJson?: string;\n sourceURL?: string;\n imageAssetsFolder?: string;\n progress?: Float;\n speed?: Double;\n loop?: boolean;\n enableMergePathsAndroidForKitKatAndAbove?: boolean;\n hardwareAccelerationAndroid?: boolean;\n cacheComposition?: boolean;\n colorFilters?: ReadonlyArray<ColorFilterStruct>;\n // dummy that solves codegen issue when there's a ReadonlyArray<Object> without another Object prop\n // https://github.com/reactwg/react-native-new-architecture/discussions/104\n dummy?: Readonly<{ dummy: boolean }>;\n textFiltersAndroid?: ReadonlyArray<TextFilterAndroidStruct>;\n textFiltersIOS?: ReadonlyArray<TextFilterIOSStruct>;\n // amznmod_react - add textFiltersKepler prop\n textFiltersKepler?: ReadonlyArray<TextFilterKeplerStruct>;\n onAnimationFinish?: BubblingEventHandler<\n OnAnimationFinishEvent,\n 'onAnimationFinish'\n >;\n // amznmod_react - add onAnimation... callbacks\n onAnimationLoad?: BubblingEventHandler<EmptyEvent>;\n onAnimationPlay?: BubblingEventHandler<EmptyEvent>;\n onAnimationPause?: BubblingEventHandler<EmptyEvent>;\n onAnimationResume?: BubblingEventHandler<EmptyEvent>;\n // PROJ*-136246 - deprecate onAnimationJsonLoad\n onAnimationJsonLoad?: BubblingEventHandler<EmptyEvent>;\n}\n\n// amznmod_react - change NativeComponentType to HostComponent\ntype LottieViewNativeComponentType = HostComponent<NativeProps>;\n\ninterface NativeCommands {\n play: (\n viewRef: React.ElementRef<LottieViewNativeComponentType>,\n startFrame: Int32,\n endFrame: Int32,\n ) => void;\n reset: (viewRef: React.ElementRef<LottieViewNativeComponentType>) => void;\n pause: (viewRef: React.ElementRef<LottieViewNativeComponentType>) => void;\n resume: (viewRef: React.ElementRef<LottieViewNativeComponentType>) => void;\n}\n\nexport const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({\n supportedCommands: ['play', 'reset', 'pause', 'resume'],\n});\n\n// amznmod_react - native component registration to build for Kepler\nconst LottieNativeComponent = 'LottieAnimationView'\nconst viewConfig = {\n autoPlay: true,\n sourceName: true,\n resizeMode: true,\n renderMode: true,\n sourceJson: true,\n sourceURL: true,\n imageAssetsFolder: true,\n progress: true,\n speed: true,\n loop: true,\n enableMergePathsAndroidForKitKatAndAbove: true,\n hardwareAccelerationAndroid: true,\n cacheComposition: true,\n colorFilters: true,\n textFiltersAndroid: true,\n textFiltersIOS: true,\n textFiltersKepler: true,\n};\n\nconst bubblingEventTypes = {\n topOnAnimationFinish: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationFinish',\n captured: 'onAnimationFinishCapture'\n }\n },\n topOnAnimationLoad: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationLoad',\n captured: 'onAnimationLoadCapture'\n }\n },\n // PROJ*-136246 - deprecate onAnimationJsonLoad\n topOnAnimationJsonLoad: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationJsonLoad',\n captured: 'onAnimationJsonLoadCapture'\n }\n },\n topOnAnimationPlay: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationPlay',\n captured: 'onAnimationPlayCapture'\n }\n },\n topOnAnimationPause: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationPause',\n captured: 'onAnimationPauseCapture'\n }\n },\n topOnAnimationResume: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationResume',\n captured: 'onAnimationResumeCapture'\n }\n }\n};\n\nregister(LottieNativeComponent, {uiViewClassName: LottieNativeComponent, validAttributes: viewConfig, bubblingEventTypes: bubblingEventTypes});\nexport default (LottieNativeComponent as unknown) as HostComponent<NativeProps>;"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAQA,OAAOA,qBAAqB,MAAM,wDAAwD;AAE1F,OAAOC,QAAQ,MAAM,2EAA2E;;AAMhG;;AA6DA;;AAcA,OAAO,MAAMC,QAAwB,GAAGF,qBAAqB,CAAiB;EAC5EG,iBAAiB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ;AACxD,CAAC,CAAC;;AAEF;AACA,MAAMC,qBAAqB,GAAG,qBAAqB;AACnD,MAAMC,UAAU,GAAG;EACjBC,QAAQ,EAAE,IAAI;EACdC,UAAU,EAAE,IAAI;EAChBC,UAAU,EAAE,IAAI;EAChBC,UAAU,EAAE,IAAI;EAChBC,UAAU,EAAE,IAAI;EAChBC,SAAS,EAAE,IAAI;EACfC,iBAAiB,EAAE,IAAI;EACvBC,QAAQ,EAAE,IAAI;EACdC,KAAK,EAAE,IAAI;EACXC,IAAI,EAAE,IAAI;EACVC,wCAAwC,EAAE,IAAI;EAC9CC,2BAA2B,EAAE,IAAI;EACjCC,gBAAgB,EAAE,IAAI;EACtBC,YAAY,EAAE,IAAI;EAClBC,kBAAkB,EAAE,IAAI;EACxBC,cAAc,EAAE,IAAI;EACpBC,iBAAiB,EAAE;AACrB,CAAC;AAED,MAAMC,kBAAkB,GAAG;EACzBC,oBAAoB,EAAE;IACpBC,uBAAuB,EAAE;MACvBC,OAAO,EAAE,mBAAmB;MAC5BC,QAAQ,EAAE;IACZ;EACF,CAAC;EACDC,kBAAkB,EAAE;IAClBH,uBAAuB,EAAE;MACvBC,OAAO,EAAE,iBAAiB;MAC1BC,QAAQ,EAAE;IACZ;EACF,CAAC;EACD;EACAE,sBAAsB,EAAE;IACtBJ,uBAAuB,EAAE;MACvBC,OAAO,EAAE,qBAAqB;MAC9BC,QAAQ,EAAE;IACZ;EACF,CAAC;EACDG,kBAAkB,EAAE;IAClBL,uBAAuB,EAAE;MACvBC,OAAO,EAAE,iBAAiB;MAC1BC,QAAQ,EAAE;IACZ;EACF,CAAC;EACDI,mBAAmB,EAAE;IACnBN,uBAAuB,EAAE;MACvBC,OAAO,EAAE,kBAAkB;MAC3BC,QAAQ,EAAE;IACZ;EACF,CAAC;EACDK,oBAAoB,EAAE;IACpBP,uBAAuB,EAAE;MACvBC,OAAO,EAAE,mBAAmB;MAC5BC,QAAQ,EAAE;IACZ;EACF;AACF,CAAC;AAED1B,QAAQ,CAACG,qBAAqB,EAAE;EAAC6B,eAAe,EAAE7B,qBAAqB;EAAE8B,eAAe,EAAE7B,UAAU;EAAEkB,kBAAkB,EAAEA;AAAkB,CAAC,CAAC;AAC9I,eAAgBnB,qBAAqB","ignoreList":[]}
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name": "@amazon-devices/lottie-react-native", "version": "2.0.9000000000+6.0.0-rc.1", "description": "React Native bindings for Lottie", "main": "lib/commonjs/index.js", "module": "lib/module/index.js", "react-native": "src/index.tsx", "types": "lib/typescript/index.d.ts", "source": "src/index.tsx", "sideEffects": false, "files": ["SystemBundles", "SystemModules", "src", "lib", "android", "ios", "*.podspec", "kepler-compatibility.json", "react-native.config.js", "THIRD_PARTY_NOTICES.txt", "kepler-transformed-package-info.json"], "author": "Emilio Rodriguez <emiliorodriguez@gmail.com>", "homepage": "https://github.com/airbnb/lottie-react-native#readme", "license": "See license in LICENSE", "keywords": ["lottie", "animation", "react", "react-native", "keyframe"], "repository": "https://github.com/react-native-community/lottie-react-native", "bugs": {"url": "https://github.com/react-native-community/lottie-react-native/issues"}, "scripts": {"build": "bob build", "build:release": "npm-run-all build", "test": "jest", "update-api-snapshot": "jest src/__tests__/validate-public-api.test.js -u"}, "//-0": "amznmod_react - Add keplerImport and kepler 3p module aliasing", "keplerImport": true, "kepler": {"temporary-alias-for-package": {"name": "lottie-react-native", "version": "6.0.0-rc.1"}}, "//-1": "amznmod_react - change peerDependencies to restrict to 72.0 or greater", "peerDependencies": {"react": "*", "react-native": ">=0.46"}, "//-2": "amznmod_react - change devDependencies versions to be Kepler compatible", "devDependencies": {"@amazon-devices/react-native-kepler": "^2.0.0+rn0.72.0", "@react-native-community/eslint-config": "^2.0.0", "@types/jest": "29.5.12", "@types/react": "^18.0.18", "@typescript-eslint/eslint-plugin": "^4.33.0", "@typescript-eslint/parser": "^4.33.0", "eslint": "^7.14.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "3.1.2", "flow-api-translator": "^0.20.1", "jest": "^29.2.1", "metro-react-native-babel-preset": "^0.64.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", "react": "18.2.0", "react-native": "0.72.0", "react-native-builder-bob": "^0.17.1", "react-native-windows": "0.72.0", "ts-jest": "29.1.2", "typescript": "^4.4.4"}, "react-native-builder-bob": {"source": "src", "output": "lib", "targets": ["commonjs", "module", "typescript"]}, "codegenConfig": {"android": {"javaPackageName": "com.airbnb.android.react.lottie"}, "name": "lottiereactnative", "type": "components", "jsSrcsDir": "./src/specs"}}
1
+ {"name": "@amazon-devices/lottie-react-native", "version": "2.0.9000000002+6.0.0-rc.1", "description": "React Native bindings for Lottie", "main": "lib/commonjs/index.js", "module": "lib/module/index.js", "react-native": "src/index.tsx", "types": "lib/typescript/index.d.ts", "source": "src/index.tsx", "sideEffects": false, "files": ["SystemBundles", "SystemModules", "src", "lib", "android", "ios", "*.podspec", "kepler-compatibility.json", "react-native.config.js", "THIRD_PARTY_NOTICES.txt", "kepler-transformed-package-info.json"], "author": "Emilio Rodriguez <emiliorodriguez@gmail.com>", "homepage": "https://github.com/airbnb/lottie-react-native#readme", "license": "See license in LICENSE", "keywords": ["lottie", "animation", "react", "react-native", "keyframe"], "repository": "https://github.com/react-native-community/lottie-react-native", "bugs": {"url": "https://github.com/react-native-community/lottie-react-native/issues"}, "scripts": {"build": "bob build", "build:release": "npm-run-all build", "test": "jest", "update-api-snapshot": "jest src/__tests__/validate-public-api.test.js -u"}, "//-0": "amznmod_react - Add keplerImport and kepler 3p module aliasing", "keplerImport": true, "kepler": {"temporary-alias-for-package": {"name": "lottie-react-native", "version": "6.0.0-rc.1"}}, "//-1": "amznmod_react - change peerDependencies to restrict to 72.0 or greater", "peerDependencies": {"react": "*", "react-native": ">=0.46"}, "//-2": "amznmod_react - change devDependencies versions to be Kepler compatible", "devDependencies": {"@amazon-devices/react-native-kepler": "^2.0.0+rn0.72.0", "@react-native-community/eslint-config": "^2.0.0", "@types/jest": "29.5.12", "@types/react": "^18.0.18", "@typescript-eslint/eslint-plugin": "^4.33.0", "@typescript-eslint/parser": "^4.33.0", "eslint": "^7.14.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "3.1.2", "flow-api-translator": "^0.20.1", "jest": "^29.2.1", "metro-react-native-babel-preset": "^0.64.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", "react": "18.2.0", "react-native": "0.72.0", "react-native-builder-bob": "^0.17.1", "react-native-windows": "0.72.0", "ts-jest": "29.1.2", "typescript": "^4.4.4"}, "react-native-builder-bob": {"source": "src", "output": "lib", "targets": ["commonjs", "module", "typescript"]}, "codegenConfig": {"android": {"javaPackageName": "com.airbnb.android.react.lottie"}, "name": "lottiereactnative", "type": "components", "jsSrcsDir": "./src/specs"}}
@@ -23,7 +23,9 @@ module.exports = {
23
23
  kepler: {
24
24
  autolink: {
25
25
  AmazonLottieLib: {
26
- provider: 'system'
26
+ provider: '',
27
+ uiComponentName: '/com.amazon.kepler.ui.react.lottie_6',
28
+ components: ['LottieAnimationView']
27
29
  },
28
30
  },
29
31
  },
@@ -120,10 +120,10 @@ export class AnimatedLottieView extends React.PureComponent<
120
120
  }
121
121
  };
122
122
 
123
- // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33
123
+ // PROJ*-136246 - deprecate onAnimationJsonLoad
124
124
  // amznmod_react - onAnimationLoad callback
125
125
  onAnimationJsonLoad = () => {
126
- console.warn("onAnimationJsonLoad will be deprecated in favor of onAnimationLoad in MR33. Migrate to use onAnimationLoad.")
126
+ console.warn("onAnimationJsonLoad will be deprecated in favor of onAnimationLoad. Migrate to use onAnimationLoad.")
127
127
  if (this.props.onAnimationJsonLoad) {
128
128
  this.props.onAnimationJsonLoad();
129
129
  }
@@ -248,7 +248,7 @@ export class AnimatedLottieView extends React.PureComponent<
248
248
  onAnimationPlay={this.onAnimationPlay}
249
249
  onAnimationPause={this.onAnimationPause}
250
250
  onAnimationResume={this.onAnimationResume}
251
- // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33
251
+ // PROJ*-136246 - deprecate onAnimationJsonLoad
252
252
  onAnimationJsonLoad={this.onAnimationJsonLoad}
253
253
  />
254
254
  </View>
@@ -232,7 +232,7 @@ export interface AnimatedLottieViewProps extends AccessibilityProps{
232
232
  */
233
233
  onAnimationLoad?: () => void;
234
234
 
235
- // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33
235
+ // PROJ*-136246 - deprecate onAnimationJsonLoad
236
236
  // amznmod_react - add onAnimationJsonLoad callback
237
237
  /**
238
238
  * A callback function which will be called when animation json load is finished.
@@ -82,7 +82,7 @@ export interface NativeProps extends ViewProps {
82
82
  onAnimationPlay?: BubblingEventHandler<EmptyEvent>;
83
83
  onAnimationPause?: BubblingEventHandler<EmptyEvent>;
84
84
  onAnimationResume?: BubblingEventHandler<EmptyEvent>;
85
- // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33
85
+ // PROJ*-136246 - deprecate onAnimationJsonLoad
86
86
  onAnimationJsonLoad?: BubblingEventHandler<EmptyEvent>;
87
87
  }
88
88
 
@@ -139,7 +139,7 @@ const bubblingEventTypes = {
139
139
  captured: 'onAnimationLoadCapture'
140
140
  }
141
141
  },
142
- // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33
142
+ // PROJ*-136246 - deprecate onAnimationJsonLoad
143
143
  topOnAnimationJsonLoad: {
144
144
  phasedRegistrationNames: {
145
145
  bubbled: 'onAnimationJsonLoad',