@linxin666/dsh-client-ui-skin-center 0.3.6 → 0.3.9
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/contracts/semantic-attrs-v1.md +12 -2
- package/lib/client.js +10 -7
- package/lib/client.js.map +1 -1
- package/lib/index.js +31 -26
- package/package.json +15 -11
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
| `data-dsh-wallpaper-active` | html + body(body/html 级,另行管理) | WE 壁纸挂载期间置 `true`,卸载 / 禁用清除;供皮肤 CSS 与壁纸中和规则锚定(#734) |
|
|
46
46
|
| `data-dsh-wallpaper-surface` | 官方 shell 全视口背景元素 + 侧栏工作区淡化条(元素级) | `WallpaperController.markWallpaperSurfaces()` 在 WE 壁纸挂载期间打标(全视口 bg-base 背景 + `data-slot="sidebar.workspaces"` 内渐变淡化条),命中 `html[data-dsh-wallpaper-active] [data-dsh-wallpaper-surface]` 中和;卸载清除,不含哈希类依赖(#734) |
|
|
47
47
|
|
|
48
|
-
## part 组(
|
|
48
|
+
## part 组(49 行,含各 owner 行)
|
|
49
49
|
|
|
50
50
|
shell 区域(owner: shell):
|
|
51
51
|
|
|
@@ -81,6 +81,7 @@ family / 插件区域:
|
|
|
81
81
|
| `worktree-create` / `worktree-manage` | git-graph | worktree 创建/管理入口按钮;分支弹层 footer 内裸值按钮 |
|
|
82
82
|
| `sprite` | pet | 精灵;`[data-dsh-pet-root]` 子树 float 容器 |
|
|
83
83
|
| `bubble` | pet | 气泡容器 |
|
|
84
|
+
| `announcement` | pet | 插件公告气泡(dsh-usage 联动);`[data-dsh-pet-announcement]`,值来源插件标签 |
|
|
84
85
|
| `panel` | pet | 交互面板;`[data-placement]` |
|
|
85
86
|
| `summon-button` | pet | 召唤钮;`[data-testid="pet-summon"]` |
|
|
86
87
|
| `plugin-item` | web-ui-settings | 家族插件设置卡;`[data-slot="web-ui.plugin.item"]` 内 entry |
|
|
@@ -109,8 +110,16 @@ family / 插件区域:
|
|
|
109
110
|
| `shop` | miku-pet | 商店居中窗口;`[data-dsh-part="shop"]` |
|
|
110
111
|
| `bubble` | miku-pet | 对话气泡;`[data-dsh-part="bubble"]` |
|
|
111
112
|
| `float` | miku-pet | 互动飘字;`[data-dsh-part="float"]` |
|
|
113
|
+
| `header` | usage | 使用统计分区头部(当前提供方 + 刷新钮);`[data-dsh-plugin="usage"] [data-dsh-part="header"]` |
|
|
114
|
+
| `tabs` / `tab` | usage | 用量/个人套餐页签;`[role="tablist"]` / `[role="tab"]` |
|
|
115
|
+
| `today-card` | usage | 今日用量统计卡;`[data-dsh-part="today-card"]` |
|
|
116
|
+
| `provider-list` / `provider-row` | usage | 今日分 provider 用量列表 / 余额行;卡片内行容器 |
|
|
117
|
+
| `balance-card` | usage | 各 provider 余额卡;`[data-dsh-part="balance-card"]` |
|
|
118
|
+
| `trend-card` / `usage-chart` | usage | 近 30 天卡 / 其中的提供方-模型条形图;`[data-dsh-part="trend-card"]` 内 `[data-dsh-part="usage-chart"]` |
|
|
119
|
+
| `settings-row` | usage | 插件设置行;`[data-dsh-part="settings-row"]` |
|
|
120
|
+
| `plan-card` / `plan-window` | usage | 套餐卡 / 套餐窗口行(个人套餐页签);`[data-dsh-part="plan-card"]` 内窗口行 |
|
|
112
121
|
|
|
113
|
-
## plugin 组(
|
|
122
|
+
## plugin 组(14 个,含停更 aionui-panel)
|
|
114
123
|
|
|
115
124
|
| data-dsh-plugin | owner | 锚定方式 |
|
|
116
125
|
| --- | --- | --- |
|
|
@@ -127,6 +136,7 @@ family / 插件区域:
|
|
|
127
136
|
| `skin-center` | skins/skin-center | 一级设置分区 settings.section id `skin-center`(列已安装皮肤,属内置源时显式标记) |
|
|
128
137
|
| `session-id` | dsh-session-id | footer action slot entry id `session-id`;`[data-dsh-plugin="session-id"]`(面板 overlay 根 + 入口触发器) |
|
|
129
138
|
| `miku-pet` | dsh-miku-pet | 宠物浮层根 `[data-dsh-plugin="miku-pet"]`;host 路由前缀 `/miku-pet/*`;设置页 settings.section id `miku-pet-config` |
|
|
139
|
+
| `usage` | dsh-usage | 一级设置分区 settings.section id `dsh-usage`(创意工坊下方);`[data-dsh-plugin="usage"]` |
|
|
130
140
|
|
|
131
141
|
## 已知脆弱点(上游主题缝 PR 诉求)
|
|
132
142
|
|
package/lib/client.js
CHANGED
|
@@ -520,9 +520,9 @@ window.__ModuleLoader__.load({
|
|
|
520
520
|
const alpha = Number.parseFloat(value);
|
|
521
521
|
return Number.isFinite(alpha) && alpha > 0;
|
|
522
522
|
}
|
|
523
|
-
/** Exclude owned layers plus modal/plugin surfaces that must retain their paint. */
|
|
523
|
+
/** Exclude owned layers plus modal/plugin/sidebar/details surfaces that must retain their paint. */
|
|
524
524
|
function isExcludedWallpaperSurface(el, zIndex) {
|
|
525
|
-
if (typeof el.closest === "function" && el.closest("[data-dsh-wallpaper-layer], dialog, [role=\"dialog\"], [aria-modal=\"true\"], [data-shell-overlay], [data-slot=\"shell.overlay\"], [data-dsh-plugin]") !== null) return true;
|
|
525
|
+
if (typeof el.closest === "function" && el.closest("[data-dsh-wallpaper-layer], dialog, [role=\"dialog\"], [aria-modal=\"true\"], [data-shell-overlay], [data-slot=\"shell.overlay\"], [data-dsh-plugin], [data-slot=\"sidebar\"], [data-dsh-surface=\"sidebar\"], [data-slot=\"sidebar.workspaces\"], [data-pane=\"sidebar\"], aside, [data-slot=\"details\"], [data-dsh-surface=\"details\"], [data-pane=\"details\"], [class*=\"detailsCol\"], .aionui-root, [data-aionui-explorer-col], [data-aionui-preview-col], [data-dsh-better-sidebar], [data-dsh-panel-host]") !== null) return true;
|
|
526
526
|
const numericZIndex = Number.parseFloat(zIndex);
|
|
527
527
|
return Number.isFinite(numericZIndex) && numericZIndex > MAX_SURFACE_OVERLAY_Z_INDEX;
|
|
528
528
|
}
|
|
@@ -4812,7 +4812,7 @@ window.__ModuleLoader__.load({
|
|
|
4812
4812
|
/** The building package's version, when the bundle carries it. */
|
|
4813
4813
|
function bakedVersion() {
|
|
4814
4814
|
try {
|
|
4815
|
-
return "0.3.
|
|
4815
|
+
return "0.3.9";
|
|
4816
4816
|
} catch {
|
|
4817
4817
|
return;
|
|
4818
4818
|
}
|
|
@@ -4878,15 +4878,14 @@ window.__ModuleLoader__.load({
|
|
|
4878
4878
|
//#region src/client/index.ts
|
|
4879
4879
|
/** Locale namespace owned by this plugin. */
|
|
4880
4880
|
const NS = "skinCenter";
|
|
4881
|
-
/** Required services: slots + locale (plugin card), theme (preview toggle), settingsScope + its transport (background scrim), and
|
|
4881
|
+
/** Required services: slots + locale (plugin card), theme (preview toggle), settingsScope + its transport (background scrim), and remote (wallpaper directory picker). */
|
|
4882
4882
|
const inject = [
|
|
4883
4883
|
"slots",
|
|
4884
4884
|
"locale",
|
|
4885
4885
|
"theme",
|
|
4886
4886
|
"settingsScope",
|
|
4887
4887
|
"connection",
|
|
4888
|
-
"remote"
|
|
4889
|
-
"workspaces"
|
|
4888
|
+
"remote"
|
|
4890
4889
|
];
|
|
4891
4890
|
/** Self-report item for the install heartbeat. */
|
|
4892
4891
|
const SELF_ITEM = [{ name: "@linxin666/dsh-client-ui-skin-center" }];
|
|
@@ -5050,7 +5049,11 @@ window.__ModuleLoader__.load({
|
|
|
5050
5049
|
dirs: () => wallpaper.dirs(),
|
|
5051
5050
|
addDir: (dir) => wallpaper.addDir(dir),
|
|
5052
5051
|
removeDir: (dir) => wallpaper.removeDir(dir),
|
|
5053
|
-
pickDir: () =>
|
|
5052
|
+
pickDir: async () => {
|
|
5053
|
+
const result = await ctx.remote.directoryPicker.pick();
|
|
5054
|
+
if (!result.ok) throw new Error(result.error.message);
|
|
5055
|
+
return result.value;
|
|
5056
|
+
},
|
|
5054
5057
|
activeId: () => wallpaper.activeId(),
|
|
5055
5058
|
trying: () => wallpaper.trying(),
|
|
5056
5059
|
subscribe: (listener) => wallpaper.subscribe(listener),
|