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

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.
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { DOMElement } from '../utils/dom';
6
6
  /**
7
- * pre-prase table ,去掉 <tbody> 和处理单元格中的 <p> 标签,以及删除隐藏的单元格
7
+ * pre-prase table ,去掉 <tbody> 和处理单元格中的 <p> 标签
8
8
  * @param table table elem
9
9
  */
10
10
  declare function preParse(tableElem: DOMElement): DOMElement;
@@ -1,5 +1,6 @@
1
- import { RelativeRange } from './module/custom-types';
2
- import { CursorEditor, CursorState, CursorStateChangeEvent, RemoteCursorChangeEventListener, withCursors, WithCursorsOptions, withYHistory, WithYHistoryOptions, withYjs, WithYjsOptions, YHistoryEditor, YjsEditor } from './plugins';
1
+ import { CursorEditor, withCursors, withYHistory, withYjs, YHistoryEditor, YjsEditor } from './plugins';
3
2
  import { slateNodesToInsertDelta, yTextToSlateElement } from './utils/convert';
4
3
  import { relativePositionToSlatePoint, relativeRangeToSlateRange, slatePointToRelativePosition, slateRangeToRelativeRange } from './utils/position';
5
- export { CursorEditor, CursorState, CursorStateChangeEvent, relativePositionToSlatePoint, RelativeRange, relativeRangeToSlateRange, RemoteCursorChangeEventListener, slateNodesToInsertDelta, slatePointToRelativePosition, slateRangeToRelativeRange, withCursors, WithCursorsOptions, withYHistory, WithYHistoryOptions, withYjs, WithYjsOptions, YHistoryEditor, YjsEditor, yTextToSlateElement, };
4
+ export { CursorEditor, relativePositionToSlatePoint, relativeRangeToSlateRange, slateNodesToInsertDelta, slatePointToRelativePosition, slateRangeToRelativeRange, withCursors, withYHistory, withYjs, YHistoryEditor, YjsEditor, yTextToSlateElement, };
5
+ export type { RelativeRange } from './module/custom-types';
6
+ export type { CursorState, CursorStateChangeEvent, RemoteCursorChangeEventListener, WithCursorsOptions, WithYHistoryOptions, WithYjsOptions, } from './plugins';
@@ -1,3 +1,6 @@
1
- export * from './withCursors';
2
- export * from './withYHistory';
3
- export * from './withYjs';
1
+ export type { CursorState, CursorStateChangeEvent, RemoteCursorChangeEventListener, WithCursorsOptions, } from './withCursors';
2
+ export { CursorEditor, withCursors, } from './withCursors';
3
+ export type { WithYHistoryOptions } from './withYHistory';
4
+ export { withYHistory, YHistoryEditor, } from './withYHistory';
5
+ export type { WithYjsOptions } from './withYjs';
6
+ export { withYjs, YjsEditor, } from './withYjs';
@@ -1,3 +1,3 @@
1
- import { IDomEditor } from '@wangeditor-next/editor';
1
+ import type { IDomEditor } from '@wangeditor-next/editor';
2
2
  export declare const EditorContext: import("react").Context<IDomEditor | null>;
3
3
  export declare const useEditorStatic: () => IDomEditor | null;
@@ -1,3 +1,3 @@
1
- import { IDomEditor } from '@wangeditor-next/editor';
1
+ import type { IDomEditor } from '@wangeditor-next/editor';
2
2
  import { CursorEditor } from '@wangeditor-next/yjs';
3
3
  export declare function useRemoteCursorEditor<TCursorData extends Record<string, unknown> = Record<string, unknown>>(): CursorEditor<TCursorData> & IDomEditor;
@@ -1,6 +1,6 @@
1
- import { CursorState } from '@wangeditor-next/yjs';
2
- import { RefObject } from 'react';
3
- import { BaseRange, NodeMatch, Text } from 'slate';
1
+ import type { CursorState } from '@wangeditor-next/yjs';
2
+ import type { RefObject } from 'react';
3
+ import type { BaseRange, NodeMatch, Text } from 'slate';
4
4
  import { CaretPosition, SelectionRect } from '../utils/getOverlayPosition';
5
5
  export type UseRemoteCursorOverlayPositionsOptions<T extends HTMLElement> = {
6
6
  shouldGenerateOverlay?: NodeMatch<Text>;
@@ -1,4 +1,5 @@
1
1
  export { EditorContext, useEditorStatic } from './hooks/use-editor-static';
2
- export { CursorOverlayData, useRemoteCursorOverlayPositions, UseRemoteCursorOverlayPositionsOptions, } from './hooks/useRemoteCursorOverlayPositions';
2
+ export type { CursorOverlayData, UseRemoteCursorOverlayPositionsOptions, } from './hooks/useRemoteCursorOverlayPositions';
3
+ export { useRemoteCursorOverlayPositions, } from './hooks/useRemoteCursorOverlayPositions';
3
4
  export { useRemoteCursorStates, useRemoteCursorStatesSelector } from './hooks/useRemoteCursorStates';
4
5
  export { getCursorRange } from './utils/getCursorRange';
@@ -1,4 +1,4 @@
1
- import { IDomEditor } from '@wangeditor-next/editor';
1
+ import type { IDomEditor } from '@wangeditor-next/editor';
2
2
  import { BaseRange, Path, Text } from 'slate';
3
3
  export type SelectionRect = {
4
4
  width: number;
@@ -1,3 +1,3 @@
1
- import { IDomEditor } from '@wangeditor-next/editor';
1
+ import type { IDomEditor } from '@wangeditor-next/editor';
2
2
  import { BaseRange } from 'slate';
3
3
  export declare function reactEditorToDomRangeSafe(editor: IDomEditor, range: BaseRange): Range | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wangeditor-next/yjs-for-react",
3
- "version": "0.1.64",
3
+ "version": "0.1.66",
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.53",
54
- "@wangeditor-next/yjs": "^0.1.48",
53
+ "@wangeditor-next/editor": "5.6.55",
54
+ "@wangeditor-next/yjs": "^0.1.49",
55
55
  "react": ">=17.0.2",
56
56
  "slate": "^0.123.0",
57
57
  "yjs": "^13.5.29"