@amazon-devices/lottie-react-native 2.0.1758683737 → 3.0.9000000000

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.
Files changed (25) hide show
  1. package/SystemBundles/{90296ccfe5ff2db2f9fe68a18eca092f8b7c17d1125cfafc612d18788fe9bce6.bundle → 735b44a50dba3b902c82350fcec8a8bf35be02aae8115d61ab1fcdfaad4482e5.bundle} +4745 -6809
  2. package/SystemBundles/735b44a50dba3b902c82350fcec8a8bf35be02aae8115d61ab1fcdfaad4482e5.map +2950 -0
  3. package/SystemModules/amzn__lottie-react-native-3.modules.txt +13 -0
  4. package/SystemModules/amzn__lottie-react-native-3.private.modules.txt +62 -0
  5. package/SystemModules/keplerscript-system-bundle-config.json +3 -3
  6. package/THIRD_PARTY_NOTICES.txt +1 -637
  7. package/kepler-compatibility.json +2 -4
  8. package/lib/commonjs/LottieView.js +3 -3
  9. package/lib/commonjs/LottieView.js.map +1 -1
  10. package/lib/commonjs/LottieView.types.js.map +1 -1
  11. package/lib/commonjs/specs/LottieAnimationViewNativeComponent.js +7 -7
  12. package/lib/commonjs/specs/LottieAnimationViewNativeComponent.js.map +1 -1
  13. package/lib/module/LottieView.js +3 -3
  14. package/lib/module/LottieView.js.map +1 -1
  15. package/lib/module/LottieView.types.js.map +1 -1
  16. package/lib/module/specs/LottieAnimationViewNativeComponent.js +7 -7
  17. package/lib/module/specs/LottieAnimationViewNativeComponent.js.map +1 -1
  18. package/package.json +1 -1
  19. package/react-native.config.js +3 -1
  20. package/src/LottieView.tsx +3 -3
  21. package/src/LottieView.types.ts +1 -1
  22. package/src/specs/LottieAnimationViewNativeComponent.ts +8 -8
  23. package/SystemBundles/90296ccfe5ff2db2f9fe68a18eca092f8b7c17d1125cfafc612d18788fe9bce6.map +0 -1
  24. package/SystemModules/amzn__lottie-react-native-2.modules.txt +0 -13
  25. package/SystemModules/amzn__lottie-react-native-2.private.modules.txt +0 -92
@@ -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 - deprecate onAnimationJsonLoad in MR33\n onAnimationJsonLoad={this.onAnimationJsonLoad}\n />\n </View>\n );\n }\n}\n"],"mappings":";;;;;;AAaA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAUA,IAAAE,mCAAA,GAAAC,uBAAA,CAAAH,OAAA;AAEoD,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,C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AAS,GAAE;MACfC,QAAQ,EAAE;IACZ,CAAC;IAED;MAAA;MACE;MACA3H,MAAA,CAAAY,OAAA,CAAAgH,aAAA,CAACzH,YAAA,CAAA0H,IAAI;QAAC/B,KAAK,EAAE,CAACS,gBAAgB,EAAEO,SAAS,EAAEhB,KAAK,EAAE4B,SAAS;MAAE,gBAC3D1H,MAAA,CAAAY,OAAA,CAAAgH,aAAA,CAAChF,wBAAwB,EAAAlB,QAAA;QACvBiE,GAAG,EAAE,IAAI,CAACP;MAAY,GAClBY,IAAI;QACR;QACA1C,QAAQ,EAAEA,QAAS;QACnBM,YAAY,EAAEA,YAAa;QAC3BC,kBAAkB,EAAEA,kBAAmB;QACvCC,cAAc,EAAEA;QAChB;QACA;QAAA;QACAC,iBAAiB,EAAEA,iBAAkB;QACrCX,KAAK,EAAEA,KAAM;QACb0C,KAAK,EAAE,CACLS,gBAAgB,EAChBO,SAAS,IAAI;UAAEC,KAAK,EAAE,MAAM;UAAEC,MAAM,EAAE;QAAO,CAAC,EAC9ClB,KAAK,EACL4B,SAAS,CACT;QACFzB,UAAU,EAAEA,UAAW;QACvBC,UAAU,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;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,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAUA,IAAAE,mCAAA,GAAAC,uBAAA,CAAAH,OAAA;AAEoD,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAF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,IAAI;QAAC/B,KAAK,EAAE,CAACS,gBAAgB,EAAEO,SAAS,EAAEhB,KAAK,EAAE4B,SAAS;MAAE,gBAC3D1H,MAAA,CAAAY,OAAA,CAAAgH,aAAA,CAAChF,wBAAwB,EAAAlB,QAAA;QACvBiE,GAAG,EAAE,IAAI,CAACP;MAAY,GAClBY,IAAI;QACR;QACA1C,QAAQ,EAAEA,QAAS;QACnBM,YAAY,EAAEA,YAAa;QAC3BC,kBAAkB,EAAEA,kBAAmB;QACvCC,cAAc,EAAEA;QAChB;QACA;QAAA;QACAC,iBAAiB,EAAEA,iBAAkB;QACrCX,KAAK,EAAEA,KAAM;QACb0C,KAAK,EAAE,CACLS,gBAAgB,EAChBO,SAAS,IAAI;UAAEC,KAAK,EAAE,MAAM;UAAEC,MAAM,EAAE;QAAO,CAAC,EAC9ClB,KAAK,EACL4B,SAAS,CACT;QACFzB,UAAU,EAAEA,UAAW;QACvBC,UAAU,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;AAACkD,OAAA,CAAA9D,kBAAA,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":[]}
@@ -50,38 +50,38 @@ const viewConfig = {
50
50
  textFiltersKepler: true
51
51
  };
