expo-splash-screen 0.29.11 → 0.29.13
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 +12 -0
- package/android/build.gradle +2 -2
- package/build/index.native.d.ts.map +1 -1
- package/build/index.native.js +5 -0
- package/build/index.native.js.map +1 -1
- package/package.json +3 -3
- package/plugin/build/withSplashScreen.d.ts +1 -0
- package/plugin/build/withSplashScreen.js +3 -3
- package/plugin/src/withSplashScreen.ts +4 -3
- package/src/index.native.ts +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,18 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 0.29.13 — 2024-11-22
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Correctly handle `resizeMode` in config plugin. ([#33143](https://github.com/expo/expo/pull/33143) by [@alanjhughes](https://github.com/alanjhughes))
|
|
18
|
+
|
|
19
|
+
## 0.29.12 — 2024-11-20
|
|
20
|
+
|
|
21
|
+
### 🐛 Bug fixes
|
|
22
|
+
|
|
23
|
+
- Prevent `setOptions` from being called in Expo Go. ([#33104](https://github.com/expo/expo/pull/33104) by [@alanjhughes](https://github.com/alanjhughes))
|
|
24
|
+
|
|
13
25
|
## 0.29.11 — 2024-11-15
|
|
14
26
|
|
|
15
27
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
2
|
|
|
3
3
|
group = 'host.exp.exponent'
|
|
4
|
-
version = '0.29.
|
|
4
|
+
version = '0.29.13'
|
|
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.
|
|
17
|
+
versionName '0.29.13'
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../src/index.native.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../src/index.native.ts"],"names":[],"mappings":"AAGA,OAAO,EAA4B,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAIrF,wBAAgB,UAAU,CAAC,OAAO,EAAE,mBAAmB,QAatD;AAED,wBAAgB,IAAI,SAMnB;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAE/C;AAED,wBAAsB,oBAAoB,iCAMzC"}
|
package/build/index.native.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
import { isRunningInExpoGo } from 'expo';
|
|
1
2
|
import { requireOptionalNativeModule } from 'expo-modules-core';
|
|
2
3
|
const SplashModule = requireOptionalNativeModule('ExpoSplashScreen');
|
|
3
4
|
export function setOptions(options) {
|
|
4
5
|
if (!SplashModule) {
|
|
5
6
|
return;
|
|
6
7
|
}
|
|
8
|
+
if (isRunningInExpoGo()) {
|
|
9
|
+
console.warn("'Splashscreen.setOptions' cannot be used in Expo Go. To customize the splash screen, you can use development builds.");
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
7
12
|
SplashModule.setOptions(options);
|
|
8
13
|
}
|
|
9
14
|
export function hide() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","sourceRoot":"","sources":["../src/index.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAIhE,MAAM,YAAY,GAAG,2BAA2B,CAA2B,kBAAkB,CAAC,CAAC;AAE/F,MAAM,UAAU,UAAU,CAAC,OAA4B;IACrD,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO;KACR;IAED,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,IAAI;IAClB,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO;KACR;IAED,YAAY,CAAC,IAAI,EAAE,CAAC;AACtB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,IAAI,EAAE,CAAC;AACT,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO;KACR;IAED,OAAO,YAAY,CAAC,oBAAoB,EAAE,CAAC;AAC7C,CAAC","sourcesContent":["import { requireOptionalNativeModule } from 'expo-modules-core';\n\nimport { SplashScreenNativeModule, SplashScreenOptions } from './SplashScreen.types';\n\nconst SplashModule = requireOptionalNativeModule<SplashScreenNativeModule>('ExpoSplashScreen');\n\nexport function setOptions(options: SplashScreenOptions) {\n if (!SplashModule) {\n return;\n }\n\n SplashModule.setOptions(options);\n}\n\nexport function hide() {\n if (!SplashModule) {\n return;\n }\n\n SplashModule.hide();\n}\n\nexport async function hideAsync(): Promise<void> {\n hide();\n}\n\nexport async function preventAutoHideAsync() {\n if (!SplashModule) {\n return;\n }\n\n return SplashModule.preventAutoHideAsync();\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.native.js","sourceRoot":"","sources":["../src/index.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAIhE,MAAM,YAAY,GAAG,2BAA2B,CAA2B,kBAAkB,CAAC,CAAC;AAE/F,MAAM,UAAU,UAAU,CAAC,OAA4B;IACrD,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO;KACR;IAED,IAAI,iBAAiB,EAAE,EAAE;QACvB,OAAO,CAAC,IAAI,CACV,sHAAsH,CACvH,CAAC;QACF,OAAO;KACR;IAED,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,IAAI;IAClB,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO;KACR;IAED,YAAY,CAAC,IAAI,EAAE,CAAC;AACtB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,IAAI,EAAE,CAAC;AACT,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO;KACR;IAED,OAAO,YAAY,CAAC,oBAAoB,EAAE,CAAC;AAC7C,CAAC","sourcesContent":["import { isRunningInExpoGo } from 'expo';\nimport { requireOptionalNativeModule } from 'expo-modules-core';\n\nimport { SplashScreenNativeModule, SplashScreenOptions } from './SplashScreen.types';\n\nconst SplashModule = requireOptionalNativeModule<SplashScreenNativeModule>('ExpoSplashScreen');\n\nexport function setOptions(options: SplashScreenOptions) {\n if (!SplashModule) {\n return;\n }\n\n if (isRunningInExpoGo()) {\n console.warn(\n \"'Splashscreen.setOptions' cannot be used in Expo Go. To customize the splash screen, you can use development builds.\"\n );\n return;\n }\n\n SplashModule.setOptions(options);\n}\n\nexport function hide() {\n if (!SplashModule) {\n return;\n }\n\n SplashModule.hide();\n}\n\nexport async function hideAsync(): Promise<void> {\n hide();\n}\n\nexport async function preventAutoHideAsync() {\n if (!SplashModule) {\n return;\n }\n\n return SplashModule.preventAutoHideAsync();\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-splash-screen",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.13",
|
|
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.
|
|
37
|
+
"@expo/prebuild-config": "^8.0.17"
|
|
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": "
|
|
45
|
+
"gitHead": "6cbc7c671f769d36e4294f25a9445281912e45fd"
|
|
46
46
|
}
|
|
@@ -5,20 +5,20 @@ const withIosSplashScreen_1 = require("@expo/prebuild-config/build/plugins/unver
|
|
|
5
5
|
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
|
+
const resizeMode = props?.resizeMode || 'contain';
|
|
8
9
|
const android = {
|
|
9
10
|
...props,
|
|
10
11
|
...props?.android,
|
|
11
|
-
resizeMode
|
|
12
|
+
resizeMode,
|
|
12
13
|
dark: {
|
|
13
14
|
...props?.android?.dark,
|
|
14
15
|
...props?.dark,
|
|
15
|
-
resizeMode: 'contain',
|
|
16
16
|
},
|
|
17
17
|
};
|
|
18
18
|
const ios = {
|
|
19
19
|
...props,
|
|
20
20
|
...props?.ios,
|
|
21
|
-
resizeMode: 'contain',
|
|
21
|
+
resizeMode: resizeMode === 'native' ? 'contain' : resizeMode,
|
|
22
22
|
dark: {
|
|
23
23
|
...props?.ios?.dark,
|
|
24
24
|
...props?.dark,
|
|
@@ -11,6 +11,7 @@ type PluginConfig = {
|
|
|
11
11
|
imageWidth?: number;
|
|
12
12
|
enableFullScreenImage_legacy?: boolean;
|
|
13
13
|
image?: string;
|
|
14
|
+
resizeMode?: 'contain' | 'cover' | 'native';
|
|
14
15
|
dark?: {
|
|
15
16
|
image?: string;
|
|
16
17
|
backgroundColor?: string;
|
|
@@ -20,20 +21,20 @@ type PluginConfig = {
|
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
const withSplashScreen: ConfigPlugin<PluginConfig> = (config, props) => {
|
|
24
|
+
const resizeMode = props?.resizeMode || 'contain';
|
|
23
25
|
const android: AndroidSplashConfig = {
|
|
24
26
|
...props,
|
|
25
27
|
...props?.android,
|
|
26
|
-
resizeMode
|
|
28
|
+
resizeMode,
|
|
27
29
|
dark: {
|
|
28
30
|
...props?.android?.dark,
|
|
29
31
|
...props?.dark,
|
|
30
|
-
resizeMode: 'contain',
|
|
31
32
|
},
|
|
32
33
|
};
|
|
33
34
|
const ios: IOSSplashConfig = {
|
|
34
35
|
...props,
|
|
35
36
|
...props?.ios,
|
|
36
|
-
resizeMode: 'contain',
|
|
37
|
+
resizeMode: resizeMode === 'native' ? 'contain' : resizeMode,
|
|
37
38
|
dark: {
|
|
38
39
|
...props?.ios?.dark,
|
|
39
40
|
...props?.dark,
|
package/src/index.native.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isRunningInExpoGo } from 'expo';
|
|
1
2
|
import { requireOptionalNativeModule } from 'expo-modules-core';
|
|
2
3
|
|
|
3
4
|
import { SplashScreenNativeModule, SplashScreenOptions } from './SplashScreen.types';
|
|
@@ -9,6 +10,13 @@ export function setOptions(options: SplashScreenOptions) {
|
|
|
9
10
|
return;
|
|
10
11
|
}
|
|
11
12
|
|
|
13
|
+
if (isRunningInExpoGo()) {
|
|
14
|
+
console.warn(
|
|
15
|
+
"'Splashscreen.setOptions' cannot be used in Expo Go. To customize the splash screen, you can use development builds."
|
|
16
|
+
);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
|
|
12
20
|
SplashModule.setOptions(options);
|
|
13
21
|
}
|
|
14
22
|
|