From ed652ae452d19b0c561d1b674940758f308ae4d7 Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Thu, 20 Apr 2017 14:00:27 +1200 Subject: [PATCH 01/28] Edge compatibility --- extension/js/background.js | 8 ++++++-- extension/js/content.js | 8 ++++++-- extension/manifest.json | 10 ++++++---- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/extension/js/background.js b/extension/js/background.js index c5b223a..768b7d3 100644 --- a/extension/js/background.js +++ b/extension/js/background.js @@ -31,7 +31,7 @@ */ /*jshint eqeqeq:true, forin:true, strict:true */ -/*global chrome, console */ +/*global browser, chrome, console */ (function () { @@ -47,6 +47,10 @@ TYPE_NULL = 6 ; + function getBrowser() { + return typeof browser !== 'undefined' ? browser : chrome; + } + // Utility functions function removeComments (str) { str = ('__' + str + '__').split(''); @@ -395,7 +399,7 @@ } // Listen for requests from content pages wanting to set up a port - chrome.extension.onConnect.addListener(function(port) { + getBrowser().runtime.onConnect.addListener(function(port) { if (port.name !== 'jf') { console.log('JSON Formatter error - unknown port name '+port.name, port) ; diff --git a/extension/js/content.js b/extension/js/content.js index b930379..96a1812 100644 --- a/extension/js/content.js +++ b/extension/js/content.js @@ -31,12 +31,16 @@ */ /*jshint eqeqeq:true, forin:true, strict:true */ -/*global chrome, console */ +/*global browser, chrome, console */ (function() { "use strict" ; + function getBrowser() { + return typeof browser !== 'undefined' ? browser : chrome; + } + var jfContent, pre, jfStyleEl, @@ -51,7 +55,7 @@ // Open the port "jf" now, ready for when we need it // console.time('established port') ; - port = chrome.extension.connect({name: 'jf'}) ; + port = getBrowser().runtime.connect({name: 'jf'}) ; // Add listener to receive response from BG when ready port.onMessage.addListener( function (msg) { diff --git a/extension/manifest.json b/extension/manifest.json index da90eb7..11aacef 100644 --- a/extension/manifest.json +++ b/extension/manifest.json @@ -1,16 +1,18 @@ { "name": "JSON Formatter", - "version": "0.6.0", + "version": "0.6.1", "manifest_version": 2, "description": "Makes JSON easy to read. Open source.", - "homepage_url": "https://github.com/callumlocke/json-formatter", - "minimum_chrome_version": "21", + "homepage_url": "https://github.com/nikrolls/json-formatter", + "author": "Nik Rolls, Callum Locke", + "minimum_edge_version": "38", "icons": { "128": "icons/128.png", "32": "icons/32.png" }, "background": { - "scripts": ["js/background.js"] + "scripts": ["js/background.js"], + "persistent": true }, "content_scripts": [ { "matches": [""], "js": ["js/content.js"], "run_at": "document_start" } From 971ebe1e8c7c8499a43bd0b93f63a1ab8cd0946b Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Thu, 20 Apr 2017 18:13:36 +1200 Subject: [PATCH 02/28] Added Gulp build system This will help a lot as the extension gets more complex. --- LICENSE.md | 19 + README.md | 39 +- config.rb | 4 - extension/css/content.css | 1 - extension/icons/128.png | Bin 10233 -> 0 bytes extension/icons/32.png | Bin 1456 -> 0 bytes gulpfile.js | 39 + package.json | 17 + src/icons/128.png | Bin 0 -> 4225 bytes src/icons/32.png | Bin 0 -> 1215 bytes {extension => src}/js/background.js | 0 {extension => src}/js/content.js | 0 {extension => src}/manifest.json | 0 {sass => src/sass}/content.scss | 0 yarn.lock | 2714 +++++++++++++++++++++++++++ 15 files changed, 2812 insertions(+), 21 deletions(-) create mode 100644 LICENSE.md delete mode 100644 config.rb delete mode 100644 extension/css/content.css delete mode 100755 extension/icons/128.png delete mode 100755 extension/icons/32.png create mode 100644 gulpfile.js create mode 100644 package.json create mode 100644 src/icons/128.png create mode 100644 src/icons/32.png rename {extension => src}/js/background.js (100%) rename {extension => src}/js/content.js (100%) rename {extension => src}/manifest.json (100%) rename {sass => src/sass}/content.scss (100%) create mode 100644 yarn.lock diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..c67d26e --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,19 @@ +Copyright (c) 2017 Nik Rolls, Callum Lock + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 885438e..00aecb0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ JSON Formatter ============== -Chrome extension for printing JSON and JSONP nicely when you visit it 'directly' in a browser tab. +Browser extension for printing JSON and JSONP nicely when you visit it 'directly' in a browser tab. Features -------- @@ -20,39 +20,46 @@ A background worker is used to prevent the UI freezing when processing very long Installation ------------ -**Option 1** – just install it from the [Chrome Web Store](https://chrome.google.com/webstore/detail/bcjindcccaagfpapjjmafapmmgkkhgoa). +**Option 1** – Install it from the [Chrome Web Store](https://chrome.google.com/webstore/detail/bcjindcccaagfpapjjmafapmmgkkhgoa). -**Option 2** – install it from source: +**Option 2** – Install it from source: -* clone/download this repo, -* open Chrome and go to `chrome://chrome/extensions/`, -* enable "Developer mode", -* click "Load unpacked extension", -* select the `extension` folder in this repo. +1. Clone/download this repo +2. Install dependencies using [NPM](https://nodejs.org/) or [Yarn](https://yarnpkg.com/en/). +3. Build the extension: `gulp dist` +4. Side-load the extension in your browser as per below -**Some URLs to try it on:** +Chrome -* http://feeds.delicious.com/v2/json/popular?callback=hello -* http://gdata.youtube.com/feeds/api/standardfeeds/most_popular?alt=json&v=2 -* http://twitter.com/statuses/public_timeline.json +5. Open Chrome and go to `chrome://chrome/extensions/` +6. Enable "Developer mode" +7. Click "Load unpacked extension" +8. Select the `dist` folder created in step 3 + +Edge + +5. Open Edge and go to `about:flags` +6. Enable the option "Enable extension developer features" and restart the browser +7. Click on the ellipsis (...) menu, click "Extensions", and click "Load extension" +8. Select the `dist` folder created in step 3 FAQ --- ### Why are large numbers not displayed accurately? -This is a [limitation of JavaScript](http://www.ecma-international.org/ecma-262/5.1/#sec-15.7.3.2) (and therefore JSON). The largest possible number is `Number.MAX_SAFE_INTEGER`, or **9007199254740991**. If you try to use a number larger than this in JavaScript/JSON, you'll lose accuracy. +This is a [limitation of JavaScript](http://www.ecma-international.org/ecma-262/5.1/#sec-15.7.3.2). The largest possible number is `Number.MAX_SAFE_INTEGER`, or **9007199254740991**. If you try to use a number larger than this in JavaScript, you'll lose accuracy. -The idea of JSON Formatter is to show you how the computer sees your JSON, so we don't attempt to circumvent this limitation, otherwise that would give a misleading representation of your data. It's better to see exactly what V8 sees. +The idea of JSON Formatter is to show you how the computer sees your JSON, so we don't attempt to circumvent this limitation, otherwise that would give a misleading representation of your data. It's better to see exactly what the JavaScript engine sees. If you want to use long sequences of digits in your JSON, then **quote them as strings**. ### Why are object keys sometimes in the wrong order? -What you see in JSON Formatter is a representation of the **parsed** object/array. You see what V8 sees. +What you see in JSON Formatter is a representation of the **parsed** object/array. You see what the browser engine sees. Plain JavaScript objects are [unordered collections of properties](http://www.ecma-international.org/ecma-262/5.1/#sec-12.6.4). If you go through them with `for...in`, for example, there is no guarantee of any particular order. In practice, most engines maintain the order in which the keys were first declared, but V8 moves any numeric keys (e.g. `"1234"`) to the front, for a small performance gain. This was a [controversial issue](https://code.google.com/p/v8/issues/detail?id=164) – a lot of people think it sucks that you can't predict key enumeration order in Chrome – but the V8 team refused to 'fix' it, because it's not a bug, and they're right. If you want your values to be in a certain order, and you're relying on the non-standard key-ordering logic of a particular engine, then your code is broken. Restructure your data to use arrays. ##### But I just want it to be in order for readability -That would require manually parsing the JSON string with regular expressions (instead of using `JSON.parse`), which would be too slow. And it's not a good idea to go down the road of representing the data differently from how the engine actually sees it. +That would require tokenising the JSON string manually instead of using `JSON.parse`, which would be too slow. And it's not a good idea to go down the road of representing the data differently from how the engine actually sees it. diff --git a/config.rb b/config.rb deleted file mode 100644 index ffd00c6..0000000 --- a/config.rb +++ /dev/null @@ -1,4 +0,0 @@ -css_dir = "extension/css" -sass_dir = "sass" -preferred_syntax = :scss -output_style = :compressed diff --git a/extension/css/content.css b/extension/css/content.css deleted file mode 100644 index f252727..0000000 --- a/extension/css/content.css +++ /dev/null @@ -1 +0,0 @@ -body{-webkit-user-select:text;overflow-y:scroll !important;margin:0;position:relative}#optionBar{-webkit-user-select:none;display:block;position:absolute;top:9px;right:17px}#buttonFormatted,#buttonPlain{-webkit-border-radius:2px;-webkit-box-shadow:0px 1px 3px rgba(0,0,0,0.1);-webkit-user-select:none;background:-webkit-linear-gradient(#fafafa, #f4f4f4 40%, #e5e5e5);border:1px solid #aaa;color:#444;font-size:12px;margin-bottom:0px;min-width:4em;padding:3px 0;position:relative;z-index:10;display:inline-block;width:80px;text-shadow:1px 1px rgba(255,255,255,0.3)}#buttonFormatted{margin-left:0;border-top-left-radius:0;border-bottom-left-radius:0}#buttonPlain{margin-right:0;border-top-right-radius:0;border-bottom-right-radius:0;border-right:none}#buttonFormatted:hover,#buttonPlain:hover{-webkit-box-shadow:0px 1px 3px rgba(0,0,0,0.2);background:#ebebeb -webkit-linear-gradient(#fefefe, #f8f8f8 40%, #e9e9e9);border-color:#999;color:#222}#buttonFormatted:active,#buttonPlain:active{-webkit-box-shadow:inset 0px 1px 3px rgba(0,0,0,0.2);background:#ebebeb -webkit-linear-gradient(#f4f4f4, #efefef 40%, #dcdcdc);color:#333}#buttonFormatted.selected,#buttonPlain.selected{-webkit-box-shadow:inset 0px 1px 5px rgba(0,0,0,0.2);background:#ebebeb -webkit-linear-gradient(#e4e4e4, #dfdfdf 40%, #dcdcdc);color:#333}#buttonFormatted:focus,#buttonPlain:focus{outline:0}#jsonpOpener,#jsonpCloser{padding:4px 0 0 8px;color:#000;margin-bottom:-6px}#jsonpCloser{margin-top:0}#formattedJson{padding-left:28px;padding-top:6px}pre{padding:36px 5px 5px 5px}.kvov{display:block;padding-left:20px;margin-left:-20px;position:relative}.collapsed{white-space:nowrap}.collapsed>.blockInner{display:none}.collapsed>.ell:after{content:"…";font-weight:bold}.collapsed>.ell{margin:0 4px;color:#888}.collapsed .kvov{display:inline}.e{width:20px;height:18px;display:block;position:absolute;left:-2px;top:1px;z-index:5;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAD1JREFUeNpiYGBgOADE%2F3Hgw0DM4IRHgSsDFOzFInmMAQnY49ONzZRjDFiADT7dMLALiE8y4AGW6LoBAgwAuIkf%2F%2FB7O9sAAAAASUVORK5CYII%3D");background-repeat:no-repeat;background-position:center center;display:block;opacity:0.15}.collapsed>.e{-webkit-transform:rotate(-90deg);width:18px;height:20px;left:0px;top:0px}.e:hover{opacity:0.35}.e:active{opacity:0.5}.collapsed .kvov .e{display:none}.blockInner{display:block;padding-left:24px;border-left:1px dotted #bbb;margin-left:2px}#formattedJson,#jsonpOpener,#jsonpCloser{color:#333;font:13px/18px monospace}#formattedJson{color:#444}.b{font-weight:bold}.s{color:#0B7500;word-wrap:break-word}a:link,a:visited{text-decoration:none;color:inherit}a:hover,a:active{text-decoration:underline;color:#050}.bl,.nl,.n{font-weight:bold;color:#1A01CC}.k{color:#000}#formattingMsg{font:13px "Lucida Grande","Segoe UI","Tahoma";padding:10px 0 0 8px;margin:0;color:#333}#formattingMsg>svg{margin:0 7px;position:relative;top:1px}[hidden]{display:none !important}span{white-space:pre-wrap}@-webkit-keyframes spin{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}#spinner{-webkit-animation:spin 2s 0 infinite}*{-webkit-font-smoothing:antialiased} diff --git a/extension/icons/128.png b/extension/icons/128.png deleted file mode 100755 index f7cf4c64b5981ecc5c5ea95b96a0151e0d9172fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10233 zcmVR;R)TvVuB_$>Px(_TZE%i5Q(9f?#w^9W{ zu`)bYL2y#H%<%B=w6L(Sblnc0ciwra5fKrok&%%}`h7Z}0T|v62%8sY0&U8~;GCSC z==AjTei<1V7au)()NIP|mMZNq+h3V&RJ$_kj7=GCPNIwy1p->5Y;*ps$JzCm64eSP z(Fh8J#OBSLf8VlY%bl%SwTg?1irT5)9|b(#2nKHhfDI{ECda0wr42Z8!s*b#9IebD~>`^O|D zB~8%J?UgBk#*QfyRZWXZqcm&QOjJdSGRH6;0Pxw8c%zO?u(Cf&tW5+}_jrl+O z%*;$Ve*CzoSutQyFr8Ac9o6e^@6e&c>MmWnELC9aQPAahx>oRL0I0MD>&x$&oSZyb z8Gp@z0|y4GG={-UBpL>*^ogotQRx$vLL>E-ny+IJnmt-T{R=sK_^_z<5!FHl5P(Df zW>+v4D+m(+LQG7|a@~L3q)C%3PX&TU0zjoI5XSG>v*+5x#Kar)MaQZ%2EceEx_$fh z5*-~aZQHgr5)T+$mF_yePh%bc!l6TlBqb%q0E6#{8dNJ~Dggf1qeqW_0S5IIj(Zvq zJPiOgwdE~$@7_IS$BrF$>C5b{;hG-|M#?*P?kt@;bu!YfFY}x;yedL7paoJ>Q$;nF z*)S7;M9tBWu3ft>QXqV+z+Fd}=>tHy`%rt@OjZ2oojZ5lsZxKbe)dP5ckI|v)TW9` zlBoA>961m7SB%4`k%{cvw@(rh5{wU_Kqzh6wCRCv-MTHf@WKl}#Bn6=(C7i6k`tnm z-Zw5T?vC%j|Nc64vchocu;&+Dbdl%_JHv_dCQ|KXOvA2Sy9^LCqOj|8oKgpISI?e3 zKho!WpZr3j1%OI<^Z5Aq>%RT=+lSSe>d5^d`{ zTylx1Z8TwALnhugVdKV)8%0eX{z9pSiHFe!{rmTSnJnYEj1HF)EfUw-+x zhIOs6^*DJrOndk4mB0S=uhLkEgp!82MjNR4Bi(#bBZVcyh7FsINze$VgnUPHasgmD7~43MAvZ>zAVV$coijR+%=bwMR!uv1(yYkOL_{R{k zMTEeFzuc=ut5&Tt_lsEw4-dDY1=g%t^9S})$Hl94>UM)rm9{JOX6L90XhMO8Ix zTO)UP`@AGFe+;Ak{O3P648<&9CSG{q1$pL~XH1ODF;74Jv`L&i_0&^l#0{o#?9!!6 zW#PhwGIZ!rb6(Ez=%bHHQc{v!fBp4l`|PvNOt^K=J@=R)WWvoi-grZH?%XM3$Bvbo zZo0|jAzpgvC3*k-_vPi6UzYXj*UOF_I}B(!_K`;(kp~}q&@htg;=FQCfBMs(-Q0S68o7^3$!>(Wavoz=8y(?q8tRgcjCHo_N`?8nukjU>DoJb18q!Op|B zeqop)sZ{Q05}YSjBjAAMwA9t^$XjysI1MDiw1oM=+V zsACAJ;^p(Vk3as{e0TTVcbjX#EK;u=&-FRiWtUx6CZPa<&;R+)f6M?BQb~S7U$iu7 z(!|srSog^JF)8eyc;X2&W&t2Lch|06<)Mcjk|j%)m~%564DetupyK&{^PAt4X&`5< z;p`Om=+VQRkBwY`zAs*&ziPlM)MVYKTCau2nE+L7?KIB+Kb6+5NN)fB{ml!j%G*a> z6aL`&^0KW03#672K$wh#^L<)cnqiDpibe4S8pIlI{osQSh@*`}p)ojS?%cV?vqri& zj)5jNv;`W5-vI!=13U*09yD<|_k@XpXVi{?wR}x8Hu-FbHYn{Qv&5EZn;IKOqpV?Nk!3n@4aW3M=}bt0Mh^?47m2%YYo_N%uv;A z4B$|V!abr>2E_QeRmX~)_N$p)`=hrHuvq@H(}+V)-H0L-9p6T98JckgP)^YM7AivN97g}qjP13!t#K%GOo`XXI- z?bg?R2s=qy<63z=A^tm9MtH!ED00H?Db)5YupVw&O3XLL$)l>`A z7yzpFho~nzO`Sj+rP|z7O$#@P?Mc}ZcCjZ!t1J_@Y}qpT#V>wQVaU{22rWy5qhYC^ z3PZGNfvMD2o-+WDh*0UjSslQpIDXs=@oH@z2rrlT7{(HARpv*mTer?!k4YhonFuX$ z3K6=5goN=)Nl8Dgi592{0BjmVU#hBSGU|w${qotqDle!vTwYVaY#xa30R#W9h)BRN zW=Gv!x`$qDJRh+8NNZh8(L(ysCX5YK zMx=Sk*>Bsn&BuK?T|WR1)EBVj<>fWU47eK+xCH=p%mP*VC#d5QMNEqGXHCqk3nGfB zPMh$+6zrJ8E~0{Cr+H`q|!f%(L+3TwsTFj?fk*mKbv#em@6i$A|P@ece0Uc_@tn? zKnjWqq@=WNYdaA{OtP8*f4#3r^#l6guhk_0sP^e|?AWmmc%BqK)U>R-qC9}Rzpp91 z^2#fw>}&Pv)h_>rarm2WzS%gQ7Ew>Yd92DKS16}2NB;QPEcxTYhvnOpO>!jnh&=My zLq9rh$D!?Ke9p+tkVDyrsy#oUv2K1ao{nj%DWmEP0Gt#6D7wrnUI5@p-8oz(?wdLV z{0FLuKL7l4Q0!co)-)N23R=q4wE__th zB&?R=(qdVgxY`{5=DODvEI)+9iN_NpDBN^GW00u3tI>cdIVAqM$sqPG^CsXEh=>8&6{WJDd}d^JdCEu#aZKBcinYA5`b4fgCuNBI!rdWkbSxY2KuzbZXvN zk~8*8`tfwxnzBWP#0-<&X}jc=#V^aGL08HAji1Pq*Uyo@(fwrBzwVRRu#2Q)XpB8K zHy3{O?$V{pf2*5h>Jk7HQL(ypBlN=d*G1;9KFB$AL>urd*iPyg@C%rxPW|2V>C;V~ z-8s~9j(92xK`A+_&L;@;{{ciLD$Si+#mJLaJtK3!d_fYA?32rSjFa~|y)Co#JBu#u z`4h>?&6M9>dXMoP+BR)3{ksp)-_4Ob-ZSw$iSxZ3tOiqD_UIp4Djo{|^^)HQ9U zGFHRAbfs0U@@rp}%&o2_keWYrnjT-je*MFw97)9jgvthNsv~mwHPs>%e3A#KtFZti z7JE;T1;FN>00SeFgt@4G2B0X|W?%yEoo3@qMHa*R;yVW;1d?HHjXzFKxTZwnaYQ^ zR0FfQ;)T0Ip@E@tar-`}uNnTsZ^J{vWlZeYGmh<{K?qKCP$-eKO~<9+trngSNk@}DCtRp836Lu@XsP9fHL=xsv^R^*I$3V zY+80z#3WOuqE|*FkC^FG-eGl)STLJ!z4ey4J~fZ7QtpWod2?>Me6=jQ?7PkDa^=+* z4@$n1d2W13ra8}m}%yW6TqM+pM26p0!-s(-aey` zXaJ67-XiJYS+iythEl=I1XMys&Vy$8)vtbKzyrAG49f9LPX{Rc&8mB}w8GS>Q)R}C z8D=_pMHIj1gp8lmMwTxrkj0;72~m5y=ur9ZhJJEE%dch6wgTxtEc{HS>hqxiNCYv8 zTPqX52><{mwQBWhGoP?N6G1Q*CkbE1vX?Y^AmIb^n9C1Sm`jKh6aSMDgh^JG561F4 z%n9|7mgZpU`U4L8HkYkPko$EMC0W^d2DN#{30rI;B}?3$y}6wG@L*m=jD4fT%#Y43Mzd zmE{^DBmE`1W2p2v+ElK;DN1&2S6|{ENiw?sW@*z#zwdn-%=h1aze#AJog5~`PGt}i zc&f?;RObVjIqB>0OS;VMOAYQjggH zIAjg^y|qk@MR(nGml6bhX$ZSeE_Sj)HoH)36?Kk{?g{nn|}>Lu~VQG)z}bH!8IlN z5YYUA>2OG1eG>rKv}u#6n1-L2vsJ5B6{yzA8#89ieG0JmYNP=iXex1-g0ksawao+6 zS3yW!5h@+6VEGdDP52d7%Nxs2a%2Em3$duiJ^+pct6H#ETVivkl&T>Us@s$OA;%1C zBDW&F&jP7pETCF(qKh?BSH1Yr(9!^$)Z3?Iqu^QzPU zIPL(Tx<13z0f04bim)Zt>YCo12cXyk2hM65X`Rb?Z!H5?{+cUSt~5<0p}+j)FQ!hw zBGS8re9rd<N0=ZI4WyxJ@iq=hrvwm0#VqL#`aXRniX@$q@y}6~ng5 z)#EqI9eQkWN$HQG8^DVRQ0C|BmRBncz^d9ff;^maGed7A5;`<@#EFAxL^Uv+zJ9cG zqwxf_eMq|HY?9}vuOJL16%OP7@sEF)et_&DLPPTWGi+062;;Hcm;m;cr%%R^?`U8_qKLsAev78ydjLQZh~xQO znVI7KQ8`>0G4i+YqfALjJs~T<$Toh!t&?}kXP>4@%T__MW@WYv9oN0^iIQ20t&65eO z!$8(=fBRe0Oj4asBDaDuW5zt#t5>f#s{(-zRfQlf1As_CRqh_OCr1eb zNtDz!j`x&_Aq|bt&{H+|iFdYR1 z6dB-fcx!(iVtO`u4MNQLEuX5z!KGEaJL4X__`m(_Z)RdCAaj)##VwTQmOLwSm%n&g zg_jn~toirL^{-wnYZ6W`A@gm@H!|hb$@0Lz?~$UCiUluG0d&*rQ{DhM)eD>l0EiyEtw59vAkhaA3=F33k9mNEfn*6O7bD~& z3}ho^%o;-w;TWbWbn7QFbM)^d zBrrtgt^S*gz3?(gkIN`3E-498r*J0#5Es@UcD2OEt|#2054T%i*g%pQsJ)tW2&>OL zfb*C+DxS<7**~&-R-vYbPDYy11bmOlV~RN5HB6^8j71-q4a`(<3S(e0Yb2CU`Y`SQ zXetB1z)pijI{onZKvt4Ox9DKz1eU0;gT&{b%$J_+dP`htoE$iITDv4=Cd!h{i)F@$ zI}HG`ax$e|^cXo-e4?<#ufSi;b)2g!k-PjhRXPqRvbF#Q>gT+@S1*hty-RWj23pU< z>LnzAtm<7tET)em?R-xe7=<9Dk%83~C;iJ3aOCtEy5*Uu;>9m7stinX~XIxoOy~risKY!*7)r7e6m0_7b_`qSFIQ@rQTGd#m1-f>Wnc z^Hci%Owv=*b4yN@1S<2lt5#YkE-pdu){-&mJ$GHac=0@aQKMpFVr-;R-R&3PiJ3q= zcck4>N@cVI*I{3o$pH|wh&dZ2YI#Mu5*8Hh^f^yIS6qI^{WAYx#flZVYPJG~4IB2% zkRe0nR96b-wg!O6EUD^SsV6^$=gTY_cSi?3F%Mwbf0$`ae#Pmlin&w_pRM{tXXc;& zTzTywzKUw8lKlMqUiB%)JK)SwgEQpY?8LG0A2 z)7O{)x14HsFQ^{o4!zKq%sD57ViJXq>W45>2?+@$+1c44>U3tQ^sk_R=d1#N@ny7t z#=hy;WX8(9rBVoOh34{<;#Tg1`*Bx`(q0C?AT2!&0Ay1F-oAbNjX3G9I)Cow0nYF{ zxR7drRXca?yivmVQ%+ z$SUOcAdKd@O3yBxErkUqCAzqyJuj;uOn-k|-~U1efZPs;YqD}EwdVK(Y63>G#yv?D z;$c@jdqPO!>6&yJLDRqxeqR$JL|zyP+v%BN$!Eq%tofrglZyddKl+o zz9LiBDxsw8>!Rkrc2eQ25?N8EDQa}(vh#ngZ{%G z{$OSU!)(gFVLsPF8mWS!R{+ORI!3~X70Ef4S-+ganjOqBbROeg0S|?!q|Qk+A^Dge zG$v_j$2|Ts##9)OARAekN#(a_vbeaoeAOQQdY>OEIA4b!HF_ttktiYpeZYTGe@=pj zgoG;&p{HaJDGMi?2jeZ(sbRtJaH0 z(?xXo^5rkHUJc!;$bZu~p|X)ePnjKz2hOnYv(G+jd;u$GPr7&g`t?QgJldtQno2YzCZ(dka~{Vp)h&<3g2TG^vVkAKyM`E{ZJ z98wdm=)QaH+O@OvM#GR422CnjQl>TSQ1$u`4;V1u z6$QcO+A_b+002>dsP^cudSl-f78aIZ3W$r#*VffG5!BcSQ>E|n)c*bZ{TSm{L3>}# z)_ivce9j2~Aj-xD4I1>kqBNN}8^?$wiZ!dawuBSK3|)5$HociJcN%GwY}>Z&B)u9t zckcWZ6FsQWtgCC(DFA3D(WOh5C90z4sz%5-a^#4eIr)T$bwOn6D8wMs*3gOZ0YXq^ zet||lp=$3psnZ6yLaz-s;=H9Oi4^kw37oT_wDFk zQ{!`!w4t<{Xu>(BZzyH~<}-${e*OAvr3fZ?DD!7`=+I$JT{wN`1ON^Y93@FXsuHbm z;J|^>RjXDRO;8(VVNOV+TA4etZOqLt-_^rgZ9bVo^_`9@^TV4pYnD88=+LJfRX%5B z%>AsoXuAl$2DXF?lj%L>8oEtvmuz#`bBlCe$|$2=c?sP zetv#SwQaX(STmDVu1RC?wXPhK*HuB46e9U4*&f$$h#Mwy?l;WE6iMMp<(RGa?< z!|iny>w5$M91c$8-o1M#tD1XIL&R9}?ix1wkt0WqH>76N)e!?bOg&SRn5!Bf5bs{! z#g{{d40&4L#iq02@YOp29HQlQ3<$hH@(NVwkQnkNTaTlM6RV~$Tceo}$2x;MRRg|4broGb&h>rS>a*<|OVTAI zB#c)z_?xt}w0??wKXvZ>m`q8j6y;OpokYg&DYs%Oc71mZcPF;Tc~z+|OifKK(&r9U zz~`!yw}hc|Qs`$Z%&U&-bpZepMi*Xq;m7L1$14bCYIryXXHob5y7!|UJEc+1Q?M9m z1RUPLd~4N_J$v@pX6k=n(n z>KhDZsXBEMZK@6Y0Rg4ws88Cq5xO!j(Nk4Dd3+LHiHV5}jpwM7XBOU4W~ar*#(t{6 z{z#>Mn=2hW8ngx|L!n9loydCj?D=8)_U+f}iyNmN@)XR1f+AD_VOL=I5iU|%<%ylj z2vM=|B)QbdJ*D@YtM?hI--k0M(y?R5)%tuNuqQX-Dfeyj#MZC$CRC~Ewr}6Qi7NGz zRGNCTc$KP8J57+$7!xN>GzB7_|!sYsMN9ju*fRCWx2Po4^l=%UwN^Mlxk_xt>2MY{! z4GP{BQ3%z)FrD!S-4|wNW)|h;L@DJg=)u7scpAu zDCehtV-+rtWT%6=p8K#edWUY`(Uyhrdi^fV(VoRCUaZYa+rJw>fFx1Ii(S$L_K$uExfs|P8CSF^KI z)%zAlL#AU6+iv&97by*ZSR^liu?7W1JB_zH0SuMgwydD7TRRp})-8;MFj-L1u^wUo zj3)I8lNBJvj)|{@BxHHXc1o6Q(9J!b>9~X~Kh-CXJv-%0p9$q*@t+sLRkI939uV z&0#n=*!{jgzsYgj&N*Yck}o-zy)JvNwb%N#Mp!4#fG_Yi;0kyGk-#jV2MoXlunFv2 zVo+nj8hgM82+GOH$=%r4$kyxiVSr|LcUQZswn}WkErK#A&U-W*rc%+P_pBSX6m=c~i)% ztf;7v<4|(9qBY`1qdby~w$?sHmtGi)49uxkN#|wsZ3!?%%&JQ8T=*#q@V3@4mji zDcJczdV0DX9v+s*$H(#}h4w~9MkET^U}tCd1U^4CO@$ANt~)F&Ot!bTOI#iKCWOV= z+1V*^eb?dh5t|w#utULxudS`!!R|$Javf1_siZ2Lo{AFmZQx7noqL7PYjrC^bPNOo1&zJ?hgA?U~jA z{gDnZfFpZ*`x8zwG>cb@?%uttzJ4rBMF2#>A?Nxwj_?y zs=m+l)T6$sApa5tsYkm0#{b`(29?msi@0M>&De*FaU~DQ1<7D;k`XN}ElG^w-&JP(mFiC+p{GL9xQ4|VPhe^egbA`g*#MlJlumi<@B}hr{)hXizrooO;w(cfPGs z^C+{8Ur5c#-yfrU>2h;(ciY<9l$2QWE+DCGYHHeuj*k9Q&G}>CeRJnmy^I2ZEOg0y zjOs8Hr!Scd(?V9mmyxrxvoctaE~SmL!>z8aikX=ieO+DMv)#YQ&rGcW<{ zSo1bCPYH=)Fz^9DGWnkRo2LpsJYT3_hx<)+`Y${0Rj=d!1Q-CrSn!wl&g3fq0000< KMNUMnLSTZq47`f~ diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..a75dce2 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,39 @@ +'use strict'; + +const gulp = require('gulp'); +const del = require('del'); +const sass = require('gulp-sass'); +const merge = require('merge2'); +const sourcemaps = require('gulp-sourcemaps'); +const cssnano = require('gulp-cssnano'); +const uglify = require('gulp-uglify'); + +const SRC_DIR = './src'; +const BUILD_DIR = './dist'; + +gulp.task('clean', () => del(BUILD_DIR)); + +gulp.task('build', () => { + return merge( + gulp.src(`${SRC_DIR}/sass/**/*.scss`) + .pipe(sourcemaps.init()) + .pipe(sass().on('error', sass.logError)) + .pipe(sourcemaps.write()) + .pipe(gulp.dest(`${BUILD_DIR}/css`)), + + gulp.src(`${SRC_DIR}/*`).pipe(gulp.dest(BUILD_DIR)), + gulp.src(`${SRC_DIR}/icons/**/*.png`).pipe(gulp.dest(`${BUILD_DIR}/icons`)), + gulp.src(`${SRC_DIR}/js/**/*.js`).pipe(gulp.dest(`${BUILD_DIR}/js`)) + ); +}); + +gulp.task('dist', ['build'], () => { + return merge( + gulp.src(`${BUILD_DIR}/css/**/*.css`) + .pipe(cssnano()) + .pipe(gulp.dest(`${BUILD_DIR}/css`)), + gulp.src(`${BUILD_DIR}/js/**/*.js`) + .pipe(uglify()) + .pipe(gulp.dest(`${BUILD_DIR}/js`)) + ); +}); diff --git a/package.json b/package.json new file mode 100644 index 0000000..21ed1c7 --- /dev/null +++ b/package.json @@ -0,0 +1,17 @@ +{ + "name": "json-formatter", + "version": "0.0.0", + "main": "index.js", + "repository": "git@github.com:nikrolls/json-formatter.git", + "author": "Nik Rolls ", + "license": "MIT", + "dependencies": { + "del": "^2.2.2", + "gulp": "^3.9.1", + "gulp-cssnano": "^2.1.2", + "gulp-sass": "^3.1.0", + "gulp-sourcemaps": "^2.6.0", + "gulp-uglify": "^2.1.2", + "merge2": "^1.0.3" + } +} diff --git a/src/icons/128.png b/src/icons/128.png new file mode 100644 index 0000000000000000000000000000000000000000..e203a7dab7a5af5b6d4c4be98f77ee4ed54ed005 GIT binary patch literal 4225 zcmZWt2T)Vn7QG3*iy#On#Ly9v(0dU>lO{?DNQVRvLKk9afd@}PdR0`46h#mOX+a=C zl#UeXDD5d#il`K6|N7pWKlA6Gx%ZrV+TOF*?7h!AH~y-b0UI+vGXMZ=MuzBXU`zV_ zGSY)}yOv8Y06>hrEHS|tQxi2eKRm+4-Om+^AmIJMc>vJRCiuI!d1HfNu2>H*UrqSt zYYH6Z<*o_0Q8Y!F`d`L+dKnS}vDb-amTp9EH&u7IwidGnK@Aju#|FE=2zVdgAT@#} z{BOBx;P>xgBpmkll3;I5_@&&Y}s)mw<{afH#%rK2WcbwWawEn-!z@8@DGdS2^4T%g54Ml{?Bm4qA zkg}?(sz{U^Qcg|=Tp<&5+c(&SAmbY({9D97GSJu{w?HrdU@t#k*l(FGu70MMr6%I%3t zNassu)=MpduKYFq(r)7ACKHfN_gydU)2Fc+IU2M@=et-WE>;U!)Rvk@s(}|m@JG4iQ93a-GH!A@pC*Vh&@9G zshn!)nI9_*mpz}8<|19U0wbNLx)d-Ic(!OB@EkO~QrsHV}y{GZF3iU)vWgbf~Xh9>X`)I%V zqf<>|f#uA84L~|MkHEiYGdGUokd~C3A1u7gedde>2GezXbTIik6q%y+OJZ_z(r3Cp z>FZY?fQN^tF?3Uqg@q-2_fzP{rd#*ozzM z2rPutD)-`}9QE|#6ciP^CtrDBu~@wd99R*F#Nx6tBPl7VzAva&K+shESpnlJa+daO_B&~MS7a?a3MTwJ{3 z=2m24W+tYwA|)m+UQ%6c5f~Jd#CYM9RQdcb+hKcvfppTQb7ppOas?e}Iy5=y^@Ati zg5{2BngS2?B2~iz`epav%jfP4v(It}vpfySNJ^AEXWt#yQ)i4WL)@Y3Xr|=OztR>L zapHjiZSrb~P0)kGa z!f6ukSp&}4ni{#4&CO7_0aGD`;?&dA^CaF`gS&{$Fqe_a(N`#OSnbyNs4HIhoO+0K zF5@D}seZ4&0>84GMeq!A4`t@`*tW*sI;=9FG0 z?k{B#Biff7k9Uti$d{gE<0RBlp;WDE9UzM5DR4|fP#NB9V-R|K+b#!{fYD+-^oT*~ z{UP)i^62N!pX|p@!(8tOF$X$vZ*6Jb$`cMnwszOpQZ#qYa&d9_%(iMKe`rG2)Yt1@ zx&)Dzmrv7vd^#;^P`zV06jD6{?TKE3CsnoV9AiCY{gh zl!a(kcD5SE$d~PkvGGq|I&qOUj%bGHS$+QeFth6y8Zn9R4oZJlm&*OFwY|HHXLxvd zrz?*uD-m9vo)dGS{{Dj@l!pPoeyp&KkBp6pIXF1f?_We9#>(j;kxVxkCX(LUG=;Fw zZ>+6dSNv0?1bB19$|@@{IoWQbicGd0nB|}frvs2f#PDrj-^wp>tXwkt-3UOZ*|Dnc z{d>C&d2w-rf!R$F$N-RQFf=t~m+=&3=IvdMUoxW=78Y(k+L_MI-;LvS9F$*c6~h?G zs!8SN=GNHH!&jpy<7-(To|;cD$O|?#HDxMBkJeE~MlySBswW66drO9Qz@X0N@zFeg z{yY;?Y1T8ecjsl7Tes@+sv6#Q+@Siw*^sS!PvYDAzkSJZy6J<*;|Usq)8QSxX~G7c zo}PmfygWS8yCrv9Rzd@cpcAJ4QuS;S8+zGW{mQeRKIR(VV)4fn3lBW(z($ZXRK9MSd66p6P>CNwOyz(ALyxZ7G&2S^eB*k*&g-LKmvI~tJibv`DSEAd` zo}qr=Z~wrbVH{)ec}`M(>8>p>pncNJr;Si5=!*UVouJRu9HobiutCY*sW8ORyOw~Tzx_skM zGSI~m=11(rJNk~XoURw+LCC3V)kh}Ue z8Nx25udn|@EB*=*OyFD#9sw2&^-glcW=_aqu`KvZ_FOmDd^a(H(T(V6e|L`;e_r}k z-oftXTJDP<0gvw<^zQ97mh8Sn6%`d(2o)%~g@jnIuC6Mbf9Ur!GR@M;N>a%EMPxR3 zOnvyS=vx9Pto?8x2fiEDMb~I8uQl|0;_;*BuG`pn97L{JXaXU@!Dl&0OqKTJCrg_N zL!bG{bRUxyz~ioWdEaf}MZ?T+onMGRW6)A^hmx}LKbxvXMo0BD5!Sx5W5o<}>P4Lb zoYdG3RH3YG!oX7d+GvOuQbsSTen=p7f4dhs-8xJBA=tyu&p$y9@)-Hc^-D*RKobt! z#ittR;MQ0vYis7{C!?%7bR6yn{8Z#kPsz<6v4U(O234Zlw3rj1vhz6arHNb zacKqy_!}2heUs0rE_6kj{o_((I{PFARyH<1P0GD~iNM0{2h76IvlkjkZ8U%0xnt|# zpt#!pPR!cI=I5AVt1-&sPtfVYNTpFbtqfv~p%{DnVhTljI9v#& znEn14umSMP=ow{C6yOUn0Yv^zhcVPN9e2u*@yTQ7z^j z8A;_fb$-qq+7%DXRDHRt$3J&nIjyFb=xAU9W;JOUnaPC#W}JrymmIXKN7A)#1Q;hp z8~zox+2XOl-61J68u=-BlV*neqesL`{@Z`PgRXYueP=p<2V{;YiE}Z=J|fZLic7mFtDbSZ2XOl?>UY} z3GIk^cT`U1l?==Xim)=Xs3XCa=Q?^fhoT2Y`i#r2-LYrw^Bh8nQk~258*=n>vv>D!&O~Ca@@%+#^7W?Wp^=f|oWp#^MXE()%KO)T zQBjnPI;>s5%CM-Fz#q6YMx!}-o%<2X6?|V2=e*7*#0f7&pEH6&NUwt{@Mv4LddGD4 z6%3=6q2u7|tD)bPC*o@e!APTef`UYL%51gUo!8;vtUq>kdXmqpTUtdGicD^Qb8#FZ zJ4;GSXBHM-=!|)A6Ld}^7nj1-*^?Ak*#1H)0I2;yd|dk84N`^cvZj1E9PaJX_p^OESkq(R1`4q zn#sDFs8sPw)C&#(LJ18tj3F?G*6_*rMFeR)zkU)gS}>&g!44POOZ z9QB^kcpX_=SX_8&_Baq88W6BLQs%k2GmjUfF>W>HX8{Tr^=#xgb(g<>4Tk5Gf{j8t zfhlWpkbx$B5k#f&Es?ZKDFzAj9~8P=BAgHij6MW5l?;*O%mT_%D_k{ zRcb)6mfFzt&6_uii;CLQ*h_U_u+9{roZMV~VWXU@50dZncqY6MA)zP$5ydmX&~O(N z0=jA1=%`gMS8G#~l%}TU@W_aJZGsc!ClGbs8}*e(M`M<5qJI`RfgVnMjTRLZ&CJfe zW^Zo-vatRAeUK>Ze4T8+%%O?K;THcWyOEQVLk`jvb@>buO=I$f`<;IY8 zew!-C(T55Bj8VXhm`dzLoa>RYz!3s=2D~5X4n2D0K7D1`uJ?u1p>;FeGmvFO#y}pK z2Y*&N)uhxr{$aYOf#k_eGeBby?R2{20+>DjzIjm~)7F319`K|-hhhfU=NQ|}GNq^- zn4^FN{;og>2uGDJDJ#R2WSL^8=ov9V%&I7G-^*cXb)z2 znGm%omP4U7$#DZFv*tqz?bAL}m5s{<_x`UKA0BG^y+OKA5f1#n{~Q?UnV~Cnon!t3 DB@Mf= literal 0 HcmV?d00001 diff --git a/src/icons/32.png b/src/icons/32.png new file mode 100644 index 0000000000000000000000000000000000000000..c30e7548d766326e354bc6ed39be2da0fbbe2077 GIT binary patch literal 1215 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=hEVFnVW(M3hAM`dB6B=jtV<?;Zqle1Gx6p~WYGxKbf-tXS8q>!0ns}yePYv5bpoSKp8QB{;0T;&&% zT$P<{nWAKG$7NGt1vDTxwIorYA~z?m*s8)-32d$vkPQ;nS5g2gDap1~as*kZ5aAo3 z;GAESs$i;TrkiYNY@uLosb^?vX<=ldqhMrUXr^yqsc&eaYhY+)U}!BPbD zzk=sFD+UH;eNPw1kcif^)9w9l$A}!OpR$dcW2y5GhRzS{97%~TN|Ae%qH9_vEj;y% zaphlzX{)}RpW>geQkpqG;*sL12BFTW31Tf*q!nj*Bzkm}T3z8&ym7-dvr=9&=uPpv z+IdgrRsTC+ocxf#CZ16>LHY(mk%QWXuZ_hIBrKTz2~V8g`GlK$B}+;}`GM%z>zi-i zzMYekGvV~p6Df6{zyGd1cmBMko!zq+FFKl=o3$Tse+YE>)z9hC#96al$9qc9Brz|| zjXK^9?;A9gTx#VGD}A_X;#(MNZu(It=DO%*6V@MGI?F^iaMWl|KkctJ&vj>v*n`_^ zIxK2tssHThIPb~CbJ*a?w{K5eA2whyc*K&za5cl^nV;OEiy0gX8hoZSe4m#3 z*YuOX!M7Fm+7C=GbnnhOn-*;1JNfV5zb;J23t0qiZ&QBjrO8;u_?%_ey4M?L&swHA zYuU+%4-*$Lod2AXpYPA`(MJE0`}I=Bk_Pd{hNO)VJ$uFG`mrB2(3tAA(N3{wr_Ao% zyZe8!{GPImRfMb6>Cv;#P6t9~h%LyRCHAtWxR}}C=U_Mg__o|@*RL~f$emqd*ZY;jo{G}EU2etB7$(Dk+#B~}cwJFJ_k_Qv(c255*l zU0qpFS^0B??SozJKcseac^};x<=bHIbu>CUdg8YoAv~N%PZZ9%vT{e*>Z98V3XgL9 zbF?grHUIN<;!}yHwj~&&g8l=g;4qbnyQIO8=c0ow&VNbj`^l z6Wf{Q8O;&fDeZTkWt;pR-sPnW^pqYi;k|sOtzLFNLxp~0w7ciMcc5~|)78&qol`;+ E01=J+ng9R* literal 0 HcmV?d00001 diff --git a/extension/js/background.js b/src/js/background.js similarity index 100% rename from extension/js/background.js rename to src/js/background.js diff --git a/extension/js/content.js b/src/js/content.js similarity index 100% rename from extension/js/content.js rename to src/js/content.js diff --git a/extension/manifest.json b/src/manifest.json similarity index 100% rename from extension/manifest.json rename to src/manifest.json diff --git a/sass/content.scss b/src/sass/content.scss similarity index 100% rename from sass/content.scss rename to src/sass/content.scss diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..edfc66b --- /dev/null +++ b/yarn.lock @@ -0,0 +1,2714 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@gulp-sourcemaps/identity-map@1.X": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/identity-map/-/identity-map-1.0.0.tgz#3eedeaecd6bf6f3b7cf11bc2cc616e270584dd89" + dependencies: + acorn "^5.0.3" + css "^2.2.1" + normalize-path "^2.1.1" + source-map "^0.5.6" + through2 "^2.0.3" + +"@gulp-sourcemaps/map-sources@1.X": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda" + dependencies: + normalize-path "^2.0.1" + through2 "^2.0.3" + +abbrev@1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" + +acorn@4.X: + version "4.0.11" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.11.tgz#edcda3bd937e7556410d42ed5860f67399c794c0" + +acorn@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" + +ajv@^4.9.1: + version "4.11.7" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.7.tgz#8655a5d86d0824985cc471a1d913fb6729a0ec48" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +alphanum-sort@^1.0.1, alphanum-sort@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +aproba@^1.0.3: + version "1.1.1" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.1.tgz#95d3600f07710aa0e9298c726ad5ecf2eacbabab" + +archy@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + +are-we-there-yet@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz#80e470e95a084794fe1899262c5667c6e88de1b3" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.0 || ^1.1.13" + +argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.3.tgz#a274ed85ac08849b6bd7847c4580745dc51adfb1" + +array-differ@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1, array-uniq@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +async-foreach@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +atob@~1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/atob/-/atob-1.1.3.tgz#95f13629b12c3a51a5d215abdce2aa9f32f80773" + +autoprefixer@^6.3.1: + version "6.7.7" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" + dependencies: + browserslist "^1.7.6" + caniuse-db "^1.0.30000634" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^5.2.16" + postcss-value-parser "^3.2.3" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +balanced-match@^0.4.1, balanced-match@^0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + +beeper@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" + +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + dependencies: + inherits "~2.0.0" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +brace-expansion@^1.0.0: + version "1.1.7" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59" + dependencies: + balanced-match "^0.4.1" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: + version "1.7.7" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" + dependencies: + caniuse-db "^1.0.30000639" + electron-to-chromium "^1.2.7" + +buffer-shims@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" + +builtin-modules@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + +caniuse-api@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c" + dependencies: + browserslist "^1.3.6" + caniuse-db "^1.0.30000529" + lodash.memoize "^4.1.2" + lodash.uniq "^4.5.0" + +caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: + version "1.0.30000656" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000656.tgz#127c8c6e655e7464e58f039558f1e878fcca3c45" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +clap@^1.0.9: + version "1.1.3" + resolved "https://registry.yarnpkg.com/clap/-/clap-1.1.3.tgz#b3bd36e93dd4cbfb395a3c26896352445265c05b" + dependencies: + chalk "^1.1.3" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +clone-stats@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" + +clone@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f" + +clone@^1.0.0, clone@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +coa@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.1.tgz#7f959346cfc8719e3f7233cd6852854a7c67d8a3" + dependencies: + q "^1.1.2" + +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" + +color-convert@^1.3.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" + dependencies: + color-name "^1.1.1" + +color-name@^1.0.0, color-name@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.2.tgz#5c8ab72b64bd2215d617ae9559ebb148475cf98d" + +color-string@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991" + dependencies: + color-name "^1.0.0" + +color@^0.11.0: + version "0.11.4" + resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764" + dependencies: + clone "^1.0.2" + color-convert "^1.3.0" + color-string "^0.3.0" + +colormin@^1.0.5: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133" + dependencies: + color "^0.11.0" + css-color-names "0.0.4" + has "^1.0.1" + +colors@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" + +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" + dependencies: + delayed-stream "~1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +convert-source-map@1.X: + version "1.5.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +cross-spawn@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +css-color-names@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" + +css@2.X, css@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/css/-/css-2.2.1.tgz#73a4c81de85db664d4ee674f7d47085e3b2d55dc" + dependencies: + inherits "^2.0.1" + source-map "^0.1.38" + source-map-resolve "^0.3.0" + urix "^0.1.0" + +cssnano@^3.0.0, cssnano@^3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38" + dependencies: + autoprefixer "^6.3.1" + decamelize "^1.1.2" + defined "^1.0.0" + has "^1.0.1" + object-assign "^4.0.1" + postcss "^5.0.14" + postcss-calc "^5.2.0" + postcss-colormin "^2.1.8" + postcss-convert-values "^2.3.4" + postcss-discard-comments "^2.0.4" + postcss-discard-duplicates "^2.0.1" + postcss-discard-empty "^2.0.1" + postcss-discard-overridden "^0.1.1" + postcss-discard-unused "^2.2.1" + postcss-filter-plugins "^2.0.0" + postcss-merge-idents "^2.1.5" + postcss-merge-longhand "^2.0.1" + postcss-merge-rules "^2.0.3" + postcss-minify-font-values "^1.0.2" + postcss-minify-gradients "^1.0.1" + postcss-minify-params "^1.0.4" + postcss-minify-selectors "^2.0.4" + postcss-normalize-charset "^1.1.0" + postcss-normalize-url "^3.0.7" + postcss-ordered-values "^2.1.0" + postcss-reduce-idents "^2.2.2" + postcss-reduce-initial "^1.0.0" + postcss-reduce-transforms "^1.0.3" + postcss-svgo "^2.1.1" + postcss-unique-selectors "^2.0.2" + postcss-value-parser "^3.2.3" + postcss-zindex "^2.0.1" + +csso@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85" + dependencies: + clap "^1.0.9" + source-map "^0.5.3" + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + dependencies: + array-find-index "^1.0.1" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +dateformat@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.0.0.tgz#2743e3abb5c3fc2462e527dca445e04e9f4dee17" + +debug-fabulous@0.1.X: + version "0.1.0" + resolved "https://registry.yarnpkg.com/debug-fabulous/-/debug-fabulous-0.1.0.tgz#ad0ea07a5d519324fb55842a8f34ee59c7f8ff6c" + dependencies: + debug "2.X" + object-assign "4.1.0" + +debug@2.X: + version "2.6.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d" + dependencies: + ms "0.7.2" + +decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +defaults@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + dependencies: + clone "^1.0.2" + +defined@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + +del@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +deprecated@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/deprecated/-/deprecated-0.0.1.tgz#f9c9af5464afa1e7a971458a8bdef2aa94d5bb19" + +detect-file@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-0.1.0.tgz#4935dedfd9488648e006b0129566e9386711ea63" + dependencies: + fs-exists-sync "^0.1.0" + +detect-newline@2.X: + version "2.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" + +duplexer2@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" + dependencies: + readable-stream "~1.1.9" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +electron-to-chromium@^1.2.7: + version "1.3.4" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.4.tgz#e51769c0cf550e0cf5aedf6aa2b803a264b3a900" + +end-of-stream@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-0.1.5.tgz#8e177206c3c80837d85632e8b9359dfe8b2f6eaf" + dependencies: + once "~1.3.0" + +error-ex@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + dependencies: + is-arrayish "^0.2.1" + +escape-string-regexp@^1.0.2: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +esprima@^2.6.0: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +expand-tilde@^1.2.1, expand-tilde@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-1.2.2.tgz#0b81eba897e5a3d31d1c3d102f8f01441e559449" + dependencies: + os-homedir "^1.0.1" + +extend@^3.0.0, extend@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extsprintf@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" + +fancy-log@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.0.tgz#45be17d02bb9917d60ccffd4995c999e6c8c9948" + dependencies: + chalk "^1.1.1" + time-stamp "^1.0.0" + +filename-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +find-index@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/find-index/-/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +findup-sync@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.4.3.tgz#40043929e7bc60adf0b7f4827c4c6e75a0deca12" + dependencies: + detect-file "^0.1.0" + is-glob "^2.0.1" + micromatch "^2.3.7" + resolve-dir "^0.1.0" + +fined@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/fined/-/fined-1.0.2.tgz#5b28424b760d7598960b7ef8480dff8ad3660e97" + dependencies: + expand-tilde "^1.2.1" + lodash.assignwith "^4.0.7" + lodash.isempty "^4.2.1" + lodash.isplainobject "^4.0.4" + lodash.isstring "^4.0.1" + lodash.pick "^4.2.1" + parse-filepath "^1.0.1" + +first-chunk-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e" + +flagged-respawn@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-0.3.2.tgz#ff191eddcd7088a675b2610fffc976be9b8074b5" + +flatten@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +fs-exists-sync@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fstream@^1.0.0, fstream@^1.0.2: + version "1.0.11" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +function-bind@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" + +gauge@~2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.3.tgz#1c23855f962f17b3ad3d0dc7443f304542edfe09" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +gaze@^0.5.1: + version "0.5.2" + resolved "https://registry.yarnpkg.com/gaze/-/gaze-0.5.2.tgz#40b709537d24d1d45767db5a908689dfe69ac44f" + dependencies: + globule "~0.1.0" + +gaze@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.2.tgz#847224677adb8870d679257ed3388fdb61e40105" + dependencies: + globule "^1.0.0" + +get-caller-file@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + +getpass@^0.1.1: + version "0.1.6" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob-stream@^3.1.5: + version "3.1.18" + resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-3.1.18.tgz#9170a5f12b790306fdfe598f313f8f7954fd143b" + dependencies: + glob "^4.3.1" + glob2base "^0.0.12" + minimatch "^2.0.1" + ordered-read-streams "^0.1.0" + through2 "^0.6.1" + unique-stream "^1.0.0" + +glob-watcher@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-0.0.6.tgz#b95b4a8df74b39c83298b0c05c978b4d9a3b710b" + dependencies: + gaze "^0.5.1" + +glob2base@^0.0.12: + version "0.0.12" + resolved "https://registry.yarnpkg.com/glob2base/-/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56" + dependencies: + find-index "^0.1.1" + +glob@^4.3.1: + version "4.5.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-4.5.3.tgz#c6cb73d3226c1efef04de3c56d012f03377ee15f" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "^2.0.1" + once "^1.3.0" + +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@~7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@~3.1.21: + version "3.1.21" + resolved "https://registry.yarnpkg.com/glob/-/glob-3.1.21.tgz#d29e0a055dea5138f4d07ed40e8982e83c2066cd" + dependencies: + graceful-fs "~1.2.0" + inherits "1" + minimatch "~0.2.11" + +global-modules@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-0.2.3.tgz#ea5a3bed42c6d6ce995a4f8a1269b5dae223828d" + dependencies: + global-prefix "^0.1.4" + is-windows "^0.2.0" + +global-prefix@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-0.1.5.tgz#8d3bc6b8da3ca8112a160d8d496ff0462bfef78f" + dependencies: + homedir-polyfill "^1.0.0" + ini "^1.3.4" + is-windows "^0.2.0" + which "^1.2.12" + +globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +globule@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/globule/-/globule-1.1.0.tgz#c49352e4dc183d85893ee825385eb994bb6df45f" + dependencies: + glob "~7.1.1" + lodash "~4.16.4" + minimatch "~3.0.2" + +globule@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/globule/-/globule-0.1.0.tgz#d9c8edde1da79d125a151b79533b978676346ae5" + dependencies: + glob "~3.1.21" + lodash "~1.0.1" + minimatch "~0.2.11" + +glogg@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.0.tgz#7fe0f199f57ac906cf512feead8f90ee4a284fc5" + dependencies: + sparkles "^1.0.0" + +graceful-fs@4.X, graceful-fs@^4.1.2: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +graceful-fs@^3.0.0: + version "3.0.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-3.0.11.tgz#7613c778a1afea62f25c630a086d7f3acbbdd818" + dependencies: + natives "^1.1.0" + +graceful-fs@~1.2.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364" + +gulp-cssnano@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/gulp-cssnano/-/gulp-cssnano-2.1.2.tgz#e08a09771ec5454a549f1a005bdd256cb8e5e0a3" + dependencies: + cssnano "^3.0.0" + gulp-util "^3.0.6" + object-assign "^4.0.1" + vinyl-sourcemaps-apply "^0.2.1" + +gulp-sass@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/gulp-sass/-/gulp-sass-3.1.0.tgz#53dc4b68a1f5ddfe4424ab4c247655269a8b74b7" + dependencies: + gulp-util "^3.0" + lodash.clonedeep "^4.3.2" + node-sass "^4.2.0" + through2 "^2.0.0" + vinyl-sourcemaps-apply "^0.2.0" + +gulp-sourcemaps@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-2.6.0.tgz#7ccce899a8a3bfca1593a3348d0fbf41dd3f51e5" + dependencies: + "@gulp-sourcemaps/identity-map" "1.X" + "@gulp-sourcemaps/map-sources" "1.X" + acorn "4.X" + convert-source-map "1.X" + css "2.X" + debug-fabulous "0.1.X" + detect-newline "2.X" + graceful-fs "4.X" + source-map "0.X" + strip-bom-string "1.X" + through2 "2.X" + vinyl "1.X" + +gulp-uglify@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/gulp-uglify/-/gulp-uglify-2.1.2.tgz#6db85b1d0ee63d18058592b658649d65c2ec4541" + dependencies: + gulplog "^1.0.0" + has-gulplog "^0.1.0" + lodash "^4.13.1" + make-error-cause "^1.1.1" + through2 "^2.0.0" + uglify-js "~2.8.10" + uglify-save-license "^0.4.1" + vinyl-sourcemaps-apply "^0.2.0" + +gulp-util@^3.0, gulp-util@^3.0.0, gulp-util@^3.0.6: + version "3.0.8" + resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f" + dependencies: + array-differ "^1.0.0" + array-uniq "^1.0.2" + beeper "^1.0.0" + chalk "^1.0.0" + dateformat "^2.0.0" + fancy-log "^1.1.0" + gulplog "^1.0.0" + has-gulplog "^0.1.0" + lodash._reescape "^3.0.0" + lodash._reevaluate "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.template "^3.0.0" + minimist "^1.1.0" + multipipe "^0.1.2" + object-assign "^3.0.0" + replace-ext "0.0.1" + through2 "^2.0.0" + vinyl "^0.5.0" + +gulp@^3.9.1: + version "3.9.1" + resolved "https://registry.yarnpkg.com/gulp/-/gulp-3.9.1.tgz#571ce45928dd40af6514fc4011866016c13845b4" + dependencies: + archy "^1.0.0" + chalk "^1.0.0" + deprecated "^0.0.1" + gulp-util "^3.0.0" + interpret "^1.0.0" + liftoff "^2.1.0" + minimist "^1.1.0" + orchestrator "^0.3.0" + pretty-hrtime "^1.0.0" + semver "^4.1.0" + tildify "^1.0.0" + v8flags "^2.0.2" + vinyl-fs "^0.3.0" + +gulplog@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5" + dependencies: + glogg "^1.0.0" + +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +has-gulplog@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce" + dependencies: + sparkles "^1.0.0" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +has@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" + dependencies: + function-bind "^1.0.2" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +homedir-polyfill@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" + dependencies: + parse-passwd "^1.0.0" + +hosted-git-info@^2.1.4: + version "2.4.2" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.4.2.tgz#0076b9f46a270506ddbaaea56496897460612a67" + +html-comment-regex@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +in-publish@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51" + +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + dependencies: + repeating "^2.0.0" + +indexes-of@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b" + +inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +ini@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + +interpret@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +is-absolute-url@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" + +is-absolute@^0.2.3: + version "0.2.6" + resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-0.2.6.tgz#20de69f3db942ef2d87b9c2da36f172235b1b5eb" + dependencies: + is-relative "^0.2.1" + is-windows "^0.2.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-buffer@^1.0.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-dotfile@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-number@^2.0.2, is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + +is-path-in-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" + dependencies: + is-path-inside "^1.0.0" + +is-path-inside@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" + dependencies: + path-is-inside "^1.0.1" + +is-plain-obj@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-relative@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-0.2.1.tgz#d27f4c7d516d175fb610db84bbeef23c3bc97aa5" + dependencies: + is-unc-path "^0.1.1" + +is-svg@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9" + dependencies: + html-comment-regex "^1.1.0" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-unc-path@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-0.1.2.tgz#6ab053a72573c10250ff416a3814c35178af39b9" + dependencies: + unc-path-regex "^0.1.0" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +is-windows@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +jodid25519@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" + dependencies: + jsbn "~0.1.0" + +js-base64@^2.1.9: + version "2.1.9" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" + +js-yaml@~3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsprim@^1.2.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.0.tgz#a3b87e40298d8c380552d8cc7628a0bb95a22918" + dependencies: + assert-plus "1.0.0" + extsprintf "1.0.2" + json-schema "0.2.3" + verror "1.3.6" + +kind-of@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.1.0.tgz#475d698a5e49ff5e53d14e3e732429dc8bf4cf47" + dependencies: + is-buffer "^1.0.2" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +liftoff@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-2.3.0.tgz#a98f2ff67183d8ba7cfaca10548bd7ff0550b385" + dependencies: + extend "^3.0.0" + findup-sync "^0.4.2" + fined "^1.0.1" + flagged-respawn "^0.3.2" + lodash.isplainobject "^4.0.4" + lodash.isstring "^4.0.1" + lodash.mapvalues "^4.4.0" + rechoir "^0.6.2" + resolve "^1.1.7" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +lodash._basecopy@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" + +lodash._basetostring@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5" + +lodash._basevalues@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7" + +lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + +lodash._isiterateecall@^3.0.0: + version "3.0.9" + resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" + +lodash._reescape@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reescape/-/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a" + +lodash._reevaluate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed" + +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + +lodash._root@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" + +lodash.assign@^4.0.3, lodash.assign@^4.0.6, lodash.assign@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" + +lodash.assignwith@^4.0.7: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz#127a97f02adc41751a954d24b0de17e100e038eb" + +lodash.clonedeep@^4.3.2: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + +lodash.escape@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698" + dependencies: + lodash._root "^3.0.0" + +lodash.isarguments@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + +lodash.isarray@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" + +lodash.isempty@^4.2.1: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.isempty/-/lodash.isempty-4.4.0.tgz#6f86cbedd8be4ec987be9aaf33c9684db1b31e7e" + +lodash.isplainobject@^4.0.4: + version "4.0.6" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + +lodash.keys@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" + dependencies: + lodash._getnative "^3.0.0" + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + +lodash.mapvalues@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c" + +lodash.memoize@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + +lodash.mergewith@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.0.tgz#150cf0a16791f5903b8891eab154609274bdea55" + +lodash.pick@^4.2.1: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" + +lodash.restparam@^3.0.0: + version "3.6.1" + resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" + +lodash.template@^3.0.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f" + dependencies: + lodash._basecopy "^3.0.0" + lodash._basetostring "^3.0.0" + lodash._basevalues "^3.0.0" + lodash._isiterateecall "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + lodash.keys "^3.0.0" + lodash.restparam "^3.0.0" + lodash.templatesettings "^3.0.0" + +lodash.templatesettings@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5" + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + +lodash.uniq@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + +lodash@^4.0.0, lodash@^4.13.1: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + +lodash@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-1.0.2.tgz#8f57560c83b59fc270bd3d561b690043430e2551" + +lodash@~4.16.4: + version "4.16.6" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.16.6.tgz#d22c9ac660288f3843e16ba7d2b5d06cca27d777" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +lru-cache@2: + version "2.7.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" + +lru-cache@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e" + dependencies: + pseudomap "^1.0.1" + yallist "^2.0.0" + +macaddress@^0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" + +make-error-cause@^1.1.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/make-error-cause/-/make-error-cause-1.2.2.tgz#df0388fcd0b37816dff0a5fb8108939777dcbc9d" + dependencies: + make-error "^1.2.0" + +make-error@^1.2.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.2.3.tgz#6c4402df732e0977ac6faf754a5074b3d2b1d19d" + +map-cache@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + +map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + +math-expression-evaluator@^1.2.14: + version "1.2.16" + resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.16.tgz#b357fa1ca9faefb8e48d10c14ef2bcb2d9f0a7c9" + +meow@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + +merge2@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.0.3.tgz#fa44f8b2262615ab72f0808a401d478a70e394db" + +micromatch@^2.3.7: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +mime-db@~1.27.0: + version "1.27.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1" + +mime-types@^2.1.12, mime-types@~2.1.7: + version "2.1.15" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed" + dependencies: + mime-db "~1.27.0" + +minimatch@^2.0.1: + version "2.0.10" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" + dependencies: + brace-expansion "^1.0.0" + +minimatch@^3.0.2, minimatch@~3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" + dependencies: + brace-expansion "^1.0.0" + +minimatch@~0.2.11: + version "0.2.14" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.2.14.tgz#c74e780574f63c6f9a090e90efbe6ef53a6a756a" + dependencies: + lru-cache "2" + sigmund "~1.0.0" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.1.0, minimist@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +ms@0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" + +multipipe@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b" + dependencies: + duplexer2 "0.0.2" + +nan@^2.3.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" + +natives@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.0.tgz#e9ff841418a6b2ec7a495e939984f78f163e6e31" + +node-gyp@^3.3.1: + version "3.6.0" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.6.0.tgz#7474f63a3a0501161dda0b6341f022f14c423fa6" + dependencies: + fstream "^1.0.0" + glob "^7.0.3" + graceful-fs "^4.1.2" + minimatch "^3.0.2" + mkdirp "^0.5.0" + nopt "2 || 3" + npmlog "0 || 1 || 2 || 3 || 4" + osenv "0" + request "2" + rimraf "2" + semver "~5.3.0" + tar "^2.0.0" + which "1" + +node-sass@^4.2.0: + version "4.5.2" + resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.5.2.tgz#4012fa2bd129b1d6365117e88d9da0500d99da64" + dependencies: + async-foreach "^0.1.3" + chalk "^1.1.1" + cross-spawn "^3.0.0" + gaze "^1.0.0" + get-stdin "^4.0.1" + glob "^7.0.3" + in-publish "^2.0.0" + lodash.assign "^4.2.0" + lodash.clonedeep "^4.3.2" + lodash.mergewith "^4.6.0" + meow "^3.7.0" + mkdirp "^0.5.1" + nan "^2.3.2" + node-gyp "^3.3.1" + npmlog "^4.0.0" + request "^2.79.0" + sass-graph "^2.1.1" + stdout-stream "^1.4.0" + +"nopt@2 || 3": + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + dependencies: + abbrev "1" + +normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: + version "2.3.6" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.6.tgz#498fa420c96401f787402ba21e600def9f981fff" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.1, normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-range@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" + +normalize-url@^1.4.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c" + dependencies: + object-assign "^4.0.1" + prepend-http "^1.0.0" + query-string "^4.1.0" + sort-keys "^1.0.0" + +"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.2.tgz#d03950e0e78ce1527ba26d2a7592e9348ac3e75f" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.1" + set-blocking "~2.0.0" + +num2fraction@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +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.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + +object-assign@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" + +object-assign@^4.0.1, object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +once@^1.3.0, once@~1.3.0: + version "1.3.3" + resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" + dependencies: + wrappy "1" + +orchestrator@^0.3.0: + version "0.3.8" + resolved "https://registry.yarnpkg.com/orchestrator/-/orchestrator-0.3.8.tgz#14e7e9e2764f7315fbac184e506c7aa6df94ad7e" + dependencies: + end-of-stream "~0.1.5" + sequencify "~0.0.7" + stream-consume "~0.1.0" + +ordered-read-streams@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz#fd565a9af8eb4473ba69b6ed8a34352cb552f126" + +os-homedir@^1.0.0, os-homedir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +os-tmpdir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +osenv@0: + version "0.1.4" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +parse-filepath@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.1.tgz#159d6155d43904d16c10ef698911da1e91969b73" + dependencies: + is-absolute "^0.2.3" + map-cache "^0.2.0" + path-root "^0.1.1" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parse-passwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-is-inside@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +path-root-regex@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d" + +path-root@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7" + dependencies: + path-root-regex "^0.1.0" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +postcss-calc@^5.2.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" + dependencies: + postcss "^5.0.2" + postcss-message-helpers "^2.0.0" + reduce-css-calc "^1.2.6" + +postcss-colormin@^2.1.8: + version "2.2.2" + resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b" + dependencies: + colormin "^1.0.5" + postcss "^5.0.13" + postcss-value-parser "^3.2.3" + +postcss-convert-values@^2.3.4: + version "2.6.1" + resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz#bbd8593c5c1fd2e3d1c322bb925dcae8dae4d62d" + dependencies: + postcss "^5.0.11" + postcss-value-parser "^3.1.2" + +postcss-discard-comments@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d" + dependencies: + postcss "^5.0.14" + +postcss-discard-duplicates@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932" + dependencies: + postcss "^5.0.4" + +postcss-discard-empty@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5" + dependencies: + postcss "^5.0.14" + +postcss-discard-overridden@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58" + dependencies: + postcss "^5.0.16" + +postcss-discard-unused@^2.2.1: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433" + dependencies: + postcss "^5.0.14" + uniqs "^2.0.0" + +postcss-filter-plugins@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz#6d85862534d735ac420e4a85806e1f5d4286d84c" + dependencies: + postcss "^5.0.4" + uniqid "^4.0.0" + +postcss-merge-idents@^2.1.5: + version "2.1.7" + resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270" + dependencies: + has "^1.0.1" + postcss "^5.0.10" + postcss-value-parser "^3.1.1" + +postcss-merge-longhand@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz#23d90cd127b0a77994915332739034a1a4f3d658" + dependencies: + postcss "^5.0.4" + +postcss-merge-rules@^2.0.3: + version "2.1.2" + resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz#d1df5dfaa7b1acc3be553f0e9e10e87c61b5f721" + dependencies: + browserslist "^1.5.2" + caniuse-api "^1.5.2" + postcss "^5.0.4" + postcss-selector-parser "^2.2.2" + vendors "^1.0.0" + +postcss-message-helpers@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e" + +postcss-minify-font-values@^1.0.2: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69" + dependencies: + object-assign "^4.0.1" + postcss "^5.0.4" + postcss-value-parser "^3.0.2" + +postcss-minify-gradients@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1" + dependencies: + postcss "^5.0.12" + postcss-value-parser "^3.3.0" + +postcss-minify-params@^1.0.4: + version "1.2.2" + resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz#ad2ce071373b943b3d930a3fa59a358c28d6f1f3" + dependencies: + alphanum-sort "^1.0.1" + postcss "^5.0.2" + postcss-value-parser "^3.0.2" + uniqs "^2.0.0" + +postcss-minify-selectors@^2.0.4: + version "2.1.1" + resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz#b2c6a98c0072cf91b932d1a496508114311735bf" + dependencies: + alphanum-sort "^1.0.2" + has "^1.0.1" + postcss "^5.0.14" + postcss-selector-parser "^2.0.0" + +postcss-normalize-charset@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1" + dependencies: + postcss "^5.0.5" + +postcss-normalize-url@^3.0.7: + version "3.0.8" + resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz#108f74b3f2fcdaf891a2ffa3ea4592279fc78222" + dependencies: + is-absolute-url "^2.0.0" + normalize-url "^1.4.0" + postcss "^5.0.14" + postcss-value-parser "^3.2.3" + +postcss-ordered-values@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz#eec6c2a67b6c412a8db2042e77fe8da43f95c11d" + dependencies: + postcss "^5.0.4" + postcss-value-parser "^3.0.1" + +postcss-reduce-idents@^2.2.2: + version "2.4.0" + resolved "https://registry.yarnpkg.com/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz#c2c6d20cc958284f6abfbe63f7609bf409059ad3" + dependencies: + postcss "^5.0.4" + postcss-value-parser "^3.0.2" + +postcss-reduce-initial@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz#68f80695f045d08263a879ad240df8dd64f644ea" + dependencies: + postcss "^5.0.4" + +postcss-reduce-transforms@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1" + dependencies: + has "^1.0.1" + postcss "^5.0.8" + postcss-value-parser "^3.0.1" + +postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" + dependencies: + flatten "^1.0.2" + indexes-of "^1.0.1" + uniq "^1.0.1" + +postcss-svgo@^2.1.1: + version "2.1.6" + resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-2.1.6.tgz#b6df18aa613b666e133f08adb5219c2684ac108d" + dependencies: + is-svg "^2.0.0" + postcss "^5.0.14" + postcss-value-parser "^3.2.3" + svgo "^0.7.0" + +postcss-unique-selectors@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d" + dependencies: + alphanum-sort "^1.0.1" + postcss "^5.0.4" + uniqs "^2.0.0" + +postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" + +postcss-zindex@^2.0.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22" + dependencies: + has "^1.0.1" + postcss "^5.0.4" + uniqs "^2.0.0" + +postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.8, postcss@^5.2.16: + version "5.2.17" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.17.tgz#cf4f597b864d65c8a492b2eabe9d706c879c388b" + dependencies: + chalk "^1.1.3" + js-base64 "^2.1.9" + source-map "^0.5.6" + supports-color "^3.2.3" + +prepend-http@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +pretty-hrtime@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" + +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +pseudomap@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +q@^1.1.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" + +qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + +query-string@^4.1.0: + version "4.3.4" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" + dependencies: + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + +randomatic@^1.1.3: + version "1.1.6" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" + dependencies: + is-number "^2.0.2" + kind-of "^3.0.2" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +"readable-stream@>=1.0.33-1 <1.1.0-0": + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.1.5: + version "2.2.9" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8" + dependencies: + buffer-shims "~1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~1.0.0" + util-deprecate "~1.0.1" + +readable-stream@~1.1.9: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + dependencies: + resolve "^1.1.6" + +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + +reduce-css-calc@^1.2.6: + version "1.3.0" + resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716" + dependencies: + balanced-match "^0.4.2" + math-expression-evaluator "^1.2.14" + reduce-function-call "^1.0.1" + +reduce-function-call@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99" + dependencies: + balanced-match "^0.4.2" + +regex-cache@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + dependencies: + is-equal-shallow "^0.1.3" + is-primitive "^2.0.0" + +remove-trailing-separator@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz#615ebb96af559552d4bf4057c8436d486ab63cc4" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +replace-ext@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" + +request@2, request@^2.79.0: + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +resolve-dir@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-0.1.1.tgz#b219259a5602fac5c5c496ad894a6e8cc430261e" + dependencies: + expand-tilde "^1.2.2" + global-modules "^0.2.3" + +resolve-url@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + +resolve@^1.1.6, resolve@^1.1.7: + version "1.3.2" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.2.tgz#1f0442c9e0cbb8136e87b9305f932f46c7f28235" + dependencies: + path-parse "^1.0.5" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@2, rimraf@^2.2.8: + version "2.6.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" + dependencies: + glob "^7.0.5" + +safe-buffer@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" + +sass-graph@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.1.2.tgz#965104be23e8103cb7e5f710df65935b317da57b" + dependencies: + glob "^7.0.0" + lodash "^4.0.0" + yargs "^4.7.1" + +sax@~1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.2.tgz#fd8631a23bc7826bef5d871bdb87378c95647828" + +"semver@2 || 3 || 4 || 5", semver@~5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + +semver@^4.1.0: + version "4.3.6" + resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" + +sequencify@~0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/sequencify/-/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +sigmund@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +sort-keys@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" + dependencies: + is-plain-obj "^1.0.0" + +source-map-resolve@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.3.1.tgz#610f6122a445b8dd51535a2a71b783dfc1248761" + dependencies: + atob "~1.1.0" + resolve-url "~0.2.1" + source-map-url "~0.3.0" + urix "~0.1.0" + +source-map-url@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.3.0.tgz#7ecaf13b57bcd09da8a40c5d269db33799d4aaf9" + +source-map@0.X, source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + +source-map@^0.1.38: + version "0.1.43" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" + dependencies: + amdefine ">=0.0.4" + +sparkles@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" + +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +sshpk@^1.7.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.0.tgz#ff2a3e4fd04497555fed97b39a0fd82fafb3a33c" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jodid25519 "^1.0.0" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +stdout-stream@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/stdout-stream/-/stdout-stream-1.4.0.tgz#a2c7c8587e54d9427ea9edb3ac3f2cd522df378b" + dependencies: + readable-stream "^2.0.1" + +stream-consume@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.0.tgz#a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f" + +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +string_decoder@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.0.tgz#f06f41157b664d86069f84bdbdc9b0d8ab281667" + dependencies: + buffer-shims "~1.0.0" + +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-bom-string@1.X: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-bom-string/-/strip-bom-string-1.0.0.tgz#e5211e9224369fbb81d633a2f00044dc8cedad92" + +strip-bom@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-1.0.0.tgz#85b8862f3844b5a6d5ec8467a93598173a36f794" + dependencies: + first-chunk-stream "^1.0.0" + is-utf8 "^0.2.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + dependencies: + get-stdin "^4.0.1" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" + +svgo@^0.7.0: + version "0.7.2" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" + dependencies: + coa "~1.0.1" + colors "~1.1.2" + csso "~2.3.1" + js-yaml "~3.7.0" + mkdirp "~0.5.1" + sax "~1.2.1" + whet.extend "~0.9.9" + +tar@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + +through2@2.X, through2@^2.0.0, through2@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + dependencies: + readable-stream "^2.1.5" + xtend "~4.0.1" + +through2@^0.6.1: + version "0.6.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" + dependencies: + readable-stream ">=1.0.33-1 <1.1.0-0" + xtend ">=4.0.0 <4.1.0-0" + +tildify@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a" + dependencies: + os-homedir "^1.0.0" + +time-stamp@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.0.1.tgz#9f4bd23559c9365966f3302dbba2b07c6b99b151" + +tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +uglify-js@~2.8.10: + version "2.8.22" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.22.tgz#d54934778a8da14903fa29a326fb24c0ab51a1a0" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-save-license@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/uglify-save-license/-/uglify-save-license-0.4.1.tgz#95726c17cc6fd171c3617e3bf4d8d82aa8c4cce1" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +unc-path-regex@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" + +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + +uniqid@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/uniqid/-/uniqid-4.1.1.tgz#89220ddf6b751ae52b5f72484863528596bb84c1" + dependencies: + macaddress "^0.2.8" + +uniqs@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" + +unique-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-1.0.0.tgz#d59a4a75427447d9aa6c91e70263f8d26a4b104b" + +urix@^0.1.0, urix@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + +user-home@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +uuid@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" + +v8flags@^2.0.2: + version "2.1.1" + resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" + dependencies: + user-home "^1.1.1" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + +vendors@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.1.tgz#37ad73c8ee417fb3d580e785312307d274847f22" + +verror@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" + dependencies: + extsprintf "1.0.2" + +vinyl-fs@^0.3.0: + version "0.3.14" + resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-0.3.14.tgz#9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6" + dependencies: + defaults "^1.0.0" + glob-stream "^3.1.5" + glob-watcher "^0.0.6" + graceful-fs "^3.0.0" + mkdirp "^0.5.0" + strip-bom "^1.0.0" + through2 "^0.6.1" + vinyl "^0.4.0" + +vinyl-sourcemaps-apply@^0.2.0, vinyl-sourcemaps-apply@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705" + dependencies: + source-map "^0.5.1" + +vinyl@1.X: + version "1.2.0" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +vinyl@^0.4.0: + version "0.4.6" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.4.6.tgz#2f356c87a550a255461f36bbeb2a5ba8bf784847" + dependencies: + clone "^0.2.0" + clone-stats "^0.0.1" + +vinyl@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +whet.extend@~0.9.9: + version "0.9.9" + resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + +which@1, which@^1.2.12, which@^1.2.9: + version "1.2.14" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.0.tgz#40edde802a71fea1f070da3e62dcda2e7add96ad" + dependencies: + string-width "^1.0.1" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +window-size@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +"xtend@>=4.0.0 <4.1.0-0", xtend@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yallist@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + +yargs-parser@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" + dependencies: + camelcase "^3.0.0" + lodash.assign "^4.0.6" + +yargs@^4.7.1: + version "4.8.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" + dependencies: + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + lodash.assign "^4.0.3" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.1" + which-module "^1.0.0" + window-size "^0.2.0" + y18n "^3.2.1" + yargs-parser "^2.4.1" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" From a75ea52e2105a36f242eff9807c267a4c6464988 Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Thu, 20 Apr 2017 23:44:49 +1200 Subject: [PATCH 03/28] Added basic theme support and did a substantial code cleanup Much more cleanup to go but this is a good start. --- .gitignore | 3 +- LICENSE.md => LICENSE | 0 gulpfile.js | 58 +- package.json | 15 +- src/js/background.js | 583 ++---------- src/js/content.js | 681 +++++++------- src/js/lib/app-manifest.js | 3 + src/js/lib/browser.js | 14 + src/js/lib/dom-builder.js | 197 +++++ src/js/lib/template.js | 45 + src/js/lib/theme.js | 22 + src/js/lib/utilities.js | 104 +++ src/manifest.json | 2 +- src/sass/content.scss | 337 ++++--- src/sass/dawn.scss | 35 + src/sass/monokai.scss | 35 + src/sass/transition.scss | 5 + webpack.config.js | 21 + yarn.lock | 1708 ++++++++++++++++++++++++++++++++++-- 19 files changed, 2724 insertions(+), 1144 deletions(-) rename LICENSE.md => LICENSE (100%) create mode 100644 src/js/lib/app-manifest.js create mode 100644 src/js/lib/browser.js create mode 100644 src/js/lib/dom-builder.js create mode 100644 src/js/lib/template.js create mode 100644 src/js/lib/theme.js create mode 100644 src/js/lib/utilities.js create mode 100644 src/sass/dawn.scss create mode 100644 src/sass/monokai.scss create mode 100644 src/sass/transition.scss create mode 100644 webpack.config.js diff --git a/.gitignore b/.gitignore index 338e72d..9b844cf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -compass_app_log.txt +/.idea/ /dist/ /node_modules/ -/.sass-cache/ diff --git a/LICENSE.md b/LICENSE similarity index 100% rename from LICENSE.md rename to LICENSE diff --git a/gulpfile.js b/gulpfile.js index a75dce2..e6074d0 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,39 +1,49 @@ 'use strict'; +const autoprefixer = require('gulp-autoprefixer'); +const fs = require('fs'); const gulp = require('gulp'); +const headerLicense = require('gulp-header-license'); const del = require('del'); -const sass = require('gulp-sass'); -const merge = require('merge2'); const sourcemaps = require('gulp-sourcemaps'); -const cssnano = require('gulp-cssnano'); const uglify = require('gulp-uglify'); +const vinylNamed = require('vinyl-named'); +const webpack = require('webpack'); +const webpackStream = require('webpack-stream'); + +const webpackConfig = require('./webpack.config'); const SRC_DIR = './src'; const BUILD_DIR = './dist'; gulp.task('clean', () => del(BUILD_DIR)); -gulp.task('build', () => { - return merge( - gulp.src(`${SRC_DIR}/sass/**/*.scss`) - .pipe(sourcemaps.init()) - .pipe(sass().on('error', sass.logError)) - .pipe(sourcemaps.write()) - .pipe(gulp.dest(`${BUILD_DIR}/css`)), - - gulp.src(`${SRC_DIR}/*`).pipe(gulp.dest(BUILD_DIR)), - gulp.src(`${SRC_DIR}/icons/**/*.png`).pipe(gulp.dest(`${BUILD_DIR}/icons`)), - gulp.src(`${SRC_DIR}/js/**/*.js`).pipe(gulp.dest(`${BUILD_DIR}/js`)) - ); +gulp.task('configs', () => { + return gulp.src(`${SRC_DIR}/*`).pipe(gulp.dest(BUILD_DIR)); +}); + +gulp.task('icons', () => { + return gulp.src(`${SRC_DIR}/icons/**/*.png`).pipe(gulp.dest(`${BUILD_DIR}/icons`)); +}); + +gulp.task('scripts', () => { + return gulp.src(`${SRC_DIR}/js/*.js`) + .pipe(vinylNamed()) + .pipe(webpackStream(webpackConfig, webpack)) + .pipe(gulp.dest(`${BUILD_DIR}/js`)); }); -gulp.task('dist', ['build'], () => { - return merge( - gulp.src(`${BUILD_DIR}/css/**/*.css`) - .pipe(cssnano()) - .pipe(gulp.dest(`${BUILD_DIR}/css`)), - gulp.src(`${BUILD_DIR}/js/**/*.js`) - .pipe(uglify()) - .pipe(gulp.dest(`${BUILD_DIR}/js`)) - ); +gulp.task('scripts:dist', ['scripts'], () => { + return gulp.src(`${BUILD_DIR}/js/**/*.js`) + .pipe(uglify()) + .pipe(headerLicense('/* ' + fs.readFileSync('./LICENSE') + '*/')) + .pipe(gulp.dest(`${BUILD_DIR}/js`)); +}); + +gulp.task('build', ['configs', 'icons', 'scripts']); + +gulp.task('dist', ['scripts:dist']); + +gulp.task('watch', ['build'], () => { + return gulp.watch(`${SRC_DIR}/**/*`, ['build']); }); diff --git a/package.json b/package.json index 21ed1c7..9f2be00 100644 --- a/package.json +++ b/package.json @@ -6,12 +6,21 @@ "author": "Nik Rolls ", "license": "MIT", "dependencies": { + "babel-core": "^6.24.1", + "babel-loader": "^6.4.1", + "babel-preset-env": "^1.4.0", + "css-loader": "^0.28.0", "del": "^2.2.2", "gulp": "^3.9.1", - "gulp-cssnano": "^2.1.2", - "gulp-sass": "^3.1.0", + "gulp-autoprefixer": "^3.1.1", + "gulp-header-license": "^1.0.9", "gulp-sourcemaps": "^2.6.0", "gulp-uglify": "^2.1.2", - "merge2": "^1.0.3" + "node-sass": "^4.5.2", + "sass-loader": "^6.0.3", + "text-loader": "^0.0.1", + "vinyl-named": "^1.1.0", + "webpack": "^2.4.1", + "webpack-stream": "^3.2.0" } } diff --git a/src/js/background.js b/src/js/background.js index 768b7d3..4762420 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -1,504 +1,109 @@ -// ==ClosureCompiler== -// @compilation_level ADVANCED_OPTIMIZATIONS -// @output_file_name background.js -// @externs_url http://closure-compiler.googlecode.com/svn/trunk/contrib/externs/chrome_extensions.js -// @js_externs var console = {assert: function(){}}; -// @formatting pretty_print -// ==/ClosureCompiler== - -/** @license - JSON Formatter | MIT License - Copyright 2012 Callum Locke - - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the "Software"), to deal in - the Software without restriction, including without limitation the rights to - use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - of the Software, and to permit persons to whom the Software is furnished to do - so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - - */ - -/*jshint eqeqeq:true, forin:true, strict:true */ -/*global browser, chrome, console */ - -(function () { - - "use strict" ; - - // Constants - var - TYPE_STRING = 1, - TYPE_NUMBER = 2, - TYPE_OBJECT = 3, - TYPE_ARRAY = 4, - TYPE_BOOL = 5, - TYPE_NULL = 6 - ; - - function getBrowser() { - return typeof browser !== 'undefined' ? browser : chrome; - } - - // Utility functions - function removeComments (str) { - str = ('__' + str + '__').split(''); - var mode = { - singleQuote: false, - doubleQuote: false, - regex: false, - blockComment: false, - lineComment: false, - condComp: false - }; - for (var i = 0, l = str.length; i < l; i++) { - if (mode.regex) { - if (str[i] === '/' && str[i-1] !== '\\') { - mode.regex = false; - } - continue; - } - if (mode.singleQuote) { - if (str[i] === "'" && str[i-1] !== '\\') { - mode.singleQuote = false; - } - continue; - } - if (mode.doubleQuote) { - if (str[i] === '"' && str[i-1] !== '\\') { - mode.doubleQuote = false; - } - continue; - } - if (mode.blockComment) { - if (str[i] === '*' && str[i+1] === '/') { - str[i+1] = ''; - mode.blockComment = false; - } - str[i] = ''; - continue; +'use strict'; + +import browser from './lib/browser'; +import { removeComments, firstJSONCharIndex } from './lib/utilities'; +import { jsonObjectToHTML } from './lib/dom-builder'; + +// Record current version (in case a future update wants to know) +browser.storage.local.set({appVersion: browser.runtime.getManifest().version}); + +// Listen for requests from content pages wanting to set up a port +browser.runtime.onConnect.addListener(function(port) { + if (port.name !== 'jf') { + console.log('JSON Formatter error - unknown port name ' + port.name, port); + return; + } + + port.onMessage.addListener(function(msg) { + let jsonpFunctionName = null; + let validJsonText; + + if (msg.type === 'SENDING TEXT') { + // Try to parse as JSON + let obj; + let text = msg.text; + + // Strip any leading garbage, such as a 'while(1);' + const strippedText = text.substring(firstJSONCharIndex(text)); + + try { + obj = JSON.parse(strippedText); + validJsonText = strippedText; + } catch (e) { + // Not JSON; could be JSONP though. + // Try stripping 'padding' (if any), and try parsing it again + text = text.trim(); + // Find where the first paren is (and exit if none) + const indexOfParen = text.indexOf('('); + if (!indexOfParen) { + port.postMessage(['NOT JSON', 'no opening parenthesis']); + port.disconnect(); + return; } - if (mode.lineComment) { - if (str[i+1] === '\n' || str[i+1] === '\r') { - mode.lineComment = false; - } - str[i] = ''; - continue; - } - if (mode.condComp) { - if (str[i-2] === '@' && str[i-1] === '*' && str[i] === '/') { - mode.condComp = false; - } - continue; - } - mode.doubleQuote = str[i] === '"'; - mode.singleQuote = str[i] === "'"; - if (str[i] === '/') { - if (str[i+1] === '*' && str[i+2] === '@') { - mode.condComp = true; - continue; - } - if (str[i+1] === '*') { - str[i] = ''; - mode.blockComment = true; - continue; - } - if (str[i+1] === '/') { - str[i] = ''; - mode.lineComment = true; - continue; - } - mode.regex = true; - } - } - return str.join('').slice(2, -2); - } - - function firstJSONCharIndex(s) { - var arrayIdx = s.indexOf('['), - objIdx = s.indexOf('{'), - idx = 0 - ; - if (arrayIdx !== -1) - idx = arrayIdx ; - if (objIdx !== -1) { - if (arrayIdx === -1) - idx = objIdx ; - else - idx = Math.min(objIdx, arrayIdx) ; - } - return idx ; - } - - // function spin(seconds) { - // // spin - Hog the CPU for the specified number of seconds - // // (for simulating long processing times in development) - // var stop = +new Date() + (seconds*1000) ; - // while (new Date() < stop) {} - // return true ; - // } - - // Record current version (in case future update wants to know) - localStorage.jfVersion = '0.5.6' ; - - // Template elements - var templates, - baseSpan = document.createElement('span') ; - - function getSpanBoth(innerText,className) { - var span = baseSpan.cloneNode(false) ; - span.className = className ; - span.innerText = innerText ; - return span ; - } - function getSpanText(innerText) { - var span = baseSpan.cloneNode(false) ; - span.innerText = innerText ; - return span ; - } - function getSpanClass(className) { - var span = baseSpan.cloneNode(false) ; - span.className = className ; - return span ; - } - // Create template nodes - var templatesObj = { - t_kvov: getSpanClass('kvov'), - t_exp: getSpanClass('e'), - t_key: getSpanClass('k'), - t_string: getSpanClass('s'), - t_number: getSpanClass('n'), - - t_null: getSpanBoth('null', 'nl'), - t_true: getSpanBoth('true','bl'), - t_false: getSpanBoth('false','bl'), - - t_oBrace: getSpanBoth('{','b'), - t_cBrace: getSpanBoth('}','b'), - t_oBracket: getSpanBoth('[','b'), - t_cBracket: getSpanBoth(']','b'), - - t_ellipsis: getSpanClass('ell'), - t_blockInner: getSpanClass('blockInner'), - - t_colonAndSpace: document.createTextNode(':\u00A0'), - t_commaText: document.createTextNode(','), - t_dblqText: document.createTextNode('"') - } ; - - // Core recursive DOM-building function - function getKvovDOM(value, keyName) { - var type, - kvov, - nonZeroSize, - templates = templatesObj, // bring into scope for tiny speed boost - objKey, - keySpan, - valueElement - ; - - // Establish value type - if (typeof value === 'string') - type = TYPE_STRING ; - else if (typeof value === 'number') - type = TYPE_NUMBER ; - else if (value === false || value === true ) - type = TYPE_BOOL ; - else if (value === null) - type = TYPE_NULL ; - else if (value instanceof Array) - type = TYPE_ARRAY ; - else - type = TYPE_OBJECT ; - - // Root node for this kvov - kvov = templates.t_kvov.cloneNode(false) ; - - // Add an 'expander' first (if this is object/array with non-zero size) - if (type === TYPE_OBJECT || type === TYPE_ARRAY) { - nonZeroSize = false ; - for (objKey in value) { - if (value.hasOwnProperty(objKey)) { - nonZeroSize = true ; - break ; // no need to keep counting; only need one - } - } - if (nonZeroSize) - kvov.appendChild( templates.t_exp.cloneNode(false) ) ; - } - - // If there's a key, add that before the value - if (keyName !== false) { // NB: "" is a legal keyname in JSON - // This kvov must be an object property - kvov.classList.add('objProp') ; - // Create a span for the key name - keySpan = templates.t_key.cloneNode(false) ; - keySpan.textContent = JSON.stringify(keyName).slice(1,-1) ; // remove quotes - // Add it to kvov, with quote marks - kvov.appendChild(templates.t_dblqText.cloneNode(false)) ; - kvov.appendChild( keySpan ) ; - kvov.appendChild(templates.t_dblqText.cloneNode(false)) ; - // Also add ": " (colon and non-breaking space) - kvov.appendChild( templates.t_colonAndSpace.cloneNode(false) ) ; + // Get the substring up to the first "(", with any comments/whitespace stripped out + const firstBit = removeComments(text.substring(0, indexOfParen)).trim(); + if (!firstBit.match(/^[a-zA-Z_$][\.\[\]'"0-9a-zA-Z_$]*$/)) { + // The 'firstBit' is NOT a valid function identifier. + port.postMessage(['NOT JSON', 'first bit not a valid function name']); + port.disconnect(); + return; } - else { - // This is an array element instead - kvov.classList.add('arrElem') ; - } - - // Generate DOM for this value - var blockInner, childKvov ; - switch (type) { - case TYPE_STRING: - // If string is a URL, get a link, otherwise get a span - var innerStringEl = baseSpan.cloneNode(false), - escapedString = JSON.stringify(value) - ; - escapedString = escapedString.substring(1, escapedString.length-1) ; // remove quotes - if (value[0] === 'h' && value.substring(0, 4) === 'http') { // crude but fast - some false positives, but rare, and UX doesn't suffer terribly from them. - var innerStringA = document.createElement('A') ; - innerStringA.href = value ; - innerStringA.innerText = escapedString ; - innerStringEl.appendChild(innerStringA) ; - } - else { - innerStringEl.innerText = escapedString ; - } - valueElement = templates.t_string.cloneNode(false) ; - valueElement.appendChild(templates.t_dblqText.cloneNode(false)) ; - valueElement.appendChild(innerStringEl) ; - valueElement.appendChild(templates.t_dblqText.cloneNode(false)) ; - kvov.appendChild(valueElement) ; - break ; - - case TYPE_NUMBER: - // Simply add a number element (span.n) - valueElement = templates.t_number.cloneNode(false) ; - valueElement.innerText = value ; - kvov.appendChild(valueElement) ; - break ; - - case TYPE_OBJECT: - // Add opening brace - kvov.appendChild( templates.t_oBrace.cloneNode(true) ) ; - // If any properties, add a blockInner containing k/v pair(s) - if (nonZeroSize) { - // Add ellipsis (empty, but will be made to do something when kvov is collapsed) - kvov.appendChild( templates.t_ellipsis.cloneNode(false) ) ; - // Create blockInner, which indents (don't attach yet) - blockInner = templates.t_blockInner.cloneNode(false) ; - // For each key/value pair, add as a kvov to blockInner - var count = 0, k, comma ; - for (k in value) { - if (value.hasOwnProperty(k)) { - count++ ; - childKvov = getKvovDOM(value[k], k) ; - // Add comma - comma = templates.t_commaText.cloneNode() ; - childKvov.appendChild(comma) ; - blockInner.appendChild( childKvov ) ; - } - } - // Now remove the last comma - childKvov.removeChild(comma) ; - // Add blockInner - kvov.appendChild( blockInner ) ; - } - - // Add closing brace - kvov.appendChild( templates.t_cBrace.cloneNode(true) ) ; - break ; - - case TYPE_ARRAY: - // Add opening bracket - kvov.appendChild( templates.t_oBracket.cloneNode(true) ) ; - // If non-zero length array, add blockInner containing inner vals - if (nonZeroSize) { - // Add ellipsis - kvov.appendChild( templates.t_ellipsis.cloneNode(false) ) ; - // Create blockInner (which indents) (don't attach yet) - blockInner = templates.t_blockInner.cloneNode(false) ; - // For each key/value pair, add the markup - for (var i=0, length=value.length, lastIndex=length-1; i' + jsonpFunctionName + ' ( ' + - returnHTML + - '
)
' ; + // Check that what's after the last parenthesis is just whitespace, comments, and possibly a semicolon (exit if anything else) + const lastBit = removeComments(text.substring(indexOfLastParen + 1)).trim(); + if (lastBit !== "" && lastBit !== ';') { + port.postMessage(['NOT JSON', 'last closing paren followed by invalid characters']); + port.disconnect(); + return; } - // Return the HTML - return returnHTML ; - } - - // Listen for requests from content pages wanting to set up a port - getBrowser().runtime.onConnect.addListener(function(port) { + // So, it looks like a valid JS function call, but we don't know whether it's JSON inside the parentheses... + // Check if the 'argument' is actually JSON (and record the parsed result) + text = text.substring(indexOfParen + 1, indexOfLastParen); + try { + obj = JSON.parse(text); + validJsonText = text; + } + catch (e2) { + // Just some other text that happens to be in a function call. + // Respond as not JSON, and exit + port.postMessage(['NOT JSON', 'looks like a function call, but the parameter is not valid JSON']); + return; + } - if (port.name !== 'jf') { - console.log('JSON Formatter error - unknown port name '+port.name, port) ; - return ; + jsonpFunctionName = firstBit; } - port.onMessage.addListener(function(msg) { - var jsonpFunctionName = null, - validJsonText - ; - - if (msg.type === 'SENDING TEXT') { - // Try to parse as JSON - var obj, - text = msg.text ; - - // Strip any leading garbage, such as a 'while(1);' - var strippedText = text.substring( firstJSONCharIndex(text) ) ; + // If still running, we now have obj, which is valid JSON. - try { - obj = JSON.parse(strippedText) ; - validJsonText = strippedText ; - } - catch (e) { - - // Not JSON; could be JSONP though. - // Try stripping 'padding' (if any), and try parsing it again - text = text.trim() ; - // Find where the first paren is (and exit if none) - var indexOfParen ; - if ( ! (indexOfParen = text.indexOf('(') ) ) { - port.postMessage(['NOT JSON', 'no opening parenthesis']) ; - port.disconnect() ; - return ; - } - - // Get the substring up to the first "(", with any comments/whitespace stripped out - var firstBit = removeComments( text.substring(0,indexOfParen) ).trim() ; - if ( ! firstBit.match(/^[a-zA-Z_$][\.\[\]'"0-9a-zA-Z_$]*$/) ) { - // The 'firstBit' is NOT a valid function identifier. - port.postMessage(['NOT JSON', 'first bit not a valid function name']) ; - port.disconnect() ; - return ; - } - - // Find last parenthesis (exit if none) - var indexOfLastParen ; - if ( ! (indexOfLastParen = text.lastIndexOf(')') ) ) { - port.postMessage(['NOT JSON', 'no closing paren']) ; - port.disconnect() ; - return ; - } - - // Check that what's after the last parenthesis is just whitespace, comments, and possibly a semicolon (exit if anything else) - var lastBit = removeComments(text.substring(indexOfLastParen+1)).trim() ; - if ( lastBit !== "" && lastBit !== ';' ) { - port.postMessage(['NOT JSON', 'last closing paren followed by invalid characters']) ; - port.disconnect() ; - return ; - } - - // So, it looks like a valid JS function call, but we don't know whether it's JSON inside the parentheses... - // Check if the 'argument' is actually JSON (and record the parsed result) - text = text.substring(indexOfParen+1, indexOfLastParen) ; - try { - obj = JSON.parse(text) ; - validJsonText = text ; - } - catch (e2) { - // Just some other text that happens to be in a function call. - // Respond as not JSON, and exit - port.postMessage(['NOT JSON', 'looks like a function call, but the parameter is not valid JSON']) ; - return ; - } - - jsonpFunctionName = firstBit ; - } - - // If still running, we now have obj, which is valid JSON. - - // Ensure it's not a number or string (technically valid JSON, but no point prettifying it) - if (typeof obj !== 'object' && typeof obj !== 'array') { - port.postMessage(['NOT JSON', 'technically JSON but not an object or array']) ; - port.disconnect() ; - return ; - } - - // And send it the message to confirm that we're now formatting (so it can show a spinner) - port.postMessage(['FORMATTING' /*, JSON.stringify(localStorage)*/]) ; + // Ensure it's not a number or string (technically valid JSON, but no point prettifying it) + if (typeof obj !== 'object' && typeof obj !== 'array') { + port.postMessage(['NOT JSON', 'technically JSON but not an object or array']); + port.disconnect(); + return; + } - // Do formatting - var html = jsonObjToHTML(obj, jsonpFunctionName) ; + // And send it the message to confirm that we're now formatting (so it can show a spinner) + port.postMessage(['FORMATTING']); - // Post the HTML string to the content script - port.postMessage(['FORMATTED', html, validJsonText]) ; + // Do formatting + const html = jsonObjectToHTML(obj, jsonpFunctionName); - // Disconnect - port.disconnect() ; - } - }); - }); -}()) ; + // Post the HTML string to the content script + port.postMessage(['FORMATTED', html, validJsonText]); + } else if (msg.type === 'GET STORED THEME') { + browser.storage.sync.get('theme', (data) => port.postMessage(['SWITCH THEME', data && data.theme])); + } else if (msg.type === 'UPDATE STORED THEME') { + browser.storage.sync.set({theme: msg.theme}, () => port.postMessage(['SWITCH THEME', msg.theme])); + } + }); +}); diff --git a/src/js/content.js b/src/js/content.js index 96a1812..a0dde1e 100644 --- a/src/js/content.js +++ b/src/js/content.js @@ -1,400 +1,305 @@ -// ==ClosureCompiler== -// @compilation_level ADVANCED_OPTIMIZATIONS -// @output_file_name content.js -// @externs_url http://closure-compiler.googlecode.com/svn/trunk/contrib/externs/chrome_extensions.js -// @js_externs var console = {assert: function(){}}; -// @formatting pretty_print -// ==/ClosureCompiler== - -/** @license - JSON Formatter | MIT License - Copyright 2012 Callum Locke - - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the "Software"), to deal in - the Software without restriction, including without limitation the rights to - use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - of the Software, and to permit persons to whom the Software is furnished to do - so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - - */ - -/*jshint eqeqeq:true, forin:true, strict:true */ -/*global browser, chrome, console */ - -(function() { - - "use strict" ; - - function getBrowser() { - return typeof browser !== 'undefined' ? browser : chrome; - } - - var jfContent, - pre, - jfStyleEl, - slowAnalysisTimeout, - port, - startTime = +(new Date()), - domReadyTime, - isJsonTime, - exitedNotJsonTime, - displayedFormattedJsonTime - ; - - // Open the port "jf" now, ready for when we need it - // console.time('established port') ; - port = getBrowser().runtime.connect({name: 'jf'}) ; - - // Add listener to receive response from BG when ready - port.onMessage.addListener( function (msg) { - // console.log('Port msg received', msg[0], (""+msg[1]).substring(0,30)) ; - - switch (msg[0]) { - case 'NOT JSON' : - pre.hidden = false ; - // console.log('Unhidden the PRE') ; - document.body.removeChild(jfContent) ; - exitedNotJsonTime = +(new Date()) ; - break ; - - case 'FORMATTING' : - isJsonTime = +(new Date()) ; - - // It is JSON, and it's now being formatted in the background worker. - - // Clear the slowAnalysisTimeout (if the BG worker had taken longer than 1s to respond with an answer to whether or not this is JSON, then it would have fired, unhiding the PRE... But now that we know it's JSON, we can clear this timeout, ensuring the PRE stays hidden.) - clearTimeout(slowAnalysisTimeout) ; - - // Insert CSS - jfStyleEl = document.createElement('style') ; - jfStyleEl.id = 'jfStyleEl' ; - //jfStyleEl.innerText = 'body{padding:0;}' ; - document.head.appendChild(jfStyleEl) ; - - jfStyleEl.insertAdjacentHTML( - 'beforeend', - 'body{-webkit-user-select:text;overflow-y:scroll !important;margin:0;position:relative}#optionBar{-webkit-user-select:none;display:block;position:absolute;top:9px;right:17px}#buttonFormatted,#buttonPlain{-webkit-border-radius:2px;-webkit-box-shadow:0px 1px 3px rgba(0,0,0,0.1);-webkit-user-select:none;background:-webkit-linear-gradient(#fafafa, #f4f4f4 40%, #e5e5e5);border:1px solid #aaa;color:#444;font-size:12px;margin-bottom:0px;min-width:4em;padding:3px 0;position:relative;z-index:10;display:inline-block;width:80px;text-shadow:1px 1px rgba(255,255,255,0.3)}#buttonFormatted{margin-left:0;border-top-left-radius:0;border-bottom-left-radius:0}#buttonPlain{margin-right:0;border-top-right-radius:0;border-bottom-right-radius:0;border-right:none}#buttonFormatted:hover,#buttonPlain:hover{-webkit-box-shadow:0px 1px 3px rgba(0,0,0,0.2);background:#ebebeb -webkit-linear-gradient(#fefefe, #f8f8f8 40%, #e9e9e9);border-color:#999;color:#222}#buttonFormatted:active,#buttonPlain:active{-webkit-box-shadow:inset 0px 1px 3px rgba(0,0,0,0.2);background:#ebebeb -webkit-linear-gradient(#f4f4f4, #efefef 40%, #dcdcdc);color:#333}#buttonFormatted.selected,#buttonPlain.selected{-webkit-box-shadow:inset 0px 1px 5px rgba(0,0,0,0.2);background:#ebebeb -webkit-linear-gradient(#e4e4e4, #dfdfdf 40%, #dcdcdc);color:#333}#buttonFormatted:focus,#buttonPlain:focus{outline:0}#jsonpOpener,#jsonpCloser{padding:4px 0 0 8px;color:#000;margin-bottom:-6px}#jsonpCloser{margin-top:0}#formattedJson{padding-left:28px;padding-top:6px}pre{padding:36px 5px 5px 5px}.kvov{display:block;padding-left:20px;margin-left:-20px;position:relative}.collapsed{white-space:nowrap}.collapsed>.blockInner{display:none}.collapsed>.ell:after{content:"…";font-weight:bold}.collapsed>.ell{margin:0 4px;color:#888}.collapsed .kvov{display:inline}.e{width:20px;height:18px;display:block;position:absolute;left:-2px;top:1px;z-index:5;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAD1JREFUeNpiYGBgOADE%2F3Hgw0DM4IRHgSsDFOzFInmMAQnY49ONzZRjDFiADT7dMLALiE8y4AGW6LoBAgwAuIkf%2F%2FB7O9sAAAAASUVORK5CYII%3D");background-repeat:no-repeat;background-position:center center;display:block;opacity:0.15}.collapsed>.e{-webkit-transform:rotate(-90deg);width:18px;height:20px;left:0px;top:0px}.e:hover{opacity:0.35}.e:active{opacity:0.5}.collapsed .kvov .e{display:none}.blockInner{display:block;padding-left:24px;border-left:1px dotted #bbb;margin-left:2px}#formattedJson,#jsonpOpener,#jsonpCloser{color:#333;font:13px/18px monospace}#formattedJson{color:#444}.b{font-weight:bold}.s{color:#0B7500;word-wrap:break-word}a:link,a:visited{text-decoration:none;color:inherit}a:hover,a:active{text-decoration:underline;color:#050}.bl,.nl,.n{font-weight:bold;color:#1A01CC}.k{color:#000}#formattingMsg{font:13px "Lucida Grande","Segoe UI","Tahoma";padding:10px 0 0 8px;margin:0;color:#333}#formattingMsg>svg{margin:0 7px;position:relative;top:1px}[hidden]{display:none !important}span{white-space:pre-wrap}@-webkit-keyframes spin{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}#spinner{-webkit-animation:spin 2s 0 infinite}*{-webkit-font-smoothing:antialiased}' - ) ; - - // Add custom font name if set - FROM FUTURE - // if (typeof settings.fontName === 'string') { - // jfStyleEl.insertAdjacentHTML( - // 'beforeend', - // '#formattedJson,#jsonpOpener,#jsonpCloser{font-family: "' + settings.fontName + '"}' - // ) ; - // } - - // Show 'Formatting...' spinner - // jfContent.innerHTML = '

Formatting...

' ; - // jfContent.innerHTML = '

Formatting...

' ; - jfContent.innerHTML = '

Formatting...

' ; - - - var formattingMsg = document.getElementById('formattingMsg') ; - // TODO: set formattingMsg to visible after about 300ms (so faster than this doesn't require it) - formattingMsg.hidden = true ; - setTimeout(function(){ - formattingMsg.hidden = false ; - }, 250) ; - - - // Create option bar - var optionBar = document.createElement('div') ; - optionBar.id = 'optionBar' ; - - - // Show options link, if needed - FROM FUTURE - // if (settings.enableOptionsLink) { - // var optionsLink = document.createElement('a') ; - // optionsLink.id = 'optionsLink' ; - // optionsLink.innerText = 'Options' ; - // optionsLink.href = settings['optionsUrl'] ; - // optionsLink.target = '_BLANK' ; - // optionBar.appendChild(optionsLink) ; - // } - - // Create toggleFormat button - var buttonPlain = document.createElement('button'), - buttonFormatted = document.createElement('button') ; - buttonPlain.id = 'buttonPlain' ; - buttonPlain.innerText = 'Raw' ; - buttonFormatted.id = 'buttonFormatted' ; - buttonFormatted.innerText = 'Parsed' ; - buttonFormatted.classList.add('selected') ; - - var plainOn = false ; - buttonPlain.addEventListener( - 'click', - function () { - // When plain button clicked... - if (!plainOn) { - plainOn = true ; - pre.hidden = false ; - jfContent.hidden = true ; - - buttonFormatted.classList.remove('selected') ; - buttonPlain.classList.add('selected') ; - } - }, - false - ) ; - - buttonFormatted.addEventListener( - 'click', - function () { - // When formatted button clicked... - if (plainOn) { - plainOn = false ; - pre.hidden = true ; - jfContent.hidden = false ; - - buttonFormatted.classList.add('selected') ; - buttonPlain.classList.remove('selected') ; - } - }, - false - ) ; - - // Put it in optionBar - optionBar.appendChild(buttonPlain) ; - optionBar.appendChild(buttonFormatted) ; - - // Attach event handlers - document.addEventListener( - 'click', - generalClick, - false // No need to propogate down - ) ; - - // Put option bar in DOM - document.body.insertBefore(optionBar, pre) ; - - break ; - - case 'FORMATTED' : - // Insert HTML content - jfContent.innerHTML = msg[1] ; - - displayedFormattedJsonTime = Date.now() ; - - // Log times - //console.log('DOM ready took '+ (domReadyTime - startTime) +'ms' ) ; - //console.log('Confirming as JSON took '+ (isJsonTime - domReadyTime) +'ms' ) ; - //console.log('Formatting & displaying JSON took '+ (displayedFormattedJsonTime - isJsonTime) +'ms' ) ; - // console.log('JSON detected and formatted in ' + ( displayedFormattedJsonTime - domReadyTime ) + ' ms') ; - // console.markTimeline('JSON formatted and displayed') ; - - // Export parsed JSON for easy access in console - setTimeout(function () { - var script = document.createElement("script") ; - script.innerHTML = 'window.json = ' + msg[2] + ';' ; - document.head.appendChild(script) ; - console.log('JSON Formatter: Type "json" to inspect.') ; - }, 100) ; - - break ; - - default : - throw new Error('Message not understood: ' + msg[0]) ; +import browser from './lib/browser'; +import { themes, switchToTheme } from './lib/theme'; + +let jfContent; +let pre; +let jfStyleEl; +let slowAnalysisTimeout; + +// Open the port "jf" now, ready for when we need it +const port = browser.runtime.connect({name: 'jf'}); + +// Add listener to receive response from BG when ready +port.onMessage.addListener(function(message) { + + switch (message[0]) { + case 'SWITCH THEME': + const themeName = themes[message[1]] ? message[1] : themes.default; + switchToTheme(themes[themeName]); + + if (themeName === 'dawn') { + document.getElementById('buttonLight').classList.add('selected'); + document.getElementById('buttonDark').classList.remove('selected'); + } else if (themeName === 'monokai') { + document.getElementById('buttonLight').classList.remove('selected'); + document.getElementById('buttonDark').classList.add('selected'); } + + break; + + case 'NOT JSON' : + pre.hidden = false; + document.body.removeChild(jfContent); + break; + + case 'FORMATTING' : + // It is JSON, and it's now being formatted in the background worker. + + port.postMessage({type: 'GET STORED THEME'}); + + // Clear the slowAnalysisTimeout (if the BG worker had taken longer than 1s to respond with an answer to whether or not this is JSON, then it would have fired, unhiding the PRE... But now that we know it's JSON, we can clear this timeout, ensuring the PRE stays hidden.) + clearTimeout(slowAnalysisTimeout); + + // Insert CSS + jfStyleEl = document.createElement('style'); + jfStyleEl.id = 'jfStyleEl'; + document.head.appendChild(jfStyleEl); + + jfStyleEl.insertAdjacentHTML('beforeend', require('../sass/content.scss')); + + jfContent.innerHTML = '

Formatting...

'; + + const formattingMsg = document.getElementById('formattingMsg'); + formattingMsg.hidden = true; + setTimeout(function() { + formattingMsg.hidden = false; + }, 250); + + configureFormatOptionBar(); + configureThemeOptionBar(); + + // Attach event handlers + document.addEventListener('click', generalClick, false); + + break; + + case 'FORMATTED' : + // Insert HTML content + jfContent.innerHTML = message[1]; + + // Export parsed JSON for easy access in console + setTimeout(function() { + const script = document.createElement("script"); + script.innerHTML = 'window.json = ' + message[2] + ';'; + document.head.appendChild(script); + console.log('JSON Formatter: Type "json" to inspect.'); + }, 100); + + break; + + default : + throw new Error('Message not understood: ' + message[0]); + } +}); + +function configureFormatOptionBar() { + const formatBar = document.createElement('div'); + formatBar.id = 'formatOptionBar'; + formatBar.classList.add('optionBar'); + + const buttonPlain = document.createElement('button'); + const buttonFormatted = document.createElement('button'); + buttonPlain.id = 'buttonPlain'; + buttonPlain.innerText = 'Raw'; + buttonFormatted.id = 'buttonFormatted'; + buttonFormatted.innerText = 'Parsed'; + buttonFormatted.classList.add('selected'); + + buttonPlain.addEventListener('click', () => { + pre.hidden = false; + jfContent.hidden = true; + buttonFormatted.classList.remove('selected'); + buttonPlain.classList.add('selected'); + }); + + buttonFormatted.addEventListener('click', () => { + pre.hidden = true; + jfContent.hidden = false; + buttonFormatted.classList.add('selected'); + buttonPlain.classList.remove('selected'); + }); + + formatBar.appendChild(buttonPlain); + formatBar.appendChild(buttonFormatted); + document.body.insertBefore(formatBar, pre); +} + +function configureThemeOptionBar() { + const themeBar = document.createElement('div'); + themeBar.id = 'themeOptionBar'; + themeBar.classList.add('optionBar'); + + const buttonLight = document.createElement('button'); + const buttonDark = document.createElement('button'); + buttonLight.id = 'buttonLight'; + buttonLight.innerText = 'Light'; + buttonDark.id = 'buttonDark'; + buttonDark.innerText = 'Dark'; + + buttonLight.addEventListener('click', () => { + port.postMessage({type: 'UPDATE STORED THEME', theme: 'dawn'}); + }); + buttonDark.addEventListener('click', () => { + port.postMessage({type: 'UPDATE STORED THEME', theme: 'monokai'}); + }); + + themeBar.appendChild(buttonLight); + themeBar.appendChild(buttonDark); + document.body.insertBefore(themeBar, pre); +} + +function ready() { + + // First, check if it's a PRE and exit if not + const bodyChildren = document.body.childNodes; + pre = bodyChildren[0]; + const jsonLength = (pre && pre.innerText || "").length; + if ( + bodyChildren.length !== 1 || + pre.tagName !== 'PRE' || + jsonLength > (3000000)) { + + // Disconnect the port (without even having used it) + port.disconnect(); + + // EXIT POINT: NON-PLAIN-TEXT PAGE (or longer than 3MB) + } else { + // This is a 'plain text' page (just a body with one PRE child). + // It might be JSON/JSONP, or just some other kind of plain text (eg CSS). + + // Hide the PRE immediately (until we know what to do, to prevent FOUC) + pre.hidden = true; + slowAnalysisTimeout = setTimeout(function() { + pre.hidden = false; + }, 1000); + + // Send the contents of the PRE to the BG script + // Add jfContent DIV, ready to display stuff + jfContent = document.createElement('div'); + jfContent.id = 'jfContent'; + document.body.appendChild(jfContent); + + // Post the contents of the PRE + port.postMessage({ + type: "SENDING TEXT", + text: pre.innerText, + length: jsonLength }); - - // console.timeEnd('established port') ; - - - function ready () { - - domReadyTime = Date.now() ; - - // First, check if it's a PRE and exit if not - var bodyChildren = document.body.childNodes ; - pre = bodyChildren[0] ; - var jsonLength = (pre && pre.innerText || "").length ; - if ( - bodyChildren.length !== 1 || - pre.tagName !== 'PRE' || - jsonLength > (3000000) ) { - - // console.log('Not even text (or longer than 3MB); exiting') ; - // console.log(bodyChildren.length,pre.tagName, pre.innerText.length) ; - - // Disconnect the port (without even having used it) - port.disconnect() ; - - // EXIT POINT: NON-PLAIN-TEXT PAGE (or longer than 3MB) + + // Now, this script will just wait to receive anything back via another port message. The returned message will be something like "NOT JSON" or "IS JSON" + } + + document.addEventListener('keyup', function(e) { + if (e.keyCode === 37 && typeof buttonPlain !== 'undefined') { + buttonPlain.click(); + } + else if (e.keyCode === 39 && typeof buttonFormatted !== 'undefined') { + buttonFormatted.click(); + } + }); +} + +document.addEventListener("DOMContentLoaded", ready, false); + +let lastKeyValueOrValueIdGiven = 0; +function collapse(elements) { + + for (let i = elements.length - 1; i >= 0; i--) { + let blockInner, count; + const el = elements[i]; + el.classList.add('collapsed'); + + // (CSS hides the contents and shows an ellipsis.) + + // Add a count of the number of child properties/items (if not already done for this item) + if (!el.id) { + el.id = `keyValueOrValue${++lastKeyValueOrValueIdGiven}`; + + // Find the blockInner + blockInner = el.firstElementChild; + while (blockInner && !blockInner.classList.contains('blockInner')) { + blockInner = blockInner.nextElementSibling; } - else { - // This is a 'plain text' page (just a body with one PRE child). - // It might be JSON/JSONP, or just some other kind of plain text (eg CSS). - - // Hide the PRE immediately (until we know what to do, to prevent FOUC) - pre.hidden = true ; - //console.log('It is text; hidden pre at ') ; - slowAnalysisTimeout = setTimeout(function(){ - pre.hidden = false ; - }, 1000) ; - - // Send the contents of the PRE to the BG script - // Add jfContent DIV, ready to display stuff - jfContent = document.createElement('div') ; - jfContent.id = 'jfContent' ; - document.body.appendChild(jfContent) ; - - // Post the contents of the PRE - port.postMessage({ - type: "SENDING TEXT", - text: pre.innerText, - length: jsonLength - }); - - // Now, this script will just wait to receive anything back via another port message. The returned message will be something like "NOT JSON" or "IS JSON" + if (!blockInner) { + continue; } - document.addEventListener('keyup', function(e) { - if (e.keyCode === 37 && typeof buttonPlain !== 'undefined') { - buttonPlain.click(); - } - else if (e.keyCode === 39 && typeof buttonFormatted !== 'undefined') { - buttonFormatted.click(); - } - }); - } - - document.addEventListener("DOMContentLoaded", ready, false); - - var lastKvovIdGiven = 0 ; - function collapse(elements) { - // console.log('elements', elements) ; - - var el, i, blockInner, count ; - - for (i = elements.length - 1; i >= 0; i--) { - el = elements[i] ; - el.classList.add('collapsed') ; - - // (CSS hides the contents and shows an ellipsis.) - - // Add a count of the number of child properties/items (if not already done for this item) - if (!el.id) { - el.id = 'kvov' + (++lastKvovIdGiven) ; - - // Find the blockInner - blockInner = el.firstElementChild ; - while ( blockInner && !blockInner.classList.contains('blockInner') ) { - blockInner = blockInner.nextElementSibling ; - } - if (!blockInner) - continue ; - - // See how many children in the blockInner - count = blockInner.children.length ; - - // Generate comment text eg "4 items" - var comment = count + (count===1 ? ' item' : ' items') ; - // Add CSS that targets it - jfStyleEl.insertAdjacentHTML( - 'beforeend', - '\n#kvov'+lastKvovIdGiven+'.collapsed:after{color: #aaa; content:" // '+comment+'"}' - ) ; - } + // See how many children in the blockInner + count = blockInner.children.length; + + // Generate comment text eg "4 items" + const comment = count + (count === 1 ? ' item' : ' items'); + // Add CSS that targets it + jfStyleEl.insertAdjacentHTML( + 'beforeend', + `\n#keyValueOrValue${lastKeyValueOrValueIdGiven}.collapsed:after{color: #aaa; content:" // ${comment}"}` + ); } } - function expand(elements) { - for (var i = elements.length - 1; i >= 0; i--) - elements[i].classList.remove('collapsed') ; +} + +function expand(elements) { + for (let i = elements.length - 1; i >= 0; i--) { + elements[i].classList.remove('collapsed'); } +} + +const mac = navigator.platform.indexOf('Mac') !== -1; +let modKey; +if (mac) { + modKey = function(ev) { + return ev.metaKey; + }; +} else { + modKey = function(ev) { + return ev.ctrlKey; + }; +} + +function generalClick(ev) { + if (ev.which === 1) { + const elem = ev.target; + + if (elem.className === 'expander') { + ev.preventDefault(); + + const parent = elem.parentNode; + const div = jfContent; + const scrollTop = document.body.scrollTop; + + if (parent.classList.contains('collapsed')) { + // EXPAND + if (modKey(ev)) { + expand(parent.parentNode.children); + } else { + expand([parent]); + } + } else { + // COLLAPSE + if (modKey(ev)) { + collapse(parent.parentNode.children); + } else { + collapse([parent]); + } + } + + // Restore scrollTop somehow + // Clear current extra margin, if any + div.style.marginBottom = 0; + + // No need to worry if all content fits in viewport + if (document.body.offsetHeight < window.innerHeight) { + return; + } - var mac = navigator.platform.indexOf('Mac') !== -1, - modKey ; - if (mac) - modKey = function (ev) { - return ev.metaKey ; - } ; - else - modKey = function (ev) { - return ev.ctrlKey ; - } ; - - function generalClick(ev) { - // console.log('click', ev) ; - - if (ev.which === 1) { - var elem = ev.target ; - - if (elem.className === 'e') { - // It's a click on an expander. - - ev.preventDefault() ; - - var parent = elem.parentNode, - div = jfContent, - prevBodyHeight = document.body.offsetHeight, - scrollTop = document.body.scrollTop, - parentSiblings - ; - - // Expand or collapse - if (parent.classList.contains('collapsed')) { - // EXPAND - if (modKey(ev)) - expand(parent.parentNode.children) ; - else - expand([parent]) ; - } - else { - // COLLAPSE - if (modKey(ev)) - collapse(parent.parentNode.children) ; - else - collapse([parent]) ; - } - - // Restore scrollTop somehow - // Clear current extra margin, if any - div.style.marginBottom = 0 ; - - // No need to worry if all content fits in viewport - if (document.body.offsetHeight < window.innerHeight) { - // console.log('document.body.offsetHeight < window.innerHeight; no need to adjust height') ; - return ; - } - - // And no need to worry if scrollTop still the same - if (document.body.scrollTop === scrollTop) { - // console.log('document.body.scrollTop === scrollTop; no need to adjust height') ; - return ; - } - - // console.log('Scrolltop HAS changed. document.body.scrollTop is now '+document.body.scrollTop+'; was '+scrollTop) ; - - // The body has got a bit shorter. - // We need to increase the body height by a bit (by increasing the bottom margin on the jfContent div). The amount to increase it is whatever is the difference between our previous scrollTop and our new one. - - // Work out how much more our target scrollTop is than this. - var difference = scrollTop - document.body.scrollTop + 8 ; // it always loses 8px; don't know why - - // Add this difference to the bottom margin - //var currentMarginBottom = parseInt(div.style.marginBottom) || 0 ; - div.style.marginBottom = difference + 'px' ; - - // Now change the scrollTop back to what it was - document.body.scrollTop = scrollTop ; - - return ; + // And no need to worry if scrollTop still the same + if (document.body.scrollTop === scrollTop) { + return; } + + // The body has got a bit shorter. + // We need to increase the body height by a bit (by increasing the bottom margin on the jfContent div). The amount to increase it is whatever is the difference between our previous scrollTop and our new one. + + // Work out how much more our target scrollTop is than this. + const difference = scrollTop - document.body.scrollTop + 8; // it always loses 8px; don't know why + + // Add this difference to the bottom margin + div.style.marginBottom = difference + 'px'; + + // Now change the scrollTop back to what it was + document.body.scrollTop = scrollTop; + + return; } } - -})(); +} diff --git a/src/js/lib/app-manifest.js b/src/js/lib/app-manifest.js new file mode 100644 index 0000000..1efe54b --- /dev/null +++ b/src/js/lib/app-manifest.js @@ -0,0 +1,3 @@ +import {browser} from './browser'; + +export const AppManifest = browser.runtime.getManifest(); diff --git a/src/js/lib/browser.js b/src/js/lib/browser.js new file mode 100644 index 0000000..a8322e9 --- /dev/null +++ b/src/js/lib/browser.js @@ -0,0 +1,14 @@ +'use strict'; + +export default { + get runtime() { + return getBrowser().runtime; + }, + get storage() { + return getBrowser().storage; + } +}; + +function getBrowser() { + return typeof browser !== 'undefined' ? browser : chrome; +} diff --git a/src/js/lib/dom-builder.js b/src/js/lib/dom-builder.js new file mode 100644 index 0000000..6ad6848 --- /dev/null +++ b/src/js/lib/dom-builder.js @@ -0,0 +1,197 @@ +'use strict'; + +import { createSpan, Templates } from './template'; + +const TOKEN_TYPES = { + STRING: 'STRING', + NUMBER: 'NUMBER', + OBJECT: 'OBJECT', + ARRAY: 'ARRAY', + BOOL: 'BOOL', + NULL: 'NULL', +}; + +export function jsonObjectToHTML(obj, jsonpFunctionName) { + // Format object (using recursive keyValueOrValue builder) + const rootKeyValueOrValue = getKeyValueOrValueDom(obj, false); + + // The whole DOM is now built. + + // Set class on root node to identify it + rootKeyValueOrValue.classList.add('rootKeyValueOrValue'); + + // Make div#formattedJson and append the root keyValueOrValue + const divFormattedJson = document.createElement('div'); + divFormattedJson.id = 'formattedJson'; + divFormattedJson.appendChild(rootKeyValueOrValue); + + // Convert it to an HTML string (shame about this step, but necessary for passing it through to the content page) + let returnHTML = divFormattedJson.outerHTML; + + // Top and tail with JSONP padding if necessary + if (jsonpFunctionName !== null) { + returnHTML = + `
${jsonpFunctionName} (
+ ${returnHTML} +
)
`; + } + + // Return the HTML + return returnHTML; +} + +// Core recursive DOM-building function +function getKeyValueOrValueDom(value, keyName) { + const templates = Templates; + let type, nonZeroSize; + + // Establish value type + if (typeof value === 'string') { + type = TOKEN_TYPES.STRING; + } else if (typeof value === 'number') { + type = TOKEN_TYPES.NUMBER; + } else if (value === false || value === true) { + type = TOKEN_TYPES.BOOL; + } else if (value === null) { + type = TOKEN_TYPES.NULL; + } else if (value instanceof Array) { + type = TOKEN_TYPES.ARRAY; + } else { + type = TOKEN_TYPES.OBJECT; + } + + // Root node for this keyValueOrValue + const keyValueOrValue = templates.keyValueOrValue(); + + // Add an 'expander' first (if this is object/array with non-zero size) + if (type === TOKEN_TYPES.OBJECT || type === TOKEN_TYPES.ARRAY) { + nonZeroSize = Object.keys(value).some((key) => value.hasOwnProperty(key)); + + if (nonZeroSize) { + keyValueOrValue.appendChild(templates.expander()); + } + } + + // If there's a key, add that before the value + if (keyName !== false) { // NB: "" is a legal keyname in JSON + // This keyValueOrValue must be an object property + keyValueOrValue.classList.add('objectProperty'); + // Create a span for the key name + const keySpan = templates.key(); + keySpan.textContent = JSON.stringify(keyName).slice(1, -1); // remove quotes + // Add it to keyValueOrValue, with quote marks + keyValueOrValue.appendChild(templates.doubleQuoteText()); + keyValueOrValue.appendChild(keySpan); + keyValueOrValue.appendChild(templates.doubleQuoteText()); + // Also add ": " (colon and non-breaking space) + keyValueOrValue.appendChild(templates.colonAndSpace()); + } + else { + // This is an array element instead + keyValueOrValue.classList.add('arrayElement'); + } + + // Generate DOM for this value + let blockInner, childKeyValueOrValue, valueElement; + switch (type) { + case TOKEN_TYPES.STRING: + // If string is a URL, get a link, otherwise get a span + const innerStringEl = createSpan(); + let escapedString = JSON.stringify(value); + escapedString = escapedString.substring(1, escapedString.length - 1); // remove quotes + if (value[0] === 'h' && value.substring(0, 4) === 'http') { // crude but fast - some false positives, but rare, and UX doesn't suffer terribly from them. + const innerStringA = document.createElement('A'); + innerStringA.href = value; + innerStringA.innerText = escapedString; + innerStringEl.appendChild(innerStringA); + } + else { + innerStringEl.innerText = escapedString; + } + valueElement = templates.string(); + valueElement.appendChild(templates.doubleQuoteText()); + valueElement.appendChild(innerStringEl); + valueElement.appendChild(templates.doubleQuoteText()); + keyValueOrValue.appendChild(valueElement); + break; + + case TOKEN_TYPES.NUMBER: + // Simply add a number element (span.n) + valueElement = templates.number(); + valueElement.innerText = value; + keyValueOrValue.appendChild(valueElement); + break; + + case TOKEN_TYPES.OBJECT: + // Add opening brace + keyValueOrValue.appendChild(templates.openingBrace()); + // If any properties, add a blockInner containing k/v pair(s) + if (nonZeroSize) { + // Add ellipsis (empty, but will be made to do something when keyValueOrValue is collapsed) + keyValueOrValue.appendChild(templates.ellipsis()); + // Create blockInner, which indents (don't attach yet) + blockInner = templates.blockInner(); + // For each key/value pair, add as a keyValueOrValue to blockInner + let count = 0, comma; + for (let k in value) { + if (value.hasOwnProperty(k)) { + count++; + childKeyValueOrValue = getKeyValueOrValueDom(value[k], k); + // Add comma + comma = templates.commaText(); + childKeyValueOrValue.appendChild(comma); + blockInner.appendChild(childKeyValueOrValue); + } + } + // Now remove the last comma + childKeyValueOrValue.removeChild(comma); + // Add blockInner + keyValueOrValue.appendChild(blockInner); + } + + // Add closing brace + keyValueOrValue.appendChild(templates.closingBrace()); + break; + + case TOKEN_TYPES.ARRAY: + // Add opening bracket + keyValueOrValue.appendChild(templates.openingBracket()); + // If non-zero length array, add blockInner containing inner vals + if (nonZeroSize) { + // Add ellipsis + keyValueOrValue.appendChild(templates.ellipsis()); + // Create blockInner (which indents) (don't attach yet) + blockInner = templates.blockInner(); + // For each key/value pair, add the markup + for (let i = 0, length = value.length, lastIndex = length - 1; i < length; i++) { + // Make a new keyValueOrValue, with no key + childKeyValueOrValue = getKeyValueOrValueDom(value[i], false); + // Add comma if not last one + if (i < lastIndex) { + childKeyValueOrValue.appendChild(templates.commaText()); + } + // Append the child keyValueOrValue + blockInner.appendChild(childKeyValueOrValue); + } + // Add blockInner + keyValueOrValue.appendChild(blockInner); + } + // Add closing bracket + keyValueOrValue.appendChild(templates.closingBracket()); + break; + + case TOKEN_TYPES.BOOL: + if (value) { + keyValueOrValue.appendChild(templates.true); + } else { + keyValueOrValue.appendChild(templates.false()); + } + break; + + case TOKEN_TYPES.NULL: + keyValueOrValue.appendChild(templates.null()); + break; + } + + return keyValueOrValue; +} diff --git a/src/js/lib/template.js b/src/js/lib/template.js new file mode 100644 index 0000000..938563e --- /dev/null +++ b/src/js/lib/template.js @@ -0,0 +1,45 @@ +function createSpanWithTextAndClass(innerText, className) { + const span = createSpan(); + span.className = className; + span.innerText = innerText; + return () => span.cloneNode(true); +} + +function createSpanWithClass(className) { + const span = createSpan(); + span.className = className; + return () => span.cloneNode(true); +} + +function createTextNode(text) { + const node = document.createTextNode(text); + return () => node.cloneNode(true); +} + +export function createSpan() { + return document.createElement('span'); +} + +export const Templates = { + keyValueOrValue: createSpanWithClass('keyValueOrValue'), + expander: createSpanWithClass('expander'), + key: createSpanWithClass('key'), + string: createSpanWithClass('string'), + number: createSpanWithClass('number'), + + null: createSpanWithTextAndClass('null', 'null'), + true: createSpanWithTextAndClass('true', 'bool'), + false: createSpanWithTextAndClass('false', 'bool'), + + openingBrace: createSpanWithTextAndClass('{', 'brace'), + closingBrace: createSpanWithTextAndClass('}', 'brace'), + openingBracket: createSpanWithTextAndClass('[', 'brace'), + closingBracket: createSpanWithTextAndClass(']', 'brace'), + + ellipsis: createSpanWithClass('ellipsis'), + blockInner: createSpanWithClass('blockInner'), + + colonAndSpace: createTextNode(':\u00A0'), + commaText: createTextNode(','), + doubleQuoteText: createTextNode('"') +}; diff --git a/src/js/lib/theme.js b/src/js/lib/theme.js new file mode 100644 index 0000000..b1c9840 --- /dev/null +++ b/src/js/lib/theme.js @@ -0,0 +1,22 @@ +export const themes = { + dawn: require('../../sass/dawn.scss'), + monokai: require('../../sass/monokai.scss'), + default: 'dawn' +}; + +const transition = require('../../sass/transition.scss'); +let themeElement; + +export function switchToTheme(theme) { + const element = getThemeElement(); + element.innerText = element.innerText ? theme + transition : theme; +} + +function getThemeElement() { + if (!themeElement) { + themeElement = document.createElement('style'); + document.head.appendChild(themeElement); + } + + return themeElement; +} diff --git a/src/js/lib/utilities.js b/src/js/lib/utilities.js new file mode 100644 index 0000000..9b2d218 --- /dev/null +++ b/src/js/lib/utilities.js @@ -0,0 +1,104 @@ +'use strict'; + +export function removeComments(str) { + str = `__${str}__`.split(''); + + const mode = { + singleQuote: false, + doubleQuote: false, + regex: false, + blockComment: false, + lineComment: false, + condComp: false + }; + + for (let i = 0, length = str.length; i < length; i++) { + if (mode.regex) { + if (str[i] === '/' && str[i - 1] !== '\\') { + mode.regex = false; + } + continue; + } + + if (mode.singleQuote) { + if (str[i] === "'" && str[i - 1] !== '\\') { + mode.singleQuote = false; + } + continue; + } + + if (mode.doubleQuote) { + if (str[i] === '"' && str[i - 1] !== '\\') { + mode.doubleQuote = false; + } + continue; + } + + if (mode.blockComment) { + if (str[i] === '*' && str[i + 1] === '/') { + str[i + 1] = ''; + mode.blockComment = false; + } + str[i] = ''; + continue; + } + + if (mode.lineComment) { + if (str[i + 1] === '\n' || str[i + 1] === '\r') { + mode.lineComment = false; + } + str[i] = ''; + continue; + } + + if (mode.condComp) { + if (str[i - 2] === '@' && str[i - 1] === '*' && str[i] === '/') { + mode.condComp = false; + } + continue; + } + + mode.doubleQuote = str[i] === '"'; + mode.singleQuote = str[i] === "'"; + + if (str[i] === '/') { + if (str[i + 1] === '*' && str[i + 2] === '@') { + mode.condComp = true; + continue; + } + if (str[i + 1] === '*') { + str[i] = ''; + mode.blockComment = true; + continue; + } + if (str[i + 1] === '/') { + str[i] = ''; + mode.lineComment = true; + continue; + } + mode.regex = true; + } + } + + return str.join('').slice(2, -2); +} + +export function firstJSONCharIndex(str) { + const arrayIndex = str.indexOf('['); + const objIndex = str.indexOf('{'); + let index = 0; + + if (arrayIndex !== -1) { + index = arrayIndex; + } + + if (objIndex !== -1) { + if (arrayIndex === -1) { + index = objIndex; + } else { + index = Math.min(objIndex, arrayIndex); + } + } + + return index; +} diff --git a/src/manifest.json b/src/manifest.json index c9a62e6..83725a8 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -17,5 +17,5 @@ "content_scripts": [ { "matches": [""], "js": ["js/content.js"], "run_at": "document_start" } ], - "permissions":["*://*/*", ""] + "permissions":["storage", "*://*/*", ""] } diff --git a/src/sass/content.scss b/src/sass/content.scss index 9a09ad6..ad8c141 100644 --- a/src/sass/content.scss +++ b/src/sass/content.scss @@ -1,235 +1,224 @@ -/*@charset "utf-8";*/ - body { - -webkit-user-select: text ; - overflow-y: scroll !important ; - margin: 0 ; - position: relative ; -} - -#optionBar { - -webkit-user-select: none ; - display: block ; - position: absolute ; - top: 9px ; - right: 17px ; -} - -#buttonFormatted, #buttonPlain { - -webkit-border-radius: 2px; - -webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1); - -webkit-user-select: none; - background: -webkit-linear-gradient(#fafafa, #f4f4f4 40%, #e5e5e5); - border: 1px solid #aaa; - color: #444; - font-size: 12px ; - margin-bottom: 0px; - min-width: 4em; - /*padding: 3px 12px 3px 12px;*/ - padding: 3px 0 ; - position: relative ; - z-index: 10; - display: inline-block ; - width: 80px ; - text-shadow: 1px 1px rgba(255,255,255,0.3) ; -} - -#buttonFormatted { - margin-left: 0 ; - border-top-left-radius: 0 ; - border-bottom-left-radius: 0 ; -} -#buttonPlain { - margin-right: 0 ; - border-top-right-radius: 0 ; - border-bottom-right-radius: 0 ; - border-right: none ; -} - -#buttonFormatted:hover, #buttonPlain:hover { - -webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2); - background: #ebebeb -webkit-linear-gradient(#fefefe, #f8f8f8 40%, #e9e9e9); - border-color: #999; - color: #222; -} - -#buttonFormatted:active, -#buttonPlain:active { - -webkit-box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.2); - background: #ebebeb -webkit-linear-gradient(#f4f4f4, #efefef 40%, #dcdcdc); - color: #333; -} - -#buttonFormatted.selected, -#buttonPlain.selected { - -webkit-box-shadow: inset 0px 1px 5px rgba(0, 0, 0, 0.2); - background: #ebebeb -webkit-linear-gradient(#e4e4e4, #dfdfdf 40%, #dcdcdc); - color: #333; -} - -#buttonFormatted:focus, -#buttonPlain:focus { - outline: 0; + font-size: 16px; + user-select: text; + overflow-y: scroll !important; + margin: 0; + position: relative; +} + +#formatOptionBar { + right: 0.7rem; +} + +#themeOptionBar { + right: 11.5rem; +} + +.optionBar { + user-select: none; + display: block; + position: absolute; + top: 0.7rem; + + button { + border-radius: 0.1rem; + box-shadow: 0 0.05rem 0.2rem rgba(0, 0, 0, 0.1); + user-select: none; + background: linear-gradient(#fafafa, #f4f4f4 40%, #e5e5e5); + border: 1px solid #aaa; + color: #444; + font-size: 0.75rem; + margin-bottom: 0; + min-width: 4rem; + padding: 0.2rem 0; + position: relative; + z-index: 10; + display: inline-block; + width: 5rem; + text-shadow: 0.05rem 0.05rem rgba(255, 255, 255, 0.3); + + &:last-child { + margin-left: 0; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + + &:first-child { + margin-right: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-right: none; + } + + &:hover { + box-shadow: 0 0.05rem 0.2rem rgba(0, 0, 0, 0.2); + background: #ebebeb linear-gradient(#fefefe, #f8f8f8 40%, #e9e9e9); + border-color: #999; + color: #222; + } + + &:active { + box-shadow: inset 0 0.05rem 0.2rem rgba(0, 0, 0, 0.2); + background: #ebebeb linear-gradient(#f4f4f4, #efefef 40%, #dcdcdc); + color: #333; + } + + &.selected { + box-shadow: inset 0 0.05rem 0.3rem rgba(0, 0, 0, 0.2); + background: #ebebeb linear-gradient(#e4e4e4, #dfdfdf 40%, #dcdcdc); + color: #333; + } + + &:focus { + outline: 0; + } + } } - #jsonpOpener, #jsonpCloser { - padding: 4px 0 0 8px ; - color: black ; - margin-bottom: -6px ; + padding: 0.25rem 0 0 0.5rem; + color: black; + margin-bottom: -0.4rem; } #jsonpCloser { - margin-top: 0 ; + margin-top: 0; } #formattedJson { - padding-left: 28px ; - padding-top: 6px ; + padding-left: 1.75rem; + padding-top: 0.4rem; } + pre { - padding: 36px 5px 5px 5px ; + padding: 2.25rem 0.3rem 0.3rem; } - -.kvov { - display: block ; - padding-left: 20px ; - margin-left: -20px ; - position: relative ; +.keyValueOrValue { + display: block; + padding-left: 1.25rem; + margin-left: -1.25rem; + position: relative; } .collapsed { - white-space: nowrap ; - &> .blockInner { - display: none ; + white-space: nowrap; + + & > .blockInner { + display: none; } - &> .ell:after { - content: "…" ; - font-weight: bold ; + + & > .ellipsis:after { + content: "…"; + font-weight: bold; } - &> .ell { - margin: 0 4px ; - color: #888 ; + + & > .ellipsis { + margin: 0 0.25rem; + color: #888; } - .kvov { - display: inline ; + + .keyValueOrValue { + display: inline; } } -.e { - width: 20px ; - height: 18px ; - display: block ; - position: absolute ; - left: -2px ; - top: 1px ; - z-index: 5 ; - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAD1JREFUeNpiYGBgOADE%2F3Hgw0DM4IRHgSsDFOzFInmMAQnY49ONzZRjDFiADT7dMLALiE8y4AGW6LoBAgwAuIkf%2F%2FB7O9sAAAAASUVORK5CYII%3D") ; - background-repeat: no-repeat ; - background-position: center center; - display: block ; - opacity: 0.15 ; - // -webkit-transition: -webkit-transform 0.05s linear ; - - .collapsed > & { - -webkit-transform: rotate(-90deg) ; - width: 18px ; - height: 20px ; - - left: 0px ; - top: 0px ; +.expander { + display: block; + position: absolute; + width: 1.25rem; + height: 1.15rem; + left: 0.3rem; + font-size: 1.5rem; + z-index: 5; + opacity: 0.15; + cursor: pointer; + + &:before { + display: block; + content: '▾'; + } + + .collapsed > &:before { + content: '▸'; } &:hover { - opacity: 0.35 ; + opacity: 0.35; } &:active { - opacity: 0.5 ; + opacity: 0.5; } /* .e that are *inside* the children of a collapsed one */ - .collapsed .kvov & { - display: none ; + .collapsed .keyValueOrValue & { + display: none; } } .blockInner { - display: block ; - padding-left: 24px ; - border-left: 1px dotted #bbb ; - margin-left: 2px ; + display: block; + padding-left: 1.5rem; + border-left: 0.05rem dotted #bbb; + margin-left: 0.1rem; } - /* SYNTAX HIGHLIGHTING */ - #formattedJson, #jsonpOpener, #jsonpCloser { - color: #333 ; - font: 13px/18px monospace ; - } +#formattedJson, #jsonpOpener, #jsonpCloser, pre { + font: 0.8rem/1.15rem monospace; +} - #formattedJson { - color: #444 ; - } - .b /* Bracket/brace */ { - font-weight: bold ; - } - .s { - color: #0B7500 ; - word-wrap: break-word; - } - a:link, a:visited { - text-decoration: none ; - color: inherit ; - } - a:hover, a:active { - text-decoration: underline ; - color: #050 ; - } - .bl, .nl, .n { /* bool, null, number */ - font-weight: bold ; - color: #1A01CC ; - } - .k { /* key */ - color: black ; - } +.string { + word-wrap: break-word; +} + +a:link, a:visited { + text-decoration: none; + color: inherit; +} + +a:hover, a:active { + text-decoration: underline; + color: #050; +} #formattingMsg { - font: 13px "Lucida Grande", "Segoe UI", "Tahoma" ; - padding: 10px 0 0 8px ; - margin: 0 ; - color: #333 ; -} - #formattingMsg > svg { - margin: 0 7px ; - position: relative ; - top: 1px ; - } + font: 0.8rem "Lucida Grande", "Segoe UI", "Tahoma"; + padding: 0.6rem 0 0 0.5rem; + margin: 0; +} +#formattingMsg > svg { + margin: 0 0.45rem; + position: relative; + top: 0.05rem; +} /* Misc */ [hidden] { - display: none !important ; + display: none !important; } + span { - white-space: pre-wrap ; + white-space: pre-wrap; } /* Spinner */ -@-webkit-keyframes spin { +@keyframes spin { from { - -webkit-transform: rotate(0deg); + transform: rotate(0deg); } to { - -webkit-transform: rotate(360deg); + transform: rotate(360deg); } } + #spinner { - -webkit-animation: spin 2s 0 infinite ; + animation: spin 2s infinite; } * { - -webkit-font-smoothing: antialiased; -} \ No newline at end of file + font-smoothing: antialiased; +} diff --git a/src/sass/dawn.scss b/src/sass/dawn.scss new file mode 100644 index 0000000..0a44e07 --- /dev/null +++ b/src/sass/dawn.scss @@ -0,0 +1,35 @@ +$background: #f9f9f9; +$foreground: #080808; + +body { + background-color: $background; + color: $foreground; +} + +#formattedJson, #jsonpOpener, #jsonpCloser { + color: $foreground; +} + +.key { + color: #234a97; +} + +.number { + color: #811f24; +} + +.string { + color: #0b6125; +} + +.bool { + color: #811f24; +} + +.null { + color: #811f24; +} + +.brace { + color: $foreground; +} diff --git a/src/sass/monokai.scss b/src/sass/monokai.scss new file mode 100644 index 0000000..32e2e18 --- /dev/null +++ b/src/sass/monokai.scss @@ -0,0 +1,35 @@ +$background: #272822; +$foreground: #f8f8f2; + +body { + background-color: $background; + color: $foreground; +} + +#formattedJson, #jsonpOpener, #jsonpCloser { + color: $foreground; +} + +.key { + color: #a6e22e; +} + +.number { + color: #ae81ff; +} + +.string { + color: #e6db74; +} + +.bool { + color: #ae81ff; +} + +.null { + color: #ae81ff; +} + +.brace { + color: $foreground; +} diff --git a/src/sass/transition.scss b/src/sass/transition.scss new file mode 100644 index 0000000..e5d7482 --- /dev/null +++ b/src/sass/transition.scss @@ -0,0 +1,5 @@ +body { + transition-property: color, background-color; + transition-duration: 500ms; + transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); +} diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..33f2534 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,21 @@ +module.exports = { + module: { + rules: [ + { + test: /\.js$/, + exclude: /(node_modules|bower_components)/, + use: { + loader: 'babel-loader', + options: { + presets: ['env'] + } + } + }, + { + test: /\.scss$/, + use: ['text-loader', 'sass-loader?outputStyle=compressed'] + } + ] + }, + devtool: 'inline-source-map' +}; diff --git a/yarn.lock b/yarn.lock index edfc66b..823cf54 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23,15 +23,29 @@ abbrev@1: version "1.1.0" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" -acorn@4.X: +acorn-dynamic-import@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" + dependencies: + acorn "^4.0.3" + +acorn@4.X, acorn@^4.0.3: version "4.0.11" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.11.tgz#edcda3bd937e7556410d42ed5860f67399c794c0" -acorn@^5.0.3: +acorn@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + +acorn@^5.0.0, acorn@^5.0.3: version "5.0.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" -ajv@^4.9.1: +ajv-keywords@^1.1.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" + +ajv@^4.7.0, ajv@^4.9.1: version "4.11.7" resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.7.tgz#8655a5d86d0824985cc471a1d913fb6729a0ec48" dependencies: @@ -62,6 +76,13 @@ ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" +anymatch@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" + dependencies: + arrify "^1.0.0" + micromatch "^2.1.5" + aproba@^1.0.3: version "1.1.1" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.1.tgz#95d3600f07710aa0e9298c726ad5ecf2eacbabab" @@ -119,6 +140,14 @@ arrify@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" +asn1.js@^4.0.0: + version "4.9.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.9.1.tgz#48ba240b45a9280e94748990ba597d216617fd40" + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + asn1@~0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" @@ -131,10 +160,38 @@ assert-plus@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" +assert@^1.1.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" + dependencies: + util "0.10.3" + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + async-foreach@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" +async@^0.9.0: + version "0.9.2" + resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" + +async@^1.3.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^2.1.2, async@^2.1.5: + version "2.3.0" + resolved "https://registry.yarnpkg.com/async/-/async-2.3.0.tgz#1013d1051047dd320fe24e494d5c66ecaf6147d9" + dependencies: + lodash "^4.14.0" + +async@~0.2.6: + version "0.2.10" + resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -143,7 +200,7 @@ atob@~1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/atob/-/atob-1.1.3.tgz#95f13629b12c3a51a5d215abdce2aa9f32f80773" -autoprefixer@^6.3.1: +autoprefixer@^6.0.0, autoprefixer@^6.3.1: version "6.7.7" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" dependencies: @@ -162,10 +219,480 @@ aws4@^1.2.1: version "1.6.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" +babel-code-frame@^6.11.0, babel-code-frame@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" + dependencies: + chalk "^1.1.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + +babel-core@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.24.1.tgz#8c428564dce1e1f41fb337ec34f4c3b022b5ad83" + dependencies: + babel-code-frame "^6.22.0" + babel-generator "^6.24.1" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + babylon "^6.11.0" + convert-source-map "^1.1.0" + debug "^2.1.1" + json5 "^0.5.0" + lodash "^4.2.0" + minimatch "^3.0.2" + path-is-absolute "^1.0.0" + private "^0.1.6" + slash "^1.0.0" + source-map "^0.5.0" + +babel-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.24.1.tgz#e715f486c58ded25649d888944d52aa07c5d9497" + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.2.0" + source-map "^0.5.0" + trim-right "^1.0.1" + +babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" + dependencies: + babel-helper-explode-assignable-expression "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-call-delegate@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-define-map@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.24.1.tgz#7a9747f258d8947d32d515f6aa1c7bd02204a080" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + lodash "^4.2.0" + +babel-helper-explode-assignable-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-function-name@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" + dependencies: + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-get-function-arity@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-hoist-variables@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-optimise-call-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-regex@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.24.1.tgz#d36e22fab1008d79d88648e32116868128456ce8" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + lodash "^4.2.0" + +babel-helper-remap-async-to-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-replace-supers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" + dependencies: + babel-helper-optimise-call-expression "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-loader@^6.4.1: + version "6.4.1" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-6.4.1.tgz#0b34112d5b0748a8dcdbf51acf6f9bd42d50b8ca" + dependencies: + find-cache-dir "^0.1.1" + loader-utils "^0.2.16" + mkdirp "^0.5.1" + object-assign "^4.0.1" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-check-es2015-constants@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-syntax-async-functions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" + +babel-plugin-syntax-exponentiation-operator@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" + +babel-plugin-syntax-trailing-function-commas@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" + +babel-plugin-transform-async-to-generator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" + dependencies: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-functions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-arrow-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoping@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz#76c295dc3a4741b1665adfd3167215dcff32a576" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + lodash "^4.2.0" + +babel-plugin-transform-es2015-classes@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" + dependencies: + babel-helper-define-map "^6.24.1" + babel-helper-function-name "^6.24.1" + babel-helper-optimise-call-expression "^6.24.1" + babel-helper-replace-supers "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-computed-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-destructuring@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-duplicate-keys@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-for-of@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-function-name@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" + dependencies: + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz#d3e310b40ef664a36622200097c6d440298f2bfe" + dependencies: + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-modules-systemjs@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-umd@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" + dependencies: + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-object-super@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" + dependencies: + babel-helper-replace-supers "^6.24.1" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-parameters@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" + dependencies: + babel-helper-call-delegate "^6.24.1" + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-shorthand-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-spread@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-sticky-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-template-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-typeof-symbol@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-unicode-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + regexpu-core "^2.0.0" + +babel-plugin-transform-exponentiation-operator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" + dependencies: + babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" + babel-plugin-syntax-exponentiation-operator "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-regenerator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz#b8da305ad43c3c99b4848e4fe4037b770d23c418" + dependencies: + regenerator-transform "0.9.11" + +babel-plugin-transform-strict-mode@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-preset-env@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.4.0.tgz#c8e02a3bcc7792f23cded68e0355b9d4c28f0f7a" + dependencies: + babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-to-generator "^6.22.0" + babel-plugin-transform-es2015-arrow-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.23.0" + babel-plugin-transform-es2015-classes "^6.23.0" + babel-plugin-transform-es2015-computed-properties "^6.22.0" + babel-plugin-transform-es2015-destructuring "^6.23.0" + babel-plugin-transform-es2015-duplicate-keys "^6.22.0" + babel-plugin-transform-es2015-for-of "^6.23.0" + babel-plugin-transform-es2015-function-name "^6.22.0" + babel-plugin-transform-es2015-literals "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.22.0" + babel-plugin-transform-es2015-modules-commonjs "^6.23.0" + babel-plugin-transform-es2015-modules-systemjs "^6.23.0" + babel-plugin-transform-es2015-modules-umd "^6.23.0" + babel-plugin-transform-es2015-object-super "^6.22.0" + babel-plugin-transform-es2015-parameters "^6.23.0" + babel-plugin-transform-es2015-shorthand-properties "^6.22.0" + babel-plugin-transform-es2015-spread "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.22.0" + babel-plugin-transform-es2015-template-literals "^6.22.0" + babel-plugin-transform-es2015-typeof-symbol "^6.23.0" + babel-plugin-transform-es2015-unicode-regex "^6.22.0" + babel-plugin-transform-exponentiation-operator "^6.22.0" + babel-plugin-transform-regenerator "^6.22.0" + browserslist "^1.4.0" + invariant "^2.2.2" + +babel-register@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.1.tgz#7e10e13a2f71065bdfad5a1787ba45bca6ded75f" + dependencies: + babel-core "^6.24.1" + babel-runtime "^6.22.0" + core-js "^2.4.0" + home-or-tmp "^2.0.0" + lodash "^4.2.0" + mkdirp "^0.5.1" + source-map-support "^0.4.2" + +babel-runtime@^6.18.0, babel-runtime@^6.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.10.0" + +babel-template@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.24.1.tgz#04ae514f1f93b3a2537f2a0f60a5a45fb8308333" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + babylon "^6.11.0" + lodash "^4.2.0" + +babel-traverse@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.24.1.tgz#ab36673fd356f9a0948659e7b338d5feadb31695" + dependencies: + babel-code-frame "^6.22.0" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + babylon "^6.15.0" + debug "^2.2.0" + globals "^9.0.0" + invariant "^2.2.0" + lodash "^4.2.0" + +babel-types@^6.19.0, babel-types@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.24.1.tgz#a136879dc15b3606bda0d90c1fc74304c2ff0975" + dependencies: + babel-runtime "^6.22.0" + esutils "^2.0.2" + lodash "^4.2.0" + to-fast-properties "^1.0.1" + +babylon@^6.11.0, babylon@^6.15.0: + version "6.16.1" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.16.1.tgz#30c5a22f481978a9e7f8cdfdf496b11d94b404d3" + balanced-match@^0.4.1, balanced-match@^0.4.2: version "0.4.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" +base64-js@^1.0.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" + bcrypt-pbkdf@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" @@ -176,12 +703,24 @@ beeper@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" +big.js@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.1.3.tgz#4cada2193652eb3ca9ec8e55c9015669c9806978" + +binary-extensions@^1.0.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774" + block-stream@*: version "0.0.9" resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" dependencies: inherits "~2.0.0" +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: + version "4.11.6" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" + boom@2.x.x: version "2.10.1" resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" @@ -203,7 +742,68 @@ braces@^1.8.2: preserve "^0.2.0" repeat-element "^1.1.2" -browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + +browserify-aes@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-0.4.0.tgz#067149b668df31c4b58533e02d01e806d8608e2c" + dependencies: + inherits "^2.0.1" + +browserify-aes@^1.0.0, browserify-aes@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.0.6.tgz#5e7725dbdef1fd5930d4ebab48567ce451c48a0a" + dependencies: + buffer-xor "^1.0.2" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + inherits "^2.0.1" + +browserify-cipher@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a" + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd" + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + +browserify-rsa@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + dependencies: + bn.js "^4.1.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" + dependencies: + bn.js "^4.1.1" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.2" + elliptic "^6.0.0" + inherits "^2.0.1" + parse-asn1 "^5.0.0" + +browserify-zlib@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" + dependencies: + pako "~0.2.0" + +browserslist@^1.3.6, browserslist@^1.4.0, browserslist@^1.5.2, browserslist@^1.7.6: version "1.7.7" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" dependencies: @@ -214,10 +814,26 @@ buffer-shims@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" +buffer-xor@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + +buffer@^4.3.0, buffer@^4.9.0: + version "4.9.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + camelcase-keys@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" @@ -261,7 +877,7 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: +chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: @@ -271,6 +887,27 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" +chokidar@^1.0.0, chokidar@^1.4.3: + version "1.6.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.1.tgz#2f4447ab5e96e50fb3d789fd90d4c72e0e4c70c2" + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +cipher-base@^1.0.0, cipher-base@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.3.tgz#eeabf194419ce900da3018c207d212f2a6df0a07" + dependencies: + inherits "^2.0.1" + clap@^1.0.9: version "1.1.3" resolved "https://registry.yarnpkg.com/clap/-/clap-1.1.3.tgz#b3bd36e93dd4cbfb395a3c26896352445265c05b" @@ -293,6 +930,16 @@ cliui@^3.2.0: strip-ansi "^3.0.1" wrap-ansi "^2.0.0" +clone-deep@^0.2.4: + version "0.2.4" + resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-0.2.4.tgz#4e73dd09e9fb971cc38670c5dced9c1896481cc6" + dependencies: + for-own "^0.1.3" + is-plain-object "^2.0.1" + kind-of "^3.0.2" + lazy-cache "^1.0.3" + shallow-clone "^0.1.2" + clone-stats@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" @@ -361,22 +1008,63 @@ combined-stream@^1.0.5, combined-stream@~1.0.5: dependencies: delayed-stream "~1.0.0" +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" +console-browserify@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + dependencies: + date-now "^0.1.4" + console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" -convert-source-map@1.X: +constants-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + +convert-source-map@1.X, convert-source-map@^1.1.0: version "1.5.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" +core-js@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" + core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" +create-ecdh@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" + dependencies: + bn.js "^4.1.0" + elliptic "^6.0.0" + +create-hash@^1.1.0, create-hash@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.2.tgz#51210062d7bb7479f6c65bb41a92208b1d61abad" + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + ripemd160 "^1.0.0" + sha.js "^2.3.6" + +create-hmac@^1.1.0, create-hmac@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.4.tgz#d3fb4ba253eb8b3f56e39ea2fbcb8af747bd3170" + dependencies: + create-hash "^1.1.0" + inherits "^2.0.1" + cross-spawn@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" @@ -390,10 +1078,67 @@ cryptiles@2.x.x: dependencies: boom "2.x.x" +crypto-browserify@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.3.0.tgz#b9fc75bb4a0ed61dcf1cd5dae96eb30c9c3e506c" + dependencies: + browserify-aes "0.4.0" + pbkdf2-compat "2.0.1" + ripemd160 "0.2.0" + sha.js "2.2.6" + +crypto-browserify@^3.11.0: + version "3.11.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.11.0.tgz#3652a0906ab9b2a7e0c3ce66a408e957a2485522" + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + css-color-names@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" +css-loader@^0.28.0: + version "0.28.0" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.0.tgz#417cfa9789f8cde59a30ccbf3e4da7a806889bad" + dependencies: + babel-code-frame "^6.11.0" + css-selector-tokenizer "^0.7.0" + cssnano ">=2.6.1 <4" + loader-utils "^1.0.2" + lodash.camelcase "^4.3.0" + object-assign "^4.0.1" + postcss "^5.0.6" + postcss-modules-extract-imports "^1.0.0" + postcss-modules-local-by-default "^1.0.1" + postcss-modules-scope "^1.0.0" + postcss-modules-values "^1.1.0" + source-list-map "^0.1.7" + +css-selector-tokenizer@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.6.0.tgz#6445f582c7930d241dcc5007a43d6fcb8f073152" + dependencies: + cssesc "^0.1.0" + fastparse "^1.1.1" + regexpu-core "^1.0.0" + +css-selector-tokenizer@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz#e6988474ae8c953477bf5e7efecfceccd9cf4c86" + dependencies: + cssesc "^0.1.0" + fastparse "^1.1.1" + regexpu-core "^1.0.0" + css@2.X, css@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/css/-/css-2.2.1.tgz#73a4c81de85db664d4ee674f7d47085e3b2d55dc" @@ -403,7 +1148,11 @@ css@2.X, css@^2.2.1: source-map-resolve "^0.3.0" urix "^0.1.0" -cssnano@^3.0.0, cssnano@^3.10.0: +cssesc@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" + +"cssnano@>=2.6.1 <4": version "3.10.0" resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38" dependencies: @@ -459,6 +1208,10 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + dateformat@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.0.0.tgz#2743e3abb5c3fc2462e527dca445e04e9f4dee17" @@ -470,7 +1223,7 @@ debug-fabulous@0.1.X: debug "2.X" object-assign "4.1.0" -debug@2.X: +debug@2.X, debug@^2.1.1, debug@^2.2.0: version "2.6.3" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d" dependencies: @@ -480,6 +1233,10 @@ decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" +deep-extend@~0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.1.tgz#efe4113d08085f4e6f9687759810f807469e2253" + defaults@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" @@ -514,16 +1271,41 @@ deprecated@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/deprecated/-/deprecated-0.0.1.tgz#f9c9af5464afa1e7a971458a8bdef2aa94d5bb19" +des.js@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + detect-file@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-0.1.0.tgz#4935dedfd9488648e006b0129566e9386711ea63" dependencies: fs-exists-sync "^0.1.0" +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + dependencies: + repeating "^2.0.0" + detect-newline@2.X: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" +diffie-hellman@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +domain-browser@^1.1.1: + version "1.1.7" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" + duplexer2@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" @@ -540,12 +1322,51 @@ electron-to-chromium@^1.2.7: version "1.3.4" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.4.tgz#e51769c0cf550e0cf5aedf6aa2b803a264b3a900" +elliptic@^6.0.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + end-of-stream@~0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-0.1.5.tgz#8e177206c3c80837d85632e8b9359dfe8b2f6eaf" dependencies: once "~1.3.0" +enhanced-resolve@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.1.0.tgz#9f4b626f577245edcf4b2ad83d86e17f4f421dec" + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.4.0" + object-assign "^4.0.1" + tapable "^0.2.5" + +enhanced-resolve@~0.9.0: + version "0.9.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz#4d6e689b3725f86090927ccc86cd9f1635b89e2e" + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.2.0" + tapable "^0.1.8" + +errno@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" + dependencies: + prr "~0.0.0" + error-ex@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" @@ -560,6 +1381,20 @@ esprima@^2.6.0: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +events@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" + +evp_bytestokey@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz#497b66ad9fef65cd7c08a6180824ba1476b66e53" + dependencies: + create-hash "^1.1.1" + expand-brackets@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" @@ -599,6 +1434,10 @@ fancy-log@^1.1.0: chalk "^1.1.1" time-stamp "^1.0.0" +fastparse@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" + filename-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" @@ -613,6 +1452,14 @@ fill-range@^2.1.0: repeat-element "^1.1.2" repeat-string "^1.5.2" +find-cache-dir@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" + dependencies: + commondir "^1.0.1" + mkdirp "^0.5.1" + pkg-dir "^1.0.0" + find-index@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/find-index/-/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4" @@ -657,11 +1504,15 @@ flatten@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" +for-in@^0.1.3: + version "0.1.8" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.8.tgz#d8773908e31256109952b1fdb9b3fa867d2775e1" + for-in@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" -for-own@^0.1.4: +for-own@^0.1.3, for-own@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" dependencies: @@ -687,7 +1538,22 @@ fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" -fstream@^1.0.0, fstream@^1.0.2: +fsevents@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.1.tgz#f19fd28f43eeaf761680e519a203c4d0b3d31aff" + dependencies: + nan "^2.3.0" + node-pre-gyp "^0.6.29" + +fstream-ignore@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" + dependencies: + fstream "^1.0.0" + inherits "2" + minimatch "^3.0.0" + +fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: version "1.0.11" resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" dependencies: @@ -819,6 +1685,10 @@ global-prefix@^0.1.4: is-windows "^0.2.0" which "^1.2.12" +globals@^9.0.0: + version "9.17.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.17.0.tgz#0c0ca696d9b9bb694d2e5470bd37777caad50286" + globby@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" @@ -866,25 +1736,23 @@ graceful-fs@~1.2.0: version "1.2.3" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364" -gulp-cssnano@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/gulp-cssnano/-/gulp-cssnano-2.1.2.tgz#e08a09771ec5454a549f1a005bdd256cb8e5e0a3" - dependencies: - cssnano "^3.0.0" - gulp-util "^3.0.6" - object-assign "^4.0.1" - vinyl-sourcemaps-apply "^0.2.1" - -gulp-sass@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/gulp-sass/-/gulp-sass-3.1.0.tgz#53dc4b68a1f5ddfe4424ab4c247655269a8b74b7" +gulp-autoprefixer@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/gulp-autoprefixer/-/gulp-autoprefixer-3.1.1.tgz#75230051cd0d171343d783b7e9b5d1120eeef9b0" dependencies: - gulp-util "^3.0" - lodash.clonedeep "^4.3.2" - node-sass "^4.2.0" + autoprefixer "^6.0.0" + gulp-util "^3.0.0" + postcss "^5.0.4" through2 "^2.0.0" vinyl-sourcemaps-apply "^0.2.0" +gulp-header-license@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/gulp-header-license/-/gulp-header-license-1.0.9.tgz#f4222b677aa451daadd847614db580e49aa35369" + dependencies: + object-assign "^4.1.0" + through2 "^2.0.1" + gulp-sourcemaps@^2.6.0: version "2.6.0" resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-2.6.0.tgz#7ccce899a8a3bfca1593a3348d0fbf41dd3f51e5" @@ -915,7 +1783,7 @@ gulp-uglify@^2.1.2: uglify-save-license "^0.4.1" vinyl-sourcemaps-apply "^0.2.0" -gulp-util@^3.0, gulp-util@^3.0.0, gulp-util@^3.0.6: +gulp-util@^3.0.0, gulp-util@^3.0.7: version "3.0.8" resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f" dependencies: @@ -999,6 +1867,12 @@ has@^1.0.1: dependencies: function-bind "^1.0.2" +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.0.3.tgz#1332ff00156c0a0ffdd8236013d07b77a0451573" + dependencies: + inherits "^2.0.1" + hawk@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" @@ -1008,10 +1882,25 @@ hawk@~3.1.3: hoek "2.x.x" sntp "1.x.x" +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + hoek@2.x.x: version "2.16.3" resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + homedir-polyfill@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" @@ -1034,6 +1923,18 @@ http-signature@~1.1.0: jsprim "^1.2.2" sshpk "^1.7.0" +https-browserify@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" + +icss-replace-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.0.2.tgz#cb0b6054eb3af6edc9ab1d62d01933e2d4c8bfa5" + +ieee754@^1.1.4: + version "1.1.8" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" + in-publish@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51" @@ -1048,6 +1949,10 @@ indexes-of@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" +indexof@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -1063,14 +1968,28 @@ inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" -ini@^1.3.4: +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + +ini@^1.3.4, ini@~1.3.0: version "1.3.4" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" +interpret@^0.6.4: + version "0.6.6" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-0.6.6.tgz#fecd7a18e7ce5ca6abfb953e1f86213a49f1625b" + interpret@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" +invariant@^2.2.0, invariant@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + dependencies: + loose-envify "^1.0.0" + invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" @@ -1090,6 +2009,12 @@ is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + is-buffer@^1.0.2: version "1.1.5" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" @@ -1162,6 +2087,12 @@ is-plain-obj@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" +is-plain-object@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.1.tgz#4d7ca539bc9db9b737b8acb612f2318ef92f294f" + dependencies: + isobject "^1.0.0" + is-posix-bracket@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" @@ -1204,7 +2135,7 @@ isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" -isarray@1.0.0, isarray@~1.0.0: +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -1212,6 +2143,10 @@ isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" +isobject@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-1.0.2.tgz#f0f9b8ce92dd540fa0740882e3835a2e022ec78a" + isobject@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" @@ -1232,6 +2167,10 @@ js-base64@^2.1.9: version "2.1.9" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" +js-tokens@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" + js-yaml@~3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" @@ -1243,6 +2182,18 @@ jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + +json-loader@^0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.4.tgz#8baa1365a632f58a3c46d20175fc6002c96e37de" + json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" @@ -1257,6 +2208,10 @@ json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" +json5@^0.5.0, json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" @@ -1270,12 +2225,22 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.3.6" +kind-of@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-2.0.1.tgz#018ec7a4ce7e3a86cb9141be519d24c8faa981b5" + dependencies: + is-buffer "^1.0.2" + kind-of@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.1.0.tgz#475d698a5e49ff5e53d14e3e732429dc8bf4cf47" dependencies: is-buffer "^1.0.2" +lazy-cache@^0.2.3: + version "0.2.7" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-0.2.7.tgz#7feddf2dcb6edb77d11ef1d117ab5ffdf0ab1b65" + lazy-cache@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" @@ -1310,6 +2275,27 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" +loader-runner@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" + +loader-utils@^0.2.11, loader-utils@^0.2.16: + version "0.2.17" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + object-assign "^4.0.1" + +loader-utils@^1.0.1, loader-utils@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + lodash._basecopy@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" @@ -1354,6 +2340,14 @@ lodash.assignwith@^4.0.7: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz#127a97f02adc41751a954d24b0de17e100e038eb" +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + +lodash.clone@^4.3.2: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clone/-/lodash.clone-4.5.0.tgz#195870450f5a13192478df4bc3d23d2dea1907b6" + lodash.clonedeep@^4.3.2: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" @@ -1412,6 +2406,14 @@ lodash.restparam@^3.0.0: version "3.6.1" resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" +lodash.some@^4.2.2: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" + +lodash.tail@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.tail/-/lodash.tail-4.1.1.tgz#d2333a36d9e7717c8ad2f7cacafec7c32b444664" + lodash.template@^3.0.0: version "3.6.2" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f" @@ -1437,7 +2439,7 @@ lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" -lodash@^4.0.0, lodash@^4.13.1: +lodash@^4.0.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.2.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -1453,6 +2455,12 @@ longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" +loose-envify@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + loud-rejection@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" @@ -1497,6 +2505,24 @@ math-expression-evaluator@^1.2.14: version "1.2.16" resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.16.tgz#b357fa1ca9faefb8e48d10c14ef2bcb2d9f0a7c9" +memory-fs@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.2.0.tgz#f2bb25368bc121e391c2520de92969caee0a0290" + +memory-fs@^0.3.0, memory-fs@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.3.0.tgz#7bcc6b629e3a43e871d7e29aca6ae8a7f15cbb20" + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +memory-fs@^0.4.0, memory-fs@~0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + meow@^3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" @@ -1512,11 +2538,7 @@ meow@^3.7.0: redent "^1.0.0" trim-newlines "^1.0.0" -merge2@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.0.3.tgz#fa44f8b2262615ab72f0808a401d478a70e394db" - -micromatch@^2.3.7: +micromatch@^2.1.5, micromatch@^2.3.7: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" dependencies: @@ -1534,6 +2556,13 @@ micromatch@^2.3.7: parse-glob "^3.0.4" regex-cache "^0.4.2" +miller-rabin@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.0.tgz#4a62fb1d42933c05583982f4c716f6fb9e6c6d3d" + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + mime-db@~1.27.0: version "1.27.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1" @@ -1544,13 +2573,21 @@ mime-types@^2.1.12, mime-types@~2.1.7: dependencies: mime-db "~1.27.0" +minimalistic-assert@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + minimatch@^2.0.1: version "2.0.10" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" dependencies: brace-expansion "^1.0.0" -minimatch@^3.0.2, minimatch@~3.0.2: +minimatch@^3.0.0, minimatch@^3.0.2, minimatch@~3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" dependencies: @@ -1563,15 +2600,22 @@ minimatch@~0.2.11: lru-cache "2" sigmund "~1.0.0" -minimist@0.0.8: +minimist@0.0.8, minimist@~0.0.1: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" -minimist@^1.1.0, minimist@^1.1.3: +minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" -"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: +mixin-object@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/mixin-object/-/mixin-object-2.0.1.tgz#4fb949441dab182540f1fe035ba60e1947a5e57e" + dependencies: + for-in "^0.1.3" + is-extendable "^0.1.1" + +"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -1587,7 +2631,7 @@ multipipe@^0.1.2: dependencies: duplexer2 "0.0.2" -nan@^2.3.2: +nan@^2.3.0, nan@^2.3.2: version "2.6.2" resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" @@ -1613,7 +2657,77 @@ node-gyp@^3.3.1: tar "^2.0.0" which "1" -node-sass@^4.2.0: +node-libs-browser@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-0.7.0.tgz#3e272c0819e308935e26674408d7af0e1491b83b" + dependencies: + assert "^1.1.1" + browserify-zlib "^0.1.4" + buffer "^4.9.0" + console-browserify "^1.1.0" + constants-browserify "^1.0.0" + crypto-browserify "3.3.0" + domain-browser "^1.1.1" + events "^1.0.0" + https-browserify "0.0.1" + os-browserify "^0.2.0" + path-browserify "0.0.0" + process "^0.11.0" + punycode "^1.2.4" + querystring-es3 "^0.2.0" + readable-stream "^2.0.5" + stream-browserify "^2.0.1" + stream-http "^2.3.1" + string_decoder "^0.10.25" + timers-browserify "^2.0.2" + tty-browserify "0.0.0" + url "^0.11.0" + util "^0.10.3" + vm-browserify "0.0.4" + +node-libs-browser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.0.0.tgz#a3a59ec97024985b46e958379646f96c4b616646" + dependencies: + assert "^1.1.1" + browserify-zlib "^0.1.4" + buffer "^4.3.0" + console-browserify "^1.1.0" + constants-browserify "^1.0.0" + crypto-browserify "^3.11.0" + domain-browser "^1.1.1" + events "^1.0.0" + https-browserify "0.0.1" + os-browserify "^0.2.0" + path-browserify "0.0.0" + process "^0.11.0" + punycode "^1.2.4" + querystring-es3 "^0.2.0" + readable-stream "^2.0.5" + stream-browserify "^2.0.1" + stream-http "^2.3.1" + string_decoder "^0.10.25" + timers-browserify "^2.0.2" + tty-browserify "0.0.0" + url "^0.11.0" + util "^0.10.3" + vm-browserify "0.0.4" + +node-pre-gyp@^0.6.29: + version "0.6.34" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.34.tgz#94ad1c798a11d7fc67381b50d47f8cc18d9799f7" + dependencies: + mkdirp "^0.5.1" + nopt "^4.0.1" + npmlog "^4.0.2" + rc "^1.1.7" + request "^2.81.0" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^2.2.1" + tar-pack "^3.4.0" + +node-sass@^4.5.2: version "4.5.2" resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.5.2.tgz#4012fa2bd129b1d6365117e88d9da0500d99da64" dependencies: @@ -1642,6 +2756,13 @@ node-sass@^4.2.0: dependencies: abbrev "1" +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + dependencies: + abbrev "1" + osenv "^0.1.4" + normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: version "2.3.6" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.6.tgz#498fa420c96401f787402ba21e600def9f981fff" @@ -1670,7 +2791,7 @@ normalize-url@^1.4.0: query-string "^4.1.0" sort-keys "^1.0.0" -"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0: +"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.2.tgz#d03950e0e78ce1527ba26d2a7592e9348ac3e75f" dependencies: @@ -1710,12 +2831,19 @@ object.omit@^2.0.0: for-own "^0.1.4" is-extendable "^0.1.1" -once@^1.3.0, once@~1.3.0: +once@^1.3.0, once@^1.3.3, once@~1.3.0: version "1.3.3" resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" dependencies: wrappy "1" +optimist@~0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + orchestrator@^0.3.0: version "0.3.8" resolved "https://registry.yarnpkg.com/orchestrator/-/orchestrator-0.3.8.tgz#14e7e9e2764f7315fbac184e506c7aa6df94ad7e" @@ -1728,6 +2856,10 @@ ordered-read-streams@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz#fd565a9af8eb4473ba69b6ed8a34352cb552f126" +os-browserify@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f" + os-homedir@^1.0.0, os-homedir@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" @@ -1738,17 +2870,31 @@ os-locale@^1.4.0: dependencies: lcid "^1.0.0" -os-tmpdir@^1.0.0: +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" -osenv@0: +osenv@0, osenv@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" dependencies: os-homedir "^1.0.0" os-tmpdir "^1.0.0" +pako@~0.2.0: + version "0.2.9" + resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" + +parse-asn1@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712" + dependencies: + asn1.js "^4.0.0" + browserify-aes "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + parse-filepath@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.1.tgz#159d6155d43904d16c10ef698911da1e91969b73" @@ -1776,6 +2922,10 @@ parse-passwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" +path-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" + path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" @@ -1812,11 +2962,21 @@ path-type@^1.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" +pbkdf2-compat@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz#b6e0c8fa99494d94e0511575802a59a5c142f288" + +pbkdf2@^3.0.3: + version "3.0.9" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.9.tgz#f2c4b25a600058b3c3773c086c37dbbee1ffe693" + dependencies: + create-hmac "^1.1.2" + performance-now@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" -pify@^2.0.0: +pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -1830,6 +2990,12 @@ pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" +pkg-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" + dependencies: + find-up "^1.0.0" + postcss-calc@^5.2.0: version "5.3.1" resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" @@ -1952,6 +3118,33 @@ postcss-minify-selectors@^2.0.4: postcss "^5.0.14" postcss-selector-parser "^2.0.0" +postcss-modules-extract-imports@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.0.1.tgz#8fb3fef9a6dd0420d3f6d4353cf1ff73f2b2a341" + dependencies: + postcss "^5.0.4" + +postcss-modules-local-by-default@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.1.1.tgz#29a10673fa37d19251265ca2ba3150d9040eb4ce" + dependencies: + css-selector-tokenizer "^0.6.0" + postcss "^5.0.4" + +postcss-modules-scope@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.0.2.tgz#ff977395e5e06202d7362290b88b1e8cd049de29" + dependencies: + css-selector-tokenizer "^0.6.0" + postcss "^5.0.4" + +postcss-modules-values@^1.1.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.2.2.tgz#f0e7d476fe1ed88c5e4c7f97533a3e772ad94ca1" + dependencies: + icss-replace-symbols "^1.0.2" + postcss "^5.0.14" + postcss-normalize-charset@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1" @@ -2032,7 +3225,7 @@ postcss-zindex@^2.0.1: postcss "^5.0.4" uniqs "^2.0.0" -postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.8, postcss@^5.2.16: +postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.16: version "5.2.17" resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.17.tgz#cf4f597b864d65c8a492b2eabe9d706c879c388b" dependencies: @@ -2053,15 +3246,41 @@ pretty-hrtime@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" +private@^0.1.6: + version "0.1.7" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" + process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" +process@^0.11.0: + version "0.11.9" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.9.tgz#7bd5ad21aa6253e7da8682264f1e11d11c0318c1" + +prr@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" + pseudomap@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" -punycode@^1.4.1: +public-encrypt@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6" + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + +punycode@^1.2.4, punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" @@ -2080,6 +3299,14 @@ query-string@^4.1.0: object-assign "^4.1.0" strict-uri-encode "^1.0.0" +querystring-es3@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + randomatic@^1.1.3: version "1.1.6" resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" @@ -2087,6 +3314,19 @@ randomatic@^1.1.3: is-number "^2.0.2" kind-of "^3.0.2" +randombytes@^2.0.0, randombytes@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.3.tgz#674c99760901c3c4112771a31e521dc349cc09ec" + +rc@^1.1.7: + version "1.2.1" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.1.tgz#2e03e8e42ee450b8cb3dce65be1bf8974e1dfd95" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" @@ -2111,7 +3351,7 @@ read-pkg@^1.0.0: isarray "0.0.1" string_decoder "~0.10.x" -"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.1.5: +"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.6: version "2.2.9" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8" dependencies: @@ -2132,6 +3372,15 @@ readable-stream@~1.1.9: isarray "0.0.1" string_decoder "~0.10.x" +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + rechoir@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" @@ -2159,6 +3408,22 @@ reduce-function-call@^1.0.1: dependencies: balanced-match "^0.4.2" +regenerate@^1.2.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" + +regenerator-runtime@^0.10.0: + version "0.10.3" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.3.tgz#8c4367a904b51ea62a908ac310bf99ff90a82a3e" + +regenerator-transform@0.9.11: + version "0.9.11" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.9.11.tgz#3a7d067520cb7b7176769eb5ff868691befe1283" + dependencies: + babel-runtime "^6.18.0" + babel-types "^6.19.0" + private "^0.1.6" + regex-cache@^0.4.2: version "0.4.3" resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" @@ -2166,6 +3431,32 @@ regex-cache@^0.4.2: is-equal-shallow "^0.1.3" is-primitive "^2.0.0" +regexpu-core@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regexpu-core@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + +regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + dependencies: + jsesc "~0.5.0" + remove-trailing-separator@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz#615ebb96af559552d4bf4057c8436d486ab63cc4" @@ -2188,7 +3479,7 @@ replace-ext@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" -request@2, request@^2.79.0: +request@2, request@^2.79.0, request@^2.81.0: version "2.81.0" resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" dependencies: @@ -2246,12 +3537,20 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.2.8: +rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" dependencies: glob "^7.0.5" +ripemd160@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-0.2.0.tgz#2bf198bde167cacfa51c0a928e84b68bbe171fce" + +ripemd160@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-1.0.1.tgz#93a4bbd4942bc574b69a8fa57c71de10ecca7d6e" + safe-buffer@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" @@ -2264,11 +3563,21 @@ sass-graph@^2.1.1: lodash "^4.0.0" yargs "^4.7.1" +sass-loader@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-6.0.3.tgz#33983b1f90d27ddab0e57d0dac403dce9bc7ecfd" + dependencies: + async "^2.1.5" + clone-deep "^0.2.4" + loader-utils "^1.0.1" + lodash.tail "^4.1.1" + pify "^2.3.0" + sax@~1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.2.tgz#fd8631a23bc7826bef5d871bdb87378c95647828" -"semver@2 || 3 || 4 || 5", semver@~5.3.0: +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" @@ -2284,6 +3593,33 @@ set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +setimmediate@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + +sha.js@2.2.6: + version "2.2.6" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.2.6.tgz#17ddeddc5f722fb66501658895461977867315ba" + +sha.js@^2.3.6: + version "2.4.8" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.8.tgz#37068c2c476b6baf402d14a49c67f597921f634f" + dependencies: + inherits "^2.0.1" + +shallow-clone@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-0.1.2.tgz#5909e874ba77106d73ac414cfec1ffca87d97060" + dependencies: + is-extendable "^0.1.1" + kind-of "^2.0.1" + lazy-cache "^0.2.3" + mixin-object "^2.0.1" + sigmund@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" @@ -2292,6 +3628,10 @@ signal-exit@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + sntp@1.x.x: version "1.0.9" resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" @@ -2304,6 +3644,14 @@ sort-keys@^1.0.0: dependencies: is-plain-obj "^1.0.0" +source-list-map@^0.1.7, source-list-map@~0.1.7: + version "0.1.8" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106" + +source-list-map@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-1.1.1.tgz#1a33ac210ca144d1e561f906ebccab5669ff4cb4" + source-map-resolve@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.3.1.tgz#610f6122a445b8dd51535a2a71b783dfc1248761" @@ -2313,11 +3661,17 @@ source-map-resolve@^0.3.0: source-map-url "~0.3.0" urix "~0.1.0" +source-map-support@^0.4.2: + version "0.4.14" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.14.tgz#9d4463772598b86271b4f523f6c1f4e02a7d6aef" + dependencies: + source-map "^0.5.6" + source-map-url@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.3.0.tgz#7ecaf13b57bcd09da8a40c5d269db33799d4aaf9" -source-map@0.X, source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: +source-map@0.X, source-map@^0.5.0, source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3: version "0.5.6" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" @@ -2327,6 +3681,12 @@ source-map@^0.1.38: dependencies: amdefine ">=0.0.4" +source-map@~0.4.1: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + sparkles@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" @@ -2370,15 +3730,32 @@ stdout-stream@^1.4.0: dependencies: readable-stream "^2.0.1" +stream-browserify@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + stream-consume@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.0.tgz#a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f" +stream-http@^2.3.1: + version "2.7.0" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.7.0.tgz#cec1f4e3b494bc4a81b451808970f8b20b4ed5f6" + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.1" + readable-stream "^2.2.6" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" -string-width@^1.0.1: +string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" dependencies: @@ -2386,7 +3763,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -string_decoder@~0.10.x: +string_decoder@^0.10.25, string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" @@ -2429,11 +3806,15 @@ strip-indent@^1.0.1: dependencies: get-stdin "^4.0.1" +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" + supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" -supports-color@^3.2.3: +supports-color@^3.1.0, supports-color@^3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" dependencies: @@ -2451,7 +3832,28 @@ svgo@^0.7.0: sax "~1.2.1" whet.extend "~0.9.9" -tar@^2.0.0: +tapable@^0.1.8, tapable@~0.1.8: + version "0.1.10" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.1.10.tgz#29c35707c2b70e50d07482b5d202e8ed446dafd4" + +tapable@^0.2.5, tapable@~0.2.5: + version "0.2.6" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.6.tgz#206be8e188860b514425375e6f1ae89bfb01fd8d" + +tar-pack@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984" + dependencies: + debug "^2.2.0" + fstream "^1.0.10" + fstream-ignore "^1.0.5" + once "^1.3.3" + readable-stream "^2.1.4" + rimraf "^2.5.1" + tar "^2.2.1" + uid-number "^0.0.6" + +tar@^2.0.0, tar@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" dependencies: @@ -2459,7 +3861,11 @@ tar@^2.0.0: fstream "^1.0.2" inherits "2" -through2@2.X, through2@^2.0.0, through2@^2.0.3: +text-loader@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/text-loader/-/text-loader-0.0.1.tgz#8bf75d749b7c0579c939920051c69ea572ebddc1" + +through2@2.X, through2@^2.0.0, through2@^2.0.1, through2@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" dependencies: @@ -2473,6 +3879,10 @@ through2@^0.6.1: readable-stream ">=1.0.33-1 <1.1.0-0" xtend ">=4.0.0 <4.1.0-0" +through@^2.3.6, through@^2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + tildify@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a" @@ -2483,6 +3893,20 @@ time-stamp@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.0.1.tgz#9f4bd23559c9365966f3302dbba2b07c6b99b151" +timers-browserify@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.2.tgz#ab4883cf597dcd50af211349a00fbca56ac86b86" + dependencies: + setimmediate "^1.0.4" + +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + +to-fast-properties@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320" + tough-cookie@~2.3.0: version "2.3.2" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" @@ -2493,6 +3917,14 @@ trim-newlines@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +tty-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -2503,7 +3935,7 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" -uglify-js@~2.8.10: +uglify-js@^2.8.5, uglify-js@~2.8.10: version "2.8.22" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.22.tgz#d54934778a8da14903fa29a326fb24c0ab51a1a0" dependencies: @@ -2512,6 +3944,15 @@ uglify-js@~2.8.10: optionalDependencies: uglify-to-browserify "~1.0.0" +uglify-js@~2.7.3: + version "2.7.5" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.5.tgz#4612c0c7baaee2ba7c487de4904ae122079f2ca8" + dependencies: + async "~0.2.6" + source-map "~0.5.1" + uglify-to-browserify "~1.0.0" + yargs "~3.10.0" + uglify-save-license@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/uglify-save-license/-/uglify-save-license-0.4.1.tgz#95726c17cc6fd171c3617e3bf4d8d82aa8c4cce1" @@ -2520,6 +3961,10 @@ uglify-to-browserify@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" +uid-number@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + unc-path-regex@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" @@ -2546,6 +3991,13 @@ urix@^0.1.0, urix@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + dependencies: + punycode "1.3.2" + querystring "0.2.0" + user-home@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" @@ -2554,6 +4006,12 @@ util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" +util@0.10.3, util@^0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + dependencies: + inherits "2.0.1" + uuid@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" @@ -2594,13 +4052,19 @@ vinyl-fs@^0.3.0: through2 "^0.6.1" vinyl "^0.4.0" -vinyl-sourcemaps-apply@^0.2.0, vinyl-sourcemaps-apply@^0.2.1: +vinyl-named@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/vinyl-named/-/vinyl-named-1.1.0.tgz#94e4fe741e38db0ec303e5b3d868b297a2deab66" + dependencies: + through "^2.3.6" + +vinyl-sourcemaps-apply@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705" dependencies: source-map "^0.5.1" -vinyl@1.X: +vinyl@1.X, vinyl@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884" dependencies: @@ -2623,6 +4087,100 @@ vinyl@^0.5.0: clone-stats "^0.0.1" replace-ext "0.0.1" +vm-browserify@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" + dependencies: + indexof "0.0.1" + +watchpack@^0.2.1: + version "0.2.9" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-0.2.9.tgz#62eaa4ab5e5ba35fdfc018275626e3c0f5e3fb0b" + dependencies: + async "^0.9.0" + chokidar "^1.0.0" + graceful-fs "^4.1.2" + +watchpack@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.3.1.tgz#7d8693907b28ce6013e7f3610aa2a1acf07dad87" + dependencies: + async "^2.1.2" + chokidar "^1.4.3" + graceful-fs "^4.1.2" + +webpack-core@~0.6.9: + version "0.6.9" + resolved "https://registry.yarnpkg.com/webpack-core/-/webpack-core-0.6.9.tgz#fc571588c8558da77be9efb6debdc5a3b172bdc2" + dependencies: + source-list-map "~0.1.7" + source-map "~0.4.1" + +webpack-sources@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.2.3.tgz#17c62bfaf13c707f9d02c479e0dcdde8380697fb" + dependencies: + source-list-map "^1.1.1" + source-map "~0.5.3" + +webpack-stream@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/webpack-stream/-/webpack-stream-3.2.0.tgz#3a1d160fb11d41727b7ce6f32f722464f98b2186" + dependencies: + gulp-util "^3.0.7" + lodash.clone "^4.3.2" + lodash.some "^4.2.2" + memory-fs "^0.3.0" + through "^2.3.8" + vinyl "^1.1.0" + webpack "^1.12.9" + +webpack@^1.12.9: + version "1.15.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-1.15.0.tgz#4ff31f53db03339e55164a9d468ee0324968fe98" + dependencies: + acorn "^3.0.0" + async "^1.3.0" + clone "^1.0.2" + enhanced-resolve "~0.9.0" + interpret "^0.6.4" + loader-utils "^0.2.11" + memory-fs "~0.3.0" + mkdirp "~0.5.0" + node-libs-browser "^0.7.0" + optimist "~0.6.0" + supports-color "^3.1.0" + tapable "~0.1.8" + uglify-js "~2.7.3" + watchpack "^0.2.1" + webpack-core "~0.6.9" + +webpack@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-2.4.1.tgz#15a91dbe34966d8a4b99c7d656efd92a2e5a6f6a" + dependencies: + acorn "^5.0.0" + acorn-dynamic-import "^2.0.0" + ajv "^4.7.0" + ajv-keywords "^1.1.1" + async "^2.1.2" + enhanced-resolve "^3.0.0" + interpret "^1.0.0" + json-loader "^0.5.4" + json5 "^0.5.1" + loader-runner "^2.3.0" + loader-utils "^0.2.16" + memory-fs "~0.4.1" + mkdirp "~0.5.0" + node-libs-browser "^2.0.0" + source-map "^0.5.3" + supports-color "^3.1.0" + tapable "~0.2.5" + uglify-js "^2.8.5" + watchpack "^1.3.1" + webpack-sources "^0.2.3" + yargs "^6.0.0" + whet.extend@~0.9.9: version "0.9.9" resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" @@ -2651,7 +4209,7 @@ window-size@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" -wordwrap@0.0.2: +wordwrap@0.0.2, wordwrap@~0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" @@ -2666,7 +4224,7 @@ wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" -"xtend@>=4.0.0 <4.1.0-0", xtend@~4.0.1: +"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" @@ -2685,6 +4243,12 @@ yargs-parser@^2.4.1: camelcase "^3.0.0" lodash.assign "^4.0.6" +yargs-parser@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" + dependencies: + camelcase "^3.0.0" + yargs@^4.7.1: version "4.8.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" @@ -2704,6 +4268,24 @@ yargs@^4.7.1: y18n "^3.2.1" yargs-parser "^2.4.1" +yargs@^6.0.0: + version "6.6.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^4.2.0" + yargs@~3.10.0: version "3.10.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" From ce5a681b2f88385fbd35c9a8f7e5319560de1847 Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Thu, 20 Apr 2017 23:59:28 +1200 Subject: [PATCH 04/28] Fixed a couple of build issues in gulpfile --- gulpfile.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index e6074d0..887706d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -19,7 +19,7 @@ const BUILD_DIR = './dist'; gulp.task('clean', () => del(BUILD_DIR)); gulp.task('configs', () => { - return gulp.src(`${SRC_DIR}/*`).pipe(gulp.dest(BUILD_DIR)); + return gulp.src(`${SRC_DIR}/manifest.json`).pipe(gulp.dest(BUILD_DIR)); }); gulp.task('icons', () => { @@ -41,8 +41,7 @@ gulp.task('scripts:dist', ['scripts'], () => { }); gulp.task('build', ['configs', 'icons', 'scripts']); - -gulp.task('dist', ['scripts:dist']); +gulp.task('build:dist', ['configs', 'icons', 'scripts:dist']); gulp.task('watch', ['build'], () => { return gulp.watch(`${SRC_DIR}/**/*`, ['build']); From 20ccc95d64d911c45710762229929594025657ac Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Fri, 21 Apr 2017 07:55:04 +1200 Subject: [PATCH 05/28] Fix font sizes in Chrome and hyperlink colours in dark theme --- src/manifest.json | 2 +- src/sass/content.scss | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/manifest.json b/src/manifest.json index 83725a8..38bfd90 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,6 +1,6 @@ { "name": "JSON Formatter", - "version": "0.6.1", + "version": "0.7.0", "manifest_version": 2, "description": "Makes JSON easy to read. Open source.", "homepage_url": "https://github.com/nikrolls/json-formatter", diff --git a/src/sass/content.scss b/src/sass/content.scss index ad8c141..6ae799b 100644 --- a/src/sass/content.scss +++ b/src/sass/content.scss @@ -1,5 +1,4 @@ body { - font-size: 16px; user-select: text; overflow-y: scroll !important; margin: 0; @@ -27,7 +26,7 @@ body { background: linear-gradient(#fafafa, #f4f4f4 40%, #e5e5e5); border: 1px solid #aaa; color: #444; - font-size: 0.75rem; + font-size: 12px; margin-bottom: 0; min-width: 4rem; padding: 0.2rem 0; @@ -130,7 +129,7 @@ pre { width: 1.25rem; height: 1.15rem; left: 0.3rem; - font-size: 1.5rem; + font-size: 24px; z-index: 5; opacity: 0.15; cursor: pointer; @@ -167,7 +166,7 @@ pre { /* SYNTAX HIGHLIGHTING */ #formattedJson, #jsonpOpener, #jsonpCloser, pre { - font: 0.8rem/1.15rem monospace; + font: 13px/1.15rem monospace; } .string { @@ -181,11 +180,10 @@ a:link, a:visited { a:hover, a:active { text-decoration: underline; - color: #050; } #formattingMsg { - font: 0.8rem "Lucida Grande", "Segoe UI", "Tahoma"; + font: 13px "Lucida Grande", "Segoe UI", "Tahoma"; padding: 0.6rem 0 0 0.5rem; margin: 0; } From 9dbecbbedced2515dcd5133107b540d254e6500e Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Fri, 21 Apr 2017 17:12:37 +1200 Subject: [PATCH 06/28] Added remainder of themes based on Ace Cloud Editor --- src/js/content.js | 77 ++++++++++++++------ src/js/lib/dom-builder.js | 5 +- src/js/lib/theme.js | 38 +++++++++- src/manifest.json | 3 +- src/sass/content.scss | 45 ++++++++---- src/sass/dawn.scss | 35 --------- src/sass/monokai.scss | 35 --------- src/sass/themes/_base.scss | 17 +++++ src/sass/themes/ambiance.scss | 33 +++++++++ src/sass/themes/chaos.scss | 29 ++++++++ src/sass/themes/chrome.scss | 28 +++++++ src/sass/themes/clouds-midnight.scss | 24 ++++++ src/sass/themes/clouds.scss | 24 ++++++ src/sass/themes/cobalt.scss | 25 +++++++ src/sass/themes/crimson-editor.scss | 28 +++++++ src/sass/themes/dawn.scss | 25 +++++++ src/sass/themes/dreamweaver.scss | 28 +++++++ src/sass/themes/eclipse.scss | 28 +++++++ src/sass/themes/github.scss | 29 ++++++++ src/sass/themes/gob.scss | 25 +++++++ src/sass/themes/gruvbox.scss | 25 +++++++ src/sass/themes/idle-fingers.scss | 21 ++++++ src/sass/themes/iplastic.scss | 27 +++++++ src/sass/themes/katzen-milch.scss | 34 +++++++++ src/sass/themes/kr-theme.scss | 25 +++++++ src/sass/themes/kurior.scss | 29 ++++++++ src/sass/themes/merbivore-soft.scss | 25 +++++++ src/sass/themes/merbivore.scss | 25 +++++++ src/sass/themes/mono-industrial.scss | 30 ++++++++ src/sass/themes/monokai.scss | 24 ++++++ src/sass/themes/pastel-on-dark.scss | 28 +++++++ src/sass/themes/solarized-dark.scss | 29 ++++++++ src/sass/themes/solarized-light.scss | 28 +++++++ src/sass/themes/sql-server.scss | 28 +++++++ src/sass/themes/terminal.scss | 24 ++++++ src/sass/themes/textmate.scss | 28 +++++++ src/sass/themes/tomorrow-night-blue.scss | 24 ++++++ src/sass/themes/tomorrow-night-bright.scss | 24 ++++++ src/sass/themes/tomorrow-night-eighties.scss | 24 ++++++ src/sass/themes/tomorrow-night.scss | 24 ++++++ src/sass/themes/tomorrow.scss | 24 ++++++ src/sass/themes/twilight.scss | 25 +++++++ src/sass/themes/vibrant-ink.scss | 28 +++++++ src/sass/themes/xcode.scss | 24 ++++++ 44 files changed, 1095 insertions(+), 113 deletions(-) delete mode 100644 src/sass/dawn.scss delete mode 100644 src/sass/monokai.scss create mode 100644 src/sass/themes/_base.scss create mode 100644 src/sass/themes/ambiance.scss create mode 100644 src/sass/themes/chaos.scss create mode 100644 src/sass/themes/chrome.scss create mode 100644 src/sass/themes/clouds-midnight.scss create mode 100644 src/sass/themes/clouds.scss create mode 100644 src/sass/themes/cobalt.scss create mode 100644 src/sass/themes/crimson-editor.scss create mode 100644 src/sass/themes/dawn.scss create mode 100644 src/sass/themes/dreamweaver.scss create mode 100644 src/sass/themes/eclipse.scss create mode 100644 src/sass/themes/github.scss create mode 100644 src/sass/themes/gob.scss create mode 100644 src/sass/themes/gruvbox.scss create mode 100644 src/sass/themes/idle-fingers.scss create mode 100644 src/sass/themes/iplastic.scss create mode 100644 src/sass/themes/katzen-milch.scss create mode 100644 src/sass/themes/kr-theme.scss create mode 100644 src/sass/themes/kurior.scss create mode 100644 src/sass/themes/merbivore-soft.scss create mode 100644 src/sass/themes/merbivore.scss create mode 100644 src/sass/themes/mono-industrial.scss create mode 100644 src/sass/themes/monokai.scss create mode 100644 src/sass/themes/pastel-on-dark.scss create mode 100644 src/sass/themes/solarized-dark.scss create mode 100644 src/sass/themes/solarized-light.scss create mode 100644 src/sass/themes/sql-server.scss create mode 100644 src/sass/themes/terminal.scss create mode 100644 src/sass/themes/textmate.scss create mode 100644 src/sass/themes/tomorrow-night-blue.scss create mode 100644 src/sass/themes/tomorrow-night-bright.scss create mode 100644 src/sass/themes/tomorrow-night-eighties.scss create mode 100644 src/sass/themes/tomorrow-night.scss create mode 100644 src/sass/themes/tomorrow.scss create mode 100644 src/sass/themes/twilight.scss create mode 100644 src/sass/themes/vibrant-ink.scss create mode 100644 src/sass/themes/xcode.scss diff --git a/src/js/content.js b/src/js/content.js index a0dde1e..b06a249 100644 --- a/src/js/content.js +++ b/src/js/content.js @@ -17,12 +17,9 @@ port.onMessage.addListener(function(message) { const themeName = themes[message[1]] ? message[1] : themes.default; switchToTheme(themes[themeName]); - if (themeName === 'dawn') { - document.getElementById('buttonLight').classList.add('selected'); - document.getElementById('buttonDark').classList.remove('selected'); - } else if (themeName === 'monokai') { - document.getElementById('buttonLight').classList.remove('selected'); - document.getElementById('buttonDark').classList.add('selected'); + const themeSelectOption = document.getElementById('themeSelect').querySelector(`[value="${themeName}"]`); + if (themeSelectOption) { + themeSelectOption.selected = true; } break; @@ -119,22 +116,60 @@ function configureThemeOptionBar() { themeBar.id = 'themeOptionBar'; themeBar.classList.add('optionBar'); - const buttonLight = document.createElement('button'); - const buttonDark = document.createElement('button'); - buttonLight.id = 'buttonLight'; - buttonLight.innerText = 'Light'; - buttonDark.id = 'buttonDark'; - buttonDark.innerText = 'Dark'; - - buttonLight.addEventListener('click', () => { - port.postMessage({type: 'UPDATE STORED THEME', theme: 'dawn'}); - }); - buttonDark.addEventListener('click', () => { - port.postMessage({type: 'UPDATE STORED THEME', theme: 'monokai'}); + const label = document.createElement('label'); + const select = document.createElement('select'); + label.innerText = 'Theme: '; + select.id = 'themeSelect'; + select.innerHTML = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + `; + + select.addEventListener('change', () => { + port.postMessage({type: 'UPDATE STORED THEME', theme: select.value}); + select.blur(); }); - themeBar.appendChild(buttonLight); - themeBar.appendChild(buttonDark); + label.appendChild(select); + themeBar.appendChild(label); document.body.insertBefore(themeBar, pre); } @@ -222,7 +257,7 @@ function collapse(elements) { // Add CSS that targets it jfStyleEl.insertAdjacentHTML( 'beforeend', - `\n#keyValueOrValue${lastKeyValueOrValueIdGiven}.collapsed:after{color: #aaa; content:" // ${comment}"}` + `\n#keyValueOrValue${lastKeyValueOrValueIdGiven}.collapsed:after{content:" // ${comment}"}` ); } } diff --git a/src/js/lib/dom-builder.js b/src/js/lib/dom-builder.js index 6ad6848..603af7d 100644 --- a/src/js/lib/dom-builder.js +++ b/src/js/lib/dom-builder.js @@ -78,11 +78,8 @@ function getKeyValueOrValueDom(value, keyName) { keyValueOrValue.classList.add('objectProperty'); // Create a span for the key name const keySpan = templates.key(); - keySpan.textContent = JSON.stringify(keyName).slice(1, -1); // remove quotes - // Add it to keyValueOrValue, with quote marks - keyValueOrValue.appendChild(templates.doubleQuoteText()); + keySpan.textContent = JSON.stringify(keyName); keyValueOrValue.appendChild(keySpan); - keyValueOrValue.appendChild(templates.doubleQuoteText()); // Also add ": " (colon and non-breaking space) keyValueOrValue.appendChild(templates.colonAndSpace()); } diff --git a/src/js/lib/theme.js b/src/js/lib/theme.js index b1c9840..512e24b 100644 --- a/src/js/lib/theme.js +++ b/src/js/lib/theme.js @@ -1,6 +1,40 @@ export const themes = { - dawn: require('../../sass/dawn.scss'), - monokai: require('../../sass/monokai.scss'), + ambiance: require('../../sass/themes/ambiance.scss'), + chaos: require('../../sass/themes/chaos.scss'), + clouds: require('../../sass/themes/clouds.scss'), + cloudsMidnight: require('../../sass/themes/clouds-midnight.scss'), + chrome: require('../../sass/themes/chrome.scss'), + cobalt: require('../../sass/themes/cobalt.scss'), + crimsonEditor: require('../../sass/themes/crimson-editor.scss'), + dawn: require('../../sass/themes/dawn.scss'), + dreamweaver: require('../../sass/themes/dreamweaver.scss'), + eclipse: require('../../sass/themes/eclipse.scss'), + github: require('../../sass/themes/github.scss'), + gob: require('../../sass/themes/gob.scss'), + gruvbox: require('../../sass/themes/gruvbox.scss'), + idleFingers: require('../../sass/themes/idle-fingers.scss'), + iplastic: require('../../sass/themes/iplastic.scss'), + katzenMilch: require('../../sass/themes/katzen-milch.scss'), + krTheme: require('../../sass/themes/kr-theme.scss'), + kurior: require('../../sass/themes/kurior.scss'), + merbivore: require('../../sass/themes/merbivore.scss'), + merbivoreSoft: require('../../sass/themes/merbivore-soft.scss'), + monoIndustrial: require('../../sass/themes/mono-industrial.scss'), + monokai: require('../../sass/themes/monokai.scss'), + pastelOnDark: require('../../sass/themes/pastel-on-dark.scss'), + solarizedDark: require('../../sass/themes/solarized-dark.scss'), + solarizedLight: require('../../sass/themes/solarized-light.scss'), + sqlServer: require('../../sass/themes/sql-server.scss'), + terminal: require('../../sass/themes/terminal.scss'), + textmate: require('../../sass/themes/textmate.scss'), + tomorrow: require('../../sass/themes/tomorrow.scss'), + tomorrowNight: require('../../sass/themes/tomorrow-night.scss'), + tomorrowNightBlue: require('../../sass/themes/tomorrow-night-blue.scss'), + tomorrowNightBright: require('../../sass/themes/tomorrow-night-bright.scss'), + tomorrowNightEighties: require('../../sass/themes/tomorrow-night-eighties.scss'), + twilight: require('../../sass/themes/twilight.scss'), + vibrantInk: require('../../sass/themes/vibrant-ink.scss'), + xcode: require('../../sass/themes/xcode.scss'), default: 'dawn' }; diff --git a/src/manifest.json b/src/manifest.json index 38bfd90..360b2ba 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -5,7 +5,8 @@ "description": "Makes JSON easy to read. Open source.", "homepage_url": "https://github.com/nikrolls/json-formatter", "author": "Nik Rolls, Callum Locke", - "minimum_edge_version": "38", + "minimum_edge_version": "40", + "minimum_chrome_version": "21", "icons": { "128": "icons/128.png", "32": "icons/32.png" diff --git a/src/sass/content.scss b/src/sass/content.scss index 6ae799b..39585d3 100644 --- a/src/sass/content.scss +++ b/src/sass/content.scss @@ -10,7 +10,7 @@ body { } #themeOptionBar { - right: 11.5rem; + right: 11.3rem; } .optionBar { @@ -18,8 +18,9 @@ body { display: block; position: absolute; top: 0.7rem; + font: 13px "Lucida Grande", "Segoe UI", "Tahoma"; - button { + button, select { border-radius: 0.1rem; box-shadow: 0 0.05rem 0.2rem rgba(0, 0, 0, 0.1); user-select: none; @@ -33,20 +34,22 @@ body { position: relative; z-index: 10; display: inline-block; - width: 5rem; + height: 1.5rem; text-shadow: 0.05rem 0.05rem rgba(255, 255, 255, 0.3); - &:last-child { - margin-left: 0; - border-top-left-radius: 0; - border-bottom-left-radius: 0; - } - - &:first-child { - margin-right: 0; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-right: none; + &:not(:only-child) { + &:last-child { + margin-left: 0; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + + &:first-child { + margin-right: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-right: none; + } } &:hover { @@ -72,6 +75,18 @@ body { outline: 0; } } + + button { + width: 5rem; + } + + select { + width: 9.1rem; + + &::-ms-expand { + background: none; + } + } } #jsonpOpener, @@ -150,7 +165,7 @@ pre { opacity: 0.5; } - /* .e that are *inside* the children of a collapsed one */ + /* .expanders that are *inside* the children of a collapsed one */ .collapsed .keyValueOrValue & { display: none; } diff --git a/src/sass/dawn.scss b/src/sass/dawn.scss deleted file mode 100644 index 0a44e07..0000000 --- a/src/sass/dawn.scss +++ /dev/null @@ -1,35 +0,0 @@ -$background: #f9f9f9; -$foreground: #080808; - -body { - background-color: $background; - color: $foreground; -} - -#formattedJson, #jsonpOpener, #jsonpCloser { - color: $foreground; -} - -.key { - color: #234a97; -} - -.number { - color: #811f24; -} - -.string { - color: #0b6125; -} - -.bool { - color: #811f24; -} - -.null { - color: #811f24; -} - -.brace { - color: $foreground; -} diff --git a/src/sass/monokai.scss b/src/sass/monokai.scss deleted file mode 100644 index 32e2e18..0000000 --- a/src/sass/monokai.scss +++ /dev/null @@ -1,35 +0,0 @@ -$background: #272822; -$foreground: #f8f8f2; - -body { - background-color: $background; - color: $foreground; -} - -#formattedJson, #jsonpOpener, #jsonpCloser { - color: $foreground; -} - -.key { - color: #a6e22e; -} - -.number { - color: #ae81ff; -} - -.string { - color: #e6db74; -} - -.bool { - color: #ae81ff; -} - -.null { - color: #ae81ff; -} - -.brace { - color: $foreground; -} diff --git a/src/sass/themes/_base.scss b/src/sass/themes/_base.scss new file mode 100644 index 0000000..3bd5463 --- /dev/null +++ b/src/sass/themes/_base.scss @@ -0,0 +1,17 @@ +body {} + +::selection {} + +.key {} + +.number {} + +.string {} + +.bool {} + +.null {} + +.brace {} + +.collapsed:after {} diff --git a/src/sass/themes/ambiance.scss b/src/sass/themes/ambiance.scss new file mode 100644 index 0000000..9312742 --- /dev/null +++ b/src/sass/themes/ambiance.scss @@ -0,0 +1,33 @@ +body { + background-color: #202020; + color: #e6e1dc; +} + +::selection { + background-color: transparentize(#ddf0ff, 0.80); +} + +.key { + color: #9999cc; +} + +.number { + color: #78Cf8a; +} + +.string { + color: #8f9d6a; +} + +.bool, .null { + color: #cf7Ea9; +} + +.brace { + color: #24c2c7; +} + +.collapsed:after { + font-style: italic; + color: #555; +} diff --git a/src/sass/themes/chaos.scss b/src/sass/themes/chaos.scss new file mode 100644 index 0000000..1884ae9 --- /dev/null +++ b/src/sass/themes/chaos.scss @@ -0,0 +1,29 @@ +body { + background-color: #161616; + color: #e6e1dc; +} + +::selection { + background-color: #494836; +} + +.key { + color: #997744; +} + +.number { + color: #58c554; +} + +.string { + color: #58c554; +} + +.bool, .null { + color: #fdc251; +} + +.collapsed:after { + font-style: italic; + color: #555; +} diff --git a/src/sass/themes/chrome.scss b/src/sass/themes/chrome.scss new file mode 100644 index 0000000..0761874 --- /dev/null +++ b/src/sass/themes/chrome.scss @@ -0,0 +1,28 @@ +body { + background-color: white; + color: black; +} + +::selection { + background-color: #b5d5ff; +} + +.key { + color: #318495; +} + +.number { + color: #0000cd; +} + +.string { + color: #1a1aa6; +} + +.bool, .null { + color: #6d79de; +} + +.collapsed:after { + color: #236e24; +} diff --git a/src/sass/themes/clouds-midnight.scss b/src/sass/themes/clouds-midnight.scss new file mode 100644 index 0000000..6612f21 --- /dev/null +++ b/src/sass/themes/clouds-midnight.scss @@ -0,0 +1,24 @@ +body { + background-color: #191919; + color: #929292; +} + +::selection { + background-color: black; +} + +.number { + color: #46a609; +} + +.string { + color: #5d90cd; +} + +.bool, .null { + color: #39946a; +} + +.collapsed:after { + color: #3c403b; +} diff --git a/src/sass/themes/clouds.scss b/src/sass/themes/clouds.scss new file mode 100644 index 0000000..a18d32a --- /dev/null +++ b/src/sass/themes/clouds.scss @@ -0,0 +1,24 @@ +body { + background-color: white; + color: black; +} + +::selection { + background-color: #bdd5fc; +} + +.number { + color: #46a609; +} + +.string { + color: #5d90cd; +} + +.bool, .null { + color: #39946a; +} + +.collapsed:after { + color: #bcc8ba; +} diff --git a/src/sass/themes/cobalt.scss b/src/sass/themes/cobalt.scss new file mode 100644 index 0000000..8db7ffb --- /dev/null +++ b/src/sass/themes/cobalt.scss @@ -0,0 +1,25 @@ +body { + background-color: #002240; + color: white; +} + +::selection { + background-color: transparentize(#b36539, 0.25); +} + +.key { + color: #ccc; +} + +.number, .bool, .null { + color: #ff628c; +} + +.string { + color: #3ad900; +} + +.collapsed:after { + font-style: italic; + color: #0088ff; +} diff --git a/src/sass/themes/crimson-editor.scss b/src/sass/themes/crimson-editor.scss new file mode 100644 index 0000000..e3ebcc6 --- /dev/null +++ b/src/sass/themes/crimson-editor.scss @@ -0,0 +1,28 @@ +body { + background-color: white; + color: #404040; +} + +::selection { + background-color: #b5d5ff; +} + +.key { + color: #004080; +} + +.number { + color: #000040; +} + +.string { + color: #800080; +} + +.bool, .null { + color: #ff9c00; +} + +.collapsed:after { + color: #4c886b; +} diff --git a/src/sass/themes/dawn.scss b/src/sass/themes/dawn.scss new file mode 100644 index 0000000..9de1d85 --- /dev/null +++ b/src/sass/themes/dawn.scss @@ -0,0 +1,25 @@ +body { + background-color: #f9f9f9; + color: #080808; +} + +::selection { + background-color: transparentize(#275fff, 0.70); +} + +.key { + color: #234a97; +} + +.number, .bool, .null { + color: #811f24; +} + +.string { + color: #0b6125; +} + +.collapsed:after { + font-style: italic; + color: #5a525f +} diff --git a/src/sass/themes/dreamweaver.scss b/src/sass/themes/dreamweaver.scss new file mode 100644 index 0000000..a0ce9db --- /dev/null +++ b/src/sass/themes/dreamweaver.scss @@ -0,0 +1,28 @@ +body { + background-color: #fff; + color: black; +} + +::selection { + background-color: #b5d5ff; +} + +.key { + color: #06f; +} + +.number { + color: #0000cd; +} + +.string { + color: #00f; +} + +.bool, .null { + color: #585cf6; +} + +.collapsed:after { + color: #4c886b; +} diff --git a/src/sass/themes/eclipse.scss b/src/sass/themes/eclipse.scss new file mode 100644 index 0000000..cca1803 --- /dev/null +++ b/src/sass/themes/eclipse.scss @@ -0,0 +1,28 @@ +body { + background-color: #fff; + color: black; +} + +::selection { + background-color: #b5d5ff; +} + +.key { + color: #7f0055; +} + +.number { + color: darkblue; +} + +.string { + color: #2a00ff; +} + +.bool, .null { + color: #5848f6; +} + +.collapsed:after { + color: #719682; +} diff --git a/src/sass/themes/github.scss b/src/sass/themes/github.scss new file mode 100644 index 0000000..946dba4 --- /dev/null +++ b/src/sass/themes/github.scss @@ -0,0 +1,29 @@ +body { + background-color: white; + color: black; +} + +::selection { + background-color: #b5d5ff; +} + +.number { + color: #099; +} + +.string { + color: #d14; +} + +.bool, .null { + font-weight: bold; +} + +.brace { + font-weight: bold; +} + +.collapsed:after { + color: #998; + font-style: italic; +} diff --git a/src/sass/themes/gob.scss b/src/sass/themes/gob.scss new file mode 100644 index 0000000..badb4ce --- /dev/null +++ b/src/sass/themes/gob.scss @@ -0,0 +1,25 @@ +body { + background-color: #0b0b0b; + color: #0f0 +} + +::selection { + background-color: transparentize(#ddf0ff, 0.80); +} + +.key { + color: #00f868; +} + +.string { + color: #10f060 +} + +.bool, .null { + color: #10f0a0 +} + +.collapsed:after { + font-style: italic; + color: #00e060; +} diff --git a/src/sass/themes/gruvbox.scss b/src/sass/themes/gruvbox.scss new file mode 100644 index 0000000..d36a868 --- /dev/null +++ b/src/sass/themes/gruvbox.scss @@ -0,0 +1,25 @@ +body { + background-color: #1d2021; + color: #ebdab4; +} + +::selection { + background-color: transparentize(#b36539, 0.25); +} + +.key { + color: #84a598; +} + +.number, .bool, .null { + color: #c2859a; +} + +.string { + color: #b8ba37; +} + +.collapsed:after { + font-style: italic; + color: #928375; +} diff --git a/src/sass/themes/idle-fingers.scss b/src/sass/themes/idle-fingers.scss new file mode 100644 index 0000000..fca6f16 --- /dev/null +++ b/src/sass/themes/idle-fingers.scss @@ -0,0 +1,21 @@ +body { + background-color: #323232; + color: #fff +} + +::selection { + background-color: transparentize(#5a647e, 0.12); +} + +.number, .bool, .null { + color: #6c99bb; +} + +.string { + color: #a5c261; +} + +.collapsed:after { + font-style: italic; + color: #bc9458; +} diff --git a/src/sass/themes/iplastic.scss b/src/sass/themes/iplastic.scss new file mode 100644 index 0000000..9648eba --- /dev/null +++ b/src/sass/themes/iplastic.scss @@ -0,0 +1,27 @@ +body { + background-color: #eee; + color: #333; +} + +::selection { + background-color: #bad6fd; +} + +.key { + color: #36c; + font-style: italic; +} + +.number, .bool, .null { + color: #06f; + font-weight: 700; +} + +.string { + color: #a55f03; +} + +.collapsed:after { + color: #777; + font-style: italic; +} diff --git a/src/sass/themes/katzen-milch.scss b/src/sass/themes/katzen-milch.scss new file mode 100644 index 0000000..8c84f30 --- /dev/null +++ b/src/sass/themes/katzen-milch.scss @@ -0,0 +1,34 @@ +body { + background-color: #f3f2f3; + color: #0f0009 +} + +::selection { + background-color: transparentize(#6405d0, 0.73); +} + +.key { + color: transparentize(#025f49, 0.3); + background-color: transparentize(#22ff49, 0.88); +} + +.number { + color: transparentize(#4f827b, 0.7); + background-color: transparentize(#77c2bb, 0.9411); +} + +.string { + color: #5a5f9b; + background-color: transparentize(#aaafdb, 0.965); +} + +.bool, .null { + color: #7d7e52; + background-color: transparentize(#bdbe82, 0.941); +} + +.collapsed:after { + font-style: italic; + color: rgba(64, 79, 80, 0.67); + background-color: transparentize(#5f0fff, 0.9922) +} diff --git a/src/sass/themes/kr-theme.scss b/src/sass/themes/kr-theme.scss new file mode 100644 index 0000000..b891b4f --- /dev/null +++ b/src/sass/themes/kr-theme.scss @@ -0,0 +1,25 @@ +body { + background-color: #0b0a09; + color: #fcffe0; +} + +::selection { + background-color: transparentize(#a0f, 0.55); +} + +.key { + color: #d1a796; +} + +.number, .bool, .null { + color: transparentize(#d27518, 0.24); +} + +.string { + color: transparentize(#a4a1b5, 0.2); +} + +.collapsed:after { + font-style: italic; + color: #706d5b; +} diff --git a/src/sass/themes/kurior.scss b/src/sass/themes/kurior.scss new file mode 100644 index 0000000..d7c04d8 --- /dev/null +++ b/src/sass/themes/kurior.scss @@ -0,0 +1,29 @@ +body { + background-color: #e8e9e8; + color: #363636; +} + +::selection { + background-color: transparentize(#f5aa00, 0.43); +} + +.key { + color: #009acd; +} + +.number { + color: #9a5925; +} + +.string { + color: #639300; +} + +.bool, .null { + color: #cd6839; +} + +.collapsed:after { + color: transparentize(#949494, 0.09); + background-color: transparentize(#dcdcdc, 0.44); +} diff --git a/src/sass/themes/merbivore-soft.scss b/src/sass/themes/merbivore-soft.scss new file mode 100644 index 0000000..bdbc69b --- /dev/null +++ b/src/sass/themes/merbivore-soft.scss @@ -0,0 +1,25 @@ +body { + background-color: #1c1c1c; + color: #e6e1dc; +} + +::selection { + background-color: #494949; +} + +.number { + color: #7fc578; +} + +.string { + color: #8ec65f; +} + +.bool, .null { + color: #e1c582; +} + +.collapsed:after { + font-style: italic; + color: #ac4bb8; +} diff --git a/src/sass/themes/merbivore.scss b/src/sass/themes/merbivore.scss new file mode 100644 index 0000000..9ea6063 --- /dev/null +++ b/src/sass/themes/merbivore.scss @@ -0,0 +1,25 @@ +body { + background-color: #161616; + color: #e6e1dc; +} + +::selection { + background-color: #454545; +} + +.number { + color: #58c554; +} + +.string { + color: #8dff0a; +} + +.bool, .null { + color: #fdc251; +} + +.collapsed:after { + font-style: italic; + color: #ad2ea4; +} diff --git a/src/sass/themes/mono-industrial.scss b/src/sass/themes/mono-industrial.scss new file mode 100644 index 0000000..55ce90f --- /dev/null +++ b/src/sass/themes/mono-industrial.scss @@ -0,0 +1,30 @@ +body { + background-color: #222c28; + color: #fff; +} + +::selection { + background-color: transparentize(#919994, 0.6); +} + +.key { + color: #a8b3ab; +} + +.number { + color: #e98800; +} + +.string { + background-color: #151c19; + color: #fff; +} + +.bool, .null { + color: #648bd2; +} + +.collapsed:after { + color: #666c68; + background-color: #151c19; +} diff --git a/src/sass/themes/monokai.scss b/src/sass/themes/monokai.scss new file mode 100644 index 0000000..e375705 --- /dev/null +++ b/src/sass/themes/monokai.scss @@ -0,0 +1,24 @@ +body { + background-color: #272822; + color: #f8f8f2; +} + +::selection { + background-color: #49483e; +} + +.key { + color: #a6e22e; +} + +.number, .bool, .null { + color: #ae81ff; +} + +.string { + color: #e6db74; +} + +.collapsed:after { + color: #75715e; +} diff --git a/src/sass/themes/pastel-on-dark.scss b/src/sass/themes/pastel-on-dark.scss new file mode 100644 index 0000000..55d4009 --- /dev/null +++ b/src/sass/themes/pastel-on-dark.scss @@ -0,0 +1,28 @@ +body { + background-color: #2c2828; + color: #8f938f; +} + +::selection { + background-color: transparentize(#ddf0ff, 0.80); +} + +.key { + color: #bebf55; +} + +.number { + color: #ccc; +} + +.string { + color: #66a968; +} + +.bool, .null { + color: #de8e30; +} + +.collapsed:after { + color: #a6c6ff; +} diff --git a/src/sass/themes/solarized-dark.scss b/src/sass/themes/solarized-dark.scss new file mode 100644 index 0000000..9a0a0dc --- /dev/null +++ b/src/sass/themes/solarized-dark.scss @@ -0,0 +1,29 @@ +body { + background-color: #002b36; + color: #93a1a1; +} + +::selection { + background-color: transparentize(white, 0.9); +} + +.key { + color: #268bd2; +} + +.number { + color: #d33682; +} + +.string { + color: #2aa198; +} + +.bool, .null { + color: #b58900; +} + +.collapsed:after { + font-style: italic; + color: #657b83; +} diff --git a/src/sass/themes/solarized-light.scss b/src/sass/themes/solarized-light.scss new file mode 100644 index 0000000..07b225d --- /dev/null +++ b/src/sass/themes/solarized-light.scss @@ -0,0 +1,28 @@ +body { + background-color: #fdf6e3; + color: #586e75; +} + +::selection { + background-color: transparentize(#073643, 0.91); +} + +.key { + color: #268bd2; +} + +.number { + color: #d33682; +} + +.string { + color: #2aa198; +} + +.bool, .null { + color: #b58900 +} + +.collapsed:after { + color: #93a1a1; +} diff --git a/src/sass/themes/sql-server.scss b/src/sass/themes/sql-server.scss new file mode 100644 index 0000000..373595e --- /dev/null +++ b/src/sass/themes/sql-server.scss @@ -0,0 +1,28 @@ +body { + background-color: #fff; + color: black; +} + +::selection { + background-color: #b5d5ff; +} + +.key { + color: #318495; +} + +.string { + color: #f00; +} + +.bool, .null { + color: #979797; +} + +.brace { + color: #808080; +} + +.collapsed:after { + color: #008000; +} diff --git a/src/sass/themes/terminal.scss b/src/sass/themes/terminal.scss new file mode 100644 index 0000000..e9e2e39 --- /dev/null +++ b/src/sass/themes/terminal.scss @@ -0,0 +1,24 @@ +body { + background-color: black; + color: #dedede; +} + +::selection { + background-color: #424242; +} + +.key { + color: #d54e53; +} + +.number, .bool, .null { + color: #e78c45; +} + +.string { + color: #b9ca4a; +} + +.collapsed:after { + color: orangered; +} diff --git a/src/sass/themes/textmate.scss b/src/sass/themes/textmate.scss new file mode 100644 index 0000000..57c504a --- /dev/null +++ b/src/sass/themes/textmate.scss @@ -0,0 +1,28 @@ +body { + background-color: #fff; + color: black; +} + +::selection { + background-color: #b5d5ff; +} + +.key { + color: #318495; +} + +.number { + color: #0000cd; +} + +.string { + color: #036a07; +} + +.bool, .null { + color: #585cf6; +} + +.collapsed:after { + color: #4c886b; +} diff --git a/src/sass/themes/tomorrow-night-blue.scss b/src/sass/themes/tomorrow-night-blue.scss new file mode 100644 index 0000000..12f03ba --- /dev/null +++ b/src/sass/themes/tomorrow-night-blue.scss @@ -0,0 +1,24 @@ +body { + background-color: #002451; + color: #fff; +} + +::selection { + background-color: #003f8e; +} + +.key { + color: #ff9da4; +} + +.number, .bool, .null { + color: #ffc58f; +} + +.string { + color: #d1f1a9; +} + +.collapsed:after { + color: #7285b7; +} diff --git a/src/sass/themes/tomorrow-night-bright.scss b/src/sass/themes/tomorrow-night-bright.scss new file mode 100644 index 0000000..dc9fbcb --- /dev/null +++ b/src/sass/themes/tomorrow-night-bright.scss @@ -0,0 +1,24 @@ +body { + background-color: #000; + color: #dedede; +} + +::selection { + background-color: #424242; +} + +.key { + color: #d54e53; +} + +.number, .bool, .null { + color: #e78c45; +} + +.string { + color: #b9ca4a; +} + +.collapsed:after { + color: #969896; +} diff --git a/src/sass/themes/tomorrow-night-eighties.scss b/src/sass/themes/tomorrow-night-eighties.scss new file mode 100644 index 0000000..8a91eb3 --- /dev/null +++ b/src/sass/themes/tomorrow-night-eighties.scss @@ -0,0 +1,24 @@ +body { + background-color: #2d2d2d; + color: #ccc; +} + +::selection { + background-color: #515151; +} + +.key { + color: #f2777a; +} + +.number, .bool, .null { + color: #f99157; +} + +.string { + color: #9c9; +} + +.collapsed:after { + color: #999; +} diff --git a/src/sass/themes/tomorrow-night.scss b/src/sass/themes/tomorrow-night.scss new file mode 100644 index 0000000..97eafcb --- /dev/null +++ b/src/sass/themes/tomorrow-night.scss @@ -0,0 +1,24 @@ +body { + background-color: #1d1f21; + color: #c5c8c6; +} + +::selection { + background-color: #373b41; +} + +.key { + color: #c66; +} + +.number, .bool, .null { + color: #de935f; +} + +.string { + color: #b5bd68; +} + +.collapsed:after { + color: #969896; +} diff --git a/src/sass/themes/tomorrow.scss b/src/sass/themes/tomorrow.scss new file mode 100644 index 0000000..6006e60 --- /dev/null +++ b/src/sass/themes/tomorrow.scss @@ -0,0 +1,24 @@ +body { + background-color: #fff; + color: #4d4d4c; +} + +::selection { + background-color: #d6d6d6; +} + +.key { + color: #c82829; +} + +.number, .bool, .null { + color: #f5871f; +} + +.string { + color: #718c00; +} + +.collapsed:after { + color: #8e908c; +} diff --git a/src/sass/themes/twilight.scss b/src/sass/themes/twilight.scss new file mode 100644 index 0000000..ea8fcc6 --- /dev/null +++ b/src/sass/themes/twilight.scss @@ -0,0 +1,25 @@ +body { + background-color: #141414; + color: #f8f8f8; +} + +::selection { + background-color: transparentize(#ddf0ff, 0.8); +} + +.key { + color: #7587a6; +} + +.number, .bool, .null { + color: #cf6a4c; +} + +.string { + color: #8f9d6a; +} + +.collapsed:after { + font-style: italic; + color: #5f5a60; +} diff --git a/src/sass/themes/vibrant-ink.scss b/src/sass/themes/vibrant-ink.scss new file mode 100644 index 0000000..2e9ab6e --- /dev/null +++ b/src/sass/themes/vibrant-ink.scss @@ -0,0 +1,28 @@ +body { + background-color: #0f0f0f; + color: #fff; +} + +::selection { + background-color: #69c; +} + +.key { + color: #fc0; +} + +.number { + color: #9c9; +} + +.string { + color: #6f0; +} + +.bool, .null { + color: #399; +} + +.collapsed:after { + color: #93c; +} diff --git a/src/sass/themes/xcode.scss b/src/sass/themes/xcode.scss new file mode 100644 index 0000000..2ecd584 --- /dev/null +++ b/src/sass/themes/xcode.scss @@ -0,0 +1,24 @@ +body { + background-color: #fff; + color: #000; +} + +::selection { + background: #b5d5ff; +} + +.number { + color: #3a00dc; +} + +.string { + color: #df0002; +} + +.bool, .null { + color: #c800a4; +} + +.collapsed:after { + color: #008e00; +} From f9dbce00c476aa5751bd1dcd486c8c5f61ea5a3f Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Fri, 21 Apr 2017 17:17:26 +1200 Subject: [PATCH 07/28] 0.8.0 release --- src/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/manifest.json b/src/manifest.json index 360b2ba..fec0c62 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,6 +1,6 @@ { "name": "JSON Formatter", - "version": "0.7.0", + "version": "0.8.0", "manifest_version": 2, "description": "Makes JSON easy to read. Open source.", "homepage_url": "https://github.com/nikrolls/json-formatter", From cf6fb2e7768367487e2c6448a2334259dafde4eb Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Fri, 21 Apr 2017 19:14:31 +1200 Subject: [PATCH 08/28] Improved colour transitions --- src/sass/transition.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sass/transition.scss b/src/sass/transition.scss index e5d7482..18f62c9 100644 --- a/src/sass/transition.scss +++ b/src/sass/transition.scss @@ -1,4 +1,4 @@ -body { +* { transition-property: color, background-color; transition-duration: 500ms; transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); From 95188a71b00299f67ee7eb82e9944f16b912e8ab Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Fri, 21 Apr 2017 19:35:43 +1200 Subject: [PATCH 09/28] Tooling around building releases --- .gitignore | 3 ++- gulpfile.js | 12 +++++++++++- package.json | 1 + src/manifest.json | 2 +- yarn.lock | 23 +++++++++++++++++++++++ 5 files changed, 38 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 9b844cf..12fd330 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /.idea/ -/dist/ +/build/ +/release/ /node_modules/ diff --git a/gulpfile.js b/gulpfile.js index 887706d..1bca19a 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -10,11 +10,13 @@ const uglify = require('gulp-uglify'); const vinylNamed = require('vinyl-named'); const webpack = require('webpack'); const webpackStream = require('webpack-stream'); +const zip = require('gulp-zip'); const webpackConfig = require('./webpack.config'); const SRC_DIR = './src'; -const BUILD_DIR = './dist'; +const BUILD_DIR = './build'; +const RELEASE_DIR = './release'; gulp.task('clean', () => del(BUILD_DIR)); @@ -43,6 +45,14 @@ gulp.task('scripts:dist', ['scripts'], () => { gulp.task('build', ['configs', 'icons', 'scripts']); gulp.task('build:dist', ['configs', 'icons', 'scripts:dist']); +gulp.task('release', ['build:dist'], () => { + const manifest = require(`${BUILD_DIR}/manifest.json`); + + return gulp.src(`${BUILD_DIR}/**/*`) + .pipe(zip(`json-formatter-${manifest.version}.zip`)) + .pipe(gulp.dest(RELEASE_DIR)); +}); + gulp.task('watch', ['build'], () => { return gulp.watch(`${SRC_DIR}/**/*`, ['build']); }); diff --git a/package.json b/package.json index 9f2be00..47b5b86 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "gulp-header-license": "^1.0.9", "gulp-sourcemaps": "^2.6.0", "gulp-uglify": "^2.1.2", + "gulp-zip": "^4.0.0", "node-sass": "^4.5.2", "sass-loader": "^6.0.3", "text-loader": "^0.0.1", diff --git a/src/manifest.json b/src/manifest.json index fec0c62..2ca9897 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,6 +1,6 @@ { "name": "JSON Formatter", - "version": "0.8.0", + "version": "0.8.1", "manifest_version": 2, "description": "Makes JSON easy to read. Open source.", "homepage_url": "https://github.com/nikrolls/json-formatter", diff --git a/yarn.lock b/yarn.lock index 823cf54..01c51d8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -810,6 +810,10 @@ browserslist@^1.3.6, browserslist@^1.4.0, browserslist@^1.5.2, browserslist@^1.7 caniuse-db "^1.0.30000639" electron-to-chromium "^1.2.7" +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + buffer-shims@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" @@ -1599,6 +1603,10 @@ get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + getpass@^0.1.1: version "0.1.6" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" @@ -1806,6 +1814,15 @@ gulp-util@^3.0.0, gulp-util@^3.0.7: through2 "^2.0.0" vinyl "^0.5.0" +gulp-zip@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/gulp-zip/-/gulp-zip-4.0.0.tgz#1cefc08b4bf36df4b5b1e7c6b36ee55ebbe4a881" + dependencies: + get-stream "^3.0.0" + gulp-util "^3.0.0" + through2 "^2.0.1" + yazl "^2.1.0" + gulp@^3.9.1: version "3.9.1" resolved "https://registry.yarnpkg.com/gulp/-/gulp-3.9.1.tgz#571ce45928dd40af6514fc4011866016c13845b4" @@ -4294,3 +4311,9 @@ yargs@~3.10.0: cliui "^2.1.0" decamelize "^1.0.0" window-size "0.1.0" + +yazl@^2.1.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.4.2.tgz#14cb19083e1e25a70092c1588aabe0f4e4dd4d88" + dependencies: + buffer-crc32 "~0.2.3" From 6a1bc8c05be15f49a8e5232742ea2f75df2dab22 Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Sat, 22 Apr 2017 15:54:38 +1200 Subject: [PATCH 10/28] Workaround for Chrome queuing transitions bug Also reworked some more code around theme switching and messaging. --- src/js/background.js | 170 +++++++++-------- src/js/content.js | 87 +-------- src/js/lib/messaging.js | 16 ++ src/js/lib/theme-switcher.js | 103 +++++++++++ src/js/lib/theme.js | 56 ------ src/js/lib/themes.js | 183 +++++++++++++++++++ src/manifest.json | 2 +- src/sass/themes/chaos.scss | 8 +- src/sass/themes/chrome.scss | 8 +- src/sass/themes/clouds-midnight.scss | 12 +- src/sass/themes/clouds.scss | 12 +- src/sass/themes/cobalt.scss | 8 +- src/sass/themes/crimson-editor.scss | 8 +- src/sass/themes/dawn.scss | 8 +- src/sass/themes/dreamweaver.scss | 8 +- src/sass/themes/eclipse.scss | 8 +- src/sass/themes/github.scss | 6 +- src/sass/themes/gob.scss | 12 +- src/sass/themes/gruvbox.scss | 8 +- src/sass/themes/idle-fingers.scss | 12 +- src/sass/themes/iplastic.scss | 8 +- src/sass/themes/katzen-milch.scss | 8 +- src/sass/themes/kr-theme.scss | 8 +- src/sass/themes/kurior.scss | 8 +- src/sass/themes/merbivore-soft.scss | 12 +- src/sass/themes/merbivore.scss | 12 +- src/sass/themes/mono-industrial.scss | 8 +- src/sass/themes/monokai.scss | 8 +- src/sass/themes/pastel-on-dark.scss | 8 +- src/sass/themes/solarized-dark.scss | 8 +- src/sass/themes/solarized-light.scss | 8 +- src/sass/themes/terminal.scss | 8 +- src/sass/themes/textmate.scss | 8 +- src/sass/themes/tomorrow-night-blue.scss | 8 +- src/sass/themes/tomorrow-night-bright.scss | 8 +- src/sass/themes/tomorrow-night-eighties.scss | 8 +- src/sass/themes/tomorrow-night.scss | 8 +- src/sass/themes/tomorrow.scss | 8 +- src/sass/themes/twilight.scss | 8 +- src/sass/themes/vibrant-ink.scss | 8 +- src/sass/themes/xcode.scss | 10 +- src/sass/transition.scss | 41 ++++- 42 files changed, 691 insertions(+), 263 deletions(-) create mode 100644 src/js/lib/messaging.js create mode 100644 src/js/lib/theme-switcher.js delete mode 100644 src/js/lib/theme.js create mode 100644 src/js/lib/themes.js diff --git a/src/js/background.js b/src/js/background.js index 4762420..dec4d85 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -1,6 +1,7 @@ 'use strict'; import browser from './lib/browser'; +import { listen } from './lib/messaging'; import { removeComments, firstJSONCharIndex } from './lib/utilities'; import { jsonObjectToHTML } from './lib/dom-builder'; @@ -8,102 +9,99 @@ import { jsonObjectToHTML } from './lib/dom-builder'; browser.storage.local.set({appVersion: browser.runtime.getManifest().version}); // Listen for requests from content pages wanting to set up a port -browser.runtime.onConnect.addListener(function(port) { - if (port.name !== 'jf') { - console.log('JSON Formatter error - unknown port name ' + port.name, port); - return; - } +listen((port, msg) => { + let jsonpFunctionName = null; + let validJsonText; + + if (msg.type === 'SENDING TEXT') { + // Try to parse as JSON + let obj; + let text = msg.text; + + // Strip any leading garbage, such as a 'while(1);' + const strippedText = text.substring(firstJSONCharIndex(text)); + + try { + obj = JSON.parse(strippedText); + validJsonText = strippedText; + } catch (e) { + // Not JSON; could be JSONP though. + // Try stripping 'padding' (if any), and try parsing it again + text = text.trim(); + // Find where the first paren is (and exit if none) + const indexOfParen = text.indexOf('('); + if (!indexOfParen) { + port.postMessage(['NOT JSON', 'no opening parenthesis']); + port.disconnect(); + return; + } - port.onMessage.addListener(function(msg) { - let jsonpFunctionName = null; - let validJsonText; + // Get the substring up to the first "(", with any comments/whitespace stripped out + const firstBit = removeComments(text.substring(0, indexOfParen)).trim(); + if (!firstBit.match(/^[a-zA-Z_$][\.\[\]'"0-9a-zA-Z_$]*$/)) { + // The 'firstBit' is NOT a valid function identifier. + port.postMessage(['NOT JSON', 'first bit not a valid function name']); + port.disconnect(); + return; + } - if (msg.type === 'SENDING TEXT') { - // Try to parse as JSON - let obj; - let text = msg.text; + // Find last parenthesis (exit if none) + const indexOfLastParen = text.lastIndexOf(')'); + if (!indexOfLastParen) { + port.postMessage(['NOT JSON', 'no closing paren']); + port.disconnect(); + return; + } - // Strip any leading garbage, such as a 'while(1);' - const strippedText = text.substring(firstJSONCharIndex(text)); + // Check that what's after the last parenthesis is just whitespace, comments, and possibly a semicolon (exit if anything else) + const lastBit = removeComments(text.substring(indexOfLastParen + 1)).trim(); + if (lastBit !== "" && lastBit !== ';') { + port.postMessage(['NOT JSON', 'last closing paren followed by invalid characters']); + port.disconnect(); + return; + } + // So, it looks like a valid JS function call, but we don't know whether it's JSON inside the parentheses... + // Check if the 'argument' is actually JSON (and record the parsed result) + text = text.substring(indexOfParen + 1, indexOfLastParen); try { - obj = JSON.parse(strippedText); - validJsonText = strippedText; - } catch (e) { - // Not JSON; could be JSONP though. - // Try stripping 'padding' (if any), and try parsing it again - text = text.trim(); - // Find where the first paren is (and exit if none) - const indexOfParen = text.indexOf('('); - if (!indexOfParen) { - port.postMessage(['NOT JSON', 'no opening parenthesis']); - port.disconnect(); - return; - } - - // Get the substring up to the first "(", with any comments/whitespace stripped out - const firstBit = removeComments(text.substring(0, indexOfParen)).trim(); - if (!firstBit.match(/^[a-zA-Z_$][\.\[\]'"0-9a-zA-Z_$]*$/)) { - // The 'firstBit' is NOT a valid function identifier. - port.postMessage(['NOT JSON', 'first bit not a valid function name']); - port.disconnect(); - return; - } - - // Find last parenthesis (exit if none) - const indexOfLastParen = text.lastIndexOf(')'); - if (!indexOfLastParen) { - port.postMessage(['NOT JSON', 'no closing paren']); - port.disconnect(); - return; - } - - // Check that what's after the last parenthesis is just whitespace, comments, and possibly a semicolon (exit if anything else) - const lastBit = removeComments(text.substring(indexOfLastParen + 1)).trim(); - if (lastBit !== "" && lastBit !== ';') { - port.postMessage(['NOT JSON', 'last closing paren followed by invalid characters']); - port.disconnect(); - return; - } - - // So, it looks like a valid JS function call, but we don't know whether it's JSON inside the parentheses... - // Check if the 'argument' is actually JSON (and record the parsed result) - text = text.substring(indexOfParen + 1, indexOfLastParen); - try { - obj = JSON.parse(text); - validJsonText = text; - } - catch (e2) { - // Just some other text that happens to be in a function call. - // Respond as not JSON, and exit - port.postMessage(['NOT JSON', 'looks like a function call, but the parameter is not valid JSON']); - return; - } - - jsonpFunctionName = firstBit; + obj = JSON.parse(text); + validJsonText = text; } - - // If still running, we now have obj, which is valid JSON. - - // Ensure it's not a number or string (technically valid JSON, but no point prettifying it) - if (typeof obj !== 'object' && typeof obj !== 'array') { - port.postMessage(['NOT JSON', 'technically JSON but not an object or array']); - port.disconnect(); + catch (e2) { + // Just some other text that happens to be in a function call. + // Respond as not JSON, and exit + port.postMessage(['NOT JSON', 'looks like a function call, but the parameter is not valid JSON']); return; } - // And send it the message to confirm that we're now formatting (so it can show a spinner) - port.postMessage(['FORMATTING']); + jsonpFunctionName = firstBit; + } - // Do formatting - const html = jsonObjectToHTML(obj, jsonpFunctionName); + // If still running, we now have obj, which is valid JSON. - // Post the HTML string to the content script - port.postMessage(['FORMATTED', html, validJsonText]); - } else if (msg.type === 'GET STORED THEME') { - browser.storage.sync.get('theme', (data) => port.postMessage(['SWITCH THEME', data && data.theme])); - } else if (msg.type === 'UPDATE STORED THEME') { - browser.storage.sync.set({theme: msg.theme}, () => port.postMessage(['SWITCH THEME', msg.theme])); + // Ensure it's not a number or string (technically valid JSON, but no point prettifying it) + if (typeof obj !== 'object' && typeof obj !== 'array') { + port.postMessage(['NOT JSON', 'technically JSON but not an object or array']); + port.disconnect(); + return; } - }); + + // And send it the message to confirm that we're now formatting (so it can show a spinner) + port.postMessage(['FORMATTING']); + + // Do formatting + const html = jsonObjectToHTML(obj, jsonpFunctionName); + + // Post the HTML string to the content script + port.postMessage(['FORMATTED', html, validJsonText]); + } else if (msg.type === 'GET STORED THEME') { + browser.storage.sync.get('theme', (data) => { + port.postMessage({type: 'STORED THEME', themeName: data && data.theme}) + }); + } else if (msg.type === 'UPDATE STORED THEME') { + browser.storage.sync.set({theme: msg.theme}, () => { + port.postMessage({type: 'STORED THEME', themeName: msg.theme}); + }); + } }); diff --git a/src/js/content.js b/src/js/content.js index b06a249..6e81a26 100644 --- a/src/js/content.js +++ b/src/js/content.js @@ -1,5 +1,5 @@ -import browser from './lib/browser'; -import { themes, switchToTheme } from './lib/theme'; +import { connect } from './lib/messaging'; +import { enableTheming } from './lib/theme-switcher'; let jfContent; let pre; @@ -7,23 +7,12 @@ let jfStyleEl; let slowAnalysisTimeout; // Open the port "jf" now, ready for when we need it -const port = browser.runtime.connect({name: 'jf'}); +const port = connect(); // Add listener to receive response from BG when ready port.onMessage.addListener(function(message) { switch (message[0]) { - case 'SWITCH THEME': - const themeName = themes[message[1]] ? message[1] : themes.default; - switchToTheme(themes[themeName]); - - const themeSelectOption = document.getElementById('themeSelect').querySelector(`[value="${themeName}"]`); - if (themeSelectOption) { - themeSelectOption.selected = true; - } - - break; - case 'NOT JSON' : pre.hidden = false; document.body.removeChild(jfContent); @@ -31,8 +20,7 @@ port.onMessage.addListener(function(message) { case 'FORMATTING' : // It is JSON, and it's now being formatted in the background worker. - - port.postMessage({type: 'GET STORED THEME'}); + enableTheming(); // Clear the slowAnalysisTimeout (if the BG worker had taken longer than 1s to respond with an answer to whether or not this is JSON, then it would have fired, unhiding the PRE... But now that we know it's JSON, we can clear this timeout, ensuring the PRE stays hidden.) clearTimeout(slowAnalysisTimeout); @@ -52,8 +40,7 @@ port.onMessage.addListener(function(message) { formattingMsg.hidden = false; }, 250); - configureFormatOptionBar(); - configureThemeOptionBar(); + insertFormatOptionBar(); // Attach event handlers document.addEventListener('click', generalClick, false); @@ -79,7 +66,7 @@ port.onMessage.addListener(function(message) { } }); -function configureFormatOptionBar() { +function insertFormatOptionBar() { const formatBar = document.createElement('div'); formatBar.id = 'formatOptionBar'; formatBar.classList.add('optionBar'); @@ -111,68 +98,6 @@ function configureFormatOptionBar() { document.body.insertBefore(formatBar, pre); } -function configureThemeOptionBar() { - const themeBar = document.createElement('div'); - themeBar.id = 'themeOptionBar'; - themeBar.classList.add('optionBar'); - - const label = document.createElement('label'); - const select = document.createElement('select'); - label.innerText = 'Theme: '; - select.id = 'themeSelect'; - select.innerHTML = ` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - `; - - select.addEventListener('change', () => { - port.postMessage({type: 'UPDATE STORED THEME', theme: select.value}); - select.blur(); - }); - - label.appendChild(select); - themeBar.appendChild(label); - document.body.insertBefore(themeBar, pre); -} - function ready() { // First, check if it's a PRE and exit if not diff --git a/src/js/lib/messaging.js b/src/js/lib/messaging.js new file mode 100644 index 0000000..b6187b1 --- /dev/null +++ b/src/js/lib/messaging.js @@ -0,0 +1,16 @@ +import browser from './browser'; + +export function connect() { + return browser.runtime.connect({name: 'jf'}); +} + +export function listen(onMessageReceived) { + browser.runtime.onConnect.addListener((port) => { + if (port.name !== 'jf') { + console.log(`JSON Formatter error - unknown port name ${port.name}`, port); + return; + } + + port.onMessage.addListener((...args) => onMessageReceived(port, ...args)); + }); +} diff --git a/src/js/lib/theme-switcher.js b/src/js/lib/theme-switcher.js new file mode 100644 index 0000000..aae2210 --- /dev/null +++ b/src/js/lib/theme-switcher.js @@ -0,0 +1,103 @@ +import { themes } from './themes'; +import { connect } from "./messaging"; + +const transitionStyles = require('../../sass/transition.scss'); +let port, themeStyleElement, transitionStyleElement; + +export function enableTheming() { + port = connect(); + port.onMessage.addListener((message) => { + if (message.type === 'STORED THEME') { + switchToTheme(message.themeName); + } + }); + insertThemeOptionBar(); +} + +function insertThemeOptionBar() { + const themeBar = document.createElement('div'); + themeBar.id = 'themeOptionBar'; + themeBar.classList.add('optionBar'); + + const label = document.createElement('label'); + const select = document.createElement('select'); + label.innerText = 'Theme: '; + select.id = 'themeSelect'; + select.innerHTML = generateOptionsHTML(); + + select.addEventListener('change', () => { + port.postMessage({type: 'UPDATE STORED THEME', theme: select.value}); + select.blur(); + }); + + label.appendChild(select); + themeBar.appendChild(label); + document.body.insertBefore(themeBar, document.body.childNodes[0]); + port.postMessage({type: 'GET STORED THEME'}); +} + +function getThemeSelect() { + return document.getElementById('themeSelect'); +} + +function getThemesNestedByType() { + return Object.keys(themes).reduce((output, key) => { + const theme = themes[key]; + if (typeof theme === 'object') { + output[theme.type] = output[theme.type] || []; + output[theme.type][key] = theme; + } + return output; + }, {}); +} + +function generateOptionsHTML() { + const nestedThemes = getThemesNestedByType(); + + return Object.keys(nestedThemes) + .map((groupName) => { + const themeGroup = nestedThemes[groupName]; + const groupOptions = Object.keys(themeGroup).map((key) => { + const theme = themeGroup[key]; + return ``; + }).join(''); + + return `${groupOptions}`; + }).join(''); +} + +function switchToTheme(themeName) { + themeName = themes[themeName] ? themeName : themes.default; + const theme = themes[themeName]; + const element = getThemeElement(); + + if (element.innerHTML) { + insertTransitionThemes(); + } + if (element.innerHTML !== theme.styles) { + element.innerHTML = theme.styles; + } + + const themeSelect = getThemeSelect(); + const themeSelectOption = themeSelect && themeSelect.querySelector(`[value="${themeName}"]`); + if (themeSelectOption) { + themeSelectOption.selected = true; + } +} + +function getThemeElement() { + if (!themeStyleElement) { + themeStyleElement = document.createElement('style'); + document.head.appendChild(themeStyleElement); + } + + return themeStyleElement; +} + +function insertTransitionThemes() { + if (!transitionStyleElement) { + transitionStyleElement = document.createElement('style'); + transitionStyleElement.innerHTML = transitionStyles; + document.head.appendChild(transitionStyleElement); + } +} diff --git a/src/js/lib/theme.js b/src/js/lib/theme.js deleted file mode 100644 index 512e24b..0000000 --- a/src/js/lib/theme.js +++ /dev/null @@ -1,56 +0,0 @@ -export const themes = { - ambiance: require('../../sass/themes/ambiance.scss'), - chaos: require('../../sass/themes/chaos.scss'), - clouds: require('../../sass/themes/clouds.scss'), - cloudsMidnight: require('../../sass/themes/clouds-midnight.scss'), - chrome: require('../../sass/themes/chrome.scss'), - cobalt: require('../../sass/themes/cobalt.scss'), - crimsonEditor: require('../../sass/themes/crimson-editor.scss'), - dawn: require('../../sass/themes/dawn.scss'), - dreamweaver: require('../../sass/themes/dreamweaver.scss'), - eclipse: require('../../sass/themes/eclipse.scss'), - github: require('../../sass/themes/github.scss'), - gob: require('../../sass/themes/gob.scss'), - gruvbox: require('../../sass/themes/gruvbox.scss'), - idleFingers: require('../../sass/themes/idle-fingers.scss'), - iplastic: require('../../sass/themes/iplastic.scss'), - katzenMilch: require('../../sass/themes/katzen-milch.scss'), - krTheme: require('../../sass/themes/kr-theme.scss'), - kurior: require('../../sass/themes/kurior.scss'), - merbivore: require('../../sass/themes/merbivore.scss'), - merbivoreSoft: require('../../sass/themes/merbivore-soft.scss'), - monoIndustrial: require('../../sass/themes/mono-industrial.scss'), - monokai: require('../../sass/themes/monokai.scss'), - pastelOnDark: require('../../sass/themes/pastel-on-dark.scss'), - solarizedDark: require('../../sass/themes/solarized-dark.scss'), - solarizedLight: require('../../sass/themes/solarized-light.scss'), - sqlServer: require('../../sass/themes/sql-server.scss'), - terminal: require('../../sass/themes/terminal.scss'), - textmate: require('../../sass/themes/textmate.scss'), - tomorrow: require('../../sass/themes/tomorrow.scss'), - tomorrowNight: require('../../sass/themes/tomorrow-night.scss'), - tomorrowNightBlue: require('../../sass/themes/tomorrow-night-blue.scss'), - tomorrowNightBright: require('../../sass/themes/tomorrow-night-bright.scss'), - tomorrowNightEighties: require('../../sass/themes/tomorrow-night-eighties.scss'), - twilight: require('../../sass/themes/twilight.scss'), - vibrantInk: require('../../sass/themes/vibrant-ink.scss'), - xcode: require('../../sass/themes/xcode.scss'), - default: 'dawn' -}; - -const transition = require('../../sass/transition.scss'); -let themeElement; - -export function switchToTheme(theme) { - const element = getThemeElement(); - element.innerText = element.innerText ? theme + transition : theme; -} - -function getThemeElement() { - if (!themeElement) { - themeElement = document.createElement('style'); - document.head.appendChild(themeElement); - } - - return themeElement; -} diff --git a/src/js/lib/themes.js b/src/js/lib/themes.js new file mode 100644 index 0000000..06f2770 --- /dev/null +++ b/src/js/lib/themes.js @@ -0,0 +1,183 @@ +export const themes = { + default: 'dawn', + chrome: { + name: 'Chrome', + type: 'Light', + styles: require('../../sass/themes/chrome.scss') + }, + clouds: { + name: 'Clouds', + type: 'Light', + styles: require('../../sass/themes/clouds.scss') + }, + crimsonEditor: { + name: 'Crimson Editor', + type: 'Light', + styles: require('../../sass/themes/crimson-editor.scss') + }, + dawn: { + name: 'Dawn', + type: 'Light', + styles: require('../../sass/themes/dawn.scss') + }, + dreamweaver: { + name: 'Dreamweaver', + type: 'Light', + styles: require('../../sass/themes/dreamweaver.scss') + }, + eclipse: { + name: 'Eclipse', + type: 'Light', + styles: require('../../sass/themes/eclipse.scss') + }, + github: { + name: 'GitHub', + type: 'Light', + styles: require('../../sass/themes/github.scss') + }, + iplastic: { + name: 'iPlastic', + type: 'Light', + styles: require('../../sass/themes/iplastic.scss') + }, + katzenMilch: { + name: 'KatzenMilch', + type: 'Light', + styles: require('../../sass/themes/katzen-milch.scss') + }, + kurior: { + name: 'Kurior', + type: 'Light', + styles: require('../../sass/themes/kurior.scss') + }, + solarizedLight: { + name: 'Solarized Light', + type: 'Light', + styles: require('../../sass/themes/solarized-light.scss') + }, + sqlServer: { + name: 'SQL Server', + type: 'Light', + styles: require('../../sass/themes/sql-server.scss') + }, + textmate: { + name: 'TextMate', + type: 'Light', + styles: require('../../sass/themes/textmate.scss') + }, + tomorrow: { + name: 'Tomorrow', + type: 'Light', + styles: require('../../sass/themes/tomorrow.scss') + }, + xcode: { + name: 'XCode', + type: 'Light', + styles: require('../../sass/themes/xcode.scss') + }, + ambiance: { + name: 'Ambiance', + type: 'Dark', + styles: require('../../sass/themes/ambiance.scss') + }, + chaos: { + name: 'Chaos', + type: 'Dark', + styles: require('../../sass/themes/chaos.scss') + }, + cloudsMidnight: { + name: 'Clouds Midnight', + type: 'Dark', + styles: require('../../sass/themes/clouds-midnight.scss') + }, + cobalt: { + name: 'Cobalt', + type: 'Dark', + styles: require('../../sass/themes/cobalt.scss') + }, + gob: { + name: 'Gob', + type: 'Dark', + styles: require('../../sass/themes/gob.scss') + }, + gruvbox: { + name: 'Gruvbox', + type: 'Dark', + styles: require('../../sass/themes/gruvbox.scss') + }, + idleFingers: { + name: 'idle Fingers', + type: 'Dark', + styles: require('../../sass/themes/idle-fingers.scss') + }, + krTheme: { + name: 'krTheme', + type: 'Dark', + styles: require('../../sass/themes/kr-theme.scss') + }, + merbivore: { + name: 'Merbivore', + type: 'Dark', + styles: require('../../sass/themes/merbivore.scss') + }, + merbivoreSoft: { + name: 'Merbivore Soft', + type: 'Dark', + styles: require('../../sass/themes/merbivore-soft.scss') + }, + monoIndustrial: { + name: 'Mono Industrial', + type: 'Dark', + styles: require('../../sass/themes/mono-industrial.scss') + }, + monokai: { + name: 'Monokai', + type: 'Dark', + styles: require('../../sass/themes/monokai.scss') + }, + pastelOnDark: { + name: 'Pastel on dark', + type: 'Dark', + styles: require('../../sass/themes/pastel-on-dark.scss') + }, + solarizedDark: { + name: 'Solarized Dark', + type: 'Dark', + styles: require('../../sass/themes/solarized-dark.scss') + }, + terminal: { + name: 'Terminal', + type: 'Dark', + styles: require('../../sass/themes/terminal.scss') + }, + tomorrowNight: { + name: 'Tomorrow Night', + type: 'Dark', + styles: require('../../sass/themes/tomorrow-night.scss') + }, + tomorrowNightBlue: { + name: 'Tomorrow Night Blue', + type: 'Dark', + styles: require('../../sass/themes/tomorrow-night-blue.scss') + }, + tomorrowNightBright: { + name: 'Tomorrow Night Blue', + type: 'Dark', + styles: require('../../sass/themes/tomorrow-night-bright.scss') + }, + tomorrowNightEighties: { + name: 'Tomorrow Night ’80s', + type: 'Dark', + styles: require('../../sass/themes/tomorrow-night-eighties.scss') + }, + twilight: { + name: 'Twilight', + type: 'Dark', + styles: require('../../sass/themes/twilight.scss') + }, + vibrantInk: { + name: 'Vibrant Ink', + type: 'Dark', + styles: require('../../sass/themes/vibrant-ink.scss') + } +}; diff --git a/src/manifest.json b/src/manifest.json index 2ca9897..8a7313f 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,6 +1,6 @@ { "name": "JSON Formatter", - "version": "0.8.1", + "version": "0.8.2", "manifest_version": 2, "description": "Makes JSON easy to read. Open source.", "homepage_url": "https://github.com/nikrolls/json-formatter", diff --git a/src/sass/themes/chaos.scss b/src/sass/themes/chaos.scss index 1884ae9..ccc2ac9 100644 --- a/src/sass/themes/chaos.scss +++ b/src/sass/themes/chaos.scss @@ -1,6 +1,8 @@ +$foreground: #e6e1dc; + body { background-color: #161616; - color: #e6e1dc; + color: $foreground; } ::selection { @@ -23,6 +25,10 @@ body { color: #fdc251; } +.brace { + color: $foreground; +} + .collapsed:after { font-style: italic; color: #555; diff --git a/src/sass/themes/chrome.scss b/src/sass/themes/chrome.scss index 0761874..a95ecbe 100644 --- a/src/sass/themes/chrome.scss +++ b/src/sass/themes/chrome.scss @@ -1,6 +1,8 @@ +$foreground: black; + body { background-color: white; - color: black; + color: $foreground; } ::selection { @@ -23,6 +25,10 @@ body { color: #6d79de; } +.brace { + color: $foreground; +} + .collapsed:after { color: #236e24; } diff --git a/src/sass/themes/clouds-midnight.scss b/src/sass/themes/clouds-midnight.scss index 6612f21..28b9f49 100644 --- a/src/sass/themes/clouds-midnight.scss +++ b/src/sass/themes/clouds-midnight.scss @@ -1,12 +1,18 @@ +$foreground: #929292; + body { background-color: #191919; - color: #929292; + color: $foreground; } ::selection { background-color: black; } +.key { + color: $foreground; +} + .number { color: #46a609; } @@ -19,6 +25,10 @@ body { color: #39946a; } +.brace { + color: $foreground; +} + .collapsed:after { color: #3c403b; } diff --git a/src/sass/themes/clouds.scss b/src/sass/themes/clouds.scss index a18d32a..8c40628 100644 --- a/src/sass/themes/clouds.scss +++ b/src/sass/themes/clouds.scss @@ -1,12 +1,18 @@ +$foreground: black; + body { background-color: white; - color: black; + color: $foreground; } ::selection { background-color: #bdd5fc; } +.key { + color: $foreground; +} + .number { color: #46a609; } @@ -19,6 +25,10 @@ body { color: #39946a; } +.brace { + color: $foreground; +} + .collapsed:after { color: #bcc8ba; } diff --git a/src/sass/themes/cobalt.scss b/src/sass/themes/cobalt.scss index 8db7ffb..1ea3801 100644 --- a/src/sass/themes/cobalt.scss +++ b/src/sass/themes/cobalt.scss @@ -1,6 +1,8 @@ +$foreground: white; + body { background-color: #002240; - color: white; + color: $foreground; } ::selection { @@ -19,6 +21,10 @@ body { color: #3ad900; } +.brace { + color: $foreground; +} + .collapsed:after { font-style: italic; color: #0088ff; diff --git a/src/sass/themes/crimson-editor.scss b/src/sass/themes/crimson-editor.scss index e3ebcc6..2e3dbbf 100644 --- a/src/sass/themes/crimson-editor.scss +++ b/src/sass/themes/crimson-editor.scss @@ -1,6 +1,8 @@ +$foreground: #404040; + body { background-color: white; - color: #404040; + color: $foreground; } ::selection { @@ -23,6 +25,10 @@ body { color: #ff9c00; } +.brace { + color: $foreground; +} + .collapsed:after { color: #4c886b; } diff --git a/src/sass/themes/dawn.scss b/src/sass/themes/dawn.scss index 9de1d85..e13da2e 100644 --- a/src/sass/themes/dawn.scss +++ b/src/sass/themes/dawn.scss @@ -1,6 +1,8 @@ +$foreground: #080808; + body { background-color: #f9f9f9; - color: #080808; + color: $foreground; } ::selection { @@ -19,6 +21,10 @@ body { color: #0b6125; } +.brace { + color: $foreground; +} + .collapsed:after { font-style: italic; color: #5a525f diff --git a/src/sass/themes/dreamweaver.scss b/src/sass/themes/dreamweaver.scss index a0ce9db..7815952 100644 --- a/src/sass/themes/dreamweaver.scss +++ b/src/sass/themes/dreamweaver.scss @@ -1,6 +1,8 @@ +$foreground: black; + body { background-color: #fff; - color: black; + color: $foreground; } ::selection { @@ -23,6 +25,10 @@ body { color: #585cf6; } +.brace { + color: $foreground; +} + .collapsed:after { color: #4c886b; } diff --git a/src/sass/themes/eclipse.scss b/src/sass/themes/eclipse.scss index cca1803..8fa3ed7 100644 --- a/src/sass/themes/eclipse.scss +++ b/src/sass/themes/eclipse.scss @@ -1,6 +1,8 @@ +$foreground: black; + body { background-color: #fff; - color: black; + color: $foreground; } ::selection { @@ -23,6 +25,10 @@ body { color: #5848f6; } +.brace { + color: $foreground; +} + .collapsed:after { color: #719682; } diff --git a/src/sass/themes/github.scss b/src/sass/themes/github.scss index 946dba4..7ffb5e8 100644 --- a/src/sass/themes/github.scss +++ b/src/sass/themes/github.scss @@ -1,6 +1,8 @@ +$foreground: black; + body { background-color: white; - color: black; + color: $foreground; } ::selection { @@ -16,11 +18,13 @@ body { } .bool, .null { + color: $foreground; font-weight: bold; } .brace { font-weight: bold; + color: $foreground; } .collapsed:after { diff --git a/src/sass/themes/gob.scss b/src/sass/themes/gob.scss index badb4ce..f64e419 100644 --- a/src/sass/themes/gob.scss +++ b/src/sass/themes/gob.scss @@ -1,6 +1,8 @@ +$foreground: #0f0; + body { background-color: #0b0b0b; - color: #0f0 + color: $foreground; } ::selection { @@ -12,11 +14,15 @@ body { } .string { - color: #10f060 + color: #10f060; } .bool, .null { - color: #10f0a0 + color: #10f0a0; +} + +.brace { + color: $foreground; } .collapsed:after { diff --git a/src/sass/themes/gruvbox.scss b/src/sass/themes/gruvbox.scss index d36a868..fb4d472 100644 --- a/src/sass/themes/gruvbox.scss +++ b/src/sass/themes/gruvbox.scss @@ -1,6 +1,8 @@ +$foreground: #ebdab4; + body { background-color: #1d2021; - color: #ebdab4; + color: $foreground; } ::selection { @@ -19,6 +21,10 @@ body { color: #b8ba37; } +.brace { + color: $foreground; +} + .collapsed:after { font-style: italic; color: #928375; diff --git a/src/sass/themes/idle-fingers.scss b/src/sass/themes/idle-fingers.scss index fca6f16..92ed7e8 100644 --- a/src/sass/themes/idle-fingers.scss +++ b/src/sass/themes/idle-fingers.scss @@ -1,12 +1,18 @@ +$foreground: white; + body { background-color: #323232; - color: #fff + color: $foreground; } ::selection { background-color: transparentize(#5a647e, 0.12); } +.key { + color: $foreground; +} + .number, .bool, .null { color: #6c99bb; } @@ -15,6 +21,10 @@ body { color: #a5c261; } +.brace { + color: $foreground; +} + .collapsed:after { font-style: italic; color: #bc9458; diff --git a/src/sass/themes/iplastic.scss b/src/sass/themes/iplastic.scss index 9648eba..3b30674 100644 --- a/src/sass/themes/iplastic.scss +++ b/src/sass/themes/iplastic.scss @@ -1,6 +1,8 @@ +$foreground: #333; + body { background-color: #eee; - color: #333; + color: $foreground; } ::selection { @@ -21,6 +23,10 @@ body { color: #a55f03; } +.brace { + color: $foreground; +} + .collapsed:after { color: #777; font-style: italic; diff --git a/src/sass/themes/katzen-milch.scss b/src/sass/themes/katzen-milch.scss index 8c84f30..3276fe6 100644 --- a/src/sass/themes/katzen-milch.scss +++ b/src/sass/themes/katzen-milch.scss @@ -1,6 +1,8 @@ +$foreground: #0f0009; + body { background-color: #f3f2f3; - color: #0f0009 + color: $foreground; } ::selection { @@ -27,6 +29,10 @@ body { background-color: transparentize(#bdbe82, 0.941); } +.brace { + color: $foreground; +} + .collapsed:after { font-style: italic; color: rgba(64, 79, 80, 0.67); diff --git a/src/sass/themes/kr-theme.scss b/src/sass/themes/kr-theme.scss index b891b4f..b779f06 100644 --- a/src/sass/themes/kr-theme.scss +++ b/src/sass/themes/kr-theme.scss @@ -1,6 +1,8 @@ +$foreground: #fcffe0; + body { background-color: #0b0a09; - color: #fcffe0; + color: $foreground; } ::selection { @@ -19,6 +21,10 @@ body { color: transparentize(#a4a1b5, 0.2); } +.brace { + color: $foreground; +} + .collapsed:after { font-style: italic; color: #706d5b; diff --git a/src/sass/themes/kurior.scss b/src/sass/themes/kurior.scss index d7c04d8..c9c1b0b 100644 --- a/src/sass/themes/kurior.scss +++ b/src/sass/themes/kurior.scss @@ -1,6 +1,8 @@ +$foreground: #363636; + body { background-color: #e8e9e8; - color: #363636; + color: $foreground; } ::selection { @@ -23,6 +25,10 @@ body { color: #cd6839; } +.brace { + color: $foreground; +} + .collapsed:after { color: transparentize(#949494, 0.09); background-color: transparentize(#dcdcdc, 0.44); diff --git a/src/sass/themes/merbivore-soft.scss b/src/sass/themes/merbivore-soft.scss index bdbc69b..3d5e24c 100644 --- a/src/sass/themes/merbivore-soft.scss +++ b/src/sass/themes/merbivore-soft.scss @@ -1,12 +1,18 @@ +$foreground: #e6e1dc; + body { background-color: #1c1c1c; - color: #e6e1dc; + color: $foreground; } ::selection { background-color: #494949; } +.key { + color: $foreground; +} + .number { color: #7fc578; } @@ -19,6 +25,10 @@ body { color: #e1c582; } +.brace { + color: $foreground; +} + .collapsed:after { font-style: italic; color: #ac4bb8; diff --git a/src/sass/themes/merbivore.scss b/src/sass/themes/merbivore.scss index 9ea6063..716088f 100644 --- a/src/sass/themes/merbivore.scss +++ b/src/sass/themes/merbivore.scss @@ -1,12 +1,18 @@ +$foreground: #e6e1dc; + body { background-color: #161616; - color: #e6e1dc; + color: $foreground; } ::selection { background-color: #454545; } +.key { + color: $foreground; +} + .number { color: #58c554; } @@ -19,6 +25,10 @@ body { color: #fdc251; } +.brace { + color: $foreground; +} + .collapsed:after { font-style: italic; color: #ad2ea4; diff --git a/src/sass/themes/mono-industrial.scss b/src/sass/themes/mono-industrial.scss index 55ce90f..5ac6d83 100644 --- a/src/sass/themes/mono-industrial.scss +++ b/src/sass/themes/mono-industrial.scss @@ -1,6 +1,8 @@ +$foreground: white; + body { background-color: #222c28; - color: #fff; + color: $foreground; } ::selection { @@ -24,6 +26,10 @@ body { color: #648bd2; } +.brace { + color: $foreground; +} + .collapsed:after { color: #666c68; background-color: #151c19; diff --git a/src/sass/themes/monokai.scss b/src/sass/themes/monokai.scss index e375705..197ab65 100644 --- a/src/sass/themes/monokai.scss +++ b/src/sass/themes/monokai.scss @@ -1,6 +1,8 @@ +$foreground: #f8f8f2; + body { background-color: #272822; - color: #f8f8f2; + color: $foreground; } ::selection { @@ -19,6 +21,10 @@ body { color: #e6db74; } +.brace { + color: $foreground; +} + .collapsed:after { color: #75715e; } diff --git a/src/sass/themes/pastel-on-dark.scss b/src/sass/themes/pastel-on-dark.scss index 55d4009..62c14c5 100644 --- a/src/sass/themes/pastel-on-dark.scss +++ b/src/sass/themes/pastel-on-dark.scss @@ -1,6 +1,8 @@ +$foreground: #8f938f; + body { background-color: #2c2828; - color: #8f938f; + color: $foreground; } ::selection { @@ -23,6 +25,10 @@ body { color: #de8e30; } +.brace { + color: $foreground; +} + .collapsed:after { color: #a6c6ff; } diff --git a/src/sass/themes/solarized-dark.scss b/src/sass/themes/solarized-dark.scss index 9a0a0dc..6a40852 100644 --- a/src/sass/themes/solarized-dark.scss +++ b/src/sass/themes/solarized-dark.scss @@ -1,6 +1,8 @@ +$foreground: #93a1a1; + body { background-color: #002b36; - color: #93a1a1; + color: $foreground; } ::selection { @@ -23,6 +25,10 @@ body { color: #b58900; } +.brace { + color: $foreground; +} + .collapsed:after { font-style: italic; color: #657b83; diff --git a/src/sass/themes/solarized-light.scss b/src/sass/themes/solarized-light.scss index 07b225d..eee94b4 100644 --- a/src/sass/themes/solarized-light.scss +++ b/src/sass/themes/solarized-light.scss @@ -1,6 +1,8 @@ +$foreground: #586e75; + body { background-color: #fdf6e3; - color: #586e75; + color: $foreground; } ::selection { @@ -23,6 +25,10 @@ body { color: #b58900 } +.brace { + color: $foreground; +} + .collapsed:after { color: #93a1a1; } diff --git a/src/sass/themes/terminal.scss b/src/sass/themes/terminal.scss index e9e2e39..5c41364 100644 --- a/src/sass/themes/terminal.scss +++ b/src/sass/themes/terminal.scss @@ -1,6 +1,8 @@ +$foreground: #dedede; + body { background-color: black; - color: #dedede; + color: $foreground; } ::selection { @@ -19,6 +21,10 @@ body { color: #b9ca4a; } +.brace { + color: $foreground; +} + .collapsed:after { color: orangered; } diff --git a/src/sass/themes/textmate.scss b/src/sass/themes/textmate.scss index 57c504a..1c5e059 100644 --- a/src/sass/themes/textmate.scss +++ b/src/sass/themes/textmate.scss @@ -1,6 +1,8 @@ +$foreground: black; + body { background-color: #fff; - color: black; + color: $foreground; } ::selection { @@ -23,6 +25,10 @@ body { color: #585cf6; } +.brace { + color: $foreground; +} + .collapsed:after { color: #4c886b; } diff --git a/src/sass/themes/tomorrow-night-blue.scss b/src/sass/themes/tomorrow-night-blue.scss index 12f03ba..f838256 100644 --- a/src/sass/themes/tomorrow-night-blue.scss +++ b/src/sass/themes/tomorrow-night-blue.scss @@ -1,6 +1,8 @@ +$foreground: white; + body { background-color: #002451; - color: #fff; + color: $foreground; } ::selection { @@ -19,6 +21,10 @@ body { color: #d1f1a9; } +.brace { + color: $foreground; +} + .collapsed:after { color: #7285b7; } diff --git a/src/sass/themes/tomorrow-night-bright.scss b/src/sass/themes/tomorrow-night-bright.scss index dc9fbcb..f9c2726 100644 --- a/src/sass/themes/tomorrow-night-bright.scss +++ b/src/sass/themes/tomorrow-night-bright.scss @@ -1,6 +1,8 @@ +$foreground: #dedede; + body { background-color: #000; - color: #dedede; + color: $foreground; } ::selection { @@ -19,6 +21,10 @@ body { color: #b9ca4a; } +.brace { + color: $foreground; +} + .collapsed:after { color: #969896; } diff --git a/src/sass/themes/tomorrow-night-eighties.scss b/src/sass/themes/tomorrow-night-eighties.scss index 8a91eb3..11388af 100644 --- a/src/sass/themes/tomorrow-night-eighties.scss +++ b/src/sass/themes/tomorrow-night-eighties.scss @@ -1,6 +1,8 @@ +$foreground: #ccc; + body { background-color: #2d2d2d; - color: #ccc; + color: $foreground; } ::selection { @@ -19,6 +21,10 @@ body { color: #9c9; } +.brace { + color: $foreground; +} + .collapsed:after { color: #999; } diff --git a/src/sass/themes/tomorrow-night.scss b/src/sass/themes/tomorrow-night.scss index 97eafcb..4d00aa7 100644 --- a/src/sass/themes/tomorrow-night.scss +++ b/src/sass/themes/tomorrow-night.scss @@ -1,6 +1,8 @@ +$foreground: #c5c8c6; + body { background-color: #1d1f21; - color: #c5c8c6; + color: $foreground; } ::selection { @@ -19,6 +21,10 @@ body { color: #b5bd68; } +.brace { + color: $foreground; +} + .collapsed:after { color: #969896; } diff --git a/src/sass/themes/tomorrow.scss b/src/sass/themes/tomorrow.scss index 6006e60..8e06788 100644 --- a/src/sass/themes/tomorrow.scss +++ b/src/sass/themes/tomorrow.scss @@ -1,6 +1,8 @@ +$foreground: #4d4d4c; + body { background-color: #fff; - color: #4d4d4c; + color: $foreground; } ::selection { @@ -19,6 +21,10 @@ body { color: #718c00; } +.brace { + color: $foreground; +} + .collapsed:after { color: #8e908c; } diff --git a/src/sass/themes/twilight.scss b/src/sass/themes/twilight.scss index ea8fcc6..c01954b 100644 --- a/src/sass/themes/twilight.scss +++ b/src/sass/themes/twilight.scss @@ -1,6 +1,8 @@ +$foreground: #f8f8f8; + body { background-color: #141414; - color: #f8f8f8; + color: $foreground; } ::selection { @@ -19,6 +21,10 @@ body { color: #8f9d6a; } +.brace { + color: $foreground; +} + .collapsed:after { font-style: italic; color: #5f5a60; diff --git a/src/sass/themes/vibrant-ink.scss b/src/sass/themes/vibrant-ink.scss index 2e9ab6e..879cb92 100644 --- a/src/sass/themes/vibrant-ink.scss +++ b/src/sass/themes/vibrant-ink.scss @@ -1,6 +1,8 @@ +$foreground: white; + body { background-color: #0f0f0f; - color: #fff; + color: $foreground; } ::selection { @@ -23,6 +25,10 @@ body { color: #399; } +.brace { + color: $foreground; +} + .collapsed:after { color: #93c; } diff --git a/src/sass/themes/xcode.scss b/src/sass/themes/xcode.scss index 2ecd584..549abce 100644 --- a/src/sass/themes/xcode.scss +++ b/src/sass/themes/xcode.scss @@ -1,6 +1,8 @@ +$foreground: black; + body { - background-color: #fff; - color: #000; + background-color: white; + color: $foreground; } ::selection { @@ -19,6 +21,10 @@ body { color: #c800a4; } +.brace { + color: $foreground; +} + .collapsed:after { color: #008e00; } diff --git a/src/sass/transition.scss b/src/sass/transition.scss index 18f62c9..d20e30d 100644 --- a/src/sass/transition.scss +++ b/src/sass/transition.scss @@ -1,5 +1,42 @@ -* { - transition-property: color, background-color; +@mixin transition { + transition-property: background-color, color; transition-duration: 500ms; + transition-delay: 0s; transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); } + +body { + @include transition; +} + +::selection { + @include transition; +} + +.key { + @include transition; +} + +.number { + @include transition; +} + +.string { + @include transition; +} + +.bool { + @include transition; +} + +.null { + @include transition; +} + +.brace { + @include transition; +} + +.collapsed:after { + @include transition; +} From ede6c36a37c968f5ecb51a3b7bdb35794d677e63 Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Thu, 27 Apr 2017 19:34:35 +1200 Subject: [PATCH 11/28] Parse text-only pages that have text/html mimetypes Fixes https://github.com/callumlocke/json-formatter/issues/100 Also some clean-ups in content.js around messaging, detection and display timing. --- src/js/content.js | 134 +++++++++++++++++++++++++----------------- src/sass/content.scss | 1 + 2 files changed, 80 insertions(+), 55 deletions(-) diff --git a/src/js/content.js b/src/js/content.js index 6e81a26..8e47994 100644 --- a/src/js/content.js +++ b/src/js/content.js @@ -6,22 +6,29 @@ let pre; let jfStyleEl; let slowAnalysisTimeout; -// Open the port "jf" now, ready for when we need it +// Open the port 'jf' now, ready for when we need it const port = connect(); // Add listener to receive response from BG when ready port.onMessage.addListener(function(message) { - switch (message[0]) { case 'NOT JSON' : - pre.hidden = false; - document.body.removeChild(jfContent); + document.documentElement.style.color = null; break; case 'FORMATTING' : + convertPlainTextDocumentToPreIfNeeded(); + pre = document.querySelector('body > pre'); + pre.hidden = true; + // It is JSON, and it's now being formatted in the background worker. enableTheming(); + // Add jfContent DIV, ready to display stuff + jfContent = document.createElement('div'); + jfContent.id = 'jfContent'; + document.body.appendChild(jfContent); + // Clear the slowAnalysisTimeout (if the BG worker had taken longer than 1s to respond with an answer to whether or not this is JSON, then it would have fired, unhiding the PRE... But now that we know it's JSON, we can clear this timeout, ensuring the PRE stays hidden.) clearTimeout(slowAnalysisTimeout); @@ -42,27 +49,28 @@ port.onMessage.addListener(function(message) { insertFormatOptionBar(); - // Attach event handlers - document.addEventListener('click', generalClick, false); - break; case 'FORMATTED' : // Insert HTML content jfContent.innerHTML = message[1]; + pre.hidden = true; // Export parsed JSON for easy access in console setTimeout(function() { - const script = document.createElement("script"); - script.innerHTML = 'window.json = ' + message[2] + ';'; + const script = document.createElement('script'); + script.innerHTML = `window.json=${message[2]};`; document.head.appendChild(script); - console.log('JSON Formatter: Type "json" to inspect.'); + console.info(`JSON Formatter: Type 'json' to inspect.`); }, 100); + // Attach event handlers + document.addEventListener('click', generalClick, false); + break; default : - throw new Error('Message not understood: ' + message[0]); + throw new Error(`Message not understood: ${message[0]}`); } }); @@ -93,63 +101,79 @@ function insertFormatOptionBar() { buttonPlain.classList.remove('selected'); }); + document.addEventListener('keyup', function(e) { + if (e.keyCode === 37 && typeof buttonPlain !== 'undefined') { + buttonPlain.click(); + } + else if (e.keyCode === 39 && typeof buttonFormatted !== 'undefined') { + buttonFormatted.click(); + } + }); + formatBar.appendChild(buttonPlain); formatBar.appendChild(buttonFormatted); document.body.insertBefore(formatBar, pre); } function ready() { + // First, check if it's plain text and exit if not + const plainText = getTextFromTextOnlyDocument(); + console.log(plainText); + if (!plainText || plainText.length > 3000000) { + port.disconnect(); + return; + } + + // Hide the text immediately (until we know what to do, to prevent a flash of unstyled content) + document.documentElement.style.color = 'transparent'; + slowAnalysisTimeout = setTimeout(function() { + document.documentElement.style.color = null; + }, 1000); - // First, check if it's a PRE and exit if not + // Send the text to the background script + port.postMessage({ + type: 'SENDING TEXT', + text: plainText + }); +} + +function getTextFromTextOnlyDocument() { const bodyChildren = document.body.childNodes; - pre = bodyChildren[0]; - const jsonLength = (pre && pre.innerText || "").length; - if ( - bodyChildren.length !== 1 || - pre.tagName !== 'PRE' || - jsonLength > (3000000)) { - - // Disconnect the port (without even having used it) - port.disconnect(); + const firstChild = bodyChildren[0]; - // EXIT POINT: NON-PLAIN-TEXT PAGE (or longer than 3MB) - } else { - // This is a 'plain text' page (just a body with one PRE child). - // It might be JSON/JSONP, or just some other kind of plain text (eg CSS). + const bodyHasOnlyOneElement = document.body.childNodes.length === 1; + const isPre = isPreElement(firstChild); + const isPlainText = isPlainTextElement(firstChild); - // Hide the PRE immediately (until we know what to do, to prevent FOUC) - pre.hidden = true; - slowAnalysisTimeout = setTimeout(function() { - pre.hidden = false; - }, 1000); - - // Send the contents of the PRE to the BG script - // Add jfContent DIV, ready to display stuff - jfContent = document.createElement('div'); - jfContent.id = 'jfContent'; - document.body.appendChild(jfContent); - - // Post the contents of the PRE - port.postMessage({ - type: "SENDING TEXT", - text: pre.innerText, - length: jsonLength - }); - - // Now, this script will just wait to receive anything back via another port message. The returned message will be something like "NOT JSON" or "IS JSON" + if (bodyHasOnlyOneElement && (isPre || isPlainText)) { + return firstChild.innerText || firstChild.nodeValue; } +} - document.addEventListener('keyup', function(e) { - if (e.keyCode === 37 && typeof buttonPlain !== 'undefined') { - buttonPlain.click(); - } - else if (e.keyCode === 39 && typeof buttonFormatted !== 'undefined') { - buttonFormatted.click(); - } - }); +function convertPlainTextDocumentToPreIfNeeded() { + if (isPlainTextDocument()) { + const plainTextNode = document.body.childNodes[0]; + const preElement = document.createElement('pre'); + preElement.innerText = plainTextNode.nodeValue; + document.body.appendChild(preElement); + document.body.removeChild(plainTextNode); + } +} + +function isPlainTextDocument() { + return document.body.childNodes.length === 1 + && isPlainTextElement(document.body.childNodes[0]); +} + +function isPreElement(element) { + return element.tagName === 'PRE'; +} + +function isPlainTextElement(element) { + return element.nodeType === Node.TEXT_NODE; } -document.addEventListener("DOMContentLoaded", ready, false); +document.addEventListener('DOMContentLoaded', ready, false); let lastKeyValueOrValueIdGiven = 0; function collapse(elements) { @@ -177,7 +201,7 @@ function collapse(elements) { // See how many children in the blockInner count = blockInner.children.length; - // Generate comment text eg "4 items" + // Generate comment text eg '4 items' const comment = count + (count === 1 ? ' item' : ' items'); // Add CSS that targets it jfStyleEl.insertAdjacentHTML( diff --git a/src/sass/content.scss b/src/sass/content.scss index 39585d3..3a71b15 100644 --- a/src/sass/content.scss +++ b/src/sass/content.scss @@ -106,6 +106,7 @@ body { } pre { + white-space: normal; padding: 2.25rem 0.3rem 0.3rem; } From 4bb4fd5ab100d37705aa358a96f1b0e13e1361e5 Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Thu, 27 Apr 2017 20:14:53 +1200 Subject: [PATCH 12/28] Release 0.8.3 --- src/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/manifest.json b/src/manifest.json index 8a7313f..aa3a1e4 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,6 +1,6 @@ { "name": "JSON Formatter", - "version": "0.8.2", + "version": "0.8.3", "manifest_version": 2, "description": "Makes JSON easy to read. Open source.", "homepage_url": "https://github.com/nikrolls/json-formatter", From 42d6a9c439b167aa4a33f0b78f25db3832448358 Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Tue, 2 May 2017 22:52:35 +1200 Subject: [PATCH 13/28] Added line numbers Also: - Fixed incorrect name for Kuroir theme. If you had this theme selected it will reset to Dawn until you change it. - Fixed incorrect name for Tomorrow Night Bright theme. If you had this theme selected it will still work. - Removed stray console.log on page load. - Tweaks around CSS tooling. --- package.json | 8 +- postcss.config.js | 6 ++ src/js/content.js | 1 - src/js/lib/dom-builder.js | 31 +++++--- src/js/lib/themes.js | 8 +- src/sass/content.scss | 40 ++++++---- src/sass/themes/_base.scss | 4 + src/sass/themes/ambiance.scss | 18 ++++- src/sass/themes/chaos.scss | 12 ++- src/sass/themes/chrome.scss | 8 ++ src/sass/themes/clouds-midnight.scss | 8 ++ src/sass/themes/clouds.scss | 8 ++ src/sass/themes/cobalt.scss | 10 ++- src/sass/themes/crimson-editor.scss | 8 ++ src/sass/themes/dawn.scss | 8 ++ src/sass/themes/dreamweaver.scss | 8 ++ src/sass/themes/eclipse.scss | 9 +++ src/sass/themes/github.scss | 8 ++ src/sass/themes/gob.scss | 8 ++ src/sass/themes/gruvbox.scss | 4 + src/sass/themes/idle-fingers.scss | 8 ++ src/sass/themes/iplastic.scss | 8 ++ src/sass/themes/katzen-milch.scss | 8 ++ src/sass/themes/kr-theme.scss | 8 ++ src/sass/themes/{kurior.scss => kuroir.scss} | 4 + src/sass/themes/merbivore-soft.scss | 8 ++ src/sass/themes/merbivore.scss | 8 ++ src/sass/themes/mono-industrial.scss | 8 ++ src/sass/themes/monokai.scss | 8 ++ src/sass/themes/pastel-on-dark.scss | 8 ++ src/sass/themes/solarized-dark.scss | 8 ++ src/sass/themes/solarized-light.scss | 8 ++ src/sass/themes/sql-server.scss | 8 ++ src/sass/themes/terminal.scss | 8 ++ src/sass/themes/textmate.scss | 8 ++ src/sass/themes/tomorrow-night-blue.scss | 8 ++ src/sass/themes/tomorrow-night-bright.scss | 8 ++ src/sass/themes/tomorrow-night-eighties.scss | 8 ++ src/sass/themes/tomorrow-night.scss | 8 ++ src/sass/themes/tomorrow.scss | 8 ++ src/sass/themes/twilight.scss | 8 ++ src/sass/themes/vibrant-ink.scss | 8 ++ src/sass/themes/xcode.scss | 8 ++ src/sass/transition.scss | 8 ++ webpack.config.js | 7 +- yarn.lock | 84 +++++++++++++++++--- 46 files changed, 444 insertions(+), 50 deletions(-) create mode 100644 postcss.config.js rename src/sass/themes/{kurior.scss => kuroir.scss} (91%) diff --git a/package.json b/package.json index 47b5b86..807714e 100644 --- a/package.json +++ b/package.json @@ -6,10 +6,12 @@ "author": "Nik Rolls ", "license": "MIT", "dependencies": { + "autoprefixer": "^6.7.7", "babel-core": "^6.24.1", - "babel-loader": "^6.4.1", + "babel-loader": "^7.0.0", "babel-preset-env": "^1.4.0", - "css-loader": "^0.28.0", + "css-loader": "^0.28.1", + "cssnano": "^3.10.0", "del": "^2.2.2", "gulp": "^3.9.1", "gulp-autoprefixer": "^3.1.1", @@ -18,8 +20,10 @@ "gulp-uglify": "^2.1.2", "gulp-zip": "^4.0.0", "node-sass": "^4.5.2", + "postcss-loader": "^1.3.3", "sass-loader": "^6.0.3", "text-loader": "^0.0.1", + "to-string-loader": "^1.1.5", "vinyl-named": "^1.1.0", "webpack": "^2.4.1", "webpack-stream": "^3.2.0" diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..e4ae5c6 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: [ + require('autoprefixer')(), + require('cssnano')() + ] +}; diff --git a/src/js/content.js b/src/js/content.js index 8e47994..ebb429f 100644 --- a/src/js/content.js +++ b/src/js/content.js @@ -118,7 +118,6 @@ function insertFormatOptionBar() { function ready() { // First, check if it's plain text and exit if not const plainText = getTextFromTextOnlyDocument(); - console.log(plainText); if (!plainText || plainText.length > 3000000) { port.disconnect(); return; diff --git a/src/js/lib/dom-builder.js b/src/js/lib/dom-builder.js index 603af7d..67f7581 100644 --- a/src/js/lib/dom-builder.js +++ b/src/js/lib/dom-builder.js @@ -11,8 +11,11 @@ const TOKEN_TYPES = { NULL: 'NULL', }; +let lineNumber; + export function jsonObjectToHTML(obj, jsonpFunctionName) { // Format object (using recursive keyValueOrValue builder) + lineNumber = jsonpFunctionName === null ? 1 : 2; const rootKeyValueOrValue = getKeyValueOrValueDom(obj, false); // The whole DOM is now built. @@ -20,24 +23,27 @@ export function jsonObjectToHTML(obj, jsonpFunctionName) { // Set class on root node to identify it rootKeyValueOrValue.classList.add('rootKeyValueOrValue'); + const gutterWidth = 1 + (lineNumber.toString().length * 0.5) + 'rem'; + const gutter = document.createElement('div'); + gutter.id = 'gutter'; + gutter.style.width = gutterWidth; + // Make div#formattedJson and append the root keyValueOrValue const divFormattedJson = document.createElement('div'); divFormattedJson.id = 'formattedJson'; + divFormattedJson.style.marginLeft = gutterWidth; divFormattedJson.appendChild(rootKeyValueOrValue); - // Convert it to an HTML string (shame about this step, but necessary for passing it through to the content page) - let returnHTML = divFormattedJson.outerHTML; - // Top and tail with JSONP padding if necessary if (jsonpFunctionName !== null) { - returnHTML = - `
${jsonpFunctionName} (
- ${returnHTML} -
)
`; + divFormattedJson.innerHTML = + `
${jsonpFunctionName}(
+ ${divFormattedJson.innerHTML} +
)
`; } // Return the HTML - return returnHTML; + return gutter.outerHTML + divFormattedJson.outerHTML; } // Core recursive DOM-building function @@ -62,6 +68,7 @@ function getKeyValueOrValueDom(value, keyName) { // Root node for this keyValueOrValue const keyValueOrValue = templates.keyValueOrValue(); + keyValueOrValue.setAttribute('line-number', lineNumber++); // Add an 'expander' first (if this is object/array with non-zero size) if (type === TOKEN_TYPES.OBJECT || type === TOKEN_TYPES.ARRAY) { @@ -147,7 +154,9 @@ function getKeyValueOrValueDom(value, keyName) { } // Add closing brace - keyValueOrValue.appendChild(templates.closingBrace()); + const closingBrace = templates.closingBrace(); + closingBrace.setAttribute('line-number', lineNumber++); + keyValueOrValue.appendChild(closingBrace); break; case TOKEN_TYPES.ARRAY: @@ -174,7 +183,9 @@ function getKeyValueOrValueDom(value, keyName) { keyValueOrValue.appendChild(blockInner); } // Add closing bracket - keyValueOrValue.appendChild(templates.closingBracket()); + const closingBracket = templates.closingBracket(); + closingBracket.setAttribute('line-number', lineNumber++); + keyValueOrValue.appendChild(closingBracket); break; case TOKEN_TYPES.BOOL: diff --git a/src/js/lib/themes.js b/src/js/lib/themes.js index 06f2770..63186ab 100644 --- a/src/js/lib/themes.js +++ b/src/js/lib/themes.js @@ -45,10 +45,10 @@ export const themes = { type: 'Light', styles: require('../../sass/themes/katzen-milch.scss') }, - kurior: { - name: 'Kurior', + kuroir: { + name: 'Kuroir', type: 'Light', - styles: require('../../sass/themes/kurior.scss') + styles: require('../../sass/themes/kuroir.scss') }, solarizedLight: { name: 'Solarized Light', @@ -161,7 +161,7 @@ export const themes = { styles: require('../../sass/themes/tomorrow-night-blue.scss') }, tomorrowNightBright: { - name: 'Tomorrow Night Blue', + name: 'Tomorrow Night Bright', type: 'Dark', styles: require('../../sass/themes/tomorrow-night-bright.scss') }, diff --git a/src/sass/content.scss b/src/sass/content.scss index 3a71b15..c351735 100644 --- a/src/sass/content.scss +++ b/src/sass/content.scss @@ -1,5 +1,6 @@ body { user-select: text; + overflow-x: hidden; overflow-y: scroll !important; margin: 0; position: relative; @@ -91,18 +92,22 @@ body { #jsonpOpener, #jsonpCloser { - padding: 0.25rem 0 0 0.5rem; - color: black; - margin-bottom: -0.4rem; + margin-left: -1rem; } -#jsonpCloser { - margin-top: 0; +#gutter { + position: absolute; + user-select: none; + left: 0; + height: 100%; } #formattedJson { - padding-left: 1.75rem; + position: relative; + padding-left: 1.45rem; padding-top: 0.4rem; + padding-bottom: 0.4rem; + word-wrap: break-word; } pre { @@ -114,7 +119,15 @@ pre { display: block; padding-left: 1.25rem; margin-left: -1.25rem; - position: relative; +} + +:not(.collapsed) > [line-number] { + &:before { + content: attr(line-number); + position: absolute; + right: calc(100% + 0.6rem); + margin-top: 0.1rem; + } } .collapsed { @@ -140,19 +153,18 @@ pre { } .expander { - display: block; - position: absolute; - width: 1.25rem; - height: 1.15rem; - left: 0.3rem; + float: left; + margin-left: -1.05rem; + margin-right: 0.25rem; font-size: 24px; z-index: 5; opacity: 0.15; cursor: pointer; &:before { - display: block; + display: inline; content: '▾'; + user-select: none; } .collapsed > &:before { @@ -182,7 +194,7 @@ pre { /* SYNTAX HIGHLIGHTING */ #formattedJson, #jsonpOpener, #jsonpCloser, pre { - font: 13px/1.15rem monospace; + font: 13px/1.1rem monospace; } .string { diff --git a/src/sass/themes/_base.scss b/src/sass/themes/_base.scss index 3bd5463..b6fc94b 100644 --- a/src/sass/themes/_base.scss +++ b/src/sass/themes/_base.scss @@ -14,4 +14,8 @@ body {} .brace {} +#gutter {} + +[line-number]:before {} + .collapsed:after {} diff --git a/src/sass/themes/ambiance.scss b/src/sass/themes/ambiance.scss index 9312742..3250e78 100644 --- a/src/sass/themes/ambiance.scss +++ b/src/sass/themes/ambiance.scss @@ -8,11 +8,11 @@ body { } .key { - color: #9999cc; + color: #99c; } .number { - color: #78Cf8a; + color: #78cf8a; } .string { @@ -20,13 +20,25 @@ body { } .bool, .null { - color: #cf7Ea9; + color: #cf7ea9; } .brace { color: #24c2c7; } +#gutter { + background-color: #3d3d3d; + background-image: linear-gradient(to right, #3d3d3d, #333); + background-repeat: repeat-x; + border-right: 1px solid #4d4d4d; +} + +[line-number]:before { + text-shadow: 0 1px 1px #4d4d4d; + color: #222; +} + .collapsed:after { font-style: italic; color: #555; diff --git a/src/sass/themes/chaos.scss b/src/sass/themes/chaos.scss index ccc2ac9..52216b8 100644 --- a/src/sass/themes/chaos.scss +++ b/src/sass/themes/chaos.scss @@ -10,7 +10,7 @@ body { } .key { - color: #997744; + color: #974; } .number { @@ -29,6 +29,16 @@ body { color: $foreground; } +#gutter { + background: #141414; + border-right: 1px solid #282828; + +} + +[line-number]:before { + color: #595959; +} + .collapsed:after { font-style: italic; color: #555; diff --git a/src/sass/themes/chrome.scss b/src/sass/themes/chrome.scss index a95ecbe..81809a5 100644 --- a/src/sass/themes/chrome.scss +++ b/src/sass/themes/chrome.scss @@ -29,6 +29,14 @@ body { color: $foreground; } +#gutter { + background: #ebebeb; +} + +[line-number]:before { + color: #333; +} + .collapsed:after { color: #236e24; } diff --git a/src/sass/themes/clouds-midnight.scss b/src/sass/themes/clouds-midnight.scss index 28b9f49..1870905 100644 --- a/src/sass/themes/clouds-midnight.scss +++ b/src/sass/themes/clouds-midnight.scss @@ -29,6 +29,14 @@ body { color: $foreground; } +#gutter { + background: #232323; +} + +[line-number]:before { + color: $foreground; +} + .collapsed:after { color: #3c403b; } diff --git a/src/sass/themes/clouds.scss b/src/sass/themes/clouds.scss index 8c40628..b3b6d1f 100644 --- a/src/sass/themes/clouds.scss +++ b/src/sass/themes/clouds.scss @@ -29,6 +29,14 @@ body { color: $foreground; } +#gutter { + background: #ebebeb; +} + +[line-number]:before { + color: #333; +} + .collapsed:after { color: #bcc8ba; } diff --git a/src/sass/themes/cobalt.scss b/src/sass/themes/cobalt.scss index 1ea3801..f316dae 100644 --- a/src/sass/themes/cobalt.scss +++ b/src/sass/themes/cobalt.scss @@ -25,7 +25,15 @@ body { color: $foreground; } +#gutter { + background: #011e3a; +} + +[line-number]:before { + color: #8091a0; +} + .collapsed:after { font-style: italic; - color: #0088ff; + color: #08f; } diff --git a/src/sass/themes/crimson-editor.scss b/src/sass/themes/crimson-editor.scss index 2e3dbbf..48958ec 100644 --- a/src/sass/themes/crimson-editor.scss +++ b/src/sass/themes/crimson-editor.scss @@ -29,6 +29,14 @@ body { color: $foreground; } +#gutter { + background: #ebebeb; +} + +[line-number]:before { + color: #333; +} + .collapsed:after { color: #4c886b; } diff --git a/src/sass/themes/dawn.scss b/src/sass/themes/dawn.scss index e13da2e..b762433 100644 --- a/src/sass/themes/dawn.scss +++ b/src/sass/themes/dawn.scss @@ -25,6 +25,14 @@ body { color: $foreground; } +#gutter { + background: #ebebeb; +} + +[line-number]:before { + color: #333; +} + .collapsed:after { font-style: italic; color: #5a525f diff --git a/src/sass/themes/dreamweaver.scss b/src/sass/themes/dreamweaver.scss index 7815952..9d08281 100644 --- a/src/sass/themes/dreamweaver.scss +++ b/src/sass/themes/dreamweaver.scss @@ -29,6 +29,14 @@ body { color: $foreground; } +#gutter { + background: #e8e8e8; +} + +[line-number]:before { + color: #333; +} + .collapsed:after { color: #4c886b; } diff --git a/src/sass/themes/eclipse.scss b/src/sass/themes/eclipse.scss index 8fa3ed7..aa5c677 100644 --- a/src/sass/themes/eclipse.scss +++ b/src/sass/themes/eclipse.scss @@ -29,6 +29,15 @@ body { color: $foreground; } +#gutter { + background: #ebebeb; + border-right: 1px solid #9f9f9f; +} + +[line-number]:before { + color: #888; +} + .collapsed:after { color: #719682; } diff --git a/src/sass/themes/github.scss b/src/sass/themes/github.scss index 7ffb5e8..61ad0a6 100644 --- a/src/sass/themes/github.scss +++ b/src/sass/themes/github.scss @@ -27,6 +27,14 @@ body { color: $foreground; } +#gutter { + background: #e8e8e8; +} + +[line-number]:before { + color: #aaa; +} + .collapsed:after { color: #998; font-style: italic; diff --git a/src/sass/themes/gob.scss b/src/sass/themes/gob.scss index f64e419..a6aeed4 100644 --- a/src/sass/themes/gob.scss +++ b/src/sass/themes/gob.scss @@ -25,6 +25,14 @@ body { color: $foreground; } +#gutter { + background: #0b1818; +} + +[line-number]:before { + color: #03ee03; +} + .collapsed:after { font-style: italic; color: #00e060; diff --git a/src/sass/themes/gruvbox.scss b/src/sass/themes/gruvbox.scss index fb4d472..f65cff5 100644 --- a/src/sass/themes/gruvbox.scss +++ b/src/sass/themes/gruvbox.scss @@ -25,6 +25,10 @@ body { color: $foreground; } +[line-number]:before { + color: $foreground; +} + .collapsed:after { font-style: italic; color: #928375; diff --git a/src/sass/themes/idle-fingers.scss b/src/sass/themes/idle-fingers.scss index 92ed7e8..1f68824 100644 --- a/src/sass/themes/idle-fingers.scss +++ b/src/sass/themes/idle-fingers.scss @@ -25,6 +25,14 @@ body { color: $foreground; } +#gutter { + background: #3b3b3b; +} + +[line-number]:before { + color: #999; +} + .collapsed:after { font-style: italic; color: #bc9458; diff --git a/src/sass/themes/iplastic.scss b/src/sass/themes/iplastic.scss index 3b30674..ba9c108 100644 --- a/src/sass/themes/iplastic.scss +++ b/src/sass/themes/iplastic.scss @@ -27,6 +27,14 @@ body { color: $foreground; } +#gutter { + background: #ddd; +} + +[line-number]:before { + color: #666; +} + .collapsed:after { color: #777; font-style: italic; diff --git a/src/sass/themes/katzen-milch.scss b/src/sass/themes/katzen-milch.scss index 3276fe6..b21e458 100644 --- a/src/sass/themes/katzen-milch.scss +++ b/src/sass/themes/katzen-milch.scss @@ -33,6 +33,14 @@ body { color: $foreground; } +#gutter { + background: #e8e8e8; +} + +[line-number]:before { + color: #333; +} + .collapsed:after { font-style: italic; color: rgba(64, 79, 80, 0.67); diff --git a/src/sass/themes/kr-theme.scss b/src/sass/themes/kr-theme.scss index b779f06..3007e21 100644 --- a/src/sass/themes/kr-theme.scss +++ b/src/sass/themes/kr-theme.scss @@ -25,6 +25,14 @@ body { color: $foreground; } +#gutter { + background: #1c1917; +} + +[line-number]:before { + color: $foreground; +} + .collapsed:after { font-style: italic; color: #706d5b; diff --git a/src/sass/themes/kurior.scss b/src/sass/themes/kuroir.scss similarity index 91% rename from src/sass/themes/kurior.scss rename to src/sass/themes/kuroir.scss index c9c1b0b..8dd03b2 100644 --- a/src/sass/themes/kurior.scss +++ b/src/sass/themes/kuroir.scss @@ -29,6 +29,10 @@ body { color: $foreground; } +[line-number]:before { + color: #333; +} + .collapsed:after { color: transparentize(#949494, 0.09); background-color: transparentize(#dcdcdc, 0.44); diff --git a/src/sass/themes/merbivore-soft.scss b/src/sass/themes/merbivore-soft.scss index 3d5e24c..7361cfa 100644 --- a/src/sass/themes/merbivore-soft.scss +++ b/src/sass/themes/merbivore-soft.scss @@ -29,6 +29,14 @@ body { color: $foreground; } +#gutter { + background: #262424; +} + +[line-number]:before { + color: $foreground; +} + .collapsed:after { font-style: italic; color: #ac4bb8; diff --git a/src/sass/themes/merbivore.scss b/src/sass/themes/merbivore.scss index 716088f..ffab397 100644 --- a/src/sass/themes/merbivore.scss +++ b/src/sass/themes/merbivore.scss @@ -29,6 +29,14 @@ body { color: $foreground; } +#gutter { + background: #202020; +} + +[line-number]:before { + color: $foreground; +} + .collapsed:after { font-style: italic; color: #ad2ea4; diff --git a/src/sass/themes/mono-industrial.scss b/src/sass/themes/mono-industrial.scss index 5ac6d83..2c91a2b 100644 --- a/src/sass/themes/mono-industrial.scss +++ b/src/sass/themes/mono-industrial.scss @@ -30,6 +30,14 @@ body { color: $foreground; } +#gutter { + background: #1d2521; +} + +[line-number]:before { + color: #c5c9c9; +} + .collapsed:after { color: #666c68; background-color: #151c19; diff --git a/src/sass/themes/monokai.scss b/src/sass/themes/monokai.scss index 197ab65..8039961 100644 --- a/src/sass/themes/monokai.scss +++ b/src/sass/themes/monokai.scss @@ -25,6 +25,14 @@ body { color: $foreground; } +#gutter { + background: #2f3129; +} + +[line-number]:before { + color: #8f908a; +} + .collapsed:after { color: #75715e; } diff --git a/src/sass/themes/pastel-on-dark.scss b/src/sass/themes/pastel-on-dark.scss index 62c14c5..e3f6526 100644 --- a/src/sass/themes/pastel-on-dark.scss +++ b/src/sass/themes/pastel-on-dark.scss @@ -29,6 +29,14 @@ body { color: $foreground; } +#gutter { + background: #353030; +} + +[line-number]:before { + color: $foreground; +} + .collapsed:after { color: #a6c6ff; } diff --git a/src/sass/themes/solarized-dark.scss b/src/sass/themes/solarized-dark.scss index 6a40852..d7ef3c4 100644 --- a/src/sass/themes/solarized-dark.scss +++ b/src/sass/themes/solarized-dark.scss @@ -29,6 +29,14 @@ body { color: $foreground; } +#gutter { + background: #01313f; +} + +[line-number]:before { + color: #d0edf7; +} + .collapsed:after { font-style: italic; color: #657b83; diff --git a/src/sass/themes/solarized-light.scss b/src/sass/themes/solarized-light.scss index eee94b4..750c14c 100644 --- a/src/sass/themes/solarized-light.scss +++ b/src/sass/themes/solarized-light.scss @@ -29,6 +29,14 @@ body { color: $foreground; } +#gutter { + background: #fbf1d3; +} + +[line-number]:before { + color: #333; +} + .collapsed:after { color: #93a1a1; } diff --git a/src/sass/themes/sql-server.scss b/src/sass/themes/sql-server.scss index 373595e..d819d75 100644 --- a/src/sass/themes/sql-server.scss +++ b/src/sass/themes/sql-server.scss @@ -23,6 +23,14 @@ body { color: #808080; } +#gutter { + background: #ebebeb; +} + +[line-number]:before { + color: #333; +} + .collapsed:after { color: #008000; } diff --git a/src/sass/themes/terminal.scss b/src/sass/themes/terminal.scss index 5c41364..42632e7 100644 --- a/src/sass/themes/terminal.scss +++ b/src/sass/themes/terminal.scss @@ -25,6 +25,14 @@ body { color: $foreground; } +#gutter { + background: #1a0005; +} + +[line-number]:before { + color: steelblue; +} + .collapsed:after { color: orangered; } diff --git a/src/sass/themes/textmate.scss b/src/sass/themes/textmate.scss index 1c5e059..e8eff7c 100644 --- a/src/sass/themes/textmate.scss +++ b/src/sass/themes/textmate.scss @@ -29,6 +29,14 @@ body { color: $foreground; } +#gutter { + background: #f0f0f0; +} + +[line-number]:before { + color: #333; +} + .collapsed:after { color: #4c886b; } diff --git a/src/sass/themes/tomorrow-night-blue.scss b/src/sass/themes/tomorrow-night-blue.scss index f838256..76d3192 100644 --- a/src/sass/themes/tomorrow-night-blue.scss +++ b/src/sass/themes/tomorrow-night-blue.scss @@ -25,6 +25,14 @@ body { color: $foreground; } +#gutter { + background: #00204b; +} + +[line-number]:before { + color: #7388b5; +} + .collapsed:after { color: #7285b7; } diff --git a/src/sass/themes/tomorrow-night-bright.scss b/src/sass/themes/tomorrow-night-bright.scss index f9c2726..d1cdd73 100644 --- a/src/sass/themes/tomorrow-night-bright.scss +++ b/src/sass/themes/tomorrow-night-bright.scss @@ -25,6 +25,14 @@ body { color: $foreground; } +#gutter { + background: #1a1a1a; +} + +[line-number]:before { + color: $foreground; +} + .collapsed:after { color: #969896; } diff --git a/src/sass/themes/tomorrow-night-eighties.scss b/src/sass/themes/tomorrow-night-eighties.scss index 11388af..bc5f612 100644 --- a/src/sass/themes/tomorrow-night-eighties.scss +++ b/src/sass/themes/tomorrow-night-eighties.scss @@ -25,6 +25,14 @@ body { color: $foreground; } +#gutter { + background: #272727; +} + +[line-number]:before { + color: $foreground; +} + .collapsed:after { color: #999; } diff --git a/src/sass/themes/tomorrow-night.scss b/src/sass/themes/tomorrow-night.scss index 4d00aa7..e8facaa 100644 --- a/src/sass/themes/tomorrow-night.scss +++ b/src/sass/themes/tomorrow-night.scss @@ -25,6 +25,14 @@ body { color: $foreground; } +#gutter { + background: #25282c; +} + +[line-number]:before { + color: $foreground; +} + .collapsed:after { color: #969896; } diff --git a/src/sass/themes/tomorrow.scss b/src/sass/themes/tomorrow.scss index 8e06788..476c2a1 100644 --- a/src/sass/themes/tomorrow.scss +++ b/src/sass/themes/tomorrow.scss @@ -25,6 +25,14 @@ body { color: $foreground; } +#gutter { + background: #f6f6f6; +} + +[line-number]:before { + color: $foreground; +} + .collapsed:after { color: #8e908c; } diff --git a/src/sass/themes/twilight.scss b/src/sass/themes/twilight.scss index c01954b..f95aa9b 100644 --- a/src/sass/themes/twilight.scss +++ b/src/sass/themes/twilight.scss @@ -25,6 +25,14 @@ body { color: $foreground; } +#gutter { + background: #232323; +} + +[line-number]:before { + color: #e2e2e2; +} + .collapsed:after { font-style: italic; color: #5f5a60; diff --git a/src/sass/themes/vibrant-ink.scss b/src/sass/themes/vibrant-ink.scss index 879cb92..bc41e5e 100644 --- a/src/sass/themes/vibrant-ink.scss +++ b/src/sass/themes/vibrant-ink.scss @@ -29,6 +29,14 @@ body { color: $foreground; } +#gutter { + background: #1a1a1a; +} + +[line-number]:before { + color: #bebebe; +} + .collapsed:after { color: #93c; } diff --git a/src/sass/themes/xcode.scss b/src/sass/themes/xcode.scss index 549abce..d69d2ba 100644 --- a/src/sass/themes/xcode.scss +++ b/src/sass/themes/xcode.scss @@ -25,6 +25,14 @@ body { color: $foreground; } +#gutter { + background: #e8e8e8; +} + +[line-number]:before { + color: #333; +} + .collapsed:after { color: #008e00; } diff --git a/src/sass/transition.scss b/src/sass/transition.scss index d20e30d..678e1a8 100644 --- a/src/sass/transition.scss +++ b/src/sass/transition.scss @@ -37,6 +37,14 @@ body { @include transition; } +#gutter { + @include transition; +} + +[line-number]:before { + @include transition; +} + .collapsed:after { @include transition; } diff --git a/webpack.config.js b/webpack.config.js index 33f2534..33fd0e7 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -13,7 +13,12 @@ module.exports = { }, { test: /\.scss$/, - use: ['text-loader', 'sass-loader?outputStyle=compressed'] + use: [ + 'to-string-loader', + 'css-loader?importLoaders=1', + 'postcss-loader', + 'sass-loader?outputStyle=compressed' + ] } ] }, diff --git a/yarn.lock b/yarn.lock index 01c51d8..e2b4b56 100644 --- a/yarn.lock +++ b/yarn.lock @@ -200,7 +200,7 @@ atob@~1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/atob/-/atob-1.1.3.tgz#95f13629b12c3a51a5d215abdce2aa9f32f80773" -autoprefixer@^6.0.0, autoprefixer@^6.3.1: +autoprefixer@^6.0.0, autoprefixer@^6.3.1, autoprefixer@^6.7.7: version "6.7.7" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" dependencies: @@ -365,14 +365,13 @@ babel-helpers@^6.24.1: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-loader@^6.4.1: - version "6.4.1" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-6.4.1.tgz#0b34112d5b0748a8dcdbf51acf6f9bd42d50b8ca" +babel-loader@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.0.0.tgz#2e43a66bee1fff4470533d0402c8a4532fafbaf7" dependencies: find-cache-dir "^0.1.1" - loader-utils "^0.2.16" + loader-utils "^1.0.2" mkdirp "^0.5.1" - object-assign "^4.0.1" babel-messages@^6.23.0: version "6.23.0" @@ -1046,6 +1045,18 @@ core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" +cosmiconfig@^2.1.0, cosmiconfig@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-2.1.3.tgz#952771eb0dddc1cb3fa2f6fbe51a522e93b3ee0a" + dependencies: + is-directory "^0.3.1" + js-yaml "^3.4.3" + minimist "^1.2.0" + object-assign "^4.1.0" + os-homedir "^1.0.1" + parse-json "^2.2.0" + require-from-string "^1.1.0" + create-ecdh@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" @@ -1110,9 +1121,9 @@ css-color-names@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" -css-loader@^0.28.0: - version "0.28.0" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.0.tgz#417cfa9789f8cde59a30ccbf3e4da7a806889bad" +css-loader@^0.28.1: + version "0.28.1" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.1.tgz#220325599f8f00452d9ceb4c3ca6c8a66798642d" dependencies: babel-code-frame "^6.11.0" css-selector-tokenizer "^0.7.0" @@ -1125,6 +1136,7 @@ css-loader@^0.28.0: postcss-modules-local-by-default "^1.0.1" postcss-modules-scope "^1.0.0" postcss-modules-values "^1.1.0" + postcss-value-parser "^3.3.0" source-list-map "^0.1.7" css-selector-tokenizer@^0.6.0: @@ -1156,7 +1168,7 @@ cssesc@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" -"cssnano@>=2.6.1 <4": +"cssnano@>=2.6.1 <4", cssnano@^3.10.0: version "3.10.0" resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38" dependencies: @@ -2042,6 +2054,10 @@ is-builtin-module@^1.0.0: dependencies: builtin-modules "^1.0.0" +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + is-dotfile@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" @@ -2188,7 +2204,7 @@ js-tokens@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" -js-yaml@~3.7.0: +js-yaml@^3.4.3, js-yaml@~3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" dependencies: @@ -2837,7 +2853,7 @@ object-assign@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" -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" @@ -3074,6 +3090,38 @@ postcss-filter-plugins@^2.0.0: postcss "^5.0.4" uniqid "^4.0.0" +postcss-load-config@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-1.2.0.tgz#539e9afc9ddc8620121ebf9d8c3673e0ce50d28a" + dependencies: + cosmiconfig "^2.1.0" + object-assign "^4.1.0" + postcss-load-options "^1.2.0" + postcss-load-plugins "^2.3.0" + +postcss-load-options@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-load-options/-/postcss-load-options-1.2.0.tgz#b098b1559ddac2df04bc0bb375f99a5cfe2b6d8c" + dependencies: + cosmiconfig "^2.1.0" + object-assign "^4.1.0" + +postcss-load-plugins@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz#745768116599aca2f009fad426b00175049d8d92" + dependencies: + cosmiconfig "^2.1.1" + object-assign "^4.1.0" + +postcss-loader@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-1.3.3.tgz#a621ea1fa29062a83972a46f54486771301916eb" + dependencies: + loader-utils "^1.0.2" + object-assign "^4.1.1" + postcss "^5.2.15" + postcss-load-config "^1.2.0" + postcss-merge-idents@^2.1.5: version "2.1.7" resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270" @@ -3242,7 +3290,7 @@ postcss-zindex@^2.0.1: postcss "^5.0.4" uniqs "^2.0.0" -postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.16: +postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.15, postcss@^5.2.16: version "5.2.17" resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.17.tgz#cf4f597b864d65c8a492b2eabe9d706c879c388b" dependencies: @@ -3527,6 +3575,10 @@ require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" +require-from-string@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" + require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" @@ -3924,6 +3976,12 @@ to-fast-properties@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320" +to-string-loader@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/to-string-loader/-/to-string-loader-1.1.5.tgz#7b7aa17891b7bb4947a7a11bfb03b5fde9c6e695" + dependencies: + loader-utils "^0.2.16" + tough-cookie@~2.3.0: version "2.3.2" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" From 72d9484f35327b4831b5e93e8cb31e1aa0419b6a Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Tue, 2 May 2017 23:01:50 +1200 Subject: [PATCH 14/28] 0.9.0 release --- src/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/manifest.json b/src/manifest.json index aa3a1e4..ba836ce 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,6 +1,6 @@ { "name": "JSON Formatter", - "version": "0.8.3", + "version": "0.9.0", "manifest_version": 2, "description": "Makes JSON easy to read. Open source.", "homepage_url": "https://github.com/nikrolls/json-formatter", From 16e2ff66b807bb2928b7f33ad02b5663d64bf5a4 Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Wed, 3 May 2017 00:01:36 +1200 Subject: [PATCH 15/28] Fix store links in Readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 00aecb0..97a2573 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ A background worker is used to prevent the UI freezing when processing very long Installation ------------ -**Option 1** – Install it from the [Chrome Web Store](https://chrome.google.com/webstore/detail/bcjindcccaagfpapjjmafapmmgkkhgoa). +**Option 1** – Install it from the [Chrome Web Store](rome.google.com/webstore/detail/mhimpmpmffogbmmkmajibklelopddmjf/) or [Windows Store](https://www.microsoft.com/en-us/store/p/json-formatter-for-edge/9nz9d2j86w6s). **Option 2** – Install it from source: From c20f089d710e105f1fca58f61bfc035f22b6ae2e Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Wed, 3 May 2017 00:03:59 +1200 Subject: [PATCH 16/28] Fixed build instructions --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 97a2573..0b3bb4c 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Installation 1. Clone/download this repo 2. Install dependencies using [NPM](https://nodejs.org/) or [Yarn](https://yarnpkg.com/en/). -3. Build the extension: `gulp dist` +3. Build the extension: `gulp build:dist` 4. Side-load the extension in your browser as per below Chrome @@ -34,14 +34,14 @@ Chrome 5. Open Chrome and go to `chrome://chrome/extensions/` 6. Enable "Developer mode" 7. Click "Load unpacked extension" -8. Select the `dist` folder created in step 3 +8. Select the `build` folder created in step 3 Edge 5. Open Edge and go to `about:flags` 6. Enable the option "Enable extension developer features" and restart the browser 7. Click on the ellipsis (...) menu, click "Extensions", and click "Load extension" -8. Select the `dist` folder created in step 3 +8. Select the `build` folder created in step 3 FAQ --- From 562f72163dae22ea0febe105cfd8128fedf8891e Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Thu, 4 May 2017 10:55:28 +1200 Subject: [PATCH 17/28] Fixed Chrome extension link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0b3bb4c..b59562b 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ A background worker is used to prevent the UI freezing when processing very long Installation ------------ -**Option 1** – Install it from the [Chrome Web Store](rome.google.com/webstore/detail/mhimpmpmffogbmmkmajibklelopddmjf/) or [Windows Store](https://www.microsoft.com/en-us/store/p/json-formatter-for-edge/9nz9d2j86w6s). +**Option 1** – Install it from the [Chrome Web Store](https://chrome.google.com/webstore/detail/mhimpmpmffogbmmkmajibklelopddmjf/) or [Windows Store](https://www.microsoft.com/en-us/store/p/json-formatter-for-edge/9nz9d2j86w6s). **Option 2** – Install it from source: From f51d0960095808d58c675baa85da4c0a888e6124 Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Fri, 5 May 2017 15:55:35 +1200 Subject: [PATCH 18/28] Fixed doubled line numbers on empty objects and arrays --- src/js/lib/dom-builder.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/js/lib/dom-builder.js b/src/js/lib/dom-builder.js index 67f7581..dc1648c 100644 --- a/src/js/lib/dom-builder.js +++ b/src/js/lib/dom-builder.js @@ -155,8 +155,10 @@ function getKeyValueOrValueDom(value, keyName) { // Add closing brace const closingBrace = templates.closingBrace(); - closingBrace.setAttribute('line-number', lineNumber++); keyValueOrValue.appendChild(closingBrace); + if (nonZeroSize) { + closingBrace.setAttribute('line-number', lineNumber++); + } break; case TOKEN_TYPES.ARRAY: @@ -184,8 +186,10 @@ function getKeyValueOrValueDom(value, keyName) { } // Add closing bracket const closingBracket = templates.closingBracket(); - closingBracket.setAttribute('line-number', lineNumber++); keyValueOrValue.appendChild(closingBracket); + if (nonZeroSize) { + closingBracket.setAttribute('line-number', lineNumber++); + } break; case TOKEN_TYPES.BOOL: From 74a209cf0abb281c3c00140e5867fff2486b9fa5 Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Fri, 5 May 2017 15:56:52 +1200 Subject: [PATCH 19/28] Release 0.9.1 --- src/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/manifest.json b/src/manifest.json index ba836ce..6ad04c9 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,6 +1,6 @@ { "name": "JSON Formatter", - "version": "0.9.0", + "version": "0.9.1", "manifest_version": 2, "description": "Makes JSON easy to read. Open source.", "homepage_url": "https://github.com/nikrolls/json-formatter", From a5c367535c5e2787ce4cd75ae564fd2198010c11 Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Mon, 8 May 2017 23:35:03 +1200 Subject: [PATCH 20/28] Switched to tokenizer over browser parse Pros: - Handles numbers of an unlimited size - No re-ordering of hash keys Cons: - Larger package size due to dependencies - Fractionally longer processing time on very long content --- README.md | 25 +-- package.json | 4 + src/js/background.js | 8 +- src/js/lib/dom-builder.js | 379 +++++++++++++++++++------------------- src/js/lib/template.js | 4 +- webpack.config.js | 4 +- yarn.lock | 77 ++++++-- 7 files changed, 265 insertions(+), 236 deletions(-) diff --git a/README.md b/README.md index b59562b..3e7b281 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,9 @@ Features * JSONP support * Fast, even on long pages * Works on any valid JSON page – URL doesn't matter -* Syntax highlighting +* Syntax highlighting with 36 light and dark themes * Collapsible trees, with indent guides +* Line numbers * Clickable URLs * Buttons for switching between raw and parsed JSON * Parsed JSON is exported as a global variable, `json`, so you can inspect it in the console @@ -43,23 +44,7 @@ Edge 7. Click on the ellipsis (...) menu, click "Extensions", and click "Load extension" 8. Select the `build` folder created in step 3 -FAQ ---- +**Some URLs to try it on:** -### Why are large numbers not displayed accurately? - -This is a [limitation of JavaScript](http://www.ecma-international.org/ecma-262/5.1/#sec-15.7.3.2). The largest possible number is `Number.MAX_SAFE_INTEGER`, or **9007199254740991**. If you try to use a number larger than this in JavaScript, you'll lose accuracy. - -The idea of JSON Formatter is to show you how the computer sees your JSON, so we don't attempt to circumvent this limitation, otherwise that would give a misleading representation of your data. It's better to see exactly what the JavaScript engine sees. - -If you want to use long sequences of digits in your JSON, then **quote them as strings**. - -### Why are object keys sometimes in the wrong order? - -What you see in JSON Formatter is a representation of the **parsed** object/array. You see what the browser engine sees. - -Plain JavaScript objects are [unordered collections of properties](http://www.ecma-international.org/ecma-262/5.1/#sec-12.6.4). If you go through them with `for...in`, for example, there is no guarantee of any particular order. In practice, most engines maintain the order in which the keys were first declared, but V8 moves any numeric keys (e.g. `"1234"`) to the front, for a small performance gain. This was a [controversial issue](https://code.google.com/p/v8/issues/detail?id=164) – a lot of people think it sucks that you can't predict key enumeration order in Chrome – but the V8 team refused to 'fix' it, because it's not a bug, and they're right. If you want your values to be in a certain order, and you're relying on the non-standard key-ordering logic of a particular engine, then your code is broken. Restructure your data to use arrays. - -##### But I just want it to be in order for readability - -That would require tokenising the JSON string manually instead of using `JSON.parse`, which would be too slow. And it's not a good idea to go down the road of representing the data differently from how the engine actually sees it. +* https://en.wikipedia.org/w/api.php?action=query&titles=Main%20Page&prop=contributors&format=json +* http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=jsonp&tags=json&tagmode=any&format=json diff --git a/package.json b/package.json index 807714e..df92fb7 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "gulp-sourcemaps": "^2.6.0", "gulp-uglify": "^2.1.2", "gulp-zip": "^4.0.0", + "json-tokenizer": "^1.0.1", "node-sass": "^4.5.2", "postcss-loader": "^1.3.3", "sass-loader": "^6.0.3", @@ -27,5 +28,8 @@ "vinyl-named": "^1.1.0", "webpack": "^2.4.1", "webpack-stream": "^3.2.0" + }, + "devDependencies": { + "babel-preset-es2015": "^6.24.1" } } diff --git a/src/js/background.js b/src/js/background.js index dec4d85..bc7cd48 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -3,7 +3,7 @@ import browser from './lib/browser'; import { listen } from './lib/messaging'; import { removeComments, firstJSONCharIndex } from './lib/utilities'; -import { jsonObjectToHTML } from './lib/dom-builder'; +import { jsonStringToHTML } from './lib/dom-builder'; // Record current version (in case a future update wants to know) browser.storage.local.set({appVersion: browser.runtime.getManifest().version}); @@ -91,10 +91,8 @@ listen((port, msg) => { port.postMessage(['FORMATTING']); // Do formatting - const html = jsonObjectToHTML(obj, jsonpFunctionName); - - // Post the HTML string to the content script - port.postMessage(['FORMATTED', html, validJsonText]); + jsonStringToHTML(validJsonText, jsonpFunctionName) + .then(html => port.postMessage(['FORMATTED', html, validJsonText])); } else if (msg.type === 'GET STORED THEME') { browser.storage.sync.get('theme', (data) => { port.postMessage({type: 'STORED THEME', themeName: data && data.theme}) diff --git a/src/js/lib/dom-builder.js b/src/js/lib/dom-builder.js index dc1648c..37b35b8 100644 --- a/src/js/lib/dom-builder.js +++ b/src/js/lib/dom-builder.js @@ -1,209 +1,206 @@ 'use strict'; import { createSpan, Templates } from './template'; - -const TOKEN_TYPES = { - STRING: 'STRING', - NUMBER: 'NUMBER', - OBJECT: 'OBJECT', - ARRAY: 'ARRAY', - BOOL: 'BOOL', - NULL: 'NULL', -}; +import JsonTokenizer from 'json-tokenizer'; let lineNumber; -export function jsonObjectToHTML(obj, jsonpFunctionName) { - // Format object (using recursive keyValueOrValue builder) +export function jsonStringToHTML(jsonString, jsonpFunctionName) { lineNumber = jsonpFunctionName === null ? 1 : 2; - const rootKeyValueOrValue = getKeyValueOrValueDom(obj, false); - - // The whole DOM is now built. - - // Set class on root node to identify it - rootKeyValueOrValue.classList.add('rootKeyValueOrValue'); - - const gutterWidth = 1 + (lineNumber.toString().length * 0.5) + 'rem'; - const gutter = document.createElement('div'); - gutter.id = 'gutter'; - gutter.style.width = gutterWidth; - - // Make div#formattedJson and append the root keyValueOrValue - const divFormattedJson = document.createElement('div'); - divFormattedJson.id = 'formattedJson'; - divFormattedJson.style.marginLeft = gutterWidth; - divFormattedJson.appendChild(rootKeyValueOrValue); - - // Top and tail with JSONP padding if necessary - if (jsonpFunctionName !== null) { - divFormattedJson.innerHTML = - `
${jsonpFunctionName}(
- ${divFormattedJson.innerHTML} -
)
`; - } - - // Return the HTML - return gutter.outerHTML + divFormattedJson.outerHTML; + return tokenize(jsonString) + .then((rootKeyValueOrValue) => { + const gutterWidth = 1 + (lineNumber.toString().length * 0.5) + 'rem'; + const gutter = document.createElement('div'); + gutter.id = 'gutter'; + gutter.style.width = gutterWidth; + + // Make div#formattedJson and append the root keyValueOrValue + const divFormattedJson = document.createElement('div'); + divFormattedJson.id = 'formattedJson'; + divFormattedJson.style.marginLeft = gutterWidth; + divFormattedJson.appendChild(rootKeyValueOrValue); + + // Top and tail with JSONP padding if necessary + if (jsonpFunctionName !== null) { + divFormattedJson.innerHTML = + `
${jsonpFunctionName}(
+ ${divFormattedJson.innerHTML} +
)
`; + } + + // Return the HTML + return gutter.outerHTML + divFormattedJson.outerHTML; + }); } -// Core recursive DOM-building function -function getKeyValueOrValueDom(value, keyName) { +function tokenize(jsonString) { const templates = Templates; - let type, nonZeroSize; - - // Establish value type - if (typeof value === 'string') { - type = TOKEN_TYPES.STRING; - } else if (typeof value === 'number') { - type = TOKEN_TYPES.NUMBER; - } else if (value === false || value === true) { - type = TOKEN_TYPES.BOOL; - } else if (value === null) { - type = TOKEN_TYPES.NULL; - } else if (value instanceof Array) { - type = TOKEN_TYPES.ARRAY; - } else { - type = TOKEN_TYPES.OBJECT; - } - - // Root node for this keyValueOrValue - const keyValueOrValue = templates.keyValueOrValue(); - keyValueOrValue.setAttribute('line-number', lineNumber++); - - // Add an 'expander' first (if this is object/array with non-zero size) - if (type === TOKEN_TYPES.OBJECT || type === TOKEN_TYPES.ARRAY) { - nonZeroSize = Object.keys(value).some((key) => value.hasOwnProperty(key)); - - if (nonZeroSize) { - keyValueOrValue.appendChild(templates.expander()); + + let currentNode = templates.keyValueOrValue(); + currentNode.classList.add('rootKeyValueOrValue'); + + const tokenizer = new JsonTokenizer(); + tokenizer.on('data', (token) => { + if (currentNode.tokenType === 'array') { + const keyValueOrValue = templates.keyValueOrValue(); + keyValueOrValue.classList.add('arrayElement'); + keyValueOrValue.setAttribute('line-number', lineNumber++); + currentNode.appendChild(keyValueOrValue); + currentNode = keyValueOrValue; } - } - - // If there's a key, add that before the value - if (keyName !== false) { // NB: "" is a legal keyname in JSON - // This keyValueOrValue must be an object property - keyValueOrValue.classList.add('objectProperty'); - // Create a span for the key name - const keySpan = templates.key(); - keySpan.textContent = JSON.stringify(keyName); - keyValueOrValue.appendChild(keySpan); - // Also add ": " (colon and non-breaking space) - keyValueOrValue.appendChild(templates.colonAndSpace()); - } - else { - // This is an array element instead - keyValueOrValue.classList.add('arrayElement'); - } - - // Generate DOM for this value - let blockInner, childKeyValueOrValue, valueElement; - switch (type) { - case TOKEN_TYPES.STRING: - // If string is a URL, get a link, otherwise get a span - const innerStringEl = createSpan(); - let escapedString = JSON.stringify(value); - escapedString = escapedString.substring(1, escapedString.length - 1); // remove quotes - if (value[0] === 'h' && value.substring(0, 4) === 'http') { // crude but fast - some false positives, but rare, and UX doesn't suffer terribly from them. - const innerStringA = document.createElement('A'); - innerStringA.href = value; - innerStringA.innerText = escapedString; - innerStringEl.appendChild(innerStringA); - } - else { - innerStringEl.innerText = escapedString; - } - valueElement = templates.string(); - valueElement.appendChild(templates.doubleQuoteText()); - valueElement.appendChild(innerStringEl); - valueElement.appendChild(templates.doubleQuoteText()); - keyValueOrValue.appendChild(valueElement); - break; - - case TOKEN_TYPES.NUMBER: - // Simply add a number element (span.n) - valueElement = templates.number(); - valueElement.innerText = value; - keyValueOrValue.appendChild(valueElement); - break; - - case TOKEN_TYPES.OBJECT: - // Add opening brace - keyValueOrValue.appendChild(templates.openingBrace()); - // If any properties, add a blockInner containing k/v pair(s) - if (nonZeroSize) { - // Add ellipsis (empty, but will be made to do something when keyValueOrValue is collapsed) - keyValueOrValue.appendChild(templates.ellipsis()); - // Create blockInner, which indents (don't attach yet) - blockInner = templates.blockInner(); - // For each key/value pair, add as a keyValueOrValue to blockInner - let count = 0, comma; - for (let k in value) { - if (value.hasOwnProperty(k)) { - count++; - childKeyValueOrValue = getKeyValueOrValueDom(value[k], k); - // Add comma - comma = templates.commaText(); - childKeyValueOrValue.appendChild(comma); - blockInner.appendChild(childKeyValueOrValue); - } + + switch (token.type) { + case 'comma': + currentNode.appendChild(templates.commaText()); + if (currentNode.classList.contains('keyValueOrValue')) { + currentNode = currentNode.parentNode; } - // Now remove the last comma - childKeyValueOrValue.removeChild(comma); - // Add blockInner - keyValueOrValue.appendChild(blockInner); - } + break; - // Add closing brace - const closingBrace = templates.closingBrace(); - keyValueOrValue.appendChild(closingBrace); - if (nonZeroSize) { - closingBrace.setAttribute('line-number', lineNumber++); - } - break; - - case TOKEN_TYPES.ARRAY: - // Add opening bracket - keyValueOrValue.appendChild(templates.openingBracket()); - // If non-zero length array, add blockInner containing inner vals - if (nonZeroSize) { - // Add ellipsis - keyValueOrValue.appendChild(templates.ellipsis()); - // Create blockInner (which indents) (don't attach yet) - blockInner = templates.blockInner(); - // For each key/value pair, add the markup - for (let i = 0, length = value.length, lastIndex = length - 1; i < length; i++) { - // Make a new keyValueOrValue, with no key - childKeyValueOrValue = getKeyValueOrValueDom(value[i], false); - // Add comma if not last one - if (i < lastIndex) { - childKeyValueOrValue.appendChild(templates.commaText()); - } - // Append the child keyValueOrValue - blockInner.appendChild(childKeyValueOrValue); + case 'end-label': + currentNode.appendChild(templates.colonAndSpace()); + break; + + case 'begin-object': + if (!currentNode.classList.contains('objectProperty')) { + currentNode.setAttribute('line-number', lineNumber++); } - // Add blockInner - keyValueOrValue.appendChild(blockInner); - } - // Add closing bracket - const closingBracket = templates.closingBracket(); - keyValueOrValue.appendChild(closingBracket); - if (nonZeroSize) { - closingBracket.setAttribute('line-number', lineNumber++); - } - break; - case TOKEN_TYPES.BOOL: - if (value) { - keyValueOrValue.appendChild(templates.true); - } else { - keyValueOrValue.appendChild(templates.false()); - } - break; + currentNode.appendChild(templates.expander()); + currentNode.appendChild(templates.openingBrace()); + currentNode.appendChild(templates.ellipsis()); + + const objectInner = templates.blockInner(); + objectInner.tokenType = 'object'; + + currentNode.appendChild(objectInner); + currentNode = objectInner; + break; + + case 'end-object': + if (currentNode.classList.contains('objectProperty')) { + currentNode = currentNode.parentNode; + } + + const objectContentNode = currentNode; + currentNode = currentNode.parentNode; + + const closingBrace = templates.closingBrace(); + currentNode.appendChild(closingBrace); + + if (objectContentNode.childNodes.length) { + closingBrace.setAttribute('line-number', lineNumber++); + } else { + objectContentNode.remove(); + currentNode.parentNode.querySelector('.expander').remove(); + currentNode.parentNode.querySelector('.ellipsis').remove(); + } + break; + + case 'begin-array': + if (!currentNode.classList.contains('objectProperty')) { + currentNode.setAttribute('line-number', lineNumber++); + } + + currentNode.appendChild(templates.expander()); + currentNode.appendChild(templates.openingBracket()); + currentNode.appendChild(templates.ellipsis()); + + const arrayInner = templates.blockInner(); + arrayInner.tokenType = 'array'; + + currentNode.appendChild(arrayInner); + currentNode = arrayInner; + break; + + case 'end-array': + if (currentNode.classList.contains('arrayElement')) { + currentNode = currentNode.parentNode; + } + + const arrayContentNode = currentNode; + currentNode = currentNode.parentNode; + + const closingBracket = templates.closingBracket(); + currentNode.appendChild(closingBracket); + + if (arrayContentNode.innerText.length) { + closingBracket.setAttribute('line-number', lineNumber++); + } else { + arrayContentNode.remove(); + currentNode.parentNode.querySelector('.expander').remove(); + currentNode.parentNode.querySelector('.ellipsis').remove(); + } + break; + + case 'string': + case 'maybe-string': + if (currentNode.tokenType === 'object') { + const keyValueOrValue = templates.keyValueOrValue(); + keyValueOrValue.setAttribute('line-number', lineNumber++); + keyValueOrValue.classList.add('objectProperty'); + + const keySpan = templates.key(); + keySpan.textContent = token.content; + keyValueOrValue.appendChild(keySpan); + + currentNode.appendChild(keyValueOrValue); + currentNode = keyValueOrValue; + } else { + const innerStringEl = createSpan(); + const content = JSON.parse(token.content); + let escapedValue = JSON.stringify(content); + escapedValue = escapedValue.substring(1, escapedValue.length - 1); + + // crude but fast - some false positives, but rare, and UX doesn't suffer terribly from them. + if (content[0] === 'h' && content.substring(0, 4) === 'http') { + const innerStringA = document.createElement('A'); + innerStringA.href = escapedValue; + innerStringA.innerText = escapedValue; + innerStringEl.appendChild(innerStringA); + } else { + innerStringEl.innerText = escapedValue; + } + + const valueElement = templates.string(); + valueElement.appendChild(templates.doubleQuoteText()); + valueElement.appendChild(innerStringEl); + valueElement.appendChild(templates.doubleQuoteText()); + currentNode.appendChild(valueElement); + } + break; + + case 'null': + currentNode.appendChild(templates.null()); + break; + + case 'boolean': + const boolean = templates.boolean(); + boolean.innerText = token.content; + currentNode.appendChild(boolean); + break; + + case 'number': + case 'maybe-decimal-number': + case 'maybe-negative-number': + case 'maybe-exponential-number': + case 'maybe-exponential-number-negative': + const numberElement = templates.number(); + numberElement.innerText = token.content; + currentNode.appendChild(numberElement); + break; + + case 'symbol': + const symbolElement = templates.createSpan(); + symbolElement.innerText = token.content; + currentNode.appendChild(symbolElement); + break; + } + }); - case TOKEN_TYPES.NULL: - keyValueOrValue.appendChild(templates.null()); - break; - } + tokenizer.end(jsonString); - return keyValueOrValue; + return new Promise((resolve) => { + tokenizer.on('end', () => resolve(currentNode)); + }); } diff --git a/src/js/lib/template.js b/src/js/lib/template.js index 938563e..c0b6257 100644 --- a/src/js/lib/template.js +++ b/src/js/lib/template.js @@ -26,10 +26,8 @@ export const Templates = { key: createSpanWithClass('key'), string: createSpanWithClass('string'), number: createSpanWithClass('number'), - + boolean: createSpanWithClass('bool'), null: createSpanWithTextAndClass('null', 'null'), - true: createSpanWithTextAndClass('true', 'bool'), - false: createSpanWithTextAndClass('false', 'bool'), openingBrace: createSpanWithTextAndClass('{', 'brace'), closingBrace: createSpanWithTextAndClass('}', 'brace'), diff --git a/webpack.config.js b/webpack.config.js index 33fd0e7..1fd2e97 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -7,7 +7,9 @@ module.exports = { use: { loader: 'babel-loader', options: { - presets: ['env'] + presets: [ + ['env', {modules: false}] + ] } } }, diff --git a/yarn.lock b/yarn.lock index e2b4b56..f4b31ec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -417,7 +417,7 @@ babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-block-scoping@^6.23.0: +babel-plugin-transform-es2015-block-scoping@^6.23.0, babel-plugin-transform-es2015-block-scoping@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz#76c295dc3a4741b1665adfd3167215dcff32a576" dependencies: @@ -427,7 +427,7 @@ babel-plugin-transform-es2015-block-scoping@^6.23.0: babel-types "^6.24.1" lodash "^4.2.0" -babel-plugin-transform-es2015-classes@^6.23.0: +babel-plugin-transform-es2015-classes@^6.23.0, babel-plugin-transform-es2015-classes@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" dependencies: @@ -441,33 +441,33 @@ babel-plugin-transform-es2015-classes@^6.23.0: babel-traverse "^6.24.1" babel-types "^6.24.1" -babel-plugin-transform-es2015-computed-properties@^6.22.0: +babel-plugin-transform-es2015-computed-properties@^6.22.0, babel-plugin-transform-es2015-computed-properties@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" dependencies: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-plugin-transform-es2015-destructuring@^6.23.0: +babel-plugin-transform-es2015-destructuring@^6.22.0, babel-plugin-transform-es2015-destructuring@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-duplicate-keys@^6.22.0: +babel-plugin-transform-es2015-duplicate-keys@^6.22.0, babel-plugin-transform-es2015-duplicate-keys@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" -babel-plugin-transform-es2015-for-of@^6.23.0: +babel-plugin-transform-es2015-for-of@^6.22.0, babel-plugin-transform-es2015-for-of@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-function-name@^6.22.0: +babel-plugin-transform-es2015-function-name@^6.22.0, babel-plugin-transform-es2015-function-name@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" dependencies: @@ -498,7 +498,7 @@ babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-e babel-template "^6.24.1" babel-types "^6.24.1" -babel-plugin-transform-es2015-modules-systemjs@^6.23.0: +babel-plugin-transform-es2015-modules-systemjs@^6.23.0, babel-plugin-transform-es2015-modules-systemjs@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" dependencies: @@ -506,7 +506,7 @@ babel-plugin-transform-es2015-modules-systemjs@^6.23.0: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-plugin-transform-es2015-modules-umd@^6.23.0: +babel-plugin-transform-es2015-modules-umd@^6.23.0, babel-plugin-transform-es2015-modules-umd@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" dependencies: @@ -514,14 +514,14 @@ babel-plugin-transform-es2015-modules-umd@^6.23.0: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-plugin-transform-es2015-object-super@^6.22.0: +babel-plugin-transform-es2015-object-super@^6.22.0, babel-plugin-transform-es2015-object-super@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" dependencies: babel-helper-replace-supers "^6.24.1" babel-runtime "^6.22.0" -babel-plugin-transform-es2015-parameters@^6.23.0: +babel-plugin-transform-es2015-parameters@^6.23.0, babel-plugin-transform-es2015-parameters@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" dependencies: @@ -532,7 +532,7 @@ babel-plugin-transform-es2015-parameters@^6.23.0: babel-traverse "^6.24.1" babel-types "^6.24.1" -babel-plugin-transform-es2015-shorthand-properties@^6.22.0: +babel-plugin-transform-es2015-shorthand-properties@^6.22.0, babel-plugin-transform-es2015-shorthand-properties@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" dependencies: @@ -545,7 +545,7 @@ babel-plugin-transform-es2015-spread@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-sticky-regex@^6.22.0: +babel-plugin-transform-es2015-sticky-regex@^6.22.0, babel-plugin-transform-es2015-sticky-regex@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" dependencies: @@ -559,13 +559,13 @@ babel-plugin-transform-es2015-template-literals@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-typeof-symbol@^6.23.0: +babel-plugin-transform-es2015-typeof-symbol@^6.22.0, babel-plugin-transform-es2015-typeof-symbol@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-unicode-regex@^6.22.0: +babel-plugin-transform-es2015-unicode-regex@^6.22.0, babel-plugin-transform-es2015-unicode-regex@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" dependencies: @@ -581,7 +581,7 @@ babel-plugin-transform-exponentiation-operator@^6.22.0: babel-plugin-syntax-exponentiation-operator "^6.8.0" babel-runtime "^6.22.0" -babel-plugin-transform-regenerator@^6.22.0: +babel-plugin-transform-regenerator@^6.22.0, babel-plugin-transform-regenerator@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz#b8da305ad43c3c99b4848e4fe4037b770d23c418" dependencies: @@ -628,6 +628,35 @@ babel-preset-env@^1.4.0: browserslist "^1.4.0" invariant "^2.2.2" +babel-preset-es2015@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939" + dependencies: + babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-transform-es2015-arrow-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.24.1" + babel-plugin-transform-es2015-classes "^6.24.1" + babel-plugin-transform-es2015-computed-properties "^6.24.1" + babel-plugin-transform-es2015-destructuring "^6.22.0" + babel-plugin-transform-es2015-duplicate-keys "^6.24.1" + babel-plugin-transform-es2015-for-of "^6.22.0" + babel-plugin-transform-es2015-function-name "^6.24.1" + babel-plugin-transform-es2015-literals "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-plugin-transform-es2015-modules-systemjs "^6.24.1" + babel-plugin-transform-es2015-modules-umd "^6.24.1" + babel-plugin-transform-es2015-object-super "^6.24.1" + babel-plugin-transform-es2015-parameters "^6.24.1" + babel-plugin-transform-es2015-shorthand-properties "^6.24.1" + babel-plugin-transform-es2015-spread "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.24.1" + babel-plugin-transform-es2015-template-literals "^6.22.0" + babel-plugin-transform-es2015-typeof-symbol "^6.22.0" + babel-plugin-transform-es2015-unicode-regex "^6.24.1" + babel-plugin-transform-regenerator "^6.24.1" + babel-register@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.1.tgz#7e10e13a2f71065bdfad5a1787ba45bca6ded75f" @@ -1318,6 +1347,10 @@ diffie-hellman@^5.0.0: miller-rabin "^4.0.0" randombytes "^2.0.0" +disect@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/disect/-/disect-1.1.1.tgz#b2b520fab720abed83ec1a41f61979f4f318aca7" + domain-browser@^1.1.1: version "1.1.7" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" @@ -2241,6 +2274,12 @@ json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" +json-tokenizer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-tokenizer/-/json-tokenizer-1.0.1.tgz#c4515496cd253e92a4ae71adbf05b75dc0ecc6c9" + dependencies: + tokenizer "~1.1.2" + json5@^0.5.0, json5@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" @@ -3982,6 +4021,12 @@ to-string-loader@^1.1.5: dependencies: loader-utils "^0.2.16" +tokenizer@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/tokenizer/-/tokenizer-1.1.2.tgz#0058bdc229affaed05b29333675ccf53eae34f5d" + dependencies: + disect "~1.1.0" + tough-cookie@~2.3.0: version "2.3.2" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" From 64eae225b8767cce46ac3c758074971cef1a8be2 Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Mon, 8 May 2017 23:48:22 +1200 Subject: [PATCH 21/28] Release 0.10.0 --- src/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/manifest.json b/src/manifest.json index 6ad04c9..861a31f 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,6 +1,6 @@ { "name": "JSON Formatter", - "version": "0.9.1", + "version": "0.10.0", "manifest_version": 2, "description": "Makes JSON easy to read. Open source.", "homepage_url": "https://github.com/nikrolls/json-formatter", From afd0f57ce442f99c05585123960b4860447509ad Mon Sep 17 00:00:00 2001 From: Nik Rolls Date: Sun, 4 Feb 2018 15:56:47 +1300 Subject: [PATCH 22/28] Move to using WebExtension APIs for CSS injection This is to prevent it being blocked on sites with CSP headers. --- gulpfile.js | 1 - src/js/background.js | 6 +- src/js/content.js | 23 ++-- src/js/lib/browser.js | 3 + src/js/lib/theme-switcher.js | 39 +++---- src/js/lib/themes.js | 108 +++++++------------ src/manifest.json | 2 +- src/sass/content.scss | 2 + src/sass/themes/_base.scss | 21 ---- src/sass/themes/_example.scss | 22 ++++ src/sass/themes/all.scss | 36 +++++++ src/sass/themes/ambiance.scss | 82 +++++++------- src/sass/themes/chaos.scss | 62 +++++------ src/sass/themes/chrome.scss | 58 +++++----- src/sass/themes/clouds-midnight.scss | 58 +++++----- src/sass/themes/clouds.scss | 58 +++++----- src/sass/themes/cobalt.scss | 54 +++++----- src/sass/themes/crimson-editor.scss | 58 +++++----- src/sass/themes/dawn.scss | 54 +++++----- src/sass/themes/dreamweaver.scss | 58 +++++----- src/sass/themes/eclipse.scss | 60 +++++------ src/sass/themes/github.scss | 58 +++++----- src/sass/themes/gob.scss | 54 +++++----- src/sass/themes/gruvbox.scss | 48 ++++----- src/sass/themes/idle-fingers.scss | 54 +++++----- src/sass/themes/iplastic.scss | 58 +++++----- src/sass/themes/katzen-milch.scss | 86 +++++++-------- src/sass/themes/kr-theme.scss | 54 +++++----- src/sass/themes/kuroir.scss | 54 +++++----- src/sass/themes/merbivore-soft.scss | 60 +++++------ src/sass/themes/merbivore.scss | 60 +++++------ src/sass/themes/mono-industrial.scss | 62 +++++------ src/sass/themes/monokai.scss | 52 ++++----- src/sass/themes/pastel-on-dark.scss | 58 +++++----- src/sass/themes/solarized-dark.scss | 60 +++++------ src/sass/themes/solarized-light.scss | 58 +++++----- src/sass/themes/sql-server.scss | 50 ++++----- src/sass/themes/terminal.scss | 52 ++++----- src/sass/themes/textmate.scss | 58 +++++----- src/sass/themes/tomorrow-night-blue.scss | 52 ++++----- src/sass/themes/tomorrow-night-bright.scss | 52 ++++----- src/sass/themes/tomorrow-night-eighties.scss | 52 ++++----- src/sass/themes/tomorrow-night.scss | 52 ++++----- src/sass/themes/tomorrow.scss | 52 ++++----- src/sass/themes/twilight.scss | 54 +++++----- src/sass/themes/vibrant-ink.scss | 58 +++++----- src/sass/themes/xcode.scss | 52 ++++----- 47 files changed, 1160 insertions(+), 1165 deletions(-) delete mode 100644 src/sass/themes/_base.scss create mode 100644 src/sass/themes/_example.scss create mode 100644 src/sass/themes/all.scss diff --git a/gulpfile.js b/gulpfile.js index 1bca19a..4891edb 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -47,7 +47,6 @@ gulp.task('build:dist', ['configs', 'icons', 'scripts:dist']); gulp.task('release', ['build:dist'], () => { const manifest = require(`${BUILD_DIR}/manifest.json`); - return gulp.src(`${BUILD_DIR}/**/*`) .pipe(zip(`json-formatter-${manifest.version}.zip`)) .pipe(gulp.dest(RELEASE_DIR)); diff --git a/src/js/background.js b/src/js/background.js index bc7cd48..760132f 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -12,6 +12,7 @@ browser.storage.local.set({appVersion: browser.runtime.getManifest().version}); listen((port, msg) => { let jsonpFunctionName = null; let validJsonText; + let tab = port.sender.tab; if (msg.type === 'SENDING TEXT') { // Try to parse as JSON @@ -79,9 +80,10 @@ listen((port, msg) => { } // If still running, we now have obj, which is valid JSON. + browser.tabs.insertCSS(tab.id, {code: require('../sass/content.scss')}); // Ensure it's not a number or string (technically valid JSON, but no point prettifying it) - if (typeof obj !== 'object' && typeof obj !== 'array') { + if (typeof obj !== 'object') { port.postMessage(['NOT JSON', 'technically JSON but not an object or array']); port.disconnect(); return; @@ -101,5 +103,7 @@ listen((port, msg) => { browser.storage.sync.set({theme: msg.theme}, () => { port.postMessage({type: 'STORED THEME', themeName: msg.theme}); }); + } else if (msg.type === 'INSERT CSS') { + browser.tabs.insertCSS(tab.id, {code: msg.code}); } }); diff --git a/src/js/content.js b/src/js/content.js index ebb429f..b9b7a1d 100644 --- a/src/js/content.js +++ b/src/js/content.js @@ -1,5 +1,6 @@ import { connect } from './lib/messaging'; import { enableTheming } from './lib/theme-switcher'; +import browser from "./lib/browser"; let jfContent; let pre; @@ -32,13 +33,6 @@ port.onMessage.addListener(function(message) { // Clear the slowAnalysisTimeout (if the BG worker had taken longer than 1s to respond with an answer to whether or not this is JSON, then it would have fired, unhiding the PRE... But now that we know it's JSON, we can clear this timeout, ensuring the PRE stays hidden.) clearTimeout(slowAnalysisTimeout); - // Insert CSS - jfStyleEl = document.createElement('style'); - jfStyleEl.id = 'jfStyleEl'; - document.head.appendChild(jfStyleEl); - - jfStyleEl.insertAdjacentHTML('beforeend', require('../sass/content.scss')); - jfContent.innerHTML = '

Formatting...

'; const formattingMsg = document.getElementById('formattingMsg'); @@ -57,11 +51,14 @@ port.onMessage.addListener(function(message) { pre.hidden = true; // Export parsed JSON for easy access in console + // Only works if target page's CSP allows it setTimeout(function() { const script = document.createElement('script'); - script.innerHTML = `window.json=${message[2]};`; + script.innerHTML = ` + window.json=${message[2]}; + console.info("JSON Formatter: Type 'json' to inspect."); + `; document.head.appendChild(script); - console.info(`JSON Formatter: Type 'json' to inspect.`); }, 100); // Attach event handlers @@ -203,10 +200,10 @@ function collapse(elements) { // Generate comment text eg '4 items' const comment = count + (count === 1 ? ' item' : ' items'); // Add CSS that targets it - jfStyleEl.insertAdjacentHTML( - 'beforeend', - `\n#keyValueOrValue${lastKeyValueOrValueIdGiven}.collapsed:after{content:" // ${comment}"}` - ); + port.postMessage({ + type: 'INSERT CSS', + code: `#keyValueOrValue${lastKeyValueOrValueIdGiven}.collapsed:after{content:" // ${comment}"}` + }); } } } diff --git a/src/js/lib/browser.js b/src/js/lib/browser.js index a8322e9..e7dc90f 100644 --- a/src/js/lib/browser.js +++ b/src/js/lib/browser.js @@ -6,6 +6,9 @@ export default { }, get storage() { return getBrowser().storage; + }, + get tabs() { + return getBrowser().tabs; } }; diff --git a/src/js/lib/theme-switcher.js b/src/js/lib/theme-switcher.js index aae2210..99412ae 100644 --- a/src/js/lib/theme-switcher.js +++ b/src/js/lib/theme-switcher.js @@ -1,8 +1,8 @@ -import { themes } from './themes'; -import { connect } from "./messaging"; +import {themes} from './themes'; +import {connect} from "./messaging"; const transitionStyles = require('../../sass/transition.scss'); -let port, themeStyleElement, transitionStyleElement; +let port, transitionStylesInject; export function enableTheming() { port = connect(); @@ -68,36 +68,25 @@ function generateOptionsHTML() { function switchToTheme(themeName) { themeName = themes[themeName] ? themeName : themes.default; - const theme = themes[themeName]; - const element = getThemeElement(); - - if (element.innerHTML) { - insertTransitionThemes(); - } - if (element.innerHTML !== theme.styles) { - element.innerHTML = theme.styles; - } + document.body.className = `theme-${themeName}`; const themeSelect = getThemeSelect(); const themeSelectOption = themeSelect && themeSelect.querySelector(`[value="${themeName}"]`); if (themeSelectOption) { themeSelectOption.selected = true; } -} - -function getThemeElement() { - if (!themeStyleElement) { - themeStyleElement = document.createElement('style'); - document.head.appendChild(themeStyleElement); - } - return themeStyleElement; + insertTransitionStylesOnce(); } -function insertTransitionThemes() { - if (!transitionStyleElement) { - transitionStyleElement = document.createElement('style'); - transitionStyleElement.innerHTML = transitionStyles; - document.head.appendChild(transitionStyleElement); +function insertTransitionStylesOnce() { + if (!transitionStylesInject) { + transitionStylesInject = true; + window.setTimeout(() => { + port.postMessage({ + type: 'INSERT CSS', + code: transitionStyles + }); + }, 1000); } } diff --git a/src/js/lib/themes.js b/src/js/lib/themes.js index 63186ab..0003e76 100644 --- a/src/js/lib/themes.js +++ b/src/js/lib/themes.js @@ -2,182 +2,146 @@ export const themes = { default: 'dawn', chrome: { name: 'Chrome', - type: 'Light', - styles: require('../../sass/themes/chrome.scss') + type: 'Light' }, clouds: { name: 'Clouds', - type: 'Light', - styles: require('../../sass/themes/clouds.scss') + type: 'Light' }, crimsonEditor: { name: 'Crimson Editor', - type: 'Light', - styles: require('../../sass/themes/crimson-editor.scss') + type: 'Light' }, dawn: { name: 'Dawn', - type: 'Light', - styles: require('../../sass/themes/dawn.scss') + type: 'Light' }, dreamweaver: { name: 'Dreamweaver', - type: 'Light', - styles: require('../../sass/themes/dreamweaver.scss') + type: 'Light' }, eclipse: { name: 'Eclipse', - type: 'Light', - styles: require('../../sass/themes/eclipse.scss') + type: 'Light' }, github: { name: 'GitHub', - type: 'Light', - styles: require('../../sass/themes/github.scss') + type: 'Light' }, iplastic: { name: 'iPlastic', - type: 'Light', - styles: require('../../sass/themes/iplastic.scss') + type: 'Light' }, katzenMilch: { name: 'KatzenMilch', - type: 'Light', - styles: require('../../sass/themes/katzen-milch.scss') + type: 'Light' }, kuroir: { name: 'Kuroir', - type: 'Light', - styles: require('../../sass/themes/kuroir.scss') + type: 'Light' }, solarizedLight: { name: 'Solarized Light', - type: 'Light', - styles: require('../../sass/themes/solarized-light.scss') + type: 'Light' }, sqlServer: { name: 'SQL Server', - type: 'Light', - styles: require('../../sass/themes/sql-server.scss') + type: 'Light' }, textmate: { name: 'TextMate', - type: 'Light', - styles: require('../../sass/themes/textmate.scss') + type: 'Light' }, tomorrow: { name: 'Tomorrow', - type: 'Light', - styles: require('../../sass/themes/tomorrow.scss') + type: 'Light' }, xcode: { name: 'XCode', - type: 'Light', - styles: require('../../sass/themes/xcode.scss') + type: 'Light' }, ambiance: { name: 'Ambiance', - type: 'Dark', - styles: require('../../sass/themes/ambiance.scss') + type: 'Dark' }, chaos: { name: 'Chaos', - type: 'Dark', - styles: require('../../sass/themes/chaos.scss') + type: 'Dark' }, cloudsMidnight: { name: 'Clouds Midnight', - type: 'Dark', - styles: require('../../sass/themes/clouds-midnight.scss') + type: 'Dark' }, cobalt: { name: 'Cobalt', - type: 'Dark', - styles: require('../../sass/themes/cobalt.scss') + type: 'Dark' }, gob: { name: 'Gob', - type: 'Dark', - styles: require('../../sass/themes/gob.scss') + type: 'Dark' }, gruvbox: { name: 'Gruvbox', - type: 'Dark', - styles: require('../../sass/themes/gruvbox.scss') + type: 'Dark' }, idleFingers: { name: 'idle Fingers', - type: 'Dark', - styles: require('../../sass/themes/idle-fingers.scss') + type: 'Dark' }, krTheme: { name: 'krTheme', - type: 'Dark', - styles: require('../../sass/themes/kr-theme.scss') + type: 'Dark' }, merbivore: { name: 'Merbivore', - type: 'Dark', - styles: require('../../sass/themes/merbivore.scss') + type: 'Dark' }, merbivoreSoft: { name: 'Merbivore Soft', - type: 'Dark', - styles: require('../../sass/themes/merbivore-soft.scss') + type: 'Dark' }, monoIndustrial: { name: 'Mono Industrial', - type: 'Dark', - styles: require('../../sass/themes/mono-industrial.scss') + type: 'Dark' }, monokai: { name: 'Monokai', - type: 'Dark', - styles: require('../../sass/themes/monokai.scss') + type: 'Dark' }, pastelOnDark: { name: 'Pastel on dark', - type: 'Dark', - styles: require('../../sass/themes/pastel-on-dark.scss') + type: 'Dark' }, solarizedDark: { name: 'Solarized Dark', - type: 'Dark', - styles: require('../../sass/themes/solarized-dark.scss') + type: 'Dark' }, terminal: { name: 'Terminal', - type: 'Dark', - styles: require('../../sass/themes/terminal.scss') + type: 'Dark' }, tomorrowNight: { name: 'Tomorrow Night', - type: 'Dark', - styles: require('../../sass/themes/tomorrow-night.scss') + type: 'Dark' }, tomorrowNightBlue: { name: 'Tomorrow Night Blue', - type: 'Dark', - styles: require('../../sass/themes/tomorrow-night-blue.scss') + type: 'Dark' }, tomorrowNightBright: { name: 'Tomorrow Night Bright', - type: 'Dark', - styles: require('../../sass/themes/tomorrow-night-bright.scss') + type: 'Dark' }, tomorrowNightEighties: { name: 'Tomorrow Night ’80s', - type: 'Dark', - styles: require('../../sass/themes/tomorrow-night-eighties.scss') + type: 'Dark' }, twilight: { name: 'Twilight', - type: 'Dark', - styles: require('../../sass/themes/twilight.scss') + type: 'Dark' }, vibrantInk: { name: 'Vibrant Ink', - type: 'Dark', - styles: require('../../sass/themes/vibrant-ink.scss') + type: 'Dark' } }; diff --git a/src/manifest.json b/src/manifest.json index 861a31f..4fae7ac 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,6 +1,6 @@ { "name": "JSON Formatter", - "version": "0.10.0", + "version": "0.11.0", "manifest_version": 2, "description": "Makes JSON easy to read. Open source.", "homepage_url": "https://github.com/nikrolls/json-formatter", diff --git a/src/sass/content.scss b/src/sass/content.scss index c351735..08debff 100644 --- a/src/sass/content.scss +++ b/src/sass/content.scss @@ -248,3 +248,5 @@ span { * { font-smoothing: antialiased; } + +@import 'themes/all'; diff --git a/src/sass/themes/_base.scss b/src/sass/themes/_base.scss deleted file mode 100644 index b6fc94b..0000000 --- a/src/sass/themes/_base.scss +++ /dev/null @@ -1,21 +0,0 @@ -body {} - -::selection {} - -.key {} - -.number {} - -.string {} - -.bool {} - -.null {} - -.brace {} - -#gutter {} - -[line-number]:before {} - -.collapsed:after {} diff --git a/src/sass/themes/_example.scss b/src/sass/themes/_example.scss new file mode 100644 index 0000000..08eeb58 --- /dev/null +++ b/src/sass/themes/_example.scss @@ -0,0 +1,22 @@ +body.theme-example { + + ::selection {} + + .key {} + + .number {} + + .string {} + + .bool {} + + .null {} + + .brace {} + + #gutter {} + + [line-number]:before {} + + .collapsed:after {} +} diff --git a/src/sass/themes/all.scss b/src/sass/themes/all.scss new file mode 100644 index 0000000..b37d215 --- /dev/null +++ b/src/sass/themes/all.scss @@ -0,0 +1,36 @@ +@import "ambiance"; +@import "chaos"; +@import "chrome"; +@import "clouds"; +@import "clouds-midnight"; +@import "cobalt"; +@import "crimson-editor"; +@import "dawn"; +@import "dreamweaver"; +@import "eclipse"; +@import "github"; +@import "gob"; +@import "gruvbox"; +@import "idle-fingers"; +@import "iplastic"; +@import "katzen-milch"; +@import "kr-theme"; +@import "kuroir"; +@import "merbivore"; +@import "merbivore-soft"; +@import "mono-industrial"; +@import "monokai"; +@import "pastel-on-dark"; +@import "solarized-dark"; +@import "solarized-light"; +@import "sql-server"; +@import "terminal"; +@import "textmate"; +@import "tomorrow"; +@import "tomorrow-night"; +@import "tomorrow-night-blue"; +@import "tomorrow-night-bright"; +@import "tomorrow-night-eighties"; +@import "twilight"; +@import "vibrant-ink"; +@import "xcode"; diff --git a/src/sass/themes/ambiance.scss b/src/sass/themes/ambiance.scss index 3250e78..a16f53f 100644 --- a/src/sass/themes/ambiance.scss +++ b/src/sass/themes/ambiance.scss @@ -1,45 +1,45 @@ -body { +body.theme-ambiance { background-color: #202020; color: #e6e1dc; -} - -::selection { - background-color: transparentize(#ddf0ff, 0.80); -} - -.key { - color: #99c; -} - -.number { - color: #78cf8a; -} - -.string { - color: #8f9d6a; -} - -.bool, .null { - color: #cf7ea9; -} - -.brace { - color: #24c2c7; -} - -#gutter { - background-color: #3d3d3d; - background-image: linear-gradient(to right, #3d3d3d, #333); - background-repeat: repeat-x; - border-right: 1px solid #4d4d4d; -} - -[line-number]:before { - text-shadow: 0 1px 1px #4d4d4d; - color: #222; -} -.collapsed:after { - font-style: italic; - color: #555; + ::selection { + background-color: transparentize(#ddf0ff, 0.80); + } + + .key { + color: #99c; + } + + .number { + color: #78cf8a; + } + + .string { + color: #8f9d6a; + } + + .bool, .null { + color: #cf7ea9; + } + + .brace { + color: #24c2c7; + } + + #gutter { + background-color: #3d3d3d; + background-image: linear-gradient(to right, #3d3d3d, #333); + background-repeat: repeat-x; + border-right: 1px solid #4d4d4d; + } + + [line-number]:before { + text-shadow: 0 1px 1px #4d4d4d; + color: #222; + } + + .collapsed:after { + font-style: italic; + color: #555; + } } diff --git a/src/sass/themes/chaos.scss b/src/sass/themes/chaos.scss index 52216b8..6f557f0 100644 --- a/src/sass/themes/chaos.scss +++ b/src/sass/themes/chaos.scss @@ -1,45 +1,45 @@ -$foreground: #e6e1dc; +body.theme-chaos { + $foreground: #e6e1dc; -body { background-color: #161616; color: $foreground; -} -::selection { - background-color: #494836; -} + ::selection { + background-color: #494836; + } -.key { - color: #974; -} + .key { + color: #974; + } -.number { - color: #58c554; -} + .number { + color: #58c554; + } -.string { - color: #58c554; -} + .string { + color: #58c554; + } -.bool, .null { - color: #fdc251; -} + .bool, .null { + color: #fdc251; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #141414; - border-right: 1px solid #282828; + #gutter { + background: #141414; + border-right: 1px solid #282828; -} + } -[line-number]:before { - color: #595959; -} + [line-number]:before { + color: #595959; + } -.collapsed:after { - font-style: italic; - color: #555; + .collapsed:after { + font-style: italic; + color: #555; + } } diff --git a/src/sass/themes/chrome.scss b/src/sass/themes/chrome.scss index 81809a5..a01e20a 100644 --- a/src/sass/themes/chrome.scss +++ b/src/sass/themes/chrome.scss @@ -1,42 +1,42 @@ -$foreground: black; +body.theme-chrome { + $foreground: black; -body { background-color: white; color: $foreground; -} -::selection { - background-color: #b5d5ff; -} + ::selection { + background-color: #b5d5ff; + } -.key { - color: #318495; -} + .key { + color: #318495; + } -.number { - color: #0000cd; -} + .number { + color: #0000cd; + } -.string { - color: #1a1aa6; -} + .string { + color: #1a1aa6; + } -.bool, .null { - color: #6d79de; -} + .bool, .null { + color: #6d79de; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #ebebeb; -} + #gutter { + background: #ebebeb; + } -[line-number]:before { - color: #333; -} + [line-number]:before { + color: #333; + } -.collapsed:after { - color: #236e24; + .collapsed:after { + color: #236e24; + } } diff --git a/src/sass/themes/clouds-midnight.scss b/src/sass/themes/clouds-midnight.scss index 1870905..f97c511 100644 --- a/src/sass/themes/clouds-midnight.scss +++ b/src/sass/themes/clouds-midnight.scss @@ -1,42 +1,42 @@ -$foreground: #929292; +body.theme-cloudsMidnight { + $foreground: #929292; -body { background-color: #191919; color: $foreground; -} -::selection { - background-color: black; -} + ::selection { + background-color: black; + } -.key { - color: $foreground; -} + .key { + color: $foreground; + } -.number { - color: #46a609; -} + .number { + color: #46a609; + } -.string { - color: #5d90cd; -} + .string { + color: #5d90cd; + } -.bool, .null { - color: #39946a; -} + .bool, .null { + color: #39946a; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #232323; -} + #gutter { + background: #232323; + } -[line-number]:before { - color: $foreground; -} + [line-number]:before { + color: $foreground; + } -.collapsed:after { - color: #3c403b; + .collapsed:after { + color: #3c403b; + } } diff --git a/src/sass/themes/clouds.scss b/src/sass/themes/clouds.scss index b3b6d1f..82ad978 100644 --- a/src/sass/themes/clouds.scss +++ b/src/sass/themes/clouds.scss @@ -1,42 +1,42 @@ -$foreground: black; +body.theme-clouds { + $foreground: black; -body { background-color: white; color: $foreground; -} -::selection { - background-color: #bdd5fc; -} + ::selection { + background-color: #bdd5fc; + } -.key { - color: $foreground; -} + .key { + color: $foreground; + } -.number { - color: #46a609; -} + .number { + color: #46a609; + } -.string { - color: #5d90cd; -} + .string { + color: #5d90cd; + } -.bool, .null { - color: #39946a; -} + .bool, .null { + color: #39946a; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #ebebeb; -} + #gutter { + background: #ebebeb; + } -[line-number]:before { - color: #333; -} + [line-number]:before { + color: #333; + } -.collapsed:after { - color: #bcc8ba; + .collapsed:after { + color: #bcc8ba; + } } diff --git a/src/sass/themes/cobalt.scss b/src/sass/themes/cobalt.scss index f316dae..4cd61d3 100644 --- a/src/sass/themes/cobalt.scss +++ b/src/sass/themes/cobalt.scss @@ -1,39 +1,39 @@ -$foreground: white; +body.theme-cobalt { + $foreground: white; -body { background-color: #002240; color: $foreground; -} -::selection { - background-color: transparentize(#b36539, 0.25); -} + ::selection { + background-color: transparentize(#b36539, 0.25); + } -.key { - color: #ccc; -} + .key { + color: #ccc; + } -.number, .bool, .null { - color: #ff628c; -} + .number, .bool, .null { + color: #ff628c; + } -.string { - color: #3ad900; -} + .string { + color: #3ad900; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #011e3a; -} + #gutter { + background: #011e3a; + } -[line-number]:before { - color: #8091a0; -} + [line-number]:before { + color: #8091a0; + } -.collapsed:after { - font-style: italic; - color: #08f; + .collapsed:after { + font-style: italic; + color: #08f; + } } diff --git a/src/sass/themes/crimson-editor.scss b/src/sass/themes/crimson-editor.scss index 48958ec..a644b0a 100644 --- a/src/sass/themes/crimson-editor.scss +++ b/src/sass/themes/crimson-editor.scss @@ -1,42 +1,42 @@ -$foreground: #404040; +body.theme-crimsonEditor { + $foreground: #404040; -body { background-color: white; color: $foreground; -} -::selection { - background-color: #b5d5ff; -} + ::selection { + background-color: #b5d5ff; + } -.key { - color: #004080; -} + .key { + color: #004080; + } -.number { - color: #000040; -} + .number { + color: #000040; + } -.string { - color: #800080; -} + .string { + color: #800080; + } -.bool, .null { - color: #ff9c00; -} + .bool, .null { + color: #ff9c00; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #ebebeb; -} + #gutter { + background: #ebebeb; + } -[line-number]:before { - color: #333; -} + [line-number]:before { + color: #333; + } -.collapsed:after { - color: #4c886b; + .collapsed:after { + color: #4c886b; + } } diff --git a/src/sass/themes/dawn.scss b/src/sass/themes/dawn.scss index b762433..783cda2 100644 --- a/src/sass/themes/dawn.scss +++ b/src/sass/themes/dawn.scss @@ -1,39 +1,39 @@ -$foreground: #080808; +body.theme-dawn { + $foreground: #080808; -body { background-color: #f9f9f9; color: $foreground; -} -::selection { - background-color: transparentize(#275fff, 0.70); -} + ::selection { + background-color: transparentize(#275fff, 0.70); + } -.key { - color: #234a97; -} + .key { + color: #234a97; + } -.number, .bool, .null { - color: #811f24; -} + .number, .bool, .null { + color: #811f24; + } -.string { - color: #0b6125; -} + .string { + color: #0b6125; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #ebebeb; -} + #gutter { + background: #ebebeb; + } -[line-number]:before { - color: #333; -} + [line-number]:before { + color: #333; + } -.collapsed:after { - font-style: italic; - color: #5a525f + .collapsed:after { + font-style: italic; + color: #5a525f + } } diff --git a/src/sass/themes/dreamweaver.scss b/src/sass/themes/dreamweaver.scss index 9d08281..cb8e8e0 100644 --- a/src/sass/themes/dreamweaver.scss +++ b/src/sass/themes/dreamweaver.scss @@ -1,42 +1,42 @@ -$foreground: black; +body.theme-dreamweaver { + $foreground: black; -body { background-color: #fff; color: $foreground; -} -::selection { - background-color: #b5d5ff; -} + ::selection { + background-color: #b5d5ff; + } -.key { - color: #06f; -} + .key { + color: #06f; + } -.number { - color: #0000cd; -} + .number { + color: #0000cd; + } -.string { - color: #00f; -} + .string { + color: #00f; + } -.bool, .null { - color: #585cf6; -} + .bool, .null { + color: #585cf6; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #e8e8e8; -} + #gutter { + background: #e8e8e8; + } -[line-number]:before { - color: #333; -} + [line-number]:before { + color: #333; + } -.collapsed:after { - color: #4c886b; + .collapsed:after { + color: #4c886b; + } } diff --git a/src/sass/themes/eclipse.scss b/src/sass/themes/eclipse.scss index aa5c677..6d895ae 100644 --- a/src/sass/themes/eclipse.scss +++ b/src/sass/themes/eclipse.scss @@ -1,43 +1,43 @@ -$foreground: black; +body.theme-eclipse { + $foreground: black; -body { background-color: #fff; color: $foreground; -} -::selection { - background-color: #b5d5ff; -} + ::selection { + background-color: #b5d5ff; + } -.key { - color: #7f0055; -} + .key { + color: #7f0055; + } -.number { - color: darkblue; -} + .number { + color: darkblue; + } -.string { - color: #2a00ff; -} + .string { + color: #2a00ff; + } -.bool, .null { - color: #5848f6; -} + .bool, .null { + color: #5848f6; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #ebebeb; - border-right: 1px solid #9f9f9f; -} + #gutter { + background: #ebebeb; + border-right: 1px solid #9f9f9f; + } -[line-number]:before { - color: #888; -} + [line-number]:before { + color: #888; + } -.collapsed:after { - color: #719682; + .collapsed:after { + color: #719682; + } } diff --git a/src/sass/themes/github.scss b/src/sass/themes/github.scss index 61ad0a6..6990e4e 100644 --- a/src/sass/themes/github.scss +++ b/src/sass/themes/github.scss @@ -1,41 +1,41 @@ -$foreground: black; +body.theme-github { + $foreground: black; -body { background-color: white; color: $foreground; -} -::selection { - background-color: #b5d5ff; -} + ::selection { + background-color: #b5d5ff; + } -.number { - color: #099; -} + .number { + color: #099; + } -.string { - color: #d14; -} + .string { + color: #d14; + } -.bool, .null { - color: $foreground; - font-weight: bold; -} + .bool, .null { + color: $foreground; + font-weight: bold; + } -.brace { - font-weight: bold; - color: $foreground; -} + .brace { + font-weight: bold; + color: $foreground; + } -#gutter { - background: #e8e8e8; -} + #gutter { + background: #e8e8e8; + } -[line-number]:before { - color: #aaa; -} + [line-number]:before { + color: #aaa; + } -.collapsed:after { - color: #998; - font-style: italic; + .collapsed:after { + color: #998; + font-style: italic; + } } diff --git a/src/sass/themes/gob.scss b/src/sass/themes/gob.scss index a6aeed4..8fd9fc1 100644 --- a/src/sass/themes/gob.scss +++ b/src/sass/themes/gob.scss @@ -1,39 +1,39 @@ -$foreground: #0f0; +body.theme-gob { + $foreground: #0f0; -body { background-color: #0b0b0b; color: $foreground; -} -::selection { - background-color: transparentize(#ddf0ff, 0.80); -} + ::selection { + background-color: transparentize(#ddf0ff, 0.80); + } -.key { - color: #00f868; -} + .key { + color: #00f868; + } -.string { - color: #10f060; -} + .string { + color: #10f060; + } -.bool, .null { - color: #10f0a0; -} + .bool, .null { + color: #10f0a0; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #0b1818; -} + #gutter { + background: #0b1818; + } -[line-number]:before { - color: #03ee03; -} + [line-number]:before { + color: #03ee03; + } -.collapsed:after { - font-style: italic; - color: #00e060; + .collapsed:after { + font-style: italic; + color: #00e060; + } } diff --git a/src/sass/themes/gruvbox.scss b/src/sass/themes/gruvbox.scss index f65cff5..ab0c811 100644 --- a/src/sass/themes/gruvbox.scss +++ b/src/sass/themes/gruvbox.scss @@ -1,35 +1,35 @@ -$foreground: #ebdab4; +body.theme-gruvbox { + $foreground: #ebdab4; -body { background-color: #1d2021; color: $foreground; -} -::selection { - background-color: transparentize(#b36539, 0.25); -} + ::selection { + background-color: transparentize(#b36539, 0.25); + } -.key { - color: #84a598; -} + .key { + color: #84a598; + } -.number, .bool, .null { - color: #c2859a; -} + .number, .bool, .null { + color: #c2859a; + } -.string { - color: #b8ba37; -} + .string { + color: #b8ba37; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -[line-number]:before { - color: $foreground; -} + [line-number]:before { + color: $foreground; + } -.collapsed:after { - font-style: italic; - color: #928375; + .collapsed:after { + font-style: italic; + color: #928375; + } } diff --git a/src/sass/themes/idle-fingers.scss b/src/sass/themes/idle-fingers.scss index 1f68824..8230744 100644 --- a/src/sass/themes/idle-fingers.scss +++ b/src/sass/themes/idle-fingers.scss @@ -1,39 +1,39 @@ -$foreground: white; +body.theme-idleFingers { + $foreground: white; -body { background-color: #323232; color: $foreground; -} -::selection { - background-color: transparentize(#5a647e, 0.12); -} + ::selection { + background-color: transparentize(#5a647e, 0.12); + } -.key { - color: $foreground; -} + .key { + color: $foreground; + } -.number, .bool, .null { - color: #6c99bb; -} + .number, .bool, .null { + color: #6c99bb; + } -.string { - color: #a5c261; -} + .string { + color: #a5c261; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #3b3b3b; -} + #gutter { + background: #3b3b3b; + } -[line-number]:before { - color: #999; -} + [line-number]:before { + color: #999; + } -.collapsed:after { - font-style: italic; - color: #bc9458; + .collapsed:after { + font-style: italic; + color: #bc9458; + } } diff --git a/src/sass/themes/iplastic.scss b/src/sass/themes/iplastic.scss index ba9c108..1bf4fda 100644 --- a/src/sass/themes/iplastic.scss +++ b/src/sass/themes/iplastic.scss @@ -1,41 +1,41 @@ -$foreground: #333; +body.theme-iplastic { + $foreground: #333; -body { background-color: #eee; color: $foreground; -} -::selection { - background-color: #bad6fd; -} + ::selection { + background-color: #bad6fd; + } -.key { - color: #36c; - font-style: italic; -} + .key { + color: #36c; + font-style: italic; + } -.number, .bool, .null { - color: #06f; - font-weight: 700; -} + .number, .bool, .null { + color: #06f; + font-weight: 700; + } -.string { - color: #a55f03; -} + .string { + color: #a55f03; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #ddd; -} + #gutter { + background: #ddd; + } -[line-number]:before { - color: #666; -} + [line-number]:before { + color: #666; + } -.collapsed:after { - color: #777; - font-style: italic; + .collapsed:after { + color: #777; + font-style: italic; + } } diff --git a/src/sass/themes/katzen-milch.scss b/src/sass/themes/katzen-milch.scss index b21e458..970d6ae 100644 --- a/src/sass/themes/katzen-milch.scss +++ b/src/sass/themes/katzen-milch.scss @@ -1,48 +1,48 @@ -$foreground: #0f0009; +body.theme-katzenMilch { + $foreground: #0f0009; -body { background-color: #f3f2f3; color: $foreground; -} - -::selection { - background-color: transparentize(#6405d0, 0.73); -} - -.key { - color: transparentize(#025f49, 0.3); - background-color: transparentize(#22ff49, 0.88); -} - -.number { - color: transparentize(#4f827b, 0.7); - background-color: transparentize(#77c2bb, 0.9411); -} - -.string { - color: #5a5f9b; - background-color: transparentize(#aaafdb, 0.965); -} - -.bool, .null { - color: #7d7e52; - background-color: transparentize(#bdbe82, 0.941); -} - -.brace { - color: $foreground; -} - -#gutter { - background: #e8e8e8; -} - -[line-number]:before { - color: #333; -} -.collapsed:after { - font-style: italic; - color: rgba(64, 79, 80, 0.67); - background-color: transparentize(#5f0fff, 0.9922) + ::selection { + background-color: transparentize(#6405d0, 0.73); + } + + .key { + color: transparentize(#025f49, 0.3); + background-color: transparentize(#22ff49, 0.88); + } + + .number { + color: transparentize(#4f827b, 0.7); + background-color: transparentize(#77c2bb, 0.9411); + } + + .string { + color: #5a5f9b; + background-color: transparentize(#aaafdb, 0.965); + } + + .bool, .null { + color: #7d7e52; + background-color: transparentize(#bdbe82, 0.941); + } + + .brace { + color: $foreground; + } + + #gutter { + background: #e8e8e8; + } + + [line-number]:before { + color: #333; + } + + .collapsed:after { + font-style: italic; + color: rgba(64, 79, 80, 0.67); + background-color: transparentize(#5f0fff, 0.9922) + } } diff --git a/src/sass/themes/kr-theme.scss b/src/sass/themes/kr-theme.scss index 3007e21..fe5674e 100644 --- a/src/sass/themes/kr-theme.scss +++ b/src/sass/themes/kr-theme.scss @@ -1,39 +1,39 @@ -$foreground: #fcffe0; +body.theme-krTheme { + $foreground: #fcffe0; -body { background-color: #0b0a09; color: $foreground; -} -::selection { - background-color: transparentize(#a0f, 0.55); -} + ::selection { + background-color: transparentize(#a0f, 0.55); + } -.key { - color: #d1a796; -} + .key { + color: #d1a796; + } -.number, .bool, .null { - color: transparentize(#d27518, 0.24); -} + .number, .bool, .null { + color: transparentize(#d27518, 0.24); + } -.string { - color: transparentize(#a4a1b5, 0.2); -} + .string { + color: transparentize(#a4a1b5, 0.2); + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #1c1917; -} + #gutter { + background: #1c1917; + } -[line-number]:before { - color: $foreground; -} + [line-number]:before { + color: $foreground; + } -.collapsed:after { - font-style: italic; - color: #706d5b; + .collapsed:after { + font-style: italic; + color: #706d5b; + } } diff --git a/src/sass/themes/kuroir.scss b/src/sass/themes/kuroir.scss index 8dd03b2..5c994fa 100644 --- a/src/sass/themes/kuroir.scss +++ b/src/sass/themes/kuroir.scss @@ -1,39 +1,39 @@ -$foreground: #363636; +body.theme-kuroir { + $foreground: #363636; -body { background-color: #e8e9e8; color: $foreground; -} -::selection { - background-color: transparentize(#f5aa00, 0.43); -} + ::selection { + background-color: transparentize(#f5aa00, 0.43); + } -.key { - color: #009acd; -} + .key { + color: #009acd; + } -.number { - color: #9a5925; -} + .number { + color: #9a5925; + } -.string { - color: #639300; -} + .string { + color: #639300; + } -.bool, .null { - color: #cd6839; -} + .bool, .null { + color: #cd6839; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -[line-number]:before { - color: #333; -} + [line-number]:before { + color: #333; + } -.collapsed:after { - color: transparentize(#949494, 0.09); - background-color: transparentize(#dcdcdc, 0.44); + .collapsed:after { + color: transparentize(#949494, 0.09); + background-color: transparentize(#dcdcdc, 0.44); + } } diff --git a/src/sass/themes/merbivore-soft.scss b/src/sass/themes/merbivore-soft.scss index 7361cfa..77bc70e 100644 --- a/src/sass/themes/merbivore-soft.scss +++ b/src/sass/themes/merbivore-soft.scss @@ -1,43 +1,43 @@ -$foreground: #e6e1dc; +body.theme-merbivoreSoft { + $foreground: #e6e1dc; -body { background-color: #1c1c1c; color: $foreground; -} -::selection { - background-color: #494949; -} + ::selection { + background-color: #494949; + } -.key { - color: $foreground; -} + .key { + color: $foreground; + } -.number { - color: #7fc578; -} + .number { + color: #7fc578; + } -.string { - color: #8ec65f; -} + .string { + color: #8ec65f; + } -.bool, .null { - color: #e1c582; -} + .bool, .null { + color: #e1c582; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #262424; -} + #gutter { + background: #262424; + } -[line-number]:before { - color: $foreground; -} + [line-number]:before { + color: $foreground; + } -.collapsed:after { - font-style: italic; - color: #ac4bb8; + .collapsed:after { + font-style: italic; + color: #ac4bb8; + } } diff --git a/src/sass/themes/merbivore.scss b/src/sass/themes/merbivore.scss index ffab397..e4a292d 100644 --- a/src/sass/themes/merbivore.scss +++ b/src/sass/themes/merbivore.scss @@ -1,43 +1,43 @@ -$foreground: #e6e1dc; +body.theme-merbivore { + $foreground: #e6e1dc; -body { background-color: #161616; color: $foreground; -} -::selection { - background-color: #454545; -} + ::selection { + background-color: #454545; + } -.key { - color: $foreground; -} + .key { + color: $foreground; + } -.number { - color: #58c554; -} + .number { + color: #58c554; + } -.string { - color: #8dff0a; -} + .string { + color: #8dff0a; + } -.bool, .null { - color: #fdc251; -} + .bool, .null { + color: #fdc251; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #202020; -} + #gutter { + background: #202020; + } -[line-number]:before { - color: $foreground; -} + [line-number]:before { + color: $foreground; + } -.collapsed:after { - font-style: italic; - color: #ad2ea4; + .collapsed:after { + font-style: italic; + color: #ad2ea4; + } } diff --git a/src/sass/themes/mono-industrial.scss b/src/sass/themes/mono-industrial.scss index 2c91a2b..e066346 100644 --- a/src/sass/themes/mono-industrial.scss +++ b/src/sass/themes/mono-industrial.scss @@ -1,44 +1,44 @@ -$foreground: white; +body.theme-monoIndustrial { + $foreground: white; -body { background-color: #222c28; color: $foreground; -} -::selection { - background-color: transparentize(#919994, 0.6); -} + ::selection { + background-color: transparentize(#919994, 0.6); + } -.key { - color: #a8b3ab; -} + .key { + color: #a8b3ab; + } -.number { - color: #e98800; -} + .number { + color: #e98800; + } -.string { - background-color: #151c19; - color: #fff; -} + .string { + background-color: #151c19; + color: #fff; + } -.bool, .null { - color: #648bd2; -} + .bool, .null { + color: #648bd2; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #1d2521; -} + #gutter { + background: #1d2521; + } -[line-number]:before { - color: #c5c9c9; -} + [line-number]:before { + color: #c5c9c9; + } -.collapsed:after { - color: #666c68; - background-color: #151c19; + .collapsed:after { + color: #666c68; + background-color: #151c19; + } } diff --git a/src/sass/themes/monokai.scss b/src/sass/themes/monokai.scss index 8039961..c586f4b 100644 --- a/src/sass/themes/monokai.scss +++ b/src/sass/themes/monokai.scss @@ -1,38 +1,38 @@ -$foreground: #f8f8f2; +body.theme-monokai { + $foreground: #f8f8f2; -body { background-color: #272822; color: $foreground; -} -::selection { - background-color: #49483e; -} + ::selection { + background-color: #49483e; + } -.key { - color: #a6e22e; -} + .key { + color: #a6e22e; + } -.number, .bool, .null { - color: #ae81ff; -} + .number, .bool, .null { + color: #ae81ff; + } -.string { - color: #e6db74; -} + .string { + color: #e6db74; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #2f3129; -} + #gutter { + background: #2f3129; + } -[line-number]:before { - color: #8f908a; -} + [line-number]:before { + color: #8f908a; + } -.collapsed:after { - color: #75715e; + .collapsed:after { + color: #75715e; + } } diff --git a/src/sass/themes/pastel-on-dark.scss b/src/sass/themes/pastel-on-dark.scss index e3f6526..3025e13 100644 --- a/src/sass/themes/pastel-on-dark.scss +++ b/src/sass/themes/pastel-on-dark.scss @@ -1,42 +1,42 @@ -$foreground: #8f938f; +body.theme-pastelOnDark { + $foreground: #8f938f; -body { background-color: #2c2828; color: $foreground; -} -::selection { - background-color: transparentize(#ddf0ff, 0.80); -} + ::selection { + background-color: transparentize(#ddf0ff, 0.80); + } -.key { - color: #bebf55; -} + .key { + color: #bebf55; + } -.number { - color: #ccc; -} + .number { + color: #ccc; + } -.string { - color: #66a968; -} + .string { + color: #66a968; + } -.bool, .null { - color: #de8e30; -} + .bool, .null { + color: #de8e30; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #353030; -} + #gutter { + background: #353030; + } -[line-number]:before { - color: $foreground; -} + [line-number]:before { + color: $foreground; + } -.collapsed:after { - color: #a6c6ff; + .collapsed:after { + color: #a6c6ff; + } } diff --git a/src/sass/themes/solarized-dark.scss b/src/sass/themes/solarized-dark.scss index d7ef3c4..e6ae7ae 100644 --- a/src/sass/themes/solarized-dark.scss +++ b/src/sass/themes/solarized-dark.scss @@ -1,43 +1,43 @@ -$foreground: #93a1a1; +body.theme-solarizedDark { + $foreground: #93a1a1; -body { background-color: #002b36; color: $foreground; -} -::selection { - background-color: transparentize(white, 0.9); -} + ::selection { + background-color: transparentize(white, 0.9); + } -.key { - color: #268bd2; -} + .key { + color: #268bd2; + } -.number { - color: #d33682; -} + .number { + color: #d33682; + } -.string { - color: #2aa198; -} + .string { + color: #2aa198; + } -.bool, .null { - color: #b58900; -} + .bool, .null { + color: #b58900; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #01313f; -} + #gutter { + background: #01313f; + } -[line-number]:before { - color: #d0edf7; -} + [line-number]:before { + color: #d0edf7; + } -.collapsed:after { - font-style: italic; - color: #657b83; + .collapsed:after { + font-style: italic; + color: #657b83; + } } diff --git a/src/sass/themes/solarized-light.scss b/src/sass/themes/solarized-light.scss index 750c14c..fe841a2 100644 --- a/src/sass/themes/solarized-light.scss +++ b/src/sass/themes/solarized-light.scss @@ -1,42 +1,42 @@ -$foreground: #586e75; +body.theme-solarizedLight { + $foreground: #586e75; -body { background-color: #fdf6e3; color: $foreground; -} -::selection { - background-color: transparentize(#073643, 0.91); -} + ::selection { + background-color: transparentize(#073643, 0.91); + } -.key { - color: #268bd2; -} + .key { + color: #268bd2; + } -.number { - color: #d33682; -} + .number { + color: #d33682; + } -.string { - color: #2aa198; -} + .string { + color: #2aa198; + } -.bool, .null { - color: #b58900 -} + .bool, .null { + color: #b58900 + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #fbf1d3; -} + #gutter { + background: #fbf1d3; + } -[line-number]:before { - color: #333; -} + [line-number]:before { + color: #333; + } -.collapsed:after { - color: #93a1a1; + .collapsed:after { + color: #93a1a1; + } } diff --git a/src/sass/themes/sql-server.scss b/src/sass/themes/sql-server.scss index d819d75..440e310 100644 --- a/src/sass/themes/sql-server.scss +++ b/src/sass/themes/sql-server.scss @@ -1,36 +1,36 @@ -body { +body.theme-sqlServer { background-color: #fff; color: black; -} -::selection { - background-color: #b5d5ff; -} + ::selection { + background-color: #b5d5ff; + } -.key { - color: #318495; -} + .key { + color: #318495; + } -.string { - color: #f00; -} + .string { + color: #f00; + } -.bool, .null { - color: #979797; -} + .bool, .null { + color: #979797; + } -.brace { - color: #808080; -} + .brace { + color: #808080; + } -#gutter { - background: #ebebeb; -} + #gutter { + background: #ebebeb; + } -[line-number]:before { - color: #333; -} + [line-number]:before { + color: #333; + } -.collapsed:after { - color: #008000; + .collapsed:after { + color: #008000; + } } diff --git a/src/sass/themes/terminal.scss b/src/sass/themes/terminal.scss index 42632e7..e67ca2e 100644 --- a/src/sass/themes/terminal.scss +++ b/src/sass/themes/terminal.scss @@ -1,38 +1,38 @@ -$foreground: #dedede; +body.theme-terminal { + $foreground: #dedede; -body { background-color: black; color: $foreground; -} -::selection { - background-color: #424242; -} + ::selection { + background-color: #424242; + } -.key { - color: #d54e53; -} + .key { + color: #d54e53; + } -.number, .bool, .null { - color: #e78c45; -} + .number, .bool, .null { + color: #e78c45; + } -.string { - color: #b9ca4a; -} + .string { + color: #b9ca4a; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #1a0005; -} + #gutter { + background: #1a0005; + } -[line-number]:before { - color: steelblue; -} + [line-number]:before { + color: steelblue; + } -.collapsed:after { - color: orangered; + .collapsed:after { + color: orangered; + } } diff --git a/src/sass/themes/textmate.scss b/src/sass/themes/textmate.scss index e8eff7c..e7a95c4 100644 --- a/src/sass/themes/textmate.scss +++ b/src/sass/themes/textmate.scss @@ -1,42 +1,42 @@ -$foreground: black; +body.theme-textmate { + $foreground: black; -body { background-color: #fff; color: $foreground; -} -::selection { - background-color: #b5d5ff; -} + ::selection { + background-color: #b5d5ff; + } -.key { - color: #318495; -} + .key { + color: #318495; + } -.number { - color: #0000cd; -} + .number { + color: #0000cd; + } -.string { - color: #036a07; -} + .string { + color: #036a07; + } -.bool, .null { - color: #585cf6; -} + .bool, .null { + color: #585cf6; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #f0f0f0; -} + #gutter { + background: #f0f0f0; + } -[line-number]:before { - color: #333; -} + [line-number]:before { + color: #333; + } -.collapsed:after { - color: #4c886b; + .collapsed:after { + color: #4c886b; + } } diff --git a/src/sass/themes/tomorrow-night-blue.scss b/src/sass/themes/tomorrow-night-blue.scss index 76d3192..51af5a7 100644 --- a/src/sass/themes/tomorrow-night-blue.scss +++ b/src/sass/themes/tomorrow-night-blue.scss @@ -1,38 +1,38 @@ -$foreground: white; +body.theme-tomorrowNightBlue { + $foreground: white; -body { background-color: #002451; color: $foreground; -} -::selection { - background-color: #003f8e; -} + ::selection { + background-color: #003f8e; + } -.key { - color: #ff9da4; -} + .key { + color: #ff9da4; + } -.number, .bool, .null { - color: #ffc58f; -} + .number, .bool, .null { + color: #ffc58f; + } -.string { - color: #d1f1a9; -} + .string { + color: #d1f1a9; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #00204b; -} + #gutter { + background: #00204b; + } -[line-number]:before { - color: #7388b5; -} + [line-number]:before { + color: #7388b5; + } -.collapsed:after { - color: #7285b7; + .collapsed:after { + color: #7285b7; + } } diff --git a/src/sass/themes/tomorrow-night-bright.scss b/src/sass/themes/tomorrow-night-bright.scss index d1cdd73..a29ef23 100644 --- a/src/sass/themes/tomorrow-night-bright.scss +++ b/src/sass/themes/tomorrow-night-bright.scss @@ -1,38 +1,38 @@ -$foreground: #dedede; +body.theme-tomorrowNightBright { + $foreground: #dedede; -body { background-color: #000; color: $foreground; -} -::selection { - background-color: #424242; -} + ::selection { + background-color: #424242; + } -.key { - color: #d54e53; -} + .key { + color: #d54e53; + } -.number, .bool, .null { - color: #e78c45; -} + .number, .bool, .null { + color: #e78c45; + } -.string { - color: #b9ca4a; -} + .string { + color: #b9ca4a; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #1a1a1a; -} + #gutter { + background: #1a1a1a; + } -[line-number]:before { - color: $foreground; -} + [line-number]:before { + color: $foreground; + } -.collapsed:after { - color: #969896; + .collapsed:after { + color: #969896; + } } diff --git a/src/sass/themes/tomorrow-night-eighties.scss b/src/sass/themes/tomorrow-night-eighties.scss index bc5f612..2b942fa 100644 --- a/src/sass/themes/tomorrow-night-eighties.scss +++ b/src/sass/themes/tomorrow-night-eighties.scss @@ -1,38 +1,38 @@ -$foreground: #ccc; +body.theme-tomorrowNightEighties { + $foreground: #ccc; -body { background-color: #2d2d2d; color: $foreground; -} -::selection { - background-color: #515151; -} + ::selection { + background-color: #515151; + } -.key { - color: #f2777a; -} + .key { + color: #f2777a; + } -.number, .bool, .null { - color: #f99157; -} + .number, .bool, .null { + color: #f99157; + } -.string { - color: #9c9; -} + .string { + color: #9c9; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #272727; -} + #gutter { + background: #272727; + } -[line-number]:before { - color: $foreground; -} + [line-number]:before { + color: $foreground; + } -.collapsed:after { - color: #999; + .collapsed:after { + color: #999; + } } diff --git a/src/sass/themes/tomorrow-night.scss b/src/sass/themes/tomorrow-night.scss index e8facaa..9a0735c 100644 --- a/src/sass/themes/tomorrow-night.scss +++ b/src/sass/themes/tomorrow-night.scss @@ -1,38 +1,38 @@ -$foreground: #c5c8c6; +body.theme-tomorrowNight { + $foreground: #c5c8c6; -body { background-color: #1d1f21; color: $foreground; -} -::selection { - background-color: #373b41; -} + ::selection { + background-color: #373b41; + } -.key { - color: #c66; -} + .key { + color: #c66; + } -.number, .bool, .null { - color: #de935f; -} + .number, .bool, .null { + color: #de935f; + } -.string { - color: #b5bd68; -} + .string { + color: #b5bd68; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #25282c; -} + #gutter { + background: #25282c; + } -[line-number]:before { - color: $foreground; -} + [line-number]:before { + color: $foreground; + } -.collapsed:after { - color: #969896; + .collapsed:after { + color: #969896; + } } diff --git a/src/sass/themes/tomorrow.scss b/src/sass/themes/tomorrow.scss index 476c2a1..0e38bfc 100644 --- a/src/sass/themes/tomorrow.scss +++ b/src/sass/themes/tomorrow.scss @@ -1,38 +1,38 @@ -$foreground: #4d4d4c; +body.theme-tomorrow { + $foreground: #4d4d4c; -body { background-color: #fff; color: $foreground; -} -::selection { - background-color: #d6d6d6; -} + ::selection { + background-color: #d6d6d6; + } -.key { - color: #c82829; -} + .key { + color: #c82829; + } -.number, .bool, .null { - color: #f5871f; -} + .number, .bool, .null { + color: #f5871f; + } -.string { - color: #718c00; -} + .string { + color: #718c00; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #f6f6f6; -} + #gutter { + background: #f6f6f6; + } -[line-number]:before { - color: $foreground; -} + [line-number]:before { + color: $foreground; + } -.collapsed:after { - color: #8e908c; + .collapsed:after { + color: #8e908c; + } } diff --git a/src/sass/themes/twilight.scss b/src/sass/themes/twilight.scss index f95aa9b..40019c9 100644 --- a/src/sass/themes/twilight.scss +++ b/src/sass/themes/twilight.scss @@ -1,39 +1,39 @@ -$foreground: #f8f8f8; +body.theme-twilight { + $foreground: #f8f8f8; -body { background-color: #141414; color: $foreground; -} -::selection { - background-color: transparentize(#ddf0ff, 0.8); -} + ::selection { + background-color: transparentize(#ddf0ff, 0.8); + } -.key { - color: #7587a6; -} + .key { + color: #7587a6; + } -.number, .bool, .null { - color: #cf6a4c; -} + .number, .bool, .null { + color: #cf6a4c; + } -.string { - color: #8f9d6a; -} + .string { + color: #8f9d6a; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #232323; -} + #gutter { + background: #232323; + } -[line-number]:before { - color: #e2e2e2; -} + [line-number]:before { + color: #e2e2e2; + } -.collapsed:after { - font-style: italic; - color: #5f5a60; + .collapsed:after { + font-style: italic; + color: #5f5a60; + } } diff --git a/src/sass/themes/vibrant-ink.scss b/src/sass/themes/vibrant-ink.scss index bc41e5e..daabd28 100644 --- a/src/sass/themes/vibrant-ink.scss +++ b/src/sass/themes/vibrant-ink.scss @@ -1,42 +1,42 @@ -$foreground: white; +body.theme-vibrantInk { + $foreground: white; -body { background-color: #0f0f0f; color: $foreground; -} -::selection { - background-color: #69c; -} + ::selection { + background-color: #69c; + } -.key { - color: #fc0; -} + .key { + color: #fc0; + } -.number { - color: #9c9; -} + .number { + color: #9c9; + } -.string { - color: #6f0; -} + .string { + color: #6f0; + } -.bool, .null { - color: #399; -} + .bool, .null { + color: #399; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #1a1a1a; -} + #gutter { + background: #1a1a1a; + } -[line-number]:before { - color: #bebebe; -} + [line-number]:before { + color: #bebebe; + } -.collapsed:after { - color: #93c; + .collapsed:after { + color: #93c; + } } diff --git a/src/sass/themes/xcode.scss b/src/sass/themes/xcode.scss index d69d2ba..651e036 100644 --- a/src/sass/themes/xcode.scss +++ b/src/sass/themes/xcode.scss @@ -1,38 +1,38 @@ -$foreground: black; +body.theme-xcode { + $foreground: black; -body { background-color: white; color: $foreground; -} -::selection { - background: #b5d5ff; -} + ::selection { + background: #b5d5ff; + } -.number { - color: #3a00dc; -} + .number { + color: #3a00dc; + } -.string { - color: #df0002; -} + .string { + color: #df0002; + } -.bool, .null { - color: #c800a4; -} + .bool, .null { + color: #c800a4; + } -.brace { - color: $foreground; -} + .brace { + color: $foreground; + } -#gutter { - background: #e8e8e8; -} + #gutter { + background: #e8e8e8; + } -[line-number]:before { - color: #333; -} + [line-number]:before { + color: #333; + } -.collapsed:after { - color: #008e00; + .collapsed:after { + color: #008e00; + } } From c23e9ccd7494bb4c9e2673484765913f5430a4a8 Mon Sep 17 00:00:00 2001 From: Tee Date: Sat, 28 Sep 2019 05:58:19 -0400 Subject: [PATCH 23/28] Add check and alert for larger JSON files --- src/js/content.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/js/content.js b/src/js/content.js index b9b7a1d..5bcf76f 100644 --- a/src/js/content.js +++ b/src/js/content.js @@ -115,7 +115,13 @@ function insertFormatOptionBar() { function ready() { // First, check if it's plain text and exit if not const plainText = getTextFromTextOnlyDocument(); - if (!plainText || plainText.length > 3000000) { + if (!plainText) { + port.disconnect(); + return; + } + // Second, check if length is larger than 3MB + if (plainText.length > 3000000) { + alert('JSON Formatter Error: Cannot parse JSON larger than 3MB'); port.disconnect(); return; } From eee7f4da576fedd52b1ba480e916e48709ad8b5f Mon Sep 17 00:00:00 2001 From: Tee Date: Sat, 28 Sep 2019 09:03:54 -0400 Subject: [PATCH 24/28] Refactored text length check --- src/js/content.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/js/content.js b/src/js/content.js index 5bcf76f..d5acf4b 100644 --- a/src/js/content.js +++ b/src/js/content.js @@ -115,13 +115,9 @@ function insertFormatOptionBar() { function ready() { // First, check if it's plain text and exit if not const plainText = getTextFromTextOnlyDocument(); - if (!plainText) { - port.disconnect(); - return; - } - // Second, check if length is larger than 3MB - if (plainText.length > 3000000) { - alert('JSON Formatter Error: Cannot parse JSON larger than 3MB'); + if (!plainText || plainText.length > 300000) { + // If there is plain text and it's over 3MB, send alert + plainText && alert('JSON Formatter Error: Cannot parse JSON larger than 3MB'); port.disconnect(); return; } From a7587c1e27fae1ea403708b9f27ccc50e7c38da6 Mon Sep 17 00:00:00 2001 From: Tee Date: Sat, 28 Sep 2019 09:05:27 -0400 Subject: [PATCH 25/28] Correct max length --- src/js/content.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/content.js b/src/js/content.js index d5acf4b..0bc4f21 100644 --- a/src/js/content.js +++ b/src/js/content.js @@ -115,7 +115,7 @@ function insertFormatOptionBar() { function ready() { // First, check if it's plain text and exit if not const plainText = getTextFromTextOnlyDocument(); - if (!plainText || plainText.length > 300000) { + if (!plainText || plainText.length > 3000000) { // If there is plain text and it's over 3MB, send alert plainText && alert('JSON Formatter Error: Cannot parse JSON larger than 3MB'); port.disconnect(); From 2714179abc2198ac90141704c9361cbc5e51889b Mon Sep 17 00:00:00 2001 From: Tee Date: Sat, 28 Sep 2019 21:25:09 -0400 Subject: [PATCH 26/28] Add check for empty objects - Display empty objects and arrays without formatting --- src/js/background.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/js/background.js b/src/js/background.js index 760132f..4d9aafc 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -87,6 +87,12 @@ listen((port, msg) => { port.postMessage(['NOT JSON', 'technically JSON but not an object or array']); port.disconnect(); return; + } + // If it's an empty object or array, display without the formatting + else if (Object.entries(obj).length === 0 || obj.length === 0) { + port.postMessage(['NOT JSON', 'empty objects']); + port.disconnect(); + return; } // And send it the message to confirm that we're now formatting (so it can show a spinner) From 037fec3b2b146809d7f28ebd2564a0642df01f0d Mon Sep 17 00:00:00 2001 From: Tee Date: Sat, 28 Sep 2019 21:29:19 -0400 Subject: [PATCH 27/28] Revert "Add check for empty objects" This reverts commit 2714179abc2198ac90141704c9361cbc5e51889b. --- src/js/background.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/js/background.js b/src/js/background.js index 4d9aafc..760132f 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -87,12 +87,6 @@ listen((port, msg) => { port.postMessage(['NOT JSON', 'technically JSON but not an object or array']); port.disconnect(); return; - } - // If it's an empty object or array, display without the formatting - else if (Object.entries(obj).length === 0 || obj.length === 0) { - port.postMessage(['NOT JSON', 'empty objects']); - port.disconnect(); - return; } // And send it the message to confirm that we're now formatting (so it can show a spinner) From 7700bce430b56b3415eae7251c7006c54fa102ea Mon Sep 17 00:00:00 2001 From: Tee Date: Sat, 28 Sep 2019 21:33:36 -0400 Subject: [PATCH 28/28] Add check for empty objects and arrays - Display empty objects and arrays without formatting --- src/js/background.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/js/background.js b/src/js/background.js index 760132f..1b54ec9 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -87,6 +87,12 @@ listen((port, msg) => { port.postMessage(['NOT JSON', 'technically JSON but not an object or array']); port.disconnect(); return; + } + // If there's an empty object or array, return JSON as is + else if (Object.entries(obj).length === 0 || obj.length === 0) { + port.postMessage(['NOT JSON', 'empty object or array']); + port.disconnect(); + return; } // And send it the message to confirm that we're now formatting (so it can show a spinner)