dsh-skill-browser 1.5.4 → 1.5.6
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 +40 -6
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -4,6 +4,8 @@ window.__ModuleLoader__.load({
|
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
6
6
|
|
|
7
|
+
// v1.5.5(2026-09-06):版本号对齐修复——host 端 index.js 的 VERSION
|
|
8
|
+
// 常量此前停在 1.5.1 未随 package.json 同步,现统一为 1.5.5。
|
|
7
9
|
// v1.5.4(2026-09-05 用户要求):技能列表每页末尾追加的
|
|
8
10
|
// 「💡 悬浮球显隐设置」提示卡一并移除——每页末尾不再出现任何
|
|
9
11
|
// 非技能卡片,列表只展示技能本身。
|
|
@@ -694,7 +696,7 @@ window.__ModuleLoader__.load({
|
|
|
694
696
|
// ---- 球体样式 + 字体球统一样式 + 显隐规则(纯 CSS,永久生效)----
|
|
695
697
|
var CSS = [
|
|
696
698
|
/* 技能球 */
|
|
697
|
-
'#' + BALL_ID + '{position:fixed;right:
|
|
699
|
+
'#' + BALL_ID + '{position:fixed;right:74px;bottom:18px;width:46px;height:46px;border-radius:50%;' +
|
|
698
700
|
'background:linear-gradient(135deg,#6a5cff,#2fb7ff);color:#fff;font-size:22px;display:flex;align-items:center;justify-content:center;' +
|
|
699
701
|
'cursor:grab;z-index:2147481000;box-shadow:0 4px 16px rgba(40,80,255,.35);user-select:none;touch-action:none;transition:transform .15s ease}',
|
|
700
702
|
'#' + BALL_ID + ':hover{transform:scale(1.08)}',
|
|
@@ -731,6 +733,12 @@ window.__ModuleLoader__.load({
|
|
|
731
733
|
} catch (e) {}
|
|
732
734
|
}
|
|
733
735
|
|
|
736
|
+
// v1.5.6 字体插件安装探测:dsh-fe-toggle 元素存在 = font-enhancer client 已运行。
|
|
737
|
+
// 元素存在不依赖球显隐(隐藏是 CSS display,DOM 仍在);卸载/禁用后元素消失。
|
|
738
|
+
function isFontEnhancerInstalled() {
|
|
739
|
+
try { return !!document.getElementById("dsh-fe-toggle"); } catch (e) { return false; }
|
|
740
|
+
}
|
|
741
|
+
|
|
734
742
|
// v1.5.3 一键恢复默认位置:清位置记忆与收起/隐藏状态,球立即回右下角默认位。
|
|
735
743
|
// 供 DSH 设置页「悬浮球导航」分区按钮调用(球可能被拖出屏幕外卡住,无法点回)。
|
|
736
744
|
function resetBallToDefault() {
|
|
@@ -740,11 +748,29 @@ window.__ModuleLoader__.load({
|
|
|
740
748
|
var b = $(BALL_ID);
|
|
741
749
|
if (b) {
|
|
742
750
|
b.style.left = ""; b.style.top = "";
|
|
743
|
-
b.style.right = "
|
|
751
|
+
b.style.right = "74px"; b.style.bottom = "18px";
|
|
744
752
|
b.classList.remove("dsb-ghost");
|
|
745
753
|
}
|
|
746
754
|
try { applyBallVisibility(); } catch (e) {}
|
|
747
|
-
|
|
755
|
+
// v1.5.6 双球联动(仅字体插件已安装时挂载):🎯 复位时顺带把字体球归位
|
|
756
|
+
// (右下角 right:18px bottom:18px)。跨插件组合:只清位置记忆 + DOM 归位。
|
|
757
|
+
if (isFontEnhancerInstalled()) try {
|
|
758
|
+
var FE_POS_KEY = "dsh-font-enhancer";
|
|
759
|
+
var raw = localStorage.getItem(FE_POS_KEY);
|
|
760
|
+
if (raw) {
|
|
761
|
+
var data = JSON.parse(raw);
|
|
762
|
+
data.bx = null; data.by = null;
|
|
763
|
+
localStorage.setItem(FE_POS_KEY, JSON.stringify(data));
|
|
764
|
+
}
|
|
765
|
+
} catch (e) {}
|
|
766
|
+
try {
|
|
767
|
+
var feBall = document.getElementById("dsh-fe-toggle");
|
|
768
|
+
if (feBall) {
|
|
769
|
+
feBall.style.left = "auto"; feBall.style.top = "auto";
|
|
770
|
+
feBall.style.right = "18px"; feBall.style.bottom = "18px";
|
|
771
|
+
}
|
|
772
|
+
} catch (e) {}
|
|
773
|
+
try { console.log("[dsh-skill-browser] reset: skill ball + font ball -> default positions (paired bottom-right)"); } catch (e) {}
|
|
748
774
|
}
|
|
749
775
|
|
|
750
776
|
function buildBall() {
|
|
@@ -863,7 +889,15 @@ window.__ModuleLoader__.load({
|
|
|
863
889
|
style: { alignSelf: "flex-start", fontSize: "13px", cursor: "pointer",
|
|
864
890
|
background: "rgba(255,210,122,.12)", border: "1px solid rgba(255,210,122,.35)",
|
|
865
891
|
borderRadius: "6px", padding: "6px 12px", color: "#ffd27a" }
|
|
866
|
-
}, "🎯 一键恢复悬浮球默认位置(右下角)"));
|
|
892
|
+
}, isFontEnhancerInstalled() ? "🎯 一键恢复悬浮球默认位置(右下角,双球)" : "🎯 一键恢复悬浮球默认位置(右下角)"));
|
|
893
|
+
// ── 推荐插件(v1.5.6:字体分区让位后,推荐位回归本分区)──
|
|
894
|
+
rows.push(React.createElement("div", { key: "rec-head", style: { fontWeight: "600", marginTop: "12px", marginBottom: "4px", borderTop: "1px solid rgba(255,255,255,.08)", paddingTop: "10px" } }, "推荐插件"));
|
|
895
|
+
rows.push(React.createElement("div", { key: "rec-lightbox", style: { display: "flex", alignItems: "center", justifyContent: "space-between", fontSize: "13px", padding: "3px 0" } },
|
|
896
|
+
React.createElement("span", null, "🖼️ 照片显示器 — 聊天图片灯箱(放大/下载/浏览)"),
|
|
897
|
+
React.createElement("a", { href: "https://github.com/loyalchiiina/dsh-chat-image-lightbox", 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")));
|
|
898
|
+
rows.push(React.createElement("div", { key: "rec-font", style: { display: "flex", alignItems: "center", justifyContent: "space-between", fontSize: "13px", padding: "3px 0" } },
|
|
899
|
+
React.createElement("span", null, "🔤 字体插件 — 区域自定义字体/颜色/字号"),
|
|
900
|
+
React.createElement("a", { href: "https://github.com/loyalchiiina/dsh-font-enhancer", 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")));
|
|
867
901
|
return React.createElement("div", { "data-dsb-slot": "1", style: { display: "flex", flexDirection: "column", gap: "8px", padding: "8px 0" } }, rows);
|
|
868
902
|
}
|
|
869
903
|
|
|
@@ -901,14 +935,14 @@ window.__ModuleLoader__.load({
|
|
|
901
935
|
function migrateOldState() {
|
|
902
936
|
try {
|
|
903
937
|
var ver = localStorage.getItem("dsh-skill-browser-cfg-ver");
|
|
904
|
-
if (ver !== "
|
|
938
|
+
if (ver !== "4") {
|
|
905
939
|
localStorage.setItem(BALL_VIS_KEY, "1"); // 球恢复显示
|
|
906
940
|
localStorage.setItem(FONT_BALL_VIS_KEY, "1"); // 字体球恢复显示
|
|
907
941
|
localStorage.removeItem(GHOST_KEY);
|
|
908
942
|
// v3 复位(2026-09-05 用户要求"恢复原状"):同时清除拖拽位置记忆与
|
|
909
943
|
// 收起小圆点状态,让悬浮球回到默认右下角 (right:26px bottom:118px) 常规大小。
|
|
910
944
|
localStorage.removeItem(BALL_POS_KEY);
|
|
911
|
-
localStorage.setItem("dsh-skill-browser-cfg-ver", "
|
|
945
|
+
localStorage.setItem("dsh-skill-browser-cfg-ver", "4");
|
|
912
946
|
}
|
|
913
947
|
} catch (e) {}
|
|
914
948
|
}
|
package/lib/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import { ZH } from "./zh.js";
|
|
16
16
|
|
|
17
17
|
var PREFIX = "/dsh-skill-browser";
|
|
18
|
-
var VERSION = "1.5.
|
|
18
|
+
var VERSION = "1.5.5";
|
|
19
19
|
var CACHE_TTL_MS = 30 * 1000;
|
|
20
20
|
var DIAG_FILE = join(homedir(), ".dsh", "data", "dsh-skill-browser", "diag.log");
|
|
21
21
|
var CONFIG_FILE = join(homedir(), ".dsh", "data", "dsh-skill-browser", "config.json");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-skill-browser",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.6",
|
|
4
4
|
"description": "DSH 技能浏览器:悬浮球面板浏览共享技能库(分类/中文简介/搜索/失效台账/全文查看),含 DSH 设置页悬浮球显隐开关与一键恢复默认位置按钮、技能库位置可配置(原生目录选择框)与技能失效台账自动登记(自动/人工分开显示);推荐插件位仅保留面板设置展开区一处。Skill library browser panel with categories, Chinese descriptions, configurable skill root with native directory chooser, one-click ball position reset and automatic skill-failure ledger.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|