UNPKG

@atlaskit/adf-schema

Version:

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

35 lines (34 loc) 1.23 kB
import type { NodeSpec } from '@atlaskit/editor-prosemirror/model'; import type { BreakoutMarkDefinition } from '../marks'; import type { HeadingDefinition } from './heading'; import type { MarksObject } from './types/mark'; import type { ParagraphDefinition } from './paragraph'; export type BodiedRuleAlignment = 'start' | 'center' | 'end'; export type BodiedRuleStyle = 'solid' | 'dashed' | 'dotted' | 'sketch' | 'fade'; export interface BodiedRuleAttributes { alignment?: BodiedRuleAlignment; color?: string; localId: string; style?: BodiedRuleStyle; weight?: number; } /** * @name bodiedRule_node */ export interface BodiedRuleDefinition { attrs: BodiedRuleAttributes; /** // eslint-disable-next-line eslint-plugin-jsdoc/check-tag-names * @minItems 1 // eslint-disable-next-line eslint-plugin-jsdoc/check-tag-names * @maxItems 1 */ content: Array<HeadingDefinition | ParagraphDefinition>; type: 'bodiedRule'; } /** * @name bodiedRule_root_only_node */ export type BodiedRuleRootOnlyDefinition = BodiedRuleDefinition & MarksObject<BreakoutMarkDefinition>; export declare const bodiedRule: NodeSpec; export declare const bodiedRuleRootOnlyStage0: NodeSpec;