refactor(core): 拆分 4 模块 + 插件状态 Symbol 化 + eslint type-aware
- core.ts 从 1162 行降至 865 行:命令/浮动工具栏/右键菜单/大纲 拆至 commands.ts / floating-toolbar.ts / context-menu.ts / outline.ts (原型安装,API 与测试完全兼容) - 6 个预设插件状态改用 Symbol 键存储,定义 EditorLike 契约接口, 消灭 (editor as any).__xxx 魔法属性 - 实现 maxLength(textarea maxlength + 程序化入口截断)与 zenMode 初始状态(此前为 dead config) - 搜索面板补齐 matchCase/wholeWord(翻译键已有但未实现, 中文全字边界感知) - 分隔条 localStorage key 加入实例 id 隔离 - eslint 启用 type-aware 规则(consistent-type-imports / no-unnecessary-type-assertion),0 errors
This commit is contained in:
+1
-1
@@ -283,7 +283,7 @@ export const presetThemes = {
|
||||
|
||||
// Ensure built-in themes in THEMES
|
||||
for (const [name, theme] of Object.entries(presetThemes)) {
|
||||
if (name !== 'auto' && theme.config !== 'auto') THEMES[name] = theme.config as ThemeConfig;
|
||||
if (name !== 'auto' && theme.config !== 'auto') THEMES[name] = theme.config;
|
||||
}
|
||||
|
||||
export const themeUtils = {
|
||||
|
||||
Reference in New Issue
Block a user