dsh-free-search 0.4.26 → 0.4.28
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 +70 -31
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -62,6 +62,10 @@ window.__ModuleLoader__.load({
|
|
|
62
62
|
".dshfs-update{color:var(--dsw-alias-state-warn-primary);flex:none;font-size:11px;white-space:nowrap;border:1px solid rgba(240,170,80,.3);background:rgba(240,170,80,.12);border-radius:999px;padding:1px 6px}",
|
|
63
63
|
".dshfs-updateOk{color:#7ddb9c;flex:none;font-size:11px;white-space:nowrap;border:1px solid rgba(80,200,120,.3);background:rgba(80,200,120,.12);border-radius:999px;padding:1px 6px}",
|
|
64
64
|
".dshfs-updateLine{display:flex;align-items:center;gap:8px;flex-wrap:wrap}",
|
|
65
|
+
".dshfs-updatePill{display:inline-flex;align-items:center;gap:5px;border:1px solid rgba(76,110,245,.35);background:rgba(76,110,245,.10);color:var(--dsw-alias-state-business-primary);font:inherit;font-size:12px;font-weight:600;line-height:1;cursor:pointer;padding:4px 10px;border-radius:999px;text-decoration:none;white-space:nowrap;transition:background-color .13s,border-color .13s}",
|
|
66
|
+
".dshfs-updatePill:hover:not(:disabled){background:rgba(76,110,245,.20);border-color:rgba(76,110,245,.55)}",
|
|
67
|
+
".dshfs-updatePill:disabled{opacity:.6;cursor:default}",
|
|
68
|
+
".dshfs-updateIcon{flex:none;display:block}",
|
|
65
69
|
".dshfs-version{color:var(--dsw-alias-label-tertiary);font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap}",
|
|
66
70
|
].join("");
|
|
67
71
|
const tagId = "dsh-free-search/card.css";
|
|
@@ -119,6 +123,7 @@ window.__ModuleLoader__.load({
|
|
|
119
123
|
updateLatest: (c) => `已是最新版本 v${c}`,
|
|
120
124
|
updateCheckFailed: "检查更新失败(无法访问 npm registry)",
|
|
121
125
|
updateView: "查看 →",
|
|
126
|
+
hasUpdate: "有更新",
|
|
122
127
|
upgrade: "升级",
|
|
123
128
|
upgrading: "升级中…",
|
|
124
129
|
upgradeLinkMode: "(本地开发模式,升级请用 git pull)",
|
|
@@ -184,6 +189,7 @@ window.__ModuleLoader__.load({
|
|
|
184
189
|
updateLatest: (c) => `You're on the latest version v${c}`,
|
|
185
190
|
updateCheckFailed: "Update check failed (cannot reach npm registry)",
|
|
186
191
|
updateView: "View →",
|
|
192
|
+
hasUpdate: "Update available",
|
|
187
193
|
upgrade: "Upgrade",
|
|
188
194
|
upgrading: "Upgrading…",
|
|
189
195
|
upgradeLinkMode: "(local dev install - use git pull to update)",
|
|
@@ -210,7 +216,7 @@ window.__ModuleLoader__.load({
|
|
|
210
216
|
};
|
|
211
217
|
const tt = (lang) => I18N[lang === "en" ? "en" : "zh"];
|
|
212
218
|
// 当前插件版本(与 lib/index.js 的 PLUGIN_VERSION 保持一致)
|
|
213
|
-
const PLUGIN_VERSION = "0.4.
|
|
219
|
+
const PLUGIN_VERSION = "0.4.28";
|
|
214
220
|
const ENGINES = [
|
|
215
221
|
{ id: "ddg", label: "DuckDuckGo · HTML", badge: "FREE", link: "https://duckduckgo.com" },
|
|
216
222
|
{ id: "ddg-lite", label: "DuckDuckGo · Lite", badge: "FREE", link: "https://duckduckgo.com" },
|
|
@@ -899,13 +905,63 @@ react_jsx_runtime.jsx("div", {
|
|
|
899
905
|
className: "dshfs-footerLeft",
|
|
900
906
|
children: [
|
|
901
907
|
react_jsx_runtime.jsx("span", { className: "dshfs-version", children: "v" + PLUGIN_VERSION }),
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
908
|
+
updateInfo && updateInfo.ok && updateInfo.hasUpdate && !updateInfo.installable
|
|
909
|
+
? react_jsx_runtime.jsx("a", {
|
|
910
|
+
className: "dshfs-updatePill",
|
|
911
|
+
href: updateInfo.updateUrl,
|
|
912
|
+
target: "_blank",
|
|
913
|
+
rel: "noopener noreferrer",
|
|
914
|
+
title: t.updateAvailable(updateInfo.current, updateInfo.latest),
|
|
915
|
+
children: [
|
|
916
|
+
react_jsx_runtime.jsx("svg", {
|
|
917
|
+
className: "dshfs-updateIcon",
|
|
918
|
+
viewBox: "0 0 16 16",
|
|
919
|
+
width: 14,
|
|
920
|
+
height: 14,
|
|
921
|
+
"aria-hidden": "true",
|
|
922
|
+
children: react_jsx_runtime.jsx("path", {
|
|
923
|
+
d: "M8 2.2v6.4M5.2 6.4 8 9.2l2.8-2.8M3 10.8v1.4c0 .9.7 1.6 1.6 1.6h6.8c.9 0 1.6-.7 1.6-1.6v-1.4",
|
|
924
|
+
fill: "none",
|
|
925
|
+
stroke: "currentColor",
|
|
926
|
+
strokeWidth: 1.6,
|
|
927
|
+
strokeLinecap: "round",
|
|
928
|
+
strokeLinejoin: "round",
|
|
929
|
+
}),
|
|
930
|
+
}),
|
|
931
|
+
t.hasUpdate,
|
|
932
|
+
],
|
|
933
|
+
})
|
|
934
|
+
: react_jsx_runtime.jsx("button", {
|
|
935
|
+
className: "dshfs-updatePill",
|
|
936
|
+
type: "button",
|
|
937
|
+
title: updateInfo && updateInfo.ok && updateInfo.hasUpdate ? t.updateAvailable(updateInfo.current, updateInfo.latest) : undefined,
|
|
938
|
+
onClick: updateInfo && updateInfo.ok && updateInfo.hasUpdate ? runUpdate : runCheckUpdate,
|
|
939
|
+
disabled: upgrading || checkingUpdate || saving || !ready,
|
|
940
|
+
children: [
|
|
941
|
+
react_jsx_runtime.jsx("svg", {
|
|
942
|
+
className: "dshfs-updateIcon",
|
|
943
|
+
viewBox: "0 0 16 16",
|
|
944
|
+
width: 14,
|
|
945
|
+
height: 14,
|
|
946
|
+
"aria-hidden": "true",
|
|
947
|
+
children: react_jsx_runtime.jsx("path", {
|
|
948
|
+
d: "M8 2.2v6.4M5.2 6.4 8 9.2l2.8-2.8M3 10.8v1.4c0 .9.7 1.6 1.6 1.6h6.8c.9 0 1.6-.7 1.6-1.6v-1.4",
|
|
949
|
+
fill: "none",
|
|
950
|
+
stroke: "currentColor",
|
|
951
|
+
strokeWidth: 1.6,
|
|
952
|
+
strokeLinecap: "round",
|
|
953
|
+
strokeLinejoin: "round",
|
|
954
|
+
}),
|
|
955
|
+
}),
|
|
956
|
+
upgrading
|
|
957
|
+
? t.upgrading
|
|
958
|
+
: checkingUpdate
|
|
959
|
+
? t.checkingUpdate
|
|
960
|
+
: updateInfo && updateInfo.ok && updateInfo.hasUpdate
|
|
961
|
+
? t.hasUpdate
|
|
962
|
+
: t.checkUpdate,
|
|
963
|
+
],
|
|
964
|
+
}),
|
|
909
965
|
updateInfo && updateInfo.ok
|
|
910
966
|
? updateInfo.upgraded
|
|
911
967
|
? react_jsx_runtime.jsx("span", {
|
|
@@ -913,29 +969,12 @@ react_jsx_runtime.jsx("div", {
|
|
|
913
969
|
children: t.upgradeDone(updateInfo.latest),
|
|
914
970
|
})
|
|
915
971
|
: updateInfo.hasUpdate
|
|
916
|
-
?
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
? react_jsx_runtime.jsx("button", {
|
|
923
|
-
className: "dshfs-btn dshfs-upgrade",
|
|
924
|
-
type: "button",
|
|
925
|
-
onClick: runUpdate,
|
|
926
|
-
disabled: upgrading || saving || !ready,
|
|
927
|
-
children: upgrading ? t.upgrading : t.upgrade,
|
|
928
|
-
})
|
|
929
|
-
: react_jsx_runtime.jsx("a", {
|
|
930
|
-
className: "dshfs-link",
|
|
931
|
-
href: updateInfo.updateUrl,
|
|
932
|
-
target: "_blank",
|
|
933
|
-
rel: "noopener noreferrer",
|
|
934
|
-
children: t.updateView,
|
|
935
|
-
}),
|
|
936
|
-
updateInfo.installable ? null : " " + t.upgradeLinkMode,
|
|
937
|
-
],
|
|
938
|
-
})
|
|
972
|
+
? updateInfo.installable
|
|
973
|
+
? null
|
|
974
|
+
: react_jsx_runtime.jsx("span", {
|
|
975
|
+
className: "dshfs-version",
|
|
976
|
+
children: t.upgradeLinkMode,
|
|
977
|
+
})
|
|
939
978
|
: react_jsx_runtime.jsx("span", {
|
|
940
979
|
className: "dshfs-updateOk",
|
|
941
980
|
children: t.updateLatest(updateInfo.current),
|
package/lib/index.js
CHANGED
|
@@ -50,7 +50,7 @@ const FREE_ENGINES = ["ddg", "ddg-lite", "bing", "searxng", "anysearch"];
|
|
|
50
50
|
const ALL_ENGINES = ["ddg", "ddg-lite", "bing", "searxng", "anysearch", "exa", "tavily", "keenable", "firecrawl", "parallel", "perplexity", "deepseek-official"];
|
|
51
51
|
|
|
52
52
|
// 当前插件版本(发布时与 package.json 同步)
|
|
53
|
-
const PLUGIN_VERSION = "0.4.
|
|
53
|
+
const PLUGIN_VERSION = "0.4.28";
|
|
54
54
|
// 检查更新的 npm registry 元数据地址(dsh-free-search 是 npmjs 上的公开包)
|
|
55
55
|
const NPM_REGISTRY_URL = "https://registry.npmjs.org/dsh-free-search/latest";
|
|
56
56
|
const PLUGIN_NPM_URL = "https://www.npmjs.com/package/dsh-free-search";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-free-search",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.28",
|
|
4
4
|
"description": "Free web search for DeepSeek Harness: 12 engines (Bing/DuckDuckGo/AnySearch/SearXNG/Exa/Tavily/Keenable/Firecrawl keyless; Parallel/Perplexity/DeepSeek with key) + time filtering + platform search + web_fetch, with web settings UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|