diff --git a/package-lock.json b/package-lock.json index 599006b..b64d301 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5085,7 +5085,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -5106,12 +5107,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5126,17 +5129,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -5253,7 +5259,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -5265,6 +5272,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -5279,6 +5287,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -5286,12 +5295,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -5310,6 +5321,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -5390,7 +5402,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -5402,6 +5415,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -5487,7 +5501,8 @@ "safe-buffer": { "version": "5.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -5523,6 +5538,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -5542,6 +5558,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -5585,12 +5602,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -11713,6 +11732,11 @@ "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", "dev": true }, + "propdoc": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/propdoc/-/propdoc-0.9.3.tgz", + "integrity": "sha512-pt/2w96r2v6RXWJBUAoDAKCQGUtAGtOGUlzrLV0hleWHoMJ+vKQjWxSTVYXh3hKARv7+C9+fWPFrirgco80Hzw==" + }, "proxy-addr": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.3.tgz", diff --git a/package.json b/package.json index c10d136..9e3ecda 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,9 @@ "axios": "^0.18.0", "bootstrap": "^4.1.1", "bootstrap-vue": "^2.0.0-rc.11", - "fuzzaldrin-plus": "^0.6.0", "es6-promise": "^4.2.4", + "fuzzaldrin-plus": "^0.6.0", + "propdoc": "^0.9.3", "vue": "^2.5.2", "vue-infinite-loading": "^2.4.3", "vue-router": "^3.0.1", diff --git a/src/components/Guide.vue b/src/components/Guide.vue index 083c309..cc7d4b0 100644 --- a/src/components/Guide.vue +++ b/src/components/Guide.vue @@ -60,8 +60,8 @@ - - -``` - -#### props - -- `component`: **required** and should be the component object itself -- `documentation`: optional, can be any subset of `component`, and will take precedence; useful for two functions - - if the component's name or other fields should be output differently for documentation - - for the optional documentation fields, as these will cause some additional space to be used by your components if not separated - -#### slots - -Two named slots are available for adding content to what _propdoc_ emits -- `pre-use` will add content before the _description_ and _token_ fields -- `pre-props` will add content before the prop tables are emitted - -#### propDoc.getDoc - -> available in v0.8 onward - -`propDoc.getDoc(component, documentation)` - -- merges the arguments passed to it, then processes them as described above in _keys_ -- the `props` object will be converted into an array instead of an object to simplify parsing in your template - - essentially this means you can do `v-for="prop in myDocumentedComponent.props"` and then `prop.name` instead of having to separate out the key/value diff --git a/static/node_modules/propdoc/exampleOutput.png b/static/node_modules/propdoc/exampleOutput.png deleted file mode 100644 index b8ff757..0000000 Binary files a/static/node_modules/propdoc/exampleOutput.png and /dev/null differ diff --git a/static/node_modules/propdoc/examples/.babelrc b/static/node_modules/propdoc/examples/.babelrc deleted file mode 100644 index 3ed94df..0000000 --- a/static/node_modules/propdoc/examples/.babelrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "presets": [ - ["env", { "modules": false }] - ] -} diff --git a/static/node_modules/propdoc/examples/README.md b/static/node_modules/propdoc/examples/README.md deleted file mode 100644 index b417145..0000000 --- a/static/node_modules/propdoc/examples/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# propdoc-examples - -> examples using the propdoc component - -- `AllInOne.vue` shows all fields in a single component -- `Separate.vue` and `Separate.doc.js` show a possible way of separating fields to save space when building -- `Documentation.vue` shows two ways to use _propdoc_ either as a component (checkOne), or as a function (checkTwo) - -## Build Setup - -``` bash -# install dependencies -npm install - -# serve with hot reload at localhost:8080 -npm run dev -``` diff --git a/static/node_modules/propdoc/examples/index.html b/static/node_modules/propdoc/examples/index.html deleted file mode 100644 index 9be0aa2..0000000 --- a/static/node_modules/propdoc/examples/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - propdoc-examples - - -
- - - diff --git a/static/node_modules/propdoc/examples/package.json b/static/node_modules/propdoc/examples/package.json deleted file mode 100644 index 8dd682f..0000000 --- a/static/node_modules/propdoc/examples/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "propdoc-examples", - "description": "examples using the propdoc component", - "version": "1.0.0", - "author": "Dave Honneffer ", - "private": true, - "scripts": { - "dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot", - "build": "cross-env NODE_ENV=production webpack --progress --hide-modules" - }, - "dependencies": { - "vue": "^2.5.3" - }, - "devDependencies": { - "babel-core": "^6.0.0", - "babel-loader": "^7.0.0", - "babel-preset-env": "^1.5.1", - "cross-env": "^5.0.0", - "css-loader": "^0.28.0", - "file-loader": "^1.1.0", - "node-sass": "^4.7.2", - "sass-loader": "^6.0.6", - "vue-loader": "^13.7.0", - "vue-template-compiler": "^2.5.13", - "webpack": "^3.10.0", - "webpack-dev-server": "^2.11.1" - } -} diff --git a/static/node_modules/propdoc/examples/src/AllInOne.vue b/static/node_modules/propdoc/examples/src/AllInOne.vue deleted file mode 100644 index a9baac3..0000000 --- a/static/node_modules/propdoc/examples/src/AllInOne.vue +++ /dev/null @@ -1,32 +0,0 @@ - - - diff --git a/static/node_modules/propdoc/examples/src/Documentation.vue b/static/node_modules/propdoc/examples/src/Documentation.vue deleted file mode 100644 index 1903e05..0000000 --- a/static/node_modules/propdoc/examples/src/Documentation.vue +++ /dev/null @@ -1,32 +0,0 @@ - - diff --git a/static/node_modules/propdoc/examples/src/Separate.doc.js b/static/node_modules/propdoc/examples/src/Separate.doc.js deleted file mode 100644 index 6de784d..0000000 --- a/static/node_modules/propdoc/examples/src/Separate.doc.js +++ /dev/null @@ -1,8 +0,0 @@ -export default { - introduction: 'an amazing checkbox', - description: ` - This \`checkbox\` is amazing, you should _check_ it out. - Except for the fact it's borderline useless in its current state. - `, - token: "" -} diff --git a/static/node_modules/propdoc/examples/src/Separate.vue b/static/node_modules/propdoc/examples/src/Separate.vue deleted file mode 100644 index 927e465..0000000 --- a/static/node_modules/propdoc/examples/src/Separate.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - diff --git a/static/node_modules/propdoc/examples/src/main.js b/static/node_modules/propdoc/examples/src/main.js deleted file mode 100644 index 44732cc..0000000 --- a/static/node_modules/propdoc/examples/src/main.js +++ /dev/null @@ -1,8 +0,0 @@ -import Vue from 'vue' -import Documentation from './Documentation.vue' -import 'propdoc/style.scss' - -new Vue({ - el: '#app', - render: h => h(Documentation) -}) diff --git a/static/node_modules/propdoc/examples/webpack.config.js b/static/node_modules/propdoc/examples/webpack.config.js deleted file mode 100644 index 9509b22..0000000 --- a/static/node_modules/propdoc/examples/webpack.config.js +++ /dev/null @@ -1,53 +0,0 @@ -var path = require('path') -var webpack = require('webpack') - -module.exports = { - entry: './src/main.js', - output: { - path: path.resolve(__dirname, './dist'), - publicPath: '/dist/', - filename: 'build.js' - }, - module: { - rules: [ - { test: /\.vue$/, loader: 'vue-loader' }, - { test: /\.scss$/, loader: 'vue-style-loader!css-loader!sass-loader', exclude: /node_modules/ }, - { test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ }, - ] - }, - resolve: { - alias: { - 'vue$': 'vue/dist/vue.esm.js', - 'propdoc': path.join(__dirname, '../') - } - }, - devServer: { - historyApiFallback: true, - noInfo: true - }, - performance: { - hints: false - }, - devtool: '#eval-source-map' -} - -if (process.env.NODE_ENV === 'production') { - module.exports.devtool = '#source-map' - // http://vue-loader.vuejs.org/en/workflow/production.html - module.exports.plugins = (module.exports.plugins || []).concat([ - new webpack.DefinePlugin({ - 'process.env': { - NODE_ENV: '"production"' - } - }), - new webpack.optimize.UglifyJsPlugin({ - sourceMap: true, - compress: { - warnings: false - } - }), - new webpack.LoaderOptionsPlugin({ - minimize: true - }) - ]) -} diff --git a/static/node_modules/propdoc/lib/index.js b/static/node_modules/propdoc/lib/index.js deleted file mode 100644 index e60cc12..0000000 --- a/static/node_modules/propdoc/lib/index.js +++ /dev/null @@ -1 +0,0 @@ -(function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.propDoc=t():e.propDoc=t()})("undefined"!=typeof self?self:this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var s=n[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,t),s.l=!0,s.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=1)}([function(e,t,n){"use strict";var r=n(4),s=n.n(r),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.a={name:"propDoc",props:{component:{type:Object,required:!0},documentation:{type:Object},ignoreMixins:{type:Boolean,default:!1}},data:function(){return{merged:this.process(this.component,this.documentation)}},getDoc:function(e,t,n){return this.methods.process(e,t,n)},methods:{process:function(e,t,n){var r=this.merge(e,t);return r.token&&(r.token=this.sanitize(r.token)),r.description&&(r.description=s()(r.description)),n||this.ignoreMixins||r.mixins&&(r.props=this.merge(this.getPropsFromMixins(r.mixins),r.props)),r.props&&(r.props=this.processProps(r.props)),r},sanitize:function(e){e=e.trim();var t=e.match(/^[ \t]*(?=\S)/gm);if(!t)return e;var n=Math.min.apply(Math,t.map(function(e){return e.length})),r=new RegExp("^[ \\t]{"+n+"}","gm");return n>0?e.replace(r,""):e},getPropsFromMixins:function(e){return e.reduce(function(e,t){return Object.assign(e,t.props),e},{})},processProps:function(e){var t=this;return(Array.isArray(e)?e:Object.keys(e)).reduce(function(n,r){var s=new Proxy(e[r]||{},t.basicArrayProxy);return n[r]={type:t.getType(s.type),required:s.required||!1,default:t.getDefault(s.default),note:s.note||""},n},{})},basicArrayProxy:function(e,t){return t in e?e[t]:void 0},getDefault:function(e){return void 0!==e?"function"==typeof e?JSON.stringify(e()):JSON.stringify(e):"undefined"},isTypeArray:function(e){return"object"===i(e())&&Array.isArray(e())},getType:function(e){var t=this;if(void 0===e)return"any";if(Array.isArray(e))return e.map(function(e){return t.isTypeArray(e)?"array":i(e())}).join("|");var n=i(e());return this.isTypeArray(e)?"array":n},merge:function(e,t){return Object.assign({},e,t)},hasMixins:function(e){return void 0!==e.mixins}}}},function(e,t,n){e.exports=n(2)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),s=n(6),i=n(3),o=i(r.a,s.a,!1,null,null,null);t.default=o.exports},function(e,t){e.exports=function(e,t,n,r,s,i){var o,l=e=e||{},a=typeof e.default;"object"!==a&&"function"!==a||(o=e,l=e.default);var p="function"==typeof l?l.options:l;t&&(p.render=t.render,p.staticRenderFns=t.staticRenderFns,p._compiled=!0),n&&(p.functional=!0),s&&(p._scopeId=s);var u;if(i?(u=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},p._ssrRegister=u):r&&(u=r),u){var h=p.functional,c=h?p.render:p.beforeCreate;h?(p._injectStyles=u,p.render=function(e,t){return u.call(t),c(e,t)}):p.beforeCreate=c?[].concat(c,u):[u]}return{esModule:o,exports:l,options:p}}},function(e,t,n){(function(t){(function(){"use strict";function t(e){this.tokens=[],this.tokens.links={},this.options=e||h.defaults,this.rules=c.normal,this.options.gfm&&(this.options.tables?this.rules=c.tables:this.rules=c.gfm)}function n(e,t){if(this.options=t||h.defaults,this.links=e,this.rules=g.normal,this.renderer=this.options.renderer||new r,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=g.breaks:this.rules=g.gfm:this.options.pedantic&&(this.rules=g.pedantic)}function r(e){this.options=e||{}}function s(e){this.tokens=[],this.token=null,this.options=e||h.defaults,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options}function i(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function o(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function l(e,t){return e=e.source,t=t||"",function n(r,s){return r?(s=s.source||s,s=s.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,s),n):new RegExp(e,t)}}function a(e,t){return d[" "+e]||(/^[^:]+:\/*[^\/]*$/.test(e)?d[" "+e]=e+"/":d[" "+e]=e.replace(/[^\/]*$/,"")),e=d[" "+e],"//"===t.slice(0,2)?e.replace(/:[\s\S]*/,":")+t:"/"===t.charAt(0)?e.replace(/(:\/*[^\/]*)[\s\S]*/,"$1")+t:e+t}function p(){}function u(e){for(var t,n,r=1;rAn error occurred:

"+i(e.message+"",!0)+"
";throw e}}var c={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:p,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:p,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:p,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};c.bullet=/(?:[*+-]|\d+\.)/,c.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,c.item=l(c.item,"gm")(/bull/g,c.bullet)(),c.list=l(c.list)(/bull/g,c.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+c.def.source+")")(),c.blockquote=l(c.blockquote)("def",c.def)(),c._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",c.html=l(c.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,c._tag)(),c.paragraph=l(c.paragraph)("hr",c.hr)("heading",c.heading)("lheading",c.lheading)("blockquote",c.blockquote)("tag","<"+c._tag)("def",c.def)(),c.normal=u({},c),c.gfm=u({},c.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),c.gfm.paragraph=l(c.paragraph)("(?!","(?!"+c.gfm.fences.source.replace("\\1","\\2")+"|"+c.list.source.replace("\\1","\\3")+"|")(),c.tables=u({},c.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),t.rules=c,t.lex=function(e,n){return new t(n).lex(e)},t.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},t.prototype.token=function(e,t,n){for(var r,s,i,o,l,a,p,u,h,e=e.replace(/^ +$/gm,"");e;)if((i=this.rules.newline.exec(e))&&(e=e.substring(i[0].length),i[0].length>1&&this.tokens.push({type:"space"})),i=this.rules.code.exec(e))e=e.substring(i[0].length),i=i[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?i:i.replace(/\n+$/,"")});else if(i=this.rules.fences.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"code",lang:i[2],text:i[3]||""});else if(i=this.rules.heading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:i[1].length,text:i[2]});else if(t&&(i=this.rules.nptable.exec(e))){for(e=e.substring(i[0].length),a={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/\n$/,"").split("\n")},u=0;u ?/gm,""),this.token(i,t,!0),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(e)){for(e=e.substring(i[0].length),o=i[2],this.tokens.push({type:"list_start",ordered:o.length>1}),i=i[0].match(this.rules.item),r=!1,h=i.length,u=0;u1&&l.length>1||(e=i.slice(u+1).join("\n")+e,u=h-1)),s=r||/\n\n(?!\s*$)/.test(a),u!==h-1&&(r="\n"===a.charAt(a.length-1),s||(s=r)),this.tokens.push({type:s?"loose_item_start":"list_item_start"}),this.token(a,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(i=this.rules.html.exec(e))e=e.substring(i[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===i[1]||"script"===i[1]||"style"===i[1]),text:i[0]});else if(!n&&t&&(i=this.rules.def.exec(e)))e=e.substring(i[0].length),this.tokens.links[i[1].toLowerCase()]={href:i[2],title:i[3]};else if(t&&(i=this.rules.table.exec(e))){for(e=e.substring(i[0].length),a={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/(?: *\| *)?\n$/,"").split("\n")},u=0;u])/,autolink:/^<([^ <>]+(@|:\/)[^ <>]+)>/,url:p,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^<'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)([\s\S]*?[^`])\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:p,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,g.link=l(g.link)("inside",g._inside)("href",g._href)(),g.reflink=l(g.reflink)("inside",g._inside)(),g.normal=u({},g),g.pedantic=u({},g.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),g.gfm=u({},g.normal,{escape:l(g.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:l(g.text)("]|","~]|")("|","|https?://|")()}),g.breaks=u({},g.gfm,{br:l(g.br)("{2,}","*")(),text:l(g.gfm.text)("{2,}","*")()}),n.rules=g,n.output=function(e,t,r){return new n(t,r).output(e)},n.prototype.output=function(e){for(var t,n,r,s,o="";e;)if(s=this.rules.escape.exec(e))e=e.substring(s[0].length),o+=s[1];else if(s=this.rules.autolink.exec(e))e=e.substring(s[0].length),"@"===s[2]?(n=i(":"===s[1].charAt(6)?this.mangle(s[1].substring(7)):this.mangle(s[1])),r=this.mangle("mailto:")+n):(n=i(s[1]),r=n),o+=this.renderer.link(r,null,n);else if(this.inLink||!(s=this.rules.url.exec(e))){if(s=this.rules.tag.exec(e))!this.inLink&&/^/i.test(s[0])&&(this.inLink=!1),e=e.substring(s[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):i(s[0]):s[0];else if(s=this.rules.link.exec(e))e=e.substring(s[0].length),this.inLink=!0,o+=this.outputLink(s,{href:s[2],title:s[3]}),this.inLink=!1;else if((s=this.rules.reflink.exec(e))||(s=this.rules.nolink.exec(e))){if(e=e.substring(s[0].length),t=(s[2]||s[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){o+=s[0].charAt(0),e=s[0].substring(1)+e;continue}this.inLink=!0,o+=this.outputLink(s,t),this.inLink=!1}else if(s=this.rules.strong.exec(e))e=e.substring(s[0].length),o+=this.renderer.strong(this.output(s[2]||s[1]));else if(s=this.rules.em.exec(e))e=e.substring(s[0].length),o+=this.renderer.em(this.output(s[2]||s[1]));else if(s=this.rules.code.exec(e))e=e.substring(s[0].length),o+=this.renderer.codespan(i(s[2].trim(),!0));else if(s=this.rules.br.exec(e))e=e.substring(s[0].length),o+=this.renderer.br();else if(s=this.rules.del.exec(e))e=e.substring(s[0].length),o+=this.renderer.del(this.output(s[1]));else if(s=this.rules.text.exec(e))e=e.substring(s[0].length),o+=this.renderer.text(i(this.smartypants(s[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(s[0].length),n=i(s[1]),r=n,o+=this.renderer.link(r,null,n);return o},n.prototype.outputLink=function(e,t){var n=i(t.href),r=t.title?i(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,i(e[1]))},n.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},n.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,s=0;s.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},r.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'
'+(n?e:i(e,!0))+"\n
\n":"
"+(n?e:i(e,!0))+"\n
"},r.prototype.blockquote=function(e){return"
\n"+e+"
\n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n){return"'+e+"\n"},r.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},r.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"\n"},r.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},r.prototype.paragraph=function(e){return"

    "+e+"

    \n"},r.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},r.prototype.tablerow=function(e){return"\n"+e+"\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">")+e+"\n"},r.prototype.strong=function(e){return""+e+""},r.prototype.em=function(e){return""+e+""},r.prototype.codespan=function(e){return""+e+""},r.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},r.prototype.del=function(e){return""+e+""},r.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(o(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return n}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return n}this.options.baseUrl&&!f.test(e)&&(e=a(this.options.baseUrl,e));var s='
    "},r.prototype.image=function(e,t,n){this.options.baseUrl&&!f.test(e)&&(e=a(this.options.baseUrl,e));var r=''+n+'":">"},r.prototype.text=function(e){return e},s.parse=function(e,t,n){return new s(t,n).parse(e)},s.prototype.parse=function(e){this.inline=new n(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},s.prototype.next=function(){return this.token=this.tokens.pop()},s.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},s.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},s.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,s="",i="";for(n="",e=0;e ({ - vendor: false, - html: false, - hash: false, - dist: 'lib', - filename: { - js: 'index.js' - } -}) diff --git a/static/node_modules/propdoc/propDoc.vue b/static/node_modules/propdoc/propDoc.vue deleted file mode 100644 index 1fb62dd..0000000 --- a/static/node_modules/propdoc/propDoc.vue +++ /dev/null @@ -1,120 +0,0 @@ - - diff --git a/static/node_modules/propdoc/style.scss b/static/node_modules/propdoc/style.scss deleted file mode 100644 index 60d3194..0000000 --- a/static/node_modules/propdoc/style.scss +++ /dev/null @@ -1,141 +0,0 @@ -$base-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif !default; -$code-font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace !default; - -.props { - .proprow:nth-child(even) { - background-color: rgba(43, 59, 67, 0.1 ); - } - .proprow { - display: flex; - align-items: center; - justify-content: flex-start; - padding: 1.6rem 0.8rem; - width: 100%; - } - .labels { - padding: 0.8rem; - > .propcol { - font-size: 1rem; - font-weight: 400; - text-transform: uppercase; - color: #547484; - } - .name span { - margin-left: 0.4rem; - } - .required { - span { - display: none; - } - } - } - .propcol { - word-wrap: break-word; - font-size: 1.2rem; - flex: 1; - width: 25%; - flex-wrap: wrap; - &.notes { - flex: 2; - } - } - .name { - font-weight: 600; - } -} -.propcol * { - display: inline; -} -.propdoc { - max-width: 80%; - font-family: $base-font-family; - border-bottom: 3px solid #929292; - padding-top: 30px; -} -code { - font-family: $code-font-family; - background-color: transparentize(#F3C387, 0.5); - color: #14435A; - padding: 0.2rem; -} -pre { - overflow: visible !important; -} -pre code { - line-height: 1.8; - &.labelled, .token & { - position: relative; - &:after { - content: attr(data-lang); - font-size: 0.8rem; - color: #CE7780; - font-weight: 600; - font-family: $base-font-family; - position: absolute; - right: 1.2rem; - bottom: -2rem; - } - } -} -.token, .props{ - padding-bottom: 15px; - width: 100%; - overflow-x: auto; -} - -.use, .props { - margin: 2.8rem 0; -} -.token pre { - margin: 0; -} -.use { - display: flex; - flex-wrap: wrap; - justify-content: space-between; -} -.mobileNavSocialLinkImg{ - height: 25px; - padding: 0 10px; - opacity: 0.4; - transition: 0.3s; - &:hover{ - cursor: pointer; - opacity: 1; - } -} - -@media (max-width: 700px) { - .props { - display: flex; - .proprow { - width: 50%; - display: block; - background: rgba(43, 59, 67, 0.05); - margin: 0; - padding: 0; - padding: 1em; - } - .proprow:nth-child { - border-bottom: 2px solid #000; - } - .propcol { - padding: 0.5em; - display: flex; - align-items: center; - justify-content: center; - flex-wrap: wrap; - width: 100%; - height: 30px; - } - .propcol:last-child { - height: auto; - } - } - .token { - display: none; - } - .subtitle { - font-size: 20px; - } -} \ No newline at end of file diff --git a/static/node_modules/propdoc/test/.setup.js b/static/node_modules/propdoc/test/.setup.js deleted file mode 100644 index bbd0e63..0000000 --- a/static/node_modules/propdoc/test/.setup.js +++ /dev/null @@ -1 +0,0 @@ -require('jsdom-global')() diff --git a/static/node_modules/propdoc/test/.webpack.config.js b/static/node_modules/propdoc/test/.webpack.config.js deleted file mode 100644 index 862ec0e..0000000 --- a/static/node_modules/propdoc/test/.webpack.config.js +++ /dev/null @@ -1,25 +0,0 @@ -var path = require('path') -var nodeExternals = require('webpack-node-externals') - -module.exports = { - module: { - rules: [ - { - test: /\.vue$/, - loader: 'vue-loader', - }, - { - test: /\.js$/, - loader: 'babel-loader', - exclude: /node_modules/ - } - ] - }, - externals: [nodeExternals()], - resolve: { - alias: { - 'vue$': 'vue/dist/vue.esm.js' - } - }, - devtool: '#eval-source-map' -} diff --git a/static/node_modules/propdoc/test/fixtures/checkboxBasicPropsMixin.vue b/static/node_modules/propdoc/test/fixtures/checkboxBasicPropsMixin.vue deleted file mode 100644 index 97277e9..0000000 --- a/static/node_modules/propdoc/test/fixtures/checkboxBasicPropsMixin.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - diff --git a/static/node_modules/propdoc/test/fixtures/checkboxMixin.vue b/static/node_modules/propdoc/test/fixtures/checkboxMixin.vue deleted file mode 100644 index 50197c5..0000000 --- a/static/node_modules/propdoc/test/fixtures/checkboxMixin.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - diff --git a/static/node_modules/propdoc/test/fixtures/checkboxOverlapMixin.vue b/static/node_modules/propdoc/test/fixtures/checkboxOverlapMixin.vue deleted file mode 100644 index 1232755..0000000 --- a/static/node_modules/propdoc/test/fixtures/checkboxOverlapMixin.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - diff --git a/static/node_modules/propdoc/test/fixtures/checkboxSolo.vue b/static/node_modules/propdoc/test/fixtures/checkboxSolo.vue deleted file mode 100644 index 470ad39..0000000 --- a/static/node_modules/propdoc/test/fixtures/checkboxSolo.vue +++ /dev/null @@ -1,27 +0,0 @@ - - - diff --git a/static/node_modules/propdoc/test/fixtures/input.mixin.vue b/static/node_modules/propdoc/test/fixtures/input.mixin.vue deleted file mode 100644 index f740be8..0000000 --- a/static/node_modules/propdoc/test/fixtures/input.mixin.vue +++ /dev/null @@ -1,15 +0,0 @@ - \ No newline at end of file diff --git a/static/node_modules/propdoc/test/fixtures/inputOverlap.mixin.vue b/static/node_modules/propdoc/test/fixtures/inputOverlap.mixin.vue deleted file mode 100644 index a05213d..0000000 --- a/static/node_modules/propdoc/test/fixtures/inputOverlap.mixin.vue +++ /dev/null @@ -1,20 +0,0 @@ - \ No newline at end of file diff --git a/static/node_modules/propdoc/test/propDoc.spec.js b/static/node_modules/propdoc/test/propDoc.spec.js deleted file mode 100644 index 5bb6892..0000000 --- a/static/node_modules/propdoc/test/propDoc.spec.js +++ /dev/null @@ -1,192 +0,0 @@ -/* eslint no-unused-vars: 0 */ -import { mount } from 'avoriaz' -import should from 'should' -import marked from 'marked' -import propDoc from '../propDoc.vue' -import testCheckboxMixin from './fixtures/checkboxMixin.vue' -import testCheckboxSolo from './fixtures/checkboxSolo.vue' - -let tBasic = { - name: 'foo', - props: ['one', 'two', 'three'] -} -let tAnnotations = { - introduction: 'a brief intro to the component', - description: ` - a more _in-depth_ description that will be rendered with markdown, using \`marked\` - `, - token: `` -} -let tComplex = { - name: 'bar', - props: { - first: { - type: Array, - required: true, - note: 'this is a required array' - }, - second: { - type: Object, - default: function () { - return { message: 'hello' } - } - }, - third: { - type: Number, - default: 100, - note: 'this is a number that defaults to 100' - }, - fourth: { - type: String, - default: 'world' - }, - fifth: { - required: true - } - } -} -let tTypes = { - name: 'baz', - props: { - a: { type: String }, - b: { type: Number }, - c: { type: Boolean }, - d: { type: Function }, - e: { type: Object }, - f: { type: Array }, - g: { type: Symbol }, - h: { type: [String, Number, Boolean, Function, Object, Array, Symbol] } - } -} -describe('propDoc.vue DOM', () => { - it('renders an article with class propdoc', () => { - const component = mount(propDoc, { propsData: { component: tBasic } }) - component.is('article').should.be.true() - component.hasClass('propdoc').should.be.true() - }) - it('renders nothing when given a bad prop (without even a name)', () => { - const component = mount(propDoc, { propsData: { component: {} } }) - component.is('article').should.be.false() - }) - it('renders a prop list with basic prop arrays', () => { - const component = mount(propDoc, { propsData: { component: tBasic } }) - component.find('.proprow').length.should.be.exactly(4) // header row + 3 props - }) - it('renders a prop list with complex prop arrays', () => { - const component = mount(propDoc, { propsData: { component: tComplex } }) - component.find('.proprow').length.should.be.exactly(6) // header row + 5 props - }) -}) -describe('propDoc.getDefault', () => { - it('returns "undefined" (the text, not the value) when there is no default value', () => { - const component = mount(propDoc, { propsData: { component: {} } }) - component.vm.getDefault(tBasic.props[0].default).should.be.exactly('undefined') - component.vm.getDefault(tComplex.props.fifth.default).should.be.exactly('undefined') - }) - it('returns the correct string when a default value is provided', () => { - const component = mount(propDoc, { propsData: { component: {} } }) - component.vm.getDefault(tComplex.props.second.default).should.be.exactly(JSON.stringify(tComplex.props.second.default())) - component.vm.getDefault(tComplex.props.third.default).should.be.exactly(JSON.stringify(100)) - component.vm.getDefault(tComplex.props.fourth.default).should.be.exactly(JSON.stringify('world')) - }) -}) -describe('propDoc.getType', () => { - it('returns "any" when there is no type specified', () => { - const component = mount(propDoc, { propsData: { component: {} } }) - component.vm.getType(tBasic.props[0].type).should.be.exactly('any') - component.vm.getType(tComplex.props.fifth.type).should.be.exactly('any') - }) - it('returns the correct string when a type is specified', () => { - const component = mount(propDoc, { propsData: { component: {} } }) - component.vm.getType(tTypes.props.a.type).should.be.exactly('string') - component.vm.getType(tTypes.props.b.type).should.be.exactly('number') - component.vm.getType(tTypes.props.c.type).should.be.exactly('boolean') - component.vm.getType(tTypes.props.d.type).should.be.exactly('function') - component.vm.getType(tTypes.props.e.type).should.be.exactly('object') - component.vm.getType(tTypes.props.f.type).should.be.exactly('array') - component.vm.getType(tTypes.props.g.type).should.be.exactly('symbol') - component.vm.getType(tTypes.props.h.type).should.be.exactly('string|number|boolean|function|object|array|symbol') - }) -}) -describe('propDoc option merging', () => { - it('merges both props before render - documentation wins when two keys exist', () => { - const component = mount(propDoc, { propsData: { - component: tBasic, - documentation: tComplex - } }) - component.vm.merged.name.should.be.exactly(tComplex.name) - component.vm.merged.props.first.should.be.ok() - }) - it('merges both props before render - mutually exclusive keys are preserved', () => { - const component = mount(propDoc, { propsData: { - component: tComplex, - documentation: tAnnotations - } }) - component.vm.merged.name.should.be.exactly(tComplex.name) - component.vm.merged.props.first.should.be.ok() - component.vm.merged.introduction.should.be.ok() - component.vm.merged.introduction.should.be.exactly('a brief intro to the component') - component.vm.merged.description.should.be.ok() - component.vm.merged.token.should.be.ok() - }) -}) -describe('propDoc.methods.processProps(component)', () => { - it('will annotate basic prop arrays by filling in appropriate types, defaults, etc', () => { - let basicDoc = propDoc.getDoc(tBasic) - basicDoc.name.should.be.exactly(tBasic.name) - basicDoc.props.one.should.eql({ - type: 'any', - required: false, - default: 'undefined', - note: '' - }) - }) - it('adds notes found in the "note" key for each prop', () => { - const component = mount(propDoc, { propsData: { component: tComplex } }) - component.find('.propcol.notes')[1].text().should.be.exactly(tComplex.props.first.note) - component.find('.propcol.notes')[3].text().should.be.exactly(tComplex.props.third.note) - }) - it('adds a "required" class to the name of any prop marked as required', () => { - const component = mount(propDoc, { propsData: { component: tComplex } }) - component.find('.propcol.required')[1].text().should.be.exactly('first') - component.find('.propcol.required')[2].text().should.be.exactly('fifth') - }) - it('re-maps prop values to their processed equivalent', () => { - let complexDoc = propDoc.getDoc(tComplex) - complexDoc.name.should.be.exactly(tComplex.name) - complexDoc.props.first.should.be.ok() - complexDoc.props.first.type.should.be.exactly('array') - complexDoc.props.first.required.should.be.exactly(true) - complexDoc.props.first.note.should.be.exactly(tComplex.props.first.note) - }) -}) -describe('propDoc.getDoc()', () => { - it('will merge components and documentation, just like normal', () => { - let completeDoc = propDoc.getDoc(tComplex, tAnnotations) - completeDoc.name.should.be.exactly(tComplex.name) - completeDoc.introduction.should.be.exactly(tAnnotations.introduction) - completeDoc.description.should.be.exactly(marked(tAnnotations.description)) - }) -}) -describe('propDoc mixin handling', () => { - it('will automatically bring in props from mixins', () => { - propDoc.methods.hasMixins(testCheckboxSolo).should.be.false() - propDoc.methods.hasMixins(testCheckboxMixin).should.be.true() - }) - it('will pull props from mixins and return them as a normal prop object', () => { - let mix = testCheckboxMixin.mixins - propDoc.methods.getPropsFromMixins(mix).should.eql(mix[0].props) - }) - it('will process props and mixin-props as though they were one object', () => { - let allInOne = propDoc.getDoc(testCheckboxSolo) - let propsInMixins = propDoc.getDoc(testCheckboxMixin) - allInOne.props.should.eql(propsInMixins.props) - }) - it('will ignore mixin-props when "ignore-mixins" is specified', () => { - let allInOne = propDoc.getDoc(testCheckboxSolo) - let propsInMixinsIgnored = propDoc.getDoc(testCheckboxMixin, null, true) - allInOne.props.should.not.eql(propsInMixinsIgnored.props) - const component = mount(propDoc, { propsData: { component: testCheckboxMixin, ignoreMixins: true } }) - component.vm.merged.should.eql(propsInMixinsIgnored) - }) -})