@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,344 @@
1
+ /**
2
+ * File-picker modal styles — a faithful adaptation of the pi-desktop
3
+ * AtFilePicker look (520px modal, 30px rows, 16px checkboxes, chip row),
4
+ * mapped onto the panel design-system tokens (--aion-*, dark-aware).
5
+ * @module dsh-filemgr/client/styles/picker
6
+ */
7
+
8
+ .overlay {
9
+ position: fixed;
10
+ inset: 0;
11
+ background: rgba(0, 0, 0, 0.45);
12
+ display: flex;
13
+ align-items: center;
14
+ justify-content: center;
15
+ z-index: 9000;
16
+ }
17
+
18
+ .modal {
19
+ width: 520px;
20
+ max-width: 92vw;
21
+ max-height: 76vh;
22
+ display: flex;
23
+ flex-direction: column;
24
+ background: var(--aion-bg-base);
25
+ border: 1px solid var(--aion-border-base);
26
+ border-radius: 10px;
27
+ box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
28
+ overflow: hidden;
29
+ font-family: var(--aion-font-sans);
30
+ color: var(--aion-text-primary);
31
+ }
32
+
33
+ .header {
34
+ padding: 12px 14px;
35
+ border-bottom: 1px solid var(--aion-border-base);
36
+ display: flex;
37
+ flex-direction: column;
38
+ gap: 8px;
39
+ flex: none;
40
+ }
41
+
42
+ .titleRow {
43
+ display: flex;
44
+ align-items: center;
45
+ justify-content: space-between;
46
+ }
47
+
48
+ .title {
49
+ font-size: 14px;
50
+ font-weight: 600;
51
+ }
52
+
53
+ .closeBtn {
54
+ display: inline-flex;
55
+ align-items: center;
56
+ justify-content: center;
57
+ width: 26px;
58
+ height: 26px;
59
+ border: none;
60
+ background: transparent;
61
+ color: var(--aion-text-secondary);
62
+ border-radius: 6px;
63
+ cursor: pointer;
64
+ }
65
+
66
+ .closeBtn:hover {
67
+ background: var(--aion-bg-hover);
68
+ color: var(--aion-text-primary);
69
+ }
70
+
71
+ .searchWrap {
72
+ display: flex;
73
+ align-items: center;
74
+ gap: 6px;
75
+ background: var(--aion-bg-1);
76
+ border: 1px solid var(--aion-border-base);
77
+ border-radius: 8px;
78
+ padding: 0 8px;
79
+ height: 34px;
80
+ }
81
+
82
+ .searchWrap:focus-within {
83
+ border-color: var(--aion-primary);
84
+ }
85
+
86
+ .searchIcon {
87
+ color: var(--aion-text-secondary);
88
+ flex-shrink: 0;
89
+ display: inline-flex;
90
+ }
91
+
92
+ .searchInput {
93
+ flex: 1;
94
+ min-width: 0;
95
+ border: none;
96
+ background: transparent;
97
+ outline: none;
98
+ color: var(--aion-text-primary);
99
+ font-size: 13px;
100
+ font-family: var(--aion-font-sans);
101
+ }
102
+
103
+ .searchInput::placeholder {
104
+ color: var(--aion-text-tertiary);
105
+ }
106
+
107
+ .searchClear {
108
+ display: inline-flex;
109
+ align-items: center;
110
+ justify-content: center;
111
+ width: 20px;
112
+ height: 20px;
113
+ border: none;
114
+ background: transparent;
115
+ color: var(--aion-text-secondary);
116
+ cursor: pointer;
117
+ border-radius: 4px;
118
+ flex-shrink: 0;
119
+ }
120
+
121
+ .searchClear:hover {
122
+ background: var(--aion-bg-hover);
123
+ }
124
+
125
+ .rootPath {
126
+ font-size: 11px;
127
+ color: var(--aion-text-tertiary);
128
+ font-family: var(--aion-font-mono);
129
+ white-space: nowrap;
130
+ overflow: hidden;
131
+ text-overflow: ellipsis;
132
+ }
133
+
134
+ .body {
135
+ flex: 1;
136
+ min-height: 0;
137
+ overflow-y: auto;
138
+ padding: 6px;
139
+ display: flex;
140
+ flex-direction: column;
141
+ gap: 2px;
142
+ }
143
+
144
+ .row {
145
+ display: flex;
146
+ align-items: center;
147
+ gap: 6px;
148
+ height: 30px;
149
+ padding-right: 8px;
150
+ border-radius: 4px;
151
+ cursor: pointer;
152
+ user-select: none;
153
+ color: var(--aion-text-primary);
154
+ }
155
+
156
+ .row:hover {
157
+ background: var(--aion-bg-hover);
158
+ }
159
+
160
+ .rowSelected {
161
+ background: rgba(22, 93, 255, 0.12);
162
+ }
163
+
164
+ .rowSelected:hover {
165
+ background: rgba(22, 93, 255, 0.18);
166
+ }
167
+
168
+ .chev {
169
+ display: inline-flex;
170
+ align-items: center;
171
+ justify-content: center;
172
+ width: 18px;
173
+ height: 18px;
174
+ color: var(--aion-text-secondary);
175
+ flex-shrink: 0;
176
+ border-radius: 4px;
177
+ }
178
+
179
+ .chev:hover {
180
+ color: var(--aion-text-primary);
181
+ background: var(--aion-bg-active);
182
+ }
183
+
184
+ .chevSpacer {
185
+ width: 18px;
186
+ flex-shrink: 0;
187
+ }
188
+
189
+ .icon {
190
+ display: inline-flex;
191
+ align-items: center;
192
+ justify-content: center;
193
+ color: var(--aion-text-secondary);
194
+ flex-shrink: 0;
195
+ }
196
+
197
+ .name {
198
+ flex: 1;
199
+ min-width: 0;
200
+ font-size: 13px;
201
+ white-space: nowrap;
202
+ overflow: hidden;
203
+ text-overflow: ellipsis;
204
+ display: flex;
205
+ flex-direction: column;
206
+ gap: 1px;
207
+ }
208
+
209
+ .subpath {
210
+ font-size: 10px;
211
+ color: var(--aion-text-tertiary);
212
+ font-family: var(--aion-font-mono);
213
+ }
214
+
215
+ .check {
216
+ display: inline-flex;
217
+ align-items: center;
218
+ justify-content: center;
219
+ width: 16px;
220
+ height: 16px;
221
+ border: 1px solid var(--aion-border-base);
222
+ border-radius: 4px;
223
+ color: #fff;
224
+ flex-shrink: 0;
225
+ background: transparent;
226
+ }
227
+
228
+ .checkOn {
229
+ background: var(--aion-primary);
230
+ border-color: var(--aion-primary);
231
+ }
232
+
233
+ .note {
234
+ font-size: 12px;
235
+ color: var(--aion-text-tertiary);
236
+ padding: 4px 8px;
237
+ }
238
+
239
+ .footer {
240
+ border-top: 1px solid var(--aion-border-base);
241
+ padding: 10px 14px;
242
+ display: flex;
243
+ flex-direction: column;
244
+ gap: 10px;
245
+ flex: none;
246
+ }
247
+
248
+ .chips {
249
+ display: flex;
250
+ flex-wrap: wrap;
251
+ gap: 6px;
252
+ min-height: 24px;
253
+ align-items: center;
254
+ }
255
+
256
+ .chipsEmpty {
257
+ font-size: 12px;
258
+ color: var(--aion-text-tertiary);
259
+ }
260
+
261
+ .chip {
262
+ display: inline-flex;
263
+ align-items: center;
264
+ gap: 4px;
265
+ max-width: 260px;
266
+ height: 24px;
267
+ padding: 0 4px 0 8px;
268
+ background: var(--aion-bg-hover);
269
+ border: 1px solid var(--aion-border-base);
270
+ border-radius: 999px;
271
+ font-size: 12px;
272
+ color: var(--aion-text-primary);
273
+ font-family: var(--aion-font-mono);
274
+ }
275
+
276
+ .chip span {
277
+ overflow: hidden;
278
+ text-overflow: ellipsis;
279
+ white-space: nowrap;
280
+ }
281
+
282
+ .chipX {
283
+ display: inline-flex;
284
+ align-items: center;
285
+ justify-content: center;
286
+ width: 16px;
287
+ height: 16px;
288
+ border: none;
289
+ background: transparent;
290
+ color: var(--aion-text-secondary);
291
+ cursor: pointer;
292
+ border-radius: 4px;
293
+ flex-shrink: 0;
294
+ }
295
+
296
+ .chipX:hover {
297
+ background: rgba(0, 0, 0, 0.12);
298
+ color: var(--aion-text-primary);
299
+ }
300
+
301
+ .footerActions {
302
+ display: flex;
303
+ justify-content: flex-end;
304
+ gap: 8px;
305
+ }
306
+
307
+ .cancelBtn {
308
+ height: 32px;
309
+ padding: 0 16px;
310
+ border: 1px solid var(--aion-border-base);
311
+ background: transparent;
312
+ color: var(--aion-text-secondary);
313
+ border-radius: 6px;
314
+ font-size: 13px;
315
+ cursor: pointer;
316
+ font-family: var(--aion-font-sans);
317
+ }
318
+
319
+ .cancelBtn:hover {
320
+ background: var(--aion-bg-hover);
321
+ color: var(--aion-text-primary);
322
+ }
323
+
324
+ .insertBtn {
325
+ height: 32px;
326
+ padding: 0 16px;
327
+ border: none;
328
+ background: var(--aion-primary);
329
+ color: #fff;
330
+ border-radius: 6px;
331
+ font-size: 13px;
332
+ font-weight: 500;
333
+ cursor: pointer;
334
+ font-family: var(--aion-font-sans);
335
+ }
336
+
337
+ .insertBtn:hover:not(:disabled) {
338
+ filter: brightness(1.1);
339
+ }
340
+
341
+ .insertBtn:disabled {
342
+ opacity: 0.4;
343
+ cursor: default;
344
+ }