import { Plugin } from 'prosemirror-state';
import { reactNodeViewFactory } from "../../../../../react-utils/index.js";
import { imageNodeName, imageRendererKey } from "../../const.js";
import { ImageNodeView, cnImgSizeNodeView } from "./NodeView.js";
export const imgSizeNodeViewPlugin = (deps) => new Plugin({
    key: imageRendererKey,
    state: {
        init: () => undefined,
        apply: (tr) => {
            return tr.getMeta(imageRendererKey);
        },
    },
    props: {
        nodeViews: {
            [imageNodeName]: reactNodeViewFactory(ImageNodeView, {
                isInline: true,
                reactNodeWrapperCn: cnImgSizeNodeView('wrapper'),
            })(deps),
        },
    },
});
//# sourceMappingURL=index.js.map
