kernelsu 3.0.0 → 3.0.2
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 +13 -4
- package/index.d.ts +5 -2
- package/index.js +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -101,9 +101,9 @@ import { fullScreen } from 'kernelsu';
|
|
|
101
101
|
fullScreen(true);
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
###
|
|
104
|
+
### enableEdgeToEdge
|
|
105
105
|
|
|
106
|
-
Request the WebView to set padding to 0 or
|
|
106
|
+
Request the WebView to set padding to 0 or safeDrawing insets
|
|
107
107
|
|
|
108
108
|
- tips: this is disabled by default but if you request resource from `internal/insets.css`, this will be enabled automatically.
|
|
109
109
|
- To get insets value and enable this automatically, you can
|
|
@@ -111,8 +111,8 @@ Request the WebView to set padding to 0 or system bar insets
|
|
|
111
111
|
- add `<link rel="stylesheet" type="text/css" href="/internal/insets.css" />` in html.
|
|
112
112
|
|
|
113
113
|
```javascript
|
|
114
|
-
import {
|
|
115
|
-
|
|
114
|
+
import { enableEdgeToEdge } from 'kernelsu';
|
|
115
|
+
enableEdgeToEdge(true);
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
### toast
|
|
@@ -177,3 +177,12 @@ An object contains:
|
|
|
177
177
|
- `appLabel` `<string>` Display name of the application.
|
|
178
178
|
- `isSystem` `<boolean>` Whether the application is a system app.
|
|
179
179
|
- `uid` `<number>` UID of the application.
|
|
180
|
+
|
|
181
|
+
### exit
|
|
182
|
+
|
|
183
|
+
Exit the current WebUI activity.
|
|
184
|
+
|
|
185
|
+
```javascript
|
|
186
|
+
import { exit } from 'kernelsu';
|
|
187
|
+
exit();
|
|
188
|
+
```
|
package/index.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ declare function spawn(command: string, args: string[], options: SpawnOptions):
|
|
|
35
35
|
|
|
36
36
|
declare function fullScreen(isFullScreen: boolean);
|
|
37
37
|
|
|
38
|
-
declare function
|
|
38
|
+
declare function enableEdgeToEdge(enable: boolean);
|
|
39
39
|
|
|
40
40
|
declare function toast(message: string);
|
|
41
41
|
|
|
@@ -54,13 +54,16 @@ declare function listPackages(type: string): string[];
|
|
|
54
54
|
|
|
55
55
|
declare function getPackagesInfo(packages: string[]): PackagesInfo[];
|
|
56
56
|
|
|
57
|
+
declare function exit();
|
|
58
|
+
|
|
57
59
|
export {
|
|
58
60
|
exec,
|
|
59
61
|
spawn,
|
|
60
62
|
fullScreen,
|
|
61
|
-
|
|
63
|
+
enableEdgeToEdge,
|
|
62
64
|
toast,
|
|
63
65
|
moduleInfo,
|
|
64
66
|
listPackages,
|
|
65
67
|
getPackagesInfo,
|
|
68
|
+
exit,
|
|
66
69
|
}
|
package/index.js
CHANGED
|
@@ -110,8 +110,8 @@ export function fullScreen(isFullScreen) {
|
|
|
110
110
|
ksu.fullScreen(isFullScreen);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
export function
|
|
114
|
-
ksu.
|
|
113
|
+
export function enableEdgeToEdge(enable) {
|
|
114
|
+
ksu.enableEdgeToEdge(enable);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
export function toast(message) {
|
|
@@ -140,3 +140,7 @@ export function getPackagesInfo(packages) {
|
|
|
140
140
|
return [];
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
+
|
|
144
|
+
export function exit() {
|
|
145
|
+
ksu.exit();
|
|
146
|
+
}
|