UNPKG

@atlaskit/editor-plugin-ufo

Version:

Ufo plugin for @atlaskit/editor-core

20 lines 881 B
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals'; import { traceUFOInteractionOnFirstInteraction } from './pm-plugins/traceUFOInteractionOnFirstInteraction'; export const ufoPlugin = () => ({ name: 'ufo', pmPlugins() { var _process, _process$env; const isSSR = Boolean((_process = process) === null || _process === void 0 ? void 0 : (_process$env = _process.env) === null || _process$env === void 0 ? void 0 : _process$env.REACT_SSR); if (isSSR) { // This plugin is not needed in SSR environments - and uses apis which are not available in SSR internally return []; } if (expValEquals('platform_editor_abort_ufo_on_user_interaction', 'isEnabled', true)) { return [{ name: 'traceUFOInteractionOnFirstInteraction', plugin: traceUFOInteractionOnFirstInteraction }]; } return []; } });