@wangeditor-next/yjs-for-react 0.1.66 → 0.1.67

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.
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @description normalize link url
3
+ * @author OpenAI
4
+ */
5
+ /**
6
+ * Normalize URLs imported from HTML editors such as Microsoft Office.
7
+ * Formatting whitespace inside href values should not survive as literal
8
+ * line breaks, while real spaces should be serialized as %20.
9
+ */
10
+ export declare function normalizeLinkUrl(url: string): string;
@@ -175,6 +175,9 @@ export interface IMenuConfig {
175
175
  uploadImage: IUploadImageConfig;
176
176
  codeSelectLang: ICodeLangConfig;
177
177
  }
178
+ export type IMenuConfigUpdate = {
179
+ [K in keyof IMenuConfig]?: Partial<IMenuConfig[K]>;
180
+ };
178
181
  /**
179
182
  * editor config
180
183
  */
@@ -205,7 +208,7 @@ export interface IEditorConfig {
205
208
  autoFocus: boolean;
206
209
  decorate?: (nodeEntry: NodeEntry) => Range[];
207
210
  maxLength?: number;
208
- MENU_CONF?: Partial<IMenuConfig>;
211
+ MENU_CONF?: IMenuConfigUpdate;
209
212
  hoverbarKeys?: IHoverbarConf;
210
213
  EXTEND_CONF?: any;
211
214
  skipCacheTypes?: string[];
@@ -23,6 +23,7 @@ declare class Toolbar {
23
23
  private registerGroup;
24
24
  private registerSingleItem;
25
25
  private getEditorInstance;
26
+ private syncToolbarState;
26
27
  /**
27
28
  * editor onChange 时触发(涉及 DOM 操作,加防抖)
28
29
  */
@@ -2,8 +2,8 @@
2
2
  * @description base button class
3
3
  * @author wangfupeng
4
4
  */
5
- import { IButtonMenu, IDropPanelMenu, IModalMenu } from '../interface';
6
5
  import { Dom7Array } from '../../utils/dom';
6
+ import { IButtonMenu, IDropPanelMenu, IModalMenu } from '../interface';
7
7
  import { IBarItem } from './index';
8
8
  declare abstract class BaseButton implements IBarItem {
9
9
  readonly $elem: Dom7Array;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wangeditor-next/yjs-for-react",
3
- "version": "0.1.66",
3
+ "version": "0.1.67",
4
4
  "description": "React specific components/utils for wangeditor-next-yjs.",
5
5
  "author": "cycleccc <2991205548@qq.com>",
6
6
  "type": "module",
@@ -50,8 +50,8 @@
50
50
  "y-protocols": "^1.0.5"
51
51
  },
52
52
  "peerDependencies": {
53
- "@wangeditor-next/editor": "5.6.55",
54
- "@wangeditor-next/yjs": "^0.1.49",
53
+ "@wangeditor-next/editor": "5.6.56",
54
+ "@wangeditor-next/yjs": "^0.1.50",
55
55
  "react": ">=17.0.2",
56
56
  "slate": "^0.123.0",
57
57
  "yjs": "^13.5.29"