Compare commits

...
1425 Commits
Author SHA1 Message Date
Daniel Imms f447274f43 Merge pull request #5463 from Tyriar/tyriar/v6
v6.0.0, bump addon versions, publish unicode graphemes
2025-12-22 05:48:49 -08:00
Daniel Imms f68d1e5d58 Skip sync output tests for now 2025-12-21 13:03:25 -08:00
Daniel Imms 30691e8b46 v6.0.0, bump addon versions, publish unicode graphemes
Part of #5147
2025-12-21 12:49:37 -08:00
Daniel Imms 5fa632518e Merge pull request #5462 from Tyriar/tyriar/deprecated
Remove deprecated windowsMode and fastScrollModifier
2025-12-21 05:06:56 -08:00
Daniel Imms 3571d1f51a Remove windowsMode in favor of windowsPty 2025-12-21 05:01:15 -08:00
Daniel Imms ebc0d83d8e Remove deprecated/unused fastScrollModifier 2025-12-21 04:58:45 -08:00
Daniel Imms d1c50c14e3 Merge pull request #5461 from Tyriar/tyriar/glob
Remove need for glob module
2025-12-20 08:44:33 -08:00
Daniel Imms 92b43bdf9b Remove only 2025-12-20 08:33:56 -08:00
Daniel Imms a9d3ca19f4 Merge pull request #5449 from iSuslov/exports/esm-headless-node
Configure "exports" field in package.json [headless]
2025-12-20 07:47:58 -08:00
Daniel Imms cb4d1ef2c0 Merge pull request #5453 from chrislloyd/feat/synchronized-output
Add synchronized output support (DEC mode 2026)
2025-12-20 07:44:32 -08:00
Daniel Imms 34fd0dcf53 Remove need for glob module 2025-12-20 07:44:24 -08:00
Daniel Imms 7335f15943 Merge pull request #5460 from Tyriar/tyriar/test-results
Git ignore test-results/
2025-12-20 07:37:43 -08:00
Daniel Imms 5e9cd6208f Git ignore test-results/ 2025-12-20 07:37:20 -08:00
Daniel Imms 6733e13a44 Invert initial assertion 2025-12-20 07:33:18 -08:00
Daniel Imms ad07f2cf76 Revert last frame request cache clearing 2025-12-20 07:23:20 -08:00
Daniel Imms 5396243bce Merge pull request #5450 from iSuslov/fix-esm-path-addon-unicode-graphemes
Fix wrong export path for ESM target in [addon-unicode-graphemes]
2025-12-20 07:20:08 -08:00
Daniel Imms 12c4f9536e Use underline cursor style to ensure cursor color isn't reported 2025-12-20 07:13:41 -08:00
Daniel Imms e9ba31f1b6 Explicitly set background color in playwright tests 2025-12-20 06:40:16 -08:00
Daniel Imms ed0ab5f9e4 Add missing property to headless API test assertion 2025-12-20 06:39:27 -08:00
Daniel Imms 0741f8be5c Merge pull request #5452 from iSuslov/upgrade-glob-version-fix-tsc-build
Fix tsc build - upgrade glob version
2025-12-20 06:37:06 -08:00
Daniel Imms 2edd121f1b Add node about serialize addon support 2025-12-20 06:17:31 -08:00
Daniel Imms 1eee5cdf18 Add synchronizedOutput mode to headless terminal object 2025-12-20 06:14:45 -08:00
Daniel Imms 20c1674d00 Update package-lock.json 2025-12-20 06:12:41 -08:00
Daniel Imms 32553fff06 Add synchronizedOutputMode to xterm-headless.d.ts 2025-12-20 06:05:36 -08:00
Daniel Imms 832aa54478 Fix colors and clear cached frames to pass tests 2025-12-20 06:04:11 -08:00
Daniel Imms 7f50b56ae4 Fix one playwright test 2025-12-10 08:44:13 -08:00
Daniel Imms bd361af105 Fix lint 2025-12-10 07:59:52 -08:00
Daniel Imms 9ea059de6f Move SynchronizedOutputHandler to bottom of file 2025-12-10 07:50:59 -08:00
Daniel Imms 7cdf3f9dd7 Prefer const enum so the number is inlined 2025-12-10 07:50:28 -08:00
Daniel Imms 7f81df5a3a Add BSU and ESU to VT tab in demo 2025-12-10 07:49:07 -08:00
Chris LloydandClaude af5dbfcd2c Add DECRQM support for synchronized output mode
Applications can now detect synchronized output support by querying
CSI ? 2026 $ p and receiving CSI ? 2026 ; <mode> $ y response.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 08:26:04 -08:00
Chris LloydandClaude 5d0eae8576 Fix spec URL to use master branch
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 08:23:37 -08:00
Chris LloydandClaude 6b63c5f260 Address PR review feedback for synchronized output
- Remove synchronizedOutputTimeout public API, hardcode 1s timeout
- Extract SynchronizedOutputHandler class for cleaner code
- Update spec URL to contour-terminal/vt-extensions
- Remove unnecessary comment in InputHandler
- Delete unit tests, add integration tests in SharedRendererTests
- Fix whitespace issue

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 07:58:31 -08:00
Chris LloydandClaude 7228e2e2dc Add synchronized output support (DEC mode 2026)
Implement synchronized output mode (CSI ? 2026 h/l) which allows
applications to batch terminal updates and render them atomically,
preventing screen tearing during rapid output.

Features:
- BSU (CSI ? 2026 h) pauses rendering, buffering row updates
- ESU (CSI ? 2026 l) flushes buffer and renders atomically
- Configurable timeout via synchronizedOutputTimeout option (default 5s)
- Exposed via terminal.modes.synchronizedOutputMode

Closes #3375

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 11:16:25 -08:00
Ivan Suslov a3e1ecf91b Fix tsc build - upgrade glob version 2025-12-04 07:28:40 -05:00
Ivan Suslov b41d3ef130 Fix ESM export path for addon-unicode-graphemes 2025-12-04 05:02:12 -05:00
Ivan Suslov 8338418471 Added exports field to headless package.json 2025-12-04 03:56:32 -05:00
Daniel Imms 46c510a76d Merge pull request #5413 from afska/patch-1
Adding EmuDevz to the "Real-world uses" list
2025-11-23 13:47:40 -08:00
Daniel Imms 80c3164070 Merge pull request #5446 from Tyriar/tyriar/npm
Migrate from yarn to npm, node 18 -> 22, use npm workspaces
2025-11-23 13:47:15 -08:00
Daniel Imms 236004ce6c Merge branch 'master' into tyriar/npm 2025-11-23 12:53:21 -08:00
Daniel Imms 741d9c3273 Remove install-addon calls 2025-11-23 10:00:21 -08:00
Daniel Imms bf4fb3ad64 Migrate to npm workspaces 2025-11-23 09:54:17 -08:00
Daniel Imms da4ab8a01e Remove peer dependency, generate lock files 2025-11-23 09:35:43 -08:00
Daniel Imms 92eddf8a61 Move to npm 2025-11-23 09:01:24 -08:00
Daniel Imms 637231e6e1 Merge pull request #5445 from Tyriar/tyriar/perf
Prefer performance.now() over Date.now()
2025-11-23 08:46:24 -08:00
Daniel Imms 6468a78237 Fix comment lint 2025-11-23 08:40:35 -08:00
Daniel Imms 98e234992b Prefer performance.now() over Date.now()
performance.now() is faster than Date.now() as there's no need to
consult the system clock. The more important part of this is that
performance.now() is monotonic and is guaranteed to never to backwards.
2025-11-23 08:32:35 -08:00
Daniel Imms e1023d7ec2 Merge pull request #5442 from Tyriar/tyriar/5441
Fix headless module path
2025-11-14 10:18:17 -08:00
Daniel Imms d186a3a115 Fix headless module path
Fixes #5441
2025-11-12 09:30:11 -08:00
Daniel Imms 65a0e03b66 Merge pull request #5437 from xtermjs/anthonykim1/preventPageScrollWhenMouseOff
Prevent entire page from scrolling when scrolling in alt buffer with mouse event off
2025-11-02 03:54:46 -08:00
Anthony Kim 6ae020f51e add this.cancel(ev, true) when line is zero on wheel handler 2025-10-31 14:39:42 -07:00
Daniel Imms 6c79a46513 Merge pull request #5436 from xtermjs/merogge/serialize-range
add range to IHTMLSerializeOptions
2025-10-28 09:41:17 -07:00
meganrogge 4a62856153 fix test 2025-10-28 12:30:54 -04:00
meganrogge 5121867bbb rm line 2025-10-28 11:56:56 -04:00
meganrogge 5a467da137 pass in startLine, endLine, startCol 2025-10-28 11:46:41 -04:00
meganrogge 18bafaf9c9 fix indentation 2025-10-28 10:30:22 -04:00
meganrogge 5141a91bba add range to IHTMLSerializeOptions 2025-10-28 10:27:00 -04:00
Daniel Imms 9fce067266 Merge pull request #5425 from xtermjs/anthonykim1/parsingDataCharCode
Only show char codes for parsing data on trace
2025-10-22 19:08:47 -07:00
Daniel Imms 59241e467c Update src/common/InputHandler.ts 2025-10-22 19:02:14 -07:00
Anthony Kim 09e26980d3 I dont think we need () => in front of typeof data === 'string' 2025-10-22 16:23:35 -07:00
Anthony Kim c3bb36bad9 if trace, debug each AND remove array.from 2025-10-22 16:11:22 -07:00
Anthony Kim 2c57b3219b Only show char codes for parsing data on trace 2025-10-22 09:47:33 -07:00
Daniel Imms e9e8206467 Merge pull request #5423 from Tyriar/tyriar/resize5300
Clear selection on vertical resize
2025-10-19 01:21:28 -07:00
Daniel Imms 9a7517d3eb Clear selection on vertical resize
Fixes #5300
2025-10-19 01:15:30 -07:00
Daniel Imms 1bf90d9f47 Merge pull request #5422 from xtermjs/Tyriar-patch-1
Explain filtering unit tests by file
2025-10-18 13:49:38 -07:00
Daniel Imms 1527e89ad5 Explain filtering unit tests by file 2025-10-18 06:40:45 -07:00
Daniel Imms 95cc31566a Merge pull request #5421 from xtermjs/Tyriar-patch-1
Use Windows PowerShell instead of pwsh 7 in demo
2025-10-18 06:20:41 -07:00
Daniel Imms 7274e1bbea Use Windows PowerShell instead of pwsh 7 in demo
When pwsh 7 isn't installed it's hard to figure out what the problem is.
2025-10-18 06:15:19 -07:00
Daniel Imms a8fabcfa01 Merge pull request #5420 from xtermjs/anthonykim1/charCodesForVerbose
Only log character codes for trace log
2025-10-17 11:39:21 -07:00
Anthony Kim 67cf25989a only send codes, not the data when in trace 2025-10-17 11:26:34 -07:00
Anthony KimandDaniel Imms f87e574971 Update src/common/services/CoreService.ts
Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
2025-10-17 11:23:24 -07:00
Anthony Kim 5269462817 Only log character codes for verbose/trace 2025-10-17 10:12:10 -07:00
Anthony Kim f4baddaaf1 Merge pull request #5411 from xtermjs/anthonykim1/fixTeleportWhenAltScroll
Fix teleport when exiting out of alt buffer. v2
2025-10-17 09:20:23 -07:00
Rodrigo Alfonso 3aa836e5d7 Adding EmuDevz to the "Real-world uses" list 2025-10-10 03:24:12 -03:00
Anthony Kim 2a6e22e8f8 set this._latestYDisp = undefined onBufferActivate 2025-10-01 20:36:06 -07:00
Anthony Kim 32c3cb01a1 Make sure this._latestYDisp is up to date 2025-09-30 23:04:04 -07:00
Daniel Imms a1d8e96fdd Merge pull request #5406 from Tyriar/tyriar/search_refactor
Refactor search addon into multiple files, add unit tests
2025-09-26 18:24:44 +09:00
Daniel Imms c4780e54fd Merge branch 'master' into tyriar/search_refactor 2025-09-26 17:52:47 +09:00
Daniel Imms c56336b32b Fix unit tests 2025-09-26 17:49:20 +09:00
Daniel Imms d11f411c17 Bring back respecting of cached search term 2025-09-26 17:09:54 +09:00
Daniel Imms f03dfbb3ba Merge pull request #5407 from Tyriar/tyriar/bd09_copilot_instructions
Improve Copilot instructions and add test guidelines
2025-09-26 16:51:46 +09:00
Daniel Imms ffd6dc6ab7 Fix import issue 2025-09-19 09:06:53 -07:00
Daniel Imms 5b4b93acc6 Improve Copilot instructions and add test guidelines
- Enhanced copilot instructions with detailed architecture overview
- Added comprehensive development workflow documentation
- Documented addon development patterns and key examples
- Added project-specific conventions and TypeScript structure
- Included common patterns for parser integration and buffer access
- Added critical implementation details for rendering and events
- Created unit test instructions file with addon testing rules
- Specified preferences for assertions and self-documenting tests
2025-09-19 09:03:02 -07:00
Daniel Imms 2b329eb7b7 Search engine tests 2025-09-19 08:58:30 -07:00
Daniel Imms 9c5644ddc0 Add SearchEngine tests 2025-09-19 08:52:14 -07:00
Daniel Imms 398e87490d Add coding guidelines and lint-fix script
- Add coding guidelines section to copilot instructions
- Specify rule about avoiding comments in unit tests
- Add lint-fix npm script for auto-fixing ESLint issues
2025-09-18 13:27:12 -07:00
Daniel Imms a191370d54 refactor: remove unnecessary interface exports
- Remove export from IHighlight and IMultiHighlight interfaces
- Remove export from ISelectedDecoration interface
- Remove export from ISearchPosition interface
- Keep ISearchResult exported as it's used across multiple files
- Make ISelectedDecoration extend IDisposable for consistency
2025-09-18 13:26:43 -07:00
Daniel Imms bf9ce3bfaf Clean up SearchLineCache.test.ts comments
- Remove unnecessary inline comments from unit tests
- Add descriptive assertion messages where appropriate
- Follow coding guidelines for test comment usage
2025-09-18 13:21:07 -07:00
Daniel Imms ca7e8ca3b7 refactor(addon-search): extract components
- Extract SearchEngine for core search algorithms
- Extract DecorationManager for visual decorations
- Extract SearchState for state management
- Extract SearchResultTracker for result tracking
- Simplify SearchAddon by delegating to components
- Improve modularity and maintainability
2025-09-18 07:38:42 -07:00
Daniel Imms ab43a3bd22 Merge pull request #5405 from Tyriar/tyriar/b8d4_search_interface_refactor
Refactor search addon interfaces
2025-09-18 06:31:18 -07:00
Daniel Imms 32e58c71fe Refactor search addon interfaces
- Move ISearchAddonOptions and ISearchResultChangeEvent to types
- Make noScroll property required in IInternalSearchOptions
- Change exported interfaces to internal scope where appropriate
2025-09-18 06:25:12 -07:00
Daniel Imms b12a9393f1 Merge pull request #5404 from Tyriar/tyriar/1de3_timeout_cleanup
Replace timeout handling with disposableTimeout
2025-09-17 15:12:00 -07:00
Daniel Imms c27af4fa2e Remove thenable from more places 2025-09-17 15:06:33 -07:00
Daniel Imms 90bf20d9d8 Remove Thenable 2025-09-17 15:02:27 -07:00
Daniel Imms 8ffcbd98c4 Replace timeout handling with disposableTimeout
- Use disposableTimeout instead of manual timeout management
- Replace MutableDisposable pattern for SearchAddon highlight timeout
- Replace SearchLineCache timeout with MutableDisposable approach
- Clean up timeout disposal logic in both classes
2025-09-17 14:48:11 -07:00
Daniel Imms 15d90826f9 Merge pull request #5403 from Tyriar/tyriar/76c0_search_line_cache
Add SearchLineCache for improved search performance
2025-09-17 14:38:34 -07:00
Daniel Imms 304143a166 Add SearchLineCache for improved search performance
- Add SearchLineCache class to cache translated buffer lines
- Integrate caching into SearchAddon for line translation
- Improve search performance by avoiding repeated translation
- Add cache invalidation on terminal resize and writes
2025-09-17 14:28:03 -07:00
Daniel Imms 02b3704af0 Merge pull request #5402 from Tyriar/tyriar/9436_copilot_instructions
Update GitHub Copilot instructions with test details
2025-09-17 09:28:07 -07:00
Daniel Imms eb1330ca18 Merge pull request #5401 from Tyriar/tyriar/search-refactor
Refactor search addon types and internal handling
2025-09-17 09:22:07 -07:00
Daniel Imms 3a15c8080d Update GitHub Copilot instructions with test details
- Add comprehensive unit test examples with yarn test-unit
- Include integration test examples with yarn test-integration
- Document test filtering by file path and wildcard patterns
- Explain test runner frameworks (mocha and playwright)
2025-09-17 09:21:40 -07:00
Daniel Imms 6ac9f59ef4 Fix tests 2025-09-17 09:16:20 -07:00
Daniel Imms bffdc59901 Merge branch 'master' into tyriar/search-refactor 2025-09-17 08:53:54 -07:00
Daniel Imms 76a8a8e347 Refactor search addon types and internal handling
- Import search types from addon-search package
- Add IInternalSearchOptions interface for noScroll param
- Update _updateMatches to use internal search methods
- Pass internal options through search method chain
2025-09-17 08:52:38 -07:00
Daniel Imms e37aba5924 Merge pull request #5399 from Tyriar/tyriar/search-constants-refactor
Refactor search constants and improve documentation
2025-09-17 08:16:51 -07:00
Daniel Imms 5c0107462e Merge pull request #5379 from xtermjs/dependabot/npm_and_yarn/addons/addon-ligatures/form-data-4.0.4
Bump form-data from 4.0.0 to 4.0.4 in /addons/addon-ligatures
2025-09-17 08:13:12 -07:00
Daniel Imms 87a45acae7 Refactor search constants and improve documentation
- Convert standalone constants to Constants enum with detailed docs
- Fix spacing issue in SearchAddon class declaration
- Update all references to use Constants enum for consistency
2025-09-17 08:06:56 -07:00
Daniel Imms ab01a5fd65 Merge pull request #5398 from Tyriar/tyriar/search-api-typing
Add proper typing for search results change event
2025-09-17 07:54:29 -07:00
Daniel Imms 6e833e5d5d Add proper typing for search results change event
- Export ISearchResultChangeEvent interface in addon-search
- Use proper Event<T> typing instead of inline object
- Improve API consistency and type safety for consumers
2025-09-17 07:33:43 -07:00
Daniel Imms d7d7f1b023 Merge pull request #5391 from Tyriar/tyriar/mouse_events
Bring back partial wheel tracking
2025-09-09 18:42:38 -07:00
Anthony Kim 9c42fb348b ignore fastScrollModifier 2025-09-09 13:21:37 -07:00
Anthony Kim e4f222f6b0 Make test happy 2025-09-09 12:03:51 -07:00
Anthony Kim 38bee71630 More clear comments 2025-09-09 12:00:19 -07:00
Anthony Kim 1a6a807f68 Remove stale comment 2025-09-09 11:59:29 -07:00
Anthony Kim 03ce26c697 Questions, possible concern 2025-09-09 11:56:28 -07:00
Anthony Kim cf6b868dfb fastScrollModifier seems deprecated 2025-09-09 11:51:27 -07:00
Anthony Kim d862c82386 no stale comments 2025-09-08 21:14:20 -07:00
Anthony Kim 50df7a69e6 remove unused var 2025-09-08 21:06:37 -07:00
Anthony Kim 26ecba8de1 Fix sluggish mouse problem. Now similar to trackpad 2025-09-08 21:03:05 -07:00
Daniel Imms 0d1e6b7a5e Merge pull request #5390 from xtermjs/anthonykim1/fixTeleportAltBuffer
Fix scrollbar teleport after exiting alt buffer
2025-08-29 05:41:52 -07:00
Anthony Kim b104a5b953 Respect original formatting 2025-08-28 22:56:15 -07:00
Anthony Kim ebddd5d346 Move from CoreBrowerTerminal to CoreMouseService. Still slow though 2025-08-28 22:54:50 -07:00
Daniel Imms 5bd7b4aaec Bring back partial wheel tracking
Part of microsoft/vscode#224750
2025-08-28 10:28:19 -07:00
Anthony Kim a6fdf043ce Respect original formatting 2025-08-28 08:57:25 -07:00
Anthony Kim 287702610c More clean up after removing test 2025-08-28 08:54:01 -07:00
Anthony Kim 4d59eca5f9 Clean up 2025-08-28 08:52:46 -07:00
Anthony Kim 753ea81fc0 BufferService listen to onBufferActivate, remove tests 2025-08-28 08:46:27 -07:00
Anthony Kim 675b2c3a70 Improve test 2025-08-27 21:31:34 -07:00
Anthony Kim 86745e1320 Add some tests from copilot 2025-08-27 21:12:15 -07:00
Anthony Kim a3ab942ea1 Fix teleport issue when coming back from alt buffer 2025-08-27 20:45:52 -07:00
Daniel Imms e969832946 Merge pull request #5385 from anthonykim1/anthonykim1/fixWrappedTerminalFind
Fix terminal find when wrapped
2025-08-21 12:40:01 -07:00
Anthony Kim 95a9531ec1 Try to add tests 2025-08-20 22:49:03 -07:00
Daniel Imms 7637a2de19 Merge pull request #5386 from alexkozy/safe-guards
fix: ensure that currentRow can not go out of the range
2025-08-20 14:15:08 -07:00
Alexey Kozy a589be2826 fix: ensure that currentRow can not go out of the range 2025-08-20 13:47:40 -07:00
Anthony Kim b53096f4a2 Clean code 2025-08-20 10:55:47 -07:00
Anthony Kim 687d8277e7 Fix terminal find when wrapped 2025-08-20 10:53:40 -07:00
Daniel Imms 4c0cf27cfc Merge pull request #5334 from CodinGame/webgl-renderer-shadow-dom
Support shadow dom in webgl renderer
2025-07-31 08:32:44 -07:00
Loïc Mangeonjean 149527ddb8 refactor: apply requested style change 2025-07-31 17:08:30 +02:00
dependabot[bot] 9c3eb170d2 Bump form-data from 4.0.0 to 4.0.4 in /addons/addon-ligatures
Bumps [form-data](https://github.com/form-data/form-data) from 4.0.0 to 4.0.4.
- [Release notes](https://github.com/form-data/form-data/releases)
- [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md)
- [Commits](https://github.com/form-data/form-data/compare/v4.0.0...v4.0.4)

---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 4.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-21 23:07:47 +00:00
Daniel Imms c4b707e9ca Merge pull request #5362 from Tyriar/tyriar/steps2
Move copilot steps to correct folder
2025-06-21 11:01:00 -07:00
Daniel Imms 9d35d59fb3 Move copilot steps to correct folder 2025-06-21 11:00:33 -07:00
Daniel Imms 877b37d3cc Merge pull request #5359 from Tyriar/tyriar/copilot_steps
Add copilot setup steps
2025-06-21 10:55:11 -07:00
Daniel Imms f14f55c951 Add copilot setup steps 2025-06-21 10:54:46 -07:00
Daniel Imms 8a16a551e0 Merge pull request #5358 from Tyriar/tyriar/reflow_bounds
Revert "Merge pull request #5321 from Tyriar/5319"
2025-06-18 06:17:46 -07:00
Daniel Imms 2a5239578a Revert "Merge pull request #5321 from Tyriar/5319"
This reverts commit a260f7d288, reversing
changes made to 2042bb8502.
2025-06-18 06:09:53 -07:00
Daniel Imms d28eb696ec Merge pull request #5355 from Tyriar/tyriar/3634
Add note about reverse tabnapping
2025-06-13 08:41:38 -07:00
Daniel Imms 4c0c2559c3 Add note about reverse tabnapping
Fixes #3634
2025-06-13 08:19:31 -07:00
Daniel Imms ee0a3deb6a Merge pull request #5349 from xtermjs/copilot/fix-3382
Add comprehensive tests for alt+shift+letter keyboard combinations
2025-06-05 03:47:13 -07:00
copilot-swe-agent[bot]andTyriar 076f051bb5 Fix ESLint trailing spaces warning in Keyboard.test.ts
Co-authored-by: Tyriar <2193314+Tyriar@users.noreply.github.com>
2025-06-05 10:34:53 +00:00
copilot-swe-agent[bot]andTyriar 658c57546c Add comprehensive tests for alt+shift+letter keyboard combinations
Co-authored-by: Tyriar <2193314+Tyriar@users.noreply.github.com>
2025-06-05 10:24:34 +00:00
copilot-swe-agent[bot] 223a650e3e Initial plan for issue 2025-06-05 10:13:25 +00:00
Daniel Imms 4b6316e510 Merge pull request #5346 from xtermjs/copilot/fix-4538-2
Remove alt -> ctrl+arrow hack in favor of embedder-specific solutions
2025-05-31 06:59:41 -07:00
copilot-swe-agent[bot]andTyriar 41546230dc Remove alt -> ctrl+arrow hack and update tests
Co-authored-by: Tyriar <2193314+Tyriar@users.noreply.github.com>
2025-05-29 13:20:54 +00:00
copilot-swe-agent[bot] 8413c0f94b Initial plan for issue 2025-05-29 13:09:01 +00:00
Daniel Imms 8828b47cea Merge pull request #5345 from Tyriar/tyriar/instruct
Add instructions to help Copilot coding agent
2025-05-29 06:05:50 -07:00
Daniel Imms b0f300e61b Add instructions to help Copilot coding agent 2025-05-29 06:00:41 -07:00
Loïc Mangeonjean 3ad83dd70e chore: add webgl shadow dom test 2025-05-21 21:51:01 +02:00
Loïc Mangeonjean 496b53d84d fix: support shadow dom in webgl renderer 2025-05-20 16:31:17 +02:00
Daniel Imms e9c547c1c6 Merge pull request #5337 from Tyriar/tyriar/5336
Fix finding terms across wrapped lines
2025-05-08 11:47:46 -07:00
Daniel Imms 0307e2c586 Fix finding terms across wrapped lines
Fixes #5336
2025-05-08 11:40:17 -07:00
Daniel Imms e29c2360e7 Merge pull request #5335 from Tyriar/tyriar/5255
webgl: Ignore alpha channel when allowTransparency is false
2025-05-07 08:19:19 -07:00
Daniel Imms 2b38b65392 webgl: Ignore alpha channel when allowTransparency is false
Fixes #5255
Part of microsoft/vscode#204663
2025-05-07 08:05:22 -07:00
Daniel Imms baf12e7aa4 Merge pull request #5308 from alexemorris/patch-1
Update AccessibilityManager.ts to use textContent rather than innerText
2025-04-23 05:13:17 -07:00
Daniel Imms 064efd6876 Merge branch 'master' into patch-1 2025-04-23 05:03:38 -07:00
Daniel Imms f615ac58b3 Merge pull request #5329 from Tyriar/esbuild_250422
Update and pin esbuild
2025-04-22 03:11:47 -07:00
Daniel Imms 2af170dbc9 Merge pull request #5317 from tabarra/docs/registerMarker-tip
docs: added usage tip for registerMarker()
2025-04-22 03:03:48 -07:00
Daniel Imms 39ad2cf3fe Update and pin esbuild 2025-04-22 03:03:44 -07:00
Daniel Imms 21387ecdae Merge pull request #5322 from xtermjs/dependabot/npm_and_yarn/addons/addon-ligatures/axios-1.8.2
Bump axios from 1.7.4 to 1.8.2 in /addons/addon-ligatures
2025-04-22 02:56:22 -07:00
Daniel Imms 78fbae3293 Add additional note to main doc 2025-04-22 02:54:14 -07:00
Daniel Imms a8ead811bf Move clarification into write apis 2025-04-22 02:47:33 -07:00
Daniel Imms 9696dd0c2b Merge branch 'master' into docs/registerMarker-tip 2025-04-22 02:35:47 -07:00
Daniel Imms 5e9ffb4c56 Merge pull request #5328 from Tyriar/5327_scroll
Refresh viewport after clear or ED
2025-04-21 07:09:59 -07:00
Daniel Imms e9587cf68f Refresh viewport after clear or ED
Fixes #5327
2025-04-21 07:00:27 -07:00
Daniel Imms 1771825e81 Merge pull request #5224 from Blashaq/master
putty-style ED2 sequence handling as terminal option
2025-04-21 06:54:42 -07:00
Daniel Imms e5b838a01b scrollOnDisplayErase -> scrollOnEraseInDisplay 2025-04-21 06:39:15 -07:00
Daniel Imms cd23a21bbf Align jsdoc 2025-04-21 06:37:48 -07:00
Daniel Imms 42946d72ba More alphabetical fix 2025-04-21 06:37:17 -07:00
Daniel Imms 2c836ede76 Tweak API position/docs 2025-04-21 06:34:45 -07:00
Adrian Błasiak 26d29abef1 Merge branch 'master' into master 2025-04-15 11:03:04 +02:00
dependabot[bot] 14d0f14c82 Bump axios from 1.7.4 to 1.8.2 in /addons/addon-ligatures
Bumps [axios](https://github.com/axios/axios) from 1.7.4 to 1.8.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.7.4...v1.8.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-14 17:44:13 +00:00
Daniel Imms a260f7d288 Merge pull request #5321 from Tyriar/5319
Reflow on resize using similar logic to conpty
2025-03-14 10:43:16 -07:00
Daniel Imms 16772e8d8b Update lock file 2025-03-14 10:36:22 -07:00
Daniel Imms e3e11b1a90 Reflow on resize using similar logic to conpty
This aligns reflowing much closer to how conpty does it. This was always
an issue but only became a big issue recently because conpty 1.22+ opts
to passthrough sequences rather than reprinting aggressively. This means
that the conpty buffer being in sync with the xterm.js buffer is more
important, otherwise the cursor will show up in a seemingly random
position.

The existing reflow appears to differ somewhat in conpty, like it seems
to reflow at the word level, not the character level like xterm.js, but
refining that closer if not worth the effort since conpty may end up
relying on the terminal's buffer in the future[1].

Fixes #5319
Fixes #3513
Related #4231
Related microsoft/vscode#241978

[1]: https://github.com/microsoft/terminal/blob/main/doc/specs/%2313000%20-%20In-process%20ConPTY.md
2025-03-14 10:26:32 -07:00
tabarra 8576581574 docs: added usage tip for registerMarker() 2025-03-02 09:28:50 -03:00
Daniel Imms 2042bb8502 Merge pull request #5313 from Tyriar/revert_4978
Revert "Merge pull request #5253 from akphi/patch-1"
2025-02-14 06:44:18 -08:00
Daniel Imms 18cd9b137f Revert "Merge pull request #5253 from akphi/patch-1"
This reverts commit 601efc3745, reversing
changes made to af4208dad0.
2025-02-14 06:35:24 -08:00
Alex Morris 1495e7134f Update AccessibilityManager.ts to use textContent rather than innerText
The innerText property requires layout and therefore is not very efficient. For more information, see http://www.kellegous.com/j/2013/02/27/innertext-vs-textcontent/.
2025-02-12 16:46:01 +00:00
Daniel Imms a7a941ce78 Merge pull request #5305 from Tyriar/tyriar/ctx_slow
Fix issue where listeners remain after WebglRenderer throws
2025-02-07 06:26:21 -08:00
Daniel Imms 1c98c52535 Bump download-artifact 2025-02-07 06:11:47 -08:00
Daniel Imms 9a3d1c6de1 Bump upload-artifact 2025-02-07 06:07:47 -08:00
Daniel Imms a8d43eb2ec Fix issue where listeners remain after WebglRenderer throws
See microsoft/vscode#239838
2025-02-07 05:58:28 -08:00
Daniel Imms d81b25c3bf Merge pull request #5291 from Tyriar/polish_2
Make ProgressAddon.onChange non undefined
2025-01-09 06:14:23 -08:00
Daniel Imms c95ec71e09 Make ProgressAddon.onChange non undefined
Fixes #5288
2025-01-09 06:03:34 -08:00
Daniel Imms 6188f764d1 Merge pull request #5290 from Tyriar/progress_polish
Progress polish
2025-01-09 05:41:58 -08:00
Daniel Imms dc9084b5ad Progress polish
Fixes #5287
Fixes #5288
Fixes #5289
2025-01-09 05:32:36 -08:00
Daniel Imms 330e91ef08 Merge pull request #5251 from jerch/progress-addon
progress-addon
2025-01-09 05:04:36 -08:00
Daniel Imms 9caff8d778 Add note in readme about full API 2025-01-09 04:58:02 -08:00
Jörg Breitbart 6f6ce33588 Merge branch 'master' into progress-addon 2025-01-09 02:32:26 +01:00
Jörg Breitbart 8101132352 rename types, remove rc import in d.ts 2025-01-09 02:05:36 +01:00
Jörg Breitbart 96a3be3ca8 polish docs 2025-01-09 01:20:25 +01:00
jerchandDaniel Imms 75e5cc19e0 Update addons/addon-progress/typings/addon-progress.d.ts
Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
2025-01-09 01:06:18 +01:00
Daniel Imms 0692d486f4 Merge pull request #5286 from Tyriar/webgl_only_from_shared
Move WebGL addon-specific code into addon
2025-01-08 11:01:15 -08:00
Daniel Imms cfc1071c73 Fix more relative imports 2025-01-08 10:54:57 -08:00
Daniel Imms 6bcd4f0551 Add missing relative dir to imports 2025-01-08 10:45:41 -08:00
Daniel Imms 71f50b841f Move webgl-specific types into addon 2025-01-08 10:39:06 -08:00
Daniel Imms d70f2a462c Move webgl-specific shared code into addon
Never got moved when canvas addon was removed
2025-01-08 10:35:39 -08:00
Daniel Imms dce403afd9 Merge pull request #5218 from xtermjs/dependabot/npm_and_yarn/cross-spawn-7.0.6
Bump cross-spawn from 7.0.3 to 7.0.6
2025-01-08 09:38:14 -08:00
Daniel Imms ef4a3fd933 Merge pull request #5212 from LeoDog896/patch-1
chore(addons/fit): fix typo
2025-01-08 09:34:07 -08:00
Daniel Imms c21f32d012 Merge pull request #5282 from database-client-lib/fix-unexpected-composition
Fixed CapsLock triggering input twice in MacOS.
2025-01-08 09:34:03 -08:00
Daniel Imms 66780c03d4 Merge pull request #5196 from ceccopierangiolieugenio/add-pyTermTk-sandbox-project
Add pyTermTk HTML5 Exporter project to "Real-world uses"
2025-01-08 09:33:30 -08:00
Daniel Imms 6b53ab4b61 Merge pull request #5252 from jtbandes/patch-1
Fix ReferenceError in publish.js
2025-01-08 09:33:19 -08:00
Daniel Imms 334ca07eae Merge branch 'master' into add-pyTermTk-sandbox-project 2025-01-08 09:33:03 -08:00
Daniel Imms 7e01dc1358 Merge pull request #5219 from jackieoft/master
Add new site to Real-world uses
2025-01-08 09:32:13 -08:00
Daniel Imms 84f14cab58 Merge branch 'master' into master 2025-01-08 09:32:01 -08:00
Daniel Imms 85992928a7 Merge pull request #5247 from mathiscode/patch-1
Update README.md - add ecmaOS as Use Case
2025-01-08 09:30:57 -08:00
Daniel Imms 582a027df1 Merge branch 'master' into master 2025-01-08 09:30:29 -08:00
Daniel Imms db71de2858 Merge branch 'master' into dependabot/npm_and_yarn/cross-spawn-7.0.6 2025-01-08 09:28:50 -08:00
Daniel Imms c1446d6385 Merge branch 'master' into patch-1 2025-01-08 09:28:02 -08:00
Daniel Imms 0151805864 Merge pull request #5285 from Tyriar/5284_detailed_liga
Support detailed ligatures and variants
2025-01-08 06:40:30 -08:00
Daniel Imms 408d0995dd Support detailed ligatures and variants
Fixes #5284
2025-01-08 06:26:15 -08:00
Jörg Breitbart 6a232765f4 borrow emitter ctor from xterm 2025-01-07 21:22:40 +01:00
Jörg Breitbart f516346e09 fix docs 2025-01-07 20:36:02 +01:00
Jörg Breitbart c207edd49c make linter happy 2025-01-07 19:25:47 +01:00
Jörg Breitbart 828603cfab fix integration test 2025-01-07 19:24:14 +01:00
Jörg Breitbart d7cebc312e use event from xterm.js instead of own impl 2025-01-07 19:21:51 +01:00
Jörg Breitbart 5badbd3a6f import ProgressState type to d.ts 2025-01-07 18:22:27 +01:00
Jörg Breitbart a1e85a4eb5 Merge branch 'master' into progress-addon 2025-01-07 16:49:09 +01:00
cweijan 0433fb8a4b Fixed CapsLock triggering input twice in MacOS. 2025-01-07 22:57:40 +08:00
Daniel Imms 9e206415b8 Merge pull request #5279 from AnouarTouati/fixing-#5270
Fixes: #5270 regex case-sensitive should behave like monaco
2025-01-07 06:45:03 -08:00
Daniel Imms ffc61258f9 Merge pull request #5278 from Tyriar/liga_texture_limit
Handle glyph widths up to the maximum device texture size
2025-01-07 06:43:52 -08:00
Daniel Imms a095c100ce Merge pull request #5280 from Tyriar/monospace
Remove courier fonts from defaults
2025-01-07 06:40:22 -08:00
Daniel Imms 3c790ffbc5 Merge branch 'master' into fixing-#5270 2025-01-07 06:34:33 -08:00
Daniel Imms 04c1782f2f Merge branch 'master' into liga_texture_limit 2025-01-07 06:34:25 -08:00
Daniel Imms 1efd52af30 Merge branch 'master' into monospace 2025-01-07 06:34:15 -08:00
Daniel Imms cc78831262 Merge pull request #5281 from Tyriar/pw_dep
Pin Ubuntu 22 to fix playwright GH Actions issue for now
2025-01-07 06:34:04 -08:00
Daniel Imms a7b98de833 Handle overflowing to new row 2025-01-07 06:28:59 -08:00
Daniel Imms 2c11eae732 Pin ubuntu to v22 2025-01-07 06:02:30 -08:00
Daniel Imms bb7393b1cb . 2025-01-07 06:00:38 -08:00
Daniel Imms 23e3905529 . 2025-01-07 05:55:39 -08:00
Daniel Imms 2774a27500 Try fix playwright dependency problem 2025-01-07 05:53:03 -08:00
Daniel Imms 763d2e773a Match coding style of repo 2025-01-07 05:38:11 -08:00
Daniel Imms 38d340d176 Remove courier fonts from defaults
Fixes #5156
2025-01-07 05:17:36 -08:00
Anouar Touati baf5cf45c3 fixes: #5270 regex case-sensitive should behave like monaco 2025-01-06 16:43:03 -05:00
Daniel Imms ff9a3a1067 Merge branch 'master' into liga_texture_limit 2025-01-06 11:53:36 -08:00
Daniel Imms 7541cf2fd7 Add todo 2025-01-06 11:52:20 -08:00
Daniel Imms e882f4a46a Prototype of adding a large atlas page for overflow glyphs
Part of #5246
2025-01-06 11:50:08 -08:00
Daniel Imms 33a5457407 Merge pull request #5277 from Tyriar/ligature_selection__cursor
Disable ligatures when cursor is in range
2025-01-06 11:27:44 -08:00
Daniel Imms 112cfbeac8 Merge branch 'master' into ligature_selection__cursor 2025-01-06 11:20:24 -08:00
Daniel Imms d1b01c58f8 Merge pull request #5276 from Tyriar/ligature_selection
Fix selection rendering on ligatures in both renderers
2025-01-06 11:17:25 -08:00
Daniel Imms 9912e7b331 Disable ligatures when cursor is in range
Fixes #5230
2025-01-06 11:08:57 -08:00
Daniel Imms c7a1e0aea3 Handle selections in the middle of ligatures too 2025-01-06 11:03:10 -08:00
Daniel Imms 5bfb130f03 Apply same approach for rendering joined selection in webgl 2025-01-06 10:52:04 -08:00
Daniel Imms 0521378e70 Fix ligature selection in DOM renderer
Part of #5231
2025-01-06 10:50:13 -08:00
Daniel Imms ad08a2e15b Render selection under ligatures for webgl
Part of #5231
2025-01-06 10:15:16 -08:00
Daniel Imms a61fff6a93 Merge pull request #5275 from Tyriar/liga-test
Demo test button for common ligatures
2025-01-06 10:08:50 -08:00
Daniel Imms cd5438c2c5 Add = and - long ligatures too 2025-01-06 10:01:09 -08:00
Daniel Imms ef67b42fbd Demo test button for common ligatures
Part of #5231
2025-01-06 09:59:00 -08:00
Daniel Imms 601efc3745 Merge pull request #5253 from akphi/patch-1
bug: properly render the terminal when open() is called again
2025-01-06 09:27:09 -08:00
An Phi 62656b8375 Merge branch 'master' into patch-1 2025-01-06 10:28:27 -05:00
Daniel Imms af4208dad0 Merge pull request #5199 from asemdreibati/di-enhancement
Store the DI decorator's id in specific property (#5131).
2025-01-06 06:04:40 -08:00
Asem Dreibati db925ad65d Merge branch 'master' into di-enhancement 2024-12-23 16:06:48 +03:00
Daniel Imms ce095b3593 Merge pull request #5249 from jtbandes/fix-click-not-delivered
Fix click event bug caused by DomRenderer replaceChildren behavior
2024-12-20 12:41:52 -08:00
Daniel Imms 5230e5aad0 Merge pull request #5265 from Tyriar/tyriar/3293
Revert to cursor options after DECSCUSR 0
2024-12-20 10:53:53 -08:00
Daniel Imms d44f7818c4 Fix test to assert new behavior 2024-12-20 10:43:38 -08:00
Daniel Imms f824083324 Correct @vt docs 2024-12-20 10:37:48 -08:00
Daniel Imms 82598e94a9 Fix default param DECSCUSR handling 2024-12-20 10:36:32 -08:00
Daniel Imms b579649a39 Revert to cursor options after DECSCUSR 0
Fixes #3293
2024-12-20 10:34:05 -08:00
Daniel Imms fb2e96e1b0 Add test button for DECSCUSR
Part of #3293
2024-12-20 10:21:19 -08:00
Daniel Imms d5a2fed679 Merge pull request #5263 from Tyriar/5256
Make textarea readonly when disableStdin is set
2024-12-20 09:09:53 -08:00
Daniel Imms 318f3dc378 Merge pull request #5262 from Tyriar/tyriar/5241_2
Blend cursorAccent with background too
2024-12-20 09:06:36 -08:00
Daniel Imms 18c9eb1960 Remove .only 2024-12-20 09:01:30 -08:00
Daniel Imms da22b0308e Make textarea readonly when disableStdin is set
Fixes #5256
2024-12-20 09:00:05 -08:00
Daniel Imms 3e998387fe Blend cursorAccent with background too
Fixes #5241
2024-12-20 08:51:17 -08:00
Daniel Imms 5018a07f3c Merge pull request #5260 from Tyriar/5241
Blend cursor with background to support alpha in webgl
2024-12-20 07:46:40 -08:00
Daniel Imms b74ec267e2 Blend cursor with background to support alpha in webgl
Fixes #5241
2024-12-20 07:37:12 -08:00
An Phi d12b825ed4 Merge branch 'master' into patch-1 2024-12-18 01:28:45 -05:00
An Phi 9f9bb3c11c bug: properly render the terminal when open() is called again 2024-12-18 01:26:47 -05:00
Jacob Bandes-Storch 9824230caf Fix ReferenceError in publish.js 2024-12-17 12:20:55 -08:00
Jörg Breitbart 94ca05c8d6 fix handler example in readme 2024-12-15 20:01:05 +01:00
Jörg Breitbart 569e854a03 add to workflow bundle 2024-12-15 19:32:47 +01:00
Jörg Breitbart f0fd3683d5 add to publish script 2024-12-15 19:28:19 +01:00
Jörg Breitbart 80c57221ef fix esbuild script 2024-12-15 19:18:46 +01:00
Jörg Breitbart 6bb2210a91 initial commit 2024-12-15 18:57:03 +01:00
Jacob Bandes-Storch 1978399259 Fix click event bug caused by DomRenderer replaceChildren behavior 2024-12-13 13:57:17 -08:00
Jay Mathis bc7288a389 Update README.md - add ecmaOS as Use Case 2024-12-12 21:40:46 -06:00
Daniel Imms e826f6b69f Merge pull request #5234 from jtbandes/reflow-cursor-line
Add reflowCursorLine option
2024-12-12 06:36:34 -08:00
Daniel Imms 0d67393072 Fix lint 2024-12-12 06:30:17 -08:00
Daniel Imms 65899a9b50 Update src/common/buffer/Buffer.ts 2024-12-12 06:25:36 -08:00
Daniel Imms d7364faeee Update src/common/buffer/BufferReflow.ts 2024-12-12 06:25:31 -08:00
Jacob Bandes-Storch ae2622e5ce Add reflowCursorLine option 2024-12-05 18:03:27 -08:00
blashaq 904ddbc884 code style fix 2024-11-23 16:59:30 +00:00
blashaq 92c21a6950 + scrollOnDisplayErase option 2024-11-23 10:58:19 +00:00
Adrian Błasiakandjerch 780f9a31ff Update src/common/InputHandler.ts
Co-authored-by: jerch <jerch@rockborn.de>
2024-11-21 22:46:06 +01:00
blashaq 9aba07f8f8 putty-style ED2 sequence handling as terminal option 2024-11-21 18:16:19 +00:00
JackieL db621d7294 Update README.md 2024-11-19 14:59:53 +08:00
JackieL 9c66ad1139 Update README.md 2024-11-19 14:58:32 +08:00
dependabot[bot] 8d23cbc051 Bump cross-spawn from 7.0.3 to 7.0.6
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 22:41:31 +00:00
Tristan F.-R. 9e1d5ba7db chore(addons/fit): fix typo
Reprepresents -> Represents
2024-11-11 18:57:03 -08:00
Daniel Imms 41e8ae3959 Merge pull request #5209 from Tyriar/5206
Ensure last ligature cell is updated
2024-11-04 10:20:34 -08:00
Daniel Imms 7fab293cd6 Ensure last ligature cell is updated
Fixes #3288
Fixes #5206
Part of microsoft/vscode#233005
2024-11-04 10:13:34 -08:00
Daniel Imms b3f3cf1216 Merge pull request #5208 from Tyriar/5207
Set liga font feature when ligatures is enabled
2024-11-04 09:54:45 -08:00
Daniel Imms 77885ed63d Set liga font feature when ligatures is enabled
Fixes #5207
2024-11-04 09:47:26 -08:00
Daniel Imms 3d9b1073d0 Merge pull request #5203 from xtermjs/Tyriar-patch-1
Don't hide build folders
2024-11-01 07:52:47 -07:00
Daniel Imms aca9c89ece Merge pull request #5202 from Tyriar/ligatures_resolve
Only resolve ligatures externals in commonjs environment
2024-11-01 07:52:28 -07:00
Daniel Imms 3948482dc7 Also remove associated comment 2024-11-01 07:20:10 -07:00
Daniel Imms 6684c406e8 Don't hide build folders
This was getting too annoying needing to comment out these lines
2024-11-01 07:19:33 -07:00
Daniel Imms 952ac61761 Only resolve ligatures externals in commonjs environment
Part of microsoft/vscode#34103
2024-11-01 07:18:27 -07:00
Asem Dreibati a1b438cea6 Store the DI decorator's id in specific property (#5131). 2024-10-29 10:31:57 +03:00
Eugenio Parodi 932b65ef67 Add pyTermTk HTML5 Exporter project to Real-world uses 2024-10-22 14:46:43 +01:00
Daniel Imms f701d073d1 Merge pull request #5182 from jerch/fix_5181
fix #5181
2024-10-14 05:28:58 -07:00
Jörg Breitbart 9c74c81608 modified version of 5623ba6 2024-10-05 14:36:22 +02:00
Jörg Breitbart 687126970d revert 5623ba6 2024-10-05 14:24:25 +02:00
Jörg Breitbart 39bd429835 partially revert last commit 2024-10-05 14:07:49 +02:00
Jörg Breitbart 8faf097e83 fix flaky tests 2024-10-04 17:12:00 +02:00
Jörg Breitbart d3298935b7 Merge remote-tracking branch 'upstream/master' into fix_5181 2024-10-04 16:56:30 +02:00
Jörg Breitbart f9cf9b9782 fix #5181 2024-10-04 16:55:13 +02:00
Daniel Imms a5fc111d62 Merge pull request #5180 from Tyriar/5179
Forward integration test exit code to running proc
2024-10-04 07:51:17 -07:00
jerch 5623ba6b63 slow down web links tests 2024-10-04 16:29:58 +02:00
jerch 3d9668f8fa fix dispose error in Terminal.test.ts 2024-10-04 15:50:36 +02:00
Daniel Imms 621c702ff8 Forward integration test exit code to running proc
Fixes #5179
2024-10-03 20:10:10 -07:00
Daniel Imms 9186c724c4 Merge pull request #5171 from Tyriar/links
Fix links sometimes not activating
2024-09-27 13:08:14 -07:00
Daniel Imms f764c0ac91 Fix links sometimes not activating
This was a very long standing bug that was hard to nail down a repro case. Turns
out this was because at some point the current link can get cleared and re-evaluated,
I think because of a different fix we made. That caused the object check to fail.
So the fix there is to check link equality, not js object equality.

Additionally I found we don't dispose of old linkifiers when open is called
multiple times.

See microsoft/vscode#230010
2024-09-27 12:58:34 -07:00
Daniel Imms f56675f7e5 Merge pull request #5127 from jeanp413/fix-vscode-224750
Fix scroll dimensions when switching buffers
2024-09-20 10:36:05 -07:00
Daniel Imms aa94fd6cfe Merge pull request #5136 from esimkowitz/patch-1
Fix description for WebglAddon class in @xterm/addon-webgl
2024-09-20 10:27:23 -07:00
Daniel Imms e011513b15 Merge pull request #5166 from xtermjs/dependabot/npm_and_yarn/express-4.20.0
Bump express from 4.19.2 to 4.20.0
2024-09-20 09:53:19 -07:00
Daniel Imms 5c10617981 Merge pull request #5165 from xtermjs/dependabot/npm_and_yarn/addons/addon-ligatures/axios-1.7.4
Bump axios from 1.6.0 to 1.7.4 in /addons/addon-ligatures
2024-09-20 09:18:08 -07:00
dependabot[bot] c7f5ec4064 Bump express from 4.19.2 to 4.20.0
Bumps [express](https://github.com/expressjs/express) from 4.19.2 to 4.20.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.19.2...4.20.0)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-20 16:10:45 +00:00
Daniel Imms 7642f55a1c Merge pull request #5141 from xtermjs/dependabot/npm_and_yarn/webpack-5.94.0
Bump webpack from 5.88.2 to 5.94.0
2024-09-20 09:10:02 -07:00
Daniel Imms 3d9d526977 Merge pull request #5140 from fuglaro/master
Add Filet Cloud to Real-world uses
2024-09-20 09:09:39 -07:00
Daniel Imms 4e9233d150 Merge pull request #5151 from PerBothner/unicode-graphemes-webpack-fix
Fix 'npm run package' in addon-unicode-graphemes
2024-09-20 09:08:20 -07:00
dependabot[bot] ac79c18090 Bump axios from 1.6.0 to 1.7.4 in /addons/addon-ligatures
Bumps [axios](https://github.com/axios/axios) from 1.6.0 to 1.7.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.6.0...v1.7.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-20 16:06:45 +00:00
Daniel Imms 08221f17d6 Merge pull request #5157 from xtermjs/dependabot/npm_and_yarn/addons/addon-ligatures/path-to-regexp-1.9.0
Bump path-to-regexp from 1.7.0 to 1.9.0 in /addons/addon-ligatures
2024-09-20 09:06:22 -07:00
Daniel Imms d910cfd696 Merge pull request #5148 from xtermjs/dependabot/npm_and_yarn/micromatch-4.0.8
Bump micromatch from 4.0.5 to 4.0.8
2024-09-20 09:06:16 -07:00
dependabot[bot] 0bf10e525e Bump path-to-regexp from 1.7.0 to 1.9.0 in /addons/addon-ligatures
Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) from 1.7.0 to 1.9.0.
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](https://github.com/pillarjs/path-to-regexp/compare/v1.7.0...v1.9.0)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-11 21:24:00 +00:00
Per Bothner 7cc921693a Fix 'npm run package' in addon-unicode-graphemes 2024-09-07 21:02:20 -07:00
dependabot[bot] ee3901f5da Bump micromatch from 4.0.5 to 4.0.8
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-04 18:10:30 +00:00
Evan Simkowitz 8bd4e10643 Merge branch 'master' into patch-1 2024-08-31 10:14:39 -07:00
Daniel Imms 44f9fa39ae Merge pull request #5143 from Tyriar/5135
Publish commit and set peerDependencies to @xterm/xterm beta when publishing
2024-08-31 08:22:44 -07:00
Daniel Imms fd0bb58379 Merge branch 'master' into 5135 2024-08-31 07:27:23 -07:00
Daniel Imms 13d078ecc7 Only set peerDependencies if the xterm version is beta 2024-08-31 07:26:12 -07:00
Daniel Imms 9a9ccbe29c Improve logging in publish script 2024-08-31 07:24:50 -07:00
Daniel Imms 7ebbb86b50 Set peer dependencies and commit in published package.json
The commit will allow us to link published releases to the exact code
version.

Fixes #5135
2024-08-31 07:18:52 -07:00
Daniel Imms 6b54599ca7 Get publish script working on Windows/node 20
Part of #5135
2024-08-31 06:59:34 -07:00
Evan Simkowitz 1f60a244c2 Merge branch 'master' into patch-1 2024-08-30 20:26:32 -07:00
dependabot[bot] 54789266b6 Bump webpack from 5.88.2 to 5.94.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.88.2 to 5.94.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.88.2...v5.94.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-30 18:03:03 +00:00
John van Leeuwen 2d8c6be264 Add Filet Cloud to real-world uses 2024-08-30 02:43:47 +01:00
jerch 1b48cd04b8 Merge pull request #5139 from lusingander/image-addon-iip-jpeg
Fix image addon not being able to render some jpeg images in IIP
2024-08-28 16:28:30 +02:00
Kyosuke Fujimoto b307adb081 Fix IIPMetrics jpg detection 2024-08-28 23:16:00 +09:00
Kyosuke Fujimoto a07d97a9d3 Add test for jpg without APP segment to IIPMetrics 2024-08-28 16:21:34 +09:00
Evan Simkowitz 4914c4322c Merge branch 'master' into patch-1 2024-08-24 15:14:53 -07:00
Daniel Imms f186475ec9 Merge pull request #5130 from Tyriar/tyriar/5128
Remove xterm- prefix from addon mjs output
2024-08-23 09:29:29 -07:00
Evan Simkowitz be84a02c8d Fix description for WebglAddon class in @xterm/addon-webgl 2024-08-22 19:49:31 -07:00
Daniel Imms fcad91a682 Remove xterm- prefix from addon mjs output
Fixes #5128
2024-08-15 05:56:24 -07:00
jeanp413 ad38b1a166 Fix https://github.com/microsoft/vscode/issues/224750 2024-08-14 07:45:37 -05:00
Daniel Imms c6a50d5a1a Merge pull request #5124 from Tyriar/tyriar/node-pty
Update node-pty, use conpty.dll
2024-08-08 06:52:20 -07:00
Daniel Imms dd54ef13bc Update node-pty, use conpty.dll 2024-08-08 05:54:56 -07:00
Daniel Imms c2aee5b6c1 Merge pull request #5122 from Tyriar/tyriar/main_document
Use main document to create viewport element
2024-08-05 12:05:43 -07:00
Daniel Imms abe0640331 Use main document to create viewport element
See microsoft/vscode#224555
2024-08-05 11:50:36 -07:00
Daniel Imms cb3bd463a5 Merge pull request #5106 from Tyriar/tyriar/lifecycle
Move to vs/base disposables
2024-07-15 10:11:12 -07:00
Daniel Imms 56ec86242a Fix test, fix all unit tests running on mac/linux 2024-07-15 10:01:55 -07:00
Daniel Imms 2a6cd8230c Merge remote-tracking branch 'upstream/master' into tyriar/lifecycle 2024-07-15 09:52:09 -07:00
Daniel Imms b192ba2304 Merge pull request #5107 from Tyriar/tyriar/overview_ruler
Add top/bottom border overview ruler options
2024-07-15 09:22:50 -07:00
Daniel Imms bf41eb4204 Add top/bottom border overview ruler options 2024-07-15 09:14:49 -07:00
Daniel Imms 8a2a7ac6db Resolve vs in image addon 2024-07-14 16:25:01 -07:00
Daniel Imms 93adffa819 Fix lint 2024-07-14 16:24:12 -07:00
Daniel Imms 144bdb5dd0 Move over to vs disposables 2024-07-14 16:19:20 -07:00
Daniel Imms aee936264b Move to MutableDisposable in vs 2024-07-14 16:09:53 -07:00
Daniel Imms 866bc9eb90 Move to dom.ts addDisposableListener 2024-07-14 16:07:39 -07:00
Daniel Imms a7952ff36c Merge pull request #5105 from Tyriar/canvas
Remove the canvas renderer
2024-07-14 10:54:54 -07:00
Daniel Imms 9712057b91 Remove the canvas renderer
Fixes #4779
2024-07-14 10:48:39 -07:00
Daniel Imms 9d8bba7a18 Merge pull request #5103 from tisilent/remove-unread
remove _workCell in InputHandler.
2024-07-14 09:21:15 -07:00
Daniel Imms 060ce7ad28 Merge pull request #5104 from Tyriar/tyriar/events
Remove EventEmitter in favor of vs/base/common/event's Emitter
2024-07-14 09:20:11 -07:00
Daniel Imms 180fd3c9ac Resolve vs in unicode11 2024-07-14 09:11:33 -07:00
Daniel Imms bd700fe515 Allow refreshing all rows without creating object 2024-07-14 09:05:18 -07:00
Daniel Imms b6b19babc1 Fix benchmark npm script 2024-07-14 09:00:29 -07:00
Daniel Imms 618954b5d6 Import right path in addons 2024-07-14 08:56:54 -07:00
Daniel Imms 03c2b2f68e Fix addon resolve path 2024-07-14 08:52:15 -07:00
Daniel Imms ae8f2dd61a Remove Events.ts in favor of new Event.forward 2024-07-14 08:50:37 -07:00
Daniel Imms 460a1370d7 Add forward to Event 2024-07-14 08:47:59 -07:00
Daniel Imms 68e0eb714d Add vs resolve to addons 2024-07-14 08:47:03 -07:00
Daniel Imms 10b97f4856 Add vs alias to headless webpack config 2024-07-14 08:34:26 -07:00
Daniel Imms 26c73b8ead Add vs project to headless tsconfig 2024-07-14 08:30:06 -07:00
Daniel Imms e267f05141 Move forwardEvent to Events.ts 2024-07-14 08:20:18 -07:00
Daniel Imms 9c7e2ea98e Remove IEvent and runAndSubscribe 2024-07-14 08:17:16 -07:00
Daniel Imms 9141b525a6 Migrate rest of EventEmitter to base/ Emitter 2024-07-14 08:06:48 -07:00
Daniel Imms 90ff6f3d06 Migrate most EventEmitter to base/ Emitter 2024-07-14 07:41:56 -07:00
Daniel Imms 9187cd3d0a Add load test for long lines 2024-07-14 07:41:38 -07:00
谢佳龙 d0d759155b remove _workCell. 2024-07-12 16:41:10 +08:00
Daniel Imms 618e47204d Merge pull request #5102 from Tyriar/tyriar/dec
Ensure decorations are refreshed when origin of scroll event is buffe…
2024-07-11 11:48:37 -07:00
Daniel Imms e9fd5c70ba Ensure decorations are refreshed when origin of scroll event is buffer service
Fixes #5101
2024-07-11 11:48:00 -07:00
Daniel Imms cbcd195cad Merge pull request #5099 from Tyriar/tyriar/overflow
Remove overflow to allow decorations outside terminal
2024-07-11 11:16:28 -07:00
Daniel Imms 55303647c1 Remove overflow to allow decorations outside terminal
This is needed in the demo to show the red test decoration and in vscode for
shell integration decorations/quick fixes
2024-07-11 11:15:58 -07:00
Daniel Imms f3bfe80995 Merge pull request #5096 from Tyriar/tyriar/esbuild4
Integrate base/ platform from VS Code and adopt scroll bar
2024-07-11 09:42:44 -07:00
Daniel Imms 90a1da28bd Scroll immediately to bottom when scrollOnUserInput is enabled
See microsoft/vscode#211199
2024-07-11 09:36:22 -07:00
Daniel Imms 73ee951807 Resolve more todos 2024-07-11 08:43:54 -07:00
Daniel Imms 0f373512d2 Fix ICoreMouseService injecting 2024-07-11 08:37:48 -07:00
Daniel Imms 721d483cc3 Implement zero scrollback+no mouse event wheel handling 2024-07-11 08:35:42 -07:00
Daniel Imms 2da5eca384 Fix mouse events 2024-07-11 08:29:29 -07:00
Daniel Imms a644b5d068 Clean up dealing with animation frame 2024-07-10 13:50:07 -07:00
Daniel Imms d532a15bf2 Include all files, not just entry root folder 2024-07-10 13:46:04 -07:00
Daniel Imms 31e0af745d Fix out-esbuild build 2024-07-10 13:42:14 -07:00
Daniel Imms 444c07fd81 Replace monaco- with xterm- in code/css files 2024-07-10 13:33:43 -07:00
Daniel Imms f155d67c45 Replace monaco- with xterm- in the update script 2024-07-10 13:32:30 -07:00
Daniel Imms 59a8f0cf8e _getMutableOptions -> _getChangeOptions 2024-07-10 12:47:47 -07:00
Daniel Imms 1096b7f17f Create shared file for viewport constants 2024-07-10 12:40:02 -07:00
Daniel Imms d6f7133fa6 Fix api lint 2024-07-10 12:36:08 -07:00
Daniel Imms 55c627572c Support smooth scroll 2024-07-10 12:32:55 -07:00
Daniel Imms 2b8ccb5e51 Deprecate fast scroll modifier as it's no longer possible
Not possible via the component we import. We could add this but I
doubt it was being used anyway.
2024-07-10 08:30:32 -07:00
Daniel Imms d1d25a5bf7 Polish all files (excl. CoreBrowserTerminal/Viewport) 2024-07-10 08:08:02 -07:00
Daniel Imms ade5591d60 Const enum over magic number 2024-07-10 07:58:29 -07:00
Daniel Imms eca0800b9d Fix api lint 2024-07-10 07:55:22 -07:00
Daniel Imms 884141cd8f Support theming of scroll bar slider 2024-07-10 07:54:39 -07:00
Daniel Imms c7f80986c8 Inline some functions 2024-07-10 07:33:53 -07:00
Daniel Imms 9b26bb4436 Support theming of overview ruler border 2024-07-10 07:30:38 -07:00
Daniel Imms 75bf192af5 Have scroll bar bg react to theme change 2024-07-10 07:03:51 -07:00
Daniel Imms 416f12fcc3 Remove ScrollSource
This isn't used anymore, it was used earlier to workaround recursion between
the viewport and the terminal objects
2024-07-10 07:01:44 -07:00
Daniel Imms c2b90c6dae Remove missing demo webpack npm script 2024-07-10 06:58:45 -07:00
Daniel Imms 8b83f44a46 Tidy up esbuild bundle configs 2024-07-10 06:56:56 -07:00
Daniel Imms 522b39be86 Hide more folders from explorer 2024-07-10 06:55:55 -07:00
Daniel Imms 1b0078ad20 Exclude vs project from coverage 2024-07-10 06:42:50 -07:00
Daniel Imms 345b6906f9 Remove unused demo webpack config 2024-07-10 06:29:32 -07:00
Daniel Imms c3c787eaa7 Resolve vs imports in webpacked bundle 2024-07-10 06:29:05 -07:00
Daniel Imms 1dada9f256 Fix scroll lines API 2024-07-10 06:27:47 -07:00
Daniel Imms d904f2fce5 Generate source maps so errors report ts files 2024-07-10 06:26:39 -07:00
Daniel Imms 27195b003a Patch out unsafe usage of navigator and window in node envs 2024-07-10 06:22:16 -07:00
Daniel Imms b401865957 More clean up, doc updating vs/base 2024-07-09 13:53:16 -07:00
Daniel Imms 381200bce1 Fix fit addon to get the scroll bar working in the demo 2024-07-09 13:34:51 -07:00
Daniel Imms c33ed46161 Delete unused files 2024-07-09 13:29:20 -07:00
Daniel Imms 86c875f7e9 Helper script for finding unused files 2024-07-09 13:08:57 -07:00
Daniel Imms 99db197472 . 2024-07-09 11:59:22 -07:00
Daniel Imms 4789c24e1e Get esbuild working and adopt vs scrollbar 2024-07-09 11:19:15 -07:00
Daniel Imms c30bffc60c Set up vs project 2024-07-09 10:52:09 -07:00
Daniel Imms 190e1f014e Add git ignore for vs 2024-07-09 10:41:54 -07:00
Daniel Imms 995ccc72f8 Merge pull request #5094 from Tyriar/images
Add build flow images and move logo into new images folder
2024-07-09 08:30:29 -07:00
Daniel Imms 5eb592f8c0 Merge pull request #5095 from Tyriar/procfile
Remove procfile
2024-07-09 08:30:07 -07:00
Daniel Imms cb9b96dbbb Copy right file when publishing headless 2024-07-09 08:21:42 -07:00
Daniel Imms 6382067e5b Remove procfile
No one uses this afaik and it's been stale and broken for a while anyway
2024-07-09 08:19:59 -07:00
Daniel Imms 844315f05a Add build flow images and move logo into new images folder 2024-07-09 08:17:32 -07:00
Daniel Imms c5d352bbe1 Merge pull request #5093 from Tyriar/tyriar/test_naming
Align npm and test script names
2024-07-07 09:45:11 -07:00
Daniel Imms aa6907335a Align npm and test script names 2024-07-07 09:35:30 -07:00
Daniel Imms d5921cd21b Merge pull request #5092 from Tyriar/tyriar/esbuild3
Add support for ESM via esbuild
2024-07-07 09:29:23 -07:00
Daniel Imms f341d0a3e9 Fix formatting of tasks.json 2024-07-07 09:21:55 -07:00
Daniel Imms ab8453c773 Simplify zip job 2024-07-07 09:21:17 -07:00
Daniel Imms 2fc8acf81e Publish addon mjs files 2024-07-07 09:15:25 -07:00
Daniel Imms 89e315ab2b Hide build output from vscode explorer 2024-07-07 09:12:28 -07:00
Daniel Imms faed3e7c80 Move playwright tests to use project references 2024-07-07 09:06:26 -07:00
Daniel Imms 215315b377 Esbuild package headless 2024-07-07 08:51:38 -07:00
Daniel Imms b6a9c24c7d Generate addon playwright suites via list of addons 2024-07-07 08:35:17 -07:00
Daniel Imms ff01995691 Improve testing instructions 2024-07-07 08:32:19 -07:00
Daniel Imms 62c5747e3f Use out-test for integration tests 2024-07-05 14:05:24 -07:00
Daniel Imms c337fa8dc5 Upload lib artifacts 2024-07-05 13:41:12 -07:00
Daniel Imms 1911d19cf8 Build demo with esbuild 2024-07-05 12:37:10 -07:00
Daniel Imms 4d45215622 Run right esbuild script 2024-07-05 12:34:17 -07:00
Daniel Imms 804a2b7693 Zip up right folders, run esbuild in CI 2024-07-05 12:32:21 -07:00
Daniel Imms 992fa015a4 Move on to all ESM imports in the demo 2024-07-05 12:12:03 -07:00
Daniel Imms 208d6e96f8 Use esm image addon in demo 2024-07-05 12:00:05 -07:00
Daniel Imms 93bf18c5b0 Sourcemaps on prod build 2024-07-05 11:51:47 -07:00
Daniel Imms 057abba08b mjs and js 2024-07-05 11:48:42 -07:00
Daniel Imms 40c5fbf0cb Don't build test folders
These are for integration tests which need tsc sources anyway
2024-07-05 10:30:47 -07:00
Daniel Imms 24813f56ed How to run tests 2024-07-05 09:35:03 -07:00
Daniel Imms 6135757349 Remove unwanted npm scripts 2024-07-05 09:16:47 -07:00
Daniel Imms c9baa366ab Fix image esbuild 2024-07-05 09:16:14 -07:00
Daniel Imms be49bb6263 Move integration tests onto esbuild sources (except image) 2024-07-05 09:12:30 -07:00
Daniel Imms 9c3694af5a Move unit tests onto esbuild sources 2024-07-05 09:10:20 -07:00
Daniel Imms ba3ba899a5 Clean up 2024-07-05 08:55:01 -07:00
Daniel Imms 1f11c7e46c Get sources building with esbuild 2024-07-05 08:46:15 -07:00
Daniel Imms 5b5e262dff Merge pull request #5089 from Tyriar/tyriar/dts
Remove src dts files and correct exports
2024-07-05 08:20:03 -07:00
Daniel Imms a7b248ea9b Fix flakes in fit addon integration tests 2024-07-05 08:13:03 -07:00
Daniel Imms 039cd02482 Merge pull request #5091 from Tyriar/tyriar/windows_server
Ignore EPIPE exception on Windows when reloading demo client
2024-07-05 08:02:57 -07:00
Daniel Imms 7b3927a810 Merge pull request #5090 from Tyriar/tyriar/demo_warn
Suppress unrecognized option warning in demo
2024-07-05 07:53:38 -07:00
Daniel Imms 4a9e52ee44 Ignore EPIPE exception on Windows when reloading demo client
Whenever the demo is reloaded on Windows the demo server crashes. This just
ignores the error as I tried logging and adding try/catch around all
interactions with the websocket and couldn't narrow it down.
2024-07-05 07:53:33 -07:00
Daniel Imms 8f8c94a734 Suppress unrecognized option warning in demo 2024-07-05 07:14:17 -07:00
Daniel Imms 7b2e8a6ce1 Remove src dts files and correct exports
Esbuild doesn't appear to play nice with dts files and when they are regular ts
files they require the exports
2024-07-05 06:51:00 -07:00
Daniel Imms 8927d5c50f Merge pull request #5088 from Tyriar/tyriar/dec
Sync DOM decoration styles when line height/width changes
2024-07-04 08:45:58 -07:00
Daniel Imms 132553f521 Sync DOM decoration styles when line height/width changes
See microsoft/vscode#219979
2024-07-04 08:37:48 -07:00
Daniel Imms 795839cbe1 Merge pull request #5085 from Tyriar/addon_tests
Run other integration tests in CI
2024-07-03 08:51:45 -07:00
Daniel Imms a1b2a1c5ee \n -> \r\n on non-Windows 2024-07-03 08:44:49 -07:00
Daniel Imms cae6fa0561 Merge pull request #5086 from xtermjs/dependabot/npm_and_yarn/ws-8.17.1
Bump ws from 7.5.9 to 8.17.1
2024-07-03 08:23:15 -07:00
Daniel Imms 224409d7d6 Use fixed dimensions on image test 2024-07-03 08:17:19 -07:00
dependabot[bot] f0d2cb8d05 Bump ws from 7.5.9 to 8.17.1
Bumps [ws](https://github.com/websockets/ws) from 7.5.9 to 8.17.1.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.5.9...8.17.1)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-03 15:17:03 +00:00
Daniel Imms aee480afd3 Merge pull request #5070 from xtermjs/dependabot/npm_and_yarn/braces-3.0.3
Bump braces from 3.0.2 to 3.0.3
2024-07-03 08:16:31 -07:00
Daniel Imms fbd430af6e Merge pull request #5052 from renatoliveira/master
Update README.md
2024-07-03 08:14:35 -07:00
Daniel Imms a884f91b22 Merge pull request #5059 from myarmolinsky/add-balena-real-world-use
Add `balena` to real world uses
2024-07-03 08:12:43 -07:00
Daniel Imms 46a3676634 Merge branch 'master' into add-balena-real-world-use 2024-07-03 08:12:10 -07:00
Daniel Imms 46a1221fc6 Merge pull request #5056 from Cainier/master
Add app OpenSFTP to README.md
2024-07-03 08:11:47 -07:00
Daniel Imms b6ea2c4a99 Merge branch 'master' into master 2024-07-03 08:11:39 -07:00
Daniel Imms d0782ad6b1 Merge pull request #5049 from info24/master
Add eva pro to  README.md
2024-07-03 08:10:57 -07:00
Daniel Imms 11a909453f Merge pull request #5071 from xtermjs/dependabot/npm_and_yarn/ws-8.17.1
Bump ws from 8.13.0 to 8.17.1
2024-07-03 08:10:29 -07:00
Daniel Imms fec21b6e8e Merge branch 'master' into dependabot/npm_and_yarn/braces-3.0.3 2024-07-03 08:10:01 -07:00
Daniel Imms 11b9eb4a1c Use fixed dimensions on search test 2024-07-03 08:09:15 -07:00
Daniel Imms 2b735a0159 Remove space from project names 2024-07-03 05:15:41 -07:00
Daniel Imms 135c038167 Add server start script to all addons with integration tests 2024-07-03 05:07:09 -07:00
Daniel Imms 7489ddc4f7 Run other integration tests in CI 2024-07-03 05:03:18 -07:00
dependabot[bot] a9fd92eba6 Bump ws from 8.13.0 to 8.17.1
Bumps [ws](https://github.com/websockets/ws) from 8.13.0 to 8.17.1.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.13.0...8.17.1)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-03 11:39:42 +00:00
Daniel Imms bc5074116e Merge pull request #5083 from Tyriar/tyriar/ts
typescript@5.5
2024-07-03 04:39:15 -07:00
Daniel Imms b9fbbfbb8e Merge pull request #5082 from Tyriar/tyriar/eslint_warnings
Fix .eslintrc.json warnings, move deprecated to stylistic/ts
2024-07-03 04:38:08 -07:00
Daniel Imms 26c072f45c Add missing plugin include 2024-07-03 04:32:22 -07:00
Daniel Imms b7988bf00a Upgrade playwright tsconfigs to use ESNext
This ends up outputing the required object destructuring that's needed by
playwright, see microsoft/playwright#8798
2024-07-03 04:31:34 -07:00
Daniel Imms cca051041f Also migrate semi rule, alphabetize 2024-07-03 04:21:41 -07:00
Daniel Imms 3c84cfe610 typescript@5.5 2024-07-03 04:17:11 -07:00
Daniel Imms e2c5d91a2d Fix .eslintrc.json warnings, move deprecated to stylistic/ts 2024-07-03 04:15:38 -07:00
Daniel Imms 7970eb3b3b Merge pull request #5081 from Tyriar/cleanup
Simplify GH action names and remove test/api project
2024-07-03 03:22:01 -07:00
Daniel Imms f44d68ef4a Remain test/api project 2024-07-03 03:10:58 -07:00
Daniel Imms 54a20c511b Simplify GH action names 2024-07-03 03:10:51 -07:00
Daniel Imms 147b542c9d Merge pull request #5080 from Tyriar/tyriar/more_playwright2
Migrate remaining API tests to playwright and remove API test infrastructure
2024-07-03 03:08:37 -07:00
Daniel Imms 0f37152a9b Remove API test CI jobs 2024-07-03 03:01:25 -07:00
Daniel Imms efd4c5b340 Remove API test infrastructure 2024-07-03 02:57:05 -07:00
Daniel Imms 580bb082b5 Migrate image api tests to playwright 2024-07-03 02:56:09 -07:00
Daniel Imms 779ec7fad8 Migrate web-links api tests to playwright 2024-07-03 02:41:19 -07:00
Daniel Imms 89f3353a83 Migrate unicode11 api tests to playwright 2024-07-03 02:37:06 -07:00
Daniel Imms ab2cb9a809 Migrate unicode-graphemes api tests to playwright 2024-07-03 02:33:17 -07:00
Daniel Imms c9ad9cbf0e Migrate serialize api tests to playwright 2024-07-03 02:30:27 -07:00
Daniel Imms 6047093325 Merge pull request #5079 from Tyriar/more_playwright
Migrate more API tests to playwright
2024-07-02 14:57:46 -07:00
Daniel Imms 713f765731 Migrate attach api tests to playwright 2024-07-02 14:52:47 -07:00
Daniel Imms 4295dfaf20 Migrate clipboard api tests to playwright (only chromium) 2024-07-02 14:49:36 -07:00
Daniel Imms 57bac91904 Migrate fit api tests to playwright 2024-07-02 14:25:31 -07:00
Daniel Imms 958ae9b0ce Migrate search api tests to playwright 2024-07-02 14:08:34 -07:00
Daniel Imms 50032e2820 Merge pull request #5078 from Tyriar/shell_tests
Get tests working on node that requires shell arg
2024-07-02 13:01:52 -07:00
Daniel Imms daa2440a40 Fix playwright project names 2024-07-02 11:42:39 -07:00
Daniel Imms 645b698f37 Reduce coverage threshold 2024-07-02 11:39:54 -07:00
Daniel Imms 4b6c8f1fe4 Get tests working on node that requires shell arg
These silently fail on Windows after a recent change in node.js
2024-07-02 11:04:04 -07:00
dependabot[bot] 9a7941c004 Bump braces from 3.0.2 to 3.0.3
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-16 09:56:44 +00:00
Daniel Imms f77a763858 Merge pull request #5067 from Tyriar/base64
Correct addon-clipboard ctor types
2024-06-04 06:34:18 -07:00
Daniel Imms 2b716cd436 Correct addon-clipboard ctor types 2024-06-04 06:24:59 -07:00
Daniel Imms a3024a98fe Merge pull request #4879 from JasonXJ/a11y-char-width2
Align character position in a11y tree with the actual rendering
2024-06-04 05:38:31 -07:00
Daniel Imms 12e5841959 Fix lint 2024-06-04 05:30:54 -07:00
Daniel Imms 599cbc49f7 Merge branch 'master' into a11y-char-width2 2024-06-04 05:29:06 -07:00
Daniel Imms c73793fa11 Merge pull request #5066 from Tyriar/tyriar/vscode_213174
Speed up clearing all markers, mass event listener dispose
2024-06-03 11:49:48 -07:00
Daniel Imms dd106ae9b8 Speed up clearing all markers, mass event listener dispose
Part of microsoft/vscode#213174
2024-06-03 11:43:31 -07:00
Daniel Imms baa4e1b0e8 Merge pull request #5054 from joelhockey/master
Add powerline git, LN, lock symbols
2024-06-03 07:38:53 -07:00
myarmolinsky f02d68b36d Add balena to real world uses 2024-05-24 07:47:45 -04:00
Cainier 80d2ee78e7 Update README.md
Add "OpenSFTP" to Real-world uses
2024-05-15 16:07:12 +08:00
Joel Hockey d52f09de3c Add powerline git, LN, lock symbols
Symbols taken from https://github.com/powerline/fontpatcher/blob/develop/fonts/powerline-symbols.sfd

The original symbols use height and widith of approx 1060x2048, so I
modified to be roughly 1000x1000 via:

fontforge -lang=ff -c 'Open($1); SelectAll(); UnlinkReference(); Scale(100, 50); Move(0, 300); Export("svg/%n-%e.svg");' powerline-symbols.sfd

Then I edited by hand to round values to approx 2 significant digits,
and then used a script to convert relative SVG commands such as 'l',
'c', 's' to use only 'M', 'L' and 'C' and used expected format with
comma separators rather than spaces, and divide all values by 1000 to
map into a 1x1 space.
2024-05-12 17:56:38 -07:00
Renato Oliveira 3c017f2291 Update README.md
Removes Katacoda from the real-world uses. That platform has been shutdown by O'Reilly.
2024-05-07 16:10:32 -03:00
info24 9b1396fb32 Add eva pro to README.md 2024-04-26 23:10:03 +08:00
Daniel Imms 2edc65baaa Merge pull request #4220 from aymanbagabas/osc52
Add support to ANSI OSC52
2024-04-22 02:40:23 -07:00
Daniel Imms 6ed1f42fbe Merge branch 'master' into osc52 2024-04-22 02:04:33 -07:00
Daniel Imms 826c057047 Merge pull request #5003 from josiahhudson/master
Support semi-colons in OSC 8 hyperlink URIs
2024-04-22 01:41:16 -07:00
Daniel Imms 1709d44697 Merge pull request #5020 from wavetermdev/escape-html
Escape Unsafe HTML Characters in addon-serialize
2024-04-21 08:50:50 -07:00
Daniel Imms d77b41ed25 Add tests to cover OSC 8 hyperlinks 2024-04-21 08:38:12 -07:00
Daniel Imms 0e77f839ff Use indexOf(';') approach 2024-04-21 08:30:45 -07:00
Daniel Imms 487278ac79 Merge branch 'master' into master 2024-04-21 08:26:25 -07:00
Daniel Imms 499afa1e30 Merge pull request #4936 from SimonSiefke/fix/memory-leak
fix: memory leak in CoreBrowserService
2024-04-21 08:10:24 -07:00
Daniel Imms af8a663f70 Merge branch 'master' into fix/memory-leak 2024-04-21 08:06:05 -07:00
Daniel Imms 6be1c3fdf2 Merge pull request #4940 from octoclonius/patch-1
Update global object fix
2024-04-21 08:04:02 -07:00
Daniel Imms f1bb8f48c5 Merge pull request #5010 from xtermjs/dependabot/npm_and_yarn/addons/addon-ligatures/follow-redirects-1.15.6
Bump follow-redirects from 1.15.3 to 1.15.6 in /addons/addon-ligatures
2024-04-21 08:01:25 -07:00
Daniel Imms 7938dfcc17 Merge pull request #5018 from xtermjs/dependabot/npm_and_yarn/express-4.19.2
Bump express from 4.18.2 to 4.19.2
2024-04-21 07:59:38 -07:00
Daniel Imms ce3e0852d8 Merge branch 'master' into patch-1 2024-04-21 07:59:25 -07:00
Daniel Imms ca269907dc Merge branch 'master' into dependabot/npm_and_yarn/addons/addon-ligatures/follow-redirects-1.15.6 2024-04-21 07:56:27 -07:00
Daniel Imms bca4e717b8 Merge branch 'master' into dependabot/npm_and_yarn/express-4.19.2 2024-04-21 07:54:45 -07:00
jerch cbb3472780 Merge pull request #4963 from unional/patch-1
Update xterm.d.ts
2024-04-21 16:48:39 +02:00
dependabot[bot] b0c55d1bbf Bump follow-redirects from 1.15.3 to 1.15.6 in /addons/addon-ligatures
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-21 14:47:44 +00:00
dependabot[bot] f1e0737c5e Bump express from 4.18.2 to 4.19.2
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-21 14:47:44 +00:00
Daniel Imms 650ecb0640 Merge branch 'master' into patch-1 2024-04-21 07:45:41 -07:00
Daniel Imms 75491f4152 Remove trailing whitespace 2024-04-21 07:42:17 -07:00
Daniel Imms 770c17318e Merge pull request #4933 from tisilent/fix-#4917
Check after updating the SelectionRenderModel
2024-04-21 07:42:15 -07:00
Daniel Imms c52b4c3ed5 Merge branch 'master' into patch-1 2024-04-21 07:41:48 -07:00
Daniel Imms a7df139c46 Merge branch 'master' into fix-#4917 2024-04-21 07:38:10 -07:00
Daniel Imms bada1d28d6 Merge pull request #4865 from silamon/devcontainer-update
Update devcontainer
2024-04-21 07:37:18 -07:00
Daniel Imms e4bbbcf1fb Merge pull request #4989 from gonzolively/master
adding Wave Terminal to the README
2024-04-21 07:35:35 -07:00
Daniel Imms 292042e813 Merge pull request #4984 from tisilent/fix-#4983
Clear timer when dispose
2024-04-21 07:33:52 -07:00
Ayman Bagabas 3cedfbe9bf Merge branch 'master' into osc52 2024-04-21 15:32:08 +03:00
Daniel Imms 0d799ba69b Merge pull request #5038 from Tyriar/tyriar/4911
Speed up insertion and deletion of values in SortedList by batching and deferring to idle task
2024-04-20 11:20:52 -07:00
Daniel Imms 7b66da2706 Merge branch 'master' into tyriar/4911 2024-04-20 11:16:31 -07:00
Daniel Imms 6b4bf428de Fix tests 2024-04-20 11:15:14 -07:00
Daniel Imms a4a7ce843c Reduce gc pressure in api verify integers 2024-04-20 11:08:28 -07:00
Daniel Imms 73fe7015b7 Use sort on object 2024-04-20 11:00:41 -07:00
Daniel Imms ef1152a8fb Doc 2024-04-20 10:59:17 -07:00
Daniel Imms 71dddbc8b9 Move from set to array 2024-04-20 10:57:39 -07:00
Daniel Imms 45fd3c900f Only flush when needed 2024-04-20 10:52:43 -07:00
Daniel Imms 69c4966804 Consistent naming 2024-04-20 10:48:55 -07:00
Daniel Imms 3af11c2b1f Optimize SortedList.insert by batching to idle task 2024-04-20 10:47:40 -07:00
Daniel Imms dc541d5495 Optimize SortedList.delete by batching to idle task 2024-04-20 10:32:30 -07:00
Daniel Imms 5c8a9084e3 Add mass decoration test button
Part of #4911
2024-04-20 08:41:22 -07:00
Ayman Bagabas 24b04e9243 Merge branch 'master' into osc52 2024-04-20 11:24:58 -04:00
Ayman Bagabas 0562f32af6 Apply suggestions 2024-04-20 11:20:16 -04:00
Daniel Imms 21d7f784d1 Merge pull request #5037 from Tyriar/tyriar/5036
Prevent smooth scroll from running more than once per frame
2024-04-20 08:19:17 -07:00
Daniel Imms 16db227119 Prevent smooth scroll from running more than once per frame
Fixes #5036
2024-04-20 08:11:59 -07:00
Ayman Bagabas 9ebfb11ac8 Fix tests 2024-04-19 10:52:38 +03:00
Ayman Bagabas 98b0e16984 Merge branch 'master' into osc52 2024-04-19 10:09:21 +03:00
Ayman Bagabas 87169ee3ac fix: tests 2024-04-19 10:09:08 +03:00
Daniel Imms 47a46870b6 Merge pull request #5034 from Tyriar/tyriar/update_cursor_still
Expose onWriteParsed on API
2024-04-18 16:31:19 -07:00
Daniel Imms 8458bb4c4f Expose onWriteParsed on API
Inconsistency with headless API
2024-04-18 16:27:48 -07:00
Ayman Bagabas 5238461f3f Update ClipboardAddon.ts 2024-04-18 23:17:17 +03:00
Ayman Bagabas 1f7db053cd Merge branch 'master' into osc52 2024-04-18 13:10:23 +03:00
Ayman Bagabas 8a9cb37273 Tidy 2024-04-18 13:09:27 +03:00
Daniel Imms d2b8e6c125 Merge pull request #5027 from Tyriar/4916
Finish OSC hyperlinks when the second param is only whitespace
2024-04-12 16:52:45 -07:00
Daniel Imms e845abc784 Finish OSC hyperlinks when the second param is only whitespace
Fixes #4916
2024-04-12 16:47:59 -07:00
Ayman Bagabas 70dd76f954 Merge branch 'master' into osc52 2024-04-08 09:36:19 -07:00
Daniel Imms 887e5a6cba Merge pull request #5024 from ksqsf/master
Fix duplicate input for some IMEs
2024-04-08 05:53:56 -07:00
Ayman Bagabas acc0a2ef78 Support passing playwright browser options 2024-04-08 12:53:17 +03:00
Ayman Bagabas 6ac75d88c4 Fix demo tsconfig addon name 2024-04-08 12:46:37 +03:00
Ayman Bagabas 00514d41b6 Undo format 2024-04-08 12:45:55 +03:00
ksqsf 52e8a75e9f Fix duplicate input for some IMEs
fixes #5023
2024-04-08 13:42:55 +08:00
Ayman Bagabas ce9e92f8e5 Fix OSC52 sequence response 2024-04-08 05:52:21 +03:00
Ayman Bagabas a709187007 Update addon-clipboard readme 2024-04-08 04:51:55 +03:00
Ayman Bagabas fad97bc4d5 Clean up 2024-04-08 04:40:17 +03:00
Ayman Bagabas 94648eb4e9 Update addon-clipboard 2024-04-08 02:47:26 +03:00
Ayman Bagabas 805cabafe8 Merge remote-tracking branch 'upstream/master' into osc52 2024-04-07 23:22:01 +03:00
Daniel Imms 9ba6c00a19 Merge pull request #5021 from Tyriar/tyriar5_5
v5.5
2024-04-05 07:00:05 -07:00
Daniel Imms 78297e52aa v5.5 2024-04-05 06:50:30 -07:00
sawka 431045619e match capitalization of HTML with the rest of the file 2024-03-29 10:26:44 -07:00
sawka 55e34cb174 fix unit test (test terminal only has 10 cols) 2024-03-29 00:44:02 -07:00
sawka cdb45c743f escape special html characters in addon-serialize 2024-03-29 00:30:29 -07:00
Simon Lamon 9886d60be0 Merge branch 'master' into devcontainer-update 2024-03-22 19:06:35 +00:00
Daniel Imms 53bc9f8442 Merge pull request #5013 from Tyriar/tyriar/ascii
Don't rescale ascii
2024-03-20 10:09:19 -07:00
Daniel Imms 4c90009a0e Don't rescale ascii
See microsoft/vscode#208102
2024-03-20 10:02:53 -07:00
Daniel Imms bee4fd0914 Merge pull request #5012 from Tyriar/tyriar/208102
Only scale when over 50% of following cell
2024-03-19 09:03:36 -07:00
Daniel Imms f8ae7edaa0 Only scale when over 50% of following cell
See microsoft/vscode#208102
2024-03-19 08:56:13 -07:00
Daniel Imms 9ec9dca5f8 Merge pull request #5009 from Tyriar/tyriar/4987
Fix dom cursor blink animation and improve readability
2024-03-16 11:12:19 -07:00
Daniel Imms a4f1299f42 Special case cursor block blink to not use important
Fixes #4987
2024-03-16 11:07:05 -07:00
Daniel Imms 7b76ca7e49 Make dom rendere animation classes more readable 2024-03-16 09:57:23 -07:00
Daniel Imms 18147b2134 Fix bar blink animation 2024-03-16 09:55:20 -07:00
Daniel Imms c78af2b448 Fix dom cursor blink animation
Fixes #4987
Doesn't seem to regress #4773 which caused this issue
2024-03-16 09:49:36 -07:00
Daniel Imms e2dc01cf6e Merge pull request #5008 from Tyriar/tyriar/4994
Fix search not destroying cache on linefeed
2024-03-16 09:38:54 -07:00
Daniel Imms 14fbdd3e9c Adopt MutableDisposable in SearchAddon 2024-03-16 09:32:49 -07:00
Daniel Imms 3e5d0015af Fix search not destroying cache on linefeed
Fixes #4994
2024-03-16 09:30:25 -07:00
Daniel Imms b4c1007075 Merge pull request #5007 from Tyriar/5005
Don't rescale unless it exceeds 25% of following cell
2024-03-16 09:24:35 -07:00
Daniel Imms e0533db4d9 Merge pull request #5006 from Tyriar/tyriar/4995
Set up shared context on browser even if process exists
2024-03-16 09:18:02 -07:00
Daniel Imms 4071f41f52 Don't rescale unless it exceeds 25% of following cell
Fixes #5005
2024-03-16 09:16:31 -07:00
Daniel Imms 37efeeb044 Make process node check stricter
Fixes #4995
2024-03-16 09:08:54 -07:00
Daniel Imms 47409f39f6 Set up shared context on browser even if process exists
Fixes #4995
2024-03-16 09:05:45 -07:00
Josiah Hudson b40e58bc77 Fix https://github.com/xtermjs/xterm.js/issues/4944 by only splitting on the first ";" in InputHandler.setHyperlink(). 2024-03-15 17:40:21 -04:00
Daniel Imms b7b9d27627 Merge pull request #5001 from Tyriar/powerline_nf
Don't rescale powerline or nerd fonts
2024-03-15 08:36:58 -07:00
Daniel Imms 6b3d485d77 Note new excluded glyphs in API 2024-03-15 08:30:55 -07:00
Daniel Imms 48c6e96a78 Don't rescale powerline or nerd fonts
Part of #4969
2024-03-15 08:18:26 -07:00
Daniel Imms 44feecfc9a Merge pull request #4997 from Tyriar/4969
Introduce opt-in glyph scaling to achieve GB18030 compliance
2024-03-14 09:50:13 -07:00
Daniel Imms df559e3444 Rescale overlapping in canvas 2024-03-14 07:26:25 -07:00
Daniel Imms 33a7a9b6a2 Implement rescaleOverlappingGlyphs in webgl
Part of #4969
2024-03-14 07:14:13 -07:00
Daniel Imms 0658719d23 Merge pull request #4993 from Tyriar/tyriar/4992
Add default to api d.ts
2024-03-07 05:30:09 -08:00
Daniel Imms c32313a471 Add default to api d.ts
Fixes #4992
2024-03-07 05:21:59 -08:00
Knox Lively 553b9f261a adding Wave Terminal to the README 2024-03-06 23:56:04 -07:00
tisilent fe22671a6e Clear timer when dispose 2024-03-06 17:03:25 +08:00
jerch 1da0db435f Merge pull request #4977 from dstein64/master
Add @xterm scope to packages
2024-03-03 12:57:24 +01:00
Daniel Steinberg 17fd7389c4 Add @xterm scope to packages 2024-03-02 03:46:10 +00:00
Daniel Imms 9da5f1401f Merge pull request #4976 from Tyriar/tyriar/readme
Update script/css import in readme
2024-03-01 09:24:49 -08:00
Daniel Imms da3aad4497 Update script/css import in readme
Part of #4859
2024-03-01 09:18:29 -08:00
Daniel Imms 9a512d1abd Merge pull request #4975 from Tyriar/tyriar/v5_4_x
Fix publishing of stable
2024-03-01 09:00:46 -08:00
Daniel Imms 6ca8dc54ad Fix publishing of stable 2024-03-01 09:00:33 -08:00
Daniel Imms cff944fe8a Merge pull request #4974 from Tyriar/tyriar/v5_4
v5.4.0
2024-03-01 08:42:37 -08:00
Daniel Imms 72dea6279e v5.4.0 2024-03-01 08:39:19 -08:00
Daniel Imms 37ecb9a6b5 Merge pull request #4965 from jerch/fix_4964
allow uppercase in weblinks
2024-03-01 07:45:20 -08:00
Daniel Imms fb867a914a Merge pull request #4973 from Tyriar/spacing
Fix spacing issue when measuring before element is attached
2024-02-29 07:43:03 -08:00
Daniel Imms 8ef3c10844 Fix spacing issue when measuring before element is attached
See microsoft/vscode#204690
2024-02-29 07:37:32 -08:00
Jörg Breitbart 10fe249877 allow user+password to still match 2024-02-22 09:55:42 +01:00
Jörg Breitbart 5143f904ee remove leftover .only 2024-02-22 09:40:38 +01:00
Jörg Breitbart 768452a519 make linter happy 2024-02-22 09:38:36 +01:00
Jörg Breitbart 547bda6e4f fix #4964 2024-02-22 09:33:21 +01:00
Homa Wong 88bfc4ad9c add termios link 2024-02-19 17:18:52 -08:00
Homa Wong 9107ee905a Update xterm.d.ts
Fix doc typo
2024-02-16 18:08:58 -08:00
octoclonius b5ca41d658 Merge branch 'master' into patch-1 2024-02-04 15:55:14 -05:00
Daniel Imms 6a281bd90e Merge pull request #4953 from arencoskun/master
Expose API method for writing to application side (#4948)
2024-02-02 12:16:03 -08:00
Daniel Imms 1c4e0111cb Merge branch 'master' into master 2024-02-02 12:07:10 -08:00
Daniel Imms 8d1771ef64 Tweak docs 2024-02-02 12:03:08 -08:00
Daniel Imms fb54bb0b6c Merge pull request #4954 from Tyriar/npe
Prevent npe in render service
2024-02-02 10:07:02 -08:00
Daniel Imms 546bcb5133 Prevent npe in render service
See microsoft/vscode#204104
2024-02-02 09:58:21 -08:00
arencoskun b1a72b2e83 Linter fix 2024-02-02 09:04:53 +03:00
arencoskun dce6e31c89 Add headless definitons 2024-02-02 08:59:57 +03:00
arencoskun cddc888065 Add definition to xterm-headless.d.ts 2024-02-01 16:49:15 +03:00
arencoskun 06aa2c86df Whitespace fix 2024-02-01 16:32:31 +03:00
arencoskun c51a0b7454 Fix linter errors (hopefully) 2024-02-01 16:05:02 +03:00
arencoskun cae42772e8 Move function to CoreTerminal, add additional argument to specify if the input was user input or not. 2024-02-01 14:11:29 +03:00
arencoskun 09a0dd658d Final fixes 2024-02-01 13:11:54 +03:00
arencoskun bbd1a1dbe2 Try to fix linter errors 2024-02-01 13:05:13 +03:00
arencoskun f1e563ad5f Expose API method for writing to application side (#4948) 2024-02-01 11:17:25 +03:00
Daniel Imms 8e015ebf87 Merge pull request #4950 from Tyriar/tyriar/blending
Fix background selection blending for true color
2024-01-30 11:25:14 -08:00
Daniel Imms 3c88c767cd Fix background selection blending for true color
Bug in #4920
See microsoft/vscode#200428
2024-01-30 11:16:19 -08:00
octoclonius d83f442cff Update webpack.config.headless.js 2024-01-13 19:57:38 -06:00
octoclonius 67e8e60a69 Update webpack.config.headless.js 2024-01-13 19:55:18 -06:00
octoclonius d5827ec77d Update webpack.config.headless.js 2024-01-13 19:54:27 -06:00
octoclonius c0044dc4a5 Update webpack.config.js global object fix 2024-01-13 13:30:10 -06:00
octoclonius 8696cf8789 Update webpack.config.js global object fix 2024-01-13 13:29:59 -06:00
octoclonius 693ec1b2bc Update webpack.config.js global object fix 2024-01-13 13:29:48 -06:00
octoclonius 330d7b3100 Update webpack.config.js global object fix 2024-01-13 13:29:33 -06:00
octoclonius d8f96ab9c7 Update webpack.config.js global object fix
`this` might be okay, I'm not actually sure, but xterm.js uses `globalThis` and so I think consistency is better maybe?
2024-01-13 13:29:20 -06:00
octoclonius 072cd029e4 Update webpack.config.js global object fix 2024-01-13 13:28:21 -06:00
octoclonius 46baff8459 Update webpack.config.js global object fix 2024-01-13 13:28:05 -06:00
octoclonius 8d6fff7000 Update webpack.config.js global object fix 2024-01-13 13:27:44 -06:00
octoclonius f84fff5f87 Update global object fix 2024-01-13 13:24:15 -06:00
octoclonius 1a67241f67 Update global object fix 2024-01-13 13:23:57 -06:00
octoclonius 7f7de14e6f Add comma 2024-01-13 13:23:33 -06:00
octoclonius 815758529d Update global object fix 2024-01-13 13:21:30 -06:00
jerch 99df13b085 Merge pull request #4937 from szymonkaliski/sk/fix-url-parsing
fix weblinks addon url parsing for url.encoded urls
2024-01-11 21:43:05 +01:00
Szymon Kaliski f03d870bcd adjust a comment 2024-01-11 11:23:24 -08:00
Szymon Kaliski 856666d5bd fix url parsing for urls with percentage sign in them 2024-01-05 09:43:33 +01:00
Simon Siefke 819254e540 fix formatting 2024-01-04 22:33:39 +01:00
Simon Siefke f486989697 fix formatting 2024-01-04 22:32:59 +01:00
Simon Siefke 9e98b631da use disposable for text area listeners 2024-01-04 22:29:12 +01:00
Simon Siefke b0667aacca fix: memory leak in CoreBrowserService 2024-01-04 22:05:23 +01:00
tisilent 750f3179de move test 2024-01-01 22:48:39 +08:00
tisilent b1d9b4751d Check after updating the SelectionRenderModel 2024-01-01 22:25:54 +08:00
Daniel Imms 1940bbec75 Merge pull request #4931 from Tyriar/tyriar/out_ignore
Ignore out dirs in eslint
2023-12-30 09:30:46 -08:00
Daniel Imms 7b7fb73611 Ignore out dirs in eslint 2023-12-30 09:30:25 -08:00
Daniel Imms b97baa7ff1 Merge pull request #4930 from PerBothner/update-eslint
Update required eslint and eslint-plugin-jsdoc versions
2023-12-30 09:26:34 -08:00
Per Bothner a7bf3b22c1 Update required eslint and eslint-plugin-jsdoc versions
This fixes a problem when using node 20.*.*, because eslint-plugin-jsdoc@39.9.1
requires node version "^14 || ^16 || ^17 || ^18 || ^19".
2023-12-29 18:13:09 -08:00
Daniel Imms 442c1583e7 Merge pull request #4866 from silamon/remove-16-ci
Remove unit tests with Node 16
2023-12-29 04:14:20 -08:00
Daniel Imms 217acef6b2 Merge branch 'master' into remove-16-ci 2023-12-29 04:03:53 -08:00
Daniel Imms 0eed746638 Merge pull request #4878 from xtermjs/dependabot/npm_and_yarn/addons/addon-ligatures/axios-1.6.0
Bump axios from 0.21.2 to 1.6.0 in /addons/addon-ligatures
2023-12-29 04:02:51 -08:00
Daniel Imms 1b4f0606ca Merge pull request #4929 from Tyriar/tyriar/metrics
Implement and default to text metrics measure strategy
2023-12-29 04:02:04 -08:00
Daniel Imms 3c4d567be9 Merge pull request #4915 from tisilent/update-attachCustomWheelEventHandler-comments
Update attachCustomWheelEventHandler comments
2023-12-29 03:58:50 -08:00
Daniel Imms 82d50a4f89 Allow fit addon test to work when hidden 2023-12-29 03:57:37 -08:00
Daniel Imms 379c382fe7 Pull common measure parts into base class 2023-12-29 03:47:44 -08:00
Daniel Imms 559026bbf3 Implement and default to text metrics measure strategy
Fixes #3449
2023-12-29 03:40:44 -08:00
Daniel Imms 08e67a3a0b Merge pull request #4927 from Tyriar/tyriar/color
Move rgba.toColor to channels.toColor
2023-12-28 09:55:28 -08:00
Daniel Imms 1a82e0d421 Remove todo
Not much gain by caching the value
2023-12-28 09:47:05 -08:00
Daniel Imms 2e03680128 Add channels.toColor tests 2023-12-28 09:32:57 -08:00
Daniel Imms 94a9ce8566 Move toColor into channels
It operates on rgba channels, not a packed 32 bit int
2023-12-28 09:29:30 -08:00
Daniel Imms 6e351dd4ac Merge pull request #4924 from Tyriar/link_refactor
Split Linkifier2 (always active) into Linkifier (after attach) and LinkProviderService (always active)
2023-12-23 08:57:12 -08:00
Daniel Imms 53604e427b Update test-unit node to 18 2023-12-23 08:49:37 -08:00
Daniel Imms 1b52c97fd0 Add wait for builld job to test-unit 2023-12-23 08:46:09 -08:00
Daniel Imms dbcb43f1d3 Rename Linkifier2 -> Linkifier 2023-12-23 08:32:39 -08:00
Daniel Imms d7c8d063b6 Get linkifier test to work 2023-12-23 08:31:50 -08:00
Daniel Imms de41c9f306 Make linkifier always attached to dom 2023-12-23 08:29:28 -08:00
Daniel Imms 8733d2cfa2 Separate link provider service from linkifier 2023-12-23 08:21:35 -08:00
Daniel Imms b3737d6ff0 Merge pull request #4921 from Tyriar/tyriar/crosshair
Fix crosshair cursor now working in some embedders
2023-12-20 10:02:44 -08:00
Daniel Imms 56a6a010ab Fix crosshair cursor now working in some embedders
This was not happening in the demo because the xterm instance is almost
always focused.

See microsoft/vscode#199848
2023-12-20 07:28:26 -08:00
Daniel Imms 341d9f0597 Merge pull request #4920 from Tyriar/tyriar/bg_blend
Add bg+powerline background blend behavior
2023-12-19 08:57:03 -08:00
Daniel Imms a4505ed724 Skip another test on canvas 2023-12-19 08:47:54 -08:00
Daniel Imms b843e0fc8e Pass through dom skip exceptions flag 2023-12-19 08:44:14 -08:00
Daniel Imms c0fac5e5f1 Fix test suppression 2023-12-19 08:38:55 -08:00
Daniel Imms 78a945ae9e Suppress test failure 2023-12-19 08:34:16 -08:00
Daniel Imms 9b62849bb8 Fix lint 2023-12-19 08:23:21 -08:00
Daniel Imms 66b426311e Fix compile 2023-12-19 08:21:18 -08:00
Daniel Imms 7bee001868 Ensure addons are loaded in standalone tests 2023-12-19 08:18:44 -08:00
Daniel Imms 22f1ce4a11 Add bg+powerline background blend behavior
When a with bg is selected, the cell's regular background will be blended
with 50% opacity selectionBackground in order to retain the bg color info
as well as getting the color to change and getting decent contrast.

This commit also fixes a terrible, nasty bug where the standalone shared
renderer tests were causing the terminal to open multiple times and not
get the WebGL addon activated the second time. So some tests were actually
testing the DOM renderer :o

Fixes #4918
2023-12-19 08:16:48 -08:00
Daniel Imms 805823df7a Merge pull request #4919 from Tyriar/tyriar/noisy
Remove tracing drawToCache call
2023-12-19 05:50:32 -08:00
Daniel Imms 7c5ad6b7a9 Remove tracing drawToCache call
This was a little noisy and didn't end up being that useful
2023-12-19 05:44:55 -08:00
Daniel Imms 0904078bf4 Merge pull request #4912 from jeanp413/fix-vscode-200469
Fixes vscode #200469
2023-12-15 08:26:27 -08:00
Jean Pierre 9f995c6ff8 💄 2023-12-15 16:03:37 +00:00
tisilent 427b4f6c6d Update attachCustomWheelEventHandler comments 2023-12-14 16:55:49 +08:00
jeanp413 81a4d860c5 💄 2023-12-12 09:21:55 -05:00
jeanp413 7ac95fab28 More fixes 2023-12-12 09:19:53 -05:00
Daniel Imms 1f15c47a43 Merge pull request #4913 from Tyriar/tyriar/wheel_handlers
addCustomWheelEventHandler API
2023-12-12 05:25:31 -08:00
Daniel Imms 88ba66d00b addCustomWheelEventHandler API
I opted for consistency with the key event handler over our more modern
approach, we can migrate them at the same time if we end up returning
a disposable.

See microsoft/vscode#76381
2023-12-12 05:17:24 -08:00
jeanp413 2592e1e84d re register intersection observer on window change 2023-12-12 05:55:30 -05:00
jeanp413 97750f672f 💄 2023-12-12 04:41:20 -05:00
jeanp413 54608bf38d Fixes https://github.com/microsoft/vscode/issues/200469 2023-12-12 04:16:28 -05:00
Daniel Imms b4226bc0f5 Merge pull request #4910 from Tyriar/tyriar/leaks
Help embedders avoid memory leaks by clearing options
2023-12-08 12:19:42 -08:00
Daniel Imms 1943636f02 Help embedders avoid memory leaks by clearing options
Related microsoft/vscode#192838
2023-12-08 12:14:22 -08:00
dependabot[bot] d218bff2c4 Bump axios from 0.21.2 to 1.6.0 in /addons/addon-ligatures
Bumps [axios](https://github.com/axios/axios) from 0.21.2 to 1.6.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.21.2...v1.6.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-10 16:12:08 +00:00
Jason Lin 26dc69446e Align character position in a11y tree with the actual rendering
This helps screen readers to draw selection outline at the correct
position.
2023-11-10 21:21:50 +11:00
Daniel Imms fb2c39cb57 Merge pull request #4877 from Tyriar/serialize_fixes
Add range API to serialize addon
2023-11-09 10:27:54 -08:00
Daniel Imms b595940bcf Add range API to serialize addon
Fixes #4876
Fixes #4871
2023-11-09 09:43:14 -08:00
Jason Lin a0da287b9c Use the right document in AccessibilityManager.ts 2023-11-09 16:57:58 +11:00
Daniel Imms 49eab6b1d9 Merge pull request #4874 from tisilent/dashed-line
Draw dashed lines through ratios
2023-11-08 05:30:00 -08:00
tisilent 2861a4dd39 Draw dashed lines through ratios 2023-11-08 17:58:38 +08:00
Simon Lamon b4fa7c6c06 Remove unit tests with Node 16 2023-11-04 14:35:36 +01:00
Simon Lamon 5c1d9b28cd Update yarn lock 2023-11-04 13:10:36 +00:00
Simon Lamon 0aeeebdd64 Devcontainer update 2023-11-04 13:05:42 +00:00
Daniel Imms bdcba308df Upload clipboard addon artifacts 2023-11-03 12:44:19 -07:00
Daniel Imms aed94e5317 xterm-addon-clipboard to scoped module 2023-11-03 11:45:21 -07:00
Daniel Imms a4e6713823 Merge remote-tracking branch 'upstream/master' into pr/aymanbagabas/4220 2023-11-03 11:35:23 -07:00
Daniel Imms 58bb7fc73e Merge pull request #4742 from JasonXJ/sync-select
Allow selection in the a11y tree and sync the selection to terminal
2023-11-03 09:08:53 -07:00
Daniel Imms b16724f06a Improve docs of BufferLine.translateToString 2023-11-03 08:53:53 -07:00
Daniel Imms 5630239a6d Merge remote-tracking branch 'upstream/master' into pr/JasonXJ/4742 2023-11-03 08:47:05 -07:00
Daniel Imms 13be985b36 Merge pull request #4825 from PerBothner/setcell-refactor
Change setCellFromCodePoint API and rename to setCellFromCodepoint
2023-11-03 06:00:35 -07:00
Daniel Imms a5646a58d5 Merge pull request #4801 from tisilent/fix-inactive-cursor-spot
using viewport relative coordinate
2023-11-02 11:21:29 -07:00
Daniel Imms b0407e20cf Merge branch 'master' into setcell-refactor 2023-11-02 11:17:18 -07:00
Daniel Imms 8a1790d6d5 Merge remote-tracking branch 'upstream/master' into pr/tisilent/4801 2023-11-02 11:13:00 -07:00
Daniel Imms 86074c9210 Merge pull request #4703 from tisilent/underline-dotted
Use variants for underline dotted.
2023-11-02 10:55:00 -07:00
Daniel Imms 2f074b87f3 Explain VARIANT_OFFSET 2023-11-02 10:45:46 -07:00
Daniel Imms 6214f4c2e6 Varinat -> Variant 2023-11-02 10:43:56 -07:00
Daniel Imms 390e4f30c8 Merge remote-tracking branch 'upstream/master' into pr/tisilent/4703 2023-11-02 10:39:15 -07:00
Daniel Imms 4036ab7055 Merge pull request #4837 from tisilent/fix-dom-renderer-selection
handle selection when resizing
2023-11-02 09:43:09 -07:00
Daniel Imms 139bf361b4 Merge pull request #4836 from xiaoxiaobt/safari-legacy-fix
Allow xterm.js to run on legacy versions of Safari when Webgl2 support is explicitly enabled
2023-11-02 09:32:41 -07:00
Daniel Imms c9f15454e4 Merge pull request #4833 from arcanis/patch-3
Fixes hex color serialization
2023-11-02 09:30:48 -07:00
Daniel Imms b6a09d67e2 Merge remote-tracking branch 'upstream/master' into pr/tisilent/4837 2023-11-02 09:30:17 -07:00
Daniel Imms 1770bb1b65 Merge pull request #4839 from JasonXJ/ctrl-backspace
Send correct code for ctrl+[alt+]+backspace
2023-11-02 09:28:06 -07:00
Daniel Imms 52549f0a7a Merge remote-tracking branch 'upstream/master' into pr/arcanis/4833 2023-11-02 09:24:33 -07:00
Daniel Imms 0d7cc9e9fd Merge branch 'master' into safari-legacy-fix 2023-11-02 09:08:41 -07:00
Daniel Imms e8da73799f Merge pull request #4847 from tisilent/add-addon-public-api
Have addons implement their API at compile time
2023-11-02 09:08:14 -07:00
Daniel Imms 588da4f3b8 Merge remote-tracking branch 'upstream/master' into pr/xiaoxiaobt/4836 2023-11-02 09:00:28 -07:00
Daniel Imms 4beb7d0595 Make addon api imports consistent 2023-11-02 08:54:49 -07:00
Daniel Imms 4c275a287f Fix paths in benchmark tsconfigs 2023-11-02 08:52:09 -07:00
Daniel Imms 5ed2b013d5 Merge remote-tracking branch 'upstream/master' into pr/tisilent/4847 2023-11-02 08:45:11 -07:00
Daniel Imms 19bdcab93e Merge pull request #4862 from Tyriar/image_publish
Fix image addon build
2023-11-01 14:29:43 -07:00
Daniel Imms 45e7efce67 Re-enable auth 2023-11-01 14:29:32 -07:00
Daniel Imms fbc51ae691 Remove logs 2023-11-01 14:24:38 -07:00
Daniel Imms 92eb78230b Verify it's not an array 2023-11-01 14:17:31 -07:00
Daniel Imms 31925596f1 Log publish script 2023-11-01 13:15:28 -07:00
Daniel Imms 88b0b4a5c7 Log publish script 2023-11-01 13:07:59 -07:00
Daniel Imms c8b2783b85 Tweak parsing versions 2023-11-01 13:01:20 -07:00
Daniel Imms 2744549c0f Return [] if versionsJson is falsy 2023-11-01 12:35:25 -07:00
Daniel Imms 1c522e16a4 Fix image addon build
Fixes #4761
Fixes #4802
2023-11-01 12:13:19 -07:00
Daniel Imms 4b2e52f13c Merge pull request #4861 from Tyriar/scope_followup
Uncomment first publish special cases, add missing (at)xterm
2023-11-01 12:03:56 -07:00
Daniel Imms bbbde9261f Fix parsing of low version count 2023-11-01 11:59:42 -07:00
Daniel Imms eac8124320 Fix stable release check 2023-11-01 11:27:04 -07:00
Daniel Imms 64534e1b7a Fix missing peer dep 2023-11-01 11:07:41 -07:00
Daniel Imms 71ec216161 Uncomment first publish special cases, add missing (at)xterm
Part of #4859
2023-11-01 11:06:30 -07:00
Daniel Imms 2df591c5f7 Merge pull request #4860 from Tyriar/scoped_package
Start @xterm scope with core and webgl addons
2023-11-01 10:55:31 -07:00
Daniel Imms d95f0177c8 Add todo comments for uncomment publish script 2023-11-01 10:49:21 -07:00
Daniel Imms b4b128709f Add other addons to the readme addon section 2023-11-01 10:37:20 -07:00
Daniel Imms 0fd04aa76d Replace all instances of xterm-addon 2023-11-01 10:35:10 -07:00
Daniel Imms 4abb4c674f Use build artifacts in dry run 2023-11-01 07:31:39 -07:00
Daniel Imms 485fb455d6 Add release dry run job to CI 2023-11-01 07:29:42 -07:00
Daniel Imms 765a8b21a3 real run 2023-11-01 07:25:58 -07:00
Daniel Imms dcc940c32e headless -> scoped 2023-11-01 07:24:49 -07:00
Daniel Imms 059acb2da6 Handle versionsJson error 2023-11-01 07:22:28 -07:00
Daniel Imms a1f87809b2 Log versionsJson 2023-11-01 07:19:23 -07:00
Daniel Imms 2fb9702a3a Force dry run temporarily 2023-11-01 07:14:19 -07:00
Daniel Imms 5196ac5c8f Fix variable name 2023-11-01 07:02:14 -07:00
Daniel Imms 9db2178d05 Return [] when no versions are published 2023-11-01 07:00:23 -07:00
Daniel Imms 8c6d16486d Don't fetch beta versions 2023-11-01 06:57:44 -07:00
Daniel Imms cef869a206 Force beta build for now 2023-11-01 06:55:21 -07:00
Daniel Imms efbcd41fab from xterm-headless -> from scoped 2023-11-01 06:50:48 -07:00
Daniel Imms bb9728ccd1 from xterm -> from scoped 2023-11-01 06:50:08 -07:00
Daniel Imms 905285efda Temporarily enable publishing in PRs 2023-11-01 06:48:33 -07:00
Daniel Imms e1d19e00a5 Merge remote-tracking branch 'upstream/master' into scoped_package 2023-11-01 06:46:14 -07:00
Daniel Imms add7f8133e Start @xterm scope with core and webgl addons 2023-11-01 06:44:26 -07:00
Daniel Imms 33100818d7 Merge pull request #4831 from tisilent/fix-search-options-change
Check option changes
2023-10-31 06:49:50 -07:00
Daniel Imms 974b275f6e is -> did 2023-10-31 06:41:41 -07:00
Daniel Imms ea2d775595 Merge branch 'master' into fix-search-options-change 2023-10-31 06:38:24 -07:00
Daniel Imms f741d42165 Merge pull request #4858 from xtermjs/Tyriar-patch-1
Remove unicode-graphemes install doc
2023-10-31 06:29:02 -07:00
Daniel Imms 6945e881a8 Update README.md 2023-10-31 06:18:40 -07:00
Daniel Imms 804ff187fa Merge pull request #4856 from alan-agius4/alan-agius4-patch-1
fix: use globalThis instead of self to address non Browser consumption
2023-10-30 09:36:08 -07:00
Alan Agius de1304d19e fix: use globalThis instead of self to address non Browser consumption
Currently using this package in a non Browser env will cause an error as Webpack will emit `self` which does not exist in all envs such as Node.js and Workers.

This commit updates Webpack and force it to use `globalThis`. See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis
2023-10-30 10:44:18 +01:00
Ayman Bagabas 96fcfbded1 Merge branch 'master' into osc52 2023-10-20 13:47:45 -07:00
Daniel Imms 9fff1e6e44 Merge pull request #4851 from davidfiala/fix-xterm-node21
proper isNode detection for node v21.0.0
2023-10-19 11:38:49 -07:00
David Fiala 0d0166b4bc provide a declaration for 'process' needed for nodejs detect
We provide no further type information as it will not be used except for a presence check for nodejs detection.
2023-10-19 11:19:27 -07:00
David Fiala 6c5fb36c36 proper isNode detection for node v21.0.0 2023-10-19 09:52:29 -07:00
Daniel Imms 1c880f5199 Merge pull request #4849 from xtermjs/dependabot/npm_and_yarn/babel/traverse-7.23.2
Bump @babel/traverse from 7.22.8 to 7.23.2
2023-10-19 09:39:44 -07:00
dependabot[bot] 4681b319ca Bump @babel/traverse from 7.22.8 to 7.23.2
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.8 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-19 11:47:16 +00:00
Daniel Imms 78a6aac409 Merge pull request #4846 from Tyriar/multi_window
Make xterm.js multi-window aware
2023-10-17 11:03:31 -07:00
Daniel Imms 20a26a6589 Remove unused imports 2023-10-17 10:54:29 -07:00
tisilent a4e09d0ad8 add path to benchmark 2023-10-18 01:09:39 +08:00
tisilent dfd5385602 add semicolon 2023-10-18 00:49:29 +08:00
tisilent 7dab4601d2 add public api 2023-10-18 00:29:56 +08:00
Daniel Imms 81e0718a74 Move window resize edge case into dpr monitor 2023-10-17 09:18:46 -07:00
Daniel Imms 6e12d94f11 Move window resize listeners over to onWindowChange 2023-10-17 09:10:04 -07:00
Daniel Imms 92535e539f Inline ScreenDprMonitor into CoreBrowserService file 2023-10-17 08:56:02 -07:00
Daniel Imms 4cc51ca08f Move ScreenDprMonitor into CoreBrowserService 2023-10-17 08:55:07 -07:00
Daniel Imms 63790f8854 Change ScreenDprMonitor to be event based 2023-10-17 08:49:28 -07:00
Daniel Imms 45605db3c5 Listen to window change and pass through to ScreenDprMonitor 2023-10-17 08:39:48 -07:00
Daniel Imms c80453f602 Use correct document when creating elements 2023-10-16 11:09:36 -07:00
tisilent eb4277e7bd using ITerminal 2023-10-16 09:35:21 +08:00
Daniel Imms 4245283e05 Merge pull request #4844 from Tyriar/doc_override
Expose a documentOverride setting
2023-10-13 13:48:58 -07:00
Daniel Imms 41c62288f0 Expose a documentOverride setting
This lets the embedder choose which Document object to use for creating
elements, adding event listeners, etc. The reason this exists is because
when working with multiple windows it can be convenient to create all
elements under the primary window to make instanceof usage consistent.

See microsoft/vscode#195595
2023-10-13 13:41:53 -07:00
Jason Lin c3aa63cffa translateToString() adds one more entry to outColumns
Previously, for string 'ab好', outColumns=[0, 1, 2]. Now it becomes [0,
1, 2, 4]. This allows the user to know where does the last character
ends.
2023-10-11 16:23:03 +11:00
Jason Lin 1b940de0bf Allow selection in the a11y tree and sync the selection to terminal 2023-10-11 16:23:03 +11:00
Jason Lin 023c778c4d Send correct code for ctrl+[alt+]+backspace
We should send ^H (instead of ^?) for ctrl+backspace. This is what xterm
and gnome-terminal do.
2023-10-11 14:59:35 +11:00
tisilent 6b5fc260ca Dom Renderer using SelectionRenderModel 2023-10-10 22:53:01 +08:00
tisilent d3e075f37b handle selection when resizing 2023-10-10 15:54:15 +08:00
Taige Wang 194b810ad5 Fix Webgl2 compatability on legacy Safari with webgl2 enabled 2023-10-08 13:03:28 +03:00
Ayman Bagabas 2a8ddcd508 Merge branch 'master' into osc52 2023-10-04 11:30:55 -07:00
Maël Nison 7cbaacde40 Fixes hex color serialization 2023-10-04 15:42:02 +02:00
Daniel Imms 34017f32fb Merge pull request #4829 from xtermjs/dependabot/npm_and_yarn/get-func-name-2.0.2
Bump get-func-name from 2.0.0 to 2.0.2
2023-10-02 11:22:58 -07:00
Daniel Imms 57e2adc042 Merge branch 'master' into dependabot/npm_and_yarn/get-func-name-2.0.2 2023-10-02 11:16:37 -07:00
Daniel Imms e9390d0d91 Merge pull request #4832 from Tyriar/node-pty-update
node-pty@1.1.0-beta5
2023-10-02 11:14:14 -07:00
Daniel Imms f6c4aee928 Move benchmarks off removed node-pty apis 2023-10-02 11:05:33 -07:00
Daniel Imms a673b110f5 node-pty@1.1.0-beta5
This is needed to get the build working on the newly updated GH actions runners
2023-10-02 07:27:10 -07:00
tisilent cfde4d634f Check option changes 2023-10-01 20:39:10 +08:00
Per Bothner 4e4110aeb4 Merge branch 'master' into setcell-refactor 2023-09-28 10:46:03 -07:00
dependabot[bot] 4149aa0945 Bump get-func-name from 2.0.0 to 2.0.2
Bumps [get-func-name](https://github.com/chaijs/get-func-name) from 2.0.0 to 2.0.2.
- [Release notes](https://github.com/chaijs/get-func-name/releases)
- [Commits](https://github.com/chaijs/get-func-name/commits/v2.0.2)

---
updated-dependencies:
- dependency-name: get-func-name
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-27 21:02:12 +00:00
Daniel Imms 810cc1d47e Merge pull request #4827 from Tyriar/tyriar/4821
Bring back search clearActiveDecoration
2023-09-27 08:04:30 -07:00
Daniel Imms c08062420f Bring back search clearActiveDecoration
This was removed accidentally in 57db72d

Fixes #4821
2023-09-27 07:56:31 -07:00
Per Bothner bde7bdc11d Change setCellFromCodePoint API and rename to setCellFromCodepoint
Replace fg, bg, and eAttrs parameters by single IAttributeData parameter.
In addition to making for a simpler/cleaner API, it also increases flexibility
for future CellData or BufferLine changes.
(Rename function to reduce risk of using accidentally using old function.)

Also removed redundant eraseAttr parameter in deleteCells, insertCells, and replaceCells.
2023-09-25 18:21:02 -07:00
Ayman Bagabas d245e90185 Add playwright terminal test 2023-09-21 12:09:30 -04:00
Ayman Bagabas 092aeaeb6f Fix rename clipboard selection for clarity 2023-09-21 10:33:44 -04:00
Ayman Bagabas b22762b472 Fix tsconfigs, IDisposable, and add comments 2023-09-21 10:26:46 -04:00
Ayman Bagabas db5bfc7525 Add support to ANSI OSC52
Add support to ANSI OSC52 sequence to manipulate selection and clipboard
data. The sequence specs supports multiple clipboard selections but we
only support the common ones, system and primary clipboard selections.

This adds a new event listener to the common terminal module
`onClipboard` to allow external implementations to hook into it.

The addon uses the browser Clipboard API to read/write from and to the
clipboard. The default `ClipboardProvider` uses the browser Clipboard
API. This means it only supports read/write to and from the system
clipboard.

Reference: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands
Fixes: xtermjs#3260
Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>
2023-09-20 17:46:52 -04:00
Daniel Imms a3e933d98b Merge pull request #4820 from Tyriar/4814
Don't re-render after parse is the viewport did not change
2023-09-20 06:51:08 -07:00
Daniel Imms 543b82567f Don't re-render after parse is the viewport did not change
Fixes #4814
2023-09-20 06:43:21 -07:00
Daniel Imms cfc94b332a Merge pull request #4816 from tisilent/fix-domrenderer-selection-overflow
Add column restriction
2023-09-20 06:06:43 -07:00
tisilent f391cf6d43 Add column restriction 2023-09-20 18:40:03 +08:00
tisilent da2687174f 💄 2023-09-19 22:49:53 +08:00
tisilent a8ef1d49a1 Add block cursor style confirmation 2023-09-19 22:15:35 +08:00
tisilent feb75a7f4d Add getCellColorFirstPoint function 2023-09-19 21:58:08 +08:00
tisilent 27fd011e35 Add regression tests 2023-09-19 20:29:28 +08:00
Daniel Imms 03f1336042 Merge pull request #4809 from silamon/correct-typing-graphemes
Correct graphemes addon readme and typings
2023-09-16 07:36:31 -07:00
Simon Lamon fbf7d7adb5 Fix typos in readme 2023-09-16 08:09:22 +00:00
Simon Lamon da041f43ee correct typing graphemes 2023-09-16 08:04:32 +00:00
Daniel Imms a6f57262f6 Merge pull request #4807 from mofux/isolate-width-cache-element
Move WidthCache measure container to helper container
2023-09-15 07:45:15 -07:00
Daniel Imms aa5ec44c27 Merge pull request #4808 from tisilent/#4736-add-regression-test
Add regression test,checking inactive selection.
2023-09-15 04:31:30 -07:00
Daniel Imms 446549a043 Tweak name, order in issue number 2023-09-15 04:23:47 -07:00
tisilent ef21ed901f Add regression test,checking inactive selection. 2023-09-15 18:57:17 +08:00
Thomas Zilz aaadefa548 Move WidthCache measure container to helper container 2023-09-15 10:51:31 +02:00
Daniel Imms 0e66d608a1 Merge pull request #4803 from tisilent/clear-repeat-overviewRulerWidth
Clear repeat overviewRulerWidth option in demo
2023-09-14 12:52:44 -07:00
Daniel Imms 1618092b91 Merge pull request #4798 from tisilent/fix-domrenderer-isCursorInitialized
using isCursorInitialized for domrenderer
2023-09-14 12:41:30 -07:00
Daniel Imms 2f9439b690 Explain injectSharedRendererTestsStandalone 2023-09-14 12:35:12 -07:00
Daniel Imms 66c8e33b47 Add standalone renderer tests to canvas/webgl 2023-09-14 12:33:34 -07:00
tisilent 9048ded5eb Clear repeat overviewRulerWidth option in demo 2023-09-14 17:26:30 +08:00
tisilent 17575e1d7b using viewport relative coordinate 2023-09-14 16:37:40 +08:00
tisilent 49dc046b9f rename and remove new page 2023-09-14 09:52:58 +08:00
tisilent 27d89c2311 Reduce side effects 2023-09-14 00:47:37 +08:00
tisilent 871400f407 Open a new page to perform testing. 2023-09-13 23:28:37 +08:00
tisilent a1229c78a2 Add cursor initialize test 2023-09-13 18:43:04 +08:00
tisilent 457060f89d Modify the isCursorInitialized default true 2023-09-13 18:15:37 +08:00
tisilent cc14bc4515 using isCursorInitialized for domrenderer 2023-09-13 17:34:31 +08:00
Daniel Imms bdb25c2dbe Merge pull request #4519 from PerBothner/clusters
New unicode-graphemes addon.
2023-09-12 13:56:27 -07:00
Daniel Imms 32c616512d Final polish 2023-09-12 12:45:29 -07:00
Daniel Imms 16bd8de78e Merge pull request #4796 from Tyriar/slow_trace
Remove noisy trace calls
2023-09-12 12:38:48 -07:00
Daniel Imms 3ad0ef1ac4 Remove noisy trace calls
These were added to try diagnose a rendering issue but I haven't had
reports yet and these logs slow the terminal to a crawl which is
impacting my patience/productivity
2023-09-12 12:31:36 -07:00
Daniel Imms cb8917557d Merge pull request #4795 from ujjwalpandey922/master
change repository URL of all addons
2023-09-12 09:07:00 -07:00
Daniel Imms 8183d1d221 Merge branch 'master' into clusters 2023-09-12 09:02:24 -07:00
Daniel Imms 9ab0cd648e Set repository to sub-directory
See #4795
2023-09-12 09:02:15 -07:00
Ujjwal Pandey 249e1152f4 remove gitpod file 2023-09-12 15:44:17 +00:00
Ujjwal Pandey d41b747aa1 change repository url of all addons 2023-09-12 14:59:08 +00:00
Megan Rogge f69fcb971c get voiceover to announce terminal output consistently (#4789)
* fix #3247

* rm import
2023-09-11 13:03:57 -05:00
Daniel Imms bfa6f656ef Merge branch 'master' into underline-dotted 2023-09-11 08:47:04 -07:00
Daniel Imms 24b932d67a Update to es2021 2023-09-11 06:34:32 -07:00
Daniel Imms 9e536ca9c3 Fix warnings in client.ts 2023-09-11 06:28:54 -07:00
Daniel Imms 17c4d097bb Add experimental note in readme 2023-09-11 06:06:58 -07:00
Daniel Imms 1b5756c1b1 Add unicode-grapheme addon files to build artifacts 2023-09-11 06:04:55 -07:00
Daniel Imms a003034b02 Increase node memory for lint in CI 2023-09-11 06:02:17 -07:00
Per Bothner bddff604c2 Merge branch 'master' into clusters 2023-09-10 17:20:40 -07:00
Daniel Imms b2c123e0e2 Merge pull request #4787 from Tyriar/pw_tweak
Tweak playwright workers
2023-09-10 09:04:27 -07:00
Daniel Imms be82ffc01d Merge pull request #4786 from Tyriar/4773
Fix block cursor rendering in DOM renderer
2023-09-10 09:00:45 -07:00
Daniel Imms efcca3fb3e Run pw tests faster on high core machines 2023-09-10 08:56:36 -07:00
Daniel Imms b91de01a4d Fix initial args not being passed through to pw 2023-09-10 08:56:19 -07:00
Daniel Imms 6b1c1e0751 Force 50% workers in CI to reduce flakiness 2023-09-10 08:56:04 -07:00
Daniel Imms 8985326dd8 Merge pull request #4743 from Tyriar/es2021
Upgrade es6 -> es2021
2023-09-10 08:33:48 -07:00
Daniel Imms c609f5cca0 Add regression test for block cursor focus/selection 2023-09-10 08:30:43 -07:00
Daniel Imms 3b15fb6211 Fix block cursor rendering in DOM renderer
Fixes #4773
2023-09-10 08:27:18 -07:00
Daniel Imms a7eb112d36 Merge pull request #4785 from Tyriar/4757
Fix possible exception when disposing terminal
2023-09-10 08:26:22 -07:00
Daniel Imms cc43fe5191 Fix possible exception when disposing terminal
Fixes #4757
2023-09-10 08:19:46 -07:00
Daniel Imms cfced0caf1 Merge pull request #4784 from Tyriar/server-debug
Fix server debugging
2023-09-10 07:52:45 -07:00
Daniel Imms fc18e6e774 Merge pull request #4783 from Tyriar/4781
Fix regression in force mouse selection
2023-09-10 07:48:55 -07:00
Daniel Imms 1d57ac5c63 Fix server debugging
This broke somewhere along the way, the changes update from the legacy
attach method of --inspect-brk to stopOnEntry and also updates for the
introduction of .nvmrc.
2023-09-10 07:46:00 -07:00
Daniel Imms b55d699451 Fix regression in force mouse selection
Shift+left click is means to force terminal selection and not passthrough
any mouse events, even if a mouse mode is enabled. The change this is
reverting from #4583 caused this feature to break by always installing a
global listener on Terminal.element so the SelectionService never got a
chance to cancel is.

Fixes #4781
2023-09-10 07:41:31 -07:00
Daniel Imms 4241704261 Merge pull request #4782 from Tyriar/edge_debug
Add edge debug target
2023-09-10 07:24:21 -07:00
Daniel Imms b50d21434e Add edge debug target 2023-09-10 07:23:54 -07:00
Daniel Imms c3fd1c2c40 Merge pull request #4778 from Tyriar/4759
Fix webgl/dom inverse MCR edge cases, add regression test
2023-09-09 09:08:33 -07:00
Daniel Imms fe4528c9be Add one regression test to canvas exceptions 2023-09-09 09:00:57 -07:00
Daniel Imms b0868967cb Fix inverse MCR with selection for dom renderer
Fixes #4759
2023-09-09 08:52:43 -07:00
Daniel Imms 1aac37e14f Improve regression tests for 4759 2023-09-09 08:51:50 -07:00
Daniel Imms 851c2e39af Fix webgl not respecting MCR for inverse
Part of #4759
2023-09-09 08:37:55 -07:00
Daniel Imms d2387342ce Merge pull request #4777 from Tyriar/4769
Fix MCR test on webkit, add pollForApproximate
2023-09-09 07:52:47 -07:00
Daniel Imms 1792eaf05f Fix MCR test on webkit, add pollForApproximate
Fixes #4769
2023-09-09 07:45:31 -07:00
Daniel Imms 36bf3ebff3 Merge pull request #4776 from Tyriar/4775
Fix viewport error during term dispose
2023-09-09 07:20:03 -07:00
Daniel Imms 681ba4887f Fix viewport error during term dispose
Fixes #4775
2023-09-09 07:11:32 -07:00
Daniel Imms b7f28c56a9 Merge pull request #4774 from Tyriar/4772
Avoid block elements in renderer tests
2023-09-09 06:57:31 -07:00
Daniel Imms 575cd8d28b Avoid block elements in renderer tests
Fixes #4772
2023-09-09 06:51:13 -07:00
Daniel Imms 3d440e21bd Merge pull request #4763 from tisilent/fix-selection-background-domrenderer
DomRenderer draw selection inactive background correctly when unfocused
2023-09-09 06:37:00 -07:00
Daniel Imms a10113543b Check add empty cells that are being asserted on 2023-09-09 06:28:07 -07:00
Daniel Imms 50369713de Merge branch 'master' into fix-selection-background-domrenderer 2023-09-09 06:16:42 -07:00
Daniel Imms 2f2154c13b Merge pull request #4762 from tisilent/Fix-Domrenderer-Invisible
Add handling of invisible
2023-09-09 06:16:16 -07:00
Daniel Imms 056206d7a4 Clear theme at start of every renderer test 2023-09-09 06:09:07 -07:00
Daniel Imms 57ab29bb85 Handle canvas renderer's more delayed rendering 2023-09-09 06:02:32 -07:00
Daniel Imms 4e69307074 Add regression test 2023-09-09 05:59:24 -07:00
Daniel Imms 608a5e2329 Merge branch 'master' into Fix-Domrenderer-Invisible 2023-09-09 04:58:39 -07:00
Daniel Imms 5126481de2 Remove only 2023-09-09 04:55:56 -07:00
Daniel Imms fa168bd4c0 Add a test which fails without the change 2023-09-08 20:21:58 -07:00
Daniel Imms f159a862e4 Add default xterm.js theme inactive selection bg 2023-09-08 19:57:17 -07:00
Daniel Imms 9f5ff468e1 Remove selection color test buttons
There's too many theme colors, we'll leave it to the console
2023-09-08 19:55:25 -07:00
Daniel Imms 65e07dcebc Merge branch 'master' into fix-selection-background-domrenderer 2023-09-08 19:50:29 -07:00
Daniel Imms cc83b9a4ca Merge pull request #4770 from Tyriar/tyriar/canvas_tests
Add canvas renderer tests
2023-09-08 14:27:38 -07:00
Daniel Imms 14872e091e Revert "Avoid importing os"
This reverts commit 2d74505208.
2023-09-08 14:21:18 -07:00
Daniel Imms 3d3f58b6ff Have playwright addon tests only start server, not build it 2023-09-08 14:10:37 -07:00
Daniel Imms b99158f8f0 Add workers back to playwright ci 2023-09-08 13:30:27 -07:00
Daniel Imms 2d74505208 Avoid importing os 2023-09-08 13:26:10 -07:00
Daniel Imms 534b03b99f Revert "Put webgl first"
This reverts commit 4af4d8dcc6.
2023-09-08 13:19:29 -07:00
Daniel Imms 4af4d8dcc6 Put webgl first 2023-09-08 13:12:49 -07:00
Daniel Imms 298c5b2041 Split up playwright suites into steps 2023-09-08 13:09:47 -07:00
Daniel Imms 328e97336b Try space out suites 2023-09-08 12:58:33 -07:00
Daniel Imms 2e10a7f097 Add window prefer to global symbols 2023-09-08 12:42:26 -07:00
Daniel Imms 1798cab222 Remove webgl canvas check
It complicates loading the addon
2023-09-08 12:37:53 -07:00
Daniel Imms ebd27de4e1 Re-enable core tests 2023-09-08 12:31:27 -07:00
Daniel Imms beeff131a9 Disable canvas tests on webkit 2023-09-08 12:28:08 -07:00
Daniel Imms 408240dd97 Tweak canvas renderer test 2023-09-08 12:22:38 -07:00
Daniel Imms 71eb897708 Add npm start to canvas 2023-09-08 12:17:22 -07:00
Daniel Imms 02aadf7c3e Remove firefox exception from canvas 2023-09-08 12:17:00 -07:00
Daniel Imms 98e8c6ac73 Add canvas renderer tests 2023-09-08 12:16:16 -07:00
Daniel Imms 34933d2c76 Merge pull request #4768 from Tyriar/renderer_pw
DOM renderer playwright tests
2023-09-08 11:36:39 -07:00
Daniel Imms a0c34b19df Skip webgl tests on linux/firefox 2023-09-08 10:52:21 -07:00
Daniel Imms 48ba5e5856 Add npm start to webgl package.json 2023-09-08 10:35:38 -07:00
Daniel Imms 47183b2939 Fix relative path 2023-09-08 10:31:30 -07:00
Daniel Imms 9b9062aea4 Run npm start using relative cwd 2023-09-08 10:27:14 -07:00
Daniel Imms cdf02d54da Share test code between dom and webgl 2023-09-08 10:22:13 -07:00
Daniel Imms 413e884efb Use faster pixel check method with caching 2023-09-08 10:12:06 -07:00
Daniel Imms 070d194c6c Migrate webgl to playwright/test, add unified runner script 2023-09-08 10:04:25 -07:00
Daniel Imms e54755b074 Skip failure on WebKit 2023-09-08 08:37:06 -07:00
Daniel Imms db608e33fb Fix remaining dom renderer tests 2023-09-08 08:26:49 -07:00
Daniel Imms b543842fc0 Fix dom MCR tests 2023-09-08 08:23:20 -07:00
Daniel Imms 97be015234 All tests copied over, some failing 2023-09-08 08:08:45 -07:00
Daniel Imms a656409bb5 All color dom renderer tests 2023-09-08 08:04:36 -07:00
Daniel Imms ea45b04105 First working dom renderer api tests
Part of #4767
2023-09-08 07:47:14 -07:00
Daniel Imms 66a6ecea14 Improve playwright debug logging 2023-09-08 07:46:45 -07:00
Daniel Imms f23af3661b wip 2023-09-08 07:28:41 -07:00
tisilent 2f233f2389 💄 2023-09-08 18:52:11 +08:00
tisilent 393a8b3a86 When DomRenderer blue,perform rendering. 2023-09-08 18:08:14 +08:00
tisilent c64115e0a0 Add handling of invisible 2023-09-08 17:34:03 +08:00
Per Bothner 427c472f6f Merge branch 'master' into clusters 2023-09-07 12:01:56 -07:00
Daniel Imms 2e02c37e52 Merge pull request #4756 from Tyriar/tyriar/5_3__2
Disable image addon publishing
2023-09-07 10:58:11 -07:00
Daniel Imms 71ee3c7a33 Disable image addon publishing 2023-09-07 10:57:21 -07:00
Daniel Imms 009add2b4a Merge pull request #4755 from Tyriar/tyriar/5_3
v5.3.0 and bump all addons
2023-09-07 10:54:11 -07:00
Daniel Imms fb4b662756 v5.3.0 and bump all addons 2023-09-07 10:46:35 -07:00
Daniel Imms c1882eb1ff Merge branch 'master' into es2021 2023-09-07 10:03:17 -07:00
Per Bothner 9963c58511 Two testing-related fixes 2023-09-07 09:49:37 -07:00
Daniel Imms 7b52b8ee45 Merge pull request #4754 from tisilent/DomRenderer-Focus-Cursor
When DomRenderer focus,render the cursor line.
2023-09-07 08:53:26 -07:00
tisilent c03cb2b016 When DomRenderer focus,render the cursor line. 2023-09-07 23:44:36 +08:00
Per Bothner 930e5c4280 Merge branch 'master' into clusters 2023-09-06 22:11:46 -07:00
Per Bothner 630d213bd0 Fix 2 comment typos. 2023-09-06 16:42:58 -07:00
Daniel Imms 82b6dd1ac8 Merge branch 'master' into es2021 2023-09-03 07:20:20 -07:00
Daniel Imms 29dd30a98d Merge pull request #4735 from Tyriar/playwright
Start @playwright/test migration
2023-09-03 07:19:20 -07:00
Daniel Imms 68c572345b Remove debugger statement 2023-09-02 09:19:17 -07:00
Daniel Imms 5e628d7fc6 Use arrow functions 2023-09-02 09:11:15 -07:00
Daniel Imms 93aae670ba Readme explaining test/api 2023-09-02 08:56:59 -07:00
Daniel Imms 7c7ac86681 Run inner pwsh to unzip on Winodws 2023-09-02 08:53:20 -07:00
Daniel Imms 076ab0f49b Combine unzip and ls -R 2023-09-02 08:44:32 -07:00
Daniel Imms 5fc1c04bd6 Use bash on all OS' 2023-09-02 08:41:59 -07:00
Daniel Imms 525d498e9f Fix unzip on Windows 2023-09-02 08:40:57 -07:00
Daniel Imms 2b5ebb2b7b Use unified unzip on unit tests 2023-09-02 08:33:01 -07:00
Daniel Imms 2269e92c88 Fix syntax 2023-09-02 08:30:51 -07:00
Daniel Imms 7c434a0566 Merge unzip steps 2023-09-02 08:30:14 -07:00
Daniel Imms 31bbeca2d8 Add webkit 2023-09-02 08:26:46 -07:00
Daniel Imms 158f7a17a6 Use list reporter 2023-09-02 08:26:42 -07:00
Daniel Imms 8d0fde2d7f Remove only 2023-09-02 08:22:56 -07:00
Daniel Imms 4cd4597082 Browser-specific playwright job 2023-09-02 08:19:59 -07:00
Daniel Imms 1624854bd7 Migrate Terminal api tests to playwright 2023-09-02 08:18:02 -07:00
Daniel Imms c099cb2a3d Add browser-specific npm scripts 2023-09-02 08:17:15 -07:00
Daniel Imms 1c57b98c9a Migrate InputHandler api tests to playwright 2023-09-02 07:19:32 -07:00
Daniel Imms a29ab32876 Migrate MouseTracking api tests to playwright 2023-09-02 07:10:47 -07:00
Daniel Imms 91456fff04 More proxy impl 2023-09-02 06:06:51 -07:00
Daniel Imms 13af55f9fc Add onWriteParsed event to proxy 2023-09-02 06:00:33 -07:00
Daniel Imms 66454d378b Add todos 2023-09-01 08:50:39 -07:00
Daniel Imms 92d09f2ea1 Clean up, fix errors, add todo 2023-09-01 08:50:03 -07:00
Daniel Imms fac5e5f02d Improve types of proxy object to extend base interfaces 2023-09-01 08:46:14 -07:00
Daniel Imms 4ed97cae3a Merge branch 'master' into playwright 2023-09-01 07:46:35 -07:00
Daniel Imms ceef536b79 Upgrade es6 -> es2021
This uses the recommended target for node 16 in tsconfig/bases.

Fixes #4706
2023-09-01 07:36:48 -07:00
YAYA 刘玉婷 7fa56fde0b Merge branch 'master' into underline-dotted 2023-09-01 14:12:01 +08:00
Daniel Imms 7bd9f8ee38 Revert image addon options type name 2023-08-28 02:52:03 -07:00
Daniel Imms 2dd4dfda80 Merge pull request #4729 from tisilent/circle-line-custom-powerline-glyph
Update circle line custom powerline glyph.
2023-08-28 02:28:41 -07:00
Daniel Imms f7ac0d878b Center new semi-circle line glyphs 2023-08-28 02:20:31 -07:00
Daniel Imms fe2723b585 Merge branch 'master' into circle-line-custom-powerline-glyph 2023-08-28 02:13:56 -07:00
tisilent 7fecec6599 Offset outward 2023-08-28 16:54:27 +08:00
Per Bothner 44e19775f5 Merge branch 'master' into clusters 2023-08-27 11:58:57 -07:00
Daniel Imms 5b25c65521 Migrate Parser tests to playwright/test 2023-08-27 09:11:47 -07:00
Daniel Imms cb977ab6b6 Remove CharWidth.test.ts from api (in playwright) 2023-08-27 09:03:55 -07:00
Daniel Imms 2b21f27ac2 Fix demo build script 2023-08-27 09:00:48 -07:00
Daniel Imms ec984d25db Install --with-deps 2023-08-27 08:56:40 -07:00
Daniel Imms 7000447915 Build demo step 2023-08-27 08:54:04 -07:00
Daniel Imms 486d61736b Start demo 2023-08-27 08:50:24 -07:00
Daniel Imms a4683ab874 dist -> /dist 2023-08-27 08:44:24 -07:00
Daniel Imms b26c53d7e2 Make client dist a build artifact 2023-08-27 08:28:23 -07:00
Daniel Imms 86b8744838 Install playwright deps 2023-08-27 08:22:54 -07:00
Daniel Imms 6f04e00ea1 Add test-playwright-parallel job 2023-08-27 08:16:53 -07:00
Daniel Imms 9eadaf7079 Feature detect WebAssembly instead 2023-08-27 08:10:58 -07:00
Daniel Imms fbebabe2e6 Add @playwright/test support 2023-08-27 08:08:52 -07:00
Daniel Imms 48184cc94f Merge pull request #4734 from xtermjs/coverage
Bring back unit test coverage report
2023-08-27 07:49:05 -07:00
Daniel Imms 923c28cb77 Use node 18 in coverage 2023-08-27 07:43:11 -07:00
Daniel Imms 03c1906f13 Have coverage depend on build 2023-08-27 07:33:46 -07:00
Daniel Imms 2b7b4d6fea Upgrade playwright 2023-08-27 07:31:20 -07:00
Daniel Imms abae7b6210 Merge pull request #4733 from Tyriar/mutable
Adopt MutableDisposable for most usages of pattern `<var>?.dispose(); <var> = undefined`
2023-08-27 07:29:02 -07:00
Daniel Imms 12a862c277 Bring back unit test coverage report 2023-08-27 07:28:04 -07:00
Daniel Imms 38c6af9b46 Fix _renderer access in api test 2023-08-27 07:22:08 -07:00
Daniel Imms 2eaa9b3b69 Fix remaining issues with MutableDisposable usage 2023-08-27 07:15:51 -07:00
Daniel Imms 37b0e4018c More adoption of MutableDisposable 2023-08-27 07:03:27 -07:00
Daniel Imms 57db72d287 More adoption of MutableDisposable 2023-08-27 06:55:16 -07:00
Daniel Imms ec02bab97c Use MutableDisposable in CursorRenderLayer 2023-08-27 06:46:49 -07:00
Daniel Imms 94ed3e800a Don't dispose of texture atlas in canvas addon
This would cause problems if the atlas is shared between multiple
terminals.
2023-08-27 06:44:48 -07:00
Daniel Imms 1e1ccba238 Use MutableDisposable in BaseRenderLayer 2023-08-27 06:44:11 -07:00
Daniel Imms a0d0c923f3 Merge pull request #4732 from Tyriar/texture_utilization
Improve texture atlas utilization and fix glyph corruption when merging
2023-08-26 15:46:52 -07:00
Daniel Imms aba16687b0 Fix high pressure texture atlas corruption
The corruption was caused by confusion with page indexes when
merging pages. The fix is to simplify it by deleting all pages
and then just adding the new page.

Fixes #4534
Fixes #4351
2023-08-26 10:23:09 -07:00
Daniel Imms 797a71695f Improve texture atlas utilization
- Changed the threshold at which pages start to merge from MAX/2 to
  MAX.
- If a glyph is about to create a new page that will be merged,
  check if the existing row fits when ignoring the row pixel
  threshold. This will improve texture utilization by using the
  available space before the page is merged and becomes static.
2023-08-26 09:37:08 -07:00
Daniel Imms 55c5a8560c Merge pull request #4727 from jerch/fix_4720
remove inwasm burden
2023-08-25 07:50:45 -07:00
tisilent 9e768a4c7c Update circle line custom powerline glyph. 2023-08-25 18:37:48 +08:00
tisilent 42d6c2bd6b Use hex 2023-08-25 14:37:03 +08:00
tisilent 810e62665f Clean 2023-08-25 14:30:34 +08:00
tisilent bec1642123 Modify variantOffset calculation logic 2023-08-25 14:17:36 +08:00
xie jialong 努力鸭andDaniel Imms 08f7b4c53c Update src/browser/renderer/shared/CellColorResolver.ts
Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
2023-08-25 10:34:31 +08:00
xie jialong 努力鸭andDaniel Imms d15abd7f28 Update src/browser/renderer/shared/CellColorResolver.ts
Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
2023-08-25 10:33:22 +08:00
jerch d367eb41d2 Merge branch 'master' into fix_4720 2023-08-24 17:32:08 +02:00
Jörg Breitbart 7c164efdcc fix CI scripts 2023-08-24 17:30:52 +02:00
Jörg Breitbart bd76cdbd20 resort wasm to xterm-wasm-parts 2023-08-24 17:24:25 +02:00
Per Bothner dc6dd6d2a8 Remove precedingCodepoint - use precedingJoinState instead
repeatPrecedingCharacter (for REP sequence) changed to look at
the grapheme cluser to the "left" in the BufferLine, and repeat that.
This is an extension of the xterm behavior, and changes the
semantics of REP, so is not fully compatible.
However, the new behavior is cleaner and saner.

Moved precedingJoinState property to EscapeSequenceParser.
2023-08-24 07:58:06 -07:00
Daniel Imms 40e51aba6b Merge pull request #4726 from Tyriar/no_confusing
Warn on eslint rule @typescript-eslint/no-confusing-void-expression
2023-08-24 06:41:18 -07:00
Daniel Imms f9dc26d413 Merge branch 'master' into no_confusing 2023-08-24 06:33:43 -07:00
Daniel Imms 2fe082beea Warn on eslint rule @typescript-eslint/no-confusing-void-expression 2023-08-24 06:33:11 -07:00
Daniel Imms 2835976b81 Merge pull request #4725 from Tyriar/no_useless_ctor
Warn on eslint rule @typescript-eslint/no-useless-constructor
2023-08-24 06:30:59 -07:00
Daniel Imms 1968e8ced4 Merge branch 'master' into no_useless_ctor 2023-08-24 06:24:54 -07:00
Daniel Imms 1965daff50 Warn on eslint rule @typescript-eslint/no-useless-constructor 2023-08-24 06:24:25 -07:00
Daniel Imms f4881872f7 Remove unused private prop 2023-08-24 06:12:56 -07:00
Daniel Imms f1f0191d98 Merge branch 'master' into underline-dotted 2023-08-24 06:02:48 -07:00
tisilent 6ace416224 Add license header 2023-08-24 15:55:24 +08:00
tisilent 52c87bc8b3 Add tests for computeVarinatOffset 2023-08-24 14:46:30 +08:00
tisilent edfacbb5c6 Adjusting the execution process 2023-08-24 11:54:18 +08:00
tisilent 564371eae7 Clean unused member 2023-08-24 11:38:51 +08:00
tisilent e09ed98cf1 Merge branch 'underline-dotted' of https://github.com/tisilent/xterm.js into underline-dotted 2023-08-24 11:05:05 +08:00
tisilent 2b0106f7e2 Logic move to CellColorResolver 2023-08-24 10:57:05 +08:00
Daniel Imms 0e3db591c0 Merge pull request #4724 from Tyriar/webpack_eslint
@ts-check webpack files, fix vscode language of eslint file
2023-08-23 16:50:23 -07:00
Daniel Imms 224902af9f Merge branch 'master' into webpack_eslint 2023-08-23 16:37:37 -07:00
Daniel Imms 131f578367 Merge pull request #4723 from Tyriar/demo_tscheck
Use ts-check in server and start
2023-08-23 16:37:29 -07:00
Daniel Imms 6b794285c6 Remove esbuild
Accidentally added
2023-08-23 16:32:22 -07:00
Daniel Imms e78f85bf65 ts-check webpack configs 2023-08-23 16:29:45 -07:00
Daniel Imms 9be0b6d918 Force eslintrc to use jsonc language 2023-08-23 16:29:38 -07:00
Daniel Imms 3aa31111de Merge branch 'master' into demo_tscheck 2023-08-23 16:26:07 -07:00
Daniel Imms 81baad6acd Prefer const 2023-08-23 16:26:00 -07:00
Daniel Imms 25ef47a78f Use express-ws types 2023-08-23 16:25:15 -07:00
Daniel Imms 7d7d593fee Merge pull request #4722 from Tyriar/client_warnings
Fix demo client.ts warnings
2023-08-23 16:22:28 -07:00
Daniel Imms 766ffde4ca Merge pull request #4721 from Tyriar/complex_options
Fix demo warnings by adding complex options
2023-08-23 16:22:20 -07:00
Daniel Imms 4534b56c1f Use ts-check in server and start 2023-08-23 16:20:55 -07:00
Daniel Imms ee0da5e4c1 Fix demo client.ts warnings 2023-08-23 16:03:25 -07:00
Daniel Imms e5d60c0895 Fix demo warnings by adding complex options 2023-08-23 16:00:16 -07:00
Daniel Imms 5ccf4d3311 Merge remote-tracking branch 'upstream/master' into pr/PerBothner/4519-1 2023-08-23 05:09:42 -07:00
Daniel Imms 1f3143cfab Remove unused member 2023-08-23 05:07:44 -07:00
Daniel Imms f5d128b0d5 Merge remote-tracking branch 'upstream/master' into pr/tisilent/4703 2023-08-23 05:02:07 -07:00
Daniel Imms 2268ae3967 Merge pull request #4718 from Tyriar/no_unused
Add no unused variables lint warning
2023-08-23 04:57:55 -07:00
Daniel Imms 921da1a2ea Ignore no-unused-vars in .api, organize all remaining imports 2023-08-23 04:47:53 -07:00
Daniel Imms ebd4092bee Ignore no-unused-vars in args 2023-08-23 04:42:44 -07:00
Daniel Imms b6fd7a2b93 Ignore no-unused-vars in test files 2023-08-23 04:42:21 -07:00
Daniel Imms 210ba8109c Add no unused variables lint warning
This shows a warning while compiling, so demo bundling will still happen but
it will be rejected when a PR is made.
2023-08-23 04:34:55 -07:00
tisilent 25afc19895 Merge branch 'underline-dotted' of https://github.com/tisilent/xterm.js into underline-dotted 2023-08-23 09:33:20 +08:00
Daniel Imms 68ded1a5b4 Merge branch 'master' into underline-dotted 2023-08-22 07:47:42 -07:00
Daniel Imms 317ccdac66 Merge pull request #4716 from xtermjs/Tyriar-patch-1
Fix typo in ci.yml
2023-08-22 07:33:02 -07:00
Daniel Imms 43a3251bee Fix typo in ci.yml 2023-08-22 07:32:51 -07:00
Daniel Imms 94ab56542f Merge pull request #4715 from Tyriar/waiton
Parallelize required tests and build jobs
2023-08-22 07:31:25 -07:00
Daniel Imms 92f1881dfe Polish job names
This matches the npm script names closer
2023-08-22 07:21:27 -07:00
Daniel Imms ec4c018f73 Remove windows from fast 2023-08-22 07:15:02 -07:00
Daniel Imms 2c25dd1970 Fix invalid names 2023-08-22 07:14:11 -07:00
Daniel Imms 06fbe69b09 Split out integration tests too 2023-08-22 07:05:55 -07:00
Daniel Imms 4bd154e7dc Split fast and slow unit tests to free agents 2023-08-22 07:04:12 -07:00
Daniel Imms 516756fad8 Fix install step 2023-08-22 07:01:27 -07:00
Daniel Imms 2b3cfb39a1 Merge branch 'master' into waiton 2023-08-22 06:58:01 -07:00
Daniel Imms e9cbb3e547 Add job name 2023-08-22 06:57:20 -07:00
Daniel Imms 1744801867 Try parallelize tests and build 2023-08-22 06:52:57 -07:00
Daniel Imms 64cb9a3c62 Merge pull request #4714 from Tyriar/4713
Don't smooth scroll when it's a no-op
2023-08-22 06:49:52 -07:00
Daniel Imms 0e947788e0 Don't smooth scroll when it's a no-op
Fixes #4713
2023-08-22 06:39:59 -07:00
Daniel Imms 60b59db94f Merge pull request #4709 from Tyriar/tyriar/logger
Fix error that can occur when loading canvas addon
2023-08-22 06:27:06 -07:00
Daniel Imms 6d7032a906 Merge pull request #4710 from Tyriar/4704
Move addon install to presetup
2023-08-22 06:23:10 -07:00
Daniel Imms b452fc9e85 Merge pull request #4712 from Tyriar/timeout
Put reasonable GH action timeouts in place
2023-08-22 06:22:55 -07:00
Daniel Imms dac4dec0ad Put reasonable GH action timeouts in place
Fixes #4711
2023-08-22 06:13:52 -07:00
Daniel Imms eae79e93f3 Install addons in CI 2023-08-22 06:11:54 -07:00
Daniel Imms ee33765932 Move addon install to presetup
Fixes #4704
2023-08-22 06:04:33 -07:00
Daniel Imms 8af83fef85 Fix error that can occur when loading canvas addon 2023-08-22 06:00:44 -07:00
tisilent 5f0647f0ab clean 2023-08-22 09:35:12 +08:00
tisilent fe7f17f422 clean 2023-08-22 09:26:01 +08:00
Per Bothner e5a2ebda0e Provide with "15" and "15-graphemes" UnicodeProviders
Th former doesn't support grapheme clusters, except the old-fashioned
kind of simple modifiers.  However, "15-graphemes" (with full
cluster support) is the default.
2023-08-21 13:03:06 -07:00
Per Bothner 2204375788 Merge branch 'master' into clusters 2023-08-21 07:59:15 -07:00
tisilent c81dfee43c Using ext to store variants. 2023-08-21 20:54:16 +08:00
tisilent cb175e513d Variants to Canvas. 2023-08-21 19:45:38 +08:00
tisilent 32da1d81d5 Use variants for underline dotted.
webgl
2023-08-21 19:09:02 +08:00
Daniel Imms 6f0a5c9f0c Merge pull request #4695 from PerBothner/demo
demo: auto-resize and other tweaks
2023-08-20 09:31:06 -07:00
Daniel Imms 1529e0bf04 Remove unused variable 2023-08-20 07:33:15 -07:00
Daniel Imms 6021e6cf81 Merge branch 'master' into demo 2023-08-20 07:29:31 -07:00
Daniel Imms 427d33c7b7 Merge pull request #4700 from Tyriar/ci_concise
Make GH actions strategy more concise
2023-08-19 15:41:37 -07:00
Daniel Imms 95f332cb13 Merge pull request #4699 from Tyriar/slow_tests
Improve slow tests
2023-08-19 15:34:08 -07:00
Daniel Imms db4567599b Make GH actions strategy more concise 2023-08-19 15:28:44 -07:00
Daniel Imms 0667c7aedd Merge pull request #4698 from Tyriar/codeql
Revert codeql file name change
2023-08-19 15:22:46 -07:00
Daniel Imms 1c5596de66 Split up Base64Decoder decoding tests
Fixes #4696
2023-08-19 15:21:42 -07:00
Daniel Imms 905707284d Up parser unti test timeout 10s -> 30s 2023-08-19 15:18:44 -07:00
Daniel Imms 67f46a54b8 Split up StringToUtf32 decoder tests
Part of #4696
2023-08-19 15:17:11 -07:00
Daniel Imms b8db3853f1 Merge pull request #4697 from xtermjs/Tyriar-patch-1
Remove Azure Pipelines badge
2023-08-19 15:07:15 -07:00
Daniel Imms a9015c0ee6 Revert codeql file name change 2023-08-19 15:05:32 -07:00
Daniel Imms 60db1e7f82 Remove Azure Pipelines badge 2023-08-19 14:57:25 -07:00
Daniel Imms 6dae811dae Migrate to GitHub Actions
Fixes #3297
2023-08-19 14:47:35 -07:00
Per Bothner a20599efb4 Merge branch 'master' into demo 2023-08-19 09:15:30 -07:00
jerch 27b8d73f66 Merge pull request #4694 from jerch/fix_bce_demo
fix spaces in bce demo
2023-08-19 17:43:36 +02:00
Per Bothner 025e8505d5 implement autoResize for terminal in demo
This is optional (but the default): You can still explicitly set COLSxROWS,
but "auto" uses a ResizeObserver sets the size based on window size.
2023-08-19 08:28:43 -07:00
Jörg Breitbart 16f5900252 fix spaces in demo 2023-08-19 17:28:27 +02:00
Per Bothner e2d699cb32 Styling tweaks for demo
* Make terminal take 2/3 of the width, and the options etc get 1/3
* Remove options height limit, which could lead to annoying nested
  verical scroll regions.  (An inner region for the options inside a
  scrollable viewport.)
2023-08-19 08:23:31 -07:00
Daniel Imms 156f75628a Merge pull request #4692 from Tyriar/2117
Stub out all CSI api tests
2023-08-19 06:25:57 -07:00
Daniel Imms 8fad65d1d5 Stub out all CSI tests
Part of #2117
2023-08-19 06:11:29 -07:00
Daniel Imms 0867804504 Prefer arrow function 2023-08-19 05:33:49 -07:00
Daniel Imms f0900fdc5f Tweak format of CSI test names to make it easier to see terminating char 2023-08-19 05:32:41 -07:00
Daniel Imms 0be744b567 Merge pull request #4691 from Tyriar/4690
Improve lifecycle of WebLinksAddon.api, test all country tlds
2023-08-19 05:22:14 -07:00
Daniel Imms 243b0bb626 Add all country tlds to tests 2023-08-19 05:07:41 -07:00
Daniel Imms 0b32b42134 Improve lifecycle of WebLinksAddon.api
Part of #4690
2023-08-19 05:00:45 -07:00
Daniel Imms ef1cd4318b Merge pull request #4688 from Tyriar/cursor_style
Simplify cursor style types in webgl
2023-08-19 04:51:15 -07:00
Per Bothner 6e39d03a52 Some html/css cleanps in demo
* id="grid" should be id="class" (since "grid" is not unique in the document).
* Remove space after 'id=' (multiple places).
* Group 3 texture-atlas elements in new <div class="texture-atlas-container">.
2023-08-18 16:30:36 -07:00
Daniel Imms e21e52569c Merge branch 'master' into clusters 2023-08-18 15:20:02 -07:00
Daniel Imms 7b7dbd36d6 Merge pull request #4689 from Tyriar/4685
Track CursorBlinkStateManager in MutableDisposable
2023-08-18 14:38:05 -07:00
Daniel Imms d03b5c9481 Track CursorBlinkStateManager in MutableDisposable
Fixes #4685
2023-08-18 14:26:56 -07:00
Daniel Imms 93e060aeb2 Add MutableDisposable tests 2023-08-18 14:24:50 -07:00
Per Bothner 00fd2b8503 Set unicode.activeVersion when loading UnicodeGraphemeProvider. 2023-08-18 14:17:39 -07:00
Daniel Imms a84351ad0c Add MutableDisposable
Part of #4685
2023-08-18 14:15:56 -07:00
Daniel Imms 25a78c77f2 Simplify cursor style types in webgl
Fixes #4686
2023-08-18 14:11:17 -07:00
Daniel Imms a35fa611ff Merge pull request #4687 from Tyriar/tracing
Add trace log level, @traceCall decorator and use in webgl
2023-08-18 11:14:52 -07:00
Daniel Imms 0b54c9a5d6 Add trace log level, traceCall decorator and use in webgl
- New 'trace' log level in the API, you should expect very spammy logs when
  trace is on and filter them down. As opposed to 'debug' which should be more
  readable.
- traceCall decorator logs the args and return value of the decorated method.
  Wecan use this on key functions in various parts of the code to assist
  debugging issues that are hard to reproduce such as #4665.
- Decorated a few webgl render methods for #4665.
- There's an early exit in traceCall when not on the trace log level so the
  runtime impact when not in trace is negligable.

Part of #4665
2023-08-18 11:04:23 -07:00
Per Bothner 21fd545381 Don't load unicode11 addon on demo startup. 2023-08-18 08:46:33 -07:00
Per Bothner 6c1eb97a18 Remove no-longer-applicable comment. 2023-08-17 14:53:23 -07:00
Per Bothner 2070cc45d4 Merge branch 'master' into clusters 2023-08-17 13:29:22 -07:00
Per Bothner f1bc95622d Add more grapheme-cluster examples to test and demo 2023-08-17 13:23:10 -07:00
Daniel Imms 3b3b23a2fd Merge pull request #4683 from Tyriar/tyriar/minor_cleanup
Remove unneeded comments, headless options
2023-08-17 09:25:31 -07:00
Per Bothner e3d3cdb9d2 Merge branch 'master' into clusters 2023-08-17 09:17:14 -07:00
Daniel Imms 7b874473d3 Remove unneeded comments, headless options 2023-08-17 09:10:38 -07:00
Daniel Imms 9d7b9293eb Merge pull request #4681 from PerBothner/dom-selection
Fix bug in selection handling in dom renderer
2023-08-17 09:01:12 -07:00
Per Bothner 957e3e0f08 Fix bug in selection handling in dom renderer 2023-08-16 15:34:35 -07:00
Per Bothner 5994e25841 Merge branch 'master' into clusters 2023-08-15 09:20:47 -07:00
Daniel Imms 2f0a7eee8d Merge pull request #4679 from Tyriar/4663
Reduce repetition with internal terminal types and inherit docs from API
2023-08-15 08:49:40 -07:00
Daniel Imms 1a3e14a24c Merge pull request #4680 from Tyriar/crash
Revert Stylesheet change
2023-08-15 08:49:05 -07:00
Daniel Imms a6b67fb8a6 Remove unused headless types file 2023-08-15 08:39:20 -07:00
Daniel Imms 843bdc4d55 Revert "Merge pull request #4611 from SimonSiefke/constructed-stylesheets"
This reverts commit 5889344dd2, reversing
changes made to 679c149164.
2023-08-15 08:33:42 -07:00
Daniel Imms 2aee19f0e1 Revert "Workaround crash that can happen in Electron/Chromium"
This reverts commit 2ca0ccbe0c.
2023-08-15 08:31:34 -07:00
Daniel Imms 9f3be5e28d Simplify terminal interfaces
Fixes #4663
2023-08-15 07:49:31 -07:00
Daniel Imms f69f803f0f Implement public APIs internally to inherit docs
Part of #4663
2023-08-15 07:46:51 -07:00
Daniel Imms 2eca26b210 Merge pull request #4678 from Tyriar/vscode189753
Workaround crash that can happen in Electron/Chromium
2023-08-15 07:01:28 -07:00
Daniel Imms 2ca0ccbe0c Workaround crash that can happen in Electron/Chromium
Part of microsoft/vscode#189753
2023-08-15 06:46:35 -07:00
Per Bothner cf243adfe3 Merge branch 'master' into clusters 2023-08-14 12:22:55 -07:00
Daniel Imms c908eeed5c Merge pull request #4667 from Dennnnny/fix-transparent-foreground-color
Fix transparent foreground color
2023-08-14 12:11:04 -07:00
Daniel Imms caa1223e5c Merge pull request #4677 from Tyriar/fix_headless
Fix headless types regression
2023-08-14 07:18:50 -07:00
Daniel Imms 62cf3d39e1 Fix headless types regression
From the API lint PR
2023-08-14 07:15:20 -07:00
Daniel Imms 2437b68d5d Merge pull request #4676 from Tyriar/4097_2
Remove redundant condition
2023-08-14 06:01:07 -07:00
Daniel Imms 09fc798e80 Remove redundant condition
Part of #4097
2023-08-14 05:47:25 -07:00
Daniel Imms 7ae6febedc Merge pull request #4673 from Tyriar/4097
DOM: Render selection color instead of cell bg
2023-08-14 05:34:14 -07:00
Daniel Imms 39ae0f45fd Fix selectionForeground dom tests 2023-08-14 04:43:55 -07:00
dennnnny 855e911398 Fix transparent foreground color 2023-08-14 09:49:18 +08:00
Daniel Imms 73a77cda3d DOM: Render selection color instead of cell bg
Summary:

- Selection cell reuse has been added to the DOM renderer
- Selection bg override is now correctly set correctly
- Selection elements 'pretend' to be a decoration in order to render bg

Fixes #4097
2023-08-13 13:56:51 -07:00
Daniel Imms 6c9346011d Merge pull request #4672 from Tyriar/4262
Enforce half minimum contrast ratio for dim text
2023-08-13 13:14:45 -07:00
Daniel Imms 28c4732abc Fix ThemeService.ctor test 2023-08-13 13:04:40 -07:00
Daniel Imms 1cef30cca0 Enforce half minimum contrast ratio for dim text
Provided MCR is not too high, this ensures dim text differs from normal
text and has a reasonable difference in contrast.

Fixes #4262
2023-08-13 11:27:57 -07:00
Daniel Imms af787e1c85 Merge pull request #4671 from Tyriar/4652
Fix SortedList.values iteration and general dec lifecycle fixes
2023-08-13 10:53:20 -07:00
Daniel Imms 70f6fa2bc9 Fix SortedList.values iteration and general dec lifecycle fixes
Fixes #4652
2023-08-13 10:42:45 -07:00
dennnnny bef87403db Fix force transparent foreground colors to be opaque 2023-08-13 17:52:49 +08:00
Daniel Imms 5890029f71 Merge pull request #4669 from Tyriar/api_lint
Lint API .d.ts files
2023-08-12 10:32:53 -07:00
Daniel Imms 1f4fe0a8c0 Lint API .d.ts files
Similar to #4668, this brings linting to the API files with a cut down
set of rules. One of the bigger ones is comment length is restricted to 80,
this was done as opposed to 100 for regular code to reduce the chance of
wrapping or API going off screen regardless of resolution or window/browser
size
2023-08-12 09:33:35 -07:00
Daniel Imms 519f6a3d4a Merge pull request #4668 from Tyriar/comment_lint
Restrict comments to 100 characters
2023-08-12 09:18:14 -07:00
Daniel Imms 530f758905 Restrict comments to 100 characters
This is a rule I try enforce in PR but it's a bit of a hassle, this will
give a lint warning when it happens resulting in:

- Yellow underline in supported editors when eslint is installed
- Compilation will succeed since it's a warning not an error
- CI will fail as it does not allow lint warnings

Special case comments are ignored which includes @vt comments, table
comments and commented out code.
2023-08-12 09:04:41 -07:00
dennnnny fb7349bc87 Fix transparent foreground color 2023-08-12 08:39:39 +08:00
Daniel Imms dc390ab03a Merge pull request #4657 from tisilent/add-cursorInactiveStyle-option
Add cursorInactiveStyle option
2023-08-11 13:16:51 -07:00
Daniel Imms 6f6cc6a686 Remove string mapping, improve types, standardize on 'outline' 2023-08-11 13:09:31 -07:00
Daniel Imms 136e2f2afe Improve API wording 2023-08-11 13:07:04 -07:00
Daniel Imms 73bb72dbcf Merge pull request #4666 from Tyriar/nvm
Add nvmrc using node 16
2023-08-11 10:03:41 -07:00
Daniel Imms 4b2f774f53 Merge pull request #4664 from tisilent/fix-canvas-underline-cutoff
Fix canvas underline is cut off.
2023-08-11 10:01:28 -07:00
Daniel Imms 0a4151fbfa Add nvmrc using node 16
node-pty doesn't seem to work 18 yet and VS Code has moved over to be based
on 18 so that's my main (don't ask me why it's working there but not in this
repo)
2023-08-11 09:52:15 -07:00
Daniel Imms 07d187151e Update src/browser/renderer/shared/TextureAtlas.ts 2023-08-11 09:50:22 -07:00
Daniel Imms 47f606f0df Merge pull request #4662 from Tyriar/inwasm
Add functional yarn wasm
2023-08-11 05:09:25 -07:00
Daniel Imms 18125dad84 Add functional yarn wasm
This is what I tried after seeing the error so it will improve the #4646
experience until a real fix is in place

Part of #4646
2023-08-11 04:58:07 -07:00
tisilent f317b96262 Fix canvas underline is cut off. 2023-08-11 17:58:29 +08:00
tisilent c3d8c2a919 Update test and fix 2023-08-11 15:47:50 +08:00
tisilent 5c1e6dce99 Add block to cursorInactiveStyle,
change line to bar
2023-08-11 11:36:40 +08:00
tisilent 0321bcb715 Remove special classes.
Add xterm-cursor-outline class.
2023-08-11 09:40:06 +08:00
Per Bothner aac5d4704e Merge branch 'master' into clusters 2023-08-10 12:24:51 -07:00
Per Bothner fb2c6801d4 Replace comments by assert message in unicode-graphemes tests
Also use plain equal instead of deepEqual (overkill).
2023-08-10 11:39:47 -07:00
Daniel Imms bb5d61fb14 Merge pull request #4659 from SvanT/dispose-blink-state-manager
Dispose blink state manager
2023-08-10 10:27:24 -07:00
Svante Boberg 3b3012353f Use disposable registration 2023-08-10 19:04:20 +02:00
Svante Boberg adad53d526 Dispose blink state manager 2023-08-10 18:47:04 +02:00
jerch 9b21786062 Merge branch 'master' into clusters 2023-08-10 18:31:04 +02:00
Daniel Imms 1b4460e37d Merge pull request #4655 from Tyriar/tyriar/4645
Fix API facade memory leaks
2023-08-10 07:29:14 -07:00
tisilent 482dad3036 Add cursorInactiveStyle option 2023-08-10 16:11:04 +08:00
Daniel Imms 7276027861 Merge pull request #4651 from jerch/fix_4642
fix decorations on DOM renderer
2023-08-09 16:08:23 -07:00
Daniel Imms 62055522fb Fix API facade memory leaks
We need to register/dispose any event created in the facades, otherwise
embedders need to dispose of the listeners manually.

Fixes #4645
2023-08-09 15:55:31 -07:00
jerch 0366aa2217 Merge branch 'master' into fix_4642 2023-08-10 00:24:03 +02:00
Jörg Breitbart 2b79b7b29f faster SortedList._search 2023-08-10 00:12:00 +02:00
Per Bothner 3bfe5d86c0 Add testOptions parameter to openTerminal in TestUtils.
This is used to control whether the UnicodeGraphemesAddon is loaded.
2023-08-09 14:44:45 -07:00
Daniel Imms 02243173c2 Merge pull request #4648 from tisilent/fix-double-underline
fix double underline, upwards
2023-08-09 06:45:03 -07:00
Jörg Breitbart a84a95055d exclude decorated cells from merging 2023-08-09 14:20:08 +02:00
tisilent b8bf35be17 Add restrictToCellHeight,Restore abnormal format 2023-08-09 11:53:30 +08:00
Per Bothner b9a4760b44 Move files imported from unicode-properties into subdirectory
Specifically  addons/xterm-addon-unicode-graphemes/src/third-party/.
2023-08-08 18:32:37 -07:00
tisilent 3ba579f680 fix double underline, upwards 2023-08-08 18:36:44 +08:00
Per Bothner 302da18c81 Rename local variable precedingInfo in InputHandler to precedingJoinState 2023-08-07 13:08:35 -07:00
Per Bothner 4fbc623706 Expand doc comments for UnicodeCharProperties and UnicodeCharWidth. 2023-08-07 11:55:52 -07:00
Per Bothner b9abbc0a85 Split complicated conditional expression. 2023-08-07 11:10:06 -07:00
Per Bothner f1035405e6 Move precedingJoinState from EscapeSequenceParser to InputHandler
This allows InputHandler._parser to be IEscapeSequenceParser
rather than EscapeSequenceParser.
2023-08-06 12:44:43 -07:00
Per Bothner 720297946b Changed xterm-addon-unicode-graphemes version number to 0.1.0. 2023-08-06 11:53:11 -07:00
Per Bothner 988b3b1ab2 Remove tailing space. 2023-08-06 11:52:39 -07:00
Per Bothner 88bfc6bb2b Tweak charProperties doc comment. 2023-08-06 08:28:08 -07:00
Per Bothner a0dc88165f Fix copyright year in new file. 2023-08-06 08:20:52 -07:00
Per Bothner dccfc11b4f Tweak to avoid line-ending spaces.
Line-ending spaces were unintentionally removed - this avoids the problem,
2023-08-06 08:19:14 -07:00
Per Bothner 42042155d4 Merge branch 'master' into clusters 2023-08-03 22:30:46 -07:00
Per Bothner 6b2459317b Null out following columns after grapheme cluster 2023-08-03 22:29:36 -07:00
Daniel Imms 08a0914a78 Add grapheme cluster test button to demo 2023-08-02 11:59:30 -07:00
Daniel Imms 4f41070b45 Merge pull request #4638 from Tyriar/4603
Fix reset and clear leaving viewport in a bad state
2023-08-02 11:55:14 -07:00
Daniel Imms d2031955ec Remove error from MockViewport.reset 2023-08-02 11:42:40 -07:00
Daniel Imms 7baff4e249 Merge branch 'master' into clusters 2023-08-02 11:41:22 -07:00
Daniel Imms 91c08ed48e Fix clear leaving viewport in a bad state
Fixes #4603
2023-08-02 11:30:43 -07:00
Daniel Imms acf53f69e0 Ensure viewport is correctly reset on term.reset
Part of #4603
2023-08-02 11:18:00 -07:00
Daniel Imms bb237f109a Merge pull request #4637 from meganrogge/merogge/fix-acc-tree
fix a11y tree
2023-08-02 08:30:06 -07:00
meganrogge 44d4ec83fc revert change 2023-08-02 08:17:18 -07:00
meganrogge 33124a31bd fix #4571 2023-08-02 08:14:16 -07:00
Daniel Imms 1e90aab2a6 Merge pull request #4636 from Tyriar/4588
Add ignoreBracketedPasteMode option
2023-08-01 14:40:39 -07:00
Daniel Imms 44ced27bee Add ignoreBracketedPasteMode option
Fixes #4588
2023-08-01 13:58:52 -07:00
Daniel Imms c3def09c38 Merge pull request #4631 from jerch/missing_image_changes
image addon fixes
2023-08-01 12:38:59 -07:00
Daniel Imms afff339d28 Merge pull request #4605 from jerch/faster_dom
Faster DOM renderer
2023-08-01 12:32:56 -07:00
Jörg Breitbart b7a597f925 use offsetWidth for measuring 2023-08-01 19:53:41 +02:00
Jörg Breitbart ae84ee39f3 Merge branch 'master' into faster_dom 2023-08-01 19:21:30 +02:00
jerch 73e60586c9 Merge pull request #4584 from dlech/fix-underline-style
use border-bottom instead of box-shadow for underline cursor in DOM renderer
2023-08-01 19:15:41 +02:00
Jörg Breitbart b56bc77dcc make font variant positions explicit with const enum 2023-08-01 18:35:48 +02:00
Jörg Breitbart 32a852c0bf remove private binding of document in width cache ctor 2023-08-01 18:30:06 +02:00
Jörg Breitbart 40e622dfc8 change comment format 2023-08-01 18:29:00 +02:00
Jörg Breitbart 994861a6fa change repeat variable to const enum 2023-08-01 18:25:29 +02:00
Jörg Breitbart b770431102 Merge branch 'master' into faster_dom 2023-08-01 18:18:31 +02:00
Jörg Breitbart 2fd108c864 Merge branch 'missing_image_changes' of github.com:jerch/xterm.js into missing_image_changes 2023-08-01 18:12:50 +02:00
Jörg Breitbart 914f7be644 add image addon to publish 2023-08-01 18:11:03 +02:00
jerch 1fdb8c006d Merge branch 'master' into missing_image_changes 2023-08-01 17:42:34 +02:00
Daniel Imms b46404b139 Merge pull request #4568 from xzfc/webgl-cursor
Render the cursor in the WebGL canvas
2023-08-01 08:41:16 -07:00
Daniel Imms 1dfd14fbc0 Fix canvas count test 2023-08-01 08:28:59 -07:00
Jörg Breitbart a1ddc629dc make tests less data intensive 2023-08-01 17:26:02 +02:00
Daniel Imms 9cfc2c881c Merge pull request #4626 from Tyriar/tyriar/light_cursor
Fix demo light theme cursor colors
2023-08-01 08:08:29 -07:00
Jörg Breitbart b7f9db69ca update readme 2023-08-01 16:51:56 +02:00
Daniel Imms 60eb4f3385 Create ICursorRenderModel 2023-08-01 07:47:27 -07:00
Daniel Imms 41e97ec042 Always render cursor even if model didn't change
This ensures underline/bar cursors get rendered
2023-08-01 07:43:27 -07:00
Jörg Breitbart fe838726b0 transfer changes from 0.4.3 2023-08-01 16:43:14 +02:00
Daniel Imms 1cfce3d0b6 Fix demo light theme cursor colors 2023-08-01 06:37:00 -07:00
Daniel Imms f64cb1566d Correctly apply cursor colors in new renderer 2023-08-01 06:31:58 -07:00
Daniel Imms 9b204c012a Remove bad logs 2023-08-01 06:19:54 -07:00
Daniel Imms 6b33ac1e85 Share cursor blink state manager between canvas and webgl
This also focused the manager's creation on renderer start up, to ensure blink
works immediately.
2023-08-01 06:13:21 -07:00
Daniel Imms 18e578bd09 Merge branch 'master' into webgl-cursor 2023-08-01 05:53:45 -07:00
Daniel Imms e8a925b6af Merge pull request #4583 from jerch/fix_mouse_tracking
fix mouse tracking behavior
2023-08-01 05:50:20 -07:00
Daniel Imms db6e0cd2ef Merge pull request #4482 from tisilent/#4121
Add smoothScroll to scrollLines
2023-08-01 05:48:26 -07:00
Daniel Imms f6738ec354 Merge pull request #4577 from jerch/image_addon
move image addon to base repo
2023-08-01 05:40:48 -07:00
Daniel Imms 1067ec19a8 Implement smooth scroll for pages/top/bottom, add viewport request event 2023-08-01 05:31:30 -07:00
Daniel Imms e7a7842808 Use viewport source in tests 2023-08-01 05:11:19 -07:00
Daniel Imms ce3bb35c8c Merge pull request #4366 from arekouzounian/master
Fix for #2488. Use element offsetHeight rather than getBoundingRect
2023-08-01 05:05:42 -07:00
Daniel Imms 2d7b531bba Merge branch 'master' into #4121 2023-08-01 04:58:36 -07:00
Daniel Imms 2d81490ac4 Merge pull request #4387 from LabhanshAgrawal/ligatures-electron
Enable ligatures addon on electron
2023-08-01 04:57:16 -07:00
Daniel Imms 5939d72d8f Merge branch 'master' into master 2023-08-01 04:54:05 -07:00
Daniel Imms d1bd4973ad Merge pull request #4348 from silamon/ansiheadlessretry
SerializeAsHTML(): Fallback to default ansi colors when running headless terminal
2023-08-01 04:52:43 -07:00
Jörg Breitbart f407f0c5a6 unit tests 2023-07-31 21:24:39 +02:00
Jörg Breitbart 40eccfa61a Merge branch 'faster_dom' of github.com:jerch/xterm.js into faster_dom 2023-07-31 20:07:56 +02:00
Jörg Breitbart c79aa542c9 cache optimizations 2023-07-31 20:07:40 +02:00
jerch 366ffedf08 Merge branch 'master' into faster_dom 2023-07-31 18:01:16 +02:00
Jörg Breitbart c796514de8 apply weight settings in width cache 2023-07-31 16:49:58 +02:00
Jörg Breitbart e75ec5b51f revert changes to selection service 2023-07-31 16:09:44 +02:00
Jörg Breitbart 702c3578a3 re-add explicit span stylesheet 2023-07-30 19:03:54 +02:00
Jörg Breitbart 0eecf8187d Merge branch 'faster_dom' of github.com:jerch/xterm.js into faster_dom 2023-07-30 18:46:49 +02:00
Jörg Breitbart e9058b7498 implement default letter spacing 2023-07-30 18:46:33 +02:00
Daniel Imms 25b266e809 Merge pull request #4618 from Tyriar/4614_color_index
Add IntRange type for ColorIndex
2023-07-30 07:04:14 -07:00
Daniel Imms 2e638598e4 Simplify condition 2023-07-30 06:55:45 -07:00
jerch 8562635231 Merge branch 'master' into faster_dom 2023-07-30 13:37:45 +02:00
Jörg Breitbart b358754b46 respect dpr/charWidth changes, more accurate base measuring 2023-07-30 13:27:28 +02:00
Jörg Breitbart 64d04f0712 optimization: remove document fragment 2023-07-29 23:58:15 +02:00
Daniel Imms ebdafe54aa Merge pull request #4619 from Tyriar/tyriar/4611_2
Avoid using global document, add copyright
2023-07-29 14:50:50 -07:00
Daniel Imms 829ecac8e3 Merge branch 'master' into image_addon 2023-07-29 14:43:46 -07:00
Daniel Imms d22e3e093a Fix compile 2023-07-29 14:42:05 -07:00
Daniel Imms a9662e8b7b Avoid using global document, add copyright
Fixes #4611
2023-07-29 14:38:56 -07:00
Jörg Breitbart 5f98db9b76 re-enable failing test 2023-07-29 18:26:31 +02:00
Jörg Breitbart 664a110fd1 Merge branch 'master' into faster_dom 2023-07-29 18:07:47 +02:00
Jörg Breitbart 3b5044b55b readd doc notes on link underline handling 2023-07-29 17:54:14 +02:00
Jörg Breitbart e848151b50 change to width cache 2023-07-29 17:25:49 +02:00
Jörg Breitbart 91197bd1aa disable font kerning 2023-07-29 15:37:01 +02:00
Jörg Breitbart d1fdaa17d6 apply font variant, some cleanup 2023-07-29 14:16:47 +02:00
Daniel Imms 5660c404f0 Differentiate special color indexes and others 2023-07-28 16:32:05 -07:00
Daniel Imms 79c1fff853 Add IntRange type for ColorIndex
Fixes #4614
2023-07-28 13:51:46 -07:00
Daniel Imms 962c070a75 Merge branch 'master' into webgl-cursor 2023-07-28 13:42:47 -07:00
Jörg Breitbart 5bdd5022b2 some cleanup, use faster str join for classes 2023-07-28 19:33:38 +02:00
Jörg Breitbart 370bad1380 better caching:
- own cache class with flat and holey cache
- use letter spacing
- on-demand measuring
2023-07-28 18:36:01 +02:00
Daniel Imms 17b8247c3d Merge pull request #4617 from xtermjs/Tyriar-patch-1
Mention discussions in CONTRIBUTING.md
2023-07-28 07:44:13 -07:00
Daniel Imms c0d1dec847 Mention discussions in CONTRIBUTING.md 2023-07-28 07:33:35 -07:00
Daniel Imms 5889344dd2 Merge pull request #4611 from SimonSiefke/constructed-stylesheets
feature: use constructed style sheets for dom render so that it works with csp style-src 'self'
2023-07-27 12:45:31 -07:00
Simon Siefke 5f80fe00d5 fix: use replacesync instead of replace 2023-07-27 18:33:30 +02:00
Simon Siefke b225b9a710 fix eslint 2023-07-27 17:39:15 +02:00
Daniel Imms 72c51b19a5 Merge branch 'master' into constructed-stylesheets 2023-07-27 08:28:24 -07:00
Daniel Imms 679c149164 Merge pull request #4612 from SimonSiefke/update-typescript-version
update typescript version to 5.1.6
2023-07-27 08:28:09 -07:00
Simon Siefke 92a18defce remove one more public 2023-07-27 17:16:00 +02:00
Simon Siefke 859c9ec68d update typescript-eslint 2023-07-27 17:11:04 +02:00
Simon Siefke b4aeb1b3e7 fix eslint warnings 2023-07-27 13:29:02 +02:00
Simon Siefke 8f1313519f update typescript version to 5.1.6 2023-07-27 13:19:38 +02:00
Simon Siefke 1c0a25d01b feature: use constructed style sheets for dom render so that it works with csp style-src 'self' 2023-07-27 13:08:22 +02:00
Jörg Breitbart a5df5e7333 first unit tests 2023-07-27 11:25:57 +02:00
Jörg Breitbart 4bd3e1d0c2 remove magic numbers 2023-07-25 13:19:08 +02:00
Jörg Breitbart ad145541af exclude bold&italic variants from merge, limit glyph calc to latin + latin supplement 2023-07-25 12:47:35 +02:00
Jörg Breitbart 37153018b9 fix BCE 2023-07-24 16:06:19 +02:00
Jörg Breitbart 90f1318596 skip failing test for now 2023-07-24 00:01:51 +02:00
Jörg Breitbart 4a5ae78d35 try to fix search test error 2023-07-23 23:52:17 +02:00
Jörg Breitbart 097879b839 faster metrics calc 2023-07-23 23:36:25 +02:00
Jörg Breitbart 2d9ad32d93 fix weblinks api test 2023-07-23 22:25:58 +02:00
Jörg Breitbart 4d257f469b fix linter 2023-07-23 21:12:38 +02:00
Jörg Breitbart 521dc915dc fix weblink tests 2023-07-23 12:36:15 +02:00
Jörg Breitbart 5ea669f091 batch metrics calc 2023-07-23 00:08:40 +02:00
Jörg Breitbart aa6e8d91c2 cleanup 2023-07-22 22:50:05 +02:00
Jörg Breitbart 089dc282c3 fix hover underline 2023-07-22 22:18:12 +02:00
Jörg Breitbart 329b465a63 fix SP for underline/overline 2023-07-22 16:53:13 +02:00
Jörg Breitbart 6785dc19ab exclude combined from merge, fix linter 2023-07-22 16:32:01 +02:00
Jörg Breitbart c515cc2823 fix ext underline handling 2023-07-22 16:20:47 +02:00
Jörg Breitbart 848f89e8a7 fix char under cursor 2023-07-22 15:24:50 +02:00
Jörg Breitbart bd7f76190c fix superfluous selection.refresh calls 2023-07-22 15:12:37 +02:00
Jörg Breitbart 514afcd445 fix bad runtime of merger 2023-07-22 13:29:26 +02:00
Jörg Breitbart 3e13abf974 fix selection handling 2023-07-22 13:01:53 +02:00
Jörg Breitbart 4cfe32f626 make linter happy 2023-07-22 11:08:51 +02:00
Jörg Breitbart f36954764d faster DOM updates 2023-07-22 11:00:12 +02:00
Daniel Imms 1c98037eed Merge pull request #4599 from xtermjs/dependabot/npm_and_yarn/word-wrap-1.2.4
Bump word-wrap from 1.2.3 to 1.2.4
2023-07-18 14:55:34 -07:00
dependabot[bot] 2d732e3a99 Bump word-wrap from 1.2.3 to 1.2.4
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-18 21:27:19 +00:00
Daniel Imms 53d105714a Merge pull request #4596 from lewis-sanchez/lewissanchez/bug/rasterized-glyph-undefined
Add getRasterizedGlyph null and undefined check
2023-07-15 17:56:31 -07:00
Lewis Sanchez 78aad113a6 Minor clean up 2023-07-14 15:07:38 -07:00
Lewis Sanchez d2c28c819f Add getRasterizedGlyph null and undefined check 2023-07-14 11:31:59 -07:00
Daniel Imms 3d75333e95 Merge pull request #4595 from matifali/patch-1
Add Coder to the list
2023-07-14 07:48:40 -07:00
Muhammad Atif Ali 7e5bdb5321 Add Coder Self-Hosted Remote Development Environments to list 2023-07-14 14:08:34 +03:00
Daniel Imms be74969d70 Merge pull request #4589 from xtermjs/dependabot/npm_and_yarn/semver-5.7.2
Bump semver from 5.7.1 to 5.7.2
2023-07-11 04:35:17 -07:00
dependabot[bot] 196f863441 Bump semver from 5.7.1 to 5.7.2
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-11 10:14:24 +00:00
Daniel Imms 823258e311 Merge pull request #4587 from xtermjs/dependabot/npm_and_yarn/tough-cookie-4.1.3
Bump tough-cookie from 4.0.0 to 4.1.3
2023-07-09 08:55:23 -07:00
dependabot[bot] e100a4310b Bump tough-cookie from 4.0.0 to 4.1.3
Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.0.0 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.0.0...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-09 10:15:18 +00:00
Daniel Imms 681c912533 Merge pull request #4585 from tomgroenwoldt/add-helix-editor-playground-project
Add helix editor playground project to real world uses
2023-07-06 07:25:42 -07:00
Tom Groenwoldt 6339c09c01 Add helix editor playground project to real world uses 2023-07-06 11:36:23 +02:00
David Lechner 96634298e4 use border-bottom instead of box-shadow for underline cursor
In rare cases, box-shadow can cause aliasing artifacts on the top and
sides of the cursor box when only the bottom should be filled in to
create an underline.

This replaces the box-shadow style with border-bottom which should be
pixel perfect in all cases.

Fixes: https://github.com/xtermjs/xterm.js/issues/4580
2023-07-05 16:48:42 +00:00
Jörg Breitbart 65568f502e fix #4582 2023-07-05 13:56:41 +02:00
tisilent 1fb9f0185a format 2023-06-30 11:45:50 +08:00
tisilent 74c5256d6d using _smoothScroll 2023-06-30 11:44:06 +08:00
Per Bothner 556823328f Fix for lint the previous charProperties change. 2023-06-28 15:33:55 -07:00
Per Bothner dc6818de2b Fix error in charProperties optimization.
Result should be 2, not 1.
Use a static field to avoid this kind of error
(though it might be slightly slower, depending on the compiler/toolchain).
2023-06-28 15:19:44 -07:00
Per Bothner 693f6b2d14 Merge branch 'master' into clusters 2023-06-27 13:31:23 -07:00
Jörg Breitbart 3991b5f251 make linter happy 2023-06-27 17:11:45 +02:00
Jörg Breitbart 9afb924e84 different loop for failing test 2023-06-27 17:06:43 +02:00
Jörg Breitbart 7a82e7370f fix timeout issue again 2023-06-27 16:51:11 +02:00
Jörg Breitbart 709e9fd01a remove left over .only 2023-06-27 16:20:33 +02:00
Jörg Breitbart e16f87f973 use pollFor in failing test 2023-06-27 16:20:11 +02:00
Jörg Breitbart d4ddac704c more waits for remote browser under heavy CI load 2023-06-27 15:57:07 +02:00
Jörg Breitbart bc92d61616 remove left over .only 2023-06-27 15:41:54 +02:00
Jörg Breitbart 4884d81704 fix another heavy CI load timeout issue 2023-06-27 15:35:52 +02:00
Jörg Breitbart d99bdb7710 fix timeout issue in CI 2023-06-27 15:15:51 +02:00
Jörg Breitbart eaa265b4fa add image options and tests to demo 2023-06-27 15:04:55 +02:00
Jörg Breitbart 8fa3cae618 integrate addon into demo 2023-06-27 14:04:27 +02:00
Jörg Breitbart 0027b27ea3 add wasm builds 2023-06-27 13:49:49 +02:00
Jörg Breitbart 2bcc653293 remove only from api test 2023-06-27 13:43:02 +02:00
Jörg Breitbart ebfff5efee initial move to base repo 2023-06-27 13:35:59 +02:00
Daniel Imms ac0207bf2e Merge pull request #4570 from naufalafif/cloudtutor-io-patch-1
add cloudtutor.io to real world uses
2023-06-19 07:52:33 -07:00
naufal afif 8068880aab add cloudtutor.io to real world uses 2023-06-19 10:26:12 +08:00
Albert Safin 064fe0cfd9 Render the cursor in the WebGL canvas 2023-06-18 06:34:14 +00:00
Daniel Imms 096fe17135 Merge pull request #4565 from Tyriar/tyriar/readonly_log
Improve safety of log service
2023-06-16 10:42:47 -07:00
Daniel Imms 4d501b38b8 Improve safety of log service 2023-06-16 10:30:54 -07:00
Daniel Imms f79e9a1951 Merge pull request #4564 from Tyriar/bind_loggers
Bind logger calls
2023-06-16 09:30:04 -07:00
Daniel Imms 64a62fb0c1 Bind logger calls 2023-06-16 09:19:23 -07:00
Daniel Imms 2c45989fea Merge pull request #4563 from Tyriar/logger
Add logger delegate option
2023-06-16 08:34:13 -07:00
Daniel Imms f779e4ddc0 Add logger delegate option
This allows embedders to route the logs whereever they want, when this
is set the xterm.js prefix is excluded.
2023-06-16 08:23:22 -07:00
Daniel Imms 7be0016e45 Merge branch 'master' into #4121 2023-06-10 14:02:21 -07:00
xie jialong 努力鸭 f616ebb083 Merge branch 'master' into #4121 2023-06-07 19:23:01 +08:00
tisilent ce2d115087 Move logic to Viewport 2023-06-06 20:14:24 +08:00
jerch cf403bc45c Merge branch 'master' into clusters 2023-05-21 22:25:34 +02:00
Per Bothner fa89e1776b Optimize UnicodeGraphemeProvider for the ASCII case. 2023-05-21 10:29:13 -07:00
Per Bothner 1a8c7dad5f Update .eslintrc.json to include xterm-addon-unicode-graphemes/benchmark 2023-05-21 10:27:36 -07:00
Per Bothner e87fa1600d Merge pull request #2 from jerch/clusters-patch
working perf test and API test injection
2023-05-21 08:19:55 -07:00
Jörg Breitbart 3003185676 revert wrongly editied files 2023-05-20 15:29:38 +02:00
Jörg Breitbart ebfa2018dd revert wrong added file 2023-05-20 15:28:15 +02:00
Jörg Breitbart 68abf10c25 remove spurious .only 2023-05-20 15:24:56 +02:00
Jörg Breitbart 284cde8b1b fix benchmark 2023-05-20 15:14:37 +02:00
Jörg Breitbart 466501c62f patch for working perf test and API test injection 2023-05-20 15:05:32 +02:00
Per Bothner 9c34bb4160 Merge branch 'master' into clusters 2023-05-18 11:19:26 -07:00
Per Bothner 8e730cdc61 xterm-addon-unicode-graphemes: add api tests and get demo working 2023-05-18 11:11:38 -07:00
Per Bothner 41760dfb09 xterm-addon-unicode-graphemes - fix 'yarn test' 2023-05-18 08:55:52 -07:00
Per Bothner 67e968926c Cleanup - fix various tests. 2023-05-17 18:37:27 -07:00
Per Bothner 2f7fe1189c New unicode-graphemes addon.
Handle grapheme cluster lookup as well as wcwidth.
This is based on Unicode 15, and could replace the unicode11 addon.
2023-05-16 18:31:31 -07:00
tisilent b7d73f63cd Add smoothScroll to scrollLines 2023-04-19 15:48:12 +08:00
Labhansh Agrawal a8cec5f02f Enable ligatures addon on electron 2023-02-23 23:49:40 +05:30
Arek Ouzounian 79d2f738a2 fixed linter warnings 2023-01-06 15:22:02 -08:00
Arek Ouzounian 7701557b99 Fix for #2488. Use element offsetHeight rather than
getBoundingRect
2023-01-06 14:56:20 -08:00
Simon Lamon ed8c2269cb Add proposed fix 2022-12-23 17:00:48 +00:00
Simon Lamon f1b47485cd Revert "Revert "SerializeAsHTML(): Fallback to default ansi colors when running headless terminal""
This reverts commit 3a81ef54ca.
2022-12-23 16:47:31 +00:00
531 changed files with 54896 additions and 16915 deletions
+5 -3
View File
@@ -1,13 +1,15 @@
{
"name": "xterm.js",
"image": "mcr.microsoft.com/devcontainers/typescript-node:0-18-buster",
"image": "mcr.microsoft.com/devcontainers/typescript-node:18-bookworm",
"features": {
"ghcr.io/devcontainers/features/node:1": {} // yarn
"ghcr.io/devcontainers/features/node:1": {
"version": 18
} // yarn
},
"forwardPorts": [
3000
],
"postCreateCommand": "yarn install",
"postCreateCommand": "npm install && npm run setup",
"customizations": {
"vscode": {
"extensions": [
+92 -38
View File
@@ -1,7 +1,7 @@
{
"env": {
"browser": true,
"es6": true,
"es2021": true,
"node": true
},
"parser": "@typescript-eslint/parser",
@@ -11,39 +11,70 @@
"src/browser/tsconfig.json",
"src/common/tsconfig.json",
"src/headless/tsconfig.json",
"test/api/tsconfig.json",
"src/vs/tsconfig.json",
"test/benchmark/tsconfig.json",
"addons/xterm-addon-attach/src/tsconfig.json",
"addons/xterm-addon-attach/test/tsconfig.json",
"addons/xterm-addon-canvas/src/tsconfig.json",
"addons/xterm-addon-fit/src/tsconfig.json",
"addons/xterm-addon-fit/test/tsconfig.json",
"addons/xterm-addon-ligatures/src/tsconfig.json",
"addons/xterm-addon-search/src/tsconfig.json",
"addons/xterm-addon-search/test/tsconfig.json",
"addons/xterm-addon-serialize/src/tsconfig.json",
"addons/xterm-addon-serialize/test/tsconfig.json",
"addons/xterm-addon-serialize/benchmark/tsconfig.json",
"addons/xterm-addon-unicode11/src/tsconfig.json",
"addons/xterm-addon-unicode11/test/tsconfig.json",
"addons/xterm-addon-web-links/src/tsconfig.json",
"addons/xterm-addon-web-links/test/tsconfig.json",
"addons/xterm-addon-webgl/src/tsconfig.json",
"addons/xterm-addon-webgl/test/tsconfig.json"
"test/playwright/tsconfig.json",
"addons/addon-attach/src/tsconfig.json",
"addons/addon-attach/test/tsconfig.json",
"addons/addon-clipboard/src/tsconfig.json",
"addons/addon-clipboard/test/tsconfig.json",
"addons/addon-fit/src/tsconfig.json",
"addons/addon-fit/test/tsconfig.json",
"addons/addon-image/src/tsconfig.json",
"addons/addon-image/test/tsconfig.json",
"addons/addon-ligatures/src/tsconfig.json",
"addons/addon-progress/src/tsconfig.json",
"addons/addon-progress/test/tsconfig.json",
"addons/addon-search/src/tsconfig.json",
"addons/addon-search/test/tsconfig.json",
"addons/addon-serialize/src/tsconfig.json",
"addons/addon-serialize/test/tsconfig.json",
"addons/addon-serialize/benchmark/tsconfig.json",
"addons/addon-unicode11/src/tsconfig.json",
"addons/addon-unicode11/test/tsconfig.json",
"addons/addon-unicode-graphemes/src/tsconfig.json",
"addons/addon-unicode-graphemes/test/tsconfig.json",
"addons/addon-unicode-graphemes/benchmark/tsconfig.json",
"addons/addon-web-links/src/tsconfig.json",
"addons/addon-web-links/test/tsconfig.json",
"addons/addon-webgl/src/tsconfig.json",
"addons/addon-webgl/test/tsconfig.json"
],
"sourceType": "module"
},
"ignorePatterns": [
"addons/*/src/third-party/*.ts",
"src/vs/*",
"out/*",
"out-test/*",
"out-esbuild/*",
"out-esbuild-test/*",
"**/inwasm-sdks/*",
"**/typings/*.d.ts",
"**/node_modules",
"**/*.js"
"**/*.js",
"**/*.mjs"
],
"plugins": [
"@stylistic/ts",
"@typescript-eslint",
"jsdoc"
],
"rules": {
"no-extra-semi": "error",
"@stylistic/ts/indent": [
"warn",
2
],
"@stylistic/ts/semi": [
"warn",
"always"
],
"@stylistic/ts/quotes": [
"warn",
"single",
{ "allowTemplateLiterals": true }
],
"@typescript-eslint/array-type": [
"warn",
{
@@ -68,10 +99,6 @@
}
}
],
"@typescript-eslint/indent": [
"warn",
2
],
"@typescript-eslint/member-delimiter-style": [
"warn",
{
@@ -87,7 +114,12 @@
],
"@typescript-eslint/naming-convention": [
"warn",
{ "selector": "default", "format": ["camelCase"] },
{ "selector": "default", "format": ["camelCase"],
"filter": {
"regex": "^[a-z]",
"match": true
}
},
// variableLike
{ "selector": "variable", "format": ["camelCase", "UPPER_CASE"] },
{ "selector": "variable", "filter": "^I.+Service$", "format": ["PascalCase"], "prefix": ["I"] },
@@ -96,7 +128,12 @@
{ "selector": "memberLike", "modifiers": ["protected"], "format": ["camelCase"], "leadingUnderscore": "require" },
{ "selector": "enumMember", "format": ["UPPER_CASE"] },
// memberLike - Allow enum-like objects to use UPPER_CASE
{ "selector": "property", "modifiers": ["public"], "format": ["camelCase", "UPPER_CASE"] },
{ "selector": "property", "modifiers": ["public"], "format": ["camelCase", "UPPER_CASE"],
"filter": {
"regex": "^[a-z]",
"match": true
}
},
// restrict on* naming for events only
{ "selector": "method", "modifiers": ["public"], "format": ["camelCase", "UPPER_CASE"], "custom": {
"regex": "^on[A-Z].+",
@@ -114,17 +151,14 @@
{ "selector": "typeLike", "format": ["PascalCase"] },
{ "selector": "interface", "format": ["PascalCase"], "prefix": ["I"] }
],
"@typescript-eslint/no-confusing-void-expression": [
"warn",
{ "ignoreArrowShorthand": true }
],
"@typescript-eslint/no-useless-constructor": "warn",
"@typescript-eslint/prefer-namespace-keyword": "warn",
"@typescript-eslint/type-annotation-spacing": "warn",
"@typescript-eslint/quotes": [
"warn",
"single",
{ "allowTemplateLiterals": true }
],
"@typescript-eslint/semi": [
"warn",
"always"
],
"comma-dangle": [
"warn",
{
@@ -146,6 +180,16 @@
"jsdoc/check-param-names": 1,
"jsdoc/no-multi-asterisks": 1,
"keyword-spacing": "warn",
"max-len": [
"warn",
{
"code": 1000, // Don't enforce for code
"comments": 100,
"ignoreTrailingComments": true,
"ignoreUrls": true,
"ignorePattern": "^ *((?<vt_comment>(//|\\*) @vt)|(?<table_comment>\\* \\| )|(?<commented_code>// ))"
}
],
"new-parens": "warn",
"no-duplicate-imports": "warn",
"no-else-return": [
@@ -155,6 +199,7 @@
}
],
"no-eval": "warn",
"no-extra-semi": "error",
"no-irregular-whitespace": "warn",
"no-restricted-imports": [
"warn",
@@ -189,6 +234,10 @@
],
"no-trailing-spaces": "warn",
"no-unsafe-finally": "warn",
"no-unused-vars": ["warn", {
"vars": "all",
"args": "none"
}],
"no-var": "warn",
"one-var": [
"warn",
@@ -210,9 +259,14 @@
},
"overrides": [
{
"files": ["**/*.test.ts"],
"files": [
"**/*.api.ts",
"**/*.test.ts"
],
"rules": {
"object-curly-spacing": "off"
"object-curly-spacing": "off",
"max-len": "off",
"no-unused-vars": "off"
}
}
]
+107
View File
@@ -0,0 +1,107 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"plugins": [
"@stylistic/ts",
"@typescript-eslint",
"jsdoc"
],
"rules": {
"@stylistic/ts/indent": [
"warn",
2
],
"@stylistic/ts/semi": [
"warn",
"always"
],
"@stylistic/ts/quotes": [
"warn",
"single",
{ "allowTemplateLiterals": true }
],
"@typescript-eslint/array-type": [
"warn",
{
"default": "array",
"readonly": "generic"
}
],
"@typescript-eslint/explicit-function-return-type": [
"warn",
{
"allowExpressions": true
}
],
"@typescript-eslint/member-delimiter-style": [
"warn",
{
"multiline": {
"delimiter": "semi",
"requireLast": true
},
"singleline": {
"delimiter": "comma",
"requireLast": false
}
}
],
"@typescript-eslint/naming-convention": [
"warn",
{ "selector": "typeLike", "format": ["PascalCase"] },
{ "selector": "interface", "format": ["PascalCase"], "prefix": ["I"] }
],
"@typescript-eslint/prefer-namespace-keyword": "warn",
"@typescript-eslint/type-annotation-spacing": "warn",
"comma-dangle": [
"warn",
{
"objects": "never",
"arrays": "never",
"functions": "never"
}
],
"curly": [
"warn",
"multi-line"
],
"eol-last": "warn",
"eqeqeq": [
"warn",
"always"
],
"jsdoc/check-alignment": 1,
"jsdoc/check-param-names": 1,
"keyword-spacing": "warn",
"max-len": [
"warn",
{
"code": 1000, // Don't enforce for code
"comments": 80,
"ignoreUrls": true,
"ignorePattern": "^ *(?<ps_description>\\* Ps=)"
}
],
"no-extra-semi": "error",
"no-irregular-whitespace": "warn",
"no-trailing-spaces": "warn",
"object-curly-spacing": [
"warn",
"always"
],
"spaced-comment": [
"warn",
"always",
{
"markers": ["/"],
"exceptions": ["-"]
}
]
}
}
+91
View File
@@ -0,0 +1,91 @@
# xterm.js Copilot Instructions
## Architecture Overview
**Core Structure**: xterm.js is a multi-target terminal emulator with three main distributions:
- `src/browser/`: Full-featured browser terminal with DOM rendering
- `src/headless/`: Server-side terminal for Node.js (no DOM)
- `src/common/`: Shared core logic (parsing, buffer management, terminal state)
**Key Classes**:
- `Terminal` (browser/headless): Public API wrapper
- `CoreTerminal` (common): Core terminal logic and state
- `CoreBrowserTerminal` (browser): Browser-specific terminal implementation
## Development Workflow
**Build System**:
```bash
npm run build && npm run esbuild # Build all TypeScript and bundle
```
**Testing**:
- Unit tests: `npm run test-unit` (Mocha)
- Unit tests filtering to file: `npm run test-unit -- **/fileName.ts
- Per-addon unit tests: `npm run test-unit addons/addon-image/out-esbuild/*.test.js`
- Integration tests: `npm run test-integration` (Playwright across Chrome/Firefox/WebKit)
- Per-addon integration tests: `npm run test-integration --suite=addon-search`
## Addon Development Pattern
All addons follow this structure:
```typescript
export class MyAddon implements ITerminalAddon {
activate(terminal: Terminal): void {
// Called when loaded via terminal.loadAddon()
// Register handlers, access terminal APIs
}
dispose(): void {
// Cleanup when addon is disposed
}
}
```
**Key Examples**:
- `addons/addon-fit/`: Terminal sizing
- `addons/addon-webgl/`: GPU-accelerated rendering
- `addons/addon-search/`: Text search functionality
## Project-Specific Conventions
**TypeScript Project Structure**: Uses TypeScript project references (`tsconfig.all.json`) for incremental builds across browser/headless/addons.
**API Design**:
- Browser and headless terminals share the same public API
- Proposed APIs require `allowProposedApi: true` option
- Constructor-only options (cols, rows) cannot be changed after instantiation
**Testing Utilities**: Use `TestUtils.ts` helpers:
- `openTerminal(ctx, options)` for setup
- `pollFor(page, fn, expectedValue)` for async assertions
- `writeSync(page, data)` for terminal input
## Common Patterns
**Parser Integration**: Register custom escape sequence handlers:
```typescript
terminal.parser.registerCsiHandler('m', params => {
// Handle SGR sequences
return true; // Handled
});
```
**Buffer Access**: Read terminal content via buffer API:
```typescript
const line = terminal.buffer.active.getLine(0);
const cell = line?.getCell(0);
```
**Events**: All terminals emit standard events (onData, onResize, onRender) plus platform-specific ones.
## Critical Implementation Details
- Terminal rendering uses either DOM or WebGL renderers
- Buffer lines are immutable; create new instances for modifications
- Character width handling supports Unicode 11+ and grapheme clustering
- Mouse events translate web events to terminal protocols (X10, VT200, etc.)
- Color theming supports both palette and true color modes
## Writing unit tests
- Unit tests live alongside the source code file of the thing it's testing with a .test.ts suffix.
@@ -0,0 +1,8 @@
---
applyTo: '**/*.test.ts'
---
When writing unit tests follow these rules:
- When writing unit tests for addons, always create a real xterm.js instance instead of mocking it.
- Prefer `assert.ok` over `assert.notStrictEqual` when checking something is undefined or not.
- Avoid comments as most tests should be self-documenting.
+264
View File
@@ -0,0 +1,264 @@
name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Use Node.js 22.x
uses: actions/setup-node@v3
with:
node-version: 22.x
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Setup and run tsc
run: npm run setup
- name: Esbuild
run: npm run esbuild
- name: Zip artifacts
run: |
zip -r compressed-build \
./lib/* \
./out/* \
./out-*/* \
./addons/addon-attach/lib/* \
./addons/addon-attach/out/* \
./addons/addon-attach/out-*/* \
./addons/addon-clipboard/lib/* \
./addons/addon-clipboard/out/* \
./addons/addon-clipboard/out-*/* \
./addons/addon-fit/lib/* \
./addons/addon-fit/out/* \
./addons/addon-fit/out-*/* \
./addons/addon-image/lib/* \
./addons/addon-image/out/* \
./addons/addon-image/out-*/* \
./addons/addon-ligatures/lib/* \
./addons/addon-ligatures/out/* \
./addons/addon-ligatures/out-*/* \
./addons/addon-progress/lib/* \
./addons/addon-progress/out/* \
./addons/addon-progress/out-*/* \
./addons/addon-search/lib/* \
./addons/addon-search/out/* \
./addons/addon-search/out-*/* \
./addons/addon-serialize/lib/* \
./addons/addon-serialize/out/* \
./addons/addon-serialize/out-*/* \
./addons/addon-unicode11/lib/* \
./addons/addon-unicode11/out/* \
./addons/addon-unicode11/out-*/* \
./addons/addon-unicode-graphemes/lib/* \
./addons/addon-unicode-graphemes/out/* \
./addons/addon-unicode-graphemes/out-*/* \
./addons/addon-web-links/lib/* \
./addons/addon-web-links/out/* \
./addons/addon-web-links/out-*/* \
./addons/addon-webgl/lib/* \
./addons/addon-webgl/out/* \
./addons/addon-webgl/out-*st/*
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: compressed-build.zip
if-no-files-found: error
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Use Node.js 22.x
uses: actions/setup-node@v3
with:
node-version: 22.x
cache: 'npm'
- name: Install dependencies
run: |
npm ci
- name: Lint code
env:
NODE_OPTIONS: --max_old_space_size=4096
run: npm run lint
- name: Lint API
run: npm run lint-api
test-unit-coverage:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Use Node.js 22.x
uses: actions/setup-node@v3
with:
node-version: 22.x
cache: 'npm'
- name: Install dependencies
run: |
npm ci
- uses: actions/download-artifact@v4
with:
name: build-artifacts
- name: Unzip artifacts
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
pwsh -Command "7z x compressed-build.zip -aoa -o${{ github.workspace }}"
else
unzip -o compressed-build.zip
fi
ls -R
- name: Unit test coverage
run: |
npm run test-unit-coverage --forbid-only
EXIT_CODE=$?
./node_modules/.bin/nyc report --reporter=cobertura
exit $EXIT_CODE
test-unit:
timeout-minutes: 20
strategy:
matrix:
node-version: [22]
runs-on: [ubuntu, macos, windows]
runs-on: ${{ matrix.runs-on }}-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}.x
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}.x
cache: 'npm'
- name: Install dependencies
run: |
npm ci
- name: Wait for build job
uses: NathanFirmo/wait-for-other-job@v1.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
job: build
- uses: actions/download-artifact@v4
with:
name: build-artifacts
- name: Unzip artifacts
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
pwsh -Command "7z x compressed-build.zip -aoa -o${{ github.workspace }}"
else
unzip -o compressed-build.zip
fi
ls -R
- name: Unit tests
run: npm run test-unit --forbid-only
test-integration:
timeout-minutes: 20
strategy:
matrix:
node-version: [22] # just one as integration tests are about testing in browser
runs-on: [ubuntu-22.04] # macos is flaky
browser: [chromium, firefox, webkit]
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}.x
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}.x
cache: 'npm'
- name: Install dependencies
run: |
npm ci
- name: Install playwright
run: npx playwright install --with-deps ${{ matrix.browser }}
- name: Wait for build job
uses: NathanFirmo/wait-for-other-job@v1.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
job: build
- uses: actions/download-artifact@v4
with:
name: build-artifacts
- name: Unzip artifacts
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
pwsh -Command "7z x compressed-build.zip -aoa -o${{ github.workspace }}"
else
unzip -o compressed-build.zip
fi
ls -R
- name: Build demo
run: npm run esbuild-demo
- name: Integration tests (core) # Tests use 50% workers to reduce flakiness
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=core
- name: Integration tests (addon-attach)
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-attach
- name: Integration tests (addon-clipboard)
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-clipboard
- name: Integration tests (addon-fit)
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-fit
- name: Integration tests (addon-image)
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-image
- name: Integration tests (addon-progress)
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-progress
- name: Integration tests (addon-search)
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-search
- name: Integration tests (addon-serialize)
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-serialize
- name: Integration tests (addon-unicode-graphemes)
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-unicode-graphemes
- name: Integration tests (addon-unicode11)
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-unicode11
- name: Integration tests (addon-web-links)
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-web-links
- name: Integration tests (addon-webgl)
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-webgl
release-dry-run:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}.x
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}.x
cache: 'npm'
- name: Install dependencies
run: |
npm ci
- name: Install playwright
run: npx playwright install
- uses: actions/download-artifact@v4
with:
name: build-artifacts
- name: Unzip artifacts
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
pwsh -Command "7z x compressed-build.zip -aoa -o${{ github.workspace }}"
else
unzip -o compressed-build.zip
fi
ls -R
- name: Package headless
run: |
npm run package-headless
node ./bin/package_headless.js
- name: Publish to npm (dry run)
run: node ./bin/publish.js --dry
-37
View File
@@ -1,21 +1,9 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '41 17 * * 0'
@@ -33,40 +21,15 @@ jobs:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
+32
View File
@@ -0,0 +1,32 @@
name: "Copilot Setup Steps"
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js 22.x
uses: actions/setup-node@v3
with:
node-version: 22.x
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Setup and run tsc
run: npm run setup
- name: Esbuild
run: npm run esbuild
+30
View File
@@ -0,0 +1,30 @@
name: Release
on:
push:
# If a commit reaches master, assume it has passed CI via PR and publish
# without running tests to save time to publish
branches: [ "master" ]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 22.x
uses: actions/setup-node@v3
with:
node-version: 22.x
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run setup
- name: Package headless
run: |
npm run package-headless
node ./bin/package_headless.js
- name: Publish to npm
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: node ./bin/publish.js
+4 -1
View File
@@ -4,6 +4,8 @@ node_modules/
lib/
out/
out-test/
out-esbuild/
out-esbuild-test/
.nyc_output/
Makefile.gyp
*.Makefile
@@ -16,7 +18,8 @@ npm-debug.log
.env
build/
.DS_Store
package-lock.json
yarn.lock
test-results/
# Keep bundled code out of Git
dist/
+3
View File
@@ -17,6 +17,9 @@
!lib/**/*.js
!lib/**/*.js.map
!lib/**/*.mjs
!lib/**/*.mjs.map
!lib/**/*.css
# Whitelist - src/
+1
View File
@@ -0,0 +1 @@
18
+11 -6
View File
@@ -43,7 +43,14 @@
{
"type": "chrome",
"request": "launch",
"name": "Demo Client",
"name": "Demo Client (Chrome)",
"url": "http://127.0.0.1:3000",
"webRoot": "${workspaceFolder}/"
},
{
"type": "msedge",
"request": "launch",
"name": "Demo Client (Edge)",
"url": "http://127.0.0.1:3000",
"webRoot": "${workspaceFolder}/"
},
@@ -52,11 +59,9 @@
"request": "launch",
"name": "Demo Server",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"start-debug"
],
"port": 9229,
"runtimeArgs": ["start"],
"stopOnEntry": true,
"runtimeVersion": "18",
"serverReadyAction": {
"action": "openExternally",
"pattern": "App listening to (http://.*?:[0-9]+)"
+12 -2
View File
@@ -1,13 +1,23 @@
{
"files.associations": {
".eslintrc.json.typings": "jsonc"
},
"files.exclude": {
"**/.nyc_output": true
},
"typescript.preferences.importModuleSpecifier": "non-relative",
"typescript.preferences.quoteStyle": "single",
"mochaExplorer.envPath": ".mocha.env",
"mochaExplorer.files": [
"out/**/*.test.js",
"addons/**/out/*.test.js"
"addons/**/out/*.test.js",
"out-*/**/*.test.js",
"addons/**/out-*/*.test.js"
],
"mochaExplorer.watch": [
"out/**/*.js",
"addons/**/out/*.js"
"addons/**/out/*.js",
"out-*/**/*.js",
"addons/**/out-*/*.js"
]
}
+60 -53
View File
@@ -8,6 +8,66 @@
"showReuseMessage": true
},
"tasks": [
// Compound tasks
{
"label": "Development",
"dependsOn": ["demo-server", "tsc", "esbuild", "esbuild-demo"],
"group": {
"kind": "build",
"isDefault": true
}
},
// Demo
{
"label": "demo-server",
"type": "npm",
"script": "start",
"group": "build",
"isBackground": true,
"problemMatcher": [],
"presentation": {
"group": "xterm-demo"
}
},
// Build
{
"label": "tsc",
"type": "npm",
"script": "tsc-watch",
"group": "build",
"isBackground": true,
"problemMatcher": "$tsc-watch",
"presentation": {
"group": "xterm-build"
}
},
{
"label": "esbuild",
"type": "npm",
"script": "esbuild-watch",
"group": "build",
"isBackground": true,
"problemMatcher": "$esbuild-watch",
"presentation": {
"group": "xterm-build"
}
},
{
"label": "esbuild-demo",
"type": "npm",
"script": "esbuild-demo-watch",
"dependsOn": ["esbuild", "tsc"],
"group": "build",
"isBackground": true,
"problemMatcher": "$esbuild-watch",
"presentation": {
"group": "xterm-demo"
}
},
// Test
{
"type": "npm",
"script": "test",
@@ -16,59 +76,6 @@
"isDefault": true
},
"problemMatcher": []
},
{
"label": "watch",
"type": "npm",
"script": "watch",
"group": "build",
"isBackground": true,
"problemMatcher": "$tsc-watch",
"presentation": {
"group": "vscode"
}
},
{
"label": "start",
"type": "npm",
"script": "start",
"group": "build",
"isBackground": true,
"problemMatcher": [],
"presentation": {
"group": "vscode"
}
},
{
"label": "Start demo",
"dependsOn": ["start", "watch"],
"group": {
"kind": "build",
"isDefault": true
},
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"fileLocation": [
"relative",
"${workspaceFolder}"
],
"pattern": [
{
"regexp": "^([^\\\\s].*)\\\\((\\\\d+,\\\\d+)\\\\):\\\\s*(.*)$",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"beginsPattern": "assets by",
"endsPattern": "webpack \\d+\\.\\d+\\.\\d+ compiled successfully"
}
},
"presentation": {
"group": "vscode"
}
}
]
}
+46
View File
@@ -28,6 +28,10 @@ opening an issue, read these pointers.
- Be polite. Issues with an indignant or belligerent tone tend to be moved to the
bottom of the pile.
## Answering discussion questions
Issues are only meant to track (likely) feature requests and bugs. We use [GitHub Discussions](https://github.com/xtermjs/xterm.js/discussions) for general Q&A as well as discussing possible features. If you want to help out, many questions get asked over at the [discussions page](https://github.com/xtermjs/xterm.js/discussions) which could use an expert as the core team is often stretched thin.
## Contributing code
You can find issues to work on by looking at the [help wanted](https://github.com/xtermjs/xterm.js/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) or [good first issue](https://github.com/xtermjs/xterm.js/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) issues. It's a good idea to comment on the issue saying that you're taking it, just in case someone else comes along and you duplicate work. Once you have your issue, here are the steps to contribute:
@@ -56,3 +60,45 @@ By contributing code to xterm.js you:
### Test coverage
One area that always needs attention is improving out unit test coverage, you can view the code coverage report on [Azure Pipelines](https://dev.azure.com/xtermjs/xterm.js/_build/latest?definitionId=3) by clicking the Code Coverage tab.
## Testing
### Unit tests
Unit tests are run with `npm run test-unit`:
```sh
# All unit tests
npm run test-unit
# Absolute file path
npm run test-unit out-esbuild/browser/Terminal.test.js
# Filter by wildcard
npm run test-unit out-esbuild/**/Terminal.test.js
# Specific addon unit tests tests
npm run test-unit addons/addon-image/out-esbuild/*.test.js
# Multiple files
npm run test-unit out-esbuild/**/Terminal.test.js out-esbuild/**/InputHandler.test.js
```
These use mocha to run all `.test.js` files within the esbuild output (`out-esbuild/`).
### Integration tests
Integration tests are run with `npm run test-integration`:
```sh
# All integration tests
npm run test-integration
# Core integration tests
npm run test-integration --suite=core
# Specific addon integration tests
npm run test-integration --suite=addon-search
```
These use `@playwright/test` to run all tests within the esbuild test output (`out-esbuild-test/`).
-2
View File
@@ -1,2 +0,0 @@
web: npm start
webpack: npm run watch
+30 -16
View File
@@ -1,6 +1,4 @@
# [![xterm.js logo](logo-full.png)](https://xtermjs.org)
[![Build Status](https://dev.azure.com/xtermjs/xterm.js/_apis/build/status/xtermjs.xterm.js)](https://dev.azure.com/xtermjs/xterm.js/_build/latest?definitionId=3)
# [![xterm.js logo](images/logo-full.png)](https://xtermjs.org)
Xterm.js is a front-end component written in TypeScript that lets applications bring fully-featured terminals to their users in the browser. It's used by popular projects such as VS Code, Hyper and Theia.
@@ -23,7 +21,7 @@ Xterm.js is a front-end component written in TypeScript that lets applications b
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:
```bash
npm install xterm
npm install @xterm/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. Finally, instantiate the `Terminal` object and then call the `open` function with the DOM object of the `div`.
@@ -32,8 +30,8 @@ To start using xterm.js on your browser, add the `xterm.js` and `xterm.css` to t
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="node_modules/xterm/css/xterm.css" />
<script src="node_modules/xterm/lib/xterm.js"></script>
<link rel="stylesheet" href="node_modules/@xterm/xterm/css/xterm.css" />
<script src="node_modules/@xterm/xterm/lib/xterm.js"></script>
</head>
<body>
<div id="terminal"></div>
@@ -51,7 +49,7 @@ To start using xterm.js on your browser, add the `xterm.js` and `xterm.css` to t
The recommended way to load xterm.js is via the ES6 module syntax:
```javascript
import { Terminal } from 'xterm';
import { Terminal } from '@xterm/xterm';
```
### Addons
@@ -61,14 +59,14 @@ import { Terminal } from 'xterm';
Addons are separate modules that extend the `Terminal` by building on the [xterm.js API](https://github.com/xtermjs/xterm.js/blob/master/typings/xterm.d.ts). To use an addon, you first need to install it in your project:
```bash
npm i -S xterm-addon-web-links
npm i -S @xterm/addon-web-links
```
Then import the addon, instantiate it and call `Terminal.loadAddon`:
```ts
import { Terminal } from 'xterm';
import { WebLinksAddon } from 'xterm-addon-web-links';
import { Terminal } from '@xterm/xterm';
import { WebLinksAddon } from '@xterm/addon-web-links';
const terminal = new Terminal();
// Load WebLinksAddon on terminal, this is all that's needed to get web links
@@ -78,10 +76,15 @@ terminal.loadAddon(new WebLinksAddon());
The xterm.js team maintains the following addons, but anyone can build them:
- [`xterm-addon-attach`](https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-attach): Attaches to a server running a process via a websocket
- [`xterm-addon-fit`](https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-fit): Fits the terminal to the containing element
- [`xterm-addon-search`](https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-search): Adds search functionality
- [`xterm-addon-web-links`](https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-web-links): Adds web link detection and interaction
- [`@xterm/addon-attach`](https://github.com/xtermjs/xterm.js/tree/master/addons/addon-attach): Attaches to a server running a process via a websocket
- [`@xterm/addon-clipboard`](https://github.com/xtermjs/xterm.js/tree/master/addons/addon-clipboard): Access the browser's clipboard
- [`@xterm/addon-fit`](https://github.com/xtermjs/xterm.js/tree/master/addons/addon-fit): Fits the terminal to the containing element
- [`@xterm/addon-image`](https://github.com/xtermjs/xterm.js/tree/master/addons/addon-image): Adds image support
- [`@xterm/addon-search`](https://github.com/xtermjs/xterm.js/tree/master/addons/addon-search): Adds search functionality
- [`@xterm/addon-serialize`](https://github.com/xtermjs/xterm.js/tree/master/addons/addon-serialize): Serializes the terminal's buffer to a VT sequences or HTML
- [`@xterm/addon-unicode11`](https://github.com/xtermjs/xterm.js/tree/master/addons/addon-unicode11): Updates character widths to their unicode11 values
- [`@xterm/addon-web-links`](https://github.com/xtermjs/xterm.js/tree/master/addons/addon-web-links): Adds web link detection and interaction
- [`@xterm/addon-webgl`](https://github.com/xtermjs/xterm.js/tree/master/addons/addon-webgl): Renders xterm.js using a `canvas` element's webgl2 context
## Browser Support
@@ -110,7 +113,7 @@ All current and past releases are available on this repo's [Releases page](https
Our CI releases beta builds to npm for every change that goes into master. Install the latest beta build with:
```bash
npm install -S xterm@beta
npm install -S @xterm/xterm@beta
```
These should generally be stable, but some bugs may slip in. We recommend using the beta build primarily to test out new features and to verify bug fixes.
@@ -125,7 +128,6 @@ Xterm.js is used in several world-class applications to provide great terminal e
- [**SourceLair**](https://www.sourcelair.com/): In-browser IDE that provides its users with fully-featured Linux terminals based on xterm.js.
- [**Microsoft Visual Studio Code**](http://code.visualstudio.com/): Modern, versatile, and powerful open source code editor that provides an integrated terminal based on xterm.js.
- [**ttyd**](https://github.com/tsl0922/ttyd): A command-line tool for sharing terminal over the web, with fully-featured terminal emulation based on xterm.js.
- [**Katacoda**](https://www.katacoda.com/): Katacoda is an Interactive Learning Platform for software developers, covering the latest Cloud Native technologies.
- [**Eclipse Che**](http://www.eclipse.org/che): Developer workspace server, cloud IDE, and Eclipse next-generation IDE.
- [**Codenvy**](http://www.codenvy.com): Cloud workspaces for development teams.
- [**CoderPad**](https://coderpad.io): Online interviewing platform for programmers. Run code in many programming languages, with results displayed by xterm.js.
@@ -216,6 +218,18 @@ Xterm.js is used in several world-class applications to provide great terminal e
- [**Super Terminal**](https://github.com/bugwheels94/super-terminal): It is a http based terminal for developers who dont like repetition and save time.
- [**graSSHopper**](https://grasshopper.coding.kiwi): A simple SSH client with file explorer, history and many more features.
- [**DomTerm**](https://domterm.org/xtermjs.html): Tiles and tabs. Detachable sessions (like tmux). [Remote connections](https://domterm.org/Remoting-over-ssh.html) using a nice ssh wrapper with predictive echo. Qt, Electron, Tauri/Wry, or desktop browser front-ends. Choose between xterm.js engine (faster) or native DomTerm (more functionality and graphics) - or both.
- [**Cloudtutor.io**](https://cloudtutor.io): innovative online learning platform that offers users access to an interactive lab.
- [**Helix Editor Playground**](https://github.com/tomgroenwoldt/helix-editor-playground): Online playground for the terminal based helix editor.
- [**Coder**](https://github.com/coder/coder): Self-Hosted Remote Development Environments
- [**Wave Terminal**](https://waveterm.dev): An open-source, ai-native, terminal built for seamless workflows.
- [**eva**](https://github.com/info24/eva): Eva is a web application for SSH remote login, developed in Go.
- [**OpenSFTP**](https://opensftp.com): Super beautiful SSH and SFTP integrated workspace client.
- [**balena**](https://www.balena.io/): Balena is a full-stack solution for developing, deploying, updating, and troubleshooting IoT Edge devices. We use xterm.js to manage & debug devices on [balenaCloud](https://www.balena.io/cloud).
- [**Filet Cloud**](https://github.com/fuglaro/filet-cloud): The lean and powerful personal cloud ⛅.
- [**pyTermTk**](https://github.com/ceccopierangiolieugenio/pyTermTk): Python Terminal Toolkit - a Spiced Up Cross Compatible TUI Library 🌶️, use xterm.js for the [HTML5 exporter](https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html).
- [**ecmaOS**](https://ecmaos.sh): A kernel and suite of applications tying modern web technologies into a browser-based operating system.
- [**LabEx**](https://labex.io): Interactive learning platform with hands-on labs and xterm.js-based online terminals, focused on learn-by-doing approach.
- [**EmuDevz**](https://afska.github.io/emudevz): A free coding game where players learn how to build an emulator from scratch.
- [And much more...](https://github.com/xtermjs/xterm.js/network/dependents?package_id=UGFja2FnZS0xNjYzMjc4OQ%3D%3D)
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 on our list. Note: Please add any new contributions to the end of the list only.
@@ -8,6 +8,9 @@
!lib/**/*.js
!lib/**/*.js.map
!lib/**/*.mjs
!lib/**/*.mjs.map
!lib/**/*.css
# Whitelist - src/
@@ -1,22 +1,22 @@
## xterm-addon-attach
## @xterm/addon-attach
An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables attaching to a web socket. This addon requires xterm.js v4+.
### Install
```bash
npm install --save xterm-addon-attach
npm install --save @xterm/addon-attach
```
### Usage
```ts
import { Terminal } from 'xterm';
import { AttachAddon } from 'xterm-addon-attach';
import { Terminal } from '@xterm/xterm';
import { AttachAddon } from '@xterm/addon-attach';
const terminal = new Terminal();
const attachAddon = new AttachAddon(webSocket);
terminal.loadAddon(attachAddon);
```
See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/xterm-addon-attach/typings/xterm-addon-attach.d.ts) for more advanced usage.
See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/addon-attach/typings/addon-attach.d.ts) for more advanced usage.
@@ -1,13 +1,14 @@
{
"name": "xterm-addon-search",
"name": "@xterm/addon-attach",
"version": "0.12.0",
"author": {
"name": "The xterm.js authors",
"url": "https://xtermjs.org/"
},
"main": "lib/xterm-addon-search.js",
"types": "typings/xterm-addon-search.d.ts",
"repository": "https://github.com/xtermjs/xterm.js",
"main": "lib/addon-attach.js",
"module": "lib/addon-attach.mjs",
"types": "typings/addon-attach.d.ts",
"repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/addon-attach",
"license": "MIT",
"keywords": [
"terminal",
@@ -18,9 +19,7 @@
"build": "../../node_modules/.bin/tsc -p .",
"prepackage": "npm run build",
"package": "../../node_modules/.bin/webpack",
"prepublishOnly": "npm run package"
},
"peerDependencies": {
"xterm": "^5.0.0"
"prepublishOnly": "npm run package",
"start": "node ../../demo/start"
}
}
@@ -5,13 +5,14 @@
* Implements the attach method, that attaches the terminal to a WebSocket stream.
*/
import { Terminal, IDisposable, ITerminalAddon } from 'xterm';
import type { Terminal, IDisposable, ITerminalAddon } from '@xterm/xterm';
import type { AttachAddon as IAttachApi } from '@xterm/addon-attach';
interface IAttachOptions {
bidirectional?: boolean;
}
export class AttachAddon implements ITerminalAddon {
export class AttachAddon implements ITerminalAddon , IAttachApi {
private _socket: WebSocket;
private _bidirectional: boolean;
private _disposables: IDisposable[] = [];
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es2015",
"target": "es2021",
"lib": [
"dom",
"es2015"
@@ -13,7 +13,12 @@
"strict": true,
"types": [
"../../../node_modules/@types/mocha"
]
],
"paths": {
"@xterm/addon-attach": [
"../typings/addon-attach.d.ts"
]
}
},
"include": [
"./**/*",
@@ -0,0 +1,42 @@
/**
* Copyright (c) 2019 The xterm.js authors. All rights reserved.
* @license MIT
*/
import WebSocket = require('ws');
import test from '@playwright/test';
import { ITestContext, createTestContext, openTerminal, pollFor, timeout } from '../../../test/playwright/TestUtils';
let ctx: ITestContext;
test.beforeAll(async ({ browser }) => {
ctx = await createTestContext(browser);
await openTerminal(ctx);
});
test.afterAll(async () => await ctx.page.close());
test.describe('Search Tests', () => {
test.beforeEach(async () => {
await ctx.proxy.reset();
});
test('string', async function(): Promise<any> {
const port = 8080;
const server = new WebSocket.Server({ port });
server.on('connection', socket => socket.send('foo'));
await ctx.page.evaluate(`window.term.loadAddon(new window.AttachAddon(new WebSocket('ws://localhost:${port}')))`);
await pollFor(ctx.page, `window.term.buffer.active.getLine(0).translateToString(true)`, 'foo');
server.close();
});
test('utf8', async function(): Promise<any> {
const port = 8080;
const server = new WebSocket.Server({ port });
const data = new Uint8Array([102, 111, 111]);
server.on('connection', socket => socket.send(data));
await ctx.page.evaluate(`window.term.loadAddon(new window.AttachAddon(new WebSocket('ws://localhost:${port}')))`);
await pollFor(ctx.page, `window.term.buffer.active.getLine(0).translateToString(true)`, 'foo');
server.close();
});
});
@@ -0,0 +1,35 @@
import { PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
testDir: '.',
timeout: 10000,
projects: [
{
name: 'ChromeStable',
use: {
browserName: 'chromium',
channel: 'chrome'
}
},
{
name: 'FirefoxStable',
use: {
browserName: 'firefox'
}
},
{
name: 'WebKit',
use: {
browserName: 'webkit'
}
}
],
reporter: 'list',
webServer: {
command: 'npm run start',
port: 3000,
timeout: 120000,
reuseExistingServer: !process.env.CI
}
};
export default config;
@@ -1,13 +1,12 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es2015",
"target": "ESNext",
"lib": [
"dom",
"es6"
"es2021",
],
"rootDir": ".",
"outDir": "../out",
"outDir": "../out-test",
"sourceMap": true,
"removeComments": true,
"baseUrl": ".",
@@ -20,9 +19,8 @@
]
},
"strict": true,
"downlevelIteration": true,
"types": [
"../../../node_modules/@types/mocha"
"../../../node_modules/@types/node"
]
},
"include": [
@@ -35,6 +33,9 @@
},
{
"path": "../../../src/browser"
},
{
"path": "../../../test/playwright"
}
]
}
@@ -3,9 +3,9 @@
* @license MIT
*/
import { Terminal, ITerminalAddon } from 'xterm';
import { Terminal, ITerminalAddon } from '@xterm/xterm';
declare module 'xterm-addon-attach' {
declare module '@xterm/addon-attach' {
export interface IAttachOptions {
/**
* Whether input should be written to the backend. Defaults to `true`.
@@ -6,7 +6,7 @@
const path = require('path');
const addonName = 'AttachAddon';
const mainFile = 'xterm-addon-attach.js';
const mainFile = 'addon-attach.js';
module.exports = {
entry: `./out/${addonName}.js`,
@@ -25,7 +25,9 @@ module.exports = {
filename: mainFile,
path: path.resolve('./lib'),
library: addonName,
libraryTarget: 'umd'
libraryTarget: 'umd',
// Force usage of globalThis instead of global / self. (This is cross-env compatible)
globalObject: 'globalThis',
},
mode: 'production'
};
@@ -8,6 +8,9 @@
!lib/**/*.js
!lib/**/*.js.map
!lib/**/*.mjs
!lib/**/*.mjs.map
!lib/**/*.css
# Whitelist - src/
@@ -1,4 +1,4 @@
Copyright (c) 2017, The xterm.js authors (https://github.com/xtermjs/xterm.js)
Copyright (c) 2023, The xterm.js authors (https://github.com/xtermjs/xterm.js)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+53
View File
@@ -0,0 +1,53 @@
## @xterm/addon-clipboard
An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables
accessing the system clipboard. This addon requires xterm.js v4+.
### Install
```bash
npm install --save @xterm/addon-clipboard
```
### Usage
```ts
import { Terminal } from 'xterm';
import { ClipboardAddon } from '@xterm/addon-clipboard';
const terminal = new Terminal();
const clipboardAddon = new ClipboardAddon();
terminal.loadAddon(clipboardAddon);
```
To use a custom clipboard provider
```ts
import { Terminal } from '@xterm/xterm';
import { ClipboardAddon, IClipboardProvider, ClipboardSelectionType } from '@xterm/addon-clipboard';
function b64Encode(data: string): string {
// Base64 encode impl
}
function b64Decode(data: string): string {
// Base64 decode impl
}
class MyCustomClipboardProvider implements IClipboardProvider {
private _data: string
public readText(selection: ClipboardSelectionType): Promise<string> {
return Promise.resolve(b64Encode(this._data));
}
public writeText(selection: ClipboardSelectionType, data: string): Promise<void> {
this._data = b64Decode(data);
return Promise.resolve();
}
}
const terminal = new Terminal();
const clipboardAddon = new ClipboardAddon(new MyCustomClipboardProvider());
terminal.loadAddon(clipboardAddon);
```
See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/addon-clipboard/typings/addon-clipboard.d.ts) for more advanced usage.
+22
View File
@@ -0,0 +1,22 @@
{
"name": "@xterm/addon-clipboard",
"version": "0.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@xterm/addon-clipboard",
"version": "0.1.0",
"license": "MIT",
"dependencies": {
"js-base64": "^3.7.5"
}
},
"node_modules/js-base64": {
"version": "3.7.7",
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.7.tgz",
"integrity": "sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==",
"license": "BSD-3-Clause"
}
}
}
+28
View File
@@ -0,0 +1,28 @@
{
"name": "@xterm/addon-clipboard",
"version": "0.2.0",
"author": {
"name": "The xterm.js authors",
"url": "https://xtermjs.org/"
},
"main": "lib/addon-clipboard.js",
"module": "lib/addon-clipboard.mjs",
"types": "typings/addon-clipboard.d.ts",
"repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/addon-clipboard",
"license": "MIT",
"keywords": [
"terminal",
"xterm",
"xterm.js"
],
"scripts": {
"build": "../../node_modules/.bin/tsc -p .",
"prepackage": "npm run build",
"package": "../../node_modules/.bin/webpack",
"prepublishOnly": "npm run package",
"start": "node ../../demo/start"
},
"dependencies": {
"js-base64": "^3.7.5"
}
}
@@ -0,0 +1,99 @@
/**
* Copyright (c) 2023 The xterm.js authors. All rights reserved.
* @license MIT
*/
import type { IDisposable, ITerminalAddon, Terminal } from '@xterm/xterm';
import { type IClipboardProvider, ClipboardSelectionType, type IBase64 } from '@xterm/addon-clipboard';
import { Base64 as JSBase64 } from 'js-base64';
export class ClipboardAddon implements ITerminalAddon {
private _terminal?: Terminal;
private _disposable?: IDisposable;
constructor(
private _base64: IBase64 = new Base64(),
private _provider: IClipboardProvider = new BrowserClipboardProvider()
) {}
public activate(terminal: Terminal): void {
this._terminal = terminal;
this._disposable = terminal.parser.registerOscHandler(52, data => this._setOrReportClipboard(data));
}
public dispose(): void {
return this._disposable?.dispose();
}
private _readText(sel: ClipboardSelectionType, data: string): void {
const b64 = this._base64.encodeText(data);
this._terminal?.input(`\x1b]52;${sel};${b64}\x07`, false);
}
private _setOrReportClipboard(data: string): boolean | Promise<boolean> {
const args = data.split(';');
if (args.length < 2) {
return true;
}
const pc = args[0] as ClipboardSelectionType;
const pd = args[1];
if (pd === '?') {
const text = this._provider.readText(pc);
// Report clipboard
if (text instanceof Promise) {
return text.then((data) => {
this._readText(pc, data);
return true;
});
}
this._readText(pc, text);
return true;
}
// Clear clipboard if text is not a base64 encoded string.
let text = '';
try {
text = this._base64.decodeText(pd);
} catch {}
const result = this._provider.writeText(pc, text);
if (result instanceof Promise) {
return result.then(() => true);
}
return true;
}
}
export class BrowserClipboardProvider implements IClipboardProvider {
public async readText(selection: ClipboardSelectionType): Promise<string> {
if (selection !== 'c') {
return Promise.resolve('');
}
return navigator.clipboard.readText();
}
public async writeText(selection: ClipboardSelectionType, text: string): Promise<void> {
if (selection !== 'c') {
return Promise.resolve();
}
return navigator.clipboard.writeText(text);
}
}
export class Base64 implements IBase64 {
public encodeText(data: string): string {
return JSBase64.encode(data);
}
public decodeText(data: string): string {
const text = JSBase64.decode(data);
if (!JSBase64.isValid(data) || JSBase64.encode(text) !== data) {
return '';
}
return text;
}
}
+35
View File
@@ -0,0 +1,35 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es2021",
"lib": [
"dom",
"es2015"
],
"rootDir": ".",
"outDir": "../out",
"sourceMap": true,
"removeComments": true,
"strict": true,
"types": [
"../../../node_modules/@types/mocha"
],
"paths": {
"browser/*": [
"../../../src/browser/*"
],
"@xterm/addon-clipboard": [
"../typings/addon-clipboard.d.ts"
]
}
},
"include": [
"./**/*",
"../../../typings/xterm.d.ts"
],
"references": [
{
"path": "../../../src/browser"
}
]
}
@@ -0,0 +1,78 @@
/**
* Copyright (c) 2023 The xterm.js authors. All rights reserved.
* @license MIT
*/
import test from '@playwright/test';
import { deepEqual, ok, strictEqual } from 'assert';
import { ITestContext, createTestContext, launchBrowser, openTerminal, timeout } from '../../../test/playwright/TestUtils';
let ctx: ITestContext;
test.beforeAll(async ({ browser }, testInfo) => {
ctx = await createTestContext(browser);
await openTerminal(ctx);
});
test.afterAll(async () => {
await ctx.page.close();
});
test.describe('ClipboardAddon', () => {
test.beforeEach(async ({}, testInfo) => {
// DEBT: This test doesn't work since the migration to @playwright/test
if (ctx.browser.browserType().name() !== 'chromium') {
testInfo.skip();
return;
}
if (ctx.browser.browserType().name() === 'chromium') {
// Enable clipboard access in chromium without user gesture
await ctx.page.context().grantPermissions(['clipboard-read', 'clipboard-write']);
}
await ctx.page.evaluate(`
window.term.reset()
window.clipboard?.dispose();
window.clipboard = new ClipboardAddon();
window.term.loadAddon(window.clipboard);
`);
});
test.beforeEach(async () => {
await ctx.proxy.reset();
});
const testDataEncoded = 'aGVsbG8gd29ybGQ=';
const testDataDecoded = 'hello world';
test.describe('write data', async function (): Promise<any> {
test('simple string', async () => {
await ctx.proxy.write(`\x1b]52;c;${testDataEncoded}\x07`);
deepEqual(await ctx.page.evaluate(() => window.navigator.clipboard.readText()), testDataDecoded);
});
test('invalid base64 string', async () => {
await ctx.proxy.write(`\x1b]52;c;${testDataEncoded}invalid\x07`);
deepEqual(await ctx.page.evaluate(() => window.navigator.clipboard.readText()), '');
});
test('empty string', async () => {
await ctx.proxy.write(`\x1b]52;c;${testDataEncoded}\x07`);
await ctx.proxy.write(`\x1b]52;c;\x07`);
deepEqual(await ctx.page.evaluate(() => window.navigator.clipboard.readText()), '');
});
});
test.describe('read data', async function (): Promise<any> {
test('simple string', async () => {
await ctx.page.evaluate(`
window.data = [];
window.term.onData(e => data.push(e));
`);
await ctx.page.evaluate(() => window.navigator.clipboard.writeText('hello world'));
await ctx.proxy.write(`\x1b]52;c;?\x07`);
deepEqual(await ctx.page.evaluate('window.data'), [`\x1b]52;c;${testDataEncoded}\x07`]);
});
test('clear clipboard', async () => {
await ctx.proxy.write(`\x1b]52;c;!\x07`);
await ctx.proxy.write(`\x1b]52;c;?\x07`);
deepEqual(await ctx.page.evaluate(() => window.navigator.clipboard.readText()), '');
});
});
});
@@ -0,0 +1,35 @@
import { PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
testDir: '.',
timeout: 10000,
projects: [
{
name: 'ChromeStable',
use: {
browserName: 'chromium',
channel: 'chrome'
}
},
{
name: 'FirefoxStable',
use: {
browserName: 'firefox'
}
},
{
name: 'WebKit',
use: {
browserName: 'webkit'
}
}
],
reporter: 'list',
webServer: {
command: 'npm run start',
port: 3000,
timeout: 120000,
reuseExistingServer: !process.env.CI
}
};
export default config;
@@ -1,13 +1,12 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es2015",
"target": "ESNext",
"lib": [
"dom",
"es6"
"es2021",
],
"rootDir": ".",
"outDir": "../out",
"outDir": "../out-test",
"sourceMap": true,
"removeComments": true,
"baseUrl": ".",
@@ -20,9 +19,8 @@
]
},
"strict": true,
"downlevelIteration": true,
"types": [
"../../../node_modules/@types/mocha"
"../../../node_modules/@types/node"
]
},
"include": [
@@ -35,6 +33,9 @@
},
{
"path": "../../../src/browser"
},
{
"path": "../../../test/playwright"
}
]
}
+113
View File
@@ -0,0 +1,113 @@
/**
* Copyright (c) 2023 The xterm.js authors. All rights reserved.
* @license MIT
*/
import { Terminal, ITerminalAddon } from '@xterm/xterm';
declare module '@xterm/addon-clipboard' {
/**
* An xterm.js addon that enables accessing the system clipboard from
* xterm.js.
*/
export class ClipboardAddon implements ITerminalAddon {
/**
* Creates a new clipboard addon.
* @param base64 An optional base64 encoder/decoder.
* @param provider An optional clipboard provider.
*/
constructor(base64?: IBase64, provider?: IClipboardProvider);
/**
* Activates the addon
* @param terminal The terminal the addon is being loaded in.
*/
public activate(terminal: Terminal): void;
/**
* Disposes the addon.
*/
public dispose(): void
}
/**
* Clipboard selection type. This is used to specify which selection buffer to
* read or write to.
* - SYSTEM `c`: The system clipboard.
* - PRIMARY `p`: The primary clipboard. This is provided for compatibility
* with Linux X11.
*/
export const enum ClipboardSelectionType {
SYSTEM = 'c',
PRIMARY = 'p',
}
export interface IBase64 {
/**
* Converts a utf-8 string to a base64 string.
* @param data The utf-8 string to convert to base64 string.
*/
encodeText(data: string): string;
/**
* Converts a base64 string to a utf-8 string.
* @param data The base64 string to convert to utf-8 string.
* @throws An error if the input is not valid base64.
*/
decodeText(data: string): string;
}
/**
* A default Base64 encoding and decoding type.
**/
export class Base64 implements IBase64 {
/**
* Converts a utf-8 string to a base64 string.
* @param data The utf-8 string to convert to base64 string.
*/
public encodeText(data: string): string;
/**
* Converts a base64 string to a utf-8 string.
* @param data The base64 string to convert to utf-8 string.
* @throws An error if the input is not valid base64.
*/
public decodeText(data: string): string;
}
export interface IClipboardProvider {
/**
* Gets the clipboard content.
* @param selection The clipboard selection to read.
* @returns A promise that resolves with clipboard selection data.
*/
readText(selection: ClipboardSelectionType): string | Promise<string>;
/**
* Sets the clipboard content.
* @param selection The clipboard selection to set.
* @param data The clipboard text to write.
*/
writeText(selection: ClipboardSelectionType, text: string): void | Promise<void>;
}
/**
* The clipboard provider interface that enables xterm.js to access the system clipboard.
*/
export class BrowserClipboardProvider implements IClipboardProvider{
/**
* Reads text from the clipboard.
* @param selection The selection type to read from.
* @returns A promise that resolves with the text from the clipboard.
*/
public readText(selection: ClipboardSelectionType): Promise<string>;
/**
* Writes text to the clipboard.
* @param selection The selection type to write to.
* @param data The text to write to the clipboard.
* @returns A promise that resolves when the text has been written to the clipboard.
*/
public writeText(selection: ClipboardSelectionType, data: string): Promise<void>;
}
}
@@ -1,12 +1,12 @@
/**
* Copyright (c) 2019 The xterm.js authors. All rights reserved.
* Copyright (c) 2023 The xterm.js authors. All rights reserved.
* @license MIT
*/
const path = require('path');
const addonName = 'FitAddon';
const mainFile = 'xterm-addon-fit.js';
const addonName = 'ClipboardAddon';
const mainFile = 'addon-clipboard.js';
module.exports = {
entry: `./out/${addonName}.js`,
+8
View File
@@ -0,0 +1,8 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
js-base64@^3.7.5:
version "3.7.7"
resolved "https://registry.npmjs.org/js-base64/-/js-base64-3.7.7.tgz"
integrity sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==
@@ -8,6 +8,9 @@
!lib/**/*.js
!lib/**/*.js.map
!lib/**/*.mjs
!lib/**/*.mjs.map
!lib/**/*.css
# Whitelist - src/
@@ -1,18 +1,18 @@
## xterm-addon-fit
## @xterm/addon-fit
An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables fitting the terminal's dimensions to a containing element. This addon requires xterm.js v4+.
### Install
```bash
npm install --save xterm-addon-fit
npm install --save @xterm/addon-fit
```
### Usage
```ts
import { Terminal } from 'xterm';
import { FitAddon } from 'xterm-addon-fit';
import { Terminal } from '@xterm/xterm';
import { FitAddon } from '@xterm/addon-fit';
const terminal = new Terminal();
const fitAddon = new FitAddon();
@@ -21,4 +21,4 @@ terminal.open(containerElement);
fitAddon.fit();
```
See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/xterm-addon-fit/typings/xterm-addon-fit.d.ts) for more advanced usage.
See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/addon-fit/typings/addon-fit.d.ts) for more advanced usage.
@@ -1,13 +1,14 @@
{
"name": "xterm-addon-fit",
"version": "0.7.0",
"name": "@xterm/addon-fit",
"version": "0.11.0",
"author": {
"name": "The xterm.js authors",
"url": "https://xtermjs.org/"
},
"main": "lib/xterm-addon-fit.js",
"types": "typings/xterm-addon-fit.d.ts",
"repository": "https://github.com/xtermjs/xterm.js",
"main": "lib/addon-fit.js",
"module": "lib/addon-fit.mjs",
"types": "typings/addon-fit.d.ts",
"repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/addon-fit",
"license": "MIT",
"keywords": [
"terminal",
@@ -18,9 +19,7 @@
"build": "../../node_modules/.bin/tsc -p .",
"prepackage": "npm run build",
"package": "../../node_modules/.bin/webpack",
"prepublishOnly": "npm run package"
},
"peerDependencies": {
"xterm": "^5.0.0"
"prepublishOnly": "npm run package",
"start": "node ../../demo/start"
}
}
@@ -3,8 +3,10 @@
* @license MIT
*/
import { Terminal, ITerminalAddon } from 'xterm';
import type { Terminal, ITerminalAddon } from '@xterm/xterm';
import type { FitAddon as IFitApi } from '@xterm/addon-fit';
import { IRenderDimensions } from 'browser/renderer/shared/Types';
import { ViewportConstants } from 'browser/shared/Constants';
interface ITerminalDimensions {
/**
@@ -21,11 +23,9 @@ interface ITerminalDimensions {
const MINIMUM_COLS = 2;
const MINIMUM_ROWS = 1;
export class FitAddon implements ITerminalAddon {
export class FitAddon implements ITerminalAddon , IFitApi {
private _terminal: Terminal | undefined;
constructor() {}
public activate(terminal: Terminal): void {
this._terminal = terminal;
}
@@ -65,8 +65,9 @@ export class FitAddon implements ITerminalAddon {
return undefined;
}
const scrollbarWidth = this._terminal.options.scrollback === 0 ?
0 : core.viewport.scrollBarWidth;
const scrollbarWidth = (this._terminal.options.scrollback === 0
? 0
: (this._terminal.options.overviewRuler?.width || ViewportConstants.DEFAULT_SCROLL_BAR_WIDTH));
const parentElementStyle = window.getComputedStyle(this._terminal.element.parentElement);
const parentElementHeight = parseInt(parentElementStyle.getPropertyValue('height'));
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es2015",
"target": "es2021",
"lib": [
"dom",
"es2015"
@@ -17,6 +17,9 @@
"paths": {
"browser/*": [
"../../../src/browser/*"
],
"@xterm/addon-fit": [
"../typings/addon-fit.d.ts"
]
}
},
+133
View File
@@ -0,0 +1,133 @@
/**
* Copyright (c) 2019 The xterm.js authors. All rights reserved.
* @license MIT
*/
import test from '@playwright/test';
import { deepEqual, ok, strictEqual } from 'assert';
import { ITestContext, createTestContext, openTerminal, timeout } from '../../../test/playwright/TestUtils';
let ctx: ITestContext;
test.beforeAll(async ({ browser }) => {
ctx = await createTestContext(browser);
ctx.page.setViewportSize({ width: 1024, height: 768 });
await openTerminal(ctx);
});
test.afterAll(async () => await ctx.page.close());
test.describe('FitAddon', () => {
test.beforeEach(async function(): Promise<any> {
await ctx.page.evaluate(`document.querySelector('#terminal-container').style.display=''`);
await ctx.page.evaluate(`
window.term.reset()
window.fit?.dispose();
window.fit = new FitAddon();
window.term.loadAddon(window.fit);
`);
});
// test.beforeEach(async function(): Promise<any> {
// await ctx.page.evaluate(`document.querySelector('#terminal-container').style.display=''`);
// await openTerminal(page);
// });
// after(async () => {
// await browser.close();
// });
// afterEach(async function(): Promise<any> {
// await ctx.proxy.dispose();
// });
test('no terminal', async function(): Promise<any> {
await ctx.page.evaluate(`window.fit2 = new FitAddon();`);
strictEqual(await ctx.page.evaluate(`window.fit2.proposeDimensions()`), undefined);
await ctx.page.evaluate(`window.fit2.dispose();`);
});
test.describe('proposeDimensions', () => {
test('default', async function(): Promise<any> {
await setDimensions();
const dimensions: {cols: number, rows: number} = await ctx.page.evaluate(`window.fit.proposeDimensions()`);
ok(dimensions.cols > 85);
ok(dimensions.cols < 88);
ok(dimensions.rows > 24);
ok(dimensions.rows < 29);
});
test('width', async function(): Promise<any> {
await setDimensions(1008);
const dimensions: {cols: number, rows: number} = await ctx.page.evaluate(`window.fit.proposeDimensions()`);
ok(dimensions.cols > 108);
ok(dimensions.cols < 111);
ok(dimensions.rows > 24);
ok(dimensions.rows < 29);
});
test('small', async function(): Promise<any> {
await setDimensions(1, 1);
deepEqual(await ctx.page.evaluate(`window.fit.proposeDimensions()`), {
cols: 2,
rows: 1
});
});
test('hidden', async function(): Promise<any> {
await ctx.proxy.dispose();
await ctx.page.evaluate(`document.querySelector('#terminal-container').style.display='none'`);
await ctx.page.evaluate(`window.term = new Terminal()`);
await ctx.page.evaluate(`window.term.open(document.querySelector('#terminal-container'))`);
await setDimensions();
const dimensions: { cols: number, rows: number } | undefined = await ctx.page.evaluate(`window.fit.proposeDimensions()`);
// The value of dims will be undefined if the char measure strategy falls back to the DOM
// method, so only assert if it's not undefined.
if (dimensions) {
ok(dimensions.cols > 85);
ok(dimensions.cols < 88);
ok(dimensions.rows > 24);
ok(dimensions.rows < 29);
}
});
});
test.describe('fit', () => {
test('default', async function(): Promise<any> {
await setDimensions();
await ctx.page.evaluate(`window.fit.fit()`);
const cols: number = await ctx.proxy.cols;
const rows: number = await ctx.proxy.rows;
ok(cols > 85);
ok(cols < 88);
ok(rows > 24);
ok(rows < 29);
});
test('width', async function(): Promise<any> {
await setDimensions(1008);
await ctx.page.evaluate(`window.fit.fit()`);
const cols: number = await ctx.proxy.cols;
const rows: number = await ctx.proxy.rows;
ok(cols > 108);
ok(cols < 111);
ok(rows > 24);
ok(rows < 29);
});
test('small', async function(): Promise<any> {
await setDimensions(1, 1);
await ctx.page.evaluate(`window.fit.fit()`);
strictEqual(await ctx.proxy.cols, 2);
strictEqual(await ctx.proxy.rows, 1);
});
});
});
async function setDimensions(width: number = 800, height: number = 450): Promise<void> {
await ctx.page.evaluate(`
document.querySelector('#terminal-container').style.width='${width}px';
document.querySelector('#terminal-container').style.height='${height}px';
document.querySelector('#terminal-container').style.display='';
`);
// HACK: Await a short period as hiding #terminal-container can mess with other tests
await timeout(500);
}
@@ -0,0 +1,35 @@
import { PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
testDir: '.',
timeout: 10000,
projects: [
{
name: 'ChromeStable',
use: {
browserName: 'chromium',
channel: 'chrome'
}
},
{
name: 'FirefoxStable',
use: {
browserName: 'firefox'
}
},
{
name: 'WebKit',
use: {
browserName: 'webkit'
}
}
],
reporter: 'list',
webServer: {
command: 'npm run start',
port: 3000,
timeout: 120000,
reuseExistingServer: !process.env.CI
}
};
export default config;
+41
View File
@@ -0,0 +1,41 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "ESNext",
"lib": [
"es2021",
],
"rootDir": ".",
"outDir": "../out-test",
"sourceMap": true,
"removeComments": true,
"baseUrl": ".",
"paths": {
"common/*": [
"../../../src/common/*"
],
"browser/*": [
"../../../src/browser/*"
]
},
"strict": true,
"types": [
"../../../node_modules/@types/node"
]
},
"include": [
"./**/*",
"../../../typings/xterm.d.ts"
],
"references": [
{
"path": "../../../src/common"
},
{
"path": "../../../src/browser"
},
{
"path": "../../../test/playwright"
}
]
}
@@ -3,9 +3,9 @@
* @license MIT
*/
import { Terminal, ITerminalAddon } from 'xterm';
import { Terminal, ITerminalAddon } from '@xterm/xterm';
declare module 'xterm-addon-fit' {
declare module '@xterm/addon-fit' {
/**
* An xterm.js addon that enables resizing the terminal to the dimensions of
* its containing element.
@@ -39,7 +39,7 @@ declare module 'xterm-addon-fit' {
}
/**
* Reprepresents the dimensions of a terminal.
* Represents the dimensions of a terminal.
*/
export interface ITerminalDimensions {
/**
@@ -5,8 +5,8 @@
const path = require('path');
const addonName = 'SerializeAddon';
const mainFile = 'xterm-addon-serialize.js';
const addonName = 'FitAddon';
const mainFile = 'addon-fit.js';
module.exports = {
entry: `./out/${addonName}.js`,
@@ -26,7 +26,8 @@ module.exports = {
path: path.resolve('./lib'),
library: addonName,
libraryTarget: 'umd',
globalObject: 'this'
// Force usage of globalThis instead of global / self. (This is cross-env compatible)
globalObject: 'globalThis',
},
mode: 'production'
};
+33
View File
@@ -0,0 +1,33 @@
node_modules/
*.swp
.lock-wscript
lib/
out/
out-test/
out-worker/
.nyc_output/
Makefile.gyp
*.Makefile
*.target.gyp.mk
*.node
example/*.log
docs/
npm-debug.log
/.idea/
.env
build/
.DS_Store
yarn.lock
# Keep bundled code out of Git
dist/
demo/dist/
# skip benchmark & inwasm folders, except builds
.benchmark/
timeline/
inwasm-sdks/
inwasm-builds/
!inwasm-builds/**/final.wat
!inwasm-builds/**/final.wasm
!inwasm-builds/**/definition.json
+12
View File
@@ -0,0 +1,12 @@
.github
fixture
overwrite
bootstrap.sh
tsconfig.json
webpack.config.js
test
out-test
out-esbuild
out-esbuild-test
inwasm-sdks
inwasm-builds
+19
View File
@@ -0,0 +1,19 @@
Copyright (c) 2019, 2020, 2021, 2022, 2023 The xterm.js authors (https://github.com/xtermjs/xterm.js)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
+231
View File
@@ -0,0 +1,231 @@
## @xterm/addon-image
Inline image output in xterm.js. Supports SIXEL and iTerm's inline image protocol (IIP).
![](fixture/example.png)
### Install from npm
```bash
npm install --save @xterm/addon-image
```
### Usage
```ts
import { Terminal } from '@xterm/xterm';
import { ImageAddon, IImageAddonOptions } from '@xterm/addon-image';
// customize as needed (showing addon defaults)
const customSettings: IImageAddonOptions = {
enableSizeReports: true, // whether to enable CSI t reports (see below)
pixelLimit: 16777216, // max. pixel size of a single image
sixelSupport: true, // enable sixel support
sixelScrolling: true, // whether to scroll on image output
sixelPaletteLimit: 256, // initial sixel palette size
sixelSizeLimit: 25000000, // size limit of a single sixel sequence
storageLimit: 128, // FIFO storage limit in MB
showPlaceholder: true, // whether to show a placeholder for evicted images
iipSupport: true, // enable iTerm IIP support
iipSizeLimit: 20000000 // size limit of a single IIP sequence
}
// initialization
const terminal = new Terminal();
const imageAddon = new ImageAddon(customSettings);
terminal.loadAddon(imageAddon);
```
### General Notes
- *IMPORTANT:* The worker approach as done in previous releases got removed.
The addon contructor no longer expects a worker path as first argument.
- By default the addon will activate these `windowOptions` reports on the terminal:
- getWinSizePixels (CSI 14 t)
- getCellSizePixels (CSI 16 t)
- getWinSizeChars (CSI 18 t)
to help applications getting useful terminal metrics for their image preparations. Set `enableSizeReports` in the constructor options to `false`, if you dont want the addon to alter these terminal settings. This is especially useful, if you have very strict security needs not allowing any terminal reports, or deal with `windowOptions` by other means.
### Operation Modes
- **SIXEL Support**
Set by default, change it with `{sixelSupport: true}`.
- **Scrolling On | Off**
By default scrolling is on, thus an image will advance the cursor at the bottom if needed.
(see cursor positioning).
If scrolling is off, the image gets painted from the top left of the current viewport
and might be truncated if the image exceeds the viewport size.
The cursor position does not change.
You can customize this behavior with the constructor option `{sixelScrolling: false}`
or with `DECSET 80` (off, binary: `\x1b [ ? 80 h`) and
`DECRST 80` (on, binary: `\x1b [ ? 80 l`) during runtime.
- **Cursor Positioning**
If scrolling is set, the cursor will be placed at the first image column of the last image row (VT340 mode).
Other cursor positioning modes as used by xterm or mintty are not supported.
- **SIXEL Palette Handling**
By default the addon limits the palette size to 256 registers (as demanded by the DEC specification).
The limit can be increased to a maximum of 4096 registers (via `sixelPaletteLimit`).
The default palette is a mixture of VT340 colors (lower 16 registers), xterm colors (up to 256) and zeros (up to 4096).
There is no private/shared palette distinction, palette colors are always carried over from a previous sixel image.
Restoring the default palette size and colors is possible with `XTSMGRAPHICS 1 ; 2` (binary: `\x1b[?1;2S`).
It gets also restored automatically on RIS and DECSTR.
Other than on older terminals, the underlying SIXEL library applies colors immediately to individual pixels
(*printer mode*), thus it is technically possible to use more colors in one image than the palette has color slots.
This feature is called *high-color* in libsixel.
A terminal wide shared palette mode with late indexed coloring of the output is not supported,
therefore palette animations cannot be used.
- **SIXEL Raster Attributes Handling**
If raster attributes were found in the SIXEL data (level 2), the image will always be truncated to the given height/width extend. We deviate here from the specification on purpose, as it allows several processing optimizations. For level 1 SIXEL data without any raster attributes the image can freely grow in width and height up to the last data byte, which has a much higher processing penalty. In general encoding libraries should not create level 1 data anymore and should not produce pixel information beyond the announced height/width extend. Both is discouraged by the >30 years old specification.
Currently the SIXEL implementation of the addon does not take custom pixel sizes into account, a SIXEL pixel will map 1:1 to a screen pixel.
- **IIP Support (iTerm's Inline Image Protocol)**
Set by default, change it with `{iipSupport: true}`.
The IIP implementation has the following features / restrictions (sequence will silently fail for unmet conditions):
- Supported formats: PNG, JPEG and GIF
- No animation support.
- Image type hinting is not supported (always deducted from data header).
- File download is not supported.
- Filename gets parsed but not used.
- Strict base64 handling as of RFC4648 §4 (standard alphabet, optional padding, no separator bytes allowed).
- Payload size may not exceed CEIL(sizeParameter * 4 / 3).
- Image scaling beyond terminal viewport size is allowed (e.g. `width=200%`).
- Image pixel size is restricted by `pixelLimit` (pre- and post resizing).
- Size parameter is restricted by `iipSizeLimit`.
- Cursor positioning behaves the same as for sixel (see above).
### Storage and Drawing Settings
The internal storage holds images up to `storageLimit` (in MB, calculated as 4-channel RBGA unpacked, default 100 MB). Once hit images get evicted by FIFO rules. Furthermore images on the alternate buffer will always be erased on buffer changes.
The addon exposes two properties to interact with the storage limits at runtime:
- `storageLimit`
Change the value to your needs at runtime. This is especially useful, if you have multiple terminal
instances running, that all add to one upper memory limit.
- `storageUsage`
Inspect the current memory usage of the image storage.
By default the addon will show a placeholder pattern for evicted images that are still part
of the terminal (e.g. in the scrollback). The pattern can be deactivated by toggling `showPlaceholder`.
### Image Data Retrieval
The addon provides the following API endpoints to retrieve raw image data as canvas:
- `getImageAtBufferCell(x: number, y: number): HTMLCanvasElement | undefined`
Returns the canvas containing the original image data (not resized) at the given buffer position.
The buffer position is the 0-based absolute index (including scrollback at top).
- `extractTileAtBufferCell(x: number, y: number): HTMLCanvasElement | undefined`
Returns a canvas containing the actual single tile image data (maybe resized) at the given buffer position.
The buffer position is the 0-based absolute index (including scrollback at top).
Note that the canvas gets created and data copied over for every call, thus it is not suitable for performance critical actions.
### Memory Usage
The addon does most image processing in Javascript and therefore can occupy a rather big amount of memory. To get an idea where the memory gets eaten, lets look at the data flow and processing steps:
- Incomming image data chunk at `term.write` (terminal)
`term.write` might stock up incoming chunks. To circumvent this, you will need proper flow control (see xterm.js docs). Note that with image output it is more likely to run into this issue, as it can create lots of MBs in very short time.
- Sequence Parser (terminal)
The parser operates on a buffer containing up to 2^17 codepoints (~0.5 MB).
- Sequence Handler - Chunk Decoding (addon)
Image data chunks are processed immediately by the SIXEL decoder (streamlined). The decoder allocates memory for image
pixels as needed. The allowed image size is restricted by `pixelLimit` (default 16M pixels), the decoder holds 2 pixel buffers at maximum during decoding (RGBA, ~128 MB for 16M pixels).
- Sequence Handler - Image Finalization (addon)
After decoding the final pixel buffer is grabbed by the sequence handler and written to a canvas of the same size (~64 MB for 16M pixels) and added to the storage.
- Image Storage (addon)
The image storage implements a FIFO cache, that will remove old images, if a new one arrives and `storageLimit` is hit (default 128 MB). The storage holds a canvas with the original image, and may additionally hold resized versions of images after a font rescaling. Both are accounted in `storageUsage` as a rough estimation of _pixels x 4 channels_.
Following the steps above, a rough estimation of maximum memory usage by the addon can be calculated with these formulas (in bytes):
```typescript
// storage alone
const storageBytes = storageUsage * storageLimit * 1024 * 1024;
// decoding alone
const decodingBytes = sixelSizeLimit + 2 * (pixelLimit * 4);
// totals
// inactive decoding
const totalInactive = storageBytes;
// active decoding
const totalActive = storageBytes + decodingBytes;
```
Note that browsers have offloading tricks for rarely touched memory segments, esp. `storageBytes` might not directly translate into real memory usage. Usage peaks will happen during active decoding of multiple big images due to the need of 2 full pixel buffers at the same time, which cannot be offloaded. Thus you may want to keep an eye on `pixelLimit` under limited memory conditions.
Further note that the formulas above do not respect the Javascript object's overhead. Compared to the raw buffer needs the book keeping by these objects is rather small (<<5%).
_Why should I care about memory usage at all?_
Well you don't have to, and it probably will just work fine with the addon defaults. But for bigger integrations, where much more data is held in the Javascript context (like multiple terminals on one page), it is likely to hit the engine's memory limit sooner or later under decoding and/or storage pressure.
_How can I adjust the memory usage?_
- `pixelLimit`
A constructor setting, thus you would have to anticipate, whether (multiple) terminals in your page gonna do lots of concurrent decoding. Since this is normally not the case and the memory usage is only temporarily peaking, a rather high value should work even with multiple terminals in one page.
- `storageLimit`
A constructor and a runtime setting. In conjunction with `storageUsage` you can do runtime checks and adjust the limit to your needs. If you have to lower the limit below the current usage, images will be removed in FIFO order and may turn into a placeholder in the terminal's scrollback (if `showPlaceholder` is set). When adjusting keep in mind to leave enough room for memory peaking for decoding.
- `sixelSizeLimit`
A constructor setting. This has only a small impact on peaking memory during decoding. It is meant to avoid processing of overly big or broken SIXEL sequences at an earlier phase, thus may stop the decoder from entering its memory intensive task for potentially invalid data.
### Terminal Interaction
- Images already on the terminal screen will reshape on font-rescaling to keep the terminal cell coverage intact.
This behavior might diverge from other terminals, but is in general the more desired one.
- On terminal resize images may expand to the right automatically, if they were right-truncated before.
They never expand to the bottom, if they were bottom-truncated before (e.g. from scrolling-off).
- Text autowrapping from terminal resize may break and wrap images into multiple parts. This is unfortunate,
but cannot be avoided, while sticking to the stronger terminal text-grid mechanics.
(Yes images are a second class citizen on a mainly text-driven interface.)
- Characters written over an image will erase the image information for affected cells.
- Images are painted above BG/FG data not erasing it. More advanced "composition tricks" like painting images
below FG/BG data are not possible. (We currently dont hook into BG/FG rendering itself.)
- Previous image data at a cell will be erased on new image data. (We currently have no transparency composition.)
### Performance & Latency
- Performance should be good enough for occasional SIXEL output from REPLs, up to downscaled movies
from `mpv` with its SIXEL renderer (tested in the demo). For 3rd party xterm.js integrations this
furthermore depends highly on the overall incoming data throughput.
- Image processing has a high latency. Most of the latency though is inherited from xterm.js' incoming data route
(PTY -> server process -> websocket -> xterm.js async parsing), where every step creates more waiting time.
Since we cannot do much about that "long line", keep that in mind when you try to run more demanding applications with realtime drawing and interactive response needs.
### Status
- Sixel support and image handling in xterm.js is considered beta quality.
- IIP support is in alpha stage. Please file a bug for any awkwardities.
### Changelog
- 0.5.0 integrate with xtermjs base repo (at v0.4.3)
- 0.4.3 defer canvas creation
- 0.4.2 fix image canvas resize
- 0.4.1 compat release for xterm.js 5.2.0
- 0.4.0 IIP support
- 0.3.1 compat release for xterm.js 5.1.0
- 0.3.0 important change: worker removed from addon
- 0.2.0 compat release for xterm.js 5.0.0
- 0.1.3 bugfix: avoid striping
- 0.1.2 bugfix: reset clear flag
- 0.1.1 bugfixes:
- clear sticky image tiles on render
- create folder from bootstrap.sh
- fix peer dependency in package.json
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
# sixel endless mode
# Should print an endless sine curve, abort with Ctrl-C.
period=200
amplitude=50
sixels=(@\$ A\$ C\$ G\$ O\$ _\$-)
pi=$(echo "scale=10; 4*a(1)" | bc -l)
run=true
trap run=false INT
echo -ne "\x1bP0;0;0q\"1;1#1;2;100;0;0#1"
y=0
while $run
do
x=$(echo "s(2*${pi}*${y}/${period})*${amplitude}+2*${amplitude}+0.5" | bc -l)
echo -ne "!${x%%.*}?${sixels[$((y%6))]}"
(( y++ ))
done
echo -e "\x1b\\"
Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

+52
View File
@@ -0,0 +1,52 @@
#!/bin/bash
# GLF should move the text cursor downwards,
# even if no pixels were modified,
# when sixel scrolling is on.
echo -n $'\e[?80l' # Ensure sixel scrolling is on (disable DECSDM)
clear
echo "A test of Sixel GLF (Graphics Line Feed) when sixel scrolling is on"
echo
# Move cursor down three using GLF ("-")
echo -e '\x1bPq$-$-$-$-\x1b\\'
# Show a single sixel line that says, "Your terminal ->"
cat <<'EOF'
P0;0;0q"1;1;244;21#0;2;0;0;0#1;2;80;80;80#0~~~NFFFN~~~n!4FN!68~NFN!64~bbb!42~rbbbBB!41~$#1???owwwo???O!4wo!68?owo!64?[[[!42?K[[[{{-#0!5~{woBFB`o{}!4~NFBpp!4xpbBF~~~x@@@~~~xxp@@!5~xxp@@b`pxwxpz!17~zpp???!5px!5~NFBpxxwxxpBBN!4~xxp@@b`pxwxpz~x@@@xxp@@pxx@@F!4~xppp@@!8~x@@@pxxwxp@B!5~zxXXXWXX@BF!10~??!24~!10^FNN^~~~$#1!5?BFN{w{]NB@!4?ow{MM!4EM[{w???E}}}???EEM}}!5?EEM}}[]MEFEMC!17?CMM~~~!5ME!5?ow{MEEFEEM{{o!4?EEM}}[]MEFEMC?E}}}EEM}}MEE}}w!4?EMMM}}!8?E}}}MEEFEM}{!5?CEeeefee}{w!10?~~!24?!10_woo_-#0!5~nFFF??FFN!5~wo_FF!4NFb_o!4~{o_!4Ffb??Fn~~~NFF??!4FN!23~_??!5NFFn~~~w__C!7KCC!4~NFF??!4FN!4~N???N~~??Fn~???N~~N!4F??!4Fn~~~F???Fn~~nF??Fn~~p??KMMMEE???Fn~~~N!4F??!4Fn!29~{{}!4~$#1!5?Owww~~wwo!5?FN^ww!4ow[^N!4?BN^!4wW[~~wO???oww~~!4wo!23?^~~!5owwO???F^^z!7rzz!4?oww~~!4wo!4?o~~~o??~~wO?~~~o??o!4w~~!4wO???w~~~wO??Ow~~wO??M~~rpppxx~~~wO???o!4w~~!4wO!29?BB@-#0!25FE!63FE!15FE!77FE!60F$#1!25?@!63?@!15?@!77?@-\
EOF
sleep 1
tput cup 2 30
# Show four lines saying, "<- A genuine VT340 would end here"
cat <<'EOF'
P0;0;0q"1;1;144;80#0;2;0;0;0#1;2;80;80;80#0~~rpp@@`@BN!25~!11^!5~^^^N^^^!6~!7^N^^^!5~!4^~~~!5^!6~^^^WWW!8~!7^N^^^!8~^^^N^^^!5~$#1??KMM}}]}{o!25?!11_!5?___o___!6?!7_o___!5?!4_???!5_!6?___fff!8?!7_o___!8?___o___-#0~~NB??EFE??@F^!19~B??{!4}{W??}}~~B@?K!5MK??B~~~}???{!4}{??!4~}???~~~}}{??!6~}{{{??!8~}???{!4}{??!4~B@?K!5MK??B~~$#1??o{~~xwx~~}w_!19?{~~B!4@Bf~~@@??{}~r!5pr~~{???@~~~B!4@B~~!4?@~~~???@@B~~!6?@BBB~~!8?@~~~B!4@B~~!4?{}~r!5pr~~{-#0rpoopr~~~zpooopr!17~}{ww!4pwW??!4~}wwprrb!4rpp~~~pooopz~~zpoopz!4~{w!4pxwoopz~~~r!4poo!4pz~~~pooopz~~zpoopz~~}wwprrb!4rpp~~$#1KMNNMK???CMNNNMK!17?@BFF!4MFf~~!4?@FFMKK[!4KMM???MNNNMC??CMNNMC!4?BF!4MEFNNMC???K!4MNN!4MC???MNNNMC??CMNNMC??@FFMKK[!4KMM-#0!32~^NNNKWwww[[MNNN^~!13N!5~NN!5FNN^!10~N!4F!8~NN!4FN^!36~$#1!32?_ooorfFFFbbpooo_?!13o!5?oo!5woo_!10?o!4w!8?oo!4wo_-#0!32~}{o?AM!4~E?_w}}~o_o}}???}}}__!5~}}~fFFFAOw!6~^FB_w{???!6~B??}!4~{??!35~$#1!32?@BN~|p!4?x~^F@@?N^N@@~~~@@@^^!5?@@?Wwww|nF!6?_w{^FB~~~!6?{~~@!4?B~~-#0!36~{_?FB?o}!7~^NN???NN^!6~!8NE?_x!4~poooP@@???X!5~{o?F!4NB_o!35~$#1!36?B^~w{~N@!7?_oo~~~oo_!6?!8ox~^E!4?MNNNm}}~~~e!5?BN~w!4o{^N-#0!38~}}}!11~!8}!8~!6}!13~!6}!9~!4}!38~$#1!38?@@@!11?!8@!8?!6@!13?!6@!9?!4@-#0!5^!5~!5^!5~!7^!6~!4^~~~!5^!6~{www??!11~^^^N^\W???!22~^^^N^^^!6~!7^N^^^!8~^^^N^\W???~~$#1!5_!5?!5_!5?!7_!6?!4_???!5_!6?BFFF~~!11?___o_af~~~!22?___o___!6?!7_o___!8?___o_af~~~-#0}{??CMB@@FM??o{~~B@?{{!4}{w?@~~~}???~~~}}{??!10~??!8~B??{!5}{???!19~B@?K!5MK??B~~~}???{!4}{??!4~B??{!5}{???~~$#1@B~~zp{}}wp~~NB??{}~BB!4@BF~}???@~~~???@@B~~!10?~~!8?{~~B!5@B~~~!19?{}~r!5pr~~{???@~~~B!4@B~~!4?{~~B!5@B~~~-#0~~~woow~}woo{!4~}{wpprbrrpww{!5~{w!4pxwoopz~~~r!4poo!4pz~~~}{ww!5pwooopz!17~}wwprrb!4rpp~~~pooopz~~zpoopz~~}{ww!5pwooopz$#1???FNNF?@FNNB!4?@BFMMK[KKMFFB!5?BF!4MEFNNMC???K!4MNN!4MC???@BFF!5MFNNNMC!17?@FFMKK[!4KMM???MNNNMC??CMNNMC??@BFF!5MFNNNMC-#0!40~n!4F!99~$#1!40?O!4w-#0!10~^^n!29~???b!4rbBF!4~^NFbrrprrbFF^!4~rrbBBFBbrrrbv~~^NFbrrprrbFF^!42~$#1!10?__O!29?~~~[!4K[{w!4?_ow[KKMKK[ww_!4?KK[{{w{[KKK[G??_ow[KKMKK[ww_-#0!9~}{wq!10}!18~N???N^~~^N??N^~~o??H!6XWGG!4~^NN??!4N^!5~o??H!6XWGG!42~$#1!9?@BFL!10@!18?o~~~o_??_o~~o_??N~~u!6efvv!4?_oo~~!4o_!5?N~~u!6efvv-#0!41B!6ABB!6A!5BAAA?!6A!4B!10A!8BAAA?!6A!42B$#1!41?!6@??!6@!5?@@@B!6@!4?!10@!8?@@@B!6@$-\This text should be indented.
EOF
# For more details, please see:
# https://github.com/jerch/xterm-addon-image/issues/37
# By default, sixel is in a 2:1 aspect ratio, which means
# every sixel graphics linefeed (GLF) adds another 12 pixels.
# With four GLFs, we have five sixel lines = 5 * 12 = 60 pixels.
# Which text line that ends up on depends upon the height of your
# font. On the VT340, the font is 20 pixels high.
# On a VT340 sixel scrolling is on by default. DEC refers to this by
# two different names "sixel scrolling" and its negation, "DECSDM"
# (Sixel Display Mode). They control the same thing, so when DECSDM is
# on, sixel scrolling is off, and vice versa.
# When DECSDM is on, the graphic line feeds do not affect the text cursor.
# How hackerb9 created the two sixel test images:
#
# convert -family "Courier" -style normal -density 72 -pointsize 26 -interline-spacing -12 -gravity center -fill gray80 -background none label:$'A genuine\nVT340\nwould end\n← here ' +trim +dither -colors 2 sixel:- > reference.six
#
# convert -family "Courier" -style normal -density 72 -pointsize 26 -interline-spacing -12 -gravity center -fill gray80 -background none label:$'Your terminal →' +trim -bordercolor none -border 2 +dither -colors 2 sixel:- > yourterminal.six
@@ -0,0 +1,44 @@
const sixelEncode = require('../node_modules/sixel/lib/SixelEncoder').image2sixel;
const toRGBA8888 = require('../node_modules/sixel/lib/Colors').toRGBA8888;
function createRect(size, color) {
const pixels = new Uint32Array(size * size);
pixels.fill(toRGBA8888(...color));
return sixelEncode(new Uint8ClampedArray(pixels.buffer), size, size);
}
function createRectMinusOne(size, color) {
const pixels = new Uint32Array(size * size);
if (size - 1) {
const sub = new Uint32Array(size - 1);
sub.fill(toRGBA8888(...color));
const last = size * (size - 1);
for (let y = 0; y < last; y += size) {
pixels.set(sub, y);
}
}
return sixelEncode(new Uint8ClampedArray(pixels.buffer), size, size);
}
async function main() {
// clear + cursor and sixelScrolling off
process.stdout.write('\x1b[2J\x1b[?25;80h');
for (let i = 1; i < 300; ++i) {
await new Promise(res => setTimeout(() => {
process.stdout.write(createRect(i, [0, 255, 0]));
res();
}, 5));
}
for (let i = 299; i >= 1; --i) {
await new Promise(res => setTimeout(() => {
process.stdout.write(createRectMinusOne(i, [0, 255, 0]));
res();
}, 5));
}
// re-enable cursor and sixel scrolling
process.stdout.write('\x1b[2J\x1b[?25;80l');
}
main();
@@ -0,0 +1 @@
]1337;File=inline=1;size=525;name=Li4vcGFsZXR0ZS5wbmc=:iVBORw0KGgoAAAANSUhEUgAAAoAAAABQCAYAAACJbMQlAAAABmJLR0QA/wD/AP+gvaeTAAABwklEQVR4nO3dwQnEMAwAQedIIem/yVwLBj0C3pm3uAO/Fj2ia631rh3P1lRu7vnof0+Z836zOe83m/N+sznvN5vzfrM57zeb+23+HAAAhxCAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIi59z8tDQDACWwAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYlwCAQCIsQEEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIcQkEACDGBhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACDGJRAAgBgbQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBiXQAAAYmwAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYlwCAQCIsQEEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIcQkEACDGBhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACDmDz4lC02AaqMRAAAAAElFTkSuQmCC
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
]1337;File=inline=1;size=1667;name=Li4vdGVzdGltYWdlcy93M2NfaG9tZV8yNTYuZ2lm:R0lGODlhSAAwAPcAAAQCBIyKjMzOzERGRHSOvAxCnLy6vNzm9DRmrCQiJGxubNze3HSWxJSq1JyenCRarPz+/FR+vBweHLzG5FxeXGSKxBROpOzu7ERytDw+PHx+fLTC5AwODIyOjExOTAxGnLy+vDxqtCwuLHR2dNTa7ISezKS23KyurMTO5GyKxOzy/ACCXwAAN7AAF+IAjIEAw8DPArtsAOSupIHW2HBvAsUBAHIAbwAAARwAiEdgA/caAr+CAgCIALAjAOMcJIGCAAB8EADGAAByiAAArcQcSrtHBOT3zYG/AaQA7sVgE3Ib9wCCv88AZ2wAAaIAANUAAG+M4wEjogAc9wCCv8SwGbvGBeRyAIEAAF/PrBZsxwCucgDWAIRvpMUBaHIAAQAAAFCMfEIjj/kcUb+CAAC4sLAZKOL3AIG/AECQoAfGowBy9wAAvwBQAABCAAD5UAC/ALgALBlguPcaUb+CAMRwpNUFaAAAAQAAAOAAAPgAAHIAAAAAAG24DBgZAPf3UL+/AM/QAGzWAKIAUNUAAADgfAD4jwByUQAAAKJtQNUYAH/3AFe/AGTPABNsAACuAADWAAAAMgAABUYAAAIAAACuGQDWBQh/AABXAAJH1AABx8QAcgsAAAMAUAAApTdG9wYCv3oAADMAAKUBULAAAEcCZwEApQCM9wDDv0ACAAcAAABfUAAWAKUAQ7AAAEelAAGwAPhHQ8UBAHIAAAAAABhwFIkFxX8AUIEAABClAtKwADxHAIIBABAUopPXKKZm99Iov/gf+MUXx3IAcgAAAAxwZsYFtHIA9wAAvxgAAIlgAH8aUIGCAHiM1QrDtD0C94IAvxAAAJMASqYChdIAgQxw78YFGXIA+AAAvw4AM6EAGvcA+L8AvyYAALMASveNhb+tgQBKLGAEuDzNUYIBAADRmwABbgAA9wAAv8+kFmzYxWYCUNYAAG+k4wHYKAACQgAAAAAAHmAAxTsoUIIAADwcvcZ6bnIC9wAAvxgAm4kAbn8A94EAv0QABAoAAD0MAIIXACH5BAAAAAAALAAAAABIADAABwj/AAEIHEiwoMGDCBMqXGgQgsOHECNKnEixosWLGDNq3Mixo8ePIEOKHCkxgMkRBkiq7BhAgEmXAlbKxBgAwoALAyDUnMlzYs0EA1LuVIGiKAoVEg8YRXFxQoOnJpZKLYpUY0wII2wKGLBg54EPYD+YkEgi7AemFS2AVRuW7Qe3aB8K8ACAA4UFDy+IcGhg54URFx4+CFthIlsLDCqiKGD2bWOzcSE4MOjAoQYAck0GCPyQweGJFcI+qMiA8eO2azFAFIDQwAUOAEBcRNGWhEQTZg9QRFDg8NrTkSUglKBAYOWLbhNHVGG2wcSvYVNE3GC28MPJA0VoUJCAIAfOFiOE/0UwEYPjCBMbmK0quC17CBkGHodwgcJADRlxO9YdMXTY9w6Jx1gIEZXg2AclQHSBfBLZ911GzIU1VkRufTCBRL8595AKbo0G0QkCUUCRdhuFEBZ6EJFQoXUPTWCWbQ/5B9aFEF0GAF4TCQAeRuqFVeBvH3gYo2gQ0eaYahHR5cFKZTm2AUQIPAajQ4OBpZxD5oXFH0TxzUdSlR9c+VWFFiToUJNgPemQfmCxyCUAO44ko5BsukWeQz1aYMGGg7kVwpQOZSDBTC46BqN4bxn4n0MmgoUiBD2iJhaXGfDUnENuHSCeWmNFCNaEEJRQoVmgalDpTIh+oBp1YJEXKXpsfv+wJQol1IqAbxZU5cCpMuHGlgoMrJUYdG9BEJpaBFKEQoVmLsDrSsSKBSaMYC4blpkUoVmsZT1FCVaj20Lg2bcvXnQsWDDKxtO4jbFoZGNCVsTqWxr2BEGTvtGIqaRuZmsWtvaO+sF7Moalr0VuAdxTwR88uuaBYAH43G8pqItRnBkVGla9DnmqlsOK/btkRhnguFGEbG35UJZg1TtBBHdGFCxbKHSA30UBAHCCRywnG1GksjrkrYXLgTnwAgB4KZEAsN3MUaRXQkSszzJaAGiwJzpUnNJywZa0R9BZEBlED6glpltlokDCuW+h9RoAO0EUgNd7fdQnaWBFpqjAWT9gBCIAxJ1wggLCCcSByR0F22+R4a7cWIUIAIjdQRxc9RFtoBq2uAopnPZBCBJL5jVBElgOUq4WVZB5kZt+u3pECygggkAZdICxvbjnrvvuvPfu++/ABy88Q8QXb/zxAgUEADs=
@@ -0,0 +1 @@
]1337;File=inline=1;size=2159;name=Li4vdGVzdGltYWdlcy93M2NfaG9tZV8yNTYuanBn:/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAAwAEgDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD33/hXPgn/AKE7w3/4K4P/AImj/hXPgn/oTvDf/grg/wDia8y/aLuNX0PWtB1nS7+8ghcGJ4o5mWPejbhlQcHIYj6LXr07J4l8IO1jM8K6lZboZUbayb0yrAjoRkH8K6J4flpwqX0l+BhGrzSlC2qM7/hXPgn/AKE7w3/4K4P/AImj/hXPgn/oTvDf/grg/wDia81/Zt8S313da3ousXk9xcR7biLz5S7DB2OMknvsrov2ifEEujeB0trSd4bq/uFiDRsVYIvzMQR9FH/AquWDlHELD3+ZMcQnS9qdR/wrnwT/ANCd4b/8FcH/AMTR/wAK58E/9Cd4b/8ABXB/8TXhFr4F8dL4SXX5fFCWOntbfays1/OrqhGRkKpGSMcZzyB1q7+z9D4g8QeKzqF3q2pSaZpwzIsty7LJIwIVME4Pcn0wPUVvPL4xhKaqJqJnHFNyUXFq57V/wrnwT/0J3hv/AMFcH/xNH/CufBP/AEJ3hv8A8FcH/wATXgnxP8YePPiB8Sr/AMI/DKe8tbLSG8u4ntZ/ILSKcOzy5BVQ2VCg87ScHoF0/wAcfE3T9Z8O/D7xJZSNr0mq20635YYuLJG3upZeGHycsOdoYEZ6+Ydh6Pd2fgW38Qvpn/CA+G2EaNKzfYoPMEStIrPs8voDDJ37D+JlUld9ceFNNnvzcyISGfzGjKoQW+Yn5iu8Al3yoYA73yPmbJQBzvx30X+2fhtqRRN01jtvE9tmdx/74L1ynw18Z/Y/gVqN20n+laMktuhJ5y3MX4ZdV/CvZ7qCO6tpredQ8UqGN1PdSMEfrXxPqb6hoD674WDExveKkygHLmJnC4Hvuz74Fexl8FiaToy6NP5dTz8VJ0Zqouqa/wAjb+Ed/P4c8f8Ah++uEeO0v2MIc8K6Oxjzn0DgH/gNdt8bpH8V/FnQ/DFu5KQeXC+P4GlIZz+CbD+FT/Grwf8A2L8NvCk1uu2fSQtvMyccuNzN/wB/F/8AH6p/AeO48V/E/VfE2ohWkgRpiQOFkk+VQPYLvH4V3SqQmnjV0TXzvoc6jKP+zPq0/wDM0P2k/FRt47Twnp+Y4QizXOOAQPuR/QY3H/gNdx8BtQ8PS+CoLDQJibm3G+9jlULIZW6uR3BxgEE8ADqK7nUdG0zUlcajp1pdb12t50KuSPqRXzl4bgTwP+0C2m2EhSwMxgKs/HlSR7wpP+ySp5/u1wUnDE4Z0Y6OKv6nTNSpVlUeqenoej/s26IuneAZdSmX/iY6xf3N3cuw+YkSsgB+gXOOxY16bNY2s17b3k1vE91bh1hlZQWjDY3BT2zgZ+lQ6JpcGj2H2O0GIfOllA9PMkaQgewLEVeJx1ryDvFooooAK8K8X+C/tf7QWjTCPNneKt9KSPl3QjDD8dsf/fdel/8ACxvBP/Q4+G//AAaQf/FVG3j/AMCNcJO3i3wwZ0VkSQ6lBuVWILAHdkA7VyO+B6V0YevKg249U0ZVaSqJJ9Hcu/EDRf8AhIfBesaYF3yT27eUP+mi/Mn/AI8BXm3wa8Panb/CDUbjRZ/sms6mzy28xUEgJ8qDDDAztbntuzXoH/CxvBP/AEOPhv8A8GkH/wAVUdv4/wDAltCkNv4t8MRRIMKialAqj6ANTp4mUKTpLun939IUqKlPn8rHkXg340XnhuwuNJ8Y2N9eX9s77ZWbEuSSdkm70PQjtgY4ql8KdCu/iD4+1LxNrVsTppMpkyPkd3QoI1Pfarfhgetet6n4l+F+qzCbVNa8F3soG0PcXVrIwHpliavW3j7wHawJBa+LPC8MKDCRx6jAqqPQANgV1SxtNRl7KFpS3/4BjHDTuueV0tjg0+LX/CvL5/DfxPivRNCT9i1iKHzI7+AfddgORJjAYAEZ54yM8xd/ETV/jN4v0zw/4Btrux8PWV3DealqU67WZY3DKMAkAZXhc5YgdADXrereMPhxrNr9m1fxF4Qv7bOfKur22lTPrhmIpdK8ZfDnSLRbXSfEfhGxtV5ENtfW0SD/AICrAV5h2HbUVyv/AAsbwT/0OPhv/wAGkH/xVFAH/9k=
@@ -0,0 +1 @@
]1337;File=inline=1;size=1658;name=Li4vdGVzdGltYWdlcy93M2NfaG9tZV8yNTYucG5n:iVBORw0KGgoAAAANSUhEUgAAAEgAAAAwCAMAAACFQszZAAADAFBMVEUEAgSMiozMzsxERkR0jrwMQpy8urzc5vQ0ZqwkIiRsbmzc3tx0lsSUqtScnpwkWqz8/vxUfrwcHhy8xuRcXlxkisQUTqTs7uxEcrQ8Pjx8fny0wuQMDgyMjoxMTkwMRpy8vrw8arQsLix0dnTU2uyEnsykttysrqzEzuRsisTs8vwAgl8AADewABfiAACBAAlwzwPVbADkrqSB1thwbwLFAQByAG8AAAEcADBHYAf3GgK/ggIA/ACwaADjHByBggAAfA4AxgAAchQAACB0HEbVRwTk98WBvwGkAO7FYBNyG/cAgr/PAGdsAAGiAADVAABvAOMBaaIAHPcAgr90sBXVxgXkcgCBAABfz6wWbMcArnIA1gCEb1TFARNyAAAAAABQANRCaU35HFG/ggAAuLCwGSji9wCBvwD4kKAIxqMAcvcAAL8AUAAAQgAA+VAAvwC4AIQZYHb3GlG/ggDElFTVDxMAAAAAAADgAAD4AAByAAAAAABtuAwYGQD391C/vwDP0ABs1gCiAFDVAAAA4NQA+E0AclEAAACibUDVGAB/9wBXvwBkzwATbAAArgAA1gAAABgAAAVGAAACAAAArhUA1gUIfwAAVwADR9QAAcd0AHIlAAADAFAAAKU3RvcGAr96AAAzAAClAVCwAABHA2cBAKUAAPcACb/4AwAIAAAAX1AAFgClAEOwAABHpQABsAD4R0PFAQByAAAAAAAYlByJD8V/AFCBAAAQpQLSsAA8RwCCAQAQFKKT1yimZvfSKL/4H/jFF8dyAHIAAAAMlGbGD7RyAPcAAL8YAACJYAB/GlCBggB4ANUKCbQ9A/eCAL8QAACTAEqmA4XSAIEMlO/GDxlyAPgAAL8OADOhABr3APi/AL8mAACzAEr3GoW/IIEARoRgBHY8xVGCAQAAz5sAAW4AAPcAAL/PpB5s2MVmAlDWAABvpOMB2CgAAkIAAAAAABZgAMU7KFCCAAA8HL3Gem5yAvcAAL8YAJuJAG5/APeBAL9EAAQKAAA9DACCFwCk+0jYAAAACXBIWXMAAAAAAAAAAACdYiYyAAADIElEQVR4nO2WW3OqQAyAAUehArJWXcDSUiwg3f//A8/msheU0/bBhzNnutMOEZKPJJtkCYJHLfGg9V+CwjD82DwAFEah/oseABKrciXCR4CeVhsEqUkvRXdjkD2tQ57n4+SWuqFEQnyIVbRKARS3eo30oAfZI8m2lXBL8j89it6C5phqobwIsQn19aOE0AqtcfIsM8uZ1q3B0ELQjkp5J8QZzHWywxJ3LQNrNj1p7cKCsrVFAE1W6I9pik3ZBO9GFUATqPX0ewSb2DxN1hSb9B16NqDnLbrlQBBPy/Eo0M/5IWbvE8WX1sSPgV3O2ye4NuUMtNdKCd+o9Ov3LOdgTRsFeZQo1pQeUR61cBYz0AjOxy5JbKxfsG47lAaIbgCpDGw8R88hAimvADAdB5KBj2EqaffgGgRHY3xxDnGvdVqP4umlTYY4gNhbN4l+DoLUGEflLQiTwTFAEIWNEqUJblZk8Ba8iaVFoB40X0BKaJ/Rj8JsZuXVRO12fAFkbWLuiEFwuwB9dNECqPwKZKIYuSESildCwasCb3VUsvXzIseADmDfY0XJgQvA7EBuOgT3ta6/BAkuaHh1vNdWo6uJwfYs/Dp/A4LirrAREnRh77puGoYhwYaD0t59AxrBd5XhEIEWkzptkssa1oRu6T1IvwHRdCto5+GCloNTxD2E3J+XMN5xBAXUsS4MqM6WEy/wEG6830NmoIxTCvUycXILXxPyJ/M7wB2o5wmGHcUj+uRr9u081r+BBHukKIzWGwKewk9AZEwzYKROmR0+MTj5eZOhm3mEC4cGT1mFoe1nNpi44ab1aztSHEhhWrjHKwM97M0MzuDx9Drb/TC43oPQ2FRgzmWd2EypAoNN/SkSNW5oe6DcnSVYnwCFxNFJlXEGt46kOTfHkTWW9rQuJM0nLIRh6rEc4bE+FEOOS3MuYgGkO0NaOePTcPAPbMz+FU7G63UL52STLoIyrwInA63MNNJzgcphZz9km0gsgiZzJMGSDFWfxp/OlNWu4SPb48w//aRXgScLnWDQtZ33knR7CYL6dTa8/6Wv2l/Qj0GPWn8AP2jx/kucqREAAAAASUVORK5CYII=
@@ -0,0 +1,67 @@
#!/bin/bash
function print_palette() {
L=$(( LOWER / 256))
U=$(( (UPPER-1) / 256))
for ((p = $L; p <= $U; p++))
do
echo "slot $((p*256))..$((p*256+255)):"
echo -ne "\x1bP;1q"
for i in {0..15}
do
a=$((i * 16 + p * 256))
for j in {0..15}
do
echo -ne "#$((a+j))!6~"
done
echo -ne "\$-"
done
echo -e "\x1b\\"
done
}
colors=undefined
max_colors=undefined
echo "Terminal Reports (XTSMGRAPHICS):"
IFS=";" read -a REPLY -s -t 1 -d "S" -p $'\e[?1;1;0S'
[[ ${REPLY[1]} == "0" ]] && colors=${REPLY[2]}
echo "active colors: ${colors}"
IFS=";" read -a REPLY -s -t 1 -d "S" -p $'\e[?1;4;0S'
[[ ${REPLY[1]} == "0" ]] && max_colors=${REPLY[2]}
echo "max colors : ${max_colors}"
echo
# query up to colors by default
# if colors is undefined (no XTSMGRAPHICS), assume 256
ARG1=${1:-${colors}}
if [[ $colors == "undefined" ]]
then
ARG1=${1:-256}
fi
LOWER=0
UPPER=$ARG1
ARG2=${2:-undefined}
if [[ $ARG2 != "undefined" ]]
then
LOWER=ARG1
UPPER=ARG2
fi
if [[ $colors != "undefined" ]]
then
if [[ $colors -lt $UPPER ]] || [[ $colors -lt 256 ]]
then
echo -e "\x1b[33mNote: Active colors is smaller than test range."
echo -e "A spec-conform terminal may repeat colors in 'slot mod ${colors}'.\x1b[m"
echo
fi
else
echo -e "\x1b[33mNote: Cannot query active colors."
echo -e "The terminal may repeat colors beyond it max slot (e.g. slot mod 16).\x1b[m"
echo
fi
print_palette
+141
View File
@@ -0,0 +1,141 @@
#!/bin/bash
function smiling_smiley() {
echo -ne '\x1bP;2q"1;1;60;60
#6!60~$-
!60~$-
!60~$
!15?#1!4]!22?!4]$-
#6!60~$-
!60~$-
!60~$-
!60~$
!15?#1!4~!22?!4~$-
#6!60~$
!15?#1!30N$-
#6!60~$-
!60~$-
'
echo -ne '\x1b\\'
}
function indifferent_smiley() {
echo -ne '\x1bP;2q"1;1;60;60
#6!60~$-
!60~$-
!60~$
!15?#1!4]!22?!4]$-
#6!60~$-
!60~$-
!60~$-
!60~$-
!60~$
!15?#1!30N$-
#6!60~$-
!60~$-
'
echo -ne '\x1b\\'
}
function sad_smiley() {
echo -ne '\x1bP;2q"1;1;60;60
#6!60~$-
!60~$-
!60~$
!15?#1!4]!22?!4]$-
#6!60~$-
!60~$-
!60~$-
!60~$-
!60~$
!15?#1!30N$
!15?#1!4o!22?!4o$-
#6!60~$
!15?#1!4B!22?!4B$-
#6!60~$-
'
echo -ne '\x1b\\'
}
function smiling_smiley_slim() {
echo -ne '\x1bP;1q"1;1;60;60
$-
$-
$-
$-
$-
$-
!15?#1!4~!22?!4~$-
!15?#1!30N
'
echo -ne '\x1b\\'
}
function indifferent_smiley_slim() {
echo -ne '\x1bP;1q"1;1;60;60
$-
$-
$-
$-
$-
$-
!15?#6!4~!22?!4~$-
!15?!4o!22?!4o$ !15?#1!30N$-
!15?#6!4B!22?!4B
'
echo -ne '\x1b\\'
}
function sad_smiley_slim() {
echo -ne '\x1bP;1q"1;1;60;60
$-
$-
$-
$-
$-
$-
$-
!15?#1!30N$
!15?#1!4o!22?!4o$-
!15?#1!4B!22?!4B$-
'
echo -ne '\x1b\\'
}
function full() {
smiling_smiley
sleep .5
indifferent_smiley
sleep .5
sad_smiley
sleep .5
indifferent_smiley
sleep .5
smiling_smiley
}
function slim() {
smiling_smiley
sleep .5
indifferent_smiley_slim
sleep .5
sad_smiley_slim
sleep .5
indifferent_smiley_slim
sleep .5
smiling_smiley_slim
}
# clear screen and place cursor to 1;10
echo -ne '\x1b[2J\x1b[10;1H'
# switch sixel scrolling off
echo -ne '\x1b[?80h'
case "$1" in
full ) full ;;
slim ) slim ;;
esac
# re-enable sixel scrolling
echo -ne '\x1b[?80l'
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

+288
View File
@@ -0,0 +1,288 @@
#!/bin/bash
# Test cursor row, column placement after sixel image is sent.
# After a sixel image is displayed, the text cursor is moved to the
# row of the last sixel cursor position, but the column stays the same
# as it was before the sixel image was sent.
#
# This can be thought of as sixel images always ending with an
# implicit Graphics Carriage Return (`$`).
# ADDENDUM: It is not as simple as I thought. When a row of sixels
# straddles two rows of text, the text cursor can be left on the upper row.
# It seems up to three lines of pixels may be beneath any words printed.
#
# The rule for when this happens is not obvious to me, but can be seen
# with images of height: 21, 22, 23, 24, 41, 42, 81, 82, 83, 84...
#
# My guess:
# for a sixel image of height h, let a=(h-1)%6 and b=(h-1)%20,
# then, the text will overlap the image when a>b.
#
# If that is the case, then the entire list of heights for which this
# will happen on the VT340's 480 pixel high screen is:
#
# 21 22 23 24 41 42 81 82 83 84
# 101 102 141 142 143 144 161 162
# 201 202 203 204 221 222 261 262 263 264 281 282
# 321 322 323 324 341 342 381 382 383 384
# 401 402 441 442 443 444 461 462
#
# Note that there are 48 entries, so that means there's a 10% chance
# if heights are chosen randomly from 1 to 480. However, if one were
# to always pick heights which are a multiple of the character cell
# height (20px), then the chances are 0% as there are no problematic
# heights divisible by 20.
# Sixel images often do *not* end with a `-` (Graphics New Line = GNL)
# which sends the sixel cursor down 6 pixels. Any text printed next
# will potentially overlap the last row of sixels!
# I am not yet positive, but I believe that, in general, applications
# should send sixel images without a GNL but then send `^J`, a text
# newline (NL), before displaying more text or graphics.
# IMPORTANT: sometimes neither a graphics nor a text newline is wanted.
# For example, if an image is full screen, either newline would cause
# the top line to scroll off the screen.
# | Text cursor column | Text cursor row
# --------|--------------------|-------------------------------------
# !GNL !NL| Unchanged | Overlapping last line of graphics
# !GNL NL| Column=1 | First line immediately after graphic (usually)
# GNL !NL| Unchanged | _Sometimes_ overlapping graphics
# GNL NL| Column=1 | First *or* second line after graphic
CSI=$'\e[' # Control Sequence Introducer
DCS=$'\eP' # Device Control String
ST=$'\e\\' # String Terminator
set_cursor_pos() {
# Home, top left is row 1, col 1.
local row=$1 col=$2
echo -n ${CSI}${row}';'${col}'H'
}
reset_palette() {
# Send DECRSTS to load colors from a Color Table Report
echo -n ${DCS}'2$p'
echo -n "0;2;0;0;0/" # VT color #0 is black and BG text color
echo -n "1;2;20;20;79/" # VT color #1 is blue
echo -n "2;2;79;13;13/" # VT color #2 is red
echo -n "3;2;20;79;20/" # VT color #3 is green
echo -n "4;2;79;20;79/" # VT color #4 is magenta
echo -n "5;2;20;79;79/" # VT color #5 is cyan
echo -n "6;2;79;79;20/" # VT color #6 is yellow
echo -n "7;2;46;46;46/" # VT color #7 is gray 50% and FG text color
echo -n "8;2;26;26;26/" # VT color #8 is gray 25%
echo -n "9;2;33;33;59/" # VT color #9 is pastel blue
echo -n "10;2;59;26;26/" # VT color #10 is pastel red
echo -n "11;2;33;59;33/" # VT color #11 is pastel green
echo -n "12;2;59;33;59/" # VT color #12 is pastel magenta
echo -n "13;2;33;59;59/" # VT color #13 is pastel cyan
echo -n "14;2;59;59;33/" # VT color #14 is pastel yellow
echo -n "15;2;79;79;79" # VT color #15 is gray 75% and BOLD text color
echo -n ${ST} # String Terminator
}
# Generate square of size w with final graphics new line removed
square() {
# Given a color index number and (optionally) a size, row, and column,
# draw a square with top left corner at (row, column) and of size×size px.
# Default size 100×100px (10cols, 5 rows)
local -i color=${1:-1} # Default is color index 1 (blue)
local -i size=${2:-100} # Size in pixels (defaults to 100)
local -i row=$3 column=$4 # If set to 0, cursor is not moved
if [[ row -ne 0 && column -ne 0 ]]; then
set_cursor_pos $row $column
fi
# Draw a square of the right color & size
squaresize $color $size
}
squaresize() {
# Helper for square() that uses convert to return a sixel square of
# the right color ($1) and size ($2).
# Similar to this but with variable size squares:
# echo -n ${DCS}'0;0;0q"1;1;100;100#'${color}'!100~-!100~-!100~-!100~-!100~-!100~-!100~-!100~-!100~-!100~-!100~-!100~-!100~-!100~-!100~-!100~-!100N'${ST}
local color=${1:-1} # Default color index is 1 (blue)
local size=${2:-100} # Default size is 100x100
# Get a sixel string
local sq=$(convert -geometry ${size}x${size} xc:black sixel:-)
# Remove ImageMagick's extraneous Graphic New Line at end of image.
sq=${sq%-??}$'\e\\'
# VT340s always used the same color register for the first sixel
# color defined no matter what number it was assigned. That means,
# each time we send a new sixel image, the previous one's color
# palette gets changed. We don't want squares of all the same
# color, so remove the color definition and just use the defaults.
sq=${sq/\#0;2;0;0;0/}
# And finally, switch to the proper index for the color we want.
echo -n ${sq//\#0/#${color}}
}
squaregnl() {
# Same as square(), but sends a graphics newline at the end of the sixels.
# (Sticks a `-` before the String Terminator, "Esc \")
sq=$(square "${@}")
echo -n ${sq%??}$'-\e\\'
}
main() {
clear
reset_palette
show_labels
neither_graphic_nor_text 96 4 4 31 # size, color, row, column
text_newline_only 96 9 4 1
text_newline_only 84 9 4 14
graphics_new_line_only 100 1 4 51
graphics_new_line_only 96 1 4 64
set_cursor_pos 1000 1
}
neither_graphic_nor_text() {
# Typically sixel images should not end with a Graphics New Line (GNL)
# However, if a text newline isn't sent, there will be overlap.
local -i size color row column
read size color row column <<<"$@"
set_cursor_pos $((row++)) $column
echo -n "Height $size"
set_cursor_pos $((row++)) $column
# Three squares sent as separate sixel images, indented +1
for i in {1..3}; do
square $((color++)) $size
tput cuf 1
done
echo -n "overlap?"
}
text_newline_only() {
# USING A TEXT NEWLINE (NL) after an sixel image that does NOT
# have GNL is probably the best way to be on the text line
# immediately below the image. However, the text will still
# occasionally overlap the last four rows of pixels.
# Also, if multiple images are intended to be shown, there will
# usually be a gap between them when using a text newline.
# Overlap happens because the height of a text cell is 20 pixels
# and the height of a sixel is 6.
# for (h=0; h<480; h++) if ((h-1)%6 > (h-1)%20 ) { h }
# Let the pixel position of the top of the graphics cursor be 'Yg'
# and let the pixel position of the top of the corresponding cell
# of text which the text cursor will be placed on be 'Yt'. Note
# that Yg is evenly divisible by 6 and Yt, by 20. Taking the
# remainder, r, after dividing Yg by 20 tells us how many pixels
# down into a row of text the last line of sixels started. When
# r==0, the sixels started at the top of the text row.
# When r = 14, the sixels covered the bottom six pixels on the row
# of text. When 14 < r < 20, the sixel line impinged by r - 14
# pixels into the text row below and there is a chance the next
# text printed will overlap.
local -i size color row column
read size color row column <<<"$@"
local -i offset
offset=$((column-1))
set_cursor_pos $row 1
if ((offset)); then tput cuf $((offset)); fi
echo "Height $size"
# Three squares, separated by text new lines and indented +1
for i in {1..3}; do
if ((offset)); then tput cuf $offset; fi
square $((color++)) $size
offset=offset+1
echo
done
tput cuf $((offset))
echo -n "overlap?"
}
graphics_new_line_only() {
# However, some sixel images end with a `-`, a Graphics New Line.
# This can be useful for writing another image starting at the same
# column without having to reposition the cursor.
#
# However, this runs the risk of having occasional overlap.
local -i size color row column
read size color row column <<<"$@"
set_cursor_pos $((row++)) $column
echo -n "Height $size"
set_cursor_pos $((row++)) $column
# Three squares, separated by graphics new lines and indented +1
for i in {1..3}; do
squaregnl $((color++)) $size
tput cuf 1
done
echo -n "overlap?"
}
show_labels() {
set_cursor_pos 1 10
echo -n "Should sixel images include a GNL ('-') at the end?"
set_cursor_pos 3 29
echo -n "Neither NL nor GNL"
set_cursor_pos 3 1
echo -n "Text New Line only"
set_cursor_pos 3 51
echo -n "Graphics New Line only"
set_cursor_pos 22 29
echo -n "Always overlaps" # Neither NL nor GNL
set_cursor_pos 22 3
echo -n "Overlaps a little" # NL only
set_cursor_pos 23 3
echo -n " Gaps a little" # NL only
set_cursor_pos 22 54
echo -n "Overlaps badly" # GNL only
set_cursor_pos 23 54
echo -n "Never gaps" # GNL only
}
main
+817
View File
@@ -0,0 +1,817 @@
{
"name": "@xterm/addon-image",
"version": "0.8.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@xterm/addon-image",
"version": "0.8.0",
"license": "MIT",
"devDependencies": {
"sixel": "^0.16.0",
"xterm-wasm-parts": "^0.1.0"
}
},
"node_modules/@isaacs/cliui": {
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
"integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
"dev": true,
"license": "ISC",
"dependencies": {
"string-width": "^5.1.2",
"string-width-cjs": "npm:string-width@^4.2.0",
"strip-ansi": "^7.0.1",
"strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
"wrap-ansi": "^8.1.0",
"wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/@pkgjs/parseargs": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
"integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",
"dev": true,
"license": "MIT",
"optional": true,
"engines": {
"node": ">=14"
}
},
"node_modules/acorn": {
"version": "8.15.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"dev": true,
"license": "MIT",
"bin": {
"acorn": "bin/acorn"
},
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/acorn-walk": {
"version": "8.3.4",
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz",
"integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==",
"dev": true,
"license": "MIT",
"dependencies": {
"acorn": "^8.11.0"
},
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/ansi-regex": {
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",
"integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/chalk/ansi-regex?sponsor=1"
}
},
"node_modules/ansi-styles": {
"version": "6.2.3",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",
"integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/anymatch": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
"dev": true,
"license": "ISC",
"dependencies": {
"normalize-path": "^3.0.0",
"picomatch": "^2.0.4"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"dev": true,
"license": "MIT"
},
"node_modules/binary-extensions": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
"integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/brace-expansion": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/braces": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
"license": "MIT",
"dependencies": {
"fill-range": "^7.1.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/chokidar": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
"integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
"dev": true,
"license": "MIT",
"dependencies": {
"anymatch": "~3.1.2",
"braces": "~3.0.2",
"glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.6.0"
},
"engines": {
"node": ">= 8.10.0"
},
"funding": {
"url": "https://paulmillr.com/funding/"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
}
},
"node_modules/color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"color-name": "~1.1.4"
},
"engines": {
"node": ">=7.0.0"
}
},
"node_modules/color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"license": "MIT"
},
"node_modules/colorette": {
"version": "2.0.20",
"resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz",
"integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==",
"dev": true,
"license": "MIT"
},
"node_modules/cross-spawn": {
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"dev": true,
"license": "MIT",
"dependencies": {
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
"which": "^2.0.1"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/eastasianwidth": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
"integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
"dev": true,
"license": "MIT"
},
"node_modules/emoji-regex": {
"version": "9.2.2",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
"dev": true,
"license": "MIT"
},
"node_modules/fill-range": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
"license": "MIT",
"dependencies": {
"to-regex-range": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/foreground-child": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz",
"integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==",
"dev": true,
"license": "ISC",
"dependencies": {
"cross-spawn": "^7.0.6",
"signal-exit": "^4.0.1"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/fsevents": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/glob": {
"version": "10.5.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz",
"integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==",
"dev": true,
"license": "ISC",
"dependencies": {
"foreground-child": "^3.1.0",
"jackspeak": "^3.1.2",
"minimatch": "^9.0.4",
"minipass": "^7.1.2",
"package-json-from-dist": "^1.0.0",
"path-scurry": "^1.11.1"
},
"bin": {
"glob": "dist/esm/bin.mjs"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"dev": true,
"license": "ISC",
"dependencies": {
"is-glob": "^4.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/inwasm": {
"version": "0.0.13",
"resolved": "https://registry.npmjs.org/inwasm/-/inwasm-0.0.13.tgz",
"integrity": "sha512-gmULhw1wfF3tQ19y0TvcNH6A5jN7IuTD51kbZuy+ittUU59d+ZTQMb53wbGQuciMrledgagL3/ohnjUj5qJikQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"acorn": "^8.8.2",
"acorn-walk": "^8.2.0",
"chokidar": "^3.5.3",
"colorette": "^2.0.20",
"glob": "^10.0.0",
"wabt": "^1.0.32"
},
"bin": {
"inwasm": "lib/cli.js"
}
},
"node_modules/is-binary-path": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"dev": true,
"license": "MIT",
"dependencies": {
"binary-extensions": "^2.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/is-glob": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"dev": true,
"license": "MIT",
"dependencies": {
"is-extglob": "^2.1.1"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.12.0"
}
},
"node_modules/isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
"dev": true,
"license": "ISC"
},
"node_modules/jackspeak": {
"version": "3.4.3",
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",
"integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
"@isaacs/cliui": "^8.0.2"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
},
"optionalDependencies": {
"@pkgjs/parseargs": "^0.11.0"
}
},
"node_modules/lru-cache": {
"version": "10.4.3",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",
"integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==",
"dev": true,
"license": "ISC"
},
"node_modules/minimatch": {
"version": "9.0.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
"integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
"dev": true,
"license": "ISC",
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
"node": ">=16 || 14 >=14.17"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/minipass": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
"integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
"dev": true,
"license": "ISC",
"engines": {
"node": ">=16 || 14 >=14.17"
}
},
"node_modules/normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/package-json-from-dist": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",
"integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
"dev": true,
"license": "BlueOak-1.0.0"
},
"node_modules/path-key": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/path-scurry": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
"integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
"lru-cache": "^10.2.0",
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
},
"engines": {
"node": ">=16 || 14 >=14.18"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/picomatch": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8.6"
},
"funding": {
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/readdirp": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"dev": true,
"license": "MIT",
"dependencies": {
"picomatch": "^2.2.1"
},
"engines": {
"node": ">=8.10.0"
}
},
"node_modules/shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
"dev": true,
"license": "MIT",
"dependencies": {
"shebang-regex": "^3.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/shebang-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/signal-exit": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
"integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
"dev": true,
"license": "ISC",
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/sixel": {
"version": "0.16.0",
"resolved": "https://registry.npmjs.org/sixel/-/sixel-0.16.0.tgz",
"integrity": "sha512-xicu6Y6Cyhmv5rjyHxq2r5RnKerlL/nyZEGjOU5bLCshXkZryc9JFJThTCKPOAtWXCfeWquEKFVFfMPcTD25PA==",
"dev": true,
"license": "MIT"
},
"node_modules/string-width": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
"integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
"dev": true,
"license": "MIT",
"dependencies": {
"eastasianwidth": "^0.2.0",
"emoji-regex": "^9.2.2",
"strip-ansi": "^7.0.1"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/string-width-cjs": {
"name": "string-width",
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
"license": "MIT",
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/string-width-cjs/node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/string-width-cjs/node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true,
"license": "MIT"
},
"node_modules/string-width-cjs/node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
"license": "MIT",
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/strip-ansi": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz",
"integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==",
"dev": true,
"license": "MIT",
"dependencies": {
"ansi-regex": "^6.0.1"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/chalk/strip-ansi?sponsor=1"
}
},
"node_modules/strip-ansi-cjs": {
"name": "strip-ansi",
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
"license": "MIT",
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/strip-ansi-cjs/node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"is-number": "^7.0.0"
},
"engines": {
"node": ">=8.0"
}
},
"node_modules/wabt": {
"version": "1.0.39",
"resolved": "https://registry.npmjs.org/wabt/-/wabt-1.0.39.tgz",
"integrity": "sha512-ba+dRL/75VQQY7RkU/CgriGbkoWAfS8TDyUlJfJhJ8KhtXgMl5dhNvoPNUcQ9IWRhW8u41glMSuZeTvsYq2rRg==",
"dev": true,
"license": "Apache-2.0",
"bin": {
"wasm-decompile": "bin/wasm-decompile",
"wasm-interp": "bin/wasm-interp",
"wasm-objdump": "bin/wasm-objdump",
"wasm-stats": "bin/wasm-stats",
"wasm-strip": "bin/wasm-strip",
"wasm-validate": "bin/wasm-validate",
"wasm2c": "bin/wasm2c",
"wasm2wat": "bin/wasm2wat",
"wat2wasm": "bin/wat2wasm"
}
},
"node_modules/which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"dev": true,
"license": "ISC",
"dependencies": {
"isexe": "^2.0.0"
},
"bin": {
"node-which": "bin/node-which"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/wrap-ansi": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
"integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"ansi-styles": "^6.1.0",
"string-width": "^5.0.1",
"strip-ansi": "^7.0.1"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
"node_modules/wrap-ansi-cjs": {
"name": "wrap-ansi",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"dev": true,
"license": "MIT",
"dependencies": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
"node_modules/wrap-ansi-cjs/node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/wrap-ansi-cjs/node_modules/ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"license": "MIT",
"dependencies": {
"color-convert": "^2.0.1"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/wrap-ansi-cjs/node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true,
"license": "MIT"
},
"node_modules/wrap-ansi-cjs/node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
"license": "MIT",
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/wrap-ansi-cjs/node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
"license": "MIT",
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/xterm-wasm-parts": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/xterm-wasm-parts/-/xterm-wasm-parts-0.1.0.tgz",
"integrity": "sha512-GFE8yNJfdkytGpcsOZhkL3B8XyUqkR/Du3SdxRyFbJg+BBCKm3raaaflgIM4TwNQ2AOLz01BEEuB5FZXx8aNTQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"inwasm": "^0.0.13"
}
}
}
}
+30
View File
@@ -0,0 +1,30 @@
{
"name": "@xterm/addon-image",
"version": "0.9.0",
"author": {
"name": "The xterm.js authors",
"url": "https://xtermjs.org/"
},
"main": "lib/addon-image.js",
"module": "lib/addon-image.mjs",
"types": "typings/addon-image.d.ts",
"repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/addon-image",
"license": "MIT",
"keywords": [
"terminal",
"image",
"sixel",
"xterm",
"xterm.js"
],
"scripts": {
"prepackage": "../../node_modules/.bin/tsc -p .",
"package": "../../node_modules/.bin/webpack",
"prepublishOnly": "npm run package",
"start": "node ../../demo/start"
},
"devDependencies": {
"sixel": "^0.16.0",
"xterm-wasm-parts": "^0.1.0"
}
}
+161
View File
@@ -0,0 +1,161 @@
/**
* Copyright (c) 2023 The xterm.js authors. All rights reserved.
* @license MIT
*/
import { IImageAddonOptions, IOscHandler, IResetHandler, ITerminalExt } from './Types';
import { ImageRenderer } from './ImageRenderer';
import { ImageStorage, CELL_SIZE_DEFAULT } from './ImageStorage';
import Base64Decoder from 'xterm-wasm-parts/lib/base64/Base64Decoder.wasm';
import { HeaderParser, IHeaderFields, HeaderState } from './IIPHeaderParser';
import { imageType, UNSUPPORTED_TYPE } from './IIPMetrics';
// eslint-disable-next-line
declare const Buffer: any;
// limit hold memory in base64 decoder
const KEEP_DATA = 4194304;
// default IIP header values
const DEFAULT_HEADER: IHeaderFields = {
name: 'Unnamed file',
size: 0,
width: 'auto',
height: 'auto',
preserveAspectRatio: 1,
inline: 0
};
export class IIPHandler implements IOscHandler, IResetHandler {
private _aborted = false;
private _hp = new HeaderParser();
private _header: IHeaderFields = DEFAULT_HEADER;
private _dec = new Base64Decoder(KEEP_DATA);
private _metrics = UNSUPPORTED_TYPE;
constructor(
private readonly _opts: IImageAddonOptions,
private readonly _renderer: ImageRenderer,
private readonly _storage: ImageStorage,
private readonly _coreTerminal: ITerminalExt
) {}
public reset(): void {}
public start(): void {
this._aborted = false;
this._header = DEFAULT_HEADER;
this._metrics = UNSUPPORTED_TYPE;
this._hp.reset();
}
public put(data: Uint32Array, start: number, end: number): void {
if (this._aborted) return;
if (this._hp.state === HeaderState.END) {
if (this._dec.put(data, start, end)) {
this._dec.release();
this._aborted = true;
}
} else {
const dataPos = this._hp.parse(data, start, end);
if (dataPos === -1) {
this._aborted = true;
return;
}
if (dataPos > 0) {
this._header = Object.assign({}, DEFAULT_HEADER, this._hp.fields);
if (!this._header.inline || !this._header.size || this._header.size > this._opts.iipSizeLimit) {
this._aborted = true;
return;
}
this._dec.init(this._header.size);
if (this._dec.put(data, dataPos, end)) {
this._dec.release();
this._aborted = true;
}
}
}
}
public end(success: boolean): boolean | Promise<boolean> {
if (this._aborted) return true;
let w = 0;
let h = 0;
// early exit condition chain
let cond: number | boolean = true;
if (cond = success) {
if (cond = !this._dec.end()) {
this._metrics = imageType(this._dec.data8);
if (cond = this._metrics.mime !== 'unsupported') {
w = this._metrics.width;
h = this._metrics.height;
if (cond = w && h && w * h < this._opts.pixelLimit) {
[w, h] = this._resize(w, h).map(Math.floor);
cond = w && h && w * h < this._opts.pixelLimit;
}
}
}
}
if (!cond) {
this._dec.release();
return true;
}
const blob = new Blob([this._dec.data8], { type: this._metrics.mime });
this._dec.release();
if (!window.createImageBitmap) {
const url = URL.createObjectURL(blob);
const img = new Image();
return new Promise<boolean>(r => {
img.addEventListener('load', () => {
URL.revokeObjectURL(url);
const canvas = ImageRenderer.createCanvas(window.document, w, h);
canvas.getContext('2d')?.drawImage(img, 0, 0, w, h);
this._storage.addImage(canvas);
r(true);
});
img.src = url;
// sanity measure to avoid terminal blocking from dangling promise
// happens from corrupt data (onload never gets fired)
setTimeout(() => r(true), 1000);
});
}
return createImageBitmap(blob, { resizeWidth: w, resizeHeight: h })
.then(bm => {
this._storage.addImage(bm);
return true;
});
}
private _resize(w: number, h: number): [number, number] {
const cw = this._renderer.dimensions?.css.cell.width || CELL_SIZE_DEFAULT.width;
const ch = this._renderer.dimensions?.css.cell.height || CELL_SIZE_DEFAULT.height;
const width = this._renderer.dimensions?.css.canvas.width || cw * this._coreTerminal.cols;
const height = this._renderer.dimensions?.css.canvas.height || ch * this._coreTerminal.rows;
const rw = this._dim(this._header.width!, width, cw);
const rh = this._dim(this._header.height!, height, ch);
if (!rw && !rh) {
const wf = width / w; // TODO: should this respect initial cursor offset?
const hf = (height - ch) / h; // TODO: fix offset issues from float cell height
const f = Math.min(wf, hf);
return f < 1 ? [w * f, h * f] : [w, h];
}
return !rw
? [w * rh / h, rh]
: this._header.preserveAspectRatio || !rw || !rh
? [rw, h * rw / w] : [rw, rh];
}
private _dim(s: string, total: number, cdim: number): number {
if (s === 'auto') return 0;
if (s.endsWith('%')) return parseInt(s.slice(0, -1)) * total / 100;
if (s.endsWith('px')) return parseInt(s.slice(0, -2));
return parseInt(s) * cdim;
}
}

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