assistsx-js 0.0.2030 → 0.0.2031
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/dist/AssistsX.d.ts +7 -0
- package/dist/AssistsX.js +15 -0
- package/dist/CallMethod.d.ts +2 -0
- package/dist/CallMethod.js +2 -0
- package/package.json +1 -1
- package/src/AssistsX.ts +15 -0
- package/src/CallMethod.ts +2 -0
package/dist/AssistsX.d.ts
CHANGED
|
@@ -133,6 +133,13 @@ export declare class AssistsX {
|
|
|
133
133
|
* @returns 是否成功打开
|
|
134
134
|
*/
|
|
135
135
|
static openUrlInBrowser(url: string): boolean;
|
|
136
|
+
/**
|
|
137
|
+
* 保持屏幕常亮
|
|
138
|
+
* @param tip 提示文本
|
|
139
|
+
* @returns 是否保持屏幕常亮成功
|
|
140
|
+
*/
|
|
141
|
+
static keepScreenOn(tip?: string): boolean;
|
|
142
|
+
static clearKeepScreenOn(): boolean;
|
|
136
143
|
static isAppInstalled(packageName: string): boolean;
|
|
137
144
|
/**
|
|
138
145
|
* 对指定节点进行截图
|
package/dist/AssistsX.js
CHANGED
|
@@ -180,6 +180,21 @@ export class AssistsX {
|
|
|
180
180
|
});
|
|
181
181
|
return response.getDataOrDefault(false);
|
|
182
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* 保持屏幕常亮
|
|
185
|
+
* @param tip 提示文本
|
|
186
|
+
* @returns 是否保持屏幕常亮成功
|
|
187
|
+
*/
|
|
188
|
+
static keepScreenOn(tip) {
|
|
189
|
+
const response = this.call(CallMethod.keepScreenOn, {
|
|
190
|
+
args: { tip },
|
|
191
|
+
});
|
|
192
|
+
return response.getDataOrDefault(false);
|
|
193
|
+
}
|
|
194
|
+
static clearKeepScreenOn() {
|
|
195
|
+
const response = this.call(CallMethod.clearKeepScreenOn, {});
|
|
196
|
+
return response.getDataOrDefault(false);
|
|
197
|
+
}
|
|
183
198
|
static isAppInstalled(packageName) {
|
|
184
199
|
const response = this.call(CallMethod.isAppInstalled, {
|
|
185
200
|
args: { packageName },
|
package/dist/CallMethod.d.ts
CHANGED
|
@@ -50,5 +50,7 @@ export declare const CallMethod: {
|
|
|
50
50
|
readonly isAppInstalled: "isAppInstalled";
|
|
51
51
|
readonly getClipboardLatestText: "getClipboardLatestText";
|
|
52
52
|
readonly openUrlInBrowser: "openUrlInBrowser";
|
|
53
|
+
readonly keepScreenOn: "keepScreenOn";
|
|
54
|
+
readonly clearKeepScreenOn: "clearKeepScreenOn";
|
|
53
55
|
};
|
|
54
56
|
export type CallMethodType = (typeof CallMethod)[keyof typeof CallMethod];
|
package/dist/CallMethod.js
CHANGED
package/package.json
CHANGED
package/src/AssistsX.ts
CHANGED
|
@@ -278,6 +278,21 @@ export class AssistsX {
|
|
|
278
278
|
return response.getDataOrDefault(false);
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
+
/**
|
|
282
|
+
* 保持屏幕常亮
|
|
283
|
+
* @param tip 提示文本
|
|
284
|
+
* @returns 是否保持屏幕常亮成功
|
|
285
|
+
*/
|
|
286
|
+
public static keepScreenOn(tip?: string): boolean {
|
|
287
|
+
const response = this.call(CallMethod.keepScreenOn, {
|
|
288
|
+
args: { tip },
|
|
289
|
+
});
|
|
290
|
+
return response.getDataOrDefault(false);
|
|
291
|
+
}
|
|
292
|
+
public static clearKeepScreenOn(): boolean {
|
|
293
|
+
const response = this.call(CallMethod.clearKeepScreenOn, {});
|
|
294
|
+
return response.getDataOrDefault(false);
|
|
295
|
+
}
|
|
281
296
|
public static isAppInstalled(packageName: string): boolean {
|
|
282
297
|
const response = this.call(CallMethod.isAppInstalled, {
|
|
283
298
|
args: { packageName },
|
package/src/CallMethod.ts
CHANGED
|
@@ -55,6 +55,8 @@ export const CallMethod = {
|
|
|
55
55
|
isAppInstalled: "isAppInstalled",
|
|
56
56
|
getClipboardLatestText: "getClipboardLatestText",
|
|
57
57
|
openUrlInBrowser: "openUrlInBrowser",
|
|
58
|
+
keepScreenOn: "keepScreenOn",
|
|
59
|
+
clearKeepScreenOn: "clearKeepScreenOn",
|
|
58
60
|
} as const;
|
|
59
61
|
|
|
60
62
|
// 导出类型定义
|