@midscene/harmony 1.10.2-beta-20260706032158.0 → 1.10.3
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/es/bin.mjs +2 -8
- package/dist/es/cli.mjs +3 -9
- package/dist/es/index.mjs +2 -8
- package/dist/lib/bin.js +2 -8
- package/dist/lib/cli.js +3 -9
- package/dist/lib/index.js +2 -8
- package/package.json +4 -4
- package/static/index.html +1 -1
- package/static/static/js/{905.8d12588e.js → 445.884e7c8e.js} +6 -4
- package/static/static/js/{905.8d12588e.js.map → 445.884e7c8e.js.map} +1 -1
- package/static/static/js/{index.4b541d73.js → index.e5706ed1.js} +154 -150
- package/static/static/js/index.e5706ed1.js.map +1 -0
- package/static/static/js/index.4b541d73.js.map +0 -1
- /package/static/static/js/{905.8d12588e.js.LICENSE.txt → 445.884e7c8e.js.LICENSE.txt} +0 -0
- /package/static/static/js/{index.4b541d73.js.LICENSE.txt → index.e5706ed1.js.LICENSE.txt} +0 -0
package/dist/es/bin.mjs
CHANGED
|
@@ -537,7 +537,6 @@ class device_HarmonyDevice {
|
|
|
537
537
|
async typeText(text, element, shouldReplace, options) {
|
|
538
538
|
if (!text) return;
|
|
539
539
|
const hdc = await this.getHdc();
|
|
540
|
-
const typeDelay = options?.keyboardTypeDelay ?? this.options?.keyboardTypeDelay;
|
|
541
540
|
let x;
|
|
542
541
|
let y;
|
|
543
542
|
if (element) [x, y] = element.center;
|
|
@@ -556,11 +555,7 @@ class device_HarmonyDevice {
|
|
|
556
555
|
if (length > 0) await hdc.clearTextField(length);
|
|
557
556
|
await sleep(100);
|
|
558
557
|
}
|
|
559
|
-
|
|
560
|
-
await hdc.inputText(x, y, ch);
|
|
561
|
-
await sleep(typeDelay);
|
|
562
|
-
}
|
|
563
|
-
else await hdc.inputText(x, y, text);
|
|
558
|
+
await hdc.inputText(x, y, text);
|
|
564
559
|
const shouldAutoDismissKeyboard = options?.autoDismissKeyboard ?? this.options?.autoDismissKeyboard ?? true;
|
|
565
560
|
if (shouldAutoDismissKeyboard) await this.hideKeyboard(options);
|
|
566
561
|
}
|
|
@@ -807,8 +802,7 @@ class device_HarmonyDevice {
|
|
|
807
802
|
const harmonyOpts = opts;
|
|
808
803
|
return harmonyOpts?.focusOnly ? Promise.resolve() : this.typeText(value, harmonyOpts?.target, harmonyOpts?.replace ?? true, {
|
|
809
804
|
autoDismissKeyboard: harmonyOpts?.autoDismissKeyboard,
|
|
810
|
-
keyboardDismissStrategy: harmonyOpts?.keyboardDismissStrategy
|
|
811
|
-
keyboardTypeDelay: harmonyOpts?.keyboardTypeDelay
|
|
805
|
+
keyboardDismissStrategy: harmonyOpts?.keyboardDismissStrategy
|
|
812
806
|
});
|
|
813
807
|
},
|
|
814
808
|
clearInput: (target)=>this.clearInput(target),
|
package/dist/es/cli.mjs
CHANGED
|
@@ -535,7 +535,6 @@ class HarmonyDevice {
|
|
|
535
535
|
async typeText(text, element, shouldReplace, options) {
|
|
536
536
|
if (!text) return;
|
|
537
537
|
const hdc = await this.getHdc();
|
|
538
|
-
const typeDelay = options?.keyboardTypeDelay ?? this.options?.keyboardTypeDelay;
|
|
539
538
|
let x;
|
|
540
539
|
let y;
|
|
541
540
|
if (element) [x, y] = element.center;
|
|
@@ -554,11 +553,7 @@ class HarmonyDevice {
|
|
|
554
553
|
if (length > 0) await hdc.clearTextField(length);
|
|
555
554
|
await sleep(100);
|
|
556
555
|
}
|
|
557
|
-
|
|
558
|
-
await hdc.inputText(x, y, ch);
|
|
559
|
-
await sleep(typeDelay);
|
|
560
|
-
}
|
|
561
|
-
else await hdc.inputText(x, y, text);
|
|
556
|
+
await hdc.inputText(x, y, text);
|
|
562
557
|
const shouldAutoDismissKeyboard = options?.autoDismissKeyboard ?? this.options?.autoDismissKeyboard ?? true;
|
|
563
558
|
if (shouldAutoDismissKeyboard) await this.hideKeyboard(options);
|
|
564
559
|
}
|
|
@@ -805,8 +800,7 @@ class HarmonyDevice {
|
|
|
805
800
|
const harmonyOpts = opts;
|
|
806
801
|
return harmonyOpts?.focusOnly ? Promise.resolve() : this.typeText(value, harmonyOpts?.target, harmonyOpts?.replace ?? true, {
|
|
807
802
|
autoDismissKeyboard: harmonyOpts?.autoDismissKeyboard,
|
|
808
|
-
keyboardDismissStrategy: harmonyOpts?.keyboardDismissStrategy
|
|
809
|
-
keyboardTypeDelay: harmonyOpts?.keyboardTypeDelay
|
|
803
|
+
keyboardDismissStrategy: harmonyOpts?.keyboardDismissStrategy
|
|
810
804
|
});
|
|
811
805
|
},
|
|
812
806
|
clearInput: (target)=>this.clearInput(target),
|
|
@@ -1093,7 +1087,7 @@ class HarmonyMidsceneTools extends BaseMidsceneTools {
|
|
|
1093
1087
|
const tools = new HarmonyMidsceneTools();
|
|
1094
1088
|
runToolsCLI(tools, 'midscene-harmony', {
|
|
1095
1089
|
stripPrefix: 'harmony_',
|
|
1096
|
-
version: "1.10.
|
|
1090
|
+
version: "1.10.3",
|
|
1097
1091
|
extraCommands: createReportCliCommands()
|
|
1098
1092
|
}).catch((e)=>{
|
|
1099
1093
|
process.exit(reportCLIError(e));
|
package/dist/es/index.mjs
CHANGED
|
@@ -506,7 +506,6 @@ class HarmonyDevice {
|
|
|
506
506
|
async typeText(text, element, shouldReplace, options) {
|
|
507
507
|
if (!text) return;
|
|
508
508
|
const hdc = await this.getHdc();
|
|
509
|
-
const typeDelay = options?.keyboardTypeDelay ?? this.options?.keyboardTypeDelay;
|
|
510
509
|
let x;
|
|
511
510
|
let y;
|
|
512
511
|
if (element) [x, y] = element.center;
|
|
@@ -525,11 +524,7 @@ class HarmonyDevice {
|
|
|
525
524
|
if (length > 0) await hdc.clearTextField(length);
|
|
526
525
|
await sleep(100);
|
|
527
526
|
}
|
|
528
|
-
|
|
529
|
-
await hdc.inputText(x, y, ch);
|
|
530
|
-
await sleep(typeDelay);
|
|
531
|
-
}
|
|
532
|
-
else await hdc.inputText(x, y, text);
|
|
527
|
+
await hdc.inputText(x, y, text);
|
|
533
528
|
const shouldAutoDismissKeyboard = options?.autoDismissKeyboard ?? this.options?.autoDismissKeyboard ?? true;
|
|
534
529
|
if (shouldAutoDismissKeyboard) await this.hideKeyboard(options);
|
|
535
530
|
}
|
|
@@ -776,8 +771,7 @@ class HarmonyDevice {
|
|
|
776
771
|
const harmonyOpts = opts;
|
|
777
772
|
return harmonyOpts?.focusOnly ? Promise.resolve() : this.typeText(value, harmonyOpts?.target, harmonyOpts?.replace ?? true, {
|
|
778
773
|
autoDismissKeyboard: harmonyOpts?.autoDismissKeyboard,
|
|
779
|
-
keyboardDismissStrategy: harmonyOpts?.keyboardDismissStrategy
|
|
780
|
-
keyboardTypeDelay: harmonyOpts?.keyboardTypeDelay
|
|
774
|
+
keyboardDismissStrategy: harmonyOpts?.keyboardDismissStrategy
|
|
781
775
|
});
|
|
782
776
|
},
|
|
783
777
|
clearInput: (target)=>this.clearInput(target),
|
package/dist/lib/bin.js
CHANGED
|
@@ -563,7 +563,6 @@ class device_HarmonyDevice {
|
|
|
563
563
|
async typeText(text, element, shouldReplace, options) {
|
|
564
564
|
if (!text) return;
|
|
565
565
|
const hdc = await this.getHdc();
|
|
566
|
-
const typeDelay = options?.keyboardTypeDelay ?? this.options?.keyboardTypeDelay;
|
|
567
566
|
let x;
|
|
568
567
|
let y;
|
|
569
568
|
if (element) [x, y] = element.center;
|
|
@@ -582,11 +581,7 @@ class device_HarmonyDevice {
|
|
|
582
581
|
if (length > 0) await hdc.clearTextField(length);
|
|
583
582
|
await (0, core_utils_namespaceObject.sleep)(100);
|
|
584
583
|
}
|
|
585
|
-
|
|
586
|
-
await hdc.inputText(x, y, ch);
|
|
587
|
-
await (0, core_utils_namespaceObject.sleep)(typeDelay);
|
|
588
|
-
}
|
|
589
|
-
else await hdc.inputText(x, y, text);
|
|
584
|
+
await hdc.inputText(x, y, text);
|
|
590
585
|
const shouldAutoDismissKeyboard = options?.autoDismissKeyboard ?? this.options?.autoDismissKeyboard ?? true;
|
|
591
586
|
if (shouldAutoDismissKeyboard) await this.hideKeyboard(options);
|
|
592
587
|
}
|
|
@@ -833,8 +828,7 @@ class device_HarmonyDevice {
|
|
|
833
828
|
const harmonyOpts = opts;
|
|
834
829
|
return harmonyOpts?.focusOnly ? Promise.resolve() : this.typeText(value, harmonyOpts?.target, harmonyOpts?.replace ?? true, {
|
|
835
830
|
autoDismissKeyboard: harmonyOpts?.autoDismissKeyboard,
|
|
836
|
-
keyboardDismissStrategy: harmonyOpts?.keyboardDismissStrategy
|
|
837
|
-
keyboardTypeDelay: harmonyOpts?.keyboardTypeDelay
|
|
831
|
+
keyboardDismissStrategy: harmonyOpts?.keyboardDismissStrategy
|
|
838
832
|
});
|
|
839
833
|
},
|
|
840
834
|
clearInput: (target)=>this.clearInput(target),
|
package/dist/lib/cli.js
CHANGED
|
@@ -560,7 +560,6 @@ class HarmonyDevice {
|
|
|
560
560
|
async typeText(text, element, shouldReplace, options) {
|
|
561
561
|
if (!text) return;
|
|
562
562
|
const hdc = await this.getHdc();
|
|
563
|
-
const typeDelay = options?.keyboardTypeDelay ?? this.options?.keyboardTypeDelay;
|
|
564
563
|
let x;
|
|
565
564
|
let y;
|
|
566
565
|
if (element) [x, y] = element.center;
|
|
@@ -579,11 +578,7 @@ class HarmonyDevice {
|
|
|
579
578
|
if (length > 0) await hdc.clearTextField(length);
|
|
580
579
|
await (0, core_utils_namespaceObject.sleep)(100);
|
|
581
580
|
}
|
|
582
|
-
|
|
583
|
-
await hdc.inputText(x, y, ch);
|
|
584
|
-
await (0, core_utils_namespaceObject.sleep)(typeDelay);
|
|
585
|
-
}
|
|
586
|
-
else await hdc.inputText(x, y, text);
|
|
581
|
+
await hdc.inputText(x, y, text);
|
|
587
582
|
const shouldAutoDismissKeyboard = options?.autoDismissKeyboard ?? this.options?.autoDismissKeyboard ?? true;
|
|
588
583
|
if (shouldAutoDismissKeyboard) await this.hideKeyboard(options);
|
|
589
584
|
}
|
|
@@ -830,8 +825,7 @@ class HarmonyDevice {
|
|
|
830
825
|
const harmonyOpts = opts;
|
|
831
826
|
return harmonyOpts?.focusOnly ? Promise.resolve() : this.typeText(value, harmonyOpts?.target, harmonyOpts?.replace ?? true, {
|
|
832
827
|
autoDismissKeyboard: harmonyOpts?.autoDismissKeyboard,
|
|
833
|
-
keyboardDismissStrategy: harmonyOpts?.keyboardDismissStrategy
|
|
834
|
-
keyboardTypeDelay: harmonyOpts?.keyboardTypeDelay
|
|
828
|
+
keyboardDismissStrategy: harmonyOpts?.keyboardDismissStrategy
|
|
835
829
|
});
|
|
836
830
|
},
|
|
837
831
|
clearInput: (target)=>this.clearInput(target),
|
|
@@ -1118,7 +1112,7 @@ class HarmonyMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
|
|
|
1118
1112
|
const tools = new HarmonyMidsceneTools();
|
|
1119
1113
|
(0, cli_namespaceObject.runToolsCLI)(tools, 'midscene-harmony', {
|
|
1120
1114
|
stripPrefix: 'harmony_',
|
|
1121
|
-
version: "1.10.
|
|
1115
|
+
version: "1.10.3",
|
|
1122
1116
|
extraCommands: (0, core_namespaceObject.createReportCliCommands)()
|
|
1123
1117
|
}).catch((e)=>{
|
|
1124
1118
|
process.exit((0, cli_namespaceObject.reportCLIError)(e));
|
package/dist/lib/index.js
CHANGED
|
@@ -542,7 +542,6 @@ class HarmonyDevice {
|
|
|
542
542
|
async typeText(text, element, shouldReplace, options) {
|
|
543
543
|
if (!text) return;
|
|
544
544
|
const hdc = await this.getHdc();
|
|
545
|
-
const typeDelay = options?.keyboardTypeDelay ?? this.options?.keyboardTypeDelay;
|
|
546
545
|
let x;
|
|
547
546
|
let y;
|
|
548
547
|
if (element) [x, y] = element.center;
|
|
@@ -561,11 +560,7 @@ class HarmonyDevice {
|
|
|
561
560
|
if (length > 0) await hdc.clearTextField(length);
|
|
562
561
|
await (0, utils_namespaceObject.sleep)(100);
|
|
563
562
|
}
|
|
564
|
-
|
|
565
|
-
await hdc.inputText(x, y, ch);
|
|
566
|
-
await (0, utils_namespaceObject.sleep)(typeDelay);
|
|
567
|
-
}
|
|
568
|
-
else await hdc.inputText(x, y, text);
|
|
563
|
+
await hdc.inputText(x, y, text);
|
|
569
564
|
const shouldAutoDismissKeyboard = options?.autoDismissKeyboard ?? this.options?.autoDismissKeyboard ?? true;
|
|
570
565
|
if (shouldAutoDismissKeyboard) await this.hideKeyboard(options);
|
|
571
566
|
}
|
|
@@ -812,8 +807,7 @@ class HarmonyDevice {
|
|
|
812
807
|
const harmonyOpts = opts;
|
|
813
808
|
return harmonyOpts?.focusOnly ? Promise.resolve() : this.typeText(value, harmonyOpts?.target, harmonyOpts?.replace ?? true, {
|
|
814
809
|
autoDismissKeyboard: harmonyOpts?.autoDismissKeyboard,
|
|
815
|
-
keyboardDismissStrategy: harmonyOpts?.keyboardDismissStrategy
|
|
816
|
-
keyboardTypeDelay: harmonyOpts?.keyboardTypeDelay
|
|
810
|
+
keyboardDismissStrategy: harmonyOpts?.keyboardDismissStrategy
|
|
817
811
|
});
|
|
818
812
|
},
|
|
819
813
|
clearInput: (target)=>this.clearInput(target),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/harmony",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/midscene.git",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@inquirer/prompts": "^7.8.6",
|
|
43
43
|
"open": "10.1.0",
|
|
44
|
-
"@midscene/core": "1.10.
|
|
45
|
-
"@midscene/
|
|
46
|
-
"@midscene/
|
|
44
|
+
"@midscene/core": "1.10.3",
|
|
45
|
+
"@midscene/shared": "1.10.3",
|
|
46
|
+
"@midscene/playground": "1.10.3"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@rslib/core": "^0.18.3",
|
package/static/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html><head><link rel="icon" href="/favicon.ico"><title>Midscene Playground</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="/static/js/lib-react.7b1abe58.js"></script><script defer src="/static/js/
|
|
1
|
+
<!doctype html><html><head><link rel="icon" href="/favicon.ico"><title>Midscene Playground</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="/static/js/lib-react.7b1abe58.js"></script><script defer src="/static/js/445.884e7c8e.js"></script><script defer src="/static/js/index.e5706ed1.js"></script><link href="/static/css/index.1293237f.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
|