dsh-free-search 0.4.26 → 0.4.27

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 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:4px;border:0;background:transparent;color:var(--dsw-alias-state-business-primary);font:inherit;font-size:12px;font-weight:500;cursor:pointer;padding:3px 6px;border-radius:6px;text-decoration:none;transition:background-color .13s}",
66
+ ".dshfs-updatePill:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-accent)}",
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.26";
219
+ const PLUGIN_VERSION = "0.4.27";
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,15 @@ 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
- react_jsx_runtime.jsx("button", {
903
- className: "dshfs-btn",
904
- type: "button",
905
- onClick: runCheckUpdate,
906
- disabled: checkingUpdate || saving || !ready,
907
- children: checkingUpdate ? t.checkingUpdate : t.checkUpdate,
908
- }),
908
+ updateInfo && updateInfo.ok && updateInfo.hasUpdate
909
+ ? null
910
+ : react_jsx_runtime.jsx("button", {
911
+ className: "dshfs-btn",
912
+ type: "button",
913
+ onClick: runCheckUpdate,
914
+ disabled: checkingUpdate || saving || !ready,
915
+ children: checkingUpdate ? t.checkingUpdate : t.checkUpdate,
916
+ }),
909
917
  updateInfo && updateInfo.ok
910
918
  ? updateInfo.upgraded
911
919
  ? react_jsx_runtime.jsx("span", {
@@ -914,26 +922,65 @@ react_jsx_runtime.jsx("div", {
914
922
  })
915
923
  : updateInfo.hasUpdate
916
924
  ? react_jsx_runtime.jsx("span", {
917
- className: "dshfs-update",
925
+ className: "dshfs-updateLine",
918
926
  children: [
919
- t.updateAvailable(updateInfo.current, updateInfo.latest),
920
- " ",
921
927
  updateInfo.installable
922
928
  ? react_jsx_runtime.jsx("button", {
923
- className: "dshfs-btn dshfs-upgrade",
929
+ className: "dshfs-updatePill",
924
930
  type: "button",
931
+ title: t.updateAvailable(updateInfo.current, updateInfo.latest),
925
932
  onClick: runUpdate,
926
933
  disabled: upgrading || saving || !ready,
927
- children: upgrading ? t.upgrading : t.upgrade,
934
+ children: [
935
+ react_jsx_runtime.jsx("svg", {
936
+ className: "dshfs-updateIcon",
937
+ viewBox: "0 0 16 16",
938
+ width: 14,
939
+ height: 14,
940
+ "aria-hidden": "true",
941
+ children: react_jsx_runtime.jsx("path", {
942
+ 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",
943
+ fill: "none",
944
+ stroke: "currentColor",
945
+ strokeWidth: 1.6,
946
+ strokeLinecap: "round",
947
+ strokeLinejoin: "round",
948
+ }),
949
+ }),
950
+ upgrading ? t.upgrading : t.hasUpdate,
951
+ ],
928
952
  })
929
953
  : react_jsx_runtime.jsx("a", {
930
- className: "dshfs-link",
954
+ className: "dshfs-updatePill",
931
955
  href: updateInfo.updateUrl,
932
956
  target: "_blank",
933
957
  rel: "noopener noreferrer",
934
- children: t.updateView,
958
+ title: t.updateAvailable(updateInfo.current, updateInfo.latest),
959
+ children: [
960
+ react_jsx_runtime.jsx("svg", {
961
+ className: "dshfs-updateIcon",
962
+ viewBox: "0 0 16 16",
963
+ width: 14,
964
+ height: 14,
965
+ "aria-hidden": "true",
966
+ children: react_jsx_runtime.jsx("path", {
967
+ 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",
968
+ fill: "none",
969
+ stroke: "currentColor",
970
+ strokeWidth: 1.6,
971
+ strokeLinecap: "round",
972
+ strokeLinejoin: "round",
973
+ }),
974
+ }),
975
+ t.hasUpdate,
976
+ ],
977
+ }),
978
+ updateInfo.installable
979
+ ? null
980
+ : react_jsx_runtime.jsx("span", {
981
+ className: "dshfs-version",
982
+ children: t.upgradeLinkMode,
935
983
  }),
936
- updateInfo.installable ? null : " " + t.upgradeLinkMode,
937
984
  ],
938
985
  })
939
986
  : react_jsx_runtime.jsx("span", {
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.26";
53
+ const PLUGIN_VERSION = "0.4.27";
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.26",
3
+ "version": "0.4.27",
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",