dsh-font-enhancer 1.4.3 → 1.4.5
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/lib/client.js +43 -10
- package/package.json +77 -77
package/lib/client.js
CHANGED
|
@@ -1573,6 +1573,30 @@ window.__ModuleLoader__.load({
|
|
|
1573
1573
|
// + 🎯 一键恢复默认位置 + 推荐插件位(照片显示器 / 技能浏览器)。
|
|
1574
1574
|
|
|
1575
1575
|
// 恢复字体球默认位置(右下角 right:18px bottom:18px),清 bx/by 持久化。
|
|
1576
|
+
// v1.4.4 推荐位安装徽标(与 skill-browser 同款探测)
|
|
1577
|
+
function feMarkRecBadge(recId, installed) {
|
|
1578
|
+
var row = document.querySelector('[data-rec-id="' + recId + '"]');
|
|
1579
|
+
if (!row || row.querySelector(".fe-rec-badge")) return;
|
|
1580
|
+
var badge = document.createElement("span");
|
|
1581
|
+
badge.className = "fe-rec-badge";
|
|
1582
|
+
badge.textContent = installed ? "已安装" : "未安装";
|
|
1583
|
+
badge.style.cssText = "flex-shrink:0;margin-left:8px;font-size:11px;padding:2px 8px;border-radius:6px;" +
|
|
1584
|
+
(installed ? "background:rgba(120,220,150,.15);border:1px solid rgba(120,220,150,.4);color:#9fe0b5"
|
|
1585
|
+
: "background:rgba(255,120,120,.15);border:1px solid rgba(255,120,120,.35);color:#ffb3b3") +
|
|
1586
|
+
";white-space:nowrap";
|
|
1587
|
+
var star = row.querySelector("a");
|
|
1588
|
+
if (star) row.insertBefore(badge, star); else row.appendChild(badge);
|
|
1589
|
+
}
|
|
1590
|
+
function feApplyRecBadges() {
|
|
1591
|
+
feMarkRecBadge("font", true); // 本插件在跑,恒已装
|
|
1592
|
+
try {
|
|
1593
|
+
var sbOk = !!document.getElementById("dsh-skill-browser-ball");
|
|
1594
|
+
feMarkRecBadge("skillbrowser", sbOk);
|
|
1595
|
+
} catch (e) { feMarkRecBadge("skillbrowser", false); }
|
|
1596
|
+
try {
|
|
1597
|
+
fetch("/api/image-gallery/list").then(function (r) { feMarkRecBadge("lightbox", r.ok); }).catch(function () { feMarkRecBadge("lightbox", false); });
|
|
1598
|
+
} catch (e) { feMarkRecBadge("lightbox", false); }
|
|
1599
|
+
}
|
|
1576
1600
|
function feResetBallToDefault() {
|
|
1577
1601
|
try {
|
|
1578
1602
|
var data = loadSettings();
|
|
@@ -1613,15 +1637,24 @@ window.__ModuleLoader__.load({
|
|
|
1613
1637
|
}, "🎯 一键恢复悬浮球默认位置(右下角)"));
|
|
1614
1638
|
rows.push(feReact.createElement("div", { key: "hint", style: { fontSize: "12px", color: "#8b93a8" } },
|
|
1615
1639
|
"悬浮球可拖动;本分区就在 DSH 设置中,随时可改悬浮球显隐"));
|
|
1616
|
-
// ──
|
|
1617
|
-
rows.push(feReact.createElement("div", { key: "fe-
|
|
1618
|
-
|
|
1619
|
-
feReact.createElement("
|
|
1620
|
-
feReact.createElement("
|
|
1621
|
-
|
|
1622
|
-
feReact.createElement("
|
|
1623
|
-
feReact.createElement("
|
|
1624
|
-
|
|
1640
|
+
// ── 安装与更新须知(v1.4.4)──
|
|
1641
|
+
rows.push(feReact.createElement("div", { key: "fe-notice-block", style: { marginTop: "12px", padding: "10px 12px", background: "rgba(255,255,255,.03)", border: "1px solid rgba(255,255,255,.06)", borderRadius: "10px", fontSize: "12px", color: "#9aa1b5", lineHeight: "1.7" } },
|
|
1642
|
+
feReact.createElement("div", { style: { fontWeight: "600", color: "#cfd4dc", marginBottom: "4px" } }, "📌 安装与更新须知"),
|
|
1643
|
+
feReact.createElement("div", null, "1. 当前由「字体插件」提供本分区(未检测到技能浏览器)。推荐列表里的技能浏览器等插件装上后,本分区会自动让位,改由对方提供更全的悬浮球导航。"),
|
|
1644
|
+
feReact.createElement("div", null, "2. 推荐插件列表实时显示「已安装 / 未安装」状态:绿色「已安装」= 可直接使用;红色「未安装」= 点击 ⭐ Star 前往仓库,或到插件市场搜索安装。"),
|
|
1645
|
+
feReact.createElement("div", { style: { color: "#e0b0b0" } }, "3. 【重要】安装或更新插件时,若报错含 minimumReleaseAge 或 ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION:这不是插件坏了,是 DSH 对刚发布 npm 包的 24 小时安全观察期(防止刚发布的投毒包)。"),
|
|
1646
|
+
feReact.createElement("div", { style: { color: "#e0b0b0" } }, "4. 遇到 24h 报错的处理:等一天再安装/更新即可自动通过,插件本体没有任何问题。插件作者连发多版时窗口期会顺延一天。"),
|
|
1647
|
+
feReact.createElement("div", null, "5. 悬浮球可拖动换位置;拖到屏幕外找不到时,点上方 🎯 按钮一键复位。")
|
|
1648
|
+
));
|
|
1649
|
+
// ── 推荐插件(v1.4.4 统一三条清单:字体/技能/照片,探测式安装徽标)──
|
|
1650
|
+
function recRow(key, recId, icon, text, repo) {
|
|
1651
|
+
return feReact.createElement("div", { key: key, "data-rec-id": recId, style: { display: "flex", alignItems: "center", justifyContent: "space-between", fontSize: "13px", padding: "3px 0" } },
|
|
1652
|
+
feReact.createElement("span", null, icon + " " + text),
|
|
1653
|
+
feReact.createElement("a", { href: "https://github.com/" + repo, target: "_blank", rel: "noopener", style: { textDecoration: "none", fontSize: "12px", background: "rgba(255,255,255,.06)", border: "1px solid rgba(255,255,255,.12)", borderRadius: "6px", padding: "2px 8px", color: "#ffd27a", cursor: "pointer", whiteSpace: "nowrap" } }, "⭐ Star"));
|
|
1654
|
+
}
|
|
1655
|
+
rows.push(recRow("rec-font", "font", "🔤", "字体插件 — 区域自定义字体/颜色/字号", "loyalchiiina/dsh-font-enhancer"));
|
|
1656
|
+
rows.push(recRow("rec-skillbrowser", "skillbrowser", "🧩", "技能浏览器 — 悬浮球面板浏览共享技能库 + 失效台账", "loyalchiiina/dsh-skill-browser"));
|
|
1657
|
+
rows.push(recRow("rec-lightbox", "lightbox", "🖼️", "照片显示器 — 聊天图片灯箱(放大/下载/浏览)", "loyalchiiina/dsh-chat-image-lightbox"));return feReact.createElement("div", { "data-fe-slot": "1", style: { display: "flex", flexDirection: "column", gap: "8px", padding: "8px 0" } }, rows);
|
|
1625
1658
|
}
|
|
1626
1659
|
|
|
1627
1660
|
function registerSettings(ctx) {
|
|
@@ -1657,7 +1690,7 @@ window.__ModuleLoader__.load({
|
|
|
1657
1690
|
}
|
|
1658
1691
|
if (tries >= 30) { // 60s 仍无 skill-browser → 独立运行,注册兜底分区
|
|
1659
1692
|
clearInterval(t);
|
|
1660
|
-
if (registerSettings(ctx)) __feSectionRegistered = true;
|
|
1693
|
+
if (registerSettings(ctx)) { __feSectionRegistered = true; setTimeout(feApplyRecBadges, 1500); setInterval(feApplyRecBadges, 5000); }
|
|
1661
1694
|
}
|
|
1662
1695
|
} catch (e) {}
|
|
1663
1696
|
}, 2000);
|
package/package.json
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-font-enhancer",
|
|
3
|
+
"version": "1.4.5",
|
|
4
|
+
"description": "DSH 字体样式 DIY 插件(搜「字体」找到我):按区域自定义中英文字体/字号/字重/斜体/颜色,框选元素创建自定义区域,全局统一控制,主题保存/切换,随机配色,支持自定义字体。DIY your DSH UI fonts \u0026 colors: per-region custom font/size/weight/italic/color, pick elements to create custom regions, unified overrides, theme save/switch, random color, custom fonts.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": "\u003e=18"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
".": "./lib/index.js",
|
|
13
|
+
"./client": "./lib/client.js",
|
|
14
|
+
"./package.json": "./package.json"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"lib/**/*.js",
|
|
18
|
+
"lib/fonts/*.ttf",
|
|
19
|
+
"cordis.patch.yml",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"keywords": [
|
|
25
|
+
"dsh-plugin",
|
|
26
|
+
"deepseek-harness",
|
|
27
|
+
"font",
|
|
28
|
+
"字体",
|
|
29
|
+
"typography",
|
|
30
|
+
"排版",
|
|
31
|
+
"DIY",
|
|
32
|
+
"theme",
|
|
33
|
+
"主题",
|
|
34
|
+
"color",
|
|
35
|
+
"颜色",
|
|
36
|
+
"ui",
|
|
37
|
+
"区域",
|
|
38
|
+
"styling",
|
|
39
|
+
"样式",
|
|
40
|
+
"chinese-font",
|
|
41
|
+
"中文字体",
|
|
42
|
+
"english-font",
|
|
43
|
+
"font-picker",
|
|
44
|
+
"font-size",
|
|
45
|
+
"字重",
|
|
46
|
+
"斜体",
|
|
47
|
+
"theme-switch",
|
|
48
|
+
"主题切换",
|
|
49
|
+
"text-styling",
|
|
50
|
+
"文字样式",
|
|
51
|
+
"custom-font",
|
|
52
|
+
"自定义字体"
|
|
53
|
+
],
|
|
54
|
+
"repository": {
|
|
55
|
+
"type": "git",
|
|
56
|
+
"url": "git+https://github.com/loyalchiiina/dsh-font-enhancer.git"
|
|
57
|
+
},
|
|
58
|
+
"homepage": "https://github.com/loyalchiiina/dsh-font-enhancer#readme",
|
|
59
|
+
"bugs": {
|
|
60
|
+
"url": "https://github.com/loyalchiiina/dsh-font-enhancer/issues"
|
|
61
|
+
},
|
|
62
|
+
"dsh": {
|
|
63
|
+
"bundle": {
|
|
64
|
+
"patch": "./cordis.patch.yml"
|
|
65
|
+
},
|
|
66
|
+
"client": {
|
|
67
|
+
"inject": [
|
|
68
|
+
"@deepseek-ai/dsh-client-connection",
|
|
69
|
+
"@deepseek-ai/dsh-client-runtime",
|
|
70
|
+
"@deepseek-ai/dsh-client-ui-settings",
|
|
71
|
+
"@deepseek-ai/dsh-client-ui-slots",
|
|
72
|
+
"@deepseek-ai/dsh-client-locale"
|
|
73
|
+
],
|
|
74
|
+
"platform": "web"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|