feat: v0.2.5 — 内置语法高亮 + exportPDF + benchmark + CI 并行
- 新增 src/highlight.ts 零依赖轻量高亮器:13 种语言,先转义后 着色保证安全,输出 me-hl-* 类,MeEditor.highlight 即插即用 - exportTool 新增 editor.exportPDF()(隐藏 iframe + window.print), exportHTML/exportPDF 共用 HTML 构建逻辑 - imagePaste 支持 maxSizeKB 限制,超限 toast 警告 - npm run bench 性能基准:parseMarkdown 1MB ≈ 51ms - CI 测试拆分为 parser/core/rest 三个并行 job + 跨版本 verify job - docs.html/README 补齐新 API、事件、高亮文档;取消跟踪 dist 产物; 版本 0.2.4 → 0.2.5,测试 725 → 768
This commit is contained in:
+6
-3
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* MetonaEditor — Type-safe, lightweight Markdown Editor
|
||||
* @module metona-editor
|
||||
* @version 0.2.4
|
||||
* @version 0.2.5
|
||||
*/
|
||||
|
||||
import { MarkdownEditor } from './core';
|
||||
@@ -10,10 +10,11 @@ import { themeUtils, exportCSSVars, getCSSVariable, followExternalTheme, adoptFr
|
||||
import { i18nUtils, createInstanceI18n, loadRemote } from './i18n';
|
||||
import { pluginUtils, presetPlugins, topologicalSort, validateConfig } from './plugins';
|
||||
import { animationUtils } from './animations';
|
||||
import { highlight, normalizeLanguage, registerLanguage, getSupportedLanguages } from './highlight';
|
||||
import { DEFAULTS, ICONS, THEMES, EDIT_MODES, DEFAULT_TOOLBAR, TOOLBAR_ACTIONS } from './constants';
|
||||
import type { EditMode, ThemeName, ToolbarItem, EditorOptions } from './constants';
|
||||
|
||||
const VERSION = '0.2.4';
|
||||
const VERSION = '0.2.5';
|
||||
|
||||
const globalPlugins: any[] = [];
|
||||
|
||||
@@ -61,6 +62,7 @@ const api = {
|
||||
MarkdownEditor, Editor: MarkdownEditor,
|
||||
create, use, on, off, setTheme, setLocale, destroy, getStatus,
|
||||
parseMarkdown, parseTokens, renderTokens, safeUrl, slugify, clearRenderCache, registerBlockHandler,
|
||||
highlight, normalizeLanguage, registerLanguage, getSupportedLanguages,
|
||||
themes: themeUtils, i18n: i18nUtils, animations: animationUtils, plugins: pluginUtils, presetPlugins,
|
||||
topologicalSort, validateConfig, createInstanceI18n, loadRemote,
|
||||
exportCSSVars, getCSSVariable, followExternalTheme, adoptFromParent, createInstanceTheme,
|
||||
@@ -70,4 +72,5 @@ const api = {
|
||||
if (typeof window !== 'undefined') { (window as any).MeEditor = api; }
|
||||
|
||||
export default api;
|
||||
export { api, api as meEditor, api as MeEditor, MarkdownEditor, MarkdownEditor as Editor, create, use, on, off, setTheme, setLocale, destroy, getStatus, parseMarkdown, parseTokens, renderTokens, safeUrl, slugify, clearRenderCache, registerBlockHandler, themeUtils, i18nUtils, pluginUtils, presetPlugins, animationUtils, topologicalSort, validateConfig, createInstanceI18n, loadRemote, exportCSSVars, getCSSVariable, followExternalTheme, adoptFromParent, createInstanceTheme, DEFAULTS, ICONS, THEMES, EDIT_MODES, DEFAULT_TOOLBAR, TOOLBAR_ACTIONS, VERSION, };
|
||||
export { api, api as meEditor, api as MeEditor, MarkdownEditor, MarkdownEditor as Editor, create, use, on, off, setTheme, setLocale, destroy, getStatus, parseMarkdown, parseTokens, renderTokens, safeUrl, slugify, clearRenderCache, registerBlockHandler, highlight, normalizeLanguage, registerLanguage, getSupportedLanguages, themeUtils, i18nUtils, pluginUtils, presetPlugins, animationUtils, topologicalSort, validateConfig, createInstanceI18n, loadRemote, exportCSSVars, getCSSVariable, followExternalTheme, adoptFromParent, createInstanceTheme, DEFAULTS, ICONS, THEMES, EDIT_MODES, DEFAULT_TOOLBAR, TOOLBAR_ACTIONS, VERSION, };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user