dsh-skill-browser 1.5.5 → 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 +38 -6
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -696,7 +696,7 @@ window.__ModuleLoader__.load({
|
|
|
696
696
|
// ---- 球体样式 + 字体球统一样式 + 显隐规则(纯 CSS,永久生效)----
|
|
697
697
|
var CSS = [
|
|
698
698
|
/* 技能球 */
|
|
699
|
-
'#' + BALL_ID + '{position:fixed;right:
|
|
699
|
+
'#' + BALL_ID + '{position:fixed;right:74px;bottom:18px;width:46px;height:46px;border-radius:50%;' +
|
|
700
700
|
'background:linear-gradient(135deg,#6a5cff,#2fb7ff);color:#fff;font-size:22px;display:flex;align-items:center;justify-content:center;' +
|
|
701
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}',
|
|
702
702
|
'#' + BALL_ID + ':hover{transform:scale(1.08)}',
|
|
@@ -733,6 +733,12 @@ window.__ModuleLoader__.load({
|
|
|
733
733
|
} catch (e) {}
|
|
734
734
|
}
|
|
735
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
|
+
|
|
736
742
|
// v1.5.3 一键恢复默认位置:清位置记忆与收起/隐藏状态,球立即回右下角默认位。
|
|
737
743
|
// 供 DSH 设置页「悬浮球导航」分区按钮调用(球可能被拖出屏幕外卡住,无法点回)。
|
|
738
744
|
function resetBallToDefault() {
|
|
@@ -742,11 +748,29 @@ window.__ModuleLoader__.load({
|
|
|
742
748
|
var b = $(BALL_ID);
|
|
743
749
|
if (b) {
|
|
744
750
|
b.style.left = ""; b.style.top = "";
|
|
745
|
-
b.style.right = "
|
|
751
|
+
b.style.right = "74px"; b.style.bottom = "18px";
|
|
746
752
|
b.classList.remove("dsb-ghost");
|
|
747
753
|
}
|
|
748
754
|
try { applyBallVisibility(); } catch (e) {}
|
|
749
|
-
|
|
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) {}
|
|
750
774
|
}
|
|
751
775
|
|
|
752
776
|
function buildBall() {
|
|
@@ -865,7 +889,15 @@ window.__ModuleLoader__.load({
|
|
|
865
889
|
style: { alignSelf: "flex-start", fontSize: "13px", cursor: "pointer",
|
|
866
890
|
background: "rgba(255,210,122,.12)", border: "1px solid rgba(255,210,122,.35)",
|
|
867
891
|
borderRadius: "6px", padding: "6px 12px", color: "#ffd27a" }
|
|
868
|
-
}, "🎯 一键恢复悬浮球默认位置(右下角)"));
|
|
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")));
|
|
869
901
|
return React.createElement("div", { "data-dsb-slot": "1", style: { display: "flex", flexDirection: "column", gap: "8px", padding: "8px 0" } }, rows);
|
|
870
902
|
}
|
|
871
903
|
|
|
@@ -903,14 +935,14 @@ window.__ModuleLoader__.load({
|
|
|
903
935
|
function migrateOldState() {
|
|
904
936
|
try {
|
|
905
937
|
var ver = localStorage.getItem("dsh-skill-browser-cfg-ver");
|
|
906
|
-
if (ver !== "
|
|
938
|
+
if (ver !== "4") {
|
|
907
939
|
localStorage.setItem(BALL_VIS_KEY, "1"); // 球恢复显示
|
|
908
940
|
localStorage.setItem(FONT_BALL_VIS_KEY, "1"); // 字体球恢复显示
|
|
909
941
|
localStorage.removeItem(GHOST_KEY);
|
|
910
942
|
// v3 复位(2026-09-05 用户要求"恢复原状"):同时清除拖拽位置记忆与
|
|
911
943
|
// 收起小圆点状态,让悬浮球回到默认右下角 (right:26px bottom:118px) 常规大小。
|
|
912
944
|
localStorage.removeItem(BALL_POS_KEY);
|
|
913
|
-
localStorage.setItem("dsh-skill-browser-cfg-ver", "
|
|
945
|
+
localStorage.setItem("dsh-skill-browser-cfg-ver", "4");
|
|
914
946
|
}
|
|
915
947
|
} catch (e) {}
|
|
916
948
|
}
|
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",
|