@applicaster/zapp-react-native-utils 16.0.0-rc.114 → 16.0.0-rc.115
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.
package/actionUtils/index.ts
CHANGED
|
@@ -3,5 +3,7 @@ import { isTV } from "../reactUtils";
|
|
|
3
3
|
|
|
4
4
|
export const resolveDefaultAssetUri = (source: string | number): string =>
|
|
5
5
|
isTV()
|
|
6
|
-
?
|
|
6
|
+
? typeof source === "number"
|
|
7
|
+
? Image.resolveAssetSource(source)?.uri || ""
|
|
8
|
+
: (source as string)
|
|
7
9
|
: Image.resolveAssetSource(source as number)?.uri || "";
|
|
@@ -141,14 +141,4 @@ describe("getArtworkImage", () => {
|
|
|
141
141
|
|
|
142
142
|
expect(result).toBe(DEFAULT_IMAGE);
|
|
143
143
|
});
|
|
144
|
-
|
|
145
|
-
it("returns undefined when entry explicitly sets an empty key", () => {
|
|
146
|
-
const result = getArtworkImage({
|
|
147
|
-
key: "artwork_key",
|
|
148
|
-
entry: { ...entryWithImage, extensions: { artwork_key: "" } },
|
|
149
|
-
plugin_configuration: pluginConfigWithImage,
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
expect(result).toBeUndefined();
|
|
153
|
-
});
|
|
154
144
|
});
|
|
@@ -110,15 +110,10 @@ export const getArtworkImage = ({
|
|
|
110
110
|
key,
|
|
111
111
|
entry,
|
|
112
112
|
plugin_configuration,
|
|
113
|
-
}: GetArtworkImageParams):
|
|
113
|
+
}: GetArtworkImageParams): string => {
|
|
114
114
|
// 1) image_key from extensions
|
|
115
115
|
const imageKeyFromExtensions = getPropertyFromExtensions(key, entry);
|
|
116
116
|
|
|
117
|
-
// An explicitly empty key means the feed wants no artwork (background only)
|
|
118
|
-
if (imageKeyFromExtensions === "") {
|
|
119
|
-
return undefined;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
117
|
const imageFromExtensions = getImageFromEntry({
|
|
123
118
|
entry,
|
|
124
119
|
imageKey: imageKeyFromExtensions,
|
|
@@ -170,7 +165,7 @@ const AUDIO_PLAYER_ARTWORK_IMAGE_KEY = "audio_player_artwork_image_key";
|
|
|
170
165
|
const audioPlayerArtworkImageKeySelector = (config) =>
|
|
171
166
|
config?.[AUDIO_PLAYER_ARTWORK_IMAGE_KEY];
|
|
172
167
|
|
|
173
|
-
export const useArtworkImage = (entry: ZappEntry):
|
|
168
|
+
export const useArtworkImage = (entry: ZappEntry): string => {
|
|
174
169
|
const configuration = useZStore("playerConfiguration");
|
|
175
170
|
|
|
176
171
|
const audio_player_artwork_image_key_value = configuration(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-utils",
|
|
3
|
-
"version": "16.0.0-rc.
|
|
3
|
+
"version": "16.0.0-rc.115",
|
|
4
4
|
"description": "Applicaster Zapp React Native utilities package",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@applicaster/applicaster-types": "16.0.0-rc.
|
|
30
|
+
"@applicaster/applicaster-types": "16.0.0-rc.115",
|
|
31
31
|
"buffer": "^5.2.1",
|
|
32
32
|
"camelize": "^1.0.0",
|
|
33
33
|
"dayjs": "^1.11.10",
|