dsh-folia 4.26.0-pre.70 → 4.26.0-pre.72
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 +48 -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 域(守卫只对账键集,不按文件分域)。
|
|
@@ -925,6 +917,7 @@ window.__ModuleLoader__.load({
|
|
|
925
917
|
"对话": "Chat",
|
|
926
918
|
"可选工作能力(已安装才可用)": "Optional work capabilities (installed only)",
|
|
927
919
|
"能力": "Capabilities",
|
|
920
|
+
"工作": "Work",
|
|
928
921
|
"麦克风测试": "Microphone test",
|
|
929
922
|
"测试麦克风": "Test microphone",
|
|
930
923
|
"录音中…": "Recording…",
|
|
@@ -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,6 +21841,29 @@ 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
|
+
|
|
21853
|
+
|
|
21854
|
+
/** 本地封面:按名字做确定性色相,永不依赖网络(离线也好看)。 */
|
|
21855
|
+
function capCoverHue(item) {
|
|
21856
|
+
const text = String((item && (item.pkg || item.name)) || '');
|
|
21857
|
+
let h = 0;
|
|
21858
|
+
for (let i = 0; i < text.length; i += 1) h = (h * 31 + text.charCodeAt(i)) % 360;
|
|
21859
|
+
return h;
|
|
21860
|
+
}
|
|
21861
|
+
|
|
21862
|
+
function capCoverBg(item) {
|
|
21863
|
+
const h = capCoverHue(item);
|
|
21864
|
+
return 'linear-gradient(135deg, hsl(' + h + ' 45% 26%) 0%, hsl(' + ((h + 42) % 360) + ' 50% 15%) 100%)';
|
|
21865
|
+
}
|
|
21866
|
+
|
|
21903
21867
|
function CapabilityCard({ item }) {
|
|
21904
21868
|
const [open, setOpen] = React.useState(false);
|
|
21905
21869
|
const [copied, setCopied] = React.useState(false);
|
|
@@ -21942,6 +21906,24 @@ window.__ModuleLoader__.load({
|
|
|
21942
21906
|
const body = [head];
|
|
21943
21907
|
if (open) {
|
|
21944
21908
|
const line = (k, v) => React.createElement('div', { key: k, className: 'we-picker__hint', style: { marginTop: '4px' } }, v);
|
|
21909
|
+
// 本地生成的封面(图标 + 名称 + 分类),不依赖任何外部图片,离线也好看。
|
|
21910
|
+
const sectionLabel = item.section === 'fun' ? weT('娱乐') : weT('工作');
|
|
21911
|
+
body.push(React.createElement('div', { key: 'cover', style: { marginTop: '8px' } },
|
|
21912
|
+
React.createElement('div', {
|
|
21913
|
+
style: {
|
|
21914
|
+
height: '120px', borderRadius: '8px', overflow: 'hidden',
|
|
21915
|
+
display: 'flex', alignItems: 'center', gap: '12px', padding: '0 16px',
|
|
21916
|
+
background: capCoverBg(item),
|
|
21917
|
+
},
|
|
21918
|
+
}),
|
|
21919
|
+
React.createElement('span', { style: { fontSize: '40px', lineHeight: 1 } }, item.icon || '🧩'),
|
|
21920
|
+
React.createElement('div', { style: { minWidth: 0 } },
|
|
21921
|
+
React.createElement('div', {
|
|
21922
|
+
style: { fontWeight: 600, fontSize: '14px', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' },
|
|
21923
|
+
}, item.name),
|
|
21924
|
+
React.createElement('div', {
|
|
21925
|
+
style: { marginTop: '4px', fontSize: '11px', opacity: 0.78, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' },
|
|
21926
|
+
}, sectionLabel + ' · ' + (item.pkg || '')))));
|
|
21945
21927
|
body.push(React.createElement('div', { key: 'd-title', style: { marginTop: '8px', fontSize: '12px', fontWeight: 600 } }, weT('详情')));
|
|
21946
21928
|
body.push(line('desc', item.authorDesc || item.summary || ''));
|
|
21947
21929
|
body.push(React.createElement('div', { key: 'u-title', style: { marginTop: '8px', fontSize: '12px', fontWeight: 600 } }, weT('如何使用')));
|
|
@@ -39459,11 +39441,6 @@ window.__ModuleLoader__.load({
|
|
|
39459
39441
|
cacheState: "",
|
|
39460
39442
|
cachePercent: 0,
|
|
39461
39443
|
cacheFailReason: "",
|
|
39462
|
-
// WE 官方资源路径编辑器(transient):开态 + 草稿路径 + 上次错误。
|
|
39463
|
-
// 生效状态(目录/可用性)由 inventory 携带(host 是唯一真相)。
|
|
39464
|
-
editingWeAssetsDir: false,
|
|
39465
|
-
weAssetsDirDraft: "",
|
|
39466
|
-
weAssetsError: "",
|
|
39467
39444
|
inventory: { installDir: null, uploadDir: null, cacheDir: null, weAssetsDir: null, weAssetsAvailable: false, sceneMediaBase: "", wallpapers: [], total: 0, portableCount: 0, playlists: [], error: null },
|
|
39468
39445
|
loaded: false,
|
|
39469
39446
|
};
|
|
@@ -40921,30 +40898,6 @@ window.__ModuleLoader__.load({
|
|
|
40921
40898
|
emit();
|
|
40922
40899
|
}
|
|
40923
40900
|
|
|
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
40901
|
// ── Behind-body layer: wallpaper + scrim (plain DOM, NOT a slot) ───────────
|
|
40949
40902
|
// Edge (and only Edge) paints its own floating "下载/投屏" media-overlay toolbar
|
|
40950
40903
|
// over any VISIBLE <video> element, and it ignores pointer-events / controlsList /
|
|
@@ -42101,7 +42054,7 @@ window.__ModuleLoader__.load({
|
|
|
42101
42054
|
function onEditOrder(e) {
|
|
42102
42055
|
if (selection.editing) { selection.editing.order = e.target.value; emit(); }
|
|
42103
42056
|
}
|
|
42104
|
-
//
|
|
42057
|
+
// 上传目录的**草稿**状态 —— 都在 selection 的瞬态字段里。
|
|
42105
42058
|
function onStartEditUploadDir() {
|
|
42106
42059
|
setTransient("editingUploadDir", true);
|
|
42107
42060
|
setTransient("uploadDirDraft", selection.inventory.uploadDir || "");
|
|
@@ -42189,18 +42142,6 @@ window.__ModuleLoader__.load({
|
|
|
42189
42142
|
setTransient("cacheDirError", "");
|
|
42190
42143
|
emit();
|
|
42191
42144
|
}
|
|
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
42145
|
|
|
42205
42146
|
// ── 外观 / 播放 / 系统页签的处理器(同上一条:渲染器只读值 + 调这些)────────────
|
|
42206
42147
|
function onLeftSidebarGlass(e) { setSetting("leftSidebarGlass", e.target.checked); emit(); }
|
|
@@ -44657,18 +44598,18 @@ window.__ModuleLoader__.load({
|
|
|
44657
44598
|
);
|
|
44658
44599
|
return renderWallpaperTab({
|
|
44659
44600
|
setSetting, setTransient,
|
|
44660
|
-
INTERVALS, armedConfirm: sel.armedConfirm, cdMode, current, editing, editorPageView, group, groups, isLiveScene, onArmConfirm: armConfirm, onArmDeleteGroup, onCacheRetry: retryDownloadFirst, onCancelEditUploadDir,
|
|
44601
|
+
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
44602
|
});
|
|
44662
44603
|
};
|
|
44663
44604
|
const tabIdx = Math.max(0, visibleTabs.findIndex((t) => t.id === activeTab));
|
|
44664
44605
|
|
|
44665
44606
|
return React.createElement("div", { className: "we-picker", "data-we-cards": sel.pickerLayout, ref: pickerRootRef },
|
|
44666
44607
|
// ── Card header (mirrors the skin-center's pluginCard header): plugin
|
|
44667
|
-
// name + live wallpaper count badge
|
|
44608
|
+
// name + live wallpaper count badge. The old description line was
|
|
44609
|
+
// removed per product direction; title + badge stay. ──
|
|
44668
44610
|
React.createElement("div", { className: "we-picker__card-head" },
|
|
44669
44611
|
React.createElement("span", { className: "we-picker__card-name" }, weT("壁纸引擎")),
|
|
44670
44612
|
React.createElement("span", { className: "we-picker__card-badge" }, String(playableList.length)),
|
|
44671
|
-
React.createElement("span", { className: "we-picker__card-desc" }, weT("本地 Wallpaper Engine 壁纸 · 液态玻璃主题")),
|
|
44672
44613
|
),
|
|
44673
44614
|
// ── 页签栏(分段式):六个页签互斥展示,替代三十控件的单列长滚动。
|
|
44674
44615
|
// 指示胶囊随 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.72",
|
|
5
|
+
"description": "Folia:壁纸引擎 + AI 桌宠语音助手 + 多人设角色卡 + 皮肤/开机动画 + 能力市场,一站式桌面伴侣。",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=22.12.0",
|