@lijian-ui/dsh-file-manager 0.1.20

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.
Files changed (169) hide show
  1. package/LICENSE +38 -0
  2. package/README.i18n.yaml +6 -0
  3. package/README.md +66 -0
  4. package/README.zh.md +66 -0
  5. package/cordis.patch.yml +13 -0
  6. package/lib/assets/mermaid.min.js +3587 -0
  7. package/lib/client.js +7621 -0
  8. package/lib/client.js.map +1 -0
  9. package/lib/index.js +3207 -0
  10. package/lib/tsconfig.client.tsbuildinfo +1 -0
  11. package/lib/tsconfig.host.tsbuildinfo +1 -0
  12. package/lib/types/client/FileManagerSettingsCard.d.ts +56 -0
  13. package/lib/types/client/FileManagerSettingsCard.d.ts.map +1 -0
  14. package/lib/types/client/PluginSettingsCard.d.ts +104 -0
  15. package/lib/types/client/PluginSettingsCard.d.ts.map +1 -0
  16. package/lib/types/client/api.d.ts +75 -0
  17. package/lib/types/client/api.d.ts.map +1 -0
  18. package/lib/types/client/chat/AttachedFilesDock.d.ts +51 -0
  19. package/lib/types/client/chat/AttachedFilesDock.d.ts.map +1 -0
  20. package/lib/types/client/chat/file-ref.d.ts +35 -0
  21. package/lib/types/client/chat/file-ref.d.ts.map +1 -0
  22. package/lib/types/client/chat/mermaid-chat.d.ts +30 -0
  23. package/lib/types/client/chat/mermaid-chat.d.ts.map +1 -0
  24. package/lib/types/client/chat/placeholder-hint.d.ts +16 -0
  25. package/lib/types/client/chat/placeholder-hint.d.ts.map +1 -0
  26. package/lib/types/client/components/ExplorerPanel.d.ts +26 -0
  27. package/lib/types/client/components/ExplorerPanel.d.ts.map +1 -0
  28. package/lib/types/client/components/FileIcon.d.ts +15 -0
  29. package/lib/types/client/components/FileIcon.d.ts.map +1 -0
  30. package/lib/types/client/components/ScmPanel.d.ts +23 -0
  31. package/lib/types/client/components/ScmPanel.d.ts.map +1 -0
  32. package/lib/types/client/components/a11y.d.ts +12 -0
  33. package/lib/types/client/components/a11y.d.ts.map +1 -0
  34. package/lib/types/client/components/icons.d.ts +41 -0
  35. package/lib/types/client/components/icons.d.ts.map +1 -0
  36. package/lib/types/client/components/overlay.d.ts +45 -0
  37. package/lib/types/client/components/overlay.d.ts.map +1 -0
  38. package/lib/types/client/drag/DragFileInlay.d.ts +31 -0
  39. package/lib/types/client/drag/DragFileInlay.d.ts.map +1 -0
  40. package/lib/types/client/drag/file-drag.d.ts +47 -0
  41. package/lib/types/client/drag/file-drag.d.ts.map +1 -0
  42. package/lib/types/client/drag.d.ts +31 -0
  43. package/lib/types/client/drag.d.ts.map +1 -0
  44. package/lib/types/client/file-source.d.ts +29 -0
  45. package/lib/types/client/file-source.d.ts.map +1 -0
  46. package/lib/types/client/fileType.d.ts +31 -0
  47. package/lib/types/client/fileType.d.ts.map +1 -0
  48. package/lib/types/client/floating.d.ts +27 -0
  49. package/lib/types/client/floating.d.ts.map +1 -0
  50. package/lib/types/client/hooks/useResizableSplit.d.ts +37 -0
  51. package/lib/types/client/hooks/useResizableSplit.d.ts.map +1 -0
  52. package/lib/types/client/hooks/useStore.d.ts +10 -0
  53. package/lib/types/client/hooks/useStore.d.ts.map +1 -0
  54. package/lib/types/client/index.d.ts +57 -0
  55. package/lib/types/client/index.d.ts.map +1 -0
  56. package/lib/types/client/layout.d.ts +104 -0
  57. package/lib/types/client/layout.d.ts.map +1 -0
  58. package/lib/types/client/locales.d.ts +125 -0
  59. package/lib/types/client/locales.d.ts.map +1 -0
  60. package/lib/types/client/maximize.d.ts +24 -0
  61. package/lib/types/client/maximize.d.ts.map +1 -0
  62. package/lib/types/client/mention.d.ts +44 -0
  63. package/lib/types/client/mention.d.ts.map +1 -0
  64. package/lib/types/client/mount.d.ts +22 -0
  65. package/lib/types/client/mount.d.ts.map +1 -0
  66. package/lib/types/client/persist.d.ts +55 -0
  67. package/lib/types/client/persist.d.ts.map +1 -0
  68. package/lib/types/client/picker/FilePickerModal.d.ts +47 -0
  69. package/lib/types/client/picker/FilePickerModal.d.ts.map +1 -0
  70. package/lib/types/client/picker/file-picker.d.ts +62 -0
  71. package/lib/types/client/picker/file-picker.d.ts.map +1 -0
  72. package/lib/types/client/preview/PreviewPanel.d.ts +17 -0
  73. package/lib/types/client/preview/PreviewPanel.d.ts.map +1 -0
  74. package/lib/types/client/preview/PreviewTabs.d.ts +30 -0
  75. package/lib/types/client/preview/PreviewTabs.d.ts.map +1 -0
  76. package/lib/types/client/preview/PreviewToolbar.d.ts +37 -0
  77. package/lib/types/client/preview/PreviewToolbar.d.ts.map +1 -0
  78. package/lib/types/client/preview/content.d.ts +43 -0
  79. package/lib/types/client/preview/content.d.ts.map +1 -0
  80. package/lib/types/client/preview/markdown.d.ts +60 -0
  81. package/lib/types/client/preview/markdown.d.ts.map +1 -0
  82. package/lib/types/client/preview/mermaid.d.ts +78 -0
  83. package/lib/types/client/preview/mermaid.d.ts.map +1 -0
  84. package/lib/types/client/preview/selection.d.ts +26 -0
  85. package/lib/types/client/preview/selection.d.ts.map +1 -0
  86. package/lib/types/client/reference.d.ts +75 -0
  87. package/lib/types/client/reference.d.ts.map +1 -0
  88. package/lib/types/client/settings-form.d.ts +206 -0
  89. package/lib/types/client/settings-form.d.ts.map +1 -0
  90. package/lib/types/client/store.d.ts +279 -0
  91. package/lib/types/client/store.d.ts.map +1 -0
  92. package/lib/types/core/types.d.ts +132 -0
  93. package/lib/types/core/types.d.ts.map +1 -0
  94. package/lib/types/host/fs-service.d.ts +96 -0
  95. package/lib/types/host/fs-service.d.ts.map +1 -0
  96. package/lib/types/host/gate.d.ts +45 -0
  97. package/lib/types/host/gate.d.ts.map +1 -0
  98. package/lib/types/host/git-runner.d.ts +80 -0
  99. package/lib/types/host/git-runner.d.ts.map +1 -0
  100. package/lib/types/host/git-service.d.ts +130 -0
  101. package/lib/types/host/git-service.d.ts.map +1 -0
  102. package/lib/types/host/loopback.d.ts +25 -0
  103. package/lib/types/host/loopback.d.ts.map +1 -0
  104. package/lib/types/host/poll-guard.d.ts +55 -0
  105. package/lib/types/host/poll-guard.d.ts.map +1 -0
  106. package/lib/types/host/routes.d.ts +54 -0
  107. package/lib/types/host/routes.d.ts.map +1 -0
  108. package/lib/types/index.d.ts +35 -0
  109. package/lib/types/index.d.ts.map +1 -0
  110. package/lib/types/mount-once.d.ts +25 -0
  111. package/lib/types/mount-once.d.ts.map +1 -0
  112. package/package.json +85 -0
  113. package/src/client/FileManagerSettingsCard.tsx +117 -0
  114. package/src/client/PluginSettingsCard.tsx +337 -0
  115. package/src/client/api.ts +141 -0
  116. package/src/client/chat/file-ref.ts +144 -0
  117. package/src/client/chat/mermaid-chat.tsx +102 -0
  118. package/src/client/chat/placeholder-hint.tsx +46 -0
  119. package/src/client/components/ExplorerPanel.tsx +534 -0
  120. package/src/client/components/FileIcon.tsx +46 -0
  121. package/src/client/components/ScmPanel.tsx +480 -0
  122. package/src/client/components/a11y.ts +20 -0
  123. package/src/client/components/icons.tsx +274 -0
  124. package/src/client/components/overlay.tsx +225 -0
  125. package/src/client/css-modules.d.ts +5 -0
  126. package/src/client/drag/DragFileInlay.tsx +89 -0
  127. package/src/client/drag/file-drag.ts +67 -0
  128. package/src/client/drag.ts +154 -0
  129. package/src/client/file-source.ts +58 -0
  130. package/src/client/fileType.ts +129 -0
  131. package/src/client/floating.ts +63 -0
  132. package/src/client/hooks/useResizableSplit.ts +91 -0
  133. package/src/client/hooks/useStore.ts +15 -0
  134. package/src/client/index.ts +389 -0
  135. package/src/client/layout.ts +546 -0
  136. package/src/client/locales.ts +247 -0
  137. package/src/client/maximize.ts +34 -0
  138. package/src/client/mount.tsx +74 -0
  139. package/src/client/persist.ts +194 -0
  140. package/src/client/picker/FilePickerModal.tsx +506 -0
  141. package/src/client/picker/file-picker.ts +86 -0
  142. package/src/client/preview/PreviewPanel.tsx +233 -0
  143. package/src/client/preview/PreviewTabs.tsx +159 -0
  144. package/src/client/preview/PreviewToolbar.tsx +160 -0
  145. package/src/client/preview/content.tsx +617 -0
  146. package/src/client/preview/markdown.ts +351 -0
  147. package/src/client/preview/mermaid.ts +274 -0
  148. package/src/client/preview/selection.ts +82 -0
  149. package/src/client/reference.ts +161 -0
  150. package/src/client/settings-card.module.css +316 -0
  151. package/src/client/settings-form.ts +451 -0
  152. package/src/client/store.ts +1290 -0
  153. package/src/client/styles/chip.module.css +38 -0
  154. package/src/client/styles/drag.module.css +30 -0
  155. package/src/client/styles/explorer.module.css +371 -0
  156. package/src/client/styles/picker.module.css +344 -0
  157. package/src/client/styles/preview.module.css +904 -0
  158. package/src/client/styles/scm.module.css +380 -0
  159. package/src/client/styles/tokens.module.css +480 -0
  160. package/src/core/types.ts +162 -0
  161. package/src/host/fs-service.ts +513 -0
  162. package/src/host/gate.ts +74 -0
  163. package/src/host/git-runner.ts +116 -0
  164. package/src/host/git-service.ts +395 -0
  165. package/src/host/loopback.ts +63 -0
  166. package/src/host/poll-guard.ts +109 -0
  167. package/src/host/routes.ts +695 -0
  168. package/src/index.ts +97 -0
  169. package/src/mount-once.ts +48 -0
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Framework-free drag machinery shared by the React hook (useResizableSplit)
3
+ * and the DOM layout controller: one pointer-down handler that owns capture,
4
+ * the rAF-flush loop, the e.buttons === 0 fallback, every end path, and the
5
+ * drag styles. Pure DOM — no React, so both callers run the exact same
6
+ * smoothness core (FileManager's useResizableSplit architecture, re-implemented).
7
+ * @module dsh-filemgr/client/drag
8
+ */
9
+ export interface DragStartOptions {
10
+ /** Drag left = grow (handle on the left edge of its container). */
11
+ reverse: boolean;
12
+ /** Width at drag start (read at pointer-down time). */
13
+ getStartWidth: () => number;
14
+ /** Clamped width from the raw delta (px mode adds deltaX directly). */
15
+ compute: (startWidth: number, deltaX: number) => number;
16
+ /** Per-frame flush (rAF-merged; called at most once per frame). */
17
+ onFrame: (width: number) => void;
18
+ /** Final commit (also fired on every end path). */
19
+ onEnd: (width: number) => void;
20
+ }
21
+ /**
22
+ * Handle one pointer-down: wire capture + window listeners, run the rAF
23
+ * loop, and end on any of the five termination paths. Call from a
24
+ * onPointerDown handler (React or plain DOM).
25
+ * @param event - the raw pointerdown event.
26
+ * @param el - the handle element (capture target + reverse marker source).
27
+ * @param opts - drag behavior.
28
+ * @returns a disposer (idempotent; also called internally on end).
29
+ */
30
+ export declare function handlePointerDragStart(event: PointerEvent, el: HTMLElement, opts: DragStartOptions): () => void;
31
+ //# sourceMappingURL=drag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drag.d.ts","sourceRoot":"","sources":["../../../src/client/drag.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,mEAAmE;IACnE,OAAO,EAAE,OAAO,CAAA;IAChB,uDAAuD;IACvD,aAAa,EAAE,MAAM,MAAM,CAAA;IAC3B,uEAAuE;IACvE,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,CAAA;IACvD,mEAAmE;IACnE,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,mDAAmD;IACnD,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/B;AAOD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,gBAAgB,GAAG,MAAM,IAAI,CAqH/G"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * The `file` input-trigger source: registers the reference codec the shell's
3
+ * submit pipeline needs to serialize a file chip (`slash: no serializer for
4
+ * reference source "file"` disappears once this source is in the roster).
5
+ *
6
+ * The source is deliberately INERT as a menu participant: the file picker is
7
+ * our own pi-desktop-style tree modal (see picker/FilePickerModal.tsx), not
8
+ * the shell's flat trigger menu, so `candidates` returns nothing and `onPick`
9
+ * never fires. Its only jobs are (1) to be findable by
10
+ * `inputTriggers.serializeReference('file', ref)` and (2) to own the model
11
+ * projection of a chip — the `@path:lines` plain-text token.
12
+ *
13
+ * Trigger '@' keeps the chip family visually consistent with the other '@'
14
+ * sources; the menu group this source contributes is empty and is covered by
15
+ * the picker modal the moment a bare `@` lands.
16
+ * @module dsh-filemgr/client/file-source
17
+ */
18
+ import type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client';
19
+ /** The roster name the chip occurrences address (see reference.ts). */
20
+ export declare const FILE_SOURCE_NAME = "file";
21
+ /** Required services: the trigger roster plus the session scope carrier. */
22
+ export declare const inject: string[];
23
+ /**
24
+ * Register the inert `file` reference source (codec only). Safe to call
25
+ * multiple times (each call returns a disposer; the roster rejects a
26
+ * duplicate (trigger, name) seat, so guard with a module flag).
27
+ */
28
+ export declare function registerFileReferenceSource(ctx: ClientContext): () => void;
29
+ //# sourceMappingURL=file-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-source.d.ts","sourceRoot":"","sources":["../../../src/client/file-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAG3E,uEAAuE;AACvE,eAAO,MAAM,gBAAgB,SAAS,CAAA;AAEtC,4EAA4E;AAC5E,eAAO,MAAM,MAAM,UAAoB,CAAA;AAEvC;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,IAAI,CAyB1E"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Preview content-type detection from a file name — the router's single
3
+ * source of truth for what a file becomes when opened (mirrors FileManager's
4
+ * getFileTypeInfo table, re-derived for the panel's format set).
5
+ * @module dsh-filemgr/client/fileType
6
+ */
7
+ import type { PreviewContentType } from '../core/types.ts';
8
+ /** Detect the preview content type of a file by name (lowercased). */
9
+ export declare function detectContentType(name: string): PreviewContentType;
10
+ /** Whether the type can be edited and saved back. */
11
+ export declare function isEditableType(type: PreviewContentType): boolean;
12
+ /** Whether the type reads its content as text (vs image data URL). */
13
+ export declare function isTextType(type: PreviewContentType): boolean;
14
+ /** A stable tab id from the file identity (root + path + type). */
15
+ export declare function tabIdOf(root: string, path: string, type: PreviewContentType): string;
16
+ /** The language hint for code tabs (extension without the dot). */
17
+ export declare function languageOf(name: string): string;
18
+ /** The title for a tab: the basename. */
19
+ export declare function basenameOf(path: string): string;
20
+ /** The parent relative path of a path ('' for a root-level item). */
21
+ export declare function parentRel(path: string): string;
22
+ /**
23
+ * The streaming URL a pdf tab renders: the host raw route serves the bytes
24
+ * with mime application/pdf, so the preview iframe loads them directly — no
25
+ * base64 round-trip and no read-size cap. The nonce defeats browser caching
26
+ * when the tab is refreshed after the file changed on disk.
27
+ *
28
+ * Contributed by EricWang1358 (#239).
29
+ */
30
+ export declare function pdfPreviewUrl(root: string, path: string, nonce: number): string;
31
+ //# sourceMappingURL=fileType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileType.d.ts","sourceRoot":"","sources":["../../../src/client/fileType.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAiD1D,sEAAsE;AACtE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAwBlE;AAED,qDAAqD;AACrD,wBAAgB,cAAc,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAEhE;AAED,sEAAsE;AACtE,wBAAgB,UAAU,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAG5D;AAED,mEAAmE;AACnE,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAEpF;AAED,mEAAmE;AACnE,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI/C;AAED,yCAAyC;AACzC,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG/C;AAED,qEAAqE;AACrE,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG9C;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/E"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Floating expand button geometry (issues #374 / #292): the button is a
3
+ * fixed chrome element docked at the viewport's top-right corner, just
4
+ * below the shell conversation header — the horizontal divider under the
5
+ * "Session log" row — so the re-expand control sits below the header
6
+ * chrome instead of overlapping it. Its top stays below the Window
7
+ * Controls Overlay titlebar strip when dsh-desktop reports one (issue
8
+ * #292). Every computed position is clamped into the usable range.
9
+ * @module dsh-filemgr/client/floating
10
+ */
11
+ /** Breathing room above/below the button (px). */
12
+ export declare const FLOATING_MARGIN_PX = 6;
13
+ /** Gap between the shell header's bottom divider and the button top (px). */
14
+ export declare const FLOATING_HEADER_GAP_PX = 8;
15
+ /** The button's rendered size (kept in sync with tokens.module.css). */
16
+ export declare const FLOATING_BUTTON_HEIGHT_PX = 24;
17
+ /** Top offset of the explorer's collapse chevron inside its tab bar (px).
18
+ * Used only as a fallback when the shell conversation header is not found
19
+ * (kept in sync with the chevron rule in tokens.module.css). */
20
+ export declare const COLLAPSE_CHEVRON_TOP_PX = 6;
21
+ /** The WCO titlebar height when visible; 0 in a plain browser tab. */
22
+ export declare function titlebarAreaHeight(): number;
23
+ /** Clamp a requested top px into the usable vertical range. */
24
+ export declare function clampFloatingTop(top: number, viewportHeight: number, buttonHeight: number, titlebar: number): number;
25
+ /** The default top: aligned with the collapse chevron at the top-right. */
26
+ export declare function topAlignedFloatingTop(viewportHeight: number, buttonHeight: number, titlebar: number): number;
27
+ //# sourceMappingURL=floating.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"floating.d.ts","sourceRoot":"","sources":["../../../src/client/floating.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,kDAAkD;AAClD,eAAO,MAAM,kBAAkB,IAAI,CAAA;AACnC,6EAA6E;AAC7E,eAAO,MAAM,sBAAsB,IAAI,CAAA;AACvC,wEAAwE;AACxE,eAAO,MAAM,yBAAyB,KAAK,CAAA;AAC3C;;gEAEgE;AAChE,eAAO,MAAM,uBAAuB,IAAI,CAAA;AAQxC,sEAAsE;AACtE,wBAAgB,kBAAkB,IAAI,MAAM,CAU3C;AAED,+DAA+D;AAC/D,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,EACX,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,GACf,MAAM,CAKR;AAED,2EAA2E;AAC3E,wBAAgB,qBAAqB,CAAC,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAO5G"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * The panel system's single drag engine hook — a thin React wrapper over the
3
+ * framework-free machinery in drag.ts (FileManager's useResizableSplit
4
+ * architecture, re-implemented): px or ratio units, range-validated
5
+ * localStorage persistence, double-click reset to the default width.
6
+ * @module dsh-filemgr/client/hooks/useResizableSplit
7
+ */
8
+ import type { PointerEvent as ReactPointerEvent } from 'react';
9
+ export interface UseResizableSplitOptions {
10
+ /** Default width (px or percent). */
11
+ defaultWidth?: number;
12
+ /** Minimum (same unit). */
13
+ minWidth?: number;
14
+ /** Maximum (same unit). */
15
+ maxWidth?: number;
16
+ /** localStorage key (preference persistence). */
17
+ storageKey?: string;
18
+ /** 'px' for fixed pixel widths, 'ratio' for percents (default 'ratio'). */
19
+ unit?: 'px' | 'ratio';
20
+ }
21
+ export interface DragHandleProps {
22
+ onPointerDown: (event: ReactPointerEvent<HTMLDivElement>) => void;
23
+ onDoubleClick: () => void;
24
+ }
25
+ /**
26
+ * Resizable-split engine.
27
+ * @param options - width contract + persistence key.
28
+ * @returns current width, the committed setter, handle props, and the clamp.
29
+ */
30
+ export declare function useResizableSplit(options?: UseResizableSplitOptions): {
31
+ width: number;
32
+ setWidth: (value: number) => void;
33
+ handleProps: DragHandleProps;
34
+ clamp: (value: number) => number;
35
+ isPx: boolean;
36
+ };
37
+ //# sourceMappingURL=useResizableSplit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useResizableSplit.d.ts","sourceRoot":"","sources":["../../../../src/client/hooks/useResizableSplit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,YAAY,IAAI,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAI9D,MAAM,WAAW,wBAAwB;IACvC,qCAAqC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,IAAI,GAAG,OAAO,CAAA;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,aAAa,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,KAAK,IAAI,CAAA;IACjE,aAAa,EAAE,MAAM,IAAI,CAAA;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,wBAA6B;;sBAsBjC,MAAM;;mBAUT,MAAM,KAAG,MAAM;;EAsBlD"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * React bindings for the framework-free stores: useSyncExternalStore with a
3
+ * stable snapshot (the stores return immutable snapshots, so selector-free
4
+ * subscription is safe), plus a stable-callback helper for event handlers.
5
+ * @module dsh-filemgr/client/hooks/useStore
6
+ */
7
+ import type { StateHandle } from '../store.ts';
8
+ /** Subscribe a component to one store (full snapshot). */
9
+ export declare function useStore<S>(store: StateHandle<S>): S;
10
+ //# sourceMappingURL=useStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useStore.d.ts","sourceRoot":"","sources":["../../../../src/client/hooks/useStore.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C,0DAA0D;AAC1D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAEpD"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * FileManager right-panel system — browser half: mounts the explorer and preview
3
+ * columns into the web shell's frame grid (through the layout controller),
4
+ * binds the four stores to the live client runtime (the active session's cwd
5
+ * is the project root), subscribes to the host change stream (fs + git), and
6
+ * follows the shell's dark marker (body[data-ds-dark-theme]) via CSS only.
7
+ *
8
+ * Failure policy: every DOM/runtime wiring failure is logged, never thrown —
9
+ * the web shell fails the whole boot when a plugin apply throws.
10
+ *
11
+ * FileManager right-panel design (Apache-2.0, iOfficeAI/FileManager) — re-implemented
12
+ * from measured behavior and architecture, not copied code.
13
+ * @module dsh-filemgr/client
14
+ */
15
+ import type { ClientContext, SettingsScope, SettingsScopeSpec } from '@deepseek-ai/dsh-client-runtime/client';
16
+ import { type FileManagerPanelKey } from './locales.ts';
17
+ import './styles/chip.module.css';
18
+ declare module '@deepseek-ai/dsh-client-ui-slots' {
19
+ interface LocaleNamespaceMap {
20
+ /** Panel surface copy. */
21
+ 'filemgr': FileManagerPanelKey;
22
+ }
23
+ interface SlotMap {
24
+ /**
25
+ * One family plugin card inside the Web UI Plugins group. Spelled here
26
+ * with the same shape so this package can register without depending on
27
+ * the sibling web-ui-settings package.
28
+ */
29
+ 'web-ui.plugin.item': {
30
+ kind: 'list';
31
+ scope: 'root';
32
+ owner: SettingsPluginItemOwnerProps;
33
+ };
34
+ }
35
+ }
36
+ /** Owner share of a plugin card (the section supplies nothing). */
37
+ export interface SettingsPluginItemOwnerProps {
38
+ /** Marker field: card owner props are intentionally empty. */
39
+ children?: never;
40
+ }
41
+ declare module '@deepseek-ai/cordis' {
42
+ interface Context {
43
+ /**
44
+ * Optional rc.6 compatibility binder provided by dsh-web-ui-settings;
45
+ * absent when that group plugin is not installed, so callers fall back to
46
+ * the official settings scope.
47
+ */
48
+ webUiSettings?: {
49
+ bind<S>(spec: SettingsScopeSpec<S>): SettingsScope<S>;
50
+ };
51
+ }
52
+ }
53
+ /** Required services: sessions for the project root, locale for the copy, the settings scope for the master switch, and conversation for the composer draft edits (picker insert / @ button). */
54
+ export declare const inject: string[];
55
+ /** Apply the browser half. */
56
+ export declare function apply(ctx: ClientContext): void;
57
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAa,aAAa,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAYxH,OAAO,EAAiC,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAUtF,OAAO,0BAA0B,CAAA;AAEjC,OAAO,QAAQ,kCAAkC,CAAC;IAChD,UAAU,kBAAkB;QAC1B,0BAA0B;QAC1B,SAAS,EAAE,mBAAmB,CAAA;KAC/B;IAED,UAAU,OAAO;QACf;;;;WAIG;QACH,oBAAoB,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,4BAA4B,CAAA;SAAE,CAAA;KAC3F;CACF;AAED,mEAAmE;AACnE,MAAM,WAAW,4BAA4B;IAC3C,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB;AAED,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,OAAO;QACf;;;;WAIG;QACH,aAAa,CAAC,EAAE;YAAE,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAA;SAAE,CAAA;KAC1E;CACF;AAED,iMAAiM;AACjM,eAAO,MAAM,MAAM,UAA0D,CAAA;AAK7E,8BAA8B;AAC9B,wBAAgB,KAAK,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAmT9C"}
@@ -0,0 +1,104 @@
1
+ /**
2
+ * The DOM layout controller: extends the web shell's three-column frame
3
+ * (`[data-dsh-frame]`, a grid) with two trailing grid tracks — the preview
4
+ * region and the explorer column — by mirroring the shell's own inline
5
+ * grid-template-columns string and re-appending the two panel tracks on every
6
+ * shell update (MutationObserver, same frame before paint). Also owns the
7
+ * absolute drag handles (12px explorer / 20px preview hit zones), the
8
+ * floating expand button (docked at the top-right corner, just below the
9
+ * shell header's divider — issues #374 / #292), the collapse-as-width-0
10
+ * keep-mounted behavior, and the transient
11
+ * maximize mode (issue #315): while a panel is maximized the target column
12
+ * takes over the whole frame row (or renders as a fixed full-screen overlay
13
+ * on narrow viewports), and Esc / the header button restore the layout.
14
+ *
15
+ * The shell's inline style is the source of truth for the sidebar and details
16
+ * tracks; this controller never guesses their widths. Handles are out-of-flow
17
+ * (absolute), so appending tracks never disturbs the shell's own children.
18
+ *
19
+ * FileManager Layout architecture (Apache-2.0, re-implemented): the explorer
20
+ * column collapses to width 0 while staying mounted; the preview region keeps
21
+ * a 1px left border only (no outer margins — gaps would expose the window
22
+ * background, jarring in dark mode).
23
+ * @module dsh-filemgr/client/layout
24
+ */
25
+ import type { LayoutStore } from './store.ts';
26
+ /** Read the current frame element (undefined while the shell is not mounted). */
27
+ export declare function getFrameElement(): HTMLElement | null;
28
+ /**
29
+ * Parse an inline grid-template-columns string into its tracks. Handles
30
+ * "minmax(0, 1fr)" (spaces inside parens must not split). Empty on failure.
31
+ */
32
+ export declare function parseGridTracks(input: string): string[];
33
+ /** Extract a px width from one track (0 for fr/minmax/non-px tracks). */
34
+ export declare function trackPx(track: string): number;
35
+ /** One drag handle's geometry (hit zone + visual line) — pure CSS in the module. */
36
+ export declare const EXPLORER_HANDLE_WIDTH = 12;
37
+ export declare const PREVIEW_HANDLE_WIDTH = 20;
38
+ /**
39
+ * Drag target width: apply the hard px bounds (the same min/max the handle
40
+ * always enforced), then the store's ordered container-aware clamp so the
41
+ * grid never re-clamps a width the drag showed.
42
+ */
43
+ export declare function dragTargetWidth(kind: 'explorer' | 'preview', startWidth: number, deltaX: number, snapshot: {
44
+ availableWidth: number;
45
+ previewOpen: boolean;
46
+ explorerWidth: number;
47
+ }): number;
48
+ /** The layout controller: frame sync, handles, floating button, width math. */
49
+ export declare class PanelLayoutController {
50
+ private readonly layout;
51
+ private frame;
52
+ private previewCol;
53
+ private explorerCol;
54
+ private explorerHandle;
55
+ private previewHandle;
56
+ private floatingButton;
57
+ private styleObserver;
58
+ private sizeObserver;
59
+ private waitObserver;
60
+ private frameWidth;
61
+ /** Cached shell details handle (re-resolved when the shell rebuilds it). */
62
+ private detailsHandle;
63
+ /** The shell's own 3 tracks (sidebar, center, details) — mirror of its inline style. */
64
+ private shellTracks;
65
+ private instantTimer;
66
+ private disposers;
67
+ constructor(layout: LayoutStore);
68
+ /** Start watching for the frame and attach once it appears. */
69
+ mount(): void;
70
+ /** Attach to the frame: columns, handles, observers, store subscription. */
71
+ private attach;
72
+ /** Create one drag handle element with its pointer wiring. */
73
+ private createHandle;
74
+ /** Toggle explorer collapse (width 0, kept mounted; no transition). */
75
+ toggleExplorer(): void;
76
+ /** Toggle the preview region (open = tabs exist; close keeps tabs). */
77
+ setPreviewOpen(open: boolean): void;
78
+ /**
79
+ * Locate the shell conversation header: its bottom border is the
80
+ * horizontal divider under the "Session log" row the button should
81
+ * sit below. Resolved per call (the shell may mount it late); null when
82
+ * the shell has no header (standalone installs, desktop variants).
83
+ */
84
+ private findHeaderBottom;
85
+ /** Position the floating button: docked at the top-right corner, just
86
+ * below the shell header's bottom divider (fallback: the chevron row). */
87
+ private positionFloatingButton;
88
+ /** Apply one store update with transitions disabled for exactly one frame. */
89
+ private instant;
90
+ /** Re-write the frame grid and reposition handles + floating button. */
91
+ private applyGrid;
92
+ /**
93
+ * Maximize layout: the target column takes over the whole frame row (the
94
+ * other tracks collapse to 0px). On narrow viewports the takeover grid is
95
+ * skipped and the column renders as a fixed full-screen overlay instead
96
+ * (issue #315). Everything stays mounted — only geometry changes.
97
+ */
98
+ private applyMaximized;
99
+ /** Remove the narrow-screen overlay class from both columns. */
100
+ private clearMaximizedChrome;
101
+ /** Detach everything (plugin unload). */
102
+ dispose(): void;
103
+ }
104
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/client/layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAiBH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAK7C,iFAAiF;AACjF,wBAAgB,eAAe,IAAI,WAAW,GAAG,IAAI,CAEpD;AAgBD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAkBvD;AAED,yEAAyE;AACzE,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAG7C;AAED,oFAAoF;AACpF,eAAO,MAAM,qBAAqB,KAAK,CAAA;AACvC,eAAO,MAAM,oBAAoB,KAAK,CAAA;AAEtC;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,UAAU,GAAG,SAAS,EAC5B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,GAChF,MAAM,CAQR;AAED,+EAA+E;AAC/E,qBAAa,qBAAqB;IAiBpB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAhBnC,OAAO,CAAC,KAAK,CAA2B;IACxC,OAAO,CAAC,UAAU,CAA8B;IAChD,OAAO,CAAC,WAAW,CAA8B;IACjD,OAAO,CAAC,cAAc,CAA8B;IACpD,OAAO,CAAC,aAAa,CAA8B;IACnD,OAAO,CAAC,cAAc,CAAiC;IACvD,OAAO,CAAC,aAAa,CAAgC;IACrD,OAAO,CAAC,YAAY,CAA8B;IAClD,OAAO,CAAC,YAAY,CAAgC;IACpD,OAAO,CAAC,UAAU,CAAI;IACtB,4EAA4E;IAC5E,OAAO,CAAC,aAAa,CAA2B;IAChD,wFAAwF;IACxF,OAAO,CAAC,WAAW,CAAe;IAClC,OAAO,CAAC,YAAY,CAA2C;IAC/D,OAAO,CAAC,SAAS,CAAwB;gBACZ,MAAM,EAAE,WAAW;IAEhD,+DAA+D;IAC/D,KAAK,IAAI,IAAI;IAYb,4EAA4E;IAC5E,OAAO,CAAC,MAAM;IAwId,8DAA8D;IAC9D,OAAO,CAAC,YAAY;IAkEpB,uEAAuE;IACvE,cAAc,IAAI,IAAI;IActB,uEAAuE;IACvE,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAOnC;;;;;OAKG;IACH,OAAO,CAAC,gBAAgB;IAWxB;8EAC0E;IAC1E,OAAO,CAAC,sBAAsB;IAa9B,8EAA8E;IAC9E,OAAO,CAAC,OAAO;IAef,wEAAwE;IACxE,OAAO,CAAC,SAAS;IAuEjB;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAoBtB,gEAAgE;IAChE,OAAO,CAAC,oBAAoB;IAK5B,yCAAyC;IACzC,OAAO,IAAI,IAAI;CAchB"}
@@ -0,0 +1,125 @@
1
+ /**
2
+ * Locale strings for the panel surfaces (zh/en). The client registers the
3
+ * dictionary through the locale service like the sibling plugins; copy is
4
+ * deliberately short and technical.
5
+ * @module dsh-filemgr/client/locales
6
+ */
7
+ declare const zh: {
8
+ readonly 'explorer.tabs.files': "文件";
9
+ readonly 'explorer.tabs.changes': "变更";
10
+ readonly 'explorer.search.placeholder': "按文件名搜索";
11
+ readonly 'explorer.search.searching': "搜索中…";
12
+ readonly 'explorer.search.empty': "没有匹配的文件";
13
+ readonly 'explorer.search.error': "搜索失败";
14
+ readonly 'explorer.search.truncated': "结果过多,仅显示前 {count} 条";
15
+ readonly 'explorer.tree.empty': "项目为空";
16
+ readonly 'explorer.collapse': "收起面板";
17
+ readonly 'explorer.expand': "展开面板";
18
+ readonly 'explorer.maximize': "最大化文件面板";
19
+ readonly 'explorer.restore': "还原面板";
20
+ readonly 'explorer.openPreview': "打开预览";
21
+ readonly 'explorer.drag.dropHint': "松手插入文件路径";
22
+ readonly 'scm.repositories': "存储库";
23
+ readonly 'scm.changes': "变更";
24
+ readonly 'scm.staged': "已暂存";
25
+ readonly 'scm.unstaged': "变更";
26
+ readonly 'scm.untracked': "未跟踪";
27
+ readonly 'scm.conflicted': "冲突";
28
+ readonly 'scm.stage': "暂存";
29
+ readonly 'scm.unstage': "取消暂存";
30
+ readonly 'scm.discard': "放弃更改";
31
+ readonly 'scm.stageAll': "全部暂存";
32
+ readonly 'scm.discardAll': "全部放弃";
33
+ readonly 'scm.empty': "没有更改";
34
+ readonly 'scm.notRepo': "当前目录不是 git 仓库";
35
+ readonly 'scm.gitMissing': "未检测到 git,请先安装 git 后重试";
36
+ readonly 'scm.loading': "读取状态中…";
37
+ readonly 'scm.failed': "操作失败";
38
+ readonly 'scm.viewList': "列表视图";
39
+ readonly 'scm.viewTree': "树视图";
40
+ readonly 'scm.discardConfirmTracked': "放弃对 {count} 个文件的更改?此操作不可恢复。";
41
+ readonly 'scm.discardConfirmUntracked': "删除 {count} 个未跟踪文件?此操作不可恢复。";
42
+ readonly 'preview.noTabs': "没有打开的预览";
43
+ readonly 'preview.newUrlTab': "新建 URL 预览";
44
+ readonly 'preview.collapsePanel': "收起预览面板";
45
+ readonly 'preview.maximize': "最大化预览面板";
46
+ readonly 'preview.restore': "还原面板";
47
+ readonly 'preview.source': "源码";
48
+ readonly 'preview.preview': "预览";
49
+ readonly 'preview.editor': "编辑器";
50
+ readonly 'preview.split': "分屏";
51
+ readonly 'preview.refresh': "刷新";
52
+ readonly 'preview.refresh.updated': "文件已在磁盘更新";
53
+ readonly 'preview.save': "保存";
54
+ readonly 'preview.download': "下载";
55
+ readonly 'preview.copyCode': "复制代码";
56
+ readonly 'preview.copyCodeDone': "已复制";
57
+ readonly 'preview.openExternal': "在系统应用中打开";
58
+ readonly 'preview.dirty': "未保存的更改";
59
+ readonly 'preview.closeLeft': "关闭左侧";
60
+ readonly 'preview.closeRight': "关闭右侧";
61
+ readonly 'preview.closeOthers': "关闭其他";
62
+ readonly 'preview.closeAll': "关闭全部";
63
+ readonly 'preview.closeConfirmTitle': "关闭未保存的标签页";
64
+ readonly 'preview.closeConfirmBody': "{count} 个标签页有未保存的更改,关闭将丢失这些更改。";
65
+ readonly 'preview.saved': "已保存";
66
+ readonly 'preview.saveConflict': "文件已在磁盘上被修改,保存冲突:请刷新后重试";
67
+ readonly 'preview.errorOversized': "文件过大,仅加载前 80,000 字符";
68
+ readonly 'preview.unsupported': "此格式暂不支持预览";
69
+ readonly 'preview.downloadHint': "可在系统应用中打开或下载查看";
70
+ readonly 'preview.url.placeholder': "输入网址,回车打开";
71
+ readonly 'preview.url.hint': "按 Esc 还原";
72
+ readonly 'common.cancel': "取消";
73
+ readonly 'common.confirm': "确定";
74
+ readonly 'common.close': "关闭";
75
+ readonly 'common.delete': "删除";
76
+ readonly 'common.copyPath': "复制路径";
77
+ readonly 'common.copied': "已复制";
78
+ readonly 'explorer.menu.copyPath': "复制路径";
79
+ readonly 'explorer.menu.copyName': "复制名称";
80
+ readonly 'explorer.menu.reveal': "在文件管理器中显示";
81
+ readonly 'explorer.menu.openWithDefault': "用默认应用打开";
82
+ readonly 'explorer.menu.rename': "重命名";
83
+ readonly 'explorer.menu.newFile': "新建文件";
84
+ readonly 'explorer.menu.newFolder': "新建文件夹";
85
+ readonly 'explorer.menu.delete': "删除";
86
+ readonly 'explorer.rename.title': "重命名";
87
+ readonly 'explorer.newFile.title': "新建文件";
88
+ readonly 'explorer.newFolder.title': "新建文件夹";
89
+ readonly 'explorer.deleteConfirmTitle': "删除确认";
90
+ readonly 'explorer.deleteConfirmBody': "确定要删除「{name}」吗?此操作不可恢复。";
91
+ readonly 'explorer.opFailed': "操作失败";
92
+ readonly 'explorer.refToInput': "引用到输入框";
93
+ readonly 'settings.title': "右侧面板";
94
+ readonly 'settings.description': "Explorer / Preview 与 SCM 变更面板的总开关。";
95
+ readonly 'settings.enabled': "启用右侧面板";
96
+ readonly 'settings.enabledHint': "关闭后不再挂载右侧文件树与预览列、不显示浮动展开按钮、不注册 /filemgr 路由,也不做工作区监视与 git 轮询;聚合包其余插件不受影响。";
97
+ readonly 'settings.overridden': "已覆盖";
98
+ readonly 'settings.reset': "恢复默认";
99
+ readonly 'settings.notExposed': "当前 DSH 版本未向设置页暴露本插件的配置命名空间,表单不可用。可编辑 ~/.dsh/settings.yaml 直接配置,或为 dsh-host-apiproxy 的 WEB_SETTINGS_NAMESPACES 白名单补充本命名空间后重启。";
100
+ readonly 'settings.readOnly': "当前部署的设置只读。";
101
+ readonly 'settings.inherit': "继承";
102
+ readonly 'settings.on': "开";
103
+ readonly 'settings.off': "关";
104
+ readonly 'settings.expand': "展开设置";
105
+ readonly 'settings.collapse': "收起设置";
106
+ readonly 'settings.save': "保存";
107
+ readonly 'settings.saving': "保存中…";
108
+ readonly 'settings.discard': "放弃";
109
+ readonly 'settings.unsaved': "未保存";
110
+ readonly 'settings.saveFailed': "部署未接受这些值,已保留供你修改。";
111
+ readonly 'settings.invalidNumber': "请输入数字,留空则使用默认值。";
112
+ };
113
+ export type FileManagerPanelKey = keyof typeof zh;
114
+ /** The dictionary namespace this plugin owns. */
115
+ export declare const NS = "filemgr";
116
+ /** Format one copy string with {name} placeholders. */
117
+ export declare function format(template: string, params: Record<string, string | number>): string;
118
+ /** Simple dictionary access (zh/en by a global flag the client sets). */
119
+ export declare const dictionaries: Record<'zh' | 'en', Record<FileManagerPanelKey, string>>;
120
+ /** Set the active language (the client mirrors the locale service). */
121
+ export declare function setLanguage(language: string): void;
122
+ /** Translate one key with optional params. */
123
+ export declare function t(key: FileManagerPanelKey, params?: Record<string, string | number>): string;
124
+ export {};
125
+ //# sourceMappingURL=locales.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/client/locales.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,QAAA,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyGE,CAAA;AA6GV,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,EAAE,CAAA;AAEjD,iDAAiD;AACjD,eAAO,MAAM,EAAE,YAAY,CAAA;AAE3B,uDAAuD;AACvD,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAExF;AAED,yEAAyE;AACzE,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAc,CAAA;AAIhG,uEAAuE;AACvE,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAElD;AAED,8CAA8C;AAC9C,wBAAgB,CAAC,CAAC,GAAG,EAAE,mBAAmB,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAI5F"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Maximize-mode geometry (issue #315): when a panel is maximized the layout
3
+ * controller rewrites the frame grid so the target column takes the whole
4
+ * row (sidebar, details, chat and the other panel collapse to 0px tracks —
5
+ * everything stays mounted, nothing unmounts). On narrow viewports the
6
+ * maximized column instead leaves the grid and renders as a fixed
7
+ * full-screen overlay (mobile-friendly full-screen mode), so the shell's
8
+ * own narrow layout stays untouched behind it.
9
+ * @module dsh-filemgr/client/maximize
10
+ */
11
+ import type { MaximizeTarget } from './store.ts';
12
+ /** Below this available row width the maximized panel renders as a fixed
13
+ * full-screen overlay instead of a grid takeover. */
14
+ export declare const MAXIMIZE_OVERLAY_BREAKPOINT_PX = 640;
15
+ /**
16
+ * The five grid tracks while one panel is maximized: shell sidebar, chat,
17
+ * shell details and the other panel all collapse to 0px; the target column
18
+ * takes the whole measured frame width. Tracks are the same string shape the
19
+ * shell's own inline style uses (px + fr), so nothing else needs to change.
20
+ */
21
+ export declare function maximizedGridTracks(target: MaximizeTarget, frameWidth: number): string;
22
+ /** Whether the maximized panel should render as a fixed full-screen overlay. */
23
+ export declare function maximizedOverlay(availableWidth: number): boolean;
24
+ //# sourceMappingURL=maximize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"maximize.d.ts","sourceRoot":"","sources":["../../../src/client/maximize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD;qDACqD;AACrD,eAAO,MAAM,8BAA8B,MAAM,CAAA;AAEjD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAKtF;AAED,gFAAgF;AAChF,wBAAgB,gBAAgB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAEhE"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * The '@' input-trigger source: a lazy directory-tree browser rooted at the
3
+ * active session's cwd, mirroring the Explorer panel's tree. Each keystroke
4
+ * lists the addressed directory on demand (no precomputed index); picking a
5
+ * file lands a plain-text `@<rel-path>` token in the draft — the same readable
6
+ * reference the Explorer's @-reference button inserts, and the Host validates
7
+ * it as an existence-only workspace reference.
8
+ *
9
+ * Directory navigation: the inline trigger menu cannot expand a directory
10
+ * (it closes on pick, and the shell only re-runs trigger detection on
11
+ * keyboard input), so picking a directory opens the tree-browser modal
12
+ * (FilePickerModal) anchored at that directory — a real recursive tree with
13
+ * lazy expansion, mirroring the pi-desktop picker.
14
+ *
15
+ * Type-only imports from @deepseek-ai/dsh-client-ui-input-trigger/client keep
16
+ * the client bundle purity gate satisfied (the service itself is injected by
17
+ * the shell, never bundled here).
18
+ * @module dsh-filemgr/client/mention
19
+ */
20
+ import type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client';
21
+ import type { InputTriggerServiceContract, InputTriggerSource } from '@deepseek-ai/dsh-client-ui-input-trigger/client';
22
+ import type { PanelApi } from './api.ts';
23
+ declare module '@deepseek-ai/dsh-client-ui-input-trigger/client' {
24
+ interface InputTriggerCandidate {
25
+ /** Workspace-relative path (the token we insert). */
26
+ readonly value?: string;
27
+ /** Whether the entry is a directory (drives the trailing-slash suffix). */
28
+ readonly fmIsDir?: boolean;
29
+ }
30
+ }
31
+ /** Owner source name (lexicon + decoration routing key). Unique per trigger. */
32
+ export declare const SOURCE_NAME = "file-manager";
33
+ /**
34
+ * Build the '@' trigger source over the injected root context + the PanelApi.
35
+ * One source per plugin fiber; it reads the live session root on every key so
36
+ * switching sessions re-roots the browser automatically.
37
+ * @param ctx - root client context (captured for session projection).
38
+ * @param api - the panel fs client (lists directories on demand).
39
+ * @returns the source to register with `inputTriggers.registerSource`.
40
+ */
41
+ export declare function createFileMentionSource(ctx: ClientContext, api: PanelApi): InputTriggerSource;
42
+ /** The typed service contract the shell injects as `inputTriggers`. */
43
+ export type { InputTriggerServiceContract };
44
+ //# sourceMappingURL=mention.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mention.d.ts","sourceRoot":"","sources":["../../../src/client/mention.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAa,MAAM,wCAAwC,CAAA;AACtF,OAAO,KAAK,EAEV,2BAA2B,EAC3B,kBAAkB,EACnB,MAAM,iDAAiD,CAAA;AAExD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAKxC,OAAO,QAAQ,iDAAiD,CAAC;IAC/D,UAAU,qBAAqB;QAC7B,qDAAqD;QACrD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;QACvB,2EAA2E;QAC3E,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAC3B;CACF;AAED,gFAAgF;AAChF,eAAO,MAAM,WAAW,iBAAiB,CAAA;AAyEzC;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,QAAQ,GAAG,kBAAkB,CAmD7F;AAED,uEAAuE;AACvE,YAAY,EAAE,2BAA2B,EAAE,CAAA"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * DOM mounting: two React roots rendered into the panel columns the layout
3
+ * controller appends to the frame grid. The roots wait for their columns
4
+ * (the shell mounts asynchronously), and everything is wrapped so a DOM
5
+ * failure degrades the panels, never the GUI boot.
6
+ * @module dsh-filemgr/client/mount
7
+ */
8
+ import type { PanelStores } from './store.ts';
9
+ import type { FileReferenceSelection } from './preview/selection.ts';
10
+ /**
11
+ * Mount both panel roots.
12
+ * @param stores - the panel store bundle.
13
+ * @param onToggleExplorer - collapse toggle (owned by the layout controller).
14
+ * @param onReference - insert a file-reference chip into the draft for a file
15
+ * (the Explorer row @-reference button); folders should call a different
16
+ * helper because the chip has no line concept for them.
17
+ * @param onAddFileReference - insert a file-reference chip into the draft for
18
+ * a preview selection (path + start/end line).
19
+ * @returns a disposer unmounting both trees.
20
+ */
21
+ export declare function mountPanels(stores: PanelStores, onToggleExplorer: () => void, onReference: (path: string, isDir: boolean) => void, onAddFileReference: (selection: FileReferenceSelection) => boolean): () => void;
22
+ //# sourceMappingURL=mount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mount.d.ts","sourceRoot":"","sources":["../../../src/client/mount.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAG7C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AA0BpE;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,WAAW,EACnB,gBAAgB,EAAE,MAAM,IAAI,EAC5B,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,EACnD,kBAAkB,EAAE,CAAC,SAAS,EAAE,sBAAsB,KAAK,OAAO,GACjE,MAAM,IAAI,CAmBZ"}