Files
mqttx/gpui-app/themes/ayu.json
T
JoeAllen ac5b6e9862 feat: 接入 gpui-kit 全部 38 个官方主题预设 + 按语言拆分 locales + 0.7.3 升级
主题预设("我全都要"):
- gpui-app/themes/ 内嵌官方捆绑 21 个文件 36 变体 + Default Light/Dark
- theme.rs:register_bundled_themes(bootstrap 注册)/ apply_theme_preset
  (Theme::update + apply_config 整包应用)/ theme_preset_names
- settings.theme_preset 字段(serde 默认 linear);保存/启动按预设分派,
  外观模式与跟随系统监听仅对 Linear 生效(预设自带明暗不被冲掉)
- 设置页「主题预设」下拉(Linear + 38 注册名),切换即时生效

语言包按语言分文件(用户要求):
- locales/ui.yml → locales/en.yml + locales/zh-CN.yml
  (rust-i18n 文件名 stem 即 locale,扁平 "ns.key": "value")
- i18n.rs 测试改为双文件键集合一致性 + 占位符强制

修复:设置对话框打开即栈溢出
- gpui-kit 0.7.0→0.7.3 无法解决;根因是 Windows 主线程 8MB 栈对
  Dialog 覆盖层内 Select 渲染的深调用链不足,注册多主题后越过阈值
  (64MB 试验栈下不复现,证实深调用链而非无限递归)
- .cargo/config.toml:Windows 主线程栈 8MB→64MB
- 注册时机移到 bootstrap(main 的 init_themes,gpui_kit::init 后、
  窗口创建前),对齐官方 story 示例的注册姿势
- 误伤修复:gpui-app/Cargo.toml 被批量编辑误删 bin.name 与
  build-dependencies 段;examples/flood.rs 误删已恢复

官方 skill 同步:npx skills add 被墙,gh-proxy 镜像克隆后手动覆盖
~/.agents/skills 与 ~/.zcode/skills 的 gpui-kit + gpui-kit-design-guides。
2026-10-12 17:07:40 +08:00

460 lines
13 KiB
JSON

