@iasiv5/dsh-skins 1.5.2 → 1.5.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/README.en.md +3 -0
- package/README.i18n.yaml +2 -2
- package/README.md +3 -0
- package/lib/client.js +59 -0
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -107,6 +107,8 @@ Every skin's key visuals are open to adjustment. Click the gear button on a skin
|
|
|
107
107
|
| **Slogan** | The new-session guidance line, one Chinese and one English copy | The skin's factory slogan |
|
|
108
108
|
| **Translucency** | 0–100%, one value driving three visual layers: panel tint, wallpaper scrim and blur. 0% is pure, fully visible wallpaper; 100% hides it completely | meirenzhi 35, openbmc / uefi-harness 55 |
|
|
109
109
|
|
|
110
|
+
> **On the Windows Desktop app (dsh Desktop)**: the shell chrome — sidebar, caption strip, right panel and window buttons — is the **opaque skin base color** and does not follow the translucency knob; the wallpaper is exposed inside the conversation area (center column), where the knob drives surface tint, scrim and blur. The Web keeps the original fully translucent form on every surface; the two environments are independent.
|
|
111
|
+
|
|
110
112
|

|
|
111
113
|
|
|
112
114
|
### Upload your own wallpaper (personal library)
|
|
@@ -173,6 +175,7 @@ Yes. Configuration and the library live in the `$DSH_HOME/dsh-skins/` data direc
|
|
|
173
175
|
- Other skin plugins may also touch the body backdrop, brand slots or favicon; avoid enabling multiple visual skin plugins at the same time.
|
|
174
176
|
- The `openbmc` brand slots reuse the OpenBMC project's official logo letterforms and brand gradient, used solely for identification; all rights remain with the OpenBMC project.
|
|
175
177
|
- The `uefi-harness` mark is the UEFI Forum's official trademark (the red cube, from uefi.org's published uefi_logo_red.gif, embedded as vector paths traced via Wikimedia Commons "Logo of the UEFI Forum.svg"); it is used solely to identify the skin, and all rights remain with the UEFI Forum.
|
|
178
|
+
- Windows Desktop known limits: after the right panel is closed/collapsed, the host keeps a reserved empty track (it shows the shell's dark base color and the conversation area does not expand) — host layout behavior, outside skin control; the fullscreen right panel is the solid skin base color without wallpaper blur (blurring would smear the panel's own contents, so it is intentionally omitted).
|
|
176
179
|
|
|
177
180
|
## License
|
|
178
181
|
|
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# node scripts/verify-readme-pairing.mjs --write
|
|
5
|
-
README.md:
|
|
6
|
-
README.en.md:
|
|
5
|
+
README.md: f2874ac75adc7a7d2fbd8fc7970d7452ce2b0b15
|
|
6
|
+
README.en.md: c00ca57444786f77a611dd385f15dfcced37eb99
|
package/README.md
CHANGED
|
@@ -107,6 +107,8 @@ dsh plugin --profile web remove @iasiv5/dsh-skins # 卸载
|
|
|
107
107
|
| **标语** | 新会话页的引导语,中文、英文各一份 | 皮肤出厂标语 |
|
|
108
108
|
| **通透度** | 0–100% 单值联动三个视觉层:面板底色、壁纸遮罩、模糊。0% 纯壁纸完全透出,100% 完全遮蔽 | meirenzhi 35,openbmc / uefi-harness 55 |
|
|
109
109
|
|
|
110
|
+
> **Windows Desktop(dsh Desktop 应用)上的形态**:桌面端外壳——侧栏、顶栏条、右栏面板与窗口按钮——为**不透明的皮肤本色**,不随通透度变化;壁纸在会话区(内容列)显露,通透度联动会话区内的表面底色、遮罩与模糊。Web 端维持全表面透纱的原有形态,两端互不影响。
|
|
111
|
+
|
|
110
112
|

|
|
111
113
|
|
|
112
114
|
### 上传自己的壁纸(个人图库)
|
|
@@ -173,6 +175,7 @@ URL 也能切皮肤:`/?skin=official`、`/?skin=openbmc`、`/?skin=uefi-harnes
|
|
|
173
175
|
- 其他皮肤插件也可能修改 body 背景、品牌位或 favicon;应避免同时启用多个视觉皮肤插件。
|
|
174
176
|
- `openbmc` 的品牌位沿用 OpenBMC 项目官方 logo 的字标字形与品牌渐变色,仅作标识用途,权利归 OpenBMC 项目所有。
|
|
175
177
|
- `uefi-harness` 的标志为 UEFI Forum 官方商标(红色立方体,源自 uefi.org 发布的 uefi_logo_red.gif,经 Wikimedia Commons「Logo of the UEFI Forum.svg」矢量描摹嵌入),仅作标识用途,权利归 UEFI Forum 所有。
|
|
178
|
+
- Windows Desktop 已知边界:右栏面板「收起/关闭」后,宿主保留一条空轨道(显示外壳深色底,会话区不扩展)——宿主布局行为,非皮肤可控;全屏面板为实色皮肤底、不带壁纸模糊(会模糊面板内全部内容,故不做)。
|
|
176
179
|
|
|
177
180
|
## License
|
|
178
181
|
|
package/lib/client.js
CHANGED
|
@@ -403,6 +403,47 @@
|
|
|
403
403
|
function datasetAttribute(key) {
|
|
404
404
|
return `data-${key.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`)}`;
|
|
405
405
|
}
|
|
406
|
+
function parseRgbaChannels(value) {
|
|
407
|
+
const match = /^rgba?\(\s*(\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\s*\)$/i.exec(value ?? "");
|
|
408
|
+
if (match === null) return null;
|
|
409
|
+
const channels = [match[1], match[2], match[3], match[4]].map(Number);
|
|
410
|
+
if (channels.some((channel) => !Number.isFinite(channel))) return null;
|
|
411
|
+
const [r, g, b, a] = channels;
|
|
412
|
+
return { r, g, b, a: Math.min(1, Math.max(0, a)) };
|
|
413
|
+
}
|
|
414
|
+
function buildShellAlignmentCss(bodyAttribute, opaqueFills, backdrop) {
|
|
415
|
+
const body = `body[${datasetAttribute(bodyAttribute)}]`;
|
|
416
|
+
const scoped = `html[data-windows-titlebar] ${body}`;
|
|
417
|
+
const lines = [
|
|
418
|
+
"/* dsh-skins shell-frame alignment (ADR-0009): solid chrome + wallpaper in the conversation area on Windows desktop */",
|
|
419
|
+
'html[data-windows-titlebar] [class*="_frame"]:has(> [class*="_sidebarCol"])::before{background:0 0}',
|
|
420
|
+
'html[data-windows-titlebar] [class*="_frame"] > [class*="_sidebarCol"]{background:0 0}',
|
|
421
|
+
'html[data-windows-titlebar] [class*="_sidebarCol"] > [class*="_root"]{background:0 0}'
|
|
422
|
+
];
|
|
423
|
+
if (opaqueFills !== null) {
|
|
424
|
+
lines.push(
|
|
425
|
+
`${scoped}{--dsw-specific-sidebar-fill:${opaqueFills.light}!important}`,
|
|
426
|
+
`${scoped}[data-ds-dark-theme]{--dsw-specific-sidebar-fill:${opaqueFills.dark}!important}`
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
if (backdrop !== null && backdrop !== void 0 && backdrop.imageLight !== null && backdrop.imageDark !== null) {
|
|
430
|
+
lines.push(
|
|
431
|
+
`${scoped} [class*="_centerCol"]{background-image:${backdrop.imageLight};background-size:cover;background-position:center;background-repeat:no-repeat}`,
|
|
432
|
+
`${scoped}[data-ds-dark-theme] [class*="_centerCol"]{background-image:${backdrop.imageDark}}`
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
if (opaqueFills !== null) {
|
|
436
|
+
lines.push(
|
|
437
|
+
`${scoped} [data-rightbar-col] > *{background-color:${opaqueFills.light}!important}`,
|
|
438
|
+
`${scoped}[data-ds-dark-theme] [data-rightbar-col] > *{background-color:${opaqueFills.dark}!important}`
|
|
439
|
+
);
|
|
440
|
+
lines.push(
|
|
441
|
+
`${scoped} [class*="_pane_"]{background:${opaqueFills.light}!important}`,
|
|
442
|
+
`${scoped}[data-ds-dark-theme] [class*="_pane_"]{background:${opaqueFills.dark}!important}`
|
|
443
|
+
);
|
|
444
|
+
}
|
|
445
|
+
return lines.join("\n");
|
|
446
|
+
}
|
|
406
447
|
function createSkinRuntime() {
|
|
407
448
|
const skins = /* @__PURE__ */ new Map();
|
|
408
449
|
const order = [];
|
|
@@ -594,6 +635,24 @@ ${darkSelector}{${dark.join(";")}}`;
|
|
|
594
635
|
const tag = styleTag(`dsh-skins/${skin.id}.css`, effects.staticCss);
|
|
595
636
|
stops.push(() => tag.remove());
|
|
596
637
|
}
|
|
638
|
+
{
|
|
639
|
+
const fills = effects.tokenOverrides?.["--dsw-specific-sidebar-fill"] ?? null;
|
|
640
|
+
const lightFill = fills === null ? null : parseRgbaChannels(fills.light);
|
|
641
|
+
const darkFill = fills === null ? null : parseRgbaChannels(fills.dark);
|
|
642
|
+
const opaqueFills = lightFill !== null && darkFill !== null ? {
|
|
643
|
+
light: `rgb(${lightFill.r}, ${lightFill.g}, ${lightFill.b})`,
|
|
644
|
+
dark: `rgb(${darkFill.r}, ${darkFill.g}, ${darkFill.b})`
|
|
645
|
+
} : null;
|
|
646
|
+
const backdrop2 = effects.backdrop === null ? null : {
|
|
647
|
+
imageLight: effects.backdrop.imageLight,
|
|
648
|
+
imageDark: effects.backdrop.imageDark
|
|
649
|
+
};
|
|
650
|
+
const tag = styleTag(
|
|
651
|
+
`dsh-skins/${skin.id}.shell.css`,
|
|
652
|
+
buildShellAlignmentCss(effects.bodyAttribute, opaqueFills, backdrop2)
|
|
653
|
+
);
|
|
654
|
+
stops.push(() => tag.remove());
|
|
655
|
+
}
|
|
597
656
|
const backdrop = backdropCss(effects);
|
|
598
657
|
if (backdrop !== null) {
|
|
599
658
|
const tag = styleTag(`dsh-skins/${skin.id}.backdrop.css`, backdrop);
|