Skip to content

Commit 219d922

Browse files
nperez0111claude
andauthored
fix: make CustomChange compatible with prosemirror-changeset 2.4.1 (#2647)
* fix: make CustomChange compatible with prosemirror-changeset 2.4.1 prosemirror-changeset 2.4.1 added a toJSON() method to the Change class, causing fresh installs (without lockfile) to fail TypeScript compilation when creating plain objects typed as CustomChange. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * chore: update lockfile for @tiptap/* and prosemirror-changeset Bump locked versions within existing ranges: - @tiptap/* 3.22.1 -> 3.22.3 - prosemirror-changeset 2.3.1 -> 2.4.1 Skipped react/react-dom 19.2.5 (causes test failures). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
1 parent 37df722 commit 219d922

File tree

2 files changed

+147
-141
lines changed

2 files changed

+147
-141
lines changed

packages/xl-ai/src/prosemirror/changeset.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
import { getNodeById, PartialBlock, updateBlockTr } from "@blocknote/core";
22
import {
3-
Change,
43
ChangeSet,
4+
Span,
55
simplifyChanges,
66
TokenEncoder,
77
} from "prosemirror-changeset";
88
import { Node } from "prosemirror-model";
99
import { ReplaceStep, Transform } from "prosemirror-transform";
1010

11-
type CustomChange = Change & {
11+
type CustomChange = {
12+
fromA: number;
13+
toA: number;
14+
fromB: number;
15+
toB: number;
16+
deleted: readonly Span[];
17+
inserted: readonly Span[];
1218
type?: "mark-update" | "node-type-or-attr-update";
1319
};
1420

0 commit comments

Comments
 (0)