dsh-folia 1.5.1 → 1.6.1
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.md +30 -24
- package/cordis.patch.yml +8 -8
- package/lib/client.js +3 -3
- package/lib/index.js +5 -5
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -1,10 +1,31 @@
|
|
|
1
1
|
# dsh-folia
|
|
2
2
|
|
|
3
|
-
DSH Desktop 的壁纸插件。基于 [dsh-plugin-wallpaper-engine](https://www.npmjs.com/package/dsh-plugin-wallpaper-engine)(MIT,© 2026 elysia395
|
|
3
|
+
DSH Desktop 的壁纸插件。基于 [dsh-plugin-wallpaper-engine](https://www.npmjs.com/package/dsh-plugin-wallpaper-engine)(MIT,© 2026 elysia395)二次开发:**保留其全部功能**,并增加一个自建站点数据源。
|
|
4
|
+
|
|
5
|
+
**不依赖上游插件**——装这一个包就能用。
|
|
6
|
+
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
dsh plugin --profile web add dsh-folia
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
安装后重启 DSH Desktop。
|
|
14
|
+
|
|
15
|
+
## 两个包
|
|
16
|
+
|
|
17
|
+
| 包 | 作用 |
|
|
18
|
+
| :-- | :-- |
|
|
19
|
+
| `dsh-folia` | 主包:浏览器半边(31k 行客户端)+ `cordis.patch.yml` + 站点数据源补丁 |
|
|
20
|
+
| `dsh-folia-host` | 宿主包:把主包的宿主半边重新导出成独立插件,提供 `wallpaperEngineHost` 服务 |
|
|
21
|
+
|
|
22
|
+
为什么需要宿主包:`cordis.patch.yml` 里宿主那一行(`id: wallpaper-engine`)的 `name` **不能指向 patch 自己所属的 bundle 包名**——会被加载器当成重复项跳过,导致 `wallpaperEngineHost` 服务不被注册,7 个子模块永久停留在 `pending`。所以宿主行必须指向另一个包名,这就是 `dsh-folia-host` 存在的唯一理由。
|
|
23
|
+
|
|
24
|
+
主包把 `dsh-folia-host` 列为依赖,因此安装时两个包会自动一起装上。
|
|
4
25
|
|
|
5
26
|
## 与上游的差异
|
|
6
27
|
|
|
7
|
-
|
|
28
|
+
功能改动**只有一处**,位于 `lib/routes/inventory.js`:
|
|
8
29
|
|
|
9
30
|
```js
|
|
10
31
|
const payload = await buildInventory();
|
|
@@ -14,21 +35,19 @@ const merged = remote.length
|
|
|
14
35
|
: payload;
|
|
15
36
|
```
|
|
16
37
|
|
|
17
|
-
`foliaRemote()`
|
|
38
|
+
`foliaRemote()` 把站点上的视频壁纸转成插件认识的条目形状,60 秒缓存。站点不可达时返回空数组,**不影响本地 Wallpaper Engine 库**。
|
|
18
39
|
|
|
19
|
-
|
|
40
|
+
其余文件与上游 1.4.0 逐字节一致。
|
|
20
41
|
|
|
21
42
|
## 站点数据源
|
|
22
43
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
可通过环境变量覆盖:
|
|
44
|
+
默认 `https://folia-major-3t6.pages.dev`,可用环境变量覆盖:
|
|
26
45
|
|
|
27
46
|
```bash
|
|
28
47
|
DSH_FOLIA_SITE=https://your-site.pages.dev
|
|
29
48
|
```
|
|
30
49
|
|
|
31
|
-
|
|
50
|
+
站点需提供 `/manifest.json`:
|
|
32
51
|
|
|
33
52
|
```json
|
|
34
53
|
{
|
|
@@ -47,25 +66,11 @@ DSH_FOLIA_SITE=https://your-site.pages.dev
|
|
|
47
66
|
|
|
48
67
|
只注入 `kind: "video"`(或 `.mp4` / `.webm` 后缀)的条目——上游没有静态图片的渲染管线。
|
|
49
68
|
|
|
50
|
-
## 安装
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
dsh plugin --profile web add dsh-folia-wallpaper
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
或从本仓库安装:
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
dsh plugin --profile web add github:lehua-art/dsh-folia
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
安装后重启 DSH Desktop。
|
|
63
|
-
|
|
64
69
|
## 功能(全部来自上游)
|
|
65
70
|
|
|
66
|
-
- 场景壁纸实时渲染(WebWallGL
|
|
71
|
+
- 场景壁纸实时渲染(WebWallGL / WebGL)
|
|
67
72
|
- 视频壁纸播放
|
|
68
|
-
-
|
|
73
|
+
- 玻璃材质、可读性地板、透明度与模糊调节
|
|
69
74
|
- 壁纸库面板:列表/卡片、标签、排序、属性
|
|
70
75
|
- 播放列表、轮播、遮挡暂停、自动画质
|
|
71
76
|
- 字体系统、视差层、特效层、吉祥物头像、媒体桥
|
|
@@ -78,6 +83,7 @@ dsh plugin --profile web add github:lehua-art/dsh-folia
|
|
|
78
83
|
| `lib/webwallgl/` | 场景渲染页(引擎为 npm 依赖 `webwallgl`) |
|
|
79
84
|
| `lib/routes/inventory.js` | **唯一改动的文件** |
|
|
80
85
|
| `cordis.patch.yml` | 插件行注册(8 个宿主行) |
|
|
86
|
+
| `packages/dsh-folia-host/` | 宿主包装包的源码(发布为 `dsh-folia-host`) |
|
|
81
87
|
|
|
82
88
|
## 许可
|
|
83
89
|
|
package/cordis.patch.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# dsh-
|
|
1
|
+
# dsh-folia bundle patch.
|
|
2
2
|
#
|
|
3
3
|
# Applied over the dsh-web-app layer. This bundle contributes EIGHT host rows:
|
|
4
4
|
# - four owned by the main package: the plugin that scans Wallpaper Engine and
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
# row `name` is now the real package name (resolved through <profile>/node_modules,
|
|
37
37
|
# same as the fx / parallax / fonts rows below). The `id` is frozen.
|
|
38
38
|
- id: wallpaper-engine-about-notice
|
|
39
|
-
name: 'dsh-
|
|
39
|
+
name: 'dsh-folia-about-notice'
|
|
40
40
|
# Third row: the `mascot-avatar` component's host half (C6, P2-2) — the custom
|
|
41
41
|
# mascot image (/mascot) and the two session avatars (/avatar/<side>). Same
|
|
42
42
|
# shape as the row above (independent plugin, re-enters `applyComponent`);
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
# row `name` is now the real package name (resolved through <profile>/node_modules,
|
|
46
46
|
# same as the fx / parallax / fonts rows below). The `id` is frozen.
|
|
47
47
|
- id: wallpaper-engine-mascot-avatar
|
|
48
|
-
name: 'dsh-
|
|
48
|
+
name: 'dsh-folia-mascot-avatar'
|
|
49
49
|
# Fourth row: the `media-bridge` component's host half (third component) — the
|
|
50
50
|
# system media integration (now playing / spectrum / artwork / reverse control)
|
|
51
51
|
# and its backend (the media-bridge child process with the built-in fallback).
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
# row `name` is now the real package name (resolved through <profile>/node_modules,
|
|
58
58
|
# same as the fx / parallax / fonts rows below). The `id` is frozen.
|
|
59
59
|
- id: wallpaper-engine-media-bridge
|
|
60
|
-
name: 'dsh-
|
|
60
|
+
name: 'dsh-folia-media-bridge'
|
|
61
61
|
# webServer is a hard dependency (`inject = ['webServer']` in lib/index.js):
|
|
62
62
|
# the Loader waits for the HTTP server to mount, so a headless/TUI profile
|
|
63
63
|
# without one does not load this bundle at all.
|
|
@@ -68,20 +68,20 @@
|
|
|
68
68
|
# 解析不到就**大声抛错**(宿主对行级失败是静默的 —— §4.1 I5)。
|
|
69
69
|
# 可选桌宠联动;没有 dsh-pet 或首次准备未完成时保留吉祥物原生行为。
|
|
70
70
|
- id: wallpaper-engine-pet-link
|
|
71
|
-
name: 'dsh-
|
|
71
|
+
name: 'dsh-folia-pet-link'
|
|
72
72
|
# fx:点击拖尾 + 特效扩展(src/fx-layer.js、src/ext-fx.js),浏览器半边在本包自己的产物里。
|
|
73
73
|
- id: wallpaper-engine-fx
|
|
74
|
-
name: 'dsh-
|
|
74
|
+
name: 'dsh-folia-fx'
|
|
75
75
|
# parallax:3D 视差层(src/parallax-layer.js、src/ext-parallax.js),同上。
|
|
76
76
|
- id: wallpaper-engine-parallax
|
|
77
|
-
name: 'dsh-
|
|
77
|
+
name: 'dsh-folia-parallax'
|
|
78
78
|
# fonts:整个字体系统(P-C 之后宿主半边 + 浏览器半边都在本包)
|
|
79
79
|
# · 宿主半边:lib/routes/fontsets.js、lib/routes/system-fonts.js 两条路由族;
|
|
80
80
|
# · 浏览器半边:外观页签第六节「全局字体」+ 字体集编辑器 ⇒ 产物 lib/client.fonts.js。
|
|
81
81
|
# 注意(§6.1 = A / ADR-0013 D20):随包走的只是**渲染器与描述符**;字体的键、默认值、
|
|
82
82
|
# 消毒与持久化仍在主包 lib/settings-schema.js(FONTSET_KEYS)与 fontsets/<id>.json。
|
|
83
83
|
- id: wallpaper-engine-fonts
|
|
84
|
-
name: 'dsh-
|
|
84
|
+
name: 'dsh-folia-fonts'
|
|
85
85
|
# ── 内置桌宠本体:已解耦(2026-10-20)────────────────────────────────────────
|
|
86
86
|
# `packages/pet`(`dsh-we-pet-builtin`)与它的 `wallpaper-engine-pet` 行**已从本包移除**:
|
|
87
87
|
# 它把 `electron`(optional)带进安装树,而 electron 42+ 在缺少 `dist/` 时会在
|
package/lib/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
window.__ModuleLoader__.load({
|
|
2
|
-
id: "dsh-
|
|
2
|
+
id: "dsh-folia",
|
|
3
3
|
factory: (require) => {
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
@@ -5870,7 +5870,7 @@ window.__ModuleLoader__.load({
|
|
|
5870
5870
|
let weSidebarOpenFn = null; // 官方态的 openTab 调用(抽屉态为 null)
|
|
5871
5871
|
let weSidebarCtrl = null; // 官方态控制器(isExpanded/active/toggleExpanded 的宿主面)
|
|
5872
5872
|
const WE_SIDEBAR_KIND = "wallpaper-library";
|
|
5873
|
-
const WE_SIDEBAR_ID = "dsh-
|
|
5873
|
+
const WE_SIDEBAR_ID = "dsh-folia/library";
|
|
5874
5874
|
|
|
5875
5875
|
function sidebarRightMode() {
|
|
5876
5876
|
return weSidebarMode;
|
|
@@ -31313,7 +31313,7 @@ window.__ModuleLoader__.load({
|
|
|
31313
31313
|
};
|
|
31314
31314
|
|
|
31315
31315
|
// ── 跨包浏览器半边通道(BUNDLE-SPLIT §6.2「宿主注入显式键集」)──────────────────────────
|
|
31316
|
-
// 子包产物由 loader 用 `require("dsh-
|
|
31316
|
+
// 子包产物由 loader 用 `require("dsh-folia")` 取本 bundle 的导出面。
|
|
31317
31317
|
// 这里挂的是**显式键集**,不是整个 module.exports:子包要什么就登记什么,多给一个键就是多
|
|
31318
31318
|
// 一条没人维护的隐式契约。键集与 packages/{fx,parallax,fonts}/src/client.js 的
|
|
31319
31319
|
// *_HOST_REQUIRED 逐字对齐(缺键那三包自己会大声抛),判据见 test/verify-subpackage-client-half.mjs
|
package/lib/index.js
CHANGED
|
@@ -103,10 +103,10 @@ import { registerCacheDirRoutes } from './routes/cache-dir.js';
|
|
|
103
103
|
// 实现),**不是**跨包通道 —— 跨包通道只有 `ctx.wallpaperEngineHost`(ADR-0014 S5.1/S5.2);
|
|
104
104
|
// 该边随 §12 的发布形态(主包精确依赖子包)成立,开发期由根 `devDependencies` 的
|
|
105
105
|
// `file:packages/<组件>` 提供。
|
|
106
|
-
import { applyImpl as applyAboutNoticeImpl } from 'dsh-
|
|
107
|
-
import { applyImpl as applyMascotAvatarImpl } from 'dsh-
|
|
106
|
+
import { applyImpl as applyAboutNoticeImpl } from 'dsh-folia-about-notice';
|
|
107
|
+
import { applyImpl as applyMascotAvatarImpl } from 'dsh-folia-mascot-avatar';
|
|
108
108
|
// 第三件组件(媒体桥入包):路由族、后端实现与 macOS 音频 tap 源码随包走 ⇒ 门面只剩分发点。
|
|
109
|
-
import { applyImpl as applyMediaBridgeImpl } from 'dsh-
|
|
109
|
+
import { applyImpl as applyMediaBridgeImpl } from 'dsh-folia-media-bridge';
|
|
110
110
|
// 组件行**浏览器可见面**的声明单一真源(ADR-0013 D3②):宿主侧持有"组件名 → 浏览器渲染落点",
|
|
111
111
|
// 浏览器侧只持有 gate(`COMPONENT_GATE` 指向的那一个判定函数);对账在
|
|
112
112
|
// `test/verify-component-visibility.mjs`。这里**再导出**一次,使它落在 import 图上 ——
|
|
@@ -393,7 +393,7 @@ export function apply(ctx) {
|
|
|
393
393
|
});
|
|
394
394
|
|
|
395
395
|
// 6b. 字体集族路由(list / get / put / delete / activate / import / export)**已出户**到子包行
|
|
396
|
-
// `dsh-
|
|
396
|
+
// `dsh-folia-fonts`(P-A,packages/fonts/lib/routes/fontsets.js,
|
|
397
397
|
// patch 里 `id: wallpaper-engine-fonts`)。一个 `prefix` 注册覆盖七个端点;客户端半边
|
|
398
398
|
// (设置面板的字体段)仍留主 bundle —— §7.1「P-A 不动设置面板」。
|
|
399
399
|
// 门面**不再**有这条调用点:那一行的 c 面由 `lib/subpackage-boot.js` 的冻结键集喂
|
|
@@ -425,7 +425,7 @@ export function apply(ctx) {
|
|
|
425
425
|
// 按运行时注册逐条对账;全表与每族条数用 `node test/tools/host-route-index.mjs` 现算。
|
|
426
426
|
|
|
427
427
|
// 6c′. 本机字体清单(设置页「全局字体 / 终端字体」下拉里那一组)**已出户**到同一子包行
|
|
428
|
-
// `dsh-
|
|
428
|
+
// `dsh-folia-fonts`(packages/fonts/lib/routes/system-fonts.js)。
|
|
429
429
|
// 三平台各一条权威来源(system_profiler / PowerShell / fc-list),拿不到时按文件名推
|
|
430
430
|
// 并**如实标 approximate**;一次扫描很贵(macOS 实测 ~10s)⇒ 双层缓存 + 过期先回旧值。
|
|
431
431
|
// 扫描**不在启动期**发生:第一次请求这条路才触发(族文件头的不变量)。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-folia",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "Folia 壁纸引擎:在 dsh-plugin-wallpaper-engine(MIT, elysia395)基础上增加自建站点数据源",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -78,14 +78,14 @@
|
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"webwallgl": "^3.0.0",
|
|
80
80
|
"x11": "^4.3.1",
|
|
81
|
-
"dsh-
|
|
82
|
-
"dsh-
|
|
83
|
-
"dsh-
|
|
84
|
-
"dsh-
|
|
85
|
-
"dsh-
|
|
86
|
-
"dsh-
|
|
87
|
-
"dsh-
|
|
88
|
-
"dsh-folia-host": "1.
|
|
81
|
+
"dsh-folia-about-notice": "1.5.1",
|
|
82
|
+
"dsh-folia-fonts": "1.5.1",
|
|
83
|
+
"dsh-folia-fx": "1.5.1",
|
|
84
|
+
"dsh-folia-mascot-avatar": "1.5.1",
|
|
85
|
+
"dsh-folia-media-bridge": "1.5.1",
|
|
86
|
+
"dsh-folia-parallax": "1.5.1",
|
|
87
|
+
"dsh-folia-pet-link": "1.5.1",
|
|
88
|
+
"dsh-folia-host": "1.6.1"
|
|
89
89
|
},
|
|
90
90
|
"overrides": {
|
|
91
91
|
"js-yaml": "4.3.2"
|