<commit_before>import React, { useMemo } from 'react';
import ThemeProvider from '@mui/styles/ThemeProvider';
import sharedDefaults, { SharedDefaults } from './sharedDefaults';
import type { Theme } from './styled';

export type FlexProviderProps = Partial<SharedDefaults>;

export const FlexContext = React.createContext<FlexProviderProps>({});

export default function FlexProvider({
  defaultUnit = sharedDefaults.defaultUnit,
  defaultSize = sharedDefaults.defaultSize,
  defaultSizes = sharedDefaults.defaultSizes,
  ...rest
}: React.PropsWithChildren<FlexProviderProps>): JSX.Element {
  const [defaults, theme] = useMemo<[FlexProviderProps, Theme]>(() => {
    const values = Object.freeze<SharedDefaults>({ defaultUnit, defaultSize, defaultSizes });
    const t = Object.freeze<Theme>({ reflexy: values });
    return [values, t];
  }, [defaultSize, defaultSizes, defaultUnit]);

  return (
    <ThemeProvider theme={theme}>
      <FlexContext.Provider value={defaults} {...rest} />;
    </ThemeProvider>
  );
}<commit_msg>Fix markup<commit_after>import React, { useMemo } from 'react';
import ThemeProvider from '@mui/styles/ThemeProvider';
import sharedDefaults, { SharedDefaults } from './sharedDefaults';
import type { Theme } from './styled';

export type FlexProviderProps = Partial<SharedDefaults>;

export const FlexContext = React.createContext<FlexProviderProps>({});

export default function FlexProvider({
  defaultUnit = sharedDefaults.defaultUnit,
  defaultSize = sharedDefaults.defaultSize,
  defaultSizes = sharedDefaults.defaultSizes,
  ...rest
}: React.PropsWithChildren<FlexProviderProps>): JSX.Element {
  const [defaults, theme] = useMemo<[FlexProviderProps, Theme]>(() => {
    const values = Object.freeze<SharedDefaults>({ defaultUnit, defaultSize, defaultSizes });
    const t = Object.freeze<Theme>({ reflexy: values });
    return [values, t];
  }, [defaultSize, defaultSizes, defaultUnit]);

  return (
    <ThemeProvider theme={theme}>
      <FlexContext.Provider value={defaults} {...rest} />
    </ThemeProvider>
  );
}
{'fraction_non_alphanumeric': 0.1345966958211856, 'fraction_numerical': 0.0, 'mean_word_length': 5.315950920245399, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '7208363', 'n_tokens_mistral': 598, 'n_tokens_neox': 567, 'n_words': 139}