@lijian-ui/dsh-file-manager 0.2.1 → 0.2.3
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/lib/assets/mermaid.min.js +3587 -0
- package/lib/client.js +87 -123
- package/lib/client.js.map +1 -1
- package/lib/tsconfig.client.tsbuildinfo +1 -1
- package/lib/types/client/index.d.ts +0 -1
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/picker/FilePickerModal.d.ts +8 -6
- package/lib/types/client/picker/FilePickerModal.d.ts.map +1 -1
- package/lib/types/client/preview/PreviewPanel.d.ts.map +1 -1
- package/lib/types/client/reference.d.ts +6 -10
- package/lib/types/client/reference.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client/DockItem.tsx +1 -1
- package/src/client/components/ExplorerPanel.tsx +1 -1
- package/src/client/components/ScmPanel.tsx +4 -4
- package/src/client/index.ts +3 -14
- package/src/client/layout.ts +2 -2
- package/src/client/picker/FilePickerModal.tsx +62 -43
- package/src/client/preview/PreviewPanel.tsx +1 -0
- package/src/client/preview/content.tsx +1 -1
- package/src/client/reference.ts +13 -8
- package/src/client/styles/picker.module.css +9 -9
- package/src/client/styles/preview.module.css +15 -10
- package/src/client/styles/tokens.module.css +52 -89
- package/src/client/styles/chip.module.css +0 -38
|
@@ -1,83 +1,44 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The panel design system: FileManager's
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* The panel design system: FileManager's tokens, scoped to the plugin's own
|
|
3
|
+
* root elements so they never leak into the shell. The `--aion-*` names are
|
|
4
|
+
* kept as an alias layer that forwards to the official `--dsw-*` token system
|
|
5
|
+
* — dark-mode adaptation is handled by `--dsw-*` itself, so no per-theme
|
|
6
|
+
* override block is needed.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* — including the aou ramp reversal in dark mode and the missing --bg-7.
|
|
8
|
+
* Scoped to BODY, not :root: since the official theme rc.2 the `--dsw-*`
|
|
9
|
+
* semantic tokens live on `body` (not html), so an alias defined at :root
|
|
10
|
+
* would substitute var() against an undefined name and compute to the
|
|
11
|
+
* guaranteed-invalid value (""), killing every background that consumes it.
|
|
12
|
+
* On body the dsw tokens resolve and the aliases inherit to all visible
|
|
13
|
+
* elements — including the DOM-created chrome (panel columns, drag handles,
|
|
14
|
+
* the '@' picker portal) appended outside any React subtree.
|
|
16
15
|
*/
|
|
17
|
-
:global(
|
|
18
|
-
--aion-bg-base:
|
|
19
|
-
--aion-bg-1:
|
|
20
|
-
--aion-bg-2:
|
|
21
|
-
--aion-bg-3:
|
|
22
|
-
--aion-bg-
|
|
23
|
-
--aion-bg-
|
|
24
|
-
--aion-
|
|
25
|
-
--aion-text-
|
|
26
|
-
--aion-text-
|
|
27
|
-
--aion-text-
|
|
28
|
-
--aion-
|
|
29
|
-
--aion-
|
|
30
|
-
--aion-
|
|
31
|
-
--aion-
|
|
32
|
-
--aion-
|
|
33
|
-
--aion-
|
|
34
|
-
--aion-aou-2:
|
|
35
|
-
--aion-aou-
|
|
36
|
-
--aion-
|
|
37
|
-
--aion-
|
|
38
|
-
--aion-
|
|
39
|
-
--aion-
|
|
40
|
-
--
|
|
41
|
-
--aion-
|
|
42
|
-
--aion-
|
|
43
|
-
--aion-font-sans: -apple-system, "system-ui", "Segoe UI", Roboto, "Helvetica Neue",
|
|
44
|
-
"PingFang SC", "Microsoft YaHei", sans-serif;
|
|
45
|
-
--aion-font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
|
|
46
|
-
"Liberation Mono", monospace;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/* The shell marks dark mode with body[data-ds-dark-theme]; the panel tokens
|
|
50
|
-
follow it with zero JS wiring (the theme service toggles the attribute).
|
|
51
|
-
Scoped to body so third-party themes cannot override them from :root.
|
|
52
|
-
Global by intent (tokens reach the DOM-added columns/handles); the dark
|
|
53
|
-
color-scheme is only asserted here so the host's own light default wins. */
|
|
54
|
-
:global(body[data-ds-dark-theme]) {
|
|
55
|
-
--aion-bg-base: #0e0e0e;
|
|
56
|
-
--aion-bg-1: #1a1a1a;
|
|
57
|
-
--aion-bg-2: #262626;
|
|
58
|
-
--aion-bg-3: #333333;
|
|
59
|
-
--aion-bg-hover: #1f1f1f;
|
|
60
|
-
--aion-bg-active: #2d2d2d;
|
|
61
|
-
--aion-text-primary: #ffffff;
|
|
62
|
-
--aion-text-secondary: #ced3da;
|
|
63
|
-
--aion-text-tertiary: #737373;
|
|
64
|
-
--aion-text-disabled: #737373;
|
|
65
|
-
--aion-primary: #4d9fff;
|
|
66
|
-
--aion-success: #23c343;
|
|
67
|
-
--aion-warning: #ff9a2e;
|
|
68
|
-
--aion-danger: #f76560;
|
|
69
|
-
--aion-brand: #a1aacb;
|
|
70
|
-
--aion-aou-1: #2a2a2a;
|
|
71
|
-
--aion-aou-2: #3d4150;
|
|
72
|
-
--aion-aou-3: #525a77;
|
|
73
|
-
--aion-aou-4: #6a749b;
|
|
74
|
-
--aion-aou-5: #838fba;
|
|
75
|
-
--aion-aou-6: #a1aacb;
|
|
76
|
-
--aion-fill-2: rgba(255, 255, 255, 0.08);
|
|
77
|
-
--aion-fill-3: rgba(255, 255, 255, 0.12);
|
|
78
|
-
--aion-border-base: #333333;
|
|
79
|
-
--aion-overlay-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
|
|
80
|
-
color-scheme: dark;
|
|
16
|
+
:global(body) {
|
|
17
|
+
--aion-bg-base: var(--dsw-alias-bg-base);
|
|
18
|
+
--aion-bg-1: var(--dsw-alias-bg-layer-1);
|
|
19
|
+
--aion-bg-2: var(--dsw-alias-bg-layer-2);
|
|
20
|
+
--aion-bg-3: var(--dsw-alias-bg-layer-3);
|
|
21
|
+
--aion-bg-4: var(--dsw-alias-label-dimmed);
|
|
22
|
+
--aion-bg-hover: var(--dsw-alias-interactive-bg-hover);
|
|
23
|
+
--aion-bg-active: var(--dsw-alias-interactive-bg-active);
|
|
24
|
+
--aion-text-primary: var(--dsw-alias-label-primary);
|
|
25
|
+
--aion-text-secondary: var(--dsw-alias-label-secondary);
|
|
26
|
+
--aion-text-tertiary: var(--dsw-alias-label-tertiary);
|
|
27
|
+
--aion-text-disabled: var(--dsw-alias-label-dimmed);
|
|
28
|
+
--aion-primary: var(--dsw-alias-state-business-primary);
|
|
29
|
+
--aion-success: var(--dsw-alias-state-success-primary);
|
|
30
|
+
--aion-warning: var(--dsw-alias-state-warn-primary);
|
|
31
|
+
--aion-danger: var(--dsw-alias-state-error-primary);
|
|
32
|
+
--aion-brand: var(--dsw-alias-brand-primary);
|
|
33
|
+
--aion-aou-2: var(--dsw-alias-bg-layer-2);
|
|
34
|
+
--aion-aou-6: var(--dsw-alias-brand-primary);
|
|
35
|
+
--aion-fill-2: var(--dsw-alias-interactive-bg-hover);
|
|
36
|
+
--aion-fill-3: var(--dsw-alias-interactive-bg-hover-solid);
|
|
37
|
+
--aion-border-base: var(--dsw-alias-border-l2);
|
|
38
|
+
--aion-overlay-shadow: var(--dsw-shadow-lv2);
|
|
39
|
+
/* 官方字体 token;mono 用本地栈 —— 当前主题版本尚无 --dsw-alias-font-family-mono */
|
|
40
|
+
--aion-font-sans: var(--dsw-font-family);
|
|
41
|
+
--aion-font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
|
|
81
42
|
}
|
|
82
43
|
|
|
83
44
|
|
|
@@ -105,7 +66,7 @@
|
|
|
105
66
|
border-radius: 4px;
|
|
106
67
|
}
|
|
107
68
|
:global(.filemgr-root ::-webkit-scrollbar-thumb:hover) {
|
|
108
|
-
background: var(--aion-bg-4
|
|
69
|
+
background: var(--aion-bg-4);
|
|
109
70
|
}
|
|
110
71
|
:global(.filemgr-root ::-webkit-scrollbar-track) {
|
|
111
72
|
background: transparent;
|
|
@@ -242,7 +203,7 @@
|
|
|
242
203
|
display: flex;
|
|
243
204
|
align-items: center;
|
|
244
205
|
justify-content: center;
|
|
245
|
-
background:
|
|
206
|
+
background: var(--dsw-alias-bg-mask-1);
|
|
246
207
|
}
|
|
247
208
|
:global(.filemgr-dialog) {
|
|
248
209
|
width: 400px;
|
|
@@ -293,28 +254,30 @@
|
|
|
293
254
|
outline-offset: 2px;
|
|
294
255
|
}
|
|
295
256
|
:global(.filemgr-btn-primary) {
|
|
296
|
-
background: var(--
|
|
297
|
-
border-color: var(--
|
|
298
|
-
color:
|
|
257
|
+
background: var(--dsw-alias-button-primary-fill);
|
|
258
|
+
border-color: var(--dsw-alias-button-primary-fill);
|
|
259
|
+
color: var(--dsw-alias-label-primary-foreground);
|
|
299
260
|
}
|
|
300
261
|
:global(.filemgr-btn-primary:hover) {
|
|
301
|
-
background: var(--
|
|
302
|
-
|
|
262
|
+
background: var(--dsw-alias-button-primary-hover);
|
|
263
|
+
border-color: var(--dsw-alias-button-primary-hover);
|
|
303
264
|
}
|
|
304
265
|
:global(.filemgr-btn-primary:active) {
|
|
305
|
-
|
|
306
|
-
|
|
266
|
+
background: var(--dsw-alias-button-primary-hover);
|
|
267
|
+
border-color: var(--dsw-alias-button-primary-hover);
|
|
307
268
|
}
|
|
308
269
|
:global(.filemgr-btn-danger) {
|
|
309
270
|
background: var(--aion-danger);
|
|
310
271
|
border-color: var(--aion-danger);
|
|
311
|
-
color:
|
|
272
|
+
color: var(--dsw-alias-label-primary-foreground);
|
|
312
273
|
}
|
|
313
274
|
:global(.filemgr-btn-danger:hover) {
|
|
314
|
-
|
|
275
|
+
background: color-mix(in srgb, var(--aion-danger) 88%, black);
|
|
276
|
+
border-color: color-mix(in srgb, var(--aion-danger) 88%, black);
|
|
315
277
|
}
|
|
316
278
|
:global(.filemgr-btn-danger:active) {
|
|
317
|
-
|
|
279
|
+
background: color-mix(in srgb, var(--aion-danger) 78%, black);
|
|
280
|
+
border-color: color-mix(in srgb, var(--aion-danger) 78%, black);
|
|
318
281
|
}
|
|
319
282
|
|
|
320
283
|
/* Context menu (tab right-click / tree right-click). */
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Global restyle of the shell's reference chips to the file-reference look
|
|
3
|
-
* (the user's screenshot): a muted rounded pill with a green `</>` code
|
|
4
|
-
* glyph. The shell renders every U+FFFC chip with `data-decoration="chip"`
|
|
5
|
-
* (InputBar), so this file overrides its default blue tint through that
|
|
6
|
-
* attribute — the hash-scoped `.chip` class stays untouched and alignment
|
|
7
|
-
* (the U+FFFC advance cell) is preserved because the glyph comes from the
|
|
8
|
-
* label cell's ::before, not the placeholder cell's.
|
|
9
|
-
*
|
|
10
|
-
* Side effect: chips of other sources (skills, subagents) pick up the same
|
|
11
|
-
* pill look — a uniform, muted family, which the shell's default blue
|
|
12
|
-
* already intended.
|
|
13
|
-
* @module dsh-filemgr/client/styles/chip
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
:global([data-decoration="chip"]) {
|
|
17
|
-
background: rgba(15, 23, 42, 0.06);
|
|
18
|
-
border-radius: 6px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
:global(body[data-ds-dark-theme] [data-decoration="chip"]) {
|
|
22
|
-
background: rgba(255, 255, 255, 0.1);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/* The label cell keeps the shell's default 0.72 compensated scale (no
|
|
26
|
-
override here) — the pill text renders at the composer's native size. */
|
|
27
|
-
|
|
28
|
-
/* The green `</>` glyph, drawn inside the label cell (absolute-positioned by
|
|
29
|
-
the shell, so this never shifts the placeholder advance). */
|
|
30
|
-
:global([data-decoration="chip"] > span::before) {
|
|
31
|
-
content: "</>";
|
|
32
|
-
color: var(--aion-success, #16a34a);
|
|
33
|
-
font-family: var(--aion-font-mono, ui-monospace, Menlo, Consolas, monospace);
|
|
34
|
-
font-size: 0.85em;
|
|
35
|
-
font-weight: 700;
|
|
36
|
-
margin-right: 4px;
|
|
37
|
-
letter-spacing: -0.5px;
|
|
38
|
-
}
|