@magic-marker/prosemirror-suggest-changes 0.3.3-wrap-unwrap.30 → 0.3.3-wrap-unwrap.32

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,4 @@
1
- import { EditorState } from "prosemirror-state";
1
+ import { EditorState, Selection } from "prosemirror-state";
2
2
  import { preserveTransactionData, transformToSuggestionTransaction } from "../../../transformToSuggestionTransaction.js";
3
3
  import { generateNextNumberId } from "../../../generateId.js";
4
4
  import { suggestStructureChanges } from "../../wrapUnwrap/structureChangesPlugin.js";
@@ -51,12 +51,17 @@ export function handleTipTapParagraphIntoListJoin(args) {
51
51
  trackedTransaction.step(step);
52
52
  });
53
53
  preserveTransactionData(trackedTransaction, trackedJoinTransaction, {
54
- selection: "currentDocument",
54
+ selection: false,
55
55
  preserveScroll: false,
56
56
  preserveStoredMarks: false,
57
57
  preserveMeta: false
58
58
  });
59
- preserveTransactionData(trackedTransaction, args.transaction);
59
+ preserveTransactionData(trackedTransaction, args.transaction, {
60
+ selection: false
61
+ });
62
+ if (args.transaction.selectionSet) {
63
+ trackedTransaction.setSelection(Selection.fromJSON(trackedTransaction.doc, args.transaction.selection.toJSON()));
64
+ }
60
65
  return trackedTransaction;
61
66
  }
62
67
  function isTipTapParagraphIntoListJoinShape(shape) {
@@ -5,6 +5,7 @@ import { getSuggestionMarks } from "./utils.js";
5
5
  import { joinBlocks } from "./features/joinBlocks/index.js";
6
6
  import { collapseZWSPNodes, findJoinMark, joinNodesAndMarkJoinPoints, removeZWSPDeletions } from "./features/joinOnDelete/index.js";
7
7
  import { adjustForStartToStartTextblockDeletion } from "./features/startToStartTextblockDeletion/index.js";
8
+ // import { rebaseStep } from "./rebaseStep.js";
8
9
  /**
9
10
  * Transform a replace step into its equivalent tracked steps.
10
11
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magic-marker/prosemirror-suggest-changes",
3
- "version": "0.3.3-wrap-unwrap.30",
3
+ "version": "0.3.3-wrap-unwrap.32",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",