@amazon-devices/lottie-react-native 2.0.9000000000 → 3.0.9000000000-rn-83

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 (24) hide show
  1. package/SystemBundles/{0f9a823a0428769691985a052cfca6c63d74d3743f6ae4264266f0c4e2f9c458.bundle → 5348273d6ddb469c37c460034b49c8be195775b30d99aba37725f802e3d7f43d.bundle} +4806 -6214
  2. package/SystemBundles/5348273d6ddb469c37c460034b49c8be195775b30d99aba37725f802e3d7f43d.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/kepler-compatibility.json +2 -2
  7. package/lib/commonjs/LottieView.js +3 -3
  8. package/lib/commonjs/LottieView.js.map +1 -1
  9. package/lib/commonjs/LottieView.types.js.map +1 -1
  10. package/lib/commonjs/specs/LottieAnimationViewNativeComponent.js +7 -7
  11. package/lib/commonjs/specs/LottieAnimationViewNativeComponent.js.map +1 -1
  12. package/lib/module/LottieView.js +3 -3
  13. package/lib/module/LottieView.js.map +1 -1
  14. package/lib/module/LottieView.types.js.map +1 -1
  15. package/lib/module/specs/LottieAnimationViewNativeComponent.js +7 -7
  16. package/lib/module/specs/LottieAnimationViewNativeComponent.js.map +1 -1
  17. package/package.json +98 -1
  18. package/react-native.config.js +3 -1
  19. package/src/LottieView.tsx +3 -3
  20. package/src/LottieView.types.ts +1 -1
  21. package/src/specs/LottieAnimationViewNativeComponent.ts +8 -8
  22. package/SystemBundles/0f9a823a0428769691985a052cfca6c63d74d3743f6ae4264266f0c4e2f9c458.map +0 -3805
  23. package/SystemModules/amzn__lottie-react-native-2.modules.txt +0 -13
  24. package/SystemModules/amzn__lottie-react-native-2.private.modules.txt +0 -91
