vue-editify 0.1.47 → 0.1.48

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/index.d.ts CHANGED
@@ -6,13 +6,17 @@ export type { InsertImageUploadErrorType } from './components/insertImage/props'
6
6
  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 type { ElementMatchConfigType } from './core/function';
9
- export { elementIsMatch, getMatchElementByElement, getMatchElementsByRange, 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, insertSeparator } from './core/function';
9
+ export { elementIsMatch, getMatchElementByElement, getMatchElementByRange, isList, isTask, elementIsInList, elementIsInTask, hasPreInRange, hasQuoteInRange, hasListInRange, hasTaskInRange, hasLinkInRange, hasTableInRange, hasImageInRange, hasVideoInRange, isRangeInQuote, isRangeInList, isRangeInTask, queryTextStyle, queryTextMark, getRangeText, setIndentIncrease, setIndentDecrease, setQuote, setAlign, setList, setTask, setTextStyle, setTextMark, removeTextStyle, removeTextMark, setLineHeight, insertLink, insertImage, insertVideo, insertTable, insertCodeBlock, insertSeparator } from './core/function';
10
10
  declare const install: FunctionPlugin;
11
- declare const version = "0.1.47";
11
+ declare const version = "0.1.48";
12
12
  export { AlexElement } from 'alex-editor';
13
13
  export type { AttachmentOptionsType } from './plugins/attachment';
14
14
  export type { InsertAttachmentUploadErrorType } from './plugins/attachment/insertAttachment/props';
15
15
  export { attachment, isAttachment, hasAttachmentInRange } from './plugins/attachment';
16
16
  export type { MathformulaOptionsType } from './plugins/mathformula';
17
17
  export { mathformula, isMathformula, isUnderMathformula, getMathformulaElement, hasMathformulaInRange, getMathformulaElementByRange } from './plugins/mathformula';
18
+ export type { PanelOptionsType } from './plugins/panel';
19
+ export { panel, isPanel, isUnderPanel, getPanelElement, hasPanelInRange, getPanelElementByRange } from './plugins/panel';
20
+ export type { InfoBlockOptionsType } from './plugins/infoBlock';
21
+ export { infoBlock, isInfoBlock, isUnderInfoBlock, getInfoBlockElement, hasInfoBlockInRange, getInfoBlockElementByRange } from './plugins/infoBlock';
18
22
  export { install as default, install, Editify, version };
@@ -0,0 +1,55 @@
1
+ import { PluginType } from '../../core/tool';
2
+ import { AlexEditor, AlexElement, AlexElementsRangeType } from 'alex-editor';
3
+
4
+ export type InfoBlockOptionsType = {
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 isInfoBlock: (el: AlexElement) => any;
17
+ /**
18
+ * 判断某个元素是否在信息元素内
19
+ * @param el
20
+ * @returns
21
+ */
22
+ export declare const isUnderInfoBlock: (el: AlexElement) => boolean;
23
+ /**
24
+ * 根据某个元素获取所在的信息元素,如果不在信息元素内则返回null
25
+ * @param el
26
+ * @returns
27
+ */
28
+ export declare const getInfoBlockElement: (el: AlexElement) => AlexElement | null;
29
+ /**
30
+ * 选区是否含有信息元素
31
+ * @param editor
32
+ * @param dataRangeCaches
33
+ * @returns
34
+ */
35
+ export declare const hasInfoBlockInRange: (editor: AlexEditor, dataRangeCaches: AlexElementsRangeType) => boolean;
36
+ /**
37
+ * 选区是否都在信息块内
38
+ * @param editor
39
+ * @param dataRangeCaches
40
+ * @returns
41
+ */
42
+ export declare const isRangeInInfoBlock: (editor: AlexEditor, dataRangeCaches: AlexElementsRangeType) => boolean;
43
+ /**
44
+ * 选区是否在某个信息元素下,如果是返回该信息元素否则返回null
45
+ * @param editor
46
+ * @param dataRangeCaches
47
+ * @returns
48
+ */
49
+ export declare const getInfoBlockElementByRange: (editor: AlexEditor, dataRangeCaches: AlexElementsRangeType) => AlexElement | null;
50
+ /**
51
+ * 信息插件
52
+ * @param options
53
+ * @returns
54
+ */
55
+ export declare const infoBlock: (options?: InfoBlockOptionsType) => PluginType;
@@ -0,0 +1,48 @@
1
+ import { PluginType } from '../../core/tool';
2
+ import { AlexEditor, AlexElement, AlexElementsRangeType } from 'alex-editor';
3
+
4
+ export type PanelOptionsType = {
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 isPanel: (el: AlexElement) => any;
17
+ /**
18
+ * 判断某个元素是否在面板元素内
19
+ * @param el
20
+ * @returns
21
+ */
22
+ export declare const isUnderPanel: (el: AlexElement) => boolean;
23
+ /**
24
+ * 根据某个元素获取所在的面板元素,如果不在面板元素内则返回null
25
+ * @param el
26
+ * @returns
27
+ */
28
+ export declare const getPanelElement: (el: AlexElement) => AlexElement | null;
29
+ /**
30
+ * 选区是否含有面板元素
31
+ * @param editor
32
+ * @param dataRangeCaches
33
+ * @returns
34
+ */
35
+ export declare const hasPanelInRange: (editor: AlexEditor, dataRangeCaches: AlexElementsRangeType) => boolean;
36
+ /**
37
+ * 选区是否在某个面板元素下,如果是返回该面板元素否则返回null
38
+ * @param editor
39
+ * @param dataRangeCaches
40
+ * @returns
41
+ */
42
+ export declare const getPanelElementByRange: (editor: AlexEditor, dataRangeCaches: AlexElementsRangeType) => AlexElement | null;
43
+ /**
44
+ * 面板插件
45
+ * @param options
46
+ * @returns
47
+ */
48
+ export declare const panel: (options?: PanelOptionsType) => PluginType;