@wangeditor-next/yjs-for-react 0.1.11 → 0.1.13
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/core/src/config/interface.d.ts +3 -3
- package/dist/core/src/index.d.ts +6 -6
- package/dist/core/src/upload/interface.d.ts +5 -0
- package/dist/upload-image-module/src/module/menu/config.d.ts +2 -11
- package/dist/upload-image-module/src/module/menu/index.d.ts +1 -1
- package/dist/video-module/src/module/menu/config.d.ts +2 -10
- package/dist/video-module/src/module/menu/index.d.ts +1 -1
- package/package.json +4 -4
|
@@ -70,10 +70,10 @@ interface IInsertVideoConfig {
|
|
|
70
70
|
checkVideo: (src: string, poster: string) => string | boolean | undefined;
|
|
71
71
|
parseVideoSrc: (url: string) => string;
|
|
72
72
|
}
|
|
73
|
-
interface IUploadVideoConfig extends IUploadConfig {
|
|
73
|
+
export interface IUploadVideoConfig extends IUploadConfig {
|
|
74
74
|
}
|
|
75
|
-
interface IUploadImageConfig extends IUploadConfig {
|
|
76
|
-
base64LimitSize
|
|
75
|
+
export interface IUploadImageConfig extends IUploadConfig {
|
|
76
|
+
base64LimitSize: number;
|
|
77
77
|
}
|
|
78
78
|
interface ICodeLangConfig {
|
|
79
79
|
codeLangs: {
|
package/dist/core/src/index.d.ts
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
5
|
import './assets/index.less';
|
|
6
|
-
import { RenderStyleFnType, IRenderElemConf } from './render/index';
|
|
7
|
-
import { styleToHtmlFnType, IElemToHtmlConf } from './to-html/index';
|
|
8
|
-
import { IPreParseHtmlConf, ParseStyleHtmlFnType, IParseElemHtmlConf } from './parse-html/index';
|
|
9
|
-
import { IRegisterMenuConf } from './menus/index';
|
|
10
6
|
import { IDomEditor } from './editor/interface';
|
|
7
|
+
import { IRegisterMenuConf } from './menus/index';
|
|
8
|
+
import { IParseElemHtmlConf, IPreParseHtmlConf, ParseStyleHtmlFnType } from './parse-html/index';
|
|
9
|
+
import { IRenderElemConf, RenderStyleFnType } from './render/index';
|
|
10
|
+
import { IElemToHtmlConf, styleToHtmlFnType } from './to-html/index';
|
|
11
11
|
export * from './create/index';
|
|
12
|
-
export { IEditorConfig, IToolbarConfig } from './config/interface';
|
|
13
|
-
export * from './editor/interface';
|
|
12
|
+
export { IEditorConfig, IToolbarConfig, IUploadImageConfig, IUploadVideoConfig, } from './config/interface';
|
|
14
13
|
export * from './editor/dom-editor';
|
|
14
|
+
export * from './editor/interface';
|
|
15
15
|
export * from './render/index';
|
|
16
16
|
export * from './to-html/index';
|
|
17
17
|
export * from './parse-html/index';
|
|
@@ -6,6 +6,7 @@ import { UppyFile } from '@uppy/core';
|
|
|
6
6
|
type FilesType = {
|
|
7
7
|
[key: string]: UppyFile<{}, {}>;
|
|
8
8
|
};
|
|
9
|
+
type InsertFn = (src: string, poster?: string, alt?: string, href?: string) => void | Promise<void>;
|
|
9
10
|
/**
|
|
10
11
|
* 配置参考 https://uppy.io/docs/uppy/
|
|
11
12
|
*/
|
|
@@ -24,5 +25,9 @@ export interface IUploadConfig {
|
|
|
24
25
|
onProgress?: (progress: number) => void;
|
|
25
26
|
onFailed: (file: UppyFile<{}, {}>, response: any) => void;
|
|
26
27
|
onError: (file: UppyFile<{}, {}>, error: any, res: any) => void;
|
|
28
|
+
allowedFileTypes?: string[];
|
|
29
|
+
customInsert?: (res: any, insertFn: InsertFn) => void;
|
|
30
|
+
customUpload?: (files: File, insertFn: InsertFn) => void;
|
|
31
|
+
customBrowseAndUpload?: (insertFn: InsertFn) => void;
|
|
27
32
|
}
|
|
28
33
|
export {};
|
|
@@ -2,14 +2,5 @@
|
|
|
2
2
|
* @description upload image config
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
export type IUploadConfigForImage = IUploadConfig & {
|
|
8
|
-
allowedFileTypes?: string[];
|
|
9
|
-
customInsert?: (res: any, insertFn: InsertFn) => void;
|
|
10
|
-
customUpload?: (files: File, insertFn: InsertFn) => void;
|
|
11
|
-
base64LimitSize: number;
|
|
12
|
-
customBrowseAndUpload?: (insertFn: InsertFn) => void;
|
|
13
|
-
};
|
|
14
|
-
export declare function genUploadImageConfig(): IUploadConfigForImage;
|
|
15
|
-
export {};
|
|
5
|
+
import { IUploadImageConfig } from '@wangeditor-next/core';
|
|
6
|
+
export declare function genUploadImageConfig(): IUploadImageConfig;
|
|
@@ -2,16 +2,9 @@
|
|
|
2
2
|
* @description video menu config
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { IUploadVideoConfig } from '@wangeditor-next/core';
|
|
6
6
|
import { VideoElement } from '../custom-types';
|
|
7
|
-
|
|
8
|
-
export type IUploadConfigForVideo = IUploadConfig & {
|
|
9
|
-
allowedFileTypes?: string[];
|
|
10
|
-
customInsert?: (res: any, insertFn: InsertFn) => void;
|
|
11
|
-
customUpload?: (files: File, insertFn: InsertFn) => void;
|
|
12
|
-
customBrowseAndUpload?: (insertFn: InsertFn) => void;
|
|
13
|
-
};
|
|
14
|
-
export declare function genUploadVideoMenuConfig(): IUploadConfigForVideo;
|
|
7
|
+
export declare function genUploadVideoMenuConfig(): IUploadVideoConfig;
|
|
15
8
|
/**
|
|
16
9
|
* 生成插入网络视频的配置
|
|
17
10
|
*/
|
|
@@ -30,4 +23,3 @@ export declare function genInsertVideoMenuConfig(): {
|
|
|
30
23
|
*/
|
|
31
24
|
parseVideoSrc(src: string): string;
|
|
32
25
|
};
|
|
33
|
-
export {};
|
|
@@ -18,7 +18,7 @@ export declare const insertVideoMenuConf: {
|
|
|
18
18
|
export declare const uploadVideoMenuConf: {
|
|
19
19
|
key: string;
|
|
20
20
|
factory(): UploadVideoMenu;
|
|
21
|
-
config: import("
|
|
21
|
+
config: import("@wangeditor-next/core").IUploadVideoConfig;
|
|
22
22
|
};
|
|
23
23
|
export declare const editorVideoSizeMenuConf: {
|
|
24
24
|
key: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wangeditor-next/yjs-for-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "React specific components/utils for wangeditor-next-yjs.",
|
|
5
5
|
"author": "cycleccc <2991205548@qq.com>",
|
|
6
6
|
"type": "module",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"y-protocols": "^1.0.5"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@wangeditor-next/core": "1.7.
|
|
60
|
-
"@wangeditor-next/editor": "5.6.
|
|
61
|
-
"@wangeditor-next/yjs": "^0.1.
|
|
59
|
+
"@wangeditor-next/core": "1.7.14",
|
|
60
|
+
"@wangeditor-next/editor": "5.6.4",
|
|
61
|
+
"@wangeditor-next/yjs": "^0.1.12",
|
|
62
62
|
"react": ">=16.8.0",
|
|
63
63
|
"slate": "^0.72.0",
|
|
64
64
|
"yjs": "^13.5.29"
|