Socket
Socket
Sign inDemoInstall

prosemirror-model

Package Overview
Dependencies
Maintainers
1
Versions
84
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.19.0 to 1.19.1

dist/index.d.cts

8

CHANGELOG.md

@@ -0,1 +1,9 @@

## 1.19.1 (2023-05-17)
### Bug fixes
Fix the types of `Fragment.desendants` to include the index parameter to the callback. Add release note
Include CommonJS type declarations in the package to please new TypeScript resolution settings.
## 1.19.0 (2023-01-18)

@@ -2,0 +10,0 @@

11

dist/index.d.ts

@@ -1193,3 +1193,3 @@ import OrderedMap from 'orderedmap';

*/
descendants(f: (node: Node, pos: number, parent: Node | null) => boolean | void): void;
descendants(f: (node: Node, pos: number, parent: Node | null, index: number) => boolean | void): void;
/**

@@ -1436,6 +1436,7 @@ Extract the text between `from` and `to`. See the same method on

node's content. The callback is invoked with the node, its
parent-relative position, its parent node, and its child index.
When the callback returns false for a given node, that node's
children will not be recursed over. The last parameter can be
used to specify a starting position to count from.
position relative to the original node (method receiver),
its parent node, and its child index. When the callback returns
false for a given node, that node's children will not be
recursed over. The last parameter can be used to specify a
starting position to count from.
*/

@@ -1442,0 +1443,0 @@ nodesBetween(from: number, to: number, f: (node: Node, pos: number, parent: Node | null, index: number) => void | boolean, startPos?: number): void;

{
"name": "prosemirror-model",
"version": "1.19.0",
"version": "1.19.1",
"description": "ProseMirror's document model",

@@ -18,3 +18,3 @@ "type": "module",

"name": "Marijn Haverbeke",
"email": "marijnh@gmail.com",
"email": "marijn@haverbeke.berlin",
"web": "http://marijnhaverbeke.nl"

@@ -21,0 +21,0 @@ }

@@ -48,3 +48,3 @@ import {findDiffStart, findDiffEnd} from "./diff"

/// `false` to prevent traversal of a given node's children.
descendants(f: (node: Node, pos: number, parent: Node | null) => boolean | void) {
descendants(f: (node: Node, pos: number, parent: Node | null, index: number) => boolean | void) {
this.nodesBetween(0, this.size, f)

@@ -51,0 +51,0 @@ }

@@ -532,6 +532,6 @@ import {Fragment} from "./fragment"

let add = Mark.none, remove = Mark.none
style: for (let i = 0; i < styles.length; i += 2) {
for (let i = 0; i < styles.length; i += 2) {
for (let after = undefined;;) {
let rule = this.parser.matchStyle(styles[i], styles[i + 1], this, after)
if (!rule) continue style
if (!rule) break
if (rule.ignore) return null

@@ -538,0 +538,0 @@ if (rule.clearMark) {

@@ -70,6 +70,7 @@ import {Fragment} from "./fragment"

/// node's content. The callback is invoked with the node, its
/// parent-relative position, its parent node, and its child index.
/// When the callback returns false for a given node, that node's
/// children will not be recursed over. The last parameter can be
/// used to specify a starting position to count from.
/// position relative to the original node (method receiver),
/// its parent node, and its child index. When the callback returns
/// false for a given node, that node's children will not be
/// recursed over. The last parameter can be used to specify a
/// starting position to count from.
nodesBetween(from: number, to: number,

@@ -76,0 +77,0 @@ f: (node: Node, pos: number, parent: Node | null, index: number) => void | boolean,

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