dsh-folia 4.26.0-pre.38 → 4.26.0-pre.40

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 (62) hide show
  1. package/lib/client.js +55 -17
  2. package/lib/media-state.js +5 -1
  3. package/package.json +2 -61
  4. package/assets/readme/OFL-Jersey20.txt +0 -93
  5. package/assets/readme/SOURCES.md +0 -17
  6. package/assets/readme/hero-dark.png +0 -0
  7. package/assets/readme/hero-light.png +0 -0
  8. package/assets/readme/key-docs-dark.png +0 -0
  9. package/assets/readme/key-docs-light.png +0 -0
  10. package/assets/readme/key-get-dark.png +0 -0
  11. package/assets/readme/key-get-light.png +0 -0
  12. package/assets/readme/key-lang-en-dark.png +0 -0
  13. package/assets/readme/key-lang-en-light.png +0 -0
  14. package/assets/readme/key-lang-start-dark.png +0 -0
  15. package/assets/readme/key-lang-start-light.png +0 -0
  16. package/assets/readme/key-lang-zh-dark.png +0 -0
  17. package/assets/readme/key-lang-zh-light.png +0 -0
  18. package/assets/readme/key-release-dark.png +0 -0
  19. package/assets/readme/key-release-light.png +0 -0
  20. package/assets/readme/key-setup-dark.png +0 -0
  21. package/assets/readme/key-setup-light.png +0 -0
  22. package/assets/readme/mascot-eating-rice-1280x1784.jpg +0 -0
  23. package/assets/readme/section-community-dark.png +0 -0
  24. package/assets/readme/section-community-light.png +0 -0
  25. package/assets/readme/section-compat-dark.png +0 -0
  26. package/assets/readme/section-compat-light.png +0 -0
  27. package/assets/readme/section-config-dark.png +0 -0
  28. package/assets/readme/section-config-light.png +0 -0
  29. package/assets/readme/section-credits-dark.png +0 -0
  30. package/assets/readme/section-credits-light.png +0 -0
  31. package/assets/readme/section-develop-dark.png +0 -0
  32. package/assets/readme/section-develop-light.png +0 -0
  33. package/assets/readme/section-features-dark.png +0 -0
  34. package/assets/readme/section-features-light.png +0 -0
  35. package/assets/readme/section-formats-dark.png +0 -0
  36. package/assets/readme/section-formats-light.png +0 -0
  37. package/assets/readme/section-index-dark.png +0 -0
  38. package/assets/readme/section-index-light.png +0 -0
  39. package/assets/readme/section-install-dark.png +0 -0
  40. package/assets/readme/section-install-light.png +0 -0
  41. package/assets/readme/section-intro-dark.png +0 -0
  42. package/assets/readme/section-intro-light.png +0 -0
  43. package/assets/readme/section-pet-dark.png +0 -0
  44. package/assets/readme/section-pet-light.png +0 -0
  45. package/assets/readme/section-preview-dark.png +0 -0
  46. package/assets/readme/section-preview-light.png +0 -0
  47. package/assets/readme/section-stars-dark.png +0 -0
  48. package/assets/readme/section-stars-light.png +0 -0
  49. package/assets/readme/section-start-dark.png +0 -0
  50. package/assets/readme/section-start-light.png +0 -0
  51. package/assets/readme/section-support-dark.png +0 -0
  52. package/assets/readme/section-support-light.png +0 -0
  53. package/assets/readme/section-usage-dark.png +0 -0
  54. package/assets/readme/section-usage-light.png +0 -0
  55. package/assets/readme/stat-formats-dark.png +0 -0
  56. package/assets/readme/stat-formats-light.png +0 -0
  57. package/assets/readme/stat-mascots-dark.png +0 -0
  58. package/assets/readme/stat-mascots-light.png +0 -0
  59. package/assets/readme/stat-modules-dark.png +0 -0
  60. package/assets/readme/stat-modules-light.png +0 -0
  61. package/assets/readme/stat-version-dark.png +0 -0
  62. package/assets/readme/stat-version-light.png +0 -0
