dsh-bash-terminal-ts 0.9.2 → 0.9.4
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/CHANGELOG.md +9 -0
- package/dist/client.core.js +184 -6
- package/dist/client.js +184 -6
- package/dsh.plugin.json +1 -1
- package/lib/client.js +184 -6
- package/package.json +1 -1
- package/src/client.tsx +2 -0
- package/src/webterminals/browser/star-row-copy.ts +258 -0
- package/agent-presets/standard-win-payload/agent.cordis.yml +0 -271
- package/agent-presets/standard-win-payload/preset.yml +0 -2
- package/lib/payload.d.ts +0 -72
- package/lib/payload.js +0 -279
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.3 (2026-11-26)
|
|
4
|
+
|
|
5
|
+
**设置卡底栏 Star 快车道:★ 直接打开仓库页(不再只静默收起),隐藏独立成 ×。**
|
|
6
|
+
|
|
7
|
+
- 新增 `src/client/star-row-copy.ts`(由 `_tools/star-row/sync.mjs` 从 kit 真源生成,禁手改):GitHub 图标 + owner/repo 链接 | 求星话术 | ★ CTA | × 隐藏。
|
|
8
|
+
- **修 S 档旧缺陷**:点 ★ 此前写成 `starDismiss()`,与「别打扰我」合流,仓库页一次都没打开过。现在 ★ 走锚点 click 打开 `REPO_URL`(不写 dismissed),× 才写 `dsh.star.<ns>.dismissed=1` 并收话术与两钮;链接段永留。
|
|
9
|
+
- 真源 `STAR:EXTENDED` 段单源维护,A/L 档副本由 sync 整段剥除,已发布 A/L 仓零 diff。
|
|
10
|
+
- 文案 10 语按 `documentElement.lang` 前缀自选;样式只走 `--dsw-alias-*` 令牌与 `currentColor`,零硬色。
|
|
11
|
+
|
|
3
12
|
## 0.9.1 (2026-11-19)
|
|
4
13
|
|
|
5
14
|
- i18n: add Portuguese (pt-BR) locale — runtime dictionary, package metadata and README/CHANGELOG mirrors.
|
package/dist/client.core.js
CHANGED
|
@@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// node_modules
|
|
36
|
+
// node_modules/@xterm/addon-fit/lib/addon-fit.js
|
|
37
37
|
var require_addon_fit = __commonJS({
|
|
38
|
-
"node_modules
|
|
38
|
+
"node_modules/@xterm/addon-fit/lib/addon-fit.js"(exports, module2) {
|
|
39
39
|
!(function(e, t) {
|
|
40
40
|
"object" == typeof exports && "object" == typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.FitAddon = t() : e.FitAddon = t();
|
|
41
41
|
})(self, (() => (() => {
|
|
@@ -69,9 +69,9 @@ var require_addon_fit = __commonJS({
|
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
71
|
|
|
72
|
-
// node_modules
|
|
72
|
+
// node_modules/@xterm/xterm/lib/xterm.js
|
|
73
73
|
var require_xterm = __commonJS({
|
|
74
|
-
"node_modules
|
|
74
|
+
"node_modules/@xterm/xterm/lib/xterm.js"(exports, module2) {
|
|
75
75
|
!(function(e, t) {
|
|
76
76
|
if ("object" == typeof exports && "object" == typeof module2) module2.exports = t();
|
|
77
77
|
else if ("function" == typeof define && define.amd) define([], t);
|
|
@@ -7171,7 +7171,7 @@ var import_react2 = require("react");
|
|
|
7171
7171
|
var import_addon_fit = __toESM(require_addon_fit(), 1);
|
|
7172
7172
|
var import_xterm = __toESM(require_xterm(), 1);
|
|
7173
7173
|
|
|
7174
|
-
// node_modules
|
|
7174
|
+
// node_modules/@xterm/xterm/css/xterm.css
|
|
7175
7175
|
var xterm_default = `/**
|
|
7176
7176
|
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
|
7177
7177
|
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
@@ -7737,6 +7737,181 @@ function MultiShellTerminal(props) {
|
|
|
7737
7737
|
] });
|
|
7738
7738
|
}
|
|
7739
7739
|
|
|
7740
|
+
// src/webterminals/browser/star-row-copy.ts
|
|
7741
|
+
var REPO_URL = "https://github.com/drscrewdriver/dsh-bash-terminal-ts";
|
|
7742
|
+
var STAR_NS = "bash-terminal";
|
|
7743
|
+
var STAR_VARIANT = "S";
|
|
7744
|
+
var STAR_COPY = {
|
|
7745
|
+
zh: { ask: "\u89C9\u5F97\u7701\u4E8B\u4E86\uFF1F\u4E00\u9897 Star \u8BA9\u5DE5\u5177\u88AB\u66F4\u591A\u4EBA\u770B\u89C1" },
|
|
7746
|
+
en: { ask: "Finding it handy? A star helps more people discover this tool" },
|
|
7747
|
+
ja: { ask: "\u4FBF\u5229\u3067\u3057\u305F\u3089\u2B50\u3067\u3001\u3053\u306E\u30C4\u30FC\u30EB\u304C\u3082\u3063\u3068\u5C4A\u304D\u307E\u3059" },
|
|
7748
|
+
ko: { ask: "\uC720\uC6A9\uD588\uB2E4\uBA74 \u2B50 \uD558\uB098\uB85C \uB354 \uB9CE\uC740 \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uB2FF\uC2B5\uB2C8\uB2E4" },
|
|
7749
|
+
fr: { ask: "Utile ? Une \xE9toile aide cet outil \xE0 \xEAtre d\xE9couvert" },
|
|
7750
|
+
de: { ask: "N\xFCtzlich? Ein Stern hilft dem Tool, gesehen zu werden" },
|
|
7751
|
+
it: { ask: "Ti \xE8 utile? Una stella aiuta questo tool a farsi scoprire" },
|
|
7752
|
+
ru: { ask: "\u041F\u0440\u0438\u0433\u043E\u0434\u0438\u043B\u043E\u0441\u044C? \u0417\u0432\u0435\u0437\u0434\u0430 \u043F\u043E\u043C\u043E\u0436\u0435\u0442 \u0431\u043E\u043B\u044C\u0448\u0435\u043C\u0443 \u0447\u0438\u0441\u043B\u0443 \u043B\u044E\u0434\u0435\u0439 \u0443\u0437\u043D\u0430\u0442\u044C \u043E tool" },
|
|
7753
|
+
es: { ask: "\xBFTe resulta \xFAtil? Una estrella ayuda a que m\xE1s gente lo descubra" },
|
|
7754
|
+
pt: { ask: "Achou \xFAtil? Uma estrela ajuda mais pessoas a descobrir a ferramenta" }
|
|
7755
|
+
};
|
|
7756
|
+
var STAR_LANGS = ["zh", "en", "ja", "ko", "fr", "de", "it", "ru", "es", "pt"];
|
|
7757
|
+
var GITHUB_MARK_PATH = "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332 -5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12";
|
|
7758
|
+
var STYLE_ID = "dsh-star-row-style";
|
|
7759
|
+
var STYLE_CSS = [
|
|
7760
|
+
".dsh-star-row{display:flex;align-items:center;gap:7px;font-size:12px;",
|
|
7761
|
+
"line-height:1.5;color:inherit;text-decoration:none;opacity:.72;padding:3px 0;",
|
|
7762
|
+
"margin-top:6px;min-width:0;flex-wrap:wrap}",
|
|
7763
|
+
".dsh-star-row:hover{opacity:1;text-decoration:underline}",
|
|
7764
|
+
".dsh-star-row svg{width:14px;height:14px;flex:none;display:block}",
|
|
7765
|
+
".dsh-star-row .dsh-star-ask{opacity:.85;font-weight:400}"
|
|
7766
|
+
].join("");
|
|
7767
|
+
function pickLang() {
|
|
7768
|
+
const tag = typeof document !== "undefined" && document.documentElement.lang || "";
|
|
7769
|
+
const low = tag.toLowerCase();
|
|
7770
|
+
for (const cand of STAR_LANGS) {
|
|
7771
|
+
if (low.startsWith(cand)) return STAR_COPY[cand];
|
|
7772
|
+
}
|
|
7773
|
+
return STAR_COPY.en;
|
|
7774
|
+
}
|
|
7775
|
+
var STAR_VERSION = "0.9.3";
|
|
7776
|
+
var STAR_FOOT_COPY = {
|
|
7777
|
+
zh: { ask: "\u89C9\u5F97\u597D\u7528\uFF1F", star: "\u53BB GitHub \u70B9\u4E2A Star", issue: "\u53CD\u9988\u5EFA\u8BAE / \u63D0 issue" },
|
|
7778
|
+
en: { ask: "Finding it useful?", star: "Star on GitHub", issue: "Feedback / open an issue" },
|
|
7779
|
+
ja: { ask: "\u304A\u5F79\u306B\u7ACB\u3063\u3066\u3044\u307E\u3059\u304B\uFF1F", star: "GitHub \u3067\u30B9\u30BF\u30FC", issue: "\u3054\u610F\u898B\u30FB\u4E0D\u5177\u5408\u5831\u544A" },
|
|
7780
|
+
ko: { ask: "\uC720\uC6A9\uD55C\uAC00\uC694?", star: "GitHub \uC5D0\uC11C \uC2A4\uD0C0", issue: "\uD53C\uB4DC\uBC31 / \uC774\uC288 \uC5F4\uAE30" },
|
|
7781
|
+
fr: { ask: "Utile ?", star: "Une \xE9toile sur GitHub", issue: "Retour / ouvrir un ticket" },
|
|
7782
|
+
de: { ask: "Hilfreich?", star: "Stern auf GitHub", issue: "Feedback / Issue \xF6ffnen" },
|
|
7783
|
+
it: { ask: "Ti \xE8 utile?", star: "Stella su GitHub", issue: "Feedback / apri una issue" },
|
|
7784
|
+
ru: { ask: "\u041F\u043E\u043B\u0435\u0437\u043D\u043E?", star: "\u0417\u0432\u0435\u0437\u0434\u0430 \u043D\u0430 GitHub", issue: "\u041E\u0442\u0437\u044B\u0432 / \u043E\u0442\u043A\u0440\u044B\u0442\u044C issue" },
|
|
7785
|
+
es: { ask: "\xBFTe resulta \xFAtil?", star: "Danos una estrella", issue: "Sugerencias / abrir issue" },
|
|
7786
|
+
pt: { ask: "Achou \xFAtil?", star: "D\xEA uma estrela no GitHub", issue: "Feedback / abrir uma issue" }
|
|
7787
|
+
};
|
|
7788
|
+
var STAR_FOOT_STYLE_ID = "dsh-star-foot-style";
|
|
7789
|
+
var STAR_FOOT_STYLE = [
|
|
7790
|
+
".dsh-star-foot{display:flex;align-items:center;gap:6px;flex-wrap:wrap;",
|
|
7791
|
+
"font-size:12px;line-height:1.6;color:inherit;opacity:.72;margin-top:10px}",
|
|
7792
|
+
".dsh-star-foot:hover{opacity:1}",
|
|
7793
|
+
".dsh-star-foot .dsh-star-ver{opacity:.6;font-variant-numeric:tabular-nums}",
|
|
7794
|
+
".dsh-star-foot .dsh-star-dot{opacity:.4}",
|
|
7795
|
+
".dsh-star-foot a{color:inherit;text-decoration:none}",
|
|
7796
|
+
".dsh-star-foot a:hover{text-decoration:underline}"
|
|
7797
|
+
].join("");
|
|
7798
|
+
function starLang() {
|
|
7799
|
+
const tag = typeof document !== "undefined" && document.documentElement.lang || "";
|
|
7800
|
+
const low = tag.toLowerCase();
|
|
7801
|
+
for (const cand of STAR_LANGS) if (low.startsWith(cand)) return cand;
|
|
7802
|
+
return "en";
|
|
7803
|
+
}
|
|
7804
|
+
var STAR_DISMISS_KEY = "dsh.star." + STAR_NS + ".v2.dismissed";
|
|
7805
|
+
var STAR_DISMISS_KEY_V1 = "dsh.star." + STAR_NS + ".dismissed";
|
|
7806
|
+
function starDismissed() {
|
|
7807
|
+
try {
|
|
7808
|
+
if (localStorage.getItem(STAR_DISMISS_KEY_V1) !== null) {
|
|
7809
|
+
localStorage.removeItem(STAR_DISMISS_KEY_V1);
|
|
7810
|
+
}
|
|
7811
|
+
return localStorage.getItem(STAR_DISMISS_KEY) === "1";
|
|
7812
|
+
} catch {
|
|
7813
|
+
return false;
|
|
7814
|
+
}
|
|
7815
|
+
}
|
|
7816
|
+
function starDismiss() {
|
|
7817
|
+
try {
|
|
7818
|
+
localStorage.setItem(STAR_DISMISS_KEY, "1");
|
|
7819
|
+
} catch {
|
|
7820
|
+
}
|
|
7821
|
+
}
|
|
7822
|
+
function injectFootStyle(d) {
|
|
7823
|
+
if (d.getElementById(STAR_FOOT_STYLE_ID)) return;
|
|
7824
|
+
const style = d.createElement("style");
|
|
7825
|
+
style.id = STAR_FOOT_STYLE_ID;
|
|
7826
|
+
style.textContent = STAR_FOOT_STYLE;
|
|
7827
|
+
d.head.appendChild(style);
|
|
7828
|
+
}
|
|
7829
|
+
function footItem(d, tag, text, href) {
|
|
7830
|
+
const el = d.createElement(tag);
|
|
7831
|
+
el.className = "dsh-star-ask";
|
|
7832
|
+
if (tag === "a" && href) {
|
|
7833
|
+
const a = el;
|
|
7834
|
+
a.href = href;
|
|
7835
|
+
a.target = "_blank";
|
|
7836
|
+
a.rel = "noopener noreferrer";
|
|
7837
|
+
}
|
|
7838
|
+
el.textContent = text;
|
|
7839
|
+
return el;
|
|
7840
|
+
}
|
|
7841
|
+
function footDot(d) {
|
|
7842
|
+
const dot = d.createElement("span");
|
|
7843
|
+
dot.className = "dsh-star-dot";
|
|
7844
|
+
dot.textContent = "\xB7";
|
|
7845
|
+
return dot;
|
|
7846
|
+
}
|
|
7847
|
+
function extendedStarRow(neutral, d) {
|
|
7848
|
+
if (STAR_VARIANT !== "S") return null;
|
|
7849
|
+
if (starDismissed()) return null;
|
|
7850
|
+
injectFootStyle(d);
|
|
7851
|
+
const copy = STAR_FOOT_COPY[starLang()] ?? STAR_FOOT_COPY.en;
|
|
7852
|
+
const issuesUrl = REPO_URL.replace(/\/+$/, "") + "/issues/new";
|
|
7853
|
+
const row = d.createElement("div");
|
|
7854
|
+
row.className = "dsh-star-foot";
|
|
7855
|
+
const ver = d.createElement("span");
|
|
7856
|
+
ver.className = "dsh-star-ver";
|
|
7857
|
+
ver.textContent = "v" + STAR_VERSION;
|
|
7858
|
+
row.appendChild(ver);
|
|
7859
|
+
row.appendChild(footDot(d));
|
|
7860
|
+
row.appendChild(footItem(d, "span", copy.ask));
|
|
7861
|
+
const star = footItem(d, "a", "\u2B50 " + copy.star, REPO_URL);
|
|
7862
|
+
const issue = footItem(d, "a", "\u{1F4AC} " + copy.issue, issuesUrl);
|
|
7863
|
+
row.appendChild(star);
|
|
7864
|
+
row.appendChild(footDot(d));
|
|
7865
|
+
row.appendChild(issue);
|
|
7866
|
+
const collapse = () => {
|
|
7867
|
+
starDismiss();
|
|
7868
|
+
if (row.parentNode) {
|
|
7869
|
+
neutral.className = "dsh-star-row";
|
|
7870
|
+
row.parentNode.replaceChild(neutral, row);
|
|
7871
|
+
}
|
|
7872
|
+
};
|
|
7873
|
+
star.addEventListener("click", collapse);
|
|
7874
|
+
issue.addEventListener("click", collapse);
|
|
7875
|
+
return row;
|
|
7876
|
+
}
|
|
7877
|
+
function mountStarRow(doc) {
|
|
7878
|
+
const d = doc ?? document;
|
|
7879
|
+
if (!d.getElementById(STYLE_ID)) {
|
|
7880
|
+
const tag = d.createElement("style");
|
|
7881
|
+
tag.id = STYLE_ID;
|
|
7882
|
+
tag.textContent = STYLE_CSS;
|
|
7883
|
+
d.head.appendChild(tag);
|
|
7884
|
+
}
|
|
7885
|
+
const match = REPO_URL.match(/github\.com\/([^/]+\/[^/#?]+)/);
|
|
7886
|
+
const repo = match ? match[1] : "drscrewdriver";
|
|
7887
|
+
const a = d.createElement("a");
|
|
7888
|
+
a.className = "dsh-star-row";
|
|
7889
|
+
a.href = REPO_URL;
|
|
7890
|
+
a.target = "_blank";
|
|
7891
|
+
a.rel = "noreferrer";
|
|
7892
|
+
a.dataset.starNs = STAR_NS;
|
|
7893
|
+
const svg = d.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
7894
|
+
svg.setAttribute("viewBox", "0 0 24 24");
|
|
7895
|
+
svg.setAttribute("aria-hidden", "true");
|
|
7896
|
+
const path = d.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
7897
|
+
path.setAttribute("fill", "currentColor");
|
|
7898
|
+
path.setAttribute("d", GITHUB_MARK_PATH);
|
|
7899
|
+
svg.appendChild(path);
|
|
7900
|
+
a.appendChild(svg);
|
|
7901
|
+
const label = d.createElement("span");
|
|
7902
|
+
label.textContent = repo;
|
|
7903
|
+
a.appendChild(label);
|
|
7904
|
+
const row = extendedStarRow(a, d);
|
|
7905
|
+
if (row) return row;
|
|
7906
|
+
if (STAR_VARIANT === "A") {
|
|
7907
|
+
const ask = d.createElement("span");
|
|
7908
|
+
ask.className = "dsh-star-ask";
|
|
7909
|
+
ask.textContent = pickLang().ask;
|
|
7910
|
+
a.appendChild(ask);
|
|
7911
|
+
}
|
|
7912
|
+
return a;
|
|
7913
|
+
}
|
|
7914
|
+
|
|
7740
7915
|
// src/client.tsx
|
|
7741
7916
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
7742
7917
|
var SETTINGS_NS = "settings.bash-terminal";
|
|
@@ -7990,7 +8165,10 @@ function ShellDockSection() {
|
|
|
7990
8165
|
function SettingsBody() {
|
|
7991
8166
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
7992
8167
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ShellPreferenceRow, {}),
|
|
7993
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ShellDockSection, {})
|
|
8168
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ShellDockSection, {}),
|
|
8169
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { ref: (node) => {
|
|
8170
|
+
if (node && !node.firstChild) node.appendChild(mountStarRow());
|
|
8171
|
+
} })
|
|
7994
8172
|
] });
|
|
7995
8173
|
}
|
|
7996
8174
|
var hostSettingsSurface = "unknown";
|
package/dist/client.js
CHANGED
|
@@ -38,9 +38,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
38
38
|
));
|
|
39
39
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
40
40
|
|
|
41
|
-
// node_modules
|
|
41
|
+
// node_modules/@xterm/addon-fit/lib/addon-fit.js
|
|
42
42
|
var require_addon_fit = __commonJS({
|
|
43
|
-
"node_modules
|
|
43
|
+
"node_modules/@xterm/addon-fit/lib/addon-fit.js"(exports, module2) {
|
|
44
44
|
!(function(e, t) {
|
|
45
45
|
"object" == typeof exports && "object" == typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.FitAddon = t() : e.FitAddon = t();
|
|
46
46
|
})(self, (() => (() => {
|
|
@@ -74,9 +74,9 @@ var require_addon_fit = __commonJS({
|
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
76
|
|
|
77
|
-
// node_modules
|
|
77
|
+
// node_modules/@xterm/xterm/lib/xterm.js
|
|
78
78
|
var require_xterm = __commonJS({
|
|
79
|
-
"node_modules
|
|
79
|
+
"node_modules/@xterm/xterm/lib/xterm.js"(exports, module2) {
|
|
80
80
|
!(function(e, t) {
|
|
81
81
|
if ("object" == typeof exports && "object" == typeof module2) module2.exports = t();
|
|
82
82
|
else if ("function" == typeof define && define.amd) define([], t);
|
|
@@ -7176,7 +7176,7 @@ var import_react2 = require("react");
|
|
|
7176
7176
|
var import_addon_fit = __toESM(require_addon_fit(), 1);
|
|
7177
7177
|
var import_xterm = __toESM(require_xterm(), 1);
|
|
7178
7178
|
|
|
7179
|
-
// node_modules
|
|
7179
|
+
// node_modules/@xterm/xterm/css/xterm.css
|
|
7180
7180
|
var xterm_default = `/**
|
|
7181
7181
|
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
|
7182
7182
|
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
@@ -7742,6 +7742,181 @@ function MultiShellTerminal(props) {
|
|
|
7742
7742
|
] });
|
|
7743
7743
|
}
|
|
7744
7744
|
|
|
7745
|
+
// src/webterminals/browser/star-row-copy.ts
|
|
7746
|
+
var REPO_URL = "https://github.com/drscrewdriver/dsh-bash-terminal-ts";
|
|
7747
|
+
var STAR_NS = "bash-terminal";
|
|
7748
|
+
var STAR_VARIANT = "S";
|
|
7749
|
+
var STAR_COPY = {
|
|
7750
|
+
zh: { ask: "\u89C9\u5F97\u7701\u4E8B\u4E86\uFF1F\u4E00\u9897 Star \u8BA9\u5DE5\u5177\u88AB\u66F4\u591A\u4EBA\u770B\u89C1" },
|
|
7751
|
+
en: { ask: "Finding it handy? A star helps more people discover this tool" },
|
|
7752
|
+
ja: { ask: "\u4FBF\u5229\u3067\u3057\u305F\u3089\u2B50\u3067\u3001\u3053\u306E\u30C4\u30FC\u30EB\u304C\u3082\u3063\u3068\u5C4A\u304D\u307E\u3059" },
|
|
7753
|
+
ko: { ask: "\uC720\uC6A9\uD588\uB2E4\uBA74 \u2B50 \uD558\uB098\uB85C \uB354 \uB9CE\uC740 \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uB2FF\uC2B5\uB2C8\uB2E4" },
|
|
7754
|
+
fr: { ask: "Utile ? Une \xE9toile aide cet outil \xE0 \xEAtre d\xE9couvert" },
|
|
7755
|
+
de: { ask: "N\xFCtzlich? Ein Stern hilft dem Tool, gesehen zu werden" },
|
|
7756
|
+
it: { ask: "Ti \xE8 utile? Una stella aiuta questo tool a farsi scoprire" },
|
|
7757
|
+
ru: { ask: "\u041F\u0440\u0438\u0433\u043E\u0434\u0438\u043B\u043E\u0441\u044C? \u0417\u0432\u0435\u0437\u0434\u0430 \u043F\u043E\u043C\u043E\u0436\u0435\u0442 \u0431\u043E\u043B\u044C\u0448\u0435\u043C\u0443 \u0447\u0438\u0441\u043B\u0443 \u043B\u044E\u0434\u0435\u0439 \u0443\u0437\u043D\u0430\u0442\u044C \u043E tool" },
|
|
7758
|
+
es: { ask: "\xBFTe resulta \xFAtil? Una estrella ayuda a que m\xE1s gente lo descubra" },
|
|
7759
|
+
pt: { ask: "Achou \xFAtil? Uma estrela ajuda mais pessoas a descobrir a ferramenta" }
|
|
7760
|
+
};
|
|
7761
|
+
var STAR_LANGS = ["zh", "en", "ja", "ko", "fr", "de", "it", "ru", "es", "pt"];
|
|
7762
|
+
var GITHUB_MARK_PATH = "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332 -5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12";
|
|
7763
|
+
var STYLE_ID = "dsh-star-row-style";
|
|
7764
|
+
var STYLE_CSS = [
|
|
7765
|
+
".dsh-star-row{display:flex;align-items:center;gap:7px;font-size:12px;",
|
|
7766
|
+
"line-height:1.5;color:inherit;text-decoration:none;opacity:.72;padding:3px 0;",
|
|
7767
|
+
"margin-top:6px;min-width:0;flex-wrap:wrap}",
|
|
7768
|
+
".dsh-star-row:hover{opacity:1;text-decoration:underline}",
|
|
7769
|
+
".dsh-star-row svg{width:14px;height:14px;flex:none;display:block}",
|
|
7770
|
+
".dsh-star-row .dsh-star-ask{opacity:.85;font-weight:400}"
|
|
7771
|
+
].join("");
|
|
7772
|
+
function pickLang() {
|
|
7773
|
+
const tag = typeof document !== "undefined" && document.documentElement.lang || "";
|
|
7774
|
+
const low = tag.toLowerCase();
|
|
7775
|
+
for (const cand of STAR_LANGS) {
|
|
7776
|
+
if (low.startsWith(cand)) return STAR_COPY[cand];
|
|
7777
|
+
}
|
|
7778
|
+
return STAR_COPY.en;
|
|
7779
|
+
}
|
|
7780
|
+
var STAR_VERSION = "0.9.3";
|
|
7781
|
+
var STAR_FOOT_COPY = {
|
|
7782
|
+
zh: { ask: "\u89C9\u5F97\u597D\u7528\uFF1F", star: "\u53BB GitHub \u70B9\u4E2A Star", issue: "\u53CD\u9988\u5EFA\u8BAE / \u63D0 issue" },
|
|
7783
|
+
en: { ask: "Finding it useful?", star: "Star on GitHub", issue: "Feedback / open an issue" },
|
|
7784
|
+
ja: { ask: "\u304A\u5F79\u306B\u7ACB\u3063\u3066\u3044\u307E\u3059\u304B\uFF1F", star: "GitHub \u3067\u30B9\u30BF\u30FC", issue: "\u3054\u610F\u898B\u30FB\u4E0D\u5177\u5408\u5831\u544A" },
|
|
7785
|
+
ko: { ask: "\uC720\uC6A9\uD55C\uAC00\uC694?", star: "GitHub \uC5D0\uC11C \uC2A4\uD0C0", issue: "\uD53C\uB4DC\uBC31 / \uC774\uC288 \uC5F4\uAE30" },
|
|
7786
|
+
fr: { ask: "Utile ?", star: "Une \xE9toile sur GitHub", issue: "Retour / ouvrir un ticket" },
|
|
7787
|
+
de: { ask: "Hilfreich?", star: "Stern auf GitHub", issue: "Feedback / Issue \xF6ffnen" },
|
|
7788
|
+
it: { ask: "Ti \xE8 utile?", star: "Stella su GitHub", issue: "Feedback / apri una issue" },
|
|
7789
|
+
ru: { ask: "\u041F\u043E\u043B\u0435\u0437\u043D\u043E?", star: "\u0417\u0432\u0435\u0437\u0434\u0430 \u043D\u0430 GitHub", issue: "\u041E\u0442\u0437\u044B\u0432 / \u043E\u0442\u043A\u0440\u044B\u0442\u044C issue" },
|
|
7790
|
+
es: { ask: "\xBFTe resulta \xFAtil?", star: "Danos una estrella", issue: "Sugerencias / abrir issue" },
|
|
7791
|
+
pt: { ask: "Achou \xFAtil?", star: "D\xEA uma estrela no GitHub", issue: "Feedback / abrir uma issue" }
|
|
7792
|
+
};
|
|
7793
|
+
var STAR_FOOT_STYLE_ID = "dsh-star-foot-style";
|
|
7794
|
+
var STAR_FOOT_STYLE = [
|
|
7795
|
+
".dsh-star-foot{display:flex;align-items:center;gap:6px;flex-wrap:wrap;",
|
|
7796
|
+
"font-size:12px;line-height:1.6;color:inherit;opacity:.72;margin-top:10px}",
|
|
7797
|
+
".dsh-star-foot:hover{opacity:1}",
|
|
7798
|
+
".dsh-star-foot .dsh-star-ver{opacity:.6;font-variant-numeric:tabular-nums}",
|
|
7799
|
+
".dsh-star-foot .dsh-star-dot{opacity:.4}",
|
|
7800
|
+
".dsh-star-foot a{color:inherit;text-decoration:none}",
|
|
7801
|
+
".dsh-star-foot a:hover{text-decoration:underline}"
|
|
7802
|
+
].join("");
|
|
7803
|
+
function starLang() {
|
|
7804
|
+
const tag = typeof document !== "undefined" && document.documentElement.lang || "";
|
|
7805
|
+
const low = tag.toLowerCase();
|
|
7806
|
+
for (const cand of STAR_LANGS) if (low.startsWith(cand)) return cand;
|
|
7807
|
+
return "en";
|
|
7808
|
+
}
|
|
7809
|
+
var STAR_DISMISS_KEY = "dsh.star." + STAR_NS + ".v2.dismissed";
|
|
7810
|
+
var STAR_DISMISS_KEY_V1 = "dsh.star." + STAR_NS + ".dismissed";
|
|
7811
|
+
function starDismissed() {
|
|
7812
|
+
try {
|
|
7813
|
+
if (localStorage.getItem(STAR_DISMISS_KEY_V1) !== null) {
|
|
7814
|
+
localStorage.removeItem(STAR_DISMISS_KEY_V1);
|
|
7815
|
+
}
|
|
7816
|
+
return localStorage.getItem(STAR_DISMISS_KEY) === "1";
|
|
7817
|
+
} catch {
|
|
7818
|
+
return false;
|
|
7819
|
+
}
|
|
7820
|
+
}
|
|
7821
|
+
function starDismiss() {
|
|
7822
|
+
try {
|
|
7823
|
+
localStorage.setItem(STAR_DISMISS_KEY, "1");
|
|
7824
|
+
} catch {
|
|
7825
|
+
}
|
|
7826
|
+
}
|
|
7827
|
+
function injectFootStyle(d) {
|
|
7828
|
+
if (d.getElementById(STAR_FOOT_STYLE_ID)) return;
|
|
7829
|
+
const style = d.createElement("style");
|
|
7830
|
+
style.id = STAR_FOOT_STYLE_ID;
|
|
7831
|
+
style.textContent = STAR_FOOT_STYLE;
|
|
7832
|
+
d.head.appendChild(style);
|
|
7833
|
+
}
|
|
7834
|
+
function footItem(d, tag, text, href) {
|
|
7835
|
+
const el = d.createElement(tag);
|
|
7836
|
+
el.className = "dsh-star-ask";
|
|
7837
|
+
if (tag === "a" && href) {
|
|
7838
|
+
const a = el;
|
|
7839
|
+
a.href = href;
|
|
7840
|
+
a.target = "_blank";
|
|
7841
|
+
a.rel = "noopener noreferrer";
|
|
7842
|
+
}
|
|
7843
|
+
el.textContent = text;
|
|
7844
|
+
return el;
|
|
7845
|
+
}
|
|
7846
|
+
function footDot(d) {
|
|
7847
|
+
const dot = d.createElement("span");
|
|
7848
|
+
dot.className = "dsh-star-dot";
|
|
7849
|
+
dot.textContent = "\xB7";
|
|
7850
|
+
return dot;
|
|
7851
|
+
}
|
|
7852
|
+
function extendedStarRow(neutral, d) {
|
|
7853
|
+
if (STAR_VARIANT !== "S") return null;
|
|
7854
|
+
if (starDismissed()) return null;
|
|
7855
|
+
injectFootStyle(d);
|
|
7856
|
+
const copy = STAR_FOOT_COPY[starLang()] ?? STAR_FOOT_COPY.en;
|
|
7857
|
+
const issuesUrl = REPO_URL.replace(/\/+$/, "") + "/issues/new";
|
|
7858
|
+
const row = d.createElement("div");
|
|
7859
|
+
row.className = "dsh-star-foot";
|
|
7860
|
+
const ver = d.createElement("span");
|
|
7861
|
+
ver.className = "dsh-star-ver";
|
|
7862
|
+
ver.textContent = "v" + STAR_VERSION;
|
|
7863
|
+
row.appendChild(ver);
|
|
7864
|
+
row.appendChild(footDot(d));
|
|
7865
|
+
row.appendChild(footItem(d, "span", copy.ask));
|
|
7866
|
+
const star = footItem(d, "a", "\u2B50 " + copy.star, REPO_URL);
|
|
7867
|
+
const issue = footItem(d, "a", "\u{1F4AC} " + copy.issue, issuesUrl);
|
|
7868
|
+
row.appendChild(star);
|
|
7869
|
+
row.appendChild(footDot(d));
|
|
7870
|
+
row.appendChild(issue);
|
|
7871
|
+
const collapse = () => {
|
|
7872
|
+
starDismiss();
|
|
7873
|
+
if (row.parentNode) {
|
|
7874
|
+
neutral.className = "dsh-star-row";
|
|
7875
|
+
row.parentNode.replaceChild(neutral, row);
|
|
7876
|
+
}
|
|
7877
|
+
};
|
|
7878
|
+
star.addEventListener("click", collapse);
|
|
7879
|
+
issue.addEventListener("click", collapse);
|
|
7880
|
+
return row;
|
|
7881
|
+
}
|
|
7882
|
+
function mountStarRow(doc) {
|
|
7883
|
+
const d = doc ?? document;
|
|
7884
|
+
if (!d.getElementById(STYLE_ID)) {
|
|
7885
|
+
const tag = d.createElement("style");
|
|
7886
|
+
tag.id = STYLE_ID;
|
|
7887
|
+
tag.textContent = STYLE_CSS;
|
|
7888
|
+
d.head.appendChild(tag);
|
|
7889
|
+
}
|
|
7890
|
+
const match = REPO_URL.match(/github\.com\/([^/]+\/[^/#?]+)/);
|
|
7891
|
+
const repo = match ? match[1] : "drscrewdriver";
|
|
7892
|
+
const a = d.createElement("a");
|
|
7893
|
+
a.className = "dsh-star-row";
|
|
7894
|
+
a.href = REPO_URL;
|
|
7895
|
+
a.target = "_blank";
|
|
7896
|
+
a.rel = "noreferrer";
|
|
7897
|
+
a.dataset.starNs = STAR_NS;
|
|
7898
|
+
const svg = d.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
7899
|
+
svg.setAttribute("viewBox", "0 0 24 24");
|
|
7900
|
+
svg.setAttribute("aria-hidden", "true");
|
|
7901
|
+
const path = d.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
7902
|
+
path.setAttribute("fill", "currentColor");
|
|
7903
|
+
path.setAttribute("d", GITHUB_MARK_PATH);
|
|
7904
|
+
svg.appendChild(path);
|
|
7905
|
+
a.appendChild(svg);
|
|
7906
|
+
const label = d.createElement("span");
|
|
7907
|
+
label.textContent = repo;
|
|
7908
|
+
a.appendChild(label);
|
|
7909
|
+
const row = extendedStarRow(a, d);
|
|
7910
|
+
if (row) return row;
|
|
7911
|
+
if (STAR_VARIANT === "A") {
|
|
7912
|
+
const ask = d.createElement("span");
|
|
7913
|
+
ask.className = "dsh-star-ask";
|
|
7914
|
+
ask.textContent = pickLang().ask;
|
|
7915
|
+
a.appendChild(ask);
|
|
7916
|
+
}
|
|
7917
|
+
return a;
|
|
7918
|
+
}
|
|
7919
|
+
|
|
7745
7920
|
// src/client.tsx
|
|
7746
7921
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
7747
7922
|
var SETTINGS_NS = "settings.bash-terminal";
|
|
@@ -7995,7 +8170,10 @@ function ShellDockSection() {
|
|
|
7995
8170
|
function SettingsBody() {
|
|
7996
8171
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
7997
8172
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ShellPreferenceRow, {}),
|
|
7998
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ShellDockSection, {})
|
|
8173
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ShellDockSection, {}),
|
|
8174
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { ref: (node) => {
|
|
8175
|
+
if (node && !node.firstChild) node.appendChild(mountStarRow());
|
|
8176
|
+
} })
|
|
7999
8177
|
] });
|
|
8000
8178
|
}
|
|
8001
8179
|
var hostSettingsSurface = "unknown";
|
package/dsh.plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-bash-terminal-ts",
|
|
3
3
|
"name": "dsh-bash-terminal-ts",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.4",
|
|
5
5
|
"description": {
|
|
6
6
|
"en": "One shell tool that runs commands through PowerShell, Git Bash, MSYS2, WSL or Niubash on Windows, plus an embedded terminal for the bottom dock with per-shell activation switches and a default-shell fallback chain.",
|
|
7
7
|
"zh": "一个 shell 工具,可在 Windows 上通过 PowerShell / Git Bash / MSYS2 / WSL / Niubash 执行命令;另提供底部工作台的内嵌终端,支持按 shell 激活开关与默认 shell 回落链。",
|