UNPKG

@atlaskit/editor-plugin-expand

Version:

Expand plugin for @atlaskit/editor-core

28 lines 923 B
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals'; import { expandPlugin as legacyExpandPlugin } from './legacyExpand/plugin'; import { expandPlugin as singlePlayerExpandPlugin } from './singlePlayerExpand/plugin'; // Ignored via go/ees005 // eslint-disable-next-line prefer-const export var expandPlugin = function expandPlugin(_ref) { var _ref$config = _ref.config, options = _ref$config === void 0 ? {} : _ref$config, api = _ref.api; if (options !== null && options !== void 0 && options.__livePage) { return singlePlayerExpandPlugin({ config: options, api: api }); } else { if (expValEquals('platform_editor_single_player_expand', 'isEnabled', true)) { return singlePlayerExpandPlugin({ config: options, api: api }); } else { return legacyExpandPlugin({ config: options, api: api }); } } };