diff --git a/docs/content/docs/features/collaboration/comments.mdx b/docs/content/docs/features/collaboration/comments.mdx
index 4b88225993..cf53ad1a93 100644
--- a/docs/content/docs/features/collaboration/comments.mdx
+++ b/docs/content/docs/features/collaboration/comments.mdx
@@ -16,24 +16,28 @@ To enable comments in your editor, you need to:
- Optionally provide a schema for comments and comment editors to use. If left undefined, they will use the [default comment editor schema](https://github.com/TypeCellOS/BlockNote/blob/main/packages/react/src/components/Comments/defaultCommentEditorSchema.ts). See [here](/docs/features/custom-schemas) to find out more about custom schemas.
```tsx
-const editor = useCreateBlockNote({
- extensions: [
- CommentsExtension({
- // See below.
- threadStore: ...,
- // Return user information for the given userIds (see below).
- resolveUsers: async (userIds: string[]) => { ... },
- // Optional, can be left undefined
- schema: BlockNoteSchema.create(...)
- }),
+import { withCollaboration } from "@blocknote/core/yjs";
+
+const editor = useCreateBlockNote(
+ withCollaboration({
+ extensions: [
+ CommentsExtension({
+ // See below.
+ threadStore: ...,
+ // Return user information for the given userIds (see below).
+ resolveUsers: async (userIds: string[]) => { ... },
+ // Optional, can be left undefined
+ schema: BlockNoteSchema.create(...)
+ }),
+ ...
+ ],
+ collaboration: {
+ // See real-time collaboration docs
+ ...
+ },
...
- ],
- collaboration: {
- // See real-time collaboration docs
- ...
- },
- ...
-});
+ }),
+);
```
**Demo**
@@ -50,7 +54,7 @@ BlockNote comes with several built-in ThreadStore implementations:
The `YjsThreadStore` provides direct Yjs-based storage for comments, storing thread data directly in the Yjs document. This implementation is ideal for simple collaborative setups where all users have write access to the document.
```tsx
-import { YjsThreadStore } from "@blocknote/core/comments";
+import { YjsThreadStore } from "@blocknote/core/yjs";
const threadStore = new YjsThreadStore(
userId, // The active user's ID
@@ -68,10 +72,8 @@ The `RESTYjsThreadStore` combines Yjs storage with a REST API backend, providing
In this implementation, data is written to the Yjs document via a REST API which can handle access control. Data is still retrieved from the Yjs document directly (after it's been updated by the REST API), this way all comment information automatically syncs between clients using the existing collaboration provider.
```tsx
-import {
- RESTYjsThreadStore,
- DefaultThreadStoreAuth,
-} from "@blocknote/core/comments";
+import { DefaultThreadStoreAuth } from "@blocknote/core/comments";
+import { RESTYjsThreadStore } from "@blocknote/core/yjs";
const threadStore = new RESTYjsThreadStore(
"https://api.example.com/comments", // Base URL for the REST API
diff --git a/docs/content/docs/features/collaboration/index.mdx b/docs/content/docs/features/collaboration/index.mdx
index 2d320ab829..20d9f40957 100644
--- a/docs/content/docs/features/collaboration/index.mdx
+++ b/docs/content/docs/features/collaboration/index.mdx
@@ -20,36 +20,41 @@ Let's see how you can add Multiplayer capabilities to your BlockNote setup, and
_Try the live demo on the [homepage](https://www.blocknotejs.org)_
-BlockNote uses [Yjs](https://github.com/yjs/yjs) for this, and you can set it up with the `collaboration` option:
+BlockNote uses [Yjs](https://github.com/yjs/yjs) for this, and you can set it up with the `withCollaboration` helper:
```typescript
import * as Y from "yjs";
import { WebrtcProvider } from "y-webrtc";
+import { withCollaboration } from "@blocknote/core/yjs";
// ...
const doc = new Y.Doc();
const provider = new WebrtcProvider("my-document-id", doc); // setup a yjs provider (explained below)
-const editor = useCreateBlockNote({
- // ...
- collaboration: {
- // The Yjs Provider responsible for transporting updates:
- provider,
- // Where to store BlockNote data in the Y.Doc:
- fragment: doc.getXmlFragment("document-store"),
- // Information (name and color) for this user:
- user: {
- name: "My Username",
- color: "#ff0000",
+const editor = useCreateBlockNote(
+ withCollaboration({
+ // ...
+ collaboration: {
+ // The Yjs Provider responsible for transporting updates:
+ provider,
+ // Where to store BlockNote data in the Y.Doc:
+ fragment: doc.getXmlFragment("document-store"),
+ // Information (name and color) for this user:
+ user: {
+ name: "My Username",
+ color: "#ff0000",
+ },
+ // When to show user labels on the collaboration cursor. Set by default to
+ // "activity" (show when the cursor moves), but can also be set to "always".
+ showCursorLabels: "activity",
},
- // When to show user labels on the collaboration cursor. Set by default to
- // "activity" (show when the cursor moves), but can also be set to "always".
- showCursorLabels: "activity",
- },
- // ...
-});
+ // ...
+ }),
+);
```
+The `withCollaboration` function accepts all the regular editor options along with a `collaboration` property, and configures your editor for real-time collaboration.
+
## Yjs Providers
When a user edits the document, an incremental change (or "update") is captured and can be shared between users of your app. You can share these updates by setting up a _Yjs Provider_. In the snipped above, we use [y-webrtc](https://github.com/yjs/y-webrtc) which shares updates over WebRTC (and BroadcastChannel), but you might be interested in different providers for production-ready use cases.
diff --git a/docs/package.json b/docs/package.json
index 3e64e6b44b..b6f8797a88 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -97,7 +97,14 @@
"tailwind-merge": "^3.4.0",
"y-partykit": "^0.0.25",
"yjs": "^13.6.27",
- "zod": "^4.3.5"
+ "zod": "^4.3.5",
+ "@y/protocols": "^1.0.6-rc.1",
+ "@y/websocket": "^4.0.0-3",
+ "@y/y": "^14.0.0-rc.16",
+ "@y/prosemirror": "^2.0.0-2",
+ "@floating-ui/react": "^0.27.18",
+ "lib0": "1.0.0-rc.13",
+ "y-websocket": "^2.1.0"
},
"devDependencies": {
"@blocknote/code-block": "workspace:*",
diff --git a/examples/07-collaboration/01-partykit/src/App.tsx b/examples/07-collaboration/01-partykit/src/App.tsx
index 4d317c9b3b..333b7e7248 100644
--- a/examples/07-collaboration/01-partykit/src/App.tsx
+++ b/examples/07-collaboration/01-partykit/src/App.tsx
@@ -4,6 +4,7 @@ import { BlockNoteView } from "@blocknote/mantine";
import "@blocknote/mantine/style.css";
import YPartyKitProvider from "y-partykit/provider";
import * as Y from "yjs";
+import { withCollaboration } from "@blocknote/core/yjs";
// Sets up Yjs document and PartyKit Yjs provider.
const doc = new Y.Doc();
@@ -15,19 +16,21 @@ const provider = new YPartyKitProvider(
);
export default function App() {
- const editor = useCreateBlockNote({
- collaboration: {
- // The Yjs Provider responsible for transporting updates:
- provider,
- // Where to store BlockNote data in the Y.Doc:
- fragment: doc.getXmlFragment("document-store"),
- // Information (name and color) for this user:
- user: {
- name: "My Username",
- color: "#ff0000",
+ const editor = useCreateBlockNote(
+ withCollaboration({
+ collaboration: {
+ // The Yjs Provider responsible for transporting updates:
+ provider,
+ // Where to store BlockNote data in the Y.Doc:
+ fragment: doc.getXmlFragment("document-store"),
+ // Information (name and color) for this user:
+ user: {
+ name: "My Username",
+ color: "#ff0000",
+ },
},
- },
- });
+ }),
+ );
// Renders the editor instance.
return ;
diff --git a/examples/07-collaboration/03-y-sweet/src/App.tsx b/examples/07-collaboration/03-y-sweet/src/App.tsx
index 5a238ac497..e96b4af46f 100644
--- a/examples/07-collaboration/03-y-sweet/src/App.tsx
+++ b/examples/07-collaboration/03-y-sweet/src/App.tsx
@@ -3,6 +3,7 @@
import { useYDoc, useYjsProvider, YDocProvider } from "@y-sweet/react";
import { useCreateBlockNote } from "@blocknote/react";
import { BlockNoteView } from "@blocknote/mantine";
+import { withCollaboration } from "@blocknote/core/yjs";
import "@blocknote/mantine/style.css";
@@ -23,13 +24,15 @@ function Document() {
const provider = useYjsProvider();
const doc = useYDoc();
- const editor = useCreateBlockNote({
- collaboration: {
- provider,
- fragment: doc.getXmlFragment("blocknote"),
- user: { color: "#ff0000", name: "My Username" },
- },
- });
+ const editor = useCreateBlockNote(
+ withCollaboration({
+ collaboration: {
+ provider,
+ fragment: doc.getXmlFragment("blocknote"),
+ user: { color: "#ff0000", name: "My Username" },
+ },
+ }),
+ );
return ;
}
diff --git a/examples/07-collaboration/05-comments/src/App.tsx b/examples/07-collaboration/05-comments/src/App.tsx
index 7aaeac4df2..f0d47ab57b 100644
--- a/examples/07-collaboration/05-comments/src/App.tsx
+++ b/examples/07-collaboration/05-comments/src/App.tsx
@@ -3,8 +3,9 @@
import {
CommentsExtension,
DefaultThreadStoreAuth,
- YjsThreadStore,
} from "@blocknote/core/comments";
+import { withCollaboration, YjsThreadStore } from "@blocknote/core/yjs";
+
import { BlockNoteView } from "@blocknote/mantine";
import "@blocknote/mantine/style.css";
import { useCreateBlockNote } from "@blocknote/react";
@@ -74,14 +75,14 @@ function Document() {
// setup the editor with comments and collaboration
const editor = useCreateBlockNote(
- {
+ withCollaboration({
collaboration: {
provider,
fragment: doc.getXmlFragment("blocknote"),
user: { color: getRandomColor(), name: activeUser.username },
},
extensions: [CommentsExtension({ threadStore, resolveUsers })],
- },
+ }),
[activeUser, threadStore],
);
diff --git a/examples/07-collaboration/06-comments-with-sidebar/src/App.tsx b/examples/07-collaboration/06-comments-with-sidebar/src/App.tsx
index 84ad0d577a..fd0b605fb1 100644
--- a/examples/07-collaboration/06-comments-with-sidebar/src/App.tsx
+++ b/examples/07-collaboration/06-comments-with-sidebar/src/App.tsx
@@ -2,9 +2,9 @@
import {
DefaultThreadStoreAuth,
- YjsThreadStore,
CommentsExtension,
} from "@blocknote/core/comments";
+import { withCollaboration, YjsThreadStore } from "@blocknote/core/yjs";
import { BlockNoteView } from "@blocknote/mantine";
import "@blocknote/mantine/style.css";
import {
@@ -77,14 +77,14 @@ export default function App() {
// setup the editor with comments and collaboration
const editor = useCreateBlockNote(
- {
+ withCollaboration({
collaboration: {
provider,
fragment: doc.getXmlFragment("blocknote"),
user: { color: getRandomColor(), name: activeUser.username },
},
extensions: [CommentsExtension({ threadStore, resolveUsers })],
- },
+ }),
[activeUser, threadStore],
);
diff --git a/examples/07-collaboration/07-ghost-writer/src/App.tsx b/examples/07-collaboration/07-ghost-writer/src/App.tsx
index 4344c5c11a..b34a1364c8 100644
--- a/examples/07-collaboration/07-ghost-writer/src/App.tsx
+++ b/examples/07-collaboration/07-ghost-writer/src/App.tsx
@@ -2,6 +2,7 @@ import "@blocknote/core/fonts/inter.css";
import "@blocknote/mantine/style.css";
import { BlockNoteView } from "@blocknote/mantine";
import { useCreateBlockNote } from "@blocknote/react";
+import { withCollaboration } from "@blocknote/core/yjs";
import YPartyKitProvider from "y-partykit/provider";
import * as Y from "yjs";
@@ -38,21 +39,23 @@ const ghostContent =
export default function App() {
const [numGhostWriters, setNumGhostWriters] = useState(1);
const [isPaused, setIsPaused] = useState(false);
- const editor = useCreateBlockNote({
- collaboration: {
- // The Yjs Provider responsible for transporting updates:
- provider,
- // Where to store BlockNote data in the Y.Doc:
- fragment: doc.getXmlFragment("document-store"),
- // Information (name and color) for this user:
- user: {
- name: isGhostWriting
- ? `Ghost Writer #${ghostWriterIndex}`
- : "My Username",
- color: isGhostWriting ? "#CCCCCC" : "#00ff00",
+ const editor = useCreateBlockNote(
+ withCollaboration({
+ collaboration: {
+ // The Yjs Provider responsible for transporting updates:
+ provider,
+ // Where to store BlockNote data in the Y.Doc:
+ fragment: doc.getXmlFragment("document-store"),
+ // Information (name and color) for this user:
+ user: {
+ name: isGhostWriting
+ ? `Ghost Writer #${ghostWriterIndex}`
+ : "My Username",
+ color: isGhostWriting ? "#CCCCCC" : "#00ff00",
+ },
},
- },
- });
+ }),
+ );
useEffect(() => {
if (!isGhostWriting || isPaused) {
@@ -101,7 +104,8 @@ export default function App() {
`${window.location.origin}${window.location.pathname}?room=${roomName}&index=-1`,
"_blank",
);
- }}>
+ }}
+ >
Ghost Writer in a new window
>
diff --git a/examples/07-collaboration/08-forking/src/App.tsx b/examples/07-collaboration/08-forking/src/App.tsx
index d338e133d7..948eea5a24 100644
--- a/examples/07-collaboration/08-forking/src/App.tsx
+++ b/examples/07-collaboration/08-forking/src/App.tsx
@@ -1,6 +1,5 @@
import "@blocknote/core/fonts/inter.css";
-import {} from "@blocknote/core";
-import { ForkYDocExtension } from "@blocknote/core/extensions";
+import { ForkYDocExtension, withCollaboration } from "@blocknote/core/yjs";
import {
useCreateBlockNote,
useExtension,
@@ -21,19 +20,21 @@ const provider = new YPartyKitProvider(
);
export default function App() {
- const editor = useCreateBlockNote({
- collaboration: {
- // The Yjs Provider responsible for transporting updates:
- provider,
- // Where to store BlockNote data in the Y.Doc:
- fragment: doc.getXmlFragment("document-store"),
- // Information (name and color) for this user:
- user: {
- name: "My Username",
- color: "#ff0000",
+ const editor = useCreateBlockNote(
+ withCollaboration({
+ collaboration: {
+ // The Yjs Provider responsible for transporting updates:
+ provider,
+ // Where to store BlockNote data in the Y.Doc:
+ fragment: doc.getXmlFragment("document-store"),
+ // Information (name and color) for this user:
+ user: {
+ name: "My Username",
+ color: "#ff0000",
+ },
},
- },
- });
+ }),
+ );
const forkYDocPlugin = useExtension(ForkYDocExtension, { editor });
const isForked = useExtensionState(ForkYDocExtension, {
editor,
diff --git a/examples/07-collaboration/09-comments-testing/src/App.tsx b/examples/07-collaboration/09-comments-testing/src/App.tsx
index 3bada358c1..0ad270f59c 100644
--- a/examples/07-collaboration/09-comments-testing/src/App.tsx
+++ b/examples/07-collaboration/09-comments-testing/src/App.tsx
@@ -3,8 +3,8 @@
import {
CommentsExtension,
DefaultThreadStoreAuth,
- YjsThreadStore,
} from "@blocknote/core/comments";
+import { YjsThreadStore } from "@blocknote/core/yjs";
import { BlockNoteView } from "@blocknote/mantine";
import "@blocknote/mantine/style.css";
import { useCreateBlockNote } from "@blocknote/react";
diff --git a/examples/07-collaboration/10-versioning/.bnexample.json b/examples/07-collaboration/10-versioning/.bnexample.json
new file mode 100644
index 0000000000..bf90ea9d46
--- /dev/null
+++ b/examples/07-collaboration/10-versioning/.bnexample.json
@@ -0,0 +1,14 @@
+{
+ "playground": true,
+ "docs": true,
+ "author": "matthewlipski",
+ "tags": ["Advanced", "Development", "Collaboration"],
+ "dependencies": {
+ "@y/protocols": "^1.0.6-rc.1",
+ "@y/websocket": "^4.0.0-3",
+ "@y/y": "^14.0.0-rc.16",
+ "react-icons": "5.6.0",
+ "@floating-ui/react": "^0.27.18",
+ "lib0": "1.0.0-rc.13"
+ }
+}
diff --git a/examples/07-collaboration/10-versioning/README.md b/examples/07-collaboration/10-versioning/README.md
new file mode 100644
index 0000000000..528f98165e
--- /dev/null
+++ b/examples/07-collaboration/10-versioning/README.md
@@ -0,0 +1,15 @@
+# Collaborative Editing Features Showcase
+
+In this example, you can play with all of the collaboration features BlockNote has to offer:
+
+**Comments**: Add comments to parts of the document - other users can then view, reply to, react to, and resolve them.
+
+**Versioning**: Save snapshots of the document - later preview saved snapshots and restore them to ensure work is never lost.
+
+**Suggestions**: Suggest changes directly in the editor - users can choose to then apply or reject those changes.
+
+**Relevant Docs:**
+
+- [Editor Setup](/docs/getting-started/editor-setup)
+- [Comments](/docs/features/collaboration/comments)
+- [Real-time collaboration](/docs/features/collaboration)
\ No newline at end of file
diff --git a/examples/07-collaboration/10-versioning/index.html b/examples/07-collaboration/10-versioning/index.html
new file mode 100644
index 0000000000..42dc61461a
--- /dev/null
+++ b/examples/07-collaboration/10-versioning/index.html
@@ -0,0 +1,14 @@
+
+
+ );
+};
diff --git a/examples/07-collaboration/10-versioning/src/SettingsSelect.tsx b/examples/07-collaboration/10-versioning/src/SettingsSelect.tsx
new file mode 100644
index 0000000000..0dfc79dc3f
--- /dev/null
+++ b/examples/07-collaboration/10-versioning/src/SettingsSelect.tsx
@@ -0,0 +1,24 @@
+import { ComponentProps, useComponentsContext } from "@blocknote/react";
+
+// This component is used to display a selection dropdown with a label. By using
+// the useComponentsContext hook, we can create it out of existing components
+// within the same UI library that `BlockNoteView` uses (Mantine, Ariakit, or
+// ShadCN), to match the design of the editor.
+export const SettingsSelect = (props: {
+ label: string;
+ items: ComponentProps["FormattingToolbar"]["Select"]["items"];
+}) => {
+ const Components = useComponentsContext()!;
+
+ return (
+
+ );
+}
diff --git a/examples/07-collaboration/11-yhub/src/style.css b/examples/07-collaboration/11-yhub/src/style.css
new file mode 100644
index 0000000000..e136fe5913
--- /dev/null
+++ b/examples/07-collaboration/11-yhub/src/style.css
@@ -0,0 +1,67 @@
+ins {
+ background-color: hsl(120 100 90);
+ color: hsl(120 100 30);
+ position: relative;
+}
+
+ins:hover::after {
+ content: attr(data-user);
+ position: absolute;
+ top: 100%;
+ left: 50%;
+ transform: translateX(-50%);
+ margin-top: 4px;
+ padding: 4px 8px;
+ background-color: rgba(0, 0, 0, 0.9);
+ color: white;
+ border-radius: 4px;
+ font-size: 12px;
+ white-space: nowrap;
+ pointer-events: none;
+ z-index: 1000;
+}
+
+.dark ins {
+ background-color: hsl(120 100 10);
+ color: hsl(120 80 70);
+}
+
+.dark ins:hover::after {
+ background-color: rgba(30, 30, 30, 0.95);
+ color: hsl(120 80 70);
+ border: 1px solid rgba(255, 255, 255, 0.1);
+}
+
+del {
+ background-color: hsl(0 100 90);
+ color: hsl(0 100 30);
+ position: relative;
+}
+
+del:hover::after {
+ content: attr(data-user);
+ position: absolute;
+ top: 100%;
+ left: 50%;
+ transform: translateX(-50%);
+ margin-top: 4px;
+ padding: 4px 8px;
+ background-color: rgba(0, 0, 0, 0.9);
+ color: white;
+ border-radius: 4px;
+ font-size: 12px;
+ white-space: nowrap;
+ pointer-events: none;
+ z-index: 1000;
+}
+
+.dark del {
+ background-color: hsl(0 100 10);
+ color: hsl(0 80 70);
+}
+
+.dark del:hover::after {
+ background-color: rgba(30, 30, 30, 0.95);
+ color: hsl(0 80 70);
+ border: 1px solid rgba(255, 255, 255, 0.1);
+}
diff --git a/examples/07-collaboration/11-yhub/tsconfig.json b/examples/07-collaboration/11-yhub/tsconfig.json
new file mode 100644
index 0000000000..dbe3e6f62d
--- /dev/null
+++ b/examples/07-collaboration/11-yhub/tsconfig.json
@@ -0,0 +1,36 @@
+{
+ "__comment": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY",
+ "compilerOptions": {
+ "target": "ESNext",
+ "useDefineForClassFields": true,
+ "lib": [
+ "DOM",
+ "DOM.Iterable",
+ "ESNext"
+ ],
+ "allowJs": false,
+ "skipLibCheck": true,
+ "esModuleInterop": false,
+ "allowSyntheticDefaultImports": true,
+ "strict": true,
+ "forceConsistentCasingInFileNames": true,
+ "module": "ESNext",
+ "moduleResolution": "bundler",
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "noEmit": true,
+ "jsx": "react-jsx",
+ "composite": true
+ },
+ "include": [
+ "."
+ ],
+ "__ADD_FOR_LOCAL_DEV_references": [
+ {
+ "path": "../../../packages/core/"
+ },
+ {
+ "path": "../../../packages/react/"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/examples/07-collaboration/11-yhub/vite.config.ts b/examples/07-collaboration/11-yhub/vite.config.ts
new file mode 100644
index 0000000000..f62ab20bc2
--- /dev/null
+++ b/examples/07-collaboration/11-yhub/vite.config.ts
@@ -0,0 +1,32 @@
+// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
+import react from "@vitejs/plugin-react";
+import * as fs from "fs";
+import * as path from "path";
+import { defineConfig } from "vite";
+// import eslintPlugin from "vite-plugin-eslint";
+// https://vitejs.dev/config/
+export default defineConfig((conf) => ({
+ plugins: [react()],
+ optimizeDeps: {},
+ build: {
+ sourcemap: true,
+ },
+ resolve: {
+ alias:
+ conf.command === "build" ||
+ !fs.existsSync(path.resolve(__dirname, "../../packages/core/src"))
+ ? {}
+ : ({
+ // Comment out the lines below to load a built version of blocknote
+ // or, keep as is to load live from sources with live reload working
+ "@blocknote/core": path.resolve(
+ __dirname,
+ "../../packages/core/src/"
+ ),
+ "@blocknote/react": path.resolve(
+ __dirname,
+ "../../packages/react/src/"
+ ),
+ } as any),
+ },
+}));
diff --git a/examples/07-collaboration/12-versioning-yjs13/.bnexample.json b/examples/07-collaboration/12-versioning-yjs13/.bnexample.json
new file mode 100644
index 0000000000..d04a59bb2e
--- /dev/null
+++ b/examples/07-collaboration/12-versioning-yjs13/.bnexample.json
@@ -0,0 +1,11 @@
+{
+ "playground": true,
+ "docs": true,
+ "author": "yousefed",
+ "tags": ["Advanced", "Development", "Collaboration"],
+ "dependencies": {
+ "y-websocket": "^2.1.0",
+ "yjs": "^13.6.27",
+ "lib0": "^0.2.99"
+ }
+}
diff --git a/examples/07-collaboration/12-versioning-yjs13/README.md b/examples/07-collaboration/12-versioning-yjs13/README.md
new file mode 100644
index 0000000000..134f8dcba7
--- /dev/null
+++ b/examples/07-collaboration/12-versioning-yjs13/README.md
@@ -0,0 +1,10 @@
+# Collaborative Versioning (yjs v13)
+
+This example shows how to use the `VersioningExtension` with collaborative editing using `yjs` (v13). Snapshots are stored in localStorage using Yjs state updates.
+
+**Try it out:** Edit the document, then click the "Version History" button to open the sidebar. From there you can save snapshots, preview older versions, rename them, and restore them.
+
+**Relevant Docs:**
+
+- [Editor Setup](/docs/getting-started/editor-setup)
+- [Real-time collaboration](/docs/features/collaboration)
diff --git a/examples/07-collaboration/12-versioning-yjs13/index.html b/examples/07-collaboration/12-versioning-yjs13/index.html
new file mode 100644
index 0000000000..b0294fe1a5
--- /dev/null
+++ b/examples/07-collaboration/12-versioning-yjs13/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+ Collaborative Versioning (yjs v13)
+
+
+
+
+
+
+
diff --git a/examples/07-collaboration/12-versioning-yjs13/main.tsx b/examples/07-collaboration/12-versioning-yjs13/main.tsx
new file mode 100644
index 0000000000..677c7f7eed
--- /dev/null
+++ b/examples/07-collaboration/12-versioning-yjs13/main.tsx
@@ -0,0 +1,11 @@
+// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
+import React from "react";
+import { createRoot } from "react-dom/client";
+import App from "./src/App.jsx";
+
+const root = createRoot(document.getElementById("root")!);
+root.render(
+
+
+
+);
diff --git a/examples/07-collaboration/12-versioning-yjs13/package.json b/examples/07-collaboration/12-versioning-yjs13/package.json
new file mode 100644
index 0000000000..fb4bd8b3bb
--- /dev/null
+++ b/examples/07-collaboration/12-versioning-yjs13/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "@blocknote/example-collaboration-versioning-yjs13",
+ "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY",
+ "type": "module",
+ "private": true,
+ "version": "0.12.4",
+ "scripts": {
+ "start": "vite",
+ "dev": "vite",
+ "build:prod": "tsc && vite build",
+ "preview": "vite preview"
+ },
+ "dependencies": {
+ "@blocknote/ariakit": "latest",
+ "@blocknote/core": "latest",
+ "@blocknote/mantine": "latest",
+ "@blocknote/react": "latest",
+ "@blocknote/shadcn": "latest",
+ "@mantine/core": "^9.0.2",
+ "@mantine/hooks": "^9.0.2",
+ "react": "^19.2.3",
+ "react-dom": "^19.2.3",
+ "y-websocket": "^2.1.0",
+ "yjs": "^13.6.27",
+ "lib0": "^0.2.99"
+ },
+ "devDependencies": {
+ "@types/react": "^19.2.3",
+ "@types/react-dom": "^19.2.3",
+ "@vitejs/plugin-react": "^6.0.1",
+ "vite": "^8.0.8"
+ }
+}
\ No newline at end of file
diff --git a/examples/07-collaboration/12-versioning-yjs13/src/App.tsx b/examples/07-collaboration/12-versioning-yjs13/src/App.tsx
new file mode 100644
index 0000000000..9eafe88af4
--- /dev/null
+++ b/examples/07-collaboration/12-versioning-yjs13/src/App.tsx
@@ -0,0 +1,71 @@
+import "@blocknote/core/fonts/inter.css";
+import { withCollaboration } from "@blocknote/core/yjs";
+import { VersioningExtension } from "@blocknote/core/extensions";
+import { createYjsVersioningAdapter } from "@blocknote/core/yjs";
+import { localStorageEndpoints } from "./localStorageEndpoints.js";
+import {
+ BlockNoteViewEditor,
+ useCreateBlockNote,
+ useExtensionState,
+} from "@blocknote/react";
+import { BlockNoteView } from "@blocknote/mantine";
+import "@blocknote/mantine/style.css";
+
+import * as Y from "yjs";
+import { WebsocketProvider } from "y-websocket";
+
+import { VersionHistorySidebar } from "./VersionHistorySidebar";
+import "./style.css";
+
+const roomName = "blocknote-versioning-yjs-example";
+const doc = new Y.Doc();
+const fragment = doc.getXmlFragment("document-store");
+const provider = new WebsocketProvider(
+ "wss://demos.yjs.dev/ws",
+ roomName,
+ doc,
+ { connect: false },
+);
+provider.connectBc();
+
+export default function App() {
+ const editor = useCreateBlockNote(
+ withCollaboration({
+ collaboration: {
+ provider,
+ fragment,
+ user: { color: "#ff0000", name: "User" },
+ },
+ extensions: [
+ // The v13 CollaborationExtension does not wire up versioning
+ // automatically, so we add VersioningExtension manually and use
+ // createYjsVersioningAdapter to bridge the Yjs v13 preview logic.
+ VersioningExtension((editor) => ({
+ ...createYjsVersioningAdapter(editor, { fragment } as any),
+ endpoints: localStorageEndpoints,
+ })),
+ ],
+ }),
+ );
+
+ const { previewedSnapshotId } = useExtensionState(VersioningExtension, {
+ editor,
+ });
+
+ return (
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/examples/07-collaboration/12-versioning-yjs13/src/SettingsSelect.tsx b/examples/07-collaboration/12-versioning-yjs13/src/SettingsSelect.tsx
new file mode 100644
index 0000000000..0dfc79dc3f
--- /dev/null
+++ b/examples/07-collaboration/12-versioning-yjs13/src/SettingsSelect.tsx
@@ -0,0 +1,24 @@
+import { ComponentProps, useComponentsContext } from "@blocknote/react";
+
+// This component is used to display a selection dropdown with a label. By using
+// the useComponentsContext hook, we can create it out of existing components
+// within the same UI library that `BlockNoteView` uses (Mantine, Ariakit, or
+// ShadCN), to match the design of the editor.
+export const SettingsSelect = (props: {
+ label: string;
+ items: ComponentProps["FormattingToolbar"]["Select"]["items"];
+}) => {
+ const Components = useComponentsContext()!;
+
+ return (
+
+ );
+}
diff --git a/examples/07-collaboration/13-versioning-yjs14/src/SettingsSelect.tsx b/examples/07-collaboration/13-versioning-yjs14/src/SettingsSelect.tsx
new file mode 100644
index 0000000000..0dfc79dc3f
--- /dev/null
+++ b/examples/07-collaboration/13-versioning-yjs14/src/SettingsSelect.tsx
@@ -0,0 +1,24 @@
+import { ComponentProps, useComponentsContext } from "@blocknote/react";
+
+// This component is used to display a selection dropdown with a label. By using
+// the useComponentsContext hook, we can create it out of existing components
+// within the same UI library that `BlockNoteView` uses (Mantine, Ariakit, or
+// ShadCN), to match the design of the editor.
+export const SettingsSelect = (props: {
+ label: string;
+ items: ComponentProps["FormattingToolbar"]["Select"]["items"];
+}) => {
+ const Components = useComponentsContext()!;
+
+ return (
+
{
+ setSidebar((s) =>
+ s !== "versionHistory" ? "versionHistory" : "none",
+ );
+ exitPreview();
+ }}
+ >
+
+ Version History
+
+
+
+
+
+
+ {sidebar === "versionHistory" && }
+
+
+
+ );
+}
diff --git a/examples/08-extensions/02-versioning/src/SettingsSelect.tsx b/examples/08-extensions/02-versioning/src/SettingsSelect.tsx
new file mode 100644
index 0000000000..0dfc79dc3f
--- /dev/null
+++ b/examples/08-extensions/02-versioning/src/SettingsSelect.tsx
@@ -0,0 +1,24 @@
+import { ComponentProps, useComponentsContext } from "@blocknote/react";
+
+// This component is used to display a selection dropdown with a label. By using
+// the useComponentsContext hook, we can create it out of existing components
+// within the same UI library that `BlockNoteView` uses (Mantine, Ariakit, or
+// ShadCN), to match the design of the editor.
+export const SettingsSelect = (props: {
+ label: string;
+ items: ComponentProps["FormattingToolbar"]["Select"]["items"];
+}) => {
+ const Components = useComponentsContext()!;
+
+ return (
+
+ );
+};
diff --git a/packages/react/src/components/Versioning/dateToString.ts b/packages/react/src/components/Versioning/dateToString.ts
new file mode 100644
index 0000000000..feb0e6048d
--- /dev/null
+++ b/packages/react/src/components/Versioning/dateToString.ts
@@ -0,0 +1,9 @@
+export const dateToString = (date: Date) =>
+ `${date.toLocaleDateString(undefined, {
+ day: "numeric",
+ month: "long",
+ year: "numeric",
+ })}, ${date.toLocaleTimeString(undefined, {
+ hour: "numeric",
+ minute: "2-digit",
+ })}`;
diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts
index 6ed745a789..09762d1f7a 100644
--- a/packages/react/src/index.ts
+++ b/packages/react/src/index.ts
@@ -113,6 +113,8 @@ export * from "./components/Comments/ThreadsSidebar.js";
export * from "./components/Comments/useThreads.js";
export * from "./components/Comments/useUsers.js";
+export * from "./components/Versioning/VersioningSidebar.js";
+
export * from "./hooks/useActiveStyles.js";
export * from "./hooks/useBlockNoteEditor.js";
export * from "./hooks/useCreateBlockNote.js";
diff --git a/packages/react/src/schema/ReactBlockSpec.tsx b/packages/react/src/schema/ReactBlockSpec.tsx
index 1ab1b43da8..a7f650a092 100644
--- a/packages/react/src/schema/ReactBlockSpec.tsx
+++ b/packages/react/src/schema/ReactBlockSpec.tsx
@@ -276,8 +276,7 @@ export function createReactBlockSpec<
// `ReactNodeViewRenderer` instead.
const block = getBlockFromPos(
props.getPos,
- editor,
- props.editor,
+ props.view.state.doc,
blockConfig.type,
);
diff --git a/packages/xl-ai/package.json b/packages/xl-ai/package.json
index a857816391..89a09ae709 100644
--- a/packages/xl-ai/package.json
+++ b/packages/xl-ai/package.json
@@ -28,7 +28,6 @@
"wysiwyg",
"rich-text-editor",
"notion",
- "yjs",
"block-based",
"tiptap"
],
@@ -89,8 +88,7 @@
"prosemirror-view": "^1.41.4",
"react": "^19.2.5",
"react-dom": "^19.2.5",
- "react-icons": "^5.5.0",
- "y-prosemirror": "^1.3.7"
+ "react-icons": "^5.5.0"
},
"devDependencies": {
"@ai-sdk/anthropic": "^3.0.2",
diff --git a/packages/xl-ai/src/AIExtension.ts b/packages/xl-ai/src/AIExtension.ts
index cc6f3c2a20..940a7e7066 100644
--- a/packages/xl-ai/src/AIExtension.ts
+++ b/packages/xl-ai/src/AIExtension.ts
@@ -6,10 +6,8 @@ import {
getNodeById,
UnreachableCaseError,
} from "@blocknote/core";
-import {
- ForkYDocExtension,
- ShowSelectionExtension,
-} from "@blocknote/core/extensions";
+import { ShowSelectionExtension } from "@blocknote/core/extensions";
+import type { ForkYDocExtension } from "@blocknote/core/yjs";
import {
applySuggestions,
revertSuggestions,
@@ -220,7 +218,9 @@ export const AIExtension = createExtension(
});
// If in collaboration mode, merge the changes back into the original yDoc
- editor.getExtension(ForkYDocExtension)?.merge({ keepChanges: true });
+ editor
+ .getExtension("yForkDoc")
+ ?.merge({ keepChanges: true });
this.closeAIMenu();
},
@@ -238,7 +238,9 @@ export const AIExtension = createExtension(
});
// If in collaboration mode, discard the changes and revert to the original yDoc
- editor.getExtension(ForkYDocExtension)?.merge({ keepChanges: false });
+ editor
+ .getExtension("yForkDoc")
+ ?.merge({ keepChanges: false });
this.closeAIMenu();
},
@@ -379,7 +381,8 @@ export const AIExtension = createExtension(
*/
async invokeAI(opts: InvokeAIOptions) {
this.setAIResponseStatus("thinking");
- editor.getExtension(ForkYDocExtension)?.fork();
+ // If in collaboration mode, fork the yDoc to allow modifications without affecting the remote
+ editor.getExtension("yForkDoc")?.fork();
try {
// Create a new AbortController for this request
diff --git a/packages/xl-ai/src/plugins/AgentCursorPlugin.ts b/packages/xl-ai/src/plugins/AgentCursorPlugin.ts
index f2492e1a08..1fb6bdfad5 100644
--- a/packages/xl-ai/src/plugins/AgentCursorPlugin.ts
+++ b/packages/xl-ai/src/plugins/AgentCursorPlugin.ts
@@ -1,6 +1,13 @@
import { Plugin, PluginKey } from "prosemirror-state";
import { Decoration, DecorationSet } from "prosemirror-view";
-import { defaultSelectionBuilder } from "y-prosemirror";
+
+// Pulled from `y-prosemirror`https://github.com/yjs/y-prosemirror/blob/v1.3.7/src/plugins/cursor-plugin.js
+const defaultSelectionBuilder = (user: { name: string; color: string }) => {
+ return {
+ style: `background-color: ${user.color}70`,
+ class: "ProseMirror-yjs-selection",
+ };
+};
type AgentCursorState = {
selection: { anchor: number; head: number } | undefined;
diff --git a/packages/xl-ai/src/prosemirror/__snapshots__/agent.test.ts.snap b/packages/xl-ai/src/prosemirror/__snapshots__/agent.test.ts.snap
index 54ccfe8769..facc5135bb 100644
--- a/packages/xl-ai/src/prosemirror/__snapshots__/agent.test.ts.snap
+++ b/packages/xl-ai/src/prosemirror/__snapshots__/agent.test.ts.snap
@@ -1,254 +1,5 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
-exports[`agentStepToTr > Update > clear block formatting 1`] = `
-[
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Colored text"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"backgroundColor","previousValue":"red","newValue":"default"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"right"},"content":[{"type":"text","text":"Aligned text"}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Colored text"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"backgroundColor","previousValue":"red","newValue":"default"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Aligned text"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"right","newValue":"left"}}]}]}]}]}",
-]
-`;
-
-exports[`agentStepToTr > Update > drop mark and link 1`] = `
-[
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"Bold text. "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"Bold text. "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"Bold text. "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold text. "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Link."}]}]}]}]}",
-]
-`;
-
-exports[`agentStepToTr > Update > drop mark and link and change text within mark 1`] = `
-[
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"H"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"Bold"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold"},{"type":"text","marks":[{"type":"bold"}],"text":" text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"Bold"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold"},{"type":"text","marks":[{"type":"bold"}],"text":" text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"Bold"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold "},{"type":"text","marks":[{"type":"bold"}],"text":" text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"Bold"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold t"},{"type":"text","marks":[{"type":"bold"}],"text":" text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"Bold"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold th"},{"type":"text","marks":[{"type":"bold"}],"text":" text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"Bold"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold the"},{"type":"text","marks":[{"type":"bold"}],"text":" text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"Bold"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold the"},{"type":"text","marks":[{"type":"bold"}],"text":" text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"Bold"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold the"},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":" text. "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"Bold"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold the"},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":" text. "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"Bold"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold the"},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":" text. "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" text. "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Link."}]}]}]}]}",
-]
-`;
-
-exports[`agentStepToTr > Update > fix spelling mid-word selection 1`] = `
-[
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! Dow are you?"}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"D"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"H"},{"type":"text","text":"ow are you?"}]}]}]}]}",
-]
-`;
-
-exports[`agentStepToTr > Update > modify nested content 1`] = `
-[
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I need to buy:"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I need to buy:"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Apples"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"A"}]}]}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I need to buy:"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Apples"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"AP"}]}]}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I need to buy:"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Apples"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"APP"}]}]}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I need to buy:"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Apples"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"APPL"}]}]}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I need to buy:"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Apples"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"APPLE"}]}]}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I need to buy:"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Apples"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"APPLES"}]}]}]}]}]}]}",
-]
-`;
-
-exports[`agentStepToTr > Update > modify parent content 1`] = `
-[
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I need to buy:"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"N"},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"NE"},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"NEE"},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"NEED"},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"NEED "},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"NEED T"},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"NEED TO"},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"NEED TO "},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"NEED TO B"},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"NEED TO BU"},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"NEED TO BUY"},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}",
-]
-`;
-
-exports[`agentStepToTr > Update > plain source block, add mention 1`] = `
-[
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"world"},{"type":"mention","attrs":{"user":"Jane Doe"},"marks":[{"type":"insertion","attrs":{"id":null}}]},{"type":"text","text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
-]
-`;
-
-exports[`agentStepToTr > Update > standard update 1`] = `
-[
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"world"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"W"},{"type":"text","text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"world"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"We"},{"type":"text","text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"world"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Wel"},{"type":"text","text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"world"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Welt"},{"type":"text","text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
-]
-`;
-
-exports[`agentStepToTr > Update > styles + ic in source block, remove mark 1`] = `
-[
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
-]
-`;
-
-exports[`agentStepToTr > Update > styles + ic in source block, remove mention 1`] = `
-[
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":", "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
-]
-`;
-
-exports[`agentStepToTr > Update > styles + ic in source block, replace content 1`] = `
-[
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"u"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"up"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"upd"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"upda"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"updat"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"update"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"updated"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"updated "}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"updated c"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"updated co"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"updated con"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"updated cont"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"updated conte"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"updated conten"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"updated content"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
-]
-`;
-
-exports[`agentStepToTr > Update > styles + ic in source block, update mention prop 1`] = `
-[
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"mention","attrs":{"user":"Jane Doe"},"marks":[{"type":"insertion","attrs":{"id":null}}]},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
-]
-`;
-
-exports[`agentStepToTr > Update > styles + ic in source block, update text 1`] = `
-[
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"W"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wi"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie g"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie ge"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geh"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht e"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es d"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es di"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"D"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"Di"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"Die"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"Dies"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"Diese"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"Dieser"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"Dieser "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"Dieser T"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"Dieser Te"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"Dieser Tex"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"Dieser Text"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"Dieser Text"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"Dieser Text"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"is blue"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"i"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"Dieser Text"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"is blue"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"is"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"Dieser Text"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"is blue"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"ist"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"Dieser Text"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"is blue"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"ist "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"Dieser Text"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"is blue"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"ist b"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"Dieser Text"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"is blue"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"ist bl"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"Dieser Text"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"is blue"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"ist bla"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"},{"type":"deletion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"This text"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"Dieser Text"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"deletion","attrs":{"id":null}}],"text":"is blue"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}},{"type":"insertion","attrs":{"id":null}}],"text":"ist blau"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
-]
-`;
-
-exports[`agentStepToTr > Update > styles + ic in target block, add mark (paragraph) 1`] = `
-[
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello, world!"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
-]
-`;
-
-exports[`agentStepToTr > Update > styles + ic in target block, add mark (word) 1`] = `
-[
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"world!"},{"type":"text","marks":[{"type":"bold"},{"type":"insertion","attrs":{"id":null}}],"text":"world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
-]
-`;
-
-exports[`agentStepToTr > Update > translate selection 1`] = `
-[
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
-]
-`;
-
-exports[`agentStepToTr > Update > turn paragraphs into list 1`] = `
-[
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I need to buy:"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"bulletListItem","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Apples"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"bulletListItem"}}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Bananas"}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"I need to buy:"}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"bulletListItem","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Apples"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"bulletListItem"}}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"bulletListItem","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Bananas"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"bulletListItem"}}]}]}]}]}",
-]
-`;
-
-exports[`agentStepToTr > Update > update block prop 1`] = `
-[
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"right"},"content":[{"type":"text","text":"Hello, world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
-]
-`;
-
-exports[`agentStepToTr > Update > update block prop and content 1`] = `
-[
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"right"},"content":[{"type":"text","text":"Hello, world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"right"},"content":[{"type":"text","text":"Hello, world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"right"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"W"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"right"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Wh"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"right"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Wha"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"right"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"right"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What'"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"right"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What's"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"right"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What's "},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"right"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What's u"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"right"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What's up"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
-]
-`;
-
-exports[`agentStepToTr > Update > update block type 1`] = `
-[
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"heading","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left","level":1,"isToggleable":false},"content":[{"type":"text","text":"Hello, world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"isToggleable","previousValue":null,"newValue":false}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
-]
-`;
-
-exports[`agentStepToTr > Update > update block type and content 1`] = `
-[
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"heading","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left","level":1,"isToggleable":false},"content":[{"type":"text","text":"Hello, world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"isToggleable","previousValue":null,"newValue":false}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"heading","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left","level":1,"isToggleable":false},"content":[{"type":"text","text":"Hello, world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"isToggleable","previousValue":null,"newValue":false}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"heading","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left","level":1,"isToggleable":false},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"W"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"isToggleable","previousValue":null,"newValue":false}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"heading","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left","level":1,"isToggleable":false},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Wh"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"isToggleable","previousValue":null,"newValue":false}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"heading","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left","level":1,"isToggleable":false},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Wha"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"isToggleable","previousValue":null,"newValue":false}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"heading","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left","level":1,"isToggleable":false},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"isToggleable","previousValue":null,"newValue":false}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"heading","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left","level":1,"isToggleable":false},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What'"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"isToggleable","previousValue":null,"newValue":false}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"heading","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left","level":1,"isToggleable":false},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What's"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"isToggleable","previousValue":null,"newValue":false}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"heading","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left","level":1,"isToggleable":false},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What's "},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"isToggleable","previousValue":null,"newValue":false}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"heading","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left","level":1,"isToggleable":false},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What's u"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"isToggleable","previousValue":null,"newValue":false}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
- "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1"},"content":[{"type":"heading","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left","level":1,"isToggleable":false},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What's up"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"isToggleable","previousValue":null,"newValue":false}}]}]},{"type":"blockContainer","attrs":{"id":"ref2"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3"},"content":[{"type":"paragraph","attrs":{"backgroundColor":"default","textColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com"}}],"text":"Link."}]}]}]}]}",
-]
-`;
-
exports[`getStepsAsAgent > multiple steps 1`] = `
[
{
@@ -267,7 +18,7 @@ exports[`getStepsAsAgent > multiple steps 1`] = `
"attrs": {
"id": null,
},
- "type": "deletion",
+ "type": "y-attributed-delete",
},
"stepType": "addMark",
"to": 8,
@@ -291,7 +42,7 @@ exports[`getStepsAsAgent > multiple steps 1`] = `
"attrs": {
"id": null,
},
- "type": "insertion",
+ "type": "y-attributed-insert",
},
"stepType": "addMark",
"to": 9,
@@ -324,7 +75,7 @@ exports[`getStepsAsAgent > multiple steps 1`] = `
"attrs": {
"id": null,
},
- "type": "insertion",
+ "type": "y-attributed-insert",
},
"stepType": "addMark",
"to": 10,
@@ -352,7 +103,7 @@ exports[`getStepsAsAgent > multiple steps 1`] = `
"attrs": {
"id": null,
},
- "type": "deletion",
+ "type": "y-attributed-delete",
},
"stepType": "addMark",
"to": 17,
@@ -376,7 +127,7 @@ exports[`getStepsAsAgent > multiple steps 1`] = `
"attrs": {
"id": null,
},
- "type": "insertion",
+ "type": "y-attributed-insert",
},
"stepType": "addMark",
"to": 18,
@@ -409,7 +160,7 @@ exports[`getStepsAsAgent > multiple steps 1`] = `
"attrs": {
"id": null,
},
- "type": "insertion",
+ "type": "y-attributed-insert",
},
"stepType": "addMark",
"to": 19,
@@ -442,7 +193,7 @@ exports[`getStepsAsAgent > multiple steps 1`] = `
"attrs": {
"id": null,
},
- "type": "insertion",
+ "type": "y-attributed-insert",
},
"stepType": "addMark",
"to": 20,
@@ -475,7 +226,7 @@ exports[`getStepsAsAgent > multiple steps 1`] = `
"attrs": {
"id": null,
},
- "type": "insertion",
+ "type": "y-attributed-insert",
},
"stepType": "addMark",
"to": 21,
@@ -508,7 +259,7 @@ exports[`getStepsAsAgent > multiple steps 1`] = `
"attrs": {
"id": null,
},
- "type": "insertion",
+ "type": "y-attributed-insert",
},
"stepType": "addMark",
"to": 22,
@@ -549,7 +300,7 @@ exports[`getStepsAsAgent > node attr change 1`] = `
"previousValue": "left",
"type": "attr",
},
- "type": "modification",
+ "type": "y-attributed-format",
},
],
"type": "paragraph",
@@ -595,7 +346,7 @@ exports[`getStepsAsAgent > node type change 1`] = `
"previousValue": "paragraph",
"type": "nodeType",
},
- "type": "modification",
+ "type": "y-attributed-format",
},
{
"attrs": {
@@ -605,7 +356,7 @@ exports[`getStepsAsAgent > node type change 1`] = `
"previousValue": null,
"type": "attr",
},
- "type": "modification",
+ "type": "y-attributed-format",
},
{
"attrs": {
@@ -615,7 +366,7 @@ exports[`getStepsAsAgent > node type change 1`] = `
"previousValue": null,
"type": "attr",
},
- "type": "modification",
+ "type": "y-attributed-format",
},
],
"type": "heading",
@@ -651,7 +402,7 @@ exports[`getStepsAsAgent > simple replace step 1`] = `
"attrs": {
"id": null,
},
- "type": "deletion",
+ "type": "y-attributed-delete",
},
"stepType": "addMark",
"to": 8,
@@ -675,7 +426,7 @@ exports[`getStepsAsAgent > simple replace step 1`] = `
"attrs": {
"id": null,
},
- "type": "insertion",
+ "type": "y-attributed-insert",
},
"stepType": "addMark",
"to": 9,
@@ -708,7 +459,7 @@ exports[`getStepsAsAgent > simple replace step 1`] = `
"attrs": {
"id": null,
},
- "type": "insertion",
+ "type": "y-attributed-insert",
},
"stepType": "addMark",
"to": 10,
diff --git a/packages/xl-ai/src/prosemirror/__snapshots__/rebaseTool.test.ts.snap b/packages/xl-ai/src/prosemirror/__snapshots__/rebaseTool.test.ts.snap
index e00571d059..559c3fa92d 100644
--- a/packages/xl-ai/src/prosemirror/__snapshots__/rebaseTool.test.ts.snap
+++ b/packages/xl-ai/src/prosemirror/__snapshots__/rebaseTool.test.ts.snap
@@ -1,99 +1,5 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
-exports[`should be able to apply changes to a clean doc (use invertMap) 1`] = `
-{
- "content": [
- {
- "content": [
- {
- "attrs": {
- "id": "1",
- },
- "content": [
- {
- "attrs": {
- "backgroundColor": "default",
- "textAlignment": "left",
- "textColor": "default",
- },
- "content": [
- {
- "marks": [
- {
- "attrs": {
- "id": null,
- },
- "type": "deletion",
- },
- ],
- "text": "Hello",
- "type": "text",
- },
- {
- "text": "What's up, world!",
- "type": "text",
- },
- ],
- "type": "paragraph",
- },
- ],
- "type": "blockContainer",
- },
- ],
- "type": "blockGroup",
- },
- ],
- "type": "doc",
-}
-`;
-
-exports[`should be able to apply changes to a clean doc (use rebaseTr) 1`] = `
-{
- "content": [
- {
- "content": [
- {
- "attrs": {
- "id": "1",
- },
- "content": [
- {
- "attrs": {
- "backgroundColor": "default",
- "textAlignment": "left",
- "textColor": "default",
- },
- "content": [
- {
- "marks": [
- {
- "attrs": {
- "id": null,
- },
- "type": "deletion",
- },
- ],
- "text": "Hello",
- "type": "text",
- },
- {
- "text": "What's up, world!",
- "type": "text",
- },
- ],
- "type": "paragraph",
- },
- ],
- "type": "blockContainer",
- },
- ],
- "type": "blockGroup",
- },
- ],
- "type": "doc",
-}
-`;
-
exports[`should create some example suggestions 1`] = `
{
"content": [
@@ -117,7 +23,7 @@ exports[`should create some example suggestions 1`] = `
"attrs": {
"id": null,
},
- "type": "deletion",
+ "type": "y-attributed-delete",
},
],
"text": "Hello",
@@ -129,7 +35,7 @@ exports[`should create some example suggestions 1`] = `
"attrs": {
"id": null,
},
- "type": "insertion",
+ "type": "y-attributed-insert",
},
],
"text": "Hi",
diff --git a/packages/xl-ai/src/prosemirror/agent.ts b/packages/xl-ai/src/prosemirror/agent.ts
index 64d1450797..f0c5f0063a 100644
--- a/packages/xl-ai/src/prosemirror/agent.ts
+++ b/packages/xl-ai/src/prosemirror/agent.ts
@@ -31,7 +31,7 @@ export type AgentStep = {
export function getStepsAsAgent(inputTr: Transform) {
const pmSchema = getPmSchema(inputTr);
- const { modification } = pmSchema.marks;
+ const modification = pmSchema.marks["y-attributed-format"];
const agentSteps: AgentStep[] = [];
@@ -188,9 +188,9 @@ export function getStepsAsAgent(inputTr: Transform) {
const $pos = tr.doc.resolve(tr.mapping.map(from));
if ($pos.nodeAfter?.isBlock) {
// mark the entire node as deleted. This can be needed for inline nodes or table cells
- tr.addNodeMark($pos.pos, pmSchema.mark("deletion", {}));
+ tr.addNodeMark($pos.pos, pmSchema.mark("y-attributed-delete", {}));
}
- tr.addMark($pos.pos, replaceEnd, pmSchema.mark("deletion", {}));
+ tr.addMark($pos.pos, replaceEnd, pmSchema.mark("y-attributed-delete", {}));
replaceEnd = tr.mapping.map(to);
}
@@ -203,7 +203,7 @@ export function getStepsAsAgent(inputTr: Transform) {
tr.replace(replaceFrom, replaceEnd, replacement).addMark(
replaceFrom,
replaceFrom + replacement.content.size,
- pmSchema.mark("insertion", {}),
+ pmSchema.mark("y-attributed-insert", {}),
);
tr.doc.nodesBetween(
@@ -217,7 +217,7 @@ export function getStepsAsAgent(inputTr: Transform) {
return true;
}
if (node.isBlock) {
- tr.addNodeMark(pos, pmSchema.mark("insertion", {}));
+ tr.addNodeMark(pos, pmSchema.mark("y-attributed-insert", {}));
}
return false;
},
diff --git a/packages/xl-ai/src/prosemirror/rebaseTool.test.ts b/packages/xl-ai/src/prosemirror/rebaseTool.test.ts
index 914c294f8b..7222c84de1 100644
--- a/packages/xl-ai/src/prosemirror/rebaseTool.test.ts
+++ b/packages/xl-ai/src/prosemirror/rebaseTool.test.ts
@@ -24,13 +24,13 @@ function getExampleEditorWithSuggestions() {
tr.addMark(
block.blockContent.beforePos + 1,
block.blockContent.beforePos + 6,
- editor.pmSchema.mark("deletion", {}),
+ editor.pmSchema.mark("y-attributed-delete", {}),
);
tr.addMark(
block.blockContent.beforePos + 6,
block.blockContent.beforePos + 8,
- editor.pmSchema.mark("insertion", {}),
+ editor.pmSchema.mark("y-attributed-insert", {}),
);
});
diff --git a/packages/xl-ai/src/style.css b/packages/xl-ai/src/style.css
index 4b7558d518..a3daecd534 100644
--- a/packages/xl-ai/src/style.css
+++ b/packages/xl-ai/src/style.css
@@ -12,22 +12,3 @@
.bn-combobox-items:empty {
display: none;
}
-
-div[data-type="modification"] {
- display: inline;
-}
-
-ins,
-[data-type="modification"] {
- background: rgba(24, 122, 220, 0.1);
- border-bottom: 2px solid rgba(24, 122, 220, 0.1);
- color: rgb(20, 95, 170);
- text-decoration: none;
-}
-
-del,
-[DISABLED-data-node-deletion] {
- color: rgba(100, 90, 75, 0.3);
- text-decoration: line-through;
- text-decoration-thickness: 1px;
-}
diff --git a/packages/xl-multi-column/src/pm-nodes/Column.ts b/packages/xl-multi-column/src/pm-nodes/Column.ts
index d527edfd2e..9e999883b0 100644
--- a/packages/xl-multi-column/src/pm-nodes/Column.ts
+++ b/packages/xl-multi-column/src/pm-nodes/Column.ts
@@ -9,7 +9,7 @@ export const Column = Node.create({
content: "blockContainer+",
priority: 40,
defining: true,
- marks: "deletion insertion modification",
+ marks: "y-attributed-delete y-attributed-insert y-attributed-format",
addAttributes() {
return {
width: {
diff --git a/packages/xl-multi-column/src/pm-nodes/ColumnList.ts b/packages/xl-multi-column/src/pm-nodes/ColumnList.ts
index bf5e120062..98902da437 100644
--- a/packages/xl-multi-column/src/pm-nodes/ColumnList.ts
+++ b/packages/xl-multi-column/src/pm-nodes/ColumnList.ts
@@ -7,7 +7,7 @@ export const ColumnList = Node.create({
content: "column column+", // min two columns
priority: 40, // should be below blockContainer
defining: true,
- marks: "deletion insertion modification",
+ marks: "y-attributed-delete y-attributed-insert y-attributed-format",
parseHTML() {
return [
{
diff --git a/patches/@y__prosemirror@2.0.0-2.patch b/patches/@y__prosemirror@2.0.0-2.patch
new file mode 100644
index 0000000000..120b9a72b9
--- /dev/null
+++ b/patches/@y__prosemirror@2.0.0-2.patch
@@ -0,0 +1,4897 @@
+diff --git a/dist/src/commands.d.ts b/dist/src/commands.d.ts
+new file mode 100644
+index 0000000000000000000000000000000000000000..52db229917ea97da2d45900b873ba416d5c58c41
+--- /dev/null
++++ b/dist/src/commands.d.ts
+@@ -0,0 +1,21 @@
++export function pauseSync(state: import("prosemirror-state").EditorState, dispatch?: (tr: import("prosemirror-state").Transaction) => void, view?: import("prosemirror-view").EditorView): boolean;
++export function configureYProsemirror(opts?: {
++ ytype?: Y.Type | null | undefined;
++ attributionManager?: Y.AbstractAttributionManager | null | undefined;
++}): import("prosemirror-state").Command;
++export function undo(state: import("prosemirror-state").EditorState): boolean;
++export function redo(state: import("prosemirror-state").EditorState): boolean;
++/**
++ * @type {import('prosemirror-state').Command}
++ */
++export const undoCommand: import("prosemirror-state").Command;
++/**
++ * @type {import('prosemirror-state').Command}
++ */
++export const redoCommand: import("prosemirror-state").Command;
++export function rejectChanges(start: number, end?: number): import("prosemirror-state").Command;
++export function acceptChanges(start: number, end?: number): import("prosemirror-state").Command;
++export function acceptAllChanges(): import("prosemirror-state").Command;
++export function rejectAllChanges(): import("prosemirror-state").Command;
++import * as Y from '@y/y';
++//# sourceMappingURL=commands.d.ts.map
+\ No newline at end of file
+diff --git a/dist/src/commands.d.ts.map b/dist/src/commands.d.ts.map
+new file mode 100644
+index 0000000000000000000000000000000000000000..c20bcd20ca4fc83c03acbb1a846fee773532158f
+--- /dev/null
++++ b/dist/src/commands.d.ts.map
+@@ -0,0 +1 @@
++{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/commands.js"],"names":[],"mappings":";AAkCO,6CAJJ;IAA6B,KAAK;IACiB,kBAAkB;CACrE,GAAU,OAAO,mBAAmB,EAAE,OAAO,CAyB/C;AAQM,4BAHI,OAAO,mBAAmB,EAAE,WAAW,GACtC,OAAO,CAEqE;AAQjF,4BAHI,OAAO,mBAAmB,EAAE,WAAW,GACtC,OAAO,CAEqE;AAExF;;GAEG;AACH,0BAFU,OAAO,mBAAmB,EAAE,OAAO,CAEqG;AAElJ;;GAEG;AACH,0BAFU,OAAO,mBAAmB,EAAE,OAAO,CAEqG;AAQ3I,qCAJI,MAAM,QACN,MAAM,GACJ,OAAO,mBAAmB,EAAE,OAAO,CAc/C;AAQM,qCAJI,MAAM,QACN,MAAM,GACJ,OAAO,mBAAmB,EAAE,OAAO,CAc/C;AAMM,oCAFM,OAAO,mBAAmB,EAAE,OAAO,CAW/C;AAMM,oCAFM,OAAO,mBAAmB,EAAE,OAAO,CAW/C;mBAtJkB,MAAM"}
+\ No newline at end of file
+diff --git a/dist/src/cursor-plugin.d.ts b/dist/src/cursor-plugin.d.ts
+new file mode 100644
+index 0000000000000000000000000000000000000000..7180ffe0877be0a67fb5c6090173f9c294625e82
+--- /dev/null
++++ b/dist/src/cursor-plugin.d.ts
+@@ -0,0 +1,44 @@
++export function defaultCursorBuilder(user: User): HTMLElement;
++export function defaultSelectionBuilder(user: User): import("prosemirror-view").DecorationAttrs;
++export function createDecorations(state: import("prosemirror-state").EditorState, awareness: import("@y/protocols/awareness").Awareness, awarenessFilter: AwarenessFilter, createCursor: (user: User, clientId: number) => Element, createSelection: (user: User, clientId: number) => import("prosemirror-view").DecorationAttrs, cursorStateField: string, ystate: {
++ ytype: Y.Type | null;
++ attributionManager: Y.AbstractAttributionManager | null;
++} | undefined): DecorationSet;
++export function yCursorPlugin(awareness: import("@y/protocols/awareness").Awareness, { awarenessStateFilter, cursorBuilder, selectionBuilder, cursorStateField, resolveLocalCursorState }?: {
++ awarenessStateFilter?: AwarenessFilter | undefined;
++ cursorBuilder?: ((user: User, clientId: number) => HTMLElement) | undefined;
++ selectionBuilder?: ((user: User, clientId: number) => import("prosemirror-view").DecorationAttrs) | undefined;
++ resolveLocalCursorState?: ResolveLocalCursorStateCallback | undefined;
++ cursorStateField?: string | undefined;
++}): Plugin;
++export type User = {
++ /**
++ * The label to display for the user
++ */
++ name?: string | undefined;
++ /**
++ * The color to display for the user
++ */
++ color?: string | undefined;
++};
++export type AwarenessFilter = (currentClientId: number, userClientId: number, awarenessState: Record) => boolean;
++export type ResolveLocalCursorStateCallback = (ctx: {
++ view: import("prosemirror-view").EditorView;
++ prevState: {
++ anchor: Y.RelativePosition;
++ head: Y.RelativePosition;
++ } | null;
++ nextState: {
++ anchor: Y.RelativePosition;
++ head: Y.RelativePosition;
++ } | null;
++ isOwnState: boolean;
++ reason: "update" | "focus" | "blur";
++}) => {
++ anchor: Y.RelativePosition;
++ head: Y.RelativePosition;
++} | null;
++import * as Y from '@y/y';
++import { DecorationSet } from 'prosemirror-view';
++import { Plugin } from 'prosemirror-state';
++//# sourceMappingURL=cursor-plugin.d.ts.map
+\ No newline at end of file
+diff --git a/dist/src/cursor-plugin.d.ts.map b/dist/src/cursor-plugin.d.ts.map
+new file mode 100644
+index 0000000000000000000000000000000000000000..f09b4e94cfb42585d13b700cef3f4fb00cf9c60f
+--- /dev/null
++++ b/dist/src/cursor-plugin.d.ts.map
+@@ -0,0 +1 @@
++{"version":3,"file":"cursor-plugin.d.ts","sourceRoot":"","sources":["../../src/cursor-plugin.js"],"names":[],"mappings":"AAgCO,2CAHI,IAAI,GACH,WAAW,CAmBtB;AAQM,8CAHI,IAAI,GACH,OAAO,kBAAkB,EAAE,eAAe,CAOrD;AAYM,yCATI,OAAO,mBAAmB,EAAE,WAAW,aACvC,OAAO,wBAAwB,EAAE,SAAS,mBAC1C,eAAe,gBACf,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,mBACzC,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,kBAAkB,EAAE,eAAe,oBAC5E,MAAM,UACN;IAAC,KAAK,EAAE,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC;IAAC,kBAAkB,EAAE,CAAC,CAAC,0BAA0B,GAAG,IAAI,CAAA;CAAC,GAAG,SAAS,GAC1F,aAAa,CAkExB;AA2BM,yCATI,OAAO,wBAAwB,EAAE,SAAS,yGAElD;IAA+B,oBAAoB;IACU,aAAa,WAA3D,IAAI,YAAY,MAAM,KAAK,WAAW;IACuC,gBAAgB,WAA7F,IAAI,YAAY,MAAM,KAAK,OAAO,kBAAkB,EAAE,eAAe;IACrC,uBAAuB;IAChD,gBAAgB;CACtC,GAAS,MAAM,CAAC,aAAa,CAAC,CAmL7B;;;;;;;;;;;gDAlUO,MAAM,gBACN,MAAM,kBACN,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KACjB,OAAO;oDAwHjB;IAAmD,IAAI,EAA/C,OAAO,kBAAkB,EAAE,UAAU;IAC8B,SAAS,EAA5E;QAAC,MAAM,EAAE,CAAC,CAAC,gBAAgB,CAAC;QAAC,IAAI,EAAE,CAAC,CAAC,gBAAgB,CAAA;KAAC,GAAG,IAAI;IACM,SAAS,EAA5E;QAAC,MAAM,EAAE,CAAC,CAAC,gBAAgB,CAAC;QAAC,IAAI,EAAE,CAAC,CAAC,gBAAgB,CAAA;KAAC,GAAG,IAAI;IAChD,UAAU,EAAvB,OAAO;IAC0B,MAAM,EAAvC,QAAQ,GAAG,OAAO,GAAG,MAAM;CACnC,KAAU;IAAC,MAAM,EAAE,CAAC,CAAC,gBAAgB,CAAC;IAAC,IAAI,EAAE,CAAC,CAAC,gBAAgB,CAAA;CAAC,GAAG,IAAI;mBApJvD,MAAM;8BACiB,kBAAkB;uBACrC,mBAAmB"}
+\ No newline at end of file
+diff --git a/dist/src/diff-decorations.d.ts b/dist/src/diff-decorations.d.ts
+new file mode 100644
+index 0000000000000000000000000000000000000000..66c8346cd99337a1087c50dec735ed0f1f897e3e
+--- /dev/null
++++ b/dist/src/diff-decorations.d.ts
+@@ -0,0 +1,47 @@
++export function renderDeletedContent(fragment: import("prosemirror-model").Fragment, schema: import("prosemirror-model").Schema, opts?: {
++ authorIds?: string[];
++ color?: string;
++ title?: string;
++}): HTMLElement;
++/**
++ * Default mapping from a single `Diff` to decoration(s). Returns a `Decoration`,
++ * an array of them, or `null` to skip.
++ *
++ * @type {MapDiffToDecorations}
++ */
++export const defaultMapDiffToDecorations: MapDiffToDecorations;
++export function buildDiffDecorationSet(doc: import("prosemirror-model").Node, diffs: DiffSet, schema: import("prosemirror-model").Schema, opts?: SuggestionDecorationOptions): DecorationSet;
++export function suggestionDiffPlugin({ diffs, mapDiffToDecorations, colorForAuthors }?: SuggestionDecorationOptions & {
++ diffs?: DiffSet;
++}): Plugin;
++export type Diff = import("./y-attribution-to-diffset.js").Diff;
++export type DiffSet = import("./y-attribution-to-diffset.js").DiffSet;
++export type DiffType = import("./y-attribution-to-diffset.js").DiffType;
++export type Attribution = import("./y-attribution-to-diffset.js").Attribution;
++/**
++ * Arguments passed to a `mapDiffToDecorations` callback.
++ */
++export type MapDiffArgs = {
++ diff: Diff;
++ doc: import("prosemirror-model").Node;
++ schema: import("prosemirror-model").Schema;
++ index: number;
++ color?: string;
++ attributes?: import("prosemirror-view").DecorationAttrs;
++ defaultMapDiffToDecorations?: MapDiffToDecorations;
++};
++/**
++ * Callback that converts a single `Diff` to decoration(s).
++ * Return a `Decoration`, an array of them, or `null` to skip.
++ */
++export type MapDiffToDecorations = (args: MapDiffArgs) => import("prosemirror-view").Decoration | import("prosemirror-view").Decoration[] | null;
++/**
++ * Options shared by `buildDiffDecorationSet` and `ySuggestionDecorationPlugin`.
++ */
++export type SuggestionDecorationOptions = {
++ colorForAuthors?: (authorIds: string[]) => (string | undefined);
++ mapDiffToDecorations?: MapDiffToDecorations;
++};
++import { DecorationSet } from 'prosemirror-view';
++import { Plugin } from 'prosemirror-state';
++//# sourceMappingURL=diff-decorations.d.ts.map
+\ No newline at end of file
+diff --git a/dist/src/diff-decorations.d.ts.map b/dist/src/diff-decorations.d.ts.map
+new file mode 100644
+index 0000000000000000000000000000000000000000..fda53e2c6b828544e6abf535b3851a0e755d8d81
+--- /dev/null
++++ b/dist/src/diff-decorations.d.ts.map
+@@ -0,0 +1 @@
++{"version":3,"file":"diff-decorations.d.ts","sourceRoot":"","sources":["../../src/diff-decorations.js"],"names":[],"mappings":"AAkEO,+CALI,OAAO,mBAAmB,EAAE,QAAQ,UACpC,OAAO,mBAAmB,EAAE,MAAM,SAClC;IAAE,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GACtD,WAAW,CAsBvB;AAoED;;;;;GAKG;AACH,0CAFU,oBAAoB,CA+C7B;AAWM,4CANI,OAAO,mBAAmB,EAAE,IAAI,SAChC,OAAO,UACP,OAAO,mBAAmB,EAAE,MAAM,SAClC,2BAA2B,GACzB,aAAa,CAazB;AAWM,wFAHI,2BAA2B,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAC/C,MAAM,CAAC,aAAa,CAAC,CAmB9B;mBA5OS,OAAO,+BAA+B,EAAE,IAAI;sBAC5C,OAAO,+BAA+B,EAAE,OAAO;uBAC/C,OAAO,+BAA+B,EAAE,QAAQ;0BAChD,OAAO,+BAA+B,EAAE,WAAW;;;;0BAMnD;IACR,IAAI,EAAE,IAAI,CAAC;IACX,GAAG,EAAE,OAAO,mBAAmB,EAAE,IAAI,CAAC;IACtC,MAAM,EAAE,OAAO,mBAAmB,EAAE,MAAM,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,kBAAkB,EAAE,eAAe,CAAC;IACxD,2BAA2B,CAAC,EAAE,oBAAoB,CAAA;CACnD;;;;;0CAQO,WAAW,KACT,OAAO,kBAAkB,EAAE,UAAU,GAAG,OAAO,kBAAkB,EAAE,UAAU,EAAE,GAAG,IAAI;;;;0CAMtF;IACR,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAChE,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;CAC5C;8BAzCsC,kBAAkB;uBACrC,mBAAmB"}
+\ No newline at end of file
+diff --git a/dist/src/editable-deletion.d.ts b/dist/src/editable-deletion.d.ts
+new file mode 100644
+index 0000000000000000000000000000000000000000..4c875471103b399fc9dc13f44477fe3a24001443
+--- /dev/null
++++ b/dist/src/editable-deletion.d.ts
+@@ -0,0 +1,51 @@
++export function deletionKey(diff: Diff): string;
++/**
++ * Global registry of sub-editor entries keyed by the widget's stable key.
++ * Because ProseMirror reuses the DOM (and old WidgetViewDesc) across decoration
++ * rebuilds when keys match, the NEW decoration's spec.subEditors stays undefined.
++ * This map provides a reliable lookup path for handlers and tests that only have
++ * access to the new (current) decoration objects from the DecorationSet.
++ *
++ * Entries are added by `createDeletionDOM` and removed by the widget's `destroy`.
++ *
++ * @type {Map}
++ */
++export const subEditorsByKey: Map;
++export function editableDeletionWidget(diff: Diff, schema: import("prosemirror-model").Schema, opts?: {
++ color?: string;
++ title?: string;
++}): Decoration;
++export function handleEditableDeletionArrow(view: EditorView, event: KeyboardEvent): boolean;
++/**
++ * A `mapDiffToDecorations` implementation that renders deletions as editable
++ * sub-editors and defers everything else to the default mapping. Pass it to
++ * `ySuggestionDecorationPlugin({ mapDiffToDecorations: editableDeletionMapDiff })`.
++ *
++ * @type {import('./diff-decorations.js').MapDiffToDecorations}
++ */
++export const editableDeletionMapDiff: import("./diff-decorations.js").MapDiffToDecorations;
++export function handleEditableDeletionTextInput(view: EditorView, from: number, to: number, text: string): boolean;
++export function applyGhostAnchorOffsets(ytype: object | null, diffs: Diff[]): Diff[];
++export type Diff = import("./y-attribution-to-diffset.js").Diff;
++export type MapDiffArgs = import("./diff-decorations.js").MapDiffArgs;
++/**
++ * The structural shape of a deletion, deciding which element the sub-editor
++ * mounts on and which minimal inner schema it uses, so the widget DOM stays
++ * *valid* in its surrounding context (a `
` between table rows, a `
`
++ * between cells, a true inline `` mid-text).
++ */
++export type DeletionShape = "inline" | "block" | "row" | "cell";
++/**
++ * Sub-editor entry stored on the widget decoration's `spec.subEditors`.
++ * The arrow/text-input handlers read it directly from the spec instead of
++ * using a module-level registry, so external consumers (e.g. BlockNote) can
++ * mount their own sub-editors and have the keyboard navigation work
++ * automatically — just set `spec.subEditors` on the widget decoration.
++ */
++export type SubEditorEntry = {
++ views: EditorView[];
++ container: HTMLElement;
++};
++import { Decoration } from 'prosemirror-view';
++import { EditorView } from 'prosemirror-view';
++//# sourceMappingURL=editable-deletion.d.ts.map
+\ No newline at end of file
+diff --git a/dist/src/editable-deletion.d.ts.map b/dist/src/editable-deletion.d.ts.map
+new file mode 100644
+index 0000000000000000000000000000000000000000..b3c950e072ed60ad62eaafeb05213914afbacf6b
+--- /dev/null
++++ b/dist/src/editable-deletion.d.ts.map
+@@ -0,0 +1 @@
++{"version":3,"file":"editable-deletion.d.ts","sourceRoot":"","sources":["../../src/editable-deletion.js"],"names":[],"mappings":"AA4RO,kCAHI,IAAI,GACF,MAAM,CAGgF;AAEnG;;;;;;;;;;GAUG;AACH,8BAFU,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAEG;AAmPjC,6CALI,IAAI,UACJ,OAAO,mBAAmB,EAAE,MAAM,SAClC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAChC,UAAU,CA8BtB;AAkCM,kDAJI,UAAU,SACV,aAAa,GACX,OAAO,CAuHnB;AAED;;;;;;GAMG;AACH,sCAFU,OAAO,uBAAuB,EAAE,oBAAoB,CAQ7D;AA6BM,sDANI,UAAU,QACV,MAAM,MACN,MAAM,QACN,MAAM,GACJ,OAAO,CAyBnB;AAcM,+CAJI,MAAM,GAAG,IAAI,SACb,IAAI,EAAE,GACJ,IAAI,EAAE,CAkBlB;mBA5uBY,OAAO,+BAA+B,EAAE,IAAI;0BAC5C,OAAO,uBAAuB,EAAE,WAAW;;;;;;;4BAS3C,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM;;;;;;;;6BAoOnC;IAAE,KAAK,EAAE,UAAU,EAAE,CAAC;IAAC,SAAS,EAAE,WAAW,CAAA;CAAE;2BAvPrB,kBAAkB;2BAAlB,kBAAkB"}
+\ No newline at end of file
+diff --git a/dist/src/index.d.ts b/dist/src/index.d.ts
+index fec5f1c23d3f28e250fecd7045fcebe7fc60993f..dbb3d924d72714ce6e85b78ff4c8810d85fa5876 100644
+--- a/dist/src/index.d.ts
++++ b/dist/src/index.d.ts
+@@ -1,84 +1,19 @@
+-/**
+- * @param {Y.XmlFragment} ytype
+- * @param {object} opts
+- * @param {import('@y/protocols/awareness').Awareness} [opts.awareness]
+- * @param {Y.AbstractAttributionManager} [opts.attributionManager]
+- * @returns {Plugin}
+- */
+-export function syncPlugin(ytype: Y.XmlFragment, { awareness, attributionManager }?: {
+- awareness?: import("@y/protocols/awareness").Awareness;
+- attributionManager?: Y.AbstractAttributionManager;
+-}): Plugin;
+-/**
+- * This function is used to find the delta offset for a given prosemirror offset in a node.
+- * Given the following document:
+- *
Hello world
Hello world!
+- * The delta structure would look like this:
+- * 0: p
+- * - 0: text("Hello world")
+- * 1: blockquote
+- * - 0: p
+- * - 0: text("Hello world!")
+- * So the prosemirror position 10 would be within the delta offset path: 0, 0 and have an offset into the text node of 9 (since it is the 9th character in the text node).
+- *
+- * So the return value would be [0, 9], which is the path of: p, text("Hello wor")
+- *
+- * @param {Node} node
+- * @param {number} searchPmOffset The p offset to find the delta offset for
+- * @return {number[]} The delta offset path for the search pm offset
+- */
+-export function pmToDeltaPath(node: Node, searchPmOffset?: number): number[];
+-/**
+- * Inverse of {@link pmToDeltaPath}
+- * @param {number[]} deltaPath
+- * @param {Node} node
+- * @return {number} The prosemirror offset for the delta path
+- */
+-export function deltaPathToPm(deltaPath: number[], node: Node): number;
+-export class YEditorView extends EditorView {
+- mux: mux.mutex;
+- /**
+- * @type {{ ytype: Y.XmlFragment, am: Y.AbstractAttributionManager, awareness: any }?}
+- */
+- y: {
+- ytype: Y.XmlFragment;
+- am: Y.AbstractAttributionManager;
+- awareness: any;
+- } | null;
+- /**
+- * @param {Array>} events
+- * @param {Y.Transaction} tr
+- */
+- _observer: (events: Array>, tr: Y.Transaction) => void;
+- /**
+- * @param {Y.XmlFragment} ytype
+- * @param {object} opts
+- * @param {any} [opts.awareness]
+- * @param {Y.AbstractAttributionManager} [opts.attributionManager]
+- */
+- bindYType(ytype: Y.XmlFragment, { awareness, attributionManager }?: {
+- awareness?: any;
+- attributionManager?: Y.AbstractAttributionManager;
+- }): void;
+-}
+-export function nodesToDelta(ns: Array): delta.DeltaBuilderAny;
+-export function nodeToDelta(n: Node): delta.DeltaBuilderAny;
+-export function deltaToPSteps(tr: import("prosemirror-state").Transaction, d: ProsemirrorDelta, pnode?: Node, currPos?: {
+- i: number;
+-}): import("prosemirror-state").Transaction;
+-export function trToDelta(tr: Transform): ProsemirrorDelta;
+-export function stepToDelta(step: import("prosemirror-transform").Step, beforeDoc: import("prosemirror-model").Node): ProsemirrorDelta;
+-export function deltaModifyNodeAt(node: Node, pmOffset: number, mod: (d: delta.DeltaBuilderAny) => any): ProsemirrorDelta;
+-export type ProsemirrorDelta = s.Unwrap, string, any>>>;
+-import * as Y from '@y/y';
+-import { Plugin } from 'prosemirror-state';
+-import { Node } from 'prosemirror-model';
+-import { EditorView } from 'prosemirror-view';
+-import * as mux from 'lib0/mutex';
+-import * as delta from 'lib0/delta';
+-import { Transform } from 'prosemirror-transform';
+-import * as s from 'lib0/schema';
++export * from "./sync-plugin.js";
++export * from "./keys.js";
++export * from "./positions.js";
++export * from "./commands.js";
++export * from "./undo-plugin.js";
++export * from "./cursor-plugin.js";
++export { ydeltaToDiffSet } from "./y-attribution-to-diffset.js";
++export { ySuggestionDecorationPlugin } from "./suggestion-decoration-plugin.js";
++export type Attribution = import("./y-attribution-to-diffset.js").Attribution;
++export type Diff = import("./y-attribution-to-diffset.js").Diff;
++export type DiffType = import("./y-attribution-to-diffset.js").DiffType;
++export type DiffSet = import("./y-attribution-to-diffset.js").DiffSet;
++export type SuggestionDecorationOptions = import("./diff-decorations.js").SuggestionDecorationOptions;
++export type MapDiffToDecorations = import("./diff-decorations.js").MapDiffToDecorations;
++export type MapDiffArgs = import("./diff-decorations.js").MapDiffArgs;
++export { docToDelta, $prosemirrorDelta } from "./sync-utils.js";
++export { buildDiffDecorationSet, suggestionDiffPlugin, renderDeletedContent, defaultMapDiffToDecorations } from "./diff-decorations.js";
++export { editableDeletionWidget, editableDeletionMapDiff, handleEditableDeletionArrow, handleEditableDeletionTextInput, applyGhostAnchorOffsets, deletionKey, subEditorsByKey } from "./editable-deletion.js";
++//# sourceMappingURL=index.d.ts.map
+\ No newline at end of file
+diff --git a/dist/src/index.d.ts.map b/dist/src/index.d.ts.map
+new file mode 100644
+index 0000000000000000000000000000000000000000..d131ae17f5d02df2af137cb93c380689b1e5464d
+--- /dev/null
++++ b/dist/src/index.d.ts.map
+@@ -0,0 +1 @@
++{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":";;;;;;;;0BAQc,OAAO,+BAA+B,EAAE,WAAW;mBACnD,OAAO,+BAA+B,EAAE,IAAI;uBAC5C,OAAO,+BAA+B,EAAE,QAAQ;sBAChD,OAAO,+BAA+B,EAAE,OAAO;0CAE/C,OAAO,uBAAuB,EAAE,2BAA2B;mCAC3D,OAAO,uBAAuB,EAAE,oBAAoB;0BACpD,OAAO,uBAAuB,EAAE,WAAW"}
+\ No newline at end of file
+diff --git a/dist/src/keys.d.ts b/dist/src/keys.d.ts
+new file mode 100644
+index 0000000000000000000000000000000000000000..0b8d192e3e3099785c3bda2450b923ee540b4b8d
+--- /dev/null
++++ b/dist/src/keys.d.ts
+@@ -0,0 +1,39 @@
++/** @typedef {import('lib0/schema').Unwrap} SyncPluginState */
++/**
++ * The unique prosemirror plugin key for {@link import('./sync-plugin.js').syncPlugin}
++ *
++ * @public
++ * @type {PluginKey}
++ */
++export const ySyncPluginKey: PluginKey;
++/**
++ * The unique prosemirror plugin key for {@link import('./undo-plugin.js').yUndoPlugin}
++ *
++ * @public
++ * @type {PluginKey}
++ */
++export const yUndoPluginKey: PluginKey;
++/**
++ * The unique prosemirror plugin key for {@link import('./cursor-plugin.js').cursorPlugin}
++ *
++ * @public
++ * @type {PluginKey}
++ */
++export const yCursorPluginKey: PluginKey;
++/**
++ * The unique prosemirror plugin key for {@link import('./suggestion-decoration-plugin.js').ySuggestionDecorationPlugin}
++ *
++ * @public
++ * @type {PluginKey}
++ */
++export const ySuggestionDecorationPluginKey: PluginKey;
++/**
++ * The unique prosemirror plugin key for {@link import('./diff-decorations.js').suggestionDiffPlugin}
++ *
++ * @public
++ * @type {PluginKey}
++ */
++export const suggestionDiffPluginKey: PluginKey;
++export type SyncPluginState = import("lib0/schema").Unwrap;
++import { PluginKey } from 'prosemirror-state';
++//# sourceMappingURL=keys.d.ts.map
+\ No newline at end of file
+diff --git a/dist/src/keys.d.ts.map b/dist/src/keys.d.ts.map
+new file mode 100644
+index 0000000000000000000000000000000000000000..a2f34d3f21d0b22d2d1f07fd1c1d77841fc14665
+--- /dev/null
++++ b/dist/src/keys.d.ts.map
+@@ -0,0 +1 @@
++{"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../src/keys.js"],"names":[],"mappings":"AAEA,kHAAkH;AAElH;;;;;GAKG;AACH,6BAFU,SAAS,CAAC,eAAe,CAAC,CAEiB;AAErD;;;;;GAKG;AACH,6BAFU,SAAS,CAAC,OAAO,kBAAkB,EAAE,eAAe,CAAC,CAEV;AAErD;;;;;GAKG;AACH,+BAFU,SAAS,CAAC,OAAO,kBAAkB,EAAE,aAAa,CAAC,CAEJ;AAEzD;;;;;GAKG;AACH,6CAFU,SAAS,CAAC,OAAO,kBAAkB,EAAE,aAAa,CAAC,CAE0B;AAEvF;;;;;GAKG;AACH,sCAFU,SAAS,CAAC,OAAO,kBAAkB,EAAE,aAAa,CAAC,CAEU;8BAxCzD,OAAO,aAAa,EAAE,MAAM,CAAC,cAAc,kBAAkB,EAAE,gBAAgB,CAAC;0BAFpE,mBAAmB"}
+\ No newline at end of file
+diff --git a/dist/src/lib.d.ts b/dist/src/lib.d.ts
+deleted file mode 100644
+index 30ebc3bbc8eb20f96d1135b7fe8e8c8659bacf22..0000000000000000000000000000000000000000
+diff --git a/dist/src/plugins/cursor-plugin.d.ts b/dist/src/plugins/cursor-plugin.d.ts
+deleted file mode 100644
+index 5f77005b9d72e5d383d1687149a57208c6ed29dd..0000000000000000000000000000000000000000
+diff --git a/dist/src/plugins/keys.d.ts b/dist/src/plugins/keys.d.ts
+deleted file mode 100644
+index adc3a2cfa3de8429977ec8d7a9df4e27291ec950..0000000000000000000000000000000000000000
+diff --git a/dist/src/plugins/sync-plugin.d.ts b/dist/src/plugins/sync-plugin.d.ts
+deleted file mode 100644
+index c4493907df56bb388838ff5032a27be72e5c1511..0000000000000000000000000000000000000000
+diff --git a/dist/src/plugins/undo-plugin.d.ts b/dist/src/plugins/undo-plugin.d.ts
+deleted file mode 100644
+index 93cd6e77e5ee617f6e06f0f16508c7e3e3e9e1ea..0000000000000000000000000000000000000000
+diff --git a/dist/src/positions.d.ts b/dist/src/positions.d.ts
+new file mode 100644
+index 0000000000000000000000000000000000000000..2c008bfa4dbf0fe49a4148d6346c53885d94de7b
+--- /dev/null
++++ b/dist/src/positions.d.ts
+@@ -0,0 +1,11 @@
++export function absolutePositionToRelativePosition(resolvedPos: import("prosemirror-model").ResolvedPos, type: Y.Type, am?: Y.AbstractAttributionManager | null): Y.RelativePosition;
++export function relativePositionToAbsolutePosition(relPos: Y.RelativePosition, documentType: Y.Type, pmDoc: import("prosemirror-model").Node, am?: Y.AbstractAttributionManager | null): null | number;
++export function relativePositionStore(resolvedPos: import("prosemirror-model").ResolvedPos, type: Y.Type, am?: Y.AbstractAttributionManager): (doc: import("prosemirror-model").Node, documentType?: Y.Type, attributionManager?: Y.AbstractAttributionManager) => number;
++export function relativePositionStoreMapping(type: Y.Type): {
++ captureMapping: CaptureMapping;
++ restoreMapping: RestoreMapping;
++};
++export type CaptureMapping = (doc: import("prosemirror-model").Node, am?: Y.AbstractAttributionManager | null | undefined, clear?: boolean | undefined) => import("prosemirror-transform").Mappable;
++export type RestoreMapping = (type: Y.Type, pmDoc: import("prosemirror-model").Node, am?: Y.AbstractAttributionManager | null | undefined) => import("prosemirror-transform").Mappable;
++import * as Y from '@y/y';
++//# sourceMappingURL=positions.d.ts.map
+\ No newline at end of file
+diff --git a/dist/src/positions.d.ts.map b/dist/src/positions.d.ts.map
+new file mode 100644
+index 0000000000000000000000000000000000000000..e4f768c579f11b08055a31cc166e8c34278815a6
+--- /dev/null
++++ b/dist/src/positions.d.ts.map
+@@ -0,0 +1 @@
++{"version":3,"file":"positions.d.ts","sourceRoot":"","sources":["../../src/positions.js"],"names":[],"mappings":"AAWO,gEALI,OAAO,mBAAmB,EAAE,WAAW,QACvC,CAAC,CAAC,IAAI,OACN,CAAC,CAAC,0BAA0B,GAAG,IAAI,GAClC,CAAC,CAAC,gBAAgB,CA6C7B;AAUM,2DANI,CAAC,CAAC,gBAAgB,gBAClB,CAAC,CAAC,IAAI,SACN,OAAO,mBAAmB,EAAE,IAAI,OAChC,CAAC,CAAC,0BAA0B,GAAG,IAAI,GAClC,IAAI,GAAC,MAAM,CAmDtB;AASM,mDALI,OAAO,mBAAmB,EAAE,WAAW,QACvC,CAAC,CAAC,IAAI,OACN,CAAC,CAAC,0BAA0B,GAC1B,CAAC,GAAG,EAAE,OAAO,mBAAmB,EAAE,IAAI,EAAE,YAAY,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,kBAAkB,CAAC,EAAE,CAAC,CAAC,0BAA0B,KAAK,MAAM,CAWvI;AAyBM,mDAHI,CAAC,CAAC,IAAI,GACJ;IAAC,cAAc,EAAE,cAAc,CAAC;IAAC,cAAc,EAAE,cAAc,CAAA;CAAC,CAyD5E;mCA5EU,OAAO,mBAAmB,EAAE,IAAI,wFAG9B,OAAO,uBAAuB,EAAE,QAAQ;oCAK1C,CAAC,CAAC,IAAI,SACN,OAAO,mBAAmB,EAAE,IAAI,2DAE9B,OAAO,uBAAuB,EAAE,QAAQ;mBAlJlC,MAAM"}
+\ No newline at end of file
+diff --git a/dist/src/suggestion-decoration-plugin.d.ts b/dist/src/suggestion-decoration-plugin.d.ts
+new file mode 100644
+index 0000000000000000000000000000000000000000..9c8a6d99d690d36a8d01af6b0542b8605ef269d7
+--- /dev/null
++++ b/dist/src/suggestion-decoration-plugin.d.ts
+@@ -0,0 +1,5 @@
++export function ySuggestionDecorationPlugin(opts?: SuggestionDecorationOptions): Plugin;
++export type SuggestionDecorationOptions = import("./diff-decorations.js").SuggestionDecorationOptions;
++import { Plugin } from 'prosemirror-state';
++import { DecorationSet } from 'prosemirror-view';
++//# sourceMappingURL=suggestion-decoration-plugin.d.ts.map
+\ No newline at end of file
+diff --git a/dist/src/suggestion-decoration-plugin.d.ts.map b/dist/src/suggestion-decoration-plugin.d.ts.map
+new file mode 100644
+index 0000000000000000000000000000000000000000..b8fc97c77f207b7c92a77a5943a9c531fd33baed
+--- /dev/null
++++ b/dist/src/suggestion-decoration-plugin.d.ts.map
+@@ -0,0 +1 @@
++{"version":3,"file":"suggestion-decoration-plugin.d.ts","sourceRoot":"","sources":["../../src/suggestion-decoration-plugin.js"],"names":[],"mappings":"AAsDO,mDAHI,2BAA2B,GACzB,MAAM,CAAC,aAAa,CAAC,CAoC9B;0CApEU,OAAO,uBAAuB,EAAE,2BAA2B;uBANlD,mBAAmB;8BACZ,kBAAkB"}
+\ No newline at end of file
+diff --git a/dist/src/sync-plugin.d.ts b/dist/src/sync-plugin.d.ts
+new file mode 100644
+index 0000000000000000000000000000000000000000..229de152a175bfe747471b352465b9545e9bbb26
+--- /dev/null
++++ b/dist/src/sync-plugin.d.ts
+@@ -0,0 +1,39 @@
++/**
++ * This Prosemirror {@link Plugin} is responsible for synchronizing the prosemirror
++ * {@link import('prosemirror-state').EditorState} with a {@link Y.XmlFragment}.
++ *
++ * The PM->Y diff/apply pipeline runs in the plugin's `view().update`
++ * hook (i.e. after the dispatch has been committed to the view), not
++ * in `appendTransaction`. Running it in `appendTransaction` would
++ * cause speculative `state.apply` callers to write to Y as a side
++ * effect.
++ *
++ * The PM document always mirrors the **clean** Y content (no attribution
++ * marks, no deleted text). The write path applies diffs through the AM
++ * so edits are tagged as suggestions. Attribution rendering is handled
++ * by the separate {@link import('./suggestion-decoration-plugin.js').ySuggestionDecorationPlugin}.
++ *
++ * @param {object} [opts]
++ * @returns {Plugin}
++ */
++export function syncPlugin(opts?: object): Plugin;
++/**
++ * The y-prosemirror binding is a bi-directional synchronization with the provided Y.Type and the EditorView.
++ * Any change applied to the EditorView will be applied (via deltas) to the Y.Type, and vice versa.
++ *
++ * The PM document always contains **clean** content — no attribution marks,
++ * no deleted text inline. Attribution is rendered as decorations by
++ * {@link import('./suggestion-decoration-plugin.js').ySuggestionDecorationPlugin}.
++ */
++export const $syncPluginState: s.Schema<{
++ ytype: Y.Type | null;
++ attributionManager: Y.AbstractAttributionManager | null;
++}>;
++export const $syncPluginStateUpdate: s.Schema<{
++ ytype?: Y.Type | null | undefined;
++ attributionManager?: Y.AbstractAttributionManager | null | undefined;
++}>;
++import { Plugin } from 'prosemirror-state';
++import * as Y from '@y/y';
++import * as s from 'lib0/schema';
++//# sourceMappingURL=sync-plugin.d.ts.map
+\ No newline at end of file
+diff --git a/dist/src/sync-plugin.d.ts.map b/dist/src/sync-plugin.d.ts.map
+new file mode 100644
+index 0000000000000000000000000000000000000000..257913a7524665058045da2e87779eaf0563fc18
+--- /dev/null
++++ b/dist/src/sync-plugin.d.ts.map
+@@ -0,0 +1 @@
++{"version":3,"file":"sync-plugin.d.ts","sourceRoot":"","sources":["../../src/sync-plugin.js"],"names":[],"mappings":"AAgCA;;;;;;;;;;;;;;;;;GAiBG;AACH,kCAHW,MAAM,GACJ,MAAM,CAkKlB;AArMD;;;;;;;GAOG;AACH;;;GAGE;AAEF;;;GAGE;uBA5BqB,mBAAmB;mBADvB,MAAM;mBAUN,aAAa"}
+\ No newline at end of file
+diff --git a/dist/src/sync-utils.d.ts b/dist/src/sync-utils.d.ts
+new file mode 100644
+index 0000000000000000000000000000000000000000..d57c7fe0a258d821eb58d615bd93fa3a1deffcf1
+--- /dev/null
++++ b/dist/src/sync-utils.d.ts
+@@ -0,0 +1,105 @@
++/**
++ * Transforms a {@link Node} into a {@link Y.XmlFragment}
++ * @param {Node} node
++ * @param {Y.Type} fragment
++ * @param {Object} [opts]
++ * @param {Y.AbstractAttributionManager} [opts.attributionManager]
++ * @returns {Y.Type}
++ */
++export function pmToFragment(node: Node, fragment: Y.Type, { attributionManager }?: {
++ attributionManager?: Y.AbstractAttributionManager | undefined;
++}): Y.Type;
++/**
++ * This function is used to find the delta offset for a given prosemirror offset in a node.
++ * Given the following document:
++ *
Hello world
Hello world!
++ * The delta structure would look like this:
++ * 0: p
++ * - 0: text("Hello world")
++ * 1: blockquote
++ * - 0: p
++ * - 0: text("Hello world!")
++ * So the prosemirror position 10 would be within the delta offset path: 0, 0 and have an offset into the text node of 9 (since it is the 9th character in the text node).
++ *
++ * So the return value would be [0, 9], which is the path of: p, text("Hello wor")
++ *
++ * @param {Node} node
++ * @param {number} searchPmOffset The p offset to find the delta offset for
++ * @return {number[]} The delta offset path for the search pm offset
++ */
++export function pmToDeltaPath(node: Node, searchPmOffset?: number): number[];
++/**
++ * Inverse of {@link pmToDeltaPath}
++ * @param {number[]} deltaPath
++ * @param {Node} node
++ * @return {number} The prosemirror offset for the delta path
++ */
++export function deltaPathToPm(deltaPath: number[], node: Node): number;
++export const $prosemirrorDelta: s.Schema>;
++export function formattingAttributesToMarks(formatting: {
++ [key: string]: any;
++} | null, schema: import("prosemirror-model").Schema): import("prosemirror-model").Mark[];
++export function nodesToDelta(ns: Array): ProsemirrorDelta;
++export function nodeToDelta(n: Node, nodeName?: string | null): ProsemirrorDelta;
++export function docToDelta(doc: Node): delta.Delta<{
++ name: string;
++ attrs: {
++ [x: string]: any;
++ };
++ text: true;
++ recursiveChildren: true;
++}>;
++export function deltaToPSteps(tr: import("prosemirror-state").Transaction, d: ProsemirrorDelta, pnode?: Node, currPos?: {
++ i: number;
++}): import("prosemirror-state").Transaction;
++export function deltaToPNode(d: ProsemirrorDelta, schema: import("prosemirror-model").Schema, dformat: delta.FormattingAttributes | null): Node;
++export function docDiffToDelta(beforeDoc: Node, afterDoc: Node): delta.Delta<{
++ name: string;
++ attrs: {
++ [x: string]: any;
++ };
++ text: true;
++ recursiveChildren: true;
++}>;
++export function trToDelta(tr: import("prosemirror-state").Transaction): delta.Delta<{
++ name: string;
++ attrs: {
++ [x: string]: any;
++ };
++ text: true;
++ recursiveChildren: true;
++}>;
++export function stepToDelta(step: import("prosemirror-transform").Step, beforeDoc: import("prosemirror-model").Node): ProsemirrorDelta;
++export function deltaModifyNodeAt(node: Node, pmOffset: number, mod: (d: delta.DeltaBuilderAny) => any): ProsemirrorDelta;
++export type ProsemirrorDelta = import("lib0/schema").Unwrap;
++/**
++ * A single child op of a {@link ProsemirrorDelta} (retain / modify / insert /
++ * text / delete).
++ */
++export type ProsemirrorDeltaOp = delta.ChildrenOpAny;
++/**
++ * A grouped run of insert/text and/or delete ops sharing one anchor position,
++ * applied as a single atomic replace step (see {@link deltaToPSteps}).
++ */
++export type ReplaceBundle = {
++ /**
++ * insert/text ops, in delta order
++ */
++ inserts: Array | delta.TextOp>;
++ /**
++ * delete ops, in delta order
++ */
++ deletes: Array;
++};
++import { Node } from 'prosemirror-model';
++import * as Y from '@y/y';
++import * as delta from 'lib0/delta';
++import * as s from 'lib0/schema';
++//# sourceMappingURL=sync-utils.d.ts.map
+\ No newline at end of file
+diff --git a/dist/src/sync-utils.d.ts.map b/dist/src/sync-utils.d.ts.map
+new file mode 100644
+index 0000000000000000000000000000000000000000..b0b2547bc3ccb9951702eb80e8ea52b43b2f2a93
+--- /dev/null
++++ b/dist/src/sync-utils.d.ts.map
+@@ -0,0 +1 @@
++{"version":3,"file":"sync-utils.d.ts","sourceRoot":"","sources":["../../src/sync-utils.js"],"names":[],"mappings":"AA+DA;;;;;;;GAOG;AACH,mCANW,IAAI,YACJ,CAAC,CAAC,IAAI,2BAEd;IAA4C,kBAAkB;CAC9D,GAAU,CAAC,CAAC,IAAI,CAOlB;AA6YD;;;;;;;;;;;;;;;;;GAiBG;AACH,oCAJW,IAAI,mBACJ,MAAM,GACL,MAAM,EAAE,CA2BnB;AAED;;;;;GAKG;AACH,yCAJW,MAAM,EAAE,QACR,IAAI,GACH,MAAM,CAsCjB;AA/hBD;;;;;;;IAA4I;AA4BrI,wDAHI;IAAC,CAAC,GAAG,EAAC,MAAM,GAAE,GAAG,CAAA;CAAC,GAAC,IAAI,UACvB,OAAO,mBAAmB,EAAE,MAAM,sCAGwD;AAM9F,iCAHI,KAAK,CAAC,IAAI,CAAC,GACV,gBAAgB,CAW3B;AAsBM,+BAJI,IAAI,aACJ,MAAM,OAAC,GACN,gBAAgB,CAS3B;AAKM,gCAFI,IAAI;;;;;;;GAEwC;AA2ChD,kCANI,OAAO,mBAAmB,EAAE,WAAW,KACvC,gBAAgB,UAChB,IAAI,YACJ;IAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GACZ,OAAO,mBAAmB,EAAE,WAAW,CA0JlD;AAQM,gCALI,gBAAgB,UAChB,OAAO,mBAAmB,EAAE,MAAM,WAClC,KAAK,CAAC,oBAAoB,GAAC,IAAI,GAC9B,IAAI,CA6Bf;AAMM,0CAHI,IAAI,YACJ,IAAI;;;;;;;GAMd;AAKM,8BAFI,OAAO,mBAAmB,EAAE,WAAW;;;;;;;GAkBjD;AAiGM,kCAJI,OAAO,uBAAuB,EAAE,IAAI,aACpC,OAAO,mBAAmB,EAAE,IAAI,GAC/B,gBAAgB,CAQ3B;AA6GM,wCALI,IAAI,YACJ,MAAM,OACN,CAAC,CAAC,EAAC,KAAK,CAAC,eAAe,KAAG,GAAG,GAC7B,gBAAgB,CAa3B;+BAhjBa,OAAO,aAAa,EAAE,MAAM,CAAC,OAAO,iBAAiB,CAAC;;;;;iCAoGvD,KAAK,CAAC,aAAa;;;;;;;;;aAQlB,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAC,KAAK,CAAC,MAAM,CAAC;;;;aACvC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC;;qBA3Hc,mBAAmB;mBALjD,MAAM;uBACF,YAAY;mBAGhB,aAAa"}
+\ No newline at end of file
+diff --git a/dist/src/undo-plugin.d.ts b/dist/src/undo-plugin.d.ts
+new file mode 100644
+index 0000000000000000000000000000000000000000..86f43ae4291c5baf85948350df8d7d46f737869f
+--- /dev/null
++++ b/dist/src/undo-plugin.d.ts
+@@ -0,0 +1,14 @@
++export function yUndoPlugin(undoManager: import("@y/y").UndoManager): Plugin;
++export type UndoPluginState = {
++ undoManager: import("@y/y").UndoManager;
++ prevSel: {
++ bookmark: import("prosemirror-state").SelectionBookmark;
++ restoreMapping: ReturnType["restoreMapping"];
++ } | null;
++ hasUndoOps: boolean;
++ hasRedoOps: boolean;
++ addToHistory: boolean;
++};
++import { Plugin } from 'prosemirror-state';
++import { relativePositionStoreMapping } from './positions.js';
++//# sourceMappingURL=undo-plugin.d.ts.map
+\ No newline at end of file
+diff --git a/dist/src/undo-plugin.d.ts.map b/dist/src/undo-plugin.d.ts.map
+new file mode 100644
+index 0000000000000000000000000000000000000000..665bb84203a88b35e2961e7221a31896485bdcc7
+--- /dev/null
++++ b/dist/src/undo-plugin.d.ts.map
+@@ -0,0 +1 @@
++{"version":3,"file":"undo-plugin.d.ts","sourceRoot":"","sources":["../../src/undo-plugin.js"],"names":[],"mappings":"AA8JO,yCAFI,OAAO,MAAM,EAAE,WAAW,2BAmFpC;;iBAzOa,OAAO,MAAM,EAAE,WAAW;aAC1B;QAAE,QAAQ,EAAE,OAAO,mBAAmB,EAAE,iBAAiB,CAAC;QAAC,cAAc,EAAE,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAAC,gBAAgB,CAAC,CAAA;KAAE,GAAG,IAAI;gBACrJ,OAAO;gBACP,OAAO;kBACP,OAAO;;uBAVE,mBAAmB;6CACG,gBAAgB"}
+\ No newline at end of file
+diff --git a/dist/src/utils.d.ts b/dist/src/utils.d.ts
+deleted file mode 100644
+index 9006a87dd42992dfe0aa0f7ab5298983deb3357a..0000000000000000000000000000000000000000
+diff --git a/dist/src/y-attribution-to-diffset.d.ts b/dist/src/y-attribution-to-diffset.d.ts
+new file mode 100644
+index 0000000000000000000000000000000000000000..d9a219ef72198224a123e58b31cbd509cb2cfbf5
+--- /dev/null
++++ b/dist/src/y-attribution-to-diffset.d.ts
+@@ -0,0 +1,40 @@
++export function ydeltaToDiffSet(attributedDelta: d.DeltaAny, { displayedDoc, schema }: {
++ displayedDoc: import("prosemirror-model").Node;
++ schema: import("prosemirror-model").Schema;
++}): DiffSet;
++/**
++ * Who made a change and whether it was an insertion or deletion.
++ */
++export type Attribution = {
++ type: "added" | "removed";
++ authorIds: string[];
++ timestamp?: number;
++};
++/**
++ * The six diff types produced by `ydeltaToDiffSet`.
++ */
++export type DiffType = "inline-insert" | "inline-delete" | "block-insert" | "block-delete" | "inline-update" | "block-update";
++/**
++ * A single difference between the base and suggestion documents.
++ *
++ * `from`/`to` are positions in the *displayed* (clean) PM document.
++ * For delete types, `from === to` (zero-width) and `content` holds the
++ * removed fragment for ghost rendering. For update types, `attributes`
++ * holds the new values and `previousAttributes` (when available) the old.
++ */
++export type Diff = {
++ type: DiffType;
++ from: number;
++ to: number;
++ content?: import("prosemirror-model").Fragment;
++ attribution: Attribution;
++ attributes?: Record;
++ previousAttributes?: Record;
++};
++/**
++ * An ordered array of `Diff` objects covering all changes between the
++ * base and suggestion documents.
++ */
++export type DiffSet = Diff[];
++import * as d from 'lib0/delta';
++//# sourceMappingURL=y-attribution-to-diffset.d.ts.map
+\ No newline at end of file
+diff --git a/dist/src/y-attribution-to-diffset.d.ts.map b/dist/src/y-attribution-to-diffset.d.ts.map
+new file mode 100644
+index 0000000000000000000000000000000000000000..229fa9e700846567721d8dedaa5721ac7b29eae8
+--- /dev/null
++++ b/dist/src/y-attribution-to-diffset.d.ts.map
+@@ -0,0 +1 @@
++{"version":3,"file":"y-attribution-to-diffset.d.ts","sourceRoot":"","sources":["../../src/y-attribution-to-diffset.js"],"names":[],"mappings":"AAkEO,iDAJI,CAAC,CAAC,QAAQ,4BACV;IAAE,YAAY,EAAE,OAAO,mBAAmB,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,OAAO,mBAAmB,EAAE,MAAM,CAAA;CAAE,GAC5F,OAAO,CAQnB;;;;0BArDY;IACR,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;;;;uBAMS,eAAe,GAAG,eAAe,GAAG,cAAc,GAAG,cAAc,GAAG,eAAe,GAAG,cAAc;;;;;;;;;mBAWtG;IACR,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,OAAO,mBAAmB,EAAE,QAAQ,CAAC;IAC/C,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CACzC;;;;;sBAOS,IAAI,EAAE;mBA3CA,YAAY"}
+\ No newline at end of file
+diff --git a/dist/src/y-prosemirror.d.ts b/dist/src/y-prosemirror.d.ts
+deleted file mode 100644
+index c1f9468c4c77434a1ad9f49227fb1274f5ae1915..0000000000000000000000000000000000000000
+diff --git a/dist/y-prosemirror.cjs b/dist/y-prosemirror.cjs
+deleted file mode 100644
+index 336dba34929063474acb211d065920823cfbc604..0000000000000000000000000000000000000000
+diff --git a/dist/y-prosemirror.cjs.map b/dist/y-prosemirror.cjs.map
+deleted file mode 100644
+index 61b864629455150ac073bf6a9e5b7f6f7e9e5037..0000000000000000000000000000000000000000
+diff --git a/global.d.ts b/global.d.ts
+new file mode 100644
+index 0000000000000000000000000000000000000000..f94ae8cdc4fe7400e1e7f5ad7f5cb7a1170519f5
+--- /dev/null
++++ b/global.d.ts
+@@ -0,0 +1,21 @@
++
++declare type YType = import('@y/y').Type
++declare type AttributionManager = import('@y/y').AbstractAttributionManager
++declare type EditorState = import('prosemirror-state').EditorState
++declare type Transaction = import('prosemirror-state').Transaction
++declare type EditorView = import('prosemirror-view').EditorView
++declare type CommandDispatch = (tr: Transaction) => void
++
++/**
++ * Maps attributions to prosemirror marks
++ */
++declare type AttributionMapper = (format: Record | null, attribution: import('lib0/delta').Attribution) => Record | null
++/**
++ * Decides whether an attributed node renders under its `{nodeName}--attributed`
++ * variant node type. `kinds` reflects which attribution kinds are present on the
++ * node. Must be deterministic in `(nodeName, kinds)`.
++ */
++declare type AttributedNodesPredicate = (nodeName: string, kinds: { insert?: boolean, delete?: boolean, format?: boolean }) => boolean
++declare type SyncPluginState = import('lib0/schema').Unwrap
++declare type SyncPluginStateUpdate = import('lib0/schema').Unwrap
++declare type ProsemirrorDelta = import('lib0/schema').Unwrap
+diff --git a/package.json b/package.json
+index 8eaef6bf2b216933047f528e3c3b0aa469df45e7..258a3b18cc50c11181b70a716953fdb1708bf840 100644
+--- a/package.json
++++ b/package.json
+@@ -2,10 +2,7 @@
+ "name": "@y/prosemirror",
+ "version": "2.0.0-2",
+ "description": "Prosemirror bindings for Yjs",
+- "main": "./dist/y-prosemirror.cjs",
+- "module": "./src/y-prosemirror.js",
+ "type": "module",
+- "types": "./dist/src/y-prosemirror.d.ts",
+ "sideEffects": false,
+ "funding": {
+ "type": "GitHub Sponsors ❤",
+@@ -23,15 +20,16 @@
+ },
+ "exports": {
+ ".": {
+- "types": "./dist/src/y-prosemirror.d.ts",
+- "import": "./src/y-prosemirror.js",
+- "require": "./dist/y-prosemirror.cjs"
+- }
++ "types": "./dist/src/index.d.ts",
++ "default": "./src/index.js"
++ },
++ "./package.json": "./package.json"
+ },
+ "files": [
+ "dist/*",
+ "!dist/test.*",
+- "src/*"
++ "src/*",
++ "./global.d.ts"
+ ],
+ "repository": {
+ "type": "git",
+@@ -54,14 +52,14 @@
+ },
+ "homepage": "https://github.com/yjs/y-prosemirror#readme",
+ "dependencies": {
+- "lib0": "^0.2.115-6"
++ "lib0": "^1.0.0-rc.13"
+ },
+ "peerDependencies": {
+- "@y/protocols": "^1.0.6-3",
++ "@y/protocols": "^1.0.6-rc.1",
++ "@y/y": "^14.0.0-rc.17",
+ "prosemirror-model": "^1.7.1",
+ "prosemirror-state": "^1.2.3",
+- "prosemirror-view": "^1.9.10",
+- "@y/y": "^14.0.0-16"
++ "prosemirror-view": "^1.9.10"
+ },
+ "devDependencies": {
+ "@rollup/plugin-commonjs": "^28.0.8",
+diff --git a/src/commands.js b/src/commands.js
+new file mode 100644
+index 0000000000000000000000000000000000000000..6c4ff47a6cbe8a9cacc400af7755791daa8a0af1
+--- /dev/null
++++ b/src/commands.js
+@@ -0,0 +1,154 @@
++import { ySyncPluginKey, yUndoPluginKey } from './keys.js'
++import { deltaToPSteps, nodeToDelta, deltaToPNode } from './sync-utils.js'
++import * as d from 'lib0/delta'
++import * as Y from '@y/y'
++import { absolutePositionToRelativePosition } from './positions.js'
++
++/**
++ * Switch to pause mode (stop synchronization between prosemirror and ytype).
++ *
++ * @type {import('prosemirror-state').Command}
++ */
++export function pauseSync (state, dispatch) {
++ const pluginState = ySyncPluginKey.getState(state)
++ if (!pluginState) {
++ return false
++ }
++ if (dispatch) {
++ const tr = state.tr.setMeta(ySyncPluginKey, { ytype: null })
++ tr.setMeta('addToHistory', false)
++ dispatch(tr)
++ }
++ return true
++}
++
++/**
++ * Reconfigure y-prosemirror.
++ * - enable syncing to (different) ytype
++ * - pause sync (by setting ytype=null)
++ *
++ * @param {object} [opts]
++ * @param {Y.Type | null} [opts.ytype] Sync different ytype. Set to null to pause sync.
++ * @param {Y.AbstractAttributionManager | null} [opts.attributionManager] Optional attribution manager to switch to.
++ * @returns {import('prosemirror-state').Command}
++ */
++export const configureYProsemirror = (opts = {}) => (state, dispatch) => {
++ const pluginState = ySyncPluginKey.getState(state)
++ const ytype = opts.ytype
++ const attributionManager = opts.attributionManager
++ if (pluginState == null || (ytype === pluginState.ytype && attributionManager === pluginState.attributionManager)) {
++ return false
++ }
++ if (dispatch) {
++ const tr = state.tr.setMeta(ySyncPluginKey, opts)
++ tr.setMeta('addToHistory', false)
++ if (ytype) {
++ const ycontent = ytype.toDeltaDeep()
++ try {
++ const pcontent = nodeToDelta(tr.doc)
++ const diff = d.diff(pcontent.done(), ycontent.done())
++ deltaToPSteps(tr, diff)
++ } catch {
++ tr.replaceWith(0, tr.doc.content.size, deltaToPNode(ycontent, tr.doc.type.schema, null))
++ }
++ }
++ dispatch(tr)
++ }
++ return true
++}
++
++/**
++ * Undo the last user action
++ *
++ * @param {import('prosemirror-state').EditorState} state
++ * @return {boolean} whether a change was undone
++ */
++export const undo = state => yUndoPluginKey.getState(state)?.undoManager?.undo() != null
++
++/**
++ * Redo the last user action
++ *
++ * @param {import('prosemirror-state').EditorState} state
++ * @return {boolean} whether a change was redone
++ */
++export const redo = state => yUndoPluginKey.getState(state)?.undoManager?.redo() != null
++
++/**
++ * @type {import('prosemirror-state').Command}
++ */
++export const undoCommand = (state, dispatch) => dispatch == null ? (yUndoPluginKey.getState(state)?.undoManager?.canUndo() || false) : undo(state)
++
++/**
++ * @type {import('prosemirror-state').Command}
++ */
++export const redoCommand = (state, dispatch) => dispatch == null ? (yUndoPluginKey.getState(state)?.undoManager?.canRedo() || false) : redo(state)
++
++/**
++ * Reject changes between start and end
++ * @param {number} start
++ * @param {number} [end]
++ * @returns {import('prosemirror-state').Command}
++ */
++export const rejectChanges = (start, end = start) => (state, dispatch) => {
++ const pluginState = ySyncPluginKey.getState(state)
++ if (!pluginState?.ytype || !(pluginState?.attributionManager instanceof Y.DiffAttributionManager)) {
++ return false
++ }
++ if (dispatch) {
++ const relStart = absolutePositionToRelativePosition(state.doc.resolve(start), pluginState.ytype, pluginState.attributionManager)
++ const relEnd = absolutePositionToRelativePosition(state.doc.resolve(end), pluginState.ytype, pluginState.attributionManager)
++
++ pluginState.attributionManager.rejectChanges(relStart.item, relEnd.item)
++ }
++ return true
++}
++
++/**
++ * Accept changes between start and end
++ * @param {number} start
++ * @param {number} [end]
++ * @returns {import('prosemirror-state').Command}
++ */
++export const acceptChanges = (start, end = start) => (state, dispatch) => {
++ const pluginState = ySyncPluginKey.getState(state)
++ if (!pluginState?.ytype || !(pluginState?.attributionManager instanceof Y.DiffAttributionManager)) {
++ return false
++ }
++ if (dispatch) {
++ const relStart = absolutePositionToRelativePosition(state.doc.resolve(start), pluginState.ytype, pluginState.attributionManager)
++ const relEnd = absolutePositionToRelativePosition(state.doc.resolve(end), pluginState.ytype, pluginState.attributionManager)
++
++ pluginState.attributionManager.acceptChanges(relStart.item, relEnd.item)
++ }
++ return true
++}
++
++/**
++ * Accept all changes
++ * @returns {import('prosemirror-state').Command}
++ */
++export const acceptAllChanges = () => (state, dispatch) => {
++ const pluginState = ySyncPluginKey.getState(state)
++ if (!pluginState?.ytype || !(pluginState?.attributionManager instanceof Y.DiffAttributionManager)) {
++ return false
++ }
++ if (dispatch) {
++ pluginState.attributionManager.acceptAllChanges()
++ }
++ return true
++}
++
++/**
++ * Reject all changes
++ * @returns {import('prosemirror-state').Command}
++ */
++export const rejectAllChanges = () => (state, dispatch) => {
++ const pluginState = ySyncPluginKey.getState(state)
++ if (!pluginState?.ytype || !(pluginState?.attributionManager instanceof Y.DiffAttributionManager)) {
++ return false
++ }
++ if (dispatch) {
++ pluginState.attributionManager.rejectAllChanges()
++ }
++ return true
++}
+diff --git a/src/cursor-plugin.js b/src/cursor-plugin.js
+new file mode 100644
+index 0000000000000000000000000000000000000000..79fa8f273361c11282e2c2df76c3889547986606
+--- /dev/null
++++ b/src/cursor-plugin.js
+@@ -0,0 +1,343 @@
++import * as Y from '@y/y'
++import { Decoration, DecorationSet } from 'prosemirror-view'
++import { Plugin } from 'prosemirror-state'
++import {
++ absolutePositionToRelativePosition,
++ relativePositionToAbsolutePosition
++} from './positions.js'
++import { yCursorPluginKey, ySyncPluginKey } from './keys.js'
++
++import * as math from 'lib0/math'
++import { $syncPluginStateUpdate } from './sync-plugin.js'
++
++/**
++ * @typedef {Object} User
++ * @property {string} [name] The label to display for the user
++ * @property {string} [color] The color to display for the user
++ */
++
++/**
++ * @callback AwarenessFilter
++ * @param {number} currentClientId
++ * @param {number} userClientId
++ * @param {Record} awarenessState
++ * @returns {boolean} true if the cursor should be rendered for the given client
++ */
++
++/**
++ * Default generator for a cursor element
++ *
++ * @param {User} user user data
++ * @return {HTMLElement}
++ */
++export const defaultCursorBuilder = (user) => {
++ const cursor = document.createElement('span')
++ cursor.classList.add('ProseMirror-yjs-cursor')
++ if (user.color) {
++ cursor.style.setProperty('--user-color', user.color)
++ }
++ const userDiv = document.createElement('div')
++ if (user.color) {
++ userDiv.style.setProperty('--user-color', user.color)
++ }
++ userDiv.insertBefore(document.createTextNode(user.name || ''), null)
++ const nonbreakingSpace1 = document.createTextNode('\u2060')
++ const nonbreakingSpace2 = document.createTextNode('\u2060')
++ cursor.insertBefore(nonbreakingSpace1, null)
++ cursor.insertBefore(userDiv, null)
++ cursor.insertBefore(nonbreakingSpace2, null)
++ return cursor
++}
++
++/**
++ * Default generator for the selection attributes
++ *
++ * @param {User} user user data
++ * @return {import('prosemirror-view').DecorationAttrs}
++ */
++export const defaultSelectionBuilder = (user) => {
++ return {
++ style: `--user-color: ${user.color}`,
++ class: 'ProseMirror-yjs-selection'
++ }
++}
++
++/**
++ * @param {import('prosemirror-state').EditorState} state
++ * @param {import('@y/protocols/awareness').Awareness} awareness
++ * @param {AwarenessFilter} awarenessFilter
++ * @param {(user: User, clientId: number) => Element} createCursor
++ * @param {(user: User, clientId: number) => import('prosemirror-view').DecorationAttrs} createSelection
++ * @param {string} cursorStateField
++ * @param {{ytype: Y.Type | null, attributionManager: Y.AbstractAttributionManager | null} | undefined} ystate
++ * @return {DecorationSet}
++ */
++export const createDecorations = (
++ state,
++ awareness,
++ awarenessFilter,
++ createCursor,
++ createSelection,
++ cursorStateField,
++ ystate
++) => {
++ const type = ystate?.ytype
++ const doc = type?.doc
++ if (!type || !doc) {
++ // do not render cursors while snapshot is active
++ return DecorationSet.empty
++ }
++ const maxsize = math.max(state.doc.content.size - 1, 0)
++ /**
++ * @type {Decoration[]}
++ */
++ const decorations = []
++ awareness.getStates().forEach((aw, clientId) => {
++ const cursor = aw[cursorStateField]
++
++ if (cursor == null || !awarenessFilter(awareness.clientID, clientId, aw)) {
++ return
++ }
++
++ const user = aw.user || {}
++ if (user.color == null) {
++ user.color = '#ffa500'
++ }
++ if (user.name == null) {
++ user.name = `User: ${clientId}`
++ }
++ let anchor = relativePositionToAbsolutePosition(
++ Y.createRelativePositionFromJSON(cursor.anchor),
++ type,
++ state.doc,
++ ystate.attributionManager
++ )
++ let head = relativePositionToAbsolutePosition(
++ Y.createRelativePositionFromJSON(cursor.head),
++ type,
++ state.doc,
++ ystate.attributionManager
++ )
++ if (anchor !== null && head !== null) {
++ anchor = math.min(anchor, maxsize)
++ head = math.min(head, maxsize)
++ decorations.push(
++ Decoration.widget(head, () => createCursor(user, clientId), {
++ key: clientId + '',
++ side: 10
++ })
++ )
++ decorations.push(
++ Decoration.inline(math.min(anchor, head), math.max(anchor, head), createSelection(user, clientId), {
++ inclusiveEnd: true,
++ inclusiveStart: false
++ })
++ )
++ }
++ })
++ return DecorationSet.create(state.doc, decorations)
++}
++
++/**
++ * @callback ResolveLocalCursorStateCallback
++ * @param {object} ctx - The context object
++ * @param {import('prosemirror-view').EditorView} ctx.view - The editor view
++ * @param {{anchor: Y.RelativePosition, head: Y.RelativePosition} | null} ctx.prevState - The previous local cursor state currently published in awareness for this client (decoded to Y.RelativePosition), or null if not set
++ * @param {{anchor: Y.RelativePosition, head: Y.RelativePosition} | null} ctx.nextState - The candidate next cursor state, freshly derived from the editor's current selection (not yet published to awareness), or null if no Y type is bound
++ * @param {boolean} ctx.isOwnState - Whether `prevState` resolves inside this editor binding's bound type (i.e. this binding is the source of truth for the published cursor state)
++ * @param {'update' | 'focus' | 'blur'} ctx.reason - What triggered this invocation: 'update' (PM view.update tick), 'focus' (focusin on view.dom; only fires when no `setSelection` transaction is pending — see `selectionUpdateIsPending` in cursor-plugin.js), or 'blur' (focusout on view.dom)
++ * @returns {{anchor: Y.RelativePosition, head: Y.RelativePosition} | null} The next local cursor state to publish under `cursorStateField` in awareness, or null to clear it
++ */
++
++/**
++ * A prosemirror plugin that listens to awareness information on Yjs.
++ * This requires that a `prosemirrorPlugin` is also bound to the prosemirror.
++ *
++ * @public
++ * @param {import('@y/protocols/awareness').Awareness} awareness
++ * @param {object} opts
++ * @param {AwarenessFilter} [opts.awarenessStateFilter] A function that filters the awareness states to be rendered
++ * @param {(user: User, clientId: number) => HTMLElement} [opts.cursorBuilder] A function that creates a cursor element
++ * @param {(user: User, clientId: number) => import('prosemirror-view').DecorationAttrs} [opts.selectionBuilder] A function that creates a selection decoration
++ * @param {ResolveLocalCursorStateCallback} [opts.resolveLocalCursorState] A policy that decides which cursor state to publish to awareness given the previously-published state, the state derived from the current selection, and what triggered the update
++ * @param {string} [opts.cursorStateField = 'cursor'] By default all editor bindings use the awareness 'cursor' field to propagate cursor information, this allows you to use a different field name
++ * @return {Plugin}
++ */
++export const yCursorPlugin = (
++ awareness,
++ {
++ awarenessStateFilter = (currentClientId, userClientId) => currentClientId !== userClientId,
++ cursorBuilder = defaultCursorBuilder,
++ selectionBuilder = defaultSelectionBuilder,
++ cursorStateField = 'cursor',
++ resolveLocalCursorState = (ctx) => {
++ if (ctx.view.hasFocus()) {
++ return ctx.nextState
++ }
++ // clear the published cursor state if this binding owns it,
++ // otherwise leave the previously-published state in place
++ return ctx.isOwnState ? null : ctx.prevState
++ }
++ } = {}
++) =>
++ new Plugin({
++ key: yCursorPluginKey,
++ state: {
++ init (_, state) {
++ return createDecorations(
++ state,
++ awareness,
++ awarenessStateFilter,
++ cursorBuilder,
++ selectionBuilder,
++ cursorStateField,
++ undefined
++ )
++ },
++ apply (tr, prevState, oldState, newState) {
++ const ySyncMeta = $syncPluginStateUpdate.nullable.expect(tr.getMeta(ySyncPluginKey) || null)
++ const ySyncTransaction = tr.getMeta('y-sync-transaction')
++ const yCursorMeta = tr.getMeta(yCursorPluginKey)
++
++ if (ySyncMeta || ySyncTransaction || yCursorMeta?.awarenessUpdated) {
++ // PM fills `newState` plugin fields in field order during apply, so
++ // `ySyncPluginKey.getState(newState)` may return null if this plugin
++ // runs before the sync plugin (which can happen when the host
++ // editor — e.g., Tiptap/BlockNote — orders plugins by name or
++ // priority). Read the sync state from `oldState` (fully populated)
++ // and overlay the in-flight update from this transaction's meta, if
++ // any, so we still see the new ytype the moment configureYProsemirror
++ // is dispatched.
++ const baseSync = ySyncPluginKey.getState(oldState) || ySyncPluginKey.getState(newState)
++ const syncState = ySyncMeta ? Object.assign({}, baseSync, ySyncMeta) : baseSync
++ return createDecorations(
++ newState,
++ awareness,
++ awarenessStateFilter,
++ cursorBuilder,
++ selectionBuilder,
++ cursorStateField,
++ syncState
++ )
++ }
++ // remap decorations
++ return prevState.map(tr.mapping, tr.doc)
++ }
++ },
++ props: {
++ decorations: (state) => yCursorPluginKey.getState(state)
++ },
++ view: (view) => {
++ const awarenessListener = () => {
++ if (view.isDestroyed) {
++ return
++ }
++ view.dispatch(view.state.tr.setMeta(yCursorPluginKey, { awarenessUpdated: true }))
++ }
++
++ /**
++ * @param {'update' | 'focus' | 'blur'} reason
++ */
++ const updateCursorInfo = (reason) => {
++ if (view.isDestroyed) {
++ return
++ }
++ const ystate = ySyncPluginKey.getState(view.state)
++ const rawCursor = (awareness.getLocalState() || {})[cursorStateField]
++ /**
++ * @type {{anchor: Y.RelativePosition, head: Y.RelativePosition} | null}
++ */
++ const prevState = rawCursor != null
++ ? {
++ anchor: Y.createRelativePositionFromJSON(rawCursor.anchor),
++ head: Y.createRelativePositionFromJSON(rawCursor.head)
++ }
++ : null
++
++ // Belt-and-braces around the PM->Y position encoding. positions.js
++ // already falls back to a doc-root relative position on traversal
++ // failure, but anything else throwing here (DOM-change-time selection
++ // resolution, AM internals) would bubble up through dispatch and
++ // tear the editor down on every keystroke - just skip the awareness
++ // update in that case.
++ /** @type {{anchor: Y.RelativePosition, head: Y.RelativePosition} | null} */
++ let nextState = null
++ if (ystate?.ytype) {
++ try {
++ nextState = {
++ anchor: absolutePositionToRelativePosition(
++ view.state.selection.$anchor,
++ ystate.ytype,
++ ystate.attributionManager
++ ),
++ head: absolutePositionToRelativePosition(
++ view.state.selection.$head,
++ ystate.ytype,
++ ystate.attributionManager
++ )
++ }
++ } catch (err) {
++ console.warn('y-prosemirror cursor-plugin: failed to encode selection, skipping awareness update', err)
++ return
++ }
++ }
++ const resolvedState = resolveLocalCursorState({
++ view,
++ prevState,
++ nextState,
++ reason,
++ get isOwnState () {
++ return prevState != null && ystate?.ytype != null && relativePositionToAbsolutePosition(
++ prevState.anchor,
++ ystate.ytype,
++ view.state.doc,
++ ystate.attributionManager
++ ) !== null
++ }
++ })
++
++ // compute whether the published cursor state has changed
++ const cursorChanged = (prevState == null) !== (resolvedState == null) || (
++ prevState != null && resolvedState != null && (
++ !Y.compareRelativePositions(prevState.anchor, resolvedState.anchor) ||
++ !Y.compareRelativePositions(prevState.head, resolvedState.head)
++ )
++ )
++
++ if (cursorChanged) {
++ awareness.setLocalStateField(cursorStateField, resolvedState)
++ }
++ }
++
++ const onFocusIn = () => {
++ if (view.isDestroyed) return
++ // This fixes an issue where focusin is called before the selection is updated
++ // This allows us to bail out if the selection will change immediately after focusin
++ // This allows us to skip a flicker of setting the cursor, just to change it to the correct position
++ /** @type {Selection | null} */
++ const sel = (/** @type {any} */ (view.root)).getSelection()
++ if (sel && sel.rangeCount > 0 && sel.anchorNode) {
++ try {
++ if (view.posAtDOM(sel.anchorNode, sel.anchorOffset, -1) !== view.state.selection.anchor) {
++ return
++ }
++ } catch { /* posAtDOM failed; re-evaluate the cursor */ }
++ }
++ updateCursorInfo('focus')
++ }
++ const onFocusOut = () => updateCursorInfo('blur')
++
++ awareness.on('change', awarenessListener)
++ view.dom.addEventListener('focusin', onFocusIn)
++ view.dom.addEventListener('focusout', onFocusOut)
++
++ return {
++ update: () => updateCursorInfo('update'),
++ destroy: () => {
++ view.dom.removeEventListener('focusin', onFocusIn)
++ view.dom.removeEventListener('focusout', onFocusOut)
++ awareness.off('change', awarenessListener)
++ }
++ }
++ }
++ })
+diff --git a/src/diff-decorations.js b/src/diff-decorations.js
+new file mode 100644
+index 0000000000000000000000000000000000000000..a6e6d6b271242dc7d7dbe9bdc814c10447880db4
+--- /dev/null
++++ b/src/diff-decorations.js
+@@ -0,0 +1,256 @@
++/**
++ * Render a `DiffSet` as ProseMirror decorations over the *displayed* (final)
++ * document. The document is never mutated.
++ *
++ * - inline-insert / inline-update -> Decoration.inline
++ * - block-insert / block-update -> Decoration.node (per top-level node)
++ * - inline-delete / block-delete -> Decoration.widget showing the removed
++ * content, reconstructed by serializing the removed Fragment to HTML.
++ *
++ * Each decoration carries its `diff` in the decoration `spec` so future
++ * node-views / attribute-change extraction can read it back. Decorations
++ * also expose `data-diff-type` and `data-diff-user-id` attributes for CSS.
++ */
++import { Decoration, DecorationSet } from 'prosemirror-view'
++import { Plugin } from 'prosemirror-state'
++import { DOMSerializer, Fragment } from 'prosemirror-model'
++import { suggestionDiffPluginKey } from './keys.js'
++
++/**
++ * @typedef {import('./y-attribution-to-diffset.js').Diff} Diff
++ * @typedef {import('./y-attribution-to-diffset.js').DiffSet} DiffSet
++ * @typedef {import('./y-attribution-to-diffset.js').DiffType} DiffType
++ * @typedef {import('./y-attribution-to-diffset.js').Attribution} Attribution
++ */
++
++/**
++ * Arguments passed to a `mapDiffToDecorations` callback.
++ *
++ * @typedef {{
++ * diff: Diff,
++ * doc: import('prosemirror-model').Node,
++ * schema: import('prosemirror-model').Schema,
++ * index: number,
++ * color?: string,
++ * attributes?: import('prosemirror-view').DecorationAttrs,
++ * defaultMapDiffToDecorations?: MapDiffToDecorations
++ * }} MapDiffArgs
++ */
++
++/**
++ * Callback that converts a single `Diff` to decoration(s).
++ * Return a `Decoration`, an array of them, or `null` to skip.
++ *
++ * @callback MapDiffToDecorations
++ * @param {MapDiffArgs} args
++ * @returns {import('prosemirror-view').Decoration | import('prosemirror-view').Decoration[] | null}
++ */
++
++/**
++ * Options shared by `buildDiffDecorationSet` and `ySuggestionDecorationPlugin`.
++ *
++ * @typedef {{
++ * colorForAuthors?: (authorIds: string[]) => (string | undefined),
++ * mapDiffToDecorations?: MapDiffToDecorations
++ * }} SuggestionDecorationOptions
++ */
++
++/**
++ * Reconstruct removed content as a non-editable DOM node by serializing the
++ * Fragment to HTML. Works for inline text and for whole block nodes alike.
++ *
++ * @param {import('prosemirror-model').Fragment} fragment
++ * @param {import('prosemirror-model').Schema} schema
++ * @param {{ authorIds?: string[], color?: string, title?: string }} [opts]
++ * @returns {HTMLElement}
++ */
++export const renderDeletedContent = (fragment, schema, opts = {}) => {
++ const serializer = DOMSerializer.fromSchema(schema)
++ const isBlock = fragment?.firstChild?.isBlock ?? false
++ const container = document.createElement(isBlock ? 'div' : 'span')
++ container.className = 'pm-suggest pm-suggest--delete'
++ container.setAttribute('data-diff-type', isBlock ? 'block-delete' : 'inline-delete')
++ if (opts.authorIds?.length) {
++ container.setAttribute('data-diff-user-id', opts.authorIds.join(','))
++ }
++ if (opts.color) {
++ container.style.setProperty('--author-color', opts.color)
++ }
++ if (opts.title) {
++ container.setAttribute('title', opts.title)
++ }
++ container.contentEditable = 'false'
++ if (fragment) {
++ container.appendChild(serializer.serializeFragment(fragment, { document }))
++ }
++ return container
++}
++
++/**
++ * Build a human-readable hover title from diff attribution.
++ *
++ * @param {Diff} diff
++ * @returns {string}
++ */
++const hoverTitle = (diff) => {
++ const parts = []
++ const authorIds = diff.attribution.authorIds
++ if (authorIds.length) {
++ parts.push(authorIds.join(', '))
++ }
++ if (diff.attribution.timestamp) {
++ parts.push(new Date(diff.attribution.timestamp).toLocaleString())
++ }
++ const typeLabel = diff.type.replace('-', ' ')
++ if (parts.length) return `${typeLabel}: ${parts.join(' — ')}`
++ return typeLabel
++}
++
++/**
++ * Build a summary string for a block-update diff showing what changed
++ * (e.g. "level: 1 → 2").
++ *
++ * @param {Diff} diff
++ * @returns {string}
++ */
++const blockUpdateSummary = (diff) => {
++ if (diff.type !== 'block-update') return ''
++ const attrs = diff.attributes
++ const prev = diff.previousAttributes
++ if (!attrs) return ''
++ const parts = []
++ for (const key of Object.keys(attrs)) {
++ const newVal = attrs[key]
++ const oldVal = prev?.[key]
++ if (oldVal !== undefined && oldVal !== newVal) {
++ parts.push(`${key}: ${oldVal} → ${newVal}`)
++ } else {
++ parts.push(`${key}: ${newVal}`)
++ }
++ }
++ return parts.join(', ')
++}
++
++/**
++ * @param {Diff} diff
++ * @param {{ authorIds: string[], color?: string }} ctx
++ * @returns {import('prosemirror-view').DecorationAttrs}
++ */
++const decorationAttrs = (diff, { authorIds, color }) => {
++ /** @type {import('prosemirror-view').DecorationAttrs} */
++ const attrs = {
++ class: `pm-suggest pm-suggest--${diff.type}`,
++ 'data-diff-type': diff.type
++ }
++ if (authorIds.length) attrs['data-diff-user-id'] = authorIds.join(',')
++ if (color) attrs.style = `--author-color: ${color}`
++ // Hover metadata: show author(s), timestamp, and attribute changes
++ let title = hoverTitle(diff)
++ const summary = blockUpdateSummary(diff)
++ if (summary) title += ` (${summary})`
++ attrs.title = title
++ return attrs
++}
++
++/**
++ * Default mapping from a single `Diff` to decoration(s). Returns a `Decoration`,
++ * an array of them, or `null` to skip.
++ *
++ * @type {MapDiffToDecorations}
++ */
++export const defaultMapDiffToDecorations = ({ diff, doc, schema, index, color, attributes = {} }) => {
++ const authorIds = diff.attribution.authorIds
++ const attrs = { ...decorationAttrs(diff, { authorIds, color }), ...attributes }
++ const spec = { diff }
++
++ switch (diff.type) {
++ case 'inline-insert':
++ case 'inline-update':
++ return Decoration.inline(diff.from, diff.to, attrs, { ...spec, inclusiveStart: false, inclusiveEnd: true })
++
++ case 'block-update':
++ return Decoration.node(diff.from, diff.to, attrs, spec)
++
++ case 'block-insert': {
++ const $from = doc.resolve(diff.from)
++ const after = $from.nodeAfter
++ if (after && diff.from + after.nodeSize === diff.to) {
++ return Decoration.node(diff.from, diff.to, attrs, spec)
++ }
++ /** @type {Decoration[]} */
++ const decos = []
++ doc.nodesBetween(diff.from, diff.to, (node, pos) => {
++ if (pos >= diff.from && pos + node.nodeSize <= diff.to && node.isBlock) {
++ decos.push(Decoration.node(pos, pos + node.nodeSize, attrs, spec))
++ return false
++ }
++ return undefined
++ })
++ if (!decos.length) {
++ decos.push(Decoration.inline(diff.from, diff.to, attrs, spec))
++ }
++ return decos
++ }
++
++ case 'inline-delete':
++ case 'block-delete':
++ return Decoration.widget(
++ diff.from,
++ () => renderDeletedContent(diff.content ?? Fragment.empty, schema, { authorIds, color, title: hoverTitle(diff) }),
++ { side: 1, key: `diff-del-${index}-${diff.content?.size ?? 0}`, diff }
++ )
++
++ default:
++ return null
++ }
++}
++
++/**
++ * Build a `DecorationSet` for `diffs` over `doc`. Pure - does not touch the doc.
++ *
++ * @param {import('prosemirror-model').Node} doc
++ * @param {DiffSet} diffs
++ * @param {import('prosemirror-model').Schema} schema
++ * @param {SuggestionDecorationOptions} [opts]
++ * @returns {DecorationSet}
++ */
++export const buildDiffDecorationSet = (doc, diffs, schema, opts = {}) => {
++ const map = opts.mapDiffToDecorations ?? defaultMapDiffToDecorations
++ /** @type {Decoration[]} */
++ const decorations = []
++ diffs.forEach((diff, index) => {
++ const color = opts.colorForAuthors?.(diff.attribution.authorIds)
++ const result = map({ diff, doc, schema, index, color, defaultMapDiffToDecorations })
++ if (Array.isArray(result)) decorations.push(...result.filter(Boolean))
++ else if (result) decorations.push(result)
++ })
++ return DecorationSet.create(doc, decorations)
++}
++
++/**
++ * ProseMirror plugin that overlays a `DiffSet` as decorations.
++ *
++ * Update the diffs at runtime by dispatching
++ * `tr.setMeta(suggestionDiffPluginKey, { diffs })`.
++ *
++ * @param {SuggestionDecorationOptions & { diffs?: DiffSet }} [config]
++ * @returns {Plugin}
++ */
++export const suggestionDiffPlugin = ({ diffs = [], mapDiffToDecorations, colorForAuthors } = {}) =>
++ new Plugin({
++ key: suggestionDiffPluginKey,
++ state: {
++ init: (_config, state) =>
++ buildDiffDecorationSet(state.doc, diffs, state.schema, { mapDiffToDecorations, colorForAuthors }),
++ apply: (tr, prev, _old, newState) => {
++ const meta = tr.getMeta(suggestionDiffPluginKey)
++ if (meta?.diffs) {
++ return buildDiffDecorationSet(newState.doc, meta.diffs, newState.schema, { mapDiffToDecorations, colorForAuthors })
++ }
++ return prev.map(tr.mapping, tr.doc)
++ }
++ },
++ props: {
++ decorations: (state) => suggestionDiffPluginKey.getState(state)
++ }
++ })
+diff --git a/src/editable-deletion.js b/src/editable-deletion.js
+new file mode 100644
+index 0000000000000000000000000000000000000000..406531db8e420f34c052e5a21c75fe58a09d525d
+--- /dev/null
++++ b/src/editable-deletion.js
+@@ -0,0 +1,818 @@
++/**
++ * Editable deleted content via nested sub-editors (the ProseMirror footnote
++ * pattern: https://prosemirror.net/examples/footnote/).
++ *
++ * The decoration overlay normally renders deleted content as a *read-only*
++ * ghost (see `renderDeletedContent` in diff-decorations.js). This module
++ * renders it instead as a widget decoration whose DOM hosts its own small
++ * `EditorView` — a self-contained "sub-editor" — so the user can click into a
++ * deletion and edit the removed text directly.
++ *
++ * This is a proof of concept. Scope intentionally excluded:
++ * - syncing sub-editor edits back into Yjs (the sub-editor is isolated)
++ * - undo/redo integration with the host editor's history
++ * - rich block structure inside the sub-editor (everything becomes paragraphs)
++ *
++ * How it works (mirroring the footnote example):
++ * - A widget decoration's DOM is the mount point for a nested `EditorView`.
++ * - `stopEvent: () => true` tells the *outer* view to ignore every event that
++ * originates inside the widget, so the nested view handles its own input.
++ * - `ignoreSelection: true` keeps the outer view from trying to read or place
++ * a selection inside the sub-editor.
++ * - A stable `key` (derived from the deleted content, not the array index)
++ * lets ProseMirror reuse the existing widget DOM across decoration
++ * rebuilds, so the nested view — and its focus/selection/edit state —
++ * survives the periodic `y-sync-transaction` recompute.
++ * - `destroy` tears the nested view down when the deletion finally goes away
++ * (e.g. the change is accepted or rejected).
++ *
++ * Arrow-key navigation across the widget boundary:
++ * - The host editor (via `handleEditableDeletionArrow`, wired into
++ * `ySuggestionDecorationPlugin`'s `handleKeyDown`) intercepts ArrowRight
++ * when the caret sits immediately left of a deletion widget and ArrowLeft
++ * when it sits immediately right of one, and moves focus *into* the
++ * sub-editor (at its start / end respectively) — so the ghost behaves like
++ * ordinary text instead of being invisible to cursor motion.
++ * - The sub-editor's own keymap does the reverse: ArrowLeft at its start /
++ * ArrowRight at its end exits back into the host editor at the position
++ * just before / after the widget.
++ * - Inline ghosts are zero-width: both visual sides map to the same doc
++ * position. The widget is created with `relaxedSide: true` so a DOM
++ * selection placed on its right side sticks, and the handlers track the
++ * caret's *visual* side (live DOM selection, with a placement flag as
++ * fallback for non-layout environments) to decide whether an arrow press
++ * enters the ghost or moves past it. Crossing the ghost is one visual
++ * slot per press, like real text.
++ *
++ * Typing at the widget boundary (cursor-side-aware insertion):
++ * - The attributed delta orders a deletion *before* an insertion recorded at
++ * the same position, so by default text typed at a ghost's position
++ * renders to its right — even when the caret was on its left. Both
++ * orderings produce the same documents, so the anchor choice belongs to
++ * the rendering layer.
++ * - `handleEditableDeletionTextInput` (wired into the suggestion plugin's
++ * `handleTextInput`) records the caret's visual side when text is typed
++ * at a ghost's position, accumulating an *anchor offset* per ghost: how
++ * many characters of the adjacent attributed insert run belong to the
++ * ghost's left. `applyGhostAnchorOffsets` re-applies that preference on
++ * every decoration rebuild, so text typed with the caret left of the
++ * ghost stays on its left and text typed on its right stays on its right.
++ */
++import { Decoration, EditorView } from 'prosemirror-view'
++import { EditorState, Selection } from 'prosemirror-state'
++import { Schema, Fragment } from 'prosemirror-model'
++import { keymap } from 'prosemirror-keymap'
++import { baseKeymap } from 'prosemirror-commands'
++import { defaultMapDiffToDecorations } from './diff-decorations.js'
++import { ySuggestionDecorationPluginKey, ySyncPluginKey, suggestionDiffPluginKey } from './keys.js'
++
++/**
++ * @typedef {import('./y-attribution-to-diffset.js').Diff} Diff
++ * @typedef {import('./diff-decorations.js').MapDiffArgs} MapDiffArgs
++ */
++
++/**
++ * The structural shape of a deletion, deciding which element the sub-editor
++ * mounts on and which minimal inner schema it uses, so the widget DOM stays
++ * *valid* in its surrounding context (a `
` between table rows, a `
`
++ * between cells, a true inline `` mid-text).
++ *
++ * @typedef {'inline' | 'block' | 'row' | 'cell'} DeletionShape
++ */
++
++/**
++ * Detect the shape of a deleted fragment. Table detection rides on the
++ * prosemirror-tables `tableRole` node-spec convention (used by BlockNote and
++ * most table schemas), so no schema-specific node names are required.
++ *
++ * @param {Fragment} fragment
++ * @returns {DeletionShape}
++ */
++const detectShape = (fragment) => {
++ const first = fragment.firstChild
++ if (!first || !first.isBlock) return 'inline'
++ const role = first.type.spec.tableRole
++ if (role === 'row') return 'row'
++ if (role === 'cell' || role === 'header_cell') return 'cell'
++ return 'block'
++}
++
++/** @type {Record} */
++const shapeTag = { inline: 'span', block: 'div', row: 'tr', cell: 'td' }
++
++/**
++ * Cache of derived inner schemas, keyed by host schema. The sub-editor uses
++ * deliberately tiny schemas so it never has to satisfy the host's (possibly
++ * deeply nested) content model — only the host's *marks* are reused, so
++ * bold/italic/etc. in deleted text survive by name.
++ *
++ * Two variants exist per host schema: an inline one (doc holds inline
++ * content directly, mounted on a ``) and a block one (doc >
++ * paragraph+) shared by block ghosts, cell ghosts and the per-cell editors
++ * of row ghosts.
++ *
++ * @type {WeakMap>}
++ */
++const innerSchemaCache = new WeakMap()
++
++/**
++ * Build (or fetch a cached) minimal schema for the sub-editor.
++ *
++ * @param {import('prosemirror-model').Schema} hostSchema
++ * @param {DeletionShape} shape
++ * @returns {import('prosemirror-model').Schema}
++ */
++const getInnerSchema = (hostSchema, shape) => {
++ let byShape = innerSchemaCache.get(hostSchema)
++ if (!byShape) {
++ byShape = new Map()
++ innerSchemaCache.set(hostSchema, byShape)
++ }
++ const bucket = shape === 'inline' ? 'inline' : 'block'
++ const cached = byShape.get(bucket)
++ if (cached) return cached
++
++ /** @type {Object} */
++ const nodes = shape === 'inline'
++ ? {
++ doc: { content: 'inline*' },
++ text: { group: 'inline' }
++ }
++ // 'block', 'cell' and each cell-editor of a 'row' share doc > paragraph+.
++ : {
++ doc: { content: 'block+' },
++ paragraph: {
++ content: 'inline*',
++ group: 'block',
++ parseDOM: [{ tag: 'p' }],
++ toDOM: () => ['p', 0]
++ },
++ text: { group: 'inline' }
++ }
++ let schema
++ try {
++ // Reuse the host marks so deleted text keeps its formatting (the mark
++ // *names* match, which is all the rebuild below relies on).
++ schema = new Schema({ nodes, marks: hostSchema.spec.marks })
++ } catch {
++ // Some host mark specs may not survive being re-homed; fall back to plain
++ // text, which is always editable.
++ schema = new Schema({ nodes })
++ }
++ byShape.set(bucket, schema)
++ return schema
++}
++
++/**
++ * Re-create a fragment's inline content using the inner schema, mapping marks
++ * by name (dropping any the inner schema doesn't define).
++ *
++ * @param {Fragment} fragment - inline content (may contain nested blocks)
++ * @param {import('prosemirror-model').Schema} innerSchema
++ * @returns {import('prosemirror-model').Node[]}
++ */
++const inlineToInner = (fragment, innerSchema) => {
++ /** @type {import('prosemirror-model').Node[]} */
++ const out = []
++ fragment.descendants((node) => {
++ if (node.isText && node.text) {
++ const marks = node.marks
++ .map((m) => innerSchema.marks[m.type.name]?.create(m.attrs))
++ .filter(Boolean)
++ out.push(innerSchema.text(node.text, marks.length ? marks : undefined))
++ return false
++ }
++ return true
++ })
++ return out
++}
++
++/**
++ * Convert a block node's content into inner paragraphs (one per nested
++ * textblock, flattened).
++ *
++ * @param {import('prosemirror-model').Node} block
++ * @param {import('prosemirror-model').Schema} innerSchema
++ * @returns {import('prosemirror-model').Node[]}
++ */
++const blockToParagraphs = (block, innerSchema) => {
++ const paragraph = innerSchema.nodes.paragraph
++ /** @type {import('prosemirror-model').Node[]} */
++ const out = []
++ if (block.isTextblock) {
++ out.push(paragraph.create(null, inlineToInner(block.content, innerSchema)))
++ } else {
++ block.forEach((child) => out.push(...blockToParagraphs(child, innerSchema)))
++ }
++ if (out.length === 0) {
++ out.push(/** @type {import('prosemirror-model').Node} */ (paragraph.createAndFill()))
++ }
++ return out
++}
++
++/**
++ * Convert a deleted fragment into a valid document for a single sub-editor:
++ * - inline: the doc holds the inline content directly
++ * - block / cell: every (possibly nested) textblock becomes a paragraph
++ *
++ * @param {Fragment} fragment
++ * @param {import('prosemirror-model').Schema} innerSchema
++ * @param {DeletionShape} shape
++ * @returns {import('prosemirror-model').Node}
++ */
++const fragmentToInnerDoc = (fragment, innerSchema, shape) => {
++ const doc = innerSchema.nodes.doc
++ if (shape === 'inline') {
++ return doc.create(null, inlineToInner(fragment, innerSchema))
++ }
++ /** @type {import('prosemirror-model').Node[]} */
++ const paragraphs = []
++ const first = fragment.firstChild
++ if (first && first.isBlock) {
++ fragment.forEach((block) => paragraphs.push(...blockToParagraphs(block, innerSchema)))
++ } else {
++ const paragraph = innerSchema.nodes.paragraph
++ const inline = inlineToInner(fragment, innerSchema)
++ paragraphs.push(inline.length
++ ? paragraph.create(null, inline)
++ : /** @type {import('prosemirror-model').Node} */ (paragraph.createAndFill()))
++ }
++ if (paragraphs.length === 0) {
++ paragraphs.push(/** @type {import('prosemirror-model').Node} */ (innerSchema.nodes.paragraph.createAndFill()))
++ }
++ return doc.create(null, paragraphs)
++}
++
++/**
++ * One inner document per deleted table cell, in row order. Fragment children
++ * are tableRow nodes (usually one); their cells are flattened into a single
++ * sequence so a deleted row renders as one `
` of per-cell editors.
++ *
++ * @param {Fragment} fragment
++ * @param {import('prosemirror-model').Schema} innerSchema
++ * @returns {import('prosemirror-model').Node[]}
++ */
++const rowCellDocs = (fragment, innerSchema) => {
++ /** @type {import('prosemirror-model').Node[]} */
++ const docs = []
++ fragment.forEach((row) => {
++ row.forEach((cell) => {
++ docs.push(innerSchema.nodes.doc.create(null, blockToParagraphs(cell, innerSchema)))
++ })
++ })
++ if (docs.length === 0) {
++ docs.push(/** @type {import('prosemirror-model').Node} */ (innerSchema.nodes.doc.createAndFill()))
++ }
++ return docs
++}
++
++/**
++ * @param {Fragment | undefined} fragment
++ * @returns {string}
++ */
++const fragmentText = (fragment) =>
++ fragment && fragment.size ? fragment.textBetween(0, fragment.size, '\n') : ''
++
++/**
++ * A stable widget key for a deletion. Tied to the deleted content and author
++ * (not the diff's array index), so the widget DOM — and the nested EditorView
++ * inside it — is reused across decoration rebuilds instead of being torn down
++ * and re-created on every `y-sync-transaction`.
++ *
++ * @param {Diff} diff
++ * @returns {string}
++ */
++export const deletionKey = (diff) =>
++ `editable-del-${diff.type}-${diff.attribution.authorIds.join(',')}-${fragmentText(diff.content)}`
++
++/**
++ * Global registry of sub-editor entries keyed by the widget's stable key.
++ * Because ProseMirror reuses the DOM (and old WidgetViewDesc) across decoration
++ * rebuilds when keys match, the NEW decoration's spec.subEditors stays undefined.
++ * This map provides a reliable lookup path for handlers and tests that only have
++ * access to the new (current) decoration objects from the DecorationSet.
++ *
++ * Entries are added by `createDeletionDOM` and removed by the widget's `destroy`.
++ *
++ * @type {Map}
++ */
++export const subEditorsByKey = new Map()
++
++/**
++ * Sub-editor entry stored on the widget decoration's `spec.subEditors`.
++ * The arrow/text-input handlers read it directly from the spec instead of
++ * using a module-level registry, so external consumers (e.g. BlockNote) can
++ * mount their own sub-editors and have the keyboard navigation work
++ * automatically — just set `spec.subEditors` on the widget decoration.
++ *
++ * @typedef {{ views: EditorView[], container: HTMLElement }} SubEditorEntry
++ */
++
++/**
++ * Which visual side of an inline ghost the caret is on when it sits exactly
++ * at the widget's position. Both sides of a zero-width widget are the same
++ * doc position; the *rendered* side decides whether an arrow key should enter
++ * the ghost or move past it. The DOM selection is the source of truth
++ * (`caretIsAfterWidget`); this flag records the side whenever *we* place the
++ * caret, as a fallback for environments where the DOM selection is not
++ * readable (jsdom tests).
++ *
++ * Maps host view -> widget position whose right side the caret was placed on.
++ *
++ * @type {WeakMap}
++ */
++const caretAfterFlags = new WeakMap()
++
++/**
++ * Read which side of the widget the live DOM selection is on. Returns null
++ * when it cannot be determined (no selection API, selection elsewhere, or
++ * inside the widget itself).
++ *
++ * @param {EditorView} view
++ * @param {HTMLElement} container
++ * @returns {boolean | null} true = caret renders after (right of) the widget
++ */
++const caretIsAfterWidget = (view, container) => {
++ try {
++ // Chrome implements getSelection on ShadowRoot too; TS's lib.dom doesn't.
++ const root = /** @type {any} */ (view.root)
++ const sel = /** @type {globalThis.Selection | null} */ (root.getSelection ? root.getSelection() : document.getSelection())
++ const node = sel?.focusNode
++ if (!node || typeof sel.focusOffset !== 'number') return null
++ if (node === container.parentNode) {
++ const idx = Array.prototype.indexOf.call(node.childNodes, container)
++ return sel.focusOffset > idx
++ }
++ const cmp = container.compareDocumentPosition(/** @type {Node} */ (node))
++ if (cmp & 16 /* CONTAINED_BY */) return null
++ if (cmp & 4 /* FOLLOWING */) return true
++ if (cmp & 2 /* PRECEDING */) return false
++ return null
++ } catch {
++ return null
++ }
++}
++
++/**
++ * Move the DOM caret to just after the widget container, so the caret
++ * *renders* on the right side of the ghost. Requires `relaxedSide: true` on
++ * the widget, otherwise ProseMirror snaps the DOM selection back to the side
++ * implied by `side`. Returns false where the selection API is unavailable
++ * (jsdom) — callers fall back to `caretAfterFlags`.
++ *
++ * @param {EditorView} view
++ * @param {HTMLElement} container
++ * @returns {boolean}
++ */
++const placeCaretAfterWidget = (view, container) => {
++ try {
++ // Chrome implements getSelection on ShadowRoot too; TS's lib.dom doesn't.
++ const root = /** @type {any} */ (view.root)
++ const sel = /** @type {globalThis.Selection | null} */ (root.getSelection ? root.getSelection() : document.getSelection())
++ const doc = container.ownerDocument
++ if (!sel || !doc || typeof sel.removeAllRanges !== 'function') return false
++ const range = doc.createRange()
++ range.setStartAfter(container)
++ range.collapse(true)
++ sel.removeAllRanges()
++ sel.addRange(range)
++ return true
++ } catch {
++ return false
++ }
++}
++
++/**
++ * Resolve the caret's visual side relative to an inline ghost, preferring the
++ * live DOM selection and falling back to the placement flag.
++ *
++ * @param {EditorView} view
++ * @param {HTMLElement} container
++ * @param {number} widgetPos
++ * @returns {boolean} true = caret renders after (right of) the widget
++ */
++const caretRendersAfter = (view, container, widgetPos) => {
++ const domSide = caretIsAfterWidget(view, container)
++ if (domSide !== null) return domSide
++ return caretAfterFlags.get(view) === widgetPos
++}
++
++/**
++ * Move the caret into a sub-editor at its start (side > 0) or end (side < 0).
++ *
++ * @param {EditorView} view
++ * @param {number} side
++ * @returns {true}
++ */
++const focusSubEditor = (view, side) => {
++ const sel = side > 0 ? Selection.atStart(view.state.doc) : Selection.atEnd(view.state.doc)
++ view.dispatch(view.state.tr.setSelection(sel).scrollIntoView())
++ view.focus()
++ return true
++}
++
++/**
++ * Build the widget DOM for a deletion. The outermost element is a
++ * *non-editable shell* matching the deletion's structural shape
++ * (`span` / `div` / `tr` / `td`) so the widget stays valid HTML in its
++ * surrounding context — a real `
` of `
`s between table rows keeps
++ * the table's layout and CSS intact.
++ *
++ * The sub-editor mounts on an element *inside* the shell: the
++ * `contenteditable=false` shell is what makes the nested editor separately
++ * focusable at all (without that boundary the browser merges it into the
++ * host editor's editing context), and browsers additionally refuse
++ * `contenteditable` roots directly on table elements.
++ * - inline: an editable `` inside the `` shell
++ * - block: an editable `
` inside the `
` shell
++ * - cell: an editable `
` inside the `
` shell
++ * - row: one editable `
` inside each `
` of the `
` shell,
++ * with ArrowLeft/Right at a cell's edge hopping to the neighbouring
++ * cell before exiting the widget at the outer edges.
++ *
++ * @param {Diff} diff
++ * @param {import('prosemirror-model').Schema} innerSchema
++ * @param {DeletionShape} shape
++ * @param {{ color?: string, title?: string }} opts
++ * @param {string} key - the widget's stable decoration key
++ * @param {EditorView} outerView
++ * @param {() => number | undefined} getPos
++ * @param {Record} spec - the widget decoration's spec object
++ * @returns {HTMLElement}
++ */
++const createDeletionDOM = (diff, innerSchema, shape, opts, key, outerView, getPos, spec) => {
++ const container = document.createElement(shapeTag[shape])
++ container.className = 'pm-suggest pm-suggest--delete pm-suggest--editable'
++ container.setAttribute('data-diff-type', diff.type)
++ const authorIds = diff.attribution.authorIds
++ if (authorIds.length) container.setAttribute('data-diff-user-id', authorIds.join(','))
++ if (opts.color) container.style.setProperty('--author-color', opts.color)
++ if (opts.title) container.setAttribute('title', opts.title)
++
++ /**
++ * Exit the whole widget into the host editor.
++ *
++ * @param {number} bias - -1 exits before the widget, 1 after it
++ */
++ const exit = (bias) => {
++ const pos = getPos()
++ if (pos == null) return false
++ const sel = Selection.near(outerView.state.doc.resolve(pos), bias)
++ outerView.dispatch(outerView.state.tr.setSelection(sel).scrollIntoView())
++ outerView.focus()
++ if (bias > 0 && shape === 'inline') {
++ // Exiting right from an inline ghost lands on the widget's own position
++ // (there is no separate doc position to its right). Render the caret on
++ // the right side so the exit is visible, and remember the side for the
++ // next arrow press.
++ placeCaretAfterWidget(outerView, container)
++ caretAfterFlags.set(outerView, pos)
++ } else {
++ caretAfterFlags.delete(outerView)
++ }
++ return true
++ }
++
++ /** @type {EditorView[]} */
++ const views = []
++ /**
++ * Arrow commands for the view at `index`: at the doc edge, move to the
++ * neighbouring cell view, or exit the widget at the outer edges.
++ *
++ * @param {number} index
++ */
++ const edgeBindings = (index) => {
++ /** @type {import('prosemirror-state').Command} */
++ const left = (state) =>
++ state.selection.empty && state.selection.head <= Selection.atStart(state.doc).head &&
++ (index > 0 ? focusSubEditor(views[index - 1], -1) : exit(-1))
++ /** @type {import('prosemirror-state').Command} */
++ const right = (state) =>
++ state.selection.empty && state.selection.head >= Selection.atEnd(state.doc).head &&
++ (index < views.length - 1 ? focusSubEditor(views[index + 1], 1) : exit(1))
++ return { ArrowLeft: left, ArrowRight: right, ArrowUp: left, ArrowDown: right }
++ }
++
++ /**
++ * @param {HTMLElement} mount
++ * @param {import('prosemirror-model').Node} innerDoc
++ * @param {number} index
++ */
++ const addView = (mount, innerDoc, index) => {
++ views.push(new EditorView({ mount }, {
++ state: EditorState.create({
++ doc: innerDoc,
++ plugins: [keymap(edgeBindings(index)), keymap(baseKeymap)]
++ }),
++ attributes: { class: 'pm-suggest__sub-editor' }
++ }))
++ }
++
++ // The shell is the non-editable island boundary; the editor(s) inside it
++ // are separately focusable because of it.
++ container.contentEditable = 'false'
++ if (shape === 'row') {
++ rowCellDocs(diff.content ?? Fragment.empty, innerSchema).forEach((cellDoc, i) => {
++ const td = document.createElement('td')
++ container.appendChild(td)
++ const mount = document.createElement('div')
++ td.appendChild(mount)
++ addView(mount, cellDoc, i)
++ })
++ } else {
++ const mount = document.createElement(shape === 'inline' ? 'span' : 'div')
++ container.appendChild(mount)
++ addView(mount, fragmentToInnerDoc(diff.content ?? Fragment.empty, innerSchema, shape), 0)
++ }
++
++ const entry = { views, container }
++ spec.subEditors = entry
++ subEditorsByKey.set(key, entry)
++ return container
++}
++
++/**
++ * Build a widget decoration that renders a deletion as an editable sub-editor.
++ *
++ * @param {Diff} diff
++ * @param {import('prosemirror-model').Schema} schema
++ * @param {{ color?: string, title?: string }} [opts]
++ * @returns {Decoration}
++ */
++export const editableDeletionWidget = (diff, schema, opts = {}) => {
++ const shape = detectShape(diff.content ?? Fragment.empty)
++ const innerSchema = getInnerSchema(schema, shape)
++ const key = deletionKey(diff)
++ /** @type {Record} */
++ const spec = {
++ side: 1,
++ key,
++ ignoreSelection: true,
++ // Let a client-set DOM selection stay on the right side of the ghost
++ // (used when exiting right / stepping onto the ghost's right edge).
++ relaxedSide: true,
++ stopEvent: () => true,
++ destroy: () => {
++ spec.subEditors?.views?.forEach((/** @type {EditorView} */ v) => v.destroy())
++ spec.subEditors = undefined
++ subEditorsByKey.delete(key)
++ },
++ diff,
++ // Populated by createDeletionDOM when the widget is first rendered.
++ /** @type {SubEditorEntry | undefined} */
++ subEditors: undefined
++ }
++ return Decoration.widget(
++ diff.from,
++ (view, getPos) => createDeletionDOM(diff, innerSchema, shape, opts, key, view, getPos, spec),
++ spec
++ )
++}
++
++/**
++ * Find an editable-deletion widget decoration sitting exactly at `pos`.
++ *
++ * @param {import('prosemirror-view').DecorationSet} decoSet
++ * @param {number} pos
++ * @returns {import('prosemirror-view').Decoration | undefined}
++ */
++const findDeletionWidgetAt = (decoSet, pos) =>
++ decoSet.find(pos, pos).find((deco) => {
++ const type = deco.spec?.diff?.type
++ return deco.from === pos && deco.to === pos &&
++ (type === 'inline-delete' || type === 'block-delete') &&
++ typeof deco.spec?.key === 'string'
++ })
++
++/**
++ * Host-editor keydown handler that moves the caret *into* a deletion
++ * sub-editor when an arrow key crosses the widget boundary:
++ *
++ * - ArrowRight with the caret immediately left of a widget (same position
++ * for inline ghosts; end of the previous textblock for block ghosts)
++ * enters the sub-editor at its start.
++ * - ArrowLeft with the caret immediately right of a widget enters the
++ * sub-editor at its end.
++ *
++ * Wired into `ySuggestionDecorationPlugin` as its `handleKeyDown` prop; it is
++ * a no-op (returns false) unless editable-deletion widgets are mounted.
++ *
++ * @param {EditorView} view
++ * @param {KeyboardEvent} event
++ * @returns {boolean}
++ */
++export const handleEditableDeletionArrow = (view, event) => {
++ if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return false
++ if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return false
++ const sel = view.state.selection
++ if (!sel.empty) return false
++ // Works with either decoration plugin: the live Y-backed overlay or the
++ // static `suggestionDiffPlugin`.
++ const decoSet = ySuggestionDecorationPluginKey.getState(view.state) ||
++ suggestionDiffPluginKey.getState(view.state)
++ if (!decoSet) return false
++
++ /** @param {import('prosemirror-view').Decoration} widget */
++ const entryFor = (widget) => /** @type {SubEditorEntry | undefined} */ (widget.spec.subEditors) ||
++ (typeof widget.spec.key === 'string' ? subEditorsByKey.get(widget.spec.key) : undefined)
++ /**
++ * @param {import('prosemirror-view').Decoration} widget
++ * @param {1 | -1} side - 1 enters at the ghost's start, -1 at its end
++ */
++ const enter = (widget, side) => {
++ const entry = entryFor(widget)
++ if (!entry || entry.views.length === 0) return false
++ caretAfterFlags.delete(view)
++ // Entering from the left lands in the first sub-editor, from the right
++ // in the last (row ghosts hold one editor per deleted cell).
++ const innerView = side > 0 ? entry.views[0] : entry.views[entry.views.length - 1]
++ return focusSubEditor(innerView, side)
++ }
++
++ const $head = sel.$head
++ const head = $head.pos
++
++ if (event.key === 'ArrowRight') {
++ const widget = findDeletionWidgetAt(decoSet, head)
++ if (widget && widget.spec.diff.type === 'inline-delete') {
++ const entry = entryFor(widget)
++ if (!entry) return false
++ if (caretRendersAfter(view, entry.container, widget.from)) {
++ // Caret already renders right of the ghost — let the default motion
++ // continue past it.
++ caretAfterFlags.delete(view)
++ return false
++ }
++ return enter(widget, 1)
++ }
++ if (widget) return enter(widget, 1)
++ // Block ghost past the end of the current textblock. The widget may sit
++ // several closing tokens away when the boundary crosses nested nodes
++ // (e.g. paragraph -> cell -> row in a table), so walk up the depth chain
++ // as long as only closing tokens separate the caret from the boundary...
++ let boundary = -1
++ for (let d = $head.depth; d >= 1; d--) {
++ const after = $head.after(d)
++ if (after !== head + ($head.depth - d + 1)) break
++ const blockWidget = findDeletionWidgetAt(decoSet, after)
++ if (blockWidget) return enter(blockWidget, 1)
++ boundary = after
++ }
++ // ...and then descend into the *following* node's leading edge (e.g. a
++ // deleted first row sits inside the table, just past its opening token).
++ if (boundary >= 0) {
++ let q = boundary
++ let next = view.state.doc.resolve(q).nodeAfter
++ while (next && next.isBlock && !next.isTextblock) {
++ q += 1
++ const blockWidget = findDeletionWidgetAt(decoSet, q)
++ if (blockWidget) return enter(blockWidget, 1)
++ next = view.state.doc.resolve(q).nodeAfter
++ }
++ }
++ return false
++ }
++
++ // ArrowLeft.
++ const widgetHere = findDeletionWidgetAt(decoSet, head)
++ if (widgetHere && widgetHere.spec.diff.type === 'inline-delete') {
++ const entry = entryFor(widgetHere)
++ if (entry && caretRendersAfter(view, entry.container, widgetHere.from)) {
++ // Caret renders right of the ghost — step into it at its end.
++ return enter(widgetHere, -1)
++ }
++ // Caret renders left of the ghost — default motion continues leftwards.
++ }
++ const widget = findDeletionWidgetAt(decoSet, head - 1)
++ if (widget && widget.spec.diff.type === 'inline-delete') {
++ // Step onto the ghost's right edge first (one visual slot per press,
++ // like real text); the next ArrowLeft enters the ghost at its end.
++ const entry = entryFor(widget)
++ if (!entry) return false
++ const target = Selection.near(view.state.doc.resolve(widget.from), -1)
++ view.dispatch(view.state.tr.setSelection(target).scrollIntoView())
++ placeCaretAfterWidget(view, entry.container)
++ caretAfterFlags.set(view, widget.from)
++ return true
++ }
++ // Block ghost at the boundary before this textblock — possibly several
++ // opening tokens back when the boundary crosses nested nodes (tables)...
++ let boundary = -1
++ for (let d = $head.depth; d >= 1; d--) {
++ const before = $head.before(d)
++ if (before !== head - ($head.depth - d + 1)) break
++ const blockWidget = findDeletionWidgetAt(decoSet, before)
++ if (blockWidget) return enter(blockWidget, -1)
++ boundary = before
++ }
++ // ...and then descend into the *preceding* node's trailing edge (e.g. a
++ // deleted last row sits inside the table, just before its closing token).
++ if (boundary >= 0) {
++ let q = boundary
++ let prev = view.state.doc.resolve(q).nodeBefore
++ while (prev && prev.isBlock && !prev.isTextblock) {
++ q -= 1
++ const blockWidget = findDeletionWidgetAt(decoSet, q)
++ if (blockWidget) return enter(blockWidget, -1)
++ prev = view.state.doc.resolve(q).nodeBefore
++ }
++ }
++ return false
++}
++
++/**
++ * A `mapDiffToDecorations` implementation that renders deletions as editable
++ * sub-editors and defers everything else to the default mapping. Pass it to
++ * `ySuggestionDecorationPlugin({ mapDiffToDecorations: editableDeletionMapDiff })`.
++ *
++ * @type {import('./diff-decorations.js').MapDiffToDecorations}
++ */
++export const editableDeletionMapDiff = (args) => {
++ const { diff, schema, color } = args
++ if (diff.type === 'inline-delete' || diff.type === 'block-delete') {
++ return editableDeletionWidget(diff, schema, { color })
++ }
++ return defaultMapDiffToDecorations(args)
++}
++
++/**
++ * Per-ytype anchor offsets for inline ghosts, keyed by the ghost's stable
++ * widget key. The offset counts how many characters of the attributed insert
++ * run adjacent to the ghost belong to the ghost's *left* — i.e. text the user
++ * typed with the caret on the ghost's left side. Default (no entry) is 0:
++ * the ghost renders before the whole insert run.
++ *
++ * @type {WeakMap