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

prosemirror-transform

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-transform - npm Package Compare versions

Comparing version 0.15.0 to 0.16.0

2

dist/replace.js

@@ -246,3 +246,2 @@ var ref = require("prosemirror-model");

if (openRight > 0 && depth < $to.depth) {
// FIXME find a less allocaty approach
var after = toNode.content.cutByIndex($to.indexAfter(depth)).addToStart(content.lastChild)

@@ -322,3 +321,2 @@ var joinable$1 = match.fillBefore(after, true)

var fitted = fitRightJoin(slice.content, $from.node(0), $from, $to, 0, slice.openLeft, slice.openRight)
// FIXME we might want to be clever about selectively dropping nodes here?
if (!fitted) { return null }

@@ -325,0 +323,0 @@ return normalizeSlice(fitted, slice.openLeft, $to.depth)

2

dist/step.js

@@ -56,3 +56,3 @@ var ref = require("prosemirror-model");

var obj = {stepType: this.jsonID}
for (var prop in this) { if (this$1.hasOwnProperty(prop)) {
for (var prop in this$1) { if (this$1.hasOwnProperty(prop)) {
var val = this$1[prop]

@@ -59,0 +59,0 @@ obj[prop] = val && val.toJSON ? val.toJSON() : val

@@ -43,7 +43,7 @@ var ref = require("./map");

// :: (Step) → Transform
// :: (step: Step) → Transform
// Apply a new step in this transformation, saving the result.
// Throws an error when the step fails.
Transform.prototype.step = function step (step) {
var result = this.maybeStep(step)
Transform.prototype.step = function step (object) {
var result = this.maybeStep(object)
if (result.failed) { throw new TransformError(result.failed) }

@@ -50,0 +50,0 @@ return this

{
"name": "prosemirror-transform",
"version": "0.15.0",
"version": "0.16.0",
"description": "ProseMirror document transformations",

@@ -19,6 +19,6 @@ "main": "dist/index.js",

"dependencies": {
"prosemirror-model": "^0.15.0"
"prosemirror-model": "^0.16.0"
},
"devDependencies": {
"buble": "~0.14.0",
"buble": "^0.15.1",
"mocha": "^3.0.2",

@@ -25,0 +25,0 @@ "ist": "^1.0.0",

This module defines a way to transform documents. You can read more
about transformations in [this guide](guide/transform.md).
about transformations in [this guide](guide/transform.html).

@@ -4,0 +4,0 @@ ### Steps

@@ -230,3 +230,2 @@ const {Fragment, Slice} = require("prosemirror-model")

if (openRight > 0 && depth < $to.depth) {
// FIXME find a less allocaty approach
let after = toNode.content.cutByIndex($to.indexAfter(depth)).addToStart(content.lastChild)

@@ -306,3 +305,2 @@ let joinable = match.fillBefore(after, true)

let fitted = fitRightJoin(slice.content, $from.node(0), $from, $to, 0, slice.openLeft, slice.openRight)
// FIXME we might want to be clever about selectively dropping nodes here?
if (!fitted) return null

@@ -309,0 +307,0 @@ return normalizeSlice(fitted, slice.openLeft, $to.depth)

@@ -33,7 +33,7 @@ const {Mapping} = require("./map")

// :: (Step) → Transform
// :: (step: Step) → Transform
// Apply a new step in this transformation, saving the result.
// Throws an error when the step fails.
step(step) {
let result = this.maybeStep(step)
step(object) {
let result = this.maybeStep(object)
if (result.failed) throw new TransformError(result.failed)

@@ -40,0 +40,0 @@ return this

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