UNPKG

1.03 kBTypeScriptView Raw
1import { MarkSpec } from 'prosemirror-model';
2/**
3 * @name annotation_mark
4 */
5export interface AnnotationMarkDefinition {
6 type: 'annotation';
7 attrs: AnnotationMarkAttributes;
8}
9export interface AnnotationMarkAttributes {
10 id: AnnotationId;
11 annotationType: AnnotationTypes;
12}
13export declare type AnnotationId = string;
14export declare enum AnnotationTypes {
15 INLINE_COMMENT = "inlineComment"
16}
17export declare enum AnnotationMarkStates {
18 RESOLVED = "resolved",
19 ACTIVE = "active"
20}
21export declare type AnnotationDataAttributes = {
22 'data-mark-type': string;
23 'data-mark-annotation-type': AnnotationTypes;
24 'data-id': AnnotationId;
25 'data-mark-annotation-state'?: AnnotationMarkStates;
26};
27declare type BuildDataAttributesProps = AnnotationMarkAttributes & {
28 state?: AnnotationMarkStates | undefined | null;
29};
30export declare function buildDataAttributes({ id, annotationType, state, }: BuildDataAttributesProps): AnnotationDataAttributes;
31export declare const annotation: MarkSpec;
32export {};