@wangeditor-next/editor 5.7.3 → 5.7.4

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.
@@ -6,6 +6,7 @@ declare const _default: {
6
6
  listModule: {
7
7
  unOrderedList: string;
8
8
  orderedList: string;
9
+ lowerAlphaList: string;
9
10
  };
10
11
  };
11
12
  export default _default;
@@ -6,6 +6,7 @@ declare const _default: {
6
6
  listModule: {
7
7
  unOrderedList: string;
8
8
  orderedList: string;
9
+ lowerAlphaList: string;
9
10
  };
10
11
  };
11
12
  export default _default;
@@ -3,9 +3,12 @@
3
3
  * @author wangfupeng
4
4
  */
5
5
  import { Text } from 'slate';
6
+ export type OrderedListType = '1' | 'a' | 'A' | 'i' | 'I';
6
7
  export type ListItemElement = {
7
8
  type: 'list-item';
8
9
  ordered: boolean;
9
10
  level: number;
11
+ start?: number;
12
+ orderType?: OrderedListType;
10
13
  children: Text[];
11
14
  };
@@ -3,7 +3,10 @@
3
3
  * @author wangfupeng
4
4
  */
5
5
  import { IDomEditor } from '@wangeditor-next/core';
6
- import { ListItemElement } from './custom-types';
6
+ import { ListItemElement, OrderedListType } from './custom-types';
7
+ export declare function getNormalizedOrderedListStart(elem: ListItemElement): number;
8
+ export declare function getNormalizedOrderedListType(elem: ListItemElement): OrderedListType;
9
+ export declare function hasSameListConfig(a: ListItemElement, b: ListItemElement): boolean;
7
10
  /**
8
11
  * 获取上一个同一 level 的 list item
9
12
  * @param editor 编辑器实例
@@ -3,9 +3,11 @@
3
3
  * @author wangfupeng
4
4
  */
5
5
  import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
6
+ import { OrderedListType } from '../custom-types';
6
7
  declare abstract class BaseMenu implements IButtonMenu {
7
8
  readonly type = "list-item";
8
9
  abstract readonly ordered: boolean;
10
+ readonly orderType?: OrderedListType;
9
11
  abstract readonly title: string;
10
12
  abstract readonly iconSvg: string;
11
13
  readonly tag = "button";
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @description lower-alpha ordered list menu
3
+ * @author wangfupeng
4
+ */
5
+ import { OrderedListType } from '../custom-types';
6
+ import BaseMenu from './BaseMenu';
7
+ declare class LowerAlphaListMenu extends BaseMenu {
8
+ readonly ordered = true;
9
+ readonly orderType: OrderedListType;
10
+ readonly title: string;
11
+ readonly iconSvg = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z\"></path></svg>";
12
+ }
13
+ export default LowerAlphaListMenu;
@@ -3,6 +3,7 @@
3
3
  * @author wangfupeng
4
4
  */
5
5
  import BulletedListMenu from './BulletedListMenu';
6
+ import LowerAlphaListMenu from './LowerAlphaListMenu';
6
7
  import NumberedListMenu from './NumberedListMenu';
7
8
  export declare const bulletedListMenuConf: {
8
9
  key: string;
@@ -12,3 +13,7 @@ export declare const numberedListMenuConf: {
12
13
  key: string;
13
14
  factory(): NumberedListMenu;
14
15
  };
16
+ export declare const numberedListLowerAlphaMenuConf: {
17
+ key: string;
18
+ factory(): LowerAlphaListMenu;
19
+ };
@@ -6,7 +6,7 @@ import { IDomEditor } from '@wangeditor-next/core';
6
6
  import { Descendant } from 'slate';
7
7
  import { DOMElement } from '../utils/dom';
8
8
  import { ListItemElement } from './custom-types';
9
- declare function parseItemHtml(elem: DOMElement, children: Descendant[], editor: IDomEditor): ListItemElement;
9
+ declare function parseItemHtml(elem: DOMElement, children: Descendant[], editor: IDomEditor): ListItemElement | ListItemElement[];
10
10
  export declare const parseItemHtmlConf: {
11
11
  selector: string;
12
12
  parseElemHtml: typeof parseItemHtml;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wangeditor-next/editor",
3
- "version": "5.7.3",
3
+ "version": "5.7.4",
4
4
  "description": "Web rich text editor, Web 富文本编辑器",
5
5
  "keywords": [
6
6
  "wangeditor",
@@ -55,13 +55,13 @@
55
55
  "dependencies": {
56
56
  "@uppy/core": "^2.1.1",
57
57
  "@uppy/xhr-upload": "^2.0.3",
58
- "@wangeditor-next/basic-modules": "2.0.3",
59
- "@wangeditor-next/code-highlight": "2.0.3",
60
- "@wangeditor-next/core": "1.8.3",
61
- "@wangeditor-next/list-module": "2.0.3",
62
- "@wangeditor-next/table-module": "2.0.3",
63
- "@wangeditor-next/upload-image-module": "2.0.3",
64
- "@wangeditor-next/video-module": "2.0.3",
58
+ "@wangeditor-next/basic-modules": "2.0.4",
59
+ "@wangeditor-next/code-highlight": "2.0.4",
60
+ "@wangeditor-next/core": "1.8.4",
61
+ "@wangeditor-next/list-module": "2.0.4",
62
+ "@wangeditor-next/table-module": "2.0.4",
63
+ "@wangeditor-next/upload-image-module": "2.0.4",
64
+ "@wangeditor-next/video-module": "2.0.4",
65
65
  "dom7": "^4.0.0",
66
66
  "is-hotkey": "^0.2.0",
67
67
  "lodash.camelcase": "^4.3.0",