Skip to content

Commit

Permalink
fix(deps): use @tiptap/pm package
Browse files Browse the repository at this point in the history
Following the tiptap instructions to use @tiptap/pm package:
https://tiptap.dev/blog/new-pm-package-and-upgrade-guide-for-beta-210
  • Loading branch information
renovate[bot] authored and max-nextcloud committed Apr 25, 2023
1 parent 237ba1f commit 280ee5c
Show file tree
Hide file tree
Showing 16 changed files with 47 additions and 149 deletions.
142 changes: 24 additions & 118 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 1 addition & 9 deletions package.json
Expand Up @@ -77,6 +77,7 @@
"@tiptap/extension-task-list": "^2.0.3",
"@tiptap/extension-text": "^2.0.3",
"@tiptap/extension-underline": "^2.0.3",
"@tiptap/pm": "^2.0.3",
"@tiptap/prosemirror-tables": "^1.1.4",
"@tiptap/suggestion": "^2.0.3",
"@tiptap/vue-2": "^2.0.3",
Expand All @@ -90,16 +91,7 @@
"markdown-it-image-figures": "^2.1.1",
"mitt": "^3.0.0",
"path-normalize": "^6.0.10",
"prosemirror-collab": "^1.3.0",
"prosemirror-inputrules": "^1.2.0",
"prosemirror-markdown": "^1.10.1",
"prosemirror-model": "^1.19.0",
"prosemirror-schema-list": "^1.2.2",
"prosemirror-state": "^1.4.2",
"prosemirror-tables-contently": "^1.1.4",
"prosemirror-transform": "^1.7.1",
"prosemirror-utils": "^1.0.0-0",
"prosemirror-view": "^1.30.2",
"proxy-polyfill": "^0.3.2",
"slug": "^8.2.2",
"tippy.js": "^6.3.7",
Expand Down
4 changes: 2 additions & 2 deletions src/components/Editor.vue
Expand Up @@ -86,8 +86,8 @@ import Vue, { set } from 'vue'
import { mapActions, mapState } from 'vuex'
import escapeHtml from 'escape-html'
import moment from '@nextcloud/moment'
import { getVersion, receiveTransaction } from 'prosemirror-collab'
import { Step } from 'prosemirror-transform'
import { getVersion, receiveTransaction } from '@tiptap/pm/collab'
import { Step } from '@tiptap/pm/transform'
import { getCurrentUser } from '@nextcloud/auth'
import { loadState } from '@nextcloud/initial-state'
Expand Down
4 changes: 2 additions & 2 deletions src/extensions/Collaboration.js
@@ -1,11 +1,11 @@
import { Extension } from '@tiptap/core'
import { Step } from 'prosemirror-transform'
import { Step } from '@tiptap/pm/transform'
import {
collab,
sendableSteps,
getVersion,
receiveTransaction,
} from 'prosemirror-collab'
} from '@tiptap/pm/collab'

