@huai_xin/dsh-model-picker 0.2.1 → 0.3.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 (3) hide show
  1. package/README.md +9 -0
  2. package/client.js +235 -43
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -19,6 +19,10 @@ DSH 自带的模型选择器是按两级菜单设计的。模型一多,找一
19
19
  **档位是一条能拖的滑杆** — 轨道上是各档位的刻度,拖动时滑块跟手,松手才提交一次。滑块整个
20
20
  待在轨道里面,不会压出边界;面板是紧凑尺寸,不占半个屏幕。
21
21
 
22
+ **档位越高,喷射越远越密** — 滑块身后会拖出一束白色方块,强度随档位变化:最低档只飘出几颗、
23
+ 刚离开滑块就散掉,最高档是 60 颗、能一路撒到轨道中段。最高档还会多一层拖尾。粒子跟随档位实时
24
+ 变化,拖动时也跟着滑块走。
25
+
22
26
  **跟着模型列表实时变** — 别的插件改了可用模型(开关模型、导入账号、探测到模型不可用……),这个列表会立刻跟着变,不用刷新页面。
23
27
 
24
28
  **新会话显示默认模型** — 而不是空着或显示"没有可用模型"。
@@ -55,6 +59,11 @@ dsh plugin --profile <你的 profile> add /path/to/dsh-model-picker
55
59
 
56
60
  本插件替换的只是那层 UI:把两级菜单换成一次点开的可搜索列表,把思考档位拆成独立控件。
57
61
 
62
+ ## 会不会挡住别的按钮
63
+
64
+ 不会。这个面板会主动请求宿主抬高输入区的层级(`data-trigger-menu`),所以聊天区右下角那个
65
+ 「跳到底部」按钮不会盖在面板上面。
66
+
58
67
  ## 兼容性
59
68
 
60
69
  需要 DSH `0.2.1-rc` 及以上。插件本身不认识任何具体 provider——任何 provider 插件注册的模型都会出现在列表里。
package/client.js CHANGED
@@ -343,24 +343,129 @@ function createEffortSlider(React) {
343
343
  * height. `dx` / `dy` / `sz` / `rot` stop the squares from marching in step, and
344
344
  * the per-particle `--i` turns one keyframe into a continuous stream (see the
345
345
  * negative `animation-delay` in the stylesheet).
346
+ *
347
+ * The entries are ordered so that taking the FIRST N of them always gives a spread
348
+ * across the whole cross-section: the level only ever slices this table, it never
349
+ * reorders it. `dy0` therefore alternates up/down rather than counting from -11 to
350
+ * 11, which would leave a low level emitting only from the top edge.
346
351
  */
347
352
  const EMIT = [
348
- { dy0: -11, dx: -58, dy: -3, sz: 4, rot: 0 },
349
- { dy0: -7, dx: -74, dy: -5, sz: 3, rot: 45 },
350
- { dy0: -3, dx: -62, dy: -1, sz: 5, rot: 0 },
351
- { dy0: 1, dx: -88, dy: 2, sz: 3, rot: 90 },
352
- { dy0: 5, dx: -66, dy: 4, sz: 4, rot: 0 },
353
- { dy0: 9, dx: -80, dy: 6, sz: 3, rot: 45 },
354
- { dy0: -9, dx: -92, dy: -6, sz: 3, rot: 90 },
355
- { dy0: -5, dx: -54, dy: -2, sz: 4, rot: 0 },
356
- { dy0: -1, dx: -70, dy: 0, sz: 3, rot: 45 },
357
- { dy0: 3, dx: -84, dy: 3, sz: 4, rot: 0 },
358
- { dy0: 7, dx: -60, dy: 5, sz: 3, rot: 90 },
359
- { dy0: 11, dx: -76, dy: 7, sz: 3, rot: 0 },
360
- { dy0: -8, dx: -68, dy: -4, sz: 4, rot: 45 },
361
- { dy0: 0, dx: -90, dy: 1, sz: 3, rot: 0 },
362
- { dy0: 6, dx: -52, dy: 4, sz: 4, rot: 90 },
363
- { dy0: -2, dx: -78, dy: -1, sz: 3, rot: 0 }
353
+ { dy0: 0, dx: -143, dy: 1, sz: 3, rot: 0 },
354
+ { dy0: -8, dx: -118, dy: -4, sz: 4, rot: 45 },
355
+ { dy0: 8, dx: -124, dy: 5, sz: 3, rot: 90 },
356
+ { dy0: -4, dx: -98, dy: -2, sz: 4, rot: 0 },
357
+ { dy0: 4, dx: -108, dy: 3, sz: 4, rot: 45 },
358
+ { dy0: -11, dx: -130, dy: -6, sz: 3, rot: 90 },
359
+ { dy0: 11, dx: -136, dy: 7, sz: 3, rot: 0 },
360
+ { dy0: -2, dx: -88, dy: -1, sz: 3, rot: 45 },
361
+ { dy0: 2, dx: -95, dy: 2, sz: 4, rot: 0 },
362
+ { dy0: -6, dx: -150, dy: -3, sz: 3, rot: 90 },
363
+ { dy0: 6, dx: -114, dy: 4, sz: 4, rot: 45 },
364
+ { dy0: -9, dx: -104, dy: -5, sz: 3, rot: 0 },
365
+ { dy0: 9, dx: -128, dy: 6, sz: 3, rot: 90 },
366
+ { dy0: -1, dx: -91, dy: 0, sz: 4, rot: 45 },
367
+ { dy0: 1, dx: -101, dy: 1, sz: 3, rot: 0 },
368
+ { dy0: -5, dx: -110, dy: -2, sz: 4, rot: 90 },
369
+ { dy0: 5, dx: -121, dy: 3, sz: 3, rot: 0 },
370
+ { dy0: -3, dx: -85, dy: -1, sz: 3, rot: 45 },
371
+ // A second pass over the same cross-section, offset in time by the per-particle
372
+ // delay: it doubles the density without making the stream look striped, and gives
373
+ // the high levels enough material to read as a real plume.
374
+ { dy0: -10, dx: -108, dy: -5, sz: 3, rot: 0 },
375
+ { dy0: 10, dx: -104, dy: 5, sz: 3, rot: 45 },
376
+ { dy0: -7, dx: -140, dy: -3, sz: 4, rot: 90 },
377
+ { dy0: 7, dx: -134, dy: 4, sz: 4, rot: 0 },
378
+ { dy0: -5, dx: -95, dy: -2, sz: 3, rot: 45 },
379
+ { dy0: 5, dx: -91, dy: 2, sz: 3, rot: 90 },
380
+ { dy0: -12, dx: -128, dy: -6, sz: 3, rot: 0 },
381
+ { dy0: 12, dx: -121, dy: 6, sz: 3, rot: 45 },
382
+ { dy0: -3, dx: -146, dy: -1, sz: 4, rot: 90 },
383
+ { dy0: 3, dx: -143, dy: 1, sz: 4, rot: 0 },
384
+ { dy0: -1, dx: -101, dy: 0, sz: 3, rot: 45 },
385
+ { dy0: 1, dx: -98, dy: 0, sz: 3, rot: 0 },
386
+ // A third pass. The high levels need enough material to read as a dense plume
387
+ // rather than a sparse spray, and because only a slice of this table is rendered
388
+ // the extra entries cost the low levels nothing. The timing stagger in the
389
+ // stylesheet spreads every pass out, so density rises without banding.
390
+ { dy0: -9, dx: -114, dy: -4, sz: 4, rot: 0 },
391
+ { dy0: 9, dx: -110, dy: 4, sz: 3, rot: 45 },
392
+ { dy0: -4, dx: -136, dy: -2, sz: 3, rot: 90 },
393
+ { dy0: 4, dx: -130, dy: 2, sz: 4, rot: 0 },
394
+ { dy0: -11, dx: -124, dy: -5, sz: 3, rot: 45 },
395
+ { dy0: 11, dx: -118, dy: 5, sz: 3, rot: 90 },
396
+ { dy0: -6, dx: -95, dy: -3, sz: 4, rot: 0 },
397
+ { dy0: 6, dx: -91, dy: 3, sz: 3, rot: 45 },
398
+ { dy0: -2, dx: -140, dy: -1, sz: 3, rot: 90 },
399
+ { dy0: 2, dx: -134, dy: 1, sz: 4, rot: 0 },
400
+ { dy0: -8, dx: -104, dy: -4, sz: 3, rot: 45 },
401
+ { dy0: 8, dx: -101, dy: 4, sz: 3, rot: 90 },
402
+ // A fourth pass, different seam. Each pass re-covers the same cross-section at a
403
+ // different spacing so the stream stays dense instead of clumping into bands; the
404
+ // per-particle delay in the stylesheet then interleaves all four.
405
+ { dy0: -10, dx: -121, dy: -5, sz: 3, rot: 0 },
406
+ { dy0: 10, dx: -114, dy: 5, sz: 4, rot: 45 },
407
+ { dy0: -5, dx: -143, dy: -2, sz: 3, rot: 90 },
408
+ { dy0: 5, dx: -136, dy: 2, sz: 3, rot: 0 },
409
+ { dy0: -12, dx: -108, dy: -6, sz: 3, rot: 45 },
410
+ { dy0: 12, dx: -104, dy: 6, sz: 3, rot: 90 },
411
+ { dy0: -7, dx: -128, dy: -3, sz: 4, rot: 0 },
412
+ { dy0: 7, dx: -124, dy: 3, sz: 3, rot: 45 },
413
+ { dy0: -1, dx: -88, dy: 0, sz: 4, rot: 90 },
414
+ { dy0: 1, dx: -91, dy: 0, sz: 3, rot: 0 },
415
+ { dy0: -9, dx: -134, dy: -4, sz: 3, rot: 45 },
416
+ { dy0: 9, dx: -130, dy: 4, sz: 4, rot: 90 },
417
+ { dy0: -4, dx: -98, dy: -2, sz: 3, rot: 0 },
418
+ { dy0: 4, dx: -95, dy: 2, sz: 3, rot: 45 },
419
+ { dy0: -11, dx: -118, dy: -5, sz: 4, rot: 90 },
420
+ { dy0: 11, dx: -110, dy: 5, sz: 3, rot: 0 },
421
+ { dy0: -3, dx: -150, dy: -1, sz: 3, rot: 45 },
422
+ { dy0: 3, dx: -140, dy: 1, sz: 4, rot: 90 }
423
+ ]
424
+
425
+ /**
426
+ * How much of the exhaust a level gets.
427
+ *
428
+ * The amount of work a level asks for is the one thing the control is saying, so
429
+ * the exhaust scales with it and the spread between the ends is deliberately wide:
430
+ * the lowest level emits a handful of squares barely past the knob, the highest
431
+ * emits the whole table and throws them roughly three times as far. A narrow range
432
+ * (the first version went 0.28..1.00) made every level look the same at a glance.
433
+ *
434
+ * @param index - the level's position, 0-based.
435
+ * @param count - how many levels the model declares.
436
+ * @returns `{ share, reach }`, both 0..1.
437
+ */
438
+ const exhaustFor = (index, count) => {
439
+ if (count <= 1) return { share: 0.5, reach: 0.5 }
440
+ const at = index / (count - 1)
441
+ // The curve is EASED rather than linear so the ends separate visually, and the
442
+ // floor is low enough that the lowest level is a scatter of a few squares rather
443
+ // than a plume. The reach tops out at 1.0 (the table's own distances) so the
444
+ // furthest level still lands inside the rail rather than being clipped by it.
445
+ const eased = at * at
446
+ return { share: 0.08 + eased * 0.92, reach: 0.22 + at * 0.78 }
447
+ }
448
+
449
+ /**
450
+ * The streaks left behind the squares.
451
+ *
452
+ * These read as a SHEET of parallel lines, not as a wedge: every streak is the same
453
+ * length and the same opacity, and they are evenly spaced down the knob's full
454
+ * height. An earlier version tapered them (long in the middle, short at the edges)
455
+ * so the silhouette converged on the knob like a flame, which is not what the bar
456
+ * should look like — the exhaust leaves the whole cross-section at once.
457
+ *
458
+ * The trail is reserved for the TOP level only (see `withTrail` below): it marks the
459
+ * ceiling of the scale, and drawing it at every level left nothing to escalate to.
460
+ *
461
+ * `off` is a PIXEL offset from the knob's centre line, not a percentage: the emitter
462
+ * is a zero-height box, so a percentage resolves against zero and stacks every
463
+ * streak on the centre. The spread covers the knob's diameter (28px) edge to edge.
464
+ */
465
+ const TRAIL = [
466
+ { off: -12 }, { off: -9 }, { off: -6 }, { off: -3 },
467
+ { off: 0 },
468
+ { off: 3 }, { off: 6 }, { off: 9 }, { off: 12 }
364
469
  ]
365
470
 
366
471
  return function EffortSlider({ efforts, activeId, disabled, onChange, t, caption }) {
@@ -395,6 +500,17 @@ function createEffortSlider(React) {
395
500
  // A model with just one effort keeps its stop in the middle.
396
501
  const position = (at) => count <= 1 ? '50%' : `${(at / (count - 1)) * 100}%`
397
502
 
503
+ // The level drives the exhaust: more of the table, and thrown further.
504
+ const exhaust = exhaustFor(index, count)
505
+ /**
506
+ * The trail belongs to the top level only.
507
+ *
508
+ * It is the visual ceiling of the scale — the thing the last stop has that no
509
+ * other stop does. Drawing it at every level (the first version) made the top
510
+ * level feel like more of the same instead of the end of the range.
511
+ */
512
+ const withTrail = count > 1 && index === count - 1
513
+
398
514
  return h('div', {
399
515
  // `dmp-slider-dragging` drops the left transition on the knob, the fill and
400
516
  // the emitter together. Without it the knob eases to its new stop over 150ms
@@ -469,9 +585,22 @@ function createEffortSlider(React) {
469
585
  * track, so it shares the knob's coordinate space and its transition —
470
586
  * which is what keeps the spawn point under the knob while it moves.
471
587
  * The rail's clip-path trims whatever drifts past the end cap.
588
+ *
589
+ * How MANY particles exist and how FAR they travel both scale with the
590
+ * level: `--dmp-emit-reach` multiplies every particle's `dx` / `dy` in the
591
+ * stylesheet, and only the first `share` of the table is rendered at all.
592
+ * Keeping the unused entries out of the DOM (rather than hiding them) also
593
+ * means a low level runs a couple of animations instead of eighteen.
472
594
  */
473
- h('span', { className: 'dmp-emit', 'aria-hidden': true },
474
- EMIT.map((particle, at) => h('i', {
595
+ h('span', {
596
+ className: 'dmp-emit',
597
+ 'aria-hidden': true,
598
+ // The top level is what turns the trail on; CSS cross-fades the change.
599
+ 'data-trail': withTrail ? 'on' : 'off',
600
+ style: { '--dmp-emit-reach': exhaust.reach }
601
+ },
602
+ EMIT.slice(0, Math.max(2, Math.round(EMIT.length * exhaust.share)))
603
+ .map((particle, at) => h('i', {
475
604
  key: at,
476
605
  className: 'dmp-emit-p',
477
606
  style: {
@@ -482,6 +611,14 @@ function createEffortSlider(React) {
482
611
  '--sz': `${particle.sz}px`,
483
612
  '--rot': `${particle.rot}deg`
484
613
  }
614
+ })),
615
+ // The trail is always in the DOM; `data-trail` fades it in at the top level
616
+ // only. Mounting it conditionally made it pop in and out as the knob
617
+ // crossed the last stop, which was the one abrupt moment in the control.
618
+ TRAIL.map((streak, at) => h('i', {
619
+ key: `trail-${at}`,
620
+ className: 'dmp-emit-trail',
621
+ style: { '--n': at, '--off': `${streak.off}px` }
485
622
  }))),
486
623
  h('div', { className: 'dmp-slider-dots', 'aria-hidden': true },
487
624
  efforts.map((effort, at) => h('span', {
@@ -823,31 +960,80 @@ const CSS = `
823
960
  .dmp-emit { position: absolute; top: 50%; left: var(--dmp-effort-at);
824
961
  width: 0; height: 0; z-index: 3; pointer-events: none;
825
962
  transition: left .15s ease-out; }
826
- /* One square. The dy0 offset spreads the spawn points down the knob cross-section; the
827
- extra dy/dx send each one its own way so they do not travel as a block. */
963
+ /* One square. The dy0 offset spreads the spawn points down the knob cross-section;
964
+ the extra dy/dx send each one its own way so they do not travel as a block.
965
+
966
+ The colour is FIXED WHITE, not a theme token. The particles are meant to read as
967
+ light thrown off the bar, and the theme's primary label flips to near-black on a
968
+ light surface — which painted black specks over a pale blue fill. White is the one
969
+ value that works against both surfaces, so it is deliberately not themed.
970
+ --dmp-emit-reach (set per level) multiplies the travel: a low level throws its
971
+ squares a short way, a high level throws them much further. */
828
972
  .dmp-emit-p { position: absolute; left: 0; top: 0;
829
973
  width: var(--sz, 4px); height: var(--sz, 4px); border-radius: 1px;
830
- background: color-mix(in srgb, var(--dsw-alias-label-primary) 92%, transparent);
831
- box-shadow: 0 0 4px color-mix(in srgb,
832
- var(--dmp-accent) 80%, transparent);
974
+ background: #fff;
975
+ box-shadow: 0 0 4px #fff;
833
976
  opacity: 0; transform: translate(-50%, -50%);
834
- animation: dmp-emit 1.7s cubic-bezier(.25,.1,.6,1) infinite;
835
- animation-delay: calc(var(--i) * -106ms); }
836
- /* The streak left behind the sheet of squares. */
837
- .dmp-emit::before { content: ''; position: absolute; right: 4px; top: 50%;
838
- width: 54px; height: 8px; transform: translateY(-50%); border-radius: 6px;
977
+ /* Speed and rate.
978
+ The duration is how fast one square crosses its path; the delay is how far apart
979
+ consecutive squares are in time. Shortening both raises the speed AND the firing
980
+ rate: 1.7s / 106ms read as a lazy drift, 1.05s / 58ms reads as a jet. The delay
981
+ stays well under the duration on purpose — it has to, or the stream develops a
982
+ visible seam where one cycle hands over to the next. */
983
+ animation: dmp-emit 1.05s cubic-bezier(.22,.08,.62,1) infinite;
984
+ animation-delay: calc(var(--i) * -58ms); }
985
+ /* The streaks left behind the sheet of squares.
986
+ A SHEET of parallel lines, not a wedge: all nine are the same length, the same
987
+ weight and the same opacity, evenly spaced across the knob's diameter. An earlier
988
+ version tapered them and let each drift, which made the silhouette converge on the
989
+ knob like a flame; the exhaust should leave the whole cross-section at once, so the
990
+ lines are deliberately uniform. Only the total length follows the level's reach.
991
+
992
+ The offset is a PIXEL amount around the centre, not a percentage: the emitter is a
993
+ zero-height box, and a percentage top resolves against that zero height, which
994
+ collapsed every streak onto the centre line.
995
+
996
+ The trail is ALWAYS in the DOM and fades in and out through opacity, rather than
997
+ being mounted only for the top level. Mounting it on the fly made it pop into
998
+ existence the instant the knob reached the last stop and vanish the instant it left
999
+ — the one jarring moment in an otherwise smooth control. Because opacity carries
1000
+ the on/off state, the pulse animation drives filter instead, so the two never
1001
+ fight over the same property. */
1002
+ .dmp-emit-trail { position: absolute; right: 4px; top: 50%;
1003
+ width: calc(150px * var(--dmp-emit-reach, 1));
1004
+ height: 2px; border-radius: 1px;
1005
+ transform: translateY(calc(-50% + var(--off, 0px)));
839
1006
  background: linear-gradient(270deg,
840
- color-mix(in srgb, var(--dsw-alias-label-primary) 30%, transparent),
841
- color-mix(in srgb, var(--dsw-alias-label-primary) 8%, transparent) 45%,
842
- transparent);
843
- filter: blur(2px); animation: dmp-emit-trail 1.7s ease-in-out infinite; }
1007
+ #fff 0%,
1008
+ #fff 8%,
1009
+ color-mix(in srgb, #fff 62%, transparent) 26%,
1010
+ color-mix(in srgb, #fff 30%, transparent) 50%,
1011
+ color-mix(in srgb, #fff 11%, transparent) 74%,
1012
+ transparent 100%);
1013
+ opacity: 0;
1014
+ transition: opacity .55s ease;
1015
+ /* The same softness the single bar had: enough to melt the lines into one volume of
1016
+ light at the knob, not enough to lose them as separate lines further out. */
1017
+ filter: blur(1.5px);
1018
+ animation: dmp-emit-pulse 1.7s ease-in-out infinite;
1019
+ /* Staggered per streak so they shimmer out of step instead of pulsing as one band. */
1020
+ animation-delay: calc(var(--n, 0) * -140ms); }
1021
+ /* The top level is the only one that shows the trail, but the change is a fade. */
1022
+ .dmp-emit[data-trail="on"] .dmp-emit-trail { opacity: .78; }
844
1023
  @keyframes dmp-emit {
845
1024
  0% { transform: translate(-50%, -50%) translate(0, var(--dy0)) scale(1); opacity: 0; }
846
1025
  14% { opacity: .95; }
847
1026
  70% { opacity: .5; }
848
1027
  100% { transform: translate(-50%, -50%)
849
- translate(var(--dx), calc(var(--dy0) + var(--dy))) scale(.2) rotate(var(--rot)); opacity: 0; } }
850
- @keyframes dmp-emit-trail { 0%, 100% { opacity: .3; } 50% { opacity: .75; } }
1028
+ translate(calc(var(--dx) * var(--dmp-emit-reach, 1)),
1029
+ calc(var(--dy0) + var(--dy) * var(--dmp-emit-reach, 1)))
1030
+ scale(.2) rotate(var(--rot)); opacity: 0; } }
1031
+ /* The pulse drives filter, not opacity: opacity now carries the fade in and out
1032
+ of the trail, and an animation on the same property would override the transition
1033
+ and snap instead of fading. Brightness reads the same way at this scale. */
1034
+ @keyframes dmp-emit-pulse {
1035
+ 0%, 100% { filter: blur(1.5px) brightness(1); }
1036
+ 50% { filter: blur(1.5px) brightness(1.5); } }
851
1037
  /* A drag is direct manipulation: the knob, the fill and the emitter all snap to the
852
1038
  pointer instead of easing, which keeps the particles born exactly at the knob. */
853
1039
  .dmp-slider-dragging .dmp-slider-thumb,
@@ -862,11 +1048,17 @@ const CSS = `
862
1048
  margin-left: calc(var(--dmp-thumb-size) / -2);
863
1049
  margin-top: calc(var(--dmp-thumb-size) / -2);
864
1050
  display: block; overflow: visible; pointer-events: none; z-index: 5;
865
- /* The knob takes the panel's grey in dark and pure white in light, with a black
866
- ring in both. The two values swing with the host stylesheet's own media query,
867
- so no JS theme detection is involved. */
1051
+ /* The knob is the panel's own grey, ringed in the same grey at partial opacity.
1052
+ Three attempts landed here. Pure black read as a hole (a dark ring on a dark disc
1053
+ on a dark panel is no shape at all). A light grey read as a foreign object — it
1054
+ matched neither the fill nor the track. Using the PANEL's own surface colour keeps
1055
+ the knob in the same family as everything around it, and the partial opacity does
1056
+ the separating: the ring is legible over the pale fill and over the dark track
1057
+ without ever becoming a hard contour.
1058
+ The two values swing with the host stylesheet's own media query, so no JS theme
1059
+ detection is involved. */
868
1060
  --dmp-thumb-fill: var(--dsw-alias-bg-module-platform);
869
- --dmp-thumb-ring: #000;
1061
+ --dmp-thumb-ring: color-mix(in srgb, var(--dsw-alias-bg-module-platform) 45%, transparent);
870
1062
  filter: drop-shadow(0 2px 4px color-mix(in srgb, var(--dsw-alias-label-primary) 28%, transparent));
871
1063
  transition: left .15s ease-out, transform .12s ease; }
872
1064
  .dmp-slider-rail:active .dmp-slider-thumb { transform: scale(1.06); }
@@ -932,14 +1124,14 @@ const CSS = `
932
1124
  .dmp-slider-hint { margin: 5px 0 0; padding-top: 8px;
933
1125
  border-top: 1px solid var(--dsw-alias-border-l1);
934
1126
  font-size: 11px; line-height: 15px; color: var(--dsw-alias-label-secondary); }
935
- /* Light surfaces need a softer knob: a black ring reads as a hard edge on a
936
- near-white panel, so the light theme pulls the ring to the host's border colour
937
- and keeps the fill pure white. The two values swing with the host stylesheet's
938
- own media query, so no JS theme detection is involved. */
1127
+ /* Light surfaces follow the same rule with their own panel colour: white fill, ringed
1128
+ in that same white at partial opacity. On a near-white panel the ring still reads
1129
+ because it sits over the blue fill for most of the travel, and where it crosses the
1130
+ empty track the drop shadow supplies the edge instead. */
939
1131
  @media (prefers-color-scheme: light) {
940
1132
  .dmp-slider-thumb {
941
1133
  --dmp-thumb-fill: var(--dsw-alias-bg-base);
942
- --dmp-thumb-ring: var(--dsw-alias-border-l2);
1134
+ --dmp-thumb-ring: color-mix(in srgb, var(--dsw-alias-bg-base) 55%, transparent);
943
1135
  }
944
1136
  }
945
1137
  @media (prefers-reduced-motion: reduce) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huai_xin/dsh-model-picker",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "A searchable, provider-grouped replacement for the DSH composer's model picker.",
5
5
  "type": "module",
6
6
  "license": "MIT",