@atlaskit/adf-schema
Version:
Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs
51 lines (50 loc) • 1.96 kB
TypeScript
import type { ParagraphDefinition as Paragraph } from './paragraph';
import type { OrderedListDefinition as OrderedList, BulletListDefinition as BulletList } from './types/list';
import type { HeadingDefinition as Heading } from './heading';
import type { BlockCardDefinition as BlockCard } from './block-card';
import type { CodeBlockDefinition as CodeBlock } from './code-block';
import type { MediaGroupDefinition as MediaGroup } from './media-group';
import type { MediaSingleDefinition as MediaSingle } from './media-single';
import type { DecisionListDefinition as DecisionList } from './decision-list';
import type { TaskListDefinition as TaskList } from './task-list';
import type { 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 {
localId?: string;
panelColor?: string;
panelIcon?: string;
panelIconId?: string;
panelIconText?: string;
panelType: PanelType;
}
/**
* @name panel_node
*/
export interface PanelDefinition {
attrs: PanelAttributes;
/**
* @minItems 1
* @allowUnsupportedBlock true
*/
content: Array<Paragraph | Heading | OrderedList | BulletList | BlockCard | CodeBlock | MediaGroup | MediaSingle | DecisionList | TaskList | Rule>;
type: 'panel';
}
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;
export declare const extendedPanelWithLocalId: (allowCustomPanel: boolean) => import("prosemirror-model").NodeSpec;