feat(core): line number gutter with current line highlight
- .me-gutter rendered alongside textarea, sync-scrolls with content
- .me-gutter-active highlights the line containing the cursor
- config.lineNumbers (default true) to toggle
feat(core): smart Enter auto-formatting
- List continuation: '- ' / '1. ' auto-insert on Enter at end of list item
- Ordered list auto-increment: '1.' → '2.'
- Quote continuation: '> ' auto-insert on Enter at end of quote line
- Empty list/quote item: Enter removes the marker (end list)
feat(core): bracket/quote auto-close
- (), [], {}, <>, "", '', ``, **, __ auto-close pairs
- Selection wrapping: select text then press ( → wraps as (text)
- config.autoBrackets (default true) to toggle
feat(core): drag & drop file support
- Drop image files → auto base64 inline insert 
- Drop text/code files → insert file contents
- Drop external text from browser → insert at cursor
feat(core): outline/TOC panel
- Extracts headings from rendered HTML preview
- Nested tree with indentation by heading level
- Click to scroll-jump in both preview and textarea
- config.outline (default false) to toggle
style: gutter, outline panel, current line highlight CSS
test: 11 new tests for gutter, auto-format, bracket close, outline (532 total)
chore: bump version 0.1.6 → 0.1.7 across all files, site, types
87 lines
2.2 KiB
JSON
87 lines
2.2 KiB
JSON
{
|
|
"name": "@metona-team/metona-editor",
|
|
"version": "0.1.7",
|
|
"description": "轻量、零依赖、精致美观的 Markdown Editor 库。单文件,开箱即用。",
|
|
"type": "module",
|
|
"main": "dist/metona-editor.js",
|
|
"module": "src/index.js",
|
|
"unpkg": "dist/metona-editor.min.js",
|
|
"jsdelivr": "dist/metona-editor.min.js",
|
|
"types": "types/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"import": "./src/index.js",
|
|
"require": "./dist/metona-editor.js",
|
|
"types": "./types/index.d.ts"
|
|
}
|
|
},
|
|
"files": [
|
|
"dist/",
|
|
"src/",
|
|
"types/",
|
|
"README.md",
|
|
"LICENSE"
|
|
],
|
|
"scripts": {
|
|
"build": "rollup -c",
|
|
"dev": "rollup -c -w",
|
|
"test": "jest",
|
|
"test:watch": "jest --watch",
|
|
"test:coverage": "jest --coverage",
|
|
"lint": "eslint src/",
|
|
"lint:fix": "eslint src/ --fix",
|
|
"format": "prettier --write src/",
|
|
"typecheck": "tsc --noEmit",
|
|
"prepublishOnly": "npm run build",
|
|
"docs": "jsdoc src/ -d docs",
|
|
"example": "serve examples/"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://git.metona.cn/MetonaTeam/MetonaEditor.git"
|
|
},
|
|
"keywords": [
|
|
"markdown",
|
|
"editor",
|
|
"wysiwyg",
|
|
"ui",
|
|
"component",
|
|
"lightweight",
|
|
"zero-dependency"
|
|
],
|
|
"author": "thzxx",
|
|
"license": "MIT",
|
|
"bugs": {
|
|
"url": "https://git.metona.cn/MetonaTeam/MetonaEditor/issues"
|
|
},
|
|
"homepage": "https://git.metona.cn/MetonaTeam/MetonaEditor#readme",
|
|
"devDependencies": {
|
|
"@babel/core": "^7.22.0",
|
|
"@babel/preset-env": "^7.22.0",
|
|
"@babel/plugin-transform-modules-commonjs": "^7.22.0",
|
|
"@rollup/plugin-commonjs": "^25.0.0",
|
|
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
"@rollup/plugin-terser": "^0.4.0",
|
|
"@types/jest": "^29.5.0",
|
|
"babel-jest": "^29.5.0",
|
|
"eslint": "^8.40.0",
|
|
"jest": "^29.5.0",
|
|
"jest-environment-jsdom": "^29.5.0",
|
|
"prettier": "^2.8.0",
|
|
"rollup": "^3.20.0",
|
|
"rollup-plugin-dts": "^5.3.0",
|
|
"rollup-plugin-livereload": "^2.0.5",
|
|
"rollup-plugin-serve": "^2.0.1",
|
|
"typescript": "^5.0.0"
|
|
},
|
|
"engines": {
|
|
"node": ">=14.0.0"
|
|
},
|
|
"browserslist": [
|
|
"> 1%",
|
|
"last 2 versions",
|
|
"not dead",
|
|
"not ie 11"
|
|
]
|
|
}
|