@@ -0,0 +1,13 @@
1
+ node_modules/@amzn/lottie-react-native_3/lib/commonjs/LottieView.js:e67021f5846f7f99989d
2
+ node_modules/@amzn/lottie-react-native_3/lib/commonjs/specs/LottieAnimationViewNativeComponent.js:a1aae4fd142a573bd038
3
+ node_modules/@amzn/lottie-react-native_3/lib/commonjs/LottieView.types.js:b37a36e3a3875c927f71
4
+ node_modules/@amzn/lottie-react-native_3/lib/commonjs/index.js:510dc497ca977209db6b
5
+ node_modules/@amzn/lottie-react-native_3/lib/module/LottieView.js:ff3d897f71901a9cbe96
6
+ node_modules/@amzn/lottie-react-native_3/lib/module/specs/LottieAnimationViewNativeComponent.js:909562f2c4b7b7e41264
7
+ node_modules/@amzn/lottie-react-native_3/lib/module/LottieView.types.js:b81bb3d8627981c5f8be
8
+ node_modules/@amzn/lottie-react-native_3/lib/module/index.js:4e04d2b4525f21ec6640
9
+ node_modules/@amzn/lottie-react-native_3/react-native.config.js:28ab49a8477a4a4e2aa1
10
+ node_modules/@amzn/lottie-react-native_3/src/LottieView.tsx:d80eaae9c9a7ebc07e75
11
+ node_modules/@amzn/lottie-react-native_3/src/specs/LottieAnimationViewNativeComponent.ts:60550d5a9d470acc6546
12
+ node_modules/@amzn/lottie-react-native_3/src/LottieView.types.ts:69a0f1578c74eada7c89
13
+ node_modules/@amzn/lottie-react-native_3/src/index.tsx:8359b1306b7e2412d089
@@ -0,0 +1,62 @@
1
+ node_modules/@babel/runtime_7.29.2/helpers/objectWithoutProperties.js:54be67f13f7547a51521
2
+ node_modules/@babel/runtime_7.29.2/helpers/objectWithoutPropertiesLoose.js:ae112a2672a8a53f82e5
3
+ node_modules/@babel/runtime_7.29.2/helpers/classCallCheck.js:2bfb5e99807ec81b822f
4
+ node_modules/@babel/runtime_7.29.2/helpers/createClass.js:cc42269051bc9ff17a63
5
+ node_modules/@babel/runtime_7.29.2/helpers/toPropertyKey.js:7519d1b9ea0de500d604
6
+ node_modules/@babel/runtime_7.29.2/helpers/toPrimitive.js:6c47e04d255cdfb1533c
7
+ node_modules/@babel/runtime_7.29.2/helpers/typeof.js:7b6247ce00695d888c36
8
+ node_modules/@babel/runtime_7.29.2/helpers/possibleConstructorReturn.js:80a4a0ee188e065108c9
9
+ node_modules/@babel/runtime_7.29.2/helpers/assertThisInitialized.js:7a9699b26019ae7270f5
10
+ node_modules/@babel/runtime_7.29.2/helpers/getPrototypeOf.js:9c829ff5032996ffdc8e
11
+ node_modules/@babel/runtime_7.29.2/helpers/inherits.js:3ebfecb28bc5857801a2
12
+ node_modules/@babel/runtime_7.29.2/helpers/setPrototypeOf.js:ea37d1dec222e5845b2b
13
+ node_modules/@babel/runtime_7.29.2/helpers/interopRequireDefault.js:d3b57c8ff490ba8c7c47
14
+ node_modules/@babel/runtime_7.29.2/helpers/get.js:659b028086c2c6f074a3
15
+ node_modules/@babel/runtime_7.29.2/helpers/superPropBase.js:263943b885b53437e9e0
16
+ node_modules/@babel/runtime_7.29.2/helpers/classPrivateFieldLooseBase.js:8e4a72d63eec1bceb909
17
+ node_modules/@babel/runtime_7.29.2/helpers/classPrivateFieldLooseKey.js:3998b40f87a7681fa397
18
+ node_modules/invariant_2.2.4/browser.js:fd099686726b2dfb6f66
19
+ node_modules/@babel/runtime_7.29.2/helpers/slicedToArray.js:8972a767e9133b0e3a28
20
+ node_modules/@babel/runtime_7.29.2/helpers/arrayWithHoles.js:ee99881fa9643e7bd96f
21
+ node_modules/@babel/runtime_7.29.2/helpers/iterableToArrayLimit.js:1847ec9d510321afd855
22
+ node_modules/@babel/runtime_7.29.2/helpers/unsupportedIterableToArray.js:0c30490eff100ca51d7c
23
+ node_modules/@babel/runtime_7.29.2/helpers/arrayLikeToArray.js:93f664c5afc3b3c0ffb9
24
+ node_modules/@babel/runtime_7.29.2/helpers/nonIterableRest.js:9ef80b625777ecb8d705
25
+ node_modules/@react-native/normalize-colors_0.83.0/index.js:e8e087936fed8afe0814
26
+ node_modules/nullthrows_1.1.1/nullthrows.js:afd4874b36ccd4e13961
27
+ node_modules/@react-native/assets-registry_0.83.0/registry.js:5ff9e23a9ba5a1a1e0ac
28
+ node_modules/@react-native/assets-registry_0.83.0/path-support.js:fb4eb45d6b2fc494317c
29
+ node_modules/@babel/runtime_7.29.2/helpers/wrapNativeSuper.js:b510ad86a9e18c7a79b6
30
+ node_modules/@babel/runtime_7.29.2/helpers/isNativeFunction.js:74c2adc9de6e582a35f1
31
+ node_modules/@babel/runtime_7.29.2/helpers/construct.js:d66ad0c399283f558869
32
+ node_modules/@babel/runtime_7.29.2/helpers/isNativeReflectConstruct.js:22840e4117f5dbcb3b06
33
+ node_modules/promise_8.3.0/setimmediate/es6-extensions.js:a7846fdeffeb1ebf6241
34
+ node_modules/promise_8.3.0/setimmediate/core.js:890f60fa94d3f6854a19
35
+ node_modules/promise_8.3.0/setimmediate/finally.js:15bc4ccb25fc2d0c4428
36
+ node_modules/stacktrace-parser_0.1.11/dist/stack-trace-parser.cjs.js:aa725aa4c0b37e1add33
37
+ node_modules/regenerator-runtime_0.13.11/runtime.js:af823d9710c534173a4d
38
+ node_modules/base64-js_1.5.1/index.js:71af70f51435e3e1b37b
39
+ node_modules/whatwg-fetch_3.6.20/dist/fetch.umd.js:ca4b0363146267ef3e77
40
+ node_modules/abort-controller_3.0.0/dist/abort-controller.js:ea8fcbd647aab1cfcdaa
41
+ node_modules/event-target-shim_5.0.1/dist/event-target-shim.js:2bd3f165b1ed6b916de7
42
+ node_modules/scheduler_0.27.0/index.native.js:ec9ec59f48073ee6e9f5
43
+ node_modules/scheduler_0.27.0/cjs/scheduler.native.production.js:d8f1930d0c79328207a3
44
+ node_modules/@babel/runtime_7.29.2/helpers/readOnlyError.js:b769be1a7481ccdab905
45
+ node_modules/@react-native/virtualized-lists_0.83.0/index.js:a7726730afdc356adbe4
46
+ node_modules/@react-native/virtualized-lists_0.83.0/Lists/VirtualizeUtils.js:d0ff6d3d1f2c9580ab13
47
+ node_modules/@react-native/virtualized-lists_0.83.0/Lists/VirtualizedList.js:8d139349672eea405ffb
48
+ node_modules/@react-native/virtualized-lists_0.83.0/Utilities/clamp.js:a78a6606e498a2fdbf2d
49
+ node_modules/@react-native/virtualized-lists_0.83.0/Utilities/infoLog.js:017b2813127d2e7f4d70
50
+ node_modules/@react-native/virtualized-lists_0.83.0/Lists/ChildListCollection.js:9c3630060e6e634bfb8b
51
+ node_modules/@react-native/virtualized-lists_0.83.0/Lists/FillRateHelper.js:c1e83141f045b25e26fc
52
+ node_modules/@react-native/virtualized-lists_0.83.0/Lists/ListMetricsAggregator.js:480fcd792bed2eb457f3
53
+ node_modules/@react-native/virtualized-lists_0.83.0/Lists/StateSafePureComponent.js:fd4823cbe6aa108a7d62
54
+ node_modules/@react-native/virtualized-lists_0.83.0/Lists/ViewabilityHelper.js:a44a41089be71f9f7b1e
55
+ node_modules/@react-native/virtualized-lists_0.83.0/Lists/VirtualizedListCellRenderer.js:8aa7cf31c704a4a85db2
56
+ node_modules/@react-native/virtualized-lists_0.83.0/Lists/VirtualizedListContext.js:4b89f56515b0628d3446
57
+ node_modules/@react-native/virtualized-lists_0.83.0/Lists/VirtualizedListProps.js:516cf3cf4ecb4e256407
58
+ node_modules/@react-native/virtualized-lists_0.83.0/Lists/CellRenderMask.js:95aa36c0870d6d5cfdb1
59
+ node_modules/@react-native/virtualized-lists_0.83.0/Lists/VirtualizedSectionList.js:cb8631f113fda0d4a92c
60
+ node_modules/memoize-one_5.2.1/dist/memoize-one.cjs.js:d381691ed29bec5a2050
61
+ node_modules/@babel/runtime_7.29.2/helpers/asyncToGenerator.js:37d2d0df8e62891cc30d
62
+ node_modules/@react-native-community/cli-platform-android_20.1.2/package.json:7c72c87f7e5330f7160b
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "@amzn/lottie-react-native": {
3
- "nameOnDevice": "index.amzn__lottie-react-native-2.hermes.bundle",
4
- "modulesPath": "amzn__lottie-react-native-2.modules.txt",
5
- "privateModulesPath": "amzn__lottie-react-native-2.private.modules.txt"
3
+ "nameOnDevice": "index.amzn__lottie-react-native-3.hermes.bundle",
4
+ "modulesPath": "amzn__lottie-react-native-3.modules.txt",
5
+ "privateModulesPath": "amzn__lottie-react-native-3.private.modules.txt"
6
6
  }
