@max-null/dsh-plugin-center 0.1.5 → 0.1.7

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.
Files changed (3) hide show
  1. package/README.md +6 -0
  2. package/client.js +34 -8
  3. package/package.json +3 -2
package/README.md CHANGED
@@ -13,6 +13,12 @@ Plugin center for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-har
13
13
  - **DSH compatibility / 兼容性检查** — flags plugins whose peer range does not match the running DSH.
14
14
  - **Skin-compatible / 皮肤兼容** — every color uses `var(--dsw-*)` tokens, so skin plugins restyle this UI too.
15
15
 
16
+ ## Part of the SSID family / SSID 系列成员
17
+
18
+ This plugin belongs to the **`@max-null/*` family** — a set of plugins that together form the **[SSID (思灵 · Seek Soul in Darkness)](https://github.com/Max-Null/seek-soul-in-darkness)** desktop experience. SSID is the box that bundles them all: `dsh-plugin-center` · `dsh-memory` · `dsh-chinese-thinking` · `dsh-guardian` · `dsh-habit`.
19
+
20
+ 本插件属于 **`@max-null/*` 插件系列**——这一系列共同构成 **[SSID(思灵 · Seek Soul in Darkness)](https://github.com/Max-Null/seek-soul-in-darkness)** 桌面体验。SSID 是整合它们的盒:`dsh-plugin-center` · `dsh-memory` · `dsh-chinese-thinking` · `dsh-guardian` · `dsh-habit`。
21
+
16
22
  ## Screenshots / 截图
17
23
 
18
24
  | Installed / 已安装 | Market / 市场 | Updates / 更新 |
package/client.js CHANGED
@@ -126,6 +126,9 @@ function closeOverlay() {
126
126
  overlayOpen = false;
127
127
  overlayListeners.forEach((l) => l());
128
128
  }
129
+ function toggleOverlay() {
130
+ overlayOpen ? closeOverlay() : openOverlay();
131
+ }
129
132
  function closeWhatsNew() {
130
133
  whatsNewOpen = false;
131
134
  for (const d of whatsNewDigests) readCache[d.name] = d.toVersion;
@@ -730,14 +733,20 @@ function OverlayPanel() {
730
733
  const t = useT();
731
734
  const open = useOverlayOpen();
732
735
  if (!open) return null;
733
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "pc-overlay", role: "presentation", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "pc-panel", role: "dialog", "aria-modal": "true", "aria-label": t("title"), children: [
734
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "pc-panel-head", children: [
735
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "pc-title", children: t("title") }),
736
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "pc-spacer" }),
737
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "pc-close", onClick: closeOverlay, "aria-label": t("close"), children: "\u2715" })
738
- ] }),
739
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "pc-panel-body", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CenterPanel, { variant: "overlay" }) })
740
- ] }) });
736
+ return (
737
+ // 0.1.7:点遮罩关闭——overlay 背景点击即 closeOverlay;面板内点击
738
+ // stopPropagation 不冒泡到遮罩(面板内部交互不受影响)。
739
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "pc-overlay", role: "presentation", onClick: closeOverlay, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "pc-panel", role: "dialog", "aria-modal": "true", "aria-label": t("title"), onClick: (e) => {
740
+ e.stopPropagation();
741
+ }, children: [
742
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "pc-panel-head", children: [
743
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "pc-title", children: t("title") }),
744
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "pc-spacer" }),
745
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "pc-close", onClick: closeOverlay, "aria-label": t("close"), children: "\u2715" })
746
+ ] }),
747
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "pc-panel-body", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CenterPanel, { variant: "overlay" }) })
748
+ ] }) })
749
+ );
741
750
  }
742
751
  function Toast() {
743
752
  const t = useToast();
@@ -798,8 +807,25 @@ function WhatsNewDialog() {
798
807
  ] }) });
799
808
  }
800
809
  var inject = ["slots", "connection"];
810
+ var GLOBAL_KEYS = ["__pluginCenterOpen", "__pluginCenterToggle", "__pluginCenterClose"];
811
+ function installGlobals() {
812
+ const w = window;
813
+ w.__pluginCenterOpen = openOverlay;
814
+ w.__pluginCenterToggle = toggleOverlay;
815
+ w.__pluginCenterClose = closeOverlay;
816
+ w.__pluginCenterGlobalsInstalled = true;
817
+ }
818
+ function cleanupGlobals() {
819
+ const w = window;
820
+ for (const key of GLOBAL_KEYS) delete w[key];
821
+ delete w.__pluginCenterGlobalsInstalled;
822
+ }
801
823
  function apply(ctx) {
802
824
  injectCss();
825
+ if (window.__pluginCenterGlobalsInstalled !== true) {
826
+ installGlobals();
827
+ window.addEventListener("unload", cleanupGlobals);
828
+ }
803
829
  rpc = async (endpoint, payload = {}) => {
804
830
  const result = await ctx.connection.rpc.call("/plugin-center", endpoint, payload);
805
831
  if (result.ok) return result.value;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@max-null/dsh-plugin-center",
3
- "version": "0.1.5",
4
- "description": "Plugin center for DeepSeek Harness installed metadata, community market, update detection, and What's New",
3
+ "version": "0.1.7",
4
+ "description": "Plugin center for DeepSeek Harness 鈥?installed metadata, community market, update detection, and What's New",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -83,3 +83,4 @@
83
83
  "typescript": "^5.5.0"
84
84
  }
85
85
  }
86
+