expo-splash-screen 0.29.2 → 0.29.4

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/CHANGELOG.md CHANGED
@@ -10,6 +10,14 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 0.29.4 — 2024-11-07
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
17
+ ## 0.29.3 — 2024-11-06
18
+
19
+ _This version does not introduce any user-facing changes._
20
+
13
21
  ## 0.29.2 — 2024-11-05
14
22
 
15
23
  ### 💡 Others
@@ -1,7 +1,7 @@
1
1
  apply plugin: 'com.android.library'
2
2
 
3
3
  group = 'host.exp.exponent'
4
- version = '0.29.2'
4
+ version = '0.29.4'
5
5
 
6
6
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
7
7
  apply from: expoModulesCorePlugin
@@ -14,7 +14,7 @@ android {
14
14
  namespace "expo.modules.splashscreen"
15
15
  defaultConfig {
16
16
  versionCode 17
17
- versionName '0.29.2'
17
+ versionName '0.29.4'
18
18
  }
19
19
  }
20
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-splash-screen",
3
- "version": "0.29.2",
3
+ "version": "0.29.4",
4
4
  "description": "Provides a module to allow keeping the native Splash Screen visible until you choose to hide it.",
5
5
  "main": "build",
6
6
  "types": "build",
@@ -34,7 +34,7 @@
34
34
  "license": "MIT",
35
35
  "homepage": "https://docs.expo.dev/versions/latest/sdk/splash-screen/",
36
36
  "dependencies": {
37
- "@expo/prebuild-config": "8.0.8"
37
+ "@expo/prebuild-config": "8.0.10"
38
38
  },
39
39
  "devDependencies": {
40
40
  "expo-module-scripts": "^4.0.0"
@@ -42,5 +42,5 @@
42
42
  "peerDependencies": {
43
43
  "expo": "*"
44
44
  },
45
- "gitHead": "a64603dce90981bf7688657f87dfa4be3e24f58b"
45
+ "gitHead": "c0899e56c5be08b0142f06f05aa7bac8d6bc18b8"
46
46
  }
@@ -3,10 +3,15 @@ import { IOSSplashConfig } from '@expo/prebuild-config/build/plugins/unversioned
3
3
  import { ConfigPlugin } from 'expo/config-plugins';
4
4
  type PluginConfig = {
5
5
  backgroundColor: string;
6
- logoWidth: number;
7
- image?: string | null;
8
- android: AndroidSplashConfig;
9
- ios: IOSSplashConfig;
6
+ imageWidth?: number;
7
+ enableFullScreenImage_legacy?: boolean;
8
+ image?: string;
9
+ dark?: {
10
+ image?: string;
11
+ backgroundColor?: string;
12
+ };
13
+ android?: AndroidSplashConfig;
14
+ ios?: IOSSplashConfig;
10
15
  };
11
16
  declare const _default: ConfigPlugin<PluginConfig>;
12
17
  export default _default;
@@ -6,18 +6,27 @@ const config_plugins_1 = require("expo/config-plugins");
6
6
  const pkg = require('expo-splash-screen/package.json');
7
7
  const withSplashScreen = (config, props) => {
8
8
  const android = {
9
- ...config.splash,
10
- ...config.android?.splash,
11
9
  ...props,
12
10
  ...props?.android,
11
+ resizeMode: 'contain',
12
+ dark: {
13
+ ...props?.android?.dark,
14
+ ...props?.dark,
15
+ resizeMode: 'contain',
16
+ },
13
17
  };
14
18
  const ios = {
15
- ...config.splash,
16
- ...config.ios?.splash,
17
19
  ...props,
18
20
  ...props?.ios,
21
+ resizeMode: 'contain',
22
+ dark: {
23
+ ...props?.ios?.dark,
24
+ ...props?.dark,
25
+ },
19
26
  };
20
- config = (0, withAndroidSplashScreen_1.withAndroidSplashScreen)(config, android);
27
+ // Need to pass null here if we don't receive any props. This means that the plugin has not been used.
28
+ // This only happens on Android. On iOS, if you don't use the plugin, this function won't be called.
29
+ config = (0, withAndroidSplashScreen_1.withAndroidSplashScreen)(config, props ? android : null);
21
30
  config = (0, withIosSplashScreen_1.withIosSplashScreen)(config, ios);
22
31
  return config;
23
32
  };
@@ -8,27 +8,41 @@ const pkg = require('expo-splash-screen/package.json');
8
8
 
9
9
  type PluginConfig = {
10
10
  backgroundColor: string;
11
- logoWidth: number;
12
- image?: string | null;
13
- android: AndroidSplashConfig;
14
- ios: IOSSplashConfig;
11
+ imageWidth?: number;
12
+ enableFullScreenImage_legacy?: boolean;
13
+ image?: string;
14
+ dark?: {
15
+ image?: string;
16
+ backgroundColor?: string;
17
+ };
18
+ android?: AndroidSplashConfig;
19
+ ios?: IOSSplashConfig;
15
20
  };
16
21
 
17
22
  const withSplashScreen: ConfigPlugin<PluginConfig> = (config, props) => {
18
23
  const android: AndroidSplashConfig = {
19
- ...config.splash,
20
- ...config.android?.splash,
21
24
  ...props,
22
25
  ...props?.android,
26
+ resizeMode: 'contain',
27
+ dark: {
28
+ ...props?.android?.dark,
29
+ ...props?.dark,
30
+ resizeMode: 'contain',
31
+ },
23
32
  };
24
- const ios = {
25
- ...config.splash,
26
- ...config.ios?.splash,
33
+ const ios: IOSSplashConfig = {
27
34
  ...props,
28
35
  ...props?.ios,
36
+ resizeMode: 'contain',
37
+ dark: {
38
+ ...props?.ios?.dark,
39
+ ...props?.dark,
40
+ },
29
41
  };
30
42
 
31
- config = withAndroidSplashScreen(config, android);
43
+ // Need to pass null here if we don't receive any props. This means that the plugin has not been used.
44
+ // This only happens on Android. On iOS, if you don't use the plugin, this function won't be called.
45
+ config = withAndroidSplashScreen(config, props ? android : null);
32
46
  config = withIosSplashScreen(config, ios);
33
47
  return config;
34
48
  };