@applicaster/zapp-react-native-ui-components 12.0.0-alpha.4757075613 → 12.0.0-alpha.4837064762

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 (44) hide show
  1. package/Components/BaseFocusable/index.tsx +1 -1
  2. package/Components/Cell/Cell.tsx +5 -1
  3. package/Components/Cell/CellWithFocusable.tsx +17 -5
  4. package/Components/FocusableGroup/index.tsx +1 -0
  5. package/Components/HandlePlayable/HandlePlayable.tsx +3 -0
  6. package/Components/Layout/TV/ScreenLayoutContextProvider.tsx +2 -2
  7. package/Components/Layout/TV/index.tsx +124 -25
  8. package/Components/MasterCell/DefaultComponents/Image/Image.ios.tsx +5 -3
  9. package/Components/MasterCell/DefaultComponents/LiveImage/index.tsx +14 -1
  10. package/Components/MasterCell/DefaultComponents/__tests__/image.test.js +1 -1
  11. package/Components/MasterCell/utils/index.ts +16 -5
  12. package/Components/PlayerContainer/PlayerContainer.tsx +17 -3
  13. package/Components/PlayerImageBackground/index.tsx +34 -8
  14. package/Components/River/ComponentsMap/ComponentsMap.tsx +85 -22
  15. package/Components/River/__tests__/componentsMap.test.js +6 -0
  16. package/Components/Screen/TV/index.web.tsx +151 -0
  17. package/Components/Screen/__tests__/__snapshots__/Screen.test.tsx.snap +4 -0
  18. package/Components/Screen/index.tsx +35 -24
  19. package/Components/ScreenResolver/index.tsx +3 -1
  20. package/Components/VideoLive/__tests__/PlayerLiveImageComponent.test.tsx +20 -5
  21. package/Components/VideoLive/__tests__/__snapshots__/PlayerLiveImageComponent.test.tsx.snap +0 -5
  22. package/Components/VideoModal/ModalAnimation/AnimatedPlayerModalWrapper.tsx +78 -0
  23. package/Components/VideoModal/ModalAnimation/AnimatedScrollModal.tsx +342 -0
  24. package/Components/VideoModal/ModalAnimation/AnimatedVideoPlayerComponent.tsx +151 -0
  25. package/Components/VideoModal/ModalAnimation/AnimationComponent.tsx +438 -0
  26. package/Components/VideoModal/ModalAnimation/ModalAnimationContext.tsx +143 -0
  27. package/Components/VideoModal/ModalAnimation/index.ts +15 -0
  28. package/Components/VideoModal/ModalAnimation/utils.ts +299 -0
  29. package/Components/VideoModal/PlayerWrapper.tsx +64 -41
  30. package/Components/VideoModal/VideoModal.tsx +8 -25
  31. package/Components/VideoModal/__tests__/PlayerWrapper.test.tsx +6 -1
  32. package/Components/VideoModal/__tests__/__snapshots__/PlayerWrapper.test.tsx.snap +151 -119
  33. package/Components/VideoModal/utils.ts +3 -3
  34. package/Components/Viewport/ViewportTracker/ViewportTracker.tsx +1 -1
  35. package/Components/Viewport/ViewportTracker/index.tsx +1 -0
  36. package/Components/Viewport/utils.js +1 -1
  37. package/Contexts/MenuToggleContext/{index.js → index.ts} +16 -0
  38. package/Contexts/ScreenContext/__tests__/__snapshots__/index.test.tsx.snap +3 -0
  39. package/Contexts/ScreenContext/__tests__/index.test.tsx +27 -0
  40. package/Contexts/ScreenContext/index.tsx +94 -25
  41. package/Contexts/ZappPipesContext/ZappPipesEntryContext.ts +1 -1
  42. package/package.json +5 -5
  43. package/Components/VideoModal/hooks/usePosition.ts +0 -50
  44. /package/Contexts/{index.js → index.ts} +0 -0
@@ -73,7 +73,7 @@ export class BaseFocusable<
73
73
  getId(props?: { id: string; groupId: string }) {
74
74
  const { id, groupId = null } = props || this.props;
75
75
 
76
- return groupId ? `${groupId}-${id}` : id;
76
+ return groupId ? `groupId:${groupId}___${id}` : id;
77
77
  }
78
78
 
