UNPKG

@atlaskit/adf-schema

Version:

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

44 lines (43 loc) 1.47 kB
import type { AlignmentMarkDefinition, IndentationMarkDefinition } from '../marks'; import type { MarksObject, NoMark } from './types/mark'; import type { Inline } from './types/inline-content'; import type { NodeSpec } from '@atlaskit/editor-prosemirror/model'; /** * @name heading_node */ export interface HeadingBaseDefinition { attrs: { /** // eslint-disable-next-line eslint-plugin-jsdoc/check-tag-names * @minimum 1 // eslint-disable-next-line eslint-plugin-jsdoc/check-tag-names * @maximum 6 */ level: number; /** * An optional UUID for unique identification of the node */ localId?: string; }; /** // eslint-disable-next-line eslint-plugin-jsdoc/check-tag-names * @allowUnsupportedInline true */ content?: Array<Inline>; marks?: Array<any>; type: 'heading'; } /** * @name heading_with_no_marks_node */ export type HeadingDefinition = HeadingBaseDefinition & NoMark; /** * @name heading_with_alignment_node */ export type HeadingWithAlignmentDefinition = HeadingBaseDefinition & MarksObject<AlignmentMarkDefinition>; /** * @name heading_with_indentation_node */ export type HeadingWithIndentationDefinition = HeadingBaseDefinition & MarksObject<IndentationMarkDefinition>; export type HeadingWithMarksDefinition = HeadingWithAlignmentDefinition | HeadingWithIndentationDefinition; export declare const heading: NodeSpec;