7
7
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "versions": {
3
- "2.0.0": "/com.amazon.kepler.lottie_2@ILottie_0",
4
- "2.0.9000000000": "/com.amazon.kepler.lottie_2@ILottie_0"
3
+ "3.0.0": "/com.amazon.kepler.lottie_3@ILottie_0",
4
+ "3.0.9000000000": "/com.amazon.kepler.lottie_3@ILottie_0"
5
5
  }
6
6
  }
@@ -61,10 +61,10 @@ class AnimatedLottieView extends _react.default.PureComponent {
61
61
  this.props.onAnimationLoad();
62
62
  }
63
63
  });
64
- // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33
64
+ // PROJ*-136246 - deprecate onAnimationJsonLoad
65
65
  // amznmod_react - onAnimationLoad callback
66
66
  _defineProperty(this, "onAnimationJsonLoad", () => {
67
- console.warn("onAnimationJsonLoad will be deprecated in favor of onAnimationLoad in MR33. Migrate to use onAnimationLoad.");
67
+ console.warn("onAnimationJsonLoad will be deprecated in favor of onAnimationLoad. Migrate to use onAnimationLoad.");
68
68
  if (this.props.onAnimationJsonLoad) {
69
69
  this.props.onAnimationJsonLoad();
70
70
  }
@@ -195,7 +195,7 @@ class AnimatedLottieView extends _react.default.PureComponent {
195
195
  onAnimationPlay: this.onAnimationPlay,
196
196
  onAnimationPause: this.onAnimationPause,
197
197
  onAnimationResume: this.onAnimationResume
198
- // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33
198
+ // PROJ*-136246 - deprecate onAnimationJsonLoad
199
199
  ,
200
200
  onAnimationJsonLoad: this.onAnimationJsonLoad
201
201
  })))
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_LottieAnimationViewNativeComponent","_interopRequireWildcard","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","_defineProperty","_toPropertyKey","value","enumerable","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","AnimatedNativeLottieView","Animated","createAnimatedComponent","NativeLottieAnimationView","defaultProps","source","undefined","progress","speed","loop","autoPlay","autoSize","enableMergePathsAndroidForKitKatAndAbove","cacheComposition","useNativeLooping","resizeMode","colorFilters","textFiltersAndroid","textFiltersIOS","textFiltersKepler","AnimatedLottieView","React","PureComponent","constructor","props","evt","onAnimationFinish","nativeEvent","isCancelled","onAnimationLoad","console","warn","onAnimationJsonLoad","onAnimationPlay","onAnimationPause","onAnimationResume","play","reset","pause","resume","_captureRef","componentDidUpdate","prevProps","startFrame","endFrame","Commands","_lottieAnimationViewRef","ref","render","_this$props$colorFilt","style","duration","rest","sourceName","sourceJson","uri","JSON","stringify","sourceURL","aspectRatioStyle","aspectRatio","w","h","styleObject","StyleSheet","flatten","sizeStyle","width","height","absoluteFill","fr","Math","round","op","map","colorFilter","color","processColor","baseStyle","overflow","createElement","View","exports"],"sources":["LottieView.tsx"],"sourcesContent":["/*\n * Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its affiliates. All rights reserved.\n *\n * PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO LICENSE TERMS.\n *\n * Amazon modifications are indicated by [amznmod_* comments].\n */\n\n/*\n * Changelog:\n * Set up lottie-react-native package to build for Kepler\n */\n\nimport React from 'react';\nimport {\n View,\n StyleSheet,\n NativeSyntheticEvent,\n Animated,\n processColor,\n} from 'react-native';\n\nimport type { AnimatedLottieViewProps } from './LottieView.types';\n\nimport NativeLottieAnimationView, {\n Commands,\n} from './specs/LottieAnimationViewNativeComponent';\n\nconst AnimatedNativeLottieView = Animated.createAnimatedComponent(\n NativeLottieAnimationView,\n);\n\n// amznmod_react - add textFiltersKepler prop for Kepler\nconst defaultProps: AnimatedLottieViewProps = {\n source: undefined,\n progress: 0,\n speed: 1,\n loop: true,\n autoPlay: false,\n autoSize: false,\n enableMergePathsAndroidForKitKatAndAbove: false,\n cacheComposition: true,\n useNativeLooping: false,\n resizeMode: 'contain',\n colorFilters: [],\n textFiltersAndroid: [],\n textFiltersIOS: [],\n textFiltersKepler: [],\n};\n\n/**\n * View hosting the lottie animation.\n */\nexport class AnimatedLottieView extends React.PureComponent<\n AnimatedLottieViewProps,\n {}\n> {\n static defaultProps = defaultProps;\n\n _lottieAnimationViewRef:\n | React.ElementRef<typeof NativeLottieAnimationView>\n | undefined;\n\n constructor(props: AnimatedLottieViewProps) {\n super(props);\n this.play = this.play.bind(this);\n this.reset = this.reset.bind(this);\n this.pause = this.pause.bind(this);\n this.resume = this.resume.bind(this);\n this.onAnimationFinish = this.onAnimationFinish.bind(this);\n this._captureRef = this._captureRef.bind(this);\n // amznmod_react - add onAnimation... callbacks\n this.onAnimationLoad = this.onAnimationLoad.bind(this);\n this.onAnimationPlay = this.onAnimationPlay.bind(this);\n this.onAnimationPause = this.onAnimationPause.bind(this);\n this.onAnimationResume = this.onAnimationResume.bind(this);\n this.onAnimationJsonLoad = this.onAnimationJsonLoad.bind(this);\n }\n\n componentDidUpdate(prevProps: AnimatedLottieViewProps) {\n if (\n this.props.autoPlay === true &&\n this.props.source !== prevProps.source &&\n !!this.props.source\n ) {\n this.play();\n }\n }\n\n play(startFrame?: number, endFrame?: number): void {\n Commands.play(\n this._lottieAnimationViewRef,\n startFrame ?? -1,\n endFrame ?? -1,\n );\n }\n\n reset() {\n Commands.reset(this._lottieAnimationViewRef);\n }\n\n pause() {\n Commands.pause(this._lottieAnimationViewRef);\n }\n\n resume() {\n Commands.resume(this._lottieAnimationViewRef);\n }\n\n onAnimationFinish = (evt: NativeSyntheticEvent<{ isCancelled: boolean }>) => {\n if (this.props.onAnimationFinish) {\n this.props.onAnimationFinish(evt.nativeEvent.isCancelled);\n }\n };\n\n // amznmod_react - onAnimationLoad callback\n onAnimationLoad = () => {\n if (this.props.onAnimationLoad) {\n this.props.onAnimationLoad();\n }\n };\n\n // PROJ*-136246 - deprecate onAnimationJsonLoad in MR33\n // amznmod_react - onAnimationLoad callback\n onAnimationJsonLoad = () => {\n console.warn(\"onAnimationJsonLoad will be deprecated in favor of onAnimationLoad in MR33. Migrate to use onAnimationLoad.\")\n if (this.props.onAnimationJsonLoad) {\n this.props.onAnimationJsonLoad();\n }\n };\n\n // amznmod_react - onAnimationPlay callback\n onAnimationPlay = () => {\n if (this.props.onAnimationPlay) {\n this.props.onAnimationPlay();\n }\n };\n\n // amznmod_react - onAnimationPause callback\n onAnimationPause = () => {\n if (this.props.onAnimationPause) {\n this.props.onAnimationPause();\n }\n };\n\n // amznmod_react - onAnimationResume callback\n onAnimationResume = () => {\n if (this.props.onAnimationResume) {\n this.props.onAnimationResume();\n }\n };\n\n _captureRef(ref: React.ElementRef<typeof NativeLottieAnimationView>) {\n if (ref === null) {\n return;\n }\n\n this._lottieAnimationViewRef = ref;\n // amznmod_react - Fix for a crash on autoplay + progress with animation\n if (this._lottieAnimationViewRef && this.props.autoPlay === true) {\n this.play();\n }\n }\n\n render(): React.ReactNode {\n // amznmod_react - add textFiltersKepler prop\n const {\n style,\n source,\n autoSize,\n autoPlay,\n duration,\n textFiltersAndroid,\n textFiltersIOS,\n textFiltersKepler,\n ...rest\n } = this.props;\n\n const sourceName = typeof source === 'string' ? source : undefined;\n const sourceJson =\n typeof source === 'object' && !(source as any).uri\n ? JSON.stringify(source)\n : undefined;\n const sourceURL =\n typeof source === 'object' && (source as any).uri\n ? (source as any).uri\n : undefined;\n\n const aspectRatioStyle = sourceJson\n ? { aspectRatio: (source as any).w / (source as any).h }\n : undefined;\n\n const styleObject = StyleSheet.flatten(style);\n let sizeStyle;\n if (\n !styleObject ||\n (styleObject.width === undefined && styleObject.height === undefined)\n ) {\n sizeStyle =\n autoSize && sourceJson\n ? { width: (source as any).w }\n : StyleSheet.absoluteFill;\n }\n\n const speed =\n duration && sourceJson && (source as any).fr\n ? Math.round(\n (((source as any).op / (source as any).fr) * 1000) / duration,\n )\n : this.props.speed;\n\n const colorFilters = this.props.colorFilters?.map((colorFilter) => ({\n ...colorFilter,\n color: processColor(colorFilter.color),\n }));\n // amznmod_react - Clip LottieView on ReactNative\n const baseStyle= {\n overflow: 'hidden',\n };\n\n return (\n // amznmod_react - Clip LottieView on ReactNative\n <View style={[aspectRatioStyle, sizeStyle, style, baseStyle]}>\n <AnimatedNativeLottieView\n ref={this._captureRef}\n {...rest}\n // amznmod_react - add autoPlay prop\n autoPlay={autoPlay}\n colorFilters={colorFilters}\n textFiltersAndroid={textFiltersAndroid}\n textFiltersIOS={textFiltersIOS}\n // amznmod_react - add textFiltersKepler prop\n // amznmod_react - Clip LottieView on ReactNative\n textFiltersKepler={textFiltersKepler}\n speed={speed}\n style={[\n aspectRatioStyle,\n sizeStyle || { width: '100%', height: '100%' },\n style,\n baseStyle\n ]}\n sourceName={sourceName}\n sourceJson={sourceJson}\n sourceURL={sourceURL}\n onAnimationFinish={this.onAnimationFinish}\n //amznmod_react - add onAnimation... callbacks\n onAnimationLoad={this.onAnimationLoad}\n onAnimationPlay={this.onAnimationPlay}\n onAnimationPause={this.onAnimationPause}\n onAnimationResume={this.onAnimationResume}\n // PROJ*-136246 - 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,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAF,wBAAAE,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,C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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,wBAAAE,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OA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,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,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,E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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,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,4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AgB,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\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AAgB;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,MAAMC,QAAwB,GAAGF,qBAAqB,CAAiB;EAC5EG,iBAAiB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ;AACxD,CAAC,CAAC;;AAEF;AACA,MAAMC,qBAAqB,GAAG,qBAAqB;AACnD,MAAMC,UAAU,GAAG;EACjBC,QAAQ,E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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;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAQA,OAAOA,qBAAqB,MAAM,wDAAwD;AAE1F,OAAOC,QAAQ,MAAM,2EAA2E;;AAMhG;;AA6DA;;AAcA,OAAO,MAAMC,QAAwB,GAAGF,qBAAqB,CAAiB;EAC5EG,iBAAiB,EAAE,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