UNPKG

@atlaskit/editor-plugin-ufo

Version:

Ufo plugin for @atlaskit/editor-core

28 lines (27 loc) 1.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ufoPlugin = void 0; var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals"); var _traceUFOInteractionOnFirstInteraction = require("./pm-plugins/traceUFOInteractionOnFirstInteraction"); var ufoPlugin = exports.ufoPlugin = function ufoPlugin() { return { name: 'ufo', pmPlugins: function pmPlugins() { var _process; var isSSR = Boolean((_process = process) === null || _process === void 0 || (_process = _process.env) === null || _process === void 0 ? void 0 : _process.REACT_SSR); if (isSSR) { // This plugin is not needed in SSR environments - and uses apis which are not available in SSR internally return []; } if ((0, _expValEquals.expValEquals)('platform_editor_abort_ufo_on_user_interaction', 'isEnabled', true)) { return [{ name: 'traceUFOInteractionOnFirstInteraction', plugin: _traceUFOInteractionOnFirstInteraction.traceUFOInteractionOnFirstInteraction }]; } return []; } }; };