@atlaskit/adf-schema
Version:
Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs
45 lines (44 loc) • 1.38 kB
TypeScript
import { NodeSpec } from 'prosemirror-model';
import { LayoutColumnDefinition } from './layout-column';
import { BreakoutMarkDefinition } from '../marks';
/**
* @name layoutSection_node
*/
export declare type LayoutSectionBaseDefinition = {
type: 'layoutSection';
marks?: Array<BreakoutMarkDefinition>;
content: Array<LayoutColumnDefinition>;
};
/**
* Need duplicate `type` and `marks` to make both validator and json-schema satisfied
*/
/**
* @name layoutSection_full_node
*/
export declare type LayoutSectionFullDefinition = LayoutSectionBaseDefinition & {
type: 'layoutSection';
marks?: Array<BreakoutMarkDefinition>;
/**
* @minItems 2
* @maxItems 3
* @allowUnsupportedBlock true
*/
content: Array<LayoutColumnDefinition>;
};
/**
* @stage 0
* @name layoutSection_with_single_column_node
*/
export declare type LayoutSectionWithSingleColumnDefinition = LayoutSectionBaseDefinition & {
type: 'layoutSection';
marks?: Array<BreakoutMarkDefinition>;
/**
* @minItems 1
* @maxItems 3
* @allowUnsupportedBlock true
*/
content: Array<LayoutColumnDefinition>;
};
export declare type LayoutSectionDefinition = LayoutSectionFullDefinition | LayoutSectionWithSingleColumnDefinition;
export declare const layoutSection: NodeSpec;
export declare const layoutSectionWithSingleColumn: NodeSpec;