kernelsu 2.1.1 → 3.0.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
@@ -101,6 +101,20 @@ import { fullScreen } from 'kernelsu';
101
101
  fullScreen(true);
102
102
  ```
103
103
 
104
+ ### enableInsets
105
+
106
+ Request the WebView to set padding to 0 or system bar insets
107
+
108
+ - tips: this is disabled by default but if you request resource from `internal/insets.css`, this will be enabled automatically.
109
+ - To get insets value and enable this automatically, you can
110
+ - add `@import "https://mui.kernelsu.org/internal/insets.css";` in css OR
111
+ - add `<link rel="stylesheet" type="text/css" href="/internal/insets.css" />` in html.
112
+
113
+ ```javascript
114
+ import { enableInsets } from 'kernelsu';
115
+ enableInsets(true);
116
+ ```
117
+
104
118
  ### toast
105
119
 
106
120
  Show a toast message.
package/index.d.ts CHANGED
@@ -35,6 +35,8 @@ declare function spawn(command: string, args: string[], options: SpawnOptions):
35
35
 
36
36
  declare function fullScreen(isFullScreen: boolean);
37
37
 
38
+ declare function enableInsets(enable: boolean)
39
+
38
40
  declare function toast(message: string);
39
41
 
40
42
  declare function moduleInfo(): string;
@@ -56,6 +58,7 @@ export {
56
58
  exec,
57
59
  spawn,
58
60
  fullScreen,
61
+ enableInsets,
59
62
  toast,
60
63
  moduleInfo,
61
64
  listPackages,
package/index.js CHANGED
@@ -110,6 +110,10 @@ export function fullScreen(isFullScreen) {
110
110
  ksu.fullScreen(isFullScreen);
111
111
  }
112
112
 
113
+ export function enableInsets(enable) {
114
+ ksu.enableInsets(enable);
115
+ }
116
+
113
117
  export function toast(message) {
114
118
  ksu.toast(message);
115
119
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kernelsu",
3
- "version": "2.1.1",
3
+ "version": "3.0.0",
4
4
  "description": "Library for KernelSU's module WebUI",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",