dsh-browser-cdp 0.17.11 → 0.17.12
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/dsh-plugin.json +1 -1
- package/lib/client.js +20 -5
- package/package.json +1 -1
package/dsh-plugin.json
CHANGED
package/lib/client.js
CHANGED
|
@@ -4385,11 +4385,26 @@ function mountComposerDecoration(ctx) {
|
|
|
4385
4385
|
return el;
|
|
4386
4386
|
}
|
|
4387
4387
|
function composerEl() {
|
|
4388
|
-
var
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4388
|
+
var selectors = [
|
|
4389
|
+
"[data-composer-input]",
|
|
4390
|
+
"[contenteditable=\"true\"]",
|
|
4391
|
+
"textarea"
|
|
4392
|
+
];
|
|
4393
|
+
for (var s = 0; s < selectors.length; s++) {
|
|
4394
|
+
var list = document.querySelectorAll(selectors[s]);
|
|
4395
|
+
var best = null, bestBottom = -1;
|
|
4396
|
+
for (var i = 0; i < list.length; i++) {
|
|
4397
|
+
var r = list[i].getBoundingClientRect();
|
|
4398
|
+
if (r.width < 120 || r.height < 32) continue;
|
|
4399
|
+
if (r.top > window.innerHeight || r.bottom < 0) continue;
|
|
4400
|
+
if (r.bottom > bestBottom) {
|
|
4401
|
+
bestBottom = r.bottom;
|
|
4402
|
+
best = list[i];
|
|
4403
|
+
}
|
|
4404
|
+
}
|
|
4405
|
+
if (best) return best;
|
|
4406
|
+
}
|
|
4407
|
+
return null;
|
|
4393
4408
|
}
|
|
4394
4409
|
function render(pageTitle, endpoint, elements) {
|
|
4395
4410
|
var comp = composerEl();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-browser-cdp",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.12",
|
|
4
4
|
"description": "dsh-browser-cdp: DSH browser plugin — attach to a running Chrome/Edge over CDP (no bundled browser needed); structured browser-automation tools (30+ bcdp_*) that drive the vendored ego runtime through ctx.subprocess, plus a realtime watch panel (live SSE screencast + direct mouse interaction + download capture + human-verification notice). Web shell: floating watch panel without dsh-better-sidebar, sidebar tab with it. Headless/TUI hosts: tools-only. [DSH 0.1.7+ line: declarative settings via Config .volatile() fields; for DSH 0.1.2-rc.1 ~ 0.1.6 use the 0.16.x line]",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|