Move common primitives to src/common/primitives/

Phase 1 of #5963: reorganize building blocks (buffer, parser, input,
data, and shared utilities) under common/primitives/. Runtime code
(services, public API, CoreTerminal, InputHandler) stays in place.

Update import paths across browser, headless, addons, and tests.
Add TypeScript path mappings so common/* aliases resolve primitives
first, then the common root.

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
This commit is contained in:
Cursor Agent
2026-06-06 18:21:03 +00:00
co-authored by Daniel Imms
parent 3cdbc77386
commit 701c0affd5
187 changed files with 320 additions and 284 deletions
+6 -6
View File
@@ -6,14 +6,14 @@
import { IBufferService, ICoreService, ILogService, IOptionsService, ITerminalOptions, IMouseStateService, ICharsetService, UnicodeCharProperties, UnicodeCharWidth, IUnicodeService, IUnicodeVersionProvider, LogLevelEnum, IDecorationService, IInternalDecoration, IOscLinkService, type IBufferResizeEvent } from './services/Services';
import { UnicodeService } from './services/UnicodeService';
import { DEFAULT_OPTIONS } from './services/OptionsService';
import { IAttributeData, IBuffer, IBufferLine, IBufferSet, IExtendedAttrs } from './buffer/Types';
import { BufferSet } from './buffer/BufferSet';
import { IAttributeData, IBuffer, IBufferLine, IBufferSet, IExtendedAttrs } from './primitives/buffer/Types';
import { BufferSet } from './primitives/buffer/BufferSet';
import { IDecPrivateModes, ICoreMouseEvent, CoreMouseEventType, ICharset, IModes, IOscLinkData, IDisposable } from './Types';
import { UnicodeV6 } from './input/UnicodeV6';
import { UnicodeV6 } from './primitives/input/UnicodeV6';
import { IDecorationOptions, IDecoration } from '@xterm/xterm';
import { Emitter, type IEvent } from './Event';
import { CellData } from './buffer/CellData';
import { DEFAULT_ATTR, NULL_CELL_CHAR, NULL_CELL_WIDTH } from './buffer/Constants';
import { Emitter, type IEvent } from './primitives/Event';
import { CellData } from './primitives/buffer/CellData';
import { DEFAULT_ATTR, NULL_CELL_CHAR, NULL_CELL_WIDTH } from './primitives/buffer/Constants';
export function createCellData(attr: number, char: string, width: number): CellData {
return CellData.fromCharData([attr, char, width, char.length === 0 ? 0 : char.charCodeAt(0)]);