<commit_before>import * as React from 'react'
import * as rs from '@respace/common'
import { findDOMNode } from 'react-dom'
import { observer } from 'mobx-react'
import EditorStore from '../store'

require('brace')
require('brace/mode/javascript')
require('brace/theme/tomorrow_night')

export type Props = rs.IComponentProps<rs.documents.ISourceCode, EditorStore>

@observer
export default class AceEditor extends React.Component<Props, void> {
  private _editor: AceAjax.Editor

  componentDidMount() {
    this._editor = ace.edit(findDOMNode(this) as HTMLElement)
    const store = this.props.component.state
    store.setEditor(this._editor)
  }

  componentWillUnmount() {
    this._editor.destroy()
  }

  render(): React.ReactElement<any> {
    const store = this.props.component.state
    const style = {
      position: 'absolute',
      left: '0px',
      overflow: 'scroll',
      top: store.toolbarHeight,
      bottom: store.statusBarHeight,
      width: this.props.component.width
    }
    return <div style={style}></div>
  }
}<commit_msg>fix: Do not use it for now<commit_after>import * as React from 'react'
import * as rs from '@respace/common'
import { findDOMNode } from 'react-dom'
import { observer } from 'mobx-react'
import EditorStore from '../store'

require('brace')
require('brace/mode/javascript')
require('brace/theme/tomorrow_night')

export type Props = rs.IComponentProps<rs.documents.ISourceCode, EditorStore>

@observer
export default class AceEditor extends React.Component<Props, void> {
  private _editor: AceAjax.Editor

  componentDidMount() {
    this._editor = ace.edit(findDOMNode(this) as HTMLElement)
    const store = this.props.component.state
    store.setEditor(this._editor)
  }

  componentWillUnmount() {
    this._editor.destroy()
  }

  render(): React.ReactElement<any> {
    const store = this.props.component.state
    const style = {
      position: 'absolute',
      left: '0px',
      overflow: 'scroll',
      top: store.toolbarHeight,
      bottom: store.statusBarHeight,
      width: '100%'
    }
    return <div style={style}></div>
  }
}
{'fraction_non_alphanumeric': 0.12410841654778887, 'fraction_numerical': 0.0023775558725630053, 'mean_word_length': 3.8256880733944953, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '2635549', 'n_tokens_mistral': 657, 'n_tokens_neox': 645, 'n_words': 154}