dsh-edge 0.1.0
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/LICENSE +21 -0
- package/README.i18n.yaml +6 -0
- package/README.md +183 -0
- package/README.zh.md +183 -0
- package/THIRD_PARTY_NOTICES.md +199 -0
- package/dist/_headers +3 -0
- package/dist/assets/fonts/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/assets/fonts/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/assets/fonts/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/assets/fonts/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/assets/fonts/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/assets/fonts/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/assets/fonts/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/assets/fonts/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/assets/fonts/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/assets/fonts/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/assets/fonts/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/assets/fonts/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/assets/fonts/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/assets/fonts/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/assets/fonts/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/assets/fonts/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/assets/fonts/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/assets/fonts/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/assets/fonts/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/assets/fonts/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/assets/fonts/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/assets/fonts/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/assets/fonts/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/assets/fonts/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/assets/fonts/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/assets/fonts/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/assets/fonts/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/assets/fonts/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/assets/fonts/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/assets/fonts/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/assets/fonts/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/assets/fonts/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/assets/fonts/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/assets/fonts/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/assets/fonts/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/assets/fonts/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/assets/fonts/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/assets/fonts/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/assets/fonts/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/assets/fonts/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/assets/fonts/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/assets/fonts/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/assets/fonts/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/assets/fonts/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/assets/fonts/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/assets/fonts/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/assets/fonts/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/assets/fonts/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/assets/fonts/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/assets/fonts/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/assets/fonts/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/assets/fonts/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/assets/fonts/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/assets/fonts/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/assets/fonts/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/assets/fonts/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/assets/fonts/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/assets/fonts/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/assets/fonts/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/assets/index-C-1AiF3k.js +112 -0
- package/dist/assets/index-CSGf6Qzd.css +1 -0
- package/dist/assets/langs/c-BIGW1oBm.js +2 -0
- package/dist/assets/langs/cpp-DIPi6g--.js +2 -0
- package/dist/assets/langs/csharp-DSvCPggb.js +2 -0
- package/dist/assets/langs/css-CLj8gQPS.js +2 -0
- package/dist/assets/langs/go-C27-OAKa.js +2 -0
- package/dist/assets/langs/html-CfGypltT.js +2 -0
- package/dist/assets/langs/ini-BEwlwnbL.js +2 -0
- package/dist/assets/langs/java-CylS5w8V.js +2 -0
- package/dist/assets/langs/kotlin-BdnUsdx6.js +2 -0
- package/dist/assets/langs/less-B1dDrJ26.js +2 -0
- package/dist/assets/langs/lua-BaeVxFsk.js +2 -0
- package/dist/assets/langs/markdown-Cvjx9yec.js +2 -0
- package/dist/assets/langs/mdx-Cmh6b_Ma.js +2 -0
- package/dist/assets/langs/php-D-uCvoST.js +2 -0
- package/dist/assets/langs/python-B6aJPvgy.js +2 -0
- package/dist/assets/langs/ruby-DEItuUFs.js +2 -0
- package/dist/assets/langs/rust-B1yitclQ.js +2 -0
- package/dist/assets/langs/scss-D5BDwBP9.js +2 -0
- package/dist/assets/langs/sql-CRqJ_cUM.js +2 -0
- package/dist/assets/langs/swift-D82vCrfD.js +2 -0
- package/dist/assets/langs/toml-vGWfd6FD.js +2 -0
- package/dist/assets/langs/xml-sdJ4AIDG.js +2 -0
- package/dist/assets/langs/yaml-Buea-lGh.js +2 -0
- package/dist/assets/vendor-Cjbwl5VI.js +411 -0
- package/dist/assets/vendor-CjyC-hUb.css +1 -0
- package/dist/favicon.svg +8 -0
- package/dist/index.html +35 -0
- package/dist/manifest.webmanifest +16 -0
- package/dist/plugins/@deepseek-ai/dsh-api-gateway/client.js +420 -0
- package/dist/plugins/@deepseek-ai/dsh-api-remotes/client.js +5937 -0
- package/dist/plugins/@deepseek-ai/dsh-client-connection/client.js +10207 -0
- package/dist/plugins/@deepseek-ai/dsh-client-locale/client.js +1231 -0
- package/dist/plugins/@deepseek-ai/dsh-client-modules/client.js +259 -0
- package/dist/plugins/@deepseek-ai/dsh-client-runtime/client.js +10539 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-agent-preset/client.js +1725 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-commands/client.js +1116 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-conversation/client.js +9832 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-deliverables/client.js +373 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-edge/client.js +549 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-input-trigger/client.js +859 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-jobs/client.js +280 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-layout/client.js +456 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-model-selection/client.js +804 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-permission-presets/client.js +461 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings/client.js +254 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-general/client.js +609 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar/client.js +292 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-skill/client.js +327 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-subagent/client.js +710 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-theme/client.js +1312 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-tool/client.js +1630 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-trajectory/client.js +7370 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-user-questions/client.js +700 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workflow-run/client.js +474 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workspace/client.js +2426 -0
- package/dist/plugins/@deepseek-ai/dsh-typert-registry/client.js +1372 -0
- package/package.json +97 -0
- package/scripts/assemble-web.mjs +230 -0
- package/scripts/bundle-size.d.mts +2 -0
- package/scripts/bundle-size.mjs +26 -0
- package/scripts/bundle.mjs +53 -0
- package/scripts/cli.d.mts +39 -0
- package/scripts/cli.mjs +496 -0
- package/scripts/install.d.mts +149 -0
- package/scripts/install.mjs +989 -0
- package/scripts/legal-files.mjs +24 -0
- package/scripts/verify-packed.mjs +32 -0
- package/scripts/wrangler-config.d.mts +18 -0
- package/scripts/wrangler-config.mjs +84 -0
- package/src/agent.ts +119 -0
- package/src/auth.ts +352 -0
- package/src/deepseek.ts +231 -0
- package/src/deployment.ts +147 -0
- package/src/direct-shell-core-empty.ts +10 -0
- package/src/direct-shell-protocol.ts +5 -0
- package/src/direct-shell.ts +341 -0
- package/src/do-session-persistence.ts +1064 -0
- package/src/edge-api.ts +796 -0
- package/src/edge-credentials.ts +56 -0
- package/src/edge-remotes.ts +41 -0
- package/src/edge-workspace-store.ts +339 -0
- package/src/http.ts +212 -0
- package/src/index.ts +196 -0
- package/src/instance.ts +1007 -0
- package/src/isolated-direct-shell-unavailable.ts +11 -0
- package/src/protocol.ts +39 -0
- package/src/release.ts +9 -0
- package/src/session-store.ts +1110 -0
- package/src/sse.ts +86 -0
- package/src/web-search.ts +38 -0
- package/src/workspace.ts +270 -0
- package/wrangler.jsonc +56 -0
|
@@ -0,0 +1,609 @@
|
|
|
1
|
+
window.__ModuleLoader__.load({
|
|
2
|
+
id: "@deepseek-ai/dsh-client-ui-settings-general",
|
|
3
|
+
factory: (require) => {
|
|
4
|
+
var module = { exports: {} };
|
|
5
|
+
var exports = module.exports;
|
|
6
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
|
+
let _deepseek_ai_dsh_client_ui_slots = require("@deepseek-ai/dsh-client-ui-slots");
|
|
8
|
+
let _deepseek_ai_dsh_client_web_react = require("@deepseek-ai/dsh-client-web-react");
|
|
9
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
|
+
let react = require("react");
|
|
11
|
+
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
12
|
+
let _deepseek_ai_dsh_client_runtime_client = require("@deepseek-ai/dsh-client-runtime/client");
|
|
13
|
+
//#region ../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
14
|
+
function r(e) {
|
|
15
|
+
var t, f, n = "";
|
|
16
|
+
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
17
|
+
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
18
|
+
var o = e.length;
|
|
19
|
+
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
20
|
+
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
21
|
+
return n;
|
|
22
|
+
}
|
|
23
|
+
function clsx() {
|
|
24
|
+
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
25
|
+
return n;
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region \0dsh-css:/private/var/folders/nm/n5smty9962gf5rhjc5855kt80000gn/T/dsh-edge-release-worktree.XXXXXX.RcJjogaGt4/repo/packages/client/ui-settings-general/src/client/SettingsRoot.module.css.mjs
|
|
29
|
+
const css$3 = ".VdPHSa_trigger{box-sizing:border-box;cursor:pointer;width:calc(100% + 4px);height:42px;color:var(--dsw-alias-label-primary);background:0 0;border:none;border-radius:12px;flex:none;align-items:center;gap:8px;margin:4px -2px;padding:0 10px 0 8px;font-family:inherit;font-size:14px;line-height:22px;display:flex;overflow:hidden}.VdPHSa_trigger:hover{background:var(--dsw-alias-interactive-bg-hover)}.VdPHSa_trigger.VdPHSa_rail{border-radius:50%;justify-content:center;gap:0;width:36px;height:36px;margin:8px 0 10px;padding:0}.VdPHSa_triggerLabel{white-space:nowrap;overflow:hidden}.VdPHSa_overlay{z-index:1000;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.VdPHSa_mask{background:var(--dsw-alias-bg-mask-1);backdrop-filter:var(--dsw-mask-blur);position:absolute;inset:0}.VdPHSa_panel{z-index:1;background:var(--dsw-alias-bg-layer-2);width:800px;max-width:calc(100vw - 48px);height:min(800px,100vh - 48px);box-shadow:var(--dsw-shadow-lv3);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);border-radius:24px;display:flex;position:relative;overflow:hidden}.VdPHSa_nav{box-sizing:border-box;flex-direction:column;flex:none;gap:18px;width:188px;padding:22px 12px 0;display:flex}.VdPHSa_navTitle{color:var(--dsw-alias-label-primary);padding:0 12px;font-size:16px;font-weight:500;line-height:24px}.VdPHSa_navList{flex-direction:column;gap:4px;display:flex}.VdPHSa_navCell{box-sizing:border-box;cursor:pointer;height:40px;color:var(--dsw-alias-label-primary);text-align:left;background:0 0;border:none;border-radius:12px;align-items:center;gap:8px;padding:9px 16px 9px 12px;font-family:inherit;font-size:14px;font-weight:400;line-height:22px;display:flex}.VdPHSa_navCell:hover{background:var(--dsw-specific-sidebar-nav-item-hover)}.VdPHSa_navCell.VdPHSa_active{background:var(--dsw-specific-sidebar-nav-item-active)}.VdPHSa_navIcon{flex:none}.VdPHSa_navLabel{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;overflow:hidden}.VdPHSa_content{flex-direction:column;flex:1;min-width:0;display:flex}.VdPHSa_header{box-sizing:border-box;flex:none;justify-content:space-between;align-items:flex-start;gap:8px;height:54px;padding:20px 14px 8px 10px;display:flex}.VdPHSa_actions{justify-content:flex-end;align-items:center;gap:8px;min-width:0;margin-left:auto;display:flex}.VdPHSa_close{cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-primary);background:0 0;border:none;border-radius:28px;justify-content:center;align-items:center;padding:0;display:inline-flex}.VdPHSa_close:hover{background:var(--dsw-alias-interactive-bg-hover)}.VdPHSa_options{flex:1;min-height:0;padding:0 24px 24px;overflow-y:auto}.VdPHSa_hiddenLabel{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}";
|
|
30
|
+
const tagId$3 = "@deepseek-ai/dsh-client-ui-settings-general/SettingsRoot.module.css";
|
|
31
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$3) + "]") === null) {
|
|
32
|
+
const tag = document.createElement("style");
|
|
33
|
+
tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-settings-general";
|
|
34
|
+
tag.dataset.pluginCss = tagId$3;
|
|
35
|
+
tag.textContent = css$3;
|
|
36
|
+
document.head.appendChild(tag);
|
|
37
|
+
}
|
|
38
|
+
var SettingsRoot_module_css_default = {
|
|
39
|
+
"header": "VdPHSa_header",
|
|
40
|
+
"panel": "VdPHSa_panel",
|
|
41
|
+
"navTitle": "VdPHSa_navTitle",
|
|
42
|
+
"navCell": "VdPHSa_navCell",
|
|
43
|
+
"close": "VdPHSa_close",
|
|
44
|
+
"overlay": "VdPHSa_overlay",
|
|
45
|
+
"options": "VdPHSa_options",
|
|
46
|
+
"content": "VdPHSa_content",
|
|
47
|
+
"trigger": "VdPHSa_trigger",
|
|
48
|
+
"nav": "VdPHSa_nav",
|
|
49
|
+
"actions": "VdPHSa_actions",
|
|
50
|
+
"navList": "VdPHSa_navList",
|
|
51
|
+
"hiddenLabel": "VdPHSa_hiddenLabel",
|
|
52
|
+
"rail": "VdPHSa_rail",
|
|
53
|
+
"mask": "VdPHSa_mask",
|
|
54
|
+
"navIcon": "VdPHSa_navIcon",
|
|
55
|
+
"triggerLabel": "VdPHSa_triggerLabel",
|
|
56
|
+
"navLabel": "VdPHSa_navLabel",
|
|
57
|
+
"active": "VdPHSa_active"
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region lib/types/client/SettingsRoot.js
|
|
61
|
+
/**
|
|
62
|
+
* Settings shell root: the sidebar-foot trigger row plus the centered modal
|
|
63
|
+
* panel (figma 501:29947, 1080x700) with the section nav rail. The shell is
|
|
64
|
+
* a pure composition face — every piece of text (trigger label, panel title,
|
|
65
|
+
* close label, sections) arrives from registrants through slots; accessible
|
|
66
|
+
* names resolve to that content (trigger: its own text; dialog:
|
|
67
|
+
* aria-labelledby the title node; close: visually-hidden slot text). Modal
|
|
68
|
+
* open state and the active section id are component-local viewing state;
|
|
69
|
+
* the onboarding coordinator mounts exactly one ordered registrant while the
|
|
70
|
+
* sessions-derived empty-Hero fact is active. Visible dialog chrome belongs
|
|
71
|
+
* to the step, so a mounted-but-deciding step paints nothing here.
|
|
72
|
+
*/
|
|
73
|
+
/** Nav glyph by section id; unknown ids fall back to the settings gear. */
|
|
74
|
+
function navIcon(id) {
|
|
75
|
+
if (id === "models") return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconDataOutline16, {
|
|
76
|
+
className: SettingsRoot_module_css_default.navIcon,
|
|
77
|
+
size: 16
|
|
78
|
+
});
|
|
79
|
+
if (id === "agent-presets") return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconAgentPresetOutline16, {
|
|
80
|
+
className: SettingsRoot_module_css_default.navIcon,
|
|
81
|
+
size: 16
|
|
82
|
+
});
|
|
83
|
+
if (id === "plugins") return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPersonalizationOutline16, {
|
|
84
|
+
className: SettingsRoot_module_css_default.navIcon,
|
|
85
|
+
size: 16
|
|
86
|
+
});
|
|
87
|
+
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSettingsOutline16, {
|
|
88
|
+
className: SettingsRoot_module_css_default.navIcon,
|
|
89
|
+
size: 16
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* The modal layer: full-viewport mask + centered panel. Close paths: the
|
|
94
|
+
* header button, a mask click, and document-level Escape (mounted only while
|
|
95
|
+
* open, so the listener lifetime is the panel's).
|
|
96
|
+
*/
|
|
97
|
+
function SettingsPanel({ rows, renderSlot, activeId, onSelect, onClose }) {
|
|
98
|
+
const active = rows.find((r) => r.id === activeId)?.id ?? rows[0]?.id;
|
|
99
|
+
const titleId = (0, react.useId)();
|
|
100
|
+
(0, react.useEffect)(() => {
|
|
101
|
+
const onKeyDown = (e) => {
|
|
102
|
+
if (e.key === "Escape") onClose();
|
|
103
|
+
};
|
|
104
|
+
document.addEventListener("keydown", onKeyDown);
|
|
105
|
+
return () => {
|
|
106
|
+
document.removeEventListener("keydown", onKeyDown);
|
|
107
|
+
};
|
|
108
|
+
}, [onClose]);
|
|
109
|
+
const closeButton = (0, react.useRef)(null);
|
|
110
|
+
(0, react.useEffect)(() => {
|
|
111
|
+
closeButton.current?.focus();
|
|
112
|
+
}, []);
|
|
113
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
114
|
+
className: SettingsRoot_module_css_default.overlay,
|
|
115
|
+
role: "presentation",
|
|
116
|
+
children: [(0, react_jsx_runtime.jsx)("div", {
|
|
117
|
+
className: SettingsRoot_module_css_default.mask,
|
|
118
|
+
"aria-hidden": "true",
|
|
119
|
+
onClick: onClose
|
|
120
|
+
}), (0, react_jsx_runtime.jsxs)("div", {
|
|
121
|
+
className: SettingsRoot_module_css_default.panel,
|
|
122
|
+
role: "dialog",
|
|
123
|
+
"aria-modal": "true",
|
|
124
|
+
"aria-labelledby": titleId,
|
|
125
|
+
children: [(0, react_jsx_runtime.jsxs)("nav", {
|
|
126
|
+
className: SettingsRoot_module_css_default.nav,
|
|
127
|
+
children: [(0, react_jsx_runtime.jsx)("div", {
|
|
128
|
+
className: SettingsRoot_module_css_default.navTitle,
|
|
129
|
+
id: titleId,
|
|
130
|
+
children: renderSlot("settings.header", {})
|
|
131
|
+
}), (0, react_jsx_runtime.jsx)("div", {
|
|
132
|
+
className: SettingsRoot_module_css_default.navList,
|
|
133
|
+
children: rows.map((row) => (0, react_jsx_runtime.jsxs)("button", {
|
|
134
|
+
type: "button",
|
|
135
|
+
className: clsx(SettingsRoot_module_css_default.navCell, row.id === active && SettingsRoot_module_css_default.active),
|
|
136
|
+
"aria-current": row.id === active ? "true" : void 0,
|
|
137
|
+
onClick: () => {
|
|
138
|
+
onSelect(row.id);
|
|
139
|
+
},
|
|
140
|
+
children: [navIcon(row.id), (0, react_jsx_runtime.jsx)("span", {
|
|
141
|
+
className: SettingsRoot_module_css_default.navLabel,
|
|
142
|
+
children: row.label
|
|
143
|
+
})]
|
|
144
|
+
}, row.id))
|
|
145
|
+
})]
|
|
146
|
+
}), (0, react_jsx_runtime.jsxs)("div", {
|
|
147
|
+
className: SettingsRoot_module_css_default.content,
|
|
148
|
+
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
149
|
+
className: SettingsRoot_module_css_default.header,
|
|
150
|
+
children: [(0, react_jsx_runtime.jsx)("div", {
|
|
151
|
+
className: SettingsRoot_module_css_default.actions,
|
|
152
|
+
children: renderSlot("settings.action", {})
|
|
153
|
+
}), (0, react_jsx_runtime.jsxs)("button", {
|
|
154
|
+
ref: closeButton,
|
|
155
|
+
type: "button",
|
|
156
|
+
className: SettingsRoot_module_css_default.close,
|
|
157
|
+
onClick: onClose,
|
|
158
|
+
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCloseOutline16, { size: 14 }), (0, react_jsx_runtime.jsx)("span", {
|
|
159
|
+
className: SettingsRoot_module_css_default.hiddenLabel,
|
|
160
|
+
children: renderSlot("settings.close", {})
|
|
161
|
+
})]
|
|
162
|
+
})]
|
|
163
|
+
}), (0, react_jsx_runtime.jsx)("div", {
|
|
164
|
+
className: SettingsRoot_module_css_default.options,
|
|
165
|
+
children: active !== void 0 && renderSlot("settings.section", { close: onClose }, { only: active })
|
|
166
|
+
})]
|
|
167
|
+
})]
|
|
168
|
+
})]
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Render the settings trigger and panel.
|
|
173
|
+
* @param props - composed slot props (contract/slots.ts).
|
|
174
|
+
* @returns the settings shell element tree.
|
|
175
|
+
*/
|
|
176
|
+
function SettingsRoot(props) {
|
|
177
|
+
const { wide, useSections, useOnboardingSteps, useSessions, renderSlot } = props;
|
|
178
|
+
const [open, setOpen] = (0, react.useState)(false);
|
|
179
|
+
const [activeId, setActiveId] = (0, react.useState)(void 0);
|
|
180
|
+
const [completedOnboarding, setCompletedOnboarding] = (0, react.useState)(() => /* @__PURE__ */ new Set());
|
|
181
|
+
const close = (0, react.useCallback)(() => {
|
|
182
|
+
setOpen(false);
|
|
183
|
+
setActiveId(void 0);
|
|
184
|
+
}, []);
|
|
185
|
+
const openSection = (0, react.useCallback)((id) => {
|
|
186
|
+
setActiveId(id);
|
|
187
|
+
setOpen(true);
|
|
188
|
+
}, []);
|
|
189
|
+
const rows = useSections((s) => s);
|
|
190
|
+
const onboardingSteps = useOnboardingSteps((s) => s);
|
|
191
|
+
const onboardingActive = useSessions((state) => state.phase === "ready" && (state.current === void 0 || state.byId[state.current]?.blank === true));
|
|
192
|
+
const onboardingStep = onboardingActive ? onboardingSteps.find((step) => !completedOnboarding.has(step.id)) : void 0;
|
|
193
|
+
(0, react.useEffect)(() => {
|
|
194
|
+
if (onboardingActive) return;
|
|
195
|
+
setCompletedOnboarding(/* @__PURE__ */ new Set());
|
|
196
|
+
}, [onboardingActive]);
|
|
197
|
+
const completeOnboardingStep = (0, react.useCallback)((id) => {
|
|
198
|
+
setCompletedOnboarding((previous) => {
|
|
199
|
+
if (previous.has(id)) return previous;
|
|
200
|
+
return new Set([...previous, id]);
|
|
201
|
+
});
|
|
202
|
+
}, []);
|
|
203
|
+
return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
204
|
+
(0, react_jsx_runtime.jsx)("button", {
|
|
205
|
+
type: "button",
|
|
206
|
+
className: clsx(SettingsRoot_module_css_default.trigger, !wide && SettingsRoot_module_css_default.rail),
|
|
207
|
+
"aria-haspopup": "dialog",
|
|
208
|
+
"aria-expanded": open,
|
|
209
|
+
onClick: () => {
|
|
210
|
+
setOpen(true);
|
|
211
|
+
},
|
|
212
|
+
children: renderSlot("settings.trigger", { wide })
|
|
213
|
+
}),
|
|
214
|
+
open && (0, react_jsx_runtime.jsx)(SettingsPanel, {
|
|
215
|
+
rows,
|
|
216
|
+
renderSlot,
|
|
217
|
+
activeId,
|
|
218
|
+
onSelect: setActiveId,
|
|
219
|
+
onClose: close
|
|
220
|
+
}),
|
|
221
|
+
onboardingStep !== void 0 && renderSlot("settings.onboarding", {
|
|
222
|
+
stepId: onboardingStep.id,
|
|
223
|
+
complete: () => {
|
|
224
|
+
completeOnboardingStep(onboardingStep.id);
|
|
225
|
+
},
|
|
226
|
+
openSection
|
|
227
|
+
}, { only: onboardingStep.id })
|
|
228
|
+
] });
|
|
229
|
+
}
|
|
230
|
+
//#endregion
|
|
231
|
+
//#region \0dsh-css:/private/var/folders/nm/n5smty9962gf5rhjc5855kt80000gn/T/dsh-edge-release-worktree.XXXXXX.RcJjogaGt4/repo/packages/client/ui-settings-general/src/client/chrome.module.css.mjs
|
|
232
|
+
const css$2 = ".oxV1Hq_triggerLabel{white-space:nowrap;overflow:hidden}";
|
|
233
|
+
const tagId$2 = "@deepseek-ai/dsh-client-ui-settings-general/chrome.module.css";
|
|
234
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
235
|
+
const tag = document.createElement("style");
|
|
236
|
+
tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-settings-general";
|
|
237
|
+
tag.dataset.pluginCss = tagId$2;
|
|
238
|
+
tag.textContent = css$2;
|
|
239
|
+
document.head.appendChild(tag);
|
|
240
|
+
}
|
|
241
|
+
var chrome_module_css_default = { "triggerLabel": "oxV1Hq_triggerLabel" };
|
|
242
|
+
//#endregion
|
|
243
|
+
//#region lib/types/client/chrome.js
|
|
244
|
+
/**
|
|
245
|
+
* Shell chrome content registered into the shell's trigger/header seats: the
|
|
246
|
+
* trigger row icon + label (figma sidebar foot) and the panel title text.
|
|
247
|
+
* The shell renders the surrounding chrome (button, nav heading row) and
|
|
248
|
+
* reads each entry's `label` option for aria text.
|
|
249
|
+
*/
|
|
250
|
+
/**
|
|
251
|
+
* Render the trigger row content (icon; label only in the wide column).
|
|
252
|
+
* @param props - composed slot props.
|
|
253
|
+
* @returns the trigger content fragment.
|
|
254
|
+
*/
|
|
255
|
+
function TriggerContent({ wide, t }) {
|
|
256
|
+
return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [wide ? (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSettingsOutline16, { size: 16 }) : (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSettingsOutline14, { size: 18 }), wide && (0, react_jsx_runtime.jsx)("span", {
|
|
257
|
+
className: chrome_module_css_default.triggerLabel,
|
|
258
|
+
children: t("trigger")
|
|
259
|
+
})] });
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Render the panel title text.
|
|
263
|
+
* @param props - composed slot props.
|
|
264
|
+
* @returns the title text node.
|
|
265
|
+
*/
|
|
266
|
+
function HeaderContent({ t }) {
|
|
267
|
+
return (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: t("title") });
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Render the close button's visually-hidden label text.
|
|
271
|
+
* @param props - composed slot props.
|
|
272
|
+
* @returns the label text node.
|
|
273
|
+
*/
|
|
274
|
+
function CloseLabel({ t }) {
|
|
275
|
+
return (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: t("close") });
|
|
276
|
+
}
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region \0dsh-css:/private/var/folders/nm/n5smty9962gf5rhjc5855kt80000gn/T/dsh-edge-release-worktree.XXXXXX.RcJjogaGt4/repo/packages/client/ui-settings-general/src/client/GeneralSection.module.css.mjs
|
|
279
|
+
const css$1 = ".OFWV8G_section{flex-direction:column;width:100%;display:flex}.OFWV8G_section>[data-slot=\"settings.general.item\"]>:last-child{border-bottom:none}";
|
|
280
|
+
const tagId$1 = "@deepseek-ai/dsh-client-ui-settings-general/GeneralSection.module.css";
|
|
281
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
282
|
+
const tag = document.createElement("style");
|
|
283
|
+
tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-settings-general";
|
|
284
|
+
tag.dataset.pluginCss = tagId$1;
|
|
285
|
+
tag.textContent = css$1;
|
|
286
|
+
document.head.appendChild(tag);
|
|
287
|
+
}
|
|
288
|
+
var GeneralSection_module_css_default = { "section": "OFWV8G_section" };
|
|
289
|
+
//#endregion
|
|
290
|
+
//#region lib/types/client/GeneralSection.js
|
|
291
|
+
/**
|
|
292
|
+
* Render the General section content column.
|
|
293
|
+
* @param props - composed slot props (contract/slots.ts).
|
|
294
|
+
* @returns the section element tree.
|
|
295
|
+
*/
|
|
296
|
+
function GeneralSection({ renderSlot }) {
|
|
297
|
+
return (0, react_jsx_runtime.jsx)("div", {
|
|
298
|
+
className: GeneralSection_module_css_default.section,
|
|
299
|
+
children: renderSlot("settings.general.item", {})
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
//#endregion
|
|
303
|
+
//#region \0dsh-css:/private/var/folders/nm/n5smty9962gf5rhjc5855kt80000gn/T/dsh-edge-release-worktree.XXXXXX.RcJjogaGt4/repo/packages/client/ui-settings-general/src/client/SettingsDocumentAction.module.css.mjs
|
|
304
|
+
const css = "._00_Upq_action{align-items:center;gap:8px;min-width:0;display:flex}._00_Upq_error{max-width:180px;color:var(--dsw-alias-state-error-primary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:18px;overflow:hidden}";
|
|
305
|
+
const tagId = "@deepseek-ai/dsh-client-ui-settings-general/SettingsDocumentAction.module.css";
|
|
306
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
307
|
+
const tag = document.createElement("style");
|
|
308
|
+
tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-settings-general";
|
|
309
|
+
tag.dataset.pluginCss = tagId;
|
|
310
|
+
tag.textContent = css;
|
|
311
|
+
document.head.appendChild(tag);
|
|
312
|
+
}
|
|
313
|
+
var SettingsDocumentAction_module_css_default = {
|
|
314
|
+
"action": "_00_Upq_action",
|
|
315
|
+
"error": "_00_Upq_error"
|
|
316
|
+
};
|
|
317
|
+
//#endregion
|
|
318
|
+
//#region lib/types/client/SettingsDocumentAction.js
|
|
319
|
+
/** Optional settings-header action for opening a file-backed Host document. */
|
|
320
|
+
/**
|
|
321
|
+
* Render the open-document action only after Host metadata confirms document availability.
|
|
322
|
+
* @param props - header owner props, localized copy, and injected document state.
|
|
323
|
+
* @returns the action, or null while unavailable or unresolved.
|
|
324
|
+
*/
|
|
325
|
+
function SettingsDocumentAction({ controller, useSnapshot, t }) {
|
|
326
|
+
const state = useSnapshot((snapshot) => snapshot);
|
|
327
|
+
(0, react.useEffect)(() => {
|
|
328
|
+
controller.load();
|
|
329
|
+
}, [controller]);
|
|
330
|
+
if (state.status !== "ready") return null;
|
|
331
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
332
|
+
className: SettingsDocumentAction_module_css_default.action,
|
|
333
|
+
children: [state.error === null ? null : (0, react_jsx_runtime.jsx)("span", {
|
|
334
|
+
className: SettingsDocumentAction_module_css_default.error,
|
|
335
|
+
role: "alert",
|
|
336
|
+
children: t("openDocument.error")
|
|
337
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
338
|
+
variant: "outline",
|
|
339
|
+
size: "sm",
|
|
340
|
+
disabled: state.opening,
|
|
341
|
+
onClick: () => {
|
|
342
|
+
controller.open();
|
|
343
|
+
},
|
|
344
|
+
children: t("openDocument")
|
|
345
|
+
})]
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
//#endregion
|
|
349
|
+
//#region lib/types/client/settings-document-store.js
|
|
350
|
+
/** State owner for the optional local settings-document action. */
|
|
351
|
+
function messageOf(error) {
|
|
352
|
+
return error instanceof Error ? error.message : String(error);
|
|
353
|
+
}
|
|
354
|
+
/** Loads local-document availability and invokes the pathless Host-owned open operation. */
|
|
355
|
+
var SettingsDocumentStore = class {
|
|
356
|
+
api;
|
|
357
|
+
/** uSES-safe state source shared by the registered header action. */
|
|
358
|
+
store = (0, _deepseek_ai_dsh_client_runtime_client.createSnapshotStore)({
|
|
359
|
+
status: "idle",
|
|
360
|
+
opening: false,
|
|
361
|
+
error: null
|
|
362
|
+
});
|
|
363
|
+
generation = 0;
|
|
364
|
+
/**
|
|
365
|
+
* @param api - loopback settings wire face that reports and opens the provider document.
|
|
366
|
+
*/
|
|
367
|
+
constructor(api) {
|
|
368
|
+
this.api = api;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Load whether the current provider owns a local document.
|
|
372
|
+
* @returns after the latest metadata response updates the store.
|
|
373
|
+
*/
|
|
374
|
+
async load() {
|
|
375
|
+
const generation = ++this.generation;
|
|
376
|
+
this.store.update((state) => {
|
|
377
|
+
state.status = "loading";
|
|
378
|
+
state.error = null;
|
|
379
|
+
});
|
|
380
|
+
try {
|
|
381
|
+
const { result } = await this.api.settings.describe({});
|
|
382
|
+
if (generation !== this.generation) return;
|
|
383
|
+
if (!result.ok) {
|
|
384
|
+
this.store.update((state) => {
|
|
385
|
+
state.status = "unavailable";
|
|
386
|
+
state.error = result.error.message;
|
|
387
|
+
});
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
this.store.update((state) => {
|
|
391
|
+
state.status = result.value.hasDocument ? "ready" : "unavailable";
|
|
392
|
+
state.error = null;
|
|
393
|
+
});
|
|
394
|
+
} catch (error) {
|
|
395
|
+
if (generation !== this.generation) return;
|
|
396
|
+
this.store.update((state) => {
|
|
397
|
+
state.status = "unavailable";
|
|
398
|
+
state.error = messageOf(error);
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* Open the loaded document once; concurrent gestures collapse behind the in-flight action.
|
|
404
|
+
* @returns after the native-open request settles, or immediately when unavailable/already opening.
|
|
405
|
+
*/
|
|
406
|
+
async open() {
|
|
407
|
+
const current = this.store.getSnapshot();
|
|
408
|
+
if (current.status !== "ready" || current.opening) return;
|
|
409
|
+
this.store.update((state) => {
|
|
410
|
+
state.opening = true;
|
|
411
|
+
state.error = null;
|
|
412
|
+
});
|
|
413
|
+
try {
|
|
414
|
+
const response = await this.api.settings.openDocument({});
|
|
415
|
+
if (!response.result.ok) throw new Error(response.result.error.message);
|
|
416
|
+
} catch (error) {
|
|
417
|
+
this.store.update((state) => {
|
|
418
|
+
state.error = messageOf(error);
|
|
419
|
+
});
|
|
420
|
+
} finally {
|
|
421
|
+
this.store.update((state) => {
|
|
422
|
+
state.opening = false;
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
/**
|
|
428
|
+
* Refresh document availability after reconnect only when a surface has already requested it.
|
|
429
|
+
* @param controller - optional loopback document state owner.
|
|
430
|
+
*/
|
|
431
|
+
function refreshDocumentIfLoaded(controller) {
|
|
432
|
+
if (controller === void 0 || controller.store.getSnapshot().status === "idle") return;
|
|
433
|
+
controller.load();
|
|
434
|
+
}
|
|
435
|
+
//#endregion
|
|
436
|
+
//#region lib/types/client/locales.js
|
|
437
|
+
/** Shell chrome and General-nav dictionaries; feature rows own their copy. */
|
|
438
|
+
/** Simplified Chinese dictionary (the key-set source of truth). */
|
|
439
|
+
const zh = {
|
|
440
|
+
"trigger": "设置",
|
|
441
|
+
"title": "设置",
|
|
442
|
+
"close": "关闭",
|
|
443
|
+
"openDocument": "打开配置文件",
|
|
444
|
+
"openDocument.error": "无法打开配置文件",
|
|
445
|
+
"general.nav": "通用设置"
|
|
446
|
+
};
|
|
447
|
+
/** English dictionary, checked complete against the zh key set. */
|
|
448
|
+
const en = {
|
|
449
|
+
"trigger": "Settings",
|
|
450
|
+
"title": "Settings",
|
|
451
|
+
"close": "Close",
|
|
452
|
+
"openDocument": "Open configuration file",
|
|
453
|
+
"openDocument.error": "Could not open configuration file",
|
|
454
|
+
"general.nav": "General"
|
|
455
|
+
};
|
|
456
|
+
//#endregion
|
|
457
|
+
//#region lib/types/client/index.js
|
|
458
|
+
/** Dictionary namespace owned by this plugin (shell chrome + General copy). */
|
|
459
|
+
const NS = "settings";
|
|
460
|
+
/**
|
|
461
|
+
* Required services (cordis fiber inject). The target slots are declared by
|
|
462
|
+
* ui-settings' apply, whose activation order relative to this one is NOT
|
|
463
|
+
* constrained; registrations depend on their slots through `slots.inject()`.
|
|
464
|
+
*/
|
|
465
|
+
const inject = [
|
|
466
|
+
"slots",
|
|
467
|
+
"locale",
|
|
468
|
+
"connection"
|
|
469
|
+
];
|
|
470
|
+
/**
|
|
471
|
+
* Register the `settings` dictionaries, the chrome content, and the General
|
|
472
|
+
* section, each once its slot declaration is on the ledger.
|
|
473
|
+
* @param ctx - client root context.
|
|
474
|
+
*/
|
|
475
|
+
function apply(ctx) {
|
|
476
|
+
ctx.effect(() => ctx.locale.register(NS, {
|
|
477
|
+
zh,
|
|
478
|
+
en
|
|
479
|
+
}), "ui-settings-general: dictionaries");
|
|
480
|
+
const t = ctx.locale.bind(NS);
|
|
481
|
+
const connection = ctx.get("connection");
|
|
482
|
+
const documentController = connection.isLoopback ? new SettingsDocumentStore(connection.api) : void 0;
|
|
483
|
+
const documentInjected = documentController === void 0 ? void 0 : (() => {
|
|
484
|
+
const useSnapshot = (0, _deepseek_ai_dsh_client_web_react.bindSnapshotSelector)(documentController.store);
|
|
485
|
+
return () => ({
|
|
486
|
+
controller: documentController,
|
|
487
|
+
useSnapshot
|
|
488
|
+
});
|
|
489
|
+
})();
|
|
490
|
+
ctx.effect(() => ctx.on("connection/reset", () => {
|
|
491
|
+
refreshDocumentIfLoaded(documentController);
|
|
492
|
+
}), "ui-settings-general: metadata invalidations");
|
|
493
|
+
let rowsVersion = -1;
|
|
494
|
+
let rowsRevision = -1;
|
|
495
|
+
let rows = [];
|
|
496
|
+
let onboardingVersion = -1;
|
|
497
|
+
let onboardingSteps = [];
|
|
498
|
+
const shellInjected = () => ({ hooks: {
|
|
499
|
+
sections: {
|
|
500
|
+
getSnapshot: () => {
|
|
501
|
+
const version = ctx.slots.getVersion("settings.section");
|
|
502
|
+
const revision = ctx.locale.getSnapshot().revision;
|
|
503
|
+
if (version !== rowsVersion || revision !== rowsRevision) {
|
|
504
|
+
rowsVersion = version;
|
|
505
|
+
rowsRevision = revision;
|
|
506
|
+
rows = ctx.slots.entries("settings.section").map((e) => ({
|
|
507
|
+
/* v8 ignore next -- list-slot registration requires id (SlotCore rejects an entry without one) */
|
|
508
|
+
id: e.options.id ?? "",
|
|
509
|
+
order: e.options.order ?? 0,
|
|
510
|
+
label: (0, _deepseek_ai_dsh_client_ui_slots.resolveSlotLabel)(e.options.label) ?? ""
|
|
511
|
+
})).sort((a, b) => a.order - b.order);
|
|
512
|
+
}
|
|
513
|
+
return rows;
|
|
514
|
+
},
|
|
515
|
+
subscribe: (listener) => {
|
|
516
|
+
const offLedger = ctx.slots.subscribe("settings.section", listener);
|
|
517
|
+
const offLocale = ctx.locale.subscribe(listener);
|
|
518
|
+
return () => {
|
|
519
|
+
offLedger();
|
|
520
|
+
offLocale();
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
onboardingSteps: {
|
|
525
|
+
getSnapshot: () => {
|
|
526
|
+
const version = ctx.slots.getVersion("settings.onboarding");
|
|
527
|
+
if (version !== onboardingVersion) {
|
|
528
|
+
onboardingVersion = version;
|
|
529
|
+
onboardingSteps = ctx.slots.entries("settings.onboarding").map((e) => ({
|
|
530
|
+
/* v8 ignore next -- list-slot registration requires id */
|
|
531
|
+
id: e.options.id ?? "",
|
|
532
|
+
order: e.options.order ?? 0
|
|
533
|
+
})).sort((a, b) => a.order - b.order);
|
|
534
|
+
}
|
|
535
|
+
return onboardingSteps;
|
|
536
|
+
},
|
|
537
|
+
subscribe: (listener) => ctx.slots.subscribe("settings.onboarding", listener)
|
|
538
|
+
}
|
|
539
|
+
} });
|
|
540
|
+
ctx.slots.inject("sidebar.settings", () => ctx.slots.register({
|
|
541
|
+
name: "sidebar.settings",
|
|
542
|
+
children: {
|
|
543
|
+
"settings.trigger": {
|
|
544
|
+
kind: "single",
|
|
545
|
+
scope: "root"
|
|
546
|
+
},
|
|
547
|
+
"settings.header": {
|
|
548
|
+
kind: "single",
|
|
549
|
+
scope: "root"
|
|
550
|
+
},
|
|
551
|
+
"settings.action": {
|
|
552
|
+
kind: "list",
|
|
553
|
+
scope: "root"
|
|
554
|
+
},
|
|
555
|
+
"settings.close": {
|
|
556
|
+
kind: "single",
|
|
557
|
+
scope: "root"
|
|
558
|
+
},
|
|
559
|
+
"settings.section": {
|
|
560
|
+
kind: "list",
|
|
561
|
+
scope: "root"
|
|
562
|
+
},
|
|
563
|
+
"settings.onboarding": {
|
|
564
|
+
kind: "list",
|
|
565
|
+
scope: "root"
|
|
566
|
+
}
|
|
567
|
+
},
|
|
568
|
+
inject: shellInjected
|
|
569
|
+
}, SettingsRoot));
|
|
570
|
+
ctx.slots.inject("settings.trigger", () => ctx.slots.register({
|
|
571
|
+
name: "settings.trigger",
|
|
572
|
+
locale: NS
|
|
573
|
+
}, TriggerContent));
|
|
574
|
+
ctx.slots.inject("settings.header", () => ctx.slots.register({
|
|
575
|
+
name: "settings.header",
|
|
576
|
+
locale: NS
|
|
577
|
+
}, HeaderContent));
|
|
578
|
+
if (documentInjected !== void 0) ctx.slots.inject("settings.action", () => ctx.slots.register({
|
|
579
|
+
name: "settings.action",
|
|
580
|
+
id: "open-document",
|
|
581
|
+
order: 0,
|
|
582
|
+
locale: NS,
|
|
583
|
+
inject: documentInjected
|
|
584
|
+
}, SettingsDocumentAction));
|
|
585
|
+
ctx.slots.inject("settings.close", () => ctx.slots.register({
|
|
586
|
+
name: "settings.close",
|
|
587
|
+
locale: NS
|
|
588
|
+
}, CloseLabel));
|
|
589
|
+
ctx.slots.inject("settings.section", () => ctx.slots.register({
|
|
590
|
+
name: "settings.section",
|
|
591
|
+
id: "general",
|
|
592
|
+
order: 0,
|
|
593
|
+
label: () => t("general.nav"),
|
|
594
|
+
locale: NS,
|
|
595
|
+
children: { "settings.general.item": {
|
|
596
|
+
kind: "list",
|
|
597
|
+
scope: "root"
|
|
598
|
+
} }
|
|
599
|
+
}, GeneralSection));
|
|
600
|
+
}
|
|
601
|
+
//#endregion
|
|
602
|
+
exports.SettingsDocumentStore = SettingsDocumentStore;
|
|
603
|
+
exports.apply = apply;
|
|
604
|
+
exports.inject = inject;
|
|
605
|
+
return module.exports;
|
|
606
|
+
}
|
|
607
|
+
});
|
|
608
|
+
|
|
609
|
+
//# sourceMappingURL=client.js.map
|