├── .editorconfig
├── .eslintrc
├── .gitattributes
├── .gitignore
├── .mversionrc
├── .travis.yml
├── CHANGELOG.md
├── LICENSE.md
├── README.md
├── examples
├── index.html
├── index.js
└── main.scss
├── karma.conf.js
├── package.json
├── src
├── Backspace.jsx
├── Cursor.jsx
├── Cursor.scss
├── Delay.jsx
├── Typist.jsx
└── utils.js
├── test
├── Typist.spec.js
├── tests.bundle.js
└── utils.spec.js
├── webpack.config.js
├── webpack.dist.config.js
├── webpack.standalone.config.js
└── yarn.lock
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent
2 | # coding styles between different editors and IDEs
3 | # http://editorconfig.org
4 |
5 | root = true
6 |
7 | [*]
8 |
9 | # Change these settings to your own preference
10 | indent_style = space
11 | indent_size = 2
12 |
13 | # We recommend you to keep these unchanged
14 | end_of_line = lf
15 | charset = utf-8
16 | trim_trailing_whitespace = true
17 | insert_final_newline = true
18 |
19 | [*.md]
20 | trim_trailing_whitespace = false
21 |
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "parser": "babel-eslint",
3 | "extends": "airbnb",
4 | "globals": {
5 | "__DEV__": true
6 | },
7 | "env": {
8 | "browser": true,
9 | "node": true,
10 | "jasmine": true
11 | },
12 | "rules": {
13 | "react/prop-types": [2, {"ignore": ["children"]}],
14 | "eqeqeq": [2, "smart"],
15 | "id-length": [0],
16 | "no-loop-func": [0],
17 | "new-cap": [2, {"capIsNew": false}],
18 | "no-shadow": [1]
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Automatically normalize line endings for all text-based files
2 | # http://git-scm.com/docs/gitattributes#_end_of_line_conversion
3 | * text=auto
4 |
5 | # For the following file types, normalize line endings to LF on
6 | # checkin and prevent conversion to CRLF when they are checked out
7 | # (this is required in order to prevent newline related issues like,
8 | # for example, after the build script is run)
9 | .* text eol=lf
10 | *.css text eol=lf
11 | *.html text eol=lf
12 | *.jade text eol=lf
13 | *.js text eol=lf
14 | *.json text eol=lf
15 | *.less text eol=lf
16 | *.md text eol=lf
17 | *.sh text eol=lf
18 | *.txt text eol=lf
19 | *.xml text eol=lf
20 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 |
6 | # Runtime data
7 | pids
8 | *.pid
9 | *.seed
10 |
11 | # Directory for instrumented libs generated by jscoverage/JSCover
12 | lib-cov
13 |
14 | # Coverage directory used by tools like istanbul
15 | coverage
16 |
17 | # node-waf configuration
18 | .lock-wscript
19 |
20 | # Compiled binary addons (http://nodejs.org/api/addons.html)
21 | build/Release
22 |
23 | # Dependency directory
24 | # https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
25 | node_modules
26 |
27 | tmp
28 | examples/dist
29 | dist
30 |
--------------------------------------------------------------------------------
/.mversionrc:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "precommit": "npm run dist && npm run standalone && git add dist",
4 | "postcommit": "git push origin master --tags && npm publish",
5 | "postupdate": "echo 'Updated to version %s in manifest files'"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: node_js
3 | node_js:
4 | - iojs
5 | - '0.12'
6 | - '0.10'
7 | matrix:
8 | allow_failures:
9 | - node_js: iojs
10 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # React Typist Changelog
2 |
3 | ### v1.1.1 (05/29/17)
4 |
5 | - Fixes
6 | + Updated dist code
7 |
8 | - Development:
9 | + Added dist command to the contribution section
10 | + Added prop-types to package dependencies
11 |
12 |
13 | ### v1.1.0 (03/26/17)
14 |
15 | - Features:
16 | + Add new options: `onCharacterTyped` and `onLineTyped` (#22)
17 |
18 | - Fixes
19 | + Fix text rendering issue in webkit/blink under certain widths (#13)
20 |
21 | - Development:
22 | + Remove bower package
23 |
24 |
25 | ### v1.0.3 (10/29/16)
26 |
27 | - Fixes
28 | + Component no longer sets `isDone` state if unmounted
29 |
30 |
31 | ### v1.0.1 (10/01/16)
32 |
33 | - Fixes
34 | + Move `promise-mock` to `devDependencies`
35 |
36 |
37 | ### v1.0.0 (10/01/16)
38 |
39 | This version should have no breaking changes, but given that we've bumped a
40 | major version of React, we decided to make this release opt-in, in case
41 | unexpected errors occur.
42 |
43 | - Fixes:
44 | + Can now use server rendering
45 | + Component no longer sets state after being unmounted
46 |
47 | - Development:
48 | + Upgrade to React 15
49 | + Upgrade to Babel 6, and other tooling upgrades
50 | + Switch to promises to make code more concise and readable
51 |
52 |
53 | ### v0.3.0 (10/30/15)
54 |
55 | - Features:
56 |
57 | + Typist can now render and animate any React element (not just strings).
58 | + You can now pass new options for the cursor:
59 | + `hideWhenDone`
60 | + `hideWhenDoneDelay`
61 | + Typist now supports a `delayGenerator` function to customize the delay
62 | between keystrokes.
63 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c)
4 |
5 | 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:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | 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.
10 |
11 | Source: http://opensource.org/licenses/MIT
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # React Typist []() []()
2 | React Component for making typing animations. Wrap `Typist` around your text or any
3 | element tree to animate text inside the tree. Easily stylable and highly
4 | configurable.
5 |
6 |
7 | ## Install
8 | ```shell
9 | npm install react-typist --save
10 | ```
11 |
12 |
13 | ## Live Example
14 | * Basic example
15 |
16 |
17 | ## Basic Usage
18 | #### CommonJS Module (using webpack or browserify):
19 | ```jsx
20 | import React, {Component} from 'react';
21 | import Typist from 'react-typist';
22 |
23 | export default class MyComponent extends Component {
24 |
25 | render() {
26 | return (
27 |
28 | Animate this text.
29 |
30 | );
31 | }
32 | }
33 | ```
34 |
35 | #### UMD module:
36 | Include `dist/standalone/Typist.js` into your build, using whatever build tool
37 | or manually entering a `
22 |