cortico-world-hands 0.3.0 → 0.3.1

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -444,7 +444,7 @@ var Honcho = class {
444
444
  import { execFile } from "node:child_process";
445
445
  import { readFileSync } from "node:fs";
446
446
  import { get as httpGet } from "node:http";
447
- var ACTION_TIMEOUT_MS = 15e3;
447
+ var ACTION_TIMEOUT_MS = 6e3;
448
448
  var PROBE_TTL_MS = 2e4;
449
449
  var COORD_LIMIT = 2e4;
450
450
  var MIN_GESTURE_MS = 20;
@@ -912,14 +912,14 @@ var Hands = class {
912
912
  const px = coord(x);
913
913
  const py = coord(y);
914
914
  await this.bounds(px, py);
915
- const ms = milliseconds(opts.ms, 60);
915
+ const ms = milliseconds(opts.ms, 45);
916
916
  return this.perform({ kind: "tap", x: px, y: py, ms });
917
917
  }
918
918
  async longPress(x, y, opts = {}) {
919
919
  const px = coord(x);
920
920
  const py = coord(y);
921
921
  await this.bounds(px, py);
922
- const ms = milliseconds(opts.ms, 800);
922
+ const ms = milliseconds(opts.ms, 600);
923
923
  return this.perform({ kind: "tap", x: px, y: py, ms });
924
924
  }
925
925
  async swipe(x1, y1, x2, y2, opts = {}) {
@@ -929,13 +929,13 @@ var Hands = class {
929
929
  const d = coord(y2);
930
930
  await this.bounds(a, b);
931
931
  await this.bounds(c, d);
932
- const ms = milliseconds(opts.ms, 300);
932
+ const ms = milliseconds(opts.ms, 200);
933
933
  return this.perform({ kind: "swipe", x1: a, y1: b, x2: c, y2: d, ms });
934
934
  }
935
935
  async pinch(cx, cy, scale, opts = {}) {
936
936
  const x = coord(cx);
937
937
  const y = coord(cy);
938
- const ms = milliseconds(opts.ms, 400);
938
+ const ms = milliseconds(opts.ms, 300);
939
939
  const factor = Math.max(0.25, Math.min(4, Number(scale) || 1));
940
940
  return this.perform({ kind: "pinch", cx: x, cy: y, scale: factor, ms });
941
941
  }
@@ -946,7 +946,7 @@ var Hands = class {
946
946
  const d = coord(y2);
947
947
  await this.bounds(a, b);
948
948
  await this.bounds(c, d);
949
- const ms = milliseconds(opts.ms, 900);
949
+ const ms = milliseconds(opts.ms, 600);
950
950
  return this.perform({ kind: "drag", x1: a, y1: b, x2: c, y2: d, ms });
951
951
  }
952
952
  /** 口令通过后解锁(并可打开)懿心的受保护页面。 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cortico-world-hands",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "description": "Cortico World: hands for the desktop pet — looks at the phone screen, then taps, swipes, pinches, drags, types and presses keys through whatever actuator the device actually has",
6
6
  "license": "MIT",