@capacitor/splash-screen 8.0.1 → 8.0.2-dev-2524-20260508T154844.0

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/README.md CHANGED
@@ -98,7 +98,7 @@ These config values are available:
98
98
  | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ----- |
99
99
  | **`launchShowDuration`** | <code>number</code> | How long to show the launch splash screen when autoHide is enabled (in ms) | <code>500</code> | 1.0.0 |
100
100
  | **`launchAutoHide`** | <code>boolean</code> | Whether to auto hide the splash after launchShowDuration. | <code>true</code> | 1.0.0 |
101
- | **`launchFadeOutDuration`** | <code>number</code> | Duration for the fade out animation of the launch splash screen (in ms) Only available for Android, when using the Android 12 Splash Screen API. | <code>200</code> | 4.2.0 |
101
+ | **`launchFadeOutDuration`** | <code>number</code> | Duration for the fade out animation of the launch splash screen (in ms) On Android, only available when using the Android 12 Splash Screen API. | <code>0</code> | 4.2.0 |
102
102
  | **`backgroundColor`** | <code>string</code> | Color of the background of the Splash Screen in hex format, #RRGGBB or #RRGGBBAA. Doesn't work if `useDialog` is true or on launch when using the Android 12 API. | | 1.0.0 |
103
103
  | **`androidSplashResourceName`** | <code>string</code> | Name of the resource to be used as Splash Screen. Doesn't work on launch when using the Android 12 API. Only available on Android. | <code>splash</code> | 1.0.0 |
104
104
  | **`androidScaleType`** | <code>'CENTER' \| 'CENTER_CROP' \| 'CENTER_INSIDE' \| 'FIT_CENTER' \| 'FIT_END' \| 'FIT_START' \| 'FIT_XY' \| 'MATRIX'</code> | The [ImageView.ScaleType](https://developer.android.com/reference/android/widget/ImageView.ScaleType) used to scale the Splash Screen image. Doesn't work if `useDialog` is true or on launch when using the Android 12 API. Only available on Android. | <code>FIT_XY</code> | 1.0.0 |
@@ -11,7 +11,7 @@ public class SplashScreenConfig {
11
11
  private Integer launchShowDuration = 500;
12
12
  private boolean launchAutoHide = true;
13
13
  private Integer launchFadeInDuration = 0;
14
- private Integer launchFadeOutDuration = 200;
14
+ private Integer launchFadeOutDuration = 0;
15
15
  private String resourceName = "splash";
16
16
  private boolean immersive = false;
17
17
  private boolean fullScreen = false;
package/dist/docs.json CHANGED
@@ -205,7 +205,7 @@
205
205
  "name": "since"
206
206
  },
207
207
  {
208
- "text": "200",
208
+ "text": "0",
209
209
  "name": "default"
210
210
  },
211
211
  {
@@ -213,7 +213,7 @@
213
213
  "name": "example"
214
214
  }
215
215
  ],
216
- "docs": "Duration for the fade out animation of the launch splash screen (in ms)\n\nOnly available for Android, when using the Android 12 Splash Screen API.",
216
+ "docs": "Duration for the fade out animation of the launch splash screen (in ms)\n\nOn Android, only available when using the Android 12 Splash Screen API.",
217
217
  "complexTypes": [],
218
218
  "type": "number | undefined"
219
219
  },
