@handlewithcare/react-prosemirror 2.5.2 → 2.5.4

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.
@@ -8,6 +8,7 @@ interface DOMObserver {
8
8
  queue: MutationRecord[];
9
9
  start(): void;
10
10
  stop(): void;
11
+ onSelectionChange(): void;
11
12
  }
12
13
  interface InputState {
13
14
  compositionID: number;
@@ -56,15 +57,27 @@ export declare class ReactEditorView extends EditorView implements AbstractEdito
56
57
  domSelection: () => DOMSelection | null;
57
58
  private nextProps;
58
59
  private prevState;
60
+ private _destroyed;
59
61
  constructor(place: {
60
62
  mount: HTMLElement;
61
63
  }, props: DirectEditorProps);
62
64
  get props(): DirectEditorProps;
65
+ /**
66
+ * @privateremarks
67
+ *
68
+ * We override this getter because the base implementation
69
+ * relies on checking `docView === null`, but we unconditionally
70
+ * set view.docView in a layout effect in the DocNodeView.
71
+ * This has the effect of "un-destroying" the EditorView,
72
+ * making it impossible to determine whether it's been destroyed.
73
+ */
74
+ get isDestroyed(): boolean;
63
75
  setProps(props: Partial<DirectEditorProps>): void;
64
76
  update(props: DirectEditorProps): void;
65
77
  updateState(state: EditorState): void;
66
78
  someProp<PropName extends keyof EditorProps>(propName: PropName): EditorProps[PropName] | undefined;
67
79
  someProp<PropName extends keyof EditorProps, Result>(propName: PropName, f?: (value: NonNullable<EditorProps[PropName]>) => Result): Result | undefined;
80
+ destroy(): void;
68
81
  /**
69
82
  * Commit effects by appling the pending props and state.
70
83
  *
@@ -0,0 +1 @@
1
+ export declare function useEffectEvent<P extends unknown[], R>(fn: (...args: P) => R): (...funcArgs: P) => R;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@handlewithcare/react-prosemirror",
3
- "version": "2.5.2",
3
+ "version": "2.5.4",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.js",