Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tiptap/core

Package Overview
Dependencies
Maintainers
2
Versions
330
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/core - npm Package Compare versions

Comparing version 2.0.0-beta.8 to 2.0.0-beta.9

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# [2.0.0-beta.9](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/core@2.0.0-beta.8...@tiptap/core@2.0.0-beta.9) (2021-03-28)
**Note:** Version bump only for package @tiptap/core
# [2.0.0-beta.8](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/core@2.0.0-beta.7...@tiptap/core@2.0.0-beta.8) (2021-03-28)

@@ -8,0 +16,0 @@

4

package.json
{
"name": "@tiptap/core",
"description": "headless rich text editor",
"version": "2.0.0-beta.8",
"version": "2.0.0-beta.9",
"homepage": "https://tiptap.dev",

@@ -44,3 +44,3 @@ "keywords": [

},
"gitHead": "ffde0a382eed3fd89b998ed084b9b1bf9b6a2f4b"
"gitHead": "1a7288eb3ba9fda08e8c85e8e9bdb3f9ad84de69"
}

@@ -17,22 +17,24 @@ import { liftTarget } from 'prosemirror-transform'

const { selection } = tr
const { from, to } = selection
const { ranges } = selection
state.doc.nodesBetween(from, to, (node, pos) => {
if (!node.type.isText) {
const fromPos = tr.doc.resolve(tr.mapping.map(pos + 1))
const toPos = tr.doc.resolve(tr.mapping.map(pos + node.nodeSize - 1))
const nodeRange = fromPos.blockRange(toPos)
ranges.forEach(range => {
state.doc.nodesBetween(range.$from.pos, range.$to.pos, (node, pos) => {
if (!node.type.isText) {
const fromPos = tr.doc.resolve(tr.mapping.map(pos + 1))
const toPos = tr.doc.resolve(tr.mapping.map(pos + node.nodeSize - 1))
const nodeRange = fromPos.blockRange(toPos)
if (nodeRange) {
const targetLiftDepth = liftTarget(nodeRange)
if (nodeRange) {
const targetLiftDepth = liftTarget(nodeRange)
if (node.type.isTextblock && dispatch) {
tr.setNodeMarkup(nodeRange.start, state.doc.type.contentMatch.defaultType)
}
if (node.type.isTextblock && dispatch) {
tr.setNodeMarkup(nodeRange.start, state.doc.type.contentMatch.defaultType)
}
if ((targetLiftDepth || targetLiftDepth === 0) && dispatch) {
tr.lift(nodeRange, targetLiftDepth)
if ((targetLiftDepth || targetLiftDepth === 0) && dispatch) {
tr.lift(nodeRange, targetLiftDepth)
}
}
}
}
})
})

@@ -39,0 +41,0 @@

@@ -20,8 +20,10 @@ import { NodeType } from 'prosemirror-model'

const { selection } = tr
const { from, to } = selection
const { ranges } = selection
state.doc.nodesBetween(from, to, (node, pos) => {
if (node.type === type && dispatch) {
tr.setNodeMarkup(pos, undefined, deleteProps(node.attrs, attributes))
}
ranges.forEach(range => {
state.doc.nodesBetween(range.$from.pos, range.$to.pos, (node, pos) => {
if (node.type === type && dispatch) {
tr.setNodeMarkup(pos, undefined, deleteProps(node.attrs, attributes))
}
})
})

@@ -28,0 +30,0 @@

@@ -16,3 +16,3 @@ import { Command, RawCommands } from '../types'

const { selection } = tr
const { from, to, empty } = selection
const { empty, ranges } = selection

@@ -27,3 +27,5 @@ if (empty) {

.forEach(([, mark]) => {
tr.removeMark(from, to, mark as any)
ranges.forEach(range => {
tr.removeMark(range.$from.pos, range.$to.pos, mark as any)
})
})

@@ -30,0 +32,0 @@ }

@@ -19,11 +19,13 @@ import { NodeType } from 'prosemirror-model'

const { selection } = tr
const { from, to } = selection
const { ranges } = selection
state.doc.nodesBetween(from, to, (node, pos) => {
if (node.type === type && dispatch) {
tr.setNodeMarkup(pos, undefined, {
...node.attrs,
...attributes,
})
}
ranges.forEach(range => {
state.doc.nodesBetween(range.$from.pos, range.$to.pos, (node, pos) => {
if (node.type === type && dispatch) {
tr.setNodeMarkup(pos, undefined, {
...node.attrs,
...attributes,
})
}
})
})

@@ -30,0 +32,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc