Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8bbbb7ff70 | ||
|
|
1dd22be0a8 |
@@ -1,8 +1,8 @@
|
||||
# MarkLite v0.4.2 — 架构设计文档
|
||||
# MarkLite v0.4.3 — 架构设计文档
|
||||
|
||||
## 1. 项目概述
|
||||
|
||||
MarkLite 是一款轻量级的 Windows 本地 Markdown 编辑器桌面应用程序。基于 Electron + React + TypeScript 构建,采用 MetonaEditor v0.1.3 编辑器(三模式视图 + 插件系统)、Zustand 状态管理、IndexedDB 持久化、unified/rehype Markdown 渲染管线。
|
||||
MarkLite 是一款轻量级的 Windows 本地 Markdown 编辑器桌面应用程序。基于 Electron + React + TypeScript 构建,采用 MetonaEditor v0.1.14 编辑器(三模式视图 + 插件系统)、Zustand 状态管理、IndexedDB 持久化、unified/rehype Markdown 渲染管线。
|
||||
|
||||
### 1.1 核心原则
|
||||
|
||||
@@ -20,7 +20,7 @@ MarkLite 是一款轻量级的 Windows 本地 Markdown 编辑器桌面应用程
|
||||
| 桌面框架 | Electron | v28 | 跨平台桌面应用框架 |
|
||||
| 前端框架 | React | v18 | 函数组件 + Hooks |
|
||||
| 类型系统 | TypeScript | v5.6 | 全量类型安全 |
|
||||
| 编辑器 | MetonaEditor | v0.1.3 | 零依赖 Markdown 编辑器,三模式视图 + 插件系统 |
|
||||
| 编辑器 | MetonaEditor | v0.1.14 | 零依赖 Markdown 编辑器,三模式视图 + 插件系统 |
|
||||
| 状态管理 | Zustand | v5 | 轻量级状态管理 |
|
||||
| 持久化 | Dexie.js (IndexedDB) | v4 | 标签页状态 / 用户设置 / 最近文件 |
|
||||
| Markdown 解析 | unified / remark / rehype | v11 | 插件化渲染管线(作为 MetonaEditor render 钩子) |
|
||||
@@ -218,7 +218,7 @@ db.version(1).stores({
|
||||
| `window:confirmClose` | 无 | 请求确认关闭 |
|
||||
| `sidebar:dirChanged` | 无 | 目录结构变化 |
|
||||
|
||||
## 6. 编辑器架构 — MetonaEditor v0.1.3
|
||||
## 6. 编辑器架构 — MetonaEditor v0.1.14
|
||||
|
||||
### 6.1 三模式视图
|
||||
|
||||
@@ -404,7 +404,7 @@ npm run build:portable # 便携版(免安装)
|
||||
| zustand | ^5.0 | 状态管理 |
|
||||
| dexie | ^4.0 | IndexedDB 封装 |
|
||||
| nanoid | ^5.0 | 唯一 ID 生成 |
|
||||
| @metona-team/metona-editor | ^0.1.3 | Markdown 编辑器(零依赖) |
|
||||
| @metona-team/metona-editor | 0.1.14 | Markdown 编辑器(零依赖) |
|
||||
| @metona-team/metona-toast | ^2.0.1 | Toast 通知组件 |
|
||||
| unified / remark / rehype | ^11.0 | Markdown 渲染管线 |
|
||||
| rehype-highlight | ^7.0 | 代码语法高亮 |
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# MarkLite v0.4.2 — 开发环境配置指南
|
||||
# MarkLite v0.4.3 — 开发环境配置指南
|
||||
|
||||
以下涵盖从 Node 版本管理、镜像源配置到 electron-builder 打包的全流程。
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<img src="https://img.shields.io/badge/TypeScript-5.6-3178C6?style=flat-square&logo=typescript" alt="TypeScript">
|
||||
<img src="https://img.shields.io/badge/React-18-61DAFB?style=flat-square&logo=react" alt="React">
|
||||
<img src="https://img.shields.io/badge/License-MIT-green?style=flat-square" alt="License">
|
||||
<img src="https://img.shields.io/badge/Version-v0.4.2-orange?style=flat-square" alt="Version">
|
||||
<img src="https://img.shields.io/badge/Version-v0.4.3-orange?style=flat-square" alt="Version">
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@@ -143,7 +143,7 @@ npm run test:coverage
|
||||
| 桌面框架 | [Electron](https://www.electronjs.org/) v28 | 跨平台桌面应用框架 |
|
||||
| 前端框架 | [React](https://react.dev/) v18 | 函数组件 + Hooks |
|
||||
| 类型系统 | [TypeScript](https://www.typescriptlang.org/) v5.6 | 全量类型安全 |
|
||||
| 编辑器 | [MetonaEditor](https://git.metona.cn/MetonaTeam/MetonaEditor) v0.1.3 | 零依赖 Markdown 编辑器,三模式视图 + 插件系统 |
|
||||
| 编辑器 | [MetonaEditor](https://git.metona.cn/MetonaTeam/MetonaEditor) v0.1.14 | 零依赖 Markdown 编辑器,三模式视图 + 插件系统 |
|
||||
| 状态管理 | [Zustand](https://zustand-demo.pmnd.rs/) v5 | 轻量级状态管理 |
|
||||
| 持久化 | [Dexie.js](https://dexie.org/) v4 (IndexedDB) | 标签页状态 & 用户设置持久化 |
|
||||
| Markdown 解析 | [unified](https://unifiedjs.com/) / [remark](https://remark.js.org/) / [rehype](https://rehype.js.org/) | 插件化 Markdown 渲染管线 |
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "marklite",
|
||||
"version": "0.4.2",
|
||||
"version": "0.4.3",
|
||||
"description": "Lightweight Markdown Editor for Windows",
|
||||
"main": "./dist/main/index.js",
|
||||
"scripts": {
|
||||
@@ -28,7 +28,7 @@
|
||||
"author": "MarkLite",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@metona-team/metona-editor": "^0.1.10",
|
||||
"@metona-team/metona-editor": "0.1.14",
|
||||
"@metona-team/metona-toast": "^0.1.2",
|
||||
"dexie": "^4.0.11",
|
||||
"nanoid": "^5.1.5",
|
||||
|
||||
@@ -128,6 +128,22 @@ body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* FIX: Allow text selection in the preview pane.
|
||||
global.css sets user-select:none on html/body to prevent
|
||||
selection in UI chrome (toolbar, tabs, sidebar), but this
|
||||
also blocked mouse-drag selection in the Markdown preview.
|
||||
Override back to the browser default for the preview area. */
|
||||
.metona-editor-wrapper .me-preview,
|
||||
.metona-editor-wrapper .me-preview * {
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
/* Also restore selection in the editor textarea (MetonaEditor
|
||||
explicitly sets user-select:none on it in some themes) */
|
||||
.metona-editor-wrapper textarea {
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
/* Tab Bar */
|
||||
#tab-bar {
|
||||
height: 36px;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// 共享常量 — 主进程和渲染进程共用
|
||||
export const APP_VERSION = 'v0.4.2'
|
||||
export const APP_VERSION = 'v0.4.3'
|
||||
export const MAX_FILE_SIZE = 20 * 1024 * 1024 // 20MB
|
||||
export const ALLOWED_EXTENSIONS = ['.md', '.markdown', '.txt'] as const
|
||||
export const SKIP_DIRS = new Set([
|
||||
|
||||
Reference in New Issue
Block a user