dsh-folia 4.26.0-pre.70 → 4.26.0-pre.71
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 +2 -2
- package/lib/client.js +47 -107
- package/package.json +3 -3
package/README.md
CHANGED
package/lib/client.js
CHANGED
|
@@ -140,7 +140,6 @@ window.__ModuleLoader__.load({
|
|
|
140
140
|
"移除失败:{error}": "Remove failed: {error}",
|
|
141
141
|
"请输入存储位置路径": "Enter a storage location path",
|
|
142
142
|
"更改失败:{error}": "Change failed: {error}",
|
|
143
|
-
"保存失败:{error}": "Save failed: {error}",
|
|
144
143
|
"标签页隐藏(pauseOnHidden)": "Tab hidden (pauseOnHidden)",
|
|
145
144
|
"窗口失焦(pauseOnBlur)": "Window unfocused (pauseOnBlur)",
|
|
146
145
|
"窗口被完全遮挡(pauseOnOcclusion)": "Window fully occluded (pauseOnOcclusion)",
|
|
@@ -192,7 +191,6 @@ window.__ModuleLoader__.load({
|
|
|
192
191
|
"‹ 上一页": "‹ Previous",
|
|
193
192
|
"下一页 ›": "Next ›",
|
|
194
193
|
"壁纸引擎": "Wallpaper Engine",
|
|
195
|
-
"本地 Wallpaper Engine 壁纸 · 液态玻璃主题": "Local Wallpaper Engine wallpapers · liquid glass theme",
|
|
196
194
|
"壁纸引擎设置分区": "Wallpaper Engine settings sections",
|
|
197
195
|
"菲比啾比": "Phoebe Jiubi",
|
|
198
196
|
// ⚠️ **八只「模型娘」的名字刻意不进词表**。原因不是"忘了翻",而是本仓 i18n 的
|
|
@@ -429,13 +427,7 @@ window.__ModuleLoader__.load({
|
|
|
429
427
|
"无法读取该目录:{error}": "Cannot read folder: {error}",
|
|
430
428
|
"已迁移 {moved} 个缓存文件": "Moved {moved} cache file(s)",
|
|
431
429
|
"已迁移 {moved} 个缓存文件,{skipped} 个跳过": "Moved {moved} cache file(s), skipped {skipped}",
|
|
432
|
-
"官方资源路径": "Official assets path",
|
|
433
430
|
"设置": "Set",
|
|
434
|
-
"WE assets 绝对路径,留空保存=清除": "Absolute path to WE assets; save empty to clear",
|
|
435
|
-
"已启用 · 场景实时渲染取官方像素": "Enabled · Scene live rendering uses official pixel assets",
|
|
436
|
-
"目录不可用(缺 materials/),场景实时渲染走程序化复刻": "Directory unavailable (materials/ missing) · Scene live rendering falls back to procedural recreation",
|
|
437
|
-
"未配置 · 场景实时渲染贴图走程序化复刻": "Not configured · Scene live rendering textures fall back to procedural recreation",
|
|
438
|
-
"指向 Wallpaper Engine 安装目录的 assets(或其拷贝)": "Points to the assets folder of the Wallpaper Engine installation (or a copy of it)",
|
|
439
431
|
"上传中…": "Uploading…",
|
|
440
432
|
// 侧栏快捷面板「壁纸」页签的本地上传入口(pre.70)—— 与设置页上传同一条链路,
|
|
441
433
|
// 新词按任务单归在 panel 域(守卫只对账键集,不按文件分域)。
|
|
@@ -972,6 +964,7 @@ window.__ModuleLoader__.load({
|
|
|
972
964
|
"工作能力": "Work",
|
|
973
965
|
"娱乐": "Fun",
|
|
974
966
|
"详情": "Details",
|
|
967
|
+
"预览图来自作者仓库": "Preview from the author's repository",
|
|
975
968
|
"收起": "Collapse",
|
|
976
969
|
"复制安装命令": "Copy install command",
|
|
977
970
|
"已复制": "Copied",
|
|
@@ -4279,7 +4272,7 @@ window.__ModuleLoader__.load({
|
|
|
4279
4272
|
/* Section wrapper:融合官方设置页(官方分区没有外壳卡),内容直接落在设置对话框的面层上。
|
|
4280
4273
|
注意类名与 DOM 结构是**契约**,守卫按结构断言 —— 拍平的是外观,不是这层壳的存在。 */
|
|
4281
4274
|
.we-picker__card-shell { display: block; }
|
|
4282
|
-
/* Card header: name + count badge
|
|
4275
|
+
/* Card header: name + count badge (mirrors skin-center). */
|
|
4283
4276
|
.we-picker__card-head {
|
|
4284
4277
|
display: flex; align-items: baseline; gap: 8px;
|
|
4285
4278
|
padding-bottom: 10px; border-bottom: 1px solid var(--dsw-alias-border-l2, rgba(128, 128, 128, 0.22));
|
|
@@ -4290,10 +4283,6 @@ window.__ModuleLoader__.load({
|
|
|
4290
4283
|
.we-picker__card-badge {
|
|
4291
4284
|
font-size: 11px; font-weight: 500; color: var(--dsw-alias-label-secondary, #6b7280);
|
|
4292
4285
|
}
|
|
4293
|
-
.we-picker__card-desc {
|
|
4294
|
-
margin-left: auto; font-size: 12px; color: var(--dsw-alias-label-tertiary, #6b7280);
|
|
4295
|
-
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
4296
|
-
}
|
|
4297
4286
|
/* 配色 swatches: circular preset buttons + native color picker. The active
|
|
4298
4287
|
swatch gets an accent ring so the current choice is obvious at a glance. */
|
|
4299
4288
|
/* ── DSH harness corner-shape 兼容(Issue #74)─────────────────────────────
|
|
@@ -15428,7 +15417,7 @@ window.__ModuleLoader__.load({
|
|
|
15428
15417
|
}
|
|
15429
15418
|
|
|
15430
15419
|
function renderWallpaperUploadsSection(ctx) {
|
|
15431
|
-
const { armedConfirm, group, onArmConfirm, onCancelEditUploadDir,
|
|
15420
|
+
const { armedConfirm, group, onArmConfirm, onCancelEditUploadDir, onDisarmConfirm, onStartEditUploadDir, onUploadDirDraft, playableCount, playableList, sel, uploadedList } = ctx;
|
|
15432
15421
|
const uploadToken = (w) => "upload:" + w.id;
|
|
15433
15422
|
return React.createElement(React.Fragment, null,
|
|
15434
15423
|
// ── 自定义壁纸: local JPG/PNG/MP4 as wallpapers. Files are written by the
|
|
@@ -15481,54 +15470,6 @@ window.__ModuleLoader__.load({
|
|
|
15481
15470
|
React.createElement("span", { className: "we-picker__hint" },
|
|
15482
15471
|
weT("支持 ~ 表示用户主目录")),
|
|
15483
15472
|
),
|
|
15484
|
-
// ── 官方资源路径(local-assets):场景实时渲染的 util、particle、
|
|
15485
|
-
// gradient 贴图默认是程序化复刻(观感近似);指向本机 WE 安装目录的
|
|
15486
|
-
// assets 树后按名取官方像素,与官方引擎逐像素对齐。素材属 WE 版权
|
|
15487
|
-
// 内容,只从本机路径只读取用,不会被复制/上传。路径不硬编码 ——
|
|
15488
|
-
// 持久化在宿主 config.json(weAssetsDir),经 we-assets-dir 端点读写。
|
|
15489
|
-
React.createElement("div", { className: "we-picker__row" },
|
|
15490
|
-
React.createElement("span", { className: "we-picker__hint we-picker__label" }, weT("官方资源路径")),
|
|
15491
|
-
React.createElement("span", {
|
|
15492
|
-
className: "we-picker__uploads-path",
|
|
15493
|
-
}, sel.inventory.weAssetsDir || "—"),
|
|
15494
|
-
React.createElement("button", {
|
|
15495
|
-
className: "we-picker__btn", type: "button",
|
|
15496
|
-
onClick: onStartEditWeAssetsDir,
|
|
15497
|
-
}, sel.inventory.weAssetsDir ? weT("更改") : weT("设置")),
|
|
15498
|
-
),
|
|
15499
|
-
sel.editingWeAssetsDir && React.createElement("div", { className: "we-picker__row" },
|
|
15500
|
-
React.createElement("input", {
|
|
15501
|
-
className: "we-picker__text", type: "text",
|
|
15502
|
-
value: sel.weAssetsDirDraft,
|
|
15503
|
-
placeholder: weT("WE assets 绝对路径,留空保存=清除"),
|
|
15504
|
-
onInput: onWeAssetsDirDraft,
|
|
15505
|
-
onKeyDown: (e) => {
|
|
15506
|
-
if (e.key === "Enter") changeWeAssetsDir(sel.weAssetsDirDraft);
|
|
15507
|
-
if (e.key === "Escape") onCancelEditWeAssetsDir();
|
|
15508
|
-
},
|
|
15509
|
-
}),
|
|
15510
|
-
React.createElement("button", {
|
|
15511
|
-
className: "we-picker__btn", type: "button",
|
|
15512
|
-
onClick: () => changeWeAssetsDir(sel.weAssetsDirDraft),
|
|
15513
|
-
}, weT("保存")),
|
|
15514
|
-
React.createElement("button", {
|
|
15515
|
-
className: "we-picker__btn", type: "button",
|
|
15516
|
-
onClick: onCancelEditWeAssetsDir,
|
|
15517
|
-
}, weT("取消")),
|
|
15518
|
-
),
|
|
15519
|
-
React.createElement("div", { className: "we-picker__row" },
|
|
15520
|
-
React.createElement("span", { className: "we-picker__hint" },
|
|
15521
|
-
sel.inventory.weAssetsAvailable
|
|
15522
|
-
? weT("已启用 · 场景实时渲染取官方像素")
|
|
15523
|
-
: (sel.inventory.weAssetsDir
|
|
15524
|
-
? weT("目录不可用(缺 materials/),场景实时渲染走程序化复刻")
|
|
15525
|
-
: weT("未配置 · 场景实时渲染贴图走程序化复刻"))),
|
|
15526
|
-
React.createElement("span", { className: "we-picker__hint" },
|
|
15527
|
-
weT("指向 Wallpaper Engine 安装目录的 assets(或其拷贝)")),
|
|
15528
|
-
),
|
|
15529
|
-
sel.weAssetsError && React.createElement("div", { className: "we-picker__error" },
|
|
15530
|
-
sel.weAssetsError,
|
|
15531
|
-
),
|
|
15532
15473
|
React.createElement("div", { className: "we-picker__row" },
|
|
15533
15474
|
React.createElement("span", { className: "we-picker__hint we-picker__label" }, weT("自定义")),
|
|
15534
15475
|
React.createElement("input", {
|
|
@@ -21900,9 +21841,34 @@ window.__ModuleLoader__.load({
|
|
|
21900
21841
|
|
|
21901
21842
|
const CAP_META = { fontSize: '11px', opacity: 0.6, marginTop: '2px', wordBreak: 'break-all' };
|
|
21902
21843
|
|
|
21844
|
+
/** 作者仓库预览占位块:固定 120px 高,图片失败时仍占位(不塌、不露裂图)。 */
|
|
21845
|
+
const CAP_PREVIEW_BOX = {
|
|
21846
|
+
width: '100%',
|
|
21847
|
+
height: '120px',
|
|
21848
|
+
overflow: 'hidden',
|
|
21849
|
+
borderRadius: '8px',
|
|
21850
|
+
background: 'rgba(255,255,255,0.06)',
|
|
21851
|
+
};
|
|
21852
|
+
const CAP_PREVIEW_IMG = { width: '100%', height: '120px', objectFit: 'cover', display: 'block' };
|
|
21853
|
+
|
|
21854
|
+
/**
|
|
21855
|
+
* 从能力条目的 `source` 推作者仓库的 OG 预览图:
|
|
21856
|
+
* https://github.com/<owner>/<repo>[/tree/...] → https://opengraph.githubassets.com/1/<owner>/<repo>
|
|
21857
|
+
* 非 GitHub 来源(npm / 其它)返回空串 —— 调用方据此整块不渲染,保持原布局。
|
|
21858
|
+
* 不新增 catalog 字段,也不发起额外抓取:OG 图由 GitHub 自己生成。
|
|
21859
|
+
*/
|
|
21860
|
+
function capPreviewUrl(source) {
|
|
21861
|
+
const m = String(source || '').match(/^https?:\/\/(?:www\.)?github\.com\/([^/?#]+)\/([^/?#]+)/i);
|
|
21862
|
+
if (!m) return '';
|
|
21863
|
+
const repo = m[2].replace(/\.git$/i, '');
|
|
21864
|
+
if (!m[1] || !repo) return '';
|
|
21865
|
+
return 'https://opengraph.githubassets.com/1/' + m[1] + '/' + repo;
|
|
21866
|
+
}
|
|
21867
|
+
|
|
21903
21868
|
function CapabilityCard({ item }) {
|
|
21904
21869
|
const [open, setOpen] = React.useState(false);
|
|
21905
21870
|
const [copied, setCopied] = React.useState(false);
|
|
21871
|
+
const [previewFailed, setPreviewFailed] = React.useState(false);
|
|
21906
21872
|
const copy = () => {
|
|
21907
21873
|
const text = String(item.command || '');
|
|
21908
21874
|
try {
|
|
@@ -21942,6 +21908,21 @@ window.__ModuleLoader__.load({
|
|
|
21942
21908
|
const body = [head];
|
|
21943
21909
|
if (open) {
|
|
21944
21910
|
const line = (k, v) => React.createElement('div', { key: k, className: 'we-picker__hint', style: { marginTop: '4px' } }, v);
|
|
21911
|
+
const previewUrl = capPreviewUrl(item.source);
|
|
21912
|
+
if (previewUrl) {
|
|
21913
|
+
body.push(React.createElement('div', { key: 'preview', style: { marginTop: '8px' } },
|
|
21914
|
+
React.createElement('div', { style: CAP_PREVIEW_BOX },
|
|
21915
|
+
previewFailed ? null : React.createElement('img', {
|
|
21916
|
+
src: previewUrl,
|
|
21917
|
+
alt: item.name,
|
|
21918
|
+
loading: 'lazy',
|
|
21919
|
+
style: CAP_PREVIEW_IMG,
|
|
21920
|
+
onError: () => setPreviewFailed(true),
|
|
21921
|
+
})),
|
|
21922
|
+
React.createElement('div', {
|
|
21923
|
+
className: 'we-picker__hint', style: { marginTop: '4px' },
|
|
21924
|
+
}, weT('预览图来自作者仓库'))));
|
|
21925
|
+
}
|
|
21945
21926
|
body.push(React.createElement('div', { key: 'd-title', style: { marginTop: '8px', fontSize: '12px', fontWeight: 600 } }, weT('详情')));
|
|
21946
21927
|
body.push(line('desc', item.authorDesc || item.summary || ''));
|
|
21947
21928
|
body.push(React.createElement('div', { key: 'u-title', style: { marginTop: '8px', fontSize: '12px', fontWeight: 600 } }, weT('如何使用')));
|
|
@@ -39459,11 +39440,6 @@ window.__ModuleLoader__.load({
|
|
|
39459
39440
|
cacheState: "",
|
|
39460
39441
|
cachePercent: 0,
|
|
39461
39442
|
cacheFailReason: "",
|
|
39462
|
-
// WE 官方资源路径编辑器(transient):开态 + 草稿路径 + 上次错误。
|
|
39463
|
-
// 生效状态(目录/可用性)由 inventory 携带(host 是唯一真相)。
|
|
39464
|
-
editingWeAssetsDir: false,
|
|
39465
|
-
weAssetsDirDraft: "",
|
|
39466
|
-
weAssetsError: "",
|
|
39467
39443
|
inventory: { installDir: null, uploadDir: null, cacheDir: null, weAssetsDir: null, weAssetsAvailable: false, sceneMediaBase: "", wallpapers: [], total: 0, portableCount: 0, playlists: [], error: null },
|
|
39468
39444
|
loaded: false,
|
|
39469
39445
|
};
|
|
@@ -40921,30 +40897,6 @@ window.__ModuleLoader__.load({
|
|
|
40921
40897
|
emit();
|
|
40922
40898
|
}
|
|
40923
40899
|
|
|
40924
|
-
const WE_ASSETS_DIR_URL = "/folia/we-assets-dir";
|
|
40925
|
-
|
|
40926
|
-
// Set / clear the WE official-assets directory (host-persisted). Scene live
|
|
40927
|
-
// rendering then serves official pixels via /api/local-assets instead of the
|
|
40928
|
-
// renderer's programmatic recreations. Empty input clears the setting.
|
|
40929
|
-
// 保存后刷新 inventory(weAssetsAvailable 进 syncLayers key)→ live 渲染页
|
|
40930
|
-
// 带新参数重建,官方像素即刻生效。
|
|
40931
|
-
async function changeWeAssetsDir(dir) {
|
|
40932
|
-
setTransient("weAssetsError", "");
|
|
40933
|
-
emit();
|
|
40934
|
-
try {
|
|
40935
|
-
const res = await apiPostJson(WE_ASSETS_DIR_URL,
|
|
40936
|
-
{ dir: String(dir || "").trim() }, { parse: "always" });
|
|
40937
|
-
if (!res.ok) throw new Error(hostFailureReason(res));
|
|
40938
|
-
setTransient("editingWeAssetsDir", false);
|
|
40939
|
-
setTransient("weAssetsDirDraft", "");
|
|
40940
|
-
await loadInventory();
|
|
40941
|
-
syncLayers(); // 可用性变化进 key → live iframe 带/去 localAssets=1 重建
|
|
40942
|
-
} catch (err) {
|
|
40943
|
-
setTransient("weAssetsError", weT("保存失败:{error}", { error: weT(err && err.message ? err.message : err) }));
|
|
40944
|
-
}
|
|
40945
|
-
emit();
|
|
40946
|
-
}
|
|
40947
|
-
|
|
40948
40900
|
// ── Behind-body layer: wallpaper + scrim (plain DOM, NOT a slot) ───────────
|
|
40949
40901
|
// Edge (and only Edge) paints its own floating "下载/投屏" media-overlay toolbar
|
|
40950
40902
|
// over any VISIBLE <video> element, and it ignores pointer-events / controlsList /
|
|
@@ -42101,7 +42053,7 @@ window.__ModuleLoader__.load({
|
|
|
42101
42053
|
function onEditOrder(e) {
|
|
42102
42054
|
if (selection.editing) { selection.editing.order = e.target.value; emit(); }
|
|
42103
42055
|
}
|
|
42104
|
-
//
|
|
42056
|
+
// 上传目录的**草稿**状态 —— 都在 selection 的瞬态字段里。
|
|
42105
42057
|
function onStartEditUploadDir() {
|
|
42106
42058
|
setTransient("editingUploadDir", true);
|
|
42107
42059
|
setTransient("uploadDirDraft", selection.inventory.uploadDir || "");
|
|
@@ -42189,18 +42141,6 @@ window.__ModuleLoader__.load({
|
|
|
42189
42141
|
setTransient("cacheDirError", "");
|
|
42190
42142
|
emit();
|
|
42191
42143
|
}
|
|
42192
|
-
function onStartEditWeAssetsDir() {
|
|
42193
|
-
setTransient("editingWeAssetsDir", true);
|
|
42194
|
-
setTransient("weAssetsDirDraft", selection.inventory.weAssetsDir || "");
|
|
42195
|
-
setTransient("weAssetsError", "");
|
|
42196
|
-
emit();
|
|
42197
|
-
}
|
|
42198
|
-
function onWeAssetsDirDraft(e) { setTransient("weAssetsDirDraft", e.target.value); emit(); }
|
|
42199
|
-
function onCancelEditWeAssetsDir() {
|
|
42200
|
-
setTransient("editingWeAssetsDir", false);
|
|
42201
|
-
setTransient("weAssetsError", "");
|
|
42202
|
-
emit();
|
|
42203
|
-
}
|
|
42204
42144
|
|
|
42205
42145
|
// ── 外观 / 播放 / 系统页签的处理器(同上一条:渲染器只读值 + 调这些)────────────
|
|
42206
42146
|
function onLeftSidebarGlass(e) { setSetting("leftSidebarGlass", e.target.checked); emit(); }
|
|
@@ -44657,18 +44597,18 @@ window.__ModuleLoader__.load({
|
|
|
44657
44597
|
);
|
|
44658
44598
|
return renderWallpaperTab({
|
|
44659
44599
|
setSetting, setTransient,
|
|
44660
|
-
INTERVALS, armedConfirm: sel.armedConfirm, cdMode, current, editing, editorPageView, group, groups, isLiveScene, onArmConfirm: armConfirm, onArmDeleteGroup, onCacheRetry: retryDownloadFirst, onCancelEditUploadDir,
|
|
44600
|
+
INTERVALS, armedConfirm: sel.armedConfirm, cdMode, current, editing, editorPageView, group, groups, isLiveScene, onArmConfirm: armConfirm, onArmDeleteGroup, onCacheRetry: retryDownloadFirst, onCancelEditUploadDir, onClear, onDeleteGroup, onDisarmConfirm: disarmConfirm, onEditInterval, onEditName, onEditOrder, onEditTrigger, onGroupChange, onGroupInterval, onGroupTrigger, onOpenPicker, onOpenPickerDraft, onRefresh, onStartEditUploadDir, onSwitchTransition, onSwitchTransitionDir, onSwitchTransitionSpeed, onToggleAudio, onTogglePlay, onTogglePropsPanel, onToggleRotation, onUploadDirDraft, pagerRow, playableCount, playableList, playbackLive, propsPanelOpen, renderUserPropsPanel, sel, setPickerOpener, uploadedList,
|
|
44661
44601
|
});
|
|
44662
44602
|
};
|
|
44663
44603
|
const tabIdx = Math.max(0, visibleTabs.findIndex((t) => t.id === activeTab));
|
|
44664
44604
|
|
|
44665
44605
|
return React.createElement("div", { className: "we-picker", "data-we-cards": sel.pickerLayout, ref: pickerRootRef },
|
|
44666
44606
|
// ── Card header (mirrors the skin-center's pluginCard header): plugin
|
|
44667
|
-
// name + live wallpaper count badge
|
|
44607
|
+
// name + live wallpaper count badge. The old description line was
|
|
44608
|
+
// removed per product direction; title + badge stay. ──
|
|
44668
44609
|
React.createElement("div", { className: "we-picker__card-head" },
|
|
44669
44610
|
React.createElement("span", { className: "we-picker__card-name" }, weT("壁纸引擎")),
|
|
44670
44611
|
React.createElement("span", { className: "we-picker__card-badge" }, String(playableList.length)),
|
|
44671
|
-
React.createElement("span", { className: "we-picker__card-desc" }, weT("本地 Wallpaper Engine 壁纸 · 液态玻璃主题")),
|
|
44672
44612
|
),
|
|
44673
44613
|
// ── 页签栏(分段式):六个页签互斥展示,替代三十控件的单列长滚动。
|
|
44674
44614
|
// 指示胶囊随 activeTab 平移(transform 合成器属性,不引发布局);宽度按
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-folia",
|
|
3
|
-
"displayName": "Folia ·
|
|
4
|
-
"version": "4.26.0-pre.
|
|
5
|
-
"description": "
|
|
3
|
+
"displayName": "Folia · 壁纸引擎与 AI 桌宠",
|
|
4
|
+
"version": "4.26.0-pre.71",
|
|
5
|
+
"description": "Folia:壁纸引擎 + AI 桌宠语音助手 + 多人设角色卡 + 皮肤/开机动画 + 能力市场,一站式桌面伴侣。",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=22.12.0",
|