minecodex 2.0.55 → 2.1.1
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/README.md +90 -26
- package/apps/dashboard/app.js +20 -14
- package/apps/dashboard/assets/chevron-left.svg +13 -0
- package/apps/dashboard/assets/chevron-right.svg +13 -0
- package/apps/dashboard/assets/feature-showcase.js +185 -0
- package/apps/dashboard/assets/pause.svg +14 -0
- package/apps/dashboard/assets/play.svg +13 -0
- package/apps/dashboard/assets/previews/composer-expand.jpg +0 -0
- package/apps/dashboard/assets/previews/composer-expand.mp4 +0 -0
- package/apps/dashboard/assets/previews/file-navigation.jpg +0 -0
- package/apps/dashboard/assets/previews/file-navigation.mp4 +0 -0
- package/apps/dashboard/assets/previews/files-auto-refresh.jpg +0 -0
- package/apps/dashboard/assets/previews/files-auto-refresh.mp4 +0 -0
- package/apps/dashboard/assets/previews/images.jpg +0 -0
- package/apps/dashboard/assets/previews/images.mp4 +0 -0
- package/apps/dashboard/assets/previews/manifest.json +67 -1
- package/apps/dashboard/assets/previews/markdown-reading.jpg +0 -0
- package/apps/dashboard/assets/previews/markdown-reading.mp4 +0 -0
- package/apps/dashboard/assets/previews/mermaid-diagrams.jpg +0 -0
- package/apps/dashboard/assets/previews/mermaid-diagrams.mp4 +0 -0
- package/apps/dashboard/assets/previews/model-slider.jpg +0 -0
- package/apps/dashboard/assets/previews/model-slider.mp4 +0 -0
- package/apps/dashboard/assets/previews/notes.jpg +0 -0
- package/apps/dashboard/assets/previews/notes.mp4 +0 -0
- package/apps/dashboard/assets/previews/quick-chat.jpg +0 -0
- package/apps/dashboard/assets/previews/quick-chat.mp4 +0 -0
- package/apps/dashboard/assets/previews/session-status.jpg +0 -0
- package/apps/dashboard/assets/previews/session-status.mp4 +0 -0
- package/apps/dashboard/assets/previews/sidebar-focus.jpg +0 -0
- package/apps/dashboard/assets/previews/sidebar-focus.mp4 +0 -0
- package/apps/dashboard/assets/previews/sites.jpg +0 -0
- package/apps/dashboard/assets/previews/sites.mp4 +0 -0
- package/apps/dashboard/assets/previews/usage-meter.jpg +0 -0
- package/apps/dashboard/assets/previews/usage-meter.mp4 +0 -0
- package/apps/dashboard/index.html +26 -2
- package/apps/dashboard/styles.css +58 -39
- package/assets/readme/hero-dark.svg +50 -0
- package/assets/readme/hero.svg +36 -79
- package/features/images/src/adapters/codex/rspack-modules.mjs +9 -3
- package/features/images/src/library-prompt-source.mjs +2 -2
- package/features/notes/codex-feature.json +1 -0
- package/features/quick-chat/src/adapters/codex/renderer.mjs +3 -1
- package/package.json +3 -3
- package/packages/cli/src/config.mjs +1 -2
- package/packages/cli/src/control-server.mjs +1 -1
- package/packages/plugin/assets/app.js +35 -35
- package/packages/runtime-host/src/codex-cdp.mjs +0 -7
- package/packages/runtime-host/src/codex-injection.mjs +50 -2114
- package/packages/runtime-host/src/codex-runtime.mjs +4 -203
- package/packages/runtime-host/src/feature-registry.mjs +10 -91
- package/packages/runtime-host/src/main.mjs +0 -1
- package/packages/ui/src/native/tokens.mjs +0 -28
- package/apps/dashboard/assets/feature-previews.js +0 -206
- package/features/images/src/adapters/codex/cloud-import.mjs +0 -52
- package/features/images/src/backend/cloud-library.mjs +0 -12
- package/features/images/src/chatgpt-image-source-page.mjs +0 -207
- package/features/images/src/chatgpt-image-source.mjs +0 -42
- package/features/images/src/http-server.mjs +0 -487
- package/features/images/src/main.mjs +0 -52
- package/features/images/src/save-as.mjs +0 -69
- package/features/images/web/app.js +0 -1780
- package/features/images/web/i18n.mjs +0 -132
- package/features/images/web/index.html +0 -187
- package/features/images/web/styles.css +0 -1114
- package/packages/runtime-host/src/host-actions.mjs +0 -221
|
@@ -26,7 +26,9 @@
|
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
28
|
<header class="page-header">
|
|
29
|
-
<
|
|
29
|
+
<div class="hero-grid" aria-hidden="true"></div>
|
|
30
|
+
<p class="hero-eyebrow"><span class="brand-icon" aria-hidden="true"></span><span id="hero-eyebrow-text"></span></p>
|
|
31
|
+
<h1 class="brand-name">MineCodex</h1>
|
|
30
32
|
<p id="brand-slogan" class="brand-slogan"></p>
|
|
31
33
|
<p id="brand-description" class="brand-description"></p>
|
|
32
34
|
</header>
|
|
@@ -41,8 +43,30 @@
|
|
|
41
43
|
</button>
|
|
42
44
|
</section>
|
|
43
45
|
|
|
46
|
+
<section id="feature-showcase" class="showcase" aria-roledescription="carousel" hidden>
|
|
47
|
+
<div class="showcase-media" data-state="loading">
|
|
48
|
+
<img class="showcase-poster" alt="" hidden>
|
|
49
|
+
<video class="showcase-video" muted playsinline preload="metadata" hidden></video>
|
|
50
|
+
<p class="showcase-state"></p>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="showcase-info">
|
|
53
|
+
<p class="showcase-count"></p>
|
|
54
|
+
<h2 class="showcase-name"></h2>
|
|
55
|
+
<dl class="showcase-details"></dl>
|
|
56
|
+
<div class="showcase-controls">
|
|
57
|
+
<button class="icon-button" data-showcase="prev" type="button"><span class="ui-icon chevron-left-icon" aria-hidden="true"></span></button>
|
|
58
|
+
<button class="icon-button" data-showcase="toggle" type="button"><span class="ui-icon pause-icon" aria-hidden="true"></span></button>
|
|
59
|
+
<button class="icon-button" data-showcase="next" type="button"><span class="ui-icon chevron-right-icon" aria-hidden="true"></span></button>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
<div class="showcase-progress" aria-hidden="true"></div>
|
|
63
|
+
</section>
|
|
64
|
+
|
|
44
65
|
<section aria-labelledby="plugins-heading">
|
|
45
|
-
<
|
|
66
|
+
<div class="section-heading">
|
|
67
|
+
<h2 id="plugins-heading">Your extensions</h2>
|
|
68
|
+
<p id="plugins-hint"></p>
|
|
69
|
+
</div>
|
|
46
70
|
<span id="save-state" class="sr-only" aria-live="polite"></span>
|
|
47
71
|
|
|
48
72
|
<div id="plugin-list" class="plugin-list" aria-busy="true">
|
|
@@ -68,6 +68,7 @@ body {
|
|
|
68
68
|
/* 官方页面强制设置 body 背景;内容面拥有控制台自身的明暗色板。 */
|
|
69
69
|
.dashboard-surface {
|
|
70
70
|
min-height: 100vh;
|
|
71
|
+
overflow-x: clip;
|
|
71
72
|
background-color: var(--canvas);
|
|
72
73
|
}
|
|
73
74
|
|
|
@@ -93,22 +94,26 @@ button:focus-visible, input:focus-visible + .switch-track {
|
|
|
93
94
|
align-items: center;
|
|
94
95
|
}
|
|
95
96
|
|
|
96
|
-
|
|
97
|
+
/* 品牌区:巨型像素字标为主视觉,像素网格只作背景纹理。 */
|
|
98
|
+
.page-header { position: relative; isolation: isolate; flex-direction: column; margin: 16px 0 56px; padding: 32px 0 8px; text-align: center; }
|
|
97
99
|
h1, h2, h3, p { margin: 0; }
|
|
98
|
-
|
|
100
|
+
.hero-grid {
|
|
101
|
+
position: absolute; z-index: -1; top: -56px; bottom: -24px; left: 50%; width: 100vw; transform: translateX(-50%);
|
|
102
|
+
background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
|
|
103
|
+
background-size: 32px 32px; background-position: center top;
|
|
104
|
+
mask-image: radial-gradient(ellipse 46% 62% at 50% 42%, #000 30%, transparent 78%);
|
|
105
|
+
-webkit-mask-image: radial-gradient(ellipse 46% 62% at 50% 42%, #000 30%, transparent 78%);
|
|
106
|
+
}
|
|
107
|
+
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border: 1px solid var(--border-heavy); border-radius: 999px; background: var(--surface); color: var(--ink-secondary); font-size: 13px; line-height: 20px; }
|
|
99
108
|
.brand-name {
|
|
100
|
-
font-family:"Silkscreen", monospace; font-weight:700; letter-spacing
|
|
101
|
-
color:var(--word-face); -webkit-text-stroke:1px var(--word-edge);
|
|
102
|
-
text-shadow:
|
|
109
|
+
margin-top: 24px; font-family: "Silkscreen", monospace; font-size: clamp(40px, 12.8vw, 152px); line-height: 1; font-weight: 700; letter-spacing: -.07em; white-space: nowrap;
|
|
110
|
+
color: var(--word-face); -webkit-text-stroke: max(1px, .012em) var(--word-edge);
|
|
111
|
+
text-shadow: .016em .016em 0 var(--word-edge), .032em .032em 0 var(--word-edge), .048em .048em 0 var(--word-edge), .064em .064em 0 var(--word-edge), .08em .08em 0 var(--word-depth);
|
|
103
112
|
}
|
|
104
|
-
.brand-slogan { margin-top:
|
|
105
|
-
.brand-description { max-width:600px; color: var(--ink-secondary); font-size: 16px; line-height: 1.6; }
|
|
113
|
+
.brand-slogan { margin-top: 32px; font-size: 30px; line-height: 1.3; font-weight: 600; letter-spacing: -.02em; }
|
|
114
|
+
.brand-description { max-width: 600px; margin-top: 12px; color: var(--ink-secondary); font-size: 16px; line-height: 1.6; }
|
|
106
115
|
.brand-icon {
|
|
107
|
-
display: inline-block;
|
|
108
|
-
width: 64px;
|
|
109
|
-
height: 64px;
|
|
110
|
-
flex: 0 0 64px;
|
|
111
|
-
background: var(--ink);
|
|
116
|
+
display: inline-block; width: 20px; height: 20px; flex: 0 0 20px; background: var(--ink);
|
|
112
117
|
mask: url("/favicon.svg?v=minecodex-1") center / contain no-repeat;
|
|
113
118
|
-webkit-mask: url("/favicon.svg?v=minecodex-1") center / contain no-repeat;
|
|
114
119
|
}
|
|
@@ -119,6 +124,10 @@ h1 { display: flex; flex-direction: column; align-items: center; gap: 20px; font
|
|
|
119
124
|
.refresh-icon { --icon: url("/assets/refresh-cw.svg"); }
|
|
120
125
|
.info-icon { --icon: url("/assets/info.svg"); }
|
|
121
126
|
.alert-icon { --icon: url("/assets/triangle-alert.svg"); }
|
|
127
|
+
.play-icon { --icon: url("/assets/play.svg"); }
|
|
128
|
+
.pause-icon { --icon: url("/assets/pause.svg"); }
|
|
129
|
+
.chevron-left-icon { --icon: url("/assets/chevron-left.svg"); }
|
|
130
|
+
.chevron-right-icon { --icon: url("/assets/chevron-right.svg"); }
|
|
122
131
|
.theme-toggle { display:flex; }
|
|
123
132
|
.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; }
|
|
124
133
|
.theme-toggle button:hover, .language-button:hover { color:var(--ink); background:color-mix(in srgb,var(--ink) 5%,transparent); }
|
|
@@ -175,7 +184,7 @@ h2 { font-size: 14px; font-weight: 620; }
|
|
|
175
184
|
.error-state .notice-icon { color: var(--danger); }
|
|
176
185
|
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
|
|
177
186
|
.plugin-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--grid-gap); }
|
|
178
|
-
.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);
|
|
187
|
+
.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); }
|
|
179
188
|
.plugin-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
|
|
180
189
|
.plugin-icon { display: grid; place-items: center; width: 28px; height: 28px; flex: none; }
|
|
181
190
|
.plugin-icon img { display: block; width: 24px; height: 24px; object-fit: contain; opacity: 0.75; }
|
|
@@ -242,11 +251,9 @@ h2 { font-size: 14px; font-weight: 620; }
|
|
|
242
251
|
@media (max-width: 960px) { .plugin-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
243
252
|
@media (max-width: 600px) {
|
|
244
253
|
.shell { width: calc(100% - 32px); padding-top: 28px; }
|
|
245
|
-
|
|
246
|
-
.brand-
|
|
247
|
-
.
|
|
248
|
-
.brand-icon { width: 48px; height: 48px; flex-basis: 48px; }
|
|
249
|
-
.page-header { margin: 32px 0 48px; }
|
|
254
|
+
.brand-slogan { margin-top: 24px; font-size: 22px; }
|
|
255
|
+
.brand-description { font-size: 15px; }
|
|
256
|
+
.page-header { margin: 8px 0 40px; padding-top: 24px; }
|
|
250
257
|
.header-actions .button { padding: 6px 9px; font-size: 12px; }
|
|
251
258
|
.plugin-list { grid-template-columns: 1fr; }
|
|
252
259
|
.plugin-card { min-height: 204px; }
|
|
@@ -306,24 +313,36 @@ h2 { font-size: 14px; font-weight: 620; }
|
|
|
306
313
|
:root { --mcx-codex-corner-shape: superellipse(1.5); --mcx-radius-2xl: 24px; }
|
|
307
314
|
}
|
|
308
315
|
|
|
309
|
-
/*
|
|
310
|
-
.
|
|
311
|
-
.
|
|
312
|
-
.
|
|
313
|
-
.
|
|
314
|
-
.
|
|
315
|
-
.
|
|
316
|
-
.
|
|
317
|
-
.
|
|
318
|
-
.
|
|
319
|
-
.
|
|
320
|
-
.
|
|
321
|
-
.
|
|
322
|
-
.
|
|
323
|
-
.
|
|
324
|
-
.
|
|
325
|
-
.
|
|
326
|
-
.
|
|
327
|
-
.
|
|
328
|
-
|
|
329
|
-
|
|
316
|
+
/* 功能演示轮播:左侧真实录屏,右侧说明;卡片点击只切换演示,不改变开关。 */
|
|
317
|
+
.showcase { scroll-margin-top: 32px; display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: 20px 32px; margin-bottom: 56px; padding: 24px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); }
|
|
318
|
+
.showcase-media { box-shadow: var(--shadow); position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; background: var(--surface-muted); }
|
|
319
|
+
.showcase-video, .showcase-poster { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; }
|
|
320
|
+
.showcase-state { grid-area: 1 / 1; color: var(--ink-tertiary); font-size: 13px; }
|
|
321
|
+
.showcase-state:empty { display: none; }
|
|
322
|
+
.showcase-info { display: flex; flex-direction: column; min-width: 0; padding: 8px 0; }
|
|
323
|
+
.showcase-count { color: var(--ink-tertiary); font-size: 12px; line-height: 1.5; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
|
|
324
|
+
.showcase-name { margin-top: 8px; font-size: 24px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
|
|
325
|
+
.showcase-details { margin: 20px 0 0; }
|
|
326
|
+
.showcase-details dt { margin-top: 16px; color: var(--ink-tertiary); font-size: 12px; line-height: 1.5; }
|
|
327
|
+
.showcase-details dt:first-child { margin-top: 0; }
|
|
328
|
+
.showcase-details dd { margin: 4px 0 0; color: var(--ink-secondary); font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
|
|
329
|
+
.showcase-controls { display: flex; gap: 8px; margin-top: auto; padding-top: 24px; }
|
|
330
|
+
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--border-heavy); border-radius: 50%; background: var(--surface); color: var(--ink-secondary); cursor: pointer; transition: transform 140ms var(--ease-out); }
|
|
331
|
+
.icon-button:active:not(:disabled) { transform: scale(0.94); }
|
|
332
|
+
.icon-button:disabled { cursor: default; opacity: .4; }
|
|
333
|
+
.showcase-progress { grid-column: 1 / -1; display: flex; gap: 4px; }
|
|
334
|
+
.showcase-segment { flex: 1; height: 3px; overflow: hidden; border-radius: 999px; background: var(--border-heavy); }
|
|
335
|
+
.showcase-fill { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }
|
|
336
|
+
.showcase-segment.is-done .showcase-fill { opacity: .35; }
|
|
337
|
+
@media (hover: hover) and (pointer: fine) { .icon-button:hover:not(:disabled) { color: var(--ink); background: var(--surface-muted); } }
|
|
338
|
+
|
|
339
|
+
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 20px; }
|
|
340
|
+
.section-heading h2 { font-size: 20px; line-height: 1.4; font-weight: 600; }
|
|
341
|
+
.section-heading p { color: var(--ink-tertiary); font-size: 13px; line-height: 1.5; }
|
|
342
|
+
|
|
343
|
+
.plugin-card { position: relative; transition: border-color 160ms var(--ease-out); }
|
|
344
|
+
.showcase-entry { position: absolute; inset: 0; padding: 0; border: 0; border-radius: inherit; background: transparent; cursor: pointer; }
|
|
345
|
+
.showcase-entry:focus-visible { box-shadow: var(--focus); }
|
|
346
|
+
.toast { z-index: 6; }
|
|
347
|
+
@media (max-width: 860px) { .showcase { grid-template-columns: 1fr; } .showcase-info { padding: 0; } }
|
|
348
|
+
@media (max-width: 600px) { .showcase { scroll-margin-top: 24px; padding: 16px; margin-bottom: 40px; } .showcase-name { font-size: 20px; } }
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
2
|
+
width="1200" height="440" viewBox="0 0 1200 440" role="img" aria-labelledby="t d">
|
|
3
|
+
<title id="t">MineCodex:让 Codex 更顺手</title>
|
|
4
|
+
<desc id="d">像素字标 MineCodex,副标题“让 Codex 更顺手”。13 项按需开启的 Codex Desktop 交互增强,支持 macOS 与 Windows。</desc>
|
|
5
|
+
<defs>
|
|
6
|
+
<clipPath id="frame"><rect width="1200" height="440" rx="24"/></clipPath>
|
|
7
|
+
<pattern id="grid" width="32" height="32" patternUnits="userSpaceOnUse" x="8" y="12">
|
|
8
|
+
<path d="M32 0H0V32" fill="none" stroke="#ffffff15" stroke-width="2"/>
|
|
9
|
+
</pattern>
|
|
10
|
+
<radialGradient id="fade" cx="50%" cy="46%" r="50%" gradientTransform="translate(.5 .46) scale(1 .78) translate(-.5 -.46)">
|
|
11
|
+
<stop offset=".3" stop-color="#fff"/><stop offset=".92" stop-color="#fff" stop-opacity="0"/>
|
|
12
|
+
</radialGradient>
|
|
13
|
+
<mask id="grid-mask"><rect width="1200" height="440" fill="url(#fade)"/></mask>
|
|
14
|
+
<path id="word" d="M144.9 252V169.5H177.9V186H210.9V169.5H243.9V252H210.9V219H177.9V252ZM267.7 252V169.5H300.7V252ZM324.4 252V169.5H357.4V186H373.9V202.5H390.4V169.5H423.4V252H390.4V235.5H373.9V219H357.4V252ZM447.2 252V169.5H513.2V186H480.2V202.5H513.2V219H480.2V235.5H513.2V252ZM553.5 252V235.5H537V186H553.5V169.5H603V186H619.5V202.5H586.5V186H570V235.5H586.5V219H619.5V235.5H603V252ZM659.7 252V235.5H643.2V186H659.7V169.5H709.2V186H725.7V235.5H709.2V252ZM676.2 234.8H692.7V186.7H676.2ZM749.5 252V169.5H815.5V186H832V235.5H815.5V252ZM782.5 235.5H798.3V186H782.5ZM855.8 252V169.5H921.8V186H888.8V202.5H921.8V219H888.8V235.5H921.8V252ZM945.5 252V235.5H962V219H978.5V202.5H962V186H945.5V169.5H978.5V186H1011.5V169.5H1044.5V186H1028V202.5H1011.5V219H1028V235.5H1044.5V252H1011.5V235.5H978.5V252Z"/>
|
|
15
|
+
</defs>
|
|
16
|
+
|
|
17
|
+
<g clip-path="url(#frame)">
|
|
18
|
+
<rect width="1200" height="440" fill="#181818"/>
|
|
19
|
+
<!-- 像素网格:只作背景纹理,向四周淡出 -->
|
|
20
|
+
<rect width="1200" height="440" fill="url(#grid)" mask="url(#grid-mask)"/>
|
|
21
|
+
</g>
|
|
22
|
+
<rect x=".5" y=".5" width="1199" height="439" rx="23.5" fill="none" stroke="#ffffff15"/>
|
|
23
|
+
|
|
24
|
+
<!-- 标签胶囊 -->
|
|
25
|
+
<g transform="translate(442.0 44)">
|
|
26
|
+
<rect width="316" height="40" rx="20" fill="#181818" stroke="#ffffff28"/>
|
|
27
|
+
<!-- MineCodex brand start -->
|
|
28
|
+
<g transform="translate(16 8)" color="#fafafa" fill="none">
|
|
29
|
+
<path id="codex-outline" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M9.3316 2.03768C11.1644 1.54688 13.0268 2.04668 14.356 3.20174C16.0859 2.86512 17.9511 3.36418 19.2935 4.70663C20.6356 6.04882 21.1326 7.91288 20.7964 9.64217C21.9527 10.9716 22.4534 12.8349 21.9625 14.6685C21.4711 16.5025 20.1051 17.8657 18.439 18.439C17.8658 20.1047 16.503 21.47 14.6695 21.9615C12.8356 22.4528 10.9727 21.9519 9.64312 20.7955C7.91371 21.1319 6.04993 20.635 4.70757 19.2926C3.36558 17.9505 2.86659 16.0866 3.20269 14.357C2.04693 13.0273 1.54757 11.1638 2.03863 9.33065C2.52997 7.49759 3.89436 6.13282 5.56011 5.55917C6.13382 3.8935 7.49837 2.52891 9.3316 2.03768ZM13.2623 4.63534C12.3606 3.80149 11.067 3.4361 9.79742 3.77596C8.52745 4.11626 7.58924 5.0796 7.22515 6.25253C7.08145 6.71575 6.71753 7.07928 6.25445 7.22323C5.08133 7.58702 4.11844 8.52622 3.77789 9.79647C3.43759 11.0667 3.80148 12.3606 4.63531 13.2623C4.96467 13.6184 5.09776 14.1154 4.99078 14.5885C4.71939 15.7864 5.05109 17.0891 5.98101 18.0191C6.91085 18.949 8.21345 19.2801 9.41168 19.0084L9.58941 18.9791C9.94695 18.9432 10.3065 19.0397 10.5982 19.2496L10.7378 19.3639L10.9117 19.5142C11.8015 20.2407 13.0127 20.5413 14.2037 20.2223C15.4733 19.8818 16.4111 18.9191 16.775 17.7457C16.9189 17.2824 17.2832 16.9186 17.7466 16.775L17.9634 16.6998C19.0376 16.2923 19.9051 15.3936 20.2242 14.2027C20.5641 12.9328 20.1989 11.6385 19.3648 10.7369C19.0353 10.3806 18.9021 9.88399 19.0093 9.41073L19.0533 9.18514C19.2372 8.0514 18.8917 6.85176 18.0201 5.98006C17.0901 5.05003 15.7865 4.71826 14.5884 4.98983C14.1153 5.09712 13.6186 4.96467 13.2623 4.63534Z"/>
|
|
30
|
+
<g id="pickaxe" transform="translate(6.24 6.24) scale(.48)" fill="currentColor">
|
|
31
|
+
<path d="M15.686 4.314 16.3 3.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-.614.614a12.501 12.501 0 0 1 1.356 10.225 1 1 0 0 1-1.751-.119 22 22 0 0 0-3.393-6.319l-.198.199a1 1 0 0 1-1.4 0l-.219.169L6.619 20.38a1 1 0 1 1-3-3l7.912-7.912.169.232a1 1 0 0 1 0-1.4l.198-.197A22 22 0 0 0 5.58 4.71a1 1 0 0 1-.119-1.752 12.5 12.5 0 0 1 10.225 1.356Z"/>
|
|
32
|
+
</g>
|
|
33
|
+
</g>
|
|
34
|
+
<!-- MineCodex brand end -->
|
|
35
|
+
<text x="50" y="26.5" font-family="-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif" font-size="18" fill="#ffffffa6">Codex 增强工具箱 · 13 项</text>
|
|
36
|
+
</g>
|
|
37
|
+
|
|
38
|
+
<!-- 像素字标:阶梯描边与深度阴影 -->
|
|
39
|
+
<g>
|
|
40
|
+
<use href="#word" x="10.56" y="10.56" fill="#000000"/>
|
|
41
|
+
<use href="#word" x="8.45" y="8.45" fill="#080808"/>
|
|
42
|
+
<use href="#word" x="6.34" y="6.34" fill="#080808"/>
|
|
43
|
+
<use href="#word" x="4.22" y="4.22" fill="#080808"/>
|
|
44
|
+
<use href="#word" x="2.11" y="2.11" fill="#080808"/>
|
|
45
|
+
<use href="#word" fill="#ffffff" stroke="#080808" stroke-width="3" stroke-linejoin="miter" paint-order="stroke"/>
|
|
46
|
+
</g>
|
|
47
|
+
|
|
48
|
+
<text x="600.0" y="338" text-anchor="middle" font-family="-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif" font-size="40" font-weight="600" letter-spacing="-0.6" fill="#ffffff">让 Codex 更顺手</text>
|
|
49
|
+
<text x="600.0" y="384" text-anchor="middle" font-family="-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif" font-size="20" fill="#ffffffa6">按需开启的交互增强 · 本地运行 · macOS / Windows</text>
|
|
50
|
+
</svg>
|
package/assets/readme/hero.svg
CHANGED
|
@@ -1,93 +1,50 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
|
2
|
-
width="1200" height="
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
<desc id="hero-desc">MineCodex 给 Codex Desktop 增加轻量、本地优先的插件:模型滑条、笔记与图片库。</desc>
|
|
6
|
-
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
2
|
+
width="1200" height="440" viewBox="0 0 1200 440" role="img" aria-labelledby="t d">
|
|
3
|
+
<title id="t">MineCodex:让 Codex 更顺手</title>
|
|
4
|
+
<desc id="d">像素字标 MineCodex,副标题“让 Codex 更顺手”。13 项按需开启的 Codex Desktop 交互增强,支持 macOS 与 Windows。</desc>
|
|
7
5
|
<defs>
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
</
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
<feDropShadow dx="0" dy="2" stdDeviation="4" flood-color="#000000" flood-opacity="0.03"/>
|
|
18
|
-
</filter>
|
|
6
|
+
<clipPath id="frame"><rect width="1200" height="440" rx="24"/></clipPath>
|
|
7
|
+
<pattern id="grid" width="32" height="32" patternUnits="userSpaceOnUse" x="8" y="12">
|
|
8
|
+
<path d="M32 0H0V32" fill="none" stroke="#0d0d0d13" stroke-width="2"/>
|
|
9
|
+
</pattern>
|
|
10
|
+
<radialGradient id="fade" cx="50%" cy="46%" r="50%" gradientTransform="translate(.5 .46) scale(1 .78) translate(-.5 -.46)">
|
|
11
|
+
<stop offset=".3" stop-color="#fff"/><stop offset=".92" stop-color="#fff" stop-opacity="0"/>
|
|
12
|
+
</radialGradient>
|
|
13
|
+
<mask id="grid-mask"><rect width="1200" height="440" fill="url(#fade)"/></mask>
|
|
14
|
+
<path id="word" d="M144.9 252V169.5H177.9V186H210.9V169.5H243.9V252H210.9V219H177.9V252ZM267.7 252V169.5H300.7V252ZM324.4 252V169.5H357.4V186H373.9V202.5H390.4V169.5H423.4V252H390.4V235.5H373.9V219H357.4V252ZM447.2 252V169.5H513.2V186H480.2V202.5H513.2V219H480.2V235.5H513.2V252ZM553.5 252V235.5H537V186H553.5V169.5H603V186H619.5V202.5H586.5V186H570V235.5H586.5V219H619.5V235.5H603V252ZM659.7 252V235.5H643.2V186H659.7V169.5H709.2V186H725.7V235.5H709.2V252ZM676.2 234.8H692.7V186.7H676.2ZM749.5 252V169.5H815.5V186H832V235.5H815.5V252ZM782.5 235.5H798.3V186H782.5ZM855.8 252V169.5H921.8V186H888.8V202.5H921.8V219H888.8V235.5H921.8V252ZM945.5 252V235.5H962V219H978.5V202.5H962V186H945.5V169.5H978.5V186H1011.5V169.5H1044.5V186H1028V202.5H1011.5V219H1028V235.5H1044.5V252H1011.5V235.5H978.5V252Z"/>
|
|
19
15
|
</defs>
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
<g clip-path="url(#frame)">
|
|
18
|
+
<rect width="1200" height="440" fill="#ffffff"/>
|
|
19
|
+
<!-- 像素网格:只作背景纹理,向四周淡出 -->
|
|
20
|
+
<rect width="1200" height="440" fill="url(#grid)" mask="url(#grid-mask)"/>
|
|
21
|
+
</g>
|
|
22
|
+
<rect x=".5" y=".5" width="1199" height="439" rx="23.5" fill="none" stroke="#0d0d0d13"/>
|
|
23
23
|
|
|
24
|
-
<!--
|
|
25
|
-
<g transform="translate(
|
|
26
|
-
<
|
|
27
|
-
<!-- MineCodex brand start -->
|
|
28
|
-
<g transform="translate(
|
|
24
|
+
<!-- 标签胶囊 -->
|
|
25
|
+
<g transform="translate(442.0 44)">
|
|
26
|
+
<rect width="316" height="40" rx="20" fill="#ffffff" stroke="#0d0d0d1c"/>
|
|
27
|
+
<!-- MineCodex brand start -->
|
|
28
|
+
<g transform="translate(16 8)" color="#0d0d0d" fill="none">
|
|
29
29
|
<path id="codex-outline" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M9.3316 2.03768C11.1644 1.54688 13.0268 2.04668 14.356 3.20174C16.0859 2.86512 17.9511 3.36418 19.2935 4.70663C20.6356 6.04882 21.1326 7.91288 20.7964 9.64217C21.9527 10.9716 22.4534 12.8349 21.9625 14.6685C21.4711 16.5025 20.1051 17.8657 18.439 18.439C17.8658 20.1047 16.503 21.47 14.6695 21.9615C12.8356 22.4528 10.9727 21.9519 9.64312 20.7955C7.91371 21.1319 6.04993 20.635 4.70757 19.2926C3.36558 17.9505 2.86659 16.0866 3.20269 14.357C2.04693 13.0273 1.54757 11.1638 2.03863 9.33065C2.52997 7.49759 3.89436 6.13282 5.56011 5.55917C6.13382 3.8935 7.49837 2.52891 9.3316 2.03768ZM13.2623 4.63534C12.3606 3.80149 11.067 3.4361 9.79742 3.77596C8.52745 4.11626 7.58924 5.0796 7.22515 6.25253C7.08145 6.71575 6.71753 7.07928 6.25445 7.22323C5.08133 7.58702 4.11844 8.52622 3.77789 9.79647C3.43759 11.0667 3.80148 12.3606 4.63531 13.2623C4.96467 13.6184 5.09776 14.1154 4.99078 14.5885C4.71939 15.7864 5.05109 17.0891 5.98101 18.0191C6.91085 18.949 8.21345 19.2801 9.41168 19.0084L9.58941 18.9791C9.94695 18.9432 10.3065 19.0397 10.5982 19.2496L10.7378 19.3639L10.9117 19.5142C11.8015 20.2407 13.0127 20.5413 14.2037 20.2223C15.4733 19.8818 16.4111 18.9191 16.775 17.7457C16.9189 17.2824 17.2832 16.9186 17.7466 16.775L17.9634 16.6998C19.0376 16.2923 19.9051 15.3936 20.2242 14.2027C20.5641 12.9328 20.1989 11.6385 19.3648 10.7369C19.0353 10.3806 18.9021 9.88399 19.0093 9.41073L19.0533 9.18514C19.2372 8.0514 18.8917 6.85176 18.0201 5.98006C17.0901 5.05003 15.7865 4.71826 14.5884 4.98983C14.1153 5.09712 13.6186 4.96467 13.2623 4.63534Z"/>
|
|
30
30
|
<g id="pickaxe" transform="translate(6.24 6.24) scale(.48)" fill="currentColor">
|
|
31
31
|
<path d="M15.686 4.314 16.3 3.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-.614.614a12.501 12.501 0 0 1 1.356 10.225 1 1 0 0 1-1.751-.119 22 22 0 0 0-3.393-6.319l-.198.199a1 1 0 0 1-1.4 0l-.219.169L6.619 20.38a1 1 0 1 1-3-3l7.912-7.912.169.232a1 1 0 0 1 0-1.4l.198-.197A22 22 0 0 0 5.58 4.71a1 1 0 0 1-.119-1.752 12.5 12.5 0 0 1 10.225 1.356Z"/>
|
|
32
32
|
</g>
|
|
33
33
|
</g>
|
|
34
34
|
<!-- MineCodex brand end -->
|
|
35
|
-
<text
|
|
36
|
-
<text class="sans" x="0" y="112" font-size="21" font-weight="400" fill="rgba(13,13,13,0.68)">给 Codex Desktop 增加轻量、本地优先的插件</text>
|
|
37
|
-
|
|
38
|
-
<!-- Install command pill -->
|
|
39
|
-
<g transform="translate(0 148)" filter="url(#terminal-shadow)">
|
|
40
|
-
<rect x="0" y="0" width="432" height="52" rx="14" fill="#ffffff" stroke="rgba(13,13,13,0.1)"/>
|
|
41
|
-
<circle cx="24" cy="26" r="4.5" fill="rgba(13,13,13,0.28)"/>
|
|
42
|
-
<text class="mono" x="42" y="32" font-size="17" font-weight="500" fill="#0d0d0d">npm install -g minecodex</text>
|
|
43
|
-
</g>
|
|
44
|
-
|
|
45
|
-
<text class="mono" x="0" y="234" font-size="14" fill="rgba(13,13,13,0.45)">Node 22.5+ · npm 包 · MIT License</text>
|
|
35
|
+
<text x="50" y="26.5" font-family="-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif" font-size="18" fill="#0d0d0da6">Codex 增强工具箱 · 13 项</text>
|
|
46
36
|
</g>
|
|
47
37
|
|
|
48
|
-
<!--
|
|
49
|
-
<g
|
|
50
|
-
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
<path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z"/>
|
|
57
|
-
<path d="M20 2v4"/>
|
|
58
|
-
<path d="M22 4h-4"/>
|
|
59
|
-
<circle cx="4" cy="20" r="2"/>
|
|
60
|
-
</g>
|
|
61
|
-
<text class="sans" x="86" y="146" font-size="19" font-weight="600" text-anchor="middle" fill="#0d0d0d">Model Slider</text>
|
|
62
|
-
<text class="sans" x="86" y="176" font-size="14" text-anchor="middle" fill="rgba(13,13,13,0.68)">更清晰顺滑的模型选择</text>
|
|
63
|
-
<text class="mono" x="86" y="212" font-size="12" letter-spacing="1.5" text-anchor="middle" fill="rgba(13,13,13,0.45)">MODEL PICKER</text>
|
|
64
|
-
</g>
|
|
65
|
-
|
|
66
|
-
<!-- Card 2: Notes -->
|
|
67
|
-
<g transform="translate(196 0)">
|
|
68
|
-
<rect x="0" y="0" width="172" height="252" rx="20" fill="#ffffff" stroke="rgba(13,13,13,0.09)"/>
|
|
69
|
-
<rect x="50" y="28" width="72" height="72" rx="20" fill="#0d0d0d"/>
|
|
70
|
-
<g transform="translate(68 46) scale(1.5)" fill="none" stroke="#ffffff" stroke-width="1.333" stroke-linecap="round" stroke-linejoin="round">
|
|
71
|
-
<path d="M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z"/>
|
|
72
|
-
<path d="M15 3v5a1 1 0 0 0 1 1h5"/>
|
|
73
|
-
</g>
|
|
74
|
-
<text class="sans" x="86" y="146" font-size="19" font-weight="600" text-anchor="middle" fill="#0d0d0d">Notes</text>
|
|
75
|
-
<text class="sans" x="86" y="176" font-size="14" text-anchor="middle" fill="rgba(13,13,13,0.68)">跨会话管理待办与提示词</text>
|
|
76
|
-
<text class="mono" x="86" y="212" font-size="12" letter-spacing="1.5" text-anchor="middle" fill="rgba(13,13,13,0.45)">TOOLBAR</text>
|
|
77
|
-
</g>
|
|
78
|
-
|
|
79
|
-
<!-- Card 3: Images -->
|
|
80
|
-
<g transform="translate(392 0)">
|
|
81
|
-
<rect x="0" y="0" width="172" height="252" rx="20" fill="#ffffff" stroke="rgba(13,13,13,0.09)"/>
|
|
82
|
-
<rect x="50" y="28" width="72" height="72" rx="20" fill="#0d0d0d"/>
|
|
83
|
-
<g transform="translate(68 46) scale(1.5)" fill="none" stroke="#ffffff" stroke-width="1.333" stroke-linecap="round" stroke-linejoin="round">
|
|
84
|
-
<rect x="3" y="3" width="18" height="18" rx="2"/>
|
|
85
|
-
<circle cx="9" cy="9" r="2"/>
|
|
86
|
-
<path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/>
|
|
87
|
-
</g>
|
|
88
|
-
<text class="sans" x="86" y="146" font-size="19" font-weight="600" text-anchor="middle" fill="#0d0d0d">Images</text>
|
|
89
|
-
<text class="sans" x="86" y="176" font-size="14" text-anchor="middle" fill="rgba(13,13,13,0.68)">集中浏览生成图片与来源</text>
|
|
90
|
-
<text class="mono" x="86" y="212" font-size="12" letter-spacing="1.5" text-anchor="middle" fill="rgba(13,13,13,0.45)">LIBRARY</text>
|
|
91
|
-
</g>
|
|
38
|
+
<!-- 像素字标:阶梯描边与深度阴影 -->
|
|
39
|
+
<g>
|
|
40
|
+
<use href="#word" x="10.56" y="10.56" fill="#a3a3a3"/>
|
|
41
|
+
<use href="#word" x="8.45" y="8.45" fill="#0d0d0d"/>
|
|
42
|
+
<use href="#word" x="6.34" y="6.34" fill="#0d0d0d"/>
|
|
43
|
+
<use href="#word" x="4.22" y="4.22" fill="#0d0d0d"/>
|
|
44
|
+
<use href="#word" x="2.11" y="2.11" fill="#0d0d0d"/>
|
|
45
|
+
<use href="#word" fill="#f7f7f7" stroke="#0d0d0d" stroke-width="3" stroke-linejoin="miter" paint-order="stroke"/>
|
|
92
46
|
</g>
|
|
47
|
+
|
|
48
|
+
<text x="600.0" y="338" text-anchor="middle" font-family="-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif" font-size="40" font-weight="600" letter-spacing="-0.6" fill="#0d0d0d">让 Codex 更顺手</text>
|
|
49
|
+
<text x="600.0" y="384" text-anchor="middle" font-family="-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif" font-size="20" fill="#0d0d0da6">按需开启的交互增强 · 本地运行 · macOS / Windows</text>
|
|
93
50
|
</svg>
|
|
@@ -10,6 +10,7 @@ export async function createRspackImageModules(registry) {
|
|
|
10
10
|
const bind = (entry, pattern, role) => binding(entry, required(entry.source, pattern, role));
|
|
11
11
|
const ref = '[\\w$]+(?:\\.[\\w$]+)+';
|
|
12
12
|
const renderRef = (props) => new RegExp(`\\.jsx\\)\\((${ref}),\\{${props}`);
|
|
13
|
+
const declares = name => source => declaresRspackExport(source, name);
|
|
13
14
|
const masonry = module(source => source.includes('Loading library') && source.includes('animate:'), 'image masonry');
|
|
14
15
|
const React = binding(masonry, required(masonry.source, /\(0,([\w$]+)\.useRef\)/, 'React'));
|
|
15
16
|
const roots = registry.entries.filter(entry => /\.createRoot=/.test(entry.source));
|
|
@@ -23,7 +24,7 @@ export async function createRspackImageModules(registry) {
|
|
|
23
24
|
const toolbar = module(source => source.includes('libraryNext.selection.more'), 'selection toolbar');
|
|
24
25
|
const selection = module(source => source.includes('default:e.MoveLibraryItemsDialog'), 'Library actions');
|
|
25
26
|
const checkbox = module(source => source.includes('onCheckedChange:') && source.includes('viewMode:') && source.includes('cursor-interaction') && source.includes('data-library-selection'), 'image checkbox');
|
|
26
|
-
const menu = module(
|
|
27
|
+
const menu = module(declares('getGeneratedImageContextMenuItems'), 'image actions');
|
|
27
28
|
const favorite = module(source => source.includes('target_ref:') && source.includes('showToast:'), 'Library favorite');
|
|
28
29
|
const favoriteItem = module(source => source.includes('library.favorites.add') && source.includes('assets:') && source.includes('surface:"grid"'), 'favorite icon');
|
|
29
30
|
const dialogs = await registry.lazy(toolbar, 'ConfirmLibraryItemsDialog');
|
|
@@ -47,8 +48,8 @@ export async function createRspackImageModules(registry) {
|
|
|
47
48
|
const sourceImage = module(source => source.includes('shouldLoadFileDataUrl:') && source.includes('loadTiming:') && source.includes('downloadSrc:'), 'image resolver');
|
|
48
49
|
const layout = module(source => source.includes('actionIndicator:') && /documentHeader:[\w$]+,header:[\w$]+,overlayHeader:/.test(source), 'image card');
|
|
49
50
|
const range = module(source => source.includes('orderedIds:') && source.includes('extendRange:') && source.length < 1000, 'range selection');
|
|
50
|
-
const uploadModule = module(
|
|
51
|
-
const openModule = module(
|
|
51
|
+
const uploadModule = module(declares('uploadChatGptConversationFile'), 'Library upload');
|
|
52
|
+
const openModule = module(declares('openImagePreview'), 'image preview');
|
|
52
53
|
const toolbarClass = required(toolbar.source, /className:"(Toolbar-[\w-]+)"/, 'toolbar class');
|
|
53
54
|
const toolbarPositionClass = `${required(toolbar.source, /"(Container-[\w-]+)"/, 'toolbar container')} fixed`;
|
|
54
55
|
return {
|
|
@@ -110,6 +111,11 @@ export async function createRspackImageModules(registry) {
|
|
|
110
111
|
return {navigation:async()=>({React,ReactDOM}),gallery,canvas};
|
|
111
112
|
}
|
|
112
113
|
|
|
114
|
+
// 按导出声明识别模块,排除只调用该导出的消费方。rspack 具名导出有两种登记形式:
|
|
115
|
+
// getter `d(t,{name:()=>x})`,以及 26.1103 起出现的直接函数值 `d(t,{},{name:function…})`。
|
|
116
|
+
export function declaresRspackExport(source, name) {
|
|
117
|
+
return new RegExp(`[{,]${name}:(?:\\(\\)=>|(?:async )?function\\b)`).test(source);
|
|
118
|
+
}
|
|
113
119
|
|
|
114
120
|
export function discoverRspackPreviewBindings(source) {
|
|
115
121
|
const ref = '[\\w$]+\\.[\\w$]+';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {createRspackImageModules,discoverRspackPreviewBindings} from
|
|
1
|
+
import {createRspackImageModules,declaresRspackExport,discoverRspackPreviewBindings} from "./adapters/codex/rspack-modules.mjs";
|
|
2
2
|
import { findCodexModule, codexModuleRegistry } from '../../../packages/codex-adapter/src/renderer/modules.mjs';
|
|
3
3
|
import { createCloudImageActions } from "./frontend/cloud-image-actions.mjs";
|
|
4
4
|
import { createImageSourcesAdapter } from "./adapters/codex/image-sources.mjs";
|
|
@@ -13,7 +13,7 @@ import { promptResolverSource } from "./adapters/codex/prompt-resolver-source.mj
|
|
|
13
13
|
export async function createPageScriptSource() {
|
|
14
14
|
const source=await readFile(new URL("./library-prompt-page.mjs",import.meta.url),"utf8");
|
|
15
15
|
const promptGlyphSource=await readFile(new URL("./assets/prompts-menu.svg",import.meta.url),"utf8");
|
|
16
|
-
const functions={findCodexModule,codexModuleRegistry,createRspackImageModules,discoverRspackPreviewBindings,discoverImageCanvasComponents,createCloudImageActions,createImageSourcesAdapter,discoverImageActionBinding,discoverFilePreviewComposerBindings,createNativeImageModules,createNativeImageSource,installLocalImageSource,createLibraryApi,createLibraryViewerAdapter};
|
|
16
|
+
const functions={findCodexModule,codexModuleRegistry,createRspackImageModules,declaresRspackExport,discoverRspackPreviewBindings,discoverImageCanvasComponents,createCloudImageActions,createImageSourcesAdapter,discoverImageActionBinding,discoverFilePreviewComposerBindings,createNativeImageModules,createNativeImageSource,installLocalImageSource,createLibraryApi,createLibraryViewerAdapter};
|
|
17
17
|
const declarations=Object.entries(functions).map(([name,fn])=>`const ${name}=${fn.toString()};`).join("\n");
|
|
18
18
|
return `${declarations}\nconst promptGlyphSource=${JSON.stringify(promptGlyphSource)};\nconst promptFromConversation=${promptResolverSource()};\n${source}`;
|
|
19
19
|
}
|
|
@@ -41,7 +41,9 @@ export function createQuickChatAdapter(codex) {
|
|
|
41
41
|
// 发送确认回调写入新记录;拒绝发送不会写入。记录身份只映射为窗口内序号。
|
|
42
42
|
if (receipt && !receipts.has(receipt)) receipts.set(receipt, nextReceipt++);
|
|
43
43
|
const frame = surface.closest('[role="dialog"]');
|
|
44
|
-
const
|
|
44
|
+
const wrapper = frame && [...frame.children].find(node => codex.props(node, props => props.asChild === true && typeof props.unstyled === "boolean", 8));
|
|
45
|
+
// 新构建的包装层为 display:contents,没有盒子可绘制背景;改用其内层的实际平面。
|
|
46
|
+
const background = wrapper && wrapper.getClientRects().length === 0 ? wrapper.firstElementChild : wrapper;
|
|
45
47
|
const project = [...surface.querySelectorAll('[data-composer-rail-item] button')].find(button =>
|
|
46
48
|
codex.props(button, props => props.variant === "composer" && typeof props.onProjectChange === "function"));
|
|
47
49
|
const projectRail = project?.closest('[data-composer-rail-item]') ?? null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "minecodex",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Lightweight, local-first plugins for the Codex desktop app.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
"features/notes/vendor/phosphor-LICENSE",
|
|
29
29
|
"features/notes/codex-feature.json",
|
|
30
30
|
"features/images/src",
|
|
31
|
-
"features/images/web",
|
|
32
31
|
"features/images/codex-feature.json",
|
|
33
32
|
"features/session-status/src",
|
|
34
33
|
"features/session-status/codex-feature.json",
|
|
@@ -66,6 +65,7 @@
|
|
|
66
65
|
"assets/brand/minecodex-icon-selected.svg",
|
|
67
66
|
"assets/brand/references/lucide-LICENSE.txt",
|
|
68
67
|
"assets/readme/hero.svg",
|
|
68
|
+
"assets/readme/hero-dark.svg",
|
|
69
69
|
"packages/ui/assets",
|
|
70
70
|
"features/markdown-reading/src",
|
|
71
71
|
"features/markdown-reading/codex-feature.json",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
},
|
|
97
97
|
"scripts": {
|
|
98
98
|
"start": "node packages/cli/bin/mcx.mjs serve",
|
|
99
|
-
"test": "node --test packages/cli/test/*.test.mjs packages/runtime-host/test/*.test.mjs features/model-slider/test/*.test.mjs features/notes/test/*.test.mjs features/images/test/*.test.mjs features/session-status/test/*.test.mjs features/usage-meter/test/*.test.mjs apps/dashboard/test/*.test.mjs features/
|
|
99
|
+
"test": "node --test packages/cli/test/*.test.mjs packages/runtime-host/test/*.test.mjs features/model-slider/test/*.test.mjs features/notes/test/*.test.mjs features/images/test/*.test.mjs features/session-status/test/*.test.mjs features/usage-meter/test/*.test.mjs apps/dashboard/test/*.test.mjs features/quick-chat/test/*.test.mjs features/composer-expand/test/*.test.mjs features/sidebar-focus/test/*.test.mjs features/sites/test/*.test.mjs packages/ui/test/*.test.mjs packages/codex-adapter/test/*.test.mjs features/markdown-reading/test/*.test.mjs features/file-navigation/test/*.test.mjs features/files-auto-refresh/test/*.test.mjs packages/plugin/test/*.test.mjs features/mermaid-diagrams/test/*.test.mjs scripts/record-previews/test/*.test.mjs",
|
|
100
100
|
"test:cli": "node --test packages/cli/test/*.test.mjs",
|
|
101
101
|
"test:runtime": "node --test packages/runtime-host/test/*.test.mjs",
|
|
102
102
|
"check": "node scripts/check-syntax.mjs",
|
|
@@ -42,9 +42,8 @@ export function normalizeConfig(value = {}) {
|
|
|
42
42
|
...(value.features && typeof value.features === "object" ? value.features : {}),
|
|
43
43
|
...normalizeFeatures(value.features),
|
|
44
44
|
};
|
|
45
|
-
//
|
|
45
|
+
// 已移除的功能不继承旧配置中的开关。
|
|
46
46
|
delete features["unread-inbox"];
|
|
47
|
-
// 已移除的额度推广隐藏功能不继承旧启用项。
|
|
48
47
|
delete features["hide-upsell-banner"];
|
|
49
48
|
// 清理已退役的独立 Quick Chat 修复开关。
|
|
50
49
|
delete features["quick-chat-repair"];
|
|
@@ -15,7 +15,7 @@ import { createDataTransfer, MAX_TRANSFER_BYTES } from "./data-transfer/service.
|
|
|
15
15
|
const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../..");
|
|
16
16
|
const packageMetadata = JSON.parse(await readFile(path.join(packageRoot, "package.json"), "utf8"));
|
|
17
17
|
const MAX_BODY_BYTES = 64 * 1024;
|
|
18
|
-
const DASHBOARD_FEATURE_ORDER = ["model-slider", "notes", "usage-meter", "session-status", "markdown-reading", "mermaid-diagrams", "file-navigation", "
|
|
18
|
+
const DASHBOARD_FEATURE_ORDER = ["model-slider", "notes", "usage-meter", "session-status", "markdown-reading", "mermaid-diagrams", "file-navigation", "quick-chat", "composer-expand", "sidebar-focus", "files-auto-refresh", "images", "sites"];
|
|
19
19
|
const CONTENT_TYPES = new Map([
|
|
20
20
|
[".css", "text/css; charset=utf-8"],
|
|
21
21
|
[".html", "text/html; charset=utf-8"],
|