{
"$schema": "https://github.com/longbridge/gpui-kit/raw/refs/heads/main/.theme-schema.json",
"name": "Ayu",
"author": "Zed Industries",
"url": "https://github.com/zed-industries/zed/blob/e62dd2a0e584154886ff86cc1e9e3e060558b977/assets/themes/ayu",
"themes": [
{
"name": "Ayu Light",
"mode": "light",
"colors": {
"accent.background": "#dadadc",
"accent.foreground": "#5C6773",
"background": "#FCFCFC",
"foreground": "#5c6166",
"border": "#cfd1d2ff",
"ring": "#FF9940",
"input.border": "#D9DCE3",
"list.active.background": "#55B4D422",
"list.active.border": "#55B4D4",
"list.even.background": "#E6E6E6",
"list.head.background": "#F4F4F599",
"muted.background": "#F4F4F5",
"muted.foreground": "#99a0a6",
"panel.background": "#F3F4F5",
"popover.background": "#ECECED",
"popover.foreground": "#5C6773",
"primary.active.background": "#42accf",
"primary.background": "#55b4d3",
"primary.foreground": "#FAFAFA",
"primary.hover.background": "#5fb9d7",
"scrollbar.background": "#FAFAFA00",
"scrollbar.thumb.background": "#5c61664c",
"secondary.active.background": "#CECECE",
"secondary.background": "#ECECED",
"secondary.foreground": "#5C6773",
"secondary.hover.background": "#e0e0e0",
"tab.active.background": "#FCFCFC",
"tab.active.foreground": "#5C6773",
"tab.background": "#ECECED00",
"tab_bar.background": "#F4F4F5",
"title_bar.background": "#ECECED",
"title_bar.border": "#CFD1D2",
"base.yellow": "#F1AD49",
"base.red": "#F07171",
"base.blue": "#55b4d3",
"base.green": "#85b304",
"base.magenta": "#9371f0",
"base.cyan": "#4dbf99"
},
"highlight": {
"editor.foreground": "#5C6773",
"editor.background": "#FCFCFC",
"editor.active_line.background": "#ECECED",
"editor.line_number": "#ABB0B6",
"editor.active_line_number": "#5C6773",
"editor.invisible": "#73777b66",
"conflict": "#f1ad49ff",
"conflict.background": "#ffeedaff",
"conflict.border": "#ffe1beff",
"created": "#85b304ff",
"created.background": "#e9efd2ff",
"created.border": "#d7e3aeff",
"deleted": "#ef7271ff",
"deleted.background": "#ffe3e1ff",
"deleted.border": "#ffcdcaff",
"error": "#ef7271ff",
"error.background": "#ffe3e1ff",
"error.border": "#ffcdcaff",
"hidden": "#a9acaeff",
"hidden.background": "#dcdddeff",
"hidden.border": "#d5d6d8ff",
"hint": "#8ca7c2ff",
"hint.background": "#deebfaff",
"hint.border": "#c4daf6ff",
"ignored": "#a9acaeff",
"ignored.background": "#dcdddeff",
"ignored.border": "#cfd1d2ff",
"info": "#3b9ee5ff",
"info.background": "#deebfaff",
"info.border": "#c4daf6ff",
"modified": "#f1ad49ff",
"modified.background": "#ffeedaff",
"modified.border": "#ffe1beff",
"predictive": "#9eb9d3ff",
"predictive.background": "#e9efd2ff",
"predictive.border": "#d7e3aeff",
"renamed": "#3b9ee5ff",
"renamed.background": "#deebfaff",
"renamed.border": "#c4daf6ff",
"success": "#85b304ff",
"success.background": "#e9efd2ff",
"success.border": "#d7e3aeff",
"unreachable": "#8b8e92ff",
"unreachable.background": "#dcdddeff",
"unreachable.border": "#cfd1d2ff",
"warning": "#f1ad49ff",
"warning.background": "#ffeedaff",
"warning.border": "#ffe1beff",
"syntax": {
"attribute": {
"color": "#3b9ee5ff"
},
"boolean": {
"color": "#a37accff"
},
"comment": {
"color": "#898d90ff"
},
"comment.doc": {
"color": "#898d90ff"
},
"constant": {
"color": "#a37accff"
},
"constructor": {
"color": "#3b9ee5ff"
},
"embedded": {
"color": "#5c6166ff"
},
"emphasis": {
"color": "#3b9ee5ff"
},
"emphasis.strong": {
"color": "#3b9ee5ff",
"font_weight": 700
},
"enum": {
"color": "#f98d3fff"
},
"function": {
"color": "#f2ad48ff"
},
"hint": {
"color": "#8ca7c2ff",
"font_weight": 700
},
"keyword": {
"color": "#fa8d3eff"
},
"label": {
"color": "#3b9ee5ff"
},
"link_text": {
"color": "#f98d3fff",
"font_style": "italic"
},
"link_uri": {
"color": "#85b304ff"
},
"namespace": {
"color": "#5c6166ff"
},
"number": {
"color": "#a37accff"
},
"operator": {
"color": "#ed9365ff"
},
"predictive": {
"color": "#9eb9d3ff",
"font_style": "italic"
},
"preproc": {
"color": "#5c6166ff"
},
"primary": {
"color": "#5c6166ff"
},
"property": {
"color": "#3b9ee5ff"
},
"punctuation": {
"color": "#73777bff"
},
"punctuation.bracket": {
"color": "#73777bff"
},
"punctuation.delimiter": {
"color": "#73777bff"
},
"punctuation.list_marker": {
"color": "#73777bff"
},
"punctuation.markup": {
"color": "#73777bff"
},
"punctuation.special": {
"color": "#a37accff"
},
"selector": {
"color": "#a37accff"
},
"selector.pseudo": {
"color": "#3b9ee5ff"
},
"string": {
"color": "#86b300ff"
},
"string.escape": {
"color": "#898d90ff"
},
"string.regex": {
"color": "#4bbf98ff"
},
"string.special": {
"color": "#e6ba7eff"
},
"string.special.symbol": {
"color": "#f98d3fff"
},
"tag": {
"color": "#3b9ee5ff"
},
"text.literal": {
"color": "#f98d3fff"
},
"title": {
"color": "#5c6166ff",
"font_weight": 700
},
"type": {
"color": "#389ee6ff"
},
"variable": {
"color": "#5c6166ff"
},
"variant": {
"color": "#3b9ee5ff"
}
}
}
},
{
"name": "Ayu Dark",
"mode": "dark",
"colors": {
"accent.background": "#20242b",
"accent.foreground": "#B3B1AD",
"background": "#0D1016",
"border": "#292a2c",
"ring": "#FFB454",
"foreground": "#B3B1AD",
"input.border": "#2D2F34",
"list.active.background": "#36A3D922",
"list.active.border": "#36A3D9",
"list.even.background": "#191F2A99",
"muted.background": "#16191F",
"muted.foreground": "#52514f",
"popover.background": "#0D1016",
"popover.foreground": "#B3B1AD",
"primary.active.background": "#36A3D9",
"primary.background": "#5ac1fe",
"primary.foreground": "#1F2430",
"primary.hover.background": "#3DAEE9",
"scrollbar.background": "#0A0E1400",
"scrollbar.thumb.background": "#bfbdb64c",
"secondary.active.background": "#26282f",
"secondary.background": "#1F2127",
"secondary.foreground": "#B3B1AD",
"secondary.hover.background": "#26282f99",
"tab.active.foreground": "#B3B1AD",
"tab.active.background": "#0D1016",
"tab_bar.background": "#16191F",
"title_bar.background": "#16191F",
"title_bar.border": "#292a2c",
"base.yellow": "#FEB454",
"base.red": "#ef7177",
"base.blue": "#5ac1fe",
"base.green": "#aad84c",
"base.magenta": "#d2a6ff",
"base.cyan": "#5a728b"
},
"highlight": {
"editor.foreground": "#bfbdb6",
"editor.background": "#0d1016",
"editor.active_line.background": "#1f2127bf",
"editor.line_number": "#4b4c4e",
"editor.active_line_number": "#DDDDDD",
"editor.invisible": "#73777b66",
"conflict": "#feb454ff",
"conflict.background": "#572815ff",
"conflict.border": "#754221ff",
"created": "#aad84cff",
"created.background": "#294113ff",
"created.border": "#405c1cff",
"deleted": "#ef7177ff",
"deleted.background": "#48161bff",
"deleted.border": "#66272dff",
"error": "#ef7177ff",
"error.background": "#48161bff",
"error.border": "#66272dff",
"hidden": "#696a6aff",
"hidden.background": "#313337ff",
"hidden.border": "#383a3eff",
"hint": "#628b80ff",
"hint.background": "#0d2f4eff",
"hint.border": "#1b4a6eff",
"ignored": "#696a6aff",
"ignored.background": "#313337ff",
"ignored.border": "#3f4043ff",
"info": "#5ac1feff",
"info.background": "#0d2f4eff",
"info.border": "#1b4a6eff",
"modified": "#feb454ff",
"modified.background": "#572815ff",
"modified.border": "#754221ff",
"predictive": "#5a728bff",
"predictive.background": "#294113ff",
"predictive.border": "#405c1cff",
"renamed": "#5ac1feff",
"renamed.background": "#0d2f4eff",
"renamed.border": "#1b4a6eff",
"success": "#aad84cff",
"success.background": "#294113ff",
"success.border": "#405c1cff",
"unreachable": "#8a8986ff",
"unreachable.background": "#313337ff",
"unreachable.border": "#3f4043ff",
"warning": "#feb454ff",
"warning.background": "#572815ff",
"warning.border": "#754221ff",
"syntax": {
"attribute": {
"color": "#5ac1feff"
},
"boolean": {
"color": "#d2a6ffff"
},
"comment": {
"color": "#8c8b88ff"
},
"comment.doc": {
"color": "#8c8b88ff"
},
"constant": {
"color": "#d2a6ffff"
},
"constructor": {
"color": "#5ac1feff"
},
"embedded": {
"color": "#bfbdb6ff"
},
"emphasis": {
"color": "#5ac1feff"
},
"emphasis.strong": {
"color": "#5ac1feff",
"font_weight": 700
},
"enum": {
"color": "#fe8f40ff"
},
"function": {
"color": "#ffb353ff"
},
"hint": {
"color": "#628b80ff",
"font_weight": 700
},
"keyword": {
"color": "#ff8f3fff"
},
"label": {
"color": "#5ac1feff"
},
"link_text": {
"color": "#fe8f40ff",
"font_style": "italic"
},
"link_uri": {
"color": "#aad84cff"
},
"namespace": {
"color": "#bfbdb6ff"
},
"number": {
"color": "#d2a6ffff"
},
"operator": {
"color": "#f29668ff"
},
"predictive": {
"color": "#5a728bff",
"font_style": "italic"
},
"preproc": {
"color": "#bfbdb6ff"
},
"primary": {
"color": "#bfbdb6ff"
},
"property": {
"color": "#5ac1feff"
},
"punctuation": {
"color": "#a6a5a0ff"
},
"punctuation.bracket": {
"color": "#a6a5a0ff"
},
"punctuation.delimiter": {
"color": "#a6a5a0ff"
},
"punctuation.list_marker": {
"color": "#a6a5a0ff"
},
"punctuation.markup": {
"color": "#a6a5a0ff"
},
"punctuation.special": {
"color": "#d2a6ffff"
},
"selector": {
"color": "#d2a6ffff"
},
"selector.pseudo": {
"color": "#5ac1feff"
},
"string": {
"color": "#a9d94bff"
},
"string.escape": {
"color": "#8c8b88ff"
},
"string.regex": {
"color": "#95e6cbff"
},
"string.special": {
"color": "#e5b572ff"
},
"string.special.symbol": {
"color": "#fe8f40ff"
},
"tag": {
"color": "#5ac1feff"
},
"text.literal": {
"color": "#fe8f40ff"
},
"title": {
"color": "#bfbdb6ff",
"font_weight": 700
},
"type": {
"color": "#59c2ffff"
},
"variable": {
"color": "#bfbdb6ff"
},
"variant": {
"color": "#5ac1feff"
}
}
}
}
]
}