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

prosemirror-model

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-model - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 1.4.0 (2018-03-22)
### New features
[`ContentMatch.defaultType`](https://prosemirror.net/docs/ref/#model.ContentMatch.defaultType), a way to get a matching node type at a content match position, is now public.
## 1.3.0 (2018-03-22)

@@ -2,0 +8,0 @@

2

package.json
{
"name": "prosemirror-model",
"version": "1.3.0",
"version": "1.4.0",
"description": "ProseMirror's document model",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -50,4 +50,10 @@ import {Fragment} from "./fragment"

// :: ?NodeType
// Get the first matching node type at this match position that can
// be generated.
get defaultType() {
return this.next[0]
for (let i = 0; i < this.next.length; i += 2) {
let type = this.next[i]
if (!(type.isText || type.hasRequiredAttrs())) return type
}
}

@@ -54,0 +60,0 @@

@@ -651,3 +651,3 @@ import {Fragment} from "./fragment"

if ($context) for (let d = $context.depth; d >= 0; d--) {
let deflt = $context.node(d).defaultContentType($context.indexAfter(d))
let deflt = $context.node(d).contentMatchAt($context.indexAfter(d)).defaultType
if (deflt && deflt.isTextblock && deflt.defaultAttrs) return deflt

@@ -654,0 +654,0 @@ }

@@ -321,2 +321,3 @@ import {Fragment} from "./fragment"

// Unused. Left for backwards compatibility.
defaultContentType(at) {

@@ -323,0 +324,0 @@ return this.contentMatchAt(at).defaultType

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