初始化
This commit is contained in:
45
uni_modules/UniDevTools/node_modules/parse-css-font/CHANGELOG.md
generated
vendored
Normal file
45
uni_modules/UniDevTools/node_modules/parse-css-font/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
## 4.0.0
|
||||
|
||||
- **New:** `variant` can have more than one value. Parsing the `variant` is too complex for this function, so any unknown tokens are assumed to be a `variant` and joined as one (e.g., `foo bold bar italic qux` parses a `variant` of `foo bar qux`).
|
||||
- **Fix:** Fixed `normal` overriding other declarations. The defaults are still `normal` and you can have any number of normals precede the `size` without overriding non-`normal` values.
|
||||
- **Breaking:** Removed parsing of CSS global keywords, as they don't seem to be supported. This is a fix, but it may break implementations that were relying on it.
|
||||
- **Breaking:** Error messaging has changed and new errors will throw when adding more than one `style`, `weight` or `stretch`.
|
||||
|
||||
## 3.0.4
|
||||
|
||||
- Add BundlePhobia badges to npm (requires version bump).
|
||||
|
||||
## 3.0.3
|
||||
|
||||
- Also exports a CommonJS module. Fixes `const parseCSSFont = require('parse-css-font');`.
|
||||
|
||||
## 3.0.2
|
||||
|
||||
- Fix parsing of `1rem / 1.2` when the slash is surrounded by spaces.
|
||||
|
||||
## 3.0.1
|
||||
|
||||
- Fix readme.
|
||||
- Add `package-lock.json`.
|
||||
|
||||
## 3.0.0
|
||||
|
||||
- **Breaking:** Remove tcomb dependency. Breaking change if you were somehow relying on those errors.
|
||||
- Introduce TypeScript.
|
||||
- Provide TypeScript-generated type definitions.
|
||||
|
||||
## 2.0.2
|
||||
|
||||
- Update dependencies.
|
||||
|
||||
## 2.0.1
|
||||
|
||||
- Fix issue w/ slashes in functions.
|
||||
|
||||
## 2.0.0
|
||||
|
||||
- Preserves functions with spaces and commas inside.
|
||||
|
||||
## 1.0.0
|
||||
|
||||
- Initial release.
|
||||
22
uni_modules/UniDevTools/node_modules/parse-css-font/LICENSE
generated
vendored
Normal file
22
uni_modules/UniDevTools/node_modules/parse-css-font/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Jed Mao
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
54
uni_modules/UniDevTools/node_modules/parse-css-font/README.md
generated
vendored
Normal file
54
uni_modules/UniDevTools/node_modules/parse-css-font/README.md
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
# parse-css-font
|
||||
|
||||
[](https://www.npmjs.org/package/parse-css-font)
|
||||
[](https://www.npmjs.org/package/parse-css-font)
|
||||
[](https://travis-ci.org/jedmao/parse-css-font)
|
||||
[](https://codecov.io/gh/jedmao/parse-css-font)
|
||||
[](https://bundlephobia.com/result?p=parse-css-font)
|
||||
[](https://bundlephobia.com/result?p=parse-css-font)
|
||||
[](https://github.com/prettier/prettier)
|
||||
[](https://twitter.com/sindresorhus/status/457989012528316416?ref_src=twsrc%5Etfw&ref_url=https%3A%2F%2Fwww.quora.com%2FWhat-does-the-unicorn-approved-shield-mean-in-GitHub)
|
||||
|
||||
[](https://nodei.co/npm/parse-css-font/)
|
||||
|
||||
Parses the CSS [font property](https://developer.mozilla.org/en-US/docs/Web/CSS/font#font-variant-css21).
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
$ npm install parse-css-font [--save[-dev]]
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const parseCSSFont = require('parse-css-font')
|
||||
parseCSSFont('1rem "Roboto Condensed", sans-serif;')
|
||||
/*
|
||||
{
|
||||
size: '1rem',
|
||||
family: ['Roboto Condensed', 'sans-serif'],
|
||||
style: 'normal',
|
||||
variant: 'normal',
|
||||
weight: 'normal',
|
||||
stretch: 'normal',
|
||||
lineHeight: 'normal'
|
||||
}
|
||||
*/
|
||||
```
|
||||
|
||||
See [the tests](https://github.com/jedmao/parse-css-font/blob/master/src/index.test.ts) for more scenarios.
|
||||
|
||||
### ES6/2015 import
|
||||
|
||||
```ts
|
||||
import parseCSSFont from 'parse-css-font'
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
```
|
||||
$ npm test
|
||||
```
|
||||
|
||||
This will run tests and generate a code coverage report. Anything less than 100% coverage will throw an error.
|
||||
212
uni_modules/UniDevTools/node_modules/parse-css-font/coverage/lcov-report/base.css
generated
vendored
Normal file
212
uni_modules/UniDevTools/node_modules/parse-css-font/coverage/lcov-report/base.css
generated
vendored
Normal file
@@ -0,0 +1,212 @@
|
||||
body, html {
|
||||
margin:0; padding: 0;
|
||||
height: 100%;
|
||||
}
|
||||
body {
|
||||
font-family: Helvetica Neue, Helvetica, Arial;
|
||||
font-size: 14px;
|
||||
color:#333;
|
||||
}
|
||||
.small { font-size: 12px; }
|
||||
*, *:after, *:before {
|
||||
-webkit-box-sizing:border-box;
|
||||
-moz-box-sizing:border-box;
|
||||
box-sizing:border-box;
|
||||
}
|
||||
h1 { font-size: 20px; margin: 0;}
|
||||
h2 { font-size: 14px; }
|
||||
pre {
|
||||
font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-moz-tab-size: 2;
|
||||
-o-tab-size: 2;
|
||||
tab-size: 2;
|
||||
}
|
||||
a { color:#0074D9; text-decoration:none; }
|
||||
a:hover { text-decoration:underline; }
|
||||
.strong { font-weight: bold; }
|
||||
.space-top1 { padding: 10px 0 0 0; }
|
||||
.pad2y { padding: 20px 0; }
|
||||
.pad1y { padding: 10px 0; }
|
||||
.pad2x { padding: 0 20px; }
|
||||
.pad2 { padding: 20px; }
|
||||
.pad1 { padding: 10px; }
|
||||
.space-left2 { padding-left:55px; }
|
||||
.space-right2 { padding-right:20px; }
|
||||
.center { text-align:center; }
|
||||
.clearfix { display:block; }
|
||||
.clearfix:after {
|
||||
content:'';
|
||||
display:block;
|
||||
height:0;
|
||||
clear:both;
|
||||
visibility:hidden;
|
||||
}
|
||||
.fl { float: left; }
|
||||
@media only screen and (max-width:640px) {
|
||||
.col3 { width:100%; max-width:100%; }
|
||||
.hide-mobile { display:none!important; }
|
||||
}
|
||||
|
||||
.quiet {
|
||||
color: #7f7f7f;
|
||||
color: rgba(0,0,0,0.5);
|
||||
}
|
||||
.quiet a { opacity: 0.7; }
|
||||
|
||||
.fraction {
|
||||
font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
||||
font-size: 10px;
|
||||
color: #555;
|
||||
background: #E8E8E8;
|
||||
padding: 4px 5px;
|
||||
border-radius: 3px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
div.path a:link, div.path a:visited { color: #333; }
|
||||
table.coverage {
|
||||
border-collapse: collapse;
|
||||
margin: 10px 0 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
table.coverage td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
table.coverage td.line-count {
|
||||
text-align: right;
|
||||
padding: 0 5px 0 20px;
|
||||
}
|
||||
table.coverage td.line-coverage {
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
min-width:20px;
|
||||
}
|
||||
|
||||
table.coverage td span.cline-any {
|
||||
display: inline-block;
|
||||
padding: 0 5px;
|
||||
width: 100%;
|
||||
}
|
||||
.missing-if-branch {
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
border-radius: 3px;
|
||||
position: relative;
|
||||
padding: 0 4px;
|
||||
background: #333;
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.skip-if-branch {
|
||||
display: none;
|
||||
margin-right: 10px;
|
||||
position: relative;
|
||||
padding: 0 4px;
|
||||
background: #ccc;
|
||||
color: white;
|
||||
}
|
||||
.missing-if-branch .typ, .skip-if-branch .typ {
|
||||
color: inherit !important;
|
||||
}
|
||||
.coverage-summary {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
.coverage-summary tr { border-bottom: 1px solid #bbb; }
|
||||
.keyline-all { border: 1px solid #ddd; }
|
||||
.coverage-summary td, .coverage-summary th { padding: 10px; }
|
||||
.coverage-summary tbody { border: 1px solid #bbb; }
|
||||
.coverage-summary td { border-right: 1px solid #bbb; }
|
||||
.coverage-summary td:last-child { border-right: none; }
|
||||
.coverage-summary th {
|
||||
text-align: left;
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.coverage-summary th.file { border-right: none !important; }
|
||||
.coverage-summary th.pct { }
|
||||
.coverage-summary th.pic,
|
||||
.coverage-summary th.abs,
|
||||
.coverage-summary td.pct,
|
||||
.coverage-summary td.abs { text-align: right; }
|
||||
.coverage-summary td.file { white-space: nowrap; }
|
||||
.coverage-summary td.pic { min-width: 120px !important; }
|
||||
.coverage-summary tfoot td { }
|
||||
|
||||
.coverage-summary .sorter {
|
||||
height: 10px;
|
||||
width: 7px;
|
||||
display: inline-block;
|
||||
margin-left: 0.5em;
|
||||
background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
|
||||
}
|
||||
.coverage-summary .sorted .sorter {
|
||||
background-position: 0 -20px;
|
||||
}
|
||||
.coverage-summary .sorted-desc .sorter {
|
||||
background-position: 0 -10px;
|
||||
}
|
||||
.status-line { height: 10px; }
|
||||
/* dark red */
|
||||
.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
|
||||
.low .chart { border:1px solid #C21F39 }
|
||||
/* medium red */
|
||||
.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
|
||||
/* light red */
|
||||
.low, .cline-no { background:#FCE1E5 }
|
||||
/* light green */
|
||||
.high, .cline-yes { background:rgb(230,245,208) }
|
||||
/* medium green */
|
||||
.cstat-yes { background:rgb(161,215,106) }
|
||||
/* dark green */
|
||||
.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
|
||||
.high .chart { border:1px solid rgb(77,146,33) }
|
||||
|
||||
|
||||
.medium .chart { border:1px solid #666; }
|
||||
.medium .cover-fill { background: #666; }
|
||||
|
||||
.cbranch-no { background: yellow !important; color: #111; }
|
||||
|
||||
.cstat-skip { background: #ddd; color: #111; }
|
||||
.fstat-skip { background: #ddd; color: #111 !important; }
|
||||
.cbranch-skip { background: #ddd !important; color: #111; }
|
||||
|
||||
span.cline-neutral { background: #eaeaea; }
|
||||
.medium { background: #eaeaea; }
|
||||
|
||||
.cover-fill, .cover-empty {
|
||||
display:inline-block;
|
||||
height: 12px;
|
||||
}
|
||||
.chart {
|
||||
line-height: 0;
|
||||
}
|
||||
.cover-empty {
|
||||
background: white;
|
||||
}
|
||||
.cover-full {
|
||||
border-right: none !important;
|
||||
}
|
||||
pre.prettyprint {
|
||||
border: none !important;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
.com { color: #999 !important; }
|
||||
.ignore-none { color: #999; font-weight: normal; }
|
||||
|
||||
.wrapper {
|
||||
min-height: 100%;
|
||||
height: auto !important;
|
||||
height: 100%;
|
||||
margin: 0 auto -48px;
|
||||
}
|
||||
.footer, .push {
|
||||
height: 48px;
|
||||
}
|
||||
89
uni_modules/UniDevTools/node_modules/parse-css-font/coverage/lcov-report/helpers.ts.html
generated
vendored
Normal file
89
uni_modules/UniDevTools/node_modules/parse-css-font/coverage/lcov-report/helpers.ts.html
generated
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Code coverage report for helpers.ts</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="prettify.css" />
|
||||
<link rel="stylesheet" href="base.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1>
|
||||
<a href="index.html">All files</a> helpers.ts
|
||||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>3/3</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>3/3</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>1/1</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>3/3</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet">1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9</td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">45x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">const cssFontSizeKeywords = require('css-font-size-keywords');
|
||||
|
||||
export function isSize(value: string) {
|
||||
return /^[\d\.]/.test(value)
|
||||
|| value.indexOf('/') !== -1
|
||||
|| cssFontSizeKeywords.indexOf(value) !== -1
|
||||
;
|
||||
}
|
||||
</pre></td></tr>
|
||||
</table></pre>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Mon Jan 28 2019 01:02:41 GMT-0600 (Central Standard Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
if (typeof prettyPrint === 'function') {
|
||||
prettyPrint();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script src="sorter.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
106
uni_modules/UniDevTools/node_modules/parse-css-font/coverage/lcov-report/index.html
generated
vendored
Normal file
106
uni_modules/UniDevTools/node_modules/parse-css-font/coverage/lcov-report/index.html
generated
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Code coverage report for All files</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="prettify.css" />
|
||||
<link rel="stylesheet" href="base.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1>
|
||||
All files
|
||||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>68/68</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>41/41</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>8/8</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>65/65</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file high" data-value="helpers.ts"><a href="helpers.ts.html">helpers.ts</a></td>
|
||||
<td data-value="100" class="pic high"><div class="chart"><div class="cover-fill cover-full" style="width: 100%;"></div><div class="cover-empty" style="width:0%;"></div></div></td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="3" class="abs high">3/3</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="3" class="abs high">3/3</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="1" class="abs high">1/1</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="3" class="abs high">3/3</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file high" data-value="index.ts"><a href="index.ts.html">index.ts</a></td>
|
||||
<td data-value="100" class="pic high"><div class="chart"><div class="cover-fill cover-full" style="width: 100%;"></div><div class="cover-empty" style="width:0%;"></div></div></td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="65" class="abs high">65/65</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="38" class="abs high">38/38</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="7" class="abs high">7/7</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="62" class="abs high">62/62</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div><div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Mon Jan 28 2019 01:02:41 GMT-0600 (Central Standard Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
if (typeof prettyPrint === 'function') {
|
||||
prettyPrint();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script src="sorter.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
503
uni_modules/UniDevTools/node_modules/parse-css-font/coverage/lcov-report/index.ts.html
generated
vendored
Normal file
503
uni_modules/UniDevTools/node_modules/parse-css-font/coverage/lcov-report/index.ts.html
generated
vendored
Normal file
@@ -0,0 +1,503 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Code coverage report for index.ts</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="prettify.css" />
|
||||
<link rel="stylesheet" href="base.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1>
|
||||
<a href="index.html">All files</a> index.ts
|
||||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>65/65</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>38/38</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>7/7</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>62/62</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet">1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
25
|
||||
26
|
||||
27
|
||||
28
|
||||
29
|
||||
30
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41
|
||||
42
|
||||
43
|
||||
44
|
||||
45
|
||||
46
|
||||
47
|
||||
48
|
||||
49
|
||||
50
|
||||
51
|
||||
52
|
||||
53
|
||||
54
|
||||
55
|
||||
56
|
||||
57
|
||||
58
|
||||
59
|
||||
60
|
||||
61
|
||||
62
|
||||
63
|
||||
64
|
||||
65
|
||||
66
|
||||
67
|
||||
68
|
||||
69
|
||||
70
|
||||
71
|
||||
72
|
||||
73
|
||||
74
|
||||
75
|
||||
76
|
||||
77
|
||||
78
|
||||
79
|
||||
80
|
||||
81
|
||||
82
|
||||
83
|
||||
84
|
||||
85
|
||||
86
|
||||
87
|
||||
88
|
||||
89
|
||||
90
|
||||
91
|
||||
92
|
||||
93
|
||||
94
|
||||
95
|
||||
96
|
||||
97
|
||||
98
|
||||
99
|
||||
100
|
||||
101
|
||||
102
|
||||
103
|
||||
104
|
||||
105
|
||||
106
|
||||
107
|
||||
108
|
||||
109
|
||||
110
|
||||
111
|
||||
112
|
||||
113
|
||||
114
|
||||
115
|
||||
116
|
||||
117
|
||||
118
|
||||
119
|
||||
120
|
||||
121
|
||||
122
|
||||
123
|
||||
124
|
||||
125
|
||||
126
|
||||
127
|
||||
128
|
||||
129
|
||||
130
|
||||
131
|
||||
132
|
||||
133
|
||||
134
|
||||
135
|
||||
136
|
||||
137
|
||||
138
|
||||
139
|
||||
140
|
||||
141
|
||||
142
|
||||
143
|
||||
144
|
||||
145
|
||||
146
|
||||
147</td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">50x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">49x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">48x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">42x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">42x</span>
|
||||
<span class="cline-any cline-yes">42x</span>
|
||||
<span class="cline-any cline-yes">42x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">85x</span>
|
||||
<span class="cline-any cline-yes">3x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">260x</span>
|
||||
<span class="cline-any cline-yes">260x</span>
|
||||
<span class="cline-any cline-yes">41x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">38x</span>
|
||||
<span class="cline-any cline-yes">38x</span>
|
||||
<span class="cline-any cline-yes">38x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">30x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">38x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">37x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">148x</span>
|
||||
<span class="cline-any cline-yes">148x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">37x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">82x</span>
|
||||
<span class="cline-any cline-yes">75x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">75x</span>
|
||||
<span class="cline-any cline-yes">58x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">17x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">16x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">58x</span>
|
||||
<span class="cline-any cline-yes">45x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">13x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">45x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">13x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">9x</span>
|
||||
<span class="cline-any cline-yes">9x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4x</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">const unquote = require('unquote')
|
||||
const systemFontKeywords = require('css-system-font-keywords')
|
||||
const fontWeightKeywords = require('css-font-weight-keywords')
|
||||
const fontStyleKeywords = require('css-font-style-keywords')
|
||||
const fontStretchKeywords = require('css-font-stretch-keywords')
|
||||
import * as cssListHelpers from 'css-list-helpers'
|
||||
import * as helpers from './helpers'
|
||||
|
||||
export interface ISystemFont {
|
||||
system: string
|
||||
}
|
||||
|
||||
export interface IFont {
|
||||
style?: string
|
||||
variant?: string
|
||||
weight?: string
|
||||
stretch?: string
|
||||
size?: string
|
||||
lineHeight?: string | number
|
||||
family?: string[]
|
||||
}
|
||||
|
||||
const errorPrefix = '[parse-css-font]'
|
||||
|
||||
const firstDeclarations: ['style', 'weight', 'stretch', 'variant'] = [
|
||||
'style',
|
||||
'weight',
|
||||
'stretch',
|
||||
'variant',
|
||||
]
|
||||
|
||||
export default function parseCSSFont(value: string) {
|
||||
if (typeof value !== 'string') {
|
||||
throw error('Expected a string.', TypeError)
|
||||
}
|
||||
|
||||
if (value === '') {
|
||||
throw error('Cannot parse an empty string.')
|
||||
}
|
||||
|
||||
if (systemFontKeywords.indexOf(value) !== -1) {
|
||||
return { system: value } as ISystemFont
|
||||
}
|
||||
|
||||
const font: IFont = {
|
||||
lineHeight: 'normal',
|
||||
stretch: '',
|
||||
style: '',
|
||||
variant: '',
|
||||
weight: '',
|
||||
}
|
||||
|
||||
const consumers = [style, weight, stretch, variant]
|
||||
const tokens = cssListHelpers.splitBySpaces(value)
|
||||
nextToken: for (
|
||||
let token = tokens.shift();
|
||||
!!token;
|
||||
token = tokens.shift()
|
||||
) {
|
||||
if (token === 'normal') {
|
||||
continue
|
||||
}
|
||||
|
||||
for (const consume of consumers) {
|
||||
if (consume(token)) {
|
||||
continue nextToken
|
||||
}
|
||||
}
|
||||
|
||||
const parts = cssListHelpers.split(token, ['/'])
|
||||
font.size = parts[0]
|
||||
if (!!parts[1]) {
|
||||
font.lineHeight = parseLineHeight(parts[1])
|
||||
} else if (tokens[0] === '/') {
|
||||
tokens.shift()
|
||||
font.lineHeight = parseLineHeight(tokens.shift() as string)
|
||||
}
|
||||
if (!tokens.length) {
|
||||
throw error('Missing required font-family.')
|
||||
}
|
||||
font.family = cssListHelpers.splitByCommas(tokens.join(' ')).map(unquote)
|
||||
|
||||
for (const name of firstDeclarations) {
|
||||
font[name] = font[name] || 'normal'
|
||||
}
|
||||
|
||||
return font
|
||||
}
|
||||
|
||||
throw error('Missing required font-size.')
|
||||
|
||||
function style(token: string) {
|
||||
if (fontStyleKeywords.indexOf(token) === -1) {
|
||||
return
|
||||
}
|
||||
if (font.style) {
|
||||
throw error('Font style already defined.')
|
||||
}
|
||||
return (font.style = token)
|
||||
}
|
||||
|
||||
function weight(token: string) {
|
||||
if (fontWeightKeywords.indexOf(token) === -1) {
|
||||
return
|
||||
}
|
||||
if (font.weight) {
|
||||
throw error('Font weight already defined.')
|
||||
}
|
||||
return (font.weight = token)
|
||||
}
|
||||
|
||||
function stretch(token: string) {
|
||||
if (fontStretchKeywords.indexOf(token) === -1) {
|
||||
return
|
||||
}
|
||||
if (font.stretch) {
|
||||
throw error('Font stretch already defined.')
|
||||
}
|
||||
return (font.stretch = token)
|
||||
}
|
||||
|
||||
function variant(token: string) {
|
||||
return (
|
||||
!helpers.isSize(token) &&
|
||||
(font.variant = font.variant ? [font.variant, token].join(' ') : token)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function error(
|
||||
message: string,
|
||||
ErrorType: typeof Error | typeof TypeError = Error,
|
||||
) {
|
||||
return new ErrorType(`${errorPrefix} ${message}`)
|
||||
}
|
||||
|
||||
function parseLineHeight(value: string) {
|
||||
const parsed = parseFloat(value)
|
||||
if (parsed.toString() === value) {
|
||||
return parsed
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
module.exports = Object.assign(exports.default, exports)
|
||||
</pre></td></tr>
|
||||
</table></pre>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Mon Jan 28 2019 01:02:41 GMT-0600 (Central Standard Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
if (typeof prettyPrint === 'function') {
|
||||
prettyPrint();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script src="sorter.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
1
uni_modules/UniDevTools/node_modules/parse-css-font/coverage/lcov-report/prettify.css
generated
vendored
Normal file
1
uni_modules/UniDevTools/node_modules/parse-css-font/coverage/lcov-report/prettify.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
|
||||
1
uni_modules/UniDevTools/node_modules/parse-css-font/coverage/lcov-report/prettify.js
generated
vendored
Normal file
1
uni_modules/UniDevTools/node_modules/parse-css-font/coverage/lcov-report/prettify.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
uni_modules/UniDevTools/node_modules/parse-css-font/coverage/lcov-report/sort-arrow-sprite.png
generated
vendored
Normal file
BIN
uni_modules/UniDevTools/node_modules/parse-css-font/coverage/lcov-report/sort-arrow-sprite.png
generated
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 209 B |
158
uni_modules/UniDevTools/node_modules/parse-css-font/coverage/lcov-report/sorter.js
generated
vendored
Normal file
158
uni_modules/UniDevTools/node_modules/parse-css-font/coverage/lcov-report/sorter.js
generated
vendored
Normal file
@@ -0,0 +1,158 @@
|
||||
var addSorting = (function () {
|
||||
"use strict";
|
||||
var cols,
|
||||
currentSort = {
|
||||
index: 0,
|
||||
desc: false
|
||||
};
|
||||
|
||||
// returns the summary table element
|
||||
function getTable() { return document.querySelector('.coverage-summary'); }
|
||||
// returns the thead element of the summary table
|
||||
function getTableHeader() { return getTable().querySelector('thead tr'); }
|
||||
// returns the tbody element of the summary table
|
||||
function getTableBody() { return getTable().querySelector('tbody'); }
|
||||
// returns the th element for nth column
|
||||
function getNthColumn(n) { return getTableHeader().querySelectorAll('th')[n]; }
|
||||
|
||||
// loads all columns
|
||||
function loadColumns() {
|
||||
var colNodes = getTableHeader().querySelectorAll('th'),
|
||||
colNode,
|
||||
cols = [],
|
||||
col,
|
||||
i;
|
||||
|
||||
for (i = 0; i < colNodes.length; i += 1) {
|
||||
colNode = colNodes[i];
|
||||
col = {
|
||||
key: colNode.getAttribute('data-col'),
|
||||
sortable: !colNode.getAttribute('data-nosort'),
|
||||
type: colNode.getAttribute('data-type') || 'string'
|
||||
};
|
||||
cols.push(col);
|
||||
if (col.sortable) {
|
||||
col.defaultDescSort = col.type === 'number';
|
||||
colNode.innerHTML = colNode.innerHTML + '<span class="sorter"></span>';
|
||||
}
|
||||
}
|
||||
return cols;
|
||||
}
|
||||
// attaches a data attribute to every tr element with an object
|
||||
// of data values keyed by column name
|
||||
function loadRowData(tableRow) {
|
||||
var tableCols = tableRow.querySelectorAll('td'),
|
||||
colNode,
|
||||
col,
|
||||
data = {},
|
||||
i,
|
||||
val;
|
||||
for (i = 0; i < tableCols.length; i += 1) {
|
||||
colNode = tableCols[i];
|
||||
col = cols[i];
|
||||
val = colNode.getAttribute('data-value');
|
||||
if (col.type === 'number') {
|
||||
val = Number(val);
|
||||
}
|
||||
data[col.key] = val;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
// loads all row data
|
||||
function loadData() {
|
||||
var rows = getTableBody().querySelectorAll('tr'),
|
||||
i;
|
||||
|
||||
for (i = 0; i < rows.length; i += 1) {
|
||||
rows[i].data = loadRowData(rows[i]);
|
||||
}
|
||||
}
|
||||
// sorts the table using the data for the ith column
|
||||
function sortByIndex(index, desc) {
|
||||
var key = cols[index].key,
|
||||
sorter = function (a, b) {
|
||||
a = a.data[key];
|
||||
b = b.data[key];
|
||||
return a < b ? -1 : a > b ? 1 : 0;
|
||||
},
|
||||
finalSorter = sorter,
|
||||
tableBody = document.querySelector('.coverage-summary tbody'),
|
||||
rowNodes = tableBody.querySelectorAll('tr'),
|
||||
rows = [],
|
||||
i;
|
||||
|
||||
if (desc) {
|
||||
finalSorter = function (a, b) {
|
||||
return -1 * sorter(a, b);
|
||||
};
|
||||
}
|
||||
|
||||
for (i = 0; i < rowNodes.length; i += 1) {
|
||||
rows.push(rowNodes[i]);
|
||||
tableBody.removeChild(rowNodes[i]);
|
||||
}
|
||||
|
||||
rows.sort(finalSorter);
|
||||
|
||||
for (i = 0; i < rows.length; i += 1) {
|
||||
tableBody.appendChild(rows[i]);
|
||||
}
|
||||
}
|
||||
// removes sort indicators for current column being sorted
|
||||
function removeSortIndicators() {
|
||||
var col = getNthColumn(currentSort.index),
|
||||
cls = col.className;
|
||||
|
||||
cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
|
||||
col.className = cls;
|
||||
}
|
||||
// adds sort indicators for current column being sorted
|
||||
function addSortIndicators() {
|
||||
getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted';
|
||||
}
|
||||
// adds event listeners for all sorter widgets
|
||||
function enableUI() {
|
||||
var i,
|
||||
el,
|
||||
ithSorter = function ithSorter(i) {
|
||||
var col = cols[i];
|
||||
|
||||
return function () {
|
||||
var desc = col.defaultDescSort;
|
||||
|
||||
if (currentSort.index === i) {
|
||||
desc = !currentSort.desc;
|
||||
}
|
||||
sortByIndex(i, desc);
|
||||
removeSortIndicators();
|
||||
currentSort.index = i;
|
||||
currentSort.desc = desc;
|
||||
addSortIndicators();
|
||||
};
|
||||
};
|
||||
for (i =0 ; i < cols.length; i += 1) {
|
||||
if (cols[i].sortable) {
|
||||
// add the click event handler on the th so users
|
||||
// dont have to click on those tiny arrows
|
||||
el = getNthColumn(i).querySelector('.sorter').parentElement;
|
||||
if (el.addEventListener) {
|
||||
el.addEventListener('click', ithSorter(i));
|
||||
} else {
|
||||
el.attachEvent('onclick', ithSorter(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// adds sorting functionality to the UI
|
||||
return function () {
|
||||
if (!getTable()) {
|
||||
return;
|
||||
}
|
||||
cols = loadColumns();
|
||||
loadData(cols);
|
||||
addSortIndicators();
|
||||
enableUI();
|
||||
};
|
||||
})();
|
||||
|
||||
window.addEventListener('load', addSorting);
|
||||
140
uni_modules/UniDevTools/node_modules/parse-css-font/coverage/lcov.info
generated
vendored
Normal file
140
uni_modules/UniDevTools/node_modules/parse-css-font/coverage/lcov.info
generated
vendored
Normal file
@@ -0,0 +1,140 @@
|
||||
TN:
|
||||
SF:Z:\Documents\GitHub\jedmao\parse-css-font\src\helpers.ts
|
||||
FN:3,isSize
|
||||
FNF:1
|
||||
FNH:1
|
||||
FNDA:45,isSize
|
||||
DA:1,1
|
||||
DA:3,1
|
||||
DA:4,45
|
||||
LF:3
|
||||
LH:3
|
||||
BRDA:4,0,0,45
|
||||
BRDA:4,0,1,9
|
||||
BRDA:4,0,2,7
|
||||
BRF:3
|
||||
BRH:3
|
||||
end_of_record
|
||||
TN:
|
||||
SF:Z:\Documents\GitHub\jedmao\parse-css-font\src\index.ts
|
||||
FN:32,parseCSSFont
|
||||
FN:92,style
|
||||
FN:102,weight
|
||||
FN:112,stretch
|
||||
FN:122,variant
|
||||
FN:130,error
|
||||
FN:137,parseLineHeight
|
||||
FNF:7
|
||||
FNH:7
|
||||
FNDA:50,parseCSSFont
|
||||
FNDA:82,style
|
||||
FNDA:75,weight
|
||||
FNDA:58,stretch
|
||||
FNDA:45,variant
|
||||
FNDA:7,error
|
||||
FNDA:9,parseLineHeight
|
||||
DA:1,1
|
||||
DA:2,1
|
||||
DA:3,1
|
||||
DA:4,1
|
||||
DA:5,1
|
||||
DA:6,1
|
||||
DA:7,1
|
||||
DA:23,1
|
||||
DA:25,1
|
||||
DA:32,1
|
||||
DA:33,50
|
||||
DA:34,1
|
||||
DA:37,49
|
||||
DA:38,1
|
||||
DA:41,48
|
||||
DA:42,6
|
||||
DA:45,42
|
||||
DA:53,42
|
||||
DA:54,42
|
||||
DA:55,42
|
||||
DA:60,85
|
||||
DA:61,3
|
||||
DA:64,260
|
||||
DA:65,260
|
||||
DA:66,41
|
||||
DA:70,38
|
||||
DA:71,38
|
||||
DA:72,38
|
||||
DA:73,8
|
||||
DA:74,30
|
||||
DA:75,1
|
||||
DA:76,1
|
||||
DA:78,38
|
||||
DA:79,1
|
||||
DA:81,37
|
||||
DA:83,148
|
||||
DA:84,148
|
||||
DA:87,37
|
||||
DA:90,1
|
||||
DA:93,82
|
||||
DA:94,75
|
||||
DA:96,7
|
||||
DA:97,1
|
||||
DA:99,6
|
||||
DA:103,75
|
||||
DA:104,58
|
||||
DA:106,17
|
||||
DA:107,1
|
||||
DA:109,16
|
||||
DA:113,58
|
||||
DA:114,45
|
||||
DA:116,13
|
||||
DA:117,1
|
||||
DA:119,12
|
||||
DA:123,45
|
||||
DA:132,13
|
||||
DA:134,7
|
||||
DA:138,9
|
||||
DA:139,9
|
||||
DA:140,5
|
||||
DA:142,4
|
||||
DA:146,1
|
||||
LF:62
|
||||
LH:62
|
||||
BRDA:33,0,0,1
|
||||
BRDA:33,0,1,49
|
||||
BRDA:37,1,0,1
|
||||
BRDA:37,1,1,48
|
||||
BRDA:41,2,0,6
|
||||
BRDA:41,2,1,42
|
||||
BRDA:60,3,0,3
|
||||
BRDA:60,3,1,82
|
||||
BRDA:65,4,0,41
|
||||
BRDA:65,4,1,216
|
||||
BRDA:72,5,0,8
|
||||
BRDA:72,5,1,30
|
||||
BRDA:74,6,0,1
|
||||
BRDA:74,6,1,29
|
||||
BRDA:78,7,0,1
|
||||
BRDA:78,7,1,37
|
||||
BRDA:84,8,0,148
|
||||
BRDA:84,8,1,113
|
||||
BRDA:93,9,0,75
|
||||
BRDA:93,9,1,7
|
||||
BRDA:96,10,0,1
|
||||
BRDA:96,10,1,6
|
||||
BRDA:103,11,0,58
|
||||
BRDA:103,11,1,17
|
||||
BRDA:106,12,0,1
|
||||
BRDA:106,12,1,16
|
||||
BRDA:113,13,0,45
|
||||
BRDA:113,13,1,13
|
||||
BRDA:116,14,0,1
|
||||
BRDA:116,14,1,12
|
||||
BRDA:124,15,0,45
|
||||
BRDA:124,15,1,7
|
||||
BRDA:125,16,0,2
|
||||
BRDA:125,16,1,5
|
||||
BRDA:132,17,0,6
|
||||
BRDA:132,17,1,1
|
||||
BRDA:139,18,0,5
|
||||
BRDA:139,18,1,4
|
||||
BRF:38
|
||||
BRH:38
|
||||
end_of_record
|
||||
1
uni_modules/UniDevTools/node_modules/parse-css-font/dist/helpers.d.ts
generated
vendored
Normal file
1
uni_modules/UniDevTools/node_modules/parse-css-font/dist/helpers.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function isSize(value: string): boolean;
|
||||
9
uni_modules/UniDevTools/node_modules/parse-css-font/dist/helpers.js
generated
vendored
Normal file
9
uni_modules/UniDevTools/node_modules/parse-css-font/dist/helpers.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var cssFontSizeKeywords = require('css-font-size-keywords');
|
||||
function isSize(value) {
|
||||
return /^[\d\.]/.test(value)
|
||||
|| value.indexOf('/') !== -1
|
||||
|| cssFontSizeKeywords.indexOf(value) !== -1;
|
||||
}
|
||||
exports.isSize = isSize;
|
||||
13
uni_modules/UniDevTools/node_modules/parse-css-font/dist/index.d.ts
generated
vendored
Normal file
13
uni_modules/UniDevTools/node_modules/parse-css-font/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
export interface ISystemFont {
|
||||
system: string;
|
||||
}
|
||||
export interface IFont {
|
||||
style?: string;
|
||||
variant?: string;
|
||||
weight?: string;
|
||||
stretch?: string;
|
||||
size?: string;
|
||||
lineHeight?: string | number;
|
||||
family?: string[];
|
||||
}
|
||||
export default function parseCSSFont(value: string): ISystemFont | IFont;
|
||||
111
uni_modules/UniDevTools/node_modules/parse-css-font/dist/index.js
generated
vendored
Normal file
111
uni_modules/UniDevTools/node_modules/parse-css-font/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var unquote = require('unquote');
|
||||
var systemFontKeywords = require('css-system-font-keywords');
|
||||
var fontWeightKeywords = require('css-font-weight-keywords');
|
||||
var fontStyleKeywords = require('css-font-style-keywords');
|
||||
var fontStretchKeywords = require('css-font-stretch-keywords');
|
||||
var cssListHelpers = require("css-list-helpers");
|
||||
var helpers = require("./helpers");
|
||||
var errorPrefix = '[parse-css-font]';
|
||||
var firstDeclarations = [
|
||||
'style',
|
||||
'weight',
|
||||
'stretch',
|
||||
'variant',
|
||||
];
|
||||
function parseCSSFont(value) {
|
||||
if (typeof value !== 'string') {
|
||||
throw error('Expected a string.', TypeError);
|
||||
}
|
||||
if (value === '') {
|
||||
throw error('Cannot parse an empty string.');
|
||||
}
|
||||
if (systemFontKeywords.indexOf(value) !== -1) {
|
||||
return { system: value };
|
||||
}
|
||||
var font = {
|
||||
lineHeight: 'normal',
|
||||
stretch: '',
|
||||
style: '',
|
||||
variant: '',
|
||||
weight: '',
|
||||
};
|
||||
var consumers = [style, weight, stretch, variant];
|
||||
var tokens = cssListHelpers.splitBySpaces(value);
|
||||
nextToken: for (var token = tokens.shift(); !!token; token = tokens.shift()) {
|
||||
if (token === 'normal') {
|
||||
continue;
|
||||
}
|
||||
for (var _i = 0, consumers_1 = consumers; _i < consumers_1.length; _i++) {
|
||||
var consume = consumers_1[_i];
|
||||
if (consume(token)) {
|
||||
continue nextToken;
|
||||
}
|
||||
}
|
||||
var parts = cssListHelpers.split(token, ['/']);
|
||||
font.size = parts[0];
|
||||
if (!!parts[1]) {
|
||||
font.lineHeight = parseLineHeight(parts[1]);
|
||||
}
|
||||
else if (tokens[0] === '/') {
|
||||
tokens.shift();
|
||||
font.lineHeight = parseLineHeight(tokens.shift());
|
||||
}
|
||||
if (!tokens.length) {
|
||||
throw error('Missing required font-family.');
|
||||
}
|
||||
font.family = cssListHelpers.splitByCommas(tokens.join(' ')).map(unquote);
|
||||
for (var _a = 0, firstDeclarations_1 = firstDeclarations; _a < firstDeclarations_1.length; _a++) {
|
||||
var name_1 = firstDeclarations_1[_a];
|
||||
font[name_1] = font[name_1] || 'normal';
|
||||
}
|
||||
return font;
|
||||
}
|
||||
throw error('Missing required font-size.');
|
||||
function style(token) {
|
||||
if (fontStyleKeywords.indexOf(token) === -1) {
|
||||
return;
|
||||
}
|
||||
if (font.style) {
|
||||
throw error('Font style already defined.');
|
||||
}
|
||||
return (font.style = token);
|
||||
}
|
||||
function weight(token) {
|
||||
if (fontWeightKeywords.indexOf(token) === -1) {
|
||||
return;
|
||||
}
|
||||
if (font.weight) {
|
||||
throw error('Font weight already defined.');
|
||||
}
|
||||
return (font.weight = token);
|
||||
}
|
||||
function stretch(token) {
|
||||
if (fontStretchKeywords.indexOf(token) === -1) {
|
||||
return;
|
||||
}
|
||||
if (font.stretch) {
|
||||
throw error('Font stretch already defined.');
|
||||
}
|
||||
return (font.stretch = token);
|
||||
}
|
||||
function variant(token) {
|
||||
return (!helpers.isSize(token) &&
|
||||
(font.variant = font.variant ? [font.variant, token].join(' ') : token));
|
||||
}
|
||||
}
|
||||
exports.default = parseCSSFont;
|
||||
function error(message, ErrorType) {
|
||||
if (ErrorType === void 0) { ErrorType = Error; }
|
||||
return new ErrorType(errorPrefix + " " + message);
|
||||
}
|
||||
function parseLineHeight(value) {
|
||||
var parsed = parseFloat(value);
|
||||
if (parsed.toString() === value) {
|
||||
return parsed;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
// @ts-ignore
|
||||
module.exports = Object.assign(exports.default, exports);
|
||||
89
uni_modules/UniDevTools/node_modules/parse-css-font/package.json
generated
vendored
Normal file
89
uni_modules/UniDevTools/node_modules/parse-css-font/package.json
generated
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
{
|
||||
"name": "parse-css-font",
|
||||
"version": "4.0.0",
|
||||
"description": "Parse the CSS font property value.",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"scripts": {
|
||||
"clean": "rimraf coverage dist *.log* bem-join-*",
|
||||
"codecov": "codecov -f coverage/lcov.info",
|
||||
"lint": "tslint -p tsconfig.test.json",
|
||||
"prebuild": "rimraf dist",
|
||||
"build": "tsc",
|
||||
"precover": "rimraf coverage",
|
||||
"cover": "jest --coverage",
|
||||
"pretest": "npm run lint",
|
||||
"test": "jest --watch",
|
||||
"prepublishOnly": "npm run lint && npm run cover && npm run build"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "pretty-quick --staged",
|
||||
"pre-push": "npm run lint"
|
||||
}
|
||||
},
|
||||
"prettier": {
|
||||
"arrowParens": "avoid",
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all"
|
||||
},
|
||||
"jest": {
|
||||
"preset": "ts-jest",
|
||||
"testEnvironment": "node",
|
||||
"verbose": true,
|
||||
"coverageDirectory": "coverage",
|
||||
"coverageReporters": [
|
||||
"lcov",
|
||||
"text"
|
||||
],
|
||||
"coverageThreshold": {
|
||||
"global": {
|
||||
"branches": 100,
|
||||
"functions": 100,
|
||||
"lines": 100,
|
||||
"statements": 100
|
||||
}
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jedmao/parse-css-font.git"
|
||||
},
|
||||
"keywords": [
|
||||
"css",
|
||||
"parse",
|
||||
"font",
|
||||
"shorthand"
|
||||
],
|
||||
"author": "Jed Mao <jedmao@outlook.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jedmao/parse-css-font/issues"
|
||||
},
|
||||
"homepage": "https://github.com/jedmao/parse-css-font#readme",
|
||||
"dependencies": {
|
||||
"css-font-size-keywords": "^1.0.0",
|
||||
"css-font-stretch-keywords": "^1.0.1",
|
||||
"css-font-style-keywords": "^1.0.1",
|
||||
"css-font-weight-keywords": "^1.0.0",
|
||||
"css-list-helpers": "^2.0.0",
|
||||
"css-system-font-keywords": "^1.0.0",
|
||||
"unquote": "^1.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jedmao/tsconfig": "^0.3.0",
|
||||
"@jedmao/tslint": "^0.4.2",
|
||||
"@types/jest": "^23.3.13",
|
||||
"@types/node": "^10.12.18",
|
||||
"husky": "^1.3.1",
|
||||
"jest": "^23.6.0",
|
||||
"prettier": "^1.16.1",
|
||||
"pretty-quick": "^1.10.0",
|
||||
"rimraf": "^2.6.3",
|
||||
"ts-jest": "^23.10.5",
|
||||
"tslint": "^5.12.1",
|
||||
"tslint-config-prettier": "^1.17.0",
|
||||
"typescript": "^3.2.4"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user