Compare commits

..
1324 Commits
Author SHA1 Message Date
Paris Kasidiaris 7c3bf3a130 Bump version to 3.5.0
Signed-off-by: Paris Kasidiaris <paris@sourcelair.com>
2018-07-10 16:01:25 +00:00
Daniel Imms 5620da49d8 Merge pull request #1553 from Tyriar/1552_selection_state
Include ydisp in selection state
2018-07-06 10:18:06 -07:00
Daniel Imms 3c8f336689 Include ydisp in selection state
Fixes #1552
2018-07-06 09:53:45 -07:00
Daniel Imms f1c9d37c83 Merge pull request #1547 from Tyriar/remove_parser
Remove the old parser
2018-07-05 07:40:15 -07:00
Daniel Imms 08603c7975 Merge branch 'master' into remove_parser 2018-07-05 07:40:06 -07:00
Daniel Imms 318dc6fcf6 Merge pull request #1537 from Tyriar/fix_typo
Fix typo
2018-07-05 07:39:48 -07:00
Daniel Imms 68adadf3f4 Remove the old parser 2018-07-04 10:34:53 -07:00
Daniel Imms 73bc1c577a Merge pull request #1503 from Tyriar/998_mouse_off
Nullify and remove mouse handlers when mouse move it exited
2018-07-02 13:25:36 -07:00
Daniel Imms aec4c908d3 Merge remote-tracking branch 'origin/master' into 998_mouse_off 2018-07-02 13:22:28 -07:00
Daniel Imms 9aad2f7ca5 Merge pull request #1543 from nikonso/fix-SelectionRenderLayer-state
Fix SelectionRenderLayer._state
2018-07-02 09:23:01 -07:00
Daniel Imms af9d17760d Make columnSelectMode mandatory 2018-07-02 09:22:38 -07:00
Daniel Imms 4557f857f7 Merge pull request #1542 from nikonso/recreate-terminal
Add recreate terminal after disposing to the demo
2018-07-02 09:13:16 -07:00
Bruno Ribeito ed58c42513 Fix actions and styles 2018-07-01 22:50:08 +01:00
Bruno Ribeito 7e393dfa8c Move logic to helper function 2018-07-01 22:24:51 +01:00
Bruno Ribeiro 0a70b182a7 Merge branch 'master' into recreate-terminal 2018-07-01 20:35:15 +01:00
Bruno Ribeito 932a8d5028 Fix SelectionRenderLayer._state 2018-07-01 19:26:50 +01:00
Bruno Ribeito 054592520e Add recreate terminal after disposing to the demo 2018-07-01 18:56:58 +01:00
Daniel Imms 38debf77f8 Merge pull request #1538 from vsinha/column-select
Support for column/box selection
2018-06-30 10:20:38 -07:00
Daniel Imms 117c79e4e7 Polish 2018-06-30 10:11:48 -07:00
Viraj Sinha 3a4ad37177 Added mac platform check before we try to use mac specific config var 2018-06-29 20:19:18 -07:00
Viraj Sinha ace612e575 Fixes for merging column select 2018-06-29 20:15:17 -07:00
Daniel Imms e628a9be76 Fix emoji test 2018-06-29 11:25:17 -07:00
Daniel Imms 835d5a16ea Fix build after merge 2018-06-29 11:17:45 -07:00
Viraj Sinha 169cbb3fca Merge branch 'master' into column-select 2018-06-28 15:59:27 -07:00
Viraj Sinha 2669576b6c Adds a toggle to disable column selections on mac 2018-06-28 15:56:25 -07:00
Viraj Sinha 3202ddc96d Adds support for column selections if holding alt on mac and shift on windows/linux 2018-06-28 15:55:44 -07:00
Daniel Imms 35ee3610f7 Add missing new line back 2018-06-28 13:25:54 -07:00
Daniel Imms 45f5a710d6 Merge branch 'master' into fix_typo 2018-06-28 13:25:12 -07:00
Daniel Imms 1395b0f03c Merge pull request #1525 from Tyriar/1518_memory
Ensure all references are released when Terminal.dispose is called
2018-06-28 13:21:27 -07:00
Daniel Imms 38efb1a02d Merge branch 'master' into fix_typo 2018-06-28 13:00:34 -07:00
Daniel Imms 22308fb37c Fix typo 2018-06-28 12:59:53 -07:00
Daniel Imms 100143bd02 Merge branch 'master' into 1518_memory 2018-06-28 10:29:07 -07:00
Daniel Imms 8c20a2e26b Merge pull request #1535 from 7PH/master
#1532: 'Reset to Initial State' (RIS) escape sequence no longer makes the cursor disappear
2018-06-27 07:09:49 -07:00
Daniel Imms e24dca3e29 Send mousemove events when x10Mouse is true 2018-06-26 07:26:14 -07:00
7PH 218a4014c7 #1532: Add test to ensure terminal reset does not display cursor if hidden before 2018-06-26 10:42:08 +02:00
7PH 0ad7b8e27b #1532: Add test to ensure terminal reset does not affect cursorState 2018-06-26 10:36:11 +02:00
7PH f1504e5c0f #1532: Terminal reset does not affect cursorState anymore 2018-06-26 10:33:46 +02:00
Daniel Imms f0d872f7fe Merge pull request #1531 from Tyriar/pin_notepty
Pin node-pty to 0.7.6
2018-06-25 11:38:34 -07:00
Daniel Imms ff18b193eb Pin node-pty to 0.7.6 2018-06-25 11:28:09 -07:00
Daniel Imms 8ae8705ae6 Fix typo 2018-06-25 11:21:00 -07:00
Daniel Imms d585515de1 Move RenderDebouncer and ScreenDprMonitor into ui 2018-06-23 17:34:01 +10:00
Daniel Imms 8dda3e68f8 MOve CharMeasure into ui/ 2018-06-23 17:32:32 +10:00
Daniel Imms 4c7e5d2201 Move CircularList to common (tests in ui/ need) 2018-06-23 17:27:34 +10:00
Daniel Imms cc41fefe31 Move MouseZoneManager into ui/ 2018-06-23 17:25:07 +10:00
Daniel Imms 9a3751d7fb Merge pull request #1522 from 7PH/master
#1521: VT100 escape codes DECSC and DECRC now handle character attributes
2018-06-22 07:36:42 +10:00
PowerHat 64b0a9482c Merge branch 'master' into master 2018-06-21 11:35:01 +02:00
Daniel Imms 221a4353a4 Merge pull request #1524 from Tyriar/tyriar/1523
Make sure DOM renderer doesn't render cells beyond cols
2018-06-21 19:22:39 +10:00
Daniel Imms 989c24cbc3 Merge pull request #1513 from Tyriar/ensure_setting_redraws
Ensure drawBoldTextInBrightColors redraws screen
2018-06-21 19:06:00 +10:00
7PH 654f4bd5ae Merge branch 'master' of https://github.com/7PH/xterm.js 2018-06-21 09:22:41 +02:00
7PH 43ffa957ab #1521: fixed default value of 'Terminal.curAttr' when restoring a not previously saved cursor state 2018-06-21 09:22:17 +02:00
Daniel Imms a9a506f7db Merge branch 'master' into 998_mouse_off 2018-06-21 14:35:09 +10:00
Daniel Imms 6e71fb0fb8 Merge branch 'master' into ensure_setting_redraws 2018-06-21 14:33:42 +10:00
Daniel Imms 4d52cd3c66 Clean reference to custom key event handler on dispose 2018-06-21 14:14:36 +10:00
Daniel Imms 27b1c89f43 More cleaning up of references 2018-06-21 11:48:53 +10:00
Daniel Imms 867ce262e8 Fix test 2018-06-21 11:15:10 +10:00
Daniel Imms 45e4486bf5 Remove on, off, globalOn 2018-06-21 11:10:55 +10:00
Daniel Imms 545d0782c9 Properly register and dispose of majority of remaining listeners 2018-06-21 11:07:29 +10:00
Daniel Imms ede1d5f7c8 Correctly dispose of Renderer and ScreenDprMonitor 2018-06-21 10:49:03 +10:00
Daniel Imms 5adf962eb5 Dispose of attach addon event listeners 2018-06-21 10:39:52 +10:00
Daniel Imms 9293616f02 Add dispose terminal button to demo 2018-06-21 10:32:58 +10:00
Daniel Imms 7e779cd195 Replace _disposables with Disposable, add jsdoc 2018-06-21 10:29:02 +10:00
Daniel Imms dfd17be8bb Introduce Disposable abstract class 2018-06-21 10:24:37 +10:00
Daniel Imms a44f496ec7 Rename dom listener function for better clarity 2018-06-21 10:05:40 +10:00
Daniel Imms c0f4a8eb7c Move Dom listener helper to ui/
Part of #1518
2018-06-21 10:03:53 +10:00
Daniel Imms 086b2c04e0 Make sure DOM renderer doesn't render cells beyond cols
Fixes #1523
2018-06-20 23:02:05 +10:00
PowerHat 4809b04f26 Merge branch 'master' into master 2018-06-20 14:51:52 +02:00
7PH 4fecf05dab #1521: added unit tests for saving & restoring cursor attributes 2018-06-20 14:31:12 +02:00
7PH 285b0b6702 #1521: added 'savedCurAttr' attribute to 'MockInputHandlingTerminal' class 2018-06-20 14:23:05 +02:00
Benjamin Raymond a1b8f96d50 #1521: added default behavior of 'ESC 8' escape sequence (DECRC) when cursor state was never saved before using 'ESC 7' (DECSC) 2018-06-20 14:04:13 +02:00
Benjamin Raymond c345dba591 #1521: added 'savedCurAttr' property in 'Terminal' class which holds the saved state of the character attributes ('ESC 7' escape sequence code) 2018-06-20 13:58:53 +02:00
Benjamin Raymond 8dcb4698d3 #1521: now saving and restoring characters attributes when using ANSI escape sequences 'ESC 7' (DECSC) and 'ESC 8' (DECRC) 2018-06-20 13:57:42 +02:00
Daniel Imms f9bc3c511b Merge pull request #1508 from Tyriar/layering
Start of improved layering
2018-06-20 21:35:51 +10:00
Daniel Imms 0d0f4b048c Merge branch 'master' into layering 2018-06-20 21:25:58 +10:00
Daniel Imms 91cf9e1ba8 Move .strings to public/ 2018-06-20 19:46:04 +10:00
Daniel Imms 5d05c3a5f3 Merge pull request #1517 from JonKohler/patch-1
Sort asending for companies in readme and add Nutanix
2018-06-20 07:40:13 +10:00
Jon Kohler 628e648b57 Update README.md
Update readme and add note for future adders to append to the bottom of list
2018-06-18 22:28:25 -04:00
Jon Kohler 72bb1b030a Sort asending for companies in readme and add Nutanix
Sorted the company list in the readme asending and added Nutanix to the list of users
2018-06-18 10:05:40 -04:00
Daniel Imms 6c6d90a698 Merge branch 'master' into layering 2018-06-13 12:52:43 +02:00
Daniel Imms 356959e338 Merge pull request #1512 from Tyriar/1511_npe_beginFrame
Add a null check to charatlas beginFrame call
2018-06-12 18:02:21 +02:00
Daniel Imms 6c3b6b4655 Ensure drawBoldTextInBrightColors redraws screen 2018-06-12 17:54:26 +02:00
Daniel Imms ee935cc68c Add a null check to charatlas beginFrame call
Fixes #1511
2018-06-12 17:27:36 +02:00
Daniel Imms 57959249d8 Resolve todos 2018-06-12 17:17:21 +02:00
Daniel Imms bb4db71958 Rename base/ to common/ 2018-06-12 17:07:43 +02:00
Daniel Imms 8c3376911f Fix winptyCompat compile 2018-06-12 17:05:13 +02:00
Daniel Imms 1487b8d02d Merge pull request #1510 from FGasper/cpanel_whm_real_world
Add cPanel & WHM to the Real-World Uses list.
2018-06-12 10:25:10 +02:00
Felipe Gasper 3705d8159d Add cPanel & WHM to the Real-World Uses list. 2018-06-11 16:51:07 -04:00
Daniel Imms 6a3ed43ad2 Move EscapeSequences into base 2018-06-10 16:56:29 +01:00
Daniel Imms 12e7f80037 Move Charsets to core 2018-06-10 16:53:28 +01:00
Daniel Imms 410d506f34 Fix applyAddon test 2018-06-10 16:44:50 +01:00
Daniel Imms d29a527724 Introduce the public module 2018-06-10 16:40:36 +01:00
Daniel Imms 20307ef637 Add tests for mobile key events 2018-06-10 12:43:22 +02:00
Daniel Imms 95217ca931 Remove core/input/Keyboard's dep on Terminal 2018-06-10 12:33:50 +02:00
Daniel Imms b4ccbe042b Pull keyboard event translation into core 2018-06-10 11:52:25 +02:00
Daniel Imms e167686b6d Remove conversion step, KeyboardEvent implements IKeyboardEvent 2018-06-10 11:45:50 +02:00
Daniel Imms b6481f120b Introduce IKeyEvent 2018-06-10 11:03:37 +02:00
Daniel Imms fb63b3475b Merge pull request #1501 from Tyriar/issue_template
Add more granular github issue templates
2018-06-09 17:02:36 +02:00
Daniel Imms 2f1c1cd172 Remove old issue template 2018-06-09 17:01:37 +02:00
Daniel Imms 03e31571a9 Merge pull request #1497 from xtermjs/Tyriar-patch-1
Fix copyright line breaks
2018-06-09 17:00:24 +02:00
Daniel Imms c6370ba0cf Merge pull request #1472 from Tyriar/fix_tsconfig
Fix valid lib values in tsconfig
2018-06-09 17:00:05 +02:00
Daniel Imms 432c2cc369 Nullify and remove mouse handlers when mouse move it exited
Fixes #998
2018-06-08 17:36:04 +02:00
Daniel Imms 3637b83bbb Add more granular github issue templates 2018-06-08 09:04:37 +02:00
Daniel Imms ddc9466916 Merge pull request #1500 from Tyriar/coc
Add a code of conduct
2018-06-08 08:55:21 +02:00
Daniel Imms df9d20bfdc Add a code of conduct 2018-06-08 08:54:29 +02:00
Daniel Imms e9af4d0e80 Fix copyright line breaks 2018-06-07 09:22:14 +02:00
Daniel Imms f38a34c6da Merge pull request #1495 from nikonso/passive-events
Explicitly  mark Event Listeners as not passive
2018-06-06 10:04:39 +02:00
Daniel Imms 41b5fd8ddf Merge branch 'master' into passive-events 2018-06-06 09:57:42 +02:00
Daniel Imms 22ef5661eb Merge pull request #1388 from Tyriar/script_improvements
Improved test related npm scripts
2018-06-06 09:23:20 +02:00
Daniel Imms 4e2c30c81d Pin @types/jsdom 2018-06-06 09:09:40 +02:00
Bruno Ribeito 8f91e3bcde Fix #829 2018-06-06 08:02:26 +01:00
Daniel Imms 5aff7c2c1e Update @types/jsdom 2018-06-06 08:47:08 +02:00
Daniel Imms b4bb433c1b Add coveralls 2018-06-06 07:44:09 +02:00
Daniel Imms c405b58456 Merge branch 'master' into script_improvements 2018-06-06 05:45:16 +02:00
Daniel Imms 445689c679 Merge pull request #1494 from svenstaro/patch-1
Add genact
2018-06-06 04:23:48 +02:00
Sven-Hendrik Haase 1c0d7771d7 Add genact
genact uses xterm.js!
2018-06-05 20:58:39 +02:00
Daniel Imms a8964a15dd Merge pull request #1491 from pro-src/master
Fix typo in README.md
2018-06-05 08:36:42 +02:00
pro-src bdfdcf3508 Fix typo in README.md 2018-06-04 14:39:47 -05:00
Daniel Imms 0276ab4f85 Merge pull request #1489 from nikonso/master
Fix npm start on windows
2018-06-03 19:10:16 -07:00
Daniel Imms f83394b0ab Merge pull request #1490 from nikonso/fix-demo-string-options
Fix Demo String Options
2018-06-03 19:09:23 -07:00
Bruno Ribeito 13d5ad6506 Fix Demo String Options 2018-06-03 19:53:51 +01:00
Bruno Ribeito 7751933c8c Fix npm start on windows 2018-06-03 19:37:49 +01:00
Daniel Imms 42d7d3aefc Merge pull request #1488 from Tyriar/all_options
Add all options to demo in a way that makes it easy to maintain
2018-06-03 07:51:14 -07:00
Daniel Imms 0f488e59d7 Merge branch 'master' into all_options 2018-06-03 07:43:27 -07:00
Daniel Imms 1066816142 Merge pull request #1474 from Tyriar/1473_slow_build
Use incremental tsc builds
2018-06-03 07:42:27 -07:00
Daniel Imms 6e3c16a2c2 Merge branch 'master' into 1473_slow_build 2018-06-03 07:39:19 -07:00
Daniel Imms 3d56b152f3 Merge pull request #1421 from Tyriar/more_naming_conventions
Add remaining naming conventions into tslint
2018-06-03 07:39:03 -07:00
Daniel Imms 24fad1126c Add missing renames 2018-06-03 16:34:12 +02:00
Daniel Imms 53463681de Fix lint 2018-06-03 16:25:32 +02:00
Daniel Imms 2aff2eb710 Merge branch 'master' into more_naming_conventions 2018-06-03 07:23:14 -07:00
Daniel Imms c748b02111 Add rendererType 2018-06-03 16:21:23 +02:00
Daniel Imms 73e35b9293 Merge branch 'master' into all_options 2018-06-03 07:19:51 -07:00
Daniel Imms 1cccec6398 Merge pull request #1432 from Tyriar/1360_dom_renderer
Implement a fallback DOM renderer
2018-06-03 07:19:33 -07:00
Daniel Imms 1ca6e51564 Fix lint 2018-06-03 16:06:45 +02:00
Daniel Imms 52be55852e Merge branch 'master' into 1360_dom_renderer 2018-06-03 06:58:08 -07:00
Daniel Imms 824a03e0af Merge branch 'master' into 1473_slow_build 2018-06-03 06:43:42 -07:00
Daniel Imms 3c02c9ce66 Merge pull request #1457 from Tyriar/vsts
Add VSTS build badge
2018-06-03 06:41:50 -07:00
Daniel Imms adb0cf41ab Improve display of options 2018-06-03 15:37:01 +02:00
Daniel Imms de683b35b2 Merge pull request #1485 from Tyriar/664_fit_readme
Add basic fit readme
2018-06-03 06:13:30 -07:00
Daniel Imms 767e3570ac Merge pull request #1486 from Tyriar/1456_triple_click_wrapped
Select entire wrapped line on triple click
2018-06-03 06:10:22 -07:00
Daniel Imms 75a45808c3 Merge branch 'master' into 1456_triple_click_wrapped 2018-06-03 06:04:41 -07:00
Daniel Imms 7ca6873a5e Merge pull request #1487 from Tyriar/no_implicit_any
Enable noImplicitAny compiler option
2018-06-03 06:03:37 -07:00
Daniel Imms 908b06cfa7 Some polish 2018-06-03 11:18:34 +01:00
Daniel Imms 2d786910c8 Correctly set cols/rows 2018-06-03 11:10:11 +01:00
Daniel Imms 5b04451b05 console error on setting ctor only option via setOption 2018-06-03 11:02:39 +01:00
Daniel Imms 4d5e305a25 Generate inputs for all options in demo 2018-06-03 10:37:20 +01:00
Daniel Imms 4dff828374 Add @types/glob 2018-06-03 07:15:45 +01:00
Daniel Imms fea8ba03b8 Finish removing all implicit anys 2018-06-02 19:02:54 -07:00
Daniel Imms 918ee16f86 Don't set options on terminaol object itself 2018-06-02 18:47:04 -07:00
Daniel Imms b79ab7212c Remove a bunch of implicit anys 2018-06-02 18:39:05 -07:00
Daniel Imms 956b773421 Add more tests, fix boundary bug 2018-06-02 18:07:49 -07:00
Daniel Imms cd3418517e Select the whole wrapped line when triple clicking
Fixes #1456
2018-06-02 17:56:44 -07:00
Daniel Imms 285911cd98 Implement IBuffer.getWrappedRangeForLine
Part of #1456
2018-06-02 17:53:35 -07:00
Daniel Imms 5acc45f08b Add basic fit readme
Fixes #664
2018-06-02 12:22:05 -07:00
Daniel Imms c192a27d93 Merge pull request #1483 from AndrienkoAleksandr/littleFix
Minor: clean up build logs for source code without tests.
2018-06-01 09:12:05 -07:00
Daniel Imms d5af79fc5f Include typings in addons as well 2018-06-01 08:55:22 -07:00
Oleksandr Andriienko 90b9a487cd Minor: clean up build logs for source code without tests.
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
2018-06-01 13:41:35 +03:00
Daniel Imms 4617bab3a0 Merge pull request #1477 from lgeiger/let-const
Prefer const vs let for variables that are only declared once
2018-05-30 11:31:24 -07:00
Lukas Geiger 8989a09853 Prefer const vs let for variables that are only declared once
Requires that variable declarations use `const` instead of `let` and `var` if possible.

This is mostly for code readability, performance wins are debatable.
2018-05-30 19:47:28 +02:00
Daniel Imms 4a4a17966a Merge pull request #1475 from cathy-zhao/master
add a project to real-world uses list
2018-05-29 06:24:24 -07:00
赵雪珂 7db0b181bc add a project to real-world uses list 2018-05-29 13:03:48 +08:00
Daniel Imms 3ce71b7f8f Add css copy tasks 2018-05-28 05:49:47 -07:00
Daniel Imms c2568a6857 Fix Windows build 2018-05-28 05:44:15 -07:00
Daniel Imms 834b266b7f Move demo build into npm start 2018-05-27 07:59:44 -07:00
Daniel Imms 5d9b761f33 Merge branch 'master' into 1473_slow_build 2018-05-27 07:57:48 -07:00
Daniel Imms 35fc10b0e6 Kill watch/prebuild tasks when one fails 2018-05-27 07:42:34 -07:00
Daniel Imms ffd7d5513b Rebuild demo when demo files change 2018-05-27 07:38:04 -07:00
Daniel Imms 656567aed0 Use incremental tsc builds 2018-05-27 07:30:37 -07:00
Daniel Imms 82fdcc0771 Get DomRendererRowFactory test coverage to 100% 2018-05-26 08:43:55 -07:00
Daniel Imms c2b5a243f2 Refactor and add some tests to dom renderer 2018-05-26 08:15:40 -07:00
Daniel Imms 6e9cd35176 Remove coverage files from git 2018-05-26 07:34:32 -07:00
Daniel Imms 9890a8b20f Fix valid lib values in tsconfig
Mixed case is not valid
2018-05-26 07:32:46 -07:00
Daniel Imms 20975278c5 Merge remote-tracking branch 'ups/master' into 1360_dom_renderer 2018-05-26 07:25:08 -07:00
Daniel Imms b43ee08dd2 Merge pull request #1469 from tmpfs/safari-create-image-bitmap-patch
Suppress Safari promise rejections.
2018-05-23 20:28:06 -07:00
muji 3ae96a2266 Improve isSafari test. 2018-05-24 10:18:43 +08:00
muji 87fee8d024 Suppress Safari promise rejections.
Currently Webkit implements createImageBitmap() but returns a promise
rejection.

Note that once Webkit implements createImageBitmap() correctly these
changes should be removed.
2018-05-24 10:11:03 +08:00
Daniel Imms 09e42af730 Merge pull request #1466 from jerch/cleanup_print
cleanup and performance optimizations for InputHandler.print
2018-05-22 06:45:11 -07:00
Daniel Imms 44fde26f04 Remove types when they're inferred 2018-05-22 06:44:50 -07:00
Jörg Breitbart ac9b71549a add missing type decl 2018-05-21 22:39:00 +02:00
Jörg Breitbart 328086f206 declare types in InputHandler.print 2018-05-21 22:29:05 +02:00
Jörg Breitbart b3e8197111 changes in InputHandler.print:
- call updateRange only at start and end
- make all repeated terminal accesses local
- set full charCode (codepoint) in terminal buffer
2018-05-21 20:58:23 +02:00
Daniel Imms 099c7d8f04 Merge pull request #1399 from jerch/new_parser
new parser
2018-05-21 10:48:03 -07:00
Daniel Imms 507c4dc5d2 Use nyc for coverage report
Fixes #1464
2018-05-21 10:42:28 -07:00
Daniel Imms 6bc6ea56a5 Merge branch 'master' into new_parser 2018-05-21 10:04:15 -07:00
Jörg Breitbart e97882e5ad use string templates in DCS responses 2018-05-21 18:52:27 +02:00
Daniel Imms 85dada2eed Merge remote-tracking branch 'origin/master' into 1360_dom_renderer 2018-05-21 09:41:21 -07:00
Jörg Breitbart 8386ec1c19 Merge branch 'new_parser' of https://github.com/jerch/xterm.js into new_parser 2018-05-21 18:34:51 +02:00
Jörg Breitbart ceb1432f75 remove deprecated FIXME 2018-05-21 18:33:59 +02:00
Daniel Imms 8d722d20e2 Merge pull request #1463 from Tyriar/1424_fix_static_cache_ghost
Save and restore correctly when drawing from static cache
2018-05-21 09:21:58 -07:00
Daniel Imms 054abd15ea Save and restore correctly when drawing from static cache
Fixes #1424
2018-05-21 09:11:41 -07:00
Daniel Imms 724aa9d6c7 Fix compile and lint 2018-05-21 08:17:07 -07:00
Daniel Imms ab5fc98627 Merge branch 'master' into more_naming_conventions 2018-05-21 08:06:52 -07:00
Daniel Imms 0dfc9b2118 Merge branch 'master' into vsts 2018-05-21 07:54:50 -07:00
Daniel Imms 8bbc1fa287 Merge branch 'master' into script_improvements 2018-05-21 07:54:07 -07:00
Daniel Imms c1f8225c4f Merge branch 'master' into new_parser 2018-05-21 07:30:35 -07:00
Paris Kasidiaris 0ad1080133 Bump version to 3.4.0
Signed-off-by: Paris Kasidiaris <paris@sourcelair.com>
2018-05-19 08:31:27 +00:00
Daniel Imms 1736c1e12d Prevent outside line-height styles from affecting cursor
See Microsoft/vscode#50125
2018-05-18 12:17:39 -07:00
Benjamin Woodruff 4717619f76 Merge pull request #1327 from bgw/dynamic-char-atlas
Modularize the character atlas system, add a LRU-cache based dynamic character atlas
2018-05-17 22:59:03 -07:00
Benjamin Woodruff 7f761b5b9e Merge branch 'master' into dynamic-char-atlas
I did a bunch of testing of various ansi escape codes (including
italics) with all three char atlas implementations (none, static,
dynamic), with and without `drawBoldTextInBrightColors`, and with and
without `enableBold` to test all of the edge cases that I could.
2018-05-17 22:42:52 -07:00
Daniel Imms c00a3726f3 Merge branch 'master' into vsts 2018-05-16 13:46:06 -07:00
Daniel Imms 5ef399df6f Add VSTS build badge 2018-05-16 13:44:46 -07:00
Daniel Imms f8e9d02566 Merge branch 'master' into more_naming_conventions 2018-05-16 09:45:42 -07:00
Daniel Imms d8afdb1b6b Merge branch 'master' into new_parser 2018-05-15 13:21:33 -07:00
Daniel Imms 2b4c5adb3c Set font family and size 2018-05-15 11:29:51 -07:00
Daniel Imms 7334e6ab19 Merge pull request #1452 from Tyriar/coveralls
Update coveralls
2018-05-15 11:03:22 -07:00
Daniel Imms 137b499538 Merge pull request #1450 from Tyriar/tagline
Update tagline
2018-05-15 11:03:08 -07:00
Daniel Imms 6024e7c5fe Size row container so scroll bar shows 2018-05-15 10:52:01 -07:00
Daniel Imms aa1e1c5d94 Scope styles per terminal 2018-05-15 10:18:43 -07:00
Daniel Imms f055e0ef03 Throw exception for unrecognized renderer type 2018-05-15 10:10:34 -07:00
Daniel Imms 2f618b37c1 Merge branch 'master' into 1360_dom_renderer 2018-05-15 10:08:09 -07:00
Daniel Imms 3acd1eaecc Update coveralls
This broke after we moved the organization

Fixes #1451
2018-05-14 11:48:13 -07:00
Daniel Imms 435cf91ec7 Merge pull request #1433 from Tyriar/fix_lint
Run tslint on all of src/ (for good this time)
2018-05-14 11:33:30 -07:00
Daniel Imms 6e451f58b8 Update tagline 2018-05-14 11:13:01 -07:00
Daniel Imms 7a9f291df9 Merge pull request #1446 from Tyriar/1437_fix_link_pointer
Fix link cursor CSS
2018-05-12 07:45:20 -07:00
Daniel Imms 9dfce63e55 Simplify cursor styles 2018-05-12 07:44:30 -07:00
Daniel Imms 139a246436 Merge pull request #1401 from npezza93/alt-click-map-bug
Handle if getCoords returns null in the AltClickHandler
2018-05-11 15:56:14 -07:00
Daniel Imms 343cc2b7b2 Merge branch 'master' into alt-click-map-bug 2018-05-11 15:50:40 -07:00
Daniel Imms 0375e0064b Fix link cursor CSS
Ensure pointer overrides the default mouse events mode cursor.

Fixes #1437
2018-05-11 10:03:43 -07:00
Daniel Imms 57e35f836e Merge pull request #1438 from diag/master
Add diag.ai to list of real-world uses
2018-05-11 09:16:30 -07:00
Daniel Imms 685757b04b Merge pull request #1417 from pro-src/packaging
Stop publishing test files to npm - closes #1361
2018-05-11 07:51:46 -07:00
Daniel Imms 210a312fbf Remove ignore key from package.json 2018-05-11 07:49:37 -07:00
Daniel Imms c366ee20b8 Merge branch 'master' into packaging 2018-05-11 07:48:34 -07:00
Daniel Imms b9baacac3a Merge pull request #1444 from pengx17/patch-1
Update how to use addons with Typescript
2018-05-11 07:20:17 -07:00
Peng Xiao 45fea0e790 Merge branch 'master' into patch-1 2018-05-11 21:57:40 +08:00
Benjamin Woodruff cded6f80f6 Merge pull request #1445 from pro-src/master
Fix tsc
2018-05-10 23:57:24 -07:00
pro-src 9c1bee300d Fix tsc 2018-05-11 01:51:49 -05:00
Peng Xiao ef4cda2cc6 revise importing addons in ts 2018-05-11 11:20:02 +08:00
Peng Xiao d315dd6684 Merge branch 'master' into patch-1 2018-05-11 11:12:02 +08:00
Benjamin Woodruff 8a5891ede2 Merge pull request #1442 from bgw/dim-save-restore
Save and restore the ctx for cached characters
2018-05-10 09:38:46 -07:00
Peng Xiao bce81f304e Update how to use addons with Typescript 2018-05-10 16:11:25 +08:00
Benjamin Woodruff 3971fc9b4e Save and restore the ctx for cached characters
Drawing dim colors sets the globalAlpha to 0.5, so we need to
save/restore the ctx state. Otherwise, every time we draw some dim
content, our display will get progressively dimmer.

I tested this by running `echo '\u001b[2mfoo'` a few times in zsh.

