@applicaster/zapp-react-native-ui-components 16.0.0-alpha.1803625751 → 16.0.0-alpha.1832347172

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 (60) hide show
  1. package/Components/CellRendererResolver/index.ts +1 -1
  2. package/Components/Layout/FullWidthRow.tsx +38 -0
  3. package/Components/MasterCell/DefaultComponents/Image/hoc/utils/__tests__/withDimensions.test.ts +420 -125
  4. package/Components/MasterCell/DefaultComponents/Image/hoc/utils/index.ts +114 -19
  5. package/Components/MasterCell/DefaultComponents/Image/hoc/withDimensions.tsx +19 -8
  6. package/Components/MasterCell/DefaultComponents/ImageContainer/index.tsx +1 -0
  7. package/Components/MasterCell/DefaultComponents/PressableView.tsx +27 -7
  8. package/Components/MasterCell/DefaultComponents/Text/hooks/useText.ts +4 -0
  9. package/Components/MasterCell/DefaultComponents/mobile/MobileActionButtons/ActionButton.tsx +154 -136
  10. package/Components/MasterCell/DefaultComponents/mobile/MobileActionButtons/Button.ts +30 -10
  11. package/Components/MasterCell/DefaultComponents/mobile/MobileActionButtons/Spacer.ts +6 -4
  12. package/Components/MasterCell/DefaultComponents/mobile/MobileActionButtons/TextLabelsContainer.ts +0 -1
  13. package/Components/MasterCell/DefaultComponents/mobile/MobileActionButtons/__tests__/PressableView.test.tsx +32 -21
  14. package/Components/MasterCell/DefaultComponents/mobile/MobileActionButtons/__tests__/index.test.ts +15 -4
  15. package/Components/MasterCell/DefaultComponents/mobile/MobileActionButtons/index.ts +21 -15
  16. package/Components/MasterCell/contexts/PressedStateContext.ts +3 -0
  17. package/Components/MasterCell/dataAdapter.ts +15 -5
  18. package/Components/MasterCell/hooks/index.ts +2 -0
  19. package/Components/MasterCell/hooks/usePressedState.ts +4 -0
  20. package/Components/MasterCell/index.tsx +30 -5
  21. package/Components/MasterCell/utils/__tests__/resolveColor.test.js +169 -132
  22. package/Components/MasterCell/utils/__tests__/resolveColorForProp.test.js +92 -0
  23. package/Components/MasterCell/utils/index.ts +85 -46
  24. package/Components/ModalComponent/AudioPlayer/Components/Action.tsx +332 -0
  25. package/Components/ModalComponent/AudioPlayer/Components/Button.tsx +402 -0
  26. package/Components/ModalComponent/AudioPlayer/Components/Header.tsx +811 -0
  27. package/Components/ModalComponent/AudioPlayer/Components/Input.tsx +671 -0
  28. package/Components/ModalComponent/AudioPlayer/Components/Item.tsx +878 -0
  29. package/Components/ModalComponent/AudioPlayer/Components/index.ts +9 -0
  30. package/Components/ModalComponent/BottomSheetDragArea.tsx +33 -0
  31. package/Components/ModalComponent/BottomSheetModalContent.tsx +49 -26
  32. package/Components/ModalComponent/__tests__/BottomSheetDragArea.test.tsx +74 -0
  33. package/Components/OfflineHandler/__tests__/__snapshots__/index.test.tsx.snap +4 -85
  34. package/Components/OfflineHandler/__tests__/index.test.tsx +78 -18
  35. package/Components/OfflineHandler/hooks.ts +123 -0
  36. package/Components/OfflineHandler/index.tsx +51 -73
  37. package/Components/OfflineHandler/utils/index.ts +1 -13
  38. package/Components/PlayerContainer/PlayerContainer.tsx +7 -3
  39. package/Components/PreloaderWrapper/index.tsx +1 -1
  40. package/Components/River/ComponentsMap/ComponentsMap.tsx +2 -2
  41. package/Components/River/__tests__/__snapshots__/componentsMap.test.js.snap +3 -15
  42. package/Components/Screen/index.tsx +8 -4
  43. package/Components/ScreenFeedLoader/ScreenFeedLoader.tsx +5 -3
  44. package/Components/ScreenResolverFeedProvider/ScreenResolverFeedProvider.tsx +1 -1
  45. package/Components/TopCutoffOverlay/index.tsx +2 -2
  46. package/Components/Transitioner/Transitioner.tsx +28 -17
  47. package/Components/ZappFrameworkComponents/BarView/BarView.tsx +12 -5
  48. package/Components/ZappFrameworkComponents/BarView/__tests__/BarView.test.tsx +2 -2
  49. package/Contexts/CachedDimensionsContext/__tests__/index.test.ts +154 -0
  50. package/Contexts/CachedDimensionsContext/index.ts +17 -2
  51. package/package.json +5 -5
  52. package/Components/OfflineHandler/NotificationView/NotificationView.lg.tsx +0 -112
  53. package/Components/OfflineHandler/NotificationView/NotificationView.samsung.tsx +0 -107
  54. package/Components/OfflineHandler/NotificationView/NotificationView.tsx +0 -153
  55. package/Components/OfflineHandler/NotificationView/__tests__/index.test.tsx +0 -66
  56. package/Components/OfflineHandler/NotificationView/utils.ts +0 -34
  57. package/Components/Screen/utils.ts +0 -16
  58. /package/Components/BackgroundImage/{BackgroundImage.tv.android.tsx → BackgroundImage.android.tv.tsx} +0 -0
  59. /package/Components/BackgroundImage/{BackgroundImage.tv.ios.tsx → BackgroundImage.ios.tv.tsx} +0 -0
  60. /package/Components/MasterCell/DefaultComponents/ButtonContainerView/{index.tv.android.tsx → index.android.tv.tsx} +0 -0
@@ -92,7 +92,7 @@ export function CellRendererResolver({
92
92
  component,
93
93
  styles,
94
94
  cellStyles,
95
- cellOptions,
95
+ cellOptions: { ...cellOptions, component },
96
96
  ...cellOptions, // fallback for existing plugins
97
97
  });
98
98
  }
@@ -0,0 +1,38 @@
1
+ import * as React from "react";
2
+ import { StyleSheet, View } from "react-native";
3
+
4
+ const styles = StyleSheet.create({
5
+ row: { flexDirection: "row" },
6
+ basis: {
7
+ maxWidth: "100%",
8
+ flexBasis: "100%",
9
+ },
10
+ });
11
+
12
+ type Props = {
13
+ children: React.ReactNode;
14
+ };
15
+
16
+ /**
17
+ * Constrains its child to exactly the available parent width.
18
+ *
19
+ * UI components such as Hero and List render their items inside a parent
20
+ * `ScrollView` (e.g. when wrapped by tabs). A child placed directly in a
21
+ * scroll container can size itself to its own content rather than to the
22
+ * viewport, which causes items to be measured at a stale width and resize
23
+ * unexpectedly after layout changes such as device rotation.
24
+ *
25
+ * Wrapping the content in a `flexDirection: "row"` parent with a
26
+ * `flexBasis: "100%"` / `maxWidth: "100%"` child forces the child to
27
+ * re-derive its width from the parent on every layout pass instead of
28
+ * caching a measured pixel width, keeping it full-width and stable.
29
+ *
30
+ * @param children - The content to render at full parent width.
31
+ */
32
+ export function FullWidthRow({ children }: Props) {
33
+ return (
34
+ <View style={styles.row}>
35
+ <View style={styles.basis}>{children}</View>
36
+ </View>
37
+ );
38
+ }