@capgo/capacitor-home-indicator 8.0.45 → 8.1.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
@@ -1,11 +1,28 @@
1
1
  # @capgo/capacitor-home-indicator
2
- <a href="https://capgo.app/"><img src="https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-home-indicator" alt="Capgo - Instant updates for Capacitor" /></a>
2
+
3
+ Hide or show the home indicator bar from your Capacitor app for immersive screens like video, games and kiosks.
4
+
5
+ <a href="https://capgo.app/?ref=plugin_home_indicator"><img src="https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-home-indicator" alt="Capgo - Instant updates for Capacitor" /></a>
3
6
 
4
7
  <div align="center">
5
- <h2><a href="https://capgo.app/?ref=plugin_home_indicator"> ➡️ Get Instant updates for your App with Capgo</a></h2>
6
- <h2><a href="https://capgo.app/consulting/?ref=plugin_home_indicator"> Missing a feature? We’ll build the plugin for you 💪</a></h2>
8
+ <p><b>Capgo</b>: push fixes to your Capacitor users in minutes, build signed iOS and Android apps without a Mac, and roll back in one click.</p>
9
+ <h2><a href="https://capgo.app/register/?ref=plugin_home_indicator">➡️ Get started for free</a></h2>
10
+ <p>14-day unlimited free trial. No credit card required</p>
11
+ <p><a href="https://capgo.app/consulting/?ref=plugin_home_indicator">Missing a feature? We'll build the plugin for you 💪</a></p>
7
12
  </div>
8
13
 
14
+ <p align="center">
15
+ <img src="https://raw.githubusercontent.com/Cap-go/capacitor-home-indicator/main/assets/github-social-preview.png" alt="@capgo/capacitor-home-indicator for Capacitor apps" width="300" />
16
+ </p>
17
+
18
+ ## Key features
19
+
20
+ - **Hide**: `hide()` hides the home indicator.
21
+ - **Show**: `show()` brings it back.
22
+ - **State**: `isHidden()` reports the current state.
23
+ - **iOS**: uses the view controller's auto-hidden home indicator preference.
24
+ - **Platforms**: iOS and Android. Android needs a small `MainActivity` change described below.
25
+
9
26
  hide and show home button indicator in Capacitor app
10
27
 
11
28
  # Android
@@ -23,7 +40,6 @@ import com.getcapacitor.BridgeActivity;
23
40
 
