@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,380 @@
1
+ /**
2
+ * SCM (Changes) panel styles: VS Code-like section headers (24px), change
3
+ * rows with A/M/D state badges, stage/unstage/discard icon buttons.
4
+ */
5
+
6
+ .panel {
7
+ display: flex;
8
+ flex-direction: column;
9
+ height: 100%;
10
+ min-height: 0;
11
+ }
12
+
13
+ /* Section: header + body. */
14
+ .section {
15
+ display: flex;
16
+ flex-direction: column;
17
+ min-height: 0;
18
+ flex-shrink: 0;
19
+ }
20
+
21
+ .sectionHeader {
22
+ display: flex;
23
+ align-items: center;
24
+ gap: 6px;
25
+ height: 24px;
26
+ padding: 0 8px;
27
+ cursor: pointer;
28
+ user-select: none;
29
+ flex-shrink: 0;
30
+ background: var(--aion-bg-1);
31
+ }
32
+
33
+ .sectionHeader:hover {
34
+ background: var(--aion-bg-hover);
35
+ }
36
+
37
+ .sectionHeader:active {
38
+ background: var(--aion-bg-active);
39
+ }
40
+
41
+ .sectionHeader:focus-visible {
42
+ box-shadow: inset 0 0 0 2px var(--aion-primary);
43
+ }
44
+
45
+ .sectionTitle {
46
+ font-size: 12px;
47
+ font-weight: 600;
48
+ color: var(--aion-text-primary);
49
+ overflow: hidden;
50
+ text-overflow: ellipsis;
51
+ white-space: nowrap;
52
+ flex: 1;
53
+ min-width: 0;
54
+ }
55
+
56
+ .sectionChevron {
57
+ display: flex;
58
+ align-items: center;
59
+ color: var(--aion-text-secondary);
60
+ transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
61
+ }
62
+
63
+ .sectionChevronOpen {
64
+ transform: rotate(90deg);
65
+ }
66
+
67
+ .sectionAction {
68
+ display: flex;
69
+ align-items: center;
70
+ justify-content: center;
71
+ width: 22px;
72
+ height: 22px;
73
+ border: none;
74
+ border-radius: 4px;
75
+ background: transparent;
76
+ color: var(--aion-text-secondary);
77
+ cursor: pointer;
78
+ padding: 0;
79
+ transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
80
+ flex-shrink: 0;
81
+ }
82
+
83
+ .sectionAction:hover {
84
+ background: var(--aion-bg-3);
85
+ color: var(--aion-text-primary);
86
+ }
87
+
88
+ .sectionAction:active {
89
+ background: var(--aion-bg-active);
90
+ }
91
+
92
+ .sectionAction:focus-visible {
93
+ outline: 2px solid var(--aion-primary);
94
+ outline-offset: 2px;
95
+ }
96
+
97
+ .sectionAction:disabled {
98
+ opacity: 0.4;
99
+ cursor: default;
100
+ }
101
+
102
+ .sectionAction:disabled:hover {
103
+ background: transparent;
104
+ color: var(--aion-text-secondary);
105
+ }
106
+
107
+ .sectionBody {
108
+ overflow-y: auto;
109
+ overflow-x: hidden;
110
+ min-height: 0;
111
+ flex-shrink: 1;
112
+ }
113
+
114
+ /* Branch row inside the repositories section. */
115
+ .branchRow {
116
+ display: flex;
117
+ align-items: center;
118
+ gap: 6px;
119
+ height: 26px;
120
+ padding: 0 8px 0 12px;
121
+ font-size: 13px;
122
+ color: var(--aion-text-primary);
123
+ }
124
+
125
+ .branchName {
126
+ overflow: hidden;
127
+ text-overflow: ellipsis;
128
+ white-space: nowrap;
129
+ }
130
+
131
+ /* One change row. */
132
+ .changeRow {
133
+ display: flex;
134
+ align-items: center;
135
+ gap: 6px;
136
+ height: 26px;
137
+ padding: 0 8px 0 12px;
138
+ cursor: pointer;
139
+ white-space: nowrap;
140
+ transition: background-color 0.12s ease;
141
+ }
142
+
143
+ .changeRow:hover {
144
+ background: var(--aion-fill-2);
145
+ }
146
+
147
+ .changeRow:active {
148
+ background: var(--aion-bg-active);
149
+ }
150
+
151
+ .changeRow:focus-visible {
152
+ box-shadow: inset 0 0 0 2px var(--aion-primary);
153
+ }
154
+
155
+ .changeRowSelected {
156
+ background: var(--aion-fill-3);
157
+ }
158
+
159
+ .changeRowSelected:hover {
160
+ background: var(--aion-fill-3);
161
+ }
162
+
163
+ .badge {
164
+ width: 16px;
165
+ height: 16px;
166
+ display: flex;
167
+ align-items: center;
168
+ justify-content: center;
169
+ font-size: 11px;
170
+ font-weight: 600;
171
+ border-radius: 3px;
172
+ flex-shrink: 0;
173
+ font-family: var(--aion-font-mono);
174
+ }
175
+
176
+ .badgeCreated {
177
+ color: var(--aion-success);
178
+ background: color-mix(in srgb, var(--aion-success) 14%, transparent);
179
+ }
180
+
181
+ .badgeModified {
182
+ color: var(--aion-warning);
183
+ background: color-mix(in srgb, var(--aion-warning) 14%, transparent);
184
+ }
185
+
186
+ .badgeDeleted {
187
+ color: var(--aion-danger);
188
+ background: color-mix(in srgb, var(--aion-danger) 14%, transparent);
189
+ }
190
+
191
+ .badgeConflicted {
192
+ color: var(--aion-danger);
193
+ background: color-mix(in srgb, var(--aion-danger) 18%, transparent);
194
+ border: 1px solid var(--aion-danger);
195
+ }
196
+
197
+ .badgeUntracked {
198
+ color: var(--aion-text-tertiary);
199
+ background: var(--aion-fill-2);
200
+ }
201
+
202
+ .changeName {
203
+ overflow: hidden;
204
+ text-overflow: ellipsis;
205
+ font-size: 13px;
206
+ color: var(--aion-text-primary);
207
+ flex: 1;
208
+ min-width: 0;
209
+ }
210
+
211
+ .changeDir {
212
+ overflow: hidden;
213
+ text-overflow: ellipsis;
214
+ font-size: 11px;
215
+ color: var(--aion-text-tertiary);
216
+ flex-shrink: 1;
217
+ min-width: 0;
218
+ }
219
+
220
+ .rowActions {
221
+ display: flex;
222
+ align-items: center;
223
+ gap: 2px;
224
+ flex-shrink: 0;
225
+ opacity: 0;
226
+ transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
227
+ }
228
+
229
+ .changeRow:hover .rowActions,
230
+ .changeRow:focus-within .rowActions,
231
+ .rowActionsVisible {
232
+ opacity: 1;
233
+ }
234
+
235
+ .rowAction {
236
+ display: flex;
237
+ align-items: center;
238
+ justify-content: center;
239
+ width: 22px;
240
+ height: 22px;
241
+ border: none;
242
+ border-radius: 4px;
243
+ background: transparent;
244
+ color: var(--aion-text-secondary);
245
+ cursor: pointer;
246
+ padding: 0;
247
+ transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
248
+ }
249
+
250
+ .rowAction:hover {
251
+ background: var(--aion-bg-3);
252
+ color: var(--aion-text-primary);
253
+ }
254
+
255
+ .rowAction:active {
256
+ background: var(--aion-bg-active);
257
+ }
258
+
259
+ .rowAction:focus-visible {
260
+ outline: 2px solid var(--aion-primary);
261
+ outline-offset: 2px;
262
+ }
263
+
264
+ .rowAction:disabled {
265
+ opacity: 0.4;
266
+ cursor: default;
267
+ }
268
+
269
+ .rowAction:disabled:hover {
270
+ background: transparent;
271
+ color: var(--aion-text-secondary);
272
+ }
273
+
274
+ .rowFailed {
275
+ color: var(--aion-danger);
276
+ }
277
+
278
+ .groupTitle {
279
+ display: flex;
280
+ align-items: center;
281
+ gap: 6px;
282
+ height: 22px;
283
+ padding: 0 8px 0 12px;
284
+ font-size: 11px;
285
+ font-weight: 600;
286
+ color: var(--aion-text-tertiary);
287
+ background: var(--aion-bg-2);
288
+ flex-shrink: 0;
289
+ }
290
+
291
+ .groupAction {
292
+ display: flex;
293
+ align-items: center;
294
+ justify-content: center;
295
+ width: 18px;
296
+ height: 18px;
297
+ border: none;
298
+ border-radius: 3px;
299
+ background: transparent;
300
+ color: var(--aion-text-secondary);
301
+ cursor: pointer;
302
+ padding: 0;
303
+ }
304
+
305
+ .groupAction:hover {
306
+ background: var(--aion-bg-3);
307
+ color: var(--aion-text-primary);
308
+ }
309
+
310
+ .groupAction:active {
311
+ background: var(--aion-bg-active);
312
+ }
313
+
314
+ .groupAction:focus-visible {
315
+ outline: 2px solid var(--aion-primary);
316
+ outline-offset: 2px;
317
+ }
318
+
319
+ .groupAction:disabled {
320
+ opacity: 0.4;
321
+ cursor: default;
322
+ }
323
+
324
+ .groupAction:disabled:hover {
325
+ background: transparent;
326
+ color: var(--aion-text-secondary);
327
+ }
328
+
329
+ /* Tree-view directory rows (display-only regrouping). */
330
+ .dirRow {
331
+ display: flex;
332
+ align-items: center;
333
+ gap: 4px;
334
+ height: 26px;
335
+ cursor: pointer;
336
+ white-space: nowrap;
337
+ transition: background-color 0.12s ease;
338
+ }
339
+
340
+ .dirRow:hover {
341
+ background: var(--aion-fill-2);
342
+ }
343
+
344
+ .dirRow:active {
345
+ background: var(--aion-bg-active);
346
+ }
347
+
348
+ .dirRow:focus-visible {
349
+ box-shadow: inset 0 0 0 2px var(--aion-primary);
350
+ }
351
+
352
+ .dirArrow {
353
+ display: flex;
354
+ align-items: center;
355
+ color: var(--aion-text-tertiary);
356
+ transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
357
+ }
358
+
359
+ .dirArrowOpen {
360
+ transform: rotate(90deg);
361
+ }
362
+
363
+ .empty {
364
+ padding: 16px 12px;
365
+ font-size: 12px;
366
+ color: var(--aion-text-tertiary);
367
+ }
368
+
369
+ .loading {
370
+ padding: 16px 12px;
371
+ font-size: 12px;
372
+ color: var(--aion-text-tertiary);
373
+ }
374
+
375
+ .notRepo {
376
+ padding: 16px 12px;
377
+ font-size: 12px;
378
+ color: var(--aion-text-tertiary);
379
+ line-height: 1.6;
380
+ }