<commit_before>// @flow

/* Import singletons */
import isStyledComponent from './utils/isStyledComponent';
import css from './constructors/css';
import createGlobalStyle from './constructors/createGlobalStyle';
import keyframes from './constructors/keyframes';
import ServerStyleSheet from './models/ServerStyleSheet';

import StyleSheetManager, {
  StyleSheetContext,
  StyleSheetConsumer,
} from './models/StyleSheetManager';

/* Import components */
import ThemeProvider, { ThemeContext, ThemeConsumer } from './models/ThemeProvider';

/* Import Higher Order Components */
import withTheme from './hoc/withTheme';

/* Import hooks */
import useTheme from './hooks/useTheme';

/* Define bundle version for export */
declare var __VERSION__: string;
const version = __VERSION__;

/* Warning if you've imported this file on React Native */
if (
  process.env.NODE_ENV !== 'production' &&
  typeof navigator !== 'undefined' &&
  navigator.product === 'ReactNative'
) {
  // eslint-disable-next-line no-console
  console.warn(
    "It looks like you've imported 'styled-components' on React Native.\n" +
      "Perhaps you're looking to import 'styled-components/native'?\n" +
      'Read more about this at https://www.styled-components.com/docs/basics#react-native'
  );
}

/* Warning if there are several instances of styled-components */
if (process.env.NODE_ENV !== 'production' && typeof window !== 'undefined') {
  window['__styled-components-init__'] = window['__styled-components-init__'] || 0;

  if (window['__styled-components-init__'] === 1) {
    // eslint-disable-next-line no-console
    console.warn(
      "It looks like there are several instances of 'styled-components' initialized in this application. " +
        'This may cause dynamic styles not rendering properly, errors happening during rehydration process, ' +
        'missing theme prop, and makes your application bigger without a good reason.\n\n' +
        'See https://s-c.sh/2BAXzed for more info.'
    );
  }

  window['__styled-components-init__'] += 1;
}

/* Export everything */
export * from './secretInternals';
export {
  createGlobalStyle,
  css,
  isStyledComponent,
  keyframes,
  ServerStyleSheet,
  StyleSheetConsumer,
  StyleSheetContext,
  StyleSheetManager,
  ThemeConsumer,
  ThemeContext,
  ThemeProvider,
  useTheme,
  version,
  withTheme,
};
<commit_msg>Skip multi-instance warning in test environments (#2991)<commit_after>// @flow

/* Import singletons */
import isStyledComponent from './utils/isStyledComponent';
import css from './constructors/css';
import createGlobalStyle from './constructors/createGlobalStyle';
import keyframes from './constructors/keyframes';
import ServerStyleSheet from './models/ServerStyleSheet';

import StyleSheetManager, {
  StyleSheetContext,
  StyleSheetConsumer,
} from './models/StyleSheetManager';

/* Import components */
import ThemeProvider, { ThemeContext, ThemeConsumer } from './models/ThemeProvider';

/* Import Higher Order Components */
import withTheme from './hoc/withTheme';

/* Import hooks */
import useTheme from './hooks/useTheme';

/* Define bundle version for export */
declare var __VERSION__: string;
const version = __VERSION__;

/* Warning if you've imported this file on React Native */
if (
  process.env.NODE_ENV !== 'production' &&
  typeof navigator !== 'undefined' &&
  navigator.product === 'ReactNative'
) {
  // eslint-disable-next-line no-console
  console.warn(
    "It looks like you've imported 'styled-components' on React Native.\n" +
      "Perhaps you're looking to import 'styled-components/native'?\n" +
      'Read more about this at https://www.styled-components.com/docs/basics#react-native'
  );
}

/* Warning if there are several instances of styled-components */
if (
  process.env.NODE_ENV !== 'production' &&
  process.env.NODE_ENV !== 'test' &&
  typeof window !== 'undefined'
) {
  window['__styled-components-init__'] = window['__styled-components-init__'] || 0;

  if (window['__styled-components-init__'] === 1) {
    // eslint-disable-next-line no-console
    console.warn(
      "It looks like there are several instances of 'styled-components' initialized in this application. " +
        'This may cause dynamic styles not rendering properly, errors happening during rehydration process, ' +
        'missing theme prop, and makes your application bigger without a good reason.\n\n' +
        'See https://s-c.sh/2BAXzed for more info.'
    );
  }

  window['__styled-components-init__'] += 1;
}

/* Export everything */
export * from './secretInternals';
export {
  createGlobalStyle,
  css,
  isStyledComponent,
  keyframes,
  ServerStyleSheet,
  StyleSheetConsumer,
  StyleSheetContext,
  StyleSheetManager,
  ThemeConsumer,
  ThemeContext,
  ThemeProvider,
  useTheme,
  version,
  withTheme,
};

{'fraction_non_alphanumeric': 0.1239067055393586, 'fraction_numerical': 0.0024989587671803417, 'mean_word_length': 4.003125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3732525', 'n_tokens_mistral': 1401, 'n_tokens_neox': 1358, 'n_words': 394}