52
52
  const bubblingEventTypes = {
53
- topOnAnimationFinish: {
53
+ topAnimationFinish: {
54
54
  phasedRegistrationNames: {
55
55
  bubbled: 'onAnimationFinish',
56
56
  captured: 'onAnimationFinishCapture'
57
57
  }
58
58
  },
59
- topOnAnimationLoad: {
59
+ topAnimationLoad: {
60
60
  phasedRegistrationNames: {
61
61
  bubbled: 'onAnimationLoad',
62
62
  captured: 'onAnimationLoadCapture'
63
63
  }
64
64
  },
65
- // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33
66
- topOnAnimationJsonLoad: {
65
+ // PROJ*-136246 - deprecate onAnimationJsonLoad
66
+ topAnimationJsonLoad: {
67
67
  phasedRegistrationNames: {
68
68
  bubbled: 'onAnimationJsonLoad',
69
69
  captured: 'onAnimationJsonLoadCapture'
70
70
  }
71
71
  },
72
- topOnAnimationPlay: {
72
+ topAnimationPlay: {
73
73
  phasedRegistrationNames: {
74
74
  bubbled: 'onAnimationPlay',
75
75
  captured: 'onAnimationPlayCapture'
76
76
  }
77
77
  },
78
- topOnAnimationPause: {
78
+ topAnimationPause: {
79
79
  phasedRegistrationNames: {
80
80
  bubbled: 'onAnimationPause',
81
81
  captured: 'onAnimationPauseCapture'
82
82
  }
83
83
  },
84
- topOnAnimationResume: {
84
+ topAnimationResume: {
85
85
  phasedRegistrationNames: {
86
86
  bubbled: 'onAnimationResume',
87
87
  captured: 'onAnimationResumeCapture'
@@ -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","topAnimationFinish","phasedRegistrationNames","bubbled","captured","topAnimationLoad","topAnimationJsonLoad","topAnimationPlay","topAnimationPause","topAnimationResume","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 topAnimationFinish: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationFinish',\n captured: 'onAnimationFinishCapture'\n }\n },\n topAnimationLoad: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationLoad',\n captured: 'onAnimationLoadCapture'\n }\n },\n // PROJ*-136246 - deprecate onAnimationJsonLoad\n topAnimationJsonLoad: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationJsonLoad',\n captured: 'onAnimationJsonLoadCapture'\n }\n },\n topAnimationPlay: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationPlay',\n captured: 'onAnimationPlayCapture'\n }\n },\n topAnimationPause: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationPause',\n captured: 'onAnimationPauseCapture'\n }\n },\n topAnimationResume: {\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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AAE;IAClBP,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":[]}
@@ -56,10 +56,10 @@ export class AnimatedLottieView extends React.PureComponent {
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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QACA1C,QAAQ,EAAEA,QAAS;QACnBM,YAAY,EAAEA,YAAa;QAC3BC,kBAAkB,EAAEA,kBAAmB;QACvCC,cAAc,EAAEA;QAChB;QACA;QAAA;QACAC,iBAAiB,EAAEA,iBAAkB;QACrCX,KAAK,EAAEA,KAAM;QACb0C,KAAK,EAAE,CACLS,gBAAgB,EAChBM,SAAS,IAAI;UAAEC,KAAK,EAAE,MAAM;UAAEC,MAAM,EAAE;QAAO,CAAC,EAC9CjB,KAAK,EACL0B,SAAS,CACT;QACFvB,UAAU,EAAEA,UAAW;QACvBC,UAAU,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,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,CA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B,SAAS,CACT;QACFvB,UAAU,EAAEA,UAAW;QACvBC,UAAU,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 +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":[]}
@@ -44,38 +44,38 @@ const viewConfig = {
44
44
  textFiltersKepler: true
45
45
  };
46
46
  const bubblingEventTypes = {
47
- topOnAnimationFinish: {
47
+ topAnimationFinish: {
48
48
  phasedRegistrationNames: {
49
49
  bubbled: 'onAnimationFinish',
50
50
  captured: 'onAnimationFinishCapture'
51
51
  }
52
52
  },
53
- topOnAnimationLoad: {
53
+ topAnimationLoad: {
54
54
  phasedRegistrationNames: {
55
55
  bubbled: 'onAnimationLoad',
56
56
  captured: 'onAnimationLoadCapture'
57
57
  }
58
58
  },
59
- // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33
60
- topOnAnimationJsonLoad: {
59
+ // PROJ*-136246 - deprecate onAnimationJsonLoad
60
+ topAnimationJsonLoad: {
61
61
  phasedRegistrationNames: {
62
62
  bubbled: 'onAnimationJsonLoad',
63
63
  captured: 'onAnimationJsonLoadCapture'
64
64
  }
65
65
  },
66
- topOnAnimationPlay: {
66
+ topAnimationPlay: {
67
67
  phasedRegistrationNames: {
68
68
  bubbled: 'onAnimationPlay',
69
69
  captured: 'onAnimationPlayCapture'
70
70
  }
71
71
  },
72
- topOnAnimationPause: {
72
+ topAnimationPause: {
73
73
  phasedRegistrationNames: {
74
74
  bubbled: 'onAnimationPause',
75
75
  captured: 'onAnimationPauseCapture'
76
76
  }
77
77
  },
78
- topOnAnimationResume: {
78
+ topAnimationResume: {
79
79
  phasedRegistrationNames: {
80
80
  bubbled: 'onAnimationResume',
81
81
  captured: 'onAnimationResumeCapture'
@@ -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<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,M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AAE;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","topAnimationFinish","phasedRegistrationNames","bubbled","captured","topAnimationLoad","topAnimationJsonLoad","topAnimationPlay","topAnimationPause","topAnimationResume","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 topAnimationFinish: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationFinish',\n captured: 'onAnimationFinishCapture'\n }\n },\n topAnimationLoad: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationLoad',\n captured: 'onAnimationLoadCapture'\n }\n },\n // PROJ*-136246 - deprecate onAnimationJsonLoad\n topAnimationJsonLoad: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationJsonLoad',\n captured: 'onAnimationJsonLoadCapture'\n }\n },\n topAnimationPlay: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationPlay',\n captured: 'onAnimationPlayCapture'\n }\n },\n topAnimationPause: {\n phasedRegistrationNames: {\n bubbled: 'onAnimationPause',\n captured: 'onAnimationPauseCapture'\n }\n },\n topAnimationResume: {\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;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Q,EAAE;IACZ;EACF,CAAC;EACDI,iBAAiB,EAAE;IACjBN,uBAAuB,EAAE;MACvBC,OAAO,EAAE,kBAAkB;MAC3BC,QAAQ,EAAE;IACZ;EACF,CAAC;EACDK,kBAAkB,EAAE;IAClBP,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.1758683737+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", "react-native-windows": ">=0.72.x"}, "peerDependenciesMeta": {"react-native-windows": {"optional": true}}, "//-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": "3.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 make it compatible with multiple RNK versions", "peerDependencies": {"react": "*", "react-native": "*", "@amazon-devices/react-native-kepler": "*"}, "//-2": "amznmod_react - change devDependencies to make it compatible with multiple RNK versions", "devDependencies": {"@amazon-devices/react-native-kepler": "^3.0.0+rn0.76.2", "@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.76.2", "react-native-builder-bob": "^0.17.1", "react-native-windows": "0.76.2", "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_7',
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
 
@@ -127,38 +127,38 @@ const viewConfig = {
127
127
  };
128
128
 
129
129
  const bubblingEventTypes = {
130
- topOnAnimationFinish: {
130
+ topAnimationFinish: {
131
131
  phasedRegistrationNames: {
132
132
  bubbled: 'onAnimationFinish',
133
133
  captured: 'onAnimationFinishCapture'
134
134
  }
135
135
  },
136
- topOnAnimationLoad: {
136
+ topAnimationLoad: {
137
137
  phasedRegistrationNames: {
138
138
  bubbled: 'onAnimationLoad',
139
139
  captured: 'onAnimationLoadCapture'
140
140
  }
141
141
  },
142
- // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33
143
- topOnAnimationJsonLoad: {
142
+ // PROJ*-136246 - deprecate onAnimationJsonLoad
143
+ topAnimationJsonLoad: {
144
144
  phasedRegistrationNames: {
145
145
  bubbled: 'onAnimationJsonLoad',
146
146
  captured: 'onAnimationJsonLoadCapture'
147
147
  }
148
148
  },
149
- topOnAnimationPlay: {
149
+ topAnimationPlay: {
150
150
  phasedRegistrationNames: {
151
151
  bubbled: 'onAnimationPlay',
152
152
  captured: 'onAnimationPlayCapture'
153
153
  }
154
154
  },
155
- topOnAnimationPause: {
155
+ topAnimationPause: {
156
156
  phasedRegistrationNames: {
157
157
  bubbled: 'onAnimationPause',
158
158
  captured: 'onAnimationPauseCapture'
159
159
  }
160
160
  },
161
- topOnAnimationResume: {
161
+ topAnimationResume: {
162
162
  phasedRegistrationNames: {
163
163
  bubbled: 'onAnimationResume',
164
164
  captured: 'onAnimationResumeCapture'