expo-splash-screen 0.29.4 → 0.29.5
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 +6 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/splashscreen/SplashScreenManager.kt +6 -0
- package/build/SplashScreen.types.d.ts +1 -1
- package/build/SplashScreen.types.js.map +1 -1
- package/build/index.d.ts +11 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +9 -0
- package/build/index.js.map +1 -1
- package/package.json +2 -2
- package/src/SplashScreen.types.ts +1 -1
- package/src/index.ts +12 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 0.29.5 — 2024-11-10
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- [Android] Added guard to prevent null pointer exception when the splashScreen property is referenced without an activity (headless JS) ([#32707](https://github.com/expo/expo/pull/32707) by [@chrfalch](https://github.com/chrfalch))
|
|
18
|
+
|
|
13
19
|
## 0.29.4 — 2024-11-07
|
|
14
20
|
|
|
15
21
|
_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.5'
|
|
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.5'
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -23,6 +23,12 @@ object SplashScreenManager {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
private fun configureSplashScreen(options: SplashScreenOptions = SplashScreenOptions()) {
|
|
26
|
+
// If loaded in a headless JS context we might not have initialized the splash screen
|
|
27
|
+
// lateinit variable, so let's check to be nice citizens
|
|
28
|
+
if (!::splashScreen.isInitialized) {
|
|
29
|
+
return
|
|
30
|
+
}
|
|
31
|
+
|
|
26
32
|
val duration = options.duration
|
|
27
33
|
|
|
28
34
|
splashScreen.setOnExitAnimationListener { splashScreenViewProvider ->
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplashScreen.types.js","sourceRoot":"","sources":["../src/SplashScreen.types.ts"],"names":[],"mappings":"","sourcesContent":["import { NativeModule } from 'expo-modules-core/types';\n\nexport type SplashScreenOptions = {\n /**\n * The duration of the fade out animation in milliseconds.\n * @default 400\n */\n duration?: number;\n /**\n * Whether to hide the splash screen with a fade out animation.\n * @ios\n * @default false\n */\n fade?: boolean;\n};\n\nexport interface SplashScreenNativeModule extends NativeModule {\n setOptions: (options: SplashScreenOptions) => void;\n preventAutoHideAsync: () => Promise<boolean>;\n hide: () => void;\n hideAsync: () => Promise<void>;\n // @private\n _internal_maybeHideAsync: () => Promise<void>;\n // @private\n _internal_preventAutoHideAsync: () => Promise<boolean>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SplashScreen.types.js","sourceRoot":"","sources":["../src/SplashScreen.types.ts"],"names":[],"mappings":"","sourcesContent":["import { NativeModule } from 'expo-modules-core/types';\n\nexport type SplashScreenOptions = {\n /**\n * The duration of the fade out animation in milliseconds.\n * @default 400\n */\n duration?: number;\n /**\n * Whether to hide the splash screen with a fade out animation.\n * @platform ios\n * @default false\n */\n fade?: boolean;\n};\n\nexport interface SplashScreenNativeModule extends NativeModule {\n setOptions: (options: SplashScreenOptions) => void;\n preventAutoHideAsync: () => Promise<boolean>;\n hide: () => void;\n hideAsync: () => Promise<void>;\n // @private\n _internal_maybeHideAsync: () => Promise<void>;\n // @private\n _internal_preventAutoHideAsync: () => Promise<boolean>;\n}\n"]}
|
package/build/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SplashScreenOptions } from './SplashScreen.types';
|
|
1
|
+
import type { SplashScreenOptions } from './SplashScreen.types';
|
|
2
2
|
/**
|
|
3
3
|
* Makes the native splash screen (configured in `app.json`) remain visible until `hideAsync` is called.
|
|
4
4
|
*
|
|
@@ -18,6 +18,11 @@ import { SplashScreenOptions } from './SplashScreen.types';
|
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
20
|
export declare function preventAutoHideAsync(): Promise<boolean>;
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* Configures the splashscreens default animation behavior.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
21
26
|
export declare function setOptions(options: SplashScreenOptions): void;
|
|
22
27
|
/**
|
|
23
28
|
* Hides the native splash screen immediately. Be careful to ensure that your app has content ready
|
|
@@ -25,5 +30,10 @@ export declare function setOptions(options: SplashScreenOptions): void;
|
|
|
25
30
|
* ["Usage"](#usage) section for an example.
|
|
26
31
|
*/
|
|
27
32
|
export declare function hide(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Hides the native splash screen immediately. This method is provided for backwards compatability. See the
|
|
35
|
+
* ["Usage"](#usage) section for an example.
|
|
36
|
+
*/
|
|
28
37
|
export declare function hideAsync(): Promise<void>;
|
|
38
|
+
export { SplashScreenOptions };
|
|
29
39
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,OAAO,CAAC,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAG;AAGjE;;;;GAIG;AACH,wBAAgB,IAAI,IAAI,IAAI,CAAG;AAE/B;;;GAGG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAG;AAEnD,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
package/build/index.js
CHANGED
|
@@ -20,6 +20,11 @@
|
|
|
20
20
|
export async function preventAutoHideAsync() {
|
|
21
21
|
return false;
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* Configures the splashscreens default animation behavior.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
23
28
|
export function setOptions(options) { }
|
|
24
29
|
// @needsAudit
|
|
25
30
|
/**
|
|
@@ -28,5 +33,9 @@ export function setOptions(options) { }
|
|
|
28
33
|
* ["Usage"](#usage) section for an example.
|
|
29
34
|
*/
|
|
30
35
|
export function hide() { }
|
|
36
|
+
/**
|
|
37
|
+
* Hides the native splash screen immediately. This method is provided for backwards compatability. See the
|
|
38
|
+
* ["Usage"](#usage) section for an example.
|
|
39
|
+
*/
|
|
31
40
|
export async function hideAsync() { }
|
|
32
41
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc;AAId;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,OAA4B,IAAS,CAAC;AAEjE,cAAc;AACd;;;;GAIG;AACH,MAAM,UAAU,IAAI,KAAU,CAAC;AAE/B,MAAM,CAAC,KAAK,UAAU,SAAS,KAAmB,CAAC","sourcesContent":["// @needsAudit\n\nimport { SplashScreenOptions } from './SplashScreen.types';\n\n/**\n * Makes the native splash screen (configured in `app.json`) remain visible until `hideAsync` is called.\n *\n * > **Important note**: It is recommended to call this in global scope without awaiting, rather than\n * > inside React components or hooks, because otherwise this might be called too late,\n * > when the splash screen is already hidden.\n *\n * @example\n * ```ts\n * import * as SplashScreen from 'expo-splash-screen';\n *\n * SplashScreen.preventAutoHideAsync();\n *\n * export default function App() {\n * // ...\n * }\n * ```\n */\nexport async function preventAutoHideAsync(): Promise<boolean> {\n return false;\n}\n\nexport function setOptions(options: SplashScreenOptions): void {}\n\n// @needsAudit\n/**\n * Hides the native splash screen immediately. Be careful to ensure that your app has content ready\n * to display when you hide the splash screen, or you may see a blank screen briefly. See the\n * [\"Usage\"](#usage) section for an example.\n */\nexport function hide(): void {}\n\nexport async function hideAsync(): Promise<void> {}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc;AAId;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,OAA4B,IAAS,CAAC;AAEjE,cAAc;AACd;;;;GAIG;AACH,MAAM,UAAU,IAAI,KAAU,CAAC;AAE/B;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,KAAmB,CAAC","sourcesContent":["// @needsAudit\n\nimport type { SplashScreenOptions } from './SplashScreen.types';\n\n/**\n * Makes the native splash screen (configured in `app.json`) remain visible until `hideAsync` is called.\n *\n * > **Important note**: It is recommended to call this in global scope without awaiting, rather than\n * > inside React components or hooks, because otherwise this might be called too late,\n * > when the splash screen is already hidden.\n *\n * @example\n * ```ts\n * import * as SplashScreen from 'expo-splash-screen';\n *\n * SplashScreen.preventAutoHideAsync();\n *\n * export default function App() {\n * // ...\n * }\n * ```\n */\nexport async function preventAutoHideAsync(): Promise<boolean> {\n return false;\n}\n\n/**\n *\n * Configures the splashscreens default animation behavior.\n *\n */\nexport function setOptions(options: SplashScreenOptions): void {}\n\n// @needsAudit\n/**\n * Hides the native splash screen immediately. Be careful to ensure that your app has content ready\n * to display when you hide the splash screen, or you may see a blank screen briefly. See the\n * [\"Usage\"](#usage) section for an example.\n */\nexport function hide(): void {}\n\n/**\n * Hides the native splash screen immediately. This method is provided for backwards compatability. See the\n * [\"Usage\"](#usage) section for an example.\n */\nexport async function hideAsync(): Promise<void> {}\n\nexport { SplashScreenOptions };\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.5",
|
|
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",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"expo": "*"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "1f84b4c952ed9785c41ee65c9877e44f1df27af9"
|
|
46
46
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @needsAudit
|
|
2
2
|
|
|
3
|
-
import { SplashScreenOptions } from './SplashScreen.types';
|
|
3
|
+
import type { SplashScreenOptions } from './SplashScreen.types';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Makes the native splash screen (configured in `app.json`) remain visible until `hideAsync` is called.
|
|
@@ -24,6 +24,11 @@ export async function preventAutoHideAsync(): Promise<boolean> {
|
|
|
24
24
|
return false;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* Configures the splashscreens default animation behavior.
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
27
32
|
export function setOptions(options: SplashScreenOptions): void {}
|
|
28
33
|
|
|
29
34
|
// @needsAudit
|
|
@@ -34,4 +39,10 @@ export function setOptions(options: SplashScreenOptions): void {}
|
|
|
34
39
|
*/
|
|
35
40
|
export function hide(): void {}
|
|
36
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Hides the native splash screen immediately. This method is provided for backwards compatability. See the
|
|
44
|
+
* ["Usage"](#usage) section for an example.
|
|
45
|
+
*/
|
|
37
46
|
export async function hideAsync(): Promise<void> {}
|
|
47
|
+
|
|
48
|
+
export { SplashScreenOptions };
|