<commit_before>BEST.component('famous-demos:six-surfaces', {
    tree: 'six-surfaces.html',
    behaviors: {
        '.square': {
            'size': function(size, $time) {
                var chg = (Math.sin($time / 1000) / 2) + 1;
                return [chg * size, chg * size];
            },
            'rotation-z': function($time) {
                return $time / 1000;
            },
            'origin': [0.5, 0.5],
            'position': function() {
                var wih = window.innerHeight * 0.75;
                var wiw = window.innerWidth * 0.75;
                var px = Math.floor(Math.random() * wiw);
                var py = Math.floor(Math.random() * wih);
                return [px, py];
            }
        },
        '.surface': {
            'style': function($every, key, value) {
                var hue = Math.floor(Math.random() * 240) + 140;
                return {
                    'color': 'white',
                    'text-align': 'center',
                    'font-family': 'Helvetica',
                    'font-weight': 'bold',
                    'background-color': 'hsla(' + hue + ', 80%, 60%, 0.8)',
                    'border': '1px solid black',
                    'padding-top': '20px'
                };
            }
        },

        '#circle-component' : {
            'handle-click' : function(_circleClickEvent) {
                return '_circleClickEvent';
            }
        }
    },
    events: {
        public: {
            'circle-click': function(state, event) {
                state.set('_circleClickEvent', event);
            }
        }
    },
    states: {
        size: 130,
        _circleClickEvent: null
    }
});<commit_msg>demo: affect square rotation on circle click<commit_after>BEST.component('famous-demos:six-surfaces', {
    tree: 'six-surfaces.html',
    behaviors: {
        '.square': {
            'size': function(size, $time) {
                    var chg = (Math.sin($time / 1000) / 2) + 1;
                    return [chg * size, chg * size];
            },
            'rotation': function(_isAnimating, $time) {
                if (_isAnimating)
                    return [0, 0, $time / 1000];
                else
                    return [$time / 1000, 0, 0];
            },
            'origin': [0.5, 0.5],
            'mount-point': [0.5, 0.5],
            'position': function() {
                var wih = window.innerHeight * 0.75;
                var wiw = window.innerWidth * 0.75;
                var px = Math.floor(Math.random() * wiw);
                var py = Math.floor(Math.random() * wih);
                return [px, py];
            }
        },
        '.surface': {
            'style': function($every, key, value) {
                var hue = Math.floor(Math.random() * 240) + 140;
                return {
                    'color': 'white',
                    'text-align': 'center',
                    'font-family': 'Helvetica',
                    'font-weight': 'bold',
                    'background-color': 'hsla(' + hue + ', 80%, 60%, 0.8)',
                    'border': '1px solid black',
                    'padding-top': '20px'
                };
            }
        },

        '#circle-component' : {
            'handle-click' : function(_circleClickEvent) {
                return '_circleClickEvent';
            }
        }
    },
    events: {
        public: {
            'circle-click': function(state, event) {
                state.set('_circleClickEvent', event);
                state.chain('_isAnimating').flip();
            }
        }
    },
    states: {
        size: 130,
        _isAnimating: true,
        _circleClickEvent: null
    }
});
{'fraction_non_alphanumeric': 0.14658418504572351, 'fraction_numerical': 0.023668639053254437, 'mean_word_length': 1.1622093023255815, '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': '4887269', 'n_tokens_mistral': 1137, 'n_tokens_neox': 1026, 'n_words': 215}