expo-splash-screen 0.26.1 → 0.26.3
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 +14 -0
- package/android/build.gradle +3 -4
- package/build/index.native.d.ts +2 -2
- package/build/index.native.d.ts.map +1 -1
- package/build/index.native.js +5 -5
- package/build/index.native.js.map +1 -1
- package/expo-module.config.json +1 -2
- package/package.json +3 -3
- package/src/index.native.ts +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,20 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 0.26.3 — 2024-01-18
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 0.26.2 — 2024-01-10
|
|
18
|
+
|
|
19
|
+
### 🐛 Bug fixes
|
|
20
|
+
|
|
21
|
+
- Fixed return value of the `preventAutoHideAsync` function. ([#26348](https://github.com/expo/expo/pull/26348) by [@lukmccall](https://github.com/lukmccall))
|
|
22
|
+
|
|
23
|
+
### 💡 Others
|
|
24
|
+
|
|
25
|
+
- Replace deprecated `com.facebook.react:react-native:+` Android dependency with `com.facebook.react:react-android`. ([#26237](https://github.com/expo/expo/pull/26237) by [@kudo](https://github.com/kudo))
|
|
26
|
+
|
|
13
27
|
## 0.26.1 — 2023-12-19
|
|
14
28
|
|
|
15
29
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
|
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '0.26.
|
|
6
|
+
version = '0.26.3'
|
|
7
7
|
|
|
8
8
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
9
9
|
if (expoModulesCorePlugin.exists()) {
|
|
@@ -94,7 +94,7 @@ android {
|
|
|
94
94
|
namespace "expo.modules.splashscreen"
|
|
95
95
|
defaultConfig {
|
|
96
96
|
versionCode 17
|
|
97
|
-
versionName '0.26.
|
|
97
|
+
versionName '0.26.3'
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
@@ -105,8 +105,7 @@ dependencies {
|
|
|
105
105
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
implementation 'com.facebook.react:react-native:+'
|
|
108
|
+
implementation 'com.facebook.react:react-android'
|
|
110
109
|
implementation 'androidx.appcompat:appcompat:1.2.0'
|
|
111
110
|
implementation "org.jetbrains.kotlin:kotlin-reflect:${getKotlinVersion()}"
|
|
112
111
|
}
|
package/build/index.native.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @private
|
|
8
8
|
*/
|
|
9
|
-
export declare
|
|
9
|
+
export declare function _internal_preventAutoHideAsync(): Promise<boolean>;
|
|
10
10
|
/**
|
|
11
11
|
* Used for Expo libraries to attempt hiding the splash screen after they've completed their work.
|
|
12
12
|
* If the user has explicitly opted into preventing the splash screen from hiding, we should not
|
|
@@ -16,5 +16,5 @@ export declare const _internal_preventAutoHideAsync: () => void;
|
|
|
16
16
|
*/
|
|
17
17
|
export declare const _internal_maybeHideAsync: () => void;
|
|
18
18
|
export declare function hideAsync(): Promise<boolean | void>;
|
|
19
|
-
export declare const preventAutoHideAsync: () =>
|
|
19
|
+
export declare const preventAutoHideAsync: () => Promise<boolean>;
|
|
20
20
|
//# sourceMappingURL=index.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../src/index.native.ts"],"names":[],"mappings":"AAUA;;;;;;;GAOG;AACH,
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../src/index.native.ts"],"names":[],"mappings":"AAUA;;;;;;;GAOG;AACH,wBAAsB,8BAA8B,IAAI,OAAO,CAAC,OAAO,CAAC,CAkBvE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,YAOpC,CAAC;AAEF,wBAAgB,SAAS,4BAYxB;AAED,eAAO,MAAM,oBAAoB,wBAKhC,CAAC"}
|
package/build/index.native.js
CHANGED
|
@@ -10,10 +10,10 @@ let _preventAutoHideAsyncInvoked = false;
|
|
|
10
10
|
*
|
|
11
11
|
* @private
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export async function _internal_preventAutoHideAsync() {
|
|
14
14
|
// Memoize, this should only be called once.
|
|
15
15
|
if (_preventAutoHideAsyncInvoked) {
|
|
16
|
-
return;
|
|
16
|
+
return false;
|
|
17
17
|
}
|
|
18
18
|
_preventAutoHideAsyncInvoked = true;
|
|
19
19
|
// Append error handling to ensure any uncaught exceptions result in the splash screen being hidden.
|
|
@@ -25,8 +25,8 @@ export const _internal_preventAutoHideAsync = () => {
|
|
|
25
25
|
originalHandler(error, isFatal);
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
SplashModule.preventAutoHideAsync();
|
|
29
|
-
}
|
|
28
|
+
return SplashModule.preventAutoHideAsync();
|
|
29
|
+
}
|
|
30
30
|
/**
|
|
31
31
|
* Used for Expo libraries to attempt hiding the splash screen after they've completed their work.
|
|
32
32
|
* If the user has explicitly opted into preventing the splash screen from hiding, we should not
|
|
@@ -58,6 +58,6 @@ export const preventAutoHideAsync = () => {
|
|
|
58
58
|
// Indicate that the user is controlling the auto hide behavior.
|
|
59
59
|
_userControlledAutoHideEnabled = true;
|
|
60
60
|
// Prevent as usual...
|
|
61
|
-
_internal_preventAutoHideAsync();
|
|
61
|
+
return _internal_preventAutoHideAsync();
|
|
62
62
|
};
|
|
63
63
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","sourceRoot":"","sources":["../src/index.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,YAAY,GAAG,mBAAmB,CAAC,kBAAkB,CAG1D,CAAC;AAEF,IAAI,8BAA8B,GAAG,KAAK,CAAC;AAC3C,IAAI,4BAA4B,GAAG,KAAK,CAAC;AAEzC;;;;;;;GAOG;AACH,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"index.native.js","sourceRoot":"","sources":["../src/index.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,YAAY,GAAG,mBAAmB,CAAC,kBAAkB,CAG1D,CAAC;AAEF,IAAI,8BAA8B,GAAG,KAAK,CAAC;AAC3C,IAAI,4BAA4B,GAAG,KAAK,CAAC;AAEzC;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,8BAA8B;IAClD,4CAA4C;IAC5C,IAAI,4BAA4B,EAAE;QAChC,OAAO,KAAK,CAAC;KACd;IACD,4BAA4B,GAAG,IAAI,CAAC;IAEpC,oGAAoG;IACpG,oEAAoE;IACpE,IAAI,UAAU,EAAE,gBAAgB,EAAE;QAChC,MAAM,eAAe,GAAG,UAAU,CAAC,gBAAgB,EAAE,CAAC;QACtD,UAAU,CAAC,gBAAgB,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;YAC7C,SAAS,EAAE,CAAC;YACZ,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,YAAY,CAAC,oBAAoB,EAAE,CAAC;AAC7C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,EAAE;IAC3C,kFAAkF;IAClF,kFAAkF;IAClF,IAAI,8BAA8B,EAAE;QAClC,OAAO;KACR;IACD,SAAS,EAAE,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,UAAU,SAAS;IACvB,OAAO,YAAY,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC,KAAU,EAAE,EAAE;QACnD,oCAAoC;QACpC;QACE,yDAAyD;QACzD,4BAA4B;YAC5B,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,yCAAyC,CAAC,EACjE;YACA,OAAO;SACR;QACD,MAAM,KAAK,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACvC,gEAAgE;IAChE,8BAA8B,GAAG,IAAI,CAAC;IACtC,sBAAsB;IACtB,OAAO,8BAA8B,EAAE,CAAC;AAC1C,CAAC,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\n\nconst SplashModule = requireNativeModule('ExpoSplashScreen') as {\n preventAutoHideAsync: () => Promise<boolean>;\n hideAsync: () => Promise<boolean>;\n};\n\nlet _userControlledAutoHideEnabled = false;\nlet _preventAutoHideAsyncInvoked = false;\n\n/**\n * Expo Router uses this internal method to ensure that we can detect if the user\n * has explicitly opted into preventing the splash screen from hiding. This means\n * they will also explicitly hide it. If they don't, we will hide it for them after\n * the navigation render completes.\n *\n * @private\n */\nexport async function _internal_preventAutoHideAsync(): Promise<boolean> {\n // Memoize, this should only be called once.\n if (_preventAutoHideAsyncInvoked) {\n return false;\n }\n _preventAutoHideAsyncInvoked = true;\n\n // Append error handling to ensure any uncaught exceptions result in the splash screen being hidden.\n // This prevents the splash screen from floating over error screens.\n if (ErrorUtils?.getGlobalHandler) {\n const originalHandler = ErrorUtils.getGlobalHandler();\n ErrorUtils.setGlobalHandler((error, isFatal) => {\n hideAsync();\n originalHandler(error, isFatal);\n });\n }\n\n return SplashModule.preventAutoHideAsync();\n}\n\n/**\n * Used for Expo libraries to attempt hiding the splash screen after they've completed their work.\n * If the user has explicitly opted into preventing the splash screen from hiding, we should not\n * hide it for them. This is often used for animated splash screens.\n *\n * @private\n */\nexport const _internal_maybeHideAsync = () => {\n // If the user has explicitly opted into preventing the splash screen from hiding,\n // we should not hide it for them. This is often used for animated splash screens.\n if (_userControlledAutoHideEnabled) {\n return;\n }\n hideAsync();\n};\n\nexport function hideAsync() {\n return SplashModule.hideAsync().catch((error: any) => {\n // Hide this very unfortunate error.\n if (\n // Only throw the error is something unexpected happened.\n _preventAutoHideAsyncInvoked &&\n error.message.includes('No native splash screen registered for ')\n ) {\n return;\n }\n throw error;\n });\n}\n\nexport const preventAutoHideAsync = () => {\n // Indicate that the user is controlling the auto hide behavior.\n _userControlledAutoHideEnabled = true;\n // Prevent as usual...\n return _internal_preventAutoHideAsync();\n};\n"]}
|
package/expo-module.config.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-splash-screen",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.3",
|
|
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": "6.7.
|
|
37
|
+
"@expo/prebuild-config": "6.7.3"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"expo-module-scripts": "^3.0.0"
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"expo": "*"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "102899632731658eecba006c0d1c79b98ba8f5f7"
|
|
46
46
|
}
|
package/src/index.native.ts
CHANGED
|
@@ -16,10 +16,10 @@ let _preventAutoHideAsyncInvoked = false;
|
|
|
16
16
|
*
|
|
17
17
|
* @private
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
19
|
+
export async function _internal_preventAutoHideAsync(): Promise<boolean> {
|
|
20
20
|
// Memoize, this should only be called once.
|
|
21
21
|
if (_preventAutoHideAsyncInvoked) {
|
|
22
|
-
return;
|
|
22
|
+
return false;
|
|
23
23
|
}
|
|
24
24
|
_preventAutoHideAsyncInvoked = true;
|
|
25
25
|
|
|
@@ -33,8 +33,8 @@ export const _internal_preventAutoHideAsync = () => {
|
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
SplashModule.preventAutoHideAsync();
|
|
37
|
-
}
|
|
36
|
+
return SplashModule.preventAutoHideAsync();
|
|
37
|
+
}
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Used for Expo libraries to attempt hiding the splash screen after they've completed their work.
|
|
@@ -70,5 +70,5 @@ export const preventAutoHideAsync = () => {
|
|
|
70
70
|
// Indicate that the user is controlling the auto hide behavior.
|
|
71
71
|
_userControlledAutoHideEnabled = true;
|
|
72
72
|
// Prevent as usual...
|
|
73
|
-
_internal_preventAutoHideAsync();
|
|
73
|
+
return _internal_preventAutoHideAsync();
|
|
74
74
|
};
|