Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump up the versions and fix some bugs #83

Merged
merged 6 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,790 changes: 1,899 additions & 1,891 deletions LICENSE-THIRD-PARTY

Large diffs are not rendered by default.

1,057 changes: 461 additions & 596 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"ngx-json-viewer": "^2.4.0",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"xterm": "^5.1.0",
"xterm": "^5.3.0",
"xterm-addon-fit": "^0.8.0",
"xterm-addon-web-links": "^0.9.0",
"zone.js": "~0.11.4"
Expand Down
32 changes: 27 additions & 5 deletions projects/demo/src/app/example.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
SimpleChanges,
} from '@angular/core';
import { Subject } from 'rxjs';
import { NgTerminal } from 'ng-terminal';
import { KindOfCharacterAttributes, NgTerminal } from 'ng-terminal';
import { FormControl } from '@angular/forms';
import { MatSlideToggleChange } from '@angular/material/slide-toggle';
import { Terminal } from 'xterm';
Expand All @@ -20,7 +20,6 @@ import { WebLinksAddon } from 'xterm-addon-web-links';
styleUrls: ['./example.component.css'],
})
export class ExampleComponent implements AfterViewInit {

readonly title = 'NgTerminal Live Example';
readonly color = 'accent';
readonly prompt = '\n' + FunctionsUsingCSI.cursorColumn(1) + '$ ';
Expand All @@ -43,7 +42,6 @@ export class ExampleComponent implements AfterViewInit {

@ViewChild('term', { static: false }) child?: NgTerminal;


ngAfterViewInit() {
if (!this.child) return;
this.underlying = this.child.underlying!!;
Expand All @@ -54,8 +52,32 @@ export class ExampleComponent implements AfterViewInit {
theme: this.baseTheme,
cursorBlink: true,
});
this.child.write('$ NgTerminal Live Example');
this.child.write(this.prompt);
this.child.write(
'$ NgTerminal Live Example\n' + FunctionsUsingCSI.cursorColumn(1)
);
this.child.write(
FunctionsUsingCSI.characterAttributes(
KindOfCharacterAttributes.SetforegroundcolortoRed,
KindOfCharacterAttributes.Bold
)
);
this.child.write(
`$ 1) Try the data binding in the input below.\n` +
FunctionsUsingCSI.cursorColumn(1)
);
this.child.write(FunctionsUsingCSI.characterAttributes(KindOfCharacterAttributes.Normal));
this.child.write(
`$ 2) Try dragging on the ${FunctionsUsingCSI.characterAttributes(KindOfCharacterAttributes.SetbackgroundcolortoGreen)}borders\
${FunctionsUsingCSI.characterAttributes(KindOfCharacterAttributes.Normal)} and set \
${FunctionsUsingCSI.characterAttributes(KindOfCharacterAttributes.SetbackgroundcolortoCyan)}row and\
col${FunctionsUsingCSI.characterAttributes(KindOfCharacterAttributes.Normal)}\
.\n` +
FunctionsUsingCSI.cursorColumn(1)
);
this.child.write(
FunctionsUsingCSI.characterAttributes(KindOfCharacterAttributes.Bold)
);
this.child.write(`$ `);
this.child.onData().subscribe((input) => {
if (!this.child) return;
if (input === '\r') {
Expand Down
10 changes: 5 additions & 5 deletions projects/ng-terminal/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "ng-terminal",
"version": "6.0.2",
"version": "6.0.3",
"description": "NgTerminal is a terminal component on Angular 14 or higher.",
"license": "MIT",
"peerDependencies": {
"@angular/common": "^16.0.0 || ^15.0.0 || ^14.0.0",
"@angular/core": "^16.0.0 || ^15.0.0 || ^14.0.0"
"@angular/common": "^17.0.0 || ^16.0.0 || ^15.0.0 || ^14.0.0",
"@angular/core": "^17.0.0 || ^16.0.0 || ^15.0.0 || ^14.0.0"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -38,8 +38,8 @@
"dependencies": {
"angular-resizable-element": "^5.0.0",
"@juggle/resize-observer": "^3.4.0",
"xterm-addon-fit": "^0.7.0",
"xterm": "^5.1.0",
"xterm-addon-fit": "^0.8.0",
"xterm": "^5.3.0",
"tslib": "^2.3.0"
}
}
Loading