@@ -23,10 +23,10 @@ declare module '@capacitor/cli' {
23
23
  /**
24
24
  * Duration for the fade out animation of the launch splash screen (in ms)
25
25
  *
26
- * Only available for Android, when using the Android 12 Splash Screen API.
26
+ * On Android, only available when using the Android 12 Splash Screen API.
27
27
  *
28
28
  * @since 4.2.0
29
- * @default 200
29
+ * @default 0
30
30
  * @example 3000
31
31
  */
32
32
  launchFadeOutDuration?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA,wCAAwC","sourcesContent":["/// <reference types=\"@capacitor/cli\" />\n\ndeclare module '@capacitor/cli' {\n export interface PluginsConfig {\n /**\n * These config values are available:\n */\n SplashScreen?: {\n /**\n * How long to show the launch splash screen when autoHide is enabled (in ms)\n *\n * @since 1.0.0\n * @default 500\n * @example 3000\n */\n launchShowDuration?: number;\n\n /**\n * Whether to auto hide the splash after launchShowDuration.\n *\n * @since 1.0.0\n * @default true\n * @example true\n */\n launchAutoHide?: boolean;\n\n /**\n * Duration for the fade out animation of the launch splash screen (in ms)\n *\n * Only available for Android, when using the Android 12 Splash Screen API.\n *\n * @since 4.2.0\n * @default 200\n * @example 3000\n */\n launchFadeOutDuration?: number;\n\n /**\n * Color of the background of the Splash Screen in hex format, #RRGGBB or #RRGGBBAA.\n * Doesn't work if `useDialog` is true or on launch when using the Android 12 API.\n *\n * @since 1.0.0\n * @example \"#ffffffff\"\n */\n backgroundColor?: string;\n\n /**\n * Name of the resource to be used as Splash Screen.\n *\n * Doesn't work on launch when using the Android 12 API.\n *\n * Only available on Android.\n *\n * @since 1.0.0\n * @default splash\n * @example \"splash\"\n */\n androidSplashResourceName?: string;\n\n /**\n * The [ImageView.ScaleType](https://developer.android.com/reference/android/widget/ImageView.ScaleType) used to scale\n * the Splash Screen image.\n * Doesn't work if `useDialog` is true or on launch when using the Android 12 API.\n *\n * Only available on Android.\n *\n * @since 1.0.0\n * @default FIT_XY\n * @example \"CENTER_CROP\"\n */\n androidScaleType?:\n | 'CENTER'\n | 'CENTER_CROP'\n | 'CENTER_INSIDE'\n | 'FIT_CENTER'\n | 'FIT_END'\n | 'FIT_START'\n | 'FIT_XY'\n | 'MATRIX';\n\n /**\n * Show a loading spinner on the Splash Screen.\n * Doesn't work if `useDialog` is true or on launch when using the Android 12 API.\n *\n * @since 1.0.0\n * @example true\n */\n showSpinner?: boolean;\n\n /**\n * Style of the Android spinner.\n * Doesn't work if `useDialog` is true or on launch when using the Android 12 API.\n *\n * @since 1.0.0\n * @default large\n * @example \"large\"\n */\n androidSpinnerStyle?: 'horizontal' | 'small' | 'large' | 'inverse' | 'smallInverse' | 'largeInverse';\n\n /**\n * Style of the iOS spinner.\n * Doesn't work if `useDialog` is true.\n *\n * Only available on iOS.\n *\n * @since 1.0.0\n * @default large\n * @example \"small\"\n */\n iosSpinnerStyle?: 'large' | 'small';\n\n /**\n * Color of the spinner in hex format, #RRGGBB or #RRGGBBAA.\n * Doesn't work if `useDialog` is true or on launch when using the Android 12 API.\n *\n * @since 1.0.0\n * @example \"#999999\"\n */\n spinnerColor?: string;\n\n /**\n * Hide the status bar on the Splash Screen.\n *\n * Doesn't work on launch when using the Android 12 API.\n *\n * Only available on Android.\n *\n * @since 1.0.0\n * @example true\n */\n splashFullScreen?: boolean;\n\n /**\n * Hide the status bar and the software navigation buttons on the Splash Screen.\n *\n * Doesn't work on launch when using the Android 12 API.\n *\n * Only available on Android.\n *\n * @since 1.0.0\n * @example true\n */\n splashImmersive?: boolean;\n\n /**\n * If `useDialog` is set to true, configure the Dialog layout.\n * If `useDialog` is not set or false, use a layout instead of the ImageView.\n *\n * Doesn't work on launch when using the Android 12 API.\n *\n * Only available on Android.\n *\n * @since 1.1.0\n * @example \"launch_screen\"\n */\n layoutName?: string;\n\n /**\n * Use a Dialog instead of an ImageView.\n * If `layoutName` is not configured, it will use\n * a layout that uses the splash image as background.\n *\n * Doesn't work on launch when using the Android 12 API.\n *\n * Only available on Android.\n *\n * @since 1.1.0\n * @example true\n */\n useDialog?: boolean;\n };\n }\n}\n\nexport interface ShowOptions {\n /**\n * Whether to auto hide the splash after showDuration\n *\n * @since 1.0.0\n */\n autoHide?: boolean;\n /**\n * How long (in ms) to fade in.\n *\n * @since 1.0.0\n * @default 200\n */\n fadeInDuration?: number;\n /**\n * How long (in ms) to fade out.\n *\n * @since 1.0.0\n * @default 200\n */\n fadeOutDuration?: number;\n /**\n * How long to show the splash screen when autoHide is enabled (in ms)\n *\n * @since 1.0.0\n * @default 3000\n */\n showDuration?: number;\n}\n\nexport interface HideOptions {\n /**\n * How long (in ms) to fade out.\n *\n * On Android, if using the Android 12 Splash Screen API, it's not being used.\n * Use launchFadeOutDuration configuration option instead.\n *\n * @since 1.0.0\n * @default 200\n */\n fadeOutDuration?: number;\n}\n\nexport interface SplashScreenPlugin {\n /**\n * Show the splash screen\n *\n * @since 1.0.0\n */\n show(options?: ShowOptions): Promise<void>;\n /**\n * Hide the splash screen\n *\n * @since 1.0.0\n */\n hide(options?: HideOptions): Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA,wCAAwC","sourcesContent":["/// <reference types=\"@capacitor/cli\" />\n\ndeclare module '@capacitor/cli' {\n export interface PluginsConfig {\n /**\n * These config values are available:\n */\n SplashScreen?: {\n /**\n * How long to show the launch splash screen when autoHide is enabled (in ms)\n *\n * @since 1.0.0\n * @default 500\n * @example 3000\n */\n launchShowDuration?: number;\n\n /**\n * Whether to auto hide the splash after launchShowDuration.\n *\n * @since 1.0.0\n * @default true\n * @example true\n */\n launchAutoHide?: boolean;\n\n /**\n * Duration for the fade out animation of the launch splash screen (in ms)\n *\n * On Android, only available when using the Android 12 Splash Screen API.\n *\n * @since 4.2.0\n * @default 0\n * @example 3000\n */\n launchFadeOutDuration?: number;\n\n /**\n * Color of the background of the Splash Screen in hex format, #RRGGBB or #RRGGBBAA.\n * Doesn't work if `useDialog` is true or on launch when using the Android 12 API.\n *\n * @since 1.0.0\n * @example \"#ffffffff\"\n */\n backgroundColor?: string;\n\n /**\n * Name of the resource to be used as Splash Screen.\n *\n * Doesn't work on launch when using the Android 12 API.\n *\n * Only available on Android.\n *\n * @since 1.0.0\n * @default splash\n * @example \"splash\"\n */\n androidSplashResourceName?: string;\n\n /**\n * The [ImageView.ScaleType](https://developer.android.com/reference/android/widget/ImageView.ScaleType) used to scale\n * the Splash Screen image.\n * Doesn't work if `useDialog` is true or on launch when using the Android 12 API.\n *\n * Only available on Android.\n *\n * @since 1.0.0\n * @default FIT_XY\n * @example \"CENTER_CROP\"\n */\n androidScaleType?:\n | 'CENTER'\n | 'CENTER_CROP'\n | 'CENTER_INSIDE'\n | 'FIT_CENTER'\n | 'FIT_END'\n | 'FIT_START'\n | 'FIT_XY'\n | 'MATRIX';\n\n /**\n * Show a loading spinner on the Splash Screen.\n * Doesn't work if `useDialog` is true or on launch when using the Android 12 API.\n *\n * @since 1.0.0\n * @example true\n */\n showSpinner?: boolean;\n\n /**\n * Style of the Android spinner.\n * Doesn't work if `useDialog` is true or on launch when using the Android 12 API.\n *\n * @since 1.0.0\n * @default large\n * @example \"large\"\n */\n androidSpinnerStyle?: 'horizontal' | 'small' | 'large' | 'inverse' | 'smallInverse' | 'largeInverse';\n\n /**\n * Style of the iOS spinner.\n * Doesn't work if `useDialog` is true.\n *\n * Only available on iOS.\n *\n * @since 1.0.0\n * @default large\n * @example \"small\"\n */\n iosSpinnerStyle?: 'large' | 'small';\n\n /**\n * Color of the spinner in hex format, #RRGGBB or #RRGGBBAA.\n * Doesn't work if `useDialog` is true or on launch when using the Android 12 API.\n *\n * @since 1.0.0\n * @example \"#999999\"\n */\n spinnerColor?: string;\n\n /**\n * Hide the status bar on the Splash Screen.\n *\n * Doesn't work on launch when using the Android 12 API.\n *\n * Only available on Android.\n *\n * @since 1.0.0\n * @example true\n */\n splashFullScreen?: boolean;\n\n /**\n * Hide the status bar and the software navigation buttons on the Splash Screen.\n *\n * Doesn't work on launch when using the Android 12 API.\n *\n * Only available on Android.\n *\n * @since 1.0.0\n * @example true\n */\n splashImmersive?: boolean;\n\n /**\n * If `useDialog` is set to true, configure the Dialog layout.\n * If `useDialog` is not set or false, use a layout instead of the ImageView.\n *\n * Doesn't work on launch when using the Android 12 API.\n *\n * Only available on Android.\n *\n * @since 1.1.0\n * @example \"launch_screen\"\n */\n layoutName?: string;\n\n /**\n * Use a Dialog instead of an ImageView.\n * If `layoutName` is not configured, it will use\n * a layout that uses the splash image as background.\n *\n * Doesn't work on launch when using the Android 12 API.\n *\n * Only available on Android.\n *\n * @since 1.1.0\n * @example true\n */\n useDialog?: boolean;\n };\n }\n}\n\nexport interface ShowOptions {\n /**\n * Whether to auto hide the splash after showDuration\n *\n * @since 1.0.0\n */\n autoHide?: boolean;\n /**\n * How long (in ms) to fade in.\n *\n * @since 1.0.0\n * @default 200\n */\n fadeInDuration?: number;\n /**\n * How long (in ms) to fade out.\n *\n * @since 1.0.0\n * @default 200\n */\n fadeOutDuration?: number;\n /**\n * How long to show the splash screen when autoHide is enabled (in ms)\n *\n * @since 1.0.0\n * @default 3000\n */\n showDuration?: number;\n}\n\nexport interface HideOptions {\n /**\n * How long (in ms) to fade out.\n *\n * On Android, if using the Android 12 Splash Screen API, it's not being used.\n * Use launchFadeOutDuration configuration option instead.\n *\n * @since 1.0.0\n * @default 200\n */\n fadeOutDuration?: number;\n}\n\nexport interface SplashScreenPlugin {\n /**\n * Show the splash screen\n *\n * @since 1.0.0\n */\n show(options?: ShowOptions): Promise<void>;\n /**\n * Hide the splash screen\n *\n * @since 1.0.0\n */\n hide(options?: HideOptions): Promise<void>;\n}\n"]}
@@ -9,6 +9,7 @@ import Capacitor
9
9
  var config: SplashScreenConfig = SplashScreenConfig()
10
10
  var hideTask: Any?
11
11
  var isVisible: Bool = false
12
+ var isLaunchSplash: Bool = false
12
13
 
13
14
  init(parentView: UIView, config: SplashScreenConfig) {
14
15
  self.parentView = parentView
@@ -16,6 +17,7 @@ import Capacitor
16
17
  }
17
18
 
18
19
  public func showOnLaunch() {
20
+ isLaunchSplash = true
19
21
  buildViews()
20
22
  if self.config.launchShowDuration == 0 {
21
23
  return
@@ -23,6 +25,7 @@ import Capacitor
23
25
  var settings = SplashScreenSettings()
24
26
  settings.showDuration = config.launchShowDuration
25
27
  settings.fadeInDuration = config.launchFadeInDuration
28
+ settings.fadeOutDuration = config.launchFadeOutDuration
26
29
  settings.autoHide = config.launchAutoHide
27
30
  showSplash(settings: settings, completion: {}, isLaunchSplash: true)
28
31
  }
@@ -32,7 +35,9 @@ import Capacitor
32
35
  }
33
36
 
34
37
  public func hide(settings: SplashScreenSettings) {
35
- hideSplash(fadeOutDuration: settings.fadeOutDuration, isLaunchSplash: false)
38
+ let fadeOutDuration = self.isLaunchSplash ? config.launchFadeOutDuration : settings.fadeOutDuration
39
+ self.isLaunchSplash = false
40
+ hideSplash(fadeOutDuration: fadeOutDuration, isLaunchSplash: false)
36
41
  }
37
42
 
38
43
  private func showSplash(settings: SplashScreenSettings, completion: @escaping () -> Void, isLaunchSplash: Bool) {
@@ -8,4 +8,5 @@ public struct SplashScreenConfig {
8
8
  var launchShowDuration = 500
9
9
  var launchAutoHide = true
10
10
  let launchFadeInDuration = 0
11
+ var launchFadeOutDuration = 0
11
12
  }
@@ -82,6 +82,7 @@ public class SplashScreenPlugin: CAPPlugin, CAPBridgedPlugin {
82
82
 
83
83
  config.launchShowDuration = getConfig().getInt("launchShowDuration", config.launchShowDuration)
84
84
  config.launchAutoHide = getConfig().getBoolean("launchAutoHide", config.launchAutoHide)
85
+ config.launchFadeOutDuration = getConfig().getInt("launchFadeOutDuration", config.launchFadeOutDuration)
85
86
  return config
86
87
  }
87
88
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/splash-screen",
3
- "version": "8.0.1",
3
+ "version": "8.0.2-dev-2524-20260508T154844.0",
4
4
  "description": "The Splash Screen API provides methods for showing or hiding a Splash image.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -81,6 +81,5 @@
81
81
  },
82
82
  "publishConfig": {
83
83
  "access": "public"
84
- },
85
- "gitHead": "bf4fe8c9ace79237c048c9b5ee0ab7455042bc86"
84
+ }
86
85
  }