@wangeditor-next/video-module 6.4.1 → 6.4.3
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/dist/index.d.ts +8 -0
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -12
- package/dist/core/src/config/index.d.ts +0 -13
- package/dist/core/src/config/interface.d.ts +0 -317
- package/dist/core/src/config/register.d.ts +0 -12
- package/dist/core/src/config/style-mode.d.ts +0 -8
- package/dist/core/src/constants/index.d.ts +0 -1
- package/dist/core/src/constants/svg.d.ts +0 -12
- package/dist/core/src/create/bind-node-relation.d.ts +0 -15
- package/dist/core/src/create/create-editor.d.ts +0 -10
- package/dist/core/src/create/create-toolbar.d.ts +0 -14
- package/dist/core/src/create/helper.d.ts +0 -37
- package/dist/core/src/create/index.d.ts +0 -8
- package/dist/core/src/editor/dom-editor.d.ts +0 -154
- package/dist/core/src/editor/interface.d.ts +0 -90
- package/dist/core/src/editor/plugins/with-config.d.ts +0 -7
- package/dist/core/src/editor/plugins/with-content.d.ts +0 -7
- package/dist/core/src/editor/plugins/with-dom.d.ts +0 -10
- package/dist/core/src/editor/plugins/with-emitter.d.ts +0 -7
- package/dist/core/src/editor/plugins/with-event-data.d.ts +0 -7
- package/dist/core/src/editor/plugins/with-history.d.ts +0 -7
- package/dist/core/src/editor/plugins/with-max-length.d.ts +0 -7
- package/dist/core/src/editor/plugins/with-selection.d.ts +0 -7
- package/dist/core/src/i18n/index.d.ts +0 -32
- package/dist/core/src/index.d.ts +0 -45
- package/dist/core/src/menus/bar/HoverBar.d.ts +0 -48
- package/dist/core/src/menus/bar/Toolbar.d.ts +0 -38
- package/dist/core/src/menus/bar-item/BaseButton.d.ts +0 -26
- package/dist/core/src/menus/bar-item/DropPanelButton.d.ts +0 -14
- package/dist/core/src/menus/bar-item/GroupButton.d.ts +0 -17
- package/dist/core/src/menus/bar-item/ModalButton.d.ts +0 -25
- package/dist/core/src/menus/bar-item/Select.d.ts +0 -22
- package/dist/core/src/menus/bar-item/SimpleButton.d.ts +0 -11
- package/dist/core/src/menus/bar-item/index.d.ts +0 -24
- package/dist/core/src/menus/bar-item/tooltip.d.ts +0 -6
- package/dist/core/src/menus/helpers/helpers.d.ts +0 -18
- package/dist/core/src/menus/helpers/position.d.ts +0 -36
- package/dist/core/src/menus/index.d.ts +0 -9
- package/dist/core/src/menus/interface.d.ts +0 -65
- package/dist/core/src/menus/panel-and-modal/BaseClass.d.ts +0 -26
- package/dist/core/src/menus/panel-and-modal/DropPanel.d.ts +0 -12
- package/dist/core/src/menus/panel-and-modal/Modal.d.ts +0 -44
- package/dist/core/src/menus/panel-and-modal/SelectList.d.ts +0 -20
- package/dist/core/src/menus/register.d.ts +0 -15
- package/dist/core/src/parse-html/helper.d.ts +0 -10
- package/dist/core/src/parse-html/index.d.ts +0 -35
- package/dist/core/src/parse-html/parse-common-elem-html.d.ts +0 -15
- package/dist/core/src/parse-html/parse-elem-html.d.ts +0 -15
- package/dist/core/src/parse-html/parse-text-elem-html.d.ts +0 -16
- package/dist/core/src/render/element/getRenderElem.d.ts +0 -11
- package/dist/core/src/render/element/renderElement.d.ts +0 -9
- package/dist/core/src/render/element/renderStyle.d.ts +0 -15
- package/dist/core/src/render/helper.d.ts +0 -6
- package/dist/core/src/render/index.d.ts +0 -27
- package/dist/core/src/render/node2Vnode.d.ts +0 -15
- package/dist/core/src/render/text/genVnode.d.ts +0 -9
- package/dist/core/src/render/text/renderStyle.d.ts +0 -15
- package/dist/core/src/render/text/renderText.d.ts +0 -9
- package/dist/core/src/text-area/TextArea.d.ts +0 -52
- package/dist/core/src/text-area/event-handlers/beforeInput.d.ts +0 -8
- package/dist/core/src/text-area/event-handlers/blur.d.ts +0 -8
- package/dist/core/src/text-area/event-handlers/click.d.ts +0 -8
- package/dist/core/src/text-area/event-handlers/composition.d.ts +0 -27
- package/dist/core/src/text-area/event-handlers/copy.d.ts +0 -8
- package/dist/core/src/text-area/event-handlers/cut.d.ts +0 -8
- package/dist/core/src/text-area/event-handlers/drag.d.ts +0 -9
- package/dist/core/src/text-area/event-handlers/drop.d.ts +0 -8
- package/dist/core/src/text-area/event-handlers/focus.d.ts +0 -8
- package/dist/core/src/text-area/event-handlers/index.d.ts +0 -35
- package/dist/core/src/text-area/event-handlers/keydown.d.ts +0 -8
- package/dist/core/src/text-area/event-handlers/keypress.d.ts +0 -8
- package/dist/core/src/text-area/event-handlers/paste.d.ts +0 -8
- package/dist/core/src/text-area/helpers.d.ts +0 -30
- package/dist/core/src/text-area/place-holder.d.ts +0 -18
- package/dist/core/src/text-area/syncSelection.d.ts +0 -19
- package/dist/core/src/text-area/update-view.d.ts +0 -13
- package/dist/core/src/to-html/elem2html.d.ts +0 -9
- package/dist/core/src/to-html/index.d.ts +0 -44
- package/dist/core/src/to-html/node2html.d.ts +0 -12
- package/dist/core/src/to-html/text2html.d.ts +0 -9
- package/dist/core/src/upload/createUploader.d.ts +0 -14
- package/dist/core/src/upload/createUppyUploader.d.ts +0 -7
- package/dist/core/src/upload/index.d.ts +0 -9
- package/dist/core/src/upload/interface.d.ts +0 -72
- package/dist/core/src/upload.d.ts +0 -5
- package/dist/core/src/utils/dom.d.ts +0 -103
- package/dist/core/src/utils/hotkeys.d.ts +0 -35
- package/dist/core/src/utils/key.d.ts +0 -11
- package/dist/core/src/utils/line.d.ts +0 -14
- package/dist/core/src/utils/sanitize-html.d.ts +0 -5
- package/dist/core/src/utils/ua.d.ts +0 -14
- package/dist/core/src/utils/util.d.ts +0 -28
- package/dist/core/src/utils/vdom.d.ts +0 -34
- package/dist/core/src/utils/weak-maps.d.ts +0 -60
- package/dist/video-module/src/constants/svg.d.ts +0 -15
- package/dist/video-module/src/index.d.ts +0 -8
- package/dist/video-module/src/locale/en.d.ts +0 -24
- package/dist/video-module/src/locale/index.d.ts +0 -5
- package/dist/video-module/src/locale/zh-CN.d.ts +0 -24
- package/dist/video-module/src/module/alignment.d.ts +0 -10
- package/dist/video-module/src/module/custom-types.d.ts +0 -24
- package/dist/video-module/src/module/elem-to-html.d.ts +0 -12
- package/dist/video-module/src/module/helper/insert-video.d.ts +0 -12
- package/dist/video-module/src/module/helper/upload-videos.d.ts +0 -6
- package/dist/video-module/src/module/index.d.ts +0 -7
- package/dist/video-module/src/module/menu/EditVideoSizeMenu.d.ts +0 -25
- package/dist/video-module/src/module/menu/EditVideoSrcMenu.d.ts +0 -26
- package/dist/video-module/src/module/menu/InsertVideoMenu.d.ts +0 -25
- package/dist/video-module/src/module/menu/UploadVideoMenu.d.ts +0 -16
- package/dist/video-module/src/module/menu/VideoAlignMenu.d.ts +0 -18
- package/dist/video-module/src/module/menu/config.d.ts +0 -25
- package/dist/video-module/src/module/menu/index.d.ts +0 -43
- package/dist/video-module/src/module/parse-elem-html.d.ts +0 -14
- package/dist/video-module/src/module/plugin.d.ts +0 -7
- package/dist/video-module/src/module/pre-parse-html.d.ts +0 -15
- package/dist/video-module/src/module/render-elem.d.ts +0 -13
- package/dist/video-module/src/utils/dom.d.ts +0 -29
- package/dist/video-module/src/utils/util.d.ts +0 -12
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description align video menu
|
|
3
|
-
*/
|
|
4
|
-
import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
|
|
5
|
-
import { VideoAlign } from '../custom-types';
|
|
6
|
-
declare class VideoAlignMenu implements IButtonMenu {
|
|
7
|
-
readonly align: VideoAlign;
|
|
8
|
-
readonly iconSvg: string;
|
|
9
|
-
readonly tag = "button";
|
|
10
|
-
readonly title: string;
|
|
11
|
-
constructor(align: VideoAlign, titleKey: string, iconSvg: string);
|
|
12
|
-
private getSelectedVideo;
|
|
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 VideoAlignMenu;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description video menu config
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
import { IUploadVideoConfig } from '@wangeditor-next/core';
|
|
6
|
-
import { VideoElement } from '../custom-types';
|
|
7
|
-
export declare function genUploadVideoMenuConfig(): IUploadVideoConfig;
|
|
8
|
-
/**
|
|
9
|
-
* 生成插入网络视频的配置
|
|
10
|
-
*/
|
|
11
|
-
export declare function genInsertVideoMenuConfig(): {
|
|
12
|
-
onInsertedVideo(_node: VideoElement): void;
|
|
13
|
-
/**
|
|
14
|
-
* 检查 video ,支持 async
|
|
15
|
-
* @param src src
|
|
16
|
-
* @param poster poster
|
|
17
|
-
*/
|
|
18
|
-
checkVideo(_src: string, _poster: string): boolean | string | undefined;
|
|
19
|
-
/**
|
|
20
|
-
* 转换 video src
|
|
21
|
-
* @param src src
|
|
22
|
-
* @returns new src
|
|
23
|
-
*/
|
|
24
|
-
parseVideoSrc(src: string): string;
|
|
25
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description video menu
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
import EditorVideoSizeMenu from './EditVideoSizeMenu';
|
|
6
|
-
import EditorVideoSrcMenu from './EditVideoSrcMenu';
|
|
7
|
-
import InsertVideoMenu from './InsertVideoMenu';
|
|
8
|
-
import UploadVideoMenu from './UploadVideoMenu';
|
|
9
|
-
import VideoAlignMenu from './VideoAlignMenu';
|
|
10
|
-
export declare const insertVideoMenuConf: {
|
|
11
|
-
key: string;
|
|
12
|
-
factory(): InsertVideoMenu;
|
|
13
|
-
config: {
|
|
14
|
-
onInsertedVideo(_node: import("../custom-types").VideoElement): void;
|
|
15
|
-
checkVideo(_src: string, _poster: string): boolean | string | undefined;
|
|
16
|
-
parseVideoSrc(src: string): string;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export declare const uploadVideoMenuConf: {
|
|
20
|
-
key: string;
|
|
21
|
-
factory(): UploadVideoMenu;
|
|
22
|
-
config: import("@wangeditor-next/core").IUploadConfig;
|
|
23
|
-
};
|
|
24
|
-
export declare const editorVideoSizeMenuConf: {
|
|
25
|
-
key: string;
|
|
26
|
-
factory(): EditorVideoSizeMenu;
|
|
27
|
-
};
|
|
28
|
-
export declare const editorVideoSrcMenuConf: {
|
|
29
|
-
key: string;
|
|
30
|
-
factory(): EditorVideoSrcMenu;
|
|
31
|
-
};
|
|
32
|
-
export declare const videoAlignLeftMenuConf: {
|
|
33
|
-
key: string;
|
|
34
|
-
factory(): VideoAlignMenu;
|
|
35
|
-
};
|
|
36
|
-
export declare const videoAlignCenterMenuConf: {
|
|
37
|
-
key: string;
|
|
38
|
-
factory(): VideoAlignMenu;
|
|
39
|
-
};
|
|
40
|
-
export declare const videoAlignRightMenuConf: {
|
|
41
|
-
key: string;
|
|
42
|
-
factory(): VideoAlignMenu;
|
|
43
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description parse html
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
import { IDomEditor } from '@wangeditor-next/core';
|
|
6
|
-
import { Descendant } from 'slate';
|
|
7
|
-
import { DOMElement } from '../utils/dom';
|
|
8
|
-
import { VideoElement } from './custom-types';
|
|
9
|
-
declare function parseHtml(elem: DOMElement, _children: Descendant[], _editor: IDomEditor): VideoElement;
|
|
10
|
-
export declare const parseHtmlConf: {
|
|
11
|
-
selector: string;
|
|
12
|
-
parseElemHtml: typeof parseHtml;
|
|
13
|
-
};
|
|
14
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description pre parse html
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
import { DOMElement } from '../utils/dom';
|
|
6
|
-
/**
|
|
7
|
-
* pre-prase video ,兼容 V4
|
|
8
|
-
* @param elem elem
|
|
9
|
-
*/
|
|
10
|
-
declare function preParse(elem: DOMElement): DOMElement;
|
|
11
|
-
export declare const preParseHtmlConf: {
|
|
12
|
-
selector: string;
|
|
13
|
-
preParseHtml: typeof preParse;
|
|
14
|
-
};
|
|
15
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description video render elem
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
import { IDomEditor } from '@wangeditor-next/core';
|
|
6
|
-
import { Element } from 'slate';
|
|
7
|
-
import { VNode } from 'snabbdom';
|
|
8
|
-
declare function renderVideo(elemNode: Element, children: VNode[] | null, editor: IDomEditor): VNode;
|
|
9
|
-
declare const renderVideoConf: {
|
|
10
|
-
type: string;
|
|
11
|
-
renderElem: typeof renderVideo;
|
|
12
|
-
};
|
|
13
|
-
export { renderVideoConf };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description DOM 操作
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
import $, { Dom7Array } from 'dom7';
|
|
6
|
-
import { videoStyle } from '../module/custom-types';
|
|
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 type { Dom7Array } from 'dom7';
|
|
15
|
-
export default $;
|
|
16
|
-
/**
|
|
17
|
-
* 获取 tagName lower-case
|
|
18
|
-
* @param $elem $elem
|
|
19
|
-
*/
|
|
20
|
-
export declare function getTagName($elem: Dom7Array): string;
|
|
21
|
-
/**
|
|
22
|
-
* 生成带 size 样式的 iframe html
|
|
23
|
-
* @param iframeHtml iframe html string
|
|
24
|
-
* @param width width
|
|
25
|
-
* @param height height
|
|
26
|
-
* @returns iframe html string with size style
|
|
27
|
-
*/
|
|
28
|
-
export declare function genSizeStyledIframeHtml(iframeHtml: string, width?: string, height?: string, style?: videoStyle, classMode?: boolean): string;
|
|
29
|
-
export { DOMComment, DOMElement, DOMNode, DOMRange, DOMSelection, DOMStaticRange, DOMText, };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description 工具函数
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* 获取随机数字符串
|
|
7
|
-
* @param prefix 前缀
|
|
8
|
-
* @returns 随机数字符串
|
|
9
|
-
*/
|
|
10
|
-
export declare function genRandomStr(prefix?: string): string;
|
|
11
|
-
export declare function replaceSymbols(str: string): string;
|
|
12
|
-
export declare function styleStringToObject(styleString: any): {};
|