@atlaskit/editor-core
Version:
A package contains Atlassian editor core functionality
18 lines (17 loc) • 891 B
JavaScript
import createUniversalPresetInternal from '../presets/universal';
import { createFeatureFlagsFromProps } from '../utils/feature-flags-from-props';
import { getDefaultPresetOptionsFromEditorProps } from './create-plugins-list';
// Separate file, we should not accidentally import this into the `ComposableEditor`
// otherwise it will blow up the bundle size.
export function createUniversalPreset(_ref) {
var props = _ref.props,
prevProps = _ref.prevProps,
initialPluginConfiguration = _ref.initialPluginConfiguration;
return createUniversalPresetInternal({
appearance: props.appearance,
props: getDefaultPresetOptionsFromEditorProps(props),
initialPluginConfiguration: initialPluginConfiguration,
featureFlags: createFeatureFlagsFromProps(props.featureFlags),
prevAppearance: prevProps === null || prevProps === void 0 ? void 0 : prevProps.appearance
});
}