@wangeditor-next/list-module 1.1.0 → 1.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.
@@ -1,15 +0,0 @@
1
- /**
2
- * @description to html
3
- * @author wangfupeng
4
- */
5
- import { Element } from 'slate';
6
- declare function elemToHtml(elem: Element, childrenHtml: string): {
7
- html: string;
8
- prefix?: string;
9
- suffix?: string;
10
- };
11
- declare const listItemToHtmlConf: {
12
- type: string;
13
- elemToHtml: typeof elemToHtml;
14
- };
15
- export default listItemToHtmlConf;
@@ -1,7 +0,0 @@
1
- /**
2
- * @description list module entry
3
- * @author wangfupeng
4
- */
5
- import { IModuleConf } from '@wangeditor-next/core';
6
- declare const list: Partial<IModuleConf>;
7
- export default list;
@@ -1,18 +0,0 @@
1
- /**
2
- * @description base menu
3
- * @author wangfupeng
4
- */
5
- import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
6
- declare abstract class BaseMenu implements IButtonMenu {
7
- readonly type = "list-item";
8
- abstract readonly ordered: boolean;
9
- abstract readonly title: string;
10
- abstract readonly iconSvg: string;
11
- readonly tag = "button";
12
- private getListNode;
13
- getValue(editor: IDomEditor): string | boolean;
14
- isActive(editor: IDomEditor): boolean;
15
- isDisabled(editor: IDomEditor): boolean;
16
- exec(editor: IDomEditor, value: string | boolean): void;
17
- }
18
- export default BaseMenu;
@@ -1,11 +0,0 @@
1
- /**
2
- * @description bulleted list menu
3
- * @author wangfupeng
4
- */
5
- import BaseMenu from './BaseMenu';
6
- declare class BulletedListMenu extends BaseMenu {
7
- readonly ordered = false;
8
- readonly title: string;
9
- readonly iconSvg = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z\"></path></svg>";
10
- }
11
- export default BulletedListMenu;
@@ -1,11 +0,0 @@
1
- /**
2
- * @description numbered list menu
3
- * @author wangfupeng
4
- */
5
- import BaseMenu from './BaseMenu';
6
- declare class NumberedListMenu extends BaseMenu {
7
- readonly ordered = true;
8
- readonly title: string;
9
- 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>";
10
- }
11
- export default NumberedListMenu;
@@ -1,14 +0,0 @@
1
- /**
2
- * @description menu entry
3
- * @author wangfupeng
4
- */
5
- import BulletedListMenu from './BulletedListMenu';
6
- import NumberedListMenu from './NumberedListMenu';
7
- export declare const bulletedListMenuConf: {
8
- key: string;
9
- factory(): BulletedListMenu;
10
- };
11
- export declare const numberedListMenuConf: {
12
- key: string;
13
- factory(): NumberedListMenu;
14
- };
@@ -1,19 +0,0 @@
1
- /**
2
- * @description parse elem html
3
- * @author wangfupeng
4
- */
5
- import { Descendant } from 'slate';
6
- import { DOMElement } from '../utils/dom';
7
- import { IDomEditor } from '@wangeditor-next/core';
8
- import { ListItemElement } from './custom-types';
9
- declare function parseItemHtml(elem: DOMElement, children: Descendant[], editor: IDomEditor): ListItemElement;
10
- export declare const parseItemHtmlConf: {
11
- selector: string;
12
- parseElemHtml: typeof parseItemHtml;
13
- };
14
- declare function parseListHtml(elem: DOMElement, children: Descendant[], editor: IDomEditor): ListItemElement[];
15
- export declare const parseListHtmlConf: {
16
- selector: string;
17
- parseElemHtml: typeof parseListHtml;
18
- };
19
- export {};
@@ -1,7 +0,0 @@
1
- /**
2
- * @description editor 插件,重写 editor API
3
- * @author wangfupeng
4
- */
5
- import { IDomEditor } from '@wangeditor-next/core';
6
- declare function withList<T extends IDomEditor>(editor: T): T;
7
- export default withList;
@@ -1,13 +0,0 @@
1
- /**
2
- * @description render list elem
3
- * @author wangfupeng
4
- */
5
- import { Element as SlateElement } from 'slate';
6
- import { VNode } from 'snabbdom';
7
- import { IDomEditor } from '@wangeditor-next/core';
8
- declare function renderListElem(elemNode: SlateElement, children: VNode[] | null, editor: IDomEditor): VNode;
9
- declare const renderListItemConf: {
10
- type: string;
11
- renderElem: typeof renderListElem;
12
- };
13
- export default renderListItemConf;
@@ -1,19 +0,0 @@
1
- /**
2
- * @description DOM 操作
3
- * @author wangfupeng
4
- */
5
- import $, { Dom7Array } from 'dom7';
6
- export default $;
7
- import DOMNode = globalThis.Node;
8
- import DOMComment = globalThis.Comment;
9
- import DOMElement = globalThis.Element;
10
- import DOMText = globalThis.Text;
11
- import DOMRange = globalThis.Range;
12
- import DOMSelection = globalThis.Selection;
13
- import DOMStaticRange = globalThis.StaticRange;
14
- export { DOMNode, DOMComment, DOMElement, DOMText, DOMRange, DOMSelection, DOMStaticRange };
15
- /**
16
- * 获取 tagName lower-case
17
- * @param $elem $elem
18
- */
19
- export declare function getTagName($elem: Dom7Array): string;
@@ -1,6 +0,0 @@
1
- /**
2
- * @description maps
3
- * @author wangfupeng
4
- */
5
- import { IDomEditor } from '@wangeditor-next/core';
6
- export declare const ELEM_TO_EDITOR: WeakMap<import("../../../custom-types").CustomElement, IDomEditor>;