dsh-preview-market 0.1.1 → 0.1.2
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/CHANGELOG.md +5 -0
- package/README.md +22 -5
- package/README.zh.md +13 -4
- package/VERIFY.md +33 -4
- package/catalog.json +123 -0
- package/lib/client.js +67 -7
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
- Add a top-level **Settings → Preview market** section, next to dsh-market, with Discover / Installed tabs.
|
|
6
|
+
- Keep the Settings → Plugins tab for discoverability; both render the same panel.
|
|
7
|
+
|
|
3
8
|
## 0.1.1
|
|
4
9
|
|
|
5
10
|
- Enable/disable installed preview plugins from the market when dsh-market is present (`/dsh-market/toggle`), with the current state read from `/dsh-market/installed`.
|
package/README.md
CHANGED
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
# dsh-preview-market
|
|
2
2
|
|
|
3
|
-
A **vertical preview market** for DeepSeek Harness.
|
|
3
|
+
A **vertical preview market** for DeepSeek Harness. A top-level settings section (and a Settings → Plugins tab) lists the preview plugins that exist for DSH, shows which ones the active profile already has, and hands installs/updates to [dsh-market](https://github.com/dsh-market/dsh-market) or the official `dsh plugin` command.
|
|
4
4
|
|
|
5
5
|
It is not a general plugin market, and it does not implement previews itself: every preview plugin stays an independent Loader entry with its own repository, version and settings. The market only provides the catalog, the installed view and the entry points.
|
|
6
6
|
|
|
7
|
+

|
|
8
|
+
|
|
7
9
|
## Install
|
|
8
10
|
|
|
9
11
|
```sh
|
|
10
12
|
dsh plugin --profile <profile> add dsh-preview-market
|
|
11
13
|
```
|
|
12
14
|
|
|
13
|
-
Open **Settings →
|
|
15
|
+
Open **Settings → Preview market** (the same panel is also under **Settings → Plugins**).
|
|
16
|
+
|
|
17
|
+
Upgrading from `dsh-media-preview` / `dsh-blend-preview` / `dsh-stl-preview`? See [MIGRATION.md](MIGRATION.md).
|
|
14
18
|
|
|
15
19
|
## What it does
|
|
16
20
|
|
|
17
21
|
- **Catalog** — first-party preview plugins with their formats, host requirements and versions.
|
|
18
|
-
- **Installed view** — reads the active profile's `package.json
|
|
22
|
+
- **Installed view** — reads the active profile's `package.json`, matching catalog names by default and honouring a package's `dsh.preview` manifest when present; never imports child plugin code.
|
|
19
23
|
- **Install / update** — delegates to `dsh-market` when it is present. Without it, the card shows the exact `dsh plugin --profile <profile> add <package>@<version>` command to copy.
|
|
20
24
|
- **Independent plugins** — media, Blender and STL remain separate packages; this page has no renderer and does not merge their code.
|
|
21
25
|
|
|
22
|
-
## Catalog (0.1.
|
|
26
|
+
## Catalog (0.1.2)
|
|
23
27
|
|
|
24
28
|
| Package | Formats | Host requirement |
|
|
25
29
|
|---|---|---|
|
|
@@ -38,12 +42,25 @@ Settings → Plugins → Preview market (namespace `preview-market`):
|
|
|
38
42
|
| `profileDir` | `""` | Profile to inspect. Empty uses the Host `profileContext`, then `$DSH_HOME/profiles/desktop`. |
|
|
39
43
|
| `debug` | `false` | Reserved for request diagnostics. |
|
|
40
44
|
|
|
45
|
+
## Examples
|
|
46
|
+
|
|
47
|
+
- [`examples/profile-overrides.yml`](examples/profile-overrides.yml) — a safe starting point for per-profile overrides (media chunk size, Blender path, STL unit scale).
|
|
48
|
+
- [`catalog.json`](catalog.json) — machine-readable snapshot of the shipped catalog, enforced by a unit test.
|
|
49
|
+
|
|
41
50
|
## Development
|
|
42
51
|
|
|
43
52
|
```sh
|
|
44
53
|
node --test test/*.test.js
|
|
45
54
|
```
|
|
46
55
|
|
|
56
|
+
`catalog.json` is a machine-readable snapshot of the shipped catalog; regenerate it with `npm run catalog:write` and keep it in sync (a test enforces this).
|
|
57
|
+
|
|
58
|
+
Settings-section end-to-end (requires a running host with the plugin installed):
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
node scripts/e2e-section.mjs --base http://127.0.0.1:<port> --token <token>
|
|
62
|
+
```
|
|
63
|
+
|
|
47
64
|
Settings-tab end-to-end (requires a running host with the plugin installed):
|
|
48
65
|
|
|
49
66
|
```sh
|
|
@@ -66,4 +83,4 @@ The client bundle is `lib/client.js` (classic `__ModuleLoader__.load` factory, n
|
|
|
66
83
|
|
|
67
84
|
## Status
|
|
68
85
|
|
|
69
|
-
`0.1.
|
|
86
|
+
`0.1.2` — top-level Settings → Preview market section with Discover / Installed tabs, plus the Settings → Plugins tab. Enable/disable goes through dsh-market. One-click install requires the package in the connected dsh-market registry; otherwise use the copyable command. Configuration stays in each child plugin's own Settings → Plugins page.
|
package/README.zh.md
CHANGED
|
@@ -4,22 +4,26 @@
|
|
|
4
4
|
|
|
5
5
|
它不是通用插件市场,也不自己实现预览:每个预览插件仍是独立的 Loader 条目,有自己的仓库、版本和设置;市场只提供目录、已安装视图和入口。
|
|
6
6
|
|
|
7
|
+

|
|
8
|
+
|
|
7
9
|
## 安装
|
|
8
10
|
|
|
9
11
|
```sh
|
|
10
12
|
dsh plugin --profile <profile> add dsh-preview-market
|
|
11
13
|
```
|
|
12
14
|
|
|
13
|
-
打开 **设置 →
|
|
15
|
+
打开 **设置 → 预览市场**(同一个面板也在 **设置 → 插件** 下)。
|
|
16
|
+
|
|
17
|
+
从 `dsh-media-preview` / `dsh-blend-preview` / `dsh-stl-preview` 升级?见 [MIGRATION.md](MIGRATION.md)。
|
|
14
18
|
|
|
15
19
|
## 功能
|
|
16
20
|
|
|
17
21
|
- **目录** — 第一方预览插件及其格式、宿主依赖、版本。
|
|
18
|
-
- **已安装** — 读当前 profile 的 `package.json
|
|
22
|
+
- **已安装** — 读当前 profile 的 `package.json`,默认按目录名匹配;包内声明 `dsh.preview` 清单时也认。不 import 子插件代码。
|
|
19
23
|
- **安装/更新** — 检测到 dsh-market 时委托给它;没有时显示可复制的 `dsh plugin --profile <profile> add <包>@<版本>` 命令。
|
|
20
24
|
- **独立插件** — media、Blender、STL 仍是独立包;本页不注册渲染器,也不合并它们的代码。
|
|
21
25
|
|
|
22
|
-
## 目录(0.1.
|
|
26
|
+
## 目录(0.1.2)
|
|
23
27
|
|
|
24
28
|
| 包 | 格式 | 宿主依赖 |
|
|
25
29
|
|---|---|---|
|
|
@@ -38,6 +42,11 @@ dsh plugin --profile <profile> add dsh-preview-market
|
|
|
38
42
|
| `profileDir` | `""` | 要检查的 profile;空则用 Host `profileContext`,再退到 `$DSH_HOME/profiles/desktop`。 |
|
|
39
43
|
| `debug` | `false` | 预留的请求诊断。 |
|
|
40
44
|
|
|
45
|
+
## 示例
|
|
46
|
+
|
|
47
|
+
- [`examples/profile-overrides.yml`](examples/profile-overrides.yml):按 profile 覆盖媒体分块、Blender 路径、STL 单位。
|
|
48
|
+
- [`catalog.json`](catalog.json):目录的机器可读快照,单测会检查它与代码一致。
|
|
49
|
+
|
|
41
50
|
## 开发
|
|
42
51
|
|
|
43
52
|
```sh
|
|
@@ -48,4 +57,4 @@ node --test test/*.test.js
|
|
|
48
57
|
|
|
49
58
|
## 状态
|
|
50
59
|
|
|
51
|
-
`0.1.
|
|
60
|
+
`0.1.2` — 顶层「设置 → 预览市场」+ 发现/已安装两个 tab,同时保留「设置 → 插件」里的入口。启用/停用走 dsh-market;一键安装要求对应包已进入所连接 dsh-market 的 registry,否则用可复制命令。配置仍在各子插件自己的 设置 → 插件 页面。
|
package/VERIFY.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Verification record — dsh-preview-market 0.1.
|
|
1
|
+
# Verification record — dsh-preview-market 0.1.2
|
|
2
2
|
|
|
3
3
|
## Unit tests (2026-10-23)
|
|
4
4
|
|
|
@@ -18,6 +18,14 @@
|
|
|
18
18
|
- The Web boot graph (`__DSH_BOOT__`) contains `dsh-preview-market` and injects `__DSH_PREVIEW_MARKET_CONFIG__`.
|
|
19
19
|
- The combo bundle URL returned **200** (16,213 B) and contains `settings.plugins.tab` + `dsh-preview-market`.
|
|
20
20
|
|
|
21
|
+
## Top-level section e2e (2026-10-23, preview-test)
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
node scripts/e2e-section.mjs --base http://127.0.0.1:59010 --token <token>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Result: **PASS** — the Settings nav contains `预览市场` immediately after `插件市场`; opening it shows the `发现` / `已安装` tabs and the three catalog cards (`dsh-preview-media`, `dsh-preview-blender`, `dsh-preview-stl`). No page errors. Screenshot: `docs/preview-market-section.png`.
|
|
28
|
+
|
|
21
29
|
## Settings tab e2e (2026-10-23, preview-test)
|
|
22
30
|
|
|
23
31
|
Installed `dsh-preview-market@0.1.0` plus `dsh-preview-media@0.1.4`, `dsh-preview-blender@0.1.0`, `dsh-preview-stl@0.1.0` into `preview-test`, started the Web host, and ran:
|
|
@@ -48,8 +56,29 @@ node scripts/e2e-toggle.mjs --base http://127.0.0.1:59006 --token <token>
|
|
|
48
56
|
|
|
49
57
|
Result: **PASS** — the STL card showed `停用`; clicking it wrote `dsh-preview-stl` into `/dsh-market/installed`'s `disabled` list and showed `已切换,刷新页面后生效`; clicking `启用` removed it again. The media card's `配置` showed `在 设置 → 插件 → dsh-preview-media 配置。` No page errors; screenshot: `%TEMP%\dsh-preview-market-toggle.png`.
|
|
50
58
|
|
|
51
|
-
##
|
|
59
|
+
## npm artifact install (2026-10-23, preview-test)
|
|
60
|
+
|
|
61
|
+
Replaced the local tarball with the published `dsh-preview-market@0.1.1` from npm (`dsh plugin --profile preview-test add dsh-preview-market@0.1.1`), then ran the settings e2e against that install:
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
node scripts/e2e-settings.mjs --base http://127.0.0.1:59007 --token <token>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Result: **PASS** — tab and all three installed cards rendered from the npm artifact. `package.json` dependency is `0.1.1`, `node_modules/dsh-preview-market/package.json` reports `0.1.1`.
|
|
68
|
+
|
|
69
|
+
## One-click install e2e (fixture registry, 2026-10-23)
|
|
52
70
|
|
|
53
|
-
|
|
71
|
+
To exercise the real install route without waiting for the production catalog, a local registry fixture was served on `127.0.0.1:59008`:
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{"plugins":[{"name":"dsh-preview-stl","url":"https://github.com/439436269-ctrl/dsh-preview-stl","npm":"dsh-preview-stl","category":["ui"]}]}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The host was started with `DSHM_REGISTRY_URL=http://127.0.0.1:59008/plugins.json`, `dsh-preview-stl` was removed from `preview-test`, and the market's STL card was clicked. Result: **PASS** — dshmarket installed `dsh-preview-stl@0.1.0`; `/dsh-market/installed` contained it, the notice said `已安装: dsh-preview-stl`, and the card switched to `已是最新` with `停用`/`配置`. No page errors. Screenshot: `%TEMP%\market-oneclick.png`.
|
|
78
|
+
|
|
79
|
+
This proves the install route itself; the production catalog still needs the entries scheduled for 2026-10-24.
|
|
80
|
+
|
|
81
|
+
## Not yet verified live
|
|
54
82
|
|
|
55
|
-
|
|
83
|
+
- Production one-click install through the real dsh-market catalog (the new entries are scheduled for 2026-10-24).
|
|
84
|
+
- Desktop installation (the desktop profile is Electron-managed).
|
package/catalog.json
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": 1,
|
|
3
|
+
"plugins": [
|
|
4
|
+
{
|
|
5
|
+
"name": "dsh-preview-media",
|
|
6
|
+
"npm": "dsh-preview-media",
|
|
7
|
+
"capability": "media",
|
|
8
|
+
"kind": "media",
|
|
9
|
+
"repo": "https://github.com/439436269-ctrl/dsh-preview-media",
|
|
10
|
+
"version": "0.1.4",
|
|
11
|
+
"minDsh": "0.2.0-rc.2",
|
|
12
|
+
"requires": [],
|
|
13
|
+
"extensions": [
|
|
14
|
+
"mp4",
|
|
15
|
+
"m4v",
|
|
16
|
+
"mov",
|
|
17
|
+
"webm",
|
|
18
|
+
"ogv",
|
|
19
|
+
"ogg",
|
|
20
|
+
"mkv",
|
|
21
|
+
"avi",
|
|
22
|
+
"wmv",
|
|
23
|
+
"flv",
|
|
24
|
+
"3gp",
|
|
25
|
+
"ts",
|
|
26
|
+
"m2ts",
|
|
27
|
+
"mts",
|
|
28
|
+
"mp3",
|
|
29
|
+
"wav",
|
|
30
|
+
"flac",
|
|
31
|
+
"m4a",
|
|
32
|
+
"aac",
|
|
33
|
+
"oga",
|
|
34
|
+
"opus",
|
|
35
|
+
"weba",
|
|
36
|
+
"wma",
|
|
37
|
+
"aiff",
|
|
38
|
+
"aif"
|
|
39
|
+
],
|
|
40
|
+
"formats": {
|
|
41
|
+
"video": [
|
|
42
|
+
"mp4",
|
|
43
|
+
"m4v",
|
|
44
|
+
"mov",
|
|
45
|
+
"webm",
|
|
46
|
+
"ogv",
|
|
47
|
+
"ogg",
|
|
48
|
+
"mkv",
|
|
49
|
+
"avi",
|
|
50
|
+
"wmv",
|
|
51
|
+
"flv",
|
|
52
|
+
"3gp",
|
|
53
|
+
"ts",
|
|
54
|
+
"m2ts",
|
|
55
|
+
"mts"
|
|
56
|
+
],
|
|
57
|
+
"audio": [
|
|
58
|
+
"mp3",
|
|
59
|
+
"wav",
|
|
60
|
+
"flac",
|
|
61
|
+
"m4a",
|
|
62
|
+
"aac",
|
|
63
|
+
"oga",
|
|
64
|
+
"opus",
|
|
65
|
+
"weba",
|
|
66
|
+
"wma",
|
|
67
|
+
"aiff",
|
|
68
|
+
"aif"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"description": {
|
|
72
|
+
"zh": "视频与音频:右侧栏原生播放器,HTTP Range 流式读取,桌面端可拖动进度。",
|
|
73
|
+
"en": "Video and audio in the right-Sidebar document preview, streamed with HTTP Range and seekable in the desktop app."
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "dsh-preview-blender",
|
|
78
|
+
"npm": "dsh-preview-blender",
|
|
79
|
+
"capability": "blender",
|
|
80
|
+
"kind": "three",
|
|
81
|
+
"repo": "https://github.com/439436269-ctrl/dsh-preview-blender",
|
|
82
|
+
"version": "0.1.0",
|
|
83
|
+
"minDsh": "0.2.0-rc.2",
|
|
84
|
+
"requires": [
|
|
85
|
+
"blender"
|
|
86
|
+
],
|
|
87
|
+
"extensions": [
|
|
88
|
+
"blend"
|
|
89
|
+
],
|
|
90
|
+
"formats": {
|
|
91
|
+
"model": [
|
|
92
|
+
"blend"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"description": {
|
|
96
|
+
"zh": "Blender 场景:headless 导出缓存 GLB,右侧栏 WebGL 视口 + 对象/三角面/mm 包围盒/材质统计。",
|
|
97
|
+
"en": "Blender scenes: a cached headless GLB export rendered in a WebGL viewport, with object, triangle, mm-bounds and material statistics."
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "dsh-preview-stl",
|
|
102
|
+
"npm": "dsh-preview-stl",
|
|
103
|
+
"capability": "stl",
|
|
104
|
+
"kind": "three",
|
|
105
|
+
"repo": "https://github.com/439436269-ctrl/dsh-preview-stl",
|
|
106
|
+
"version": "0.1.0",
|
|
107
|
+
"minDsh": "0.2.0-rc.2",
|
|
108
|
+
"requires": [],
|
|
109
|
+
"extensions": [
|
|
110
|
+
"stl"
|
|
111
|
+
],
|
|
112
|
+
"formats": {
|
|
113
|
+
"model": [
|
|
114
|
+
"stl"
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
"description": {
|
|
118
|
+
"zh": "STL 网格:浏览器解析二进制/ASCII,右侧栏 WebGL 视口 + 尺寸/体积/表面积/水密统计。",
|
|
119
|
+
"en": "STL meshes: binary/ASCII parsed in the browser, with a WebGL viewport and size, volume, surface-area and watertightness statistics."
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
package/lib/client.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dsh-preview-market browser half.
|
|
3
3
|
*
|
|
4
|
-
* Registers
|
|
4
|
+
* Registers a top-level Settings → Preview market section and keeps the
|
|
5
|
+
* Settings → Plugins tab. Both render the same panel: the Host catalog plus the
|
|
5
6
|
* active profile inventory, then either delegates installs/updates to
|
|
6
7
|
* dsh-market's same-origin API or shows the official `dsh plugin add` command.
|
|
7
8
|
* It never imports a preview plugin's client bundle; those stay independent
|
|
@@ -14,8 +15,9 @@ window.__ModuleLoader__.load({
|
|
|
14
15
|
var exports = module.exports;
|
|
15
16
|
const React = require("react");
|
|
16
17
|
|
|
17
|
-
/** Locale namespace and
|
|
18
|
+
/** Locale namespace, section id and Settings → Plugins tab id. */
|
|
18
19
|
const NS = "previewMarket";
|
|
20
|
+
const SECTION_ID = "preview-market";
|
|
19
21
|
const TAB_ID = "dsh-preview-market";
|
|
20
22
|
const DEFAULT_ROUTE_ROOT = "/api/preview-market";
|
|
21
23
|
|
|
@@ -53,7 +55,10 @@ window.__ModuleLoader__.load({
|
|
|
53
55
|
manageHint: "到 设置 → 插件 启用/停用。",
|
|
54
56
|
toggled: "已切换。",
|
|
55
57
|
toggleRefresh: "已切换,刷新页面后生效。",
|
|
56
|
-
toggleFailed: "切换失败"
|
|
58
|
+
toggleFailed: "切换失败",
|
|
59
|
+
tabDiscover: "发现",
|
|
60
|
+
tabInstalled: "已安装",
|
|
61
|
+
installedEmpty: "还没有安装本市场的预览插件。"
|
|
57
62
|
};
|
|
58
63
|
|
|
59
64
|
const en = {
|
|
@@ -90,7 +95,10 @@ window.__ModuleLoader__.load({
|
|
|
90
95
|
manageHint: "Use Settings → Plugins to enable or disable it.",
|
|
91
96
|
toggled: "Toggled.",
|
|
92
97
|
toggleRefresh: "Toggled; refresh the page to apply.",
|
|
93
|
-
toggleFailed: "Toggle failed"
|
|
98
|
+
toggleFailed: "Toggle failed",
|
|
99
|
+
tabDiscover: "Discover",
|
|
100
|
+
tabInstalled: "Installed",
|
|
101
|
+
installedEmpty: "No preview plugins from this market are installed yet."
|
|
94
102
|
};
|
|
95
103
|
|
|
96
104
|
/** Route root published by the Host at boot. */
|
|
@@ -205,6 +213,7 @@ window.__ModuleLoader__.load({
|
|
|
205
213
|
});
|
|
206
214
|
const [notice, setNotice] = React.useState("");
|
|
207
215
|
const [busy, setBusy] = React.useState("");
|
|
216
|
+
const [tab, setTab] = React.useState("discover");
|
|
208
217
|
|
|
209
218
|
const load = React.useCallback(async () => {
|
|
210
219
|
setState((previous) => ({ ...previous, loading: true, error: "" }));
|
|
@@ -252,6 +261,8 @@ window.__ModuleLoader__.load({
|
|
|
252
261
|
}, [load]);
|
|
253
262
|
|
|
254
263
|
const installedByName = new Map(state.installed.map((entry) => [entry.name, entry]));
|
|
264
|
+
const installedCards = state.catalog.filter((item) => installedByName.has(item.name));
|
|
265
|
+
const visible = tab === "installed" ? installedCards : state.catalog;
|
|
255
266
|
|
|
256
267
|
const install = React.useCallback(async (item) => {
|
|
257
268
|
setBusy(item.name);
|
|
@@ -334,6 +345,36 @@ window.__ModuleLoader__.load({
|
|
|
334
345
|
)
|
|
335
346
|
)
|
|
336
347
|
),
|
|
348
|
+
React.createElement(
|
|
349
|
+
"div",
|
|
350
|
+
{ className: "dsh-pm-tabs", role: "tablist" },
|
|
351
|
+
React.createElement(
|
|
352
|
+
"button",
|
|
353
|
+
{
|
|
354
|
+
type: "button",
|
|
355
|
+
role: "tab",
|
|
356
|
+
className: "dsh-pm-tab",
|
|
357
|
+
"data-active": tab === "discover",
|
|
358
|
+
"aria-selected": tab === "discover",
|
|
359
|
+
onClick: () => setTab("discover")
|
|
360
|
+
},
|
|
361
|
+
t("tabDiscover"),
|
|
362
|
+
React.createElement("span", { className: "dsh-pm-count" }, state.catalog.length)
|
|
363
|
+
),
|
|
364
|
+
React.createElement(
|
|
365
|
+
"button",
|
|
366
|
+
{
|
|
367
|
+
type: "button",
|
|
368
|
+
role: "tab",
|
|
369
|
+
className: "dsh-pm-tab",
|
|
370
|
+
"data-active": tab === "installed",
|
|
371
|
+
"aria-selected": tab === "installed",
|
|
372
|
+
onClick: () => setTab("installed")
|
|
373
|
+
},
|
|
374
|
+
t("tabInstalled"),
|
|
375
|
+
React.createElement("span", { className: "dsh-pm-count" }, installedCards.length)
|
|
376
|
+
)
|
|
377
|
+
),
|
|
337
378
|
state.loading
|
|
338
379
|
? React.createElement("p", { className: "dsh-pm-empty" }, t("loading"))
|
|
339
380
|
: state.error !== ""
|
|
@@ -343,12 +384,12 @@ window.__ModuleLoader__.load({
|
|
|
343
384
|
React.createElement("p", null, `${t("failed")}: ${state.error}`),
|
|
344
385
|
React.createElement("button", { type: "button", className: "dsh-pm-button", onClick: () => void load() }, t("retry"))
|
|
345
386
|
)
|
|
346
|
-
:
|
|
347
|
-
? React.createElement("p", { className: "dsh-pm-empty" }, t("empty"))
|
|
387
|
+
: visible.length === 0
|
|
388
|
+
? React.createElement("p", { className: "dsh-pm-empty" }, tab === "installed" ? t("installedEmpty") : t("empty"))
|
|
348
389
|
: React.createElement(
|
|
349
390
|
"div",
|
|
350
391
|
{ className: "dsh-pm-grid" },
|
|
351
|
-
|
|
392
|
+
visible.map((item) =>
|
|
352
393
|
React.createElement(Card, {
|
|
353
394
|
key: item.name,
|
|
354
395
|
item,
|
|
@@ -385,6 +426,10 @@ window.__ModuleLoader__.load({
|
|
|
385
426
|
"[data-preview-market] .dsh-pm-status{display:flex;gap:6px;flex-wrap:wrap}",
|
|
386
427
|
"[data-preview-market] .dsh-pm-pill{border-radius:999px;padding:3px 9px;font-size:11px;background:var(--dsw-alias-interactive-bg-hover,rgba(0,0,0,.06))}",
|
|
387
428
|
"[data-preview-market] .dsh-pm-pill[data-tone=ok]{color:#1f7a4d;background:rgba(46,160,92,.14)}",
|
|
429
|
+
"[data-preview-market] .dsh-pm-tabs{display:flex;gap:2px;border-bottom:1px solid var(--dsw-alias-border-l1,rgba(0,0,0,.1))}",
|
|
430
|
+
"[data-preview-market] .dsh-pm-tab{appearance:none;border:0;border-bottom:2px solid transparent;background:none;color:inherit;font:inherit;font-size:12px;padding:7px 10px;cursor:pointer;opacity:.62;display:inline-flex;align-items:center;gap:6px}",
|
|
431
|
+
"[data-preview-market] .dsh-pm-tab[data-active=true]{opacity:1;font-weight:650;border-bottom-color:var(--dsw-alias-label-accent,#2c6ef2)}",
|
|
432
|
+
"[data-preview-market] .dsh-pm-count{font-size:10.5px;border-radius:999px;padding:1px 6px;background:rgba(0,0,0,.06)}",
|
|
388
433
|
"[data-preview-market] .dsh-pm-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}",
|
|
389
434
|
"[data-preview-market] .dsh-pm-card{border:1px solid var(--dsw-alias-border-l1,rgba(0,0,0,.1));border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:9px;background:var(--dsw-alias-bg-layer-2,rgba(0,0,0,.02))}",
|
|
390
435
|
"[data-preview-market] .dsh-pm-card-head{display:flex;justify-content:space-between;gap:8px;align-items:center}",
|
|
@@ -418,6 +463,21 @@ window.__ModuleLoader__.load({
|
|
|
418
463
|
installStyle();
|
|
419
464
|
const t = ctx.locale.bind(NS);
|
|
420
465
|
ctx.effect(() => ctx.locale.register(NS, { zh, en }), "preview-market: dictionaries");
|
|
466
|
+
// Top-level Settings section, next to dsh-market's "Plugin market" row.
|
|
467
|
+
ctx.slots.inject("settings.section", () =>
|
|
468
|
+
ctx.slots.register(
|
|
469
|
+
{
|
|
470
|
+
name: "settings.section",
|
|
471
|
+
id: SECTION_ID,
|
|
472
|
+
order: 41,
|
|
473
|
+
label: () => t("nav"),
|
|
474
|
+
locale: NS,
|
|
475
|
+
inject: () => ({ t })
|
|
476
|
+
},
|
|
477
|
+
() => React.createElement(MarketPanel, { t })
|
|
478
|
+
)
|
|
479
|
+
);
|
|
480
|
+
// Keep the tab under Settings → Plugins for discoverability.
|
|
421
481
|
ctx.slots.inject("settings.plugins.tab", () =>
|
|
422
482
|
ctx.slots.register(
|
|
423
483
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-preview-market",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Vertical preview market for DeepSeek Harness: discover, install and configure preview plugins (media, Blender, STL, ...) from one panel.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"lib/**/*.js",
|
|
24
|
+
"catalog.json",
|
|
24
25
|
"cordis.patch.yml",
|
|
25
26
|
"README.md",
|
|
26
27
|
"README.zh.md",
|
|
@@ -66,7 +67,9 @@
|
|
|
66
67
|
},
|
|
67
68
|
"scripts": {
|
|
68
69
|
"test": "node --test test/*.test.js",
|
|
70
|
+
"catalog:write": "node scripts/write-catalog.mjs",
|
|
69
71
|
"e2e": "node scripts/e2e-settings.mjs",
|
|
72
|
+
"e2e:section": "node scripts/e2e-section.mjs",
|
|
70
73
|
"e2e:fallback": "node scripts/e2e-fallback.mjs",
|
|
71
74
|
"e2e:toggle": "node scripts/e2e-toggle.mjs"
|
|
72
75
|
}
|