Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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]>
  • Loading branch information
nperez0111 and claude committed Apr 16, 2026
commit fe2976d92a00b901e43d4ea85111c97c5e18b1df
10 changes: 8 additions & 2 deletions packages/xl-ai/src/prosemirror/changeset.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
import { getNodeById, PartialBlock, updateBlockTr } from "@blocknote/core";
import {
Change,
ChangeSet,
Span,
simplifyChanges,
TokenEncoder,
} from "prosemirror-changeset";
import { Node } from "prosemirror-model";
import { ReplaceStep, Transform } from "prosemirror-transform";

type CustomChange = Change & {
type CustomChange = {
fromA: number;
toA: number;
fromB: number;
toB: number;
deleted: readonly Span[];
inserted: readonly Span[];
type?: "mark-update" | "node-type-or-attr-update";
};

Expand Down
Loading