Move Color to base; slim services/Types; colocate ICoreTerminal

- Restore Color.ts under common/base/ (not services)
- Add base/ColorTypes (IColor, IColorRGB)
- Add terminal/CoreTerminalTypes (ICoreTerminal, IScrollEvent, XtermListener)
- Add terminal/InputHandlerTypes and input/WindowOptions for handler types
- services/Types.ts: service-only (modes, mouse, osc link, cursor styles)
- Update imports across src, addons, browser; re-export KeyboardResultType removed
- browser tsconfig: exclude unit tests from composite build

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
This commit is contained in:
Cursor Agent
2026-05-30 17:45:15 +00:00
co-authored by Daniel Imms
parent 8f5c963982
commit 5070a08b58
62 changed files with 345 additions and 351 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ import { TextBlinkStateManager } from 'browser/renderer/shared/TextBlinkStateMan
import { IRenderDimensions, IRenderer, IRequestRedrawEvent, ISelectionRenderModel } from 'browser/renderer/shared/Types';
import { ICharSizeService, ICoreBrowserService, IThemeService } from 'browser/services/Services';
import { ILinkifier2, ILinkifierEvent, ITerminal, ReadonlyColorSet } from 'browser/Types';
import { color } from 'common/services/Color';
import { color } from 'common/base/Color';
import { Disposable, toDisposable } from 'common/base/Lifecycle';
import { IBufferService, ICoreService, IInstantiationService, IOptionsService } from 'common/services/Services';
import { Emitter } from 'common/base/Event';
@@ -9,7 +9,7 @@ import { DomRendererRowFactory } from 'browser/renderer/dom/DomRendererRowFactor
import { NULL_CELL_CODE, NULL_CELL_WIDTH, NULL_CELL_CHAR, DEFAULT_ATTR, FgFlags, BgFlags, Attributes, UnderlineStyle } from 'common/buffer/Constants';
import { BufferLine, DEFAULT_ATTR_DATA } from 'common/buffer/BufferLine';
import { BufferLineStringCache } from 'common/buffer/BufferLineStringCache';
import { IBufferLine } from 'common/services/Types';
import type { IBufferLine } from 'common/buffer/CellTypes';
import { CellData } from 'common/buffer/CellData';
import { MockCoreService, MockDecorationService, MockOptionsService, createCellData, NULL_CELL_DATA } from 'common/terminal/TestUtils.test';
import { MockCharacterJoinerService, MockCoreBrowserService, MockThemeService } from 'browser/TestUtils.test';
@@ -3,12 +3,13 @@
* @license MIT
*/
import { IBufferLine, ICellData, IColor } from 'common/services/Types';
import type { IBufferLine, ICellData } from 'common/buffer/CellTypes';
import type { IColor } from 'common/base/ColorTypes';
import { INVERTED_DEFAULT_COLOR } from 'browser/renderer/shared/Constants';
import { WHITESPACE_CELL_CHAR, Attributes } from 'common/buffer/Constants';
import { CellData } from 'common/buffer/CellData';
import { ICoreService, IDecorationService, IOptionsService } from 'common/services/Services';
import { channels, color } from 'common/services/Color';
import { channels, color } from 'common/base/Color';
import { ICharacterJoinerService, ICoreBrowserService, IThemeService } from 'browser/services/Services';
import { JoinedCellData } from 'browser/services/CharacterJoinerService';
import { treatGlyphAsBackgroundColor } from 'browser/renderer/shared/RendererUtils';
+1 -1
View File
@@ -4,7 +4,7 @@
*/
import { throwIfFalsy } from 'browser/renderer/shared/RendererUtils';
import { IDisposable } from 'common/services/Types';
import type { IDisposable } from 'common/base/Lifecycle';
import { FontWeight } from 'common/services/Services';
+1 -1
View File
@@ -5,7 +5,7 @@
import { Terminal } from '@xterm/xterm';
import { ITerminal } from 'browser/Types';
import { IDisposable } from 'common/services/Types';
import type { IDisposable } from 'common/base/Lifecycle';
import type { IEvent } from 'common/base/Event';
export interface IDimensions {