dsh-deepseek-style-theme 1.43.6 → 1.43.7

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 +33 -0
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -1852,6 +1852,24 @@ html[data-dshome-blur="off"] body{
1852
1852
  /** Edge-tint hue for the glass dispersion, following the DSTT colour. */
1853
1853
  const FLUID_HUES = { green: 152, blue: 221, red: 356 };
1854
1854
 
1855
+ /**
1856
+ * A cheap key over everything the palette derives from: the colour token and
1857
+ * the scheme marker, both on <body>.
1858
+ *
1859
+ * The ambient fluid compares this every rendered frame. Why polling instead
1860
+ * of trusting the notification chain: measured on the live page with the
1861
+ * instrumented build, the canvas was mounted once, the page WAS running the
1862
+ * patched bundle, and the fluid was demonstrably alive (both programs
1863
+ * compiled and linked, ping-pong FBOs complete, a draw pair per frame,
1864
+ * glError 0) -- yet u_color1..3 kept arriving as the light-blue triple for
1865
+ * the entire session while <body> said green. So the mount had resolved the
1866
+ * palette before the colour driver's first write, and nothing later re-read
1867
+ * the token. Two getAttribute calls per frame when nothing changed, and it
1868
+ * cannot miss a writer the way a listener can.
1869
+ */
1870
+ const dsttMarkerKey = () => (document.body.getAttribute('data-dshome-color') || 'green')
1871
+ + '|' + (document.body.hasAttribute('data-dshome-dark') ? 'dark' : 'light');
1872
+
1855
1873
  /** The active DSTT colour token. */
1856
1874
  function dshomeColor() {
1857
1875
  const value = document.body.getAttribute('data-dshome-color');
@@ -2045,6 +2063,13 @@ html[data-dshome-blur="off"] body{
2045
2063
  */
2046
2064
  function startAmbient() {
2047
2065
  if (!supportsWebgl2()) return startParticles();
2066
+ // Which build is running, readable from the page. The fluid palette is
2067
+ // resolved at mount and re-derived from the DOM afterwards (syncFluid +
2068
+ // markerPoll below); when a report says the background did not follow the
2069
+ // colour token, this marker is the first thing to check in the console:
2070
+ // window.__dshomeBuild -> '1.43.7 palette-poll'
2071
+ // It is also what tools/dstt-dark-report.js prints as buildMarker.
2072
+ try { window.__dshomeBuild = '1.43.7 palette-poll'; } catch (error) {}
2048
2073
  const canvas = document.createElement('canvas');
2049
2074
  canvas.setAttribute('data-dsh-deepseek-canvas', '');
2050
2075
  const style = canvas.style;
@@ -2111,7 +2136,15 @@ html[data-dshome-blur="off"] body{
2111
2136
  } catch (error) {
2112
2137
  tokenMirror = null;
2113
2138
  }
2139
+ // The backstop that actually fixed it. Events above are the fast path;
2140
+ // this poll is the guarantee. It is the same decision as
2141
+ // dsttMarkerKey()'s comment describes -- the palette is derived from the
2142
+ // DOM, so it is re-derived from the DOM, once every half second, for as
2143
+ // long as the canvas lives. syncFluid() itself is a no-op when the key is
2144
+ // unchanged, so the steady-state cost is two getAttribute calls.
2145
+ const markerPoll = setInterval(syncFluid, 500);
2114
2146
  return () => {
2147
+ clearInterval(markerPoll);
2115
2148
  unsubscribeColor();
2116
2149
  if (unsubscribeDark !== null) unsubscribeDark();
2117
2150
  unsubscribeGlass();
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": "1.43.6",
4
+ "version": "1.43.7",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "deepseek",