@lemoncat7/dsh-ssh 1.16.20 → 1.16.22
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/README.md +3 -3
- package/docs/compatibility-0.2.2-rc.2.md +18 -0
- package/docs/releases/1.16.21.md +5 -0
- package/docs/releases/1.16.22.md +7 -0
- package/lib/client.js +119 -119
- package/lib/client.js.map +4 -4
- package/lib/sidebar-anchor.d.ts +7 -7
- package/lib/sidebar-anchor.d.ts.map +1 -1
- package/lib/sidebar-anchor.js +44 -37
- package/lib/sidebar-anchor.js.map +1 -1
- package/package.json +11 -5
package/lib/sidebar-anchor.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/** Keep the official slot's React node in place. Only our private portal host moves. */
|
|
3
|
+
export declare function WorkspaceTopAnchor({ children, id, order }: {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
id: string;
|
|
6
|
+
order: number;
|
|
7
|
+
}): JSX.Element;
|
|
8
8
|
//# sourceMappingURL=sidebar-anchor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-anchor.d.ts","sourceRoot":"","sources":["../src/sidebar-anchor.
|
|
1
|
+
{"version":3,"file":"sidebar-anchor.d.ts","sourceRoot":"","sources":["../src/sidebar-anchor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAGzE,wFAAwF;AACxF,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,GAAG,CAAC,OAAO,CAmD3H"}
|
package/lib/sidebar-anchor.js
CHANGED
|
@@ -1,50 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
if (element === null || element === undefined || originalParent === null || originalParent === undefined)
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useLayoutEffect, useRef, useState } from 'react';
|
|
3
|
+
import { createPortal } from 'react-dom';
|
|
4
|
+
/** Keep the official slot's React node in place. Only our private portal host moves. */
|
|
5
|
+
export function WorkspaceTopAnchor({ children, id, order }) {
|
|
6
|
+
const placeholder = useRef(null);
|
|
7
|
+
const [target, setTarget] = useState(null);
|
|
8
|
+
useLayoutEffect(() => {
|
|
9
|
+
const marker = placeholder.current;
|
|
10
|
+
if (marker === null)
|
|
12
11
|
return;
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
const anchor = document.createElement('div');
|
|
13
|
+
anchor.dataset.dshWorkspaceAnchor = id;
|
|
14
|
+
anchor.dataset.dshWorkspaceOrder = String(order);
|
|
15
|
+
anchor.style.display = 'contents';
|
|
16
16
|
const place = () => {
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
let
|
|
17
|
+
// A temporarily detached sidebar must not attach an entry elsewhere.
|
|
18
|
+
if (!marker.isConnected)
|
|
19
|
+
return;
|
|
20
|
+
let parent = marker;
|
|
21
|
+
let ancestor = marker.parentElement;
|
|
21
22
|
while (ancestor !== null && ancestor !== document.body) {
|
|
22
23
|
const candidate = ancestor.previousElementSibling;
|
|
23
24
|
if (candidate instanceof HTMLElement) {
|
|
24
25
|
const style = getComputedStyle(candidate);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
element.dataset.dshSshAnchored = 'true';
|
|
29
|
-
moved = true;
|
|
30
|
-
return true;
|
|
26
|
+
if (style.display === 'flex' && style.flexDirection === 'column' && Number.parseFloat(style.flexGrow) > 0) {
|
|
27
|
+
parent = candidate;
|
|
28
|
+
break;
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
31
|
ancestor = ancestor.parentElement;
|
|
34
32
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
// Preserve both plugin order and the native Workspace subtree. A new
|
|
34
|
+
// instance never adopts/removes an old instance's private portal host.
|
|
35
|
+
const siblings = Array.from(parent.children);
|
|
36
|
+
const before = parent === marker ? null : siblings.find(child => child !== anchor && (!(child instanceof HTMLElement) || child.dataset.dshWorkspaceAnchor === undefined || Number(child.dataset.dshWorkspaceOrder) > order)) ?? null;
|
|
37
|
+
if (anchor.parentElement === parent) {
|
|
38
|
+
if (anchor.nextSibling === before)
|
|
39
|
+
return;
|
|
40
|
+
const current = siblings.indexOf(anchor);
|
|
41
|
+
const next = before === null ? siblings.length : siblings.indexOf(before);
|
|
42
|
+
// Overlapping old/new instances with equal order retain their DOM
|
|
43
|
+
// order instead of repeatedly moving past each other.
|
|
44
|
+
if (current >= 0 && current < next && siblings.slice(current + 1, next).every(child => child instanceof HTMLElement && child.dataset.dshWorkspaceAnchor !== undefined && Number(child.dataset.dshWorkspaceOrder) === order))
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
parent.insertBefore(anchor, before);
|
|
47
48
|
};
|
|
48
|
-
|
|
49
|
+
place();
|
|
50
|
+
setTarget(anchor);
|
|
51
|
+
const observer = new MutationObserver(place);
|
|
52
|
+
observer.observe(marker.closest('[data-slot="sidebar"]') ?? document.body, { childList: true, subtree: true });
|
|
53
|
+
return () => { observer.disconnect(); anchor.remove(); };
|
|
54
|
+
}, [id, order]);
|
|
55
|
+
return _jsx("span", { ref: placeholder, style: { display: 'contents' }, children: target === null ? null : createPortal(children, target) });
|
|
49
56
|
}
|
|
50
57
|
//# sourceMappingURL=sidebar-anchor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-anchor.js","sourceRoot":"","sources":["../src/sidebar-anchor.
|
|
1
|
+
{"version":3,"file":"sidebar-anchor.js","sourceRoot":"","sources":["../src/sidebar-anchor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,wFAAwF;AACxF,MAAM,UAAU,kBAAkB,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAsD;IAC5G,MAAM,WAAW,GAAG,MAAM,CAAkB,IAAI,CAAC,CAAA;IACjD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAqB,IAAI,CAAC,CAAA;IAC9D,eAAe,CAAC,GAAG,EAAE;QACnB,MAAM,MAAM,GAAG,WAAW,CAAC,OAAO,CAAA;QAClC,IAAI,MAAM,KAAK,IAAI;YAAE,OAAM;QAC3B,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;QAC5C,MAAM,CAAC,OAAO,CAAC,kBAAkB,GAAG,EAAE,CAAA;QACtC,MAAM,CAAC,OAAO,CAAC,iBAAiB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;QAChD,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,UAAU,CAAA;QACjC,MAAM,KAAK,GAAG,GAAS,EAAE;YACvB,qEAAqE;YACrE,IAAI,CAAC,MAAM,CAAC,WAAW;gBAAE,OAAM;YAC/B,IAAI,MAAM,GAAgB,MAAM,CAAA;YAChC,IAAI,QAAQ,GAAuB,MAAM,CAAC,aAAa,CAAA;YACvD,OAAO,QAAQ,KAAK,IAAI,IAAI,QAAQ,KA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ssh",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.22",
|
|
4
4
|
"description": "Secure SSH, FTP/FTPS/SFTP file transfer, browser terminals, proxies, port forwarding, and session-scoped AI access for DeepSeek Harness",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
@@ -47,7 +47,10 @@
|
|
|
47
47
|
"docs/releases/1.10.4.md",
|
|
48
48
|
"docs/dsh-021-compatibility.md",
|
|
49
49
|
"docs/releases/1.11.4.md",
|
|
50
|
-
"docs/compatibility-0.2.2-rc.1.md"
|
|
50
|
+
"docs/compatibility-0.2.2-rc.1.md",
|
|
51
|
+
"docs/compatibility-0.2.2-rc.2.md",
|
|
52
|
+
"docs/releases/1.16.21.md",
|
|
53
|
+
"docs/releases/1.16.22.md"
|
|
51
54
|
],
|
|
52
55
|
"dsh": {
|
|
53
56
|
"bundle": {
|
|
@@ -70,14 +73,15 @@
|
|
|
70
73
|
},
|
|
71
74
|
"engines": {
|
|
72
75
|
"node": ">=24.9.0",
|
|
73
|
-
"dsh": "=0.2.2-rc.1"
|
|
76
|
+
"dsh": "=0.2.2-rc.1 || =0.2.2-rc.2"
|
|
74
77
|
},
|
|
75
78
|
"scripts": {
|
|
76
79
|
"clean": "node -e \"require('node:fs').rmSync('lib', { recursive: true, force: true })\"",
|
|
77
80
|
"build": "tsc -p tsconfig.json && node scripts/build-client.mjs",
|
|
78
81
|
"prepare": "npm run clean && npm run build",
|
|
79
82
|
"test": "npm run build && node --test test/*.test.mjs",
|
|
80
|
-
"pack:check": "npm pack --dry-run"
|
|
83
|
+
"pack:check": "npm pack --dry-run",
|
|
84
|
+
"test:sidebar-browser": "node test/sidebar-anchor.browser.mjs"
|
|
81
85
|
},
|
|
82
86
|
"dependencies": {
|
|
83
87
|
"@deepseek-ai/schemastery": "~3.19.0",
|
|
@@ -139,7 +143,9 @@
|
|
|
139
143
|
"@deepseek-ai/dsh-sandbox-policy": "0.2.2-rc.1",
|
|
140
144
|
"@deepseek-ai/dsh-ptc-runtime": "0.2.2-rc.1",
|
|
141
145
|
"@hugeicons/core-free-icons": "^4.3.5",
|
|
142
|
-
"@hugeicons/react": "^1.1.10"
|
|
146
|
+
"@hugeicons/react": "^1.1.10",
|
|
147
|
+
"@types/react-dom": "18.3.7",
|
|
148
|
+
"react-dom": "18.3.1"
|
|
143
149
|
},
|
|
144
150
|
"publishConfig": {
|
|
145
151
|
"access": "public"
|