md-editor-v3 6.2.0 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/MdEditor.cjs +5 -5
- package/lib/cjs/chunks/index.cjs +1 -1
- package/lib/cjs/chunks/index2.cjs +1 -1
- package/lib/cjs/chunks/index4.cjs +1 -1
- package/lib/es/MdEditor.mjs +349 -326
- package/lib/es/chunks/index.mjs +15 -15
- package/lib/es/chunks/index2.mjs +85 -85
- package/lib/es/chunks/index4.mjs +90 -90
- package/lib/preview.css +1 -1
- package/lib/style.css +1 -1
- package/lib/types/MdEditor/layouts/Content/codemirror/textShortener.d.ts +10 -1
- package/lib/types/MdEditor/layouts/Content/composition/useResize.d.ts +1 -1
- package/package.json +2 -2
|
@@ -3,9 +3,18 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 在 codemirror 作者帮助下优化了该插件。
|
|
5
5
|
*/
|
|
6
|
-
import { Extension } from '@codemirror/state';
|
|
6
|
+
import { EditorState, Extension } from '@codemirror/state';
|
|
7
|
+
export interface FindTextsContext {
|
|
8
|
+
state: EditorState;
|
|
9
|
+
lineText: string;
|
|
10
|
+
lineNumber: number;
|
|
11
|
+
lineFrom: number;
|
|
12
|
+
lineTo: number;
|
|
13
|
+
defaultTextRegex: RegExp;
|
|
14
|
+
}
|
|
7
15
|
export interface TextShortenerOptions {
|
|
8
16
|
maxLength: number;
|
|
9
17
|
shortenText?: (text: string) => string;
|
|
18
|
+
findTexts?: (context: FindTextsContext) => Array<[number, number]>;
|
|
10
19
|
}
|
|
11
20
|
export declare const createTextShortener: (options: TextShortenerOptions) => Extension;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "md-editor-v3",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@typescript-eslint/eslint-plugin": "^8.43.0",
|
|
76
76
|
"@typescript-eslint/parser": "^8.43.0",
|
|
77
77
|
"@typescript-eslint/utils": "^8.43.0",
|
|
78
|
-
"@vavt/markdown-theme": "^
|
|
78
|
+
"@vavt/markdown-theme": "^5.0.1",
|
|
79
79
|
"@vavt/vite-plugin-import-markdown": "^1.0.0",
|
|
80
80
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
81
81
|
"@vitejs/plugin-vue-jsx": "^5.1.1",
|