Skip to content

Latest commit

 

History

History
71 lines (66 loc) · 13.2 KB

File metadata and controls

71 lines (66 loc) · 13.2 KB

目录说明:src/ink

目录定位

自定义 Ink 适配与终端渲染基础设施目录,提供渲染树、布局、事件与终端 I/O。

目录快照

  • 相对路径:src/ink
  • 直接文件数:43
  • 直接子目录数:5
  • 递归文件数:96
  • 主要文件类型:.ts x 41、.tsx x 2

依赖关系观察

  • 该目录最常引用的仓库内目录:src/ink/termio (17)、src/ink/layout (14)、src/utils (11)、src/ink/events (6)、src/ink/components (4)、utils (4)、native-ts/yoga-layout (2)
  • 最常引用该目录的仓库内目录:src/ink/components (25)、src/components (23)、src/utils (15)、src/ink/hooks (10)、src/components/design-system (7)、src/components/PromptInput (5)、src/components/Spinner (5)

直接文件说明

文件 行数 导出/关键符号 说明
Ansi.tsx 292 Ansi 界面组件或交互视图;导出符号以 Ansi 为主,顶部注释说明:When true, force all text to be rendered with dim styling
bidi.ts 139 reorderBidi 功能实现文件;导出符号以 reorderBidi 为主,顶部注释说明:Bidirectional text reordering for terminal rendering. Terminals on Windows do not implement the Unicode Bidi Algorith...
clearTerminal.ts 74 getClearTerminalSequence, clearTerminal 功能实现文件;导出符号以 getClearTerminalSequence, clearTerminal 为主,顶部注释说明:Cross-platform terminal clearing with scrollback support. Detects modern terminals that support ESC[3J for clearing s...
colorize.ts 231 CHALK_BOOSTED_FOR_XTERMJS, CHALK_CLAMPED_FOR_TMUX, ColorType, colorize, applyTextStyles, applyColor 功能实现文件;导出符号以 CHALK_BOOSTED_FOR_XTERMJS, CHALK_CLAMPED_FOR_TMUX, ColorType, colorize 为主,顶部注释说明:xterm.js (VS Code, Cursor, code-server, Coder) has supported truecolor since 2017, but code-server/Coder containers o...
constants.ts 2 FRAME_INTERVAL_MS 常量定义;导出符号以 FRAME_INTERVAL_MS 为主,顶部注释说明:Shared frame interval for render throttling and animations (~60fps)
dom.ts 484 TextName, ElementNames, NodeNames, DOMElement, TextNode, DOMNode 功能实现文件;导出符号以 TextName, ElementNames, NodeNames, DOMElement 为主,结合所在目录可判断其服务于 src/ink 这条功能线。
focus.ts 181 FocusManager, getRootNode, getFocusManager 功能实现文件;导出符号以 FocusManager, getRootNode, getFocusManager 为主,顶部注释说明:DOM-like focus manager for the Ink terminal UI. Pure state — tracks activeElement and a focus stack. Has no reference...
frame.ts 124 Frame, emptyFrame, FlickerReason, FrameEvent, Patch, Diff 功能实现文件;导出符号以 Frame, emptyFrame, FlickerReason, FrameEvent 为主,顶部注释说明:DECSTBM scroll optimization hint (alt-screen only, null otherwise).
get-max-width.ts 27 未显式导出或以默认导出为主 功能实现文件;文件名指向 get / max / width 这一职责,顶部注释说明:Returns the yoga node's content width (computed width minus padding and border). Warning: can return a value WIDER th...
hit-test.ts 130 hitTest, dispatchClick, dispatchHover 功能实现文件;导出符号以 hitTest, dispatchClick, dispatchHover 为主,顶部注释说明:Find the deepest DOM element whose rendered rect contains (col, row). Uses the nodeCache populated by renderNodeToOut...
ink.tsx 1723 Options, drainStdin 界面组件或交互视图;导出符号以 Options, drainStdin 为主,结合所在目录可判断其服务于 src/ink 这条功能线。
instances.ts 10 未显式导出或以默认导出为主 功能实现文件;文件名指向 instances 这一职责,顶部注释说明:Store all instances of Ink (instance.js) to ensure that consecutive render() calls
line-width-cache.ts 24 lineWidth 功能实现文件;导出符号以 lineWidth 为主,顶部注释说明:During streaming, text grows but completed lines are immutable.
log-update.ts 773 LogUpdate 功能实现文件;导出符号以 LogUpdate 为主,结合所在目录可判断其服务于 src/ink 这条功能线。
measure-element.ts 23 未显式导出或以默认导出为主 功能实现文件;文件名指向 measure / element 这一职责,顶部注释说明:Element width.
measure-text.ts 47 未显式导出或以默认导出为主 功能实现文件;文件名指向 measure / text 这一职责,顶部注释说明:Single-pass measurement: computes both width and height in one
node-cache.ts 54 CachedLayout, nodeCache, pendingClears, addPendingClear, consumeAbsoluteRemovedFlag 功能实现文件;导出符号以 CachedLayout, nodeCache, pendingClears, addPendingClear 为主,顶部注释说明:Cached layout bounds for each rendered node (used for blit + clearing). top is the yoga-local getComputedTop() — st...
optimizer.ts 93 optimize 功能实现文件;导出符号以 optimize 为主,顶部注释说明:Optimize a diff by applying all optimization rules in a single pass. This reduces the number of patches that need to ...
output.ts 797 Operation, Clip 功能实现文件;导出符号以 Operation, Clip 为主,顶部注释说明:A grapheme cluster with precomputed terminal width, styleId, and hyperlink. Built once per unique line (cached via ch...
parse-keypress.ts 801 DECRPM_STATUS, TerminalResponse, KeyParseState, INITIAL_STATE, parseMultipleKeypresses, nonAlphanumericKeys 功能实现文件;导出符号以 DECRPM_STATUS, TerminalResponse, KeyParseState, INITIAL_STATE 为主,顶部注释说明:Keyboard input parser - converts terminal input to key events Uses the termio tokenizer for escape sequence boundary ...
reconciler.ts 512 getOwnerChain, isDebugRepaintsEnabled, dispatcher, recordYogaMs, getLastYogaMs, markCommitStart 功能实现文件;导出符号以 getOwnerChain, isDebugRepaintsEnabled, dispatcher, recordYogaMs 为主,结合所在目录可判断其服务于 src/ink 这条功能线。
render-border.ts 231 BorderTextOptions, CUSTOM_BORDER_STYLES, BorderStyle 功能实现文件;导出符号以 BorderTextOptions, CUSTOM_BORDER_STYLES, BorderStyle 为主,结合所在目录可判断其服务于 src/ink 这条功能线。
render-node-to-output.ts 1462 resetLayoutShifted, didLayoutShift, ScrollHint, resetScrollHint, getScrollHint, resetScrollDrainNode 功能实现文件;导出符号以 resetLayoutShifted, didLayoutShift, ScrollHint, resetScrollHint 为主,结合所在目录可判断其服务于 src/ink 这条功能线。
render-to-screen.ts 231 MatchPosition, renderToScreen, scanPositions, applyPositionedHighlight 功能实现文件;导出符号以 MatchPosition, renderToScreen, scanPositions, applyPositionedHighlight 为主,顶部注释说明:Position of a match within a rendered message, relative to the message's own bounding box (row 0 = message top). Stab...
renderer.ts 178 RenderOptions, Renderer 功能实现文件;导出符号以 RenderOptions, Renderer 为主,结合所在目录可判断其服务于 src/ink 这条功能线。
root.ts 184 RenderOptions, Instance, Root, renderSync, createRoot 功能实现文件;导出符号以 RenderOptions, Instance, Root, renderSync 为主,顶部注释说明:Output stream where app will be rendered. @default process.stdout
screen.ts 1486 CharPool, HyperlinkPool, StylePool, enum, Hyperlink, Cell 功能实现文件;导出符号以 CharPool, HyperlinkPool, StylePool, enum 为主,结合所在目录可判断其服务于 src/ink 这条功能线。
searchHighlight.ts 93 applySearchHighlight 功能实现文件;导出符号以 applySearchHighlight 为主,顶部注释说明:Highlight all visible occurrences of query in the screen buffer by inverting cell styles (SGR 7). Post-render, same...
selection.ts 917 SelectionState, createSelectionState, startSelection, updateSelection, finishSelection, clearSelection 功能实现文件;导出符号以 SelectionState, createSelectionState, startSelection, updateSelection 为主,顶部注释说明:Text selection state for fullscreen mode. Tracks a linear selection in screen-buffer coordinates (0-indexed col/row)....
squash-text-nodes.ts 92 StyledSegment, squashTextNodesToSegments 功能实现文件;导出符号以 StyledSegment, squashTextNodesToSegments 为主,顶部注释说明:A segment of text with its associated styles. Used for structured rendering without ANSI string transforms.
stringWidth.ts 222 stringWidth 功能实现文件;导出符号以 stringWidth 为主,顶部注释说明:Fallback JavaScript implementation of stringWidth when Bun.stringWidth is not available. Get the display width of a s...
styles.ts 771 RGBColor, HexColor, Ansi256Color, AnsiColor, Color, TextStyles 功能实现文件;导出符号以 RGBColor, HexColor, Ansi256Color, AnsiColor 为主,顶部注释说明:Raw color value - not a theme key
supports-hyperlinks.ts 57 ADDITIONAL_HYPERLINK_TERMINALS, supportsHyperlinks 功能实现文件;导出符号以 ADDITIONAL_HYPERLINK_TERMINALS, supportsHyperlinks 为主,顶部注释说明:Additional terminals that support OSC 8 hyperlinks but aren't detected by supports-hyperlinks.
tabstops.ts 46 expandTabs 功能实现文件;导出符号以 expandTabs 为主,顶部注释说明:Tab expansion, inspired by Ghostty's Tabstops.zig
terminal-focus-state.ts 47 TerminalFocusState, setTerminalFocused, getTerminalFocused, getTerminalFocusState, subscribeTerminalFocus, resetTerminalFocusState 状态存取与派生逻辑;导出符号以 TerminalFocusState, setTerminalFocused, getTerminalFocused, getTerminalFocusState 为主,顶部注释说明:Terminal focus state signal — non-React access to DECSET 1004 focus events.
terminal-querier.ts 212 TerminalQuery, decrqm, da1, da2, kittyKeyboard, cursorPosition 功能实现文件;导出符号以 TerminalQuery, decrqm, da1, da2 为主,顶部注释说明:Query the terminal and await responses without timeouts. Terminal queries (DECRQM, DA1, OSC 11, etc.) share the stdin...
terminal.ts 248 Progress, isProgressReportingAvailable, isSynchronizedOutputSupported, setXtversionName, isXtermJs, supportsExtendedKeys 功能实现文件;导出符号以 Progress, isProgressReportingAvailable, isSynchronizedOutputSupported, setXtversionName 为主,顶部注释说明:Checks if the terminal supports OSC 9;4 progress reporting. Supported terminals: - ConEmu (Windows) - all versions - ...
termio.ts 42 Parser, colorsEqual, defaultStyle, stylesEqual 功能实现文件;导出符号以 Parser, colorsEqual, defaultStyle, stylesEqual 为主,顶部注释说明:ANSI Parser Module A semantic ANSI escape sequence parser inspired by ghostty, tmux, and iTerm2. Key features: - Sema...
useTerminalNotification.ts 126 TerminalWriteContext, TerminalWriteProvider, TerminalNotification, useTerminalNotification 功能实现文件;导出符号以 TerminalWriteContext, TerminalWriteProvider, TerminalNotification, useTerminalNotification 为主,顶部注释说明:Report progress to the terminal via OSC 9;4 sequences. Supported terminals: ConEmu, Ghostty 1.2.0+, iTerm2 3.6.6+ Pas...
warn.ts 9 ifNotInteger 功能实现文件;导出符号以 ifNotInteger 为主,结合所在目录可判断其服务于 src/ink 这条功能线。
widest-line.ts 19 widestLine 功能实现文件;导出符号以 widestLine 为主,结合所在目录可判断其服务于 src/ink 这条功能线。
wrap-text.ts 74 未显式导出或以默认导出为主 功能实现文件;文件名指向 wrap / text 这一职责,顶部注释说明:sliceAnsi may include a boundary-spanning wide char (e.g. CJK at position
wrapAnsi.ts 20 wrapAnsi 功能实现文件;导出符号以 wrapAnsi 为主,结合所在目录可判断其服务于 src/ink 这条功能线。

直接子目录说明

子目录 直接文件数 直接子目录数 说明
src/ink/components 18 0 该目录以 UI 组件为主,用于组织终端界面中的局部视图与交互单元。
src/ink/events 10 0 该目录是 src/ink 下的子模块,围绕 events 这一主题组织实现文件。
src/ink/hooks 12 0 该目录主要放置 hooks,用于封装状态派生、副作用和复用交互逻辑。
src/ink/layout 4 0 该目录是 src/ink 下的子模块,围绕 layout 这一主题组织实现文件。
src/ink/termio 9 0 该目录是 src/ink 下的子模块,围绕 termio 这一主题组织实现文件。