Skip to content

Commit

Permalink
fix formatting in typing animation #721
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Dec 24, 2021
1 parent acb9915 commit b8ac7e9
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 32 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
@@ -1,10 +1,10 @@
## 2.30.3
## 2.31.0
### Features
* scroll to bottom for each line in multiline typing animation
* allow to use `--glow: 1` with default animation

### Bugfix
* fix prompt that return string or promise (in animation and set_prompt) [#724](https://github.com/jcubic/jquery.terminal/issues/724)
* fix formatting in typing animation [#721](https://github.com/jcubic/jquery.terminal/issues/721)

## 2.30.2
### Bugfix
Expand Down
22 changes: 11 additions & 11 deletions README.md
Expand Up @@ -4,15 +4,15 @@
__ / / // / // / _ / _/ // / / / _ / _/ / / \/ / _ \/ /
/ / / // / // / ___/ // // / / / ___/ // / / / / /\ / // / /__
\___/____ \\__/____/_/ \__ / /_/____/_//_/_/_/_/_/ \/\__\_\___/
\/ /____/ version 2.30.2
\/ /____/ version DEV
```

[JavaScript Library for Web Based Terminal Emulators](https://terminal.jcubic.pl)

[![npm](https://img.shields.io/badge/npm-2.30.2-blue.svg)](https://www.npmjs.com/package/jquery.terminal)
![bower](https://img.shields.io/badge/bower-2.30.2-yellow.svg)
[![Build and test](https://github.com/jcubic/jquery.terminal/actions/workflows/build.yaml/badge.svg?branch=master&event=push)](https://github.com/jcubic/jquery.terminal/actions/workflows/build.yaml)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=master&f89d5d7e8a915c7f958e2407b66acf15)](https://coveralls.io/github/jcubic/jquery.terminal?branch=master)
[![npm](https://img.shields.io/badge/npm-DEV-blue.svg)](https://www.npmjs.com/package/jquery.terminal)
![bower](https://img.shields.io/badge/bower-DEV-yellow.svg)
[![Build and test](https://github.com/jcubic/jquery.terminal/actions/workflows/build.yaml/badge.svg?branch=devel&event=push)](https://github.com/jcubic/jquery.terminal/actions/workflows/build.yaml)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=devel&f89d5d7e8a915c7f958e2407b66acf15)](https://coveralls.io/github/jcubic/jquery.terminal?branch=devel)
![downloads](https://img.shields.io/npm/dm/jquery.terminal.svg?style=flat)
[![Paid Support](https://data.jsdelivr.com/v1/package/npm/jquery.terminal/badge?style=rounded)](https://www.jsdelivr.com/package/npm/jquery.terminal)
[![](https://img.shields.io/badge/paid-support-354465.svg)](https://support.jcubic.pl/)
Expand Down Expand Up @@ -92,7 +92,7 @@ You can test current version at this URL:

or if it doesn't use latest version (because of jsDelivr cache) you can force it with this URL:

* [https://jcubic.github.io/jquery.terminal/?ver=2.30.2](https://jcubic.github.io/jquery.terminal/?ver=2.30.2)
* [https://jcubic.github.io/jquery.terminal/?ver=DEV](https://jcubic.github.io/jquery.terminal/?ver=DEV)

And development version using:

Expand All @@ -110,20 +110,20 @@ Include jQuery library, you can use cdn from https://jquery.com/download/

```

Then include js/jquery.terminal-2.30.2.min.js and css/jquery.terminal-2.30.2.min.css
Then include js/jquery.terminal-DEV.min.js and css/jquery.terminal-DEV.min.css

You can grab the files from CDN:

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/2.30.2/js/jquery.terminal.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/2.30.2/css/jquery.terminal.min.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/DEV/js/jquery.terminal.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/DEV/css/jquery.terminal.min.css" rel="stylesheet"/>
```

or

```html
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal@2.30.2/js/jquery.terminal.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery.terminal@2.30.2/css/jquery.terminal.min.css">
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal@DEV/js/jquery.terminal.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery.terminal@DEV/css/jquery.terminal.min.css">
```

If you always want latest version, you can get it from [unpkg](https://unpkg.com/) without specifying version,
Expand Down
2 changes: 1 addition & 1 deletion css/emoji.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions js/jquery.terminal-2.30.2.js
Expand Up @@ -4,7 +4,7 @@
* __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
* / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
* \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
* \/ /____/ version 2.30.2
* \/ /____/ version DEV
*
* This file is part of jQuery Terminal. https://terminal.jcubic.pl
*
Expand Down Expand Up @@ -41,7 +41,7 @@
*
* broken image by Sophia Bai from the Noun Project (CC-BY)
*
* Date: Thu, 23 Dec 2021 19:29:33 +0000
* Date: Fri, 24 Dec 2021 21:35:49 +0000
*/
/* global define, Map */
/* eslint-disable */
Expand Down Expand Up @@ -5129,8 +5129,8 @@
}
// -------------------------------------------------------------------------
$.terminal = {
version: '2.30.2',
date: 'Thu, 23 Dec 2021 19:29:33 +0000',
version: 'DEV',
date: 'Fri, 24 Dec 2021 21:35:49 +0000',
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down Expand Up @@ -8802,6 +8802,7 @@
// ---------------------------------------------------------------------
function typed(finish_typing_fn) {
return function typing_animation(message, options) {
var formattted = $.terminal.apply_formatters(message);
animating = true;
var prompt = self.get_prompt();
var char_i = 0;
Expand All @@ -8815,7 +8816,7 @@
}
var bottom = self.is_bottom();
var interval = setInterval(function() {
var chr = $.terminal.substring(message, char_i, char_i + 1);
var chr = $.terminal.substring(formattted, char_i, char_i + 1);
new_prompt += chr;
self.set_prompt(new_prompt);
if (chr === '\n' && bottom) {
Expand Down
6 changes: 3 additions & 3 deletions js/jquery.terminal-2.30.2.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion js/jquery.terminal-src.js
Expand Up @@ -8802,6 +8802,7 @@
// ---------------------------------------------------------------------
function typed(finish_typing_fn) {
return function typing_animation(message, options) {
var formattted = $.terminal.apply_formatters(message);
animating = true;
var prompt = self.get_prompt();
var char_i = 0;
Expand All @@ -8815,7 +8816,7 @@
}
var bottom = self.is_bottom();
var interval = setInterval(function() {
var chr = $.terminal.substring(message, char_i, char_i + 1);
var chr = $.terminal.substring(formattted, char_i, char_i + 1);
new_prompt += chr;
self.set_prompt(new_prompt);
if (chr === '\n' && bottom) {
Expand Down
11 changes: 6 additions & 5 deletions js/jquery.terminal.js
Expand Up @@ -4,7 +4,7 @@
* __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
* / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
* \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
* \/ /____/ version 2.30.2
* \/ /____/ version DEV
*
* This file is part of jQuery Terminal. https://terminal.jcubic.pl
*
Expand Down Expand Up @@ -41,7 +41,7 @@
*
* broken image by Sophia Bai from the Noun Project (CC-BY)
*
* Date: Thu, 23 Dec 2021 19:29:33 +0000
* Date: Fri, 24 Dec 2021 21:35:49 +0000
*/
/* global define, Map */
/* eslint-disable */
Expand Down Expand Up @@ -5129,8 +5129,8 @@
}
// -------------------------------------------------------------------------
$.terminal = {
version: '2.30.2',
date: 'Thu, 23 Dec 2021 19:29:33 +0000',
version: 'DEV',
date: 'Fri, 24 Dec 2021 21:35:49 +0000',
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down Expand Up @@ -8802,6 +8802,7 @@
// ---------------------------------------------------------------------
function typed(finish_typing_fn) {
return function typing_animation(message, options) {
var formattted = $.terminal.apply_formatters(message);
animating = true;
var prompt = self.get_prompt();
var char_i = 0;
Expand All @@ -8815,7 +8816,7 @@
}
var bottom = self.is_bottom();
var interval = setInterval(function() {
var chr = $.terminal.substring(message, char_i, char_i + 1);
var chr = $.terminal.substring(formattted, char_i, char_i + 1);
new_prompt += chr;
self.set_prompt(new_prompt);
if (chr === '\n' && bottom) {
Expand Down
6 changes: 3 additions & 3 deletions js/jquery.terminal.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/jquery.terminal.min.js.map

Large diffs are not rendered by default.

0 comments on commit b8ac7e9

Please sign in to comment.