@wangeditor-next/yjs-for-react 0.1.45-beta.0 → 0.1.46

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 - present wangEditor-team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -199,6 +199,7 @@ export interface IEditorConfig {
199
199
  MENU_CONF?: Partial<IMenuConfig>;
200
200
  hoverbarKeys?: IHoverbarConf;
201
201
  EXTEND_CONF?: any;
202
+ skipCacheTypes?: string[];
202
203
  }
203
204
  /**
204
205
  * toolbar config
@@ -2,6 +2,7 @@
2
2
  * @description editor interface
3
3
  * @author wangfupeng
4
4
  */
5
+ import { NodeEntryWithContext } from '@wangeditor-next/table-module/src/utils';
5
6
  import ee from 'event-emitter';
6
7
  import { Ancestor, Editor, Element, Location, Node } from 'slate';
7
8
  import { AlertType, IEditorConfig, IMenuConfig, ISingleMenuConfig } from '../config/interface';
@@ -55,6 +56,7 @@ export interface IDomEditor extends Editor {
55
56
  move: (distance: number, reverse?: boolean) => void;
56
57
  moveReverse: (distance: number) => void;
57
58
  restoreSelection: () => void;
59
+ getTableSelection?: () => NodeEntryWithContext[][] | null;
58
60
  getSelectionPosition: () => Partial<IPositionStyle>;
59
61
  getNodePosition: (node: Node) => Partial<IPositionStyle>;
60
62
  isSelectedAll: () => boolean;
@@ -3,17 +3,17 @@
3
3
  * @author wangfupeng
4
4
  */
5
5
  import { Emitter } from 'event-emitter';
6
+ import { Ancestor, Editor, Node, Path, Range } from 'slate';
6
7
  import { VNode } from 'snabbdom';
7
- import { Node, Ancestor, Editor, Path, Range } from 'slate';
8
+ import { IEditorConfig } from '../config/interface';
8
9
  import { IDomEditor } from '../editor/interface';
9
- import TextArea from '../text-area/TextArea';
10
- import Toolbar from '../menus/bar/Toolbar';
11
10
  import HoverBar from '../menus/bar/HoverBar';
11
+ import Toolbar from '../menus/bar/Toolbar';
12
12
  import { IBarItem } from '../menus/bar-item/index';
13
- import { Key } from './key';
14
- import { PatchFn } from '../utils/vdom';
15
- import { IEditorConfig } from '../config/interface';
16
13
  import PanelAndModal from '../menus/panel-and-modal/BaseClass';
14
+ import TextArea from '../text-area/TextArea';
15
+ import { PatchFn } from '../utils/vdom';
16
+ import { Key } from './key';
17
17
  export declare const EDITOR_TO_TEXTAREA: WeakMap<IDomEditor, TextArea>;
18
18
  export declare const TEXTAREA_TO_EDITOR: WeakMap<TextArea, IDomEditor>;
19
19
  export declare const TOOLBAR_TO_EDITOR: WeakMap<Toolbar, IDomEditor>;
@@ -27,6 +27,8 @@ export declare const EDITOR_TO_CONFIG: WeakMap<IDomEditor, IEditorConfig>;
27
27
  export declare const IS_FIRST_PATCH: WeakMap<TextArea, boolean>;
28
28
  export declare const TEXTAREA_TO_PATCH_FN: WeakMap<TextArea, PatchFn>;
29
29
  export declare const TEXTAREA_TO_VNODE: WeakMap<TextArea, VNode>;
30
+ export declare const NODE_TO_VNODE: WeakMap<Node, [number, VNode]>;
31
+ export declare const NODE_TO_HTML: WeakMap<Node, String>;
30
32
  /**
31
33
  * Two weak maps that allow us rebuild a path given a node. They are populated
32
34
  * at render time such that after a render occurs we can always backtrack.