Skip to content
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
13 changes: 6 additions & 7 deletions jsdoc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"source": {
"include": [
"src/xterm.js",
"src/handlers/Clipboard.js",
"addons/attach/attach.js",
"addons/fit/fit.js",
"addons/fullscreen/fullscreen.js",
"addons/linkify/linkify.js"
]
"src/"
],
"exclude": [
"src/test/"
],
"excludePattern": "src/.+\\.test\\.(js|ts)$"
},
"opts": {
"readme": "README.md",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"express": "4.13.4",
"express-ws": "2.0.0-rc.1",
"glob": "^7.0.5",
"jsdoc": "3.4.0",
"jsdoc": "3.4.3",
"mocha": "2.5.3",
"nodemon": "1.10.2",
"pty.js": "0.3.1",
Expand Down
3 changes: 1 addition & 2 deletions src/CompositionHelper.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/**
* xterm.js: xterm, in the browser
* Copyright (c) 2014-2016, SourceLair Private Company (www.sourcelair.com (MIT License)
* @license MIT
*/

import { ITerminal } from './Interfaces';
Expand Down
3 changes: 1 addition & 2 deletions src/EventEmitter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/**
* xterm.js: xterm, in the browser
* Copyright (c) 2014-2016, SourceLair Private Company (www.sourcelair.com (MIT License)
* @license MIT
*/

function EventEmitter() {
Expand Down
3 changes: 1 addition & 2 deletions src/Interfaces.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/**
* xterm.js: xterm, in the browser
* Copyright (c) 2014-2016, SourceLair Private Company (www.sourcelair.com (MIT License)
* @license MIT
*/

export interface ITerminal {
Expand Down
3 changes: 1 addition & 2 deletions src/Viewport.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/**
* xterm.js: xterm, in the browser
* Copyright (c) 2014-2016, SourceLair Private Company (www.sourcelair.com (MIT License)
* @license MIT
*/

import { ITerminal } from './Interfaces';
Expand Down
16 changes: 4 additions & 12 deletions src/addons/attach/attach.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
/*
* Implements the attach method, that
* attaches the terminal to a WebSocket stream.
*
* The bidirectional argument indicates, whether the terminal should
* send data to the socket as well and is true, by default.
/**
* Implements the attach method, that attaches the terminal to a WebSocket stream.
* @module xterm/addons/attach/attach
* @license MIT
*/

(function (attach) {
Expand All @@ -26,12 +24,6 @@
})(function (Xterm) {
'use strict';

/**
* This module provides methods for attaching a terminal to a WebSocket
* stream.
*
* @module xterm/addons/attach/attach
*/
var exports = {};

/**
Expand Down
25 changes: 10 additions & 15 deletions src/addons/fit/fit.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/*
* Fit terminal columns and rows to the dimensions of its
* DOM element.
/**
* Fit terminal columns and rows to the dimensions of its DOM element.
*
* Approach:
* - Rows: Truncate the division of the terminal parent element height
* by the terminal row height
* ## Approach
* - Rows: Truncate the division of the terminal parent element height by the terminal row height.
*
* - Columns: Truncate the division of the terminal parent element width by
* the terminal character width (apply display: inline at the
* terminal row and truncate its width with the current number
* of columns)
* - Columns: Truncate the division of the terminal parent element width by the terminal character
* width (apply display: inline at the terminal row and truncate its width with the current
* number of columns).
* @module xterm/addons/fit/fit
* @license MIT
*/

(function (fit) {
if (typeof exports === 'object' && typeof module === 'object') {
/*
Expand All @@ -29,11 +29,6 @@
fit(window.Terminal);
}
})(function (Xterm) {
/**
* This module provides methods for fitting a terminal's size to a parent container.
*
* @module xterm/addons/fit/fit
*/
var exports = {};

exports.proposeGeometry = function (term) {
Expand Down
18 changes: 8 additions & 10 deletions src/addons/fullscreen/fullscreen.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
/*
/**
* Fullscreen addon for xterm.js
*
* Implements the toggleFullscreen function.
*
* If the `fullscreen` argument has been supplied, then
* if it is true, the fullscreen mode gets turned on,
* if it is false or null, the fullscreen mode gets turned off.
*
* If the `fullscreen` argument has not been supplied, the
* fullscreen mode is being toggled.
* @module xterm/addons/fullscreen/fullscreen
* @license MIT
*/
(function (fullscreen) {
if (typeof exports === 'object' && typeof module === 'object') {
Expand All @@ -30,6 +23,11 @@
})(function (Xterm) {
var exports = {};

/**
* Toggle the given terminal's fullscreen mode.
* @param {Xterm} term - The terminal to toggle full screen mode
* @param {boolean} fullscreen - Toggle fullscreen on (true) or off (false)
*/
exports.toggleFullScreen = function (term, fullscreen) {
var fn;

Expand Down
12 changes: 6 additions & 6 deletions src/addons/linkify/linkify.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Methods for turning URL subscrings in the terminal's content into links (`a` DOM elements).
* @module xterm/addons/linkify/linkify
* @license MIT
*/

(function (linkify) {
if (typeof exports === 'object' && typeof module === 'object') {
/*
Expand All @@ -18,12 +24,6 @@
})(function (Xterm) {
'use strict';

/**
* This module provides methods for convertings valid URL substrings
* into HTML anchor elements (links), inside a terminal view.
*
* @module xterm/addons/linkify/linkify
*/
var exports = {},
protocolClause = '(https?:\\/\\/)',
domainCharacterSet = '[\\da-z\\.-]+',
Expand Down
15 changes: 4 additions & 11 deletions src/addons/terminado/terminado.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/*
* Implements the attach method that
* attaches the terminal to a Terminado WebSocket stream.
/**
* This module provides methods for attaching a terminal to a terminado WebSocket stream.
*
* The bidirectional argument indicates, whether the terminal should
* send data to the socket as well and is true, by default.
* @module xterm/addons/terminado/terminado
* @license MIT
*/

(function (attach) {
Expand All @@ -26,12 +25,6 @@
})(function (Xterm) {
'use strict';

/**
* This module provides methods for attaching a terminal to a WebSocket
* stream.
*
* @module xterm/addons/attach/attach
*/
var exports = {};

/**
Expand Down
10 changes: 3 additions & 7 deletions src/handlers/Clipboard.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
/**
* xterm.js: xterm, in the browser
* Copyright (c) 2016, SourceLair Private Company <www.sourcelair.com> (MIT License)
*/

/**
* Clipboard handler module. This module contains methods for handling all
* clipboard-related events appropriately in the terminal.
* Clipboard handler module: exports methods for handling all clipboard-related events in the
* terminal.
* @module xterm/handlers/Clipboard
* @license MIT
*/

/**
Expand Down
9 changes: 2 additions & 7 deletions src/utils/Browser.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
/**
* xterm.js: xterm, in the browser
* Copyright (c) 2016, SourceLair Private Company <www.sourcelair.com> (MIT License)
*/

/**
* Browser utilities module. This module contains attributes and methods to help with
* identifying the current browser and platform.
* Attributes and methods to help with identifying the current browser and platform.
* @module xterm/utils/Browser
* @license MIT
*/

import { contains } from './Generic.js';
Expand Down
9 changes: 2 additions & 7 deletions src/utils/Generic.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
/**
* xterm.js: xterm, in the browser
* Copyright (c) 2016, SourceLair Private Company <www.sourcelair.com> (MIT License)
*/

/**
* Generic utilities module. This module contains generic methods that can be helpful at
* different parts of the code base.
* Generic utilities module with methods that can be helpful at different parts of the code base.
* @module xterm/utils/Generic
* @license MIT
*/

/**
Expand Down
23 changes: 1 addition & 22 deletions src/xterm.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,13 @@
/**
* xterm.js: xterm, in the browser
* Copyright (c) 2014-2014, SourceLair Private Company <www.sourcelair.com> (MIT License)
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
* https://github.com/chjj/term.js
*
* 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:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* 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.
*
* Originally forked from (with the author's permission):
* Fabrice Bellard's javascript vt100 for jslinux:
* http://bellard.org/jslinux/
* Copyright (c) 2011 Fabrice Bellard
* The original design remains. The terminal itself
* has been extended to include xterm CSI codes, among
* other features.
* @license MIT
*/

import { CompositionHelper } from './CompositionHelper.js';
Expand Down