dsh-skin-galactic-opera 0.2.0 → 0.2.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/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  All notable changes to this package will be documented in this file.
4
4
 
5
+ ## 0.2.1 - 2026-09-04
6
+
7
+ ### Changed
8
+
9
+ - Documents the recommended DSH compatibility range in both English and Simplified Chinese README sections.
10
+
11
+ ### Fixed
12
+
13
+ - Aligns click pulse and scanner target effects with the clicked position after Shadow DOM decor isolation.
14
+
5
15
  ## 0.2.0 - 2026-09-04
6
16
 
7
17
  ### Changed
package/README.md CHANGED
@@ -41,6 +41,19 @@ It uses generic sci-fi visual language: deep-space backgrounds, neon HUD chrome,
41
41
  - Uses Shadow DOM for the decorative layer to reduce interference from host application styles.
42
42
  - Respects `prefers-reduced-motion: reduce` by disabling major animations.
43
43
 
44
+ ### Compatibility
45
+
46
+ Recommended DSH version: **`0.1.0-rc.7` or newer**.
47
+
48
+ Known incompatible versions:
49
+
50
+ - `0.0.1-rc.1`
51
+ - `0.0.1-rc.2`
52
+
53
+ These early versions of `@deepseek-ai/dsh-client-ui-theme` do not expose `theme.overrideTokens()`, which this skin uses for its token override layer.
54
+
55
+ Versions from `0.0.1-rc.3` onward include the required theme APIs in static inspection, but DSH releases before `0.1.0-rc.7` are not actively tested by this package. If you are using an older DSH release, upgrade DSH first before reporting skin issues.
56
+
44
57
  ### Telemetry panel
45
58
 
46
59
  When DSH Web exposes bottom status/usage data, the skin keeps the original UI layout in place and mirrors the detected global telemetry into a non-interactive bottom-right HUD panel.
@@ -193,6 +206,19 @@ DSH Web GUI 的非官方电影感太空歌剧暗色皮肤插件。
193
206
  - 装饰层使用 Shadow DOM,减少宿主应用样式对行星、扫描盘、点击脉冲等几何形态的污染。
194
207
  - 遵循 `prefers-reduced-motion: reduce`,会关闭主要动画。
195
208
 
209
+ ### 兼容性
210
+
211
+ 推荐 DSH 版本:**`0.1.0-rc.7` 或更新版本**。
212
+
213
+ 已知不兼容版本:
214
+
215
+ - `0.0.1-rc.1`
216
+ - `0.0.1-rc.2`
217
+
218
+ 这些早期版本的 `@deepseek-ai/dsh-client-ui-theme` 不提供 `theme.overrideTokens()`,而本皮肤需要它来应用主题 token 覆盖层。
219
+
220
+ 从 `0.0.1-rc.3` 开始,静态检查显示已具备本插件需要的 theme API;但 `0.1.0-rc.7` 之前的 DSH 版本本包不会主动测试。如果你正在使用更早的 DSH 版本,建议先升级 DSH,再反馈皮肤兼容问题。
221
+
196
222
  ### Telemetry 面板
197
223
 
198
224
  当 DSH Web 暴露底部状态/用量信息时,皮肤会保留原始 UI 布局,并将检测到的全局 telemetry 镜像到右下角的非交互 HUD 面板中。
package/lib/client.js CHANGED
@@ -1170,6 +1170,11 @@ body.dsh-skin-galactic-opera .dsh-skin-telemetry-value-full {
1170
1170
  height: auto !important;
1171
1171
  z-index: auto !important;
1172
1172
  }
1173
+
1174
+ .dsh-skin-pulse,
1175
+ .dsh-skin-scanner-target {
1176
+ position: absolute !important;
1177
+ }
1173
1178
  `;
1174
1179
  }
1175
1180
 
@@ -1339,6 +1344,12 @@ body.dsh-skin-galactic-opera .dsh-skin-telemetry-value-full {
1339
1344
  const decorLayer = getDecorLayer(decor);
1340
1345
  const scanner = decorRoot?.querySelector?.(".dsh-skin-scanner");
1341
1346
  const scannerTarget = decorRoot?.querySelector?.(".dsh-skin-scanner-target");
1347
+ const useDecorLocalCoordinates = decor.shadowRoot !== null && decorLayer instanceof HTMLElement;
1348
+ const toDecorPoint = (clientX, clientY) => {
1349
+ if (!useDecorLocalCoordinates) return { x: clientX, y: clientY };
1350
+ const rect = decorLayer.getBoundingClientRect();
1351
+ return { x: clientX - rect.left, y: clientY - rect.top };
1352
+ };
1342
1353
  const pulseColors = ["rgba(125,227,255,0.94)", "rgba(255,207,92,0.92)", "rgba(255,71,120,0.88)"];
1343
1354
  const updatePointer = () => {
1344
1355
  frame = 0;
@@ -1371,8 +1382,9 @@ body.dsh-skin-galactic-opera .dsh-skin-telemetry-value-full {
1371
1382
  const scannerRadius = Math.max(10, Math.min(rect.width, rect.height) * 0.38);
1372
1383
  const projectedRadius = Math.min(1, distance / maxDistance) * scannerRadius;
1373
1384
  const angle = Math.atan2(dy, dx);
1374
- document.body.style.setProperty("--dsh-skin-scanner-dot-x", `${Math.round(scannerCenterX + Math.cos(angle) * projectedRadius)}px`);
1375
- document.body.style.setProperty("--dsh-skin-scanner-dot-y", `${Math.round(scannerCenterY + Math.sin(angle) * projectedRadius)}px`);
1385
+ const scannerDot = toDecorPoint(scannerCenterX + Math.cos(angle) * projectedRadius, scannerCenterY + Math.sin(angle) * projectedRadius);
1386
+ document.body.style.setProperty("--dsh-skin-scanner-dot-x", `${Math.round(scannerDot.x)}px`);
1387
+ document.body.style.setProperty("--dsh-skin-scanner-dot-y", `${Math.round(scannerDot.y)}px`);
1376
1388
  scannerTarget.removeAttribute("data-ping");
1377
1389
  // Force the double-flash animation to restart on repeated clicks at the same point.
1378
1390
  void scannerTarget.offsetWidth;
@@ -1419,8 +1431,9 @@ body.dsh-skin-galactic-opera .dsh-skin-telemetry-value-full {
1419
1431
  pulse.className = "dsh-skin-pulse";
1420
1432
  setImportantStyle(pulse, "border-radius", "50%");
1421
1433
  setImportantStyle(pulse, "box-sizing", "border-box");
1422
- pulse.style.setProperty("--dsh-skin-pulse-x", `${event.clientX}px`);
1423
- pulse.style.setProperty("--dsh-skin-pulse-y", `${event.clientY}px`);
1434
+ const pulsePoint = toDecorPoint(event.clientX, event.clientY);
1435
+ pulse.style.setProperty("--dsh-skin-pulse-x", `${Math.round(pulsePoint.x)}px`);
1436
+ pulse.style.setProperty("--dsh-skin-pulse-y", `${Math.round(pulsePoint.y)}px`);
1424
1437
  pulse.style.setProperty("--dsh-skin-pulse-color", pulseColors[pulseIndex % pulseColors.length]);
1425
1438
  pulseIndex += 1;
1426
1439
  if (decorLayer instanceof Element) decorLayer.appendChild(pulse);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-skin-galactic-opera",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Unofficial cinematic space-opera dark skin bundle for the DSH Web GUI.",
5
5
  "repository": {
6
6
  "type": "git",