@windypro-rourou/dsh-logcat 0.6.5 → 0.6.6

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/lib/client.js +12 -1
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -33,7 +33,7 @@ window.__ModuleLoader__.load({
33
33
  [data-dsh-logcat-entry][data-active] { background: rgba(128,128,128,.22); }
34
34
  [data-dsh-logcat-entry] .lc-entry-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex: none; }
35
35
  [data-dsh-logcat-entry] .lc-entry-label { font-size: 13px; line-height: 1.2; opacity: .92; }
36
- .dsh-logcat-view { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 94vw); z-index: 9999; }
36
+ .dsh-logcat-view { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 94vw); z-index: 999999; left: auto; }
37
37
  .dsh-logcat-view[hidden] { display: none !important; }
38
38
  .dsh-logcat-panel {
39
39
  position: absolute; inset: 0; display: flex; flex-direction: column;
@@ -1528,6 +1528,9 @@ window.__ModuleLoader__.load({
1528
1528
  container = document.createElement("div");
1529
1529
  container.dataset.dshLogcatView = "";
1530
1530
  container.className = "dsh-logcat-view";
1531
+ // Critical layout inline (does NOT depend on the injected <style>, which a
1532
+ // host DOM rewrite can drop) — placement must survive any style loss.
1533
+ container.style.cssText += "position:fixed;top:0;right:0;bottom:0;left:auto;z-index:999999;";
1531
1534
  container.style.width = readWidth() + "px";
1532
1535
  container.hidden = true; // side-drawer: hidden until the sidebar entry is clicked
1533
1536
  handle = document.createElement("div");
@@ -1537,6 +1540,7 @@ window.__ModuleLoader__.load({
1537
1540
  container.appendChild(handle);
1538
1541
  const panel = document.createElement("div");
1539
1542
  panel.className = "dsh-logcat-panel";
1543
+ panel.style.cssText += "position:absolute;inset:0;display:flex;flex-direction:column;";
1540
1544
  container.appendChild(panel);
1541
1545
  document.body.appendChild(container);
1542
1546
  root = createRoot(panel);
@@ -1578,6 +1582,12 @@ window.__ModuleLoader__.load({
1578
1582
  style.textContent = STYLE;
1579
1583
  style.dataset.dshLogcatStyle = "";
1580
1584
  document.head.appendChild(style);
1585
+ // Self-heal: if the host (or another plugin) rewrites <head> and drops our
1586
+ // style element, re-append it so the panel keeps its themed appearance.
1587
+ const styleGuard = new MutationObserver(() => {
1588
+ if (!document.head.contains(style)) document.head.appendChild(style);
1589
+ });
1590
+ styleGuard.observe(document.head, { childList: true });
1581
1591
 
1582
1592
  const controller = new PanelController();
1583
1593
  const disposers = [];
@@ -1588,6 +1598,7 @@ window.__ModuleLoader__.load({
1588
1598
  console.warn("[dsh-logcat] mount failed:", error);
1589
1599
  }
1590
1600
  ctx.effect(() => () => {
1601
+ styleGuard.disconnect();
1591
1602
  for (const dispose of disposers.splice(0)) dispose();
1592
1603
  style.remove();
1593
1604
  }, "dsh-logcat: ui mounts");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@windypro-rourou/dsh-logcat",
3
3
  "description": "Android Logcat viewer for the dsh web GUI: auto-connects to any adb device in debug mode, live logcat stream with level/keyword filters, pause/clear/export, plus agent tools (logcat_recent). Hot-pluggable — mounted via ~/.dsh/cordis.patch.yml + a profile node_modules copy, no dsh source changes.",
4
- "version": "0.6.5",
4
+ "version": "0.6.6",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@11.22.0",
7
7
  "engines": {