kernelsu 2.1.1 → 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 +23 -0
- package/index.d.ts +6 -0
- package/index.js +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -101,6 +101,20 @@ import { fullScreen } from 'kernelsu';
|
|
|
101
101
|
fullScreen(true);
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
+
### enableEdgeToEdge
|
|
105
|
+
|
|
106
|
+
Request the WebView to set padding to 0 or safeDrawing 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 { enableEdgeToEdge } from 'kernelsu';
|
|
115
|
+
enableEdgeToEdge(true);
|
|
116
|
+
```
|
|
117
|
+
|
|
104
118
|
### toast
|
|
105
119
|
|
|
106
120
|
Show a toast message.
|
|
@@ -163,3 +177,12 @@ An object contains:
|
|
|
163
177
|
- `appLabel` `<string>` Display name of the application.
|
|
164
178
|
- `isSystem` `<boolean>` Whether the application is a system app.
|
|
165
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,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 enableEdgeToEdge(enable: boolean);
|
|
39
|
+
|
|
38
40
|
declare function toast(message: string);
|
|
39
41
|
|
|
40
42
|
declare function moduleInfo(): string;
|
|
@@ -52,12 +54,16 @@ declare function listPackages(type: string): string[];
|
|
|
52
54
|
|
|
53
55
|
declare function getPackagesInfo(packages: string[]): PackagesInfo[];
|
|
54
56
|
|
|
57
|
+
declare function exit();
|
|
58
|
+
|
|
55
59
|
export {
|
|
56
60
|
exec,
|
|
57
61
|
spawn,
|
|
58
62
|
fullScreen,
|
|
63
|
+
enableEdgeToEdge,
|
|
59
64
|
toast,
|
|
60
65
|
moduleInfo,
|
|
61
66
|
listPackages,
|
|
62
67
|
getPackagesInfo,
|
|
68
|
+
exit,
|
|
63
69
|
}
|
package/index.js
CHANGED
|
@@ -110,6 +110,10 @@ export function fullScreen(isFullScreen) {
|
|
|
110
110
|
ksu.fullScreen(isFullScreen);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
export function enableEdgeToEdge(enable) {
|
|
114
|
+
ksu.enableEdgeToEdge(enable);
|
|
115
|
+
}
|
|
116
|
+
|
|
113
117
|
export function toast(message) {
|
|
114
118
|
ksu.toast(message);
|
|
115
119
|
}
|
|
@@ -136,3 +140,7 @@ export function getPackagesInfo(packages) {
|
|
|
136
140
|
return [];
|
|
137
141
|
}
|
|
138
142
|
}
|
|
143
|
+
|
|
144
|
+
export function exit() {
|
|
145
|
+
ksu.exit();
|
|
146
|
+
}
|