UNPKG

@blocknote/core

Version:

A "Notion-style" block-based extensible text editor built on top of Prosemirror and Tiptap.

38 lines (37 loc) 1 kB
import { getExtensionField as e } from "@tiptap/core"; import { Store as t } from "@tanstack/store"; //#region src/schema/markGroups.ts var n = "annotation"; function r(t) { return t && t.options.extensions.some((t) => { if (t.type !== "mark") return !1; let n = e(t, "group"); return typeof n == "string" && n.split(" ").includes("annotation"); }) ? n : ""; } //#endregion //#region src/editor/managers/ExtensionManager/symbol.ts var i = Symbol("originalFactory"); //#endregion //#region src/editor/BlockNoteExtension.ts function a(e) { if (typeof e == "object" && "key" in e) return function t() { return e[i] = t, e; }; if (typeof e != "function") throw Error("factory must be a function"); return function t(n) { return (r) => { let a = e({ editor: r.editor, options: n }); return a[i] = t, a; }; }; } function o(e, n) { return new t(e, n); } //#endregion export { r as a, n as i, o as n, i as r, a as t }; //# sourceMappingURL=BlockNoteExtension-B_IEJHS8.js.map