UNPKG

@atlaskit/adf-schema

Version:

Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs

50 lines (49 loc) 1.67 kB
import type { LayoutColumnDefinition } from './layout-column'; import type { BreakoutMarkDefinition } from '../marks'; /** * @name layoutSection_node */ export type LayoutSectionBaseDefinition = { attrs?: { localId?: string; }; content: Array<LayoutColumnDefinition>; marks?: Array<BreakoutMarkDefinition>; type: 'layoutSection'; }; /** * Need duplicate `type` and `marks` to make both validator and json-schema satisfied */ /** * @name layoutSection_full_node */ export type LayoutSectionFullDefinition = LayoutSectionBaseDefinition & { /** * @minItems 2 * @maxItems 3 * @allowUnsupportedBlock true */ content: Array<LayoutColumnDefinition>; marks?: Array<BreakoutMarkDefinition>; type: 'layoutSection'; }; /** * @stage 0 * @name layoutSection_with_single_column_node */ export type LayoutSectionWithSingleColumnDefinition = LayoutSectionBaseDefinition & { /** * @minItems 1 * @maxItems 3 * @allowUnsupportedBlock true */ content: Array<LayoutColumnDefinition>; marks?: Array<BreakoutMarkDefinition>; type: 'layoutSection'; }; export type LayoutSectionDefinition = LayoutSectionFullDefinition | LayoutSectionWithSingleColumnDefinition; export declare const layoutSection: import("prosemirror-model").NodeSpec; export declare const layoutSectionFull: import("prosemirror-model").NodeSpec; export declare const layoutSectionWithSingleColumn: import("prosemirror-model").NodeSpec; export declare const layoutSectionWithLocalId: import("prosemirror-model").NodeSpec; export declare const layoutSectionWithSingleColumnLocalId: import("prosemirror-model").NodeSpec;