UNPKG

@atlaskit/editor-plugin-track-changes

Version:

ShowDiff plugin for @atlaskit/editor-core

17 lines (16 loc) 908 B
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin'; import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types'; import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model'; import { PluginKey } from '@atlaskit/editor-prosemirror/state'; import type { TrackChangesPlugin } from '../trackChangesPluginType'; import { InvertableStep } from './invertableStep'; export declare const trackChangesPluginKey: PluginKey<TrackChangesPluginState>; type TrackChangesPluginState = { allocations: Set<number>; isShowDiffAvailable: boolean; shouldChangesBeDisplayed: boolean; steps: InvertableStep[]; }; export declare const getBaselineFromSteps: (doc: PMNode, steps: InvertableStep[]) => PMNode | undefined; export declare const createTrackChangesPlugin: (api: ExtractInjectionAPI<TrackChangesPlugin> | undefined) => SafePlugin<TrackChangesPluginState>; export {};