@midscene/shared 1.12.5-beta-20260908034641.0 → 1.12.5

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.
@@ -43,6 +43,4 @@ export {
43
43
  getElementXpath,
44
44
  } from './locator';
45
45
 
46
- export { generateElementByPoint, generateElementByRect } from './dom-util';
47
-
48
46
  export { isNotContainerElement } from './dom-util';
@@ -47,8 +47,22 @@ export interface WebElementInfo extends ElementInfo {
47
47
 
48
48
  export type LocateResultElement = {
49
49
  description: string; // the description of the element
50
+ /**
51
+ * Authoritative target point in original screenshot coordinates.
52
+ * For model results, first take the midpoint of the raw bbox (or use the raw
53
+ * point), then map that point to the original screenshot. Normalized coordinates
54
+ * are rounded during pixel mapping. Never derive it from the mapped rect: minimizing coordinate
55
+ * conversions avoids unnecessary precision loss. Convert this center to
56
+ * device coordinates when computing the final click point.
57
+ */
50
58
  center: [number, number];
51
- rect: Rect;
59
+ /**
60
+ * Preserves the mapped original model bbox or an intermediate bbox from the
61
+ * DeepLocate pipeline. Used only as region metadata for DeepLocate cropping;
62
+ * never use it to compute a click point or recompute center. Click coordinates
63
+ * must be calculated directly from the already resolved center.
64
+ */
65
+ rect?: Rect;
52
66
  /**
53
67
  * Web-only compatibility field returned by `Agent.aiLocate()`.
54
68
  * It is the ratio between physical screenshot pixels and logical CSS pixels.