@deepseek-ai/dsh-client-ui-sidebar-files 0.1.5-alpha.2 → 0.1.5-rc.2
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.i18n.yaml +2 -2
- package/README.md +2 -2
- package/README.zh.md +2 -2
- package/lib/client.js +13 -2
- package/lib/types/client/index.d.ts +1 -1
- package/lib/types/client/locales.d.ts +2 -0
- package/package.json +14 -14
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/client/ui-sidebar-files/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 28e052b5a6739118c691431aad88964a8f6d19cd
|
|
6
|
+
README.zh.md: f9724c159e358658b0cf6d342b26e80e8c59cf01
|
package/README.md
CHANGED
|
@@ -24,11 +24,11 @@ The right Sidebar's navigator tab type: the session's workspace root as a tree,
|
|
|
24
24
|
<a id="what-it-registers"></a>
|
|
25
25
|
## What it registers
|
|
26
26
|
|
|
27
|
-
- **The type** — `ctx.sidebarRightTabs.register(...)` with kind `files`, id `@deepseek-ai/dsh-client-ui-sidebar-files`, band `builtin`, no patterns, and one guide entry (order 10,
|
|
27
|
+
- **The type** — `ctx.sidebarRightTabs.register(...)` with kind `files`, id `@deepseek-ai/dsh-client-ui-sidebar-files`, band `builtin`, no patterns, and one guide entry (order 10, its title and description from the `sidebarFiles` namespace, its glyph the shared folder icon) that opens the type.
|
|
28
28
|
- **The body** — the keyed `sidebar.right.pane.tab` seat under that id: a header row under the strip, then the tree. The header row is the document preview's (`ui-sidebar-documentpreview`): the root path, its directories greyed and its last segment in full ink, never ellipsized (a path wider than the row keeps its end and fades its start), with the one control, reload, at its right. The row is copied rather than shared because a plugin bundle shares runtime code only through the platform modules; once the artifact and slot surfaces settle, one copy in `ui-primitives` could serve every pane header.
|
|
29
29
|
- **The chip title** — the keyed `sidebar.right.pane.tab.title` seat under that id: a shared `FileTypeIcon` folder glyph at 16px before the type's label. The tree's own rows never draw this sheet.
|
|
30
30
|
|
|
31
|
-
Seven source files under `src/client/`: `definition.
|
|
31
|
+
Seven source files under `src/client/`: `definition.tsx` (the type), `store.ts` (what it keeps), `face.ts` (how it lists, Remote binding included), `FilesBody.tsx` (what it draws, with its ordering and failure-line helpers), `FilesTitle.tsx` (the chip title), `locales.ts` (what it says), and `index.ts` (the wiring).
|
|
32
32
|
|
|
33
33
|
<a id="the-tree"></a>
|
|
34
34
|
## The tree
|
package/README.zh.md
CHANGED
|
@@ -24,11 +24,11 @@ kind: "package-reference"
|
|
|
24
24
|
<a id="what-it-registers"></a>
|
|
25
25
|
## 注册了什么
|
|
26
26
|
|
|
27
|
-
- **类型**:`ctx.sidebarRightTabs.register(...)`,kind 为 `files`,id 为 `@deepseek-ai/dsh-client-ui-sidebar-files`,档位 `builtin`,没有 patterns,另有一个打开该类型的引导页入口(order 10
|
|
27
|
+
- **类型**:`ctx.sidebarRightTabs.register(...)`,kind 为 `files`,id 为 `@deepseek-ai/dsh-client-ui-sidebar-files`,档位 `builtin`,没有 patterns,另有一个打开该类型的引导页入口(order 10,标题与描述取自 `sidebarFiles` 命名空间,图标是共享的文件夹图标)。
|
|
28
28
|
- **正文**:以该 id 为键的 `sidebar.right.pane.tab` 坑位:strip 下的一行标题行,然后是树。标题行与文档预览(`ui-sidebar-documentpreview`)的相同:根路径,目录部分灰色、最后一段正色,从不省略号截断(比行宽的路径保留末尾、淡出开头),右端是它唯一的控件、重新读取。这一行是复制而非共享,因为插件 bundle 只经平台模块共享运行时代码;待 artifact 与各 slot 的形态定下来后,可以在 `ui-primitives` 放一份供每个 pane 标题行使用。
|
|
29
29
|
- **标签页标题**:以该 id 为键的 `sidebar.right.pane.tab.title` 坑位:类型标签前的一枚 16px 共享 `FileTypeIcon` 文件夹图标。树本身的行不画这枚图标。
|
|
30
30
|
|
|
31
|
-
`src/client/` 下七个源文件:`definition.
|
|
31
|
+
`src/client/` 下七个源文件:`definition.tsx`(类型是什么)、`store.ts`(它保存什么)、`face.ts`(它如何列目录,含 Remote 绑定)、`FilesBody.tsx`(它画什么,含排序与失败行两个辅助函数)、`FilesTitle.tsx`(标签页标题)、`locales.ts`(它说什么)、`index.ts`(接线)。
|
|
32
32
|
|
|
33
33
|
<a id="the-tree"></a>
|
|
34
34
|
## 树
|
package/lib/client.js
CHANGED
|
@@ -4,8 +4,8 @@ window.__ModuleLoader__.load({
|
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
6
6
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
|
-
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
8
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
9
9
|
let react = require("react");
|
|
10
10
|
let _deepseek_ai_dsh_client_store = require("@deepseek-ai/dsh-client-store");
|
|
11
11
|
//#region lib/types/client/definition.js
|
|
@@ -13,6 +13,14 @@ window.__ModuleLoader__.load({
|
|
|
13
13
|
const FILES_KIND = "files";
|
|
14
14
|
/** This implementation's identity in the tab system, and the key its body registers under. */
|
|
15
15
|
const FILES_ID = "@deepseek-ai/dsh-client-ui-sidebar-files";
|
|
16
|
+
/** The type's coloured folder sheet at the guide capsule's glyph size, as the chip title draws it. */
|
|
17
|
+
function FolderSheetGlyph({ size, className }) {
|
|
18
|
+
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.FileTypeIcon, {
|
|
19
|
+
kind: "folder",
|
|
20
|
+
size,
|
|
21
|
+
className
|
|
22
|
+
});
|
|
23
|
+
}
|
|
16
24
|
/**
|
|
17
25
|
* The files type's registry definition.
|
|
18
26
|
* @param t - namespace-bound translate, read fresh on every label call.
|
|
@@ -27,7 +35,8 @@ window.__ModuleLoader__.load({
|
|
|
27
35
|
guide: [{
|
|
28
36
|
order: 10,
|
|
29
37
|
title: () => t("guide.title"),
|
|
30
|
-
|
|
38
|
+
description: () => t("guide.description"),
|
|
39
|
+
icon: FolderSheetGlyph
|
|
31
40
|
}]
|
|
32
41
|
};
|
|
33
42
|
}
|
|
@@ -512,6 +521,7 @@ window.__ModuleLoader__.load({
|
|
|
512
521
|
const zh = {
|
|
513
522
|
"type.label": "文件",
|
|
514
523
|
"guide.title": "工作区文件",
|
|
524
|
+
"guide.description": "浏览会话工作区的文件",
|
|
515
525
|
loading: "正在读取…",
|
|
516
526
|
empty: "空目录",
|
|
517
527
|
truncated: "条目太多,只显示了一部分。",
|
|
@@ -527,6 +537,7 @@ window.__ModuleLoader__.load({
|
|
|
527
537
|
const en = {
|
|
528
538
|
"type.label": "Files",
|
|
529
539
|
"guide.title": "Workspace files",
|
|
540
|
+
"guide.description": "Browse files in this session's workspace",
|
|
530
541
|
loading: "Reading…",
|
|
531
542
|
empty: "Empty directory",
|
|
532
543
|
truncated: "Too many entries, showing only some of them.",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* the keyed `sidebar.right.pane.tab.title` seat, both under the type's `id`.
|
|
7
7
|
*
|
|
8
8
|
* The file split is this package's layering: what the type IS
|
|
9
|
-
* (`definition.
|
|
9
|
+
* (`definition.tsx`), what it keeps (`store.ts`), how it lists (`face.ts`), what
|
|
10
10
|
* it draws (`FilesBody.tsx`, `FilesTitle.tsx`), what it says (`locales.ts`),
|
|
11
11
|
* and this module, which only wires them together.
|
|
12
12
|
*/
|
|
@@ -8,6 +8,7 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
|
8
8
|
export declare const zh: {
|
|
9
9
|
'type.label': string;
|
|
10
10
|
'guide.title': string;
|
|
11
|
+
'guide.description': string;
|
|
11
12
|
loading: string;
|
|
12
13
|
empty: string;
|
|
13
14
|
truncated: string;
|
|
@@ -25,6 +26,7 @@ export type SidebarFilesKey = keyof typeof zh;
|
|
|
25
26
|
export declare const en: {
|
|
26
27
|
'type.label': string;
|
|
27
28
|
'guide.title': string;
|
|
29
|
+
'guide.description': string;
|
|
28
30
|
loading: string;
|
|
29
31
|
empty: string;
|
|
30
32
|
truncated: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-client-ui-sidebar-files",
|
|
3
3
|
"description": "Workspace file tree tab type for the right Sidebar: lazy directory listing over the workspaceFiles Remote namespace, opening files into the Sidebar",
|
|
4
|
-
"version": "0.1.5-
|
|
4
|
+
"version": "0.1.5-rc.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -47,20 +47,20 @@
|
|
|
47
47
|
"react": "^18.2.0",
|
|
48
48
|
"clsx": "^2.0.0",
|
|
49
49
|
"react-dom": "^18.2.0",
|
|
50
|
-
"@deepseek-ai/dsh-api-remotes": "^0.1.5-alpha.2",
|
|
51
|
-
"@deepseek-ai/dsh-api-workspace-files": "^0.1.5-alpha.2",
|
|
52
|
-
"@deepseek-ai/dsh-client-locale": "^0.1.5-alpha.2",
|
|
53
|
-
"@deepseek-ai/dsh-client-store": "^0.1.5-alpha.2",
|
|
54
50
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
55
|
-
"@deepseek-ai/dsh-
|
|
56
|
-
"@deepseek-ai/dsh-
|
|
57
|
-
"@deepseek-ai/dsh-client-
|
|
58
|
-
"@deepseek-ai/dsh-client-
|
|
59
|
-
"@deepseek-ai/dsh-client-
|
|
60
|
-
"@deepseek-ai/dsh-client-ui-
|
|
61
|
-
"@deepseek-ai/dsh-
|
|
62
|
-
"@deepseek-ai/dsh-client-ui-
|
|
63
|
-
"@deepseek-ai/dsh-
|
|
51
|
+
"@deepseek-ai/dsh-api-remotes": "^0.1.5-rc.2",
|
|
52
|
+
"@deepseek-ai/dsh-api-workspace-files": "^0.1.5-rc.2",
|
|
53
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.5-rc.2",
|
|
54
|
+
"@deepseek-ai/dsh-client-store": "^0.1.5-rc.2",
|
|
55
|
+
"@deepseek-ai/dsh-client-test-runtime": "^0.1.5-rc.2",
|
|
56
|
+
"@deepseek-ai/dsh-client-ui-dockkit": "^0.1.5-rc.2",
|
|
57
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.5-rc.2",
|
|
58
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.5-rc.2",
|
|
59
|
+
"@deepseek-ai/dsh-client-ui-sidebar-right": "^0.1.5-rc.2",
|
|
60
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.5-rc.2",
|
|
61
|
+
"@deepseek-ai/dsh-session": "^0.1.5-rc.2",
|
|
62
|
+
"@deepseek-ai/dsh-client-ui-session": "^0.1.5-rc.2",
|
|
63
|
+
"@deepseek-ai/dsh-util-workspace-path": "^0.1.5-rc.2"
|
|
64
64
|
},
|
|
65
65
|
"files": [
|
|
66
66
|
"lib/index.js",
|