import { jsx as _jsx } from "react/jsx-runtime";
import { BlockNoteEditor, BlockNoteSchema, defaultStyleSpecs, uploadToTmpFilesDotOrg_DEV_ONLY, } from "@endexai/blocknote-core";
import { createReactStyleSpec } from "../../schema/ReactStyleSpec.js";
const small = createReactStyleSpec({
    type: "small",
    propSchema: "boolean",
}, {
    render: (props) => {
        return _jsx("small", { ref: props.contentRef });
    },
});
const fontSize = createReactStyleSpec({
    type: "fontSize",
    propSchema: "string",
}, {
    render: (props) => {
        return (_jsx("span", { ref: props.contentRef, style: { fontSize: props.value } }));
    },
});
const schema = BlockNoteSchema.create({
    styleSpecs: {
        ...defaultStyleSpecs,
        small,
        fontSize,
    },
});
export const customReactStylesTestCases = {
    name: "custom react style schema",
    createEditor: () => {
        return BlockNoteEditor.create({
            uploadFile: uploadToTmpFilesDotOrg_DEV_ONLY,
            schema,
        });
    },
    documents: [
        {
            name: "small/basic",
            blocks: [
                {
                    type: "paragraph",
                    content: [
                        {
                            type: "text",
                            text: "This is a small text",
                            styles: {
                                small: true,
                            },
                        },
                    ],
                },
            ],
        },
        {
            name: "fontSize/basic",
            blocks: [
                {
                    type: "paragraph",
                    content: [
                        {
                            type: "text",
                            text: "This is text with a custom fontSize",
                            styles: {
                                fontSize: "18px",
                            },
                        },
                    ],
                },
            ],
        },
    ],
};
//# sourceMappingURL=customReactStyles.js.map