@lukstei/dsh-client-split-view 0.0.0-stage → 0.2.2-rc.5.11
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.md +137 -2
- package/cordis.patch.yml +3 -0
- package/dist/client.js +2457 -0
- package/dist/index.js +4 -0
- package/package.json +114 -3
- package/src/client/SplitLayout.tsx +48 -0
- package/src/client/SplitPane.tsx +1076 -0
- package/src/client/SplitPaneHeader.tsx +79 -0
- package/src/client/contract.ts +113 -0
- package/src/client/css.d.ts +5 -0
- package/src/client/dsh.d.ts +18 -0
- package/src/client/file-preview.ts +67 -0
- package/src/client/index.tsx +267 -0
- package/src/client/split-store.ts +759 -0
- package/src/client/styles.ts +780 -0
- package/src/index.ts +8 -0
package/dist/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,117 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lukstei/dsh-client-split-view",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.2-rc.5.11",
|
|
4
|
+
"description": "Concurrent multi-session split view and overlay layout plugin for DeepSeek Harness",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./src/index.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./src/index.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./client": "./dist/client.js",
|
|
14
|
+
"./package.json": "./package.json",
|
|
15
|
+
"./client-contract": {
|
|
16
|
+
"types": "./src/client/contract.ts"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"src",
|
|
21
|
+
"dist",
|
|
22
|
+
"README.md",
|
|
23
|
+
"cordis.patch.yml",
|
|
24
|
+
"!src/**/*.spec.*",
|
|
25
|
+
"!src/**/*.test.*",
|
|
26
|
+
"!src/**/*.stories.*",
|
|
27
|
+
"!src/**/stories",
|
|
28
|
+
"!src/**/*.e2e.*",
|
|
29
|
+
"!src/**/__snapshots__",
|
|
30
|
+
"!src/**/fixtures"
|
|
31
|
+
],
|
|
32
|
+
"dsh": {
|
|
33
|
+
"bundle": {
|
|
34
|
+
"patch": "./cordis.patch.yml"
|
|
35
|
+
},
|
|
36
|
+
"client": {
|
|
37
|
+
"platform": "web",
|
|
38
|
+
"immediately": true,
|
|
39
|
+
"inject": [
|
|
40
|
+
"@deepseek-ai/dsh-api-gateway",
|
|
41
|
+
"@deepseek-ai/dsh-api-session-controller",
|
|
42
|
+
"@deepseek-ai/dsh-api-workspace-files",
|
|
43
|
+
"@deepseek-ai/dsh-client-ui-slots",
|
|
44
|
+
"@deepseek-ai/dsh-client-ui-workspace",
|
|
45
|
+
"@deepseek-ai/dsh-client-ui-layout",
|
|
46
|
+
"@deepseek-ai/dsh-client-ui-session",
|
|
47
|
+
"@deepseek-ai/dsh-client-ui-sidebar-right",
|
|
48
|
+
"@deepseek-ai/dsh-client-ui-conversation"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@deepseek-ai/cordis": "4.1.0",
|
|
54
|
+
"@deepseek-ai/dsh-api-gateway": "0.2.2-rc.5",
|
|
55
|
+
"@deepseek-ai/dsh-api-session-controller": "0.2.2-rc.5",
|
|
56
|
+
"@deepseek-ai/dsh-api-workspace-controller": "0.2.2-rc.5",
|
|
57
|
+
"@deepseek-ai/dsh-api-workspace-files": "0.2.2-rc.5",
|
|
58
|
+
"@deepseek-ai/dsh-client-store": "0.2.2-rc.5",
|
|
59
|
+
"@deepseek-ai/dsh-client-ui-chat": "0.2.2-rc.5",
|
|
60
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.2.2-rc.5",
|
|
61
|
+
"@deepseek-ai/dsh-client-ui-layout": "0.2.2-rc.5",
|
|
62
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.2.2-rc.5",
|
|
63
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.5",
|
|
64
|
+
"@deepseek-ai/dsh-client-ui-session": "0.2.2-rc.5",
|
|
65
|
+
"@deepseek-ai/dsh-client-ui-sidebar": "0.2.2-rc.5",
|
|
66
|
+
"@deepseek-ai/dsh-client-ui-sidebar-right": "0.2.2-rc.5",
|
|
67
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.5",
|
|
68
|
+
"@deepseek-ai/dsh-client-ui-workspace": "0.2.2-rc.5",
|
|
69
|
+
"@deepseek-ai/dsh-session": "0.2.2-rc.5",
|
|
70
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.2-rc.5",
|
|
71
|
+
"@deepseek-ai/dsh-util-workspace-path": "0.2.2-rc.5",
|
|
72
|
+
"@types/node": "^26.0.0",
|
|
73
|
+
"@types/react": "^19.3.0",
|
|
74
|
+
"@types/react-dom": "^19.3.0",
|
|
75
|
+
"react": "^19.3.1",
|
|
76
|
+
"tsdown": "^0.23.0",
|
|
77
|
+
"typescript": "^7.0.2",
|
|
78
|
+
"vitest": "5.0.5",
|
|
79
|
+
"zod": "4.6.6"
|
|
80
|
+
},
|
|
81
|
+
"peerDependencies": {
|
|
82
|
+
"@deepseek-ai/cordis": "*",
|
|
83
|
+
"@deepseek-ai/dsh-api-gateway": "*",
|
|
84
|
+
"@deepseek-ai/dsh-api-session-controller": "*",
|
|
85
|
+
"@deepseek-ai/dsh-api-workspace-controller": "*",
|
|
86
|
+
"@deepseek-ai/dsh-api-workspace-files": "*",
|
|
87
|
+
"@deepseek-ai/dsh-client-ui-conversation": "*",
|
|
88
|
+
"@deepseek-ai/dsh-client-ui-primitives": "*",
|
|
89
|
+
"@deepseek-ai/dsh-client-ui-slots": "*",
|
|
90
|
+
"@deepseek-ai/dsh-session": "*",
|
|
91
|
+
"@deepseek-ai/dsh-typert-protocol": "*",
|
|
92
|
+
"@deepseek-ai/dsh-util-workspace-path": "*",
|
|
93
|
+
"react": "*"
|
|
94
|
+
},
|
|
95
|
+
"dependencies": {
|
|
96
|
+
"@lukstei/util-review-ui": "0.2.2-rc.5.11"
|
|
97
|
+
},
|
|
98
|
+
"license": "MIT",
|
|
99
|
+
"repository": {
|
|
100
|
+
"type": "git",
|
|
101
|
+
"url": "git+https://github.com/lukstei/dsh-plugins.git",
|
|
102
|
+
"directory": "packages/dsh-client-split-view"
|
|
103
|
+
},
|
|
104
|
+
"publishConfig": {
|
|
105
|
+
"access": "public"
|
|
106
|
+
},
|
|
107
|
+
"scripts": {
|
|
108
|
+
"build": "tsdown --config tsdown.config.ts --logLevel error",
|
|
109
|
+
"dev": "tsdown --config tsdown.config.ts --watch",
|
|
110
|
+
"check": "biome check --reporter=concise .",
|
|
111
|
+
"typecheck": "tsc --noEmit",
|
|
112
|
+
"test": "vitest run --reporter=minimal",
|
|
113
|
+
"test:watch": "vitest",
|
|
114
|
+
"test:update": "vitest run -u",
|
|
115
|
+
"verify": "pnpm --silent run check && pnpm --silent run build && pnpm --silent run typecheck && pnpm --silent run test"
|
|
116
|
+
}
|
|
6
117
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { SessionId } from "@deepseek-ai/dsh-session/types";
|
|
2
|
+
import { Component, createRef, type ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
type ScrollSnapshot = Array<{ element: HTMLElement; top: number }> | null;
|
|
5
|
+
|
|
6
|
+
// edge case: moving a mounted pane resets its browser scrollport before layout effects run
|
|
7
|
+
export class SplitLayout extends Component<
|
|
8
|
+
{ sessionIds: readonly SessionId[]; children: ReactNode },
|
|
9
|
+
Record<string, never>,
|
|
10
|
+
ScrollSnapshot
|
|
11
|
+
> {
|
|
12
|
+
private shell = createRef<HTMLDivElement>();
|
|
13
|
+
|
|
14
|
+
getSnapshotBeforeUpdate(previous: SplitLayout["props"]): ScrollSnapshot {
|
|
15
|
+
if (
|
|
16
|
+
previous.sessionIds.length !== this.props.sessionIds.length ||
|
|
17
|
+
previous.sessionIds.every(
|
|
18
|
+
(id, index) => id === this.props.sessionIds[index],
|
|
19
|
+
) ||
|
|
20
|
+
!this.shell.current
|
|
21
|
+
)
|
|
22
|
+
return null;
|
|
23
|
+
// edge case: React has mounted the shell ref before this update lifecycle
|
|
24
|
+
return Array.from(
|
|
25
|
+
this.shell.current.querySelectorAll<HTMLElement>(
|
|
26
|
+
"[data-conversation-scroll], .dsh-split-file",
|
|
27
|
+
),
|
|
28
|
+
(element) => ({ element, top: element.scrollTop }),
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
componentDidUpdate(
|
|
33
|
+
_previous: SplitLayout["props"],
|
|
34
|
+
_state: Readonly<Record<string, never>>,
|
|
35
|
+
snapshot: ScrollSnapshot,
|
|
36
|
+
): void {
|
|
37
|
+
if (snapshot === null) return;
|
|
38
|
+
for (const { element, top } of snapshot) element.scrollTop = top;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
render() {
|
|
42
|
+
return (
|
|
43
|
+
<div ref={this.shell} className="dsh-split-shell">
|
|
44
|
+
{this.props.children}
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
}
|