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 CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://dsh.community/schemas/dsh-plugin-0.15.json",
3
3
  "id": "dsh-browser-cdp",
4
4
  "name": "dsh-browser-cdp",
5
- "version": "0.17.11",
5
+ "version": "0.17.12",
6
6
  "manifestVersion": "0.15",
7
7
  "facets": {
8
8
  "host": {
package/lib/client.js CHANGED
@@ -4385,11 +4385,26 @@ function mountComposerDecoration(ctx) {
4385
4385
  return el;
4386
4386
  }
4387
4387
  function composerEl() {
4388
- var el = document.querySelector("[data-composer-input]");
4389
- if (!el) el = document.querySelector("[data-composer-input] [contenteditable=\"true\"]");
4390
- if (!el) el = document.querySelector("[contenteditable=\"true\"]");
4391
- if (!el) el = document.querySelector("textarea");
4392
- return el;
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.11",
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",