function textToDocument(text) {
    if (!text) return {
        type: 'doc',
        content: []
    };
    const lines = text.split(/(?:\r\n?|\n)/);
    const paragraphs = lines.map((line)=>line.length > 0 ? {
            type: 'paragraph',
            content: [
                {
                    type: 'text',
                    text: line
                }
            ]
        } : {
            type: 'paragraph'
        });
    return {
        type: 'doc',
        content: paragraphs
    };
}
export { textToDocument };
