minecodex 2.0.31 → 2.0.33
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/apps/dashboard/app.js +79 -46
- package/apps/dashboard/assets/data-transfer.js +19 -13
- package/apps/dashboard/assets/feature-previews.js +206 -0
- package/apps/dashboard/assets/languages.svg +18 -0
- package/apps/dashboard/assets/preview-content.js +41 -0
- package/apps/dashboard/assets/previews/manifest.json +1 -0
- package/apps/dashboard/index.html +25 -29
- package/apps/dashboard/styles.css +94 -103
- package/package.json +1 -1
- package/packages/cli/src/control-server.mjs +7 -2
- package/packages/plugin/assets/app.js +30 -30
- package/packages/plugin/assets/prompts.js +4 -3
- package/packages/plugin/src/app.mjs +0 -1
- package/packages/plugin/src/server.mjs +3 -1
- package/packages/plugin/src/ui-resource.mjs +18 -2
- package/apps/dashboard/assets/OFL.txt +0 -93
- package/apps/dashboard/assets/silkscreen.ttf +0 -0
- package/apps/dashboard/assets/terrain.js +0 -89
|
@@ -6,38 +6,30 @@
|
|
|
6
6
|
<meta name="color-scheme" content="light dark">
|
|
7
7
|
<title>MineCodex</title>
|
|
8
8
|
<link rel="icon" href="/favicon.svg?v=minecodex-1" type="image/svg+xml">
|
|
9
|
-
<link rel="stylesheet" href="/styles.css?v=mcx-
|
|
10
|
-
<script type="module" src="/app.js?v=mcx-
|
|
11
|
-
<script type="module" src="/assets/terrain.js"></script>
|
|
9
|
+
<link rel="stylesheet" href="/styles.css?v=mcx-native-1">
|
|
10
|
+
<script type="module" src="/app.js?v=mcx-native-1"></script>
|
|
12
11
|
<script type="module" src="/assets/data-transfer.js"></script>
|
|
13
12
|
</head>
|
|
14
13
|
<body>
|
|
15
14
|
<div class="dashboard-surface">
|
|
16
|
-
<canvas id="agent-world" aria-hidden="true"></canvas>
|
|
17
15
|
<main class="shell">
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<button data-language-choice="en" type="button" lang="en" aria-pressed="false">EN</button>
|
|
16
|
+
<div class="header-actions">
|
|
17
|
+
<div class="language-toggle">
|
|
18
|
+
<button id="language-button" class="language-button" type="button" popovertarget="language-menu" aria-haspopup="true" aria-expanded="false"><span class="ui-icon language-icon" aria-hidden="true"></span></button>
|
|
19
|
+
<div id="language-menu" class="language-menu" popover="auto" role="group" aria-label="Language">
|
|
20
|
+
<button data-language-choice="zh-CN" type="button" lang="zh-CN" aria-pressed="false">中文</button>
|
|
21
|
+
<button data-language-choice="en" type="button" lang="en" aria-pressed="false">English</button>
|
|
22
|
+
</div>
|
|
26
23
|
</div>
|
|
27
24
|
<div class="theme-toggle" role="group" aria-label="Appearance">
|
|
28
|
-
<span class="
|
|
29
|
-
<button data-theme-choice="light" type="button" aria-label="Light appearance" aria-pressed="false"><span class="ui-icon sun-icon" aria-hidden="true"></span></button>
|
|
30
|
-
<button data-theme-choice="dark" type="button" aria-label="Dark appearance" aria-pressed="false"><span class="ui-icon moon-icon" aria-hidden="true"></span></button>
|
|
25
|
+
<button id="theme-button" data-theme-choice="light" type="button" aria-label="Light appearance"><span class="ui-icon sun-icon" aria-hidden="true"></span></button>
|
|
31
26
|
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</header>
|
|
34
|
-
<div class="overview">
|
|
35
|
-
<div class="runtime-state" aria-live="polite">
|
|
36
|
-
<span id="runtime-dot" class="status-dot" aria-hidden="true"></span>
|
|
37
|
-
<span id="runtime-label">Connecting…</span>
|
|
38
|
-
</div>
|
|
39
27
|
</div>
|
|
40
|
-
|
|
28
|
+
<header class="page-header">
|
|
29
|
+
<h1><span class="brand-icon" aria-hidden="true"></span><span class="brand-name">MineCodex</span></h1>
|
|
30
|
+
<p id="brand-slogan" class="brand-slogan"></p>
|
|
31
|
+
<p id="brand-description" class="brand-description"></p>
|
|
32
|
+
</header>
|
|
41
33
|
<section id="restart-notice" class="restart-notice" hidden aria-live="polite">
|
|
42
34
|
<span class="notice-icon ui-icon info-icon" aria-hidden="true"></span>
|
|
43
35
|
<div class="notice-copy">
|
|
@@ -70,12 +62,16 @@
|
|
|
70
62
|
</section>
|
|
71
63
|
|
|
72
64
|
<footer class="diagnostics">
|
|
73
|
-
<
|
|
74
|
-
<
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
65
|
+
<div class="diagnostics-version">
|
|
66
|
+
<dl>
|
|
67
|
+
<div><dt id="version-label">Version</dt><dd id="version-value">—</dd></div>
|
|
68
|
+
</dl>
|
|
69
|
+
<button id="update-button" class="button quiet" type="button"><span class="ui-icon refresh-icon" aria-hidden="true"></span><span class="button-label">Check for updates</span></button>
|
|
70
|
+
</div>
|
|
71
|
+
<div class="diagnostics-actions">
|
|
72
|
+
<button id="data-button" class="button secondary" type="button">Transfer data</button>
|
|
73
|
+
<button id="diagnostics-button" class="button secondary" type="button">Copy diagnostics</button>
|
|
74
|
+
</div>
|
|
79
75
|
</footer>
|
|
80
76
|
<p id="update-result" class="update-result" role="status" hidden></p>
|
|
81
77
|
</main>
|
|
@@ -1,60 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
font-family: "Silkscreen";
|
|
3
|
-
src: url("/assets/silkscreen.ttf?v=bold") format("truetype");
|
|
4
|
-
font-weight: 700;
|
|
5
|
-
font-display: swap;
|
|
6
|
-
}
|
|
7
|
-
|
|
1
|
+
/* Dashboard 独立视觉快照;不从宿主变量取值。来源见 DESIGN.md。 */
|
|
8
2
|
:root {
|
|
9
3
|
color-scheme: light;
|
|
10
|
-
--canvas: #
|
|
11
|
-
--surface:
|
|
12
|
-
--surface-muted:
|
|
13
|
-
--
|
|
14
|
-
--ink
|
|
15
|
-
--ink-
|
|
16
|
-
--
|
|
17
|
-
--border
|
|
18
|
-
--
|
|
19
|
-
--accent
|
|
20
|
-
--
|
|
21
|
-
--
|
|
22
|
-
--
|
|
23
|
-
--
|
|
24
|
-
--
|
|
25
|
-
--
|
|
26
|
-
--
|
|
27
|
-
--grid-gap: 16px;
|
|
4
|
+
--canvas: #ffffff;
|
|
5
|
+
--surface: #ffffff;
|
|
6
|
+
--surface-muted: #f7f7f7;
|
|
7
|
+
--surface-elevated: #ffffff;
|
|
8
|
+
--ink: #0d0d0d;
|
|
9
|
+
--ink-secondary: #0d0d0da6;
|
|
10
|
+
--ink-tertiary: #0d0d0d7b;
|
|
11
|
+
--border: #0d0d0d13;
|
|
12
|
+
--border-heavy: #0d0d0d1c;
|
|
13
|
+
--accent: #0d0d0d;
|
|
14
|
+
--success: #00a240;
|
|
15
|
+
--warning: #923b0f;
|
|
16
|
+
--danger: #e02e2a;
|
|
17
|
+
--shadow: 0 4px 16px -6px #00000012;
|
|
18
|
+
--focus: 0 0 0 3px #3a83f766;
|
|
19
|
+
--card-radius: 20px;
|
|
20
|
+
--grid-gap: 24px;
|
|
28
21
|
--card-padding: 24px;
|
|
29
|
-
--grid-line: #44668d08;
|
|
30
|
-
--block-shadow: #cbd5e3;
|
|
31
|
-
--word-face: #e8effa;
|
|
32
|
-
--word-edge: #263b57;
|
|
33
22
|
--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
|
|
34
23
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
35
24
|
}
|
|
36
|
-
|
|
37
25
|
:root[data-theme="dark"] {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
--danger: oklch(0.72 0.16 27);
|
|
53
|
-
--grid-line: #b9d4ff06;
|
|
54
|
-
--block-shadow: #080e17;
|
|
55
|
-
--word-face: #d3e3f8;
|
|
56
|
-
--word-edge: #060d18;
|
|
57
|
-
--shadow: 0 1px 2px oklch(0 0 0 / 0.3), 0 12px 34px oklch(0 0 0 / 0.24);
|
|
26
|
+
color-scheme: dark;
|
|
27
|
+
--canvas: #181818;
|
|
28
|
+
--surface: #181818;
|
|
29
|
+
--surface-muted: #141414;
|
|
30
|
+
--surface-elevated: #2d2d2d;
|
|
31
|
+
--ink: #ffffff;
|
|
32
|
+
--ink-secondary: #ffffffa6;
|
|
33
|
+
--ink-tertiary: #ffffff7f;
|
|
34
|
+
--border: #ffffff15;
|
|
35
|
+
--border-heavy: #ffffff28;
|
|
36
|
+
--accent: #ffffff;
|
|
37
|
+
--success: #40c977;
|
|
38
|
+
--warning: #ffd240;
|
|
39
|
+
--danger: #ff6764;
|
|
58
40
|
}
|
|
59
41
|
|
|
60
42
|
:root[data-theme="dark"] .plugin-icon img { filter: invert(1); }
|
|
@@ -74,14 +56,11 @@ body {
|
|
|
74
56
|
.dashboard-surface {
|
|
75
57
|
min-height: 100vh;
|
|
76
58
|
background-color: var(--canvas);
|
|
77
|
-
background-image: radial-gradient(ellipse at 50% 0%, var(--accent-soft), transparent 75%);
|
|
78
|
-
background-repeat: no-repeat;
|
|
79
|
-
background-attachment: fixed;
|
|
80
59
|
}
|
|
81
60
|
|
|
82
|
-
#agent-world { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
|
|
83
61
|
|
|
84
62
|
button, input { font: inherit; }
|
|
63
|
+
button { user-select: none; -webkit-tap-highlight-color: transparent; }
|
|
85
64
|
|
|
86
65
|
button:focus-visible, input:focus-visible + .switch-track {
|
|
87
66
|
outline: none;
|
|
@@ -93,7 +72,7 @@ button:focus-visible, input:focus-visible + .switch-track {
|
|
|
93
72
|
z-index: 1;
|
|
94
73
|
width: min(100% - 40px, 1064px);
|
|
95
74
|
margin: 0 auto;
|
|
96
|
-
padding:
|
|
75
|
+
padding: 24px 0 32px;
|
|
97
76
|
}
|
|
98
77
|
|
|
99
78
|
.page-header, .restart-notice, .diagnostics, .plugin-card {
|
|
@@ -101,29 +80,17 @@ button:focus-visible, input:focus-visible + .switch-track {
|
|
|
101
80
|
align-items: center;
|
|
102
81
|
}
|
|
103
82
|
|
|
104
|
-
.page-header {
|
|
105
|
-
justify-content: space-between;
|
|
106
|
-
gap: 24px;
|
|
107
|
-
margin-bottom: 32px;
|
|
108
|
-
padding-bottom: 28px;
|
|
109
|
-
border-bottom: 2px solid var(--border);
|
|
110
|
-
}
|
|
111
|
-
|
|
83
|
+
.page-header { flex-direction: column; gap: 10px; margin: 24px 0 40px; text-align: center; }
|
|
112
84
|
h1, h2, h3, p { margin: 0; }
|
|
113
|
-
h1 { display: flex; align-items: center; gap:
|
|
114
|
-
.brand-name {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
letter-spacing: -0.07em;
|
|
118
|
-
color: var(--word-face);
|
|
119
|
-
-webkit-text-stroke: 1px var(--word-edge);
|
|
120
|
-
text-shadow: 1px 1px 0 var(--word-edge), 2px 2px 0 var(--word-edge), 3px 3px 0 var(--word-edge), 4px 4px 0 var(--word-edge), 5px 5px 0 var(--block-shadow);
|
|
121
|
-
}
|
|
85
|
+
h1 { display: flex; flex-direction: column; align-items: center; gap: 16px; font-size: 32px; line-height: 1.2; font-weight: 600; }
|
|
86
|
+
.brand-name { letter-spacing: -.04em; }
|
|
87
|
+
.brand-slogan { margin-top: 4px; font-size: 16px; line-height: 1.5; }
|
|
88
|
+
.brand-description { color: var(--ink-secondary); font-size: 13px; line-height: 1.6; }
|
|
122
89
|
.brand-icon {
|
|
123
90
|
display: inline-block;
|
|
124
|
-
width:
|
|
125
|
-
height:
|
|
126
|
-
flex: 0 0
|
|
91
|
+
width: 64px;
|
|
92
|
+
height: 64px;
|
|
93
|
+
flex: 0 0 64px;
|
|
127
94
|
background: var(--ink);
|
|
128
95
|
mask: url("/favicon.svg?v=minecodex-1") center / contain no-repeat;
|
|
129
96
|
-webkit-mask: url("/favicon.svg?v=minecodex-1") center / contain no-repeat;
|
|
@@ -135,11 +102,12 @@ h1 { display: flex; align-items: center; gap: 22px; font-size: clamp(36px, 5.3vw
|
|
|
135
102
|
.refresh-icon { --icon: url("/assets/refresh-cw.svg"); }
|
|
136
103
|
.info-icon { --icon: url("/assets/info.svg"); }
|
|
137
104
|
.alert-icon { --icon: url("/assets/triangle-alert.svg"); }
|
|
138
|
-
.theme-toggle {
|
|
139
|
-
.theme-toggle button {
|
|
140
|
-
.theme-toggle button
|
|
141
|
-
|
|
142
|
-
|
|
105
|
+
.theme-toggle { display:flex; }
|
|
106
|
+
.theme-toggle button, .language-button { display:grid; place-items:center; width:40px; height:40px; padding:0; border:0; border-radius:50%; background:transparent; color:var(--ink-secondary); cursor:pointer; }
|
|
107
|
+
.theme-toggle button:hover, .language-button:hover { color:var(--ink); background:color-mix(in srgb,var(--ink) 5%,transparent); }
|
|
108
|
+
::view-transition-image-pair(root) { isolation:auto; }
|
|
109
|
+
::view-transition-old(root), ::view-transition-new(root) { animation:none; mix-blend-mode:normal; }
|
|
110
|
+
::view-transition-new(root) { z-index:1; }
|
|
143
111
|
|
|
144
112
|
h2 { font-size: 14px; font-weight: 620; }
|
|
145
113
|
|
|
@@ -149,14 +117,15 @@ h2 { font-size: 14px; font-weight: 620; }
|
|
|
149
117
|
text-wrap: pretty;
|
|
150
118
|
}
|
|
151
119
|
|
|
152
|
-
.
|
|
153
|
-
.
|
|
154
|
-
.language-
|
|
155
|
-
.language-
|
|
156
|
-
.language-
|
|
157
|
-
.language-
|
|
120
|
+
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; flex-shrink: 0; }
|
|
121
|
+
.language-toggle { display:flex; }
|
|
122
|
+
.language-icon { --icon: url("/assets/languages.svg"); }
|
|
123
|
+
.language-menu { position: fixed; inset: auto; margin:0; padding:6px; min-width:140px; border:1px solid var(--border-heavy); border-radius:14px; background:var(--surface-elevated); color:var(--ink); box-shadow:var(--shadow); }
|
|
124
|
+
.language-menu button { display:block; width:100%; padding:8px 12px; border:0; border-radius:8px; background:transparent; color:var(--ink-secondary); text-align:left; cursor:pointer; }
|
|
125
|
+
.language-menu button[aria-pressed="true"] { color:var(--ink); background:color-mix(in srgb,var(--ink) 7%,transparent); }
|
|
126
|
+
.language-menu button:disabled { cursor:wait; opacity:.5; }
|
|
158
127
|
|
|
159
|
-
.
|
|
128
|
+
.plugin-state {
|
|
160
129
|
display: inline-flex;
|
|
161
130
|
align-items: center;
|
|
162
131
|
gap: 7px;
|
|
@@ -179,17 +148,17 @@ h2 { font-size: 14px; font-weight: 620; }
|
|
|
179
148
|
.status-dot.is-failed { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in oklch, var(--danger) 14%, transparent); }
|
|
180
149
|
.status-dot.is-stopped { background: var(--ink-tertiary); box-shadow: 0 0 0 3px color-mix(in oklch, var(--ink-tertiary) 12%, transparent); }
|
|
181
150
|
|
|
182
|
-
.restart-notice, .error-state { display: flex; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--border); border-radius: var(--card-radius); background: var(--surface); box-shadow:
|
|
183
|
-
.restart-notice { margin-bottom: 24px;
|
|
151
|
+
.restart-notice, .error-state { display: flex; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--border); border-radius: var(--card-radius); background: var(--surface); box-shadow: var(--shadow); }
|
|
152
|
+
.restart-notice { margin-bottom: 24px; }
|
|
153
|
+
.restart-notice .button { border-radius: 999px; }
|
|
184
154
|
.notice-copy { flex: 1; min-width: 0; }
|
|
185
155
|
.notice-copy h2, .notice-copy strong { font-size: 14px; font-weight: 600; }
|
|
186
156
|
.notice-copy p { margin-top: 5px; font-size: 13px; line-height: 1.6; }
|
|
187
|
-
.notice-icon { width: 22px; height: 22px; flex-basis: 22px; color: var(--
|
|
188
|
-
.error-state { border-left: 4px solid var(--danger); }
|
|
157
|
+
.notice-icon { width: 22px; height: 22px; flex-basis: 22px; color: var(--warning); }
|
|
189
158
|
.error-state .notice-icon { color: var(--danger); }
|
|
190
159
|
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
|
|
191
160
|
.plugin-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--grid-gap); }
|
|
192
|
-
.plugin-card { display: flex; flex-direction: column; align-items: stretch; min-width: 0; min-height: 216px; padding: var(--card-padding); border: 1px solid var(--border); border-radius: var(--card-radius); background: var(--surface); box-shadow:
|
|
161
|
+
.plugin-card { display: flex; flex-direction: column; align-items: stretch; min-width: 0; min-height: 216px; padding: var(--card-padding); border: 1px solid var(--border); border-radius: var(--card-radius); background: var(--surface); box-shadow: var(--shadow); }
|
|
193
162
|
.plugin-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
|
|
194
163
|
.plugin-icon { display: grid; place-items: center; width: 28px; height: 28px; flex: none; }
|
|
195
164
|
.plugin-icon img { display: block; width: 24px; height: 24px; object-fit: contain; opacity: 0.75; }
|
|
@@ -198,17 +167,17 @@ h2 { font-size: 14px; font-weight: 620; }
|
|
|
198
167
|
.plugin-description { margin-top: 8px; font-size: 14px; line-height: 1.65; }
|
|
199
168
|
.plugin-state { margin-top: 16px; font-size: 13px; }
|
|
200
169
|
.plugin-card:has(input:focus-visible) { border-color: var(--accent); }
|
|
201
|
-
.switch { position: relative; display: inline-flex; align-items: center; min-height: 32px; cursor: pointer; }
|
|
170
|
+
.switch { position: relative; z-index:1; display: inline-flex; align-items: center; min-height: 32px; cursor: pointer; }
|
|
202
171
|
.switch input { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; opacity: 0; }
|
|
203
172
|
.switch-track { position: relative; pointer-events: none; width: 36px; height: 21px; border: 1px solid var(--border-heavy); border-radius: 999px; background: var(--surface-muted); transition: opacity 160ms var(--ease-out); }
|
|
204
173
|
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: white; box-shadow: 0 1px 3px #0004; transition: transform 180ms var(--ease-out); }
|
|
205
174
|
.switch input:checked + .switch-track { border-color: var(--accent); background: var(--accent); }
|
|
206
|
-
.switch input:checked + .switch-track::after { transform: translateX(15px); }
|
|
175
|
+
.switch input:checked + .switch-track::after { background: var(--canvas); transform: translateX(15px); }
|
|
207
176
|
.switch input:disabled + .switch-track { cursor: wait; opacity: 0.58; }
|
|
208
177
|
.button { min-height: 32px; border: 1px solid transparent; border-radius: 6px; padding: 6px 12px; cursor: pointer; font-weight: 400; transition: transform 140ms var(--ease-out); }
|
|
209
178
|
.button:active:not(:disabled) { transform: scale(0.97); }
|
|
210
179
|
.button:disabled { cursor: wait; opacity: 0.62; }
|
|
211
|
-
.button.primary { background: var(--ink); color: var(--surface); box-shadow:
|
|
180
|
+
.button.primary { background: var(--ink); color: var(--surface); box-shadow: var(--shadow); }
|
|
212
181
|
.button.secondary { border-color: var(--border-heavy); background: var(--surface); color: var(--ink); }
|
|
213
182
|
.button.quiet { border-color: transparent; background: transparent; color: var(--ink-secondary); }
|
|
214
183
|
.plugin-skeleton { height: 216px; border: 1px solid var(--border); border-radius: var(--card-radius); background: var(--surface); }
|
|
@@ -219,13 +188,15 @@ h2 { font-size: 14px; font-weight: 620; }
|
|
|
219
188
|
}
|
|
220
189
|
|
|
221
190
|
.diagnostics {
|
|
222
|
-
justify-content:
|
|
191
|
+
justify-content: space-between;
|
|
223
192
|
flex-wrap: wrap;
|
|
224
193
|
gap: 16px;
|
|
225
194
|
margin-top: 26px;
|
|
226
195
|
padding-top: 18px;
|
|
227
196
|
border-top: 1px solid var(--border);
|
|
228
197
|
}
|
|
198
|
+
.diagnostics-version, .diagnostics-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
|
|
199
|
+
.diagnostics-actions .button { border-radius:999px; }
|
|
229
200
|
.diagnostics .button { display: inline-flex; align-items: center; gap: 7px; font-weight: 400; }
|
|
230
201
|
.diagnostics .ui-icon { width: 15px; height: 15px; flex-basis: 15px; }
|
|
231
202
|
.diagnostics dl { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 0; }
|
|
@@ -241,7 +212,6 @@ h2 { font-size: 14px; font-weight: 620; }
|
|
|
241
212
|
max-width: min(360px, calc(100vw - 40px));
|
|
242
213
|
border: 1px solid var(--border-heavy);
|
|
243
214
|
border-radius: var(--card-radius);
|
|
244
|
-
border-left: 4px solid var(--danger);
|
|
245
215
|
padding: 16px 20px;
|
|
246
216
|
line-height: 1.6;
|
|
247
217
|
background: var(--surface);
|
|
@@ -255,10 +225,9 @@ h2 { font-size: 14px; font-weight: 620; }
|
|
|
255
225
|
@media (max-width: 960px) { .plugin-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
256
226
|
@media (max-width: 600px) {
|
|
257
227
|
.shell { width: calc(100% - 32px); padding-top: 28px; }
|
|
258
|
-
|
|
259
|
-
h1 { font-size: clamp(24px, 6vw, 36px); gap: 12px; }
|
|
228
|
+
h1 { font-size: 28px; gap: 12px; }
|
|
260
229
|
.brand-icon { width: 48px; height: 48px; flex-basis: 48px; }
|
|
261
|
-
.page-header {
|
|
230
|
+
.page-header { margin: 24px 0 32px; }
|
|
262
231
|
.header-actions .button { padding: 6px 9px; font-size: 12px; }
|
|
263
232
|
.plugin-list { grid-template-columns: 1fr; }
|
|
264
233
|
.plugin-card { min-height: 204px; }
|
|
@@ -273,8 +242,8 @@ h2 { font-size: 14px; font-weight: 620; }
|
|
|
273
242
|
|
|
274
243
|
|
|
275
244
|
/* 数据迁移沿用控制台的不透明表面与卡片尺寸。 */
|
|
276
|
-
.data-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 24px; border: 1px solid var(--border); border-
|
|
277
|
-
.data-dialog::backdrop { background: #
|
|
245
|
+
.data-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 24px; border: 1px solid var(--border); border-radius: var(--card-radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); overflow-y: auto; }
|
|
246
|
+
.data-dialog::backdrop { background: #00000066; }
|
|
278
247
|
.data-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
|
|
279
248
|
.data-header h2 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; }
|
|
280
249
|
.data-header #data-close { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; padding: 0; width: 32px; height: 32px; min-height: 32px; }
|
|
@@ -307,7 +276,7 @@ h2 { font-size: 14px; font-weight: 620; }
|
|
|
307
276
|
--mcx-color-background-tooltip: var(--ink);
|
|
308
277
|
--mcx-color-text-tooltip: var(--surface);
|
|
309
278
|
--mcx-color-border-tooltip: color-mix(in oklab, var(--mcx-color-text-tooltip) 5%, transparent);
|
|
310
|
-
--mcx-shadow-tooltip: 0 8px 18px #
|
|
279
|
+
--mcx-shadow-tooltip: 0 8px 18px #00000033;
|
|
311
280
|
--mcx-font-sans-default: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
312
281
|
--mcx-text-sm: 13px;
|
|
313
282
|
--mcx-tooltip-compact-font-weight: 400;
|
|
@@ -317,3 +286,25 @@ h2 { font-size: 14px; font-weight: 620; }
|
|
|
317
286
|
@supports (corner-shape: superellipse(1.5)) {
|
|
318
287
|
:root { --mcx-codex-corner-shape: superellipse(1.5); --mcx-radius-2xl: 24px; }
|
|
319
288
|
}
|
|
289
|
+
|
|
290
|
+
/* 弱化只作用于其他卡片,不拦截指针,也不改变网格几何。 */
|
|
291
|
+
.plugin-card { position:relative; transition:opacity 160ms ease; }
|
|
292
|
+
.plugin-list.has-preview .plugin-card:not(.is-previewing) { opacity:.5; }
|
|
293
|
+
.plugin-card.is-previewing { z-index:3; }
|
|
294
|
+
.preview-entry { position:absolute; inset:0; padding:0; border:0; border-radius:inherit; background:transparent; cursor:pointer; }
|
|
295
|
+
.feature-preview { position:fixed; visibility:hidden; z-index:4; padding:20px; overflow:auto; overscroll-behavior:contain; border:1px solid var(--border-heavy); border-radius:var(--card-radius); color:var(--ink); background:var(--surface-elevated); box-shadow:0 8px 28px #00000024; animation:preview-enter 160ms ease-out; }
|
|
296
|
+
.preview-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; }
|
|
297
|
+
.preview-title { font-size:16px; font-weight:600; line-height:1.5; }
|
|
298
|
+
.preview-close { flex:none; }
|
|
299
|
+
.preview-details { margin:0; }
|
|
300
|
+
.preview-details dt { margin-top:14px; color:var(--ink-tertiary); font-size:11px; line-height:1.6; }
|
|
301
|
+
.preview-details dd { margin:3px 0 0; color:var(--ink-secondary); font-size:13px; line-height:1.65; overflow-wrap:anywhere; }
|
|
302
|
+
.preview-resource-state { margin-top:16px; color:var(--ink-tertiary); font-size:11px; line-height:1.6; }
|
|
303
|
+
.preview-poster, .preview-video { display:block; width:100%; max-height:260px; object-fit:contain; border-radius:10px; }
|
|
304
|
+
.preview-media:empty { display:none; }
|
|
305
|
+
.feature-preview.is-media-only { padding:0; overflow:hidden; }
|
|
306
|
+
.is-media-only .preview-heading, .is-media-only .preview-details, .is-media-only .preview-resource-state { display:none; }
|
|
307
|
+
.is-media-only .preview-video { border-radius:0; }
|
|
308
|
+
.toast { z-index:6; }
|
|
309
|
+
@keyframes preview-enter { from { opacity:0; } to { opacity:1; } }
|
|
310
|
+
@media (prefers-reduced-motion:reduce) { .feature-preview { animation:none; } }
|
package/package.json
CHANGED
|
@@ -21,7 +21,12 @@ const CONTENT_TYPES = new Map([
|
|
|
21
21
|
[".js", "text/javascript; charset=utf-8"],
|
|
22
22
|
[".mjs", "text/javascript; charset=utf-8"],
|
|
23
23
|
[".svg", "image/svg+xml"],
|
|
24
|
-
[".
|
|
24
|
+
[".json", "application/json; charset=utf-8"],
|
|
25
|
+
[".mp4", "video/mp4"],
|
|
26
|
+
[".webm", "video/webm"],
|
|
27
|
+
[".png", "image/png"],
|
|
28
|
+
[".jpg", "image/jpeg"],
|
|
29
|
+
[".webp", "image/webp"],
|
|
25
30
|
]);
|
|
26
31
|
|
|
27
32
|
function tokenMatches(candidate, expected) {
|
|
@@ -241,7 +246,7 @@ async function staticResponse(url, paths, response) {
|
|
|
241
246
|
"Content-Type": CONTENT_TYPES.get(path.extname(absolute)) ?? "application/octet-stream",
|
|
242
247
|
"Content-Length": info.size,
|
|
243
248
|
"Cache-Control": "no-store",
|
|
244
|
-
"Content-Security-Policy": "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self'
|
|
249
|
+
"Content-Security-Policy": "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; media-src 'self' data: blob:; connect-src 'self'; frame-ancestors 'none'",
|
|
245
250
|
"X-Content-Type-Options": "nosniff",
|
|
246
251
|
});
|
|
247
252
|
await pipeline(createReadStream(absolute), response);
|