24
41
  public class MainActivity extends BridgeActivity {
25
42
 
26
-
27
43
  void fixSafeArea() {
28
44
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
29
45
  getWindow().setDecorFitsSystemWindows(false);
@@ -26,19 +26,15 @@ public class HomeIndicatorPlugin extends Plugin {
26
26
  // Use WindowInsetsController listener for Android 11+
27
27
  final WindowInsetsController insetsController = this.getBridge().getActivity().getWindow().getInsetsController();
28
28
  if (insetsController != null) {
29
- this.getBridge()
30
- .getActivity()
31
- .getWindow()
32
- .getDecorView()
33
- .setOnSystemUiVisibilityChangeListener(
34
- new View.OnSystemUiVisibilityChangeListener() {
35
- @Override
36
- public void onSystemUiVisibilityChange(int visibility) {
37
- Log.i("HomeIndicator", "onSystemUiVisibilityChange");
38
- HomeIndicatorPlugin.this.setCssVar();
39
- }
29
+ this.getBridge().getActivity().getWindow().getDecorView().setOnSystemUiVisibilityChangeListener(
30
+ new View.OnSystemUiVisibilityChangeListener() {
31
+ @Override
32
+ public void onSystemUiVisibilityChange(int visibility) {
33
+ Log.i("HomeIndicator", "onSystemUiVisibilityChange");
34
+ HomeIndicatorPlugin.this.setCssVar();
40
35
  }
41
- );
36
+ }
37
+ );
42
38
  }
43
39
  } else {
44
40
  final View decorView = this.getBridge().getActivity().getWindow().getDecorView();
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst HomeIndicator = registerPlugin('HomeIndicator', {\n web: () => import('./web').then((m) => new m.HomeIndicatorWeb()),\n});\nexport * from './definitions';\nexport { HomeIndicator };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class HomeIndicatorWeb extends WebPlugin {\n async hide() {\n this.unimplemented('Not implemented on web.');\n console.log('hide');\n }\n async show() {\n this.unimplemented('Not implemented on web.');\n console.log('show');\n }\n async isHidden() {\n this.unimplemented('Not implemented on web.');\n console.log('getStatus');\n return { hidden: true };\n }\n async getPluginVersion() {\n console.warn('Cannot get plugin version in web');\n return { version: 'default' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,aAAa,GAAGA,mBAAc,CAAC,eAAe,EAAE;AACtD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAC;AACpE,CAAC;;ACFM,MAAM,gBAAgB,SAASC,cAAS,CAAC;AAChD,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AACrD,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;AAC3B,IAAI;AACJ,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AACrD,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;AAC3B,IAAI;AACJ,IAAI,MAAM,QAAQ,GAAG;AACrB,QAAQ,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AACrD,QAAQ,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;AAChC,QAAQ,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE;AAC/B,IAAI;AACJ,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,OAAO,CAAC,IAAI,CAAC,kCAAkC,CAAC;AACxD,QAAQ,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE;AACrC,IAAI;AACJ;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst HomeIndicator = registerPlugin('HomeIndicator', {\n web: () => import('./web').then((m) => new m.HomeIndicatorWeb()),\n});\nexport * from './definitions';\nexport { HomeIndicator };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class HomeIndicatorWeb extends WebPlugin {\n async hide() {\n this.unimplemented('Not implemented on web.');\n console.log('hide');\n }\n async show() {\n this.unimplemented('Not implemented on web.');\n console.log('show');\n }\n async isHidden() {\n this.unimplemented('Not implemented on web.');\n console.log('getStatus');\n return { hidden: true };\n }\n async getPluginVersion() {\n console.warn('Cannot get plugin version in web');\n return { version: 'default' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,aAAa,GAAGA,mBAAc,CAAC,eAAe,EAAE;AACtD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAC;AACpE,CAAC;;ACFM,MAAM,gBAAgB,SAASC,cAAS,CAAC;AAChD,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AACrD,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;AAC3B,IAAI;AACJ,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AACrD,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;AAC3B,IAAI;AACJ,IAAI,MAAM,QAAQ,GAAG;AACrB,QAAQ,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AACrD,QAAQ,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;AAChC,QAAQ,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE;AAC/B,IAAI;AACJ,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,OAAO,CAAC,IAAI,CAAC,kCAAkC,CAAC;AACxD,QAAQ,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE;AACrC,IAAI;AACJ;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst HomeIndicator = registerPlugin('HomeIndicator', {\n web: () => import('./web').then((m) => new m.HomeIndicatorWeb()),\n});\nexport * from './definitions';\nexport { HomeIndicator };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class HomeIndicatorWeb extends WebPlugin {\n async hide() {\n this.unimplemented('Not implemented on web.');\n console.log('hide');\n }\n async show() {\n this.unimplemented('Not implemented on web.');\n console.log('show');\n }\n async isHidden() {\n this.unimplemented('Not implemented on web.');\n console.log('getStatus');\n return { hidden: true };\n }\n async getPluginVersion() {\n console.warn('Cannot get plugin version in web');\n return { version: 'default' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,aAAa,GAAGA,mBAAc,CAAC,eAAe,EAAE;IACtD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACpE,CAAC;;ICFM,MAAM,gBAAgB,SAASC,cAAS,CAAC;IAChD,IAAI,MAAM,IAAI,GAAG;IACjB,QAAQ,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IACrD,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;IAC3B,IAAI;IACJ,IAAI,MAAM,IAAI,GAAG;IACjB,QAAQ,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IACrD,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;IAC3B,IAAI;IACJ,IAAI,MAAM,QAAQ,GAAG;IACrB,QAAQ,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IACrD,QAAQ,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;IAChC,QAAQ,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE;IAC/B,IAAI;IACJ,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,OAAO,CAAC,IAAI,CAAC,kCAAkC,CAAC;IACxD,QAAQ,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE;IACrC,IAAI;IACJ;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst HomeIndicator = registerPlugin('HomeIndicator', {\n web: () => import('./web').then((m) => new m.HomeIndicatorWeb()),\n});\nexport * from './definitions';\nexport { HomeIndicator };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class HomeIndicatorWeb extends WebPlugin {\n async hide() {\n this.unimplemented('Not implemented on web.');\n console.log('hide');\n }\n async show() {\n this.unimplemented('Not implemented on web.');\n console.log('show');\n }\n async isHidden() {\n this.unimplemented('Not implemented on web.');\n console.log('getStatus');\n return { hidden: true };\n }\n async getPluginVersion() {\n console.warn('Cannot get plugin version in web');\n return { version: 'default' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,aAAa,GAAGA,mBAAc,CAAC,eAAe,EAAE;IACtD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACpE,CAAC;;ICFM,MAAM,gBAAgB,SAASC,cAAS,CAAC;IAChD,IAAI,MAAM,IAAI,GAAG;IACjB,QAAQ,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IACrD,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;IAC3B,IAAI;IACJ,IAAI,MAAM,IAAI,GAAG;IACjB,QAAQ,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IACrD,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;IAC3B,IAAI;IACJ,IAAI,MAAM,QAAQ,GAAG;IACrB,QAAQ,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IACrD,QAAQ,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;IAChC,QAAQ,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE;IAC/B,IAAI;IACJ,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,OAAO,CAAC,IAAI,CAAC,kCAAkC,CAAC;IACxD,QAAQ,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE;IACrC,IAAI;IACJ;;;;;;;;;;;"}
@@ -35,7 +35,7 @@ public class CapgoHomeIndicatorPlugin: CAPPlugin, CAPBridgedPlugin {
35
35
  CAPPluginMethod(name: "getPluginVersion", returnType: CAPPluginReturnPromise)
36
36
  ]
37
37
 
38
- private let pluginVersion: String = "8.0.45"
38
+ private let pluginVersion: String = "8.1.0"
39
39
 
40
40
  @objc func getPluginVersion(_ call: CAPPluginCall) {
41
41
  call.resolve(["version": self.pluginVersion])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-home-indicator",
3
- "version": "8.0.45",
3
+ "version": "8.1.0",
4
4
  "description": "hide and show home button indicator in Capacitor app",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -61,7 +61,7 @@
61
61
  "@ionic/eslint-config": "^0.5.0",
62
62
  "@ionic/prettier-config": "^4.0.0",
63
63
  "@ionic/swiftlint-config": "^2.0.0",
64
- "@types/node": "^24.10.1",
64
+ "@types/node": "^26.0.0",
65
65
  "@typescript-eslint/eslint-plugin": "^8.70.0",
66
66
  "@typescript-eslint/parser": "^8.70.0",
67
67
  "eslint": "^10.0.0",