@handlewithcare/react-prosemirror 2.8.0 → 2.8.2

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.
@@ -1,4 +1,5 @@
1
- import { Command } from "prosemirror-state";
1
+ import { Command, EditorState, Transaction } from "prosemirror-state";
2
+ import { EditorView } from "prosemirror-view";
2
3
  /**
3
4
  * Create a command function that reorders the adjacent nodes starting
4
5
  * at the provided position.
@@ -10,3 +11,4 @@ import { Command } from "prosemirror-state";
10
11
  * and keep the other two in relative order, set `order` to `[1, 2, 0]`.
11
12
  */
12
13
  export declare function reorderSiblings(pos: number, order: number[]): Command;
14
+ export declare function reorderSiblingsOnTransaction(pos: number, order: number[], tr: Transaction, state: EditorState, dispatch?: EditorView["dispatch"]): boolean;
@@ -5,7 +5,9 @@ import { NodeViewDesc, ViewDesc } from "../viewdesc.js";
5
5
  type Props = NodeViewComponentProps["nodeProps"];
6
6
  export declare function useNodeViewDescriptor(ref: {
7
7
  readonly current: DOMNode | null;
8
- }, constructor: NodeViewConstructor, props: Props): {
8
+ }, constructor: NodeViewConstructor, findContentDOM: (source: {
9
+ contentDOM?: HTMLElement | null;
10
+ } | null, children: ViewDesc[]) => HTMLElement | null, props: Props): {
9
11
  childContextValue: {
10
12
  parentRef: import("react").MutableRefObject<NodeViewDesc | undefined>;
11
13
  siblingsRef: import("react").MutableRefObject<ViewDesc[]>;
@@ -161,6 +161,9 @@ declare class CustomNodeViewDesc extends NodeViewDesc {
161
161
  stopEvent(event: Event): boolean;
162
162
  ignoreMutation(mutation: ViewMutationRecord): boolean;
163
163
  }
164
+ export declare class ReactMarkViewDesc extends MarkViewDesc {
165
+ destroy(): void;
166
+ }
164
167
  export declare class ReactNodeViewDesc extends CustomNodeViewDesc {
165
168
  updateChildren(_view: EditorView, _pos: number): void;
166
169
  updateOuterDeco(outerDeco: readonly Decoration[]): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@handlewithcare/react-prosemirror",
3
- "version": "2.8.0",
3
+ "version": "2.8.2",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.js",
@@ -121,7 +121,7 @@
121
121
  "peerDependencies": {
122
122
  "prosemirror-model": "^1.0.0",
123
123
  "prosemirror-state": "^1.0.0",
124
- "prosemirror-view": "1.39.2",
124
+ "prosemirror-view": "1.41.4",
125
125
  "react": ">=17 <20",
126
126
  "react-dom": ">=17 <20",
127
127
  "react-reconciler": ">=0.26.1 <=0.33.0"