UNPKG

@tinacms/toolkit

Version:

Tina is a lightweight but powerful toolkit for creating a site editing ui with javascript components. Tina surfaces superpowers for dev’s to create, expand on and customize a simple yet intuitive ui for editing content.

39 lines (38 loc) 1.03 kB
/// <reference types="react" /> export declare type EmptyTextElement = { type: 'text'; text: ''; }; export declare type PositionItem = { line?: number | null; column?: number | null; offset?: number | null; _index?: number | null; _bufferIndex?: number | null; }; export declare type Position = { start: PositionItem; end: PositionItem; }; export declare type InvalidMarkdownElement = { type: 'invalid_markdown'; value: string; message: string; position?: Position; children: [EmptyTextElement]; }; declare type ErrorType = { message: string; position?: { startColumn: number; endColumn: number; startLineNumber: number; endLineNumber: number; }; }; export declare const buildError: (element: InvalidMarkdownElement) => ErrorType; export declare const buildErrorMessage: (element: InvalidMarkdownElement) => string; export declare function ErrorMessage({ error }: { error: InvalidMarkdownElement; }): JSX.Element; export {};