import log from '@diplodoc/transform/lib/log.js';
import yfmPlugin from '@diplodoc/transform/lib/plugins/notes/index.js';
import { NoteNode } from "./const.js";
import { parserTokens } from "./parser.js";
import { getSchemaSpecs } from "./schema.js";
import { serializerTokens } from "./serializer.js";
export { NoteNode as YfmNoteNode } from "./const.js";
export { noteType, noteTitleType } from "./utils.js";
export const YfmNoteSpecs = (builder, opts) => {
    const schemaSpecs = getSchemaSpecs(opts, builder.context.get('placeholder'));
    builder
        .configureMd((md) => md.use(yfmPlugin, { log }))
        .addNode(NoteNode.Note, () => ({
        spec: schemaSpecs[NoteNode.Note],
        toMd: serializerTokens[NoteNode.Note],
        fromMd: {
            tokenSpec: parserTokens[NoteNode.Note],
        },
    }))
        .addNode(NoteNode.NoteTitle, () => ({
        spec: schemaSpecs[NoteNode.NoteTitle],
        toMd: serializerTokens[NoteNode.NoteTitle],
        fromMd: {
            tokenSpec: parserTokens[NoteNode.NoteTitle],
        },
    }))
        .addNode(NoteNode.NoteContent, () => ({
        spec: schemaSpecs[NoteNode.NoteContent],
        toMd: serializerTokens[NoteNode.NoteContent],
        fromMd: {
            tokenSpec: parserTokens[NoteNode.NoteContent],
        },
    }));
};
//# sourceMappingURL=index.js.map
