UNPKG

1.3 kBTypeScriptView Raw
1import { NodeSpec } from 'prosemirror-model';
2import { Inline, MarksObject, NoMark } from './doc';
3import { AlignmentMarkDefinition, IndentationMarkDefinition } from '../marks';
4/**
5 * @name paragraph_node
6 */
7export interface ParagraphBaseDefinition {
8 type: 'paragraph';
9 /**
10 * @allowUnsupportedInline true
11 */
12 content?: Array<Inline>;
13 marks?: Array<any>;
14}
15/**
16 * @name paragraph_with_no_marks_node
17 */
18export declare type ParagraphDefinition = ParagraphBaseDefinition & NoMark;
19/**
20 * NOTE: Need this because TS is too smart and inline everything.
21 * So we need to give them separate identity.
22 * Probably there's a way to solve it but that will need time and exploration.
23 * // http://bit.ly/2raXFX5
24 * type T1 = X | Y
25 * type T2 = A | T1 | B // T2 = A | X | Y | B
26 */
27/**
28 * @name paragraph_with_alignment_node
29 */
30export declare type ParagraphWithAlignmentDefinition = ParagraphBaseDefinition & MarksObject<AlignmentMarkDefinition>;
31/**
32 * @name paragraph_with_indentation_node
33 */
34export declare type ParagraphWithIndentationDefinition = ParagraphBaseDefinition & MarksObject<IndentationMarkDefinition>;
35export declare type ParagraphWithMarksDefinition = ParagraphWithAlignmentDefinition | ParagraphWithIndentationDefinition;
36export declare const paragraph: NodeSpec;