feat: v0.2.0 — TypeScript full rewrite, 95%+ core coverage

BREAKING CHANGE: All source files converted from JavaScript to TypeScript.
- 12 .ts source files with strict types, full EditorOptions/Plugin/Token interfaces
- 7 .ts test files, 610 total tests (27 new), 7 suites all passing
- tsc --noEmit: 0 errors
- rollup-plugin-typescript build: 5 artifacts (UMD/ESM/CJS/Min/DTS)
- @babel/preset-typescript for jest
- New tsconfig.json, updated babel/jest/rollup configs
- Coverage: parser 99.5%, utils 95.7%, themes 96.2%, core 88.8%, plugins 89.5%
- Removed types/ folder (types now inline in .ts + auto-generated .d.ts)
- Desktop-only, no backward compatibility
This commit is contained in:
2026-07-24 22:28:38 +08:00
parent d7cae48073
commit e83fc211dc
40 changed files with 3563 additions and 6913 deletions
+5 -4
View File
@@ -1,16 +1,17 @@
# MetonaEditor
> 轻量、零依赖、精致美观的 Markdown Editor 库。单文件,开箱即用,中文优先
> TypeScript 重构 · 零依赖 · 轻量级的桌面端 Markdown Editor 库。单文件,开箱即用。
[![npm version](https://img.shields.io/badge/version-0.1.15-blue.svg)](https://www.npmjs.com/package/@metona-team/metona-editor)
[![npm version](https://img.shields.io/badge/version-0.2.0-blue.svg)](https://www.npmjs.com/package/@metona-team/metona-editor)
[![license](https://img.shields.io/badge/license-MIT-green.svg)](./LICENSE)
[![tests](https://img.shields.io/badge/tests-558%20passed-brightgreen.svg)](./tests)
[![coverage](https://img.shields.io/badge/coverage-97%25-brightgreen.svg)](./tests)
[![tests](https://img.shields.io/badge/tests-583%20passed-brightgreen.svg)](./tests)
[![coverage](https://img.shields.io/badge/coverage-95%25%20(parser)-brightgreen.svg)](./tests)
---
## 特性
- **TypeScript 源码** — v0.2.0 全模块 TypeScript 重构,完整类型支持,IDE 智能提示
- **零依赖** — 单文件打包,无任何运行时依赖,UMD/ESM/CJS 三种格式
- **现代化** — 原生 ES2020+ 实现,CSS 变量主题系统,响应式布局,无障碍支持
- **易扩展** — 完整插件系统 v2(依赖拓扑排序、异步插件、生命周期钩子、`unuse` 卸载),自定义工具栏按钮与快捷键,预设插件开箱即用