dsh-mobile-web 0.1.0 → 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.
@@ -0,0 +1,50 @@
1
+ # Vendored mobile UI source (dsh-palm fork)
2
+
3
+ ## Baseline
4
+
5
+ - Upstream project: **dsh-palm** — <https://github.com/Eternalloveone/dsh-palm>
6
+ - Baseline release: **v1.6.0** (published 2026-10-14)
7
+ - Source obtained from the release tarball:
8
+ `https://codeload.github.com/Eternalloveone/dsh-palm/tar.gz/refs/tags/v1.6.0`
9
+ → `packages/dsh-palm/src/**` (Apache-2.0, see `LICENSE-APACHE`)
10
+ - This directory is a **fork**, not a submodule or a pinned dependency. Once vendored,
11
+ we do **not** follow upstream feature work. Upstream is kept only as reference
12
+ material for bug fixes we want to cherry-pick by hand.
13
+
14
+ ## What we build
15
+
16
+ `../assets/mobile.bundle.js` — the single ES module served to the phone at `/m/mobile.js`.
17
+ `build.mjs` uses esbuild with the same entry/options as upstream's `tsdown.config.ts`
18
+ (`format=esm`, `platform=browser`, `target=es2022`, `jsx=automatic`, minify, no externals).
19
+
20
+ ```sh
21
+ cd mobile-src
22
+ npm ci # only needed once / after package-lock.json changes
23
+ npm run build # writes ../assets/mobile.bundle.js (+ .map)
24
+ ```
25
+
26
+ Build output is deterministic for a given `src/` + lockfile; rebuilds should produce
27
+ byte-identical files (`sha256sum ../assets/mobile.bundle.js`).
28
+
29
+ ## Local changes carried in this fork (vs v1.6.0)
30
+
31
+ 1. **Send-mode row in Settings** (`src/mobile/views/SettingsView.tsx`, 外观 group):
32
+ the row reads/writes `window.__dmSendMode` (owned by the host plugin's injected
33
+ `SEND_MODE_HTML`), so the phone stores its send mode on the host instead of a
34
+ page-local default. Styled by `assets/theme.css` (`.dm-sendmode-select`).
35
+ 2. **Balance label** (`SettingsView.tsx`, usage card): `账户余额` → `充值余额`
36
+ to match the wording used on the desktop side.
37
+
38
+ Everything else is upstream v1.6.0 as published. Host-side behaviours that used to be
39
+ patched into the shipped bundle by hand now live where they belong:
40
+
41
+ - “关于 / 反馈” copy and the GitHub link are rewritten at runtime by the host plugin's
42
+ DOM patch (`index.js`, `SETTINGS_SCOPE_HTML` block) — no source change needed.
43
+ - The web-search artwork in the builtin-plugin rows is host-side (`index.js`,
44
+ `HOST_PAGES_HTML` → `CONFIG_ART['web-search']`) — not part of this bundle.
45
+
46
+ ## Updating
47
+
48
+ Do not `git pull` upstream into this tree. If a specific upstream fix is wanted, read
49
+ the upstream commit, re-implement it here, run `npm run build`, and commit both the
50
+ source change and the rebuilt `assets/mobile.bundle.js` in the same commit.
package/package.json CHANGED
@@ -1,78 +1,80 @@
1
- {
2
- "name": "dsh-mobile-web",
3
- "version": "0.1.0",
4
- "description": "掌上 dsh —— DSH 的手机端完整聊天界面:6 位码配对、设备信任、工作区/会话/聊天、SSE 实时流,可经局域网或公网反代访问。",
5
- "type": "module",
6
- "main": "index.js",
7
- "exports": {
8
- ".": "./index.js",
9
- "./client": "./client.js",
10
- "./locale/*.json": "./locale/*.json",
11
- "./icon": "./assets/icon.svg",
12
- "./package.json": "./package.json"
13
- },
14
- "files": [
15
- "index.js",
16
- "client.js",
17
- "cordis.patch.yml",
18
- "locale/*.json",
19
- "assets/icon.svg",
20
- "assets/theme.css",
21
- "assets/mobile.bundle.js",
22
- "assets/icon-192.png",
23
- "assets/icon-512.png",
24
- "assets/apple-touch-icon.png",
25
- "assets/whale.png",
26
- "README.md",
27
- "LICENSE",
28
- "NOTICE",
29
- "src/host"
30
- ],
31
- "keywords": [
32
- "dsh",
33
- "dsh-plugin",
34
- "deepseek-harness",
35
- "deepseek",
36
- "mobile",
37
- "phone",
38
- "remote-access",
39
- "pwa",
40
- "sse"
41
- ],
42
- "author": {
43
- "name": "2333someone"
44
- },
45
- "license": "MIT",
46
- "repository": {
47
- "type": "git",
48
- "url": "git+https://github.com/2333someone/dsh-mobile.git"
49
- },
50
- "homepage": "https://github.com/2333someone/dsh-mobile#readme",
51
- "bugs": {
52
- "url": "https://github.com/2333someone/dsh-mobile/issues"
53
- },
54
- "engines": {
55
- "node": ">=20.0.0"
56
- },
57
- "dsh": {
58
- "engines": {
59
- "dsh": ">=0.2.0-rc.1"
60
- },
61
- "bundle": {
62
- "patch": "./cordis.patch.yml"
63
- },
64
- "client": {
65
- "platform": "web",
66
- "immediately": true,
67
- "inject": [
68
- "@deepseek-ai/dsh-client-ui-settings"
69
- ]
70
- }
71
- },
72
- "publishConfig": {
73
- "access": "public"
74
- },
75
- "scripts": {
76
- "smoke": "node test/smoke.mjs"
77
- }
78
- }
1
+ {
2
+ "name": "dsh-mobile-web",
3
+ "version": "0.1.2",
4
+ "description": "掌上 dsh —— DSH 的手机端完整聊天界面:6 位码配对、设备信任、工作区/会话/聊天、SSE 实时流,可经局域网或公网反代访问。",
5
+ "type": "module",
6
+ "main": "index.js",
7
+ "exports": {
8
+ ".": "./index.js",
9
+ "./client": "./client.js",
10
+ "./locale/*.json": "./locale/*.json",
11
+ "./icon": "./assets/icon.svg",
12
+ "./package.json": "./package.json"
13
+ },
14
+ "files": [
15
+ "index.js",
16
+ "client.js",
17
+ "cordis.patch.yml",
18
+ "locale/*.json",
19
+ "assets/icon.svg",
20
+ "assets/theme.css",
21
+ "assets/mobile.bundle.js",
22
+ "assets/icon-192.png",
23
+ "assets/icon-512.png",
24
+ "assets/apple-touch-icon.png",
25
+ "assets/whale.png",
26
+ "README.md",
27
+ "LICENSE",
28
+ "NOTICE",
29
+ "src/host",
30
+ "LICENSE-APACHE",
31
+ "mobile-src/UPSTREAM.md"
32
+ ],
33
+ "keywords": [
34
+ "dsh",
35
+ "dsh-plugin",
36
+ "deepseek-harness",
37
+ "deepseek",
38
+ "mobile",
39
+ "phone",
40
+ "remote-access",
41
+ "pwa",
42
+ "sse"
43
+ ],
44
+ "author": {
45
+ "name": "2333someone"
46
+ },
47
+ "license": "MIT",
48
+ "repository": {
49
+ "type": "git",
50
+ "url": "git+https://github.com/2333someone/dsh-mobile.git"
51
+ },
52
+ "homepage": "https://github.com/2333someone/dsh-mobile#readme",
53
+ "bugs": {
54
+ "url": "https://github.com/2333someone/dsh-mobile/issues"
55
+ },
56
+ "engines": {
57
+ "node": ">=20.0.0"
58
+ },
59
+ "dsh": {
60
+ "engines": {
61
+ "dsh": ">=0.2.0-rc.1"
62
+ },
63
+ "bundle": {
64
+ "patch": "./cordis.patch.yml"
65
+ },
66
+ "client": {
67
+ "platform": "web",
68
+ "immediately": true,
69
+ "inject": [
70
+ "@deepseek-ai/dsh-client-ui-settings"
71
+ ]
72
+ }
73
+ },
74
+ "publishConfig": {
75
+ "access": "public"
76
+ },
77
+ "scripts": {
78
+ "smoke": "node test/smoke.mjs"
79
+ }
80
+ }