import { Editor, Text } from "slate";
const closest = (editor, options) => {
  const entries = Editor.levels(editor, {
    at: options.at,
    match: (node) => {
      return !Text.isText(node) && options.match(node);
    },
    reverse: true
  });
  for (const entry of entries) {
    return entry;
  }
  return void 0;
};
export { closest };
//# sourceMappingURL=closest.js.map
