diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..e7a9e23 --- /dev/null +++ b/.babelrc @@ -0,0 +1,25 @@ +{ + "env": { + "module": { + "presets": [ + ["env", { + "targets": { "node": "6" }, + "modules": false + }], + "stage-0", + "react" + ] + }, + "main": { + "presets": ["env", "stage-0", "react"] + } + }, + "plugins": [ + "babel-plugin-transform-regenerator", + "babel-plugin-transform-object-rest-spread", + "babel-plugin-inline-import", + "babel-plugin-transform-class-properties", + "babel-plugin-transform-es2015-classes", + "babel-plugin-syntax-dynamic-import" + ] +} diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..4c8dd3e --- /dev/null +++ b/.eslintrc @@ -0,0 +1,33 @@ +{ + "extends": "eslint-config-airbnb", + "parser": "babel-eslint", + "ecmaFeatures": { + "experimentalObjectRestSpread": true, + "modules": true, + "jsx": true + }, + "rules": { + "comma-dangle": [1, "never"], + "no-else-return": 0, + "no-use-before-define": [2, "nofunc"], + "no-param-reassign": 0, + "no-var": 1, + "no-labels": 0, + "guard-for-in": 0, + "prefer-const": 0, + "no-unused-vars": 1, + "key-spacing": [1, {"beforeColon": false, "afterColon": true, "mode": "minimum"}], + "no-loop-func": 1, + "react/sort-comp": [0], + "max-len": [1, 110, 4], + "camelcase": 1, + "new-cap": 0 + }, + "env": { + "browser": true, + "es6": true + }, + "globals": { + "THREE": false + } +} diff --git a/index.js b/index.js index d286d7a..84f82ae 100644 --- a/index.js +++ b/index.js @@ -15,24 +15,43 @@ const reducer = combineReducers({ sketcher: sketcherReducer }); const enhancer = compose(applyMiddleware(thunkMiddleware, promiseMiddleware(), createLogger({ collapsed: true }))); const store = createStore(reducer, enhancer); -// prepare html (SHOULDN'T BE DONE LIKE THIS) -document.body.style.margin = 0; -document.body.style.padding = 0; -document.body.style.height = '100%'; -document.documentElement.style.height = '100%'; -document.documentElement.style.overflow = 'hidden'; -document.getElementById('app').style.height = '100%'; - +// add actions to window import actionWrapper from 'redux-action-wrapper'; import * as actions from './src/actions/index.js'; window.actions = actionWrapper(actions, store.dispatch); +import { saveAs as saveAsLib } from 'file-saver'; -import modelData from './models/noodlebot.d3sketch'; +// download file +import { createFile } from './src/utils/exportUtils.js'; +window.downloadStl = () => { + store.dispatch(async (dispatch, getState) => { + const state = getState(); + const blob = await createFile(state.sketcher.present, 'stl-blob'); + saveAsLib(blob, 'doodle.stl'); + }); +}; + +// add model to store +import modelData from './models/circle_error.d3sketch'; import JSONToSketchData from './src/shape/JSONToSketchData.js'; -(async () => { - const data = await JSONToSketchData(JSON.parse(modelData)); +JSONToSketchData(JSON.parse(modelData)).then(data => { store.dispatch(actions.openSketch({ data })); -})(); +}); + +// default css +import jss from 'jss'; +import preset from 'jss-preset-default'; +import normalize from 'normalize-jss'; +jss.setup(preset()); +jss.createStyleSheet(normalize).attach(); +jss.createStyleSheet({ + '@global': { + '*': { margin: 0, padding: 0 }, + '#app, body, html': { height: '100%', fontFamily: 'sans-serif' }, + body: { overflow: 'auto' }, + html: { overflow: 'hidden' } + } +}).attach(); // render dom import React from 'react'; diff --git a/models/Doodle.d3sketch b/models/Doodle.d3sketch new file mode 100644 index 0000000..b9a82df --- /dev/null +++ b/models/Doodle.d3sketch @@ -0,0 +1 @@ +{"data":"{\"spaces\":[{\"matrix\":{\"metadata\":{\"type\":\"Matrix4\",\"library\":\"three.js\"},\"elements\":[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},\"objects\":[{\"height\":20,\"transform\":{\"metadata\":{\"library\":\"CAL\",\"type\":\"Matrix\"},\"matrix\":[-0.181725074441806,0,77.79195055196584,0,0.1712971976655113,-50.224936115703166]},\"z\":0,\"sculpt\":[{\"pos\":0,\"scale\":1},{\"pos\":1,\"scale\":1}],\"twist\":0,\"fill\":true,\"solid\":true,\"points\":{\"metadata\":{\"type\":\"VectorArray\",\"size\":\"Float32\"},\"data\":\"PUrTQ3sUzENmxklErkeMQ3tU0EPXI7FDAIDQQwAAskMAANBDAAC2QwCAzkMAgLlDAADMQwCAvEMAAMlDAAC/QwCAxUMAgMBDAADCQwAAwUMAAL5DAIDAQwCAukMAAL9DAAC3QwAAvUOFS7ZD7PG7QwAAtUMAgL1DAACyQwAAwEMAgK5DAIDBQwAAq0MAAMJDAACnQwCAwUMAgKNDAADAQwAAoEMAAL5DAACeQwAAu0MAAJxDAIC3QwCAm0MAgLNDM9ObQwo3sUNSOJ/CrkeMQ67HhEPNjMVDrueFQ1J4xENcb4pDPWrCQwr3jkOPYsFD1yOUQ7jewEPNrJhDZubBQ+wxnUOkcMNDwxWhQ9cDxkOkUKRDmhnJQ+GapUNSOM1DSEGmQ+zR0EPhmqVDXO/UQx8Fo0M9ithDXG+gQwCg20Ou55tDXK/dQwBgl0OaOd9DMzOSQ3G930OFq41DmjnfQxRujEMUzt5D4XqzQnvELURSmKxDUjjlQ3E9q0PN7ONDUripQ+Ea4UPDNalDj+LdQ5o5qkMp3NlDuL6rQz0K10NmRq5DAKDUQ+zRsUPXA9NDcV21Q8M10kM9arlDFM7RQ3v0vENxndJDAIDAQ+zR00M9isNDw9XVQ+wRxkMAQNhDexTHQ1J420PDlcdD9kjeQ3sUx0OPguFDXA/FQzNT5EOuB8NDuL7mQ2aGwUPNbOdDAHAfRHvELUT2iNRD4brQQ6Qw1EMKN9FDSIHTQ64H0kNcT9JDM5PSQ3Ed0UPh+tJDAMDPQ7ge00Ncj85D4frSQylczUMzk9JDw1XMQ2bm0UMpfMtDwxXRQ5r5ykOPItBDXM/KQ80Mz0NmJstDpLDNQ66ny0O4vsxDj4LMQxTuy0N7tM1Dj2LLQ2bmzkNxHctD10PQQ5r5ykN7dNFDSEHLQ66n0kP2qMtDPUrTQ3sUzEM=\"},\"holes\":[],\"color\":6939133,\"star\":{\"rays\":5,\"innerRadius\":7.898894154818322,\"outerRadius\":63.507109004739334},\"type\":\"COMPOUND_PATH\"}]}]}","appVersion":"0.17.4"} \ No newline at end of file diff --git a/models/circle_error.d3sketch b/models/circle_error.d3sketch new file mode 100644 index 0000000..1309a30 --- /dev/null +++ b/models/circle_error.d3sketch @@ -0,0 +1 @@ +{"data":"{\"spaces\":[{\"matrix\":{\"metadata\":{\"type\":\"Matrix4\",\"library\":\"three.js\"},\"elements\":[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},\"objects\":[{\"height\":20,\"transform\":{\"metadata\":{\"library\":\"CAL\",\"type\":\"Matrix\"},\"matrix\":[1,0,-16.42969984202213,0,1,-10.74249605055293]},\"z\":0,\"sculpt\":[{\"pos\":0,\"scale\":1},{\"pos\":1,\"scale\":1}],\"twist\":0,\"fill\":true,\"solid\":true,\"circle\":{\"radius\":31.061842611644483,\"segment\":6.283185307179586},\"color\":6873597,\"type\":\"CIRCLE\"},{\"height\":20,\"transform\":{\"metadata\":{\"library\":\"CAL\",\"type\":\"Matrix\"},\"matrix\":[1,0,-3.1595576619273373,0,1,-2.5276461295418784]},\"z\":0,\"sculpt\":[{\"pos\":0,\"scale\":1},{\"pos\":1,\"scale\":1}],\"twist\":0,\"fill\":true,\"solid\":false,\"circle\":{\"radius\":30.41228120273779,\"segment\":6.283185307179586},\"color\":6873597,\"type\":\"CIRCLE\"}]}]}","appVersion":"0.17.4"} \ No newline at end of file diff --git a/models/simple_hole.d3sketch b/models/simple_hole.d3sketch new file mode 100644 index 0000000..24f0336 --- /dev/null +++ b/models/simple_hole.d3sketch @@ -0,0 +1 @@ +{"data":"{\"spaces\":[{\"matrix\":{\"metadata\":{\"type\":\"Matrix4\",\"library\":\"three.js\"},\"elements\":[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},\"objects\":[{\"height\":21.005096748926302,\"transform\":{\"metadata\":{\"library\":\"CAL\",\"type\":\"Matrix\"},\"matrix\":[1,0,8.214849921011051,0,1,-3.7914691943127927]},\"z\":7.243224684956081,\"sculpt\":[{\"pos\":0,\"scale\":1},{\"pos\":1,\"scale\":1}],\"twist\":0,\"fill\":true,\"solid\":false,\"star\":{\"rays\":5,\"innerRadius\":18.00947867298578,\"outerRadius\":38.54660347551342},\"color\":6873597,\"type\":\"STAR\"},{\"height\":20,\"transform\":{\"metadata\":{\"library\":\"CAL\",\"type\":\"Matrix\"},\"matrix\":[1,0,-14.533965244865726,0,1,7.266982622432863]},\"z\":0,\"sculpt\":[{\"pos\":0,\"scale\":1},{\"pos\":1,\"scale\":1}],\"twist\":0,\"fill\":true,\"solid\":true,\"star\":{\"rays\":5,\"innerRadius\":18.00947867298578,\"outerRadius\":38.54660347551342},\"color\":6873597,\"type\":\"STAR\"}]}]}","appVersion":"0.17.4"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 117e30e..4c1f9a2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@doodle3d/doodle3d-core", - "version": "0.17.4", + "version": "0.17.5", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -108,6 +108,12 @@ } } }, + "acorn-to-esprima": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/acorn-to-esprima/-/acorn-to-esprima-2.0.8.tgz", + "integrity": "sha1-AD8MZC65ITL0F9NwjxStqCrfLrE=", + "dev": true + }, "after": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", @@ -154,6 +160,12 @@ "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", "dev": true }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, "ansi": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", @@ -181,6 +193,18 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" }, + "ansicolors": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", + "integrity": "sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk=", + "dev": true + }, + "ansistyles": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ansistyles/-/ansistyles-0.1.3.tgz", + "integrity": "sha1-XeYEFb2gcbs3EnhUyGT0GyMlRTk=", + "dev": true + }, "anymatch": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", @@ -299,6 +323,12 @@ "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", "dev": true }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, "asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -368,6 +398,15 @@ "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", "dev": true }, + "async-some": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/async-some/-/async-some-1.0.2.tgz", + "integrity": "sha1-TYqBYg1ZWHkbW5j4AtMgd3bpVQk=", + "dev": true, + "requires": { + "dezalgo": "1.0.3" + } + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -474,6 +513,20 @@ "source-map": "0.5.7" } }, + "babel-eslint": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-5.0.4.tgz", + "integrity": "sha1-prpRrlgqHU4lrf3bwqYfjVqQQLk=", + "dev": true, + "requires": { + "acorn-to-esprima": "2.0.8", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash.assign": "3.2.0", + "lodash.pick": "3.1.0" + } + }, "babel-generator": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", @@ -2062,6 +2115,12 @@ "safe-buffer": "5.1.1" } }, + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "dev": true + }, "clap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/clap/-/clap-1.2.3.tgz", @@ -2074,8 +2133,7 @@ "classnames": { "version": "2.2.5", "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.5.tgz", - "integrity": "sha1-+zgB1FNGdknvNgPH1hoCvRKb3m0=", - "dev": true + "integrity": "sha1-+zgB1FNGdknvNgPH1hoCvRKb3m0=" }, "clean-css": { "version": "4.1.9", @@ -3049,6 +3107,12 @@ "ms": "2.0.0" } }, + "debuglog": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", + "integrity": "sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=", + "dev": true + }, "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", @@ -3071,6 +3135,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, "deferred-leveldown": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", @@ -3220,6 +3290,16 @@ "defined": "1.0.0" } }, + "dezalgo": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", + "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", + "dev": true, + "requires": { + "asap": "2.0.6", + "wrappy": "1.0.2" + } + }, "diffie-hellman": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz", @@ -3256,6 +3336,30 @@ "buffer-indexof": "1.1.1" } }, + "doctrine": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-0.7.2.tgz", + "integrity": "sha1-fLhgNZujvpDgQLJrcpzkv6ZUxSM=", + "dev": true, + "requires": { + "esutils": "1.1.6", + "isarray": "0.0.1" + }, + "dependencies": { + "esutils": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz", + "integrity": "sha1-wBzKqa5LiXxtDD4hCuUvPHqEQ3U=", + "dev": true + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, "dom-converter": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.1.4.tgz", @@ -3735,6 +3839,157 @@ } } }, + "eslint": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-1.10.3.tgz", + "integrity": "sha1-+xmpGxPBWAgrvKKUsX2Xm8g1Ogo=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "concat-stream": "1.5.2", + "debug": "2.6.9", + "doctrine": "0.7.2", + "escape-string-regexp": "1.0.5", + "escope": "3.6.0", + "espree": "2.2.5", + "estraverse": "4.2.0", + "estraverse-fb": "1.3.2", + "esutils": "2.0.2", + "file-entry-cache": "1.3.1", + "glob": "5.0.15", + "globals": "8.18.0", + "handlebars": "4.0.11", + "inquirer": "0.11.4", + "is-my-json-valid": "2.16.1", + "is-resolvable": "1.0.1", + "js-yaml": "3.4.5", + "json-stable-stringify": "1.0.1", + "lodash.clonedeep": "3.0.2", + "lodash.merge": "3.3.2", + "lodash.omit": "3.1.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "object-assign": "4.1.1", + "optionator": "0.6.0", + "path-is-absolute": "1.0.1", + "path-is-inside": "1.0.2", + "shelljs": "0.5.3", + "strip-json-comments": "1.0.4", + "text-table": "0.2.0", + "user-home": "2.0.0", + "xml-escape": "1.0.0" + }, + "dependencies": { + "espree": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/espree/-/espree-2.2.5.tgz", + "integrity": "sha1-32kbkxCIlAKuspzAZnCMVmkLhUs=", + "dev": true + }, + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "globals": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-8.18.0.tgz", + "integrity": "sha1-k9SmK9ysOM+vr8R9awNHaMsP/LQ=", + "dev": true + }, + "inquirer": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.11.4.tgz", + "integrity": "sha1-geM3ToNhvq/y2XAWIG01nQsy+k0=", + "dev": true, + "requires": { + "ansi-escapes": "1.4.0", + "ansi-regex": "2.1.1", + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "cli-width": "1.1.1", + "figures": "1.7.0", + "lodash": "3.10.1", + "readline2": "1.0.1", + "run-async": "0.1.0", + "rx-lite": "3.1.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "through": "2.3.8" + } + }, + "js-yaml": { + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.4.5.tgz", + "integrity": "sha1-w0A3l98SuRhmV08t4jZG/oyvtE0=", + "dev": true, + "requires": { + "argparse": "1.0.9", + "esprima": "2.7.3" + }, + "dependencies": { + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + } + } + }, + "lodash": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "strip-json-comments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", + "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", + "dev": true + }, + "user-home": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", + "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=", + "dev": true, + "requires": { + "os-homedir": "1.0.2" + } + } + } + }, + "eslint-config-airbnb": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-3.1.0.tgz", + "integrity": "sha1-jQMLS4DaFxamcORmovr+RvZ0ZvQ=", + "dev": true + }, + "eslint-plugin-react": { + "version": "3.16.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-3.16.1.tgz", + "integrity": "sha1-Ji2Wt318SkKvgJpzwOUnpYYSKTw=", + "dev": true + }, "esprima": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", @@ -3757,6 +4012,12 @@ "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", "dev": true }, + "estraverse-fb": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/estraverse-fb/-/estraverse-fb-1.3.2.tgz", + "integrity": "sha1-0yOky15awzHOoDNBOpJT4WQ+B8Q=", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", @@ -3983,6 +4244,12 @@ "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", "dev": true }, + "fast-levenshtein": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.0.7.tgz", + "integrity": "sha1-AXjc3uAjuSkFGTrwlZ6KdjnP3Lk=", + "dev": true + }, "fastparse": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.1.tgz", @@ -4029,6 +4296,22 @@ "object-assign": "4.1.1" } }, + "file-entry-cache": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.3.1.tgz", + "integrity": "sha1-RMYepgeuS+nBQC9B9EJwy/4zT/g=", + "dev": true, + "requires": { + "flat-cache": "1.3.0", + "object-assign": "4.1.1" + } + }, + "file-saver": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-1.3.3.tgz", + "integrity": "sha1-zdTETTqiZOrC9o7BZbx5HDSvEjI=", + "dev": true + }, "filename-regex": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", @@ -4095,6 +4378,49 @@ "resolved": "https://registry.npmjs.org/fit-curve/-/fit-curve-0.1.6.tgz", "integrity": "sha1-w72+b1oqO+j4Aerr2kBpGRJWqVs=" }, + "flat-cache": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", + "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "dev": true, + "requires": { + "circular-json": "0.3.3", + "del": "2.2.2", + "graceful-fs": "4.1.11", + "write": "0.2.1" + }, + "dependencies": { + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "requires": { + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.0", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.6.2" + } + }, + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, + "requires": { + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + } + } + }, "flatten": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", @@ -5284,6 +5610,12 @@ "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" }, + "github-url-from-username-repo": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/github-url-from-username-repo/-/github-url-from-username-repo-1.0.2.tgz", + "integrity": "sha1-fdeTMNKr5pwQws73lxTJchV5Hfo=", + "dev": true + }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", @@ -5380,6 +5712,29 @@ "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=", "dev": true }, + "handlebars": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", + "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", + "dev": true, + "requires": { + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, "har-schema": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", @@ -6347,6 +6702,23 @@ "is-primitive": "2.0.0" } }, + "is-observable": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-0.2.0.tgz", + "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", + "dev": true, + "requires": { + "symbol-observable": "0.2.4" + }, + "dependencies": { + "symbol-observable": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-0.2.4.tgz", + "integrity": "sha1-lag9smGG1q9+ehjb2XYKL4bQj0A=", + "dev": true + } + } + }, "is-path-cwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", @@ -6429,6 +6801,12 @@ "has": "1.0.1" } }, + "is-resolvable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.1.tgz", + "integrity": "sha512-y5CXYbzvB3jTnWAZH1Nl7ykUWb6T3BcTs56HUruwBf8MhF56n1HWqhDWnVFo8GHrUPDgvUUNVhrc2U8W7iqz5g==", + "dev": true + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -6645,6 +7023,123 @@ } } }, + "jss": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/jss/-/jss-9.4.0.tgz", + "integrity": "sha512-ckJpElL5CimehboeLDQoHeY7mlxn0KPnPn2EZVbn6pomhfbTXiQJ6fAJXSp9rUM2hPtE0PG8Swzdy9vhB2v82w==", + "requires": { + "is-in-browser": "1.1.3", + "symbol-observable": "1.1.0", + "warning": "3.0.0" + }, + "dependencies": { + "symbol-observable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.1.0.tgz", + "integrity": "sha512-dQoid9tqQ+uotGhuTKEY11X4xhyYePVnqGSoSm3OGKh2E8LZ6RPULp1uXTctk33IeERlrRJYoVSBglsL05F5Uw==" + } + } + }, + "jss-camel-case": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/jss-camel-case/-/jss-camel-case-6.0.0.tgz", + "integrity": "sha512-XAYa7JpGkLdlLgEfuzSQSVONRzSVvv4Tvyv5H8hLmJuHeFHTWwVrJrW1Cg/buED3izXKwTU2KBGpeXjIR5Eaew==", + "dev": true + }, + "jss-compose": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/jss-compose/-/jss-compose-5.0.0.tgz", + "integrity": "sha512-YofRYuiA0+VbeOw0VjgkyO380sA4+TWDrW52nSluD9n+1FWOlDzNbgpZ/Sb3Y46+DcAbOS21W5jo6SAqUEiuwA==", + "dev": true, + "requires": { + "warning": "3.0.0" + } + }, + "jss-default-unit": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/jss-default-unit/-/jss-default-unit-8.0.0.tgz", + "integrity": "sha512-tzYgFePQL0neV3Z/oZlbv7XT9Oj2wd3DMjtRYtLGeExSz/SMyVyMhnVtuX01dWUAvA94RhkddvotpdpNDj2Y8g==", + "dev": true, + "requires": { + "is-observable": "0.2.0" + } + }, + "jss-expand": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/jss-expand/-/jss-expand-5.0.0.tgz", + "integrity": "sha512-ndsp+OnIeIc5XIHRFZlLeKNZZW25xqgohhMAyBSUZNZDuUAI9pdod3psHGRaQzyNrU3aMupyBvHnIglBHHgNTg==", + "dev": true, + "requires": { + "is-observable": "0.2.0" + } + }, + "jss-extend": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/jss-extend/-/jss-extend-6.0.1.tgz", + "integrity": "sha512-PgJRg6zkILmgiA4Ye6P33rTjHAVDx+/dN3syT2JE6EhylfmOYs/2d+MsMxXH+Fkh9wjlvNUiinlu7Mljl+TuXA==", + "dev": true, + "requires": { + "is-observable": "0.2.0", + "warning": "3.0.0" + } + }, + "jss-global": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jss-global/-/jss-global-3.0.0.tgz", + "integrity": "sha512-wxYn7vL+TImyQYGAfdplg7yaxnPQ9RaXY/cIA8hawaVnmmWxDHzBK32u1y+RAvWboa3lW83ya3nVZ/C+jyjZ5Q==", + "dev": true + }, + "jss-nested": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/jss-nested/-/jss-nested-6.0.1.tgz", + "integrity": "sha512-rn964TralHOZxoyEgeq3hXY8hyuCElnvQoVrQwKHVmu55VRDd6IqExAx9be5HgK0yN/+hQdgAXQl/GUrBbbSTA==", + "dev": true, + "requires": { + "warning": "3.0.0" + } + }, + "jss-preset-default": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jss-preset-default/-/jss-preset-default-4.0.1.tgz", + "integrity": "sha512-ZBj1ifZAPDn8iiC9PuB1jDCm/I0Bn53UNL9NHBgOY6AyMorDPgEb3IRjt6H+OHKwnEuCHw8tC/e3/q4I4DgTIw==", + "dev": true, + "requires": { + "jss-camel-case": "6.0.0", + "jss-compose": "5.0.0", + "jss-default-unit": "8.0.0", + "jss-expand": "5.0.0", + "jss-extend": "6.0.1", + "jss-global": "3.0.0", + "jss-nested": "6.0.1", + "jss-props-sort": "6.0.0", + "jss-template": "1.0.0", + "jss-vendor-prefixer": "7.0.0" + } + }, + "jss-props-sort": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/jss-props-sort/-/jss-props-sort-6.0.0.tgz", + "integrity": "sha512-E89UDcrphmI0LzmvYk25Hp4aE5ZBsXqMWlkFXS0EtPkunJkRr+WXdCNYbXbksIPnKlBenGB9OxzQY+mVc70S+g==", + "dev": true + }, + "jss-template": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/jss-template/-/jss-template-1.0.0.tgz", + "integrity": "sha512-NFAgcAp8V2fUxffWGGQ5zAolJq3neAvNjmWIwSmy9M6bmXTK9rnTu0fBlAcUh0ALC94B596/2TRphdkE5WRECQ==", + "dev": true, + "requires": { + "warning": "3.0.0" + } + }, + "jss-vendor-prefixer": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/jss-vendor-prefixer/-/jss-vendor-prefixer-7.0.0.tgz", + "integrity": "sha512-Agd+FKmvsI0HLcYXkvy8GYOw3AAASBUpsmIRvVQheps+JWaN892uFOInTr0DRydwaD91vSSUCU4NssschvF7MA==", + "dev": true, + "requires": { + "css-vendor": "0.3.8" + } + }, "jszip": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.1.5.tgz", @@ -6682,6 +7177,11 @@ } } }, + "keycode": { + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/keycode/-/keycode-2.1.9.tgz", + "integrity": "sha1-lkojxU5IiUBbSGGlyfBIDUUUHfo=" + }, "killable": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.0.tgz", @@ -6840,6 +7340,16 @@ } } }, + "levn": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.2.5.tgz", + "integrity": "sha1-uo0znQykphDjo/FFucr0iAcVUFQ=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2", + "type-check": "0.3.2" + } + }, "lexical-scope": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz", @@ -6913,18 +7423,174 @@ "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.4.tgz", "integrity": "sha1-3MHXVS4VCgZABzupyzHXDwMpUOc=" }, + "lodash._arraycopy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz", + "integrity": "sha1-due3wfH7klRzdIeKVi7Qaj5Q9uE=", + "dev": true + }, + "lodash._arrayeach": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz", + "integrity": "sha1-urFWsqkNPxu9XGU0AzSeXlkz754=", + "dev": true + }, + "lodash._arraymap": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._arraymap/-/lodash._arraymap-3.0.0.tgz", + "integrity": "sha1-Go/Q9MDfS2HeoHbXF83Jfwo8PmY=", + "dev": true + }, + "lodash._baseassign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", + "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", + "dev": true, + "requires": { + "lodash._basecopy": "3.0.1", + "lodash.keys": "3.1.2" + } + }, + "lodash._baseclone": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lodash._baseclone/-/lodash._baseclone-3.3.0.tgz", + "integrity": "sha1-MDUZv2OT/n5C802LYw73eU41Qrc=", + "dev": true, + "requires": { + "lodash._arraycopy": "3.0.0", + "lodash._arrayeach": "3.0.0", + "lodash._baseassign": "3.2.0", + "lodash._basefor": "3.0.3", + "lodash.isarray": "3.0.4", + "lodash.keys": "3.1.2" + } + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", + "dev": true + }, + "lodash._basedifference": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash._basedifference/-/lodash._basedifference-3.0.3.tgz", + "integrity": "sha1-8sIEKWwqeOArOJCBtu3KyTPPYpw=", + "dev": true, + "requires": { + "lodash._baseindexof": "3.1.0", + "lodash._cacheindexof": "3.0.2", + "lodash._createcache": "3.1.2" + } + }, + "lodash._baseflatten": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/lodash._baseflatten/-/lodash._baseflatten-3.1.4.tgz", + "integrity": "sha1-B3D/gBMa9uNPO1EXlqe6UhTmX/c=", + "dev": true, + "requires": { + "lodash.isarguments": "3.1.0", + "lodash.isarray": "3.0.4" + } + }, + "lodash._basefor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash._basefor/-/lodash._basefor-3.0.3.tgz", + "integrity": "sha1-dVC06SGO8J+tJDQ7YSAhx5tMIMI=", + "dev": true + }, + "lodash._baseindexof": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz", + "integrity": "sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw=", + "dev": true + }, + "lodash._bindcallback": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz", + "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=", + "dev": true + }, + "lodash._cacheindexof": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz", + "integrity": "sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI=", + "dev": true + }, + "lodash._createassigner": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz", + "integrity": "sha1-g4pbri/aymOsIt7o4Z+k5taXCxE=", + "dev": true, + "requires": { + "lodash._bindcallback": "3.0.1", + "lodash._isiterateecall": "3.0.9", + "lodash.restparam": "3.6.1" + } + }, + "lodash._createcache": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash._createcache/-/lodash._createcache-3.1.2.tgz", + "integrity": "sha1-VtagZAF2JeeevKa4AY4XRAvc8JM=", + "dev": true, + "requires": { + "lodash._getnative": "3.9.1" + } + }, "lodash._getnative": { "version": "3.9.1", "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", "dev": true }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", + "dev": true + }, + "lodash._pickbyarray": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/lodash._pickbyarray/-/lodash._pickbyarray-3.0.2.tgz", + "integrity": "sha1-H4mNlgfrVgsOFnOEt3x8bRCKpMU=", + "dev": true + }, + "lodash._pickbycallback": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._pickbycallback/-/lodash._pickbycallback-3.0.0.tgz", + "integrity": "sha1-/2G5oBens699MObFPeKK+hm4dQo=", + "dev": true, + "requires": { + "lodash._basefor": "3.0.3", + "lodash.keysin": "3.0.8" + } + }, + "lodash.assign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-3.2.0.tgz", + "integrity": "sha1-POnwI0tLIiPilrj6CsH+6OvKZPo=", + "dev": true, + "requires": { + "lodash._baseassign": "3.2.0", + "lodash._createassigner": "3.1.1", + "lodash.keys": "3.1.2" + } + }, "lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", "dev": true }, + "lodash.clonedeep": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-3.0.2.tgz", + "integrity": "sha1-oKHkDYKl6on/WxR7hETtY9koJ9s=", + "dev": true, + "requires": { + "lodash._baseclone": "3.3.0", + "lodash._bindcallback": "3.0.1" + } + }, "lodash.debounce": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-3.1.1.tgz", @@ -6934,17 +7600,102 @@ "lodash._getnative": "3.9.1" } }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", + "dev": true + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", + "dev": true + }, "lodash.isnull": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/lodash.isnull/-/lodash.isnull-3.0.0.tgz", "integrity": "sha1-+vvlnqHcon7teGU0A53YTC4HxW4=" }, + "lodash.isplainobject": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-3.2.0.tgz", + "integrity": "sha1-moI4rhayAEMpYM1zRlEtASP79MU=", + "dev": true, + "requires": { + "lodash._basefor": "3.0.3", + "lodash.isarguments": "3.1.0", + "lodash.keysin": "3.0.8" + } + }, + "lodash.istypedarray": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/lodash.istypedarray/-/lodash.istypedarray-3.0.6.tgz", + "integrity": "sha1-yaR3SYYHUB2OhJTSg7h8OSgc72I=", + "dev": true + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "dev": true, + "requires": { + "lodash._getnative": "3.9.1", + "lodash.isarguments": "3.1.0", + "lodash.isarray": "3.0.4" + } + }, + "lodash.keysin": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/lodash.keysin/-/lodash.keysin-3.0.8.tgz", + "integrity": "sha1-IsRJPrvtsUJ5YqVLRFssinZ/tH8=", + "dev": true, + "requires": { + "lodash.isarguments": "3.1.0", + "lodash.isarray": "3.0.4" + } + }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", "dev": true }, + "lodash.merge": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-3.3.2.tgz", + "integrity": "sha1-DZDZPtY3sYeEN7s+IWASYNev6ZQ=", + "dev": true, + "requires": { + "lodash._arraycopy": "3.0.0", + "lodash._arrayeach": "3.0.0", + "lodash._createassigner": "3.1.1", + "lodash._getnative": "3.9.1", + "lodash.isarguments": "3.1.0", + "lodash.isarray": "3.0.4", + "lodash.isplainobject": "3.2.0", + "lodash.istypedarray": "3.0.6", + "lodash.keys": "3.1.2", + "lodash.keysin": "3.0.8", + "lodash.toplainobject": "3.0.0" + } + }, + "lodash.omit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-3.1.0.tgz", + "integrity": "sha1-iX/jguZBPZrJfGH3jtHgV6AK+fM=", + "dev": true, + "requires": { + "lodash._arraymap": "3.0.0", + "lodash._basedifference": "3.0.3", + "lodash._baseflatten": "3.1.4", + "lodash._bindcallback": "3.0.1", + "lodash._pickbyarray": "3.0.2", + "lodash._pickbycallback": "3.0.0", + "lodash.keysin": "3.0.8", + "lodash.restparam": "3.6.1" + } + }, "lodash.pad": { "version": "4.5.1", "resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.5.1.tgz", @@ -6960,6 +7711,35 @@ "resolved": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.6.1.tgz", "integrity": "sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs=" }, + "lodash.pick": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-3.1.0.tgz", + "integrity": "sha1-8lKoVbIEa2G805BLJvdr0u/GVVA=", + "dev": true, + "requires": { + "lodash._baseflatten": "3.1.4", + "lodash._bindcallback": "3.0.1", + "lodash._pickbyarray": "3.0.2", + "lodash._pickbycallback": "3.0.0", + "lodash.restparam": "3.6.1" + } + }, + "lodash.restparam": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", + "dev": true + }, + "lodash.toplainobject": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash.toplainobject/-/lodash.toplainobject-3.0.0.tgz", + "integrity": "sha1-KHkK2ULSk9eKpmOgfs9/UsoEGY0=", + "dev": true, + "requires": { + "lodash._basecopy": "3.0.1", + "lodash.keysin": "3.0.8" + } + }, "lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", @@ -7563,6 +8343,12 @@ "abbrev": "1.1.1" } }, + "normalize-jss": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/normalize-jss/-/normalize-jss-4.0.0.tgz", + "integrity": "sha512-zsn6yP0fOoDpzktjHCWKGVDMssYso0h6wxjW3+ABUp5CeEPpYc9YUy6cy7/SLO2yrPvtEzx0vu79Y9iEF2qSnA==", + "dev": true + }, "normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", @@ -7636,7 +8422,7 @@ "editor": "1.0.0", "fs-vacuum": "1.2.9", "fs-write-stream-atomic": "1.0.8", - "fstream": "1.0.10", + "fstream": "1.0.11", "fstream-npm": "1.1.1", "github-url-from-git": "1.4.0", "github-url-from-username-repo": "1.0.2", @@ -7665,7 +8451,7 @@ "once": "1.4.0", "opener": "1.4.1", "osenv": "0.1.3", - "path-is-inside": "1.0.1", + "path-is-inside": "1.0.2", "read": "1.0.7", "read-installed": "4.0.3", "read-package-json": "2.0.4", @@ -7693,65 +8479,65 @@ "dependencies": { "abbrev": { "version": "1.0.9", - "bundled": true, + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", "dev": true }, "ansi": { "version": "0.3.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", + "integrity": "sha1-DELU+xcWDVqa8eSEus4cZpIsGyE=", "dev": true }, "ansi-regex": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz", + "integrity": "sha1-xQYbbg74qBd15Q9dZhUb9r83EQc=", "dev": true }, - "ansicolors": { - "version": "0.3.2", - "bundled": true - }, - "ansistyles": { - "version": "0.1.3", - "bundled": true - }, "archy": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", "dev": true }, - "async-some": { - "version": "1.0.2", - "bundled": true, - "requires": { - "dezalgo": "1.0.3" - } - }, "block-stream": { "version": "0.0.9", - "bundled": true, + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", "dev": true, "requires": { "inherits": "2.0.3" } }, + "builtins": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-0.0.7.tgz", + "integrity": "sha1-NVIZzWzxjb58Acx/0tznZc/cVJo=", + "dev": true + }, "char-spinner": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/char-spinner/-/char-spinner-1.0.1.tgz", + "integrity": "sha1-5upnvSR+EHESmDt6sEee02KAAIE=", "dev": true }, "chmodr": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/chmodr/-/chmodr-1.0.2.tgz", + "integrity": "sha1-BGYrky0PAuxm3qorDqQoEZaOPrk=", "dev": true }, "chownr": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", "dev": true }, "cmd-shim": { "version": "2.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-2.0.2.tgz", + "integrity": "sha1-b8vamUg6j9FdfTChlspp1oii79s=", "dev": true, "requires": { "graceful-fs": "4.1.6", @@ -7760,7 +8546,8 @@ }, "columnify": { "version": "1.5.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz", + "integrity": "sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs=", "dev": true, "requires": { "strip-ansi": "3.0.1", @@ -7769,7 +8556,8 @@ "dependencies": { "wcwidth": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.0.tgz", + "integrity": "sha1-AtBZ/3qPx0Hg9rXaHmmytA2uym8=", "dev": true, "requires": { "defaults": "1.0.3" @@ -7777,7 +8565,8 @@ "dependencies": { "defaults": { "version": "1.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", "dev": true, "requires": { "clone": "1.0.2" @@ -7785,7 +8574,8 @@ "dependencies": { "clone": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", + "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=", "dev": true } } @@ -7796,7 +8586,8 @@ }, "config-chain": { "version": "1.1.10", - "bundled": true, + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.10.tgz", + "integrity": "sha1-f8OD3g/MhNcRy0Zb0XZXnK1hI0Y=", "dev": true, "requires": { "ini": "1.3.4", @@ -7805,43 +8596,33 @@ "dependencies": { "proto-list": { "version": "1.2.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", "dev": true } } }, - "dezalgo": { - "version": "1.0.3", - "bundled": true, - "requires": { - "asap": "2.0.3", - "wrappy": "1.0.2" - }, - "dependencies": { - "asap": { - "version": "2.0.3", - "bundled": true - } - } - }, "editor": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/editor/-/editor-1.0.0.tgz", + "integrity": "sha1-YMf4e9YrzGqJT6jM1q+3gjok90I=", "dev": true }, "fs-vacuum": { "version": "1.2.9", - "bundled": true, + "resolved": "https://registry.npmjs.org/fs-vacuum/-/fs-vacuum-1.2.9.tgz", + "integrity": "sha1-T5AZOrjqAokJlbzU6ARlml02ay0=", "dev": true, "requires": { "graceful-fs": "4.1.6", - "path-is-inside": "1.0.1", + "path-is-inside": "1.0.2", "rimraf": "2.5.4" } }, "fs-write-stream-atomic": { "version": "1.0.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.8.tgz", + "integrity": "sha1-5Jqt3yiPh9Rv+eiC8hahOrxAd4s=", "dev": true, "requires": { "graceful-fs": "4.1.6", @@ -7852,24 +8633,16 @@ "dependencies": { "iferr": { "version": "0.1.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", "dev": true } } }, - "fstream": { - "version": "1.0.10", - "bundled": true, - "requires": { - "graceful-fs": "4.1.6", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.5.4" - } - }, "fstream-npm": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/fstream-npm/-/fstream-npm-1.1.1.tgz", + "integrity": "sha1-a5F122I5qD2CCeIyQmxJTbspaQw=", "dev": true, "requires": { "fstream-ignore": "1.0.5", @@ -7878,10 +8651,11 @@ "dependencies": { "fstream-ignore": { "version": "1.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", + "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", "dev": true, "requires": { - "fstream": "1.0.10", + "fstream": "1.0.11", "inherits": "2.0.3", "minimatch": "3.0.3" } @@ -7890,16 +8664,14 @@ }, "github-url-from-git": { "version": "1.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.4.0.tgz", + "integrity": "sha1-KF5rUggZABveEoZ0cEN55P8D4N4=", "dev": true }, - "github-url-from-username-repo": { - "version": "1.0.2", - "bundled": true - }, "glob": { "version": "7.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", + "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", "dev": true, "requires": { "fs.realpath": "1.0.0", @@ -7912,34 +8684,40 @@ "dependencies": { "fs.realpath": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, "path-is-absolute": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz", + "integrity": "sha1-Jj2tpmqz8vsQv3+dJN2PPlcO+RI=", "dev": true } } }, "graceful-fs": { "version": "4.1.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha1-UUw4dysxvuLgi+3CGgrrOr9UwZ4=", "dev": true }, "hosted-git-info": { "version": "2.1.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.5.tgz", + "integrity": "sha1-C6gdkNouJas0ozLm7HeTbhWYEYs=", "dev": true }, "imurmurhash": { "version": "0.1.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, "inflight": { "version": "1.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz", + "integrity": "sha1-2zIEzVqd4ubNiQuFxuL2a89PYgo=", "dev": true, "requires": { "once": "1.4.0", @@ -7948,17 +8726,20 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, "ini": { "version": "1.3.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", "dev": true }, "init-package-json": { "version": "1.9.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.9.4.tgz", + "integrity": "sha1-tAU9C0Dwz4QqQZZpN8s9wPU06FY=", "dev": true, "requires": { "glob": "6.0.4", @@ -7973,7 +8754,8 @@ "dependencies": { "glob": { "version": "6.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", "dev": true, "requires": { "inflight": "1.0.5", @@ -7985,14 +8767,16 @@ "dependencies": { "path-is-absolute": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz", + "integrity": "sha1-Jj2tpmqz8vsQv3+dJN2PPlcO+RI=", "dev": true } } }, "promzard": { "version": "0.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/promzard/-/promzard-0.3.0.tgz", + "integrity": "sha1-JqXW7ox97kyxIggwWs+5O6OCqe4=", "dev": true, "requires": { "read": "1.0.7" @@ -8002,12 +8786,14 @@ }, "lockfile": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/lockfile/-/lockfile-1.0.1.tgz", + "integrity": "sha1-nTU+z+P1TRULtX+J1RdGk1o5xPU=", "dev": true }, "lru-cache": { "version": "4.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.1.tgz", + "integrity": "sha1-E0OVXtry432bnn7nJB4nxLn7cr4=", "dev": true, "requires": { "pseudomap": "1.0.2", @@ -8016,19 +8802,22 @@ "dependencies": { "pseudomap": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", "dev": true }, "yallist": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.0.0.tgz", + "integrity": "sha1-MGxUODXwnuGkyyO3vOmrNByRzdQ=", "dev": true } } }, "minimatch": { "version": "3.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=", "dev": true, "requires": { "brace-expansion": "1.1.6" @@ -8036,7 +8825,8 @@ "dependencies": { "brace-expansion": { "version": "1.1.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "integrity": "sha1-cZfX6qm4fmSDkOph/GbIRCdCDfk=", "dev": true, "requires": { "balanced-match": "0.4.2", @@ -8045,12 +8835,14 @@ "dependencies": { "balanced-match": { "version": "0.4.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", "dev": true }, "concat-map": { "version": "0.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true } } @@ -8059,7 +8851,8 @@ }, "mkdirp": { "version": "0.5.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { "minimist": "0.0.8" @@ -8067,17 +8860,19 @@ "dependencies": { "minimist": { "version": "0.0.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true } } }, "node-gyp": { "version": "3.6.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.6.0.tgz", + "integrity": "sha1-dHT2OjoFARYd2gtjQfAi8UxCP6Y=", "dev": true, "requires": { - "fstream": "1.0.10", + "fstream": "1.0.11", "glob": "7.0.6", "graceful-fs": "4.1.6", "minimatch": "3.0.3", @@ -8094,26 +8889,22 @@ "dependencies": { "semver": { "version": "5.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", "dev": true } } }, - "nopt": { - "version": "3.0.6", - "bundled": true, - "requires": { - "abbrev": "1.0.9" - } - }, "normalize-git-url": { "version": "3.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/normalize-git-url/-/normalize-git-url-3.0.2.tgz", + "integrity": "sha1-jl8Uvgva7bc+ByADEKpBbCc1D8Q=", "dev": true }, "normalize-package-data": { "version": "2.3.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.5.tgz", + "integrity": "sha1-jZJPFClg4Xd+f/4XBUNjHMfLAt8=", "dev": true, "requires": { "hosted-git-info": "2.1.5", @@ -8124,7 +8915,8 @@ "dependencies": { "is-builtin-module": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { "builtin-modules": "1.1.0" @@ -8132,7 +8924,8 @@ "dependencies": { "builtin-modules": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.0.tgz", + "integrity": "sha1-EFOVX9mUpXRuUl5Kxxe4HK8HSRw=", "dev": true } } @@ -8141,12 +8934,14 @@ }, "npm-cache-filename": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/npm-cache-filename/-/npm-cache-filename-1.0.2.tgz", + "integrity": "sha1-3tMGxbC/yHCp6fr4I7xfKD4FrhE=", "dev": true }, "npm-install-checks": { "version": "1.0.7", - "bundled": true, + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-1.0.7.tgz", + "integrity": "sha1-bZGu2grJaAHx7Xqt7hFqbAoIalc=", "dev": true, "requires": { "npmlog": "2.0.4", @@ -8155,7 +8950,8 @@ }, "npm-package-arg": { "version": "4.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-4.1.0.tgz", + "integrity": "sha1-LgFfisAHN8uX+ZfJy/BZ9Cp0Un0=", "dev": true, "requires": { "hosted-git-info": "2.1.5", @@ -8164,7 +8960,8 @@ }, "npm-registry-client": { "version": "7.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.2.1.tgz", + "integrity": "sha1-x5ImawiMwxP4Ul5+NSSGJscj23U=", "dev": true, "requires": { "concat-stream": "1.5.2", @@ -8181,7 +8978,8 @@ "dependencies": { "concat-stream": { "version": "1.5.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", + "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", "dev": true, "requires": { "inherits": "2.0.3", @@ -8191,7 +8989,8 @@ "dependencies": { "readable-stream": { "version": "2.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", "dev": true, "requires": { "core-util-is": "1.0.2", @@ -8204,53 +9003,62 @@ "dependencies": { "core-util-is": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, "isarray": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, "process-nextick-args": { "version": "1.0.7", - "bundled": true, + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", "dev": true }, "string_decoder": { "version": "0.10.31", - "bundled": true, + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true }, "util-deprecate": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true } } }, "typedarray": { "version": "0.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true } } }, "retry": { "version": "0.10.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.0.tgz", + "integrity": "sha1-ZJ4VykCEItmDGBYZNef31lLUNd0=", "dev": true } } }, "npm-user-validate": { "version": "0.1.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.5.tgz", + "integrity": "sha1-UkZdUMLSApSlcSW5lrrtv1bFAEs=", "dev": true }, "npmlog": { "version": "2.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-2.0.4.tgz", + "integrity": "sha1-mLUlMPJRTKkNCexbIsiEZyI3VpI=", "dev": true, "requires": { "ansi": "0.3.1", @@ -8260,7 +9068,8 @@ "dependencies": { "are-we-there-yet": { "version": "1.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz", + "integrity": "sha1-gORw6VoIR5T+GJkmLFZnxuiN4bM=", "dev": true, "requires": { "delegates": "1.0.0", @@ -8269,14 +9078,16 @@ "dependencies": { "delegates": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true } } }, "gauge": { "version": "1.2.7", - "bundled": true, + "resolved": "https://registry.npmjs.org/gauge/-/gauge-1.2.7.tgz", + "integrity": "sha1-6c7FSD09TuDvRLYKfZnkk14TbZM=", "dev": true, "requires": { "ansi": "0.3.1", @@ -8288,22 +9099,26 @@ "dependencies": { "has-unicode": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.0.tgz", + "integrity": "sha1-o82Wwwe6QdVZxaLuQIwSoRxMLsM=", "dev": true }, "lodash._baseslice": { "version": "4.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/lodash._baseslice/-/lodash._baseslice-4.0.0.tgz", + "integrity": "sha1-9c4d+YKUjsr/Y/IjhTQVt7l2NwQ=", "dev": true }, "lodash._basetostring": { "version": "4.12.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-4.12.0.tgz", + "integrity": "sha1-kyfJ3FFYhmt/pLnUL0Y45XZt2d8=", "dev": true }, "lodash.pad": { "version": "4.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.4.0.tgz", + "integrity": "sha1-+qON8mwKaexQhqgiRslY4VDcsas=", "dev": true, "requires": { "lodash._baseslice": "4.0.0", @@ -8313,7 +9128,8 @@ }, "lodash.padend": { "version": "4.5.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.5.0.tgz", + "integrity": "sha1-oonpN37i5t6Lp/EfOo6zJgcLdhk=", "dev": true, "requires": { "lodash._baseslice": "4.0.0", @@ -8323,7 +9139,8 @@ }, "lodash.padstart": { "version": "4.5.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.5.0.tgz", + "integrity": "sha1-PqGQ9nNIQcM2TSedEeBWcmtgp5o=", "dev": true, "requires": { "lodash._baseslice": "4.0.0", @@ -8333,7 +9150,8 @@ }, "lodash.tostring": { "version": "4.1.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.4.tgz", + "integrity": "sha1-Vgwn0fjq3eA8LM4Zj+9cAx2CmPs=", "dev": true } } @@ -8342,7 +9160,8 @@ }, "once": { "version": "1.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { "wrappy": "1.0.2" @@ -8350,12 +9169,14 @@ }, "opener": { "version": "1.4.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/opener/-/opener-1.4.1.tgz", + "integrity": "sha1-iXWQrNGu0zEbcDtYvMtNQ/VvKJU=", "dev": true }, "osenv": { "version": "0.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.3.tgz", + "integrity": "sha1-g88FxtZFj8TVrGNi6jJdkvJ1Qhc=", "dev": true, "requires": { "os-homedir": "1.0.0", @@ -8364,23 +9185,22 @@ "dependencies": { "os-homedir": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.0.tgz", + "integrity": "sha1-43B4vGG1hpBjBTiXJX457BJhtwI=", "dev": true }, "os-tmpdir": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.1.tgz", + "integrity": "sha1-6bQjoe2vR5iCVi6S7XHXdDoHG24=", "dev": true } } }, - "path-is-inside": { - "version": "1.0.1", - "bundled": true - }, "read": { "version": "1.0.7", - "bundled": true, + "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", + "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=", "dev": true, "requires": { "mute-stream": "0.0.5" @@ -8388,47 +9208,16 @@ "dependencies": { "mute-stream": { "version": "0.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", + "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=", "dev": true } } }, - "read-installed": { - "version": "4.0.3", - "bundled": true, - "requires": { - "debuglog": "1.0.1", - "graceful-fs": "4.1.6", - "read-package-json": "2.0.4", - "readdir-scoped-modules": "1.0.2", - "semver": "5.1.0", - "slide": "1.1.6", - "util-extend": "1.0.1" - }, - "dependencies": { - "debuglog": { - "version": "1.0.1", - "bundled": true - }, - "readdir-scoped-modules": { - "version": "1.0.2", - "bundled": true, - "requires": { - "debuglog": "1.0.1", - "dezalgo": "1.0.3", - "graceful-fs": "4.1.6", - "once": "1.4.0" - } - }, - "util-extend": { - "version": "1.0.1", - "bundled": true - } - } - }, "read-package-json": { "version": "2.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.0.4.tgz", + "integrity": "sha1-Ye0bIlbqQ42ACIlQkL6EuOeZyFM=", "dev": true, "requires": { "glob": "6.0.4", @@ -8439,7 +9228,8 @@ "dependencies": { "glob": { "version": "6.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", "dev": true, "requires": { "inflight": "1.0.5", @@ -8451,14 +9241,16 @@ "dependencies": { "path-is-absolute": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz", + "integrity": "sha1-Jj2tpmqz8vsQv3+dJN2PPlcO+RI=", "dev": true } } }, "json-parse-helpfulerror": { "version": "1.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", + "integrity": "sha1-E/FM4C7tTpgSl7ZOueO5MuLdE9w=", "dev": true, "requires": { "jju": "1.3.0" @@ -8466,7 +9258,8 @@ "dependencies": { "jju": { "version": "1.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/jju/-/jju-1.3.0.tgz", + "integrity": "sha1-2t2e8BkkvHKLA/L3l5vb1i96Kqo=", "dev": true } } @@ -8475,7 +9268,8 @@ }, "readable-stream": { "version": "2.1.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz", + "integrity": "sha1-ZvqLcg4UOLNkaB8q0aY8YYRIydA=", "dev": true, "requires": { "buffer-shims": "1.0.0", @@ -8489,39 +9283,46 @@ "dependencies": { "buffer-shims": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", + "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=", "dev": true }, "core-util-is": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, "isarray": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, "process-nextick-args": { "version": "1.0.7", - "bundled": true, + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", "dev": true }, "string_decoder": { "version": "0.10.31", - "bundled": true, + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true }, "util-deprecate": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true } } }, "realize-package-specifier": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/realize-package-specifier/-/realize-package-specifier-3.0.1.tgz", + "integrity": "sha1-/eMukmRI44+ZM02Vt7CNUeOpjZ8=", "dev": true, "requires": { "dezalgo": "1.0.3", @@ -8530,7 +9331,8 @@ }, "request": { "version": "2.74.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/request/-/request-2.74.0.tgz", + "integrity": "sha1-dpPKdou7DqXIzgjAhKRe+gW4kqs=", "dev": true, "requires": { "aws-sign2": "0.6.0", @@ -8558,17 +9360,20 @@ "dependencies": { "aws-sign2": { "version": "0.6.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", "dev": true }, "aws4": { "version": "1.4.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.4.1.tgz", + "integrity": "sha1-/efVKSRm0jDl7g9OA42d+qsI/GE=", "dev": true }, "bl": { "version": "1.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/bl/-/bl-1.1.2.tgz", + "integrity": "sha1-/cqHGplxOqANGeO7ukHER4emU5g=", "dev": true, "requires": { "readable-stream": "2.0.6" @@ -8576,7 +9381,8 @@ "dependencies": { "readable-stream": { "version": "2.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", "dev": true, "requires": { "core-util-is": "1.0.2", @@ -8589,27 +9395,32 @@ "dependencies": { "core-util-is": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, "isarray": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, "process-nextick-args": { "version": "1.0.7", - "bundled": true, + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", "dev": true }, "string_decoder": { "version": "0.10.31", - "bundled": true, + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true }, "util-deprecate": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true } } @@ -8618,12 +9429,14 @@ }, "caseless": { "version": "0.11.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", + "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", "dev": true }, "combined-stream": { "version": "1.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", "dev": true, "requires": { "delayed-stream": "1.0.0" @@ -8631,24 +9444,28 @@ "dependencies": { "delayed-stream": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true } } }, "extend": { "version": "3.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz", + "integrity": "sha1-WkdDU7nzNT3dgXbf03uRyDpG8dQ=", "dev": true }, "forever-agent": { "version": "0.6.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", "dev": true }, "form-data": { "version": "1.0.0-rc4", - "bundled": true, + "resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc4.tgz", + "integrity": "sha1-BaxrwiIntD5EYfSIFhVUaZ1Pi14=", "dev": true, "requires": { "async": "1.5.2", @@ -8658,14 +9475,16 @@ "dependencies": { "async": { "version": "1.5.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", "dev": true } } }, "har-validator": { "version": "2.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", + "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", "dev": true, "requires": { "chalk": "1.1.3", @@ -8676,7 +9495,8 @@ "dependencies": { "chalk": { "version": "1.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { "ansi-styles": "2.2.1", @@ -8688,17 +9508,20 @@ "dependencies": { "ansi-styles": { "version": "2.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "dev": true }, "escape-string-regexp": { "version": "1.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, "has-ansi": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { "ansi-regex": "2.0.0" @@ -8706,14 +9529,16 @@ }, "supports-color": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true } } }, "commander": { "version": "2.9.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", "dev": true, "requires": { "graceful-readlink": "1.0.1" @@ -8721,14 +9546,16 @@ "dependencies": { "graceful-readlink": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", "dev": true } } }, "is-my-json-valid": { "version": "2.13.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.13.1.tgz", + "integrity": "sha1-1Vd4qC/rawlj/0vhEdXRaE6JBwc=", "dev": true, "requires": { "generate-function": "2.0.0", @@ -8739,12 +9566,14 @@ "dependencies": { "generate-function": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", + "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", "dev": true }, "generate-object-property": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", "dev": true, "requires": { "is-property": "1.0.2" @@ -8752,26 +9581,30 @@ "dependencies": { "is-property": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", "dev": true } } }, "jsonpointer": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz", + "integrity": "sha1-OvHdIP6FRjkQ1GmjheMwF9KgMNk=", "dev": true }, "xtend": { "version": "4.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", "dev": true } } }, "pinkie-promise": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { "pinkie": "2.0.4" @@ -8779,7 +9612,8 @@ "dependencies": { "pinkie": { "version": "2.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", "dev": true } } @@ -8788,7 +9622,8 @@ }, "hawk": { "version": "3.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", "dev": true, "requires": { "boom": "2.10.1", @@ -8799,7 +9634,8 @@ "dependencies": { "boom": { "version": "2.10.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", "dev": true, "requires": { "hoek": "2.16.3" @@ -8807,7 +9643,8 @@ }, "cryptiles": { "version": "2.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", "dev": true, "requires": { "boom": "2.10.1" @@ -8815,12 +9652,14 @@ }, "hoek": { "version": "2.16.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", "dev": true }, "sntp": { "version": "1.0.9", - "bundled": true, + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", "dev": true, "requires": { "hoek": "2.16.3" @@ -8830,7 +9669,8 @@ }, "http-signature": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", "dev": true, "requires": { "assert-plus": "0.2.0", @@ -8840,12 +9680,14 @@ "dependencies": { "assert-plus": { "version": "0.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", "dev": true }, "jsprim": { "version": "1.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.0.tgz", + "integrity": "sha1-zi4b74NSBLTzCZkoxgL4tq5hVlA=", "dev": true, "requires": { "extsprintf": "1.0.2", @@ -8855,17 +9697,20 @@ "dependencies": { "extsprintf": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", + "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=", "dev": true }, "json-schema": { "version": "0.2.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.2.tgz", + "integrity": "sha1-UDVPGfYDkXxpX3C4Wvp3w7DyNQY=", "dev": true }, "verror": { "version": "1.3.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", + "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=", "dev": true, "requires": { "extsprintf": "1.0.2" @@ -8875,7 +9720,8 @@ }, "sshpk": { "version": "1.9.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.9.2.tgz", + "integrity": "sha1-O0E1G7rVw03fS9gRmTfv7jGkZ2U=", "dev": true, "requires": { "asn1": "0.2.3", @@ -8890,17 +9736,20 @@ "dependencies": { "asn1": { "version": "0.2.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", "dev": true }, "assert-plus": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true }, "dashdash": { "version": "1.14.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.0.tgz", + "integrity": "sha1-KeSGxUGL8PNWA0qZPVFoajPoQUE=", "dev": true, "requires": { "assert-plus": "1.0.0" @@ -8908,7 +9757,8 @@ }, "ecc-jsbn": { "version": "0.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", "dev": true, "optional": true, "requires": { @@ -8917,7 +9767,8 @@ }, "getpass": { "version": "0.1.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.6.tgz", + "integrity": "sha1-KD/9n8ElaECHUxHBtg6MQBhxEOY=", "dev": true, "requires": { "assert-plus": "1.0.0" @@ -8925,7 +9776,8 @@ }, "jodid25519": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz", + "integrity": "sha1-BtSRIlUJNBlHfUJWM2BuDpB4KWc=", "dev": true, "optional": true, "requires": { @@ -8934,13 +9786,15 @@ }, "jsbn": { "version": "0.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz", + "integrity": "sha1-ZQmH2g3XT06/WhE3eiqi0nPpff0=", "dev": true, "optional": true }, "tweetnacl": { "version": "0.13.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.3.tgz", + "integrity": "sha1-1ii1bzvMPVrnS6nUwacE3vWrS1Y=", "dev": true, "optional": true } @@ -8950,22 +9804,26 @@ }, "is-typedarray": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, "isstream": { "version": "0.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true }, "json-stringify-safe": { "version": "5.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, "mime-types": { "version": "2.1.11", - "bundled": true, + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.11.tgz", + "integrity": "sha1-wlnEcb2oCKhdbNGTtDCl+uRHOzw=", "dev": true, "requires": { "mime-db": "1.23.0" @@ -8973,51 +9831,60 @@ "dependencies": { "mime-db": { "version": "1.23.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.23.0.tgz", + "integrity": "sha1-oxtAcK2uon1zLqMzdApk0OyaZlk=", "dev": true } } }, "node-uuid": { "version": "1.4.7", - "bundled": true, + "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz", + "integrity": "sha1-baWhdmjEs91ZYjvaEc9/pMH2Cm8=", "dev": true }, "oauth-sign": { "version": "0.8.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", "dev": true }, "qs": { "version": "6.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/qs/-/qs-6.2.1.tgz", + "integrity": "sha1-zgPF/wk1vB2daanxTL0Y5WjWdiU=", "dev": true }, "stringstream": { "version": "0.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", "dev": true }, "tough-cookie": { "version": "2.3.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.1.tgz", + "integrity": "sha1-mcd9+7fYBCSeiimdTLD9gf7wg/0=", "dev": true }, "tunnel-agent": { "version": "0.4.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", "dev": true } } }, "retry": { "version": "0.10.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.0.tgz", + "integrity": "sha1-ZJ4VykCEItmDGBYZNef31lLUNd0=", "dev": true }, "rimraf": { "version": "2.5.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz", + "integrity": "sha1-loAAk8vxoMhr2VtGJUZ1NcKd+gQ=", "dev": true, "requires": { "glob": "7.0.6" @@ -9025,12 +9892,14 @@ }, "semver": { "version": "5.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/semver/-/semver-5.1.0.tgz", + "integrity": "sha1-hfLPhVBGXE3wAM99hvawVBBqueU=", "dev": true }, "sha": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/sha/-/sha-2.0.1.tgz", + "integrity": "sha1-YDCCL70smCOUn49y7WQR7lzyWq4=", "dev": true, "requires": { "graceful-fs": "4.1.6", @@ -9039,7 +9908,8 @@ "dependencies": { "readable-stream": { "version": "2.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.2.tgz", + "integrity": "sha1-vsgb6ujPRVFovC5bKzH1vPrtmxs=", "dev": true, "requires": { "core-util-is": "1.0.1", @@ -9052,27 +9922,32 @@ "dependencies": { "core-util-is": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz", + "integrity": "sha1-awcIWu+aPMrG7lO/nT3wwVIaVTg=", "dev": true }, "isarray": { "version": "0.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", "dev": true }, "process-nextick-args": { "version": "1.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.3.tgz", + "integrity": "sha1-4nLu2CXV6fTqdNjXOx/jEcO+tjA=", "dev": true }, "string_decoder": { "version": "0.10.31", - "bundled": true, + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true }, "util-deprecate": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.1.tgz", + "integrity": "sha1-NVaj0TxMaqeYPX4kJUeBlxmbeIE=", "dev": true } } @@ -9081,53 +9956,47 @@ }, "slide": { "version": "1.1.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", "dev": true }, "sorted-object": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/sorted-object/-/sorted-object-2.0.0.tgz", + "integrity": "sha1-HP6pgWCQR9gEOAekkKnZmzF/r38=", "dev": true }, "spdx-license-ids": { "version": "1.2.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", "dev": true }, "strip-ansi": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { "ansi-regex": "2.0.0" } }, - "tar": { - "version": "2.2.1", - "bundled": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.10", - "inherits": "2.0.3" - } - }, - "text-table": { - "version": "0.2.0", - "bundled": true - }, "uid-number": { "version": "0.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", + "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=", "dev": true }, "umask": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/umask/-/umask-1.1.0.tgz", + "integrity": "sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0=", "dev": true }, "validate-npm-package-license": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", "dev": true, "requires": { "spdx-correct": "1.0.2", @@ -9136,7 +10005,8 @@ "dependencies": { "spdx-correct": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", "dev": true, "requires": { "spdx-license-ids": "1.2.2" @@ -9144,7 +10014,8 @@ }, "spdx-expression-parse": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.2.tgz", + "integrity": "sha1-1SsUtelnB3FECvIlvLVjEirEUvY=", "dev": true, "requires": { "spdx-exceptions": "1.0.4", @@ -9153,7 +10024,8 @@ "dependencies": { "spdx-exceptions": { "version": "1.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-1.0.4.tgz", + "integrity": "sha1-IguEI5EZrpBFqJLbgag/TOFvgP0=", "dev": true } } @@ -9162,20 +10034,17 @@ }, "validate-npm-package-name": { "version": "2.2.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-2.2.2.tgz", + "integrity": "sha1-9laVsi9zJEQgGaPH+jmm5/0pkIU=", + "dev": true, "requires": { "builtins": "0.0.7" - }, - "dependencies": { - "builtins": { - "version": "0.0.7", - "bundled": true - } } }, "which": { "version": "1.2.11", - "bundled": true, + "resolved": "https://registry.npmjs.org/which/-/which-1.2.11.tgz", + "integrity": "sha1-yLLu6muMFln6fB3U/aq+lTPcXos=", "dev": true, "requires": { "isexe": "1.1.2" @@ -9183,19 +10052,23 @@ "dependencies": { "isexe": { "version": "1.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/isexe/-/isexe-1.1.2.tgz", + "integrity": "sha1-NvPiLmB1CSD15yQaR2qMakInWtA=", "dev": true } } }, "wrappy": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, "write-file-atomic": { "version": "1.1.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.1.4.tgz", + "integrity": "sha1-sfUtwujcDjywTRh6JfdYo4qQyjs=", + "dev": true, "requires": { "graceful-fs": "4.1.6", "imurmurhash": "0.1.4", @@ -9365,6 +10238,20 @@ "wordwrap": "0.0.2" } }, + "optionator": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.6.0.tgz", + "integrity": "sha1-tj7Lvw4xX61LyYJ7Rdx7pFKE/LY=", + "dev": true, + "requires": { + "deep-is": "0.1.3", + "fast-levenshtein": "1.0.7", + "levn": "0.2.5", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "0.0.2" + } + }, "original": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/original/-/original-1.0.0.tgz", @@ -10384,6 +11271,12 @@ } } }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, "prepend-http": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", @@ -10864,7 +11757,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/react-svg-inline/-/react-svg-inline-2.0.1.tgz", "integrity": "sha512-9YVqJ80g1gPWAvD9CS/z4cKPD45ZSMjjzwxFAmQJiMEoAo1Ajhz92WirXag3ftltDN5lPNkVWx/KOnEWB/PaMQ==", - "dev": true, "requires": { "classnames": "2.2.5", "prop-types": "15.6.0" @@ -10898,6 +11790,21 @@ "readable-stream": "2.3.3" } }, + "read-installed": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz", + "integrity": "sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc=", + "dev": true, + "requires": { + "debuglog": "1.0.1", + "graceful-fs": "4.1.11", + "read-package-json": "2.0.12", + "readdir-scoped-modules": "1.0.2", + "semver": "5.4.1", + "slide": "1.1.6", + "util-extend": "1.0.3" + } + }, "read-only-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", @@ -10966,6 +11873,18 @@ "util-deprecate": "1.0.2" } }, + "readdir-scoped-modules": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz", + "integrity": "sha1-n6+jfShr5dksuuve4DDcm19AZ0c=", + "dev": true, + "requires": { + "debuglog": "1.0.1", + "dezalgo": "1.0.3", + "graceful-fs": "4.1.11", + "once": "1.4.0" + } + }, "readdirp": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", @@ -12170,6 +13089,12 @@ "xtend": "4.0.1" } }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, "theming": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/theming/-/theming-1.2.1.tgz", @@ -12419,6 +13344,15 @@ "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "optional": true }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2" + } + }, "type-is": { "version": "1.6.15", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", @@ -13231,6 +14165,15 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true, + "requires": { + "mkdirp": "0.5.1" + } + }, "write-file-atomic": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", @@ -13311,6 +14254,12 @@ "integrity": "sha1-ZGV4SKIP/F31g6Qq2KJ3tFErvE0=", "dev": true }, + "xml-escape": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.0.0.tgz", + "integrity": "sha1-AJY9aXsq3wwYXE4E5zF0upsojrI=", + "dev": true + }, "xmlbuilder": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.0.0.tgz", diff --git a/package.json b/package.json index 5792fac..8604d69 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@doodle3d/doodle3d-core", - "version": "0.17.4", + "version": "0.17.5", "description": "Core functions of Doodle3D Transform", "main": "lib", "module": "module", @@ -9,6 +9,7 @@ "start": "webpack-dev-server -w", "ios": "TARGET=app webpack -p && cordova run ios", "prepare": "npm run build", + "lint": "eslint src", "build": "npm run build:main && npm run build:module ", "build:main": "BABEL_ENV=main babel src -s -d lib", "build:module": "BABEL_ENV=module babel src -s -d module" @@ -27,6 +28,9 @@ "bowser": "^1.8.1", "fit-curve": "^0.1.6", "imports-loader": "^0.7.1", + "jss": "^9.4.0", + "keycode": "^2.1.9", + "lodash": "^4.17.4", "memoizee": "^0.3.9", "pouchdb": "^6.3.4", "proptypes": "^1.1.0", @@ -38,6 +42,7 @@ "react-notification-system-redux": "^1.2.0", "react-redux": "^5.0.6", "react-resize-detector": "^1.1.0", + "react-svg-inline": "^2.0.1", "redux-form": "^7.1.2", "redux-undo": "^1.0.0-beta9-9-7", "reselect": "^3.0.1", @@ -50,6 +55,7 @@ "devDependencies": { "babel-cli": "6.24.1", "babel-core": "6.24.1", + "babel-eslint": "^5.0.4", "babel-loader": "^7.0.0", "babel-plugin-add-module-exports": "0.2.1", "babel-plugin-inline-import": "^2.0.6", @@ -66,12 +72,17 @@ "babel-preset-stage-0": "^6.24.1", "cordova": "^7.1.0", "css-loader": "^0.28.7", + "eslint": "^1.10.3", + "eslint-config-airbnb": "^3.1.0", + "eslint-plugin-react": "^3.16.1", + "file-saver": "^1.3.3", "html-webpack-plugin": "^2.30.1", "html-webpack-template": "^6.0.2", + "jss-preset-default": "^4.0.1", + "normalize-jss": "^4.0.0", "raw-loader": "^0.5.1", "react-dom": "^16.1.1", "react-router-redux": "^4.0.8", - "react-svg-inline": "^2.0.1", "react-tap-event-plugin": "^3.0.2", "redux": "^3.7.2", "redux-action-wrapper": "^1.0.1", diff --git a/shaders/anaglyph_frag.glsl b/shaders/anaglyph_frag.glsl new file mode 100644 index 0000000..114e311 --- /dev/null +++ b/shaders/anaglyph_frag.glsl @@ -0,0 +1,36 @@ +uniform sampler2D mapLeft; +uniform sampler2D mapRight; +varying vec2 vUv; + +uniform mat3 colorMatrixLeft; +uniform mat3 colorMatrixRight; + +float lin( float c ) { + return c <= 0.04045 ? c * 0.0773993808 : + pow( c * 0.9478672986 + 0.0521327014, 2.4 ); +} + +vec4 lin( vec4 c ) { + return vec4( lin( c.r ), lin( c.g ), lin( c.b ), c.a ); +} + +float dev( float c ) { + return c <= 0.0031308 ? c * 12.92 : pow( c, 0.41666 ) * 1.055 - 0.055; +} + +void main() { + + vec2 uv = vUv; + + vec4 colorL = lin( texture2D( mapLeft, uv ) ); + vec4 colorR = lin( texture2D( mapRight, uv ) ); + + vec3 color = clamp( + colorMatrixLeft * colorL.rgb + + colorMatrixRight * colorR.rgb, 0., 1. ); + + gl_FragColor = vec4( + dev( color.r ), dev( color.g ), dev( color.b ), + max( colorL.a, colorR.a ) ); + +} diff --git a/shaders/anaglyph_vert.glsl b/shaders/anaglyph_vert.glsl new file mode 100644 index 0000000..610d70b --- /dev/null +++ b/shaders/anaglyph_vert.glsl @@ -0,0 +1,5 @@ +varying vec2 vUv; +void main() { + vUv = vec2( uv.x, uv.y ); + gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); +} diff --git a/src/actions/index.js b/src/actions/index.js index 461181e..9c6469d 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -228,13 +228,13 @@ export function d3ChangeTool(tool) { export function contextChangeTool(tool) { return { type: CONTEXT_CHANGE_TOOL, tool }; } -export function heightStart(handle) { +export function changeHeightStart(handle) { return { type: HEIGHT_START, handle }; } -export function height(delta) { +export function changeHeight(delta) { return { type: HEIGHT, delta, log: false }; } -export function heightEnd() { +export function changeHeightEnd() { return { type: HEIGHT_END }; } export function twistStart() { @@ -378,7 +378,10 @@ export function addImage(file) { }).catch(error => { URL.revokeObjectURL(url); - dispatch(notification.error({ position: 'tc', title: 'Error loading image, please try again with another image' })); + dispatch(notification.error({ + position: 'tc', + title: 'Error loading image, please try again with another image' + })); throw error; // rethrow for other listeners }); diff --git a/src/components/App.js b/src/components/App.js index 6337c81..29f2c9d 100644 --- a/src/components/App.js +++ b/src/components/App.js @@ -13,6 +13,9 @@ import btnUndoImageURL from '../../img/mainmenu/btnUndo.png'; import btnRedoImageURL from '../../img/mainmenu/btnRedo.png'; import InlineIconsLoader from './InlineIconsLoader.js'; import JSONToSketchData from '../shape/JSONToSketchData.js'; +import keycode from 'keycode'; +import bowser from 'bowser'; +import * as d2Tools from '../constants/d2Tools.js'; const styles = { container: { @@ -63,7 +66,12 @@ class App extends React.Component { addImage: PropTypes.func.isRequired, undo: PropTypes.func.isRequired, redo: PropTypes.func.isRequired, - classes: PropTypes.objectOf(PropTypes.string) + classes: PropTypes.objectOf(PropTypes.string), + deleteSelection: PropTypes.func.isRequired, + selectAll: PropTypes.func.isRequired, + d2ChangeTool: PropTypes.func.isRequired, + moveSelection: PropTypes.func.isRequired, + selectedPen: PropTypes.string.isRequired }; componentDidMount() { @@ -71,6 +79,13 @@ class App extends React.Component { container.addEventListener('dragover', event => event.preventDefault()); container.addEventListener('drop', this.onDrop); + window.addEventListener('keydown', this.onKeyDown); + } + + componentWillUnmount() { + const { container } = this.refs; + container.removeEventListener('drop', this.onDrop); + window.removeEventListener('keydown', this.onKeyDown); } onDrop = async event => { @@ -78,9 +93,9 @@ class App extends React.Component { event.preventDefault(); for (const file of event.dataTransfer.files) { - const [name, ...extentions] = file.name.split('.'); + const extentions = file.name.split('.').pop(); - switch (extentions.pop().toUpperCase()) { + switch (extentions.toUpperCase()) { case 'D3SKETCH': case 'JSON': const url = URL.createObjectURL(file); @@ -100,8 +115,65 @@ class App extends React.Component { } }; - componentWillUnmount() { - container.removeEventListener('drop', this.onDrop); + onKeyDown = (event) => { + const { undo, redo, deleteSelection, selectAll, d2ChangeTool, moveSelection, selectedPen } = this.props; + const { metaKey, ctrlKey, shiftKey } = event; + const key = keycode(event); + const commandKey = bowser.mac ? metaKey : ctrlKey; + + const targetTag = event.target.tagName.toLowerCase(); + if (targetTag === 'input' || targetTag === 'textarea') return; + + switch (key) { + case 'backspace': + case 'delete': + event.preventDefault(); + deleteSelection(); + break; + + case 'a': + if (commandKey) selectAll(); + break; + + case 'z': + if (commandKey) { + if (shiftKey) { + redo(); + } else { + undo(); + } + } + break; + + case 't': { + if (!commandKey) d2ChangeTool(d2Tools.TEXT); + break; + } + + case 'b': { + if (!commandKey) d2ChangeTool(selectedPen); + break; + } + + case 'left': + case 'right': + case 'up': + case 'down': { + const delta = shiftKey ? 10 : 1; + const deltas = { + left: { deltaX: -delta, deltaY: 0 }, + right: { deltaX: delta, deltaY: 0 }, + up: { deltaX: 0, deltaY: -delta }, + down: { deltaX: 0, deltaY: delta } + }; + + const { deltaX, deltaY } = deltas[key]; + moveSelection(deltaX, deltaY); + } + + default: + break; + } } render() { @@ -125,9 +197,15 @@ class App extends React.Component { } } -export default injectSheet(styles)(connect(null, { +export default injectSheet(styles)(connect(state => ({ + selectedPen: state.sketcher.present.menus['pen-tools'].selected +}), { undo: actions.undo.undo, redo: actions.undo.redo, openSketch: actions.openSketch, addImage: actions.addImage, + deleteSelection: actions.deleteSelection, + selectAll: actions.selectAll, + d2ChangeTool: actions.d2ChangeTool, + moveSelection: actions.moveSelection })(App)); diff --git a/src/components/D3Panel.js b/src/components/D3Panel.js index 422586e..2a043dd 100644 --- a/src/components/D3Panel.js +++ b/src/components/D3Panel.js @@ -16,7 +16,7 @@ import TwistTransformer from '../d3/transformers/TwistTransformer.js'; import SculptTransformer from '../d3/transformers/SculptTransformer.js'; import StampTransformer from '../d3/transformers/StampTransformer.js'; import SelectionBox from '../d3/SelectionBox.js'; -import RenderChain from '../d3/RenderChain'; +import RenderChain, { TOONSHADER_OUTLINE, TOONSHADER } from '../d3/RenderChain'; import BaseTransformer from '../d3/transformers/BaseTransformer.js'; import Camera from '../d3/Camera.js'; import ReactResizeDetector from 'react-resize-detector'; @@ -62,7 +62,8 @@ class D3Panel extends React.Component { componentWillMount() { this.createScene(); - this.renderChain = new RenderChain(this.renderer, this.scene, this.camera, hasExtensionsFor.toonShaderPreview, { + const shader = hasExtensionsFor.toonShaderPreview ? TOONSHADER_OUTLINE : TOONSHADER; + this.renderChain = new RenderChain(this.renderer, this.scene, this.camera, shader, { UI: this.UIContainer, shapes: this.shapesManager, boundingBox: this.selectionBox, diff --git a/src/components/DoodlePreview.js b/src/components/DoodlePreview.js index 9bd19fb..8003515 100644 --- a/src/components/DoodlePreview.js +++ b/src/components/DoodlePreview.js @@ -51,7 +51,6 @@ class DoodlePreview extends React.Component { if (docData) sketchData = await JSONToSketchData(this.props.docData); const { canvas } = this.refs; - const { pixelRatio } = this.props const sceneData = createSceneData(sketchData); @@ -70,7 +69,7 @@ class DoodlePreview extends React.Component { resizeHandler = (width, height) => { requestAnimationFrame(() => { - const { setSize, render } = this.state; + const { setSize } = this.state; const { pixelRatio } = this.props; setSize(width, height, pixelRatio); }); diff --git a/src/components/SketcherToolbars.js b/src/components/SketcherToolbars.js index cbd4217..708bb80 100644 --- a/src/components/SketcherToolbars.js +++ b/src/components/SketcherToolbars.js @@ -20,20 +20,20 @@ const CONTEXT = 'context'; const styles = { contextMenuContainer: { - position: 'absolute', - left: 0, - bottom: 0, - right: 0, - top: 0, - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - pointerEvents: 'none', /* enable clicking through object */ + position: 'absolute', + left: 0, + bottom: 0, + right: 0, + top: 0, + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + pointerEvents: 'none', /* enable clicking through object */ '& *': { - pointerEvents: 'visible' /* enable clicking in children */ + pointerEvents: 'visible' /* enable clicking in children */ } } -} +}; class SketcherToolbars extends React.Component { @@ -41,7 +41,8 @@ class SketcherToolbars extends React.Component { dispatch: PropTypes.func.isRequired, toolbar2d: PropTypes.object, // TODO: specify further toolbar3d: PropTypes.object, // TODO: specify further - context: PropTypes.object // TODO: specify further + context: PropTypes.object, // TODO: specify further + classes: PropTypes.objectOf(PropTypes.string) }; onSelect2D = ({ value }) => { const { dispatch } = this.props; diff --git a/src/components/SubMenu.js b/src/components/SubMenu.js index 44f4ea8..8c8dceb 100644 --- a/src/components/SubMenu.js +++ b/src/components/SubMenu.js @@ -2,7 +2,6 @@ import React from 'react'; import PropTypes from 'prop-types'; import Button from './Button.js'; import Menu from './Menu.js'; -import bowser from 'bowser'; import { connect } from 'react-redux'; import { hexToStyle } from '../utils/colorUtils.js'; // import createDebug from 'debug'; @@ -21,7 +20,9 @@ class SubMenu extends React.Component { svg: PropTypes.string, children: PropTypes.node, selectOnOpen: PropTypes.bool, - toggleBehavior: PropTypes.bool + toggleBehavior: PropTypes.bool, + color: PropTypes.number, + solid: PropTypes.bool }; componentWillMount = () => { // Listeners to close the submenu when anywhere else is clicked diff --git a/src/components/index.js b/src/components/index.js deleted file mode 100644 index cd5e18b..0000000 --- a/src/components/index.js +++ /dev/null @@ -1,4 +0,0 @@ -import DoodlePreview from './DoodlePreview.js'; -import AuthImage from './AuthImage.js'; - -export { DoodlePreview, AuthImage }; diff --git a/src/constants/contextTools.js b/src/constants/contextTools.js index afe7b3b..382b2ea 100644 --- a/src/constants/contextTools.js +++ b/src/constants/contextTools.js @@ -36,33 +36,6 @@ export const BLACK_C = 'color-black-c'; export const HOLE_MATERIAL = 'color-hole-material'; export const PIPETTE = 'pipette-tool'; -export const COLORS = [ - LIGHT_BLUE_A, - LIGHT_BLUE_B, - LIGHT_BLUE_C, - DARK_BLUE_A, - DARK_BLUE_B, - DARK_BLUE_C, - PURPLE_A, - PURPLE_B, - PURPLE_C, - PINK_A, - PINK_B, - PINK_C, - RED_A, - RED_B, - RED_C, - YELLOW_A, - YELLOW_B, - YELLOW_C, - GREEN_A, - GREEN_B, - GREEN_C, - BLACK_A, - BLACK_B, - BLACK_C -]; - export const ERASER_SIZE_SMALL = 'eraser-size-small'; export const ERASER_SIZE_MEDIUM = 'eraser-size-medium'; export const ERASER_SIZE_LARGE = 'eraser-size-large'; diff --git a/src/constants/general.js b/src/constants/general.js index 6db271e..ebb8606 100644 --- a/src/constants/general.js +++ b/src/constants/general.js @@ -5,28 +5,35 @@ export const SHAPE_CACHE_LIMIT = 50; export const PIXEL_RATIO = 1.0; export const COLOR_STRING_TO_HEX = { - [contextTools.LIGHT_BLUE_A]: 0xbcffff, - [contextTools.LIGHT_BLUE_B]: 0x69e1fd, - [contextTools.LIGHT_BLUE_C]: 0x00b8ff, - [contextTools.DARK_BLUE_A]: 0xc8e2ff, - [contextTools.DARK_BLUE_B]: 0x7dacfc, - [contextTools.DARK_BLUE_C]: 0x0357ff, - [contextTools.PURPLE_A]: 0xefc9ff, - [contextTools.PURPLE_B]: 0xc57efc, - [contextTools.PURPLE_C]: 0x820ef9, - [contextTools.PINK_A]: 0xffc7ee, - [contextTools.PINK_B]: 0xfd7cc1, - [contextTools.PINK_C]: 0xfa047b, - [contextTools.RED_A]: 0xffcdce, - [contextTools.RED_B]: 0xfd898a, - [contextTools.RED_C]: 0xfd898a, - [contextTools.YELLOW_A]: 0xfffea0, - [contextTools.YELLOW_B]: 0xfffb39, - [contextTools.YELLOW_C]: 0xfdac05, - [contextTools.GREEN_A]: 0xdaffd4, - [contextTools.GREEN_B]: 0x97f194, - [contextTools.GREEN_C]: 0x31d22d, - [contextTools.BLACK_A]: 0xf4f4f4, - [contextTools.BLACK_B]: 0x7f7f7f, - [contextTools.BLACK_C]: 0x1f1f1f + [contextTools.LIGHT_BLUE_A]: 0xBCFFFF, + [contextTools.LIGHT_BLUE_B]: 0x68E1FD, + [contextTools.LIGHT_BLUE_C]: 0x01B8FF, + + [contextTools.DARK_BLUE_A]: 0xC8E3FF, + [contextTools.DARK_BLUE_B]: 0x7DACFC, + [contextTools.DARK_BLUE_C]: 0x0256FF, + + [contextTools.PURPLE_A]: 0xEFC9FF, + [contextTools.PURPLE_B]: 0xC57EFC, + [contextTools.PURPLE_C]: 0x820FF9, + + [contextTools.PINK_A]: 0xFFC7EE, + [contextTools.PINK_B]: 0xFD7BC1, + [contextTools.PINK_C]: 0xFA047B, + + [contextTools.RED_A]: 0xFFCDCE, + [contextTools.RED_B]: 0xFD898A, + [contextTools.RED_C]: 0xFF2600, + + [contextTools.YELLOW_A]: 0xFFF76B, + [contextTools.YELLOW_B]: 0xFF9201, + [contextTools.YELLOW_C]: 0xAA7942, + + [contextTools.GREEN_A]: 0xDAFFD5, + [contextTools.GREEN_B]: 0x97F294, + [contextTools.GREEN_C]: 0x00EA01, + + [contextTools.BLACK_A]: 0xF4F4F4, + [contextTools.BLACK_B]: 0xAAAAAA, + [contextTools.BLACK_C]: 0x444444 }; diff --git a/src/constants/index.js b/src/constants/index.js deleted file mode 100644 index 9270f07..0000000 --- a/src/constants/index.js +++ /dev/null @@ -1,25 +0,0 @@ -import * as contextTools from './contextTools.js'; -import * as d2Constants from './d2Constants.js'; -import * as d2Tools from './d2Tools.js'; -import * as d3Constants from './d3Constants.js'; -import * as d3Tools from './d3Tools.js'; -import * as exportConstants from './exportConstants.js'; -import * as general from './general.js'; -import * as saveConstants from './saveConstants.js'; -import * as shapeTypeProperties from './shapeTypeProperties.js'; -import * as mainMenuItems from './mainMenuItems.js'; -import * as menu from './menu.js'; - -export { - contextTool, - d2Constant, - d2Tool, - d3Constant, - d3Tool, - exportConstant, - genera, - saveConstant, - shapeTypePropertie, - mainMenuItems, - menu -}; diff --git a/src/constants/menu.js b/src/constants/menu.js index 73bff2b..680bb66 100644 --- a/src/constants/menu.js +++ b/src/constants/menu.js @@ -46,7 +46,7 @@ const toolbar3d = { children: [ { value: d3Tools.HEIGHT }, { value: d3Tools.SCULPT }, - { value: d3Tools.TWIST }, + { value: d3Tools.TWIST } // { value: d3Tools.STAMP } ] }; diff --git a/src/d2/ShapesManager.js b/src/d2/ShapesManager.js index b022184..f365b63 100644 --- a/src/d2/ShapesManager.js +++ b/src/d2/ShapesManager.js @@ -1,5 +1,5 @@ import { shapeDataToShape, determineActiveShape2d } from '../shape/shapeDataUtils.js'; -// import R from 'ramda'; +import _ from 'lodash'; export default class ShapesManager { constructor(objectContainerActive, objectContainerInactive) { @@ -21,11 +21,9 @@ export default class ShapesManager { if ( this._objectsById === objectsById && - true && + _.isEqual(activeShapes, this._activeShapes) && state.activeSpace === this._activeSpace - ) { - return needRender; - } + ) return needRender; // object ids that are in the current space const spaceObjectIds = state.spaces[state.activeSpace].objectIds; diff --git a/src/d3/MatcapMaterial.js b/src/d3/MatcapMaterial.js index 3f0eb54..06417b0 100644 --- a/src/d3/MatcapMaterial.js +++ b/src/d3/MatcapMaterial.js @@ -12,9 +12,9 @@ export default class MatcapMaterial extends THREE.ShaderMaterial { constructor({ color = new THREE.Color(), opacity = 1 }) { super({ uniforms: { - "opacity": { type: 'f', value: opacity }, - "tMatcap": { type: 't', value: matcapTexture }, - "color": { type: 'vec3', value: new THREE.Vector3() } + opacity: { type: 'f', value: opacity }, + tMatcap: { type: 't', value: matcapTexture }, + color: { type: 'vec3', value: new THREE.Vector3() } }, vertexShader: matcapVert, fragmentShader: matcapFrag @@ -35,7 +35,8 @@ export default class MatcapMaterial extends THREE.ShaderMaterial { set opacity(opacity) { if (!this.uniforms) return opacity; - return this.uniforms.opacity.value = opacity; + this.uniforms.opacity.value = opacity; + return opacity; } clone() { diff --git a/src/d3/RenderChain.js b/src/d3/RenderChain.js index cbed415..dccfa34 100644 --- a/src/d3/RenderChain.js +++ b/src/d3/RenderChain.js @@ -1,43 +1,62 @@ import * as THREE from 'three'; -import OutlinePass from './OutlinePass.js'; -import RenderPass from './RenderPass.js'; +import OutlinePass from './effects/OutlinePass.js'; +import RenderPass from './effects/RenderPass.js'; +import AnaglyphPass from './effects/AnaglyphPass.js'; import 'three/examples/js/shaders/CopyShader.js'; import 'three/examples/js/postprocessing/EffectComposer.js'; import 'three/examples/js/postprocessing/ShaderPass.js'; +export const TOONSHADER_OUTLINE = 'toonshader-outline'; +export const ANAGLYPH = 'anaglyph'; +export const TOONSHADER = 'toonshader'; + export default class RenderChain extends THREE.EffectComposer { - constructor(renderer, scene, camera, toonShader, groups) { + constructor(renderer, scene, camera, shader, groups) { super(renderer); this._groups = groups; - if (toonShader) { - const renderPass = new RenderPass(scene, camera, () => { - this._setVisible(this._initalValues, [groups.shapes, groups.plane, groups.boundingBox]); - }); - this.addPass(renderPass); + switch (shader) { + case TOONSHADER_OUTLINE: { + const renderPass = new RenderPass(scene, camera, () => { + this._setVisible(this._initalValues, [groups.shapes, groups.plane, groups.boundingBox]); + }); + this.addPass(renderPass); - const outlinePass = new OutlinePass(scene, camera, () => { - this._setVisible(this._initalValues, [groups.shapes]); - }); - outlinePass.renderToScreen = true; - this.addPass(outlinePass); + const outlinePass = new OutlinePass(scene, camera, () => { + this._setVisible(this._initalValues, [groups.shapes]); + }); + outlinePass.renderToScreen = true; + this.addPass(outlinePass); - const renderPassUI = new RenderPass(scene, camera, () => { - this._setVisible(this._initalValues, [groups.UI]); - }); - renderPassUI.clear = false; - renderPassUI.renderToScreen = true; - this.addPass(renderPassUI); - } else { - const renderPass = new RenderPass(scene, camera); - renderPass.renderToScreen = true; - this.addPass(renderPass); + const renderPassUI = new RenderPass(scene, camera, () => { + this._setVisible(this._initalValues, [groups.UI]); + }); + renderPassUI.clear = false; + renderPassUI.renderToScreen = true; + this.addPass(renderPassUI); + break; + } + + case ANAGLYPH: { + const anaglyphPass = new AnaglyphPass(scene, camera); + anaglyphPass.renderToScreen = true; + this.addPass(anaglyphPass); + break; + } + + case TOONSHADER: + default: { + const renderPass = new RenderPass(scene, camera); + renderPass.renderToScreen = true; + this.addPass(renderPass); + break; + } } this._renderer = renderer; this._camera = camera; this._scene = scene; - this._toonShader = toonShader; + this._shader = shader; } _getCurrentVisibleValues() { @@ -62,7 +81,7 @@ export default class RenderChain extends THREE.EffectComposer { } } - setSize(width, height, pixelRatio, rerender = true) { + setSize(width, height, pixelRatio, render = true) { this._renderer.setPixelRatio(pixelRatio); this._renderer.setSize(width, height); super.setSize(width * pixelRatio, height * pixelRatio); @@ -70,17 +89,17 @@ export default class RenderChain extends THREE.EffectComposer { this._camera.aspect = width / height; this._camera.updateProjectionMatrix(); - if (rerender) this.render(); + if (render) this.render(); } render() { - if (this._toonShader) { + if (this._shader === TOONSHADER_OUTLINE) { this._initalValues = this._getCurrentVisibleValues(); } super.render(); - if (this._toonShader) { + if (this._shader === TOONSHADER_OUTLINE) { const { shapes, UI, plane, boundingBox } = this._groups; this._setVisible(this._initalValues, [shapes, UI, plane, boundingBox]); } diff --git a/src/d3/ShapeMesh.js b/src/d3/ShapeMesh.js index ed93e7a..ac69806 100644 --- a/src/d3/ShapeMesh.js +++ b/src/d3/ShapeMesh.js @@ -37,6 +37,7 @@ class ShapeMesh extends THREE.Object3D { this._holeMesh.name = shapeData.UID; this._holeMesh.isShapeMesh = true; + this._reverse = shapeData.transform.sx > 0 !== shapeData.transform.sy > 0; this._sculpt = sculpt; this._rotate = rotate; this._twist = twist; @@ -47,12 +48,8 @@ class ShapeMesh extends THREE.Object3D { this._color = color; this.updateSolid(solid, active); this.updatePoints(shapeData); - } - _isReverse() { - const sx = this._transform.sx > 0; - const sy = this._transform.sy > 0; - return sx !== sy; + this._shapeData = shapeData; } add(object) { @@ -66,22 +63,34 @@ class ShapeMesh extends THREE.Object3D { if (!this._solid) return false; if (holes === this._holes && !this._changedGeometry) return false; - this._holeMesh.geometry.dispose(); + const fill = this._shapeData.type === 'EXPORT_SHAPE' ? !this._shapeData.originalFill : !this._fill; + if (holes.length === 0 || fill) { + if (this._holeMeshIsOriginal && !this._changedGeometry) return false; - if (holes === null || !this._fill || this._type === 'EXPORT_SHAPE') { + this._holeMesh.geometry.dispose(); this._holeMesh.geometry = new THREE.Geometry().fromBufferGeometry(this._mesh.geometry); + this._holeMeshIsOriginal = true; + this._changedGeometry = false; return true; } const objectGeometry = new THREE.Geometry().fromBufferGeometry(this._mesh.geometry); objectGeometry.mergeVertices(); - let objectBSP = new THREE_BSP(objectGeometry); + const box = new THREE.Box3().setFromPoints(objectGeometry.vertices); + let bsp = new THREE_BSP(objectGeometry); objectGeometry.dispose(); - objectBSP = objectBSP.subtract(holes); - this._holeMesh.geometry = objectBSP.toMesh().geometry; + + for (const hole of holes) { + if (hole.box.intersectsBox(box)) { + bsp = bsp.subtract(hole.bsp); + } + } + this._holeMesh.geometry = bsp.toMesh().geometry; this._holes = holes; this._changedGeometry = false; + this._holeMeshIsOriginal = false; + return true; } @@ -194,6 +203,12 @@ class ShapeMesh extends THREE.Object3D { throw new Error(`Cannot update object ${this.name}: transform contains invalid values.`); } + const reverse = this._transform.sx > 0 !== this._transform.sy > 0; + if (reverse !== this._reverse) { + this._reverse = reverse; + this._updateFaces(); + } + this._transform = transform; this._z = z; this._updateVertices(); @@ -258,7 +273,6 @@ class ShapeMesh extends THREE.Object3D { _updateVerticesHorizontal(heightStep, paths, center, indexCounter) { for (let pathindex = 0; pathindex < paths.length; pathindex ++) { const path = applyMatrixOnPath(paths[pathindex], this._transform); - if (this._isReverse()) path.reverse(); for (let pathIndex = 0; pathIndex < path.length; pathIndex ++) { let point = path[pathIndex]; @@ -291,7 +305,6 @@ class ShapeMesh extends THREE.Object3D { for (let pathsIndex = 0; pathsIndex < paths.length; pathsIndex ++) { const path = applyMatrixOnPath(paths[pathsIndex], this._transform); - if (this._isReverse()) path.reverse(); for (let pathIndex = 0; pathIndex < path.length; pathIndex ++) { const point = path[pathIndex]; @@ -405,11 +418,6 @@ class ShapeMesh extends THREE.Object3D { }) .map(path => path.map(({ x, y }) => new THREE.Vector2(x, y))); - if (this._isReverse()) { - points.reverse(); - holes.map(hole => hole.reverse()); - } - // triangulate const triangulatedTop = THREE.ShapeUtils.triangulateShape(points, holes) .reduce((a, b) => a.concat(b), []) @@ -419,12 +427,7 @@ class ShapeMesh extends THREE.Object3D { // reverse index order for bottom so faces are flipped const triangulatedBottom = triangulatedTop .map(value => value + numPoints) - - if (this._isReverse()) { - triangulatedTop.reverse(); - } else { - triangulatedBottom.reverse(); - } + .reverse(); triangulatedIndexes.push(triangulatedBottom.concat(triangulatedTop)); @@ -453,6 +456,7 @@ class ShapeMesh extends THREE.Object3D { const { shape } = this._shapes[i]; if (this._fill) { + if (this._reverse) triangulatedIndexes[i].reverse(); for (let j = 0; j < triangulatedIndexes[i].length; j ++) { indexes[indexCounter ++] = triangulatedIndexes[i][j]; } @@ -466,14 +470,23 @@ class ShapeMesh extends THREE.Object3D { let base = (pointIndexOffset + pointIndex) * numHeightSteps + vertexOffsets[i]; for (let heightStep = 0; heightStep < (numHeightSteps - 1); heightStep ++) { - indexes[indexCounter ++] = base; - indexes[indexCounter ++] = base + numHeightSteps; - indexes[indexCounter ++] = base + 1; + if (this._reverse) { + indexes[indexCounter ++] = base + 1; + indexes[indexCounter ++] = base + numHeightSteps; + indexes[indexCounter ++] = base; - indexes[indexCounter ++] = base + 1; - indexes[indexCounter ++] = base + numHeightSteps; - indexes[indexCounter ++] = base + numHeightSteps + 1; + indexes[indexCounter ++] = base + numHeightSteps + 1; + indexes[indexCounter ++] = base + numHeightSteps; + indexes[indexCounter ++] = base + 1; + } else { + indexes[indexCounter ++] = base; + indexes[indexCounter ++] = base + numHeightSteps; + indexes[indexCounter ++] = base + 1; + indexes[indexCounter ++] = base + 1; + indexes[indexCounter ++] = base + numHeightSteps; + indexes[indexCounter ++] = base + numHeightSteps + 1; + } base ++; } } diff --git a/src/d3/ShapesManager.js b/src/d3/ShapesManager.js index 897e64a..5da2150 100644 --- a/src/d3/ShapesManager.js +++ b/src/d3/ShapesManager.js @@ -14,7 +14,7 @@ export default class ShapesManager extends THREE.Object3D { this._spaces = {}; this.name = 'shapes-manager'; - this._holes = null; + this._holes = []; // this._edges = {}; } @@ -77,23 +77,33 @@ export default class ShapesManager extends THREE.Object3D { } if (holesChanged) { - this._holes = null; + this._holes = []; for (let i = 0; i < ids.length; i ++) { const id = ids[i]; + if (activeShapes[id]) continue; + const { solid, type } = state.objectsById[id]; const d3Visible = SHAPE_TYPE_PROPERTIES[type].D3Visible; - if (!solid && d3Visible) { - const hole = this._meshes[id].mesh._mesh; - const holeGeometry = new THREE.Geometry().fromBufferGeometry(hole.geometry); - if (holeGeometry.vertices.length === 0) continue; - const holeBSP = new THREE_BSP(holeGeometry); - if (!this._holes) { - this._holes = holeBSP; - } else { - this._holes = this._holes.union(holeBSP); - } - holeGeometry.dispose(); + if (solid || !d3Visible) continue; + + const holeMesh = this._meshes[id].mesh._mesh; + const geometry = new THREE.Geometry().fromBufferGeometry(holeMesh.geometry); + if (geometry.vertices.length === 0) continue; + + const box = new THREE.Box3().setFromPoints(geometry.vertices); + const intersectHole = this._holes.find(hole => hole.box.intersectsBox(box)); + + const bsp = new THREE_BSP(geometry); + + if (intersectHole) { + intersectHole.bsp = intersectHole.bsp.union(bsp); + const min = box.min.min(intersectHole.box.min); + const max = box.max.max(intersectHole.box.max); + intersectHole.box = new THREE.Box3(min, max); + } else { + this._holes.push({ bsp, box }); } + geometry.dispose(); } } @@ -104,9 +114,7 @@ export default class ShapesManager extends THREE.Object3D { const d3Visible = SHAPE_TYPE_PROPERTIES[type].D3Visible; if (!active && solid && d3Visible) { const shape = this._meshes[id].mesh; - if (shape.updateHoleGeometry(this._holes)) { - render = true; - } + if (shape.updateHoleGeometry(this._holes)) render = true; } } diff --git a/src/d3/createScene.js b/src/d3/createScene.js index 9987e7c..c50e392 100644 --- a/src/d3/createScene.js +++ b/src/d3/createScene.js @@ -1,6 +1,6 @@ import * as THREE from 'three'; import ShapesManager from './ShapesManager.js'; -import RenderChain from './RenderChain.js'; +import RenderChain, { TOONSHADER, TOONSHADER_OUTLINE } from './RenderChain.js'; import { hasExtensionsFor } from '../utils/webGLSupport.js'; import { CANVAS_SIZE } from '../constants/d2Constants.js'; @@ -17,7 +17,7 @@ export default function createScene(state, canvas) { scene.add(camera); - const shapesManager = new ShapesManager({ toonShader: hasExtensionsFor.toonShaderThumbnail }); + const shapesManager = new ShapesManager(); shapesManager.update(state); scene.add(shapesManager); @@ -37,7 +37,8 @@ export default function createScene(state, canvas) { const renderer = new THREE.WebGLRenderer({ canvas, alpha: true }); - const renderChain = new RenderChain(renderer, scene, camera, hasExtensionsFor.toonShaderThumbnail, { + const shader = hasExtensionsFor.toonShaderThumbnail ? TOONSHADER_OUTLINE : TOONSHADER; + const renderChain = new RenderChain(renderer, scene, camera, shader, { plane, UI: new THREE.Object3D(), shapes: shapesManager, diff --git a/src/d3/effects/AnaglyphPass.js b/src/d3/effects/AnaglyphPass.js new file mode 100644 index 0000000..990baf5 --- /dev/null +++ b/src/d3/effects/AnaglyphPass.js @@ -0,0 +1,66 @@ +import * as THREE from 'three'; +import anaglyphVert from '../../../shaders/anaglyph_vert.glsl'; +import anaglyphFrag from '../../../shaders/anaglyph_frag.glsl'; + +const COLOR_MATRIX_LEFT = new THREE.Matrix3().fromArray([ + 1.0671679973602295, -0.0016435992438346148, 0.0001777536963345483, + -0.028107794001698494, -0.00019593400065787137, -0.0002875397040043026, + -0.04279090091586113, 0.000015809757314855233, -0.00024287120322696865 +]); +const COLOR_MATRIX_RIGHT = new THREE.Matrix3().fromArray([ + -0.0355340838432312, -0.06440307199954987, 0.018319187685847282, + -0.10269022732973099, 0.8079727292060852, -0.04835830628871918, + 0.0001224992738571018, -0.009558862075209618, 0.567823588848114 +]); + +export default class AnaglyphPass { + constructor(scene, camera) { + this.scene = scene; + this.camera = camera; + + this.clear = true; + this.renderToScreen = false; + + const params = { + minFilter: THREE.LinearFilter, + magFilter: THREE.NearestFilter, + format: THREE.RGBAFormat + }; + + this._stereo = new THREE.StereoCamera(); + + this._renderTargetL = new THREE.WebGLRenderTarget(1, 1, params); + this._renderTargetR = new THREE.WebGLRenderTarget(1, 1, params); + + this._material = new THREE.ShaderMaterial({ + uniforms: { + mapLeft: { value: this._renderTargetL.texture }, + mapRight: { value: this._renderTargetR.texture }, + colorMatrixLeft: { value: COLOR_MATRIX_LEFT }, + colorMatrixRight: { value: COLOR_MATRIX_RIGHT } + }, + vertexShader: anaglyphVert, + fragmentShader: anaglyphFrag + }); + + this._camera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1); + this._scene = new THREE.Scene(); + this._quad = new THREE.Mesh(new THREE.PlaneBufferGeometry(2, 2), this._material); + this._quad.frustumCulled = false; + this._scene.add(this._quad); + } + + setSize(width, height, pixelRatio = 1) { + this._renderTargetL.setSize(width * pixelRatio, height * pixelRatio); + this._renderTargetR.setSize(width * pixelRatio, height * pixelRatio); + } + + render(renderer, writeBuffer, readBuffer, delta, maskActive) { + this.scene.updateMatrixWorld(); + this._stereo.update(this.camera); + + renderer.render(this.scene, this._stereo.cameraL, this._renderTargetL, true); + renderer.render(this.scene, this._stereo.cameraR, this._renderTargetR, true); + renderer.render(this._scene, this._camera, this.renderToScreen ? null : readBuffer, this.clear); + } +} diff --git a/src/d3/OutlinePass.js b/src/d3/effects/OutlinePass.js similarity index 74% rename from src/d3/OutlinePass.js rename to src/d3/effects/OutlinePass.js index 8ea18ef..993077c 100644 --- a/src/d3/OutlinePass.js +++ b/src/d3/effects/OutlinePass.js @@ -1,10 +1,10 @@ import * as THREE from 'three'; -import normalDepthVert from '../../shaders/normal_depth_vert.glsl'; -import normalDepthFrag from '../../shaders/normal_depth_frag.glsl'; -import edgeVert from '../../shaders/edge_vert.glsl'; -import edgeFrag from '../../shaders/edge_frag.glsl'; -import combineVert from '../../shaders/combine_vert.glsl'; -import combineFrag from '../../shaders/combine_frag.glsl'; +import normalDepthVert from '../../../shaders/normal_depth_vert.glsl'; +import normalDepthFrag from '../../../shaders/normal_depth_frag.glsl'; +import edgeVert from '../../../shaders/edge_vert.glsl'; +import edgeFrag from '../../../shaders/edge_frag.glsl'; +import combineVert from '../../../shaders/combine_vert.glsl'; +import combineFrag from '../../../shaders/combine_frag.glsl'; export default class OutlinePass { constructor(scene, camera, callbackBeforeRender) { @@ -26,8 +26,8 @@ export default class OutlinePass { this._edgeMaterial = new THREE.ShaderMaterial({ uniforms: { - "tDiffuse": { type: 't', value: this._depthNormalRenderTarget.texture }, - "resolution": { type: 'v2', value: new THREE.Vector2() } + tDiffuse: { type: 't', value: this._depthNormalRenderTarget.texture }, + resolution: { type: 'v2', value: new THREE.Vector2() } }, vertexShader: edgeVert, fragmentShader: edgeFrag @@ -35,12 +35,12 @@ export default class OutlinePass { this._copyEdge = new THREE.ShaderMaterial({ uniforms: { - "tDiffuse": { type: 't', value: null }, - "uTexArray" : { type: 'tv', value: [this._edgeRenderTarget.texture] } + tDiffuse: { type: 't', value: null }, + uTexArray : { type: 'tv', value: [this._edgeRenderTarget.texture] } }, vertexShader: combineVert, fragmentShader: combineFrag - }) + }); this._camera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1); this._scene = new THREE.Scene(); @@ -55,7 +55,7 @@ export default class OutlinePass { this._edgeMaterial.uniforms.resolution.value.set(width, height); } - render(renderer, writeBuffer, readBuffer, delta, maskActive) { + render(renderer, writeBuffer, readBuffer) { if (this._callbackBeforeRender) this._callbackBeforeRender(); this._copyEdge.uniforms.tDiffuse.value = readBuffer.texture; diff --git a/src/d3/RenderPass.js b/src/d3/effects/RenderPass.js similarity index 100% rename from src/d3/RenderPass.js rename to src/d3/effects/RenderPass.js diff --git a/src/d3/index.js b/src/d3/index.js deleted file mode 100644 index f83d752..0000000 --- a/src/d3/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import createSceneData from './createSceneData.js'; -import createScene from './createScene.js'; -import RenderChain from './RenderChain.js'; -import ShapeMesh from './ShapeMesh.js'; -import ShapesManager from './ShapesManager.js'; - -export { createSceneData, createScene, RenderChain, ToonShaderRenderChain, ShapeMesh, ShapesManager }; diff --git a/src/d3/transformers/HeightTransformer.js b/src/d3/transformers/HeightTransformer.js index 55031ce..de8b13c 100644 --- a/src/d3/transformers/HeightTransformer.js +++ b/src/d3/transformers/HeightTransformer.js @@ -38,7 +38,7 @@ export default class HeightTransformer extends BaseTransformer { dragStart(event) { const handle = this.includesHandle(event.intersections); if (handle) { - this.dispatch(actions.heightStart(handle)); + this.dispatch(actions.changeHeightStart(handle)); } else { super.dragStart(event); } @@ -47,7 +47,7 @@ export default class HeightTransformer extends BaseTransformer { drag(event) { if (this._active) { const delta = event.position.subtract(event.previousPosition); - this.dispatch(actions.height(delta)); + this.dispatch(actions.changeHeight(delta)); } else { super.drag(event); } @@ -55,7 +55,7 @@ export default class HeightTransformer extends BaseTransformer { dragEnd(event) { if (this._active) { - this.dispatch(actions.heightEnd()); + this.dispatch(actions.changeHeightEnd()); } else { super.dragEnd(event); } diff --git a/src/index.js b/src/index.js deleted file mode 100644 index 8261f62..0000000 --- a/src/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import * as shape from './shape/index.js'; -import * as utils from './utils/index.js'; -import * as d3 from './d3/index.js'; -import * as components from './components/index.js'; -import * as constants from './constants/index.js'; -import * as actions from './actions/index.js'; -import * as reducer from './reducer/index.js'; - -export { shape, utils, d3, components, constants, actions, reducer }; diff --git a/src/reducer/contextReducer.js b/src/reducer/contextReducer.js index e473d9a..34418b9 100644 --- a/src/reducer/contextReducer.js +++ b/src/reducer/contextReducer.js @@ -1,6 +1,6 @@ import update from 'react-addons-update'; import * as contextTools from '../constants/contextTools.js'; -import { COLOR_STRING_TO_HEX, COLOR_HEX_TO_STRING } from '../constants/general.js'; +import { COLOR_STRING_TO_HEX } from '../constants/general.js'; import { ERASER_SIZES, BRUSH_SIZES } from '../constants/d2Constants.js'; import { SHAPE_TYPE_PROPERTIES } from '../constants/shapeTypeProperties.js'; import * as actions from '../actions/index.js'; diff --git a/src/reducer/d2/tools/penReducer.js b/src/reducer/d2/tools/penReducer.js index e20b6d0..e06e663 100644 --- a/src/reducer/d2/tools/penReducer.js +++ b/src/reducer/d2/tools/penReducer.js @@ -139,6 +139,16 @@ export default function penReducer(state, action) { .filter(({ distance }) => distance < snappingDistance) .sort((a, b) => a.distance - b.distance); + const hits = snappingPoints.map(snappingPoint => snappingPoint.hit); + if (hits.includes('start-end') && hits.includes('end-end')) { + const index = Math.max(hits.indexOf('start-end') && hits.indexOf('end-end')); + snappingPoints.splice(index, 1); + } + if (hits.includes('start-start') && hits.includes('end-start')) { + const index = Math.max(hits.indexOf('start-start') && hits.indexOf('end-start')); + snappingPoints.splice(index, 1); + } + // the active shape's start and end points can only be connected to one other shape, // this variable can be used to check if the start or end point is already been snapped to // when the point has a connection it stores the shape UID of the connected shape diff --git a/src/reducer/index.js b/src/reducer/index.js index fd1734a..9fe70a2 100644 --- a/src/reducer/index.js +++ b/src/reducer/index.js @@ -8,7 +8,7 @@ import { COLOR_STRING_TO_HEX } from '../constants/general.js'; import * as contextTools from '../constants/contextTools.js'; import { ERASER_SIZES, BRUSH_SIZES } from '../constants/d2Constants.js'; import update from 'react-addons-update'; -import { defaultCamera, cameraReducer } from './d3/tools/cameraReducer.js'; +import { defaultCamera } from './d3/tools/cameraReducer.js'; import d2AddImageReducer from './d2/addImageReducer.js'; import d2ToolReducer from './d2/toolReducer.js'; import d3ToolReducer from './d3/toolReducer.js'; @@ -19,9 +19,7 @@ import selectionReducer from './selectionReducer.js'; import selectionOperationReducer from './selectionOperationReducer.js'; import contextReducer from './contextReducer.js'; import { Matrix, Vector } from 'cal'; -import { - setActiveSpace, addSpaceActive, setActive2D, removeAllObjects, getActive2D, addObject -} from './objectReducers.js'; +import { setActiveSpace, addSpaceActive, setActive2D, getActive2D, addObject } from './objectReducers.js'; import menusReducer from './menusReducer.js'; // import createDebug from 'debug'; // const debug = createDebug('d3d:reducer:sketcher'); diff --git a/src/shape/index.js b/src/shape/index.js deleted file mode 100644 index 7792c7e..0000000 --- a/src/shape/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import docToFile from './docToFile.js'; -import * as shapeToPoints from './shapeToPoints.js'; -import JSONToSketchData from './JSONToSketchData.js'; -import SketchDataToJSON from './SketchDataToJSON.js'; -import * as shapeDataUtils from './shapeDataUtils.js'; - -export { docToFile, shapeToPoints, JSONToSketchData, SketchDataToJSON, shapeDataUtils }; diff --git a/src/shape/shapeDataUtils.js b/src/shape/shapeDataUtils.js index dba10fb..736bd63 100644 --- a/src/shape/shapeDataUtils.js +++ b/src/shape/shapeDataUtils.js @@ -96,7 +96,7 @@ export const determineActiveShape3d = (state) => { state.d3.sculpt.activeHandle !== null || state.d3.twist.active; - const selectedObjects = state.selection.objects.map(({ id }) => id); + // const selectedObjects = state.selection.objects.map(({ id }) => id); const activeShapes = {}; for (const id in state.objectsById) { activeShapes[id] = activeTransformer || state.d2.activeShape === id; diff --git a/src/shape/shapeToPoints.js b/src/shape/shapeToPoints.js index e82d355..730e0af 100644 --- a/src/shape/shapeToPoints.js +++ b/src/shape/shapeToPoints.js @@ -83,8 +83,8 @@ function shapeToPointsRaw(shapeData) { const { radius, segment } = shapeData.circle; const points = []; const circumference = 2 * radius * Math.PI; - const numSegments = Math.min(circumference * 2, 64); - for (let rad = 0; rad <= segment; rad += Math.PI * 2 / numSegments) { + const numSegments = Math.max(3, Math.min(circumference * 2, 32)); + for (let rad = 0; rad < segment; rad += Math.PI * 2 / numSegments) { const x = Math.sin(rad) * radius; const y = -Math.cos(rad) * radius; points.push(new Vector(x, y)); diff --git a/src/utils/async.js b/src/utils/async.js index 705923b..c260378 100644 --- a/src/utils/async.js +++ b/src/utils/async.js @@ -52,13 +52,13 @@ export function createThrottle() { if (!startLoop) return null; - return function loop() { + return (function loop() { const promise = next().then(() => { if (typeof next === 'function') return loop(); }); next = true; return promise; - }().then(() => { + })().then(() => { next = null; }); }; diff --git a/src/utils/dbUtils.js b/src/utils/dbUtils.js index 54e2b9a..aba80cf 100644 --- a/src/utils/dbUtils.js +++ b/src/utils/dbUtils.js @@ -20,7 +20,7 @@ export function getDbUrl(db) { } else { return `${db.protocol}${db.host}`; } -}; +} const dbs = {}; export function getDb(dbUrl) { diff --git a/src/utils/exportUtils.js b/src/utils/exportUtils.js index 23c7c06..cdff11b 100644 --- a/src/utils/exportUtils.js +++ b/src/utils/exportUtils.js @@ -1,4 +1,3 @@ -import 'blueimp-canvas-to-blob'; // canvas toBlob polyfill import { Matrix } from '@doodle3d/cal'; import * as exportSTL from '@doodle3d/threejs-export-stl'; import * as exportOBJ from '@doodle3d/threejs-export-obj'; @@ -11,8 +10,6 @@ import { shapeToPoints } from '../shape/shapeToPoints.js'; import { SHAPE_TYPE_PROPERTIES } from '../constants/shapeTypeProperties.js'; import { LINE_WIDTH } from '../constants/exportConstants.js'; import { bufferToBase64 } from '../utils/binaryUtils.js'; -import { IMAGE_TYPE, IMAGE_QUALITY } from '../constants/saveConstants.js'; -import createScene from '../d3/createScene.js'; const THREE_BSP = ThreeBSP(THREE); @@ -60,6 +57,7 @@ function createExportShapeData(shapeData, offsetSingleWalls, lineWidth) { ...shapeData, transform: new Matrix(), type: 'EXPORT_SHAPE', + originalFill: shapeData.fill, fill, shapes }; @@ -79,38 +77,42 @@ export function generateExportMesh(state, options = {}) { }; for (const id in state.objectsById) { - exportState.objectsById[id] = createExportShapeData(state.objectsById[id], offsetSingleWalls || unionGeometry, lineWidth); + const shapeData = state.objectsById[id]; + if (!SHAPE_TYPE_PROPERTIES[shapeData.type].D3Visible) continue; + const exportShapeData = createExportShapeData(shapeData, offsetSingleWalls || unionGeometry, lineWidth); + exportState.objectsById[id] = exportShapeData; + } + + if (Object.keys(exportState.objectsById).length === 0) { + throw new Error('sketch is empty'); } const shapesManager = new ShapesManager({ toonShader: false }); shapesManager.update(exportState); const materials = []; - const objectMatrix = new THREE.Matrix4(); let exportGeometry; shapesManager.traverse(mesh => { const shapeData = exportState.objectsById[mesh.name]; if (mesh instanceof THREE.Mesh && shapeData.solid) { const { geometry, material } = mesh; + const objectMatrix = state.spaces[shapeData.space].matrix; let objectGeometry = geometry.clone(); objectGeometry.mergeVertices(); - objectGeometry.applyMatrix(objectMatrix.multiplyMatrices(state.spaces[shapeData.space].matrix, matrix)); + objectGeometry.applyMatrix(new THREE.Matrix4().multiplyMatrices(objectMatrix, matrix)); - const colorHex = material.color.getHex(); - let materialIndex = materials.findIndex(exportMaterial => exportMaterial.color.getHex() === colorHex); - if (materialIndex === -1) { - materialIndex = materials.length; - materials.push(material); - } - - if (unionGeometry) objectGeometry = new THREE_BSP(objectGeometry, materialIndex); + const materialIndex = materials.length; + const exportMaterial = new THREE.MeshBasicMaterial({ color: material.color.getHex() }); + exportMaterial.side = shapeData.fill ? THREE.FrontSide : THREE.DoubleSide; + materials.push(exportMaterial); if (unionGeometry) { - if (!exportGeometry) { - exportGeometry = objectGeometry; - } else { + objectGeometry = new THREE_BSP(objectGeometry, materialIndex); + if (exportGeometry) { exportGeometry = exportGeometry.union(objectGeometry); + } else { + exportGeometry = objectGeometry; } } else { if (!exportGeometry) exportGeometry = new THREE.Geometry(); @@ -151,7 +153,7 @@ export async function createFile(state, type, options) { } case 'stl-blob': { const buffer = exportSTL.fromMesh(exportMesh, true); - return new Blob([buffer], { type: 'application/vnd.ms-pki.stl' }) + return new Blob([buffer], { type: 'application/vnd.ms-pki.stl' }); } case 'obj-blob': { const buffer = await exportOBJ.fromMesh(exportMesh); @@ -166,34 +168,3 @@ export async function createFile(state, type, options) { throw new Error(`did not regonize type ${type}`); } } - -export function generateThumb(state, width, height, responseType = 'blob') { - return new Promise((resolve) => { - const { render, renderer, setSize } = createScene(state); - - setSize(width, height, 1.0); - render(); - - // possible to add encoder options for smaller file setSize - // https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob - switch (responseType) { - case 'base64': - const base64 = renderer.domElement.toDataURL(IMAGE_TYPE, IMAGE_QUALITY); - resolve(base64); - break; - - case 'objectURL': - renderer.domElement.toCanvas((blob) => { - const objectURL = URL.createObjectURL(blob); - resolve(objectURL); - }, IMAGE_TYPE, IMAGE_QUALITY); - break; - - default: - renderer.domElement.toBlob((blob) => { - resolve(blob); - }, IMAGE_TYPE, IMAGE_QUALITY); - break; - } - }); -} diff --git a/src/utils/generateThumb.js b/src/utils/generateThumb.js new file mode 100644 index 0000000..6dc50ba --- /dev/null +++ b/src/utils/generateThumb.js @@ -0,0 +1,34 @@ +import 'blueimp-canvas-to-blob'; // canvas toBlob polyfill +import createScene from '../d3/createScene.js'; +import { IMAGE_TYPE, IMAGE_QUALITY } from '../constants/saveConstants.js'; + +export function generateThumb(state, width, height, responseType = 'blob') { + return new Promise((resolve) => { + const { render, renderer, setSize } = createScene(state); + + setSize(width, height, 1.0); + render(); + + // possible to add encoder options for smaller file setSize + // https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob + switch (responseType) { + case 'base64': + const base64 = renderer.domElement.toDataURL(IMAGE_TYPE, IMAGE_QUALITY); + resolve(base64); + break; + + case 'objectURL': + renderer.domElement.toCanvas((blob) => { + const objectURL = URL.createObjectURL(blob); + resolve(objectURL); + }, IMAGE_TYPE, IMAGE_QUALITY); + break; + + default: + renderer.domElement.toBlob((blob) => { + resolve(blob); + }, IMAGE_TYPE, IMAGE_QUALITY); + break; + } + }); +} diff --git a/src/utils/index.js b/src/utils/index.js deleted file mode 100644 index fd24941..0000000 --- a/src/utils/index.js +++ /dev/null @@ -1,11 +0,0 @@ -import * as asyncUtils from './async.js'; -import * as binaryUtils from './async.js'; -import * as dbUtils from './dbUtils.js'; -import * as imageUtils from './imageUtils.js'; -import * as exportUtils from './exportUtils.js'; -import * as webGLSupport from './webGLSupport.js'; -import * as vectorUtils from './vectorUtils.js'; -import * as textUtils from './textUtils.js'; -import * as reactUtils from './reactUtils.js'; - -export { dbUtils, asyncUtils, imageUtils, exportUtils, webGLSupport, binaryUtils, vectorUtils, textUtils, reactUtils }; diff --git a/src/utils/reactUtils.js b/src/utils/reactUtils.js index fbd4203..13aeb7f 100644 --- a/src/utils/reactUtils.js +++ b/src/utils/reactUtils.js @@ -45,5 +45,5 @@ export function asyncValidateForm(dispatch, form, asyncValidate, formData) { dispatch(stopAsyncValidation(form)); }).catch(error => { dispatch(stopAsyncValidation(form, error)); - }) + }); } diff --git a/src/utils/selectionUtils.js b/src/utils/selectionUtils.js index 48a941f..7ad47fc 100644 --- a/src/utils/selectionUtils.js +++ b/src/utils/selectionUtils.js @@ -1,13 +1,13 @@ import * as THREE from 'three'; -import { shapeToPoints } from '../shape/shapeToPoints.js' -import { getPointsBounds } from '../shape/shapeDataUtils.js' +import { shapeToPoints } from '../shape/shapeToPoints.js'; +import { getPointsBounds } from '../shape/shapeDataUtils.js'; import { Vector } from 'cal'; import arrayMemoizer from './arrayMemoizer.js'; import memoize from 'memoizee'; // import createDebug from 'debug'; // const debug = createDebug('d3d:util:selection'); -// Memoized selector that returns the same array of shapeSata's when +// Memoized selector that returns the same array of shapeData's when // - the selection array didn't change // - the objects in the resulting array didn't change // enables memoization of utils that use this array diff --git a/src/utils/threeUtils.js b/src/utils/threeUtils.js index 1fff057..d828dd4 100644 --- a/src/utils/threeUtils.js +++ b/src/utils/threeUtils.js @@ -1,5 +1,5 @@ import * as THREE from 'three'; -import { loadImage } from './imageUtils.js' +import { loadImage } from './imageUtils.js'; import createDebug from 'debug'; const debug = createDebug('d3d:threeUtils'); diff --git a/styles/styles.css b/styles/styles.css index 981a0be..656703f 100644 --- a/styles/styles.css +++ b/styles/styles.css @@ -249,78 +249,37 @@ flex-wrap: wrap; } -#color-light-blue-a { - fill: #bcffff; -} -#color-light-blue-b { - fill: #69e1fd; -} -#color-light-blue-c { - fill: #00b8ff; -} -#color-dark-blue-a { - fill: #c8e2ff; -} -#color-dark-blue-b { - fill: #7dacfc; -} -#color-dark-blue-c { - fill: #0357ff; -} -#color-purple-a { - fill: #efc9ff; -} -#color-purple-b { - fill: #c57efc; -} -#color-purple-c { - fill: #820ef9; -} -#color-pink-a { - fill: #ffc7ee; -} -#color-pink-b { - fill: #fd7cc1; -} -#color-pink-c { - fill: #fa047b; -} -#color-red-a { - fill: #ffcdce; -} -#color-red-b { - fill: #fd898a; -} -#color-red-c { - fill: #fd898a; -} -#color-yellow-a { - fill: #fffea0; -} -#color-yellow-b { - fill: #fffb39; -} -#color-yellow-c { - fill: #fdac05; -} -#color-green-a { - fill: #daffd4; -} -#color-green-b { - fill: #97f194; -} -#color-green-c { - fill: #31d22d; -} -#color-black-a { - fill: #f4f4f4; -} -#color-black-b { - fill: #7f7f7f; -} -#color-black-c { - fill: #1f1f1f; -} +#color-light-blue-a { fill: #BCFFFF; } +#color-light-blue-b { fill: #68E1FD; } +#color-light-blue-c { fill: #01B8FF; } + +#color-dark-blue-a { fill: #C8E3FF; } +#color-dark-blue-b { fill: #7DACFC; } +#color-dark-blue-c { fill: #0256FF; } + +#color-purple-a { fill: #EFC9FF; } +#color-purple-b { fill: #C57EFC; } +#color-purple-c { fill: #820FF9; } + +#color-pink-a { fill: #FFC7EE; } +#color-pink-b { fill: #FD7BC1; } +#color-pink-c { fill: #FA047B; } + +#color-red-a { fill: #FFCDCE; } +#color-red-b { fill: #FD898A; } +#color-red-c { fill: #FF2600; } + +#color-yellow-a { fill: #FFF76B; } +#color-yellow-b { fill: #FF9201; } +#color-yellow-c { fill: #AA7942; } + +#color-green-a { fill: #DAFFD5; } +#color-green-b { fill: #97F294; } +#color-green-c { fill: #00EA01; } + +#color-black-a { fill: #F4F4F4; } +#color-black-b { fill: #AAAAAA; } +#color-black-c { fill: #444444; } #color-hole-material { fill: url(#holepattern); diff --git a/webpack.config.js b/webpack.config.js index 0b098a5..c116e80 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -69,7 +69,7 @@ module.exports = { } }, { test: /\.css$/, - use: [ 'style-loader', 'css-loader' ] + use: ['style-loader', 'css-loader'] } ] }, diff --git a/workers/trace.worker.js b/workers/trace.worker.js index a57ed66..be1351b 100644 --- a/workers/trace.worker.js +++ b/workers/trace.worker.js @@ -74,9 +74,7 @@ function floodFill(imageData, start, tolerance) { for (let i = 0; i < neighbours.length; i ++) { const neighbourIndex = neighbours[i]; - if (!done[neighbourIndex]) { - stack.push(neighbourIndex); - } + if (!done[neighbourIndex]) stack.push(neighbourIndex); done[neighbourIndex] = true; } }