@lokiyou/pi-nano-footer 0.12.0 → 0.13.0

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/index.ts +6 -10
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -81,20 +81,16 @@ Editor.prototype.render = function (width: number): string[] {
81
81
  const rgb = extractRGB(saved);
82
82
  if (rgb) {
83
83
  const [r, g, b] = rgb;
84
- // 沿用输入框当前颜色,峰值泛白 + 背景阴影辉光
85
- // 周期 ~800ms,60fps 驱动
86
- const t = 0.5 + 0.5 * Math.sin(performance.now() / 400);
87
- const bright = 0.25 + 0.75 * t;
88
- const glow = t * t * 0.65; // 0~0.65 白色 blend,峰值明显泛白
84
+ // 纯前景呼吸:当前色 + 峰值白色辉光,0.8s 周期
85
+ // 无背景阴影,避免生硬灯管感
86
+ const t = 0.5 + 0.5 * Math.sin(performance.now() / 127);
87
+ const bright = 0.35 + 0.65 * t; // 35%~100%
88
+ const glow = t * t * 0.45; // 0~0.45 白色 blend
89
89
  const nr = Math.round(Math.min(255, r * bright + (255 - r) * glow));
90
90
  const ng = Math.round(Math.min(255, g * bright + (255 - g) * glow));
91
91
  const nb = Math.round(Math.min(255, b * bright + (255 - b) * glow));
92
- // 阴影光晕背景:铺满格子模拟辉光
93
- const sr = Math.round(nr * 0.2);
94
- const sg = Math.round(ng * 0.2);
95
- const sb = Math.round(nb * 0.2);
96
92
  this.borderColor = (str: string) =>
97
- `\x1b[48;2;${sr};${sg};${sb}m\x1b[38;2;${nr};${ng};${nb}m${str}\x1b[0m`;
93
+ `[38;2;${nr};${ng};${nb}m${str}`;
98
94
  }
99
95
  try {
100
96
  return origRender.call(this, width);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokiyou/pi-nano-footer",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "超轻量 powerline 风格 footer for Pi Coding Agent — 输入框脉冲发光,霓虹配色,实时显示模型、目录、上下文、token 和费用",
5
5
  "type": "module",
6
6
  "keywords": [