<commit_before>/*
 * The top level Grid component
 * Only used once per page
 */
import React, {Component, PropTypes} from 'react';
import Column from './Column';
import Style from './util/Style';
import eventListener from 'eventlistener';
import gridContext from './util/context';
import getThreshold from './util/getThreshold';
import {validBreakpoint, validBreakpoints} from './util/validators';

/*
 * A patch:
 * shouldComponentUpdate() can block context updates
 * so we need to add a fallback method for
 * updating interested components.
 * When React offers a better way, this should be removed
 */
import {updateObservers} from './util/handleStaleContext';
let breakCount = 0;

export default class Grid extends Component {
  static propTypes = {
    breakpoints: validBreakpoints,
    children: PropTypes.any,
    className: PropTypes.string,
    columnWidth: PropTypes.number,
    flexible: PropTypes.oneOfType([PropTypes.bool, PropTypes.array]),
    gutterWidth: PropTypes.number,
    initialBreakpoint: validBreakpoint,
    onChange: PropTypes.func
  };

  static childContextTypes = gridContext;

  static defaultProps = {
    onChange() {},
    columnWidth: 60,
    gutterWidth: 20,
    breakpoints: [4, 8, 12, 16],
    flexible: [4]
  };<commit_msg>comments<commit_after>/*
 * The top level Grid component
 * Only used once per page
 */
import React, {Component, PropTypes} from 'react';
import Column from './Column';
import Style from './util/Style';
import eventListener from 'eventlistener';
import gridContext from './util/context';
import getThreshold from './util/getThreshold';
import {validBreakpoint, validBreakpoints} from './util/validators';

/*
 * A patch:
 * shouldComponentUpdate() can block context updates
 * so we need to add a fallback method for
 * updating interested components.
 * When React offers a better way, this should be removed
 */
let breakCount = 0; // everytime grid changes, increment so we can check for staleness
import {updateObservers} from './util/handleStaleContext';

export default class Grid extends Component {
  static propTypes = {
    breakpoints: validBreakpoints,
    children: PropTypes.any,
    className: PropTypes.string,
    columnWidth: PropTypes.number,
    flexible: PropTypes.oneOfType([PropTypes.bool, PropTypes.array]),
    gutterWidth: PropTypes.number,
    initialBreakpoint: validBreakpoint,
    onChange: PropTypes.func
  };

  static childContextTypes = gridContext;

  static defaultProps = {
    onChange() {},
    columnWidth: 60,
    gutterWidth: 20,
    breakpoints: [4, 8, 12, 16],
    flexible: [4]
  };
{'fraction_non_alphanumeric': 0.10370084811102544, 'fraction_numerical': 0.009252120277563608, 'mean_word_length': 4.169322709163347, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7074973', 'n_tokens_mistral': 712, 'n_tokens_neox': 712, 'n_words': 250}