Fixes #1424
2018-05-09 20:34:55 -07:00
npezza93 4edbd507e5 Check if endCol and endRow are present before handling an alt click 2018-05-09 19:35:02 -04:00
npezza93 b162582e66 Handle if getCoords returns null in the AltClickHandler
Fixes #1397
2018-05-09 19:31:19 -04:00
Benjamin Woodruff be32695e16 Merge pull request #1391 from LinusU/bright-vs-bold
Separate bright and bold
2018-05-08 18:43:41 -07:00
Benjamin Woodruff 9893338020 Add drawBoldTextInBrightColors to DEFAULT_OPTIONS
This lets term.setOption() work for drawBoldTextInBrightColors.
2018-05-08 18:34:23 -07:00
Ledion Bitincka cfdec9ff90 add diag.ai 2018-05-08 16:27:54 -07:00
Jörg Breitbart 02893dcbb8 fix some docs 2018-05-07 23:28:40 +02:00
Linus Unnebäck ce6139e604 Add drawBoldTextInBrightColors option 2018-05-07 22:23:04 +02:00
Linus Unnebäck a23354f018 Fully use char atlas for bright & bold colors 2018-05-07 22:23:01 +02:00
Linus Unnebäck 41fd563144 Separate bright and bold 2018-05-07 22:19:01 +02:00
Jörg Breitbart a37449a8cd some docs cleanup 2018-05-06 23:33:52 +02:00
Jörg Breitbart 551ccc0f2f explicit arguments for fallback handlers 2018-05-06 23:02:54 +02:00
Jörg Breitbart 108aa5ab31 test Uint8Array and Array; fix Uint8Array type 2018-05-06 22:42:07 +02:00
Daniel Imms 362d7698f7 Some polish 2018-05-05 08:12:52 -07:00
Daniel Imms edb06c6b2a Add copyright header 2018-05-05 07:54:38 -07:00
Jörg Breitbart 6cefb4c634 more test cases 2018-05-05 16:26:07 +02:00
Daniel Imms cd3eea5b48 Improve typings 2018-05-04 11:34:24 -07:00
Daniel Imms 5b5eb48867 Polish 2018-05-04 10:55:41 -07:00
Daniel Imms 09624c18e0 Move standard width to style element 2018-05-04 10:43:54 -07:00
Daniel Imms 9bcecd4e2e Run tslint on all of source (for good this time) 2018-05-04 10:20:09 -07:00
Daniel Imms 52e71a2530 Support italic 2018-05-04 10:13:21 -07:00
Daniel Imms 6cadd7c4a8 Fill in documentation on new option 2018-05-04 10:02:01 -07:00
Daniel Imms b14308f2c4 Resolve a bunch of TODOs 2018-05-04 09:38:24 -07:00
Daniel Imms 2c3949375e Update after a options change 2018-05-04 08:37:41 -07:00
Daniel Imms e3e4dcb5d1 Support selection 2018-05-04 08:32:03 -07:00
Daniel Imms e9f4d39f2b Start on selection 2018-05-04 06:27:40 -07:00
Daniel Imms d777513b87 Handle focus, emit refresh 2018-05-03 11:58:46 -07:00
Daniel Imms 1d2f356cfd Add a bunch of constants 2018-05-03 11:44:46 -07:00
Daniel Imms 418f2c6cdf Fix row height, add cursor 2018-05-03 11:35:04 -07:00
Daniel Imms 3cab8bede1 Merge branch 'oncharsizechanged' into 1360_dom_renderer 2018-05-02 15:05:42 -07:00
Daniel Imms 58ce5e2110 Only update dimensions when char size changes 2018-05-02 15:05:37 -07:00
Daniel Imms 20ff107768 Call IRenderer.onCharSizeChanged at right time
Even though Renderer just defers this to onResize, future IRenderer
implementations may take advantage of onCharSizeChanged specifically.
2018-05-02 15:00:42 -07:00
Daniel Imms 16393b228d Initial DOM renderer implementation 2018-05-02 13:32:22 -07:00
Jörg Breitbart 0f8d22547e fix identation 2018-05-02 01:23:46 +02:00
Jörg Breitbart c069e94a4c Merge branch 'master' into new_parser 2018-05-02 00:42:23 +02:00
Jörg Breitbart a1a4cac113 dcs handler implementations 2018-05-02 00:22:35 +02:00
Jörg Breitbart 25ff77af03 fix transition definitions 2018-05-01 22:22:40 +02:00
Jörg Breitbart 536b3a8def fix member scope and tests 2018-05-01 22:17:26 +02:00
Jörg Breitbart d090cbe4b9 some docs 2018-05-01 21:54:15 +02:00
Jörg Breitbart 9a32852e61 single arg for DCS and ESC handler registration 2018-05-01 21:07:13 +02:00
Daniel Imms e48b15e859 Merge pull request #1422 from flybayer/italic
Add support for italic rendering
2018-05-01 11:56:21 -07:00
Jörg Breitbart 89cf45c514 save func pointer in local var 2018-05-01 20:51:36 +02:00
Daniel Imms a732952677 Rearrange italic/bold to get _ctx.font validating 2018-05-01 11:50:06 -07:00
Jörg Breitbart 0c200f2feb remove collect from args where not needed 2018-05-01 20:41:41 +02:00
Jörg Breitbart 728eeebcc7 set member through ctor argument 2018-05-01 20:33:48 +02:00
Daniel Imms b60ab119b2 Merge branch 'master' into italic 2018-05-01 11:30:03 -07:00
Jörg Breitbart c7fdff2f40 several changes:
- missing escape sequence related methods in InputHandler implemented
- created namespace for C1 control codes
2018-05-01 17:50:41 +02:00
Jörg Breitbart 2eeb7b8ea5 ESC and OSC method entries for InputHandler 2018-05-01 16:36:12 +02:00
Jörg Breitbart 0535f5d1b3 unified method signature in InputHandler, moved some CSI condition into methods (FIXME: needs intermediate handler) 2018-05-01 14:58:16 +02:00
Jörg Breitbart aeae688b4c multiple changes in InputHandler:
- remove prefix/postfix
- optional collect arg where needed
- tempPrefix handler removed
- replaced .bind with () => notation
- moved callback registering to ctor again
2018-05-01 14:32:08 +02:00
Jörg Breitbart af392a6305 cleanup, some docs, temp fix for InputHandler tests 2018-04-30 23:35:54 +02:00
Jörg Breitbart ba6fcddc43 real merge of InputHandler and ParserTerminal 2018-04-30 17:04:29 +02:00
Jörg Breitbart dbc6b12ec2 missing whitespace 2018-04-30 15:44:21 +02:00
Jörg Breitbart 645cd2eb2c fix test cases 2018-04-30 15:38:17 +02:00
Jörg Breitbart b158176862 local .buffer in parse 2018-04-30 14:25:29 +02:00
Jörg Breitbart a1035269d5 add array fallback for TransitionTable 2018-04-30 11:27:10 +02:00
Jörg Breitbart f5375c3a99 fix error in esc handler call 2018-04-30 02:06:57 +02:00
Jörg Breitbart a55a7f3695 some cleanup 2018-04-30 01:49:29 +02:00
Jörg Breitbart 826cca7088 fix import issue 2018-04-30 01:32:49 +02:00
Jörg Breitbart 0f3d82a2a5 faster print action 2018-04-29 23:48:30 +02:00
Jörg Breitbart dc14f5226d fix InputHandler 2018-04-29 19:34:43 +02:00
Jörg Breitbart 27a3347c3f Merge branch 'master' into new_parser 2018-04-29 19:30:35 +02:00
Jörg Breitbart 2d77fcf2fb merge ParserTerminal with InputHandler
- quick'n dirty merge of classes - ParserTerminal is subclass of InputHandler
- basic fallback handlers implemented
- test regressions due to multiple changes in EscapeSequenceParser
- runtime down to 2.3s
- TODO: fix tests, implement DCS functions, full merge of classes
2018-04-29 19:10:47 +02:00
Jörg Breitbart 9d2bbd199c remove term from EscapeSequenceParser 2018-04-29 17:23:38 +02:00
Jörg Breitbart b72cdadd11 move switches to jump tables 2018-04-29 15:48:19 +02:00
Benjamin Woodruff 381d3e1444 Merge pull request #1413 from bgw/batch-background
Batch background draws together to reduce draws
2018-04-27 20:53:32 -07:00
Benjamin Woodruff b97eaf2c52 Merge branch 'master' into batch-background 2018-04-27 20:49:03 -07:00
Benjamin Woodruff 513847fd80 Make BaseRenderLayer's _alpha private again
This was accidentally left over from some earlier changes I was playing
with.
2018-04-27 20:47:55 -07:00
Daniel Imms 7b2500bfd6 Merge pull request #1420 from pro-src/patch-1
Update README.md
2018-04-27 09:44:47 -07:00
pro-src 882d5a86d3 Update README.md - prefer hex escapes over octal 2018-04-27 02:19:48 -05:00
Brandon Bayer 235982362c Add support for italic rendering 2018-04-26 17:34:01 -04:00
Daniel Imms aaaec75d73 Add remaining naming conventions into tslint 2018-04-26 13:54:20 -07:00
pro-src 30b88113a8 explicitly exclude demo 2018-04-26 12:09:21 -05:00
pro-src 994895af6d Update README.md
Replace the deprecated octal escapes with Unicode escapes.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_octal
2018-04-26 11:53:20 -05:00
pro-src a61ba2e140 closes #1361 2018-04-26 09:18:18 -05:00
Benjamin Woodruff a5a03c40f2 Batch background draws together to reduce draws
Adjacent cells on the same row sharing the same background color will be
drawn using the same `fillCells` call. This should make drawing an
application with a solid or mostly solid background color (e.g. vim)
faster.

I set vim to draw the background color for a file, and started scrolling
through it. Before, _drawBackground was taking around 6ms per frame.
After this commit, it was taking around 0.5ms per frame.

Based on prior experience, I'd expect these results to be more drastic
for larger terminal windows. The demo's window is pretty small.
2018-04-24 23:52:13 -07:00
Daniel Imms 83fe87d012 Merge pull request #1407 from Tyriar/enum_names
Enforce upper case for public const/enum members and const
2018-04-24 11:00:58 -07:00
Daniel Imms 3713d282d8 Fix conflicts 2018-04-24 10:55:53 -07:00
Daniel Imms 8aa65d06f5 Merge pull request #1404 from Tyriar/no_else_return
Add no else return tslint rule
2018-04-24 10:50:27 -07:00
Daniel Imms fd97fead60 Merge branch 'master' into no_else_return 2018-04-24 10:44:54 -07:00
Jörg Breitbart 9eb107a6e9 first handler API changes 2018-04-24 18:53:19 +02:00
Jörg Breitbart c0ab2b9a7c rename enums 2018-04-24 13:06:03 +02:00
Jörg Breitbart a058395014 move addChar to ParserTerminal 2018-04-24 12:27:43 +02:00
Benjamin Woodruff 453da35f51 Merge branch 'master' into dynamic-char-atlas 2018-04-23 22:43:43 -07:00
Benjamin Woodruff d254d69ee2 Fix fontWeight options with DynamicCharAtlas
The atlas wasn't using these values when setting the font.
2018-04-23 22:15:45 -07:00
Benjamin Woodruff ff19ba8e33 Merge pull request #1393 from bgw/text-render-layer
Separate foreground & background rendering passes
2018-04-23 21:48:09 -07:00
Daniel Imms fcde7be62a Enforce const enums
Fixes #1408
2018-04-23 17:35:41 -07:00
Daniel Imms 45b4429712 Merge branch 'master' into enum_names 2018-04-23 17:18:40 -07:00
Daniel Imms 9942dc384d Enforce upper case for public const/enum members
Fixes #1406
2018-04-23 17:17:21 -07:00
Jörg Breitbart 55993ada9b merge with remote 2018-04-24 00:35:55 +02:00
Jörg Breitbart c8910cc5fe utilize more typescript features 2018-04-24 00:23:46 +02:00
Jörg Breitbart f9767073ba new parser 2018-04-24 00:21:27 +02:00
Daniel Imms 56f9d423fe Merge branch 'master' into text-render-layer 2018-04-23 14:15:45 -07:00
Daniel Imms 716a8d5926 Merge pull request #1403 from jerch/performance_optimizations
performance optimizations
2018-04-23 13:49:03 -07:00
Jörg Breitbart 9593cb0cc8 readonly lines; fix for MockBuffer 2018-04-23 22:40:24 +02:00
Jörg Breitbart 7ed7505ce4 change _lines to lines in Buffer 2018-04-23 22:18:05 +02:00
Jörg Breitbart 6ff4ae7194 revert to local const buffer 2018-04-23 22:06:24 +02:00
Daniel Imms 9e863d0377 Add no else return tslint rule 2018-04-23 11:52:42 -07:00
Jörg Breitbart 13d4ab6f8d remove remnant 2018-04-23 18:32:32 +02:00
Jörg Breitbart 0d7ecd9129 prefetch row in addChar 2018-04-23 18:26:06 +02:00
Jörg Breitbart dd096c2e8b const buffer 2018-04-23 17:19:42 +02:00
Jörg Breitbart 0decd77253 map Buffer.lines directly to Buffer._lines 2018-04-23 16:59:55 +02:00
Jörg Breitbart 2bfe74490a make .buffer local where appropriate 2018-04-23 16:29:19 +02:00
Jörg Breitbart 20760d09e4 utilize more typescript features 2018-04-22 04:34:42 +02:00
Jörg Breitbart 73f40ef7d2 merge with master 2018-04-21 16:04:17 +02:00
Jörg Breitbart 9b085d2bdd new parser 2018-04-21 16:02:46 +02:00
Jörg Breitbart fb7e5d590c new parser 2018-04-21 05:12:24 +02:00
Benjamin Woodruff 0fe59df2e9 Rename startRow/endRow in TextRenderLayer
Renaming these to firstRow/lastRow makes the inclusivity of the range
clearer.

Addresses this comment:
https://github.com/xtermjs/xterm.js/pull/1393#discussion_r182471582
2018-04-18 20:22:55 -07:00
Daniel Imms a3ce881897 Merge pull request #1372 from Tyriar/1341_memory_leak
Remove terminal references on dispose
2018-04-18 08:10:20 -07:00
Daniel Imms 58c50f08db Break when the terminal reference is removed 2018-04-18 08:10:05 -07:00
Daniel Imms 984e027c87 Merge branch 'master' into 1341_memory_leak 2018-04-18 08:02:55 -07:00
Benjamin Woodruff b853aa4929 Separate foreground & background rendering passes
I'm primarily interested in doing this because it'll allow me to
optimize the background rendering in later diffs, but this may also make
it possible to fix some minor rendering issues.

Right now, if we draw a single-width character that overflows its cell's
bounds, and the character to the right of it has a background, that
background may cover up the first character's foreground. By drawing the
background in a separate pass, we can avoid those cases.

There's still some issues with how dirty regions are computed that makes
rendering stuff like that flaky, but this at least gets us closer to
"correct" rendering.

Other terminal emulators (e.g. alacritty) render the foreground and
background in separate passes:
https://github.com/jwilm/alacritty/blob/1b7ffea/src/renderer/mod.rs#L766
2018-04-17 21:44:17 -07:00
Benjamin Woodruff 4fd630ec5c Add code to IGlyphIdentifer, use it
It turns out that `glyph.char.charCodeAt(0)` isn't equivalent to the
character's actual code because of utf-16 garbage, so this adds
`glyph.code` to the `glyph` object so that we can use the `code` value,
and don't need to regenerate it.
2018-04-16 09:49:32 -07:00
Benjamin Woodruff ec96c40fde Re-add colors.ansi slicing in generateConfig
- We need to make a clone of this array, because ColorManager mutates
  it.
- We only want to compare the first 16 colors instead of all 256, since
  only the first 16 will ever change. In DynamicCharAtlas, we can pull
  the additional colors from DEFAULT_ANSI_COLORS.

I tested this out by loading the demo and changing the theme a few
times.
2018-04-16 09:41:00 -07:00
Daniel Imms cf8fa10205 Merge pull request #1299 from jonaustin/patch-1
Add Hyper to list of apps
2018-04-16 09:40:07 -07:00
Daniel Imms d8d9d904b5 Merge branch 'master' into patch-1 2018-04-16 09:39:02 -07:00
Benjamin Woodruff 4a13813941 Rename DRAW_TO_CACHE_LIMIT to FRAME_CACHE_DRAW_LIMIT 2018-04-16 08:56:54 -07:00
Daniel Imms cd7911a3d4 Merge pull request #1390 from Tyriar/third_party_addons
Add xterm-webfont addon to readme
2018-04-16 06:55:35 -07:00
Daniel Imms 3625a2278d Merge pull request #1365 from Tyriar/1364_addon_lint
Lint addon files
2018-04-16 06:46:42 -07:00
Daniel Imms 7d108999ff Fix lint 2018-04-16 06:42:16 -07:00
Daniel Imms e3dc36c123 Add xterm-webfont addon to readme 2018-04-16 06:28:45 -07:00
Daniel Imms 11541be4ae Merge branch 'master' into 1364_addon_lint 2018-04-16 06:25:48 -07:00
Daniel Imms ceffb35445 Merge pull request #1369 from Tyriar/897_dead_options
Remove unused options
2018-04-16 06:25:18 -07:00
Daniel Imms e1957ae6aa Merge remote-tracking branch 'origin/master' into 1364_addon_lint 2018-04-16 06:24:37 -07:00
Benjamin Woodruff 5a05db727c Add a per-frame limit on dynamic atlas writes
This limits the amount of damage a pathological program can cause in
thrashing the LRU cache.

I ran the script described here:
https://github.com/xtermjs/xterm.js/pull/1327#issuecomment-374003960

Without this patch, the entire output would get drawn in one frame that
took about 140 ms to draw. With this patch, it takes about 60 ms. It's
still nowhere as good as the static or none atlas implementations, but
it's not terrible, like it was.

This should have minimal impact on real-world applications: it'll just
take a little longer for the atlas to warm up.

The implementation is a little hacky, since it involves throwing some
code into TextRenderLayer that violates the separation of concerns, but
we can clean this up later.
2018-04-15 20:02:39 -07:00
Benjamin Woodruff 1f692ed047 Use a single tmpCtx, avoid parsing color values
Pros:
- The code is simpler.
- AA rendering is consistent between cached and uncached characters.
- No long requires parsing color values to determine the alpha, which
  means that we no longer depend on #rrggbbaa color value support.

Cons:
- We're drawing without SPAA in some cases where we could be.

Addresses this comment:
https://github.com/xtermjs/xterm.js/pull/1327#discussion_r176109332
2018-04-15 19:59:36 -07:00
Benjamin Woodruff c3eea02855 Add a LRUMap test, fix a bug in LRUMap
Bug: When appending a node, we weren't setting the tail's `next` value
correctly.
2018-04-15 19:48:37 -07:00
Benjamin Woodruff c6d66d7b0d Fix subpixel antialising in DynamicCharAtlas
Drawing to a ctx with `{alpha: true}` causes the canvas API (on chrome
at least) to switch to grayscale AA, instead of RGB subpixel AA.

This fixes it by drawing to a ctx that's using `{alpha: false}` when
posisble, and switching to a ctx that's using `{alpha: true}` only when
we have to.
2018-04-15 19:48:37 -07:00
Benjamin Woodruff 9c0ce1d742 Fix DynamicCharAtlas with transparency
There were two bugs:
- We need to clear the background of _tmpCtx instead of just drawing on
  top if the background color is transparent.
- We should set the background to fully transparent if it's partially
  transparent, to avoid drawing the transparent background twice.
2018-04-15 19:43:23 -07:00
Benjamin Woodruff ac7db87fd0 Remove use of Promises in {Base,Static}CharAtlas
Nothing actually cares about the return value, so we can avoid depending
on `Promise` by not returning a promise.

