prosemirror-model
Advanced tools
Comparing version 1.17.0-beta.1 to 1.17.0-beta.2
@@ -65,3 +65,3 @@ import OrderedMap from 'orderedmap'; | ||
declare type DOMNode = Node; | ||
declare type DOMNode = InstanceType<typeof window.Node>; | ||
@@ -99,3 +99,3 @@ /** | ||
readonly nodes: { | ||
[node: string]: (node: Node$1) => DOMOutputSpec; | ||
[node: string]: (node: Node) => DOMOutputSpec; | ||
}; | ||
@@ -122,3 +122,3 @@ /** | ||
nodes: { | ||
[node: string]: (node: Node$1) => DOMOutputSpec; | ||
[node: string]: (node: Node) => DOMOutputSpec; | ||
}, | ||
@@ -147,3 +147,3 @@ /** | ||
*/ | ||
serializeNode(node: Node$1, options?: { | ||
serializeNode(node: Node, options?: { | ||
document?: Document; | ||
@@ -170,3 +170,3 @@ }): globalThis.Node; | ||
static nodesFromSchema(schema: Schema): { | ||
[node: string]: (node: Node$1) => DOMOutputSpec; | ||
[node: string]: (node: Node) => DOMOutputSpec; | ||
}; | ||
@@ -211,7 +211,7 @@ /** | ||
*/ | ||
get parent(): Node$1; | ||
get parent(): Node; | ||
/** | ||
The root node in which the position was resolved. | ||
*/ | ||
get doc(): Node$1; | ||
get doc(): Node; | ||
/** | ||
@@ -221,3 +221,3 @@ The ancestor node at the given level. `p.node(p.depth)` is the | ||
*/ | ||
node(depth?: number | null): Node$1; | ||
node(depth?: number | null): Node; | ||
/** | ||
@@ -266,3 +266,3 @@ The index into the ancestor at the given level. If this points | ||
*/ | ||
get nodeAfter(): Node$1 | null; | ||
get nodeAfter(): Node | null; | ||
/** | ||
@@ -273,3 +273,3 @@ Get the node directly before the position, if any. If the | ||
*/ | ||
get nodeBefore(): Node$1 | null; | ||
get nodeBefore(): Node | null; | ||
/** | ||
@@ -310,3 +310,3 @@ Get the position at the given index in the parent node at the | ||
*/ | ||
blockRange(other?: ResolvedPos, pred?: (node: Node$1) => boolean): NodeRange | null; | ||
blockRange(other?: ResolvedPos, pred?: (node: Node) => boolean): NodeRange | null; | ||
/** | ||
@@ -379,3 +379,3 @@ Query whether the given position shares the same parent node. | ||
*/ | ||
get parent(): Node$1; | ||
get parent(): Node; | ||
/** | ||
@@ -505,3 +505,3 @@ The start index of the range in the parent node. | ||
*/ | ||
topNode?: Node$1; | ||
topNode?: Node; | ||
/** | ||
@@ -674,3 +674,3 @@ Provide the starting content match that content parsed into the | ||
*/ | ||
parse(dom: DOMNode, options?: ParseOptions): Node$1; | ||
parse(dom: DOMNode, options?: ParseOptions): Node; | ||
/** | ||
@@ -773,3 +773,3 @@ Parses the content of the given DOM node, like | ||
*/ | ||
create(attrs?: Attrs | null, content?: Fragment | Node$1 | readonly Node$1[] | null, marks?: readonly Mark[]): Node$1; | ||
create(attrs?: Attrs | null, content?: Fragment | Node | readonly Node[] | null, marks?: readonly Mark[]): Node; | ||
/** | ||
@@ -780,3 +780,3 @@ Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content | ||
*/ | ||
createChecked(attrs?: Attrs | null, content?: Fragment | Node$1 | readonly Node$1[] | null, marks?: readonly Mark[]): Node$1; | ||
createChecked(attrs?: Attrs | null, content?: Fragment | Node | readonly Node[] | null, marks?: readonly Mark[]): Node; | ||
/** | ||
@@ -790,3 +790,3 @@ Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but see if it is | ||
*/ | ||
createAndFill(attrs?: Attrs | null, content?: Fragment | Node$1 | readonly Node$1[] | null, marks?: readonly Mark[]): Node$1 | null; | ||
createAndFill(attrs?: Attrs | null, content?: Fragment | Node | readonly Node[] | null, marks?: readonly Mark[]): Node | null; | ||
/** | ||
@@ -989,3 +989,3 @@ Returns true if the given fragment is valid content for this node | ||
*/ | ||
toDOM?: (node: Node$1) => DOMOutputSpec; | ||
toDOM?: (node: Node) => DOMOutputSpec; | ||
/** | ||
@@ -1004,3 +1004,3 @@ Associates DOM parser information with this node, which can be | ||
*/ | ||
toDebugString?: (node: Node$1) => string; | ||
toDebugString?: (node: Node) => string; | ||
/** | ||
@@ -1140,3 +1140,3 @@ Node specs may include arbitrary properties that can be read by | ||
*/ | ||
node(type: string | NodeType, attrs?: Attrs | null, content?: Fragment | Node$1 | readonly Node$1[], marks?: readonly Mark[]): Node$1; | ||
node(type: string | NodeType, attrs?: Attrs | null, content?: Fragment | Node | readonly Node[], marks?: readonly Mark[]): Node; | ||
/** | ||
@@ -1146,3 +1146,3 @@ Create a text node in the schema. Empty text nodes are not | ||
*/ | ||
text(text: string, marks?: readonly Mark[] | null): Node$1; | ||
text(text: string, marks?: readonly Mark[] | null): Node; | ||
/** | ||
@@ -1156,3 +1156,3 @@ Create a mark with the given type and attributes. | ||
*/ | ||
nodeFromJSON(json: any): Node$1; | ||
nodeFromJSON(json: any): Node; | ||
/** | ||
@@ -1183,3 +1183,3 @@ Deserialize a mark from its JSON representation. This method is | ||
*/ | ||
nodesBetween(from: number, to: number, f: (node: Node$1, start: number, parent: Node$1 | null, index: number) => boolean | void, nodeStart?: number, parent?: Node$1): void; | ||
nodesBetween(from: number, to: number, f: (node: Node, start: number, parent: Node | null, index: number) => boolean | void, nodeStart?: number, parent?: Node): void; | ||
/** | ||
@@ -1190,3 +1190,3 @@ Call the given callback for every descendant node. `pos` will be | ||
*/ | ||
descendants(f: (node: Node$1, pos: number, parent: Node$1 | null) => boolean | void): void; | ||
descendants(f: (node: Node, pos: number, parent: Node | null) => boolean | void): void; | ||
/** | ||
@@ -1196,3 +1196,3 @@ Extract the text between `from` and `to`. See the same method on | ||
*/ | ||
textBetween(from: number, to: number, blockSeparator?: string | null, leafText?: string | null | ((leafNode: Node$1) => string)): string; | ||
textBetween(from: number, to: number, blockSeparator?: string | null, leafText?: string | null | ((leafNode: Node) => string)): string; | ||
/** | ||
@@ -1211,3 +1211,3 @@ Create a new fragment containing the combined content of this | ||
*/ | ||
replaceChild(index: number, node: Node$1): Fragment; | ||
replaceChild(index: number, node: Node): Fragment; | ||
/** | ||
@@ -1217,3 +1217,3 @@ Create a new fragment by prepending the given node to this | ||
*/ | ||
addToStart(node: Node$1): Fragment; | ||
addToStart(node: Node): Fragment; | ||
/** | ||
@@ -1223,3 +1223,3 @@ Create a new fragment by appending the given node to this | ||
*/ | ||
addToEnd(node: Node$1): Fragment; | ||
addToEnd(node: Node): Fragment; | ||
/** | ||
@@ -1232,7 +1232,7 @@ Compare this fragment to another one. | ||
*/ | ||
get firstChild(): Node$1 | null; | ||
get firstChild(): Node | null; | ||
/** | ||
The last child of the fragment, or `null` if it is empty. | ||
*/ | ||
get lastChild(): Node$1 | null; | ||
get lastChild(): Node | null; | ||
/** | ||
@@ -1246,7 +1246,7 @@ The number of child nodes in this fragment. | ||
*/ | ||
child(index: number): Node$1; | ||
child(index: number): Node; | ||
/** | ||
Get the child node at the given index, if it exists. | ||
*/ | ||
maybeChild(index: number): Node$1 | null; | ||
maybeChild(index: number): Node | null; | ||
/** | ||
@@ -1256,3 +1256,3 @@ Call `f` for every child node, passing the node, its offset | ||
*/ | ||
forEach(f: (node: Node$1, offset: number, index: number) => void): void; | ||
forEach(f: (node: Node, offset: number, index: number) => void): void; | ||
/** | ||
@@ -1298,3 +1298,3 @@ Find the first position at which this fragment and another | ||
*/ | ||
static fromArray(array: readonly Node$1[]): Fragment; | ||
static fromArray(array: readonly Node[]): Fragment; | ||
/** | ||
@@ -1306,3 +1306,3 @@ Create a fragment from something that can be interpreted as a | ||
*/ | ||
static from(nodes?: Fragment | Node$1 | readonly Node$1[] | null): Fragment; | ||
static from(nodes?: Fragment | Node | readonly Node[] | null): Fragment; | ||
/** | ||
@@ -1388,3 +1388,3 @@ An empty fragment. Intended to be reused whenever a node doesn't | ||
*/ | ||
declare class Node$1 { | ||
declare class Node { | ||
/** | ||
@@ -1429,7 +1429,7 @@ The type of node that this is. | ||
*/ | ||
child(index: number): Node$1; | ||
child(index: number): Node; | ||
/** | ||
Get the child node at the given index, if it exists. | ||
*/ | ||
maybeChild(index: number): Node$1 | null; | ||
maybeChild(index: number): Node | null; | ||
/** | ||
@@ -1439,3 +1439,3 @@ Call `f` for every child node, passing the node, its offset | ||
*/ | ||
forEach(f: (node: Node$1, offset: number, index: number) => void): void; | ||
forEach(f: (node: Node, offset: number, index: number) => void): void; | ||
/** | ||
@@ -1450,3 +1450,3 @@ Invoke a callback for all descendant nodes recursively between | ||
*/ | ||
nodesBetween(from: number, to: number, f: (node: Node$1, pos: number, parent: Node$1 | null, index: number) => void | boolean, startPos?: number): void; | ||
nodesBetween(from: number, to: number, f: (node: Node, pos: number, parent: Node | null, index: number) => void | boolean, startPos?: number): void; | ||
/** | ||
@@ -1456,3 +1456,3 @@ Call the given callback for every descendant node. Doesn't | ||
*/ | ||
descendants(f: (node: Node$1, pos: number, parent: Node$1 | null, index: number) => void | boolean): void; | ||
descendants(f: (node: Node, pos: number, parent: Node | null, index: number) => void | boolean): void; | ||
/** | ||
@@ -1469,3 +1469,3 @@ Concatenates all the text nodes found in this fragment and its | ||
*/ | ||
textBetween(from: number, to: number, blockSeparator?: string | null, leafText?: null | string | ((leafNode: Node$1) => string)): string; | ||
textBetween(from: number, to: number, blockSeparator?: string | null, leafText?: null | string | ((leafNode: Node) => string)): string; | ||
/** | ||
@@ -1475,3 +1475,3 @@ Returns this node's first child, or `null` if there are no | ||
*/ | ||
get firstChild(): Node$1 | null; | ||
get firstChild(): Node | null; | ||
/** | ||
@@ -1481,7 +1481,7 @@ Returns this node's last child, or `null` if there are no | ||
*/ | ||
get lastChild(): Node$1 | null; | ||
get lastChild(): Node | null; | ||
/** | ||
Test whether two nodes represent the same piece of document. | ||
*/ | ||
eq(other: Node$1): boolean; | ||
eq(other: Node): boolean; | ||
/** | ||
@@ -1491,3 +1491,3 @@ Compare the markup (type, attributes, and marks) of this node to | ||
*/ | ||
sameMarkup(other: Node$1): boolean; | ||
sameMarkup(other: Node): boolean; | ||
/** | ||
@@ -1502,3 +1502,3 @@ Check whether this node's markup correspond to the given type, | ||
*/ | ||
copy(content?: Fragment | null): Node$1; | ||
copy(content?: Fragment | null): Node; | ||
/** | ||
@@ -1508,3 +1508,3 @@ Create a copy of this node, with the given set of marks instead | ||
*/ | ||
mark(marks: readonly Mark[]): Node$1; | ||
mark(marks: readonly Mark[]): Node; | ||
/** | ||
@@ -1515,3 +1515,3 @@ Create a copy of this node with only the content between the | ||
*/ | ||
cut(from: number, to?: number): Node$1; | ||
cut(from: number, to?: number): Node; | ||
/** | ||
@@ -1530,7 +1530,7 @@ Cut out the part of the document between the given positions, and | ||
*/ | ||
replace(from: number, to: number, slice: Slice): Node$1; | ||
replace(from: number, to: number, slice: Slice): Node; | ||
/** | ||
Find the node directly after the given position. | ||
*/ | ||
nodeAt(pos: number): Node$1 | null; | ||
nodeAt(pos: number): Node | null; | ||
/** | ||
@@ -1542,3 +1542,3 @@ Find the (direct) child node after the given offset, if any, | ||
childAfter(pos: number): { | ||
node: Node$1 | null; | ||
node: Node | null; | ||
index: number; | ||
@@ -1553,3 +1553,3 @@ offset: number; | ||
childBefore(pos: number): { | ||
node: Node$1 | null; | ||
node: Node | null; | ||
index: number; | ||
@@ -1630,3 +1630,3 @@ offset: number; | ||
*/ | ||
canAppend(other: Node$1): boolean; | ||
canAppend(other: Node): boolean; | ||
/** | ||
@@ -1644,5 +1644,5 @@ Check whether this node and its descendants conform to the | ||
*/ | ||
static fromJSON(schema: Schema, json: any): Node$1; | ||
static fromJSON(schema: Schema, json: any): Node; | ||
} | ||
export { AttributeSpec, Attrs, ContentMatch, DOMOutputSpec, DOMParser, DOMSerializer, Fragment, Mark, MarkSpec, MarkType, Node$1 as Node, NodeRange, NodeSpec, NodeType, ParseOptions, ParseRule, ReplaceError, ResolvedPos, Schema, SchemaSpec, Slice }; | ||
export { AttributeSpec, Attrs, ContentMatch, DOMOutputSpec, DOMParser, DOMSerializer, Fragment, Mark, MarkSpec, MarkType, Node, NodeRange, NodeSpec, NodeType, ParseOptions, ParseRule, ReplaceError, ResolvedPos, Schema, SchemaSpec, Slice }; |
{ | ||
"name": "prosemirror-model", | ||
"version": "1.17.0-beta.1", | ||
"version": "1.17.0-beta.2", | ||
"description": "ProseMirror's document model", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -1,1 +0,1 @@ | ||
export type DOMNode = Node | ||
export type DOMNode = InstanceType<typeof window.Node> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
441261