vue-editify 0.1.37 → 0.1.39
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/examples/App.vue +6 -10
- package/lib/components/button/button.vue.d.ts +13 -13
- package/lib/components/button/props.d.ts +1 -1
- package/lib/components/checkbox/checkbox.vue.d.ts +10 -10
- package/lib/components/checkbox/props.d.ts +1 -1
- package/lib/components/colors/colors.vue.d.ts +6 -6
- package/lib/components/colors/props.d.ts +1 -1
- package/lib/components/icon/icon.vue.d.ts +1 -1
- package/lib/components/insertImage/insertImage.vue.d.ts +11 -11
- package/lib/components/insertLink/insertLink.vue.d.ts +4 -4
- package/lib/components/insertTable/insertTable.vue.d.ts +4 -4
- package/lib/components/insertVideo/insertVideo.vue.d.ts +11 -11
- package/lib/components/layer/layer.vue.d.ts +9 -9
- package/lib/components/menu/menu.vue.d.ts +6 -6
- package/lib/components/menu/props.d.ts +1 -1
- package/lib/components/toolbar/props.d.ts +1 -1
- package/lib/components/toolbar/toolbar.vue.d.ts +11 -11
- package/lib/components/tooltip/tooltip.vue.d.ts +1 -1
- package/lib/components/triangle/triangle.vue.d.ts +4 -4
- package/lib/core/function.d.ts +1 -1
- package/lib/core/rule.d.ts +1 -1
- package/lib/core/tool.d.ts +8 -11
- package/lib/editify/editify.vue.d.ts +110 -84
- package/lib/editify/props.d.ts +9 -5
- package/lib/editify.es.js +15154 -404
- package/lib/editify.umd.js +1 -1
- package/lib/index.d.ts +4 -2
- package/lib/plugins/attachment/index.d.ts +3 -2
- package/lib/plugins/attachment/insertAttachment/insertAttachment.vue.d.ts +11 -11
- package/lib/plugins/mathformula/index.d.ts +31 -0
- package/lib/plugins/mathformula/insertMathformula/insertMathformula.vue.d.ts +18 -0
- package/lib/plugins/mathformula/insertMathformula/props.d.ts +9 -0
- package/lib/style.css +1 -1
- package/package.json +4 -2
- package/src/components/insertImage/insertImage.less +1 -0
- package/src/components/insertLink/insertLink.less +1 -0
- package/src/components/insertVideo/insertVideo.less +1 -0
- package/src/core/function.ts +4 -12
- package/src/core/rule.ts +7 -0
- package/src/core/tool.ts +3 -33
- package/src/editify/editify.less +1 -1
- package/src/editify/editify.vue +111 -26
- package/src/editify/props.ts +11 -4
- package/src/icon/iconfont.css +4 -0
- package/src/icon/iconfont.ttf +0 -0
- package/src/icon/iconfont.woff +0 -0
- package/src/index.ts +4 -1
- package/src/locale/en_US.ts +6 -1
- package/src/locale/zh_CN.ts +7 -2
- package/src/plugins/attachment/index.ts +26 -15
- package/src/plugins/attachment/insertAttachment/insertAttachment.less +1 -0
- package/src/plugins/mathformula/index.ts +210 -0
- package/src/plugins/mathformula/insertMathformula/insertMathformula.less +64 -0
- package/src/plugins/mathformula/insertMathformula/insertMathformula.vue +40 -0
- package/src/plugins/mathformula/insertMathformula/props.ts +11 -0
package/lib/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { default as Editify } from './editify/editify.vue';
|
2
1
|
import { FunctionPlugin } from 'vue';
|
2
|
+
import { default as Editify } from './editify/editify.vue';
|
3
3
|
|
4
4
|
export type { ButtonTypeType, ButtonOptionsItemType, ButtonSelectConfigType, ButtonDisplayConfigType } from './components/button/props';
|
5
5
|
export type { InsertImageUploadErrorType } from './components/insertImage/props';
|
@@ -7,9 +7,11 @@ export type { InsertVideoUploadErrorType } from './components/insertVideo/props'
|
|
7
7
|
export type { MenuButtonType, MenuSelectButtonType, MenuDisplayButtonType, MenuImageButtonType, MenuVideoButtonType, MenuTableButtonType, MenuCustomButtonType, CodeBlockToolbarType, TextToolbarType, ToolbarConfigType, MenuSequenceType, MenuModeType, MenuExtendType, MenuConfigType, PluginType, PluginResultType } from './core/tool';
|
8
8
|
export { getParsedomElementByElement, getCurrentParsedomElement, elementIsInList, elementIsInTask, isList, isTask, hasPreInRange, isRangeInPre, hasQuoteInRange, isRangeInQuote, hasListInRange, isRangeInList, hasTaskInRange, isRangeInTask, hasLinkInRange, hasTableInRange, hasImageInRange, hasVideoInRange, queryTextStyle, queryTextMark, getRangeText, setIndentIncrease, setIndentDecrease, setQuote, setAlign, setList, setTask, setTextStyle, setTextMark, removeTextStyle, removeTextMark, setLineHeight, insertLink, insertImage, insertVideo, insertTable, insertCodeBlock } from './core/function';
|
9
9
|
declare const install: FunctionPlugin;
|
10
|
-
declare const version = "0.1.
|
10
|
+
declare const version = "0.1.39";
|
11
11
|
export { AlexElement } from 'alex-editor';
|
12
12
|
export type { AttachmentOptionsType } from './plugins/attachment';
|
13
13
|
export type { InsertAttachmentUploadErrorType } from './plugins/attachment/insertAttachment/props';
|
14
14
|
export { attachment, isAttachment, hasAttachmentInRange } from './plugins/attachment';
|
15
|
+
export type { MathformulaOptionsType } from './plugins/mathformula';
|
16
|
+
export { mathformula, isMathformula, isUnderMathformula, getMathformulaElement } from './plugins/mathformula';
|
15
17
|
export { install as default, install, Editify, version };
|
@@ -1,12 +1,13 @@
|
|
1
|
-
import { InsertAttachmentUploadErrorType } from './insertAttachment/props';
|
2
|
-
import { PluginType } from '../../core/tool';
|
3
1
|
import { AlexEditor, AlexElement, AlexElementsRangeType } from 'alex-editor';
|
2
|
+
import { PluginType } from '../../core/tool';
|
3
|
+
import { InsertAttachmentUploadErrorType } from './insertAttachment/props';
|
4
4
|
|
5
5
|
export type AttachmentOptionsType = {
|
6
6
|
sequence?: number;
|
7
7
|
title?: string;
|
8
8
|
leftBorder?: boolean;
|
9
9
|
rightBorder?: boolean;
|
10
|
+
disabled?: boolean;
|
10
11
|
accept?: string;
|
11
12
|
allowedFileType?: string[];
|
12
13
|
multiple?: boolean;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
declare const _default: import('vue').DefineComponent<{
|
2
2
|
color: {
|
3
|
-
type: import(
|
3
|
+
type: import('vue').PropType<string | null>;
|
4
4
|
default: string;
|
5
5
|
};
|
6
6
|
accept: {
|
@@ -8,7 +8,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
8
8
|
default: null;
|
9
9
|
};
|
10
10
|
allowedFileType: {
|
11
|
-
type: import(
|
11
|
+
type: import('vue').PropType<string[]>;
|
12
12
|
default: null;
|
13
13
|
};
|
14
14
|
multiple: {
|
@@ -24,19 +24,19 @@ declare const _default: import('vue').DefineComponent<{
|
|
24
24
|
default: null;
|
25
25
|
};
|
26
26
|
customUpload: {
|
27
|
-
type: import(
|
27
|
+
type: import('vue').PropType<(files: File[]) => string[] | Promise<string[]>>;
|
28
28
|
default: null;
|
29
29
|
};
|
30
30
|
handleError: {
|
31
|
-
type: import(
|
31
|
+
type: import('vue').PropType<(error: import('./props').InsertAttachmentUploadErrorType, file: File) => void>;
|
32
32
|
default: null;
|
33
33
|
};
|
34
|
-
}, {}, unknown, {}, {}, import(
|
34
|
+
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
35
35
|
insert: (...args: any[]) => void;
|
36
36
|
change: (...args: any[]) => void;
|
37
|
-
}, string, import(
|
37
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
38
38
|
color: {
|
39
|
-
type: import(
|
39
|
+
type: import('vue').PropType<string | null>;
|
40
40
|
default: string;
|
41
41
|
};
|
42
42
|
accept: {
|
@@ -44,7 +44,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
44
44
|
default: null;
|
45
45
|
};
|
46
46
|
allowedFileType: {
|
47
|
-
type: import(
|
47
|
+
type: import('vue').PropType<string[]>;
|
48
48
|
default: null;
|
49
49
|
};
|
50
50
|
multiple: {
|
@@ -60,11 +60,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
60
60
|
default: null;
|
61
61
|
};
|
62
62
|
customUpload: {
|
63
|
-
type: import(
|
63
|
+
type: import('vue').PropType<(files: File[]) => string[] | Promise<string[]>>;
|
64
64
|
default: null;
|
65
65
|
};
|
66
66
|
handleError: {
|
67
|
-
type: import(
|
67
|
+
type: import('vue').PropType<(error: import('./props').InsertAttachmentUploadErrorType, file: File) => void>;
|
68
68
|
default: null;
|
69
69
|
};
|
70
70
|
}>> & {
|
@@ -77,7 +77,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
77
77
|
maxSize: number;
|
78
78
|
minSize: number;
|
79
79
|
customUpload: (files: File[]) => string[] | Promise<string[]>;
|
80
|
-
handleError: (error: import(
|
80
|
+
handleError: (error: import('./props').InsertAttachmentUploadErrorType, file: File) => void;
|
81
81
|
accept: string;
|
82
82
|
}, {}>;
|
83
83
|
export default _default;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { PluginType } from '../../core/tool';
|
2
|
+
import { AlexEditor, AlexElement, AlexElementsRangeType } from 'alex-editor';
|
3
|
+
|
4
|
+
export type MathformulaOptionsType = {
|
5
|
+
sequence?: number;
|
6
|
+
title?: string;
|
7
|
+
leftBorder?: boolean;
|
8
|
+
rightBorder?: boolean;
|
9
|
+
disabled?: boolean;
|
10
|
+
};
|
11
|
+
/**
|
12
|
+
* 是否公式元素
|
13
|
+
* @param el
|
14
|
+
* @returns
|
15
|
+
*/
|
16
|
+
export declare const isMathformula: (el: AlexElement) => any;
|
17
|
+
export declare const isUnderMathformula: (el: AlexElement) => boolean;
|
18
|
+
export declare const getMathformulaElement: (el: AlexElement) => AlexElement | null;
|
19
|
+
/**
|
20
|
+
* 选区是否含有公式元素
|
21
|
+
* @param editor
|
22
|
+
* @param dataRangeCaches
|
23
|
+
* @returns
|
24
|
+
*/
|
25
|
+
export declare const hasMathformulaInRange: (editor: AlexEditor, dataRangeCaches: AlexElementsRangeType) => boolean;
|
26
|
+
/**
|
27
|
+
* 数学公式插件
|
28
|
+
* @param options
|
29
|
+
* @returns
|
30
|
+
*/
|
31
|
+
export declare const mathformula: (options?: MathformulaOptionsType) => PluginType;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{
|
2
|
+
color: {
|
3
|
+
type: import('vue').PropType<string | null>;
|
4
|
+
default: string;
|
5
|
+
};
|
6
|
+
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
7
|
+
insert: (...args: any[]) => void;
|
8
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
9
|
+
color: {
|
10
|
+
type: import('vue').PropType<string | null>;
|
11
|
+
default: string;
|
12
|
+
};
|
13
|
+
}>> & {
|
14
|
+
onInsert?: ((...args: any[]) => any) | undefined;
|
15
|
+
}, {
|
16
|
+
color: string | null;
|
17
|
+
}, {}>;
|
18
|
+
export default _default;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { ExtractPublicPropTypes, PropType } from 'vue';
|
2
|
+
|
3
|
+
export declare const InsertMathformulaProps: {
|
4
|
+
color: {
|
5
|
+
type: PropType<string | null>;
|
6
|
+
default: string;
|
7
|
+
};
|
8
|
+
};
|
9
|
+
export type InsertMathformulaPropsType = ExtractPublicPropTypes<typeof InsertMathformulaProps>;
|