This should make this work for IE11 (though I haven't tested that).

I tried this in Chrome and Firefox to test both codepaths (ImageBitmap
and HTMLCanvasElement).
2018-04-15 18:52:06 -07:00
Benjamin Woodruff 8b3b7535c6 Add a new LRUMap class, remove uses of Map
LRUMap implements the parts of an ordered map that we need to
efficiently implement DynamicCharAtlas. It's more code, but there's a
few advantages of this approach:

- Map isn't available on some older browsers, so this removes the need
  for a polyfill.

- Moving an item to the end of the map's iteration order now only
  requires unlinking and linking a linked-list node, whereas before we
  had to delete and re-insert our value.

- Peeking at the oldest entry in the map no longer requires allocating
  and destroying an iterator.

- We can preallocate the linked-list nodes we want to improve cache
  locality. Similarly, we can recycle linked-list nodes to reduce
  allocations and the GC pauses those allocations may cause.

- LRUMap seems to give slightly better results in Chrome's profiler than
  Map did. We now spend about 5% of our time on map operations instead
  of about 10%.

- In my (limited) testing, it doesn't look like LRUMap is slowing down
  over time. Map appeared to get slightly slower the longer I ran the
  terminal for, either due to memory fragmentation or some sort of leak.

I still need to write some tests for LRUMap, but I've been using this
implementation for the last hour without problems.
2018-04-15 18:52:06 -07:00
Benjamin Woodruff c8b500c182 Skip drawing whitespace from DynamicCharAtlas
When we remove the background from a glyph, we can keep track of if we
made all the pixels fully transparent. If we did, we can just skip
future calls to _drawFromCache, since it would be a noop anyways.
2018-04-15 18:52:06 -07:00
Benjamin Woodruff 24feaabd9a Add a basic dynamic character atlas implementation
This adds a very minimal implementation of DynamicCharAtlas using a LRU
cache.

I've got some optimizations that I'll add on top of this, but this
proves the concept.
2018-04-15 18:49:07 -07:00
Benjamin Woodruff 8c980bc30d Add a dummy NoneCharAtlas implementation
This adds the logic needed to switch between multiple char atlas
implementations, and an example second implementation to test it out
with.

This also offers an escape hatch if something goes wrong with the char
atlas implementation(s).
2018-04-15 18:03:55 -07:00
Benjamin Woodruff 6f21385cd8 Add BaseCharAtlas and implement StaticCharAtlas
The API defined by BaseCharAtlas will let us support multiple char atlas
implementations at once.

I tested this by running the demo with Chrome's profiler, which shows
that calls are going to StaticCharAtlas/drawImage instead of
_drawUncachedChar. Applications using 256 colors also still work fine,
via _drawUncachedChar.
2018-04-15 18:03:55 -07:00
Daniel Imms 83f9d59d91 Merge pull request #1384 from Tyriar/1383_setoption_exception
Guard usages of DOM attached vars in setOption
2018-04-15 13:30:33 -07:00
Daniel Imms 3010760352 Remove vscode settings
No longer required as all the folders are in gitignore
2018-04-13 11:37:52 -07:00
Daniel Imms 82c16dee73 Rename coverage to test-coverage and document 2018-04-13 10:53:45 -07:00
Daniel Imms 7e8dd9647f Add testing section to README 2018-04-13 10:49:02 -07:00
Daniel Imms b594641b26 Run coverage on travis ci 2018-04-13 10:41:27 -07:00
Daniel Imms 5df9808d4c Remove launch.json in favor of auto attach debugging 2018-04-13 10:41:12 -07:00
Daniel Imms 2cee66909b Merge pull request #1374 from Tyriar/1353_run_lint_with_tests
Run lint with tests
2018-04-13 06:20:11 -07:00
Daniel Imms da8151b1b5 Merge pull request #1375 from Tyriar/remove-package-lock
Remove package-lock.json
2018-04-12 10:03:44 -07:00
Daniel Imms a3cb34fbf1 Merge pull request #1385 from johnpoth/headless-mode
Check if charMeasure is defined in headless mode
2018-04-12 07:29:48 -07:00
jpoth 9a1162d7f2 Check if charMeasure is defined in headless mode 2018-04-12 15:43:09 +02:00
Daniel Imms 591b09a62b Merge pull request #1377 from Tyriar/remove_jsdoc
Remove docdash
2018-04-11 09:39:12 -07:00
Daniel Imms f6f3e78e2c Merge pull request #1376 from Tyriar/1324_move_zmodem_demo
Move zmodem demo to demo/
2018-04-11 09:38:56 -07:00
Paris Kasidiaris 048b10ebf6 Bump version to 3.3.0
Signed-off-by: Paris Kasidiaris <paris@sourcelair.com>
2018-04-11 16:19:48 +00:00
Daniel Imms c882dcc353 Merge pull request #1381 from Tyriar/1379_viewport_throw
Fix exception when reset is called before open
2018-04-11 07:20:48 -07:00
Daniel Imms 82897ed56c Guard usages of DOM attached vars in setOption
Fixes #1383
2018-04-10 19:54:49 -07:00
Daniel Imms cd06786d16 Fix exception when reset is called before open
Fixes #1379
2018-04-09 06:13:32 -07:00
Daniel Imms 74d91a6bdd Remove docdash 2018-04-07 11:42:36 -07:00
Daniel Imms 4a1ebbfb56 Add .npmrc 2018-04-07 11:40:54 -07:00
Felipe Gasper 86c9b3f92c Fix zmodem demo. 2018-04-05 07:03:09 -07:00
Daniel Imms 4fbd1adaa9 Move zmodem demo to demo/
Fixes #1324
2018-04-04 14:31:25 -07:00
Daniel Imms 004ea61b83 Remove package-lock.json
We don't have any dependencies so this isn't as important to us, it's also ugly
to keep seeing these in PRs.
2018-04-04 14:11:46 -07:00
Daniel Imms 9be57f72f0 Run lint with tests
Fixes #1353
2018-04-04 14:10:03 -07:00
Daniel Imms e5ee76ded4 Remove terminal references on dispose
Part of #1341
Fixes #1370
2018-04-04 11:51:50 -07:00
Daniel Imms 87f21f14a1 Remove unused options
Fixes #897
2018-04-04 11:20:25 -07:00
Daniel Imms ef16811268 Merge branch 'master' into 1364_addon_lint 2018-04-04 11:11:05 -07:00
Daniel Imms 989f5873f5 Merge pull request #1366 from Tyriar/1363_fix_demo
Prevent falsy write values
2018-04-02 08:23:53 -07:00
Daniel Imms 307744be66 Prevent falsy write values
Fixes #1363
2018-04-02 08:22:22 -07:00
Daniel Imms 768539a57c Fix lint errors in attach 2018-04-02 08:17:44 -07:00
Daniel Imms 22c4197a1d Lint addons 2018-04-02 08:16:39 -07:00
Daniel Imms d4b75e4909 Merge pull request #1346 from bgw/color-parsing
Allow theming with arbitrary CSS color strings
2018-03-30 07:57:19 -07:00
Daniel Imms 4b5de031ea Merge branch 'master' into color-parsing 2018-03-30 07:50:39 -07:00
Benjamin Woodruff b66b0aae18 Block transparent colors without allowTransparency
Fixes xterm/xterm.js#1357.
2018-03-29 22:04:24 -07:00
Paris Kasidiaris 36a1c5b922 Merge pull request #1355 from AlexandrePetit-Pas/patch-5
Handle blob in attach Addon
2018-03-28 11:09:29 +03:00
Paris Kasidiaris 63f711e634 Fix styling and make string messages to work again 2018-03-28 10:57:21 +03:00
Alexandre Petit-Pas 516903e29e Handle blob in attach Addon
I have added blob handler for the attach Addon.
This allows to handle Docker with ws (works on Docker API v1.35)
I have also added a callback to handle asynchronous FileReader.
2018-03-28 07:37:02 +00:00
Paris Kasidiaris 5cf9423699 Merge pull request #1356 from xtermjs/fix-linter
Make linter blissful again
2018-03-28 10:31:29 +03:00
Paris Kasidiaris dbb2320e83 Fix linting errors 2018-03-28 10:22:42 +03:00
Benjamin Woodruff 0cb6138cd0 Allow theming with arbitrary CSS color strings
This mostly worked before, but clearColor made the assumption that the
colors were always in #RRBBGG format. See the discussion here:
https://github.com/xtermjs/xterm.js/pull/1327#issuecomment-374812842

This changes the internal representation of a color so that we hold onto
into an object containing the original css string along with an RGBA
value encoded as a 32-bit uint. clearColor can then use that RGBA
representation.

Additionally, this deduplicates some code between ColorManager and
Terminal. Terminal was generating the 256 ansi colors the same way
ColorManager was, so this just makes Terminal use the same constant.
2018-03-26 09:47:25 -07:00
Daniel Imms bf21097430 Merge pull request #1326 from LucianBuzzo/1322-options-clone
Do not mutate options object used in constructor
2018-03-24 14:07:59 -07:00
Lucian Buzzo 55d6daf8ee Do not mutate options object used in constructor
Connects to #1322

change-type: patch
2018-03-24 16:25:02 +00:00
Daniel Imms 6e1e63e666 Merge pull request #1350 from FGasper/issue_1330_rtl_layout
Force LTR for the terminal element
2018-03-23 16:19:02 -07:00
Daniel Imms b27d5bb08d Use single quote to make tslint happy 2018-03-23 16:18:41 -07:00
Felipe Gasper e63831febc Force LTR for the terminal element
Issue #1330: This prevents RTL layouts from mishandlin the
intended layout of the terminal container and children.
2018-03-23 19:16:02 -04:00
Daniel Imms 4ab79c908a Merge pull request #1329 from Tyriar/1319_bang_operator
Use bang operator for array methods
2018-03-21 07:34:18 -07:00
Daniel Imms b85083c3e8 Merge pull request #1303 from Tyriar/24_multi_line_links
Get multi-line links working
2018-03-21 07:33:43 -07:00
Daniel Imms 97f592ce8b Merge remote-tracking branch 'origin/master' into 24_multi_line_links 2018-03-21 07:32:32 -07:00
Daniel Imms 70da707569 Merge pull request #1338 from Tyriar/1325_marker_api
Implement Markers API
2018-03-20 19:14:10 -07:00
Daniel Imms 63f24be2b9 Merge branch 'master' into 1325_marker_api 2018-03-20 19:02:52 -07:00
Daniel Imms 0d6be9e03e Merge pull request #1344 from Tyriar/trailing_comma
Disallow trailing commas
2018-03-20 19:01:04 -07:00
Daniel Imms 3cbb21a966 Merge pull request #1340 from Tyriar/unused_func
Remove unused function
2018-03-20 19:00:35 -07:00
Daniel Imms 1fd7348938 Merge branch 'master' into unused_func 2018-03-20 19:00:24 -07:00
Daniel Imms ae32893732 Disallow trailing commas 2018-03-20 09:10:48 -07:00
Daniel Imms 4f82cf26f0 Merge pull request #1336 from mareklibra/removeStyle
Replace inline-styles by external CSS
2018-03-20 09:07:06 -07:00
Marek Libra b67b65cd1e Replace inline-styles by external CSS
Selected inline-styles were externalized to xterm.css.

The `Terminal._charSizeStyleElement` is removed since it
was not used anymore.

Fixes: https://github.com/xtermjs/xterm.js/issues/1335
2018-03-20 13:45:08 +01:00
Daniel Imms 0eeec13653 Clean up 2018-03-19 11:01:26 -07:00
Daniel Imms 5d1f744282 Remove unused function 2018-03-19 08:20:28 -07:00
Daniel Imms 387d5b056d Add Terminal.scrollToLine tests 2018-03-17 11:46:37 -07:00
Daniel Imms cbf7419601 Flag markers and addMarker as experimental 2018-03-16 17:24:04 -07:00
Daniel Imms 5c1a4a7d01 Add tests for Buffer.addMarker 2018-03-16 17:23:17 -07:00
Daniel Imms cbc6d7ce32 Add selectLines test 2018-03-16 15:56:48 -07:00
Daniel Imms b80832ac4c Initial marker API implementation
Part of #1325
2018-03-16 12:53:55 -07:00
Daniel Imms 3716aad202 Backtrack row to be linkified if the first row is wrapped 2018-03-16 07:21:14 -07:00
Daniel Imms efbd542964 Merge branch 'master' into 24_multi_line_links 2018-03-16 07:14:20 -07:00
Daniel Imms 888070830d Merge pull request #1332 from xtermjs/Tyriar-patch-1
Add note about third party dependencies
2018-03-13 12:44:51 -07:00
Daniel Imms 9905e2aa1d Add note about third party dependencies
Fixes #1328
2018-03-13 11:19:51 -07:00
Daniel Imms a59af6606b Use bang operator for array methods
Part of #1319
2018-03-12 14:14:37 -07:00
Daniel Imms d1213e5656 Merge pull request #1320 from Tyriar/1319/AccessibilityManager
Fix strictNullChecks errors in AccessibilityManager
2018-03-12 08:51:32 -07:00
Daniel Imms 0e14798d69 Merge pull request #1321 from felixse/patch-1
Add Fluent Terminal to the list of real-world uses
2018-03-11 13:44:16 -07:00
Daniel Imms c8ab687fa0 Add tests 2018-03-11 12:34:27 -07:00
Daniel Imms e5f5c2baf2 Fix links that start on wrapped lines 2018-03-10 16:08:50 -08:00
Felix 2f861602c8 Add Fluent Terminal to the list of real-world uses 2018-03-10 23:27:59 +01:00
Daniel Imms 4f0cc01485 Fix strictNullChecks errors in AccessibilityManager
Part of #1319
2018-03-09 11:27:10 -08:00
Daniel Imms dd41ab38bb Fix imports after noUnusedLocals was merged in 2018-03-09 10:58:57 -08:00
Daniel Imms 255cb5de3a Merge branch 'master' into 24_multi_line_links 2018-03-09 10:57:04 -08:00
Daniel Imms b44a11c42e Remove TODOs, polish 2018-03-09 10:56:54 -08:00
Daniel Imms 90b2f0e6a1 Merge pull request #1316 from Tyriar/noUnusedLocals
Add noUnusedLocals tsconfig flag, fix issues
2018-03-09 08:43:40 -08:00
Daniel Imms 811aa9c413 Merge remote-tracking branch 'origin/master' into noUnusedLocals 2018-03-09 08:43:21 -08:00
Daniel Imms 842c7132ec Merge pull request #1318 from Tyriar/remove_unused_css
Remove unused CSS rule
2018-03-09 08:41:41 -08:00
Daniel Imms efb67edc36 Remove unused CSS rule
With #1316, this will resolve Microsoft/vscode#45145
2018-03-09 07:11:53 -08:00
Daniel Imms ed7741e006 Merge pull request #1317 from bgw/rm-char-atlas-request
Merge ICharAtlasRequest with ICharAtlasConfig
2018-03-09 06:11:05 -08:00
Benjamin Woodruff cfe936a0b4 Merge ICharAtlasRequest with ICharAtlasConfig
ICharAtlasRequest and ICharAtlasConfig need almost exactly the same set
of information, so it's simpler if we just merge the two types.

As an added bonus, this also adds devicePixelRatio to the config, which
helps guarantee that we won't ever accidentally end up with an atlas
using a different pixel ratio than we need.
2018-03-08 23:23:33 -08:00
Daniel Imms 4ddf91dbbe Fix tests 2018-03-08 11:20:42 -08:00
Daniel Imms 59be054ca1 Fix exception for links on bottom line 2018-03-08 11:12:59 -08:00
Daniel Imms b794dc017d Fix test 2018-03-08 11:08:51 -08:00
Daniel Imms 4443ed69c7 Add noUnusedLocals tsconfig flag, fix issues
Two parts were commented out:
- _writeStopped: This is because _xoffSentToCatchUp references this variable
  and the feature is sort of half implemented/disabled.
- _clearChar: This is because some comments still reference this, it's part
  of the work needed to do better line redrawing.
2018-03-08 10:56:10 -08:00
Daniel Imms ab9b84898e Merge remote-tracking branch 'origin/master' into 24_multi_line_links 2018-03-08 10:23:05 -08:00
Daniel Imms a41e183b88 Merge pull request #1310 from Tyriar/426_alt_scroll
Send arrow events on mouse wheel in alt buffer
2018-03-08 09:53:36 -08:00
Daniel Imms 949239dbdc Merge remote-tracking branch 'origin/master' into 426_alt_scroll 2018-03-08 09:28:02 -08:00
Daniel Imms 421ccc5695 Join lines that wrap over more than 2 lines 2018-03-08 09:25:08 -08:00
Daniel Imms 5d68ed6e5e Merge pull request #1315 from Tyriar/underscore_private
Rename all remaining private variables to use underscores
2018-03-08 09:01:33 -08:00
Daniel Imms 021f8c1ba0 Draw and clear link cells 2018-03-08 07:00:37 -08:00
Daniel Imms f456b14b3f Get multi-line link hover working 2018-03-08 06:42:40 -08:00
Daniel Imms 7a1ef19146 Merge remote-tracking branch 'origin/master' into 24_multi_line_links 2018-03-08 06:23:29 -08:00
Daniel Imms b9cbdf6a0d Fix tests 2018-03-08 06:19:17 -08:00
Daniel Imms 7639131c12 Ensure underscore is used for private vars
Variables changed based on regex: "private [^(_|get)]"
2018-03-08 06:09:46 -08:00
Daniel Imms 289b4eeb23 Merge branch 'master' into 426_alt_scroll 2018-03-08 05:37:16 -08:00
Daniel Imms 404a285eaf Merge pull request #1307 from bgw/split-char-atlas-files
Split CharAtlas types and utility functions off
2018-03-08 05:16:44 -08:00
Daniel Imms b20fe80f9b Merge pull request #1308 from bgw/rm-did-char-size-change
Remove didCharSizeChange logic from renderer
2018-03-08 05:10:53 -08:00
Daniel Imms ff9814a40d Merge pull request #1293 from nikonso/allow-named-theme-colors-1195
Validate colors
2018-03-08 05:02:50 -08:00
Daniel Imms 855964fbe1 Merge pull request #1296 from olsonpm/fix-paste-newline
Paste newlines as \r
2018-03-08 05:02:31 -08:00
Paris Kasidiaris 606c68dd0c Bump version to 3.2.0
Signed-off-by: Paris Kasidiaris <paris@sourcelair.com>
2018-03-08 08:59:46 +00:00
Benjamin Woodruff 735dfb4710 Add copyright header to shared/atlas/Types.ts 2018-03-07 23:19:38 -08:00
Benjamin Woodruff ab69bfbb32 Move rest of atlas implementations to atlas dirs
Moves CharAtlas into src/renderer/atlas/ and CharAtlasGenerator into
src/shared/atlas/.
2018-03-07 22:23:19 -08:00
Benjamin Woodruff 70771430b5 Clean up char atlas constant imports/exports
- Ensures that everything is only defined in one place, and everything
  imports from that place.
- Moves CHAR_ATLAS_CELL_SPACING into a subdirectory of shared/ so that
  CharAtlasGenerator can pull from it.

This addresses the comments on
https://github.com/xtermjs/xterm.js/pull/1307/files/454fd4bfb1ab5c9ece
2018-03-07 22:13:41 -08:00
Paris Kasidiaris 6741e92cc6 Merge pull request #1313 from xtermjs/docker-image
Add xterm.js Docker image to documentation
2018-03-07 23:00:04 +02:00
Paris Kasidiaris 31ce5c1826 Run the webpack build in the docker image too 2018-03-07 12:38:29 +02:00
Paris Kasidiaris 1f113b1d29 Add xterm.js Docker image to documentation
Closes #1295
2018-03-07 12:28:44 +02:00
Bruno Ribeiro 41f6ee4f6d Merge branch 'master' into allow-named-theme-colors-1195 2018-03-06 20:15:32 +00:00
Daniel Imms 6e546c0f30 Merge pull request #1298 from Tyriar/1297_webLinks_addon
Pull web link support into an addon
2018-03-06 09:29:33 -08:00
Daniel Imms 7cae8e51ca Merge pull request #1290 from Tyriar/1287_double_click_exception
Check for valid coords before getting word at coords
2018-03-06 09:28:55 -08:00
Daniel Imms bf4dd7de60 Merge branch 'master' into 1287_double_click_exception 2018-03-06 09:28:47 -08:00
Thomas Zilz ff6ef1b63a Initialise _wheelPartialScroll to 0 to prevent NaN 2018-03-06 11:39:14 +01:00
Bruno Ribeiro 34034b849f Merge branch 'master' into allow-named-theme-colors-1195 2018-03-05 23:22:12 +00:00
Daniel Imms f2d8709dd8 Merge pull request #1309 from Tyriar/1305_alt_horizontal_only
Only move horizontally on alt click in normal buffer
2018-03-05 14:25:45 -08:00
Daniel Imms e137530581 Scroll by exact line amount in alt buffer, unify scroll logic
Fixes #1304
2018-03-05 14:22:20 -08:00
Daniel Imms be7788dda6 Merge remote-tracking branch 'origin/master' into 426_alt_scroll 2018-03-05 11:48:40 -08:00
Daniel Imms 7c471f5389 Fix test compile 2018-03-05 11:32:05 -08:00
Daniel Imms 9e62c8692f Only move horizontally on alt click in normal buffer
Fixes #1305
2018-03-05 11:11:54 -08:00
Benjamin Woodruff 18fb134910 Remove didCharSizeChange logic from renderer
The only thing `didCharSizeChange` was used for was to figure out if we
need to refresh the character atlas or not. However, `acquireCharAtlas`
already inspects the atlas owned by this terminal, and if it matches, it
avoids generating a new atlas.

So if `didCharSizeChange` is true and it's not needed, it quickly bails
out as a no-op. But if `didCharSizeChange` is false, and it was needed
(possible given the complexity of testing all of these edge cases), it
could introduce a bug.

I think it makes sense to just get rid of `didCharSizeChange`, and just
always call `acquireCharAtlas`.
2018-03-04 20:55:42 -08:00
Benjamin Woodruff 454fd4bfb1 Split CharAtlas types and utility functions off
I'm starting to pull some changes off of my large WIP branch/commit that
adds an alternative dynamic character atlas. We're going to need to
support multiple CharAtlas implementations, and this should make that
easier.
2018-03-04 18:50:46 -08:00
Daniel Imms 131e6ff949 Merge pull request #1302 from nikonso/Enforce-option-value-via-types
Enforce option value via types
2018-02-28 07:47:25 -08:00
Bruno Ribeito c51fa238ff Readd any overloads 2018-02-27 23:18:33 +00:00
Daniel Imms 2e3f9e7094 Multi-line links prototype
Part of #24
2018-02-27 08:37:16 -08:00
Bruno Ribeito 76a3dbf883 Enforce option value via types 2018-02-26 23:27:53 +00:00
Jon Austin 07cf029497 Merge branch 'master' into patch-1 2018-02-24 13:12:30 -08:00
Daniel Imms c8017345f1 Merge pull request #1288 from dgriffen/dev/dgriffen/fix-scrollbar
fix terminal width calculation
2018-02-24 11:56:35 -08:00
Daniel Imms 0d2cc7489e Fix tests, add webLinks addon test 2018-02-24 10:36:34 -08:00
Jon Austin f3a37a9522 Add Hyper to list of apps
https://github.com/zeit/hyper/blob/82c7afbeecf5a0c455075868cd23585fce95cf68/package.json#L197
2018-02-24 10:14:51 -08:00
Daniel Imms 6a71717751 Allow customization of the web links handler and options 2018-02-23 11:28:14 -08:00
Daniel Imms dc822787d0 Move http links to the new webLinks addon
Fixes #1297
2018-02-23 11:11:23 -08:00
Daniel Imms 5011e629b1 Build addons by scanning addon dir 2018-02-23 11:08:11 -08:00
Philip Olson bc35f28f51 Paste newlines as \r
Fix issue where non-windows OS terminals don't paste newlines correctly
into misbehaving programs.  As noted in JetBrains/jediterm#136, the
most practical solution is for terminals to handle this in their paste
logic.  In a perfect world, all terminal programs would implement
bracketed paste mode properly, but that's a lot to ask.

- translate newlines to \r which is what terminal programs expect
2018-02-22 23:52:45 -06:00
Bruno Ribeiro 97feb64e94 Merge branch 'master' into allow-named-theme-colors-1195 2018-02-21 23:51:36 +00:00
Daniel Imms 94bbc4e09d Merge pull request #1200 from nikonso/1181
WIP: Use web audio api
2018-02-21 15:36:19 -08:00
Daniel Imms ad7d2262ec Undo package-lock changes 2018-02-21 15:35:53 -08:00
Bruno Ribeito 1114977a21 Fix tests 2018-02-21 23:35:37 +00:00
Bruno Ribeiro a8c5b159a9 Merge branch 'master' into allow-named-theme-colors-1195 2018-02-21 23:17:00 +00:00
Daniel Imms a91e0e234a Use const everywhere 2018-02-21 14:44:48 -08:00
Daniel Imms af5b3f704e Fix lint 2018-02-21 14:42:04 -08:00
Daniel Imms 45c9763092 Fix indentation 2018-02-21 14:40:22 -08:00
Daniel Imms db8ba17147 Check audio context ctor before constructing 2018-02-21 14:39:43 -08:00
Daniel Imms 1972bf4bb3 Merge remote-tracking branch 'ups/master' into 1181 2018-02-21 14:36:11 -08:00
Daniel Imms 62cf0936dc Merge pull request #1231 from saamalik/ctrl-alt-sequences
Additional alt and control sequences
2018-02-21 14:08:31 -08:00
Bruno Ribeito a9d6686e14 Regex is not needed for color validation 2018-02-20 20:38:12 +00:00
Bruno Ribeito 99aa142cef Fix test -> wrong Regex flag 2018-02-19 23:55:25 +00:00
Bruno Ribeito f8f1355155 Validate colors 2018-02-19 22:54:09 +00:00
Daniel Imms ae28814041 Check for valid coords before getting word at coords
Fixes #1287
2018-02-16 21:34:57 -08:00
Daniel Griffen 183fd2fe79 fix terminal width calculation 2018-02-16 10:18:03 -08:00
Saad Malik 8324462b32 Merge branch 'master' into ctrl-alt-sequences 2018-02-15 09:49:16 -08:00
Daniel Imms 93e5996422 Merge pull request #1182 from Tyriar/731_screen_reader
Screen reader support
2018-02-15 06:20:14 -08:00
Daniel Imms f089b997c0 Merge branch 'master' into 731_screen_reader 2018-02-14 09:03:31 -08:00
Saad Malik 51d2064061 Merge branch 'master' into ctrl-alt-sequences 2018-02-13 14:59:46 -08:00
Daniel Imms 712b91a971 Merge pull request #1282 from matthew-matvei/add-freeman
Added FreeMAN to list of real-world uses
2018-02-13 06:37:55 -08:00
Daniel Imms cbe6c64a92 Merge pull request #1280 from AndrienkoAleksandr/fixHeadlessMode
Fix xterm.js in headless mode yields TypeError on resize
2018-02-12 12:42:14 -08:00
Matthew James 64ed8309a1 Added FreeMAN to list of real-world uses 2018-02-12 20:26:09 +00:00
Oleksandr Andriienko b5ba9ae771 Fix xterm.js in headless mode yields TypeError on resize
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
2018-02-12 12:30:26 +02:00
Saad Malik 18f6556061 Merge branch 'master' into ctrl-alt-sequences 2018-02-09 14:00:24 -08:00
Paris Kasidiaris 1dbe7b3a8c Bump version to 3.1.0
Signed-off-by: Paris Kasidiaris <paris@sourcelair.com>
2018-02-09 08:42:39 +00:00
Saad Malik 6dc49b7d01 Merge branch 'master' into ctrl-alt-sequences 2018-02-08 12:03:38 -08:00
Daniel Imms 987be07a70 Merge pull request #1276 from Tyriar/enableBold_deprecated
Mark enableBold setting as deprecated
2018-02-07 07:46:50 -08:00
Daniel Imms 760837e5cb Mark enableBold setting as deprecated 2018-02-06 07:25:54 -08:00
Thomas Zilz dc759a93bc Support setting padding on the .xterm element (#1208)
* Support padding on the .xterm element
2018-02-06 12:31:17 +01:00
Daniel Imms 1ec7b91a98 Merge pull request #1264 from Tyriar/1021_support_modifiers
Allow support of modifiers with links
2018-02-06 02:32:00 -08:00
Daniel Imms c218eebb24 Merge pull request #1266 from Tyriar/1265_sync_when_attached
Ensure viewport is attached before syncing scrollbar
2018-02-06 02:24:59 -08:00
Daniel Imms 8040e3de4a Merge pull request #1275 from xtermjs/Tyriar-patch-1
Update readme copyright statement
2018-02-06 02:23:39 -08:00
Paris Kasidiaris ff400bfcdc Merge pull request #1273 from xtermjs/webpack-watch
Add `watch` gulp task and npm script
2018-02-06 12:20:36 +02:00
Daniel Imms 35ea593806 Update readme copyright statement 2018-02-06 02:07:56 -08:00
Paris Kasidiaris f02903a6df Update README.md and Docker files 2018-02-06 09:22:16 +00:00
Paris Kasidiaris 182426dd0f Rename gulp task: webpack:watch → watch` and also monitor subdirectories 2018-02-06 10:28:34 +02:00
Paris Kasidiaris d0f45fee25 Fix #1232: Add webpack:watch gulp task 2018-02-05 15:49:37 +00:00
Daniel Imms 1462b30c88 Merge pull request #1271 from krasimir/patch-1
Update README.md
2018-02-05 07:41:23 -08:00
Krasimir Tsonev c302bc9f17 Update README.md
In `Getting Started` section we read `npm install` only. Shouldn't be `npm install xterm`?
2018-02-05 09:32:34 +02:00
Daniel Imms 01d841fec6 Merge pull request #1246 from Tyriar/1245_revert_page_change
Revert "Add support for modifiers for PageUp / PageDown keys."
2018-02-02 09:51:28 -08:00
Daniel Imms 1124f1fc7f Merge pull request #1114 from nikonso/feature-778
Select the word underneath the cursor on contextmenu
2018-02-01 17:35:52 -08:00
Daniel Imms cab097c09c Clean up condition for readability 2018-02-01 17:28:08 -08:00
Daniel Imms 43adf0ef70 Merge branch 'master' into feature-778 2018-02-01 17:21:04 -08:00
Daniel Imms 3c6cab1491 Clear selectionEnd when selecting word at cursor 2018-02-01 17:20:33 -08:00
Bruno Ribeito 5550bfd90b Fix is click in selection 2018-02-01 21:37:06 +00:00
Daniel Imms 04ccb638b4 Fix lint 2018-02-01 11:28:56 -08:00
Daniel Imms 5c05471993 Merge branch 'master' into 1021_support_modifiers 2018-02-01 11:28:05 -08:00
Daniel Imms 1e32d26a85 Merge branch 'master' into 1265_sync_when_attached 2018-02-01 10:28:41 -08:00
Daniel Imms 6105975308 Ensure viewport is attached before syncing scrollbar
Fixes #1265
2018-02-01 10:24:17 -08:00
Daniel Imms cd24f7a26c Merge pull request #1263 from Tyriar/ts_2.7
typescript@2.7
2018-02-01 08:16:42 -08:00
Daniel Imms 2ac5a8da49 Allow support of modifiers with links
Fixes #1021
2018-01-31 17:42:33 -08:00
Daniel Imms e849629533 typescript@2.7
Tuples using a fixed length by default will be helpful for CharData
2018-01-31 11:32:19 -08:00
Bruno Ribeito 983af8fac2 Use _selectWordA 2018-01-31 00:01:46 +00:00
Daniel Imms 74a6dfb197 Send arrow events on mouse wheel in alt buffer
Fixes #426
2018-01-29 11:28:48 -08:00
Saad Malik 73e0db1912 Merge branch 'master' into ctrl-alt-sequences 2018-01-29 10:21:36 -08:00
Daniel Imms 62d6c242fc Merge pull request #1249 from Tyriar/1248_tslint_curly
Add curly to tslint, fix errors
2018-01-29 07:54:09 -08:00
Daniel Imms e7b4e002f4 Merge remote-tracking branch 'origin/master' into 1248_tslint_curly 2018-01-29 07:45:31 -08:00
Daniel Imms d190bc0531 Merge pull request #1250 from xtermjs/Tyriar-patch-1
Add SQL Operations Studio to real world uses
2018-01-29 07:44:36 -08:00
Daniel Imms fb1d902804 Merge pull request #1258 from Tyriar/travis_tsc
Run tsc as a travis job
2018-01-29 07:44:26 -08:00
Daniel Imms 12cd6ea0e4 Merge pull request #1260 from Tyriar/typo
Fix recent typo in comment
2018-01-29 07:43:56 -08:00
Daniel Imms 69ebb3e53e Fix recent typo in comment 2018-01-29 07:42:59 -08:00
Paris Kasidiaris f2fe8ca08b Merge pull request #896 from npezza93/alt-click
Alt+click will move the prompt cursor to that position
2018-01-29 11:58:46 +02:00
Daniel Imms bbac1801e5 Small clean up 2018-01-28 17:33:51 -08:00
Daniel Imms a6a4bf0817 Merge remote-tracking branch 'ups/master' into feature-778 2018-01-28 17:25:46 -08:00
Saad Malik 9ade1f0a5d Add mapping for backward slash
* Add mapping for backward slash
* Fix mapping for single/double quote
2018-01-28 17:11:13 -08:00
Saad Malik f8fbdf31fa Merge branch 'master' into ctrl-alt-sequences 2018-01-28 16:54:55 -08:00
Daniel Imms e8666cafc9 Small clean up 2018-01-28 14:44:33 -08:00
Daniel Imms db95442af6 Merge pull request #1236 from chabou/pr/1148
Add allowTransparency option
2018-01-28 14:19:20 -08:00
Daniel Imms fc2af1d806 Fix lint, reduce duplication, don't scale ctx
Scaling ctx was breaking the scale when setOption was called, not sure
it was doing anything.
2018-01-28 14:13:25 -08:00
Daniel Imms 106704b5d8 Merge remote-tracking branch 'ups/master' into pr/1148 2018-01-28 13:39:07 -08:00
Daniel Imms a0f390ef54 Expose strings through the API 2018-01-28 13:10:11 -08:00
Daniel Imms af375eadb4 Run tsc as a travis job
This will hard fail when there are semantic errors. Currently building does
not do this and we will merge these in as a result.
2018-01-28 12:27:01 -08:00
Daniel Imms 098a3d0804 Merge pull request #1253 from sitzmar/right_click_timeout
adjust timeout to ensure right-click event has fired
2018-01-28 10:35:44 -08:00
npezza93 3bdc069f19 Set copyright header to 2018 2018-01-28 13:16:20 -05:00
npezza93 3313716c87 Add new lines back in types 2018-01-28 13:15:42 -05:00
npezza93 735ffdd2ce Merge remote-tracking branch 'upstream/master' into alt-click 2018-01-28 13:13:37 -05:00
Daniel Imms 8588199fdb Merge pull request #1256 from Tyriar/1255_id_class
Change render layer id to a class
2018-01-28 10:13:13 -08:00
npezza93 f726c1fd0d Allow selection and alt click to live conflict free 2018-01-28 13:06:54 -05:00
npezza93 e60704255f Fix lints 2018-01-28 13:00:11 -05:00
npezza93 aeae40e110 Use the terminal and circular list interface 2018-01-28 12:38:20 -05:00
npezza93 08af2ebeea Utilize enum to simplify sequence generation 2018-01-28 12:29:52 -05:00
npezza93 0202659c38 Set terminal and mouseevent inside constructor args 2018-01-28 10:48:08 -05:00
npezza93 edadb6e0f1 Update the copyright header 2018-01-28 10:44:01 -05:00
Daniel Imms 39abf8aecf Change render layer id to a class
It's only used to identify them in DOM explorer currently

Fixes #1255
2018-01-27 22:26:00 -08:00
Daniel Imms 65b6901170 Fix compile error 2018-01-27 21:51:13 -08:00
npezza93 14725d0b0d Merge remote-tracking branch 'upstream/master' into alt-click 2018-01-27 22:38:12 -05:00
npezza93 c41a4b5168 Move repeat import 2018-01-27 22:37:57 -05:00
npezza93 d61aa6e470 Fix lints 2018-01-27 22:37:31 -05:00
npezza93 544fa67851 Move repeat out of generic 2018-01-27 22:36:53 -05:00
npezza93 6a48022a45 Don't reset starting position if the row is not moved.
Mainly due to the normal buffer
2018-01-27 22:28:41 -05:00
npezza93 a4ee723665 Fix backward row/col definition 2018-01-27 22:06:58 -05:00
npezza93 dc59f33ccf Fix translateBufferToString bug 2018-01-27 22:06:31 -05:00
Daniel Imms ec156f62e1 Only update a11y manager dimensions after a renderer resize 2018-01-27 18:38:28 -08:00
npezza93 833d814499 Refactor alt-click to work independently of which buffer is being used 2018-01-27 21:30:53 -05:00
npezza93 327b16ac2e Add repeat polyfill for repeating a string 2018-01-27 21:30:24 -05:00
Daniel Imms a3958a1cba Merge branch 'master' into 731_screen_reader 2018-01-27 18:15:31 -08:00
Daniel Imms 7c8b64aaf1 Revert "Hook up scroll APIs to scroll and focus when navigating"
This reverts commit b13826441c.
2018-01-27 18:14:58 -08:00
Daniel Imms b13826441c Hook up scroll APIs to scroll and focus when navigating 2018-01-27 18:14:52 -08:00
Daniel Imms 0bdf1e8265 Remove unused function 2018-01-27 17:51:43 -08:00
Daniel Imms 5506af5322 Clean up a11y manager 2018-01-27 16:47:23 -08:00
Daniel Imms 6439aca1d8 Refresh dimensions of only a single row 2018-01-27 15:00:19 -08:00
Daniel Imms 65850c1c20 Reduce duplication 2018-01-27 14:53:46 -08:00
Daniel Imms 963db4d2fd Remove navigation mode/more rows element 2018-01-27 14:48:45 -08:00
Daniel Imms 5c061195c0 Get navigation right/down working with nav mode 2018-01-27 14:45:22 -08:00
Saad Malik 0104e4214e Reimplement using map
* Reimplemented reg + shift alt digits and characters using a map
* Add test cases for digits
2018-01-26 18:33:37 -08:00
Saad Malik baaf61b3a3 Merge branch 'master' into ctrl-alt-sequences 2018-01-26 13:38:48 -08:00
Daniel Imms 9feb10efc5 Merge pull request #1244 from Tyriar/remove_legacy_gitignore
Remove legacy .gitignore rules
2018-01-26 10:34:43 -08:00
Daniel Imms 58f3793cd4 Merge branch 'master' into remove_legacy_gitignore 2018-01-26 10:27:44 -08:00
Daniel Imms 93715c455d Add dist/ back 2018-01-26 10:26:31 -08:00
Daniel Imms b9976c3d17 Merge remote-tracking branch 'origin/master' into 731_screen_reader 2018-01-26 10:24:09 -08:00
sitzmar 069b489fb6 adjust timeout to ensure right-click event has fired 2018-01-26 08:04:59 -08:00
CHaBou fe53e1a091 Change canvas transparency when option is updated 2018-01-25 23:20:20 +01:00
Bruno Ribeito e6c6e0766a Fix usage of allowWhitespaceOnlySelection variable 2018-01-25 21:00:10 +00:00
Daniel Imms 2c065b66be Add SQL Operations Studio to real world uses 2018-01-25 12:31:48 -08:00
Daniel Imms 1dce76dbbb Add curly to tslint, fix errors
Fixes #1248
2018-01-25 12:17:59 -08:00
Daniel Imms 9c62a817d0 Fix build after merge 2018-01-25 12:08:50 -08:00
Daniel Imms 3a3f3db56e Merge remote-tracking branch 'ups/master' into feature-778 2018-01-25 11:58:46 -08:00
Daniel Imms bd55ce841e Merge branch 'master' into 1245_revert_page_change 2018-01-25 11:28:29 -08:00
Daniel Imms 6c54c6cded Merge pull request #1224 from Tyriar/1221_iterminal_typings
Move ITerminal and all its dependents into typings/
2018-01-25 11:25:02 -08:00
Daniel Imms c12394a687 Don't export contains 2018-01-25 11:09:20 -08:00
Daniel Imms 2e23dd34e0 Move xterm-internal types back into Types.ts files 2018-01-25 11:06:52 -08:00
Daniel Imms 8225b94d34 Types.d.ts -> .ts 2018-01-25 10:24:17 -08:00
Daniel Imms 4db4fcb40a Remove declaration file generation, we have explicit types 2018-01-25 10:23:14 -08:00
Daniel Imms 177edfa66e Merge interfaces and types files 2018-01-25 10:03:28 -08:00
Daniel Imms d454a50a84 Move FontWeight type to xterm.d.ts 2018-01-25 09:48:12 -08:00
Daniel Imms 7358890a31 Merge remote-tracking branch 'ups/master' into 1221_iterminal_typings 2018-01-25 09:45:13 -08:00
Daniel Imms 4c6f18c36f Revert "Add support for modifiers for PageUp / PageDown keys."
This reverts commit 83921c0b26.

Fixes #1245
2018-01-25 09:20:19 -08:00
Daniel Imms 70747e84a1 Merge remote-tracking branch 'ups/master' into pr/1148 2018-01-25 08:15:42 -08:00
Daniel Imms 8f1a629b48 Merge pull request #1198 from Tyriar/955_worker_refactor
Refactor char atlas to enable generation with worker
2018-01-25 07:22:15 -08:00
Daniel Imms b87fe53b94 Remove legacy .gitignore rules 2018-01-25 07:20:41 -08:00
Daniel Imms a22b5c0faa Merge remote-tracking branch 'ups/master' into 955_worker_refactor 2018-01-25 07:16:00 -08:00
Daniel Imms 92e85e0ce5 Merge pull request #1228 from Tyriar/missing_typings
Add missing macOptionIsMeta typings
2018-01-25 07:00:08 -08:00
Daniel Imms 038260b92a Merge pull request #1235 from Tyriar/1151_clamp_saved_cursor
Resize saved cursor position on buffer resize
2018-01-25 06:55:02 -08:00
Daniel Imms d17c08a32f Merge pull request #1238 from Tyriar/1117_reenable_enableBold
Add enableBold back, add fontWeight types to xterm.d.ts
2018-01-25 06:54:45 -08:00
Daniel Imms c1f18c33cc Merge pull request #1192 from Tyriar/master_version
Set version to 3.1.0-master
2018-01-25 06:54:25 -08:00
Daniel Imms 1cceda6052 Change navigation mode to work using focus instead of activedescendant 2018-01-24 16:34:39 -08:00
Daniel Imms 3e734fab79 Support i18n 2018-01-24 11:15:56 -08:00
Daniel Imms c41b35ae9c Add message about entering navigation mode 2018-01-24 11:04:41 -08:00
Saad Malik e478918ea7 Merge branch 'master' into ctrl-alt-sequences 2018-01-24 09:00:26 -08:00
Daniel Imms 3798b28aa2 Merge pull request #1211 from Tyriar/1103_search_wide_emoji
Fix search addon for lines with emojis and wide chars
2018-01-24 07:52:29 -08:00
Daniel Imms e539a59e26 Merge branch 'master' into 1103_search_wide_emoji 2018-01-24 07:33:08 -08:00
npezza93 027bc9535e Pass false for isSelection so the right half of the cell wont select the next element 2018-01-23 20:57:31 -05:00
npezza93 8d41c4c603 Fix lints 2018-01-23 20:12:39 -05:00
npezza93 7e0a484000 Handle going back and up in the alt buffer from a long line to a short line 2018-01-23 20:12:39 -05:00
npezza93 14498104fc Alt+click will move the prompt cursor to that position
Fixes #890
2018-01-23 20:12:39 -05:00
Saad Malik e1c99b28f0 Merge branch 'master' into ctrl-alt-sequences 2018-01-23 11:16:47 -08:00
Daniel Imms 45c6008b27 Rotate terminal rows after removing focus 2018-01-23 11:11:29 -08:00
Daniel Imms a74f7ba196 Merge branch 'master' into 1151_clamp_saved_cursor 2018-01-23 10:48:54 -08:00
Daniel Imms fba4f5f261 Ensure active item is removed before scroll 2018-01-23 10:39:21 -08:00
Daniel Imms bce0cce74d Ensure a11y tree is located above the prompt 2018-01-23 09:50:47 -08:00
Daniel Imms c2d78e57d0 Fix screenReadeMode disable in demo 2018-01-23 09:49:43 -08:00
Daniel Imms 46f35064e3 Merge pull request #1227 from Tyriar/typo_intefaces
Fix Intefaces typo
2018-01-23 09:07:05 -08:00
Daniel Imms 8f263fb987 Merge branch 'master' into typo_intefaces 2018-01-23 09:06:47 -08:00
Daniel Imms f56f4520d0 Merge branch 'master' into 1103_search_wide_emoji 2018-01-23 09:06:06 -08:00
Daniel Imms a13562bf45 Remove relative font weight as valid values 2018-01-23 08:58:33 -08:00
Daniel Imms 067acd8803 Merge branch 'master' into pr/1148 2018-01-23 08:33:55 -08:00
Daniel Imms df02dacdc4 Add enableBold back
Part of #1117
2018-01-23 08:28:01 -08:00
Daniel Imms 4e6b089216 Merge pull request #1119 from nikonso/1117
Support setting font weight
2018-01-23 08:11:27 -08:00
Daniel Imms 01c95168f2 Make font weight types in ITerminalOption more strict 2018-01-23 08:02:48 -08:00
Daniel Imms f3ecbea3e8 Fix tests 2018-01-23 07:55:18 -08:00
Daniel Imms 11aa193074 Merge branch 'master' into 1117 2018-01-23 07:51:25 -08:00
Daniel Imms 2ebc5d904d Resize saved cursor position on buffer resize
Saved cursor coordinates were not being resized as well which could
lead to crashes when resizing down while the alt buffer is active.

Fixes #1151
2018-01-23 06:51:22 -08:00
Saad Malik bb8e06592c Merge branch 'master' into ctrl-alt-sequences 2018-01-22 12:53:45 -08:00
Daniel Imms d85d353772 Merge pull request #1234 from Tyriar/1233_link_activation
Use explicit null check to ensure start/end row is valid
2018-01-22 12:53:00 -08:00
Daniel Imms a9d3e61794 Fix tests 2018-01-22 12:43:42 -08:00
Daniel Imms 16abf71b78 Use explicit null check to ensure start/end row is valid
It looks like this could have caused the inconsistent behavior with
links not activating and then working again after scrolling

Fixes #1233
2018-01-22 11:51:09 -08:00
Daniel Imms 421a885acd Merge remote-tracking branch 'origin/master' into 731_screen_reader 2018-01-22 06:32:38 -08:00
Saad Malik d62e4e25b7 Cleaup whitespace 2018-01-21 16:56:58 -08:00
Saad Malik ec9f2702eb Additional alt and control sequences
* Add punctuation alt sequences
* Add support for ctrl+alt sequences
2018-01-21 16:40:38 -08:00
Daniel Imms f554f53bda Merge pull request #1229 from ColdGrub1384/patch-1
Include Pisth in applications
2018-01-21 10:22:42 -08:00
Daniel Imms 49565c2fcf Merge branch 'master' into patch-1 2018-01-21 10:22:19 -08:00
Daniel Imms a338def801 Merge pull request #1230 from jkuri/abstruse-readme
Add AbstruseCI as real-world example
2018-01-21 10:16:16 -08:00
Jan Kuri a9a1d37a1e Add AbstruseCI as real-world example 2018-01-21 18:49:10 +01:00
Adrian Labbé e55a234b53 Include Pisth in applications 2018-01-20 16:07:31 -03:00
Daniel Imms 4e20b48aa0 Add missing macOptionIsMeta typings
Follow up from #1225
2018-01-20 11:06:53 -08:00
Daniel Imms 616958e2c6 Merge pull request #1225 from saamalik/altIsMeta
Mac OSX: altIsMeta support
2018-01-20 10:15:03 -08:00
Daniel Imms e4726192f1 Various fixes
- altIsMeta -> macOptionIsMeta
- Moved isThirdLevelShift into Terminal class
- Moved option check into isThirdLevelShift so it doesn't affect the Windows
  case and also includes the keypress case
- Add public API and typings test
- Add option checkbox to demo
2018-01-20 09:06:05 -08:00
Daniel Imms 4f59363331 Fix Intefaces typo 2018-01-20 08:22:12 -08:00
Saad Malik 73686e66c6 Remove package-lock changes 2018-01-19 16:51:57 -08:00
Daniel Imms b97cedcf5b Merge remote-tracking branch 'origin/master' into 731_screen_reader 2018-01-19 14:01:37 -08:00
Saad Malik d981a9fe6c Merge branch 'master' into altIsMeta 2018-01-19 12:49:07 -08:00
Daniel Imms 903ec3c910 Merge pull request #1206 from amejia1/master
Fix issue with resizing terminal.
2018-01-19 12:40:18 -08:00
Daniel Imms eb6ff003da Merge branch 'master' into master 2018-01-19 12:34:43 -08:00
Daniel Imms 6e3cd2cb23 Fix indentation 2018-01-19 12:34:32 -08:00
Saad Malik ec8593fe46 Merge branch 'master' into altIsMeta 2018-01-19 12:32:06 -08:00
Saad Malik 891fbd6b80 Mac OSX: altIsMeta support
* Support for altIsMeta option
* Instead of providing third-level shift characters
* Sample demo application using new altIsMeta option
2018-01-19 12:10:39 -08:00
Daniel Imms 39fcbe61c0 Improve announcement on focus 2018-01-19 10:52:03 -08:00
Daniel Imms e4abd4dd8a Move Shared interfaces into a new typings file
This will enable sharing the internal interface with addons (and catching
breakages early)
2018-01-19 09:48:33 -08:00
Daniel Imms 78a63d4860 Simplify interfaces, reduce duplication 2018-01-19 09:48:33 -08:00
Daniel Imms 47df04976c Base ITerminal on interface in .d.ts
Part of #1221
2018-01-19 09:48:33 -08:00
Daniel Imms d33c340de5 Merge pull request #1222 from Tyriar/1220_addon_types
Use Terminal types from xterm.d.ts in Addons
2018-01-19 09:34:44 -08:00
Daniel Imms 57a9948e8d Use Terminal typings in remaining addons
Fixes #1220
2018-01-19 09:30:24 -08:00
Daniel Imms ec17fb9179 Use Terminal type in attach, fit and fullscreen 2018-01-19 09:30:24 -08:00
Daniel Imms 682eb2f861 Use Terminal public API type in search addon
Part of #1220
2018-01-19 09:30:24 -08:00
Daniel Imms a9f69965fe Merge pull request #1223 from zhaojh329/master
Add rtty to the real-world uses section of README
2018-01-18 21:40:55 -08:00
Jianhui Zhao 1f79860aaf Add rtty to the real-world uses section of README
A reverse proxy WebTTY. It is composed of the client and the server.

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-01-19 10:57:51 +08:00
Andres Mejia 5133f25fb7 Fix issue with resetting terminal.
Ensure new BufferSet is used and clear selection manager on reset.
2018-01-18 17:48:29 -05:00
Daniel Imms cfd00529eb Various fixes
- Add buffers being retained on full reset (CIS)
- Remove setup event, simplify
- Only have one trim listener active at once
- Disallow activate events if nothing changed (just in case)
2018-01-18 17:48:29 -05:00
Andres Mejia a9b7ef5dc3 Clear selection manager when the terminal switches its buffer set or buffer. 2018-01-18 17:48:29 -05:00
Andres Mejia 90c8c85c09 Fix issue with resizing terminal.
Need to ensure the active buffer is always being used.
Fixes https://github.com/xtermjs/xterm.js/issues/824 .
2018-01-18 17:48:28 -05:00
Bruno Ribeiro 9f8098c55b Merge branch 'master' into feature-778 2018-01-18 21:10:50 +00:00
Bruno Ribeiro b8f2832ed4 Merge branch 'master' into 1117 2018-01-18 21:10:09 +00:00
Daniel Imms 2f5029205d Merge pull request #1214 from Tyriar/fix_lint
Fix lint, update tslint and add more tslint rules
2018-01-18 12:28:02 -08:00
Daniel Imms 0645fe582f Fix missing space 2018-01-18 12:27:07 -08:00
Daniel Imms 9c4ef2fd86 Merge remote-tracking branch 'origin/master' into fix_lint 2018-01-18 12:11:21 -08:00
Daniel Imms 8d5ed6fc75 Merge pull request #1197 from blink1073/fix-typings
Ship the declaration files
2018-01-18 12:03:33 -08:00
Daniel Imms 1b48f2cd6d Merge branch 'master' into fix-typings 2018-01-18 11:56:10 -08:00
Daniel Imms 15dd1e6bec Merge pull request #1217 from Tyriar/1216_invalidate_cursor
Fix cursor lagging behind when blink is on
2018-01-18 10:54:26 -08:00
Daniel Imms b4b4456225 Merge branch 'master' into 1216_invalidate_cursor 2018-01-18 10:54:18 -08:00
Daniel Imms b89f9666e6 Merge pull request #1218 from Tyriar/travis_osx
Remove OSX from travis
2018-01-18 10:54:02 -08:00
Daniel Imms 2253e666e7 Remove OSX from travis
Builds take too long on free tier
2018-01-18 09:39:32 -08:00
Daniel Imms 777603b5cd Merge branch 'master' into 1216_invalidate_cursor 2018-01-18 09:01:27 -08:00
Daniel Imms 0379ef7bc7 Merge pull request #1215 from markus-oberhumer/ctrl-pageup-pagedown
Add support for modifiers for PageUp / PageDown keys.
2018-01-18 07:58:31 -08:00
Daniel Imms b1beee3595 Fix cursor lagging behind when blink is on
Fixes #1216
2018-01-18 07:54:45 -08:00
Markus F.X.J. Oberhumer 83921c0b26 Add support for modifiers for PageUp / PageDown keys.
This allows using Ctrl-PageUp/Down and Alt-PageUp/Down.
2018-01-18 09:23:05 +01:00
Daniel Imms 0f04f9fbb4 Rotate rows to ensure an item will be read in nav mode when scrolling 2018-01-17 14:10:03 -08:00
Daniel Imms abfa58fca9 Keep track of nav mode focused element 2018-01-17 10:52:12 -08:00
Daniel Imms 4588d15738 Add more tslint rules, fix attach addon 2018-01-17 10:40:42 -08:00
Daniel Imms 307dd0fd68 Add several tslint rules 2018-01-17 10:32:35 -08:00
Daniel Imms 53e1f83bb5 Update tslint, fix lint 2018-01-17 10:23:27 -08:00
Daniel Imms 70236f6818 Fix addon lint 2018-01-17 10:20:04 -08:00
Daniel Imms 78d734117b Support aria posinset and setsize 2018-01-17 09:56:57 -08:00
Daniel Imms f48da12c16 Prevent event propagation when handled by nav mode 2018-01-16 11:24:19 -08:00
Daniel Imms 3fa4b4941f Support nav mode pgup/pgdown/end/home, check boundaries 2018-01-16 11:01:45 -08:00
Daniel Imms 222c42f7ea Expose screen reader and navigation mode on demo/API 2018-01-16 10:29:40 -08:00
Daniel Imms 34eb08952c Fix RenderDebouncer not refreshing whole viewport when asked 2018-01-16 10:26:09 -08:00
Daniel Imms e9b55930d8 Fix test mocks 2018-01-16 10:12:37 -08:00
Daniel Imms 1e9fb8696a Merge remote-tracking branch 'origin/master' into 731_screen_reader 2018-01-16 09:56:19 -08:00
Daniel Imms 5888cd7938 Merge pull request #1210 from Tyriar/1194_initial_cursorBlink
Ensure renderer uses latest options at open
2018-01-16 09:21:39 -08:00
Daniel Imms 0e870d106f Fix search for emojis
Fixes #1103
2018-01-16 07:26:03 -08:00
Daniel Imms 8d3bdad7e4 Fix search for wide unicode
Part of #1103
2018-01-16 07:06:10 -08:00
Daniel Imms f02ead309b Merge branch 'master' into 1194_initial_cursorBlink 2018-01-16 06:45:58 -08:00
Daniel Imms 80f13792a3 Ensure renderer uses latest options at open
Fixes #1194
2018-01-16 06:34:22 -08:00
Paris Kasidiaris 691f8a7567 Merge pull request #1199 from ficristo/umd-addons
Make addons UMD compatible
2018-01-15 22:11:21 +02:00
Daniel Imms 81b4d8fe9c Dispose of NavigationMode when AccessibilityManager is 2018-01-14 13:42:36 -08:00
Daniel Imms 23bd60a733 Properly dispose of disposables 2018-01-14 13:28:43 -08:00
Daniel Imms 85c02f10bf Improve dispoable listener functions 2018-01-14 13:18:00 -08:00
Daniel Imms 70489e5035 Move navigation mode stuff into its own class 2018-01-14 12:59:57 -08:00
ficristo 46f684621c Merge branch 'master' into umd-addons 2018-01-14 20:24:52 +01:00
Daniel Imms adcbb1ae3f Merge pull request #1207 from amejia1/new-use-case
Add use case for atom-xterm.
2018-01-13 20:55:41 -08:00
Andres Mejia a7101b5bcb Add use case for atom-xterm. 2018-01-13 15:34:05 -05:00
Daniel Imms 1e41b11319 Remove logs 2018-01-12 21:15:53 -08:00
Daniel Imms cc80114748 Merge pull request #1205 from jluk/patch-1
Include cloud shell in xterm applications
2018-01-12 17:41:08 -08:00
Justin Luk 5a147f201f Include cloud shell in xterm applications 2018-01-12 15:13:19 -08:00
Daniel Imms 2a187a26e0 Update a11y rows on scroll 2018-01-11 23:15:02 -08:00
Daniel Imms 2311d7d66b Add basic navigation mode support for current viewport 2018-01-11 22:56:19 -08:00
Daniel Imms bbc9a010b9 Listen to dpr change in a11y manager 2018-01-11 09:27:37 -08:00
Bruno Ribeito b75f52734d Use Web audio API 2018-01-08 20:53:26 +00:00
Daniel Imms a19b05f813 Fix bad type check that caused rows to not refresh 2018-01-08 09:53:06 -08:00
ficristo b7c0ca11fe Make addons UMD compatible 2018-01-07 09:02:41 +01:00
Daniel Imms e49d844284 Add note in README about code structure 2018-01-06 13:46:27 -08:00
Daniel Imms d0ef868215 Refactor char atlas to enable generation with worker
This doesn't actually add workers but it separates the code nicely
such that the minimal amount of relevant code can be pulled in by
worker code.

Part of #955
2018-01-06 13:43:34 -08:00
Steven Silvester a36a17928d Ship the declaration files 2018-01-06 07:18:07 -06:00
Daniel Imms 50ed83ca64 Set version to 3.1.0-master
This will make it clear in bug reports etc. when someone is running off
master and not 3.0.
2018-01-05 14:40:41 -08:00
Daniel Imms c46304c716 Merge remote-tracking branch 'origin/master' into 731_screen_reader 2018-01-05 14:28:08 -08:00
Daniel Imms be18507df6 Merge pull request #1172 from Tyriar/1118_dpi_change
Update charatlas when monitor DPI changes
2018-01-05 14:24:12 -08:00
Daniel Imms f6da87f3b4 Merge remote-tracking branch 'origin/master' into 1118_dpi_change 2018-01-05 14:19:21 -08:00
Daniel Imms 248fbccfd9 Remove console.log 2018-01-05 14:18:16 -08:00
Daniel Imms eac14a149f Merge pull request #1144 from Tyriar/880_renderer_pause
Use IntersectionObserver to turn off renderer when hidden
2018-01-05 14:16:10 -08:00
Daniel Imms d90f48b210 Merge branch 'master' into 880_renderer_pause 2018-01-05 14:15:26 -08:00
Daniel Imms eb1110e3f5 Merge pull request #1191 from astefanutti/kubebox
Add Kubebox to real-world uses
2018-01-05 13:35:59 -08:00
Antonin Stefanutti 82e7fe5a1b Add Kubebox to real-world uses 2018-01-05 22:12:32 +01:00
Daniel Imms 1bf084921e Merge branch 'master' into 1117 2018-01-05 11:03:50 -08:00
Daniel Imms 25972d1e06 Merge branch 'master' into feature-778 2018-01-05 11:03:33 -08:00
Daniel Imms b3c8923709 Merge branch 'master' into 1117 2018-01-05 11:03:24 -08:00
Daniel Imms 13d1020308 Merge pull request #1137 from damz/pr/parser-escape-state
Fix parser not resetting state for some escape sequences
2018-01-05 11:02:24 -08:00
Daniel Imms b98f10625f Merge branch 'master' into pr/parser-escape-state 2018-01-05 11:02:14 -08:00
Daniel Imms 09605dba16 Merge pull request #1142 from Tyriar/1067_fix_cursor_on_right
Fix cursor on scroll bar
2018-01-05 11:01:30 -08:00
Daniel Imms 1509f88dbf Merge branch 'master' into 1067_fix_cursor_on_right 2018-01-05 11:01:21 -08:00
Daniel Imms 884c7c631d Merge branch 'master' into 880_renderer_pause 2018-01-05 11:01:06 -08:00
Daniel Imms b66578a4ca Merge branch 'master' into 880_renderer_pause 2018-01-05 11:00:11 -08:00
Daniel Imms b0b6c8d878 Merge branch 'master' into transparency 2018-01-05 10:58:59 -08:00
Daniel Imms 9f1f86c316 Merge pull request #1168 from Tyriar/1152_npe_selection_manager_2
Prevent dragging from setting selection y over bounds
2018-01-05 10:58:40 -08:00
Daniel Imms 80a1c2bd50 Merge branch 'master' into 1152_npe_selection_manager_2 2018-01-05 10:58:22 -08:00
Daniel Imms 09139cc350 Merge pull request #1177 from electerm/add-electerm-use-case
add Real-world use: electerm
2018-01-05 10:56:08 -08:00
Daniel Imms 019eb30b68 Merge pull request #1180 from Tyriar/1179_alt_backspace
Allow alt+backspace to delete a word
2018-01-05 10:55:57 -08:00
Daniel Imms 58f80c404f Merge branch 'master' into add-electerm-use-case 2018-01-05 09:14:37 -08:00
Daniel Imms 22f860536d Merge branch 'master' into add-electerm-use-case 2018-01-05 09:13:55 -08:00
Daniel Imms e9ec1bda3d Merge branch 'master' into 1179_alt_backspace 2018-01-05 09:13:32 -08:00
Daniel Imms 9a743ef301 Merge pull request #1188 from xtermjs/Tyriar-patch-1
Remove repo redirect from package.json
2018-01-05 09:12:44 -08:00
Daniel Imms 0de2d3846a Merge branch 'master' into Tyriar-patch-1 2018-01-05 09:12:30 -08:00
Daniel Imms a490051dda Merge pull request #1190 from Tyriar/fix_typings
Publish typings dir to npm
2018-01-05 08:38:00 -08:00
Daniel Imms edc80acd4d Publish typings dir to npm 2018-01-05 08:32:07 -08:00
Daniel Imms 0dd9b8d025 Remove repo redirect from package.json 2018-01-05 08:20:40 -08:00
Daniel Imms e20d2caa0e Use consistent refresh/render method names 2018-01-05 08:19:30 -08:00
Paris Kasidiaris 6b98d0999b Bump version to 3.0.0
Signed-off-by: Paris Kasidiaris <paris@sourcelair.com>
2018-01-05 16:17:34 +00:00
Daniel Imms a846e8c08d Pull render animation frame logic into a helper class 2018-01-05 08:15:21 -08:00
Daniel Imms c332aeb51f Remove obsolete code and resolved TODOs 2018-01-05 07:51:22 -08:00
Daniel Imms bb830eb1ae Rate limit row refresh, tweak live region 2018-01-05 07:39:45 -08:00
Daniel Imms 57c4571204 Merge pull request #1186 from xtermjs/tyriar/merge_v3_to_master
Merge v3 into master
2018-01-05 06:54:10 -08:00
Daniel Imms 6580cdec6b Merge remote-tracking branch 'origin/master' into tyriar/merge_master_to_v3
This pulls in PR #933 which was merged in error to master not v3 and also 2.9.2
release stuff.
2018-01-04 12:36:46 -08:00
Daniel Imms 49b1b381a1 Merge pull request #1183 from xtermjs/Tyriar-patch-1
Fix travis badge
2018-01-04 11:45:00 -08:00
Daniel Imms e8b787d057 Fix travis badge
It points at sourcelair/xterm.js and doesn't redirect
2018-01-04 11:43:15 -08:00
Daniel Imms 6d1064fc01 Set height of a11y rows on creation 2018-01-03 10:08:24 -08:00
Daniel Imms 5ca15cfe3b Fix linefeed event
This was causing new lines to join words together
2018-01-03 09:54:06 -08:00
Daniel Imms 17964a517c Add screenReaderMode to typings 2018-01-03 09:28:24 -08:00
Daniel Imms 8cb7a9dabe Merge remote-tracking branch 'origin/v3' into 731_screen_reader 2018-01-03 09:09:42 -08:00
Daniel Imms 0819759814 Allow alt+backspace to delete a word
Fixes #1179
2018-01-02 10:33:17 -08:00
Daniel Imms ecc1055c10 Listen to resolution media query 2018-01-02 10:11:24 -08:00
Paris Kasidiaris 490e46ce0c Merge pull request #1178 from xtermjs/fix-fit-addon
Fix "exports" typo
2018-01-02 16:52:41 +02:00
Paris Kasidiaris bc3984a0bf Fix "exports" typo 2018-01-02 12:49:44 +02:00
ZHAO Xudong ac1023dac6 add Real-world use: electerm 2018-01-02 14:45:43 +08:00
Daniel Imms 72d946e089 Use a more robust solution to changing devicePixelRatio 2017-12-29 13:54:01 -08:00
Daniel Imms 478c054075 Merge pull request #1169 from npezza93/move-selection-event
Move selection event emission to the terminal object
2017-12-29 08:37:44 -08:00
Daniel Imms ef5beb6706 Update charatlas when monitor DPI changes
Fixes #1118
2017-12-29 08:30:13 -08:00
npezza93 f65aeba684 Override MockTerminals emit to do nothing 2017-12-27 13:53:27 -05:00
npezza93 4d16c5e9e8 Move selection event emission to the terminal object 2017-12-27 11:36:05 -05:00
Daniel Imms cf2116ff6a Prevent dragging from setting selection y over bounds
Fixes #1152
2017-12-27 08:08:28 -08:00
Daniel Imms 8c4e6b0e5b Merge pull request #1166 from Tyriar/1165_bellSound_exception
Prevent exception when setting bellSound before open
2017-12-27 06:15:14 -08:00
Daniel Imms 2660e0ecff Merge pull request #1163 from Tyriar/1018_applyaddon_types
Add applyAddon typings
2017-12-27 06:15:02 -08:00
Daniel Imms f24a94b341 Move syncBellSound after helperContainer init 2017-12-26 04:06:00 -08:00
Daniel Imms 5dc38008f3 Fix test 2017-12-26 02:43:28 -08:00
Daniel Imms 98d25607a9 Prevent exception when setting bellSound before open
Fixes #1165
2017-12-26 02:22:09 -08:00
Daniel Imms 55f885809e Improve doc 2017-12-21 15:18:03 -08:00
Daniel Imms 37a1220ee7 Add applyAddon typings
Part of #1018
See #1130
2017-12-21 13:59:27 -08:00
Daniel Imms 9518d20c4e Merge pull request #1160 from Tyriar/1159_linefeed
Make lineFeed event lowercase
2017-12-20 15:46:59 -08:00
Daniel Imms 5dc57a1305 Add detach logic back for mac only 2017-12-20 11:06:32 -08:00
Thomas Zilz b4e52b2334 Fix fit() sizing and also support letterSpacing, enhanced (#1157)
Fixes #1081

* Make sure character dimensions are available right after calling term.open()
* Do not assume var assignments are global anymore, webpack will isolate them
* Use DocumentFragment to build Viewport and helpers before attaching them to the DOM
* Shield term.focus call from crashing when used before term.open
2017-12-20 20:06:23 +01:00
Daniel Imms 0d65cb3f69 Add max rows to read to handle spam case 2017-12-19 16:27:03 -08:00
Daniel Imms ae957ecb3e Get output reading working on Windows, refresh on window resize 2017-12-19 15:48:58 -08:00
Daniel Imms d03f5b0c2a Range of improvements for macOS VoiceOver 2017-12-19 15:16:28 -08:00
Daniel Imms 0f7365999f Merge pull request #1156 from Tyriar/1155_visual_bell
Remove visual bell API until it's added back
2017-12-19 13:29:48 -08:00
Daniel Imms e5d57b08c8 Merge remote-tracking branch 'ups/v3' into 731_screen_reader 2017-12-19 13:28:31 -08:00
Daniel Imms 83ef7668be Merge remote-tracking branch 'ups/v3' into 1159_linefeed 2017-12-19 13:26:48 -08:00
Daniel Imms aaf0991195 Make lineFeed event lowercase
Fixes #1159
2017-12-19 13:25:26 -08:00
Daniel Imms 399779692d Initial prototype 2017-12-19 12:57:58 -08:00
Paris Kasidiaris 8263b5f0ba Merge pull request #1130 from xtermjs/applyaddon
New addon system: `applyAddon`
2017-12-18 21:44:00 +02:00
Daniel Imms c1d20afc64 Remove visual bell API until it's added back
Fixes #1155
2017-12-18 10:15:30 -08:00
Paris Kasidiaris da604ff69c Fix webpack task in Gulp and fit add-on 2017-12-16 11:29:12 +02:00
Daniel Imms eeda380b67 Merge pull request #1149 from flumm/proxmox
add proxmox ve to real-world uses
2017-12-15 06:44:12 -08:00
CHaBou 9c5aaed441 Fix some function parameters 2017-12-15 00:02:37 +01:00
CHaBou 9f85790ad1 Add allowTransparency option
Fixes #1004
2017-12-14 22:55:01 +01:00
Dominik Csapak 41c2c07a74 add proxmox ve to real-world uses 2017-12-12 16:19:58 +01:00
Paris Kasidiaris 80450450e9 Export zmodemAttach 2017-12-12 10:50:18 +02:00
Paris Kasidiaris c9b672e0c6 Simplify fit addon 2017-12-12 10:47:58 +02:00
Paris Kasidiaris 8830820821 Update demo to use Webpack 2017-12-12 08:46:06 +00:00
Paris Kasidiaris e39d10e12f Fix exports 2017-12-12 08:46:06 +00:00
Paris Kasidiaris 6fec430e32 Fix tests 2017-12-12 08:46:06 +00:00
Paris Kasidiaris d81e304ce7 Export static methods wherever possible 2017-12-12 08:46:06 +00:00
Paris Kasidiaris 052dc15d55 Update README once more 2017-12-12 08:46:06 +00:00
Paris Kasidiaris 8d54735321 Fix README.md 2017-12-12 08:46:06 +00:00
Paris Kasidiaris 31cc0c30c1 Update README.md 2017-12-12 08:46:06 +00:00
Paris Kasidiaris 510de73996 Port addons to new applyAddon API and TypeScript 2017-12-12 08:46:06 +00:00
Paris Kasidiaris 2547858efb Remove "debugging" allowJs 2017-12-12 08:46:06 +00:00
Paris Kasidiaris 4c4684295e First PoC of .applyAddon 2017-12-12 08:46:06 +00:00
Daniel Imms 47a50acc55 Use IntersectionObserver to turn off renderer when hidden
Fixes #880
2017-12-11 15:16:13 -08:00
Daniel Imms 616f0f9d36 Fix cursor on scroll bar
Fixes #1067
2017-12-11 10:13:17 -08:00
Damien Tournoud 981da3d9e6 Fix parser not resetting state for some escape sequences 2017-12-02 20:45:23 -08:00
Daniel Imms 4f144dc6eb Merge pull request #1121 from Tyriar/841_remove_geometry
Remove geometry
2017-11-21 09:00:57 -08:00
Bruno Ribeito 6822070222 Fix typo + Cleanup logic 2017-11-12 23:15:09 +00:00
Bruno Ribeito 51de968fde Fix non-white colors not being drawn as bold 2017-11-12 23:05:27 +00:00
Bruno Ribeito f12eb5367b Adress feedback 2017-11-12 22:04:10 +00:00
Bruno Ribeito 007410995a Fix#1117 2017-11-12 22:04:10 +00:00
Daniel Imms 3638eb2d4f Merge pull request #1125 from Tyriar/logo
Add new logo to README
2017-11-10 13:55:16 -08:00
Daniel Imms 0c81ec7e95 Add new logo to README 2017-11-10 13:01:01 -08:00
Daniel Imms bc424b2f37 Merge pull request #1097 from jdanbrown/pr-bracketedpaste
Support bracketed paste mode
2017-11-09 11:05:05 -08:00
Daniel Imms 0b90feab1e Remove geometry
Fixes #841
2017-11-09 10:02:28 -08:00
Bruno Ribeito 18b86a1cbc Do the selection even if there is already a selection 2017-11-08 23:27:00 +00:00
Daniel Imms b798463d27 Merge pull request #1113 from bmf-ribeiro/selection-event-1093
Expose a selection event
2017-11-07 13:56:07 -08:00
Bruno Ribeito 2865d935b6 Adress feedback 2017-11-07 21:21:44 +00:00
Bruno Ribeito fc7cf6b917 Adress feedback 2017-11-07 21:08:21 +00:00
Paris Kasidiaris a6899c74d8 Merge pull request #1076 from FGasper/zmodem
Zmodem addon
2017-11-07 16:44:01 +02:00
Daniel Imms 935e972348 Merge pull request #1112 from bmf-ribeiro/FIX_#800
Pull wcwidth into its own file
2017-11-06 21:16:50 -08:00
Bruno Ribeito 1877e7019d Implement #778 2017-11-06 23:20:57 +00:00
Bruno Ribeito 923bb05b8d Fix #1093 2017-11-06 21:02:53 +00:00
Bruno Ribeito 354b857bbe Fix spacing 2017-11-06 20:40:28 +00:00
Bruno Ribeito e18416a636 Fix #800 2017-11-06 20:11:23 +00:00
Daniel Imms b0020fc0ac Merge pull request #1106 from EmbeddedEnterprises/v3
Fix deleteChars not updating the view
2017-11-06 10:22:43 -08:00
Daniel Imms c90c24cecf Merge pull request #1109 from Tyriar/1029_fix_end_selection
Fix last column selection problems
2017-11-06 07:43:20 -08:00
Daniel Imms 0637191d77 Merge pull request #1108 from bmf-ribeiro/v3
Fix #948
2017-11-06 06:53:57 -08:00
Daniel Imms 95de0e83b9 Merge pull request #1105 from Tyriar/1080_interface_export
Export interfaces in typings
2017-11-05 17:08:10 -08:00
Bruno Ribeito 9c4ff54f22 Fix review comments 2017-11-05 21:13:54 +00:00
Daniel Imms 8478aa7a51 Fix selection on bottom right char when mouse goes outside viewport
Part of #1029
2017-11-05 12:18:59 -08:00
Daniel Imms dbec3a32f8 Fix selecting of last column
Fixes #1029
2017-11-05 12:06:25 -08:00
Bruno Ribeito b7438d57cf Fix #948 2017-11-05 15:11:02 +00:00
Martin Koppehel 4b46a777d7 Fix deleteChars not updating the view
When deleting a character in a line and moving the cursor to
another line afterwards, the deletion is not rendered.
This commit adds the line where the character was deleted
to the refresh range to enforce an update
2017-11-05 10:31:35 +01:00
Daniel Imms 3921457bf3 Merge pull request #1104 from Tyriar/902_scrollLines_api
Replace scrollDisp with the more descriptive scrollLines
2017-11-04 20:43:06 -07:00
Daniel Imms 86653f70a8 Export interfaces in typings
Fixes #1080
2017-11-04 20:41:03 -07:00
Felipe Gasper b96286be51 remove bundled zmodem.js and symlinked CSS 2017-11-04 08:36:51 -04:00
Daniel Imms 05cbe41d39 scrollDisp -> scrollLines
Fixes #902
2017-11-04 03:20:24 -07:00
Felipe Gasper 54f616623a cleaner syntax for start-zmodem 2017-11-02 19:07:43 -04:00
Felipe Gasper 6cefa13a4e Merge branch 'v3' into zmodem 2017-11-02 19:05:30 -04:00
Felipe Gasper e262ba473e include build 2017-11-02 19:03:52 -04:00
Felipe Gasper 280a100c12 revert changes to mainline demo; have separate addon demo 2017-11-02 18:33:00 -04:00
Daniel Imms d9e9fa3ff7 Merge pull request #1094 from Tyriar/1089_open_parent_visible
Clarify that parent needs to be visible when calling open
2017-11-01 08:47:53 -07:00
Daniel Imms aaa7e91855 Merge pull request #1091 from Tyriar/1090_force_selection
Don't send mouse events when selection is forced
2017-11-01 08:46:38 -07:00
Daniel Imms 3d9aefbb2d Merge pull request #1096 from Tyriar/winptyCompat
Add winptyCompat addon
2017-11-01 08:46:22 -07:00
Daniel Imms e2910ca5c8 Merge pull request #1088 from Tyriar/node-pty-upgrade
Upgrade node-pty to 0.7.2
2017-11-01 08:46:09 -07:00
Paris Kasidiaris 36a155dd1a Merge pull request #1065 from exsilium/iPadHWArrowsV3
Apple iPad - Smart Keyboard Arrows - v3
2017-10-31 12:12:12 +02:00
Daniel Imms 8cb410bd9c Merge pull request #1099 from Tyriar/1089_init_scaled_vars
Initialize scaled dimension variables
2017-10-30 12:37:37 -07:00
Daniel Imms 79cdaa8d3b Initialize scaled dimension variables
Fixes #1089
2017-10-30 11:21:22 -07:00
Dan Brown 1dbcf70cee Support bracketed paste mode
- As described in https://cirw.in/blog/bracketed-paste
- Example support in vim:
  - https://github.com/ConradIrwin/vim-bracketed-paste/blob/master/plugin/bracketed-paste.vim
  - http://vimdoc.sourceforge.net/htmldoc/term.html#raw-terminal-mode
- Required for e.g. ipython, via python-prompt-toolkit:
  - https://github.com/ipython/ipython
  - https://github.com/jonathanslenders/python-prompt-toolkit

Repro:
- Run `ipython` (version 6.2.1)
- Copy multiple lines of text and paste into ipython prompt, e.g.
```py
print(1)
print(2)
print(3)
```
- Before: first line would paste and run, and subsequent lines are lost
- After: all lines paste into single prompt
2017-10-30 00:26:50 -07:00
Felipe Gasper 29143baa3a a bit lighter: no submit 2017-10-29 17:26:23 -04:00
Felipe Gasper 11c9dd3288 revert changes, update to latest node-pty 2017-10-29 15:34:23 -05:00
Felipe Gasper 9a8916ff77 pare back changes 2017-10-29 15:25:06 -05:00
Felipe Gasper cb7c6151e8 compile zmodem extension in gulp 2017-10-29 15:21:22 -05:00
Daniel Imms aa5a9911de Base wrapped line on current width, not original width
Lines are never trimmed, so even if the term's size is reduced it
could contain empty lines at the end when wrapping is valid
2017-10-29 13:16:29 -07:00
Daniel Imms d7f6f96ba6 Add winptyCompat addon typings 2017-10-29 13:01:38 -07:00
Daniel Imms 2fbc0be98d Fix build issues 2017-10-29 12:45:37 -07:00
Daniel Imms 664c0f0f77 Clarify that parent needs to be visible when calling open
Fixes #1089
2017-10-28 17:44:15 -07:00
Felipe Gasper 0ca1318284 too much work … just find a way to concatenate 2017-10-27 21:10:23 -05:00
Felipe Gasper f2befc0c06 document the new opts/flag 2017-10-27 20:17:27 -05:00
Felipe Gasper 6c3af6e19a provide for better compatibility with attach.js 2017-10-27 20:14:18 -05:00
Daniel Imms d81df46453 Don't send mouse events when selection is forced
Fixes #1090
2017-10-27 16:48:00 -07:00
Felipe Gasper a90493a9af Merge branch 'v3' into zmodem 2017-10-27 17:58:01 -05:00
Felipe Gasper 5c81fe6cdc pare down some changes 2017-10-27 17:54:36 -05:00
Daniel Imms 59759c718b node-pty@0.7.2 2017-10-27 11:33:05 -07:00
Daniel Imms 700a10f3f4 Initial winptyCompat addon 2017-10-27 10:23:46 -07:00
Daniel Imms 8ece306dbe Merge pull request #1084 from Tyriar/1079_theme_exception
Fix exception when setting theme
2017-10-27 10:14:43 -07:00
Daniel Imms a27a4e627e Add test for not setting bg in theme 2017-10-25 21:28:19 -07:00
Daniel Imms 2fc723b3ac Fix exception when setting theme
Fixes #1079
2017-10-25 21:24:44 -07:00
Felipe Gasper 1586363b2e Merge branch 'v3' into zmodem 2017-10-25 07:30:04 -05:00
Daniel Imms c2b3853aa7 Merge pull request #1078 from Tyriar/vsc36328
Add null check in MouseZoneManager._findZoneEventAt
2017-10-24 10:19:55 -07:00
Daniel Imms 65afb34b8b Merge pull request #1072 from Tyriar/1071_typing_pollution
Move interfaces in types inside module
2017-10-23 13:36:05 -07:00
Daniel Imms ac71f13361 Add null check in MouseZoneManager._findZoneEventAt
See Microsoft/vscode#36328
2017-10-23 11:54:49 -07:00
Felipe Gasper 3d2687768f no abort; instead skip 2017-10-22 16:20:01 -05:00
Paris Kasidiaris d3b25364cc Merge pull request #1073 from LukasDrgon/patch-1
Add jsDelivr hits badge
2017-10-21 16:43:43 +03:00
Daniel Imms 5d49db54ee Move interfaces in types inside module
Fixes #1071
2017-10-20 17:28:34 -07:00
Daniel Imms 81b6469aad Merge pull request #1069 from Tyriar/1068_xterm_css_change
Use .xterm over .terminal in CSS
2017-10-20 16:56:38 -07:00
Daniel Imms 1d76cc921a Use .xterm over .terminal in CSS
Fixes #1068
2017-10-19 08:44:00 -07:00
Felipe Gasper 6026bd44c3 put ZMODEM auto-toggle into demo UI 2017-10-19 11:50:36 +02:00
Felipe Gasper 7bc7bb0ab9 no more text-encoding 2017-10-19 11:36:37 +02:00
Daniel Imms 2e8410da4b Merge pull request #1061 from Tyriar/1048_enableBold
Support enableBold option
2017-10-17 15:54:47 -07:00
Daniel Imms cf6c11db14 Merge remote-tracking branch 'origin/v3' into 1048_enableBold 2017-10-17 12:41:13 -07:00
Felipe Gasper ed6e2e5055 Reorder demo components, ensure we hide at end of receive. 2017-10-17 09:28:41 +02:00
Felipe Gasper 1ee6af2f82 Instructions in the demo for ZMODEM. 2017-10-17 08:57:18 +02:00
Felipe Gasper ef62b3bf55 Use zmodem.js from npm rather than a git submodule. 2017-10-17 08:39:43 +02:00
Felipe Gasper 76faad67d9 Merge branch 'v3' into zmodem 2017-10-17 08:21:33 +02:00
Felipe Gasper a4b06ea86e docs, prune 2017-10-17 08:20:25 +02:00
Felipe Gasper 355d5970a6 Allow attach.js to work 2017-10-16 16:30:29 +01:00
Felipe Gasper a53ca789ea also exclude Terminado 2017-10-16 15:32:46 +01:00
Felipe Gasper 6fa08d3cc0 Make zmodem work again 2017-10-16 15:26:09 +01:00
Felipe Gasper 73b804f42d update subrepo 2017-10-16 15:14:22 +01:00
Felipe Gasper 151eac6f4f prep for addon - find loop 2017-10-16 15:12:07 +01:00
Felipe Gasper a6efda6120 broken cuz moving to addon 2017-10-16 14:43:10 +01:00
Exile 822b31f7b7 Addressing linter errors 2017-10-16 08:02:03 +00:00
Exile 0684e05877 Smart Keyboard Arrows 2017-10-16 07:17:51 +00:00
Felipe Gasper 8346ab12be add missing dependency to package.json 2017-10-15 21:35:09 +01:00
Daniel Imms 00554390e1 Merge pull request #1045 from Tyriar/more_rendering_improvements
More rendering improvements
2017-10-14 23:55:33 -07:00
Lukas Drgon 5cdd1bee42 Add jsDelivr hits badge 2017-10-14 19:25:42 +02:00
Daniel Imms db6695435d Add letterSpacing typings and test 2017-10-13 13:38:28 -07:00
Daniel Imms 899929afc6 Add enableBold typings 2017-10-13 13:30:12 -07:00
Daniel Imms a1fcafd50c Fix default color with bold disabled 2017-10-13 13:20:22 -07:00
Daniel Imms a622b97a94 Support enableBold option 2017-10-13 13:13:38 -07:00
Daniel Imms e86aebaa41 Merge remote-tracking branch 'origin/v3' into more_rendering_improvements 2017-10-13 13:02:38 -07:00
Daniel Imms c1ec68091a Merge pull request #1058 from Tyriar/1057_remove_wcwidth_test
Remove long wcwidth test
2017-10-13 13:00:50 -07:00
Daniel Imms c1ad9dba2a Remove long wcwidth test
Fixes #1057
2017-10-11 22:46:08 -07:00
Daniel Imms b1449880be Merge pull request #1052 from Tyriar/1047_ansi_bright
Fix ansi bright text being bold without bold flag
2017-10-11 19:06:05 -07:00
Thomas Zilz b6c886837f Add support for dimmed characters (faint) (#1043)
* Add support for dimmed character style
2017-10-11 20:24:26 +02:00
Daniel Imms 5e639c75f7 Merge pull request #1051 from Tyriar/blurry_ldpi
Draw from charatlas without changing scale
2017-10-11 07:53:21 -07:00
Daniel Imms a56edd65a7 Fix ansi bright text being bold without bold flag
Fixes #1047
2017-10-10 22:37:13 -07:00
Daniel Imms 09c9cb4508 Draw from charatlas without changing scale
Fixes #1050
2017-10-10 22:19:48 -07:00
Daniel Imms 058de25977 Merge pull request #1030 from Tyriar/fix_selection_model_npe
Add a null check to areSelectionValuesReversed
2017-10-10 07:50:34 -07:00
Daniel Imms eb57cc3e9e Clip rows using the row's cell height, not char height 2017-10-09 20:10:13 -07:00
Daniel Imms 1b2bac7aef Add letterSpacing option
This provides an option for fonts to be more spaced out. This is particularly useful
for fonts that can seem crammed due to not allowing floating point numbers when
drawing, such as Monoid or Operator Mono.
2017-10-09 20:07:30 -07:00
Daniel Imms b06eb44c45 Merge pull request #1034 from Tyriar/1033_ie11_support
Add support back for IE11
2017-10-06 09:27:15 -07:00
Daniel Imms 5bf81934cd Merge pull request #1022 from Tyriar/1020_mouse_events_linkifier
Ensure linkifier cancels mouse event when being handled
2017-10-06 09:23:42 -07:00
Daniel Imms 635cf268d4 Merge pull request #1019 from Tyriar/null_check_cursor_char
Add null check before cursor is drawn
2017-10-06 09:23:17 -07:00
Daniel Imms 3c2614ade7 Merge pull request #1017 from Tyriar/1015_fix_emoji_selection
Fix several issues related to emojis
2017-10-06 09:23:03 -07:00
Daniel Imms 265057a716 Merge pull request #1038 from Tyriar/rendering_improvements
Rendering improvements
2017-10-06 09:09:37 -07:00
Daniel Imms 06b9f1db87 Always draw entire line and allow overlapping
State/diffing code is kept in comments as it may be reinstated soon.

Fixes #1035
Fixes #1036
Fixes #1032
Fixes #1037
2017-10-05 23:25:03 -07:00
Daniel Imms 356a14bb16 Fix non-default backgrounds on left cell of wide/overlapping chars
Fixes #1031
2017-10-05 20:30:09 -07:00
Daniel Imms be8ddb11db Add support back for IE11
Fixes #1033
2017-10-05 20:22:05 -07:00
Daniel Imms 108534a4fe Fix null pointer exception 2017-10-05 20:09:17 -07:00
Daniel Imms 0a08d6389a Fix sub-pixel anti-aliasing for uncached text
Fixes #1032
2017-10-05 19:31:07 -07:00
Daniel Imms f36ba01460 Add a null check to areSelectionValuesReversed
See Microsoft/vscode#35601
2017-10-05 11:15:46 -07:00
Daniel Imms 22af08d86e Merge pull request #1028 from Tyriar/1024_fix_windows_build_issue
Normalize tsconfig outDir
2017-10-05 08:35:43 -07:00
Daniel Imms 2ab06779f9 Merge pull request #1026 from Tyriar/1025_fix_link_application_range
Fix links sometimes not getting applied
2017-10-05 08:04:36 -07:00
Daniel Imms 0ac093e19c Merge pull request #1027 from jgillich/patch-1
remove import file extension
2017-10-05 07:58:00 -07:00
Daniel Imms e693c9e86b Normalize tsconfig outDir
It was coming out with the wrap path separators on Windows

Fixes #1024
2017-10-05 07:52:34 -07:00
Jakob Gillich 7cfc108fb4 remove import file extension 2017-10-05 01:35:34 +02:00
Daniel Imms 2a126cf1dc Fix links sometimes not getting applied
There was an incorrect comparison which occasionally caused links to
not be picked up.

Fixes #1025
2017-10-04 11:45:13 -07:00
Felipe Gasper 0e732a7d41 Make it work (as well as it may) in Edge 2017-10-03 23:16:12 -04:00
Daniel Imms 66688c19a6 Merge pull request #1023 from ricktbaker/patch-1
Update README.md
2017-10-02 11:37:57 -07:00
Rick Baker 966f5c1f32 Update README.md
Who would have thought that a name could have so much controversy.   I've renamed due to a bunch of flack about devops not logging into servers :)
2017-10-02 13:34:30 -05:00
Daniel Imms ea8bd8dc1c Merge pull request #910 from dcylabs/v3
Fixed selection issue when terminal is in nested scrolled elements
2017-10-02 11:15:45 -07:00
Daniel Imms 56da538ca0 Fix reference to document 2017-10-02 11:12:33 -07:00
Daniel Imms 42d5cb671e Merge remote-tracking branch 'ups/v3' into v3 2017-10-02 11:00:24 -07:00
Daniel Imms 95f68a41d7 Ensure linkifier cancels mouse event when being handled
The terminal mouse events handling code was being run before links were
being considered. This caused clicking link to have unexpected behavior
in mouse mode term apps.

Fixes #1020
2017-10-02 10:42:14 -07:00
Felipe Gasper 4c4c392479 update demo code for package-lock; make package.json build zmodem.js 2017-10-02 09:44:05 -04:00
Felipe Gasper 907d9de965 update demo for zmodemjs changes 2017-10-01 18:23:17 -04:00
Felipe Gasper 6f69207a67 Merge branch 'v3' into zmodem 2017-10-01 12:47:36 -04:00
Daniel Imms 29be4f6a92 Merge remote-tracking branch 'ups/v3' into 1015_fix_emoji_selection 2017-10-01 05:54:10 -07:00
Daniel Imms b1214063d2 Add more complex emoji selection tests 2017-09-30 10:00:18 -04:00
Daniel Imms da4e3e6e9f Improve documentation on word selection 2017-09-30 09:45:11 -04:00
Daniel Imms e0c28bc7d2 Fix selecting words containing ZWJ emojis 2017-09-30 09:32:33 -04:00
Daniel Imms 58259f8bd9 Fix select word on wide characters 2017-09-30 08:30:19 -04:00
Daniel Imms 4828c4a6fa Clean up logs/comments 2017-09-30 08:02:03 -04:00
Daniel Imms 3e29a03f87 Fix rendering issues for emojis that come out as wide chars
The fix is to disallow non-single cell width chars to be overlapping
2017-09-30 07:54:52 -04:00
Daniel Imms fa86f31f36 Fix copying emoji characters on the edge of selection
Fixes #1015
2017-09-30 06:30:14 -04:00
Daniel Imms feb2b958a4 Mostly emoji selection
Selection is not aware of characters that have a size greater than 1.

When the emoji is at the start of the selection it still doesn't work.

Fixes #1015
2017-09-30 06:13:58 -04:00
Daniel Imms e3d69d78a0 Merge pull request #1010 from Tyriar/vscode34466
Add null check when fetching line string
2017-09-30 05:37:11 -04:00
Daniel Imms ef5e393510 Merge pull request #1002 from Tyriar/990_fix_link_issues
Fix link clearing issues
2017-09-30 05:36:48 -04:00
Daniel Imms a9a131699f Merge pull request #1001 from Tyriar/1000_fix_horz_offset
Fix mouse coordinates
2017-09-29 16:17:50 -04:00
Daniel Imms 3813e3f6df Merge pull request #1012 from ricktbaker/patch-1
Update README.md
2017-09-29 16:11:10 -04:00
Rick Baker 499c8288eb Update README.md
Submitting an app for your list.
2017-09-29 14:54:33 -05:00
Daniel Imms 91d22e3d84 Add null check before cursor is drawn 2017-09-28 21:23:27 -04:00
Daniel Imms a8174398f5 Calculate mouse coordinates using correct char dimensions
Previously the Mouse class was using raw CSS pixels, we need CSS pixels based
on the amount of space the cells take up on the canvas

See Microsoft/vscode#35114
2017-09-28 17:23:45 -04:00
Daniel Imms 0dafd0a38b Merge branch 'v3' into 1000_fix_horz_offset 2017-09-28 17:21:37 -04:00
Daniel Imms 13d46476c8 Add null check when fetching line string
See Microsoft/vscode#34466
2017-09-28 14:52:56 -04:00
Felipe Gasper bc2dce7a50 Merge branch 'v3' into zmodem 2017-09-27 10:29:40 -04:00
Felipe Gasper 3f467b33e4 update demo to latest zmodem.js code 2017-09-26 10:31:24 -04:00
Daniel Imms 313d1e6fec Merge pull request #1005 from Tyriar/fix_validation_callback
Fix validation callback to use the uri, not whole row
2017-09-25 13:24:45 -07:00
Daniel Imms a4485b8c09 Merge pull request #999 from Tyriar/vscode34493
Only refresh char atlas when char dimensions are valid
2017-09-25 06:14:58 -07:00
Daniel Imms a2389d5c5b Fix validation callback to use the uri, not whole row 2017-09-24 10:59:38 -07:00
Daniel Imms 8243eef67c Properly clear links
MouzeZoneManager rows are not 0-based

Fixes #990
2017-09-20 12:54:20 +09:00
Daniel Imms 0b54df14e2 Remove unnecessary rounding 2017-09-20 12:16:27 +09:00
Daniel Imms 79c07d436e Fix selection horizontal offset
Fixes #1000
2017-09-20 11:53:19 +09:00
Daniel Imms 40fdd00b9e Correct if statement, ensure charAtlas exists 2017-09-20 09:02:21 +09:00
Felipe Gasper 65f5f1c38c deny() handling 2017-09-18 07:19:22 -04:00
Thomas Zilz c4da8325ac Allow all overflowing characters to extend to the next cell if followed by a space (Emojis etc) (#997)
* Measure characters and thread them if they are overlapping

* Fix whitespace

* Use charData and ctx.save/restore, code cleanup

* Fix trailing whitespace
2017-09-17 10:39:09 +02:00
Thomas Zilz c815310418 Fix inverted cells, make sure inverted cells are cleared correctly (#996)
* Corretly inverse foreground and background. Be more conservative when clearing

* add missing space

* Re-enable optimisation with better checks

* Fix insversed check
2017-09-16 20:36:55 +02:00
Daniel Imms 9b6c4e046f Only refresh char atlas when char dimensions are valid
See Microsoft/vscode#34493
2017-09-16 10:57:49 -07:00
Felipe Gasper 94586b669f update submodule 2017-09-15 03:45:23 -04:00
Felipe Gasper 5f62c7607d progress indicators for send 2017-09-15 03:30:51 -04:00
Felipe Gasper ce681fe481 demo: hide progress after receive 2017-09-15 03:26:54 -04:00
Felipe Gasper cdcedd6b34 updates to factor out more logic to library 2017-09-15 02:31:32 -04:00
Daniel Imms 1f49879298 Merge pull request #989 from Tyriar/986_selection_exception
Ensure mouse coordinates are always within rows/cols
2017-09-14 09:06:44 -07:00
Daniel Imms 691ab2b02c Merge remote-tracking branch 'ups/v3' into 986_selection_exception 2017-09-14 09:06:00 -07:00
Daniel Imms 0cf9f1d536 Fix tests 2017-09-14 09:05:50 -07:00
Daniel Imms 3d743e5bdb Merge pull request #964 from Tyriar/963_cursor_accent
Support theming cursor accent color
2017-09-14 09:03:54 -07:00
Daniel Imms bc824ad6a5 Fix tests 2017-09-14 09:03:41 -07:00
Daniel Imms b9872c9a67 Merge remote-tracking branch 'ups/v3' into 963_cursor_accent 2017-09-14 09:02:32 -07:00
Daniel Imms ea0c2285bc Merge remote-tracking branch 'ups/v3' into 963_cursor_accent 2017-09-14 09:02:00 -07:00
Daniel Imms a611fee7af Merge pull request #976 from Tyriar/975_mousezone_leave
Ensure leave is called when leaving a MouseZone
2017-09-14 09:01:28 -07:00
Daniel Imms c2502bf0b0 Merge pull request #978 from Tyriar/953_user_scrolling_fix
Improve scrolling while user has scrolled up
2017-09-14 09:01:13 -07:00
Daniel Imms e8d784a47d Merge pull request #991 from Tyriar/blurriness_fix
Support sub-pixel anti-aliasing and fix blurry text issues
2017-09-14 08:59:50 -07:00
Daniel Imms 8bdc8fb7a2 Remove log 2017-09-14 01:00:19 -07:00
Daniel Imms aca7ab63e8 Set background color on Renderer immediately
Prevents black flash on init
2017-09-14 00:22:57 -07:00
Daniel Imms c2b765f3ff Redraw background on text layer after a resize 2017-09-13 23:56:35 -07:00
Daniel Imms 068c0743a1 Support non-#000 background colors in char atlas 2017-09-13 23:54:45 -07:00
Daniel Imms 0a58628f74 Clear text layer to the background color on creation
Prevents a black flash before the first draw
2017-09-13 23:49:37 -07:00
Daniel Imms b225866c27 Clear cells properly for text layer 2017-09-13 23:21:24 -07:00
Daniel Imms 872c007a29 Finish merging bg and fg layers 2017-09-13 23:15:21 -07:00
Daniel Imms 402cebc76c Support bold in non cached text drawing
Fixes #987
2017-09-13 22:50:48 -07:00
Daniel Imms 3656617044 Start merging fg/bg layers, draw using SP-AA 2017-09-13 15:21:40 -07:00
Daniel Imms 5538481833 Draw characters to a grid 2017-09-13 15:07:01 -07:00
Daniel Imms a52b9feeea Ensure mouse coordinates are always within rows/cols
Fixes #986
2017-09-13 14:03:40 -07:00
Daniel Imms 136c82f9ad Merge pull request #981 from Tyriar/974_fix_wide_arrow
Treat \u279C arrow as ambiguous width char (like emoji)
2017-09-13 11:01:40 -07:00
Daniel Imms ead45fe4d0 Add a TODO 2017-09-13 10:59:55 -07:00
Daniel Imms 69982dc16a Merge pull request #983 from Tyriar/remove_log
Remove log
2017-09-13 10:54:10 -07:00
Daniel Imms d030206195 Merge pull request #980 from Tyriar/972_decimal_text
Draw text using decimal numbers
2017-09-13 10:53:49 -07:00
Daniel Imms 30cac21003 Remove log 2017-09-13 10:34:58 -07:00
Daniel Imms cd21a24ee4 Merge pull request #982 from Tyriar/970_fix_alt_selection
Fix alt+selection while mouse events are enabled
2017-09-13 10:16:16 -07:00
Daniel Imms 73d3164426 Fix alt+selection while mouse events are enabled
Fixes #970
2017-09-12 20:00:25 -07:00
Daniel Imms cf32452917 Treat \u279C arrow as ambiguous width char (like emoji)
Fixes #974
2017-09-12 19:23:26 -07:00
Daniel Imms 403fd3cd4f Draw text using decimal numbers
Fixes #972
2017-09-12 18:55:59 -07:00
Daniel Imms 6899e01fc1 Improve scrolling while user has scrolled up
Fixes #953
2017-09-12 15:06:23 -07:00
Felipe Gasper 6181262c76 remove debug changes 2017-09-11 22:39:13 -04:00
Daniel Imms 2114bc4837 Ensure leave is called when leaving a MouseZone
Fixes #975
2017-09-11 11:12:51 -07:00
Daniel Imms 1897f0f51a Merge pull request #968 from Tyriar/line_height_fixes
Fix several issues with line height
2017-09-11 09:42:06 -07:00
Felipe Gasper 91aa8c51fc got it 2017-09-11 00:01:07 -04:00
Daniel Imms 903ed1917e Remove viewport test
It's not tightly linked to renderer and depends on devicePixelRatio.
2017-09-10 10:43:33 -07:00
Daniel Imms ac23be134b Simplify viewport 2017-09-10 10:38:08 -07:00
Daniel Imms ae741348a6 Fix several issues with line height
Fixes #966
Fixes #967
2017-09-10 10:31:19 -07:00
Daniel Imms 052e0b5a94 Merge pull request #961 from Tyriar/959_960_link_state
Fix issues with link state
2017-09-10 08:07:23 -07:00
Daniel Imms 6c06d83525 Support theming cursor accent color
Fixes #963
2017-09-10 08:01:16 -07:00
Felipe Gasper e442512087 trying to make it work 2017-09-09 23:12:01 -04:00
Daniel Imms 0e3518409e Fix issues with link state
- Scrolling will now clear the link renderer
- Refreshing a single line will now recalculate only that line

Fixes #959
Fixes #960
2017-09-09 19:06:30 -07:00
Daniel Imms 9bb675462f Merge pull request #956 from marcdumais-work/v3
Add Theia as a "Real World" use of xterm.js
2017-09-08 11:58:27 -07:00
Daniel Imms 948eedba89 Merge pull request #938 from Tyriar/canvas_render
Render using canvas
2017-09-08 11:07:59 -07:00
Daniel Imms 0c19bc9c28 Fix tests 2017-09-08 11:06:15 -07:00
Daniel Imms 75b91c618e Update license text 2017-09-08 10:16:42 -07:00
Marc Dumais e3051ea1dc Add Theia as a "Real World" use of xterm.js 2017-09-08 11:20:43 -04:00
Thomas Zilz 48391c3108 Merge pull request #952 from mofux/delete-line-fix
Fix CSI Ps M to delete the correct line
2017-09-08 14:00:24 +02:00
Paris Kasidiaris 3a8327de66 Merge pull request #949 from vincentwoo/unused-timer
Delete unused timer variables
2017-09-08 11:41:50 +03:00
Daniel Imms ea8dbbd29f Underline links on hover 2017-09-07 10:20:48 -07:00
Thomas Zilz 4eb356f6be Fix CSI Ps M to delete the correct line 2017-09-07 17:13:15 +02:00
Daniel Imms 67962a5e55 typescript@2.4
For string enums
2017-09-07 07:19:48 -07:00
Daniel Imms e960a0a82c Add ILinkMatcherOptions.hoverEndCallback 2017-09-06 16:05:09 -07:00
Daniel Imms 66c891df5b Fix resize adding right padding on demo 2017-09-06 15:36:40 -07:00
Daniel Imms fb90c98f81 Fix blurry text by supporting floating pt devicePixelRatios 2017-09-06 10:36:34 -07:00
Daniel Imms b69ff5d31a Redraw terminal when devicePixelRatio changes 2017-09-06 10:22:33 -07:00
Paris Kasidiaris a883029044 Merge pull request #926 from ficristo/search-fix
Do not browserify xterm again inside search addon.
2017-09-06 20:04:42 +03:00
Vincent Woo 2f168da1dc Delete unused timer variables 2017-09-05 19:14:11 -07:00
Daniel Imms f87213790e Merge branch 'master' into search-fix 2017-09-05 11:30:28 -07:00
Daniel Imms 7b199ac17f Some more documentation 2017-09-04 19:40:49 -07:00
Daniel Imms 5c2d5dcd27 Document methods of BaseRenderLayer 2017-09-04 19:34:57 -07:00
Daniel Imms 1e728d453b Add new API to typings test 2017-09-04 14:19:17 -07:00
Daniel Imms 46b0857ef6 Resolve TODOs 2017-09-04 14:13:41 -07:00
Daniel Imms 0dc24cf800 Move theme setting into setOption API 2017-09-04 13:41:56 -07:00
Daniel Imms 8e07af04e3 Drop support for IE/Opera and indicate latest
Opera uses Blink under the hood so supporting Chrome is basically
supporting Opera
2017-09-04 13:39:35 -07:00
Daniel Imms da1e3b40cc Don't use ImageBitmap on Firefox 2017-09-04 12:59:59 -07:00
Daniel Imms 9506c01824 Add tests for utils/Mouse 2017-09-04 10:27:07 -07:00
Daniel Imms 1f38c2f467 Remove unused file 2017-09-04 09:53:53 -07:00
Daniel Imms 6f6f17f5dc Add tests for ColorManager 2017-09-04 09:52:35 -07:00
Daniel Imms a35cf02208 Add GridCache tests 2017-09-04 09:39:44 -07:00
Daniel Imms 1c3028c59f Work around an emoji bug 2017-09-04 09:23:14 -07:00
Daniel Imms a17950290c Support emoji 2017-09-04 09:04:50 -07:00
Daniel Imms ff31f34551 Add selection to ITheme 2017-09-04 08:14:40 -07:00
Daniel Imms 0bfdff0b39 Theme unfocused cursor using cursor color 2017-09-04 08:09:43 -07:00
Paris Kasidiaris 247b63a0e3 Merge pull request #933 from nebulade/readystate
Check socket state before sending data
2017-09-04 10:23:22 +03:00
Daniel Imms 29a7ee30f3 Fix lint 2017-09-03 22:39:47 -07:00
Daniel Imms e77f1a9287 Use default colors if not defined in a theme
Previous behavior didn't touch them, meaning partial themes could be
inconsistent
2017-09-03 21:52:52 -07:00
Daniel Imms 7934e05083 jsdoc Linkifier 2017-09-03 21:34:48 -07:00
Daniel Imms e123dd1849 Null check if clicking on scroll bar 2017-09-03 21:15:14 -07:00
Daniel Imms 36778186e1 Fix tests 2017-09-03 14:34:50 -07:00
Daniel Imms e518ea04c5 Get tests reporting failures again 2017-09-03 14:21:30 -07:00
Daniel Imms 17731c3de3 Support multiple links in a line, fix Linkifier tests 2017-09-03 13:56:53 -07:00
Daniel Imms b30cb58ff4 Support hover callback in links 2017-09-03 12:47:04 -07:00
Daniel Imms 923ea7247c Get links working on proper coords 2017-09-03 11:39:17 -07:00
Daniel Imms 5619abe12d Basic link support using mouse zone manager 2017-09-03 11:20:29 -07:00
Daniel Imms 2d1a1bfb76 Fix inconsistency with lineHeight 2017-09-03 09:05:26 -07:00
Daniel Imms 48b37453ea Ensure char measure's line height isn't influenced by outside 2017-09-03 08:40:00 -07:00
Daniel Imms bc3470c272 Fix default bold text 2017-09-03 08:06:27 -07:00
Daniel Imms a3297b0017 Fix viewport/background size after char size changed 2017-09-03 07:57:16 -07:00
Daniel Imms deb47e29bf Fix canvas resizing with non-1 lineHeight 2017-09-03 07:41:18 -07:00
Daniel Imms 5a4851630e Prevent updating of invalid terminal row ranges 2017-09-03 07:27:52 -07:00
Daniel Imms fd4e9d8a1b Fix graphical glitch wide chars would leave behind
Wide chars now 'own' the character next to them and are entirely responsible
for drawing and clean up
2017-09-02 23:13:24 -07:00
Daniel Imms 8427f7490d Clear state when resizing as canvases get cleared 2017-09-02 21:13:44 -07:00
Daniel Imms 7973b26e7a Include new options in ITerminalOptions 2017-09-02 19:45:44 -07:00
Daniel Imms c94e87428d Fix CharMeasure getting taller on successive calls 2017-09-02 19:04:07 -07:00
Daniel Imms 7ccac09b6b Fix the composition element's position 2017-09-02 18:41:53 -07:00
Daniel Imms c5a6d96a62 Remove padding from terminal, not support atm 2017-09-02 14:11:21 -07:00
Daniel Imms 4f81cdfe8c Make the terminal background theme aware 2017-09-02 13:59:22 -07:00
Daniel Imms 8039fd35e6 Remove unused CSS, selectionElement 2017-09-02 13:34:01 -07:00
Daniel Imms 24a98f2fa8 Remove rowContainer and children, disable Linkifier 2017-09-02 13:26:05 -07:00
Daniel Imms 66d41feab6 Expose setTheme through .d.ts 2017-09-02 12:31:26 -07:00
Daniel Imms c92a2f964a Support lineHeight 2017-09-02 12:27:09 -07:00
Daniel Imms 9cabb93b8b Organize temporary color handling code 2017-09-02 11:08:43 -07:00
Daniel Imms ee4b71c8e7 Remove Terminal.options.colors
It wasn't being used
2017-09-02 10:51:08 -07:00
Daniel Imms b8732a25a3 Support Safari
Safari lacks support for window.createImageBitmap, fallback to
HTMLCanvasElement in thi case.
2017-09-02 10:37:51 -07:00
Daniel Imms 32a3c9812d Support wide character drawing and cursors 2017-09-02 10:17:49 -07:00
Daniel Imms ae72e1c51e Fix uncached chars bleeding into other cells 2017-09-02 09:49:48 -07:00
Daniel Imms 6dd6d0391f Add cell spacing to char atlas 2017-09-02 00:06:28 -07:00
Daniel Imms 36a723c4cc Fix 256 FG chars 2017-09-01 23:58:34 -07:00
Daniel Imms cf7237d2a4 Fix remaining cursor animation state issues 2017-09-01 23:47:17 -07:00
Daniel Imms 06b54585a1 Fix cursor render when after focusing underline/bar 2017-09-01 23:11:39 -07:00
Daniel Imms f8ece108c6 Rerender cursor if state changes 2017-09-01 23:00:29 -07:00
Daniel Imms 4919c40b57 Add cursor to ITheme 2017-09-01 22:53:21 -07:00
Daniel Imms dc1e727613 Support blurred cursor 2017-09-01 22:42:31 -07:00
Daniel Imms b57b94ad0b Improve focus/blur state, fire only once
Fixes #681
2017-09-01 22:02:12 -07:00
Daniel Imms 6ee8e9126a Remove some old dead code 2017-09-01 21:38:35 -07:00
Daniel Imms 5cd189e2e0 Fix demo pty size 2017-09-01 21:36:20 -07:00
Daniel Imms b0653fec68 Support underline 2017-09-01 21:24:17 -07:00
Daniel Imms 70764a74af Use the proper bg/fg colors for inverse attr 2017-09-01 21:09:07 -07:00
Daniel Imms 1f444b1913 Support invisible attr 2017-09-01 20:51:18 -07:00
Daniel Imms bf95333275 Fix the fit addon 2017-09-01 20:44:41 -07:00
Daniel Imms 2c9dbc6191 Add some jsdoc 2017-09-01 16:58:02 -07:00
Daniel Imms de4fcb9241 Merge render layer interface types 2017-09-01 16:54:26 -07:00
Daniel Imms bc3bdacdaa Add a char atlas cache to allow different styles+reuse across terminals 2017-09-01 16:43:45 -07:00
Daniel Imms 62fea4d3ed Add theme support 2017-09-01 15:50:18 -07:00
Daniel Imms 076156b66e Properly support blinking cursors 2017-09-01 12:59:18 -07:00
Daniel Imms 3fc500b291 Pull cursor animation state management into a helper class 2017-09-01 12:11:07 -07:00
Daniel Imms 882d7e4a30 Add basic support for cursor blinking 2017-09-01 11:34:52 -07:00
Daniel Imms 848c85c1eb Fix more cases where ' ' doesn't have code 2017-08-31 23:28:42 -07:00
Daniel Imms 81d93b8fbf Ensure CharMeasure exposes integers 2017-08-31 23:23:04 -07:00
Daniel Imms 42e5b3473d Don't clear fg char if it's null or ' ' 2017-08-31 23:13:09 -07:00
Daniel Imms 510940389c Provide convenience draw methods that deal with cells 2017-08-31 23:01:17 -07:00
Daniel Imms 9323833fcc Move scaledCharWidth/Height into base render layer 2017-08-31 22:48:08 -07:00
Daniel Imms 6588e9e01b Fix cursor which cursor character is rendered 2017-08-31 22:43:48 -07:00
Daniel Imms 15c73ef94f Add fontSize and fontFamily options 2017-08-31 22:42:39 -07:00
Daniel Imms c88824155f Simplify color generation code 2017-08-31 21:18:55 -07:00
Daniel Imms 1998675dc0 Move char drawing to base and use in cursor layer 2017-08-31 17:29:58 -07:00
Daniel Imms fe7b424ab8 Move char atlas into BaseRenderLayer 2017-08-31 17:20:50 -07:00
Daniel Imms a91380a76f Pull common parts into BaseRenderLayer 2017-08-31 17:13:15 -07:00
Daniel Imms fd18f7cba7 Support basic cursor 2017-08-31 17:02:24 -07:00
Johannes Zellner 4a9143ab31 Check socket state before sending data
Maybe related to #929
2017-08-31 20:26:36 +02:00
Daniel Imms d3650d9d80 Draw selection underneath foreground 2017-08-31 07:54:16 -07:00
Daniel Imms dff3d16831 Support 256 color 2017-08-31 00:25:52 -07:00
Daniel Imms d601f0aec2 Hang on to selection state to avoid redrawing 2017-08-31 00:13:49 -07:00
Daniel Imms 3d1bb2c60f Support selection 2017-08-31 00:09:23 -07:00
Daniel Imms 5953bbab42 Start SelectionRenderLayer 2017-08-30 23:44:52 -07:00
Daniel Imms 7aff45c2dc Remove additional frame skipping as rendering is so fast now 2017-08-30 23:39:33 -07:00
Daniel Imms a224ed7cc7 Move canvas Renderer into folder 2017-08-30 23:06:55 -07:00
Daniel Imms 1291dc5571 Support inverse 2017-08-30 23:05:51 -07:00
Daniel Imms 6a0b9bd209 Only render fg cells if there are changes 2017-08-30 22:55:17 -07:00
Daniel Imms d93a80398d Draw unicode characters 2017-08-30 22:23:25 -07:00
Daniel Imms 129633a66d Only draw background when needed 2017-08-30 22:09:25 -07:00
Daniel Imms 18e1134e61 Tidy up 2017-08-30 21:55:24 -07:00
Daniel Imms 2cb6593b6b Move fg rendering into IRenderLayer 2017-08-30 21:44:41 -07:00
Daniel Imms 5961bdbd9e typescript@2.3.0 for ImageBitmap interface 2017-08-30 21:44:18 -07:00
Daniel Imms 0db42e2056 Pull bg rendering into an IRenderLayer 2017-08-30 21:13:57 -07:00
Daniel Imms 137847e85c Linkify all rows at once to prevent multiple timeout restarts 2017-08-30 19:27:37 -07:00
Daniel Imms 5ce39d3c81 GPU ascii rendering 2017-08-30 19:12:29 -07:00
Daniel Imms e98794a0a7 progress 2017-08-30 17:27:20 -07:00
Daniel Imms 640cd18515 Support bold, underline, fix colors 2017-08-30 17:07:30 -07:00
Daniel Imms c6d4c73c8a Initial prototype 2017-08-30 14:50:16 -07:00
Daniel Imms 575c10114b Merge pull request #931 from Tyriar/930_fix_alt_tab_stops
Properly setup and maintain tab stops for the alt buffer
2017-08-30 08:20:18 -07:00
Daniel Imms a57e511fa3 Properly setup and maintain tab stops for the alt buffer
Fixes #930
2017-08-29 21:08:11 -07:00
Daniel Imms 38c66e7c1a Merge pull request #928 from Tyriar/927_terminal_in_search
Don't include Terminal in search addon
2017-08-29 09:41:31 -07:00
Daniel Imms 5ca7c7e640 Merge pull request #923 from Tyriar/922_fix_scroll_RI
Fix issues with scroll and reverseIndex
2017-08-27 16:45:54 -07:00
Daniel Imms 6b8b32015d Don't include Terminal in search addon
Fixes #927
2017-08-27 10:39:13 -07:00
ficristo 6900b4dadf Do not browserify xterm again inside search addon. 2017-08-26 14:26:51 +02:00
Daniel Imms bc86664726 Improve Buffer.resize to work with uninitialized buffers
Fixes #924
2017-08-25 13:14:30 -07:00
Daniel Imms 54cf30ae68 Remove test files 2017-08-25 12:47:45 -07:00
Daniel Imms 41463d8eb5 Make reverseIndex scroll region-aware
This was causing a issue when scrollback was 0 as the start of the
buffer was getting copied
2017-08-25 12:41:53 -07:00
Daniel Imms a2161532db Fix reverseIndex to work with scroll regions and 0 scrollback 2017-08-25 12:11:20 -07:00
Daniel Imms 9a8b7a4d8d Fix scroll region scrolling with 0 scrollback 2017-08-25 11:26:46 -07:00
Daniel Imms bfdc468d4b Merge pull request #914 from Tyriar/913_mousedown_prop
Allow mousedown even to propagate on right click
2017-08-25 07:44:13 -07:00
Daniel Imms b706383687 Allow mousedown even to propagate on right click
Fixes #913
2017-08-24 11:15:25 -07:00
Daniel Imms 6e9d60d76d Merge pull request #912 from Tyriar/911_negative_scrollback
Prevent scrollback setOption < 0
2017-08-22 10:54:12 -07:00
dcylabs 79c5f64dd4 Merge branch 'v3' of https://github.com/dcylabs/xterm.js into v3 2017-08-22 00:34:07 +02:00
dcylabs 81cbeb1d5a Fixed selection issue when terminal is in nested scrolled elements 2017-08-22 00:34:03 +02:00
Daniel Imms 877e1e5eb3 Prevent scrollback setOption < 0
Fixes #911
2017-08-21 14:30:56 -07:00
dcylabs 75ff924be1 Merge branch 'v3' of https://github.com/dcylabs/xterm.js into v3 2017-08-21 21:29:17 +02:00
dcylabs d69a01193d Fixed selection issue when terminal is in nested scrolled elements 2017-08-21 21:29:05 +02:00
dcylabs e6c1ba29d9 Fixed selection issue when terminal is in nested scrolled elements 2017-08-21 20:44:02 +02:00
dcylabs 725ec80983 Fixed selection issue when terminal is in nested scrolled elements 2017-08-21 20:43:03 +02:00
dcylabs 7f49bd99c2 Fixed selection issue when terminal is in nested scrolled elements 2017-08-21 20:27:17 +02:00
Daniel Imms abe32272dd Merge pull request #909 from Tyriar/898_improve_types
Minor typings tweaks
2017-08-21 10:09:02 -07:00
Daniel Imms 8bc2242d9f Add generic overloads to overloaded functions in d.ts
If we don't have this then tsc will throw errors when passing strings
to the functions, seems wrong to force casting strings to use the
functions, eg. <'bar'>style
2017-08-20 11:45:42 -07:00
Daniel Imms cea3dd60b6 Add cols and rows to d.ts 2017-08-20 11:43:40 -07:00
Daniel Imms 7645bdd418 Merge pull request #899 from Tyriar/898_explicit_typings
Add explicit types
2017-08-20 10:34:38 -07:00
Daniel Imms eda9443b1a Allow null with cursorStyle and bellStyle 2017-08-20 10:29:48 -07:00
Daniel Imms a0d8e3c666 Merge remote-tracking branch 'ups/v3' into 898_explicit_typings 2017-08-19 16:41:01 -07:00
Daniel Imms f25104789e Merge pull request #906 from npezza93/sync-bell-sound-on-change
When bellSound changes, update the bellAudioElements src
2017-08-19 16:40:08 -07:00
npezza93 f983e4eb6b Combine preloadBellSound and syncBellSound into the same function 2017-08-19 18:03:04 -04:00
Daniel Imms c984013e1e Remove terminal from other events 2017-08-19 14:52:48 -07:00
Daniel Imms 8fdedd4da1 Slim down refresh and resize events
Fixes #903
2017-08-19 14:38:54 -07:00
Daniel Imms e848d6afbe Remove open event
Fixes #901
2017-08-19 14:33:41 -07:00
npezza93 81cb30833f When bellSound changes, update the bellAudioElements src
Fixes #904
2017-08-19 16:55:24 -04:00
Daniel Imms f520e27f40 Fix tests 2017-08-19 13:32:03 -07:00
Daniel Imms fa015d91fe Improve types and add bellStyle/bellSound 2017-08-19 13:30:37 -07:00
Daniel Imms 34e1ee2bf6 Fix typings test on Windows 2017-08-19 13:20:32 -07:00
Daniel Imms 5ab047ea0f Merge remote-tracking branch 'ups/v3' into 898_explicit_typings 2017-08-19 13:20:19 -07:00
Daniel Imms 9ab17dec80 Merge pull request #878 from npezza93/add-bell-sound
If bell() gets called emit bell event and add default bell sound
2017-08-19 13:05:01 -07:00
npezza93 1f930c112b Add bellAudioElement to helperContainer instead of element 2017-08-19 15:56:58 -04:00
npezza93 42c3eff3f7 Update css transitions 2017-08-19 15:55:19 -04:00
npezza93 121143515a Change opacity on visual bell instead of background-color 2017-08-19 15:17:04 -04:00
npezza93 147fef74c6 Use removeChild instead of remove for compatibility 2017-08-19 15:16:21 -04:00
Daniel Imms 668b25eeb2 Fix license info and lint 2017-08-19 11:04:06 -07:00
Daniel Imms 34f5b2cb8a Remove option overloads from src
src/ handles more than that specified (and should incase you're not
using TS), this also reduces duplication as the definitions are only
in typings/
2017-08-19 10:29:05 -07:00
Daniel Imms 380f950d4d Clean up 2017-08-19 10:22:46 -07:00
Daniel Imms 6e2ca0af12 Fill out typings tests 2017-08-19 10:17:47 -07:00
Daniel Imms fd8b62610f Add typings test setup 2017-08-19 09:49:37 -07:00
Daniel Imms 4474f29ebf Add link matcher APIs 2017-08-19 09:25:57 -07:00
Daniel Imms cd29c83a64 Improve overloaded function typings/comments 2017-08-19 09:18:44 -07:00
npezza93 b0164e1f96 Update bell sound 2017-08-19 08:38:19 -04:00
Daniel Imms e4e2fbf885 Add overloads for Terminal.on 2017-08-18 17:46:49 -07:00
Daniel Imms 92ac427d00 Type addon strings in loadAddon 2017-08-18 17:34:10 -07:00
Daniel Imms 3ba3638ab7 Include all APIs from website 2017-08-18 17:25:40 -07:00
Daniel Imms 2f60c241ee Use manual typings over automatically generated ones
These are pulled from the typings I wrote for vscode

Fixes #898
2017-08-18 16:51:43 -07:00
Daniel Imms ae0d5e4ffb Merge pull request #893 from Tyriar/892_alt_buffer_viewport_exception
Prevent exception switching to alt buffer before open()
2017-08-18 16:04:22 -07:00
npezza93 68cd79db34 Set bellStyle to a string type instead of an array of strings 2017-08-17 19:44:37 -04:00
npezza93 8a6bff42c9 Remove bellAudioElement if it is not used. Remove extra import 2017-08-17 18:27:49 -04:00
npezza93 c88f50125b Add a bellStyle dropdown in the demo 2017-08-17 18:02:12 -04:00
Daniel Imms b5fc054fa5 Prevent exception switching to alt buffer before open()
Fixes #892
2017-08-17 08:36:08 -07:00
npezza93 0bb5ff8b09 Fix lints 2017-08-16 21:00:57 -04:00
npezza93 1d6f71d680 Fix bad merge 2017-08-16 20:39:28 -04:00
npezza93 3beb1f5c7c Add return types on new private functions 2017-08-16 20:39:28 -04:00
npezza93 c41bd81526 Swap out bell sound for a free one 2017-08-16 20:39:28 -04:00
npezza93 2f1380a31d Make bellStyle singular. Preload sound on option setting. Use strings as options 2017-08-16 20:39:28 -04:00
npezza93 d8717d64ba Add visual bell styling for underline and bar cursor types 2017-08-16 20:39:27 -04:00
npezza93 96c9d50ee2 Fix some quote lints 2017-08-16 20:39:27 -04:00
npezza93 3027b1d3d4 Set the visual bell color to a light gray 2017-08-16 20:39:27 -04:00
npezza93 8c94ef8aa0 Clear out any existing vidualBellTimers. Set colors back to all white.
Use visual class instead of setting colors codes in js.
2017-08-16 20:39:27 -04:00
npezza93 44ed0b9ceb Dont hardcode as many color codes in xterm.ts 2017-08-16 20:39:27 -04:00
npezza93 8a1f365a7e Add ability to have a visual bell 2017-08-16 20:39:27 -04:00
npezza93 6b46e0837f Move preloading bell audio to open() and append it the the terminal element 2017-08-16 20:39:26 -04:00
npezza93 fd51d0acf3 Preload bell audio
Allow the bellSound to be more easily configurable. You can pass false
to the bellSound and no sound will be played or you can pass it any
source you'd like.
2017-08-16 20:39:26 -04:00
npezza93 0eab4d68f6 Rename Bell.ts to Sounds that has BellSound constant 2017-08-16 20:39:21 -04:00
npezza93 245f62685a If bell() gets called emit bell event and add default bell sound 2017-08-16 20:39:15 -04:00
Daniel Imms f3d375a7a8 Merge pull request #855 from Tyriar/847_proper_scrollback_value
Make buffer length equal rows + scrollback, make alt buffer always 0 scrollback
2017-08-16 09:38:11 -07:00
Daniel Imms 39328d6e0c Merge pull request #882 from Tyriar/406_remove_dist_bower
Remove bower support, clean up readme
2017-08-16 08:46:23 -07:00
Daniel Imms 7b0d0e810c _isAltBuffer -> _hasScrollback 2017-08-16 08:45:30 -07:00
Daniel Imms 9dd1083918 Merge remote-tracking branch 'ups/v3' into 847_proper_scrollback_value 2017-08-16 08:41:42 -07:00
Daniel Imms aa438c8b83 Merge pull request #874 from Tyriar/860_v3_resize_exception
Fix exception when resizing both dimensions
2017-08-16 08:29:35 -07:00
Paris Kasidiaris cc7c310eee Merge pull request #888 from LucaT1/patch-1
Add link to vterm
2017-08-16 17:55:02 +03:00
Luca 4ab6500c1c Add link to vterm 2017-08-16 16:29:04 +02:00
Paris Kasidiaris 14c555fcfb Merge pull request #886 from dgriffen/dgriffen-patch-1
Add link to Whack Whack Terminal
2017-08-15 23:05:28 +03:00
Daniel Griffen bf7dc2f8dd Add link to Whack Whack Terminal 2017-08-15 12:16:53 -07:00
Daniel Imms d583163ac8 Move uses and browser support sections down 2017-08-12 14:48:38 -07:00
Daniel Imms a3f7b36986 Remove bower from prepare-release 2017-08-12 14:45:21 -07:00
Daniel Imms 7c3189379c Remove bower from .vscode/settings.json 2017-08-12 14:45:00 -07:00
Daniel Imms fcd2ba78bb Remove bower from README and reorganize/clean up 2017-08-12 14:44:49 -07:00
Daniel Imms 48b9173f2e Remove bower.json
Part of #406
2017-08-12 14:17:03 -07:00
Daniel Imms 184f49d909 Remove dist folder
Part of #406
2017-08-12 13:54:34 -07:00
Daniel Imms b8127b0d16 Merge pull request #879 from ioquatix/patch-1
Add link to script-runner.
2017-08-11 14:50:59 -07:00
Samuel Williams 1a50671823 Add link to script-runner. 2017-08-12 02:06:42 +12:00
Daniel Imms 996eb1b06f Merge remote-tracking branch 'ups/v3' into 847_proper_scrollback_value 2017-08-08 19:05:24 -07:00
Daniel Imms ad1a42d210 Merge remote-tracking branch 'ups/master' into v3 2017-08-08 18:50:34 -07:00
Daniel Imms 91bf3197ae Merge pull request #868 from Tyriar/865_fix_module_build
Fix module build, add TS declaration files, fix search addon
2017-08-08 03:03:50 -07:00
Daniel Imms 17c3ec0d0c Merge pull request #870 from Tyriar/869_shift_force_selection
Revert "Disable selection override on Windows/Linux"
2017-08-08 03:02:01 -07:00
Daniel Imms 8a17ac1baa Merge pull request #849 from Tyriar/848_cancel_event_on_wheel
Properly cancel event when in mouse mode
2017-08-08 01:09:37 -07:00
Daniel Imms a7aee75025 Merge pull request #858 from Tyriar/646_deprecated_focus
No longer focus the terminal by default
2017-08-08 01:05:42 -07:00
Daniel Imms 0902b92f79 Revert "Disable selection override on Windows/Linux"
This reverts commit 3479614c73.
2017-08-08 01:05:24 -07:00
Daniel Imms 9659f29e50 Remove Terminal.open focus param 2017-08-08 00:59:14 -07:00
Daniel Imms f21d5f25ec Fix search addon after TS refactor
Fixes #867
2017-08-08 00:29:22 -07:00
Daniel Imms 3b787824d3 Fix import for CommonJS consumers
CommonJS now imports the Terminal object directly as the trick in xterm.ts
wasn't working properly.

Fixes #865
2017-08-08 00:24:41 -07:00
Daniel Imms a0ce9a79a9 Build and export TS declaration files
Fixes #866
2017-08-07 23:48:58 -07:00
Daniel Imms acefa1a423 Merge pull request #864 from Tyriar/862_tests_to_ts
Migrate tests to TypeScript
2017-08-07 23:34:55 -07:00
Daniel Imms b42a9039cc Rename TestUtils.ts to TestUtils.test.ts
This will allow it to be excluded when we do #863
2017-08-07 22:40:15 -07:00
Daniel Imms b3ad3eff8b Shuffle files around
src/test/escape-sequences-test.ts -> src/Terminal.integration.ts
src/test/escape_sequence_files/* -> fixtures/escape_sequence_files/
2017-08-07 22:38:42 -07:00
Daniel Imms 28c85b8fb9 Convert escape sequences test to TS
Part of #862
2017-08-07 22:24:22 -07:00
Daniel Imms e9b0867bd2 addons/test.js and test.js -> Terminal.test.ts
Part of #862
2017-08-07 22:15:13 -07:00
Daniel Imms f52b43b380 Merge pull request #861 from Tyriar/791_buffer_refactor
Refactor buffer in preparation for true color and buffer performance improvements
2017-08-07 16:03:00 -07:00
Daniel Imms fd61c8e874 Use a const for all refs to data char and width
Part of #791
2017-08-07 15:40:48 -07:00
Daniel Imms c2bb507fe4 Move BufferLines.ts into Buffer.ts
Part of #791
2017-08-07 15:22:58 -07:00
Daniel Imms 091854df0e Merge pull request #852 from Tyriar/851_negative_tab_stop_width
Fix crash on negative tab stop width
2017-08-07 01:22:13 -07:00
Daniel Imms a1b91e1f96 Merge pull request #856 from Tyriar/fix_vscode_debugging
Fix vscode debugging
2017-08-07 01:21:41 -07:00
Daniel Imms b95d789821 Merge pull request #857 from Tyriar/744_remove_attachCustomKeydownHandler
Remove deprecated attachCustomKeydownHandler
2017-08-07 01:21:26 -07:00
Daniel Imms de8947f3d0 Merge pull request #850 from peterbaumgarten/master
Marking that a C++ compiler is required to build
2017-08-06 19:40:18 -07:00
Daniel Imms b1c6a97839 No longer focus the terminal by default
Fixes #646
2017-08-06 19:22:15 -07:00
Daniel Imms 8c46f1b6ba Remove deprecated attachCustomKeydownHandler
Fixes #744
2017-08-06 19:19:49 -07:00
Daniel Imms fb6cbbdaad Fix vscode debugging
This broke when the TS addon was added
2017-08-06 19:02:56 -07:00
Daniel Imms e7ee3ec63c Fix trimming on a buffer with 0 scrollback
Unfortunately this removed the padding idea from CircularList as it
would only work when the list is not full.
2017-08-06 18:56:37 -07:00
Daniel Imms a57f55dcbf Support buffers with scrollback of 0, force alt as 0
Fixes #802
2017-08-06 18:18:49 -07:00
Daniel Imms 27f7679494 Add some padding and a shrink threshold to CircularList
This is needed so that resize is still performant. Now the list size is only
rebuild (O(n)) when it goes beyond 40 entries of the initial max length. The
List is also rebuilt when the size shrinks below 120 of the actual backing max
length (init_max_length + 40 - 120).
2017-08-06 14:17:30 -07:00
Daniel Imms 26977b370e Fix crash on negative tab stop width
Fixes #851
2017-08-06 13:47:03 -07:00
Daniel Imms 109d467b95 Make buffer length = rows + scrollback
Fixes #847
2017-08-06 13:28:58 -07:00
Peter Baumgarten 63268318ed Marking that a C++ compiler is required. On some linux distributions a C++ compiler is not installed by default. This can frustrate some new users. 2017-08-06 15:09:11 -05:00
Daniel Imms 45157d80c6 Properly cancel event when in mouse mode
Fixes #848
2017-08-06 12:59:40 -07:00
Daniel Imms 687a5e2efb Merge pull request #846 from Tyriar/get-v3-level
Get v3 level with master
2017-08-06 11:28:18 -07:00
Daniel Imms b07c0e4d23 Merge remote-tracking branch 'ups/master' into v3 2017-08-06 11:18:39 -07:00
Paris Kasidiaris 9358bf24db Bump version to 2.9.1
Signed-off-by: Paris Kasidiaris <paris@sourcelair.com>
2017-08-06 21:03:59 +03:00
Daniel Imms 24932b16d7 jsdoc 2017-08-06 21:03:59 +03:00
Steven Silvester 6cdd5a6405 Prevent webpack error 2017-08-06 21:03:59 +03:00
Daniel Imms 3f5b4f49f2 Merge pull request #839 from Tyriar/335_xterm_to_ts
Convert xterm.js to TypeScript
2017-08-06 10:49:27 -07:00
Daniel Imms 6cf2e8753e Remove comments 2017-08-06 01:44:27 -07:00
Daniel Imms 33cc78c987 Add explicit types on set/getOption 2017-08-06 01:42:57 -07:00
Daniel Imms 7cd8d1ec74 Resolve todos 2017-08-06 01:42:41 -07:00
Daniel Imms e0809d526e Type InputHandler tests 2017-08-06 00:58:21 -07:00
Daniel Imms ae3169e6ae Add CharData and LineData 2017-08-05 21:11:16 -07:00
Daniel Imms 2878d978c4 Fix lint 2017-08-05 21:06:04 -07:00
Daniel Imms 56ec6ed22c Merge branch '842_resize_buffers_bug' into 335_xterm_to_ts
setOption('scrollback', 0) no longer returns false, it just warns.
2017-08-05 20:48:42 -07:00
Daniel Imms f9fce53cc4 Add typedef tslint rule 2017-08-05 13:56:38 -07:00
Daniel Imms aee474b53e Type InputHandler._terminal 2017-08-05 12:57:29 -07:00
Daniel Imms 8a0bcf6b79 Clean up 2017-08-05 11:28:24 -07:00
Daniel Imms ad25905783 Fix reset 2017-08-05 11:20:39 -07:00
Daniel Imms 0b5ff47cc0 Give terminal options a proper interface 2017-08-05 02:57:34 -07:00
Daniel Imms da50e33aa8 Finish types on Terminal's properties 2017-08-05 02:50:44 -07:00
Daniel Imms e6b431d92f Add one-variable-per-declaration tslint rule
Multiple declarations per line makes it more difficult to read what
exactly is declared and generally makes code more verbose and less
likely to fill in types
2017-08-05 02:42:49 -07:00
Daniel Imms 7d1c5d1ac6 Fix tests 2017-08-05 02:34:21 -07:00
Daniel Imms 8903bddb17 Fix a bunch of warnings, remove dead code 2017-08-05 02:28:20 -07:00
Daniel Imms 41c335c0e6 The terminal works! 2017-08-05 02:22:43 -07:00
Daniel Imms 2104dccec5 Fix most errors in Terminal.ts 2017-08-05 01:58:42 -07:00
Daniel Imms db5b908d62 Move xterm.js -> Terminal.ts 2017-08-05 00:22:31 -07:00
333 changed files with 18020 additions and 30274 deletions
-11
View File
@@ -1,11 +0,0 @@
<!-- Enter your issue description here -->
## Details
- Browser and browser version:
- OS version:
- xterm.js version:
### Steps to reproduce
1.
2.
+17
View File
@@ -0,0 +1,17 @@
---
name: Bug report
about: Create a bug report
---
<!-- ⚠️ Please search existing issues to avoid creating duplicates. ⚠️ -->
<!-- Describe the bug here. -->
## Details
- Browser and browser version:
- OS version:
- xterm.js version:
### Steps to reproduce
1.
2.
@@ -0,0 +1,7 @@
---
name: Feature request
about: Suggest a feature or enhancement
---
<!-- ⚠️ Please search existing issues to avoid creating duplicates. ⚠️ -->
<!-- Describe the enhancement here. -->
+8
View File
@@ -0,0 +1,8 @@
---
name: Question
about: The issue tracker is not for questions. Please ask questions on https://stackoverflow.com/questions/tagged/xtermjs or https://gitter.im/sourcelair/xterm.js.
---
🛑 The issue tracker is not for questions 🛑
If you have a question, please ask it on https://stackoverflow.com/questions/tagged/xtermjs or https://gitter.im/sourcelair/xterm.js.
+8 -1
View File
@@ -14,6 +14,13 @@ npm-debug.log
build/
.vscode/
.DS_Store
fixtures/typings-test/*.js
package-lock.json
# Directories needed for code coverage
/coverage/
coverage/
.nyc_output/
# Keep bundled code out of Git
dist/
demo/dist/
View File
+44 -12
View File
@@ -1,16 +1,48 @@
node_modules/
*.swp
.lock-wscript
lib/*.test.js
lib/*.test.js.map
# Blacklist - exclude everything except npm defaults such as LICENSE, etc
*
!*/
# Whitelist - entries to be included must be negated with "!"
!*.js
!*.json
# Whitelist - dist/
!dist/**/*.js
!dist/**/*.js.map
!dist/**/*.css
# Whitelist - lib/
!lib/**/*.d.ts
!lib/**/*.js
!lib/**/*.js.map
!lib/**/*.css
# Whitelist - src/
!src/**/*.ts
!src/**/*.d.ts
!src/**/*.js
!src/**/*.js.map
!src/**/*.css
# Whitelist - typings/
!typings/*.d.ts
# Blacklist - (normal behavior) these will override any whitelist
*.test.ts
*.test.d.ts
*.test.js
*.test.js.map
lib/test/
Makefile.gyp
*.Makefile
*.target.gyp.mk
*.node
example/*.log
docs/
npm-debug.log
/.idea/
.env
.vscode/
build/
fixtures/
coverage/
demo/
+1
View File
@@ -0,0 +1 @@
package-lock=false
+2 -3
View File
@@ -1,7 +1,6 @@
language: node_js
os:
- linux
- osx
node_js:
- 6
before_install:
@@ -12,9 +11,9 @@ before_install:
- npm install -g npm@5.1.0
env:
matrix:
- NPM_COMMAND=tsc
- NPM_COMMAND=lint
- NPM_COMMAND=test
- NPM_COMMAND=test-coverage
notifications:
email: false
script: npm run $NPM_COMMAND
after_success: npm run coveralls
-23
View File
@@ -1,23 +0,0 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Mocha Tests",
"cwd": "${workspaceRoot}",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/mocha",
"windows": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/mocha.cmd"
},
"runtimeArgs": [
"--colors",
"--recursive",
"${workspaceRoot}/lib"
],
"sourceMaps": true,
"outFiles": [ "${workspaceRoot}/lib/**/*.js" ],
"internalConsoleOptions": "openOnSessionStart"
}
]
}
-9
View File
@@ -1,9 +0,0 @@
{
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/dist": true,
"**/build": true,
"**/lib": true
}
}
+56
View File
@@ -1,12 +1,18 @@
List of xterm.js contributors. Updated before every release.
7PH <b.raymond@cern.ch>
7PH <b.raymond@protonmail.com>
Adrian Labbé <adrilabbelol@gmail.com>
Aleksandr Andrienko <aandrienko@codenvy.com>
Aleksandr Andriienko <oandriie@redhat.com>
Alessandro Nadalin <alessandro.nadalin@gmail.com>
Alexander Olsson <noseglid@gmail.com>
Alexandre Petit-Pas <petitpasalexandre@gmail.com>
Alexey Kontsevoy <alexey@gravitational.com>
Andres Mejia <amejia004@gmail.com>
Anish Athalye <me@anishathalye.com>
Anthony Lapenna <lapenna.anthony@gmail.com>
Antonin Stefanutti <antonin@stefanutti.fr>
Antonis Kalipetis <akalipetis@sourcelair.com>
Anton Skshidlevsky <meefik@gmail.com>
Anton Yurovskykh <anton.yurovskykh@gmail.com>
@@ -15,54 +21,101 @@ Austin Robertson <austinrobertson@gmail.com>
ayapi <colors.aya@gmail.com>
Ben Hall <ben@benhall.me.uk>
Benjamin Fischer <benjamin.fischer@rwth-aachen.de>
Benjamin Raymond <b.raymond@cern.ch>
Benjamin Woodruff <github@benjam.info>
Bill Church <billchurch@users.noreply.github.com>
Bob Reid <bobreid@Bobs-MacBook-Pro.local>
bottleofwater <nison.mael+bottleofwater@gmail.com>
Brandon Bayer <b@bayer.ws>
Brian Mock <brian@mockbrian.com>
Bruno Ribeiro <b.m.fernandes.ribeiro@gmail.com>
Bruno Ribeito <b.m.fernandes.ribeiro@gmail.com>
Carson Anderson <carson@betterservers.com>
CHaBou <chabup@delean.fr>
Christian Budde Christensen <budde377@gmail.com>
Christof Marti <chrmarti@microsoft.com>
Christopher Jeffrey <chjjeffrey@gmail.com>
coderaiser <mnemonic.enemy@gmail.com>
Damien Tournoud <damien@platform.sh>
Dan Brown <jdanbrown@gmail.com>
Daniel Griffen <dagriffe@microsoft.com>
Daniel Griffen <daniel@griffen.io>
Daniel Imms <daimms@microsoft.com>
Daniel Risacher <drisacher@gmail.com>
Dan Kaplun <dbkaplun@twitch.tv>
Darin Morrison <freebroccolo@users.noreply.github.com>
dcylabs <dcylabs@gmail.com>
Dominik Csapak <d.csapak@proxmox.com>
Edgar Andrés Margffoy Tuay <andfoy@gmail.com>
Elliot Saba <staticfloat@gmail.com>
Exile <exile@chamber.ee>
Felipe Gasper <felipe@felipegasper.com>
Felix <30559812+felixse@users.noreply.github.com>
ficristo <ficristo.work@gmail.com>
Gary Ritchie <gary@rstudio.com>
hiro-su <h.sugipon@gmail.com>
Ian Lewis <ianlewis@google.com>
imoses <ido@twiggle.com>
InDieTasten <indietasten@gmail.com>
irokas <akasidiari@inf.uth.gr>
Jakob Gillich <jakob@gillich.me>
Jan Kuri <jkuri88@gmail.com>
Jean Bruenn <himself@jeanbruenn.info>
Jeremy Danyow <jedanyow@microsoft.com>
Jianhui Zhao <jianhuizhao329@gmail.com>
Joao Moreno <jomo@microsoft.com>
Joao Moreno <mail@joaomoreno.com>
Johannes Zellner <johannes@nebulon.de>
Jon Austin <jon.i.austin@gmail.com>
Jon Kohler <jon@nutanix.com>
Jon Masters <jon.masters@sky.com>
Jörg Breitbart <jerch@rockborn.de>
jpoth <poth.john@gmail.com>
Justin Luk <jluk@users.noreply.github.com>
Justin Mecham <justin@mecham.me>
Kirill Merkushev <lanwen@yandex.ru>
Krasimir Tsonev <krasimir@outset.ws>
Ledion Bitincka <lbitincka@gmail.com>
Linus Unnebäck <linus@folkdatorn.se>
Luca <LucaT1@users.noreply.github.com>
Lucian Buzzo <lucian.buzzo@gmail.com>
Lukas Drgon <lukas.drgon@gmail.com>
Lukas Geiger <lukas.geiger94@gmail.com>
Maël Nison <nison.mael@gmail.com>
Marc Dumais <marc.dumais@ericsson.com>
Marek Libra <mlibra@redhat.com>
Markus F.X.J. Oberhumer <markus@oberhumer.com>
Martin Chloride <i@martincl2.me>
Martin Koppehel <martin.koppehel@st.ovgu.de>
Martin Wang <jiahaow@ca.ibm.com>
Matt Bierner <matb@microsoft.com>
Matthew James <matthew.d.james87@gmail.com>
Michael Irwin <mikesir87@gmail.com>
Mikko Karvonen <mikko.karvonen@arm.com>
mofux <t.zilz@mofux.org>
muji <muji@tmpfs.org>
Nicolas Ramz <nicolas.ramz@gmail.com>
npezza93 <npezza93@gmail.com>
Oleksandr Andriienko <oandriie@redhat.com>
Paris Kasidiaris <pariskasidiaris@gmail.com>
Paris Kasidiaris <paris@sourcelair.com>
Peng Xiao <pengxiao@outlook.com>
Peter Baumgarten <me@peterbaumgarten.com>
Philip Olson <philip.olson@protonmail.ch>
PowerHat <31401273+7PH@users.noreply.github.com>
pro-src <34285059+pro-src@users.noreply.github.com>
pro-src <rodneyd.teal@gmail.com>
Rick Baker <rick@ricktbaker.com>
runarberg <runar@greenqloud.com>
Saad Malik <simfox3@gmail.com>
Samuel Williams <samuel.williams@oriontransfer.co.nz>
Saswat Das <saswatds@users.noreply.github.com>
Saul Costa <saul@codevolve.com>
Shuanglei Tao <tsl0922@gmail.com>
sitzmar <sitzmar@gmail.com>
Steven Silvester <steven.silvester@ieee.org>
stuicey <stuicey@users.noreply.github.com>
Sven-Hendrik Haase <svenstaro@gmail.com>
t-amqi <umberos@gmail.com>
Thanasis Daglis <thanasis@sourcelair.com>
thomas <thomas@kreativkonzentrat.de>
@@ -70,5 +123,8 @@ Thomas Zilz <t.zilz@mofux.org>
Tine Jozelj <tine.jozelj@outlook.com>
Tyler Jewell <tjewell@codenvy.com>
Vincent Woo <me@vincentwoo.com>
Viraj Sinha <virajosinha@gmail.com>
yutaka <shigure@refy.net>
YuviPanda <yuvipanda@gmail.com>
ZHAO Xudong <zxdong@gmail.com>
赵雪珂 <zhaoxueke@onething.net>
+73
View File
@@ -0,0 +1,73 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
education, socio-economic status, nationality, personal appearance, race,
religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting [@Tyriar](https://twitter.com/Tyriar) or [@pariskasid](https://twitter.com/pariskasid) on Twitter. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
+4
View File
@@ -50,3 +50,7 @@ By contributing code to xterm.js you
holder has explicitly granted the right to use it like this,
through a compatible open source license or through a direct
agreement with you.)
### Third party dependencies
We prefer to not include any non-dev third party dependencies in order to keep our code minimal, performant and secure. If you plan on adding a dependency on a third party library it's a good idea to discuss the need in an issue with the maintainers first.
+3 -3
View File
@@ -1,4 +1,4 @@
FROM node:6.9
FROM node:8
MAINTAINER Paris Kasidiaris <paris@sourcelair.com>
# Set the working directory
@@ -6,7 +6,7 @@ WORKDIR /usr/src/app
# Set an entrypoint, to automatically install node modules
ENTRYPOINT ["/bin/bash", "-c", "if [[ ! -d node_modules ]]; then npm install; fi; exec \"${@:0}\";"]
CMD ["npm", "run", "dev"]
CMD ["npm", "run", "start"]
# First, install dependencies to improve layer caching
COPY package.json /usr/src/app/
@@ -16,4 +16,4 @@ RUN npm install
COPY . /usr/src/app
# Run the tests and build, to make sure everything is working nicely
RUN npm run build && npm run test
RUN npm run build && npm run webpack && npm run test
+1
View File
@@ -1 +1,2 @@
web: npm start
webpack: npm run watch
-1
View File
@@ -1 +0,0 @@
web: npm run dev
+181 -64
View File
@@ -1,6 +1,6 @@
# [![xterm.js logo](logo.png)](https://xtermjs.org)
# [![xterm.js logo](logo-full.png)](https://xtermjs.org)
[![xterm.js build status](https://api.travis-ci.org/sourcelair/xterm.js.svg)](https://travis-ci.org/sourcelair/xterm.js) [![Coverage Status](https://coveralls.io/repos/github/sourcelair/xterm.js/badge.svg)](https://coveralls.io/github/sourcelair/xterm.js) [![Gitter](https://badges.gitter.im/sourcelair/xterm.js.svg)](https://gitter.im/sourcelair/xterm.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Travis CI build status](https://api.travis-ci.org/xtermjs/xterm.js.svg)](https://travis-ci.org/xtermjs/xterm.js) [![VSTS Build status](https://xtermjs.visualstudio.com/_apis/public/build/definitions/3e323cf7-5760-460d-af64-ee5675baf366/1/badge)](https://xtermjs.visualstudio.com/xterm.js/_build/index?definitionId=1) [![Coverage Status](https://coveralls.io/repos/github/xtermjs/xterm.js/badge.svg?branch=master)](https://coveralls.io/github/xtermjs/xterm.js?branch=master) [![Gitter](https://badges.gitter.im/sourcelair/xterm.js.svg)](https://gitter.im/sourcelair/xterm.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/xterm/badge?style=rounded)](https://www.jsdelivr.com/package/npm/xterm)
Xterm.js is a terminal front-end component written in JavaScript that works in the browser.
@@ -19,6 +19,94 @@ It enables applications to provide fully featured terminals to their users and c
- Xterm.js is not a terminal application that you can download and use on your computer
- Xterm.js is not `bash`. Xterm.js can be connected to processes like `bash` and let you interact with them (provide input, receive output)
## Getting Started
First you need to install the module, we ship exclusively through [npm](https://www.npmjs.com/) so you need that installed and then add xterm.js as a dependency by running:
```
npm install xterm
```
To start using xterm.js on your browser, add the `xterm.js` and `xterm.css` to the head of your html page. Then create a `<div id="terminal"></div>` onto which xterm can attach itself.
```html
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="node_modules/xterm/dist/xterm.css" />
<script src="node_modules/xterm/dist/xterm.js"></script>
</head>
<body>
<div id="terminal"></div>
<script>
var term = new Terminal();
term.open(document.getElementById('terminal'));
      term.write('Hello from \x1B[1;3;31mxterm.js\x1B[0m $ ')
</script>
</body>
</html>
```
Finally instantiate the `Terminal` object and then call the `open` function with the DOM object of the `div`.
### Importing
The proposed way to load xterm.js is via the ES6 module syntax.
```javascript
import { Terminal } from 'xterm';
```
### Addons
Addons are JavaScript modules that extend the `Terminal` prototype with new methods and attributes to provide additional functionality. There are a handful available in the main repository in the `src/addons` directory and you can even write your own, by using xterm.js' public API.
To use an addon, just import the JavaScript module and pass it to `Terminal`'s `applyAddon` method:
```javascript
import { Terminal } from xterm;
import * as fit from 'xterm/lib/addons/fit/fit';
Terminal.applyAddon(fit);
var xterm = new Terminal(); // Instantiate the terminal
xterm.fit(); // Use the `fit` method, provided by the `fit` addon
```
#### Importing Addons in TypeScript
There are currently no typings for addons if they are accessed via extending Terminal prototype, so you will need to upcast if using TypeScript, eg. `(<any>xterm).fit()`.
Alternatively, you can import addon function and enhance the terminal on demand. This would have better typing support and is friendly to treeshaking. E.g.:
```typescript
import { Terminal } from 'xterm';
import { fit } from 'xterm/lib/addons/fit/fit';
const xterm = new Terminal();
// Fit the terminal when necessary:
fit(xterm);
```
#### Third party addons
There are also the following third party addons available:
- [xterm-webfont](https://www.npmjs.com/package/xterm-webfont)
## Browser Support
Since xterm.js is typically implemented as a developer tool, only modern browsers are supported officially. Here is a list of the versions we aim to support:
- Chrome latest
- Edge latest
- Firefox latest
- Safari latest
- IE11
Xterm.js works seamlessly in Electron apps and may even work on earlier versions of the browsers but these are the browsers we strive to keep working.
## Real-world uses
Xterm.js is used in several world-class applications to provide great terminal experiences.
@@ -41,88 +129,113 @@ Xterm.js is used in several world-class applications to provide great terminal e
- [**Selenoid UI**](https://github.com/aerokube/selenoid-ui): Simple UI for the scallable golang implementation of Selenium Hub named Selenoid. We use XTerm for streaming logs over websockets from docker containers.
- [**Portainer**](https://portainer.io): Simple management UI for Docker.
- [**SSHy**](https://github.com/stuicey/SSHy): HTML5 Based SSHv2 Web Client with E2E encryption utilising `xterm.js`, SJCL & websockets.
- [**JupyterLab**](https://github.com/jupyterlab/jupyterlab): An extensible
- [**JupyterLab**](https://github.com/jupyterlab/jupyterlab): An extensible
computational environment for Jupyter, supporting interactive data science and scientific computing across all programming languages.
- [**Theia**](https://github.com/theia-ide/theia): Theia is a cloud & desktop IDE framework implemented in TypeScript.
- [**Opshell**](https://github.com/ricktbaker/opshell) Ops Helper tool to make life easier working with AWS instances across multiple organizations.
- [**Proxmox VE**](https://www.proxmox.com/en/proxmox-ve): Proxmox VE is a complete open-source platform for enterprise virtualization. It uses xterm.js for container terminals and the host shell.
- [**Script Runner**](https://github.com/ioquatix/script-runner): Run scripts (or a shell) in Atom.
- [**Whack Whack Terminal**](https://github.com/Microsoft/WhackWhackTerminal): Terminal emulator for Visual Studio 2017.
- [**VTerm**](https://github.com/vterm/vterm): Extensible terminal emulator based on Electron and React.
- [**electerm**](http://electerm.html5beta.com): electerm is a terminal/ssh/sftp client(mac, win, linux) based on electron/node-pty/xterm.
- [**Kubebox**](https://github.com/astefanutti/kubebox): Terminal console for Kubernetes clusters.
- [**Azure Cloud Shell**](https://shell.azure.com): Azure Cloud Shell is a Microsoft-managed admin machine built on Azure, for Azure.
- [**atom-xterm**](https://atom.io/packages/atom-xterm): Atom plugin for providing terminals inside your Atom workspace.
- [**rtty**](https://github.com/zhaojh329/rtty): A reverse proxy WebTTY. It is composed of the client and the server.
- [**Pisth**](https://github.com/ColdGrub1384/Pisth): An SFTP and SSH client for iOS
- [**abstruse**](https://github.com/bleenco/abstruse): Abstruse CI is a continuous integration platform based on Node.JS and Docker.
- [**Microsoft SQL Operations Studio**](https://github.com/Microsoft/sqlopsstudio): A data management tool that enables working with SQL Server, Azure SQL DB and SQL DW from Windows, macOS and Linux
- [**FreeMAN**](https://github.com/matthew-matvei/freeman): A free, cross-platform file manager for power users
- [**Fluent Terminal**](https://github.com/felixse/FluentTerminal): A terminal emulator based on UWP and web technologies.
- [**Hyper**](https://hyper.is): A terminal built on web technologies
- [**Diag**](https://diag.ai): A better way to troubleshoot problems faster. Capture, share and reapply troubleshooting knowledge so you can focus on solving problems that matter.
- [**GoTTY**](https://github.com/yudai/gotty): A simple command line tool that shares your terminal as a web application based on xterm.js.
- [**genact**](https://github.com/svenstaro/genact): A nonsense activity generator.
- [**cPanel & WHM**](https://cpanel.com): The hosting platform of choice.
- [**Nutanix**](https://github.com/nutanix): Nutanix Enterprise Cloud uses xterm in the webssh functionality within Nutanix Calm, and is also looking to move our old noserial (termjs) functionality to xterm.js
Do you use xterm.js in your application as well? Please [open a Pull Request](https://github.com/sourcelair/xterm.js/pulls) to include it here. We would love to have it in our list.
## Browser Support
Since xterm.js is typically implemented as a developer tool, only modern browsers are supported officially. Here is a list of the versions we aim to support:
- Chrome 48+
- Edge 13+
- Firefox 44+
- Internet Explorer 11+
- Opera 35+
- Safari 8+
Xterm.js works seamlessly in Electron apps and may even work on earlier versions of the browsers but these are the browsers we strive to keep working.
Do you use xterm.js in your application as well? Please [open a Pull Request](https://github.com/sourcelair/xterm.js/pulls) to include it here. We would love to have it in our list. Note: Please add any new contributions to the end of the list only.
## Demo
Xterm.js ships with a barebones demo implementation, designed for the development and evaluation of the library only. Exposing the demo to the public as is would introduce security risks for the host.
Below you can find instructions on how to run the demo on different platforms.
### SourceLair
SourceLair will run the demo and builder in parallel automatically. Just make sure to choose the "Node.js" project type, when cloning the xterm.js repo (or just use this shortcut; https://lair.io/xtermjs/xtermjs).
Then open your project's [Public URL](https://help.sourcelair.com/projects/the-public-url/) to access the demo.
### Docker
First, make sure you have Docker Engine 1.13.0 (or newer) and Docker Compose 1.10.0 (or newer).
Xterm.js [provides a pre-built Docker image](https://hub.docker.com/r/xtermjs/xterm.js/) to help run the demo easily (Git tags are built as [tagged Docker images](https://hub.docker.com/r/xtermjs/xterm.js/tags/) too).
To run the just demo (with no editing access). run the following command in your terminal:
```
docker run -p 3000:3000 xtermjs/xterm.js
```
Then open http://0.0.0.0:3000 in a web browser to access the demo.
To run the demo and builder in parallel, run the following command in your terminal:
```
docker-compose up
```
Then open http://0.0.0.0:3000 in a web browser to access the demo. If you prefer a different port than `3000` to access the xterm.js demo, then set the `XTERMJS_PORT` environment variable to the desired port.
### Foreman (or other Procfile runner)
First, be sure that a C++ compiler such as GCC-C++ or Clang is installed, then run the following commands in your terminal:
```
npm install
foreman start # Replace foreman with "honcho", "forego" etc. depending on your runner
```
Then open http://0.0.0.0:3000 in a web browser to access the demo.
### Linux or macOS
Run the following commands:
First, be sure that a C++ compiler such as GCC-C++ or Clang is installed, then run the following commands in your terminal:
```
$ npm install
$ npm start
npm install
npm start # Run this in its own terminal
npm run watch # Run this in its own terminal
```
Then open http://0.0.0.0:3000 in a web browser.
Then open http://0.0.0.0:3000 in a web browser to access the demo.
### Windows
First, ensure [node-gyp](https://github.com/nodejs/node-gyp) is installed and configured correctly, then run these commands.
Note: Do not use ConEmu, as it seems to break the demo for some reason.
First, ensure [node-gyp](https://github.com/nodejs/node-gyp) is installed and configured correctly, then run the following commands in your terminal:
```
> npm install
> npm start
npm install
npm start # Run this in its own terminal
npm run watch # Run this in its own terminal
```
Then open http://127.0.0.1:3000 in a web browser.
Then open http://127.0.0.1:3000 in a web browser to access the demo.
## Getting Started
*Note: Do not use ConEmu, as it seems to break the demo for some reason.*
To start using xterm.js on your browser, add the `xterm.js` and `xterm.css` to the head of your html page. Then create a `<div id="terminal"></div>` onto which xterm can attach itself.
```html
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="bower_components/xterm.js/dist/xterm.css" />
<script src="bower_components/xterm.js/dist/xterm.js"></script>
</head>
<body>
<div id="terminal"></div>
<script>
var term = new Terminal();
term.open(document.getElementById('terminal'));
term.write('Hello from \033[1;3;31mxterm.js\033[0m $ ')
</script>
</body>
</html>
```
Finally instantiate the `Terminal` object and then call the `open` function with the DOM object of the `div`.
## Testing
## Addons
Tests are run using the following npm scripts:
Addons are JavaScript modules that attach functions to the `Terminal` prototype to extend its functionality. There are a handful available in the main repository in the `dist/addons` directory, you can even write your own (though they may break when the internals of xterm.js change across versions).
To use an addon, just include the JavaScript file after xterm.js and before the `Terminal` object has been instantiated. The function should then be exposed on the `Terminal` object:
```html
<script src="node_modules/dist/xterm.js"></script>
<script src="node_modules/dist/addons/fit/fit.js"></script>
```
```js
var xterm = new Terminal();
// init code...
xterm.fit();
```
- `npm test`: This will run both unit tests and the linter
- `npm run test-suite <file>`: This will run all tests within a particular file, &lt;file&gt; is the test file name excluding the extension (eg. "Linkifier.test")
- `npm run test-debug`: This will run unit tests with `--inspect-brk`, this can then be automatically debugged using [VS Code auto attach](https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_auto-attach-feature) or manually attached to by a debugger
- `npm run test-coverage`: This will run all unit tests and produce a coverage report
- `npm run lint`: This will run the linter only
## Releases
@@ -136,10 +249,14 @@ Xterm.js is maintained by [SourceLair](https://www.sourcelair.com/) and a few ex
To contribute either code, documentation or issues to xterm.js please read the [Contributing document](CONTRIBUTING.md) beforehand. The development of xterm.js does not require any special tool. All you need is an editor that supports JavaScript/TypeScript and a browser. You will need Node.js installed locally to get all the features working in the demo.
### Code structure
`src/` is roughly split up into areas of functionality such as `renderer/` that handles all rendering and `utils/` which provides general utility functions. The `shared/` folder contains code that can be used from either the main thread or a web worker thread, all code inside a `shared/` folder should only ever import other code from a `shared/` folder to minimize the amount of code ran when launching a web worker.
## License Agreement
If you contribute code to this project, you are implicitly allowing your code to be distributed under the MIT license. You are also implicitly verifying that all code is your original work.
Copyright (c) 2014-2017, SourceLair, Private Company ([www.sourcelair.com](https://www.sourcelair.com/home)) (MIT License)
Copyright (c) 2017-2018, [The xterm.js authors](https://github.com/xtermjs/xterm.js/graphs/contributors) (MIT License)<br>
Copyright (c) 2014-2017, SourceLair, Private Company ([www.sourcelair.com](https://www.sourcelair.com/home)) (MIT License)<br>
Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
+1 -8
View File
@@ -12,12 +12,6 @@ CURRENT_PACKAGE_JSON_VERSION=$(cat package.json \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g' \
| tr -d '[[:space:]]')
CURRENT_BOWER_JSON_VERSION=$(cat bower.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g' \
| tr -d '[[:space:]]')
# Build xterm.js into `dist`
export BUILD_DIR=dist
@@ -26,9 +20,8 @@ npm run build
# Update AUTHORS file
sh bin/generate-authors
# Update version in package.json and bower.json
# Update version in package.json
sed -i "s/\"version\": \"$CURRENT_PACKAGE_JSON_VERSION\"/\"version\": \"$NEW_VERSION\"/g" package.json
sed -i "s/\"version\": \"$CURRENT_BOWER_JSON_VERSION\"/\"version\": \"$NEW_VERSION\"/g" bower.json
git commit -S -s -a -m "Bump version to $NEW_VERSION"
git tag $NEW_VERSION
-9
View File
@@ -1,9 +0,0 @@
{
"name": "xterm.js",
"version": "2.9.2",
"ignore": ["demo", "test", ".gitignore"],
"main": [
"dist/xterm.js",
"dist/xterm.css"
]
}
+6 -2
View File
@@ -17,8 +17,12 @@ app.get('/style.css', function(req, res){
res.sendFile(__dirname + '/style.css');
});
app.get('/main.js', function(req, res){
res.sendFile(__dirname + '/main.js');
app.get('/dist/bundle.js', function(req, res){
res.sendFile(__dirname + '/dist/bundle.js');
});
app.get('/dist/bundle.js.map', function(req, res){
res.sendFile(__dirname + '/dist/bundle.js.map');
});
app.post('/terminals', function (req, res) {
+35 -61
View File
@@ -1,64 +1,38 @@
<!doctype html>
<html>
<head>
<title>xterm.js demo</title>
<link rel="stylesheet" href="/build/xterm.css" />
<link rel="stylesheet" href="/build/addons/fullscreen/fullscreen.css" />
<link rel="stylesheet" href="style.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-promise/4.1.1/es6-promise.auto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fetch/1.0.0/fetch.min.js"></script>
<script src="/build/xterm.js" ></script>
<script src="/build/addons/attach/attach.js" ></script>
<script src="/build/addons/fit/fit.js" ></script>
<script src="/build/addons/fullscreen/fullscreen.js" ></script>
<script src="/build/addons/search/search.js" ></script>
</head>
<body>
<h1>xterm.js: xterm, in the browser</h1>
<div id="terminal-container"></div>
<div>
<h2>Actions</h2>
<p>
<label>Find next <input id="find-next"/></label>
<label>Find previous <input id="find-previous"/></label>
</p>
</div>
<div>
<h2>Options</h2>
<p>
<label><input type="checkbox" id="option-cursor-blink"> cursorBlink</label>
</p>
<p>
<label>
cursorStyle
<select id="option-cursor-style">
<option value="block">block</option>
<option value="underline">underline</option>
<option value="bar">bar</option>
</select>
</label>
</p>
<p>
<label>scrollback <input type="number" id="option-scrollback" value="1000" /></label>
</p>
<p>
<label>tabStopWidth <input type="number" id="option-tabstopwidth" value="8" /></label>
</p>
<div>
<h3>Size</h3>
<div>
<div style="display: inline-block; margin-right: 16px;">
<label for="cols">Columns</label>
<input type="number" id="cols" />
</div>
<div style="display: inline-block; margin-right: 16px;">
<label for="rows">Rows</label>
<input type="number" id="rows" />
</div>
</div>
</div>
</div>
<p><strong>Attention:</strong> The demo is a barebones implementation and is designed for xterm.js evaluation purposes only. Exposing the demo to the public as is would introduce security risks for the host.</p>
<script src="main.js" defer ></script>
</body>
<head>
<title>xterm.js demo</title>
<link rel="stylesheet" href="/build/xterm.css" />
<link rel="stylesheet" href="/build/addons/fullscreen/fullscreen.css" />
<link rel="stylesheet" href="style.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-promise/4.1.1/es6-promise.auto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fetch/1.0.0/fetch.min.js"></script>
</head>
<body>
<h1 style="color: #2D2E2C">xterm.js: A terminal for the <em style="color: #5DA5D5">web</em></h1>
<div id="terminal-container"></div>
<div>
<h3>Actions</h3>
<p>
<label>Find next <input id="find-next"/></label>
<label>Find previous <input id="find-previous"/></label>
</p>
</div>
<div>
<h3>Options</h3>
<p>These options can be set in the <code>Terminal</code> constructor or using the <code>Terminal.setOption</code> function.</p>
<div id="options-container"></div>
</div>
<div>
<h3>Style</h3>
<div style="display: inline-block; margin-right: 16px;">
<label for="padding">Padding</label>
<input type="number" id="padding" />
</div>
</div>
<hr/>
<p><strong>Attention:</strong> The demo is a barebones implementation and is designed for the development and evaluation of xterm.js only. Exposing the demo to the public as is would introduce security risks for the host.</p>
<button id="dispose" title="This is used to testing memory leaks">Dispose terminal</button>
<script src="dist/bundle.js" defer ></script>
</body>
</html>
+189 -76
View File
@@ -1,77 +1,64 @@
import * as Terminal from '../build/xterm';
import * as attach from '../build/addons/attach/attach';
import * as fit from '../build/addons/fit/fit';
import * as fullscreen from '../build/addons/fullscreen/fullscreen';
import * as search from '../build/addons/search/search';
import * as webLinks from '../build/addons/webLinks/webLinks';
import * as winptyCompat from '../build/addons/winptyCompat/winptyCompat';
Terminal.applyAddon(attach);
Terminal.applyAddon(fit);
Terminal.applyAddon(fullscreen);
Terminal.applyAddon(search);
Terminal.applyAddon(webLinks);
Terminal.applyAddon(winptyCompat);
var term,
protocol,
socketURL,
socket,
pid,
charWidth,
charHeight;
pid;
var terminalContainer = document.getElementById('terminal-container'),
actionElements = {
findNext: document.querySelector('#find-next'),
findPrevious: document.querySelector('#find-previous')
},
optionElements = {
cursorBlink: document.querySelector('#option-cursor-blink'),
cursorStyle: document.querySelector('#option-cursor-style'),
scrollback: document.querySelector('#option-scrollback'),
tabstopwidth: document.querySelector('#option-tabstopwidth')
},
colsElement = document.getElementById('cols'),
rowsElement = document.getElementById('rows');
paddingElement = document.getElementById('padding');
function setTerminalSize () {
var cols = parseInt(colsElement.value, 10),
rows = parseInt(rowsElement.value, 10),
width = (cols * charWidth).toString() + 'px',
height = (rows * charHeight).toString() + 'px';
terminalContainer.style.width = width;
terminalContainer.style.height = height;
term.resize(cols, rows);
function setPadding() {
term.element.style.padding = parseInt(paddingElement.value, 10).toString() + 'px';
term.fit();
}
colsElement.addEventListener('change', setTerminalSize);
rowsElement.addEventListener('change', setTerminalSize);
actionElements.findNext.addEventListener('keypress', function (e) {
if (e.key === "Enter") {
e.preventDefault();
term.findNext(actionElements.findNext.value);
}
});
actionElements.findPrevious.addEventListener('keypress', function (e) {
if (e.key === "Enter") {
e.preventDefault();
term.findPrevious(actionElements.findPrevious.value);
}
});
optionElements.cursorBlink.addEventListener('change', function () {
term.setOption('cursorBlink', optionElements.cursorBlink.checked);
});
optionElements.cursorStyle.addEventListener('change', function () {
term.setOption('cursorStyle', optionElements.cursorStyle.value);
});
optionElements.scrollback.addEventListener('change', function () {
term.setOption('scrollback', parseInt(optionElements.scrollback.value, 10));
});
optionElements.tabstopwidth.addEventListener('change', function () {
term.setOption('tabStopWidth', parseInt(optionElements.tabstopwidth.value, 10));
});
createTerminal();
const disposeRecreateButtonHandler = () => {
// If the terminal exists dispose of it, otherwise recreate it
if (term) {
term.dispose();
term = null;
window.term = null;
socket = null;
document.getElementById('dispose').innerHTML = 'Recreate Terminal';
}
else {
createTerminal();
document.getElementById('dispose').innerHTML = 'Dispose terminal';
}
};
document.getElementById('dispose').addEventListener('click', disposeRecreateButtonHandler);
function createTerminal() {
// Clean terminal
while (terminalContainer.children.length) {
terminalContainer.removeChild(terminalContainer.children[0]);
}
term = new Terminal({
cursorBlink: optionElements.cursorBlink.checked,
scrollback: parseInt(optionElements.scrollback.value, 10),
tabStopWidth: parseInt(optionElements.tabstopwidth.value, 10)
});
term = new Terminal({});
window.term = term; // Expose `term` to window for debugging purposes
term.on('resize', function (size) {
if (!pid) {
return;
@@ -86,29 +73,48 @@ function createTerminal() {
socketURL = protocol + location.hostname + ((location.port) ? (':' + location.port) : '') + '/terminals/';
term.open(terminalContainer);
term.winptyCompatInit();
term.webLinksInit();
term.fit();
term.focus();
var initialGeometry = term.proposeGeometry(),
cols = initialGeometry.cols,
rows = initialGeometry.rows;
addDomListener(paddingElement, 'change', setPadding);
colsElement.value = cols;
rowsElement.value = rows;
fetch('/terminals?cols=' + cols + '&rows=' + rows, {method: 'POST'}).then(function (res) {
charWidth = Math.ceil(term.element.offsetWidth / cols);
charHeight = Math.ceil(term.element.offsetHeight / rows);
res.text().then(function (pid) {
window.pid = pid;
socketURL += pid;
socket = new WebSocket(socketURL);
socket.onopen = runRealTerminal;
socket.onclose = runFakeTerminal;
socket.onerror = runFakeTerminal;
});
addDomListener(actionElements.findNext, 'keypress', function (e) {
if (e.key === "Enter") {
e.preventDefault();
term.findNext(actionElements.findNext.value);
}
});
addDomListener(actionElements.findPrevious, 'keypress', function (e) {
if (e.key === "Enter") {
e.preventDefault();
term.findPrevious(actionElements.findPrevious.value);
}
});
// fit is called within a setTimeout, cols and rows need this.
setTimeout(function () {
initOptions(term);
document.getElementById(`opt-cols`).value = term.cols;
document.getElementById(`opt-rows`).value = term.rows;
paddingElement.value = 0;
// Set terminal size again to set the specific dimensions on the demo
updateTerminalSize();
fetch('/terminals?cols=' + term.cols + '&rows=' + term.rows, {method: 'POST'}).then(function (res) {
res.text().then(function (processId) {
pid = processId;
socketURL += processId;
socket = new WebSocket(socketURL);
socket.onopen = runRealTerminal;
socket.onclose = runFakeTerminal;
socket.onerror = runFakeTerminal;
});
});
}, 0);
}
function runRealTerminal() {
@@ -135,7 +141,7 @@ function runFakeTerminal() {
term.writeln('');
term.prompt();
term.on('key', function (key, ev) {
term._core.register(term.addDisposableListener('key', function (key, ev) {
var printable = (
!ev.altKey && !ev.altGraphKey && !ev.ctrlKey && !ev.metaKey
);
@@ -150,9 +156,116 @@ function runFakeTerminal() {
} else if (printable) {
term.write(key);
}
}));
term._core.register(term.addDisposableListener('paste', function (data, ev) {
term.write(data);
}));
}
function initOptions(term) {
var blacklistedOptions = [
// Internal only options
'cancelEvents',
'convertEol',
'debug',
'handler',
'screenKeys',
'termName',
'useFlowControl',
// Complex option
'theme',
// Only in constructor
'rendererType'
];
var stringOptions = {
bellSound: null,
bellStyle: ['none', 'sound'],
cursorStyle: ['block', 'underline', 'bar'],
experimentalCharAtlas: ['none', 'static', 'dynamic'],
fontFamily: null,
fontWeight: ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'],
fontWeightBold: ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900']
};
var options = Object.keys(term._core.options);
var booleanOptions = [];
var numberOptions = [];
options.filter(o => blacklistedOptions.indexOf(o) === -1).forEach(o => {
switch (typeof term.getOption(o)) {
case 'boolean':
booleanOptions.push(o);
break;
case 'number':
numberOptions.push(o);
break;
default:
if (Object.keys(stringOptions).indexOf(o) === -1) {
console.warn(`Unrecognized option: "${o}"`);
}
}
});
term.on('paste', function (data, ev) {
term.write(data);
var html = '';
html += '<div class="option-group">';
booleanOptions.forEach(o => {
html += `<div class="option"><label><input id="opt-${o}" type="checkbox" ${term.getOption(o) ? 'checked' : ''}/> ${o}</label></div>`;
});
html += '</div><div class="option-group">';
numberOptions.forEach(o => {
html += `<div class="option"><label>${o} <input id="opt-${o}" type="number" value="${term.getOption(o)}"/></label></div>`;
});
html += '</div><div class="option-group">';
Object.keys(stringOptions).forEach(o => {
if (stringOptions[o]) {
html += `<div class="option"><label>${o} <select id="opt-${o}">${stringOptions[o].map(v => `<option ${term.getOption(o) === v ? 'selected' : ''}>${v}</option>`).join('')}</select></label></div>`;
} else {
html += `<div class="option"><label>${o} <input id="opt-${o}" type="text" value="${term.getOption(o)}"/></label></div>`
}
});
html += '</div>';
var container = document.getElementById('options-container');
container.innerHTML = html;
// Attach listeners
booleanOptions.forEach(o => {
var input = document.getElementById(`opt-${o}`);
addDomListener(input, 'change', () => {
console.log('change', o, input.checked);
term.setOption(o, input.checked);
});
});
numberOptions.forEach(o => {
var input = document.getElementById(`opt-${o}`);
addDomListener(input, 'change', () => {
console.log('change', o, input.value);
if (o === 'cols' || o === 'rows') {
updateTerminalSize();
} else {
term.setOption(o, parseInt(input.value, 10));
}
});
});
Object.keys(stringOptions).forEach(o => {
var input = document.getElementById(`opt-${o}`);
addDomListener(input, 'change', () => {
console.log('change', o, input.value);
term.setOption(o, input.value);
});
});
}
function addDomListener(element, type, handler) {
element.addEventListener(type, handler);
term._core.register({ dispose: () => element.removeEventListener(type, handler) });
}
function updateTerminalSize() {
var cols = parseInt(document.getElementById(`opt-cols`).value, 10);
var rows = parseInt(document.getElementById(`opt-rows`).value, 10);
var width = (cols * term._core.renderer.dimensions.actualCellWidth + term._core.viewport.scrollBarWidth).toString() + 'px';
var height = (rows * term._core.renderer.dimensions.actualCellHeight).toString() + 'px';
terminalContainer.style.width = width;
terminalContainer.style.height = height;
term.fit();
}
+14 -4
View File
@@ -15,8 +15,18 @@ h1 {
padding: 2px;
}
#terminal-container .terminal {
background-color: #111;
color: #fafafa;
padding: 2px;
p {
font-size: 0.9em;
font-style: italic
}
#option-container {
display: flex;
justify-content: center;
}
.option-group {
display: inline-block;
padding-left: 20px;
vertical-align: top;
}
+87
View File
@@ -0,0 +1,87 @@
var express = require('express');
var app = express();
var expressWs = require('express-ws')(app);
var os = require('os');
var pty = require('node-pty');
var terminals = {},
logs = {};
app.use('/build', express.static(__dirname + '/../../build'));
app.use('/demo', express.static(__dirname + '/../../demo'));
app.use('/zmodemjs', express.static(__dirname + '/../../node_modules/zmodem.js/dist'));
app.get('/', function(req, res){
res.sendFile(__dirname + '/index.html');
});
app.get('/style.css', function(req, res){
res.sendFile(__dirname + '../style.css');
});
app.get('/main.js', function(req, res){
res.sendFile(__dirname + '/main.js');
});
app.post('/terminals', function (req, res) {
var cols = parseInt(req.query.cols),
rows = parseInt(req.query.rows),
term = pty.spawn(process.platform === 'win32' ? 'cmd.exe' : 'bash', [], {
encoding: null,
name: 'xterm-color',
cols: cols || 80,
rows: rows || 24,
cwd: process.env.PWD,
env: process.env
});
console.log('Created terminal with PID: ' + term.pid);
terminals[term.pid] = term;
logs[term.pid] = '';
term.on('data', function(data) {
logs[term.pid] += data;
});
res.send(term.pid.toString());
res.end();
});
app.post('/terminals/:pid/size', function (req, res) {
var pid = parseInt(req.params.pid),
cols = parseInt(req.query.cols),
rows = parseInt(req.query.rows),
term = terminals[pid];
term.resize(cols, rows);
console.log('Resized terminal ' + pid + ' to ' + cols + ' cols and ' + rows + ' rows.');
res.end();
});
app.ws('/terminals/:pid', function (ws, req) {
var term = terminals[parseInt(req.params.pid)];
console.log('Connected to terminal ' + term.pid);
ws.send(logs[term.pid]);
term.on('data', function(data) {
try {
ws.send(data);
} catch (ex) {
// The WebSocket is not open, ignore
}
});
ws.on('message', function(msg) {
term.write(msg);
});
ws.on('close', function () {
term.kill();
console.log('Closed terminal ' + term.pid);
// Clean things up
delete terminals[term.pid];
delete logs[term.pid];
});
});
var port = process.env.PORT || 3000,
host = os.platform() === 'win32' ? '127.0.0.1' : '0.0.0.0';
console.log('App listening to http://' + host + ':' + port);
app.listen(port, host);
+128
View File
@@ -0,0 +1,128 @@
<!doctype html>
<html>
<head>
<title>xterm.js demo</title>
<link rel="stylesheet" href="/build/xterm.css" />
<link rel="stylesheet" href="/build/addons/fullscreen/fullscreen.css" />
<link rel="stylesheet" href="/demo/style.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-promise/4.1.1/es6-promise.auto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fetch/1.0.0/fetch.min.js"></script>
<script src="/build/xterm.js" ></script>
<script src="/build/addons/attach/attach.js" ></script>
<script src="/zmodemjs/zmodem.js"></script>
<script src="/build/addons/zmodem/zmodem.js" ></script>
<script src="/build/addons/fit/fit.js" ></script>
<script src="/build/addons/fullscreen/fullscreen.js" ></script>
<script src="/build/addons/search/search.js" ></script>
</head>
<body>
<h1>xterm.js: xterm, in the browser</h1>
<div id="terminal-container"></div>
<div id="zmodem_controls">
<form id="zm_start" style="display: none" action="javascript:void(0)">
ZMODEM detected: Start ZMODEM session?
<label><input id="zmstart_yes" name="zmstart" type=radio checked value="1"> Yes</label>
&nbsp;
<label><input name="zmstart" type=radio value=""> No</label>
<button type="submit">Submit</button>
</form>
<form id="zm_offer" style="display: none" action="javascript:void(0)">
<p>ZMODEM File offered!</p>
<label><input id="zmaccept_yes" name="zmaccept" type=radio checked value="1"> Accept</label>
&nbsp;
<label><input name="zmaccept" type=radio value=""> Skip</label>
<button type="submit">Submit</button>
</form>
<div id="zm_file" style="display: none">
<div>Name: <span id="name"></span></div>
<div>Size: <span id="size"></span></div>
<div>Last modified: <span id="mtime"></span></div>
<div>Mode: <span id="mode"></span></div>
<br>
<div>Conversion: <span id="zfile_conversion"></span></div>
<div>Management: <span id="zfile_management"></span></div>
<div>Transport: <span id="zfile_transport"></span></div>
<div>Sparse? <span id="zfile_sparse"></span></div>
<br>
<div>Files remaining in batch: <span id="files_remaining"></span></div>
<div>Bytes remaining in batch: <span id="bytes_remaining"></span></div>
</div>
<form id="zm_progress" style="display: none" action="javascript:void(0)">
<div><span id="percent_received"></span>% (<span id="bytes_received"></span> bytes) received</div>
<button id="zm_progress_skipper" type="button" onclick="skip_current_file();">Skip File</button>
</form>
<form id="zm_choose" style="display: none" action="javascript:void(0)">
<label>Choose file(s): <input id="zm_files" type="file" multiple></label>
</form>
</div>
<div>
<h2>Actions</h2>
<p>
<label>Find next <input id="find-next"/></label>
<label>Find previous <input id="find-previous"/></label>
</p>
</div>
<div>
<h2>Options</h2>
<p>
<label><input type="checkbox" id="option-cursor-blink"> cursorBlink</label>
</p>
<p>
<label><input type="checkbox" checked id="zmodem-auto"> Accept all ZMODEM prompts<sup>*</sup></label>
</p>
<p>
<label>
cursorStyle
<select id="option-cursor-style">
<option value="block">block</option>
<option value="underline">underline</option>
<option value="bar">bar</option>
</select>
</label>
</p>
<p>
<label>
bellStyle
<select id="option-bell-style">
<option value="">none</option>
<option value="sound">sound</option>
<option value="visual">visual</option>
<option value="both">both</option>
</select>
</label>
</p>
<p>
<label>scrollback <input type="number" id="option-scrollback" value="1000" /></label>
</p>
<p>
<label>tabStopWidth <input type="number" id="option-tabstopwidth" value="8" /></label>
</p>
<div>
<h3>Size</h3>
<div>
<div style="display: inline-block; margin-right: 16px;">
<label for="cols">Columns</label>
<input type="number" id="cols" />
</div>
<div style="display: inline-block; margin-right: 16px;">
<label for="rows">Rows</label>
<input type="number" id="rows" />
</div>
</div>
</div>
</div>
<p><strong>Attention:</strong> The demo is a barebones implementation and is designed for xterm.js evaluation purposes only. Exposing the demo to the public as is would introduce security risks for the host.</p>
<p><sup>*</sup> ZMODEM file transfers are supported via an addon. To try it out, install <a href="https://ohse.de/uwe/software/lrzsz.html"><code>lrzsz</code></a> onto the remote peer, then run <code>rz</code> to send from your browser or <code>sz &lt;file&gt;</code> to send from the remote peer.</p>
<script src="main.js" defer ></script>
</body>
</html>
+388
View File
@@ -0,0 +1,388 @@
"use strict";
var term,
protocol,
socketURL,
socket,
pid;
Terminal.applyAddon(fit);
Terminal.applyAddon(attach);
Terminal.applyAddon(zmodem);
Terminal.applyAddon(search);
var terminalContainer = document.getElementById('terminal-container'),
actionElements = {
findNext: document.querySelector('#find-next'),
findPrevious: document.querySelector('#find-previous')
},
optionElements = {
cursorBlink: document.querySelector('#option-cursor-blink'),
cursorStyle: document.querySelector('#option-cursor-style'),
scrollback: document.querySelector('#option-scrollback'),
tabstopwidth: document.querySelector('#option-tabstopwidth'),
bellStyle: document.querySelector('#option-bell-style')
},
colsElement = document.getElementById('cols'),
rowsElement = document.getElementById('rows');
function setTerminalSize() {
var cols = parseInt(colsElement.value, 10);
var rows = parseInt(rowsElement.value, 10);
var viewportElement = document.querySelector('.xterm-viewport');
var scrollBarWidth = viewportElement.offsetWidth - viewportElement.clientWidth;
var width = (cols * term.charMeasure.width + 20 /*room for scrollbar*/).toString() + 'px';
var height = (rows * term.charMeasure.height).toString() + 'px';
terminalContainer.style.width = width;
terminalContainer.style.height = height;
term.resize(cols, rows);
}
colsElement.addEventListener('change', setTerminalSize);
rowsElement.addEventListener('change', setTerminalSize);
actionElements.findNext.addEventListener('keypress', function (e) {
if (e.key === "Enter") {
e.preventDefault();
term.findNext(actionElements.findNext.value);
}
});
actionElements.findPrevious.addEventListener('keypress', function (e) {
if (e.key === "Enter") {
e.preventDefault();
term.findPrevious(actionElements.findPrevious.value);
}
});
optionElements.cursorBlink.addEventListener('change', function () {
term.setOption('cursorBlink', optionElements.cursorBlink.checked);
});
optionElements.cursorStyle.addEventListener('change', function () {
term.setOption('cursorStyle', optionElements.cursorStyle.value);
});
optionElements.bellStyle.addEventListener('change', function () {
term.setOption('bellStyle', optionElements.bellStyle.value);
});
optionElements.scrollback.addEventListener('change', function () {
term.setOption('scrollback', parseInt(optionElements.scrollback.value, 10));
});
optionElements.tabstopwidth.addEventListener('change', function () {
term.setOption('tabStopWidth', parseInt(optionElements.tabstopwidth.value, 10));
});
createTerminal();
function createTerminal() {
// Clean terminal
while (terminalContainer.children.length) {
terminalContainer.removeChild(terminalContainer.children[0]);
}
term = new Terminal({
cursorBlink: optionElements.cursorBlink.checked,
scrollback: parseInt(optionElements.scrollback.value, 10),
tabStopWidth: parseInt(optionElements.tabstopwidth.value, 10)
});
term.on('resize', function (size) {
if (!pid) {
return;
}
var cols = size.cols,
rows = size.rows,
url = '/terminals/' + pid + '/size?cols=' + cols + '&rows=' + rows;
fetch(url, {method: 'POST'});
});
protocol = (location.protocol === 'https:') ? 'wss://' : 'ws://';
socketURL = protocol + location.hostname + ((location.port) ? (':' + location.port) : '') + '/terminals/';
term.open(terminalContainer);
term.fit();
// fit is called within a setTimeout, cols and rows need this.
setTimeout(function () {
colsElement.value = term.cols;
rowsElement.value = term.rows;
// Set terminal size again to set the specific dimensions on the demo
setTerminalSize();
fetch('/terminals?cols=' + term.cols + '&rows=' + term.rows, {method: 'POST'}).then(function (res) {
res.text().then(function (pid) {
window.pid = pid;
socketURL += pid;
socket = new WebSocket(socketURL);
socket.onopen = runRealTerminal;
socket.onclose = runFakeTerminal;
socket.onerror = runFakeTerminal;
term.zmodemAttach(socket, {
noTerminalWriteOutsideSession: true,
} );
term.on("zmodemRetract", () => {
start_form.style.display = "none";
start_form.onsubmit = null;
});
term.on("zmodemDetect", (detection) => {
function do_zmodem() {
term.detach();
let zsession = detection.confirm();
var promise;
if (zsession.type === "receive") {
promise = _handle_receive_session(zsession);
}
else {
promise = _handle_send_session(zsession);
}
promise.catch( console.error.bind(console) ).then( () => {
term.attach(socket);
} );
}
if (_auto_zmodem()) {
do_zmodem();
}
else {
start_form.style.display = "";
start_form.onsubmit = function(e) {
start_form.style.display = "none";
if (document.getElementById("zmstart_yes").checked) {
do_zmodem();
}
else {
detection.deny();
}
};
}
});
});
});
}, 0);
}
//----------------------------------------------------------------------
// UI STUFF
function _show_file_info(xfer) {
var file_info = xfer.get_details();
document.getElementById("name").textContent = file_info.name;
document.getElementById("size").textContent = file_info.size;
document.getElementById("mtime").textContent = file_info.mtime;
document.getElementById("files_remaining").textContent = file_info.files_remaining;
document.getElementById("bytes_remaining").textContent = file_info.bytes_remaining;
document.getElementById("mode").textContent = "0" + file_info.mode.toString(8);
var xfer_opts = xfer.get_options();
["conversion", "management", "transport", "sparse"].forEach( (lbl) => {
document.getElementById(`zfile_${lbl}`).textContent = xfer_opts[lbl];
} );
document.getElementById("zm_file").style.display = "";
}
function _hide_file_info() {
document.getElementById("zm_file").style.display = "none";
}
function _save_to_disk(xfer, buffer) {
return Zmodem.Browser.save_to_disk(buffer, xfer.get_details().name);
}
var skipper_button = document.getElementById("zm_progress_skipper");
var skipper_button_orig_text = skipper_button.textContent;
function _show_progress() {
skipper_button.disabled = false;
skipper_button.textContent = skipper_button_orig_text;
document.getElementById("bytes_received").textContent = 0;
document.getElementById("percent_received").textContent = 0;
document.getElementById("zm_progress").style.display = "";
}
function _update_progress(xfer) {
var total_in = xfer.get_offset();
document.getElementById("bytes_received").textContent = total_in;
var percent_received = 100 * total_in / xfer.get_details().size;
document.getElementById("percent_received").textContent = percent_received.toFixed(2);
}
function _hide_progress() {
document.getElementById("zm_progress").style.display = "none";
}
var start_form = document.getElementById("zm_start");
function _auto_zmodem() {
return document.getElementById("zmodem-auto").checked;
}
// END UI STUFF
//----------------------------------------------------------------------
function _handle_receive_session(zsession) {
zsession.on("offer", function(xfer) {
current_receive_xfer = xfer;
_show_file_info(xfer);
var offer_form = document.getElementById("zm_offer");
function on_form_submit() {
offer_form.style.display = "none";
//START
//if (offer_form.zmaccept.value) {
if (_auto_zmodem() || document.getElementById("zmaccept_yes").checked) {
_show_progress();
var FILE_BUFFER = [];
xfer.on("input", (payload) => {
_update_progress(xfer);
FILE_BUFFER.push( new Uint8Array(payload) );
});
xfer.accept().then(
() => {
_save_to_disk(xfer, FILE_BUFFER);
},
console.error.bind(console)
);
}
else {
xfer.skip();
}
//END
}
if (_auto_zmodem()) {
on_form_submit();
}
else {
offer_form.onsubmit = on_form_submit;
offer_form.style.display = "";
}
} );
var promise = new Promise( (res) => {
zsession.on("session_end", () => {
_hide_file_info();
_hide_progress();
res();
} );
} );
zsession.start();
return promise;
}
function _handle_send_session(zsession) {
var choose_form = document.getElementById("zm_choose");
choose_form.style.display = "";
var file_el = document.getElementById("zm_files");
var promise = new Promise( (res) => {
file_el.onchange = function(e) {
choose_form.style.display = "none";
var files_obj = file_el.files;
Zmodem.Browser.send_files(
zsession,
files_obj,
{
on_offer_response(obj, xfer) {
if (xfer) _show_progress();
//console.log("offer", xfer ? "accepted" : "skipped");
},
on_progress(obj, xfer) {
_update_progress(xfer);
},
on_file_complete(obj) {
//console.log("COMPLETE", obj);
_hide_progress();
},
}
).then(_hide_progress).then(
zsession.close.bind(zsession),
console.error.bind(console)
).then( () => {
_hide_file_info();
_hide_progress();
res();
} );
};
} );
return promise;
}
//This is here to allow canceling of an in-progress ZMODEM transfer.
var current_receive_xfer;
//Called from HTML directly.
function skip_current_file() {
current_receive_xfer.skip();
skipper_button.disabled = true;
skipper_button.textContent = "Waiting for server to acknowledge skip …";
}
function runRealTerminal() {
term.attach(socket);
term._initialized = true;
}
function runFakeTerminal() {
if (term._initialized) {
return;
}
term._initialized = true;
var shellprompt = '$ ';
term.prompt = function () {
term.write('\r\n' + shellprompt);
};
term.writeln('Welcome to xterm.js');
term.writeln('This is a local terminal emulation, without a real terminal in the back-end.');
term.writeln('Type some keys and commands to play around.');
term.writeln('');
term.prompt();
term.on('key', function (key, ev) {
var printable = (
!ev.altKey && !ev.altGraphKey && !ev.ctrlKey && !ev.metaKey
);
if (ev.keyCode == 13) {
term.prompt();
} else if (ev.keyCode == 8) {
// Do not delete the prompt
if (term.x > 2) {
term.write('\b \b');
}
} else if (printable) {
term.write(key);
}
});
term.on('paste', function (data, ev) {
term.write(data);
});
}
-126
View File
@@ -1,126 +0,0 @@
/**
* Implements the attach method, that attaches the terminal to a WebSocket stream.
* @module xterm/addons/attach/attach
* @license MIT
*/
(function (attach) {
if (typeof exports === 'object' && typeof module === 'object') {
/*
* CommonJS environment
*/
module.exports = attach(require('../../xterm'));
} else if (typeof define == 'function') {
/*
* Require.js is available
*/
define(['../../xterm'], attach);
} else {
/*
* Plain browser environment
*/
attach(window.Terminal);
}
})(function (Xterm) {
'use strict';
var exports = {};
/**
* Attaches the given terminal to the given socket.
*
* @param {Xterm} term - The terminal to be attached to the given socket.
* @param {WebSocket} socket - The socket to attach the current terminal.
* @param {boolean} bidirectional - Whether the terminal should send data
* to the socket as well.
* @param {boolean} buffered - Whether the rendering of incoming data
* should happen instantly or at a maximum
* frequency of 1 rendering per 10ms.
*/
exports.attach = function (term, socket, bidirectional, buffered) {
bidirectional = (typeof bidirectional == 'undefined') ? true : bidirectional;
term.socket = socket;
term._flushBuffer = function () {
term.write(term._attachSocketBuffer);
term._attachSocketBuffer = null;
clearTimeout(term._attachSocketBufferTimer);
term._attachSocketBufferTimer = null;
};
term._pushToBuffer = function (data) {
if (term._attachSocketBuffer) {
term._attachSocketBuffer += data;
} else {
term._attachSocketBuffer = data;
setTimeout(term._flushBuffer, 10);
}
};
term._getMessage = function (ev) {
if (buffered) {
term._pushToBuffer(ev.data);
} else {
term.write(ev.data);
}
};
term._sendData = function (data) {
socket.send(data);
};
socket.addEventListener('message', term._getMessage);
if (bidirectional) {
term.on('data', term._sendData);
}
socket.addEventListener('close', term.detach.bind(term, socket));
socket.addEventListener('error', term.detach.bind(term, socket));
};
/**
* Detaches the given terminal from the given socket
*
* @param {Xterm} term - The terminal to be detached from the given socket.
* @param {WebSocket} socket - The socket from which to detach the current
* terminal.
*/
exports.detach = function (term, socket) {
term.off('data', term._sendData);
socket = (typeof socket == 'undefined') ? term.socket : socket;
if (socket) {
socket.removeEventListener('message', term._getMessage);
}
delete term.socket;
};
/**
* Attaches the current terminal to the given socket
*
* @param {WebSocket} socket - The socket to attach the current terminal.
* @param {boolean} bidirectional - Whether the terminal should send data
* to the socket as well.
* @param {boolean} buffered - Whether the rendering of incoming data
* should happen instantly or at a maximum
* frequency of 1 rendering per 10ms.
*/
Xterm.prototype.attach = function (socket, bidirectional, buffered) {
return exports.attach(this, socket, bidirectional, buffered);
};
/**
* Detaches the current terminal from the given socket.
*
* @param {WebSocket} socket - The socket from which to detach the current
* terminal.
*/
Xterm.prototype.detach = function (socket) {
return exports.detach(this, socket);
};
return exports;
});
-86
View File
@@ -1,86 +0,0 @@
/**
* 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.
*
* - 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') {
/*
* CommonJS environment
*/
module.exports = fit(require('../../xterm'));
} else if (typeof define == 'function') {
/*
* Require.js is available
*/
define(['../../xterm'], fit);
} else {
/*
* Plain browser environment
*/
fit(window.Terminal);
}
})(function (Xterm) {
var exports = {};
exports.proposeGeometry = function (term) {
if (!term.element.parentElement) {
return null;
}
var parentElementStyle = window.getComputedStyle(term.element.parentElement),
parentElementHeight = parseInt(parentElementStyle.getPropertyValue('height')),
parentElementWidth = Math.max(0, parseInt(parentElementStyle.getPropertyValue('width')) - 17),
elementStyle = window.getComputedStyle(term.element),
elementPaddingVer = parseInt(elementStyle.getPropertyValue('padding-top')) + parseInt(elementStyle.getPropertyValue('padding-bottom')),
elementPaddingHor = parseInt(elementStyle.getPropertyValue('padding-right')) + parseInt(elementStyle.getPropertyValue('padding-left')),
availableHeight = parentElementHeight - elementPaddingVer,
availableWidth = parentElementWidth - elementPaddingHor,
container = term.rowContainer,
subjectRow = term.rowContainer.firstElementChild,
contentBuffer = subjectRow.innerHTML,
characterHeight,
rows,
characterWidth,
cols,
geometry;
subjectRow.style.display = 'inline';
subjectRow.innerHTML = 'W'; // Common character for measuring width, although on monospace
characterWidth = subjectRow.getBoundingClientRect().width;
subjectRow.style.display = ''; // Revert style before calculating height, since they differ.
characterHeight = subjectRow.getBoundingClientRect().height;
subjectRow.innerHTML = contentBuffer;
rows = parseInt(availableHeight / characterHeight);
cols = parseInt(availableWidth / characterWidth);
geometry = {cols: cols, rows: rows};
return geometry;
};
exports.fit = function (term) {
var geometry = exports.proposeGeometry(term);
if (geometry) {
term.resize(geometry.cols, geometry.rows);
}
};
Xterm.prototype.proposeGeometry = function () {
return exports.proposeGeometry(this);
};
Xterm.prototype.fit = function () {
return exports.fit(this);
};
return exports;
});
-10
View File
@@ -1,10 +0,0 @@
.xterm.fullscreen {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
width: auto;
height: auto;
z-index: 255;
}
-50
View File
@@ -1,50 +0,0 @@
/**
* Fullscreen addon for xterm.js
* @module xterm/addons/fullscreen/fullscreen
* @license MIT
*/
(function (fullscreen) {
if (typeof exports === 'object' && typeof module === 'object') {
/*
* CommonJS environment
*/
module.exports = fullscreen(require('../../xterm'));
} else if (typeof define == 'function') {
/*
* Require.js is available
*/
define(['../../xterm'], fullscreen);
} else {
/*
* Plain browser environment
*/
fullscreen(window.Terminal);
}
})(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;
if (typeof fullscreen == 'undefined') {
fn = (term.element.classList.contains('fullscreen')) ? 'remove' : 'add';
} else if (!fullscreen) {
fn = 'remove';
} else {
fn = 'add';
}
term.element.classList[fn]('fullscreen');
};
Xterm.prototype.toggleFullscreen = function (fullscreen) {
exports.toggleFullScreen(this, fullscreen);
};
return exports;
});
-207
View File
@@ -1,207 +0,0 @@
/**
* 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') {
/*
* CommonJS environment
*/
module.exports = linkify(require('../../xterm'));
} else if (typeof define == 'function') {
/*
* Require.js is available
*/
define(['../../xterm'], linkify);
} else {
/*
* Plain browser environment
*/
linkify(window.Terminal);
}
})(function (Xterm) {
'use strict';
var exports = {},
protocolClause = '(https?:\\/\\/)',
domainCharacterSet = '[\\da-z\\.-]+',
negatedDomainCharacterSet = '[^\\da-z\\.-]+',
domainBodyClause = '(' + domainCharacterSet + ')',
tldClause = '([a-z\\.]{2,6})',
ipClause = '((\\d{1,3}\\.){3}\\d{1,3})',
portClause = '(:\\d{1,5})',
hostClause = '((' + domainBodyClause + '\\.' + tldClause + ')|' + ipClause + ')' + portClause + '?',
pathClause = '(\\/[\\/\\w\\.-]*)*',
negatedPathCharacterSet = '[^\\/\\w\\.-]+',
bodyClause = hostClause + pathClause,
start = '(?:^|' + negatedDomainCharacterSet + ')(',
end = ')($|' + negatedPathCharacterSet + ')',
lenientUrlClause = start + protocolClause + '?' + bodyClause + end,
strictUrlClause = start + protocolClause + bodyClause + end,
lenientUrlRegex = new RegExp(lenientUrlClause),
strictUrlRegex = new RegExp(strictUrlClause);
/**
* Converts all valid URLs found in the given terminal line into
* hyperlinks. The terminal line can be either the HTML element itself
* or the index of the termina line in the children of the terminal
* rows container.
*
* @param {Xterm} terminal - The terminal that owns the given line.
* @param {number|HTMLDivElement} line - The terminal line that should get
* "linkified".
* @param {boolean} lenient - The regex type that will be used to identify links. If lenient is
* false, the regex requires a protocol clause. Defaults to true.
* @param {string} target - Sets target="" attribute with value provided to links.
* Default doesn't set target attribute
* @emits linkify
* @emits linkify:line
*/
exports.linkifyTerminalLine = function (terminal, line, lenient, target) {
if (typeof line == 'number') {
line = terminal.rowContainer.children[line];
} else if (! (line instanceof HTMLDivElement)) {
var message = 'The "line" argument should be either a number';
message += ' or an HTMLDivElement';
throw new TypeError(message);
}
if (typeof target === 'undefined') {
target = '';
} else {
target = 'target="' + target + '"';
}
var buffer = document.createElement('span'),
nodes = line.childNodes;
for (var j=0; j<nodes.length; j++) {
var node = nodes[j],
match;
/**
* Since we cannot access the TextNode's HTML representation
* from the instance itself, we assign its data as textContent
* to a dummy buffer span, in order to retrieve the TextNode's
* HTML representation from the buffer's innerHTML.
*/
buffer.textContent = node.data;
var nodeHTML = buffer.innerHTML;
/**
* Apply function only on TextNodes
*/
if (node.nodeType != node.TEXT_NODE) {
continue;
}
var url = exports.findLinkMatch(node.data, lenient);
if (!url) {
continue;
}
var startsWithProtocol = new RegExp('^' + protocolClause),
urlHasProtocol = url.match(startsWithProtocol),
href = (urlHasProtocol) ? url : 'http://' + url,
link = '<a href="' + href + '" ' + target + '>' + url + '</a>',
newHTML = nodeHTML.replace(url, link);
line.innerHTML = line.innerHTML.replace(nodeHTML, newHTML);
}
/**
* This event gets emitted when conversion of all URL susbtrings
* to HTML anchor elements (links) has finished, for a specific
* line of the current Xterm instance.
*
* @event linkify:line
*/
terminal.emit('linkify:line', line);
};
/**
* Finds a link within a block of text.
*
* @param {string} text - The text to search .
* @param {boolean} lenient - Whether to use the lenient search.
* @return {string} A URL.
*/
exports.findLinkMatch = function (text, lenient) {
var match = text.match(lenient ? lenientUrlRegex : strictUrlRegex);
if (!match || match.length === 0) {
return null;
}
return match[1];
}
/**
* Converts all valid URLs found in the terminal view into hyperlinks.
*
* @param {Xterm} terminal - The terminal that should get "linkified".
* @param {boolean} lenient - The regex type that will be used to identify links. If lenient is
* false, the regex requires a protocol clause. Defaults to true.
* @param {string} target - Sets target="" attribute with value provided to links.
* Default doesn't set target attribute
* @emits linkify
* @emits linkify:line
*/
exports.linkify = function (terminal, lenient, target) {
var rows = terminal.rowContainer.children;
lenient = (typeof lenient == "boolean") ? lenient : true;
for (var i=0; i<rows.length; i++) {
var line = rows[i];
exports.linkifyTerminalLine(terminal, line, lenient, target);
}
/**
* This event gets emitted when conversion of all URL substrings to
* HTML anchor elements (links) has finished for the current Xterm
* instance's view.
*
* @event linkify
*/
terminal.emit('linkify');
};
/**
* Extend Xterm prototype.
*/
/**
* Converts all valid URLs found in the current terminal linte into
* hyperlinks.
*
* @memberof Xterm
* @param {number|HTMLDivElement} line - The terminal line that should get
* "linkified".
* @param {boolean} lenient - The regex type that will be used to identify links. If lenient is
* false, the regex requires a protocol clause. Defaults to true.
* @param {string} target - Sets target="" attribute with value provided to links.
* Default doesn't set target attribute
*/
Xterm.prototype.linkifyTerminalLine = function (line, lenient, target) {
return exports.linkifyTerminalLine(this, line, lenient, target);
};
/**
* Converts all valid URLs found in the current terminal into hyperlinks.
*
* @memberof Xterm
* @param {boolean} lenient - The regex type that will be used to identify links. If lenient is
* false, the regex requires a protocol clause. Defaults to true.
* @param {string} target - Sets target="" attribute with value provided to links.
* Default doesn't set target attribute
*/
Xterm.prototype.linkify = function (lenient, target) {
return exports.linkify(this, lenient, target);
};
return exports;
});
-135
View File
@@ -1,135 +0,0 @@
/**
* This module provides methods for attaching a terminal to a terminado WebSocket stream.
*
* @module xterm/addons/terminado/terminado
* @license MIT
*/
(function (attach) {
if (typeof exports === 'object' && typeof module === 'object') {
/*
* CommonJS environment
*/
module.exports = attach(require('../../xterm'));
} else if (typeof define == 'function') {
/*
* Require.js is available
*/
define(['../../xterm'], attach);
} else {
/*
* Plain browser environment
*/
attach(window.Terminal);
}
})(function (Xterm) {
'use strict';
var exports = {};
/**
* Attaches the given terminal to the given socket.
*
* @param {Xterm} term - The terminal to be attached to the given socket.
* @param {WebSocket} socket - The socket to attach the current terminal.
* @param {boolean} bidirectional - Whether the terminal should send data
* to the socket as well.
* @param {boolean} buffered - Whether the rendering of incoming data
* should happen instantly or at a maximum
* frequency of 1 rendering per 10ms.
*/
exports.terminadoAttach = function (term, socket, bidirectional, buffered) {
bidirectional = (typeof bidirectional == 'undefined') ? true : bidirectional;
term.socket = socket;
term._flushBuffer = function () {
term.write(term._attachSocketBuffer);
term._attachSocketBuffer = null;
clearTimeout(term._attachSocketBufferTimer);
term._attachSocketBufferTimer = null;
};
term._pushToBuffer = function (data) {
if (term._attachSocketBuffer) {
term._attachSocketBuffer += data;
} else {
term._attachSocketBuffer = data;
setTimeout(term._flushBuffer, 10);
}
};
term._getMessage = function (ev) {
var data = JSON.parse(ev.data)
if( data[0] == "stdout" ) {
if (buffered) {
term._pushToBuffer(data[1]);
} else {
term.write(data[1]);
}
}
};
term._sendData = function (data) {
socket.send(JSON.stringify(['stdin', data]));
};
term._setSize = function (size) {
socket.send(JSON.stringify(['set_size', size.rows, size.cols]));
};
socket.addEventListener('message', term._getMessage);
if (bidirectional) {
term.on('data', term._sendData);
}
term.on('resize', term._setSize);
socket.addEventListener('close', term.terminadoDetach.bind(term, socket));
socket.addEventListener('error', term.terminadoDetach.bind(term, socket));
};
/**
* Detaches the given terminal from the given socket
*
* @param {Xterm} term - The terminal to be detached from the given socket.
* @param {WebSocket} socket - The socket from which to detach the current
* terminal.
*/
exports.terminadoDetach = function (term, socket) {
term.off('data', term._sendData);
socket = (typeof socket == 'undefined') ? term.socket : socket;
if (socket) {
socket.removeEventListener('message', term._getMessage);
}
delete term.socket;
};
/**
* Attaches the current terminal to the given socket
*
* @param {WebSocket} socket - The socket to attach the current terminal.
* @param {boolean} bidirectional - Whether the terminal should send data
* to the socket as well.
* @param {boolean} buffered - Whether the rendering of incoming data
* should happen instantly or at a maximum
* frequency of 1 rendering per 10ms.
*/
Xterm.prototype.terminadoAttach = function (socket, bidirectional, buffered) {
return exports.terminadoAttach(this, socket, bidirectional, buffered);
};
/**
* Detaches the current terminal from the given socket.
*
* @param {WebSocket} socket - The socket from which to detach the current
* terminal.
*/
Xterm.prototype.terminadoDetach = function (socket) {
return exports.terminadoDetach(this, socket);
};
return exports;
});
-2261
View File
File diff suppressed because it is too large Load Diff
-5132
View File
File diff suppressed because it is too large Load Diff
-1
View File
File diff suppressed because one or more lines are too long
-9
View File
@@ -1,9 +0,0 @@
version: '2'
services:
web:
build: ./
volumes:
- ./:/usr/src/app
ports:
- 3000:3000
+17
View File
@@ -0,0 +1,17 @@
version: "3"
services:
web:
image: xtermjs/xterm.js:latest
build: .
volumes:
- ./:/usr/src/app
ports:
- ${XTERMJS_PORT:3000}:3000
command: ["npm", "start"]
watch:
build: .
volumes:
- ./:/usr/src/app
command: ["npm", "run", "watch"]

Some files were not shown because too many files have changed in this diff Show More