claude-opencode-viewer 2.6.16 → 2.6.18

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.
@@ -7,7 +7,11 @@
7
7
  "Bash(node:*)",
8
8
  "Bash(lsof -ti:7008)",
9
9
  "Bash(sqlite3:*)",
10
- "Bash(ps:*)"
10
+ "Bash(ps:*)",
11
+ "Bash(git add:*)",
12
+ "Bash(git commit -m ':*)",
13
+ "Bash(git push:*)",
14
+ "Bash(npm publish:*)"
11
15
  ]
12
16
  }
13
17
  }
package/index.html CHANGED
@@ -11,8 +11,11 @@
11
11
 
12
12
  /* 参考 cc-viewer 的 App.jsx 行 1319: 移动端容器使用 100vw/100vh */
13
13
  #layout {
14
- width: 100vw;
15
- height: 100vh;
14
+ position: fixed;
15
+ top: 0;
16
+ left: 0;
17
+ right: 0;
18
+ bottom: 0;
16
19
  display: flex;
17
20
  flex-direction: column;
18
21
  background: #000;
@@ -1044,6 +1047,7 @@
1044
1047
  }
1045
1048
 
1046
1049
  // 触摸滚动实现 - 混合模式:alternate buffer 发鼠标滚轮,normal buffer 用 scrollLines
1050
+ var SCROLL_SENSITIVITY = 0.7; // 滚动灵敏度,越小每次滑动行数越少
1047
1051
  var touchScreen = null;
1048
1052
  var touchEventsBound = false;
1049
1053
 
@@ -1112,7 +1116,7 @@
1112
1116
  scrollRaf = null;
1113
1117
  if (pendingDy === 0) return;
1114
1118
 
1115
- pixelAccum += pendingDy;
1119
+ pixelAccum += pendingDy * SCROLL_SENSITIVITY;
1116
1120
  pendingDy = 0;
1117
1121
 
1118
1122
  var lh = getLineHeight();
@@ -1164,7 +1168,7 @@
1164
1168
  }
1165
1169
 
1166
1170
  if (pendingDy !== 0) {
1167
- pixelAccum += pendingDy;
1171
+ pixelAccum += pendingDy * SCROLL_SENSITIVITY;
1168
1172
  pendingDy = 0;
1169
1173
  var lh = getLineHeight();
1170
1174
  var lines = Math.trunc(pixelAccum / lh);
@@ -1189,8 +1193,9 @@
1189
1193
  }
1190
1194
  velocitySamples = [];
1191
1195
 
1196
+ velocity *= SCROLL_SENSITIVITY;
1192
1197
  console.log('[scroll] velocity:', velocity);
1193
- if (Math.abs(velocity) < 0.5) return;
1198
+ if (Math.abs(velocity) < 0.3) return;
1194
1199
 
1195
1200
  var friction = 0.95;
1196
1201
  var mAccum = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-opencode-viewer",
3
- "version": "2.6.16",
3
+ "version": "2.6.18",
4
4
  "description": "A unified terminal viewer for Claude Code and OpenCode with seamless switching",
5
5
  "type": "module",
6
6
  "main": "server.js",