dsh-deepseek-style-theme 2.0.86 → 2.0.87

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/lib/client.js +79 -10
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -1109,15 +1109,27 @@ html,body{background-color:transparent!important}
1109
1109
  The invisible-text hazard stays open on purpose. A stuck appearance switch is
1110
1110
  a broken control; near-white text on a near-white page at least still reads
1111
1111
  once the marker agrees. Do not re-add these two rules. */
1112
- body:not([data-dshome-bg=custom]){background:radial-gradient(1200px 700px at 12% -10%,color-mix(in srgb,var(--ds-brand) 14%,transparent),transparent 60%),radial-gradient(1000px 600px at 105% 12%,color-mix(in srgb,var(--ds-brand-light) 16%,transparent),transparent 55%),radial-gradient(900px 700px at 50% 115%,color-mix(in srgb,var(--ds-brand) 10%,transparent),transparent 60%),linear-gradient(180deg,#fbfbfd 0%,#f5f6fa 100%);background-attachment:fixed}
1112
+ /* The themed background lives on a FIXED PSEUDO-ELEMENT, not on the body with
1113
+ background-attachment: fixed. Two reasons, and the second is the one the user hit:
1114
+ a fixed-attachment background is painted in its own phase, so Chromium's
1115
+ backdrop-filter does not sample it -- every glass pane over the page wash ended up
1116
+ blurring "nothing" and read as plain translucency ("现在的效果是半透明,没有背景模糊
1117
+ 效果"). A position:fixed layer is ordinary painted content and is part of the
1118
+ backdrop. The visual is the same (the wash stays put), and z-index:-2 keeps it under
1119
+ the fluid canvas (-1), which is what the glass should blur next. No backticks in this
1120
+ comment: it lives inside a template literal and a pair of them ends it. */
1121
+ body:not([data-dshome-bg=custom])::before{content:"";position:fixed;inset:0;z-index:-2;pointer-events:none;background:radial-gradient(1200px 700px at 12% -10%,color-mix(in srgb,var(--ds-brand) 14%,transparent),transparent 60%),radial-gradient(1000px 600px at 105% 12%,color-mix(in srgb,var(--ds-brand-light) 16%,transparent),transparent 55%),radial-gradient(900px 700px at 50% 115%,color-mix(in srgb,var(--ds-brand) 10%,transparent),transparent 60%),linear-gradient(180deg,#fbfbfd 0%,#f5f6fa 100%)}
1113
1122
  body[data-dshome-color=red]{--ds-brand:#F5222D;--ds-brand-deep:#CF1322;--ds-brand-mid:#FF4D4F;--ds-brand-light:#FF7875}
1114
1123
  body[data-dshome-color=blue]{--ds-brand:#4D6BFE;--ds-brand-deep:#3A65C2;--ds-brand-mid:#4176E6;--ds-brand-light:#73A3D2}
1115
1124
  body[data-dshome-dark]{--ds-brand:#10B981;--ds-brand-deep:#059669;--ds-brand-mid:#34D399;--ds-brand-light:#6EE7B7}
1116
- body[data-dshome-dark]:not([data-dshome-bg=custom]){background:radial-gradient(1100px 650px at 8% -8%,#0a3a28 0,transparent 62%),radial-gradient(950px 600px at 104% 10%,#0d4d35 0,transparent 58%),radial-gradient(800px 600px at 50% 118%,#06291c 0,transparent 60%),linear-gradient(180deg,#081b14 0%,#0a241a 55%,#081b14 100%);background-attachment:fixed}
1125
+ body[data-dshome-dark]:not([data-dshome-bg=custom])::before{background:radial-gradient(1100px 650px at 8% -8%,#0a3a28 0,transparent 62%),radial-gradient(950px 600px at 104% 10%,#0d4d35 0,transparent 58%),radial-gradient(800px 600px at 50% 118%,#06291c 0,transparent 60%),linear-gradient(180deg,#081b14 0%,#0a241a 55%,#081b14 100%)}
1117
1126
  body[data-dshome-dark][data-dshome-color=red]{--ds-brand:#FF4D4F;--ds-brand-deep:#F5222D;--ds-brand-mid:#FF7875;--ds-brand-light:#FFA39E}
1118
- body[data-dshome-dark][data-dshome-color=red]:not([data-dshome-bg=custom]){background:radial-gradient(1100px 650px at 8% -8%,#5c0f14 0,transparent 62%),radial-gradient(950px 600px at 104% 10%,#7d1a20 0,transparent 58%),radial-gradient(800px 600px at 50% 118%,#3f0a0e 0,transparent 60%),linear-gradient(180deg,#260709 0%,#330a0d 55%,#260709 100%);background-attachment:fixed}
1127
+ body[data-dshome-dark][data-dshome-color=red]:not([data-dshome-bg=custom])::before{background:radial-gradient(1100px 650px at 8% -8%,#5c0f14 0,transparent 62%),radial-gradient(950px 600px at 104% 10%,#7d1a20 0,transparent 58%),radial-gradient(800px 600px at 50% 118%,#3f0a0e 0,transparent 60%),linear-gradient(180deg,#260709 0%,#330a0d 55%,#260709 100%)}
1119
1128
  body[data-dshome-dark][data-dshome-color=blue]{--ds-brand:#5D79FF;--ds-brand-deep:#4D6BFE;--ds-brand-mid:#7A96FF;--ds-brand-light:#9DB9FF}
1120
- body[data-dshome-dark][data-dshome-color=blue]:not([data-dshome-bg=custom]){background:radial-gradient(1100px 650px at 8% -8%,#1a3870 0,transparent 62%),radial-gradient(950px 600px at 104% 10%,#2d5f9e 0,transparent 58%),radial-gradient(800px 600px at 50% 118%,#0d1f4a 0,transparent 60%),linear-gradient(180deg,#0a1a3a 0%,#0d1f4a 55%,#0a1a3a 100%);background-attachment:fixed}
1129
+ body[data-dshome-dark][data-dshome-color=blue]:not([data-dshome-bg=custom])::before{background:radial-gradient(1100px 650px at 8% -8%,#1a3870 0,transparent 62%),radial-gradient(950px 600px at 104% 10%,#2d5f9e 0,transparent 58%),radial-gradient(800px 600px at 50% 118%,#0d1f4a 0,transparent 60%),linear-gradient(180deg,#0a1a3a 0%,#0d1f4a 55%,#0a1a3a 100%)}
1130
+ /* The body itself must NOT paint a background: any opaque page background sits
1131
+ below the pseudo-element and would be what the glass samples. */
1132
+ body:not([data-dshome-bg=custom]){background:none!important}
1121
1133
  /* ── background recipe: 自选背景 ─────────────────────────────────────────
1122
1134
  The custom value never enters this sheet. It arrives as the custom property
1123
1135
  --dshome-custom-bg on <body>, and only after the client's CSS.supports()
@@ -1493,6 +1505,19 @@ body[data-dshome-dark] :is([class*="_headline"]){background:linear-gradient(120d
1493
1505
  { anchor: ".wSkVaW_scrollBody", css: `
1494
1506
  :is(${USER_BUBBLE}){background:rgba(255,255,255,.6)!important;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid rgba(0,0,0,.05);box-shadow:0 4px 16px rgba(13,30,60,.06)}
1495
1507
  body[data-dshome-dark] :is(${USER_BUBBLE}){background:rgba(21,42,86,.65)!important;border:1px solid rgba(255,255,255,.1);box-shadow:0 4px 16px rgba(0,0,0,.25)}
1508
+ ` },
1509
+ // The line under the composer (round/step/token stats, `[data-dsh-stats]` is
1510
+ // product markup that has never been renamed) gets the LENS touch the user
1511
+ // asked for: "模糊效果,你对对话窗下方文字进行放大(模拟液体放大)". A real lens
1512
+ // magnifies what is behind the glass, which a backdrop filter cannot do --
1513
+ // but the pane is directly above this line, so scaling it a touch reads as
1514
+ // the pane's magnification, and scaling it further while the pane leans
1515
+ // (html[data-dshome-leaning], written by startComposerTilt) ties the motion
1516
+ // to the hover. Small on purpose: 6% is a lens hint, 12% while leaning.
1517
+ { anchor: "[data-dsh-stats]", css: `
1518
+ [data-dsh-stats]{transform:scale(1.06);transform-origin:center center;transition:transform .24s cubic-bezier(.2,.8,.2,1)}
1519
+ html[data-dshome-leaning] [data-dsh-stats]{transform:scale(1.12)}
1520
+ @media (prefers-reduced-motion:reduce){[data-dsh-stats]{transition:none}}
1496
1521
  ` },
1497
1522
  // Trajectory view bar.
1498
1523
  { anchor: ".fV0t5q_root", css: `
@@ -1790,10 +1815,14 @@ html[data-dshome-glass="liquid"] :is(${USER_BUBBLE}){
1790
1815
  /* The composer leans under the cursor (see startComposerTilt). The transition
1791
1816
  is what turns the release into a settle rather than a snap: the ported
1792
1817
  routine writes the neutral transform back and only drops the inline
1793
- properties 240ms later. */
1818
+ properties 240ms later.
1819
+ will-change: transform used to sit here as a perf hint and is deliberately
1820
+ GONE: promoting the pane to its own layer is the other half of "no blur" --
1821
+ Chromium's backdrop sampling is unreliable on a will-changed element, and the
1822
+ compositor already promotes a transformed element while it is actually being
1823
+ transformed. The hint cost the effect it was meant to smooth. */
1794
1824
  html[data-dshome-glass="liquid"] [data-composer-card]{
1795
1825
  transition:transform .24s cubic-bezier(.2,.8,.2,1),background-color .18s ease,box-shadow .18s ease!important;
1796
- will-change:transform;
1797
1826
  }
1798
1827
  html[data-dshome-glass="liquid"] :is(${USER_BUBBLE}):hover{
1799
1828
  background-color:rgb(255 255 255 / .18)!important;
@@ -1859,8 +1888,11 @@ html[data-dshome-dispersion][data-dshome-glass="liquid"][data-dshome-composer="o
1859
1888
  actually behind it, so the fade shows up as a lighter band above 设置 (the
1860
1889
  user's red box). The pane itself already separates the list from the
1861
1890
  conversation, so the fade is dropped. Scoped to the sidebar and to the
1862
- product's own <hash>_fade naming so nothing else is touched. */
1863
- html[data-dshome-glass="liquid"] body .hHd-Xa_root [class*="_fade" i]{
1891
+ product's own <hash>_fade naming so nothing else is touched.
1892
+ NOT gated on the liquid recipe: it was, and the user sent a screenshot of the
1893
+ same light band in 白磨砂 ("白磨砂,有这个渐变") — the frosted pane is translucent
1894
+ too, so its end stop mismatches just the same. Both recipes drop it. */
1895
+ body .hHd-Xa_root [class*="_fade" i]{
1864
1896
  background-image:none!important;
1865
1897
  }
1866
1898
  /* The sidebar's own, heavier blur. Written after the two rules above because it
@@ -2421,6 +2453,9 @@ html[data-dshome-blur="off"] body{
2421
2453
  // `spots` (0 means the composer no longer matches TILT_SELECTOR), and the
2422
2454
  // reduced-motion case logs one info line instead of vanishing.
2423
2455
  const TILT_SELECTOR = '[data-composer-card],.uV2eYG_card';
2456
+ /** On <html> while the composer leans; the lens touch on the line under the
2457
+ * composer reads it (see the [data-dsh-stats] patch block). */
2458
+ const LEAN_ATTR = 'data-dshome-leaning';
2424
2459
  // 0.0175 rad was upstream's conservative lean, and after 2.0.85 finally made
2425
2460
  // the effect reachable the verdict was "倾斜效果很微弱" -- fair, at ~4 degrees
2426
2461
  // end to end over a pane this wide it reads as a wobble, not as depth. Raised
@@ -2493,6 +2528,7 @@ html[data-dshome-blur="off"] body{
2493
2528
  if (!tilted.has(spot)) return;
2494
2529
  releasedAt = performance.now();
2495
2530
  tilted.delete(spot);
2531
+ document.documentElement.removeAttribute(LEAN_ATTR);
2496
2532
  spot.style.transform = 'perspective(' + TILT_PERSPECTIVE + 'px) rotateX(0rad) rotateY(0rad) scale(1)';
2497
2533
  const handle = window.setTimeout(() => {
2498
2534
  settle.delete(spot);
@@ -2519,6 +2555,11 @@ html[data-dshome-blur="off"] body{
2519
2555
  + ' scale(' + TILT_SCALE + ')';
2520
2556
  if (!tilted.has(spot)) engagements += 1;
2521
2557
  tilted.add(spot);
2558
+ // The marker the lens touch reads (see the composer-stats block in
2559
+ // PATCH_BLOCKS): while the pane leans, the line under it is scaled a
2560
+ // little further, which is the closest thing to a lens without
2561
+ // touching the backdrop.
2562
+ if (!document.documentElement.hasAttribute(LEAN_ATTR)) document.documentElement.setAttribute(LEAN_ATTR, '');
2522
2563
  });
2523
2564
  };
2524
2565
  /**
@@ -2633,6 +2674,7 @@ html[data-dshome-blur="off"] body{
2633
2674
  spot.style.removeProperty('transform-origin');
2634
2675
  spot.style.removeProperty('transition');
2635
2676
  }
2677
+ document.documentElement.removeAttribute(LEAN_ATTR);
2636
2678
  current = null;
2637
2679
  };
2638
2680
  }
@@ -2651,7 +2693,7 @@ html[data-dshome-blur="off"] body{
2651
2693
  if (!supportsWebgl2()) return startParticles();
2652
2694
  // Which build is running, readable from the page (see README). One line in
2653
2695
  // the console answers "is the bundle I just installed actually live?".
2654
- try { window.__dshomeBuild = '2.0.86 glass-on noise-fix'; } catch (error) {}
2696
+ try { window.__dshomeBuild = '2.0.87 lens-blur'; } catch (error) {}
2655
2697
  const canvas = document.createElement('canvas');
2656
2698
  canvas.setAttribute('data-dsh-deepseek-canvas', '');
2657
2699
  const style = canvas.style;
@@ -2782,6 +2824,33 @@ html[data-dshome-blur="off"] body{
2782
2824
  recipe: dsttGetGlass()
2783
2825
  });
2784
2826
  } catch (error) {}
2827
+ /**
2828
+ * "Why is there no blur" answered in one call: the computed backdrop chain of
2829
+ * every glass surface, the two things that can silently stop Chromium from
2830
+ * sampling a backdrop (a fixed-attachment body background and a will-changed
2831
+ * pane), and the setting that turns the radii off on purpose.
2832
+ */
2833
+ try {
2834
+ window.__dshomeGlassProbe = () => {
2835
+ const card = document.querySelector(TILT_SELECTOR);
2836
+ const chain = (selector, pseudo) => {
2837
+ const node = document.querySelector(selector);
2838
+ if (node === null) return null;
2839
+ try { return getComputedStyle(node, pseudo === undefined ? null : pseudo).backdropFilter; } catch (error) { return 'ERR'; }
2840
+ };
2841
+ return {
2842
+ recipe: dsttGetGlass(),
2843
+ backdropBlurSetting: dsttState.blur,
2844
+ bodyBackgroundAttachment: getComputedStyle(document.body).backgroundAttachment,
2845
+ bodyBackgroundImage: getComputedStyle(document.body).backgroundImage.slice(0, 32),
2846
+ washLayer: getComputedStyle(document.body, '::before').position,
2847
+ tiltCard: card === null ? null : getComputedStyle(card).backdropFilter,
2848
+ tiltCardWillChange: card === null ? null : (getComputedStyle(card).willChange || 'auto'),
2849
+ sidebar: chain('.hHd-Xa_root', '::before'),
2850
+ bubble: chain(USER_BUBBLE)
2851
+ };
2852
+ };
2853
+ } catch (error) {}
2785
2854
  // Both recipes share one filter pair, so the recipe selects the scale:
2786
2855
  // 104 for liquid (visible edge refraction) and the untouched 60 for
2787
2856
  // frosted, which is what the pane has always used.
@@ -2815,7 +2884,7 @@ html[data-dshome-blur="off"] body{
2815
2884
  }
2816
2885
 
2817
2886
  function startParticles() {
2818
- try { window.__dshomeBuild = '2.0.86 glass-on noise-fix'; } catch (error) {}
2887
+ try { window.__dshomeBuild = '2.0.87 lens-blur'; } catch (error) {}
2819
2888
  const canvas = document.createElement('canvas');
2820
2889
  canvas.setAttribute('data-dsh-deepseek-canvas', '');
2821
2890
  const style = canvas.style;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-deepseek-style-theme",
3
3
  "description": "DeepSeek official-home style theme: WebGL fluid-flow background, liquid glass with SVG edge refraction, glass sidebar and composer, frosted header, running-subagent progress panel, and DeepSeek brand link for the dsh web GUI",
4
- "version": "2.0.86",
4
+ "version": "2.0.87",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "deepseek",