UNPKG

@atlaskit/editor-plugin-expand

Version:

Expand plugin for @atlaskit/editor-core

34 lines (33 loc) 1.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.expandPlugin = void 0; var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals"); var _plugin = require("./legacyExpand/plugin"); var _plugin2 = require("./singlePlayerExpand/plugin"); // Ignored via go/ees005 // eslint-disable-next-line prefer-const var expandPlugin = exports.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 (0, _plugin2.expandPlugin)({ config: options, api: api }); } else { if ((0, _expValEquals.expValEquals)('platform_editor_single_player_expand', 'isEnabled', true)) { return (0, _plugin2.expandPlugin)({ config: options, api: api }); } else { return (0, _plugin.expandPlugin)({ config: options, api: api }); } } };