Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

chore: the editor's type scale

esengine9f7facfcb964
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8e6c5f61d..c682e734b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,13 @@ published separately; it ships inside the editor.
### Fixed
+- **The editor's smaller labels are readable — one body size instead of three within 2px.**
+ The type scale had eight steps, six of them between 9px and 14px, and three of those
+ carried 89% of the text: which one a panel used was whichever its stylesheet had been
+ written with. It has four, each named for its job — micro, detail, body, title — and the
+ 11px tier joined the body rather than the metadata one, so the labels that were smallest
+ are the ones that grew.
+
- **A web build stops shipping the WeChat SDK entries next to the one its page loads.**
`sdk/dist` holds every target's build side by side and the staging step filtered them by an
enumerated list of filenames, so an entry added after that list — `index.wechat.lean` — went
diff --git a/desktop b/desktop
index c8f61230a..9a1bf43ee 160000
--- a/desktop
+++ b/desktop
@@ -1 +1 @@
-Subproject commit c8f61230ac43a53e244f1549f62a17a349a275d0
+Subproject commit 9a1bf43ee05dc57192fdb3c9a6d12f97853e7ff8
diff --git a/docs/astro/src/content/docs/extending/editor-plugins.mdx b/docs/astro/src/content/docs/extending/editor-plugins.mdx
index 62c9e8de7..40e48be70 100644
--- a/docs/astro/src/content/docs/extending/editor-plugins.mdx
+++ b/docs/astro/src/content/docs/extending/editor-plugins.mdx
@@ -223,7 +223,7 @@ ctx.commands.register({
`mount` gets a plain host element and returns its teardown. The editor owns the
tab, the error boundary and pop-out. Style against the editor's CSS variables —
`--srf-2` for the panel body, `--text` / `--text-dim` for copy, `--star` for the
-accent, `--groove` for edges, `--fs-sm` for body size — and the panel matches the
+accent, `--groove` for edges, `--fs-body` for body size — and the panel matches the
surrounding chrome. Use a variable that exists: CSS has no unknown-variable
error, so a misspelled one simply does not draw.
diff --git a/docs/astro/src/content/docs/zh-cn/extending/editor-plugins.mdx b/docs/astro/src/content/docs/zh-cn/extending/editor-plugins.mdx
index 1df465489..42b5bfe0b 100644
--- a/docs/astro/src/content/docs/zh-cn/extending/editor-plugins.mdx
+++ b/docs/astro/src/content/docs/zh-cn/extending/editor-plugins.mdx
@@ -201,7 +201,7 @@ ctx.commands.register({
`mount` 拿到一个普通的宿主元素,返回它的拆卸函数。标签页、错误边界和弹出窗口由
编辑器负责。用编辑器的 CSS 变量写样式——面板底色 `--srf-2`、正文 `--text` /
-`--text-dim`、强调色 `--star`、描边 `--groove`、正文字号 `--fs-sm`——面板就与周围
+`--text-dim`、强调色 `--star`、描边 `--groove`、正文字号 `--fs-body`——面板就与周围
的界面一致。**要用真实存在的变量**:CSS 没有「未知变量」这种错误,名字写错的那条
声明不会报错,只是什么都不画。
diff --git a/plugins/audio-mixer/src/style.ts b/plugins/audio-mixer/src/style.ts
index bb6f5c562..3056188d2 100644
--- a/plugins/audio-mixer/src/style.ts
+++ b/plugins/audio-mixer/src/style.ts
@@ -9,18 +9,18 @@
*/
export const CSS = `
.mixer { display: flex; gap: 8px; padding: 10px; overflow-x: auto; align-items: flex-start; height: 100%; }
-.mixer-empty { padding: 16px; color: var(--text-faint); font-size: var(--fs-sm); }
+.mixer-empty { padding: 16px; color: var(--text-faint); font-size: var(--fs-body); }
.mixer-strip {
display: flex; flex-direction: column; gap: 6px;
min-width: 190px; padding: 8px;
background: var(--srf-2); border: 1px solid var(--groove); border-radius: 6px;
}
.mixer-head { display: flex; align-items: center; gap: 6px; }
-.mixer-name { flex: 1; font-size: var(--fs-sm); font-weight: 500; color: var(--text); }
+.mixer-name { flex: 1; font-size: var(--fs-body); font-weight: 500; color: var(--text); }
.mixer-row { display: flex; align-items: center; gap: 6px; }
.mixer-row input[type='range'] { flex: 1; min-width: 0; accent-color: var(--star); }
-.mixer-num { width: 26px; text-align: right; font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--text-faint); }
-.mixer-label { font-size: var(--fs-2xs); color: var(--text-faint); }
+.mixer-num { width: 26px; text-align: right; font-family: var(--font-mono); font-size: var(--fs-detail); color: var(--text-faint); }
+.mixer-label { font-size: var(--fs-detail); color: var(--text-faint); }
.mixer-icon {
display: grid; place-items: center; width: 22px; height: 22px;
background: none; border: 0; border-radius: 4px; color: var(--text-faint); cursor: pointer;
@@ -30,22 +30,22 @@ export const CSS = `
.mixer-select {
background: var(--inset); color: var(--text);
border: 1px solid var(--groove); border-radius: 4px;
- font-size: var(--fs-2xs); padding: 2px 4px; min-width: 0;
+ font-size: var(--fs-detail); padding: 2px 4px; min-width: 0;
}
.mixer-fx {
display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
padding: 4px; background: var(--srf-3); border-radius: 4px;
}
-.mixer-num-field { display: flex; align-items: center; gap: 3px; font-size: var(--fs-2xs); color: var(--text-faint); }
+.mixer-num-field { display: flex; align-items: center; gap: 3px; font-size: var(--fs-detail); color: var(--text-faint); }
.mixer-num-field input {
width: 52px; background: var(--inset); color: var(--text);
- border: 1px solid var(--groove); border-radius: 4px; font-size: var(--fs-2xs); padding: 2px 4px;
+ border: 1px solid var(--groove); border-radius: 4px; font-size: var(--fs-detail); padding: 2px 4px;
}
.mixer-add {
display: flex; align-items: center; gap: 5px; align-self: stretch;
padding: 8px 12px; background: none; cursor: pointer;
border: 1px dashed var(--groove); border-radius: 6px;
- color: var(--text-faint); font-size: var(--fs-sm); white-space: nowrap;
+ color: var(--text-faint); font-size: var(--fs-body); white-space: nowrap;
}
.mixer-add:hover { color: var(--text); border-color: var(--star); }
`;
diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjs
index 3f3759f16..b74978318 100644
--- a/tools/releaseNotes.mjs
+++ b/tools/releaseNotes.mjs
@@ -28,6 +28,9 @@ export const NOTES_FLOOR = 'v0.65.0';
* the reader recognises anyway.
*/
export const NOTED = {
+ 'refactor(theme): a type scale with one job per step, and steps you can tell apart':
+ { note: "The editor's smaller labels are readable — one body size instead of three within 2px." },
+
'refactor(theme): one name per value — three alias vocabularies collapse into one':
{ internal: "Editor token names only; the editor looks pixel-identical and no creator writes them." },