@philomelcc/dsh-workbench 0.1.1 → 0.1.2

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/client.js +11 -1
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -1116,8 +1116,17 @@ div[data-row-key^="session:"]:has(svg[data-state="ongoing"]) svg[data-state="ong
1116
1116
  var r = radiusOf(width, height);
1117
1117
  var total = perimeter(width, height);
1118
1118
  var t = (now % ORBIT_MS) / ORBIT_MS;
1119
+ // 呼吸边框:2.8s 一个周期,和原来 CSS 动画同节奏;在 canvas 内画,
1120
+ // 所以只会有一条边(不会再和 CSS box-shadow 叠成双线)。
1121
+ var breath = 0.5 + 0.5 * Math.sin((now / 2800) * Math.PI * 2);
1122
+ var dim = entry.lights === 1 ? 0.35 : 1;
1123
+ var edgeAlpha = (0.12 + breath * 0.33) * dim;
1119
1124
 
1120
- context.strokeStyle = "rgba(99, 149, 255, 0.07)";
1125
+ context.save();
1126
+ context.lineWidth = 1;
1127
+ context.strokeStyle = "rgba(99, 149, 255, " + edgeAlpha.toFixed(3) + ")";
1128
+ context.shadowBlur = (4 + breath * 10) * dim;
1129
+ context.shadowColor = "rgba(99, 149, 255, " + ((0.2 + breath * 0.35) * dim).toFixed(3) + ")";
1121
1130
  context.beginPath();
1122
1131
  if (typeof context.roundRect === "function") {
1123
1132
  context.roundRect(0.5, 0.5, width - 1, height - 1, r);
@@ -1125,6 +1134,7 @@ div[data-row-key^="session:"]:has(svg[data-state="ongoing"]) svg[data-state="ong
1125
1134
  context.rect(0.5, 0.5, width - 1, height - 1);
1126
1135
  }
1127
1136
  context.stroke();
1137
+ context.restore();
1128
1138
 
1129
1139
  var count = Math.max(24, Math.ceil(total / STEP_PX));
1130
1140
  for (var i = 0; i < count; i += 1) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@philomelcc/dsh-workbench",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "description": "Workbench shell for DeepSeek Harness: a view/page module API, shared UI primitives and a top-bar switcher.",
6
6
  "license": "MIT",