<commit_before>import React, { Component } from 'react';
import './style.css'

class ContentFrame extends Component {

  render() {
    return (
      <div ref={ (element) => { this._element = element}} className={"frame"}>
        <span className={'frame-edge-left'}></span>
        {this.props.children}
        <span className={'frame-edge-right'}></span>        
      </div>
    );
  }
}

export default ContentFrame;<commit_msg>added mouse based offset to content fram borders<commit_after>import React, { Component } from 'react';
import './style.css'

class ContentFrame extends Component {
  constructor(props) {
    super(props);
    this.state = {
      mouseX:0,
      mouseY:0
    }
    this.handleMouseMove = this.handleMouseMove.bind(this)
  }
  handleMouseMove(e){
    this.setState(
      {
        mouseX:e.clientX,
        mouseY:e.clientY
      }
    )
  }
  componentDidMount() {
    window.addEventListener("mousemove",this.handleMouseMove)
  }
  calculateOffset(mouseX, mouseY, maxOffsetAmount = 4){
    const halfWindowWidth = window.outerWidth / 2
    const halfWindowHeight = window.outerHeight / 2
    const x =  ((mouseX - halfWindowWidth) / halfWindowWidth) * maxOffsetAmount
    const y =  ((mouseY - halfWindowHeight) / halfWindowHeight) * maxOffsetAmount
    return({x,y})
  }
  render() {
    const offset=this.calculateOffset(this.state.mouseX,this.state.mouseY)
    return (
      <div className={"frame"}>
        <span 
          className={'frame-edge-left'}
          style={
            {
                transform:`translate(${offset.x}px, ${offset.y}px)`,
            }
          }
        >
        </span>
        {this.props.children}
        <span 
          className={'frame-edge-right'}
          style={
            {
                transform:`translate(${offset.x}px, ${offset.y}px)`,
            }
          }
        >
        </span>        
      </div>
    );
  }
}

export default ContentFrame;
{'fraction_non_alphanumeric': 0.13473360655737704, 'fraction_numerical': 0.0025614754098360654, 'mean_word_length': 2.1963993453355157, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 16, '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': '1864134', 'n_tokens_mistral': 587, 'n_tokens_neox': 583, 'n_words': 106}