dsh-thinking-slider 0.4.1 → 0.4.3
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 +18 -3
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -123,6 +123,14 @@ window.__ModuleLoader__.load({
|
|
|
123
123
|
.tsl-card{position:fixed;z-index:1100;--tsl-knob:26px;width:320px;padding:18px 18px 16px;--dsw-elevation-stroke-color:var(--dsw-alias-border-l1,rgba(127,127,127,.18));border:0;border-radius:16px;background:var(--dsw-specific-menu,var(--dsw-alias-bg-layer-1,#fff));backdrop-filter:var(--dsw-menu-backdrop-filter,none);-webkit-backdrop-filter:var(--dsw-menu-backdrop-filter,none);color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-elevation-prominent,0 12px 40px rgba(0,0,0,.28));animation:tsl-in .14s ease-out}
|
|
124
124
|
@keyframes tsl-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
|
|
125
125
|
@media (prefers-reduced-motion: reduce){.tsl-card{animation:none}}
|
|
126
|
+
/* A wallpaper/glass plugin rewrites the surface tokens to translucent values and
|
|
127
|
+
sets --dsw-alias-bg-base to transparent, so the menu surface this card copies
|
|
128
|
+
becomes see-through and the wallpaper shows up as a band across the card. The
|
|
129
|
+
panel goes opaque exactly while such a plugin is active (it marks <body> with
|
|
130
|
+
data-we-wallpaper) and keeps DSH's frosted material otherwise. The rail keeps
|
|
131
|
+
its own opaque base either way. */
|
|
132
|
+
body[data-we-wallpaper] .tsl-card{background:#f2f3f7;-webkit-backdrop-filter:none;backdrop-filter:none}
|
|
133
|
+
body[data-we-wallpaper][data-ds-dark-theme] .tsl-card{background:#2a2b31}
|
|
126
134
|
.tsl-head{display:flex;align-items:center;justify-content:center;position:relative;min-height:26px;margin-bottom:2px}
|
|
127
135
|
.tsl-level{font-size:17px;line-height:26px;font-weight:500;letter-spacing:.02em;transition:color .18s ease}
|
|
128
136
|
.tsl-reset{position:absolute;right:-2px;top:0;display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:999px;background:0 0;color:var(--dsw-alias-label-caption);cursor:pointer;opacity:.85}
|
|
@@ -325,7 +333,10 @@ body[data-ds-dark-theme] .tsl-seg{background:linear-gradient(var(--dsw-alias-int
|
|
|
325
333
|
// as belonging to the selected level rather than the whole track.
|
|
326
334
|
const limit = limitOf(width, height, lookRef.current.fillFraction)
|
|
327
335
|
particle.x = atStart === true ? Math.random() * limit : -4
|
|
328
|
-
|
|
336
|
+
// Spread over the whole rail, not a middle strip: confining the field to
|
|
337
|
+
// 28%..72% of the height reads as a horizontal band across the track, and
|
|
338
|
+
// with a wallpaper behind the panel that band is impossible to unsee.
|
|
339
|
+
particle.y = height * (0.12 + Math.random() * 0.76)
|
|
329
340
|
particle.vx = (0.22 + Math.random() * 0.55) * (0.35 + energy)
|
|
330
341
|
particle.vy = (Math.random() - 0.5) * 0.3
|
|
331
342
|
particle.radius = 0.7 + Math.random() * 1.35
|
|
@@ -453,9 +464,13 @@ body[data-ds-dark-theme] .tsl-seg{background:linear-gradient(var(--dsw-alias-int
|
|
|
453
464
|
// A constant cell size in CSS pixels: the lattice must not reflow when
|
|
454
465
|
// the rail changes width, and the front keeps a pixel speed.
|
|
455
466
|
cellW = 4
|
|
456
|
-
|
|
467
|
+
// Derive the row count from the height and then divide it back, so the
|
|
468
|
+
// rows cover the rail exactly. Rounding a fixed cell height (height / 6)
|
|
469
|
+
// leaves a remainder that shows up as empty margins above and below the
|
|
470
|
+
// lattice — which reads as a band inside the track.
|
|
471
|
+
const rows = Math.max(1, Math.round(height / 4.33))
|
|
472
|
+
cellH = height / rows
|
|
457
473
|
const columns = Math.max(1, Math.round(width / cellW))
|
|
458
|
-
const rows = Math.max(1, Math.round(height / cellH))
|
|
459
474
|
cells = []
|
|
460
475
|
for (let row = 0; row < rows; row += 1) {
|
|
461
476
|
for (let column = 0; column < columns; column += 1) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-thinking-slider",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Three visual modes for picking a model's reasoning level in the DeepSeek Harness composer: hand back to the native selector, a gradient particle rail, or an energy-charging track. The levels themselves come from DSH.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|