[
  {
    "path": ".gitignore",
    "content": ".DS_Store\nnpm-debug.log\nnode_modules\nlogs\n*.log*\ntmp\n"
  },
  {
    "path": "lib/actions.js",
    "content": "'use babel';\n\nimport path from 'path';\nimport play from 'play';\n\nlet tickSound = path.resolve(__dirname, '../assets/sounds/1.wav');\nlet tickSound2 = path.resolve(__dirname, '../assets/sounds/2.wav');\n\nlet lastValue = null;\nlet lastTime = 0;\nlet tick = (value, accent) => {\n\n    if (lastValue != value) {\n        let now = Date.now();\n        if (accent || now - lastTime > 50) {\n            lastTime  = now;\n            lastValue = value;\n            if (accent) {\n                play.sound(tickSound);\n            }\n            else {\n                play.sound(tickSound2);\n            }\n        }\n    }\n\n};\n\n\nexport default function actions(message) {\n\n    // console.log(message.data);\n\n    // TODO\n    // col 1 : @media with current media indicator\n    // % / px\n    // col 6 : bg color img linear gradient\n    // col 8 : all value\n\n    if (message.data[0] === 176 && message.data[1] === 42 && message.data[2] === 127) {\n        // STOP\n        this.deleteLine();\n    }\n    if (message.data[0] === 176 && message.data[1] === 58 && message.data[2] === 127) {\n        // LEFT\n        this.focusSelector(-1);\n    }\n    if (message.data[0] === 176 && message.data[1] === 59 && message.data[2] === 127) {\n        // RIGHT\n        this.focusSelector(1);\n    }\n\n\n    if (message.data[0] === 176 && message.data[2] === 127) {\n        // COLUMN 2 BUTTONS POSITION\n\n        var values = {\n            33: 'absolute',\n            49: 'relative',\n            65: 'absolute'\n        };\n        var position = values[message.data[1]];\n        if (message.data[1] === 65) {\n            this.addLine('position', function(node) {\n                return 'absolute 50% auto auto 50%';\n            }, { focus: true, cb: function() {\n                this.addLine('transform', function(node) {\n                    return 'translateX(-50%) translateY(-50%)';\n                }, { focus: true });\n            }.bind(this)});\n        }\n        else if (position) {\n            this.getFocusNode(function(node) {\n                if (node && node.type === 'decl' && node.prop === 'position' && node.value.split(' ')[0] === position) {\n                    this.addLine('position', function() { return position; }, { focus: true });\n                }\n                else {\n                    this.addLine('position', function(node) {\n                        var value = '';\n                        if (node) {\n                            value = node.value.split(' ');\n                            value.shift();\n                            value = value.join(' ');\n                        }\n                        if (value) {\n                            value = ' ' + value;\n                        }\n                        return position + value;\n                    }, { focus: true });\n                }\n            }.bind(this));\n        }\n\n    }\n    if (message.data[0] === 176 && message.data[1] === 1) {\n        // COLUMN 2 SLIDER POSITION\n\n        var px = Math.round(message.data[2] / 127 * 64);\n\n        this.addLine('position', function(node) {\n            var position = !node ? 'relative' : node.value.split(' ')[0];\n            px = px !== 0 ? px + 'px' : px;\n            tick(position + ' ' + px, px === 0);\n            return position + ' ' + px;\n        });\n\n    }\n    // if (message.data[0] === 176 && message.data[1] === 17) {\n    //     // COLUMN 2 ORIENTATION POSITION\n    //     // TODO\n    //\n    //     if (message.data[2] === 127) {\n    //         // LEFT\n    //\n    //         this.addLine('position', function(node) {\n    //             var position = !node ? 'relative' : node.value.split(' ')[0];\n    //             var value = '';\n    //             if (node) {\n    //                 value = node.value.split(' ');\n    //                 value.shift();\n    //                 if (value.length === 0) {\n    //                     value = '0 0';\n    //                 }\n    //                 else if (value.length === 1) {\n    //                     value = value[0] + ' ' + value[0];\n    //                 }\n    //                 else {\n    //                     value = value[0] + ' ' + value[1];\n    //                 }\n    //             }\n    //             if (value) {\n    //                 value = ' ' + value;\n    //             }\n    //             return position + value;\n    //         });\n    //     }\n    //     if (message.data[2] === 1 || message.data[2] === 65) {\n    //         // MIDDLE\n    //\n    //         this.addLine('position', function(node) {\n    //             var position = !node ? 'relative' : node.value.split(' ')[0];\n    //             var value = '';\n    //             if (node) {\n    //                 value = node.value.split(' ');\n    //                 value.shift();\n    //                 if (value.length === 0) {\n    //                     value = '0';\n    //                 }\n    //                 else {\n    //                     value = value[0];\n    //                 }\n    //             }\n    //             if (value) {\n    //                 value = ' ' + value;\n    //             }\n    //             return position + value;\n    //         });\n    //     }\n    //     if (message.data[2] === 63) {\n    //         // RIGHT\n    //\n    //         this.addLine('position', function(node) {\n    //             var position = !node ? 'relative' : node.value.split(' ')[0];\n    //             var value = '';\n    //             if (node) {\n    //                 value = node.value.split(' ');\n    //                 value.shift();\n    //                 if (value.length === 0) {\n    //                     value = '0 0';\n    //                 }\n    //                 else if (value.length === 1) {\n    //                     value = value[0] + ' ' + value[0];\n    //                 }\n    //                 else {\n    //                     value = value[0] + ' ' + value[1];\n    //                 }\n    //             }\n    //             if (value) {\n    //                 value = ' ' + value;\n    //             }\n    //             return position + value;\n    //         });\n    //     }\n    //\n    // }\n\n\n    if (message.data[0] === 176 && message.data[2] === 127) {\n        // COLUMN 3 BUTTONS DISPLAY\n\n        var values = {\n            34: 'block',\n            50: 'inline-block',\n            66: 'flex'\n        };\n        var display = values[message.data[1]];\n        if (display) {\n            this.addLine('display', function() { return display; }, { focus: true });\n        }\n\n    }\n    if (message.data[0] === 176 && message.data[1] === 2) {\n        // COLUMN 3 SLIDER DISPLAY\n\n        var px = Math.round(message.data[2] / 127 * 66);\n        if (px >= 65) { px = '100%'; }\n        else if (px !== 0) { px = px + 'px'; }\n        tick(px, (px === 0 || px === '100%'));\n        this.addLine('size', function(node) { return px; });\n\n    }\n\n\n    if (message.data[0] === 176 && message.data[2] === 127) {\n        // COLUMN 4 BUTTONS MARGIN/PADDING\n\n        var props = {\n            35: 'margin',\n            51: 'padding'\n        };\n        var prop = props[message.data[1]];\n        if (prop) {\n            this.addLine(prop, function(node) {\n                var value = !node ? '0' : node.value;\n                return value;\n            }, { focus: true });\n        }\n\n    }\n    if (message.data[0] === 176 && message.data[1] === 3) {\n        // COLUMN 4 SLIDER MARGIN/PADDING\n\n        var px = Math.round(message.data[2] / 127 * 64);\n        px = px !== 0 ? px + 'px' : px;\n        this.getFocusNode(function(node) {\n            if (node && node.type === 'decl') {\n                if (node.prop === 'margin' || node.prop === 'padding') {\n                    tick(px, (px === 0));\n                    this.addLine(node.prop, function() { return px; });\n                }\n            }\n        }.bind(this));\n\n    }\n\n\n    if (message.data[0] === 176 && message.data[2] === 127) {\n        // COLUMN 5 BUTTONS FONTS WEIGHT\n\n        var values = {\n            36: '500',\n            52: '400',\n            68: '300'\n        };\n        var weight = values[message.data[1]];\n        if (weight) {\n            this.getFocusNode(function(node) {\n                if (node && node.type === 'decl' && node.prop === 'position' && node.value.split(' ')[0] === position) {\n                    this.addLine('font', function() { return 'title ' + weight + ' 16px'; }, { focus: true });\n                }\n                else {\n                    this.addLine('font', function(node) {\n                        var px = '16px';\n                        if (node) {\n                            var splitted = node.value.split(' ');\n                            px = splitted[splitted.length - 1];\n                        }\n                        return 'title ' + weight + ' ' + px;\n                    }, { focus: true });\n                }\n            }.bind(this));\n        }\n\n    }\n    if (message.data[0] === 176 && message.data[1] === 4) {\n        // COLUMN 5 SLIDER FONT SIZE\n\n        var px = Math.round(message.data[2] / 127 * 10) + 12;\n\n        px = px !== 0 ? px + 'px' : px;\n        this.addLine('font', function(node) {\n            var font = ['title', 'regular', 0];\n            if (node) {\n                font = node.value.split(' ');\n            }\n            font[font.length - 1] = px;\n            let result = font.join(' ');\n            tick(result, (px === 0));\n            return result;\n        });\n\n    }\n\n    if (message.data[0] === 176 && message.data[2] === 127) {\n        // COLUMN 6 BUTTONS TRANSITION\n\n        var values = {\n            37: '0.1s',\n            53: '0.2s',\n            69: '0.3s'\n        };\n        var transition = values[message.data[1]];\n        if (transition) {\n            this.addLine('transition', function() { return transition; }, { focus: true });\n        }\n\n    }\n    if (message.data[0] === 176 && message.data[1] === 5) {\n        // COLUMN 6 SLIDER TRANSITION\n\n        var sec = Math.round(Math.round(message.data[2] / 127 * 3 / 10 * 100) * 0.02 * 100) / 100;\n        sec = sec !== 0 ? sec + 's' : sec;\n        tick(sec, (sec === 0));\n        this.addLine('transition', function(node) { return sec; });\n\n    }\n\n};\n"
  },
  {
    "path": "lib/add-line.js",
    "content": "'use babel';\n\nvar emptyLine = false;\n\nimport postcss from 'postcss';\nimport order from './order';\n\nvar timer = {};\n\nfunction timeout(prop) {\n    if (timer[prop].prop, timer[prop].value) {\n        set(timer[prop].prop, timer[prop].value, timer[prop].options);\n        timer[prop] = {\n            time: Date.now() + 100,\n            prop: null,\n            value: null,\n            options: null,\n            timeout: null\n        };\n    }\n}\n\nexport default function focusSelector(prop, value, options) {\n\n    if (!timer[prop]) {\n        set(prop, value, options);\n        timer[prop] = {\n            time: Date.now() + 100,\n            prop: null,\n            value: null,\n            options: null,\n            timeout: null\n        };\n    }\n    else {\n        var rel = timer[prop].time - Date.now();\n        if (rel > 0) {\n            timer[prop].prop = prop;\n            timer[prop].value = value;\n            if (timer[prop].timeout) {\n                clearTimeout(timer[prop].timeout);\n            }\n            timer[prop].timeout = setTimeout(timeout.bind(null, prop), rel);\n        }\n        else {\n            set(prop, value, options);\n            timer[prop] = {\n                time: Date.now() + 100,\n                prop: null,\n                value: null,\n                options: null,\n                timeout: null\n            };\n        }\n    }\n\n};\n\nfunction set(prop, value, opts) {\n\n    var options = opts || {};\n\n    var editor = atom.workspace.getActiveTextEditor();\n    if (!editor) {\n        return;\n    }\n\n    var cursor = editor.cursors[0];\n    var cursorPosition = editor.getCursorBufferPosition();\n\n    var css = editor.getText();\n    postcss([]).process(css, { from: undefined }).then(function(res) {\n\n        var currentNode = null;\n\n        var propPos = [0, 0];\n        for (var h = 0; h < order.length; h++) {\n            var index = order[h].indexOf(prop);\n            if (index > -1) {\n                propPos = [h, index];\n                break;\n            }\n        }\n        var propDist = (propPos[0] * 100 + propPos[1]);\n\n        for (var i = 0; i < res.root.nodes.length; i++) {\n\n            var node = res.root.nodes[i];\n            if (typeof node.selector === 'string') {\n\n                node.selectorHeight = node.selector.split(\"\\n\").length;\n                if (node.nodes[0]) {\n                    node.startWhiteLine = node.nodes[0].source.start.line - (node.source.start.line + node.selectorHeight);\n                }\n                else {\n                    node.startWhiteLine = 0;\n                }\n                if (node.nodes[node.nodes.length - 1]) {\n                    node.endWhiteLine = (node.source.end.line - 1) - node.nodes[node.nodes.length - 1].source.end.line;\n                }\n                else {\n                    node.endWhiteLine = 0;\n                }\n\n                node.properties = {};\n\n                for (var j = 0; j < node.nodes.length; j++) {\n                    if (node.nodes[j].type === 'decl') {\n                        node.properties[node.nodes[j].prop] = j;\n                    }\n                }\n\n                if (cursorPosition.row >= node.source.start.line && cursorPosition.row <= node.source.end.line) {\n                    currentNode = i;\n                }\n\n            }\n\n        }\n\n        if (currentNode !== null) {\n\n            currentNode = res.root.nodes[currentNode];\n\n            var dist = null;\n            var dest = null;\n            var toLine = 1;\n            if (typeof currentNode.properties[prop] !== 'undefined') {\n\n                var node = currentNode.nodes[currentNode.properties[prop]];\n\n                var newValue = value(node);\n\n                if (node.value == newValue && !options.focus) {\n                    timer[prop].time = 0;\n                    if (options.cb) { options.cb(); }\n                    return;\n                }\n\n                var diff = (node.source.end.line - 1) - cursorPosition.row;\n                if (diff > 0) {\n                    cursor.moveDown(diff);\n                }\n                else if (diff < 0) {\n                    cursor.moveUp(Math.abs(diff));\n                }\n                cursor.moveToEndOfLine();\n                editor.deleteToBeginningOfLine();\n\n                var newCursorPosition = editor.getCursorBufferPosition();\n                var tab = newCursorPosition.column === 0 ? \"\\t\" : '';\n                editor.insertText(tab + prop + ': ' + newValue + ';');\n                editor.moveLeft();\n\n                if (options.cb) { options.cb(); }\n\n            }\n            else {\n\n                for (var a = 0; a < order.length; a++) {\n                    for (var b = 0; b < order[a].length; b++) {\n                        var item = order[a][b];\n                        if (typeof currentNode.properties[item] !== 'undefined') {\n\n                            for (var h = 0; h < order.length; h++) {\n                                var index = order[h].indexOf(item);\n                                if (index > -1) {\n                                    var newDist = [h, index];\n                                    break;\n                                }\n                            }\n\n                            if (dist === null || Math.abs(propDist - (dist[0] * 100 + dist[1])) > Math.abs(propDist - (newDist[0] * 100 + newDist[1]))) {\n                                dist = [newDist[0], newDist[1]];\n                                dest = item;\n                            }\n\n                        }\n                    }\n                }\n\n                if (dist) {\n                    if ((dist[0] * 100 + dist[1]) < propDist) {\n                        toLine = 1;\n                    }\n                    else {\n                        toLine = -1;\n                    }\n                    var insertLine = propPos[0] === dist[0] ? false : true;\n                }\n                else {\n                    toLine = 0;\n                }\n\n                var ref;\n                if (dest) {\n                    var ref = currentNode.nodes[currentNode.properties[dest]];\n                }\n                else {\n                    ref = {\n                        source: {\n                            start: {\n                                line: currentNode.source.start.line - 1\n                            },\n                            end: {\n                                line: currentNode.source.start.line + 1\n                            }\n                        }\n                    };\n                }\n\n                var diff;\n                if (toLine < 0) {\n                    diff = (ref.source.start.line - 2) - cursorPosition.row;\n                }\n                else {\n                    diff = (ref.source.end.line - 1) - cursorPosition.row;\n                }\n\n                if (currentNode.selectorHeight && !currentNode.nodes.length) {\n                    diff += currentNode.selectorHeight - 1;\n                }\n\n                if (diff > 0) {\n                    cursor.moveDown(diff);\n                }\n                else if (diff < 0) {\n                    cursor.moveUp(Math.abs(diff));\n                }\n                cursor.moveToEndOfLine();\n                if (currentNode.nodes.length || emptyLine) {\n                    editor.insertNewlineBelow();\n                }\n                if (insertLine && toLine < 0 && emptyLine) {\n                    editor.insertNewlineBelow();\n                    cursor.moveUp();\n                }\n                if (insertLine && toLine > 0 && emptyLine) {\n                    editor.insertNewlineBelow();\n                }\n\n                var newCursorPosition = editor.getCursorBufferPosition();\n                var tab = newCursorPosition.column === 0 ? \"\\t\" : '';\n\n                editor.insertText(tab + prop + ': ' + value(null) + ';');\n                editor.moveLeft();\n\n                if (options.cb) { options.cb(); }\n\n            }\n\n        }\n\n    });\n\n}\n"
  },
  {
    "path": "lib/delete-line.js",
    "content": "'use babel';\n\nexport default function deleteLine() {\n\n    var editor = atom.workspace.getActiveTextEditor();\n\n    if (editor) {\n        var cursor = editor.cursors[0];\n        cursor.moveToEndOfLine();\n        editor.deleteToBeginningOfLine();\n        editor.delete();\n    }\n\n};\n"
  },
  {
    "path": "lib/focus-selector.js",
    "content": "'use babel';\n\nimport postcss from 'postcss';\n\nexport default function focusSelector(index) {\n\n    var editor = atom.workspace.getActiveTextEditor();\n    if (!editor) {\n        return;\n    }\n\n    var cursor = editor.cursors[0];\n    var cursorPosition = editor.getCursorBufferPosition();\n\n    var css = editor.getText();\n    postcss([]).process(css, { from: undefined }).then(function(res) {\n\n        var currentNode = 0;\n        for (var i = 0; i < res.root.nodes.length; i++) {\n            var node = res.root.nodes[i];\n            if (cursorPosition.row >= node.source.start.line && cursorPosition.row <= node.source.end.line) {\n                currentNode = i;\n                break;\n            }\n        }\n\n        var focusNode = currentNode + index;\n\n        if (typeof res.root.nodes[focusNode] !== 'undefined') {\n\n            var node = res.root.nodes[focusNode];\n\n            var dest = node.source.end.line;\n            if (node.nodes[0]) {\n                dest = node.nodes[0].source.start.line;\n            }\n\n            var diff = (dest - 1) - cursorPosition.row;\n            if (diff > 0) {\n                cursor.moveDown(diff);\n            }\n            else if (diff < 0) {\n                cursor.moveUp(Math.abs(diff));\n            }\n            cursor.moveToEndOfLine();\n\n        }\n\n    });\n\n};\n"
  },
  {
    "path": "lib/get-focus-node.js",
    "content": "'use babel';\n\nimport postcss from 'postcss';\n\nexport default function getFocusNode(cb) {\n\n    var editor = atom.workspace.getActiveTextEditor();\n    if (!editor) {\n        return;\n    }\n\n    var cursor = editor.cursors[0];\n    var cursorPosition = editor.getCursorBufferPosition();\n\n    var css = editor.getText();\n    postcss([]).process(css, { from: undefined }).then(function(res) {\n\n        var currentNode = 0;\n        for (var i = 0; i < res.root.nodes.length; i++) {\n            var node = res.root.nodes[i];\n            if (cursorPosition.row >= node.source.start.line && cursorPosition.row <= node.source.end.line) {\n                currentNode = i;\n                break;\n            }\n        }\n        currentNode = res.root.nodes[currentNode];\n\n        var focused = null;\n        for (var i = 0; i < currentNode.nodes.length; i++) {\n            var node = currentNode.nodes[i];\n            if (cursorPosition.row + 1 >= node.source.start.line && cursorPosition.row + 1 <= node.source.end.line) {\n                focused = node;\n                break;\n            }\n        }\n        cb(focused);\n\n    });\n\n};\n"
  },
  {
    "path": "lib/index.js",
    "content": "'use babel';\n\nimport { CompositeDisposable } from 'atom';\n\nimport actions from './actions';\nimport getFocusNode from './get-focus-node';\nimport focusSelector from './focus-selector';\nimport addLine from './add-line';\nimport deleteLine from './delete-line';\n\nvar finalOutput;\nexport default {\n\n    subscriptions: null,\n    midi: null,\n\n    activate(state) {\n\n        this.subscriptions = new CompositeDisposable();\n\n        this.subscriptions.add(atom.commands.add('atom-workspace', {\n            'midi:convert': () => this.convert()\n        }));\n\n        if (navigator.requestMIDIAccess) {\n            navigator.requestMIDIAccess({\n                sysex: true\n            }).then(function(midiAccess) {\n\n                var inputs = midiAccess.inputs.values();\n                for (var input = inputs.next(); input && !input.done; input = inputs.next()) {\n                    input.value.onmidimessage = actions.bind(this);\n                }\n\n                var outputs = midiAccess.outputs.values();\n                for (var output = outputs.next(); output && !output.done; output = outputs.next()) {\n                    finalOutput = output;\n                    // Inquiry Message Request\n                    finalOutput.value.send([0xF0,0x7E,0x7F,0x06,0x01,0xF7]);\n                    // (4) Mode Request\n                    finalOutput.value.send([0xF0,0x42,0x40,0x00,0x01,0x13,0x00,0x1F,0x12,0x00,0xF7]);\n                    // Inquiry Message Request\n                    finalOutput.value.send([0xF0,0x7E,0x7F,0x06,0x01,0xF7]);\n                    // (5) Current Scene Data Dump\n                    finalOutput.value.send([0xF0,0x42,0x40,0x00,0x01,0x13,0x00,0x7F,0x7F,0x02,0x03,0x05,0x40,0x00,0x00,0x00,\n                        0x01,0x10,0x01,0x00,0x00,0x00,0x00,0x7F,0x00,0x01,0x00,0x10,0x00,0x00,0x7F,0x00,\n                        0x01,0x00,0x20,0x00,0x7F,0x00,0x00,0x01,0x00,0x30,0x00,0x7F,0x00,0x00,0x01,0x00,\n                        0x40,0x00,0x7F,0x00,0x10,0x00,0x01,0x00,0x01,0x00,0x7F,0x00,0x01,0x00,0x00,0x11,\n                        0x00,0x7F,0x00,0x01,0x00,0x00,0x21,0x00,0x7F,0x00,0x01,0x00,0x31,0x00,0x00,0x7F,\n                        0x00,0x01,0x00,0x41,0x00,0x00,0x7F,0x00,0x10,0x01,0x00,0x02,0x00,0x00,0x7F,0x00,\n                        0x01,0x00,0x12,0x00,0x7F,0x00,0x00,0x01,0x00,0x22,0x00,0x7F,0x00,0x00,0x01,0x00,\n                        0x32,0x00,0x7F,0x00,0x01,0x00,0x00,0x42,0x00,0x7F,0x00,0x10,0x01,0x00,0x00,0x03,\n                        0x00,0x7F,0x00,0x01,0x00,0x00,0x13,0x00,0x7F,0x00,0x01,0x00,0x23,0x00,0x00,0x7F,\n                        0x00,0x01,0x00,0x33,0x00,0x00,0x7F,0x00,0x01,0x00,0x43,0x00,0x7F,0x00,0x00,0x10,\n                        0x01,0x00,0x04,0x00,0x7F,0x00,0x00,0x01,0x00,0x14,0x00,0x7F,0x00,0x00,0x01,0x00,\n                        0x24,0x00,0x7F,0x00,0x01,0x00,0x00,0x34,0x00,0x7F,0x00,0x01,0x00,0x00,0x44,0x00,\n                        0x7F,0x00,0x10,0x01,0x00,0x00,0x05,0x00,0x7F,0x00,0x01,0x00,0x15,0x00,0x00,0x7F,\n                        0x00,0x01,0x00,0x25,0x00,0x00,0x7F,0x00,0x01,0x00,0x35,0x00,0x7F,0x00,0x00,0x01,\n                        0x00,0x45,0x00,0x7F,0x00,0x00,0x10,0x01,0x00,0x06,0x00,0x7F,0x00,0x00,0x01,0x00,\n                        0x16,0x00,0x7F,0x00,0x01,0x00,0x00,0x26,0x00,0x7F,0x00,0x01,0x00,0x00,0x36,0x00,\n                        0x7F,0x00,0x01,0x00,0x46,0x00,0x00,0x7F,0x00,0x10,0x01,0x00,0x07,0x00,0x00,0x7F,\n                        0x00,0x01,0x00,0x17,0x00,0x00,0x7F,0x00,0x01,0x00,0x27,0x00,0x7F,0x00,0x00,0x01,\n                        0x00,0x37,0x00,0x7F,0x00,0x00,0x01,0x00,0x47,0x00,0x7F,0x00,0x10,0x00,0x01,0x00,\n                        0x3A,0x00,0x7F,0x00,0x01,0x00,0x00,0x3B,0x00,0x7F,0x00,0x01,0x00,0x00,0x2E,0x00,\n                        0x7F,0x00,0x01,0x00,0x3C,0x00,0x00,0x7F,0x00,0x01,0x00,0x3D,0x00,0x00,0x7F,0x00,\n                        0x01,0x00,0x3E,0x00,0x7F,0x00,0x00,0x01,0x00,0x2B,0x00,0x7F,0x00,0x00,0x01,0x00,\n                        0x2C,0x00,0x7F,0x00,0x01,0x00,0x00,0x2A,0x00,0x7F,0x00,0x01,0x00,0x00,0x29,0x00,\n                        0x7F,0x00,0x01,0x00,0x2D,0x00,0x00,0x7F,0x00,0x7F,0x7F,0x7F,0x7F,0x00,0x7F,0x00,\n                        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n                        0x00,0xF7]);\n                    // Inquiry Message Request\n                    finalOutput.value.send([0xF0,0x7E,0x7F,0x06,0x01,0xF7]);\n                    // (2) Scene Write Request\n                    finalOutput.value.send([0xF0,0x42,0x40,0x00,0x01,0x13,0x00,0x1F,0x11,0x00,0xF7]);\n                    for (var i = 0; i < 8; i++) {\n                        setTimeout(function(i) {\n                            finalOutput.value.send(new Uint8Array([176, 32 + i, 0x7F]));\n                        }.bind(null, i), 1000 + i * 70);\n                        setTimeout(function(i) {\n                            finalOutput.value.send(new Uint8Array([176, 32 + i, 0x00]));\n                        }.bind(null, i), 1200 + i * 70);\n\n                        setTimeout(function(i) {\n                            finalOutput.value.send(new Uint8Array([176, 48 + i, 0x7F]));\n                        }.bind(null, i), 1000 + 100 + i * 70);\n                        setTimeout(function(i) {\n                            finalOutput.value.send(new Uint8Array([176, 48 + i, 0x00]));\n                        }.bind(null, i), 1200 + 100 + i * 70);\n\n                        setTimeout(function(i) {\n                            finalOutput.value.send(new Uint8Array([176, 64 + i, 0x7F]));\n                        }.bind(null, i), 1000 + 100 * 2 + i * 70);\n                        setTimeout(function(i) {\n                            finalOutput.value.send(new Uint8Array([176, 64 + i, 0x00]));\n                        }.bind(null, i), 1200 + 100 * 2 + i * 70);\n                    }\n                }\n\n            }.bind(this), function() {\n                console.error(\"No access to MIDI devices\");\n            });\n        } else {\n            console.error(\"No MIDI support\");\n        }\n\n    },\n\n    getFocusNode: getFocusNode,\n    focusSelector: focusSelector,\n    addLine: addLine,\n    deleteLine: deleteLine\n\n};\n"
  },
  {
    "path": "lib/order.js",
    "content": "'use babel';\n\nexport default [\n\n    [\n        'position',\n        'top',\n        'right',\n        'bottom',\n        'left',\n        'z-index',\n    ],\n\n    [\n        'display',\n        'visibility',\n        'flex',\n        'flex-grow',\n        'flex-shrink',\n        'flex-basis',\n        'flex-direction',\n        'flex-flow',\n        'flex-wrap',\n        'align-content',\n        'align-items',\n        'align-self',\n        'justify-content',\n        'order',\n        'float',\n        'size',\n        'width',\n        'min-width',\n        'max-width',\n        'height',\n        'min-height',\n        'max-height',\n        'margin',\n        'margin-top',\n        'margin-right',\n        'margin-bottom',\n        'margin-left',\n        'padding',\n        'padding-top',\n        'padding-right',\n        'padding-bottom',\n        'padding-left',\n        'vertical-align',\n        'overflow',\n        'overflow-x',\n        'overflow-y',\n        'box-sizing',\n    ],\n\n    [\n        'font',\n        'font-weight',\n        'font-style',\n        'font-variant',\n        'font-size-adjust',\n        'font-stretch',\n        'font-size',\n        'font-family',\n        'color',\n        'text-decoration',\n        'text-transform',\n        'text-align',\n        'text-justify',\n        'text-outline',\n        'text-shadow',\n        'line-height',\n        'white-space',\n        'word-spacing',\n        'word-wrap',\n        'word-break',\n        'tab-size',\n        'hyphens',\n        'letter-spacing',\n    ],\n\n    [\n        'opcaity',\n        'outline',\n        'outline-width',\n        'outline-style',\n        'outline-color',\n        'outline-offset',\n        'list-style',\n        'list-style-position',\n        'list-style-type',\n        'list-style-image',\n        'border',\n        'border-spacing',\n        'border-collapse',\n        'border-width',\n        'border-style',\n        'border-color',\n        'border-top',\n        'border-top-width',\n        'border-top-style',\n        'border-top-color',\n        'border-right',\n        'border-right-width',\n        'border-right-style',\n        'border-right-color',\n        'border-bottom',\n        'border-bottom-width',\n        'border-bottom-style',\n        'border-bottom-color',\n        'border-left',\n        'border-left-width',\n        'border-left-style',\n        'border-left-color',\n        'border-radius',\n        'border-top-left-radius',\n        'border-top-right-radius',\n        'border-bottom-right-radius',\n        'border-bottom-left-radius',\n        'border-image',\n        'border-image-source',\n        'border-image-slice',\n        'border-image-width',\n        'border-image-outset',\n        'border-image-repeat',\n        'border-top-image',\n        'border-right-image',\n        'border-bottom-image',\n        'border-left-image',\n        'border-corner-image',\n        'border-top-left-image',\n        'border-top-right-image',\n        'border-bottom-right-image',\n        'border-bottom-left-image',\n        'background',\n        'background-color',\n        'background-image',\n        'background-attachment',\n        'background-position',\n        'background-position-x',\n        'background-position-y',\n        'background-clip',\n        'background-origin',\n        'background-size',\n        'background-repeat',\n        'background-blend-mode',\n        'box-shadow',\n        'filter',\n        'resize',\n        'cursor',\n        'transform',\n        'transition',\n        'transition-delay',\n        'transition-timing-function',\n        'transition-duration',\n        'transition-property',\n        'transform',\n        'transform-origin',\n        'animation',\n        'animation-name',\n        'animation-duration',\n        'animation-play-state',\n        'animation-timing-function',\n        'animation-delay',\n        'animation-iteration-count',\n        'animation-direction',\n        'animation-fill-mode',\n    ]\n\n];\n"
  },
  {
    "path": "license.md",
    "content": "Copyright (c) 2016 NICOLAS Dimitri\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"midi-controller-css\",\n  \"main\": \"./lib/index\",\n  \"version\": \"1.2.0\",\n  \"description\": \"Use Korg NanoKontrol 2 to edit your css files\",\n  \"keywords\": [\n    \"midi\",\n    \"controller\",\n    \"css\",\n    \"atom\",\n    \"atom-package\",\n    \"korg\",\n    \"nanokontrol\"\n  ],\n  \"repository\": \"https://github.com/dimitrinicolas/midi-controller-css\",\n  \"license\": \"MIT\",\n  \"engines\": {\n    \"atom\": \">=1.0.0 <2.0.0\"\n  },\n  \"dependencies\": {\n    \"play\": \"^0.5.0\",\n    \"postcss\": \"^6.0.19\"\n  }\n}\n"
  },
  {
    "path": "readme.md",
    "content": "# Midi Controller Css\n\nI type a lot of css, so I bought a Korg NanoKontrol 2 and built this lovely Atom package. Each column of buttons controls the values of one css property, and each slider sets the px/percent/... values. Ordinary snippets are outdated, go midi snippets!\n\n![Demo](assets/readme/demo.gif)\n\nThis usb midi controller is costless and very complete for its size. I bought a used one for 20€ ($25).\n\nYou can have a look at [lib/actions.js](lib/actions.js) for a complete list of features.\n\nPS: Most of the snippets only works with some popular PostCSS plugins, you can check my list on my [personnal front-end framework](https://github.com/dimitrinicolas/front-end-stack/blob/master/build/postcss.config.js).\n\n![Korg NanoKontrol 2](assets/readme/photo.jpg)\n\nWith some helpers:\n\n![Korg NanoKontrol 2](assets/readme/photo2.jpg)\n"
  }
]