@browserbasehq/orca 3.0.8-google-cua → 3.0.8-google-cua-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.
- package/dist/index.js +7 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -179,7 +179,7 @@ var __forAwait = (obj, it, method) => (it = obj[__knownSymbol("asyncIterator")])
|
|
|
179
179
|
var STAGEHAND_VERSION;
|
|
180
180
|
var init_version = __esm({
|
|
181
181
|
"lib/version.ts"() {
|
|
182
|
-
STAGEHAND_VERSION = "3.0.
|
|
182
|
+
STAGEHAND_VERSION = "3.0.8-google-cua-1";
|
|
183
183
|
}
|
|
184
184
|
});
|
|
185
185
|
|
|
@@ -35530,14 +35530,17 @@ var GoogleCUAClient = class extends AgentClient {
|
|
|
35530
35530
|
}
|
|
35531
35531
|
}
|
|
35532
35532
|
/**
|
|
35533
|
-
* Normalize coordinates from Google's 0-1000 range to
|
|
35533
|
+
* Normalize coordinates from Google's 0-1000 range to fixed viewport dimensions.
|
|
35534
|
+
* Google CUA outputs coordinates in 0-1000 range based on the screenshot it sees,
|
|
35535
|
+
* which is always 1288x711 regardless of browser-reported viewport size.
|
|
35534
35536
|
*/
|
|
35535
35537
|
normalizeCoordinates(x2, y) {
|
|
35538
|
+
const GOOGLE_CUA_VIEWPORT = { width: 1288, height: 711 };
|
|
35536
35539
|
x2 = Math.min(999, Math.max(0, x2));
|
|
35537
35540
|
y = Math.min(999, Math.max(0, y));
|
|
35538
35541
|
return {
|
|
35539
|
-
x: Math.floor(x2 / 1e3 *
|
|
35540
|
-
y: Math.floor(y / 1e3 *
|
|
35542
|
+
x: Math.floor(x2 / 1e3 * GOOGLE_CUA_VIEWPORT.width),
|
|
35543
|
+
y: Math.floor(y / 1e3 * GOOGLE_CUA_VIEWPORT.height)
|
|
35541
35544
|
};
|
|
35542
35545
|
}
|
|
35543
35546
|
captureScreenshot(options) {
|
package/package.json
CHANGED