typed.js 2.0.11 → 2.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +1 -1
- package/README.md +29 -23
- package/dist/typed.cjs +2 -0
- package/dist/typed.cjs.map +1 -0
- package/dist/typed.module.js +2 -0
- package/dist/typed.module.js.map +1 -0
- package/dist/typed.umd.js +3 -0
- package/dist/typed.umd.js.map +1 -0
- package/index.d.ts +131 -134
- package/package.json +24 -28
- package/.codeclimate.yml +0 -31
- package/.csslintrc +0 -2
- package/.esdoc.json +0 -4
- package/.eslintignore +0 -3
- package/.eslintrc.yml +0 -25
- package/.github/CONTRIBUTING.md +0 -44
- package/.github/ISSUE_TEMPLATE.md +0 -27
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -38
- package/.prettierrc +0 -4
- package/.travis.yml +0 -16
- package/.vscode/launch.json +0 -14
- package/.vscode/settings.json +0 -11
- package/CODE_OF_CONDUCT.md +0 -46
- package/app.js +0 -12
- package/assets/demos.css +0 -61
- package/assets/demos.js +0 -133
- package/bower.json +0 -11
- package/docs/API.md +0 -231
- package/docs/assets/anchor.js +0 -197
- package/docs/assets/bass-addons.css +0 -12
- package/docs/assets/bass.css +0 -543
- package/docs/assets/fonts/EOT/SourceCodePro-Bold.eot +0 -0
- package/docs/assets/fonts/EOT/SourceCodePro-Regular.eot +0 -0
- package/docs/assets/fonts/LICENSE.txt +0 -93
- package/docs/assets/fonts/OTF/SourceCodePro-Bold.otf +0 -0
- package/docs/assets/fonts/OTF/SourceCodePro-Regular.otf +0 -0
- package/docs/assets/fonts/TTF/SourceCodePro-Bold.ttf +0 -0
- package/docs/assets/fonts/TTF/SourceCodePro-Regular.ttf +0 -0
- package/docs/assets/fonts/WOFF/OTF/SourceCodePro-Bold.otf.woff +0 -0
- package/docs/assets/fonts/WOFF/OTF/SourceCodePro-Regular.otf.woff +0 -0
- package/docs/assets/fonts/WOFF/TTF/SourceCodePro-Bold.ttf.woff +0 -0
- package/docs/assets/fonts/WOFF/TTF/SourceCodePro-Regular.ttf.woff +0 -0
- package/docs/assets/fonts/WOFF2/OTF/SourceCodePro-Bold.otf.woff2 +0 -0
- package/docs/assets/fonts/WOFF2/OTF/SourceCodePro-Regular.otf.woff2 +0 -0
- package/docs/assets/fonts/WOFF2/TTF/SourceCodePro-Bold.ttf.woff2 +0 -0
- package/docs/assets/fonts/WOFF2/TTF/SourceCodePro-Regular.ttf.woff2 +0 -0
- package/docs/assets/fonts/source-code-pro.css +0 -23
- package/docs/assets/github.css +0 -123
- package/docs/assets/site.js +0 -108
- package/docs/assets/style.css +0 -136
- package/docs/index.html +0 -2187
- package/gulpfile.js +0 -95
- package/index.html +0 -184
- package/lib/typed.js +0 -1051
- package/lib/typed.min.js +0 -11
- package/lib/typed.min.js.map +0 -1
- package/logo-cropped.png +0 -0
- package/logo.png +0 -0
- package/src/defaults.js +0 -164
- package/src/html-parser.js +0 -67
- package/src/initializer.js +0 -207
- package/src/typed.js +0 -432
- package/webpack.config.js +0 -45
package/docs/assets/github.css
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
github.com style (c) Vasily Polovnyov <vast@whiteants.net>
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
.hljs {
|
|
8
|
-
display: block;
|
|
9
|
-
overflow-x: auto;
|
|
10
|
-
padding: 0.5em;
|
|
11
|
-
color: #333;
|
|
12
|
-
background: #f8f8f8;
|
|
13
|
-
-webkit-text-size-adjust: none;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.hljs-comment,
|
|
17
|
-
.diff .hljs-header,
|
|
18
|
-
.hljs-javadoc {
|
|
19
|
-
color: #998;
|
|
20
|
-
font-style: italic;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.hljs-keyword,
|
|
24
|
-
.css .rule .hljs-keyword,
|
|
25
|
-
.hljs-winutils,
|
|
26
|
-
.nginx .hljs-title,
|
|
27
|
-
.hljs-subst,
|
|
28
|
-
.hljs-request,
|
|
29
|
-
.hljs-status {
|
|
30
|
-
color: #1184CE;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.hljs-number,
|
|
34
|
-
.hljs-hexcolor,
|
|
35
|
-
.ruby .hljs-constant {
|
|
36
|
-
color: #ed225d;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.hljs-string,
|
|
40
|
-
.hljs-tag .hljs-value,
|
|
41
|
-
.hljs-phpdoc,
|
|
42
|
-
.hljs-dartdoc,
|
|
43
|
-
.tex .hljs-formula {
|
|
44
|
-
color: #ed225d;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.hljs-title,
|
|
48
|
-
.hljs-id,
|
|
49
|
-
.scss .hljs-preprocessor {
|
|
50
|
-
color: #900;
|
|
51
|
-
font-weight: bold;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.hljs-list .hljs-keyword,
|
|
55
|
-
.hljs-subst {
|
|
56
|
-
font-weight: normal;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.hljs-class .hljs-title,
|
|
60
|
-
.hljs-type,
|
|
61
|
-
.vhdl .hljs-literal,
|
|
62
|
-
.tex .hljs-command {
|
|
63
|
-
color: #458;
|
|
64
|
-
font-weight: bold;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.hljs-tag,
|
|
68
|
-
.hljs-tag .hljs-title,
|
|
69
|
-
.hljs-rules .hljs-property,
|
|
70
|
-
.django .hljs-tag .hljs-keyword {
|
|
71
|
-
color: #000080;
|
|
72
|
-
font-weight: normal;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.hljs-attribute,
|
|
76
|
-
.hljs-variable,
|
|
77
|
-
.lisp .hljs-body {
|
|
78
|
-
color: #008080;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.hljs-regexp {
|
|
82
|
-
color: #009926;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.hljs-symbol,
|
|
86
|
-
.ruby .hljs-symbol .hljs-string,
|
|
87
|
-
.lisp .hljs-keyword,
|
|
88
|
-
.clojure .hljs-keyword,
|
|
89
|
-
.scheme .hljs-keyword,
|
|
90
|
-
.tex .hljs-special,
|
|
91
|
-
.hljs-prompt {
|
|
92
|
-
color: #990073;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.hljs-built_in {
|
|
96
|
-
color: #0086b3;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.hljs-preprocessor,
|
|
100
|
-
.hljs-pragma,
|
|
101
|
-
.hljs-pi,
|
|
102
|
-
.hljs-doctype,
|
|
103
|
-
.hljs-shebang,
|
|
104
|
-
.hljs-cdata {
|
|
105
|
-
color: #999;
|
|
106
|
-
font-weight: bold;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.hljs-deletion {
|
|
110
|
-
background: #fdd;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.hljs-addition {
|
|
114
|
-
background: #dfd;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.diff .hljs-change {
|
|
118
|
-
background: #0086b3;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.hljs-chunk {
|
|
122
|
-
color: #aaa;
|
|
123
|
-
}
|
package/docs/assets/site.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/* global anchors */
|
|
2
|
-
|
|
3
|
-
// add anchor links to headers
|
|
4
|
-
anchors.options.placement = 'left';
|
|
5
|
-
anchors.add('h3');
|
|
6
|
-
|
|
7
|
-
// Filter UI
|
|
8
|
-
var tocElements = document.getElementById('toc')
|
|
9
|
-
.getElementsByTagName('li');
|
|
10
|
-
|
|
11
|
-
document.getElementById('filter-input')
|
|
12
|
-
.addEventListener('keyup', function (e) {
|
|
13
|
-
|
|
14
|
-
var i, element, children;
|
|
15
|
-
|
|
16
|
-
// enter key
|
|
17
|
-
if (e.keyCode === 13) {
|
|
18
|
-
// go to the first displayed item in the toc
|
|
19
|
-
for (i = 0; i < tocElements.length; i++) {
|
|
20
|
-
element = tocElements[i];
|
|
21
|
-
if (!element.classList.contains('display-none')) {
|
|
22
|
-
location.replace(element.firstChild.href);
|
|
23
|
-
return e.preventDefault();
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
var match = function () {
|
|
29
|
-
return true;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
var value = this.value.toLowerCase();
|
|
33
|
-
|
|
34
|
-
if (!value.match(/^\s*$/)) {
|
|
35
|
-
match = function (element) {
|
|
36
|
-
return element.firstChild.innerHTML.toLowerCase().indexOf(value) !== -1;
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
for (i = 0; i < tocElements.length; i++) {
|
|
41
|
-
element = tocElements[i];
|
|
42
|
-
children = Array.from(element.getElementsByTagName('li'));
|
|
43
|
-
if (match(element) || children.some(match)) {
|
|
44
|
-
element.classList.remove('display-none');
|
|
45
|
-
} else {
|
|
46
|
-
element.classList.add('display-none');
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
var toggles = document.getElementsByClassName('toggle-step-sibling');
|
|
52
|
-
for (var i = 0; i < toggles.length; i++) {
|
|
53
|
-
toggles[i].addEventListener('click', toggleStepSibling);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function toggleStepSibling() {
|
|
57
|
-
var stepSibling = this.parentNode.parentNode.parentNode.getElementsByClassName('toggle-target')[0];
|
|
58
|
-
var klass = 'display-none';
|
|
59
|
-
if (stepSibling.classList.contains(klass)) {
|
|
60
|
-
stepSibling.classList.remove(klass);
|
|
61
|
-
stepSibling.innerHTML = '▾';
|
|
62
|
-
} else {
|
|
63
|
-
stepSibling.classList.add(klass);
|
|
64
|
-
stepSibling.innerHTML = '▸';
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
var items = document.getElementsByClassName('toggle-sibling');
|
|
69
|
-
for (var j = 0; j < items.length; j++) {
|
|
70
|
-
items[j].addEventListener('click', toggleSibling);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function toggleSibling() {
|
|
74
|
-
var stepSibling = this.parentNode.getElementsByClassName('toggle-target')[0];
|
|
75
|
-
var icon = this.getElementsByClassName('icon')[0];
|
|
76
|
-
var klass = 'display-none';
|
|
77
|
-
if (stepSibling.classList.contains(klass)) {
|
|
78
|
-
stepSibling.classList.remove(klass);
|
|
79
|
-
icon.innerHTML = '▾';
|
|
80
|
-
} else {
|
|
81
|
-
stepSibling.classList.add(klass);
|
|
82
|
-
icon.innerHTML = '▸';
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function showHashTarget(targetId) {
|
|
87
|
-
var hashTarget = document.getElementById(targetId);
|
|
88
|
-
// new target is hidden
|
|
89
|
-
if (hashTarget && hashTarget.offsetHeight === 0 &&
|
|
90
|
-
hashTarget.parentNode.parentNode.classList.contains('display-none')) {
|
|
91
|
-
hashTarget.parentNode.parentNode.classList.remove('display-none');
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
window.addEventListener('hashchange', function() {
|
|
96
|
-
showHashTarget(location.hash.substring(1));
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
showHashTarget(location.hash.substring(1));
|
|
100
|
-
|
|
101
|
-
var toclinks = document.getElementsByClassName('pre-open');
|
|
102
|
-
for (var k = 0; k < toclinks.length; k++) {
|
|
103
|
-
toclinks[k].addEventListener('mousedown', preOpen, false);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function preOpen() {
|
|
107
|
-
showHashTarget(this.hash.substring(1));
|
|
108
|
-
}
|
package/docs/assets/style.css
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
.documentation {
|
|
2
|
-
font-family: Helvetica, sans-serif;
|
|
3
|
-
color: #666;
|
|
4
|
-
line-height: 1.5;
|
|
5
|
-
background: #f5f5f5;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.black {
|
|
9
|
-
color: #666;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.bg-white {
|
|
13
|
-
background-color: #fff;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
h4 {
|
|
17
|
-
margin: 20px 0 10px 0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.documentation h3 {
|
|
21
|
-
color: #000;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.border-bottom {
|
|
25
|
-
border-color: #ddd;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
a {
|
|
29
|
-
color: #1184CE;
|
|
30
|
-
text-decoration: none;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.documentation a[href]:hover {
|
|
34
|
-
text-decoration: underline;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
a:hover {
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.py1-ul li {
|
|
42
|
-
padding: 5px 0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.max-height-100 {
|
|
46
|
-
max-height: 100%;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
section:target h3 {
|
|
50
|
-
font-weight:700;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.documentation td,
|
|
54
|
-
.documentation th {
|
|
55
|
-
padding: .25rem .25rem;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
h1:hover .anchorjs-link,
|
|
59
|
-
h2:hover .anchorjs-link,
|
|
60
|
-
h3:hover .anchorjs-link,
|
|
61
|
-
h4:hover .anchorjs-link {
|
|
62
|
-
opacity: 1;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.fix-3 {
|
|
66
|
-
width: 25%;
|
|
67
|
-
max-width: 244px;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.fix-3 {
|
|
71
|
-
width: 25%;
|
|
72
|
-
max-width: 244px;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@media (min-width: 52em) {
|
|
76
|
-
.fix-margin-3 {
|
|
77
|
-
margin-left: 25%;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.pre, pre, code, .code {
|
|
82
|
-
font-family: Source Code Pro,Menlo,Consolas,Liberation Mono,monospace;
|
|
83
|
-
font-size: 14px;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.fill-light {
|
|
87
|
-
background: #F9F9F9;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.width2 {
|
|
91
|
-
width: 1rem;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.input {
|
|
95
|
-
font-family: inherit;
|
|
96
|
-
display: block;
|
|
97
|
-
width: 100%;
|
|
98
|
-
height: 2rem;
|
|
99
|
-
padding: .5rem;
|
|
100
|
-
margin-bottom: 1rem;
|
|
101
|
-
border: 1px solid #ccc;
|
|
102
|
-
font-size: .875rem;
|
|
103
|
-
border-radius: 3px;
|
|
104
|
-
box-sizing: border-box;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
table {
|
|
108
|
-
border-collapse: collapse;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.prose table th,
|
|
112
|
-
.prose table td {
|
|
113
|
-
text-align: left;
|
|
114
|
-
padding:8px;
|
|
115
|
-
border:1px solid #ddd;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.prose table th:nth-child(1) { border-right: none; }
|
|
119
|
-
.prose table th:nth-child(2) { border-left: none; }
|
|
120
|
-
|
|
121
|
-
.prose table {
|
|
122
|
-
border:1px solid #ddd;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.prose-big {
|
|
126
|
-
font-size: 18px;
|
|
127
|
-
line-height: 30px;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.quiet {
|
|
131
|
-
opacity: 0.7;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.minishadow {
|
|
135
|
-
box-shadow: 2px 2px 10px #f3f3f3;
|
|
136
|
-
}
|