<commit_before>/** @jsx React.DOM */
(function(Perseus) {

var ItemEditor = Perseus.ItemEditor;
var ItemRenderer = Perseus.ItemRenderer;
var CombinedHintsEditor = Perseus.CombinedHintsEditor;

Perseus.EditorPage = React.createClass({

    render: function() {

        return <div id="perseus" className="framework-perseus">
            <ItemEditor
                    ref="itemEditor"
                    question={this.props.question}
                    answerArea={this.props.answerArea}
                    onChange={this.handleChange} />

            <CombinedHintsEditor
                    ref="hintsEditor"
                    hints={this.props.hints}
                    onChange={this.handleChange} />
        </div>;

    },

    componentDidMount: function() {
        this.rendererMountNode = document.createElement("div");
        this.updateRenderer();
    },

    updateRenderer: function(cb) {
        var rendererConfig = _({
            item: _(this.props).pick("question", "hints", "answerArea"),
            initialHintsVisible: 0  /* none; to be displayed below */
        }).extend(
            _(this.props).pick("workAreaSelector",
                               "solutionAreaSelector",
                               "hintsAreaSelector")
        );

        this.renderer = React.renderComponent(
            Perseus.ItemRenderer(rendererConfig),
            this.rendererMountNode,
            cb);
    },
<commit_msg>Revert renderer props to editor.toJSON<commit_after>/** @jsx React.DOM */
(function(Perseus) {

var ItemEditor = Perseus.ItemEditor;
var ItemRenderer = Perseus.ItemRenderer;
var CombinedHintsEditor = Perseus.CombinedHintsEditor;

Perseus.EditorPage = React.createClass({

    render: function() {

        return <div id="perseus" className="framework-perseus">
            <ItemEditor
                    ref="itemEditor"
                    question={this.props.question}
                    answerArea={this.props.answerArea}
                    onChange={this.handleChange} />

            <CombinedHintsEditor
                    ref="hintsEditor"
                    hints={this.props.hints}
                    onChange={this.handleChange} />
        </div>;

    },

    componentDidMount: function() {
        this.rendererMountNode = document.createElement("div");
        this.updateRenderer();
    },

    updateRenderer: function(cb) {
        var rendererConfig = _({
            item: this.toJSON(true),
            initialHintsVisible: 0  /* none; to be displayed below */
        }).extend(
            _(this.props).pick("workAreaSelector",
                               "solutionAreaSelector",
                               "hintsAreaSelector")
        );

        this.renderer = React.renderComponent(
            Perseus.ItemRenderer(rendererConfig),
            this.rendererMountNode,
            cb);
    },

{'fraction_non_alphanumeric': 0.10968413745227351, 'fraction_numerical': 0.0006942034015966678, 'mean_word_length': 1.8117073170731708, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '4359720', 'n_tokens_mistral': 763, 'n_tokens_neox': 736, 'n_words': 122}