Skip to content

Commit 46bfb1c

Browse files
authored
Y prosemirror v14 visualization fixes (#2875)
* fix lists and headings, disable "deleted" * viz fixes * improve table visualization and clean comments / re-add testcases * add support for attributions in test cases * extract scenarios to gallery, add feedback to scenarios * update screenshots * fix build * run gen * add enterPreview test * blockMatchNodes account for blockgroup (commented out) * fix e2e * fix nesting bugs
1 parent 32a5cc2 commit 46bfb1c

129 files changed

Lines changed: 5389 additions & 1153 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/07-collaboration/13-versioning-yjs14/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"jsx": "react-jsx",
1818
"composite": true
1919
},
20-
"include": [".", "src/test.ts"],
20+
"include": ["."],
2121
"__ADD_FOR_LOCAL_DEV_references": [
2222
{
2323
"path": "../../../packages/core/"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"playground": true,
3+
"docs": false,
4+
"author": "yousefed",
5+
"tags": ["Advanced", "Development", "Collaboration"],
6+
"dependencies": {
7+
"@y/protocols": "^1.0.6-rc.1",
8+
"@y/y": "^14.0.0-rc.16"
9+
}
10+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Suggestion Scenarios Gallery
2+
3+
Browse the suggestion (track-changes) rendering scenarios interactively. Each
4+
entry sets up a base document and applies a change in suggestion mode, so you can
5+
see how insertions, deletions and type changes are visualized as a diff.
6+
7+
The **Base** pane (left) is read-only and shows the document before the change.
8+
The **Suggestion** pane (right) is editable — keep typing to create more
9+
suggestions on top.
10+
11+
These are the same scenarios covered by the y-prosemirror visual tests; the
12+
per-scenario definitions live in `src/scenarios.ts` so the tests and this gallery
13+
stay in sync.
14+
15+
**Relevant Docs:**
16+
17+
- [Editor Setup](/docs/editor-basics/setup)
18+
- [Collaboration](/docs/collaboration/real-time-collaboration)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<html lang="en">
2+
<head>
3+
<meta charset="UTF-8" />
4+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
5+
<title>Suggestion Scenarios Gallery</title>
6+
<script>
7+
<!-- AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY -->
8+
</script>
9+
</head>
10+
<body>
11+
<div id="root"></div>
12+
<script type="module" src="./main.tsx"></script>
13+
</body>
14+
</html>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
2+
import React from "react";
3+
import { createRoot } from "react-dom/client";
4+
import App from "./src/App.jsx";
5+
6+
const root = createRoot(document.getElementById("root")!);
7+
root.render(
8+
<React.StrictMode>
9+
<App />
10+
</React.StrictMode>,
11+
);
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "@blocknote/example-collaboration-suggestion-gallery",
3+
"description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY",
4+
"type": "module",
5+
"private": true,
6+
"version": "0.12.4",
7+
"scripts": {
8+
"start": "vp dev",
9+
"dev": "vp dev",
10+
"build:prod": "tsc && vp build",
11+
"preview": "vp preview"
12+
},
13+
"dependencies": {
14+
"@blocknote/ariakit": "latest",
15+
"@blocknote/core": "latest",
16+
"@blocknote/mantine": "latest",
17+
"@blocknote/react": "latest",
18+
"@blocknote/shadcn": "latest",
19+
"@mantine/core": "^9.0.2",
20+
"@mantine/hooks": "^9.0.2",
21+
"react": "^19.2.3",
22+
"react-dom": "^19.2.3",
23+
"@y/protocols": "^1.0.6-rc.1",
24+
"@y/y": "^14.0.0-rc.16"
25+
},
26+
"devDependencies": {
27+
"@types/react": "^19.2.3",
28+
"@types/react-dom": "^19.2.3",
29+
"@vitejs/plugin-react": "^6.0.1",
30+
"vite-plus": "catalog:"
31+
}
32+
}

0 commit comments

Comments
 (0)