@atlaskit/adf-schema
Version:
Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs
50 lines (49 loc) • 1.8 kB
TypeScript
import { ParagraphDefinition as Paragraph } from './paragraph';
import { OrderedListDefinition as OrderedList } from './types/list';
import { BulletListDefinition as BulletList } from './types/list';
import { HeadingDefinition as Heading } from './heading';
import { BlockCardDefinition as BlockCard } from './block-card';
import { CodeBlockDefinition as CodeBlock } from './code-block';
import { MediaGroupDefinition as MediaGroup } from './media-group';
import { MediaSingleDefinition as MediaSingle } from './media-single';
import { DecisionListDefinition as DecisionList } from './decision-list';
import { TaskListDefinition as TaskList } from './task-list';
import { RuleDefinition as Rule } from './rule';
export declare enum PanelType {
INFO = "info",
NOTE = "note",
TIP = "tip",
WARNING = "warning",
ERROR = "error",
SUCCESS = "success",
CUSTOM = "custom"
}
export interface PanelAttributes {
panelType: PanelType;
panelIcon?: string;
panelIconId?: string;
panelIconText?: string;
panelColor?: string;
}
/**
* @name panel_node
*/
export interface PanelDefinition {
type: 'panel';
attrs: PanelAttributes;
/**
* @minItems 1
* @allowUnsupportedBlock true
*/
content: Array<Paragraph | Heading | OrderedList | BulletList | BlockCard | CodeBlock | MediaGroup | MediaSingle | DecisionList | TaskList | Rule>;
}
export interface DOMAttributes {
[propName: string]: string;
}
/**
* @name extended_panel
* @description it allows more content to be nested as compared to panel node.
* Specifically, it allows Media, action, code-block, rule and decision nodes in
* addition to content allowed inside panel
*/
export declare const extendedPanel: (allowCustomPanel: boolean) => import("prosemirror-model").NodeSpec;