@atlaskit/editor-plugin-limited-mode
Version:
LimitedMode plugin for @atlaskit/editor-core
14 lines (13 loc) • 746 B
TypeScript
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
import type { LimitedModePlugin, LimitedModePluginState } from '../limitedModePluginType';
import { LatchPolicy } from './utils/latch-policy';
export declare const createPlugin: (api?: ExtractInjectionAPI<LimitedModePlugin>,
/**
* Replaces the policy this plugin would build for itself.
*
* Internal seam for tests that need to drive the criteria against a controlled clock and
* thresholds. Production goes through `limitedModePlugin`, which never passes one, so the
* experiment still decides whether a policy exists at all.
*/
injectedPolicy?: LatchPolicy) => SafePlugin<LimitedModePluginState>;