package/lib/client.js CHANGED
@@ -19162,30 +19162,47 @@ window.__ModuleLoader__.load({
19162
19162
  }
19163
19163
 
19164
19164
  function CapabilitiesSection() {
19165
- const [items, setItems] = React.useState(null);
19166
- const [error, setError] = React.useState(null);
19165
+ // items = 数据;page = 当前停在哪一页(工作能力 / 娱乐)—— 两个独立页面,不并排堆在一起
19166
+ const [state, setState] = React.useState({ items: null, page: "work", error: null });
19167
19167
 
19168
19168
  React.useEffect(() => {
19169
19169
  void (async () => {
19170
- const resp = await apiJson('/pet-chat/capabilities', { parse: 'always' }).catch(() => null);
19170
+ const resp = await apiJson("/pet-chat/capabilities", { parse: "always" }).catch(() => null);
19171
19171
  const doc = (resp && resp.data) || null;
19172
- if (doc && Array.isArray(doc.items)) setItems(doc.items);
19173
- else setError(weT('读取失败,重开设置页再试'));
19172
+ if (doc && Array.isArray(doc.items)) setState((prev) => ({ ...prev, items: doc.items, error: null }));
19173
+ else setState((prev) => ({ ...prev, error: weT("读取失败,重开设置页再试") }));
19174
19174
  })();
19175
19175
  }, []);
19176
19176
 
19177
- if (error) return React.createElement('div', { className: 'we-picker__hint' }, error);
19178
- if (!items) return React.createElement('div', { className: 'we-picker__hint' }, weT('正在读取…'));
19177
+ if (state.error) return React.createElement("div", { className: "we-picker__hint" }, state.error);
19178
+ if (!state.items) return React.createElement("div", { className: "we-picker__hint" }, weT("正在读取…"));
19179
19179
 
19180
- const work = items.filter((it) => it.section === 'work');
19181
- const fun = items.filter((it) => it.section === 'fun');
19182
-
19183
- return React.createElement('div', { style: { padding: '4px 2px' } },
19184
- React.createElement('div', { style: { fontSize: '14px', fontWeight: 600 } }, weT('能力')),
19185
- React.createElement('div', { className: 'we-picker__hint', style: { marginTop: '2px' } },
19186
- weT('这些是可选插件:装好后能力给 DSH 助手用,桌宠本身不受影响。不做一键安装,复制命令自行安装。')),
19187
- React.createElement(CapGroup, { title: weT('工作能力'), hint: weT('提高日常办事效率'), items: work }),
19188
- React.createElement(CapGroup, { title: weT('娱乐'), hint: weT('让界面和对话更有趣'), items: fun }));
19180
+ const page = state.page === "fun" ? "fun" : "work";
19181
+ const tabs = [
19182
+ { id: "work", label: weT("工作能力") },
19183
+ { id: "fun", label: weT("娱乐") },
19184
+ ];
19185
+ const items = page === "work"
19186
+ ? state.items.filter((it) => it.section === "work")
19187
+ : state.items.filter((it) => it.section === "fun");
19188
+
19189
+ return React.createElement("div", { style: { padding: "4px 2px" } },
19190
+ React.createElement("div", { style: { fontSize: "14px", fontWeight: 600 } }, weT("能力")),
19191
+ React.createElement("div", { className: "we-picker__hint", style: { marginTop: "2px" } },
19192
+ weT("这些是可选插件:装好后能力给 DSH 助手用,桌宠本身不受影响。不做一键安装,复制命令自行安装。")),
19193
+ // 两个页面之间切换(页内 tab),每个页面只渲染自己那一组
19194
+ React.createElement("div", { style: { display: "flex", gap: "6px", marginTop: "10px" } },
19195
+ tabs.map((tab) => React.createElement("button", {
19196
+ key: tab.id,
19197
+ type: "button",
19198
+ className: "we-picker__btn" + (page === tab.id ? " we-picker__btn--primary" : ""),
19199
+ onClick: () => setState((prev) => ({ ...prev, page: tab.id })),
19200
+ }, tab.label))),
19201
+ React.createElement(CapGroup, {
19202
+ title: page === "work" ? weT("工作能力") : weT("娱乐"),
19203
+ hint: page === "work" ? weT("提高日常办事效率") : weT("让界面和对话更有趣"),
19204
+ items,
19205
+ }));
19189
19206
  }
19190
19207
 
19191
19208
  // ── 内联模块:src/pet-layer.js —— 桌宠渲染层:canvas 逐帧绘 sprite2d 雪碧图 + 拖动 + 状态机(自渲染,不依赖第三方宠物插件)(构建期注入;勿手改本段)──
@@ -20344,7 +20361,18 @@ window.__ModuleLoader__.load({
20344
20361
  if (kind === "remove") setNote({ ok: true, text: weT("已卸载:{name}", { name: label || "" }) });
20345
20362
  // 卸载成功后必须把这张卡片的失败/安装中状态清掉:
20346
20363
  // 真实事故 —— 卸完了,卡片还挂着上一轮「下载已完成但安装未落地 · 重试」,看着像没删掉。
20347
- if (kind === "remove" && cardId) cards.end(cardId);
20364
+ if (kind === "remove" && cardId) {
20365
+ cards.end(cardId);
20366
+ // 卸载成功 = 这台机器上已经没有它了:把"曾经装好"的记忆也清掉,
20367
+ // 否则站点卡片会继续渲染「已安装」(真实反馈:卸了两次,徽标还挂着)。
20368
+ if (typeof cards.clearOk === "function") cards.clearOk(cardId);
20369
+ // 卸载后立刻就地改状态:
20370
+ // 否则等 load(true) 回来之前,卡片仍按旧的 installed=true 渲染 ⇒ "点了卸载,卡片闪一下又回来"。
20371
+ setState((prev) => {
20372
+ if (!prev || !Array.isArray(prev.site)) return prev;
20373
+ return { ...prev, site: prev.site.map((x) => (x && x.id === cardId ? { ...x, installed: false } : x)) };
20374
+ });
20375
+ }
20348
20376
  if (kind === "repair") {
20349
20377
  setNote({
20350
20378
  ok: true,
@@ -25401,6 +25429,16 @@ window.__ModuleLoader__.load({
25401
25429
  * 而不是静默回到「安装」——那正是"点了没反应"的另一种样子。
25402
25430
  */
25403
25431
  markOk: (id) => { setOkIds((m) => (m[key(id)] ? m : { ...m, [key(id)]: true })); },
25432
+ // 卸载成功后必须把它忘掉:否则卡片会一直按"已安装"渲染(站点已删、徽标还在)。
25433
+ clearOk: (id) => {
25434
+ const k = key(id);
25435
+ setOkIds((m) => {
25436
+ if (!m[k]) return m;
25437
+ const n = { ...m };
25438
+ delete n[k];
25439
+ return n;
25440
+ });
25441
+ },
25404
25442
  okOf: (id) => Boolean(okIds[key(id)]),
25405
25443
  subOf: (id) => (sub && key(sub.id) === key(id) ? sub : null),
25406
25444
  errOf: (id) => errs[key(id)] || null,
@@ -368,7 +368,11 @@ export function createMediaReconciler(opts) {
368
368
  ? new Set(arg.kinds.map((k) => String(k || '').trim().toLowerCase()))
369
369
  : null;
370
370
  const rows = (typeof queue.snapshot === 'function' ? queue.snapshot() : [])
371
- .filter((j) => j && j.id && j.url && j.dest);
371
+ .filter((j) => j && j.id && j.url && j.dest)
372
+ // ⚠️ 正在下载/排队的绝不能参与对账:dest/.part 本来就还没成型,
373
+ // 对账会判 removeFile 并删掉 .part ⇒ 队列下次写盘 ENOENT,
374
+ // 连续两次就是「下载途中本地文件被清理掉了」(下壁纸时被启动对账打断的真实复现)。
375
+ .filter((j) => !['queued', 'running'].includes(String(j.status || '')));
372
376
  const stats = { reason, at: Date.now(), checked: 0, kept: 0, reset: 0, deleted: 0, promoted: 0, deep: wantDeep };
373
377
  /** @type {{ id: string, patch: object }[]} */
374
378
  const patches = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-folia",
3
- "version": "4.26.0-pre.38",
3
+ "version": "4.26.0-pre.40",
4
4
  "description": "DSH 壁纸引擎:本机 WE 壁纸实时渲染,视频/网页/开机动画/桌宠皮肤,一键拉取在线素材。",
5
5
  "type": "module",
6
6
  "engines": {
@@ -54,11 +54,11 @@
54
54
  "lib/host-boot.js",
55
55
  "lib/log.js",
56
56
  "lib/notice.js",
57
- "lib/kernel/",
58
57
  "lib/kernel/data-dir.js",
59
58
  "lib/kernel/config.js",
60
59
  "lib/kernel/host-kernel.js",
61
60
  "lib/kernel/host-session.js",
61
+ "lib/kernel/component-session.js",
62
62
  "lib/boot/",
63
63
  "lib/routes/",
64
64
  "lib/occlusion/",
@@ -108,65 +108,6 @@
108
108
  "lib/types/index.d.ts",
109
109
  "lib/types/client.d.ts",
110
110
  "cordis.patch.yml",
111
- "assets/readme/hero-light.png",
112
- "assets/readme/hero-dark.png",
113
- "assets/readme/key-lang-zh-light.png",
114
- "assets/readme/key-lang-zh-dark.png",
115
- "assets/readme/key-lang-en-light.png",
116
- "assets/readme/key-lang-en-dark.png",
117
- "assets/readme/key-lang-start-light.png",
118
- "assets/readme/key-lang-start-dark.png",
119
- "assets/readme/key-get-light.png",
120
- "assets/readme/key-get-dark.png",
121
- "assets/readme/key-setup-light.png",
122
- "assets/readme/key-setup-dark.png",
123
- "assets/readme/key-docs-light.png",
124
- "assets/readme/key-docs-dark.png",
125
- "assets/readme/key-release-light.png",
126
- "assets/readme/key-release-dark.png",
127
- "assets/readme/stat-version-light.png",
128
- "assets/readme/stat-version-dark.png",
129
- "assets/readme/stat-formats-light.png",
130
- "assets/readme/stat-formats-dark.png",
131
- "assets/readme/stat-mascots-light.png",
132
- "assets/readme/stat-mascots-dark.png",
133
- "assets/readme/stat-modules-light.png",
134
- "assets/readme/stat-modules-dark.png",
135
- "assets/readme/section-intro-light.png",
136
- "assets/readme/section-intro-dark.png",
137
- "assets/readme/section-preview-light.png",
138
- "assets/readme/section-preview-dark.png",
139
- "assets/readme/section-start-light.png",
140
- "assets/readme/section-start-dark.png",
141
- "assets/readme/section-index-light.png",
142
- "assets/readme/section-index-dark.png",
143
- "assets/readme/section-features-light.png",
144
- "assets/readme/section-features-dark.png",
145
- "assets/readme/section-formats-light.png",
146
- "assets/readme/section-formats-dark.png",
147
- "assets/readme/section-install-light.png",
148
- "assets/readme/section-install-dark.png",
149
- "assets/readme/section-usage-light.png",
150
- "assets/readme/section-usage-dark.png",
151
- "assets/readme/section-pet-light.png",
152
- "assets/readme/section-pet-dark.png",
153
- "assets/readme/section-config-light.png",
154
- "assets/readme/section-config-dark.png",
155
- "assets/readme/section-compat-light.png",
156
- "assets/readme/section-compat-dark.png",
157
- "assets/readme/section-develop-light.png",
158
- "assets/readme/section-develop-dark.png",
159
- "assets/readme/section-community-light.png",
160
- "assets/readme/section-community-dark.png",
161
- "assets/readme/section-credits-light.png",
162
- "assets/readme/section-credits-dark.png",
163
- "assets/readme/section-support-light.png",
164
- "assets/readme/section-support-dark.png",
165
- "assets/readme/section-stars-light.png",
166
- "assets/readme/section-stars-dark.png",
167
- "assets/readme/SOURCES.md",
168
- "assets/readme/OFL-Jersey20.txt",
169
- "assets/readme/mascot-eating-rice-1280x1784.jpg",
170
111
  "README.md",
171
112
  "README.en.md",
172
113
  "README.beginner.md",
@@ -1,93 +0,0 @@
1
- Copyright 2023 The Soft Type Project Authors (https://github.com/scfried/soft-type-jersey)
2
-
3
- This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
- This license is copied below, and is also available with a FAQ at:
5
- https://openfontlicense.org
6
-
7
-
8
- -----------------------------------------------------------
9
- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
- -----------------------------------------------------------
11
-
12
- PREAMBLE
13
- The goals of the Open Font License (OFL) are to stimulate worldwide
14
- development of collaborative font projects, to support the font creation
15
- efforts of academic and linguistic communities, and to provide a free and
16
- open framework in which fonts may be shared and improved in partnership
17
- with others.
18
-
19
- The OFL allows the licensed fonts to be used, studied, modified and
20
- redistributed freely as long as they are not sold by themselves. The
21
- fonts, including any derivative works, can be bundled, embedded,
22
- redistributed and/or sold with any software provided that any reserved
23
- names are not used by derivative works. The fonts and derivatives,
24
- however, cannot be released under any other type of license. The
25
- requirement for fonts to remain under this license does not apply
26
- to any document created using the fonts or their derivatives.
27
-
28
- DEFINITIONS
29
- "Font Software" refers to the set of files released by the Copyright
30
- Holder(s) under this license and clearly marked as such. This may
31
- include source files, build scripts and documentation.
32
-
33
- "Reserved Font Name" refers to any names specified as such after the
34
- copyright statement(s).
35
-
36
- "Original Version" refers to the collection of Font Software components as
37
- distributed by the Copyright Holder(s).
38
-
39
- "Modified Version" refers to any derivative made by adding to, deleting,
40
- or substituting -- in part or in whole -- any of the components of the
41
- Original Version, by changing formats or by porting the Font Software to a
42
- new environment.
43
-
44
- "Author" refers to any designer, engineer, programmer, technical
45
- writer or other person who contributed to the Font Software.
46
-
47
- PERMISSION & CONDITIONS
48
- Permission is hereby granted, free of charge, to any person obtaining
49
- a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
- redistribute, and sell modified and unmodified copies of the Font
51
- Software, subject to the following conditions:
52
-
53
- 1) Neither the Font Software nor any of its individual components,
54
- in Original or Modified Versions, may be sold by itself.
55
-
56
- 2) Original or Modified Versions of the Font Software may be bundled,
57
- redistributed and/or sold with any software, provided that each copy
58
- contains the above copyright notice and this license. These can be
59
- included either as stand-alone text files, human-readable headers or
60
- in the appropriate machine-readable metadata fields within text or
61
- binary files as long as those fields can be easily viewed by the user.
62
-
63
- 3) No Modified Version of the Font Software may use the Reserved Font
64
- Name(s) unless explicit written permission is granted by the corresponding
65
- Copyright Holder. This restriction only applies to the primary font name as
66
- presented to the users.
67
-
68
- 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
- Software shall not be used to promote, endorse or advertise any
70
- Modified Version, except to acknowledge the contribution(s) of the
71
- Copyright Holder(s) and the Author(s) or with their explicit written
72
- permission.
73
-
74
- 5) The Font Software, modified or unmodified, in part or in whole,
75
- must be distributed entirely under this license, and must not be
76
- distributed under any other license. The requirement for fonts to
77
- remain under this license does not apply to any document created
78
- using the Font Software.
79
-
80
- TERMINATION
81
- This license becomes null and void if any of the above conditions are
82
- not met.
83
-
84
- DISCLAIMER
85
- THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
- OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
- COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
- INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
- DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
- FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
- OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -1,17 +0,0 @@
1
- # README 视觉素材来源
2
-
3
- 本轮 README 首屏与分节横条按维护者提供的 [MaiBot README](https://github.com/Mai-with-u/MaiBot) 截图复刻视觉结构:立体窗口边框、像素标题、通风栅格、状态灯、四格信息卡与键帽入口。对应项目的公开 SVG 用于核对布局和色值,未复制它的 SVG 路径、人物图、鱼形装饰、遥测数据或趋势排名徽章。
4
-
5
- - 排版源稿:[hero.html](hero.html)。深浅主题 PNG 是真实 HTML / CSS 的静态截图,不是产品运行截图或生成式插图。
6
- - 右侧角色:复用项目原始 [icon.png](../../icon.png),未重画或重编码原图。
7
- - 挂件:复用 [菲比啾比](../rope/phoebe.png),未修改运行时 PNG。角色权利保持原有归属,本页不重新授权。
8
- - 字体:Jersey 20,Copyright 2023 The Soft Type Project Authors。字体来自 [Google Fonts](https://github.com/google/fonts/tree/main/ofl/jersey20),按 [SIL Open Font License 1.1](OFL-Jersey20.txt) 使用。原字体文件保留供复现,不作为插件运行依赖。
9
- - 信息卡:源码版本来自项目包声明;三类 WE 壁纸为 Scene / Web / Video;十只立绘来自内置角色;七个子包来自项目子包清单。这些是当前源码信息,不是实时在线人数、下载遥测或门禁结果。
10
- - 资源尺寸、摘要、实际截图元素与生成时间记录在 [metadata.json](metadata.json),仅登记本轮实际使用的 56 份双主题展示图。旧创作桌面配饰不再用于横幅,未纳入本轮展示素材与发布包。
11
-
12
- ## 新吉祥物与联动致谢
13
-
14
- - **AI 娘二创形象**:感谢 B 站 UP 主 [ZipZipPipe](https://space.bilibili.com/4168597) 的角色创作,为本项目的新吉祥物提供形象基础。此项是形象创作署名,不把 AI 娘认定为模型厂商官方角色或背书,也不据此改授 MIT。项目图标、原有菲比素材与其他角色仍按各自来源归属,不将它们全部归于同一作者。
15
- - **官方 pet 联动**:感谢 [PC2005-cloud / dsh-pet](https://github.com/PC2005-cloud/dsh-pet) 提供公开接口并参与 [接口讨论 #122](https://github.com/PC2005-cloud/dsh-pet/issues/122)。当前桥接不分发官方 pet 运行时,不修改其文件;本项为跨项目接口致谢,不代表角色素材授权或联合发布。
16
-
17
- 本页没有使用 MaiBot 的项目名称、人物、用户数字或排名作为本项目背书。项目主许可证不自动替代字体及角色各自的权利。
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file