import { Schema } from 'prosemirror-model';
export class SchemaSpecRegistry {
    #spec;
    #dynamicModifier;
    constructor(topNode, dynamicModifier) {
        this.#spec = { topNode, nodes: {}, marks: {} };
        this.#dynamicModifier = dynamicModifier;
    }
    addNode(name, spec) {
        const modifiedSpec = this.#dynamicModifier
            ? this.#dynamicModifier.processNodeSpec(name, spec)
            : spec;
        this.#spec.nodes[name] = modifiedSpec;
        return this;
    }
    addMark(name, spec) {
        this.#spec.marks[name] = spec;
        return this;
    }
    createSchema() {
        return new Schema(this.#spec);
    }
}
//# sourceMappingURL=SchemaSpecRegistry.js.map
