@philomelcc/dsh-workbench 0.1.0 → 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 -33
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -947,7 +947,6 @@ window.__ModuleLoader__.load({
947
947
  .dsh-glow-on {
948
948
  position: relative;
949
949
  border-radius: var(--dsw-radius-md, 8px);
950
- animation: dsh-glow-breathe 2.8s ease-in-out infinite;
951
950
  }
952
951
  .dsh-glow-canvas {
953
952
  position: absolute;
@@ -965,37 +964,6 @@ div[data-row-key^="session:"]:has(svg[data-state="ongoing"]) svg[data-state="ong
965
964
  .dsh-glow-on > span:first-child > svg {
966
965
  display: none !important;
967
966
  }
968
- @keyframes dsh-glow-breathe {
969
- 0%, 100% {
970
- box-shadow:
971
- 0 0 0 1px rgba(99, 149, 255, 0.5),
972
- 0 0 8px 1px rgba(99, 149, 255, 0.2);
973
- }
974
- 50% {
975
- box-shadow:
976
- 0 0 0 1px rgba(130, 178, 255, 0.85),
977
- 0 0 16px 2px rgba(99, 149, 255, 0.42);
978
- }
979
- }
980
- /* 暗档:只有后台任务时,呼吸光也压到约 35% */
981
- .dsh-glow-on[data-glow-dim="1"] {
982
- animation: dsh-glow-breathe-dim 2.8s ease-in-out infinite;
983
- }
984
- @keyframes dsh-glow-breathe-dim {
985
- 0%, 100% {
986
- box-shadow:
987
- 0 0 0 1px rgba(99, 149, 255, 0.18),
988
- 0 0 4px 0 rgba(99, 149, 255, 0.07);
989
- }
990
- 50% {
991
- box-shadow:
992
- 0 0 0 1px rgba(130, 178, 255, 0.32),
993
- 0 0 8px 1px rgba(99, 149, 255, 0.15);
994
- }
995
- }
996
- @media (prefers-reduced-motion: reduce) {
997
- .dsh-glow-on { animation: none; }
998
- }
999
967
  `;
1000
968
 
1001
969
  function installGlow(ctx) {
@@ -1148,8 +1116,17 @@ div[data-row-key^="session:"]:has(svg[data-state="ongoing"]) svg[data-state="ong
1148
1116
  var r = radiusOf(width, height);
1149
1117
  var total = perimeter(width, height);
1150
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;
1151
1124
 
1152
- 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) + ")";
1153
1130
  context.beginPath();
1154
1131
  if (typeof context.roundRect === "function") {
1155
1132
  context.roundRect(0.5, 0.5, width - 1, height - 1, r);
@@ -1157,6 +1134,7 @@ div[data-row-key^="session:"]:has(svg[data-state="ongoing"]) svg[data-state="ong
1157
1134
  context.rect(0.5, 0.5, width - 1, height - 1);
1158
1135
  }
1159
1136
  context.stroke();
1137
+ context.restore();
1160
1138
 
1161
1139
  var count = Math.max(24, Math.ceil(total / STEP_PX));
1162
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.0",
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",