UNPKG

1.38 kBTypeScriptView Raw
1import { NodeSpec } from 'prosemirror-model';
2import { LayoutColumnDefinition } from './layout-column';
3import { BreakoutMarkDefinition } from '../marks';
4/**
5 * @name layoutSection_node
6 */
7export declare type LayoutSectionBaseDefinition = {
8 type: 'layoutSection';
9 marks?: Array<BreakoutMarkDefinition>;
10 content: Array<LayoutColumnDefinition>;
11};
12/**
13 * Need duplicate `type` and `marks` to make both validator and json-schema satisfied
14 */
15/**
16 * @name layoutSection_full_node
17 */
18export declare type LayoutSectionFullDefinition = LayoutSectionBaseDefinition & {
19 type: 'layoutSection';
20 marks?: Array<BreakoutMarkDefinition>;
21 /**
22 * @minItems 2
23 * @maxItems 3
24 * @allowUnsupportedBlock true
25 */
26 content: Array<LayoutColumnDefinition>;
27};
28/**
29 * @stage 0
30 * @name layoutSection_with_single_column_node
31 */
32export declare type LayoutSectionWithSingleColumnDefinition = LayoutSectionBaseDefinition & {
33 type: 'layoutSection';
34 marks?: Array<BreakoutMarkDefinition>;
35 /**
36 * @minItems 1
37 * @maxItems 3
38 * @allowUnsupportedBlock true
39 */
40 content: Array<LayoutColumnDefinition>;
41};
42export declare type LayoutSectionDefinition = LayoutSectionFullDefinition | LayoutSectionWithSingleColumnDefinition;
43export declare const layoutSection: NodeSpec;
44export declare const layoutSectionWithSingleColumn: NodeSpec;