@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
@@ -1,50 +0,0 @@
1
- import {
2
- useNavigation,
3
- useNavigationType,
4
- MenuTypes,
5
- useGetBottomTabBarHeight,
6
- } from "@applicaster/zapp-react-native-utils/reactHooks";
7
- import { useSafeAreaInsets } from "react-native-safe-area-context";
8
- import { isMenuVisible } from "@applicaster/zapp-react-native-ui-components/Components/Screen/navigationHandler";
9
-
10
- import { useConfiguration } from "../utils";
11
-
12
- type Option<T> = T | undefined;
13
-
14
- type Return = {
15
- top: Option<number>;
16
- height: Option<number>;
17
- bottom: Option<number>;
18
- };
19
-
20
- export const usePosition = (): Return => {
21
- const { minimised_height: minimisedHeight } = useConfiguration();
22
- const insets = useSafeAreaInsets();
23
- const bottomTabBarHeight = useGetBottomTabBarHeight();
24
-
25
- const {
26
- videoModalState: { mode },
27
- currentRoute,
28
- screenData,
29
- } = useNavigation();
30
-
31
- const docked = mode === "MINIMIZED";
32
-
33
- const navType = useNavigationType();
34
- const isBottomBarNavigation = navType === MenuTypes.bottomTabBar;
35
-
36
- const minimisedMarginBottom =
37
- isMenuVisible(currentRoute, screenData) && isBottomBarNavigation
38
- ? bottomTabBarHeight
39
- : insets.bottom;
40
-
41
- if (docked) {
42
- return {
43
- top: undefined,
44
- height: minimisedHeight,
45
- bottom: minimisedMarginBottom,
46
- };
47
- }
48
-
49
- return { top: 0, height: undefined, bottom: 0 };
50
- };
File without changes