@applicaster/zapp-react-native-ui-components 13.0.0-alpha.1700735421 → 13.0.0-alpha.1711912250

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 (75) hide show
  1. package/Components/AnimatedInOut/index.tsx +3 -5
  2. package/Components/AudioPlayer/AudioPlayer.tsx +5 -9
  3. package/Components/AudioPlayer/helpers.tsx +1 -2
  4. package/Components/Cell/Cell.tsx +3 -13
  5. package/Components/Cell/CellWithFocusable.tsx +21 -15
  6. package/Components/Cell/CellWrapper.tsx +18 -0
  7. package/Components/Cell/styles.ts +17 -0
  8. package/Components/CellRendererResolver/index.ts +2 -1
  9. package/Components/ErrorScreen/index.tsx +8 -0
  10. package/Components/FocusableCell/index.tsx +1 -1
  11. package/Components/FocusableGroup/FocusableTvOS.tsx +3 -6
  12. package/Components/FocusableGroup/index.tsx +0 -1
  13. package/Components/GeneralContentScreen/GeneralContentScreen.tsx +3 -0
  14. package/Components/GeneralContentScreen/utils/useCurationAPI.ts +4 -2
  15. package/Components/GeneralContentScreen/utils/useEventAlerts.ts +30 -0
  16. package/Components/HandlePlayable/HandlePlayable.tsx +21 -27
  17. package/Components/Layout/TV/LayoutBackground.tsx +28 -0
  18. package/Components/Layout/TV/ScreenContainer.tsx +0 -1
  19. package/Components/Layout/TV/__tests__/__snapshots__/index.test.tsx.snap +15 -10
  20. package/Components/Layout/TV/__tests__/index.test.tsx +8 -2
  21. package/Components/Layout/TV/index.tsx +6 -20
  22. package/Components/Layout/TV/index.web.tsx +4 -1
  23. package/Components/MasterCell/DefaultComponents/Image/Image.ios.tsx +4 -3
  24. package/Components/MasterCell/DefaultComponents/Image/hooks/useImage.ts +11 -7
  25. package/Components/MasterCell/DefaultComponents/tv/TvActionButtons/const.ts +3 -0
  26. package/Components/MasterCell/DefaultComponents/tv/TvActionButtons/index.ts +6 -6
  27. package/Components/MasterCell/elementMapper.tsx +2 -1
  28. package/Components/MasterCell/utils/behaviorProvider.ts +4 -1
  29. package/Components/MasterCell/utils/index.ts +6 -6
  30. package/Components/ModalComponent/BottomSheetModalContent.tsx +49 -41
  31. package/Components/ModalComponent/Button/Item.tsx +6 -5
  32. package/Components/ModalComponent/Button/assets.ts +1 -1
  33. package/Components/ModalComponent/Button/index.tsx +45 -62
  34. package/Components/ModalComponent/Header/index.tsx +9 -8
  35. package/Components/ModalComponent/utils.ts +55 -7
  36. package/Components/OfflineHandler/utils/index.ts +1 -1
  37. package/Components/PlayerContainer/PlayerContainer.tsx +34 -7
  38. package/Components/PlayerImageBackground/index.tsx +4 -24
  39. package/Components/River/ComponentsMap/ComponentsMap.tsx +15 -3
  40. package/Components/River/ComponentsMap/hooks/useLoadingState.ts +3 -3
  41. package/Components/River/RiverItem.tsx +8 -3
  42. package/Components/River/__tests__/__snapshots__/componentsMap.test.js.snap +7 -1
  43. package/Components/Screen/TV/__tests__/index.web.test.tsx +26 -0
  44. package/Components/Screen/TV/index.web.tsx +5 -6
  45. package/Components/Screen/__tests__/Screen.test.tsx +22 -14
  46. package/Components/Screen/__tests__/__snapshots__/Screen.test.tsx.snap +2 -2
  47. package/Components/Screen/hooks.ts +3 -6
  48. package/Components/TopMarginApplicator/TopMarginApplicator.tsx +2 -3
  49. package/Components/VideoLive/animationUtils.ts +3 -3
  50. package/Components/VideoModal/ModalAnimation/AnimatedPlayerModalWrapper.tsx +1 -1
  51. package/Components/VideoModal/ModalAnimation/AnimatedScrollModal.tsx +35 -19
  52. package/Components/VideoModal/ModalAnimation/AnimatedVideoPlayerComponent.tsx +3 -3
  53. package/Components/VideoModal/ModalAnimation/AnimationComponent.tsx +38 -14
  54. package/Components/VideoModal/ModalAnimation/ModalAnimationContext.tsx +11 -3
  55. package/Components/VideoModal/ModalAnimation/__tests__/getMoveUpValue.test.ts +108 -0
  56. package/Components/VideoModal/ModalAnimation/const.ts +5 -0
  57. package/Components/VideoModal/ModalAnimation/index.ts +2 -0
  58. package/Components/VideoModal/ModalAnimation/utils.ts +30 -0
  59. package/Components/VideoModal/PlayerDetails.tsx +9 -4
  60. package/Components/VideoModal/PlayerWrapper.tsx +35 -22
  61. package/Components/VideoModal/VideoModal.tsx +19 -4
  62. package/Components/VideoModal/__tests__/__snapshots__/PlayerDetails.test.tsx.snap +2 -40
  63. package/Components/VideoModal/utils.ts +3 -4
  64. package/Components/ZappUIComponent/index.tsx +4 -4
  65. package/Decorators/ConfigurationWrapper/withConfigurationProvider.tsx +2 -2
  66. package/Decorators/RiverResolver/index.tsx +5 -7
  67. package/Decorators/ZappPipesDataConnector/index.tsx +2 -1
  68. package/package.json +6 -6
  69. package/.babelrc +0 -8
  70. package/Components/Cell/CellStyles/FallbackCellStyle/index.js +0 -157
  71. package/Components/Cell/CellStyles/Hero/index.js +0 -111
  72. package/Components/Cell/CellStyles/ScreenSelector/index.js +0 -68
  73. package/Components/Cell/CellStyles/cellStylesResolver.ts +0 -19
  74. package/Components/Cell/CellStyles/colors.js +0 -40
  75. package/Components/Cell/CellStyles/index.js +0 -15