79
79
  getRect() {
@@ -207,7 +207,11 @@ export class CellComponent extends React.Component<Props> {
207
207
 
208
208
  const { id } = item;
209
209
 
210
- const focusableId = R.join("-", [component?.id, id, index]);
210
+ const focusableId = R.join("-", [
211
+ `componentId:${component?.id}`,
212
+ `id:${id}`,
213
+ `index:${index}`,
214
+ ]);
211
215
 
212
216
  const handleFocus = (focusable, mouse) => {
213
217
  const focusFn = onFocus || noop;
@@ -6,12 +6,20 @@ import { noop } from "@applicaster/zapp-react-native-utils/functionUtils";
6
6
  import { isAppleTV } from "../../Helpers/Platform";
7
7
  import { useCellState } from "../MasterCell/utils";
8
8
 
9
- const useCellFocusedState = (groupId: string, id: string) => {
9
+ const useCellFocusedState = (
10
+ skipFocusManagerRegistration: boolean,
11
+ groupId: string,
12
+ id: string
13
+ ) => {
10
14
  const [currentCellFocused, setCurrentCellFocused] = React.useState(false);
11
15
 
12
16
  React.useEffect(() => {
13
- const isGroupItemFocused = () =>
14
- setCurrentCellFocused(focusManager.isGroupItemFocused(groupId, id));
17
+ const isGroupItemFocused = () => {
18
+ if (!skipFocusManagerRegistration) {
19
+ const isFocused = focusManager.isGroupItemFocused(groupId, id);
20
+ setCurrentCellFocused(isFocused);
21
+ }
22
+ };
15
23
 
16
24
  const handler = () => {
17
25
  // tvOS hack for properly checking focus
@@ -29,7 +37,7 @@ const useCellFocusedState = (groupId: string, id: string) => {
29
37
  return () => {
30
38
  focusManager.removeHandler(FOCUS_EVENTS.FOCUS, handler);
31
39
  };
32
- }, [groupId]);
40
+ }, [groupId, skipFocusManagerRegistration]);
33
41
 
34
42
  return currentCellFocused;
35
43
  };
@@ -65,7 +73,11 @@ export function CellWithFocusable(props: Props) {
65
73
  selected,
66
74
  } = props;
67
75
 
68
- const isFocused = useCellFocusedState(groupId, id);
76
+ const isFocused = useCellFocusedState(
77
+ skipFocusManagerRegistration,
78
+ groupId,
79
+ id
80
+ );
69
81
 
70
82
  const state = useCellState({
71
83
  id: item.id,
@@ -26,6 +26,7 @@ type Props = {
26
26
  nextFocusLeft?: any;
27
27
  nextFocusRight?: any;
28
28
  onLayout?: any;
29
+ excludeFromFocusSearching?: boolean;
29
30
  };
30
31
 
31
32
  export class FocusableGroup extends BaseFocusable<Props> {
@@ -19,6 +19,7 @@ type Props = {
19
19
  modalHeight?: number;
20
20
  modalWidth?: number;
21
21
  mode: VideoModalMode;
22
+ groupId?: string;
22
23
  };
23
24
 
24
25
  const YOUTUBE_PLUGIN_ID = "youtube-player-qb";
@@ -93,6 +94,7 @@ export function HandlePlayable({
93
94
  modalHeight,
94
95
  modalWidth,
95
96
  mode,
97
+ groupId,
96
98
  }: Props): React.ReactElement | null {
97
99
  const state = usePickFromState();
98
100
 
@@ -167,6 +169,7 @@ export function HandlePlayable({
167
169
  isModal={isModal}
168
170
  mode={mode}
169
171
  disableCastAction={playerModuleProperties?.disableCastAction}
172
+ groupId={groupId}
170
173
  />
171
174
  );
172
175
  }
@@ -60,7 +60,7 @@ export function ScreenLayoutContextProvider(props: {
60
60
  initialState
61
61
  );
62
62
 
63
- const screeenLayoutValue = React.useMemo(
63
+ const screenLayoutValue = React.useMemo(
64
64
  () => ({
65
65
  ...screenLayout,
66
66
  setScreenLayout,
@@ -69,7 +69,7 @@ export function ScreenLayoutContextProvider(props: {
69
69
  );
70
70
 
71
71
  return (
72
- <ScreenLayoutContext.Provider value={screeenLayoutValue}>
72
+ <ScreenLayoutContext.Provider value={screenLayoutValue}>
73
73
  {props.children}
74
74
  </ScreenLayoutContext.Provider>
75
75
  );
@@ -1,11 +1,15 @@
1
1
  import * as React from "react";
2
2
  import * as R from "ramda";
3
+ import { View, StyleSheet } from "react-native";
3
4
  import { usePickFromState } from "@applicaster/zapp-react-native-redux/hooks";
4
5
  import { useNavigation } from "@applicaster/zapp-react-native-utils/reactHooks/navigation";
5
6
  import { useTheme } from "@applicaster/zapp-react-native-utils/theme";
7
+ import { useNavbarState } from "@applicaster/zapp-react-native-utils/reactHooks/screen/useScreenContext";
8
+ import { isApplePlatform } from "@applicaster/zapp-react-native-utils/reactUtils";
6
9
 
7
10
  import {
8
11
  getNavigationProps,
12
+ getPathAttributes,
9
13
  resolveNavigationPlugin,
10
14
  routeIsPlayerScreen,
11
15
  } from "@applicaster/zapp-react-native-utils/navigationUtils";
@@ -17,9 +21,25 @@ import { ScreenContainer } from "./ScreenContainer";
17
21
  import { TransitionOverlay } from "./TransitionOverlay";
18
22
 
19
23
  import { ScreenLayoutContextProvider } from "./ScreenLayoutContextProvider";
20
- import { isApplePlatform } from "@applicaster/zapp-react-native-utils/reactUtils";
21
24
  import { PathnameContext } from "../../../Contexts/PathnameContext";
22
- import { useNavbarState } from "@applicaster/zapp-react-native-utils/reactHooks/screen/useScreenContext";
25
+
26
+ import { FocusableGroup } from "../../FocusableGroup";
27
+ import { Screen } from "../../Screen/TV/index.web";
28
+
29
+ export const ScreenDataContext = React.createContext(null);
30
+
31
+ const styles = StyleSheet.create({
32
+ container: {
33
+ position: "absolute",
34
+ width: 1920,
35
+ height: 1080,
36
+ backgroundColor: "black",
37
+ // opacity: 0.5,
38
+
39
+ borderWidth: 4,
40
+ borderColor: "magenta",
41
+ },
42
+ });
23
43
 
24
44
  type Components = {
25
45
  NavBar: React.ComponentType<any>;
@@ -27,16 +47,73 @@ type Components = {
27
47
  };
28
48
 
29
49
  type ComponentsExtraProps = {
30
- Background?: Record<string, any>;
31
50
  NavBar?: Record<string, any>;
51
+ Background?: Record<string, any>;
32
52
  };
33
53
 
34
54
  type Props = {
35
55
  Components: Components;
36
- ComponentsExtraProps?: ComponentsExtraProps;
37
- children: React.ReactNode;
56
+ componentsExtraProps?: ComponentsExtraProps;
57
+ };
58
+
59
+ const StackNavigator = ({ Components }: Props) => {
60
+ // @ts-ignore
61
+ const { mainStack, currentRoute } = useNavigation();
62
+
63
+ // console.log("debug_2", "DEBUG", { mainStack });
64
+
65
+ const renderScreen = ({ route, action, key, state }, index) => {
66
+ const pathAttributes = getPathAttributes({ pathname: route });
67
+
68
+ if (R.isEmpty(pathAttributes)) {
69
+ return null;
70
+ }
71
+
72
+ // console.log("debug_2", "StackNavigator - renderScreen", {
73
+ // index,
74
+ // route,
75
+ // state,
76
+ // key,
77
+ // action,
78
+ // });
79
+
80
+ const id = `${route}`;
81
+
82
+ return (
83
+ <FocusableGroup
84
+ id={id}
85
+ preferredFocus={route === currentRoute}
86
+ excludeFromFocusSearching
87
+ key={id}
88
+ >
89
+ <View style={styles.container}>
90
+ <ScreenDataContext.Provider value={state}>
91
+ <PathnameContext.Provider value={route}>
92
+ <Screen route={route} Components={Components} />
93
+ </PathnameContext.Provider>
94
+ </ScreenDataContext.Provider>
95
+ </View>
96
+ </FocusableGroup>
97
+ );
98
+ };
99
+
100
+ return mainStack.map(renderScreen);
101
+ };
102
+
103
+ const TransitionerTV = ({ componentsExtraProps, Components }: Props) => {
104
+ return (
105
+ <>
106
+ <ScreenLayoutContextProvider>
107
+ <StackNavigator
108
+ componentsExtraProps={componentsExtraProps}
109
+ Components={Components}
110
+ />
111
+ </ScreenLayoutContextProvider>
112
+ </>
113
+ );
38
114
  };
39
115
 
116
+ // @ts-ignore
40
117
  const Layout = ({ Components, ComponentsExtraProps, children }: Props) => {
41
118
  const navigator = useNavigation();
42
119
  const theme = useTheme();
@@ -98,32 +175,54 @@ const Layout = ({ Components, ComponentsExtraProps, children }: Props) => {
98
175
  }
99
176
 
100
177
  return (
101
- <LayoutContainer>
102
- <ScreenLayoutContextProvider>
103
- <Components.Background
104
- backgroundColor={backgroundColor}
105
- backgroundImageUrl={backgroundImageUrl}
106
- {...R.omit(["ref"])(ComponentsExtraProps?.Background)}
107
- >
108
- {!isTVOS ? navBarContainer : null}
109
- {navBarReady ? (
110
- /**
178
+ // @ts-ignore
179
+ <TransitionerTV
180
+ componentsExtraProps={ComponentsExtraProps}
181
+ Components={Components}
182
+ >
183
+ <LayoutContainer>
184
+ <ScreenLayoutContextProvider>
185
+ <Components.Background
186
+ backgroundColor={backgroundColor}
187
+ backgroundImageUrl={backgroundImageUrl}
188
+ {...R.omit(["ref"])(ComponentsExtraProps?.Background)}
189
+ >
190
+ {!isTVOS ? navBarContainer : null}
191
+ {navBarReady ? (
192
+ /**
111
193
  Need to re-mount this component on each navigation event
112
194
  It's a hack to work around the fact that we don't support
113
195
  correct screen rendering in our navigator (shared currentRoute state)
114
196
  **/
115
- <PathnameContext.Provider value={navigator.currentRoute}>
116
- <ScreenContainer>{children}</ScreenContainer>
117
- </PathnameContext.Provider>
118
- ) : null}
119
- {/** Render NavBarContainer over ScreenContainer to let tvOS native
197
+ <PathnameContext.Provider value={navigator.currentRoute}>
198
+ <ScreenContainer>{children}</ScreenContainer>
199
+ </PathnameContext.Provider>
200
+ ) : null}
201
+ {/** Render NavBarContainer over ScreenContainer to let tvOS native
120
202
  focus manager works correctly to focus nav bar items first **/}
121
- {isTVOS ? navBarContainer : null}
122
- <TransitionOverlay />
123
- </Components.Background>
124
- </ScreenLayoutContextProvider>
125
- </LayoutContainer>
203
+ {isTVOS ? navBarContainer : null}
204
+ <TransitionOverlay />
205
+ </Components.Background>
206
+ </ScreenLayoutContextProvider>
207
+ </LayoutContainer>
208
+ </TransitionerTV>
126
209
  );
127
210
  };
128
211
 
129
212
  export default Layout;
213
+
214
+ /// Transitioner:
215
+ /*
216
+ Component: Transitioner
217
+ Responsibilities:
218
+ - Transitione between screens.
219
+ Tehere is no transition on Tv so no need for transitioner.
220
+
221
+ Component: StackNavigator
222
+ Responsibilities:
223
+ - Render the screens in the stack.
224
+ - Render the NavBar? I guess navbar should be part of the screen
225
+ - Render the screen.
226
+
227
+ Q
228
+ */
@@ -43,14 +43,16 @@ function Image({
43
43
  [source, error]
44
44
  );
45
45
 
46
+ const _source = shouldRenderImg
47
+ ? withDimensions(source)
48
+ : defaultPlaceHolderImage;
49
+
46
50
  return (
47
51
  // @ts-ignore
48
52
  <MemoizedImage
49
53
  style={style as ImageStyle}
50
54
  onError={() => setErrorState(true)}
51
- source={
52
- shouldRenderImg ? withDimensions(source) : defaultPlaceHolderImage
53
- }
55
+ source={_source?.uri ? _source : undefined}
54
56
  {...R.omit(["source"], otherProps)}
55
57
  />
56
58
  );
@@ -177,10 +177,23 @@ const getPlayerConfig = (player_screen_id, actionIdentifier) => {
177
177
  const positionAbsolute: ViewStyle = { position: "absolute" };
178
178
 
179
179
  const LiveImageComponent = (props: LiveImageProps) => {
180
- const { item, style, cellUUID, imageKey, actionIdentifier, state } = props;
180
+ const {
181
+ item,
182
+ style: componentStyle,
183
+ cellUUID,
184
+ imageKey,
185
+ actionIdentifier,
186
+ state,
187
+ } = props;
181
188
 
182
189
  const component = useUIComponentContext();
183
190
 
191
+ // Fix for blinking on state change
192
+ const style = React.useMemo(
193
+ () => ({ ...componentStyle, backgroundColor: "transparent" }),
194
+ [componentStyle]
195
+ );
196
+
184
197
  const componentType = React.useMemo(
185
198
  () => getPropComponentType(component),
186
199
  [component?.id]
@@ -39,6 +39,6 @@ describe("image with no source", () => {
39
39
  );
40
40
 
41
41
  const testInstance = testRenderer.root;
42
- expect(testInstance.findByType(Image).props.source).toEqual({ uri: "" });
42
+ expect(testInstance.findByType(Image).props.source).toBeUndefined();
43
43
  });
44
44
  });
@@ -125,13 +125,24 @@ export const useFilterChildren = <
125
125
 
126
126
  const filteredChildren = children.filter((child) => {
127
127
  const item = child.props.item;
128
- const action = actions.actions[child.props.pluginIdentifier];
128
+ const actionIdentifier = child.props.pluginIdentifier;
129
+ const action = actions.actions[actionIdentifier];
130
+
129
131
  // context value of specific plugin
130
- const currentValue = action?.module?.context?._currentValue;
132
+ if (action?.module && action.module.context) {
133
+ const currentValue = action.module.context._currentValue;
134
+
135
+ return currentValue?.isActionAvailable
136
+ ? currentValue.isActionAvailable(item)
137
+ : true;
138
+ }
131
139
 
132
- return currentValue?.isActionAvailable
133
- ? currentValue.isActionAvailable(item)
134
- : true;
140
+ masterCellLogger.error({
141
+ message: `Action plugin for ${actionIdentifier} could not be found, check the configuration of your action button`,
142
+ data: { item, action: child.props.pluginIdentifier },
143
+ });
144
+
145
+ return false;
135
146
  });
136
147
 
137
148
  return filteredChildren;
@@ -54,6 +54,11 @@ import { toNumber } from "@applicaster/zapp-react-native-utils/numberUtils";
54
54
  import { usePlayNextOverlay } from "@applicaster/zapp-react-native-utils/appUtils/playerManager/usePlayNextOverlay";
55
55
  import { PlayNextState } from "@applicaster/zapp-react-native-utils/appUtils/playerManager/OverlayObserver/OverlaysObserver";
56
56
 
57
+ import {
58
+ useModalAnimationContext,
59
+ PlayerAnimationStateEnum,
60
+ } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation";
61
+
57
62
  type Props = {
58
63
  Player: React.ComponentType<any>;
59
64
  PlayerLoadingView?: React.ComponentType<any>; // 👀 we are not receiving this prop
@@ -63,6 +68,7 @@ type Props = {
63
68
  mode?: VideoModalMode;
64
69
  loadPipesData: (url: string, options: {}) => void;
65
70
  disableCastAction?: boolean;
71
+ groupId?: string;
66
72
  };
67
73
 
68
74
  type ScreenStyles = ZappRiver["styles"] & {
@@ -195,6 +201,7 @@ const PlayerContainerComponent = (props: Props) => {
195
201
  style: videoStyle,
196
202
  mode = VideoModalMode.MAXIMIZED,
197
203
  disableCastAction = false,
204
+ groupId,
198
205
  } = props;
199
206
 
200
207
  // Hooks
@@ -229,6 +236,9 @@ const PlayerContainerComponent = (props: Props) => {
229
236
  const screenData = useTargetScreenData(item);
230
237
  const { setVisible: showNavBar } = useSetNavbarState();
231
238
 
239
+ const { isActiveGesture, startComponentsAnimation, setPlayerAnimationState } =
240
+ useModalAnimationContext();
241
+
232
242
  const playerEvent = (event, ...args) => {
233
243
  playerManager.invokeHandler(event, ...args);
234
244
  };
@@ -241,7 +251,6 @@ const PlayerContainerComponent = (props: Props) => {
241
251
  return;
242
252
  }
243
253
 
244
- navigator.goBack();
245
254
  showNavBar(true);
246
255
  }, [isModal, navigator.goBack, showNavBar]);
247
256
 
@@ -446,7 +455,7 @@ const PlayerContainerComponent = (props: Props) => {
446
455
  if (disableMiniPlayer) {
447
456
  navigator.closeVideoModal();
448
457
  } else {
449
- navigator.minimiseVideoModal();
458
+ setPlayerAnimationState(PlayerAnimationStateEnum.minimize);
450
459
  }
451
460
  }
452
461
 
@@ -621,6 +630,7 @@ const PlayerContainerComponent = (props: Props) => {
621
630
  style={styles.focusableGroup}
622
631
  preferredFocus
623
632
  shouldUsePreferredFocus
633
+ groupId={groupId}
624
634
  >
625
635
  {/* Video player and components */}
626
636
  <View
@@ -641,7 +651,11 @@ const PlayerContainerComponent = (props: Props) => {
641
651
  autoplay={true}
642
652
  controls={false}
643
653
  disableCastAction={disableCastAction}
644
- docked={navigator.isVideoModalDocked()}
654
+ docked={
655
+ navigator.isVideoModalDocked() &&
656
+ !startComponentsAnimation &&
657
+ !isActiveGesture
658
+ }
645
659
  entry={item}
646
660
  fullscreen={mode === VideoModalMode.FULLSCREEN}
647
661
  inline={inline}
@@ -1,38 +1,64 @@
1
1
  import React, { PropsWithChildren } from "react";
2
- import { ImageBackground } from "react-native";
2
+ import { ImageBackground, View } from "react-native";
3
3
 
4
4
  import { imageSrcFromMediaItem } from "@applicaster/zapp-react-native-utils/configurationUtils";
5
+ import {
6
+ AnimationComponent,
7
+ ComponentAnimationType,
8
+ useModalAnimationContext,
9
+ PlayerAnimationStateEnum,
10
+ } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation";
5
11
 
6
12
  type Props = PropsWithChildren<{
7
13
  entry: ZappEntry;
8
14
  style?: { [K: string]: any };
9
15
  imageStyle?: { [K: string]: any };
10
16
  imageKey?: string;
17
+ defaultImageDimensions?: { [K: string]: any };
11
18
  }>;
12
19
 
20
+ const imageSize = { width: "100%", height: "100%" };
21
+
13
22
  const PlayerImageBackgroundComponent = ({
14
23
  entry,
15
24
  children,
16
25
  style,
17
26
  imageStyle,
18
27
  imageKey,
28
+ defaultImageDimensions,
19
29
  }: Props) => {
20
30
  const source = React.useMemo(
21
31
  () => ({ uri: imageSrcFromMediaItem(entry, imageKey) }),
22
32
  [imageKey, entry]
23
33
  );
24
34
 
35
+ const { playerAnimationState } = useModalAnimationContext();
36
+
25
37
  if (!source) return <>{children}</>;
26
38
 
27
39
  return (
28
- <ImageBackground
29
- resizeMode="cover"
30
- style={style}
31
- imageStyle={imageStyle}
32
- source={source}
40
+ <View
41
+ style={
42
+ playerAnimationState === PlayerAnimationStateEnum.maximaze
43
+ ? defaultImageDimensions
44
+ : style
45
+ }
33
46
  >
34
- {children}
35
- </ImageBackground>
47
+ <AnimationComponent
48
+ style={style}
49
+ animationType={ComponentAnimationType.player}
50
+ additionalData={defaultImageDimensions}
51
+ >
52
+ <ImageBackground
53
+ resizeMode="cover"
54
+ style={imageSize}
55
+ imageStyle={imageStyle}
56
+ source={source}
57
+ >
58
+ {children}
59
+ </ImageBackground>
60
+ </AnimationComponent>
61
+ </View>
36
62
  );
37
63
  };
38
64