@atlaskit/editor-core
Version:
A package contains Atlassian editor core functionality
92 lines (91 loc) • 3.52 kB
TypeScript
/// <reference types="react" />
import { ComponentClass } from 'react';
import { Node } from '../../../prosemirror';
import ApplicationCard, { AppCardViewProps } from './applicationCard';
import Blockquote from './blockquote';
import BulletList from './bulletList';
import CodeBlock from './codeBlock';
import DecisionItem from './decisionItem';
import DecisionList from './decisionList';
import Doc from './doc';
import Emoji from './emoji';
import HardBreak from './hardBreak';
import Heading from './heading';
import ListItem from './listItem';
import Media from './media';
import MediaGroup from './mediaGroup';
import Mention from './mention';
import OrderedList from './orderedList';
import Panel from './panel';
import Paragraph from './paragraph';
import Rule from './rule';
import TaskItem from './taskItem';
import TaskList from './taskList';
import Table from './table';
import TableCell from './tableCell';
import TableHeader from './tableHeader';
import TableRow from './tableRow';
import UnknownBlock from './unknownBlock';
export declare const nodeToReact: {
'applicationCard': typeof ApplicationCard;
'blockquote': ComponentClass<React.HTMLProps<HTMLElement> & {
theme?: any;
innerRef?: ((instance: any) => void) | undefined;
}>;
'bulletList': ComponentClass<React.HTMLProps<HTMLUListElement> & {
theme?: any;
innerRef?: ((instance: any) => void) | undefined;
}>;
'codeBlock': typeof CodeBlock;
'decisionItem': typeof DecisionItem;
'decisionList': typeof DecisionList;
'doc': ComponentClass<React.HTMLProps<HTMLDivElement> & {
theme?: any;
innerRef?: ((instance: any) => void) | undefined;
}>;
'emoji': typeof Emoji;
'hardBreak': typeof HardBreak;
'heading': typeof Heading;
'listItem': ComponentClass<React.HTMLProps<HTMLLIElement> & {
theme?: any;
innerRef?: ((instance: any) => void) | undefined;
}>;
'media': typeof Media;
'mediaGroup': typeof MediaGroup;
'mention': typeof Mention;
'orderedList': ComponentClass<React.HTMLProps<HTMLOListElement> & {
theme?: any;
innerRef?: ((instance: any) => void) | undefined;
}>;
'panel': typeof Panel;
'paragraph': ComponentClass<React.HTMLProps<HTMLParagraphElement> & {
theme?: any;
innerRef?: ((instance: any) => void) | undefined;
}>;
'rule': typeof Rule;
'taskItem': typeof TaskItem;
'taskList': typeof TaskList;
'table': (props: any) => JSX.Element;
'tableCell': (props: any) => JSX.Element;
'tableHeader': (props: any) => JSX.Element;
'tableRow': (props: any) => JSX.Element;
'unknownBlock': typeof UnknownBlock;
};
export declare const toReact: (node: Node) => ComponentClass<any>;
export interface TextWrapper {
type: {
name: 'textWrapper';
};
content: Node[];
}
export interface NodeSimple {
type: {
name: string;
};
attrs?: any;
text?: string;
}
export declare const mergeTextNodes: (nodes: (Node | NodeSimple)[]) => (Node | TextWrapper | NodeSimple)[];
export declare const isText: (type: string) => type is "text";
export declare const isTextWrapper: (type: string) => type is "textWrapper";
export { AppCardViewProps, ApplicationCard, Blockquote, BulletList, CodeBlock, DecisionItem, DecisionList, Doc, Emoji, HardBreak, Heading, ListItem, Media, MediaGroup, Mention, OrderedList, Panel, Paragraph, Rule, TaskItem, TaskList, Table, TableCell, TableHeader, TableRow, UnknownBlock };