<commit_before>import { Store } from './types';
import { OptGrid } from '../types';
import { observable, observe } from '..//helper/observable';
import { create as createData } from './data';
import { create as createColumn } from './column';
import { create as createDimension, setBodyHeight } from './dimension';
import { create as createViewport } from './viewport';
import { create as createColumnCoords } from './columnCoords';
import { create as createRowCoords } from './rowCoords';
import { create as createFocus } from './focus';
import { create as createSummary } from './summary';
import { create as createSelection } from './selection';
import { create as createRenderState } from './renderState';

export function createStore(id: number, options: OptGrid): Store {
  const {
    el,
    width,
    rowHeight,
    bodyHeight,
    heightResizable,
    minBodyHeight,
    columnOptions = {},
    keyColumnName,
    rowHeaders = [],
    copyOptions = {},
    summary: summaryOptions = {},
    selectionUnit = 'cell',
    showDummyRows = false,
    editingEvent = 'dblclick',
    scrollX,
    scrollY,
    useClientSort = true,
    pageOptions = {},
    treeColumnOptions = { name: '' },
    header = {}
  } = options;
  const { frozenBorderWidth } = columnOptions;
  const { height: summaryHeight, position: summaryPosition } = summaryOptions;
  const { height: headerHeight = 40, complexColumns = [] } = header;
  const column = createColumn({
    columns: options.columns,
    columnOptions,
    rowHeaders,
    copyOptions,
    keyColumnName,
    treeColumnOptions,
    complexColumns
  });
  const data = createData(
    Array.isArray(options.data) ? options.data : [],
    column,
    pageOptions,
    useClientSort
  );
  const dimension = createDimension({
    column,
    width,
    domWidth: el.clientWidth,
    rowHeight,
    bodyHeight,
    minBodyHeight,
    heightResizable,
    frozenBorderWidth,
    summaryHeight,
    summaryPosition,
    scrollX,
    scrollY,
    headerHeight
  });
  const columnCoords = createColumnCoords({ column, dimension });
  const rowCoords = createRowCoords({ data, dimension });
  const viewport = createViewport({
    data,<commit_msg>chore: add minRowHeight (#501)<commit_after>import { Store } from './types';
import { OptGrid } from '../types';
import { observable, observe } from '..//helper/observable';
import { create as createData } from './data';
import { create as createColumn } from './column';
import { create as createDimension, setBodyHeight } from './dimension';
import { create as createViewport } from './viewport';
import { create as createColumnCoords } from './columnCoords';
import { create as createRowCoords } from './rowCoords';
import { create as createFocus } from './focus';
import { create as createSummary } from './summary';
import { create as createSelection } from './selection';
import { create as createRenderState } from './renderState';

export function createStore(id: number, options: OptGrid): Store {
  const {
    el,
    width,
    rowHeight,
    bodyHeight,
    heightResizable,
    minRowHeight,
    minBodyHeight,
    columnOptions = {},
    keyColumnName,
    rowHeaders = [],
    copyOptions = {},
    summary: summaryOptions = {},
    selectionUnit = 'cell',
    showDummyRows = false,
    editingEvent = 'dblclick',
    scrollX,
    scrollY,
    useClientSort = true,
    pageOptions = {},
    treeColumnOptions = { name: '' },
    header = {}
  } = options;
  const { frozenBorderWidth } = columnOptions;
  const { height: summaryHeight, position: summaryPosition } = summaryOptions;
  const { height: headerHeight = 40, complexColumns = [] } = header;
  const column = createColumn({
    columns: options.columns,
    columnOptions,
    rowHeaders,
    copyOptions,
    keyColumnName,
    treeColumnOptions,
    complexColumns
  });
  const data = createData(
    Array.isArray(options.data) ? options.data : [],
    column,
    pageOptions,
    useClientSort
  );
  const dimension = createDimension({
    column,
    width,
    domWidth: el.clientWidth,
    rowHeight,
    bodyHeight,
    minBodyHeight,
    minRowHeight,
    heightResizable,
    frozenBorderWidth,
    summaryHeight,
    summaryPosition,
    scrollX,
    scrollY,
    headerHeight
  });
  const columnCoords = createColumnCoords({ column, dimension });
  const rowCoords = createRowCoords({ data, dimension });
  const viewport = createViewport({
    data,
{'fraction_non_alphanumeric': 0.11504624407850214, 'fraction_numerical': 0.0015790660951951275, 'mean_word_length': 3.434, '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': '3471476', 'n_tokens_mistral': 1237, 'n_tokens_neox': 1234, 'n_words': 352}