UNPKG

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