Skip to content

Commit

Permalink
merge with devel
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed May 19, 2023
2 parents ef9b638 + aeb069a commit bdb61f2
Showing 38 changed files with 703 additions and 413 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 2.36.0
### Features
* split_equal accept optional object as 3rd argument with two options `trim` and `keepWords`
* add `--padding` CSS Variable [#874](https://github.com/jcubic/jquery.terminal/issues/874)
* add CSS transition to links [#870](https://github.com/jcubic/jquery.terminal/issues/870)
### Bugfix
* fix leading spaces in text wrapping
* fix glitch in typing animation when text have hyphen
* fix regression in cursor animation color [#869](https://github.com/jcubic/jquery.terminal/issues/869)
* fix `term::geometry()` [#873](https://github.com/jcubic/jquery.terminal/issues/873)
* fix types for `term::push()` [#877](https://github.com/jcubic/jquery.terminal/issues/877)

## 2.35.3
### Bugfix
* fix object returned from the interpreter [#857](https://github.com/jcubic/jquery.terminal/issues/857)
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2011-2022 Jakub T. Jankiewicz
Copyright (c) 2011-2023 Jakub T. Jankiewicz

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ COMMIT=`git log -n 1 | grep '^commit' | sed 's/commit //'`
TOKEN=cat .github.token | tr -d '\n'
URL=`git config --get remote.origin.url`
skip_re="[xfi]it\\(|[fdx]describe\\("
UPDATE_CONTRIBUTORS=0
UPDATE_CONTRIBUTORS=1

.PHONY: coverage test coveralls lint.src eslint skipped_tests jsonlint publish lint tscheck publish-guthub emoji

@@ -71,7 +71,7 @@ Makefile: templates/Makefile.in
$(SED) -e "s/{{VER""SION}}/"$(VERSION)"/" templates/Makefile.in > Makefile

import.html: templates/import.in
$(SED) -e "s/{{BRANCH}}/$(BRANCH)/g" templates/import.in > import.html
$(SED) -e "s/{{BRANCH}}/$(BRANCH_SAFE)/g" templates/import.in > import.html

js/terminal.widget.js: js/terminal.widget.in .$(VERSION)
$(SED) -e "s/{{VER}}/$(VERSION)/g" js/terminal.widget.in > js/terminal.widget.js
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<h1 align="center">
<img src="https://github.com/jcubic/jquery.terminal/blob/master/assets/ascii_art.svg?raw=true&ver=2.35.3"
<img src="https://github.com/jcubic/jquery.terminal/blob/devel/assets/ascii_art.svg?raw=true&ver=DEV"
alt="ASCII Art that represent text jQuery Terminal - JavaScript Library for Web Based Terminal Emulators" />
</h1>

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

[![npm](https://img.shields.io/badge/npm-2.35.3-blue.svg)](https://www.npmjs.com/package/jquery.terminal)
![bower](https://img.shields.io/badge/bower-2.35.3-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&6a28c3fcec066d2f647e95cc485b1277)](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&3e72c4200d7d20c29890a518cd01cd83)](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/)
@@ -87,7 +87,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.35.3](https://jcubic.github.io/jquery.terminal/?ver=2.35.3)
* [https://jcubic.github.io/jquery.terminal/?ver=DEV](https://jcubic.github.io/jquery.terminal/?ver=DEV)

And development version using:

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

```

Then include js/jquery.terminal-2.35.3.min.js and css/jquery.terminal-2.35.3.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.35.3/js/jquery.terminal.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/2.35.3/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.35.3/js/jquery.terminal.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery.terminal@2.35.3/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,
@@ -364,4 +364,4 @@ You can request paid support, you can find details at [support.jcubic.pl](https:

Licensed under [MIT](http://opensource.org/licenses/MIT) license

Copyright (c) 2011-2022 [Jakub T. Jankiewicz](https://jcubic.pl/me)
Copyright (c) 2011-2023 [Jakub T. Jankiewicz](https://jcubic.pl/me)
19 changes: 17 additions & 2 deletions __tests__/terminal.spec.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
* \/ /____/ version {{VER}}
*
* This file is part of jQuery Terminal. http://terminal.jcubic.pl
* Copyright (c) 2010-2022 Jakub T. Jankiewicz <http://jcubic.pl/me>
* Copyright (c) 2010-2023 Jakub T. Jankiewicz <http://jcubic.pl/me>
* Released under the MIT license
*
* Image Credit: Author Peter Hamer, source Wikipedia
@@ -3401,7 +3401,7 @@ describe('Terminal plugin', function() {
});
it('should have signature', function() {
var sig = term.find('.terminal-output div div').map(function() { return $(this).text(); }).get().join('\n');
expect(nbsp(term.signature())).toEqual(sig);
expect(sig).toEqual(nbsp(term.signature()));
});
it('should have default prompt', function() {
var prompt = term.find('.cmd-prompt');
@@ -6409,6 +6409,7 @@ describe('Terminal plugin', function() {
});
describe('exception', function() {
var error = new Error('Some Message');
var get;
var term;
var lines = [
'function foo(a, b) {',
@@ -6421,6 +6422,7 @@ describe('Terminal plugin', function() {
term = $('<div/>').terminal($.noop, {
greetings: false
});
get = $.get;
if (error.stack) {
var length = Math.max.apply(Math, error.stack.split("\n").map(function(line) {
return line.length;
@@ -6430,6 +6432,7 @@ describe('Terminal plugin', function() {
});
afterEach(function() {
term.destroy().remove();
$.get = get;
});
it('should show exception', function() {
term.exception(error, 'ERROR');
@@ -6500,6 +6503,18 @@ describe('Terminal plugin', function() {
done();
}, 10);
});
it('should not resume the terminal', () => {
var error = {
message: 'Some Message',
fileName: 'http://localhost/file.js',
lineNumber: 2
};
term.clear().exception(error, 'foo');
term.clear().pause();
expect(term.paused()).toBe(true);
term.exception(error, 'user');
expect(term.paused()).toBe(true);
});
});
describe('scroll', function() {
var term = $('<div/>').terminal($.noop, {
4 changes: 2 additions & 2 deletions bin/convert.js
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
*
* This file is part of jQuery Terminal. https://terminal.jcubic.pl
*
* Copyright (c) 2010-2022 Jakub T. Jankiewicz <https://jcubic.pl/me>
* Copyright (c) 2010-2023 Jakub T. Jankiewicz <https://jcubic.pl/me>
* Released under the MIT license
*/

@@ -71,7 +71,7 @@ function usage() {
const bin = path.basename(process.argv[1]);
const space = ' '.repeat(bin.length);
console.log('jQuery Terminal utility to convert ANSI escapes');
console.log('Copyright (c) 2010-2022 Jakub T. Jankiewicz');
console.log('Copyright (c) 2010-2023 Jakub T. Jankiewicz');
console.log(`
usage:
${bin} [--help] [-h] [--input] [-i] [- | <file>]
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.

50 changes: 33 additions & 17 deletions css/jquery.terminal-2.35.3.css
Original file line number Diff line number Diff line change
@@ -4,15 +4,15 @@
* __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
* / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
* \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
* \/ /____/ version 2.35.3
* \/ /____/ version DEV
* http://terminal.jcubic.pl
*
* This file is part of jQuery Terminal.
*
* Copyright (c) 2011-2022 Jakub T. Jankiewicz <https://jcubic.pl/me>
* Copyright (c) 2011-2023 Jakub T. Jankiewicz <https://jcubic.pl/me>
* Released under the MIT license
*
* Date: Mon, 06 Feb 2023 20:13:16 +0000
* Date: Tue, 11 Apr 2023 11:28:18 +0000
*/
.terminal .terminal-output .format, .cmd .format,
.cmd-prompt, .cmd-prompt div {
@@ -198,6 +198,11 @@ body.full-screen-terminal .terminal {
color: var(--background, #000) !important;
text-decoration: none;
}
.terminal a[href] {
transition-property: color, background-color;
transition-duration: 0.2s;
transition-timing-function: ease-out;
}
.cmd .cmd-cursor {
display: inline-block;
}
@@ -231,6 +236,9 @@ body.full-screen-terminal .terminal {
.cmd .cmd-prompt > span, .cmd .cmd-prompt:empty {
float: left;
}
.cmd-prompt [data-text] > span {
white-space: pre;
}
.cmd [data-text] span,
.terminal [data-text] span {
display: inline-block;
@@ -393,7 +401,10 @@ terminal .terminal-output > div {
* so span can have --color for selection
*/
.cmd {
--original-color: var(--color, #aaa);
--original-color: var(
--color, #aaa);
--original-background: var(
--background);
}
.cmd a[href] {
--original-color: var(--link-color, #3377FF);
@@ -404,45 +415,45 @@ terminal .terminal-output > div {
background-color: #aaa;
background-color: var(--original-color, #aaa);
color: #000;
color: var(--background, #000);
color: var(--original-background, #000);
-webkit-box-shadow: 0 0 calc(var(--glow) * 3px) var(--color, #aaa);
box-shadow: 0 0 calc(var(--glow) * 3px) var(--color, #aaa);
}
50.1%, 100% {
background-color: inherit;
/* original background is set in emoji that need different style */
color: inherit;
color: var(--original-background, var(--original-color, #aaa));
color: var(--original-color, #aaa)
}
}
@-moz-keyframes terminal-blink {
0%, 50% {
background-color: #aaa;
background-color: var(--original-color, #aaa);
color: #000;
color: var(--background, #000);
color: var(--original-background, #000);
-webkit-box-shadow: 0 0 calc(var(--glow) * 3px) var(--color, #aaa);
box-shadow: 0 0 calc(var(--glow) * 3px) var(--color, #aaa);
}
50.1%, 100% {
background-color: inherit;
color: inherit;
color: var(--original-background, var(--original-color, #aaa));
color: var(--original-color, #aaa);
}
}
@keyframes terminal-blink {
0%, 50% {
background-color: #aaa;
background-color: var(--original-color, #aaa);
color: #000;
color: var(--background, #000);
color: var(--original-background, #000);
-webkit-box-shadow: 0 0 calc(var(--glow) * 3px) var(--color, #aaa);
box-shadow: 0 0 calc(var(--glow) * 3px) var(--color, #aaa);
}
50.1%, 100% {
background-color: inherit;
color: inherit;
color: var(--original-background, var(--original-color, #aaa));
color: var(--original-color, #aaa);
-webkit-box-shadow: none;
box-shadow: none;
}
@@ -453,7 +464,7 @@ terminal .terminal-output > div {
background-color: #aaa;
background-color: var(--original-color, #aaa);
color: #000;
color: var(--background, #000);
color: var(--original-background, #000);
box-shadow: 0 0 3px #aaa;
-webkit-box-shadow: 0 0 3px var(--color, #aaa);
box-shadow: 0 0 3px var(--color, #aaa);
@@ -470,7 +481,7 @@ terminal .terminal-output > div {
background-color: #aaa;
background-color: var(--original-color, #aaa);
color: #000;
color: var(--background, #000);
color: var(--original-background, #000);
box-shadow: 0 0 3px #aaa;
-moz-box-shadow: 0 0 3px var(--color, #aaa);
box-shadow: 0 0 3px var(--color, #aaa);
@@ -487,7 +498,7 @@ terminal .terminal-output > div {
background-color: #aaa;
background-color: var(--original-color, #aaa);
color: #000;
color: var(--background, #000);
color: var(--original-background, #000);
box-shadow: 0 0 3px #aaa;
box-shadow: 0 0 3px var(--color, #aaa);
}
@@ -559,7 +570,7 @@ terminal .terminal-output > div {
background-color: #aaa;
background-color: var(--original-color, #aaa);
color: #000;
color: var(--background, #000);
color: var(--original-background, #000);
-webkit-box-shadow: 0 0 calc(var(--glow) * 3px) var(--color, #aaa);
box-shadow: 0 0 calc(var(--glow) * 3px) var(--color, #aaa);
}
@@ -579,7 +590,7 @@ terminal .terminal-output > div {
background-color: #aaa;
background-color: var(--original-color, #aaa);
color: #000;
color: var(--background, #000);
color: var(--original-background, #000);
-webkit-box-shadow: 0 0 calc(var(--glow) * 3px) var(--color, #aaa);
box-shadow: 0 0 calc(var(--glow) * 3px) var(--color, #aaa);
}
@@ -794,7 +805,7 @@ terminal .terminal-output > div {
box-sizing: border-box;
}
.terminal-scroller, .terminal .terminal-fill, .cmd-editable {
padding: calc(10px / var(--pixel-density, 1));
padding: calc(1px * var(--padding, 10) / var(--pixel-density, 1));
}
.cmd-editable {
padding-top: 0;
@@ -812,7 +823,7 @@ terminal .terminal-output > div {
text-shadow: 0 0 calc(var(--glow) * 5px) var(--color);
}
.terminal .cmd {
margin-bottom: calc(10px / var(--pixel-density, 1));
margin-bottom: calc(1px * var(--padding, 10) / var(--pixel-density, 1));
position: relative;
}
.terminal .partial, .terminal .partial > div {
@@ -960,6 +971,11 @@ terminal .terminal-output > div {
inherits: true;
initial-value: 1;
}
@property --padding {
syntax: '<number>';
inherits: true;
initial-value: 10;
}
@supports (-ms-ime-align:auto) {
.terminal h1::selection,
.terminal h2::selection,
10 changes: 6 additions & 4 deletions css/jquery.terminal-2.35.3.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit bdb61f2

Please sign in to comment.