diff --git a/components/button.js b/components/Button.js similarity index 100% rename from components/button.js rename to components/Button.js diff --git a/components/CodeImage.js b/components/CodeImage.js new file mode 100644 index 0000000..f5a251c --- /dev/null +++ b/components/CodeImage.js @@ -0,0 +1,58 @@ +import { EOL } from 'os' +import React from 'react' +import domtoimage from 'dom-to-image' +import CodeMirror from 'react-codemirror' +import WindowControls from '../components/svg/Controls' + +// hack to only call modes on browser +if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') { + require('../lib/constants') +} + +const DEFAULT_SETTINGS = { + paddingVertical: '50px', + paddingHorizontal: '50px', + marginVertical: '45px', + marginHorizontal: '45px', + background: '#fed0ec', + theme: 'dracula', + language: 'javascript' +} + +const CodeImage = (props) => { + const config = Object.assign(DEFAULT_SETTINGS, props.config) + + const options = { + lineNumbers: false, + mode: config.language, + theme: config.theme, + scrollBarStyle: null, + viewportMargin: Infinity, + lineWrapping: true + } + + // create styles + const containerStyle = { + background: config.background, + padding: `${config.paddingVertical} ${config.paddingHorizontal}` + } + + return ( +
+
+ { true ? : null } + +
+ +
+ ) +} + +export default CodeImage diff --git a/components/colorpicker.js b/components/Colorpicker.js similarity index 100% rename from components/colorpicker.js rename to components/Colorpicker.js diff --git a/components/dropdown.js b/components/Dropdown.js similarity index 95% rename from components/dropdown.js rename to components/Dropdown.js index 43d52fe..6e8bdce 100644 --- a/components/dropdown.js +++ b/components/Dropdown.js @@ -1,6 +1,6 @@ import React from 'react' import enhanceWithClickOutside from 'react-click-outside' -import ArrowDown from './svg/arrowdown' +import ArrowDown from './svg/Arrowdown' class Dropdown extends React.Component { constructor(props) { @@ -14,7 +14,10 @@ class Dropdown extends React.Component { } select(item) { - this.setState({ selected: item }) + if (this.state.selected !== item) { + this.props.onChange(item) + this.setState({ selected: item }) + } } toggle() { @@ -63,7 +66,7 @@ class Dropdown extends React.Component { // find longest list value in number of characters const MIN_WIDTH = this.props.list.reduce((max, { name }) => (name.length > max ? name.length : max), 0) - console.log(MIN_WIDTH); + return (
diff --git a/components/meta.js b/components/Meta.js similarity index 75% rename from components/meta.js rename to components/Meta.js index 5f9cd93..7443fb5 100644 --- a/components/meta.js +++ b/components/Meta.js @@ -3,6 +3,8 @@ import Head from 'next/head' export default () => (
+ + @@ -39,6 +41,13 @@ export default () => ( #toolbar>div:last-child { margin-right: 0px; } + + .CodeMirrorContainer .CodeMirror { + height: auto; + min-width: 680px; + padding: 40px 18px 24px; + border-radius: 3px; + } `}
) diff --git a/components/settings.js b/components/Settings.js similarity index 97% rename from components/settings.js rename to components/Settings.js index 66a2077..10f700f 100644 --- a/components/settings.js +++ b/components/Settings.js @@ -1,6 +1,6 @@ import React from 'react' import enhanceWithClickOutside from 'react-click-outside' -import SettingsIcon from './svg/settings' +import SettingsIcon from './svg/Settings' class Settings extends React.Component { constructor(props) { diff --git a/components/Toolbar.js b/components/Toolbar.js new file mode 100644 index 0000000..6ac068f --- /dev/null +++ b/components/Toolbar.js @@ -0,0 +1,46 @@ +import React from 'react' +import Dropdown from './Dropdown' +import ColorPicker from './Colorpicker' +import Settings from './Settings' +import Button from './Button' +import { THEMES, LANGUAGES } from '../lib/constants' + +const Toolbar = (props) => ( +
+ + + + +
+
+ +
+) + +export default Toolbar diff --git a/components/codeImage.js b/components/codeImage.js deleted file mode 100644 index 90c4e1d..0000000 --- a/components/codeImage.js +++ /dev/null @@ -1,100 +0,0 @@ -import { EOL } from 'os' -import React from 'react' -import { NativeTypes } from 'react-dnd-html5-backend' -import { DropTarget } from 'react-dnd' -import domtoimage from 'dom-to-image' -import WindowControls from '../components/svg/controls' - -const margin = '45px 54px' - -const DEFAULT_CODE = ` -const pluckDeep = key => obj => key.split('.').reduce((accum, key) => accum[key], obj) - -const compose = (...fns) => res => fns.reduce((accum, next) => next(accum), res) - -const unfold = (f, seed) => { - const go = (f, seed, acc) => { - const res = f(seed) - return res ? go(f, res[1], acc.concat([res[0]])) : acc - } - return go(f, seed, []) -}` - -const MAX_LINES = 40 - -class CodeImage extends React.Component { - constructor () { - super() - this.state = {} - } - - render () { - let code = this.state.droppedContent || this.props.children || DEFAULT_CODE - const split = code.split(EOL) - if (split.length > MAX_LINES) code = [...split.slice(0, MAX_LINES - 1), '', '...'].join(EOL) - - return this.props.connectDropTarget( -
-
-
-            
- -
- {code} -
-
- -
- ) - } -} - -const drop = (props, monitor, component) => { - const bundle = monitor.getItem() - const file = bundle.files[0] - const reader = new FileReader() - reader.onload = function(event) { - component.setState({ - droppedContent: event.target.result - }) - }; - reader.readAsText(file, "UTF-8"); -} - -export default DropTarget(NativeTypes.FILE, { drop }, (connect, monitor) => ({ - connectDropTarget: connect.dropTarget(), - isOver: monitor.isOver(), - canDrop: monitor.canDrop(), - item: monitor.getItem() -}))(CodeImage) diff --git a/components/dnd.js b/components/dnd.js new file mode 100644 index 0000000..af2c8b8 --- /dev/null +++ b/components/dnd.js @@ -0,0 +1,25 @@ +const drop = (props, monitor, component) => { + const bundle = monitor.getItem() + const file = bundle.files[0] + const reader = new FileReader() + reader.onload = function(event) { + component.setState({ + droppedContent: event.target.result + }) + }; + reader.readAsText(file, "UTF-8"); +} + +export default DropTarget(NativeTypes.FILE, { drop }, (connect, monitor) => ({ + connectDropTarget: connect.dropTarget(), + isOver: monitor.isOver(), + canDrop: monitor.canDrop(), + item: monitor.getItem() +}))(CodeImage) + + +let code = this.props.content + const split = code.split(EOL) + if (split.length > MAX_LINES) code = [...split.slice(0, MAX_LINES - 1), '', '...'].join(EOL) + + return this.props.connectDropTarget( \ No newline at end of file diff --git a/components/svg/arrowdown.js b/components/svg/Arrowdown.js similarity index 100% rename from components/svg/arrowdown.js rename to components/svg/Arrowdown.js diff --git a/components/svg/Controls.js b/components/svg/Controls.js new file mode 100644 index 0000000..6464e4b --- /dev/null +++ b/components/svg/Controls.js @@ -0,0 +1,22 @@ +import React from 'react' + +export default () => ( +
+ + + + + + + + +
+) diff --git a/components/svg/settings.js b/components/svg/Settings.js similarity index 100% rename from components/svg/settings.js rename to components/svg/Settings.js diff --git a/components/svg/controls.js b/components/svg/controls.js deleted file mode 100644 index cb7d249..0000000 --- a/components/svg/controls.js +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react' - -export default () => ( - - - - - - - -) diff --git a/components/toolbar.js b/components/toolbar.js deleted file mode 100644 index 5ac6cb0..0000000 --- a/components/toolbar.js +++ /dev/null @@ -1,117 +0,0 @@ -import React from 'react' -import Dropdown from './dropdown' -import ColorPicker from './colorpicker' -import Settings from './settings' -import Button from './button' - -const themes = [ - { - name: 'dracula' - }, - { - name: 'solarized' - } -] - -const langauges = [ - 'Auto Detect', - 'Plain Text', - 'AppleScript', - 'BoxNote', - 'C', - 'C#', - 'CSS', - 'CSV', - 'Closure', - 'CoffeeScript', - 'Cold Fusion', - 'Crystal', - 'Cypher', - 'D', - 'Dart', - 'Diff', - 'Docker', - 'Erlang', - 'F#', - 'Fortran', - 'Gherkin', - 'Go', - 'Groovy', - 'HTML', - 'Haskell', - 'Haxe', - 'Java', - 'JavaScript', - 'JSON', - 'Julia', - 'Kotlin', - 'LaTex', - 'Lisp', - 'Lua', - 'MATLAB', - 'MUMPS', - 'OCaml', - 'Objective-C', - 'PHP', - 'Pascal', - 'Perl', - 'Pig', - 'Post', - 'Puppet', - 'Python', - 'R', - 'Ruby', - 'Rust', - 'SQL', - 'Sass', - 'Scheme', - 'Smalltalk', - 'Swift', - 'TSV', - 'VB.NET', - 'VBScript', - 'Velocity', - 'Verilog', - 'XML', - 'YAML' -].map(name => ({ name })) - -const Toolbar = (props) => ( -
- - - - -
-
- -
-) - -export default Toolbar diff --git a/lib/constants.js b/lib/constants.js new file mode 100644 index 0000000..5864d89 --- /dev/null +++ b/lib/constants.js @@ -0,0 +1,206 @@ +if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') { + require('codemirror/mode/clojure/clojure') + require('codemirror/mode/cobol/cobol') + require('codemirror/mode/coffeescript/coffeescript') + require('codemirror/mode/commonlisp/commonlisp') + require('codemirror/mode/crystal/crystal') + require('codemirror/mode/css/css') + require('codemirror/mode/d/d') + require('codemirror/mode/dart/dart') + require('codemirror/mode/django/django') + require('codemirror/mode/dockerfile/dockerfile') + require('codemirror/mode/elm/elm') + require('codemirror/mode/erlang/erlang') + require('codemirror/mode/fortran/fortran') + require('codemirror/mode/go/go') + require('codemirror/mode/groovy/groovy') + require('codemirror/mode/handlebars/handlebars') + require('codemirror/mode/haskell/haskell') + require('codemirror/mode/haxe/haxe') + require('codemirror/mode/htmlembedded/htmlembedded') + require('codemirror/mode/htmlmixed/htmlmixed') + require('codemirror/mode/javascript/javascript') + require('codemirror/mode/julia/julia') + require('codemirror/mode/lua/lua') + require('codemirror/mode/markdown/markdown') + require('codemirror/mode/mathematica/mathematica') + require('codemirror/mode/nginx/nginx') + require('codemirror/mode/pascal/pascal') + require('codemirror/mode/perl/perl') + require('codemirror/mode/php/php') + require('codemirror/mode/python/python') + require('codemirror/mode/r/r') + require('codemirror/mode/ruby/ruby') + require('codemirror/mode/rust/rust') + require('codemirror/mode/shell/shell') + require('codemirror/mode/smalltalk/smalltalk') + require('codemirror/mode/spreadsheet/spreadsheet') + require('codemirror/mode/sql/sql') + require('codemirror/mode/swift/swift') + require('codemirror/mode/tcl/tcl') + require('codemirror/mode/vb/vb') + require('codemirror/mode/verilog/verilog') + require('codemirror/mode/vhdl/vhdl') + require('codemirror/mode/vue/vue') + require('codemirror/mode/xml/xml') + require('codemirror/mode/yaml/yaml') +} + +export const THEMES = [ + { + id: 'dracula', + name: 'Dracula' + }, + { + id: 'solarized', + name: 'Solarized' + } +] + +export const LANGUAGES = [ + { + name: 'Auto Detect' + }, + { + name: 'Plain Text' + }, + { + name: 'Clojure' + }, + { + name: 'Cobol' + }, + { + name: 'CoffeeScript' + }, + { + name: 'Crystal' + }, + { + name: 'CSS' + }, + { + name: 'D' + }, + { + name: 'Dart' + }, + { + name: 'Django' + }, + { + name: 'Docker' + }, + { + name: 'Elm' + }, + { + name: 'Erlang' + }, + { + name: 'Fortran' + }, + { + name: 'Groovy' + }, + { + name: 'Handlebars' + }, + { + name: 'Haskell' + }, + { + name: 'Haxe' + }, + { + name: 'HTML' + }, + { + name: 'JavaScript' + }, + { + name: 'JSX' + }, + { + name: 'Julia' + }, + { + name: 'Lua' + }, + { + name: 'Markdown' + }, + { + name: 'Mathematica' + }, + { + name: 'NGINX' + }, + { + name: 'Pascal' + }, + { + name: 'Perl' + }, + { + name: 'PHP' + }, + { + name: 'Python' + }, + { + name: 'R' + }, + { + name: 'Ruby' + }, + { + name: 'Rust' + }, + { + name: 'Sass' + }, + { + name: 'Smalltalk' + }, + { + name: 'SQL' + }, + { + name: 'Swift' + }, + { + name: 'TCL' + }, + { + name: 'VB.NET' + }, + { + name: 'Verilog' + }, + { + name: 'VHDL' + }, + { + name: 'Vue' + }, + { + name: 'XML' + }, + { + name: 'YAML' + } +] + +export const DEFAULT_CODE = `const pluckDeep = key => obj => key.split('.').reduce((accum, key) => accum[key], obj) + +const compose = (...fns) => res => fns.reduce((accum, next) => next(accum), res) + +const unfold = (f, seed) => { + const go = (f, seed, acc) => { + const res = f(seed) + return res ? go(f, res[1], acc.concat([res[0]])) : acc + } + return go(f, seed, []) +} + ` diff --git a/package.json b/package.json index 7dfbe61..6c146b0 100644 --- a/package.json +++ b/package.json @@ -11,16 +11,20 @@ "dependencies": { "axios": "^0.16.2", "body-parser": "^1.17.2", + "codemirror": "^5.26.0", "dom-to-image": "^2.5.2", "express": "^4.15.3", "form-data": "^2.2.0", + "highlight.js": "^9.12.0", "morgan": "^1.8.2", "next": "^2.4.3", "react": "^15.5.4", + "react-codemirror": "^1.0.0", "react-click-outside": "^2.3.1", "react-color": "^2.12.1", "react-dnd": "^2.4.0", "react-dnd-html5-backend": "^2.4.1", - "react-dom": "^15.5.4" + "react-dom": "^15.5.4", + "react-syntax-highlight": "^0.0.6" } } diff --git a/pages/index.js b/pages/index.js index 4ba0250..09a84a1 100644 --- a/pages/index.js +++ b/pages/index.js @@ -4,28 +4,33 @@ import { DragDropContext } from 'react-dnd' import Axios from 'axios' import domtoimage from 'dom-to-image' -import Logo from '../components/svg/logo' -import Meta from '../components/meta' -import Toolbar from '../components/toolbar' -import CodeImage from '../components/codeImage' +import Logo from '../components/svg/Logo' +import Meta from '../components/Meta' +import Toolbar from '../components/Toolbar' +import CodeImage from '../components/CodeImage' import api from '../lib/api' +import { THEMES, LANGUAGES, DEFAULT_CODE } from '../lib/constants' class Index extends React.Component { /* pathname, asPath, err, req, res */ static async getInitialProps ({ asPath }) { try { - const content = await api.getGist(asPath) - return { content } + if (asPath !== '/') { + const content = await api.getGist(asPath) + return { content } + } } catch (e) { console.log(e) - return {} } + return {} } constructor() { super() this.state = { - bgColor: '#111111' + bgColor: '#111111', + theme: THEMES[0].id, + language: 'javascript' // TODO LANGUAGES[0] } } @@ -61,10 +66,12 @@ class Index extends React.Component { save={this.save} upload={this.upload} onBGChange={color => this.setState({ bgColor: color })} + onThemeChange={theme => this.setState({ theme: theme.id })} + onLanguageChange={language => this.setState({ language })} bg={this.state.bgColor} /> - - {this.props.content} + + {this.droppedContent || this.props.content || DEFAULT_CODE}
diff --git a/yarn.lock b/yarn.lock index e79954e..95d63c9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -987,8 +987,8 @@ camelcase@^3.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" caniuse-db@^1.0.30000639: - version "1.0.30000684" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000684.tgz#99acb0118b8fd1fdd601a15e0c0f2dfc15a81680" + version "1.0.30000690" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000690.tgz#ee4e0750070f6aae6f40e76477984449bd6cb48a" case-sensitive-paths-webpack-plugin@2.0.0: version "2.0.0" @@ -1036,6 +1036,10 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: dependencies: inherits "^2.0.1" +classnames@^2.2.5: + version "2.2.5" + resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.5.tgz#fb3801d453467649ef3603c7d61a02bd129bde6d" + cliui@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" @@ -1060,6 +1064,10 @@ code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" +codemirror@^5.18.2, codemirror@^5.26.0: + version "5.26.0" + resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.26.0.tgz#bcbee86816ed123870c260461c2b5c40b68746e5" + combined-stream@^1.0.5, combined-stream@~1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" @@ -1151,6 +1159,14 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: safe-buffer "^5.0.1" sha.js "^2.4.8" +create-react-class@^15.5.1, create-react-class@^15.6.0: + version "15.6.0" + resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.0.tgz#ab448497c26566e1e29413e883207d57cfe7bed4" + dependencies: + fbjs "^0.8.9" + loose-envify "^1.3.1" + object-assign "^4.1.1" + cross-spawn@5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" @@ -1737,6 +1753,10 @@ hawk@~3.1.3: hoek "2.x.x" sntp "1.x.x" +highlight.js@^9.10.0, highlight.js@^9.12.0: + version "9.12.0" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.12.0.tgz#e6d9dbe57cbefe60751f02af336195870c90c01e" + hmac-drbg@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -2105,6 +2125,14 @@ lodash-es@^4.2.1: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.4.tgz#dcc1d7552e150a0640073ba9cb31d70f032950e7" +lodash.debounce@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + lodash@^4.0.1, lodash@^4.14.0, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.5.1, lodash@^4.6.1: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -2188,10 +2216,14 @@ mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.15, mime-types@~2.1.7: dependencies: mime-db "~1.27.0" -mime@1.3.4, mime@^1.3.4: +mime@1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" +mime@^1.3.4: + version "1.3.6" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.6.tgz#591d84d3653a6b0b4a3b9df8de5aa8108e72e5e0" + min-document@^2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" @@ -2292,8 +2324,8 @@ negotiator@0.6.1: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" next@^2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/next/-/next-2.4.3.tgz#8d84a3a4552e584a1d7930817f3408de494e974c" + version "2.4.4" + resolved "https://registry.yarnpkg.com/next/-/next-2.4.4.tgz#1caac2ee5cc195564ad330b9fcbff40380b0627e" dependencies: ansi-html "0.0.7" babel-core "6.24.0" @@ -2336,7 +2368,7 @@ next@^2.4.3: send "0.15.2" source-map-support "0.4.15" strip-ansi "3.0.1" - styled-jsx "1.0.3" + styled-jsx "1.0.5" touch "1.0.0" unfetch "2.1.2" url "0.11.0" @@ -2441,7 +2473,7 @@ oauth-sign@~0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" -object-assign@^4.0.1, object-assign@^4.1.0: +object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -2648,12 +2680,12 @@ process@~0.5.1: resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" promise@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/promise/-/promise-7.1.1.tgz#489654c692616b8aa55b0724fa809bb7db49c5bf" + version "7.3.0" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.0.tgz#e7feec5aa87a2cbb81acf47d9a3adbd9d4642d7b" dependencies: asap "~2.0.3" -prop-types@15.5.10, prop-types@^15.5.4, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@~15.5.7: +prop-types@15.5.10, prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.8: version "15.5.10" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" dependencies: @@ -2745,6 +2777,17 @@ react-click-outside@^2.3.1: dependencies: hoist-non-react-statics "^1.2.0" +react-codemirror@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/react-codemirror/-/react-codemirror-1.0.0.tgz#91467b53b1f5d80d916a2fd0b4c7adb85a9001ba" + dependencies: + classnames "^2.2.5" + codemirror "^5.18.2" + create-react-class "^15.5.1" + lodash.debounce "^4.0.8" + lodash.isequal "^4.5.0" + prop-types "^15.5.4" + react-color@^2.12.1: version "2.12.1" resolved "https://registry.yarnpkg.com/react-color/-/react-color-2.12.1.tgz#ef5a4dc4260ed7d1642047d5b6693d68939b19f7" @@ -2777,13 +2820,13 @@ react-dnd@^2.4.0: prop-types "^15.5.8" react-dom@^15.5.4: - version "15.5.4" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.5.4.tgz#ba0c28786fd52ed7e4f2135fe0288d462aef93da" + version "15.6.1" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.6.1.tgz#2cb0ed4191038e53c209eb3a79a23e2a4cf99470" dependencies: fbjs "^0.8.9" loose-envify "^1.1.0" object-assign "^4.1.0" - prop-types "~15.5.7" + prop-types "^15.5.10" react-hot-loader@3.0.0-beta.7: version "3.0.0-beta.7" @@ -2802,14 +2845,21 @@ react-proxy@^3.0.0-alpha.0: dependencies: lodash "^4.6.1" +react-syntax-highlight@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/react-syntax-highlight/-/react-syntax-highlight-0.0.6.tgz#2a657a9a693ffd16a22181ad08de96902957f87a" + dependencies: + highlight.js "^9.10.0" + react@^15.5.4: - version "15.5.4" - resolved "https://registry.yarnpkg.com/react/-/react-15.5.4.tgz#fa83eb01506ab237cdc1c8c3b1cea8de012bf047" + version "15.6.1" + resolved "https://registry.yarnpkg.com/react/-/react-15.6.1.tgz#baa8434ec6780bde997cdc380b79cd33b96393df" dependencies: + create-react-class "^15.6.0" fbjs "^0.8.9" loose-envify "^1.1.0" object-assign "^4.1.0" - prop-types "^15.5.7" + prop-types "^15.5.10" reactcss@^1.2.0: version "1.2.2" @@ -2854,8 +2904,8 @@ readdirp@^2.0.0: set-immediate-shim "^1.0.1" redbox-react@^1.3.6: - version "1.4.1" - resolved "https://registry.yarnpkg.com/redbox-react/-/redbox-react-1.4.1.tgz#90552c45374e2003b9665ee5470b60d4bb74a5ba" + version "1.4.2" + resolved "https://registry.yarnpkg.com/redbox-react/-/redbox-react-1.4.2.tgz#7fe35d3c567301e97938cc7fd6a10918f424c6b4" dependencies: error-stack-parser "^1.3.6" object-assign "^4.0.1" @@ -3230,9 +3280,9 @@ strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" -styled-jsx@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-1.0.3.tgz#3d8e2eda09fffccc131d321a02ae6d6f9f79da53" +styled-jsx@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-1.0.5.tgz#943fced48295ff70000794311f9f3bf3688e427f" dependencies: babel-plugin-syntax-jsx "6.18.0" babel-traverse "6.21.0" @@ -3243,11 +3293,11 @@ styled-jsx@1.0.3: escape-string-regexp "1.0.5" source-map "0.5.6" string-hash "1.1.1" - stylis "3.0.10" + stylis "3.1.5" -stylis@3.0.10: - version "3.0.10" - resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.0.10.tgz#9f561e8a9799c2c317c596583bcaaa52a0d27663" +stylis@3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.1.5.tgz#c585186286aaa79856c9ac62bbb38113923edda3" supports-color@^2.0.0: version "2.0.0" @@ -3360,8 +3410,8 @@ ua-parser-js@^0.7.9: resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.12.tgz#04c81a99bdd5dc52263ea29d24c6bf8d4818a4bb" uglify-js@^2.8.5: - version "2.8.28" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.28.tgz#e335032df9bb20dcb918f164589d5af47f38834a" + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" dependencies: source-map "~0.5.1" yargs "~3.10.0"