// @ts-ignore // TODO: fix cjs build
import { findParentNodeOfType } from 'prosemirror-utils';
import { blType, liType, olType } from "./ListsSpecs/index.js";
export { liType, blType, olType } from "./ListsSpecs/index.js";
export const findAnyParentList = (schema) => findParentNodeOfType([blType(schema), olType(schema)]);
export const isIntoListOfType = (nodeName) => (state) => findAnyParentList(state.schema)(state.selection)?.node.type.name === nodeName;
export const isListNode = ({ type }) => type === blType(type.schema) || type === olType(type.schema);
export const isListItemNode = (node) => node.type === liType(node.type.schema);
export const isListOrItemNode = (node) => isListNode(node) || isListItemNode(node);
//# sourceMappingURL=utils.js.map