@@ -1,43 +1,5 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`PlayerDetails renders properly 1`] = `
4
- <View
5
- collapsable={false}
6
- style={
7
- {
8
- "backgroundColor": "transparent",
9
- "flex": 1,
10
- "marginTop": -8,
11
- "paddingTop": -8,
12
- "width": 750,
13
- }
14
- }
15
- >
16
- <View
17
- feed="test-source"
18
- riverComponents={[]}
19
- riverId="test-id"
20
- />
21
- </View>
22
- `;
3
+ exports[`PlayerDetails renders properly 1`] = `null`;
23
4
 
24
- exports[`PlayerDetails renders properly on tablet in landscape orientation 1`] = `
25
- <View
26
- collapsable={false}
27
- style={
28
- {
29
- "backgroundColor": "transparent",
30
- "flex": 1,
31
- "marginTop": -20,
32
- "paddingTop": 40,
33
- "width": 750,
34
- }
35
- }
36
- >
37
- <View
38
- feed="test-source"
39
- riverComponents={[]}
40
- riverId="test-id"
41
- />
42
- </View>
43
- `;
5
+ exports[`PlayerDetails renders properly on tablet in landscape orientation 1`] = `null`;
@@ -1,5 +1,4 @@
1
- import * as R from "ramda";
2
-
1
+ import { mergeRight } from "ramda";
3
2
  import { platformSelect } from "@applicaster/zapp-react-native-utils/reactUtils";
4
3
  import { usePickFromState } from "@applicaster/zapp-react-native-redux/hooks";
5
4
  import { useNavigation } from "@applicaster/zapp-react-native-utils/reactHooks/navigation/useNavigation";
@@ -25,10 +24,10 @@ export const useConfiguration = () => {
25
24
 
26
25
  const playerPluginConfig = playerManager.getPluginConfiguration();
27
26
 
28
- const config = R.mergeRight(playerPluginConfig, {
27
+ const config = mergeRight(playerPluginConfig, {
28
+ ...pluginConfiguration,
29
29
  ...targetScreenConfiguration?.general,
30
30
  ...targetScreenConfiguration?.styles,
31
- ...pluginConfiguration,
32
31
  });
33
32
 
34
33
  const {
@@ -8,7 +8,6 @@ import {
8
8
 
9
9
  import { Placeholder } from "./Placeholder";
10
10
  import { useInitialLoading } from "./hooks";
11
- import { useIsFocusable } from "@applicaster/zapp-react-native-utils/focusManager";
12
11
 
13
12
  type ReactComponent = React.ComponentType<any>;
14
13
 
@@ -138,12 +137,13 @@ New signature: {Component, ErrorComponent, LoadingComponent, options}`
138
137
  );
139
138
 
140
139
  const componentProps = React.useMemo(
141
- () => ({ ...props, parent }),
140
+ () => ({
141
+ ...props,
142
+ parent,
143
+ }),
142
144
  [props, parent]
143
145
  );
144
146
 
145
- useIsFocusable(componentProps);
146
-
147
147
  React.useEffect(() => {
148
148
  if (!skipOnLoadFinished && !isLoading) {
149
149
  onLoadFinished();
@@ -21,13 +21,13 @@ const prepareConfiguration = (
21
21
  keys: [string]
22
22
  ) => R.compose(R.evolve(keysMap), R.pickAll(keys))(configuration);
23
23
 
24
- const configurationKeys = R.keys(keysMap);
25
-
26
24
  export function withConfigurationProvider(Component: React.ComponentType<any>) {
27
25
  return function WithConfigurationProvider(props: Props) {
28
26
  const styles = props?.screenData?.styles;
29
27
  const general = props?.screenData?.general;
30
28
 
29
+ const configurationKeys = React.useMemo(() => R.keys(keysMap), []);
30
+
31
31
  const configuration = React.useMemo(
32
32
  () => prepareConfiguration({ ...general, ...styles }, configurationKeys),
33
33
  []
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
2
 
3
- import { usePickFromState } from "@applicaster/zapp-react-native-redux/hooks";
4
3
  import { isTV } from "@applicaster/zapp-react-native-utils/reactUtils";
5
4
  import { usePathname } from "@applicaster/zapp-react-native-utils/reactHooks/navigation/usePathname";
5
+ import { useRivers } from "@applicaster/zapp-react-native-utils/reactHooks";
6
6
 
7
7
  type Props = ZappUIComponentProps & {
8
8
  rivers: ZappRivers;
@@ -12,27 +12,25 @@ type Props = ZappUIComponentProps & {
12
12
 
13
13
  export function withRiver(Component: ZappComponent): ZappComponent {
14
14
  const RiverWithData = ({ screenId, ...otherProps }: Props) => {
15
- const { rivers } = usePickFromState(["rivers"]);
15
+ const river = useRivers()?.[screenId];
16
16
  const pathname = usePathname();
17
- const river = rivers[screenId];
18
17
 
19
18
  if (!river) {
20
19
  return null;
21
20
  }
22
21
 
23
- if (!otherProps.screenData) {
24
- otherProps.screenData = river;
25
- }
26
-
27
22
  return (
28
23
  <Component
29
24
  screenId={screenId}
30
25
  river={river}
31
26
  key={isTV() ? pathname : undefined}
32
27
  {...otherProps}
28
+ screenData={otherProps.screenData || river}
33
29
  />
34
30
  );
35
31
  };
36
32
 
33
+ RiverWithData.displayName = `RiverWithData(${Component.displayName || Component.name})`;
34
+
37
35
  return RiverWithData;
38
36
  }
@@ -230,7 +230,8 @@ export function zappPipesDataConnector(
230
230
  const entryContext =
231
231
  (shouldUseNestedContext && screenContextData?.nested?.entry
232
232
  ? screenContextData?.nested?.entry
233
- : screenContextData?.entry) || {};
233
+ : (screenContextData?.entry?.payload ?? screenContextData?.entry)) ||
234
+ {};
234
235
 
235
236
  const screenContext =
236
237
  (shouldUseNestedContext && screenContextData?.nested?.screen
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-ui-components",
3
- "version": "13.0.0-alpha.1700735421",
3
+ "version": "13.0.0-alpha.1711912250",
4
4
  "description": "Applicaster Zapp React Native ui components for the Quick Brick App",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
7
7
  "scripts": {
8
- "test": "jest -w=2",
9
8
  "build": "echo skipping hybrid typescript build for now"
10
9
  },
11
10
  "publishConfig": {
@@ -32,10 +31,10 @@
32
31
  "redux-mock-store": "^1.5.3"
33
32
  },
34
33
  "dependencies": {
35
- "@applicaster/applicaster-types": "13.0.0-alpha.1700735421",
36
- "@applicaster/zapp-react-native-bridge": "13.0.0-alpha.1700735421",
37
- "@applicaster/zapp-react-native-redux": "13.0.0-alpha.1700735421",
38
- "@applicaster/zapp-react-native-utils": "13.0.0-alpha.1700735421",
34
+ "@applicaster/applicaster-types": "13.0.0-alpha.1711912250",
35
+ "@applicaster/zapp-react-native-bridge": "13.0.0-alpha.1711912250",
36
+ "@applicaster/zapp-react-native-redux": "13.0.0-alpha.1711912250",
37
+ "@applicaster/zapp-react-native-utils": "13.0.0-alpha.1711912250",
39
38
  "promise": "^8.3.0",
40
39
  "react-router-native": "^5.1.2",
41
40
  "url": "^0.11.0",
@@ -47,6 +46,7 @@
47
46
  "immer": "*",
48
47
  "react": "*",
49
48
  "react-native": "*",
49
+ "react-native-safe-area-context": "*",
50
50
  "react-native-svg": "*",
51
51
  "uglify-js": "*",
52
52
  "validate-color": "*",
package/.babelrc DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "presets": ["react-native", "flow", "react-native-stage-0/decorator-support"],
3
- "env": {
4
- "test": {
5
- "presets": [["env", { "modules": "commonjs" }], "react-native", "flow"]
6
- }
7
- }
8
- }
@@ -1,157 +0,0 @@
1
- import {
2
- getColor,
3
- ACTIVE_COLOR,
4
- BACKGROUND_COLOR,
5
- MAIN_TEXT_COLOR,
6
- FOCUSED_TEXT_COLOR,
7
- } from "../colors";
8
-
9
- const Image = "Image";
10
- const View = "View";
11
- const Text = "Text";
12
-
13
- const containerStyles = (styles) => ({
14
- flex: 1,
15
- flexDirection: "column",
16
- width: 384,
17
- height: 436,
18
- borderRadius: 4,
19
- backgroundColor: getColor(BACKGROUND_COLOR, styles),
20
- marginRight: 48,
21
- marginBottom: 48,
22
- });
23
-
24
- const focusedContainerStyles = (styles) => ({
25
- ...containerStyles(styles),
26
- backgroundColor: getColor(ACTIVE_COLOR, styles),
27
- });
28
-
29
- const imageStyle = {
30
- width: 384,
31
- height: 216,
32
- borderTopRightRadius: 4,
33
- borderTopLeftRadius: 4,
34
- };
35
-
36
- const titleContainerStyles = {
37
- width: 336,
38
- height: 60,
39
- marginHorizontal: 24,
40
- marginTop: 24,
41
- overflow: "hidden",
42
- };
43
-
44
- const titleStyles = (styles) => ({
45
- fontSize: 26,
46
- color: getColor(MAIN_TEXT_COLOR, styles),
47
- fontWeight: "bold",
48
- fontStyle: "normal",
49
- });
50
-
51
- const focusedTitleStyles = (styles) => ({
52
- ...titleStyles(styles),
53
- color: getColor(FOCUSED_TEXT_COLOR, styles),
54
- });
55
-
56
- const subtitleContainerStyles = {
57
- width: 336,
58
- height: 88,
59
- marginHorizontal: 24,
60
- marginTop: 24,
61
- overflow: "hidden",
62
- };
63
-
64
- const subtitleStyles = (styles) => ({
65
- fontSize: 24,
66
- fontWeight: "normal",
67
- opacity: 0.8,
68
- color: getColor(MAIN_TEXT_COLOR, styles),
69
- fontStyle: "normal",
70
- });
71
-
72
- const focusedSubtitleStyles = (styles) => ({
73
- ...subtitleStyles(styles),
74
- color: getColor(FOCUSED_TEXT_COLOR, styles),
75
- });
76
-
77
- const viewTree = (state, styles) => [
78
- {
79
- type: View,
80
- style:
81
- state === "focused"
82
- ? focusedContainerStyles(styles)
83
- : containerStyles(styles),
84
- elements: [
85
- {
86
- type: Image,
87
- style: imageStyle,
88
- data: [
89
- {
90
- func: "image_src_from_media_item",
91
- args: ["thumbnail-small"],
92
- propName: "uri",
93
- },
94
- ],
95
- },
96
- {
97
- type: View,
98
- style: titleContainerStyles,
99
- elements: [
100
- {
101
- type: Text,
102
- style:
103
- state === "focused"
104
- ? focusedTitleStyles(styles)
105
- : titleStyles(styles),
106
- data: [
107
- {
108
- func: "path",
109
- args: ["title"],
110
- propName: "label",
111
- },
112
- ],
113
- additionalProps: {
114
- numberOfLines: 2,
115
- },
116
- },
117
- ],
118
- },
119
- {
120
- type: View,
121
- style: subtitleContainerStyles,
122
- elements: [
123
- {
124
- type: Text,
125
- style:
126
- state === "focused"
127
- ? focusedSubtitleStyles(styles)
128
- : subtitleStyles(styles),
129
- data: [
130
- {
131
- func: "path",
132
- args: ["summary"],
133
- propName: "label",
134
- },
135
- ],
136
- additionalProps: {
137
- numberOfLines: 3,
138
- },
139
- },
140
- ],
141
- },
142
- ],
143
- },
144
- ];
145
-
146
- export const fallbackCellStyle = (styles) => ({
147
- content_types: {
148
- default: {
149
- states: {
150
- default: viewTree("default", styles),
151
- focused: viewTree("focused", styles),
152
- selected: viewTree("selected", styles),
153
- focused_selected: viewTree("focused_selected", styles),
154
- },
155
- },
156
- },
157
- });
@@ -1,111 +0,0 @@
1
- import {
2
- getColor,
3
- ACTIVE_COLOR,
4
- BACKGROUND_COLOR,
5
- MAIN_TEXT_COLOR,
6
- FOCUSED_TEXT_COLOR,
7
- } from "../colors";
8
-
9
- const Image = "Image";
10
- const View = "View";
11
- const Text = "Text";
12
-
13
- const containerStyles = (styles) => ({
14
- flex: 1,
15
- flexDirection: "column",
16
- width: 1280,
17
- height: 436,
18
- borderRadius: 4,
19
- backgroundColor: getColor(BACKGROUND_COLOR, styles),
20
- marginRight: 48,
21
- marginBottom: 48,
22
- });
23
-
24
- const focusedContainerStyles = (styles) => ({
25
- ...containerStyles(styles),
26
- backgroundColor: getColor(ACTIVE_COLOR, styles),
27
- });
28
-
29
- const imageStyle = {
30
- width: 1280,
31
- height: 352,
32
- borderTopRightRadius: 4,
33
- borderTopLeftRadius: 4,
34
- };
35
-
36
- const titleContainerStyles = {
37
- width: 1184,
38
- height: 60,
39
- marginHorizontal: 24,
40
- marginTop: 24,
41
- overflow: "hidden",
42
- };
43
-
44
- const titleStyles = (styles) => ({
45
- fontSize: 26,
46
- color: getColor(MAIN_TEXT_COLOR, styles),
47
- fontWeight: "bold",
48
- fontStyle: "normal",
49
- });
50
-
51
- const focusedTitleStyles = (styles) => ({
52
- ...titleStyles(styles),
53
- color: getColor(FOCUSED_TEXT_COLOR, styles),
54
- });
55
-
56
- const viewTree = (state, styles) => [
57
- {
58
- type: View,
59
- style:
60
- state === "focused"
61
- ? focusedContainerStyles(styles)
62
- : containerStyles(styles),
63
- elements: [
64
- {
65
- type: Image,
66
- style: imageStyle,
67
- data: [
68
- {
69
- func: "image_src_from_media_item",
70
- args: ["thumbnail-small"],
71
- propName: "uri",
72
- },
73
- ],
74
- },
75
- {
76
- type: View,
77
- style: titleContainerStyles,
78
- elements: [
79
- {
80
- type: Text,
81
- style:
82
- state === "focused"
83
- ? focusedTitleStyles(styles)
84
- : titleStyles(styles),
85
- data: [
86
- {
87
- func: "path",
88
- args: ["title"],
89
- propName: "label",
90
- },
91
- ],
92
- additionalProps: {
93
- numberOfLines: 2,
94
- },
95
- },
96
- ],
97
- },
98
- ],
99
- },
100
- ];
101
-
102
- export const hero = (styles) => ({
103
- content_types: {
104
- default: {
105
- states: {
106
- default: viewTree("default", styles),
107
- focused: viewTree("focused", styles),
108
- },
109
- },
110
- },
111
- });
@@ -1,68 +0,0 @@
1
- const viewTree = (state) => [
2
- {
3
- type: "View",
4
- style: {
5
- flex: 1,
6
- // aspectRatio: 1.0487804878,
7
- paddingTop: 14,
8
- paddingBottom: 14,
9
- paddingRight: 30,
10
- },
11
- elements: [
12
- {
13
- type: "View",
14
-
15
- elements: [
16
- {
17
- type: "Text",
18
-
19
- style: {
20
- // paddingHorizontal: "15%",
21
- paddingTop: "2%",
22
- paddingBottom: "2%",
23
- fontSize: 26,
24
- lineHeight: 32,
25
- color:
26
- state === "focused" || state === "selected"
27
- ? "rgba(239,239,239,1.0)"
28
- : "rgba(239,239,239,0.61)",
29
- fontWeight: "700",
30
- },
31
- data: [
32
- {
33
- func: "path",
34
- args: ["title"],
35
- propName: "label",
36
- },
37
- ],
38
- additionalProps: {
39
- numberOfLines: 2,
40
- },
41
- },
42
- {
43
- type: "View",
44
- style: {
45
- height: 10,
46
- alignItems: "center",
47
- justifyContent: "center",
48
- borderColor: state === "focused" ? "#FC461B" : "transparent",
49
- borderBottomWidth: 6,
50
- },
51
- },
52
- ],
53
- },
54
- ],
55
- },
56
- ];
57
-
58
- export const screenSelector = {
59
- content_types: {
60
- default: {
61
- states: {
62
- default: viewTree("default"),
63
- focused: viewTree("focused"),
64
- selected: viewTree("selected"),
65
- },
66
- },
67
- },
68
- };
@@ -1,19 +0,0 @@
1
- import * as R from "ramda";
2
-
3
- import { cellStyles } from "./index";
4
-
5
- type Props = {
6
- cellStyle: string | null | undefined;
7
- componentType: string | null | undefined;
8
- };
9
-
10
- export function cellStylesResolver({ cellStyle, componentType }: Props) {
11
- const componentCellStyles =
12
- R.prop(componentType, cellStyles) || cellStyles.default;
13
-
14
- const result =
15
- R.prop(cellStyle || "fallbackCellStyle", componentCellStyles) ||
16
- componentCellStyles.fallbackCellStyle;
17
-
18
- return result;
19
- }
@@ -1,40 +0,0 @@
1
- import { transformColorCode as fixColorHexCode } from "@applicaster/zapp-react-native-utils/transform";
2
- import * as R from "ramda";
3
-
4
- export const ACTIVE_COLOR = "ACTIVE_COLOR";
5
-
6
- export const BACKGROUND_COLOR = "BACKGROUND_COLOR";
7
-
8
- export const MAIN_TEXT_COLOR = "MAIN_TEXT_COLOR";
9
-
10
- export const FOCUSED_TEXT_COLOR = "FOCUSED_TEXT_COLOR";
11
-
12
- const colorKeyPath = (keyName) => ["tv", keyName, "color"];
13
-
14
- const COLORS = {
15
- [ACTIVE_COLOR]: {
16
- path: colorKeyPath("active"),
17
- default: "#FC461B",
18
- },
19
- [BACKGROUND_COLOR]: {
20
- path: colorKeyPath("background"),
21
- default: "#2F2F2F",
22
- },
23
- [MAIN_TEXT_COLOR]: {
24
- path: colorKeyPath("main_text"),
25
- default: "#EFEFEF",
26
- },
27
- [FOCUSED_TEXT_COLOR]: {
28
- path: colorKeyPath("focused_text_color"),
29
- default: "#FFFFFF",
30
- },
31
- };
32
-
33
- export const getColor = (name, styles) => {
34
- const colorKeyPath = R.path([name, "path"], COLORS);
35
-
36
- return (
37
- fixColorHexCode(R.path(colorKeyPath, styles)) ||
38
- R.path([name, "default"], COLORS)
39
- );
40
- };
@@ -1,15 +0,0 @@
1
- import { fallbackCellStyle } from "./FallbackCellStyle";
2
- import { hero } from "./Hero";
3
- import { screenSelector } from "./ScreenSelector";
4
-
5
- export const cellStyles = {
6
- default: {
7
- default: fallbackCellStyle,
8
- },
9
- hero: {
10
- default: hero,
11
- },
12
- screenSelector: {
13
- default: screenSelector,
14
- },
15
- };