@atlaskit/adf-schema
Version:
Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs
33 lines (32 loc) • 1.03 kB
TypeScript
import { MarkSpec } from 'prosemirror-model';
/**
* @name annotation_mark
*/
export interface AnnotationMarkDefinition {
type: 'annotation';
attrs: AnnotationMarkAttributes;
}
export interface AnnotationMarkAttributes {
id: AnnotationId;
annotationType: AnnotationTypes;
}
export declare type AnnotationId = string;
export declare enum AnnotationTypes {
INLINE_COMMENT = "inlineComment"
}
export declare enum AnnotationMarkStates {
RESOLVED = "resolved",
ACTIVE = "active"
}
export declare type AnnotationDataAttributes = {
'data-mark-type': string;
'data-mark-annotation-type': AnnotationTypes;
'data-id': AnnotationId;
'data-mark-annotation-state'?: AnnotationMarkStates;
};
declare type BuildDataAttributesProps = AnnotationMarkAttributes & {
state?: AnnotationMarkStates | undefined | null;
};
export declare function buildDataAttributes({ id, annotationType, state, }: BuildDataAttributesProps): AnnotationDataAttributes;
export declare const annotation: MarkSpec;
export {};