Skip to content

Commit

Permalink
Merge branch 'next' into storage-strong-typing
Browse files Browse the repository at this point in the history
  • Loading branch information
nperez0111 authored Jan 28, 2025
2 parents 253c1f9 + a33d20c commit 3977e4f
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 38 deletions.
6 changes: 6 additions & 0 deletions .changeset/eighty-gifts-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@tiptap/extension-collaboration-cursor': major
'@tiptap/extension-collaboration': major
---

Replaced y-prosemirror with @tiptap/y-tiptap
2 changes: 1 addition & 1 deletion demos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@lexical/react": "^0.11.3",
"@lifeomic/attempt": "3.1.0",
"@shikijs/core": "1.10.3",
"@tiptap/y-tiptap": "^1.0.0",
"d3": "^7.9.0",
"fast-glob": "^3.3.2",
"highlight.js": "^11.11.1",
Expand All @@ -41,7 +42,6 @@
"prosemirror-view": "^1.37.1",
"remixicon": "^2.5.0",
"shiki": "^1.25.1",
"y-prosemirror": "^1.2.15",
"y-webrtc": "10.3.0",
"yjs": "13.6.23"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { EditorState, Transaction } from '@tiptap/pm/state'
import { Decoration, DecorationSet } from '@tiptap/pm/view'
import { absolutePositionToRelativePosition, relativePositionToAbsolutePosition, ySyncPluginKey } from 'y-prosemirror'
import {
absolutePositionToRelativePosition,
relativePositionToAbsolutePosition,
ySyncPluginKey,
} from '@tiptap/y-tiptap'
import * as Y from 'yjs'

import { AnnotationItem } from './AnnotationItem.js'
Expand Down
2 changes: 1 addition & 1 deletion demos/src/Experiments/MultipleEditors/Vue/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'
import { Dropcursor } from '@tiptap/extensions'
import { Editor, EditorContent } from '@tiptap/vue-3'
import { yDocToProsemirrorJSON } from 'y-prosemirror'
import { yDocToProsemirrorJSON } from '@tiptap/y-tiptap'
import * as Y from 'yjs'
const HeadingDocument = Document.extend({
Expand Down
4 changes: 2 additions & 2 deletions packages/extension-collaboration-cursor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
"devDependencies": {
"@tiptap/core": "^3.0.0-next.4",
"@tiptap/pm": "^3.0.0-next.4",
"y-prosemirror": "^1.2.15"
"@tiptap/y-tiptap": "^1.0.0"
},
"peerDependencies": {
"@tiptap/core": "^3.0.0-next.3",
"@tiptap/pm": "^3.0.0-next.3",
"y-prosemirror": "^1.2.6"
"@tiptap/y-tiptap": "^1.0.0"
},
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Extension } from '@tiptap/core'
import { DecorationAttrs } from '@tiptap/pm/view'
import { defaultSelectionBuilder, yCursorPlugin } from 'y-prosemirror'
import { defaultSelectionBuilder, yCursorPlugin } from '@tiptap/y-tiptap'

type CollaborationCursorStorage = {
users: { clientId: number; [key: string]: any }[]
Expand Down
4 changes: 2 additions & 2 deletions packages/extension-collaboration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
"devDependencies": {
"@tiptap/core": "^3.0.0-next.4",
"@tiptap/pm": "^3.0.0-next.4",
"y-prosemirror": "^1.2.15"
"@tiptap/y-tiptap": "^1.0.0"
},
"peerDependencies": {
"@tiptap/core": "^3.0.0-next.1",
"@tiptap/pm": "^3.0.0-next.1",
"y-prosemirror": "^1.2.6",
"@tiptap/y-tiptap": "^1.0.0",
"yjs": "^13"
},
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/extension-collaboration/src/collaboration.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Extension } from '@tiptap/core'
import { Plugin, PluginKey } from '@tiptap/pm/state'
import { EditorView } from '@tiptap/pm/view'
import { redo, undo, ySyncPlugin, yUndoPlugin, yUndoPluginKey, yXmlFragmentToProsemirrorJSON } from 'y-prosemirror'
import { redo, undo, ySyncPlugin, yUndoPlugin, yUndoPluginKey, yXmlFragmentToProsemirrorJSON } from '@tiptap/y-tiptap'
import { Doc, UndoManager, XmlFragment } from 'yjs'

type YSyncOpts = Parameters<typeof ySyncPlugin>[1]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Transaction } from '@tiptap/pm/state'
import { ySyncPluginKey } from 'y-prosemirror'
import { ySyncPluginKey } from '@tiptap/y-tiptap'

/**
* Checks if a transaction was originated from a Yjs change.
Expand Down
52 changes: 24 additions & 28 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3977e4f

Please sign in to comment.