dsh-deepseek-style-theme 1.43.6 → 1.43.8
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.
- package/lib/client.js +91 -13
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -1837,21 +1837,84 @@ html[data-dshome-blur="off"] body{
|
|
|
1837
1837
|
}
|
|
1838
1838
|
|
|
1839
1839
|
/**
|
|
1840
|
-
* Fluid palette per DSTT colour
|
|
1841
|
-
*
|
|
1842
|
-
*
|
|
1843
|
-
*
|
|
1844
|
-
*
|
|
1845
|
-
*
|
|
1840
|
+
* Fluid palette per DSTT colour, built the way the upstream fluid builds its
|
|
1841
|
+
* own: three tones off ONE hue with high saturation and a lightness ramp
|
|
1842
|
+
* (dsh-theme-mineradio's `fluidToneColors`).
|
|
1843
|
+
*
|
|
1844
|
+
* This replaces hand-picked hex triples, and the measurement is why. On the
|
|
1845
|
+
* live page, with the colour token green, the canvas read 235,240,252 while
|
|
1846
|
+
* the CSS background behind it read 233,242,241: the light green set
|
|
1847
|
+
* (#4FBE92 / #FFFFFF / #D6F2E4) is three near-white tones, and three
|
|
1848
|
+
* near-white tones average into a wash in which the eye reads the blue
|
|
1849
|
+
* channel. Hiding the canvas turned the page green instantly -- the canvas
|
|
1850
|
+
* was painting the wash over it. Upstream's lead tone is hsl(hue, 1, .27..),
|
|
1851
|
+
* i.e. genuinely saturated, which is what makes a hue swap visible.
|
|
1852
|
+
*
|
|
1853
|
+
* Hues stay the site's own (FLUID_HUES below).
|
|
1846
1854
|
*/
|
|
1847
|
-
const
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1855
|
+
const FLUID_DEPTH = { light: 22, dark: 26 };
|
|
1856
|
+
|
|
1857
|
+
/** hsl -> #rrggbb, same shape as the upstream helper. */
|
|
1858
|
+
function fluidHsl(h, s, l) {
|
|
1859
|
+
const hue = ((h % 360) + 360) % 360;
|
|
1860
|
+
const c = (1 - Math.abs(2 * l - 1)) * s;
|
|
1861
|
+
const x = c * (1 - Math.abs(((hue / 60) % 2) - 1));
|
|
1862
|
+
const m = l - c / 2;
|
|
1863
|
+
const seg = Math.floor(hue / 60) % 6;
|
|
1864
|
+
const rgb = seg === 0 ? [c, x, 0]
|
|
1865
|
+
: seg === 1 ? [x, c, 0]
|
|
1866
|
+
: seg === 2 ? [0, c, x]
|
|
1867
|
+
: seg === 3 ? [0, x, c]
|
|
1868
|
+
: seg === 4 ? [x, 0, c]
|
|
1869
|
+
: [c, 0, x];
|
|
1870
|
+
return '#' + rgb.map((v) => Math.round((v + m) * 255).toString(16).padStart(2, '0')).join('');
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
/**
|
|
1874
|
+
* The three fluid tones for one hue. `depth` is upstream's knob: 0 is the
|
|
1875
|
+
* deepest and most saturated, 100 the palest. The dark scheme walks the same
|
|
1876
|
+
* ramp so the flow still reads as a dark shell.
|
|
1877
|
+
*/
|
|
1878
|
+
function fluidToneColors(dark, hue, depth) {
|
|
1879
|
+
const d = Math.min(1, Math.max(0, depth / 100));
|
|
1880
|
+
const ramp = (deep, mid, pale) => (d < 0.5
|
|
1881
|
+
? deep + (mid - deep) * d / 0.5
|
|
1882
|
+
: mid + (pale - mid) * (d - 0.5) / 0.5);
|
|
1883
|
+
if (dark) {
|
|
1884
|
+
return [
|
|
1885
|
+
fluidHsl(hue, 0.85, ramp(0, 0.46, 0.62)),
|
|
1886
|
+
fluidHsl(hue, 0.9, ramp(0, 0.305, 0.45)),
|
|
1887
|
+
fluidHsl(hue, 0.5, ramp(0, 0.075, 0.1))
|
|
1888
|
+
];
|
|
1889
|
+
}
|
|
1890
|
+
return [
|
|
1891
|
+
fluidHsl(hue, 1, ramp(0.27, 0.45, 0.9)),
|
|
1892
|
+
fluidHsl(hue, 0.55, 0.86),
|
|
1893
|
+
fluidHsl(hue, 0.25, 0.955)
|
|
1894
|
+
];
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1852
1897
|
/** Edge-tint hue for the glass dispersion, following the DSTT colour. */
|
|
1853
1898
|
const FLUID_HUES = { green: 152, blue: 221, red: 356 };
|
|
1854
1899
|
|
|
1900
|
+
/**
|
|
1901
|
+
* A cheap key over everything the palette derives from: the colour token and
|
|
1902
|
+
* the scheme marker, both on <body>.
|
|
1903
|
+
*
|
|
1904
|
+
* The ambient fluid compares this every rendered frame. Why polling instead
|
|
1905
|
+
* of trusting the notification chain: measured on the live page with the
|
|
1906
|
+
* instrumented build, the canvas was mounted once, the page WAS running the
|
|
1907
|
+
* patched bundle, and the fluid was demonstrably alive (both programs
|
|
1908
|
+
* compiled and linked, ping-pong FBOs complete, a draw pair per frame,
|
|
1909
|
+
* glError 0) -- yet u_color1..3 kept arriving as the light-blue triple for
|
|
1910
|
+
* the entire session while <body> said green. So the mount had resolved the
|
|
1911
|
+
* palette before the colour driver's first write, and nothing later re-read
|
|
1912
|
+
* the token. Two getAttribute calls per frame when nothing changed, and it
|
|
1913
|
+
* cannot miss a writer the way a listener can.
|
|
1914
|
+
*/
|
|
1915
|
+
const dsttMarkerKey = () => (document.body.getAttribute('data-dshome-color') || 'green')
|
|
1916
|
+
+ '|' + (document.body.hasAttribute('data-dshome-dark') ? 'dark' : 'light');
|
|
1917
|
+
|
|
1855
1918
|
/** The active DSTT colour token. */
|
|
1856
1919
|
function dshomeColor() {
|
|
1857
1920
|
const value = document.body.getAttribute('data-dshome-color');
|
|
@@ -1862,8 +1925,8 @@ html[data-dshome-blur="off"] body{
|
|
|
1862
1925
|
}
|
|
1863
1926
|
/** The whole fluid parameter set for the current DSTT colour and scheme. */
|
|
1864
1927
|
function dshomeFluidParams() {
|
|
1865
|
-
const
|
|
1866
|
-
const pick =
|
|
1928
|
+
const dark = dshomeDark();
|
|
1929
|
+
const pick = fluidToneColors(dark, FLUID_HUES[dshomeColor()], dark ? FLUID_DEPTH.dark : FLUID_DEPTH.light);
|
|
1867
1930
|
// `mouseFeed` is ours, not upstream's: false keeps the cursor from
|
|
1868
1931
|
// writing a wake into the flow field (see the DSTT `fluidBrush` setting).
|
|
1869
1932
|
return { ...SITE_FLUID_PARAMS, color1: pick[0], color2: pick[1], color3: pick[2], mouseFeed: dsttBrush() };
|
|
@@ -2045,6 +2108,13 @@ html[data-dshome-blur="off"] body{
|
|
|
2045
2108
|
*/
|
|
2046
2109
|
function startAmbient() {
|
|
2047
2110
|
if (!supportsWebgl2()) return startParticles();
|
|
2111
|
+
// Which build is running, readable from the page. The fluid palette is
|
|
2112
|
+
// resolved at mount and re-derived from the DOM afterwards (syncFluid +
|
|
2113
|
+
// markerPoll below); when a report says the background did not follow the
|
|
2114
|
+
// colour token, this marker is the first thing to check in the console:
|
|
2115
|
+
// window.__dshomeBuild -> '1.43.7 palette-poll'
|
|
2116
|
+
// It is also what tools/dstt-dark-report.js prints as buildMarker.
|
|
2117
|
+
try { window.__dshomeBuild = '1.43.7 palette-poll'; } catch (error) {}
|
|
2048
2118
|
const canvas = document.createElement('canvas');
|
|
2049
2119
|
canvas.setAttribute('data-dsh-deepseek-canvas', '');
|
|
2050
2120
|
const style = canvas.style;
|
|
@@ -2111,7 +2181,15 @@ html[data-dshome-blur="off"] body{
|
|
|
2111
2181
|
} catch (error) {
|
|
2112
2182
|
tokenMirror = null;
|
|
2113
2183
|
}
|
|
2184
|
+
// The backstop that actually fixed it. Events above are the fast path;
|
|
2185
|
+
// this poll is the guarantee. It is the same decision as
|
|
2186
|
+
// dsttMarkerKey()'s comment describes -- the palette is derived from the
|
|
2187
|
+
// DOM, so it is re-derived from the DOM, once every half second, for as
|
|
2188
|
+
// long as the canvas lives. syncFluid() itself is a no-op when the key is
|
|
2189
|
+
// unchanged, so the steady-state cost is two getAttribute calls.
|
|
2190
|
+
const markerPoll = setInterval(syncFluid, 500);
|
|
2114
2191
|
return () => {
|
|
2192
|
+
clearInterval(markerPoll);
|
|
2115
2193
|
unsubscribeColor();
|
|
2116
2194
|
if (unsubscribeDark !== null) unsubscribeDark();
|
|
2117
2195
|
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.
|
|
4
|
+
"version": "1.43.8",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"deepseek",
|