typed.js 2.0.0 → 2.0.1-3.1
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 +117 -79
- 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 -0
- package/package.json +22 -24
- package/.codeclimate.yml +0 -30
- package/.csslintrc +0 -2
- package/.esdoc.json +0 -4
- package/.eslintignore +0 -2
- package/.eslintrc.yml +0 -21
- package/.npmignore +0 -4
- package/.travis.yml +0 -18
- package/.vscode/launch.json +0 -14
- package/.vscode/settings.json +0 -11
- package/bower.json +0 -16
- package/docs/API.md +0 -221
- 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 -2138
- package/gulpfile.js +0 -61
- package/index.html +0 -110
- package/lib/typed.js +0 -989
- 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/main.css +0 -44
- package/src/defaults.js +0 -151
- package/src/html-parser.js +0 -68
- package/src/initializer.js +0 -133
- package/src/typed.js +0 -396
- package/webpack.config.js +0 -47
package/gulpfile.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
require('babel/register');
|
|
2
|
-
const gulp = require('gulp');
|
|
3
|
-
const webpack = require('webpack-stream');
|
|
4
|
-
const sourcemaps = require('gulp-sourcemaps');
|
|
5
|
-
const rename = require('gulp-rename');
|
|
6
|
-
const uglify = require('gulp-uglify');
|
|
7
|
-
const livereload = require('gulp-livereload');
|
|
8
|
-
const gulpDocumentation = require('gulp-documentation');
|
|
9
|
-
const eslint = require('gulp-eslint');
|
|
10
|
-
|
|
11
|
-
gulp.task('lint', () => {
|
|
12
|
-
return gulp.src('src/*.js')
|
|
13
|
-
// default: use local linting config
|
|
14
|
-
.pipe(eslint())
|
|
15
|
-
// format ESLint results and print them to the console
|
|
16
|
-
.pipe(eslint.format())
|
|
17
|
-
.pipe(eslint.failAfterError());
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
gulp.task('build', () => {
|
|
21
|
-
return gulp.src('src/*.js')
|
|
22
|
-
.pipe(webpack(require('./webpack.config.js')))
|
|
23
|
-
.pipe(gulp.dest('./lib'))
|
|
24
|
-
.pipe(sourcemaps.init({ loadMaps: true }))
|
|
25
|
-
.pipe(uglify({
|
|
26
|
-
preserveComments: 'license',
|
|
27
|
-
compress: {
|
|
28
|
-
/*eslint-disable */
|
|
29
|
-
negate_iife: false
|
|
30
|
-
/*eslint-enable */
|
|
31
|
-
}
|
|
32
|
-
}))
|
|
33
|
-
.pipe(rename('typed.min.js'))
|
|
34
|
-
.pipe(sourcemaps.write('./'))
|
|
35
|
-
.pipe(gulp.dest('lib/'))
|
|
36
|
-
.pipe(livereload());
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
gulp.task('md-docs', () => {
|
|
40
|
-
return gulp.src('./src/*.js')
|
|
41
|
-
.pipe(gulpDocumentation('md'))
|
|
42
|
-
.pipe(gulp.dest('docs'));
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
gulp.task('html-docs', () => {
|
|
46
|
-
return gulp.src('./src/*.js')
|
|
47
|
-
.pipe(gulpDocumentation('html'), {}, {
|
|
48
|
-
name: 'Typed.js Docs',
|
|
49
|
-
version: '2.0.0'
|
|
50
|
-
})
|
|
51
|
-
.pipe(gulp.dest('docs'));
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
// Default Task
|
|
55
|
-
gulp.task('default', ['lint', 'md-docs', 'html-docs', 'build']);
|
|
56
|
-
|
|
57
|
-
// Watch Task
|
|
58
|
-
gulp.task('watch', () => {
|
|
59
|
-
livereload({ start: true });
|
|
60
|
-
gulp.watch('src/*.js', ['default']);
|
|
61
|
-
});
|
package/index.html
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<title>Typed.js - Type your heart out</title>
|
|
6
|
-
<script src="./lib/typed.min.js" type="text/javascript"></script>
|
|
7
|
-
<script>
|
|
8
|
-
document.addEventListener('DOMContentLoaded', function(){
|
|
9
|
-
|
|
10
|
-
var typed = new Typed("#typed", {
|
|
11
|
-
stringsElement: 'typed-strings',
|
|
12
|
-
typeSpeed: 40,
|
|
13
|
-
backSpeed: 40,
|
|
14
|
-
backDelay: 500,
|
|
15
|
-
startDelay: 250,
|
|
16
|
-
loop: false,
|
|
17
|
-
shuffle: false,
|
|
18
|
-
fadeOut: false,
|
|
19
|
-
contentType: 'html', // or text
|
|
20
|
-
// defaults to null for infinite loop
|
|
21
|
-
loopCount: Infinity,
|
|
22
|
-
onComplete: function(){ foo(); },
|
|
23
|
-
resetCallback: function() { newTyped(); },
|
|
24
|
-
onTypingPaused: function() { },
|
|
25
|
-
onTypingResumed: function() { }
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
document.querySelector('.toggle').addEventListener('click', function() {
|
|
29
|
-
typed.toggle();
|
|
30
|
-
});
|
|
31
|
-
document.querySelector('.stop').addEventListener('click', function() {
|
|
32
|
-
typed.stop();
|
|
33
|
-
});
|
|
34
|
-
document.querySelector('.start').addEventListener('click', function() {
|
|
35
|
-
typed.start();
|
|
36
|
-
});
|
|
37
|
-
document.querySelector('.reset').addEventListener('click', function() {
|
|
38
|
-
typed.reset();
|
|
39
|
-
});
|
|
40
|
-
document.querySelector('.destroy').addEventListener('click', function() {
|
|
41
|
-
typed.destroy();
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
function newTyped(){ /* A new typed object */ }
|
|
48
|
-
|
|
49
|
-
function foo(){ console.log('Callback'); }
|
|
50
|
-
|
|
51
|
-
</script>
|
|
52
|
-
<link href="main.css" rel="stylesheet"/>
|
|
53
|
-
<style>
|
|
54
|
-
button {
|
|
55
|
-
padding: 10px;
|
|
56
|
-
border-radius: 3px;
|
|
57
|
-
background: #E0E0E0;
|
|
58
|
-
border: #CCC 1px solid;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/* code for animated blinking cursor */
|
|
62
|
-
.typed-cursor{
|
|
63
|
-
opacity: 1;
|
|
64
|
-
font-weight: 100;
|
|
65
|
-
-webkit-animation: blink 0.7s infinite;
|
|
66
|
-
-moz-animation: blink 0.7s infinite;
|
|
67
|
-
-ms-animation: blink 0.7s infinite;
|
|
68
|
-
-o-animation: blink 0.7s infinite;
|
|
69
|
-
animation: blink 0.7s infinite;
|
|
70
|
-
}
|
|
71
|
-
@-webkit-keyframes blink{
|
|
72
|
-
0% { opacity:1; }
|
|
73
|
-
50% { opacity:0; }
|
|
74
|
-
100% { opacity:1; }
|
|
75
|
-
}
|
|
76
|
-
.typed-fade-out{
|
|
77
|
-
opacity: 0;
|
|
78
|
-
animation: 0;
|
|
79
|
-
transition: opacity .25s;
|
|
80
|
-
}
|
|
81
|
-
</style>
|
|
82
|
-
</head>
|
|
83
|
-
<body>
|
|
84
|
-
|
|
85
|
-
<div class="wrap">
|
|
86
|
-
<h1 class="h1">Typed.js</h1>
|
|
87
|
-
|
|
88
|
-
<div class="type-wrap">
|
|
89
|
-
<div id="typed-strings">
|
|
90
|
-
<span>Typed.js^10 is a <strong>JavaScript</strong> library.</span>
|
|
91
|
-
<span>Typed.js is a <strong>ES6</strong> library.</span>
|
|
92
|
-
<p>It <em>types</em> out sentences.</p>
|
|
93
|
-
<p>And then deletes them.</p>
|
|
94
|
-
<p>Try it out!</p>
|
|
95
|
-
</div>
|
|
96
|
-
<span id="typed" style="white-space:pre;"></span><br />
|
|
97
|
-
</div>
|
|
98
|
-
<button class="toggle">Toggle</button>
|
|
99
|
-
<button class="start">Start</button>
|
|
100
|
-
<button class="stop">Stop</button>
|
|
101
|
-
<button class="reset">Reset</button>
|
|
102
|
-
<button class="destroy">Destroy</button>
|
|
103
|
-
|
|
104
|
-
<div class="links">
|
|
105
|
-
<a href="http://www.mattboldt.com/demos/typed-js">View original demo</a> | <a href="http://www.mattboldt.com">View mattboldt.com</a> | <a href="http://www.twitter.com/atmattb">Complain to Matt about how awful this is</a>
|
|
106
|
-
</div>
|
|
107
|
-
</div>
|
|
108
|
-
|
|
109
|
-
</body>
|
|
110
|
-
</html>
|