Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* global VERSION */
import { registerPreset } from "@babel/standalone";
import babelPresetEnv from "@babel/preset-env";
registerPreset("env", babelPresetEnv);
export const version = VERSION;
const initialize = () => {
if (initialized) {
return;
}
initialized = true;
Babel.registerPreset('@babel/preset-react', babelPresetReact);
Babel.registerPlugin('@babel/plugin-proposal-class-properties', babelPluginProposalClassProperties);
Babel.registerPlugin('@babel/plugin-proposal-object-rest-spread', babelPluginProposalObjectRestSprerad);
Babel.registerPlugin('@babel/plugin-proposal-optional-catch-binding', babelPluginProposalOptionalCatchBinding);
Babel.registerPlugin('@babel/plugin-proposal-async-generator-functions', babelPluginProposalAsyncGeneratorFunctions);
Babel.registerPlugin('@babel/plugin-proposal-numeric-separator', babelPluginProposalNumericSeparator);
Babel.registerPlugin('@babel/plugin-transform-typescript', babelPluginTransformTypeScript);
Babel.registerPlugin('@babel/plugin-transform-modules-commonjs', babelPluginTransformModulesCommonJS);
};
import getOffset from 'dom-helpers/offset';
import PropTypes from 'prop-types';
import React, { useEffect, useReducer, useRef, useState } from 'react';
import ReactDOM, { findDOMNode } from 'react-dom';
import { LiveEditor, LiveError, LivePreview, LiveProvider } from 'react-live';
import * as ReactOverlays from 'react-overlays';
import Transition, {
ENTERED,
ENTERING,
} from 'react-transition-group/Transition';
import * as Babel from '@babel/standalone';
import { css as emotionCss } from '@emotion/core';
import emotionStyled from '@emotion/styled';
import injectCss from '../injectCss';
Babel.registerPreset('env', require('@babel/preset-env'));
Babel.registerPlugin(
'class-properties',
require('@babel/plugin-proposal-class-properties'),
);
const scope = {
useState,
useReducer,
useRef,
useEffect,
ReactDOM,
findDOMNode,
injectCss,
...ReactOverlays,
getOffset,