dsh-folia 4.7.0 → 4.8.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.
- package/lib/settings/ownership.js +85 -0
- package/package.json +5 -3
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lib/settings/ownership.js — **设置键归属清单**(每个键属于哪个功能)。
|
|
3
|
+
*
|
|
4
|
+
* 为什么要有它:`lib/settings-schema.js` 有 138 个 DEFAULTS 键 / 134 个 KINDS 键,过去"这个键
|
|
5
|
+
* 属于哪个功能"只存在于人脑里。后果是真实出现过的:加一个功能要往那张 2000 行的表里挑地方插,
|
|
6
|
+
* 而删一个功能时没人敢删键(不知道还有谁在用)。
|
|
7
|
+
*
|
|
8
|
+
* 这张表把归属写成数据,由 `test/verify-settings-ownership.mjs` 机器校验三条:
|
|
9
|
+
* ① 每个键**恰好**有一个归属(没归属 = 有人偷偷加键;两个归属 = 归属不清);
|
|
10
|
+
* ② 每条模式都要**真的匹配到东西**(写错了 / 功能删了留着的模式会被判红);
|
|
11
|
+
* ③ 五个功能(wallpaper / playback / appearance / components / system)都非空 ——
|
|
12
|
+
* 防止有人把整表塞进一个兜底桶。
|
|
13
|
+
*
|
|
14
|
+
* 为什么现在只写数据、不拆文件:拆 `settings-schema.js` 要动 DEFAULTS / KINDS / 一堆
|
|
15
|
+
* 引用这些常量的消毒器,属于高风险改动;先把**归属**固定住,拆分才有对账依据。
|
|
16
|
+
* 拆分时的目标形态已经写在这里:每个 `files` 条目将来对应 `lib/settings/<id>.js`。
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/** @typedef {{ id: string, name: string, why: string, files?: string[], keys?: string[], prefixes?: string[] }} FeatureKeys */
|
|
20
|
+
|
|
21
|
+
/** @type {FeatureKeys[]} */
|
|
22
|
+
export const SETTINGS_OWNERS = [
|
|
23
|
+
{
|
|
24
|
+
id: 'wallpaper',
|
|
25
|
+
name: '壁纸',
|
|
26
|
+
why: '壁纸本体的显示参数:着色/裁切/图层几何/场景帧/评分与来源筛选/自定义属性。',
|
|
27
|
+
files: ['lib/routes/inventory.js', 'src/quick-panel.js', 'src/picker-model.js'],
|
|
28
|
+
keys: [
|
|
29
|
+
'scrim', 'border', 'blur', 'wallpaperBlur', 'wallpaperOpacity', 'objectFit', 'flip',
|
|
30
|
+
'backgroundBrightness', 'backgroundContrast', 'backgroundSaturate',
|
|
31
|
+
'layerPositionX', 'layerPositionY', 'layerScale',
|
|
32
|
+
'hiddenIds', 'contentRatingFilter', 'typeFilter', 'sourceFilter', 'pickerLayout',
|
|
33
|
+
'sceneFrameUrl', 'sceneLive', 'sceneLiveFps', 'sceneLiveFailures',
|
|
34
|
+
'customFrames', 'frameVariants', 'userProps', 'edgeCompat',
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 'playback',
|
|
39
|
+
name: '播放',
|
|
40
|
+
why: '播放与轮换的时序:轮换间隔/过场、倍速、帧率上限、声音、暂停策略。',
|
|
41
|
+
files: ['src/client-rotation.js', 'src/client-audio-playback.js', 'src/panel-tabs-advanced.js'],
|
|
42
|
+
keys: [
|
|
43
|
+
'rotationEnabled', 'rotationInterval', 'rotationGroupId', 'rotationGroups', 'rotationSeeded',
|
|
44
|
+
'switchTransition', 'switchTransitionDir', 'switchTransitionSpeed',
|
|
45
|
+
'playbackRate', 'fpsCap', 'videoVolume', 'videoAudioEnabled',
|
|
46
|
+
'pauseOnHidden', 'pauseOnBlur', 'pauseOnBattery', 'liveBootDelay',
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: 'appearance',
|
|
51
|
+
name: '外观',
|
|
52
|
+
why: '玻璃 / 主题 / 字体 / 配色 / 胶囊与侧栏装饰:改的是界面自身的观感。',
|
|
53
|
+
files: ['src/glass.js', 'src/glass-panel.js', 'src/theme-follow.js', 'src/system-fonts.js'],
|
|
54
|
+
prefixes: ['glass', 'sidebar', 'titlebar', 'capsule', 'leftSidebar', 'rightSidebar', 'uiColor', 'theme', 'font', 'accent', 'chatGlass', 'extraGlass', 'rope', 'caretColor', 'globalFamily', 'componentFonts', 'noticeSeen'],
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: 'components',
|
|
58
|
+
name: '可选组件(fx / parallax / 头像 / 立绘)',
|
|
59
|
+
why: '七个组件行各自的外观参数:点击拖尾、3D 视差、自定义头像与立绘。',
|
|
60
|
+
files: ['lib/components/fx/index.js', 'lib/components/parallax/index.js', 'lib/components/mascot-avatar/index.js'],
|
|
61
|
+
prefixes: ['fx', 'parallax', 'avatar', 'mascotImage'],
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: 'system',
|
|
65
|
+
name: '系统',
|
|
66
|
+
why: '不属于任何单一功能的全局项:设置表版本、皮肤互操作标记、媒体适配目标。',
|
|
67
|
+
files: ['lib/kernel/config.js', 'lib/kernel/host-kernel.js'],
|
|
68
|
+
keys: [
|
|
69
|
+
'settingsVersion', 'skinYieldRestoreId', 'skinYieldRestoreRotation',
|
|
70
|
+
'adapterTarget', 'mediaIntegration', 'audioSource', 'mediaLyricsOnline',
|
|
71
|
+
'thinkingGlass', 'thinkingNative',
|
|
72
|
+
// `id` 不是"设置"而是设置记录的标识字段(DEFAULTS 里与真实设置同形存在)。
|
|
73
|
+
'id',
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* 「兜底键」的显式豁免:没有任何模式匹配、且确实只给系统用的少数键。
|
|
80
|
+
*
|
|
81
|
+
* ⚠️ 这张表是**棘轮**:只许缩小。往这里加一条 = 又有一个键没人负责。
|
|
82
|
+
*/
|
|
83
|
+
export const UNOWNED_WHY = {
|
|
84
|
+
// 目前为空:所有键都能被上面的模式覆盖。
|
|
85
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-folia",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.0",
|
|
4
4
|
"description": "Folia 壁纸引擎:把本机 Wallpaper Engine 壁纸搬进 DSH 界面(场景实时渲染 / 视频 / 网页),内置液态玻璃与 Folia 吉祥物,并可从自建站点拉取壁纸。单包形态(组件已合并)。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -157,7 +157,8 @@
|
|
|
157
157
|
"README.beginner.md",
|
|
158
158
|
"lib/components/",
|
|
159
159
|
"lib/features.js",
|
|
160
|
-
"lib/route-registry.js"
|
|
160
|
+
"lib/route-registry.js",
|
|
161
|
+
"lib/settings/"
|
|
161
162
|
],
|
|
162
163
|
"dsh": {
|
|
163
164
|
"bundle": {
|
|
@@ -196,7 +197,8 @@
|
|
|
196
197
|
"test:pets": "node test/pets-http.mjs",
|
|
197
198
|
"test:pets-layer": "node test/pets-layer.mjs",
|
|
198
199
|
"test:features": "node test/verify-features.mjs",
|
|
199
|
-
"
|
|
200
|
+
"audit": "node test/run-audit.mjs",
|
|
201
|
+
"gate": "node scripts/build-client.mjs \u0026\u0026 node test/run-guards.mjs smoke \u0026\u0026 node test/verify-features.mjs \u0026\u0026 node test/verify-route-registry.mjs \u0026\u0026 node test/verify-settings-ownership.mjs \u0026\u0026 node test/boot-http.mjs \u0026\u0026 node test/pets-http.mjs \u0026\u0026 node test/pets-layer.mjs"
|
|
200
202
|
},
|
|
201
203
|
"peerDependencies": {
|
|
202
204
|
"@deepseek-ai/cordis": "^4.0.4",
|