let timeout
const debounce = (fn, delay) => (...args) => {
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/Emoji.js
Expand Up @@ -21,7 +21,7 @@
*/

import { Node } from '@tiptap/core'
import { PluginKey } from 'prosemirror-state'
import { PluginKey } from '@tiptap/pm/state'
// eslint-disable-next-line import/no-named-as-default
import Suggestion from '@tiptap/suggestion'

Expand Down
2 changes: 1 addition & 1 deletion src/extensions/Keymap.js
Expand Up @@ -21,7 +21,7 @@
*/

import { Extension } from '@tiptap/core'
import { Plugin } from 'prosemirror-state'
import { Plugin } from '@tiptap/pm/state'

const Keymap = Extension.create({

Expand Down
8 changes: 4 additions & 4 deletions src/extensions/Markdown.js
Expand Up @@ -23,7 +23,7 @@
/*
* Tiptap extension to ease customize the serialization to markdown
*
* Most markdown serialization can be handled by `prosemirror-markdown`.
* Most markdown serialization can be handled by `@tiptap/pm/markdown`.
* In order to make it easier to add custom markdown rendering
* this extension will extend the prosemirror schema for nodes and marks
* with a `toMarkdown` specification if that is defined in a tiptap extension.
Expand All @@ -39,9 +39,9 @@
*/

import { Extension, getExtensionField } from '@tiptap/core'
import { Plugin, PluginKey } from 'prosemirror-state'
import { MarkdownSerializer, defaultMarkdownSerializer } from 'prosemirror-markdown'
import { DOMParser } from 'prosemirror-model'
import { Plugin, PluginKey } from '@tiptap/pm/state'
import { MarkdownSerializer, defaultMarkdownSerializer } from '@tiptap/pm/markdown'
import { DOMParser } from '@tiptap/pm/model'

const Markdown = Extension.create({

Expand Down
4 changes: 2 additions & 2 deletions src/extensions/UserColor.js
Expand Up @@ -21,8 +21,8 @@
*/

import { Extension } from '@tiptap/core'
import { Plugin } from 'prosemirror-state'
import { Decoration, DecorationSet } from 'prosemirror-view'
import { Plugin } from '@tiptap/pm/state'
import { Decoration, DecorationSet } from '@tiptap/pm/view'
import TrackState from './tracking/TrackState.js'
import { Span } from './tracking/models.js'

Expand Down
4 changes: 2 additions & 2 deletions src/nodes/CodeBlock.js
@@ -1,5 +1,5 @@
import TiptapCodeBlock from '@tiptap/extension-code-block'
import { defaultMarkdownSerializer } from 'prosemirror-markdown'
import { defaultMarkdownSerializer } from '@tiptap/pm/markdown'

const CodeBlock = TiptapCodeBlock.extend({

Expand All @@ -21,7 +21,7 @@ const CodeBlock = TiptapCodeBlock.extend({
},

toMarkdown(state, node, parent, index) {
// prosemirror-markdown uses `params` instead of `language` attribute
// @tiptap/pm/markdown uses `params` instead of `language` attribute
node.attrs.params = node.attrs.language
return defaultMarkdownSerializer.nodes.code_block(state, node, parent, index)
},
Expand Down
2 changes: 1 addition & 1 deletion src/nodes/Image.js
Expand Up @@ -21,7 +21,7 @@
*/

import TiptapImage from '@tiptap/extension-image'
import { Plugin } from 'prosemirror-state'
import { Plugin } from '@tiptap/pm/state'
import ImageView from './ImageView.vue'
import { VueNodeViewRenderer } from '@tiptap/vue-2'

Expand Down
4 changes: 2 additions & 2 deletions src/nodes/Table/Table.js
Expand Up @@ -5,8 +5,8 @@ import TableCell from './TableCell.js'
import TableHeader from './TableHeader.js'
import TableHeadRow from './TableHeadRow.js'
import TableRow from './TableRow.js'
import { TextSelection } from 'prosemirror-state'
import { isInTable, moveCellForward, selectionCell } from '@tiptap/prosemirror-tables'
import { TextSelection } from '@tiptap/pm/state'
import { isInTable, moveCellForward, selectionCell } from '@tiptap/pm/tables'

/**
*
Expand Down
2 changes: 1 addition & 1 deletion src/nodes/TaskItem.js
Expand Up @@ -22,7 +22,7 @@

import TipTapTaskItem from '@tiptap/extension-task-item'
import { wrappingInputRule, mergeAttributes } from '@tiptap/core'
import { Plugin } from 'prosemirror-state'
import { Plugin } from '@tiptap/pm/state'
import { findParentNodeClosestToPos } from 'prosemirror-utils'

const TaskItem = TipTapTaskItem.extend({
Expand Down
2 changes: 1 addition & 1 deletion src/nodes/TrailingNode.js
Expand Up @@ -6,7 +6,7 @@
*/

import { Extension } from '@tiptap/core'
import { PluginKey, Plugin } from 'prosemirror-state'
import { PluginKey, Plugin } from '@tiptap/pm/state'

/**
* @param {object} args Arguments as deconstructable object
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/link.js
@@ -1,4 +1,4 @@
import { Plugin, PluginKey } from 'prosemirror-state'
import { Plugin, PluginKey } from '@tiptap/pm/state'

import { logger } from '../helpers/logger.js'

Expand Down
2 changes: 1 addition & 1 deletion src/services/PollingBackend.js
Expand Up @@ -23,7 +23,7 @@ import axios from '@nextcloud/axios'
import { logger } from '../helpers/logger.js'
import { endpointUrl } from '../helpers/index.js'
import { SyncService, ERROR_TYPE } from './SyncService.js'
import { sendableSteps } from 'prosemirror-collab'
import { sendableSteps } from '@tiptap/pm/collab'

/**
* Minimum inverval to refetch the document changes
Expand Down
2 changes: 1 addition & 1 deletion src/services/SyncService.js
Expand Up @@ -22,7 +22,7 @@
*/
import axios from '@nextcloud/axios'
import mitt from 'mitt'
import { getVersion, sendableSteps } from 'prosemirror-collab'
import { getVersion, sendableSteps } from '@tiptap/pm/collab'

import PollingBackend from './PollingBackend.js'
import { logger } from '../helpers/logger.js'
Expand Down

0 comments on commit 280ee5c

Please sign in to comment.