prosemirror-flat-list
Advanced tools
Comparing version 0.0.22 to 0.0.23
@@ -44,3 +44,2 @@ // src/commands/dedent-list.ts | ||
checked: checkbox.hasAttribute("checked") | ||
// ...extra.parse(element), | ||
}; | ||
@@ -52,3 +51,2 @@ } | ||
checked: element.hasAttribute("data-checked") | ||
// ...extra.parse(element), | ||
}; | ||
@@ -60,3 +58,2 @@ } | ||
collapsed: element.hasAttribute("data-list-collapsed") | ||
// ...extra.parse(element), | ||
}; | ||
@@ -67,3 +64,2 @@ } | ||
type: "bullet" | ||
// ...extra.parse(element), | ||
}; | ||
@@ -86,3 +82,2 @@ } | ||
} | ||
// ...(override.parseDOM ?? []), | ||
]; | ||
@@ -321,3 +316,3 @@ } | ||
import { NodeRange } from "prosemirror-model"; | ||
function findListsRange($from, $to) { | ||
function findListsRange($from, $to = $from) { | ||
if ($to.pos < $from.pos) { | ||
@@ -1179,2 +1174,8 @@ return findListsRange($to, $from); | ||
} | ||
// src/utils/range-to-string.ts | ||
function rangeToString(range) { | ||
const { parent, startIndex, endIndex } = range; | ||
return cutByIndex(parent.content, startIndex, endIndex).toString(); | ||
} | ||
export { | ||
@@ -1204,2 +1205,3 @@ ListDOMSerializer, | ||
isListType, | ||
isListsRange, | ||
joinListElements, | ||
@@ -1211,3 +1213,4 @@ listKeymap, | ||
protectCollapsed, | ||
rangeToString, | ||
wrappingListInputRule | ||
}; |
@@ -68,3 +68,7 @@ import { Attrs } from 'prosemirror-model'; | ||
/** @public */ | ||
/** | ||
* Returns a set of rules for parsing HTML into ProseMirror list nodes. | ||
* | ||
* @public | ||
*/ | ||
export declare function createParseDomRules(): readonly ParseRule[]; | ||
@@ -123,3 +127,3 @@ | ||
*/ | ||
export declare function findListsRange($from: ResolvedPos, $to: ResolvedPos): NodeRange | null; | ||
export declare function findListsRange($from: ResolvedPos, $to?: ResolvedPos): NodeRange | null; | ||
@@ -138,2 +142,5 @@ /** @public */ | ||
/** @internal */ | ||
export declare function isListsRange(range: NodeRange): boolean; | ||
/** @public */ | ||
@@ -192,3 +199,6 @@ export declare function isListType(type: NodeType): boolean; | ||
/** @public */ | ||
/** | ||
* Renders a list node to DOM output spec. | ||
* | ||
* @public */ | ||
export declare function listToDOM({ node, nativeList, getMarkers, getAttributes, }: ListToDOMProps): DOMOutputSpec; | ||
@@ -277,2 +287,9 @@ | ||
/** | ||
* Return a debugging string that describes this range. | ||
* | ||
* @internal | ||
*/ | ||
export declare function rangeToString(range: NodeRange): string; | ||
/** @public */ | ||
@@ -279,0 +296,0 @@ export declare function wrappingListInputRule<T extends Attrs = ListAttributes>(re: RegExp, getAttrs: T | ((matches: RegExpMatchArray) => T)): InputRule; |
@@ -44,3 +44,2 @@ // src/commands/dedent-list.ts | ||
checked: checkbox.hasAttribute("checked") | ||
// ...extra.parse(element), | ||
}; | ||
@@ -52,3 +51,2 @@ } | ||
checked: element.hasAttribute("data-checked") | ||
// ...extra.parse(element), | ||
}; | ||
@@ -60,3 +58,2 @@ } | ||
collapsed: element.hasAttribute("data-list-collapsed") | ||
// ...extra.parse(element), | ||
}; | ||
@@ -67,3 +64,2 @@ } | ||
type: "bullet" | ||
// ...extra.parse(element), | ||
}; | ||
@@ -86,3 +82,2 @@ } | ||
} | ||
// ...(override.parseDOM ?? []), | ||
]; | ||
@@ -321,3 +316,3 @@ } | ||
import { NodeRange } from "prosemirror-model"; | ||
function findListsRange($from, $to) { | ||
function findListsRange($from, $to = $from) { | ||
if ($to.pos < $from.pos) { | ||
@@ -1179,2 +1174,8 @@ return findListsRange($to, $from); | ||
} | ||
// src/utils/range-to-string.ts | ||
function rangeToString(range) { | ||
const { parent, startIndex, endIndex } = range; | ||
return cutByIndex(parent.content, startIndex, endIndex).toString(); | ||
} | ||
export { | ||
@@ -1204,2 +1205,3 @@ ListDOMSerializer, | ||
isListType, | ||
isListsRange, | ||
joinListElements, | ||
@@ -1211,3 +1213,4 @@ listKeymap, | ||
protectCollapsed, | ||
rangeToString, | ||
wrappingListInputRule | ||
}; |
{ | ||
"name": "prosemirror-flat-list", | ||
"type": "module", | ||
"version": "0.0.22", | ||
"version": "0.0.23", | ||
"description": "", | ||
@@ -6,0 +6,0 @@ "author": "ocavue <ocavue@gmail.com>", |
Sorry, the diff of this file is not supported yet
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
121684
3885