dsh-cyrene-theme-change 0.11.4 → 0.11.5
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 +72 -21
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -560,6 +560,24 @@ body[data-dsh-cyrene][data-ds-dark-theme]{
|
|
|
560
560
|
}
|
|
561
561
|
.cyre-switch input{accent-color:var(--cy-ui-accent)}
|
|
562
562
|
/* 玻璃不透明度滑块:给个明确的轨道和拇指,默认外观在部分 WebView 上是细线,很难拖 */
|
|
563
|
+
/* 折射档的底光:几团彩色径向渐变铺满整页,给位移滤镜提供纹理。
|
|
564
|
+
pointer-events:none 且 z-index:-1,不挡任何交互。 */
|
|
565
|
+
#cyrene-theme-change-glow{
|
|
566
|
+
position:fixed;inset:-10%;z-index:-1;pointer-events:none;
|
|
567
|
+
background:
|
|
568
|
+
radial-gradient(46% 38% at 18% 12%, rgba(255,150,205,.85), transparent 70%),
|
|
569
|
+
radial-gradient(42% 34% at 84% 8%, rgba(150,190,255,.80), transparent 72%),
|
|
570
|
+
radial-gradient(50% 40% at 72% 88%, rgba(255,205,160,.78), transparent 72%),
|
|
571
|
+
radial-gradient(44% 36% at 8% 82%, rgba(190,160,255,.72), transparent 74%);
|
|
572
|
+
filter:saturate(1.15);
|
|
573
|
+
}
|
|
574
|
+
body[data-dsh-cyrene][data-dsh-cyrene][data-theme="dark"] #cyrene-theme-change-glow{
|
|
575
|
+
background:
|
|
576
|
+
radial-gradient(46% 38% at 18% 12%, rgba(120,60,110,.85), transparent 70%),
|
|
577
|
+
radial-gradient(42% 34% at 84% 8%, rgba(50,80,140,.80), transparent 72%),
|
|
578
|
+
radial-gradient(50% 40% at 72% 88%, rgba(140,90,60,.75), transparent 72%);
|
|
579
|
+
filter:saturate(1.05) brightness(.85);
|
|
580
|
+
}
|
|
563
581
|
.cyre-range{
|
|
564
582
|
width:120px;height:18px;margin:0 2px;cursor:pointer;
|
|
565
583
|
accent-color:var(--cy-ui-accent,#e8699f);
|
|
@@ -915,26 +933,38 @@ body[data-dsh-cyrene][data-cyrene-skin="on"] [data-code-block-content]{
|
|
|
915
933
|
那会创建 containing block,把设置弹窗和浮层搞坏。
|
|
916
934
|
开销:feTurbulence + feDisplacementMap 是逐像素算的,手机上明显吃 GPU,
|
|
917
935
|
所以做成开关,默认 off。 */
|
|
918
|
-
|
|
936
|
+
/* 折射要铺在**大面积**上才看得出来。只给小卡片加滤镜,视觉上仍然像塑料。 */
|
|
937
|
+
body[data-dsh-cyrene][data-cyrene-glass="heavy"] [data-dockkit-pane],
|
|
938
|
+
body[data-dsh-cyrene][data-cyrene-glass="heavy"] [data-dockkit-float],
|
|
939
|
+
body[data-dsh-cyrene][data-cyrene-glass="heavy"] [role="dialog"]{
|
|
940
|
+
backdrop-filter:url(#cyrene-theme-change-liquid) blur(10px) saturate(170%);
|
|
941
|
+
-webkit-backdrop-filter:url(#cyrene-theme-change-liquid) blur(10px) saturate(170%);
|
|
942
|
+
}
|
|
943
|
+
body[data-dsh-cyrene][data-cyrene-glass="heavy"] .cyre-page,
|
|
919
944
|
body[data-dsh-cyrene][data-cyrene-glass="heavy"] .cyre-editor,
|
|
920
|
-
body[data-dsh-cyrene][data-cyrene-glass="heavy"] .cyre-panel
|
|
921
|
-
|
|
945
|
+
body[data-dsh-cyrene][data-cyrene-glass="heavy"] .cyre-panel{
|
|
946
|
+
background-color:transparent;
|
|
947
|
+
background-image:none;
|
|
948
|
+
}
|
|
949
|
+
/* 宿主的插件面板/设置面板容器:折射档下也让它透明,
|
|
950
|
+
否则我们的页面透明、它自己的白底还在,交界处就是一条硬边(截图里的"分层")。 */
|
|
951
|
+
body[data-dsh-cyrene][data-cyrene-glass="heavy"] [data-cordis-panel],
|
|
952
|
+
body[data-dsh-cyrene][data-cyrene-glass="heavy"] [data-plugin-panel]{
|
|
953
|
+
background-color:transparent;
|
|
954
|
+
background-image:none;
|
|
955
|
+
}
|
|
956
|
+
body[data-dsh-cyrene][data-cyrene-glass="heavy"] .cyre-card{
|
|
922
957
|
position:relative;
|
|
923
958
|
isolation:isolate;
|
|
924
959
|
background-color:transparent;
|
|
925
960
|
}
|
|
926
|
-
body[data-dsh-cyrene][data-cyrene-glass="heavy"] .cyre-card::before
|
|
927
|
-
body[data-dsh-cyrene][data-cyrene-glass="heavy"] .cyre-editor::before,
|
|
928
|
-
body[data-dsh-cyrene][data-cyrene-glass="heavy"] .cyre-panel::before,
|
|
929
|
-
body[data-dsh-cyrene][data-cyrene-glass="heavy"] .cyre-page::before{
|
|
961
|
+
body[data-dsh-cyrene][data-cyrene-glass="heavy"] .cyre-card::before{
|
|
930
962
|
content:"";
|
|
931
963
|
position:absolute;
|
|
932
964
|
inset:0;
|
|
933
965
|
border-radius:inherit;
|
|
934
966
|
z-index:-1;
|
|
935
967
|
background:linear-gradient(135deg,rgba(255,255,255,.34),rgba(255,255,255,.10) 52%,rgba(255,255,255,.28));
|
|
936
|
-
/* 关键:SVG 滤镜放进 backdrop-filter,而不是给元素加 filter。
|
|
937
|
-
给元素加 filter 会把文字一起扭曲;放进 backdrop-filter 只扭"背后"。 */
|
|
938
968
|
backdrop-filter:url(#cyrene-theme-change-liquid) blur(6px) saturate(150%);
|
|
939
969
|
-webkit-backdrop-filter:url(#cyrene-theme-change-liquid) blur(6px) saturate(150%);
|
|
940
970
|
box-shadow:
|
|
@@ -942,22 +972,16 @@ body[data-dsh-cyrene][data-cyrene-glass="heavy"] .cyre-page::before{
|
|
|
942
972
|
inset 0 -1px 0 rgba(255,255,255,.30),
|
|
943
973
|
0 10px 30px rgba(176,120,156,.16);
|
|
944
974
|
}
|
|
945
|
-
body[data-dsh-cyrene][data-cyrene-glass="heavy"][data-theme="dark"] .cyre-card::before
|
|
946
|
-
body[data-dsh-cyrene][data-cyrene-glass="heavy"][data-theme="dark"] .cyre-editor::before,
|
|
947
|
-
body[data-dsh-cyrene][data-cyrene-glass="heavy"][data-theme="dark"] .cyre-panel::before,
|
|
948
|
-
body[data-dsh-cyrene][data-cyrene-glass="heavy"][data-theme="dark"] .cyre-page::before{
|
|
975
|
+
body[data-dsh-cyrene][data-cyrene-glass="heavy"][data-theme="dark"] .cyre-card::before{
|
|
949
976
|
background:linear-gradient(135deg,rgba(64,46,62,.42),rgba(38,30,42,.20) 52%,rgba(58,42,56,.36));
|
|
950
977
|
box-shadow:
|
|
951
978
|
inset 0 1px 0 rgba(255,255,255,.22),
|
|
952
979
|
inset 0 -1px 0 rgba(255,255,255,.06),
|
|
953
980
|
0 10px 30px rgba(0,0,0,.34);
|
|
954
981
|
}
|
|
955
|
-
@supports not (
|
|
956
|
-
body[data-dsh-cyrene][data-cyrene-glass="heavy"] .cyre-card::before
|
|
957
|
-
|
|
958
|
-
body[data-dsh-cyrene][data-cyrene-glass="heavy"] .cyre-panel::before,
|
|
959
|
-
body[data-dsh-cyrene][data-cyrene-glass="heavy"] .cyre-page::before{
|
|
960
|
-
filter:none;
|
|
982
|
+
@supports not (backdrop-filter:url(#x)){
|
|
983
|
+
body[data-dsh-cyrene][data-cyrene-glass="heavy"] .cyre-card::before{
|
|
984
|
+
backdrop-filter:blur(10px) saturate(175%);
|
|
961
985
|
}
|
|
962
986
|
}
|
|
963
987
|
body[data-dsh-cyrene][data-cyrene-skin="on"] [data-slot="sidebar"]{
|
|
@@ -1438,6 +1462,28 @@ body[data-dsh-cyrene] [data-composer-input][data-placeholder^="Describe what you
|
|
|
1438
1462
|
*
|
|
1439
1463
|
* 尊重 prefers-reduced-motion:会晕的人不该被强制看动效。
|
|
1440
1464
|
*/
|
|
1465
|
+
/**
|
|
1466
|
+
* 折射光晕层。
|
|
1467
|
+
*
|
|
1468
|
+
* 为什么必须有它:feDisplacementMap 扭的是「背后的像素」。背后要是纯白,
|
|
1469
|
+
* 扭完还是纯白——看起来就是一块塑料。所以折射档下要先铺一层彩色渐变当"底光",
|
|
1470
|
+
* 折射才有东西可弯。(dsh-plugin-liquid-glass 里的 GLOW / STRIPES 就是这个作用,
|
|
1471
|
+
* 它注释写的是「demo backlight,有壁纸就关掉」。)
|
|
1472
|
+
*/
|
|
1473
|
+
const GLOW_ID = PACKAGE_ID + "-glow"
|
|
1474
|
+
function ensureGlow() {
|
|
1475
|
+
if (typeof document.getElementById !== "function") return
|
|
1476
|
+
if (document.getElementById(GLOW_ID) !== null) return
|
|
1477
|
+
if (typeof document.createElement !== "function") return
|
|
1478
|
+
const layer = document.createElement("div")
|
|
1479
|
+
layer.id = GLOW_ID
|
|
1480
|
+
document.body.prepend(layer)
|
|
1481
|
+
}
|
|
1482
|
+
function removeGlow() {
|
|
1483
|
+
if (typeof document.getElementById !== "function") return
|
|
1484
|
+
const layer = document.getElementById(GLOW_ID)
|
|
1485
|
+
if (layer !== null) layer.remove()
|
|
1486
|
+
}
|
|
1441
1487
|
const LIQUID_ID = PACKAGE_ID + "-liquid"
|
|
1442
1488
|
let liquidDrift = null
|
|
1443
1489
|
function ensureLiquidFilter() {
|
|
@@ -1476,7 +1522,12 @@ body[data-dsh-cyrene] [data-composer-input][data-placeholder^="Describe what you
|
|
|
1476
1522
|
if (!document.body) return;
|
|
1477
1523
|
document.body.setAttribute(SKIN_ATTR, state.theme ? "on" : "off");
|
|
1478
1524
|
document.body.setAttribute("data-cyrene-glass", state.glassHeavy === true ? "heavy" : "off");
|
|
1479
|
-
if (state.theme === true && state.glassHeavy === true)
|
|
1525
|
+
if (state.theme === true && state.glassHeavy === true) {
|
|
1526
|
+
ensureLiquidFilter();
|
|
1527
|
+
ensureGlow();
|
|
1528
|
+
} else {
|
|
1529
|
+
removeGlow();
|
|
1530
|
+
}
|
|
1480
1531
|
const size = Number.isFinite(state.stickerSize) ? Math.round(state.stickerSize) : 96;
|
|
1481
1532
|
document.body.style.setProperty("--cyre-sticker-size", size + "px");
|
|
1482
1533
|
// 液态玻璃的不透明度:0.25(很透)→ 0.95(几乎不透明)
|
|
@@ -2512,7 +2563,7 @@ body[data-dsh-cyrene] [data-composer-input][data-placeholder^="Describe what you
|
|
|
2512
2563
|
'<label class="cyre-switch"><input type="checkbox" data-role="theme"><span>粉白毛玻璃主题</span></label>',
|
|
2513
2564
|
'<label class="cyre-switch"><input type="checkbox" data-role="stickers"><span>允许发表情包</span></label>',
|
|
2514
2565
|
'<label class="cyre-switch"><input type="checkbox" data-role="pet"><span>桌宠</span></label>',
|
|
2515
|
-
'<label class="cyre-switch"><input type="checkbox" data-role="glassHeavy"><span>液态玻璃 ·
|
|
2566
|
+
'<label class="cyre-switch"><input type="checkbox" data-role="glassHeavy"><span>液态玻璃 · 强烈折射(开销大)</span></label>',
|
|
2516
2567
|
'<label class="cyre-switch"><span>玻璃不透明度</span><input type="range" class="cyre-range" min="0.25" max="0.95" step="0.05" data-role="glassAlpha"><span data-role="glassAlphaVal">55%</span></label>',
|
|
2517
2568
|
'<span class="cyre-status" data-role="status"></span>',
|
|
2518
2569
|
"</div>",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-cyrene-theme-change",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.5",
|
|
4
4
|
"description": "昔涟(Cyrene)主题:粉白渐变毛玻璃 UI + 侧边栏可编辑的人格设定 + 表情包 / 背景图 / 世界书 + 认知记忆(L0/L1/L2 分层、成色衰减、语义召回、账本与健康行、压缩反思)与关系情绪 | A Cyrene (Honkai: Star Rail) theme for DeepSeek Harness",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|