MCPcopy Create free account
hub / github.com/Noumena-Network/code / visibleCellAtIndex

Function visibleCellAtIndex

src/ink/screen.ts:854–877  ·  view source on GitHub ↗
(
  cells: Int32Array,
  charPool: CharPool,
  hyperlinkPool: HyperlinkPool,
  index: number,
  lastRenderedStyleId: number,
)

Source from the content-addressed store, hash-verified

852}
853
854export function visibleCellAtIndex(
855 cells: Int32Array,
856 charPool: CharPool,
857 hyperlinkPool: HyperlinkPool,
858 index: number,
859 lastRenderedStyleId: number,
860): Cell | undefined {
861 const out: Cell = {
862 char: ' ',
863 styleId: 0,
864 width: CellWidth.Narrow,
865 hyperlink: undefined,
866 }
867 return visibleCellAtIndexInto(
868 cells,
869 charPool,
870 hyperlinkPool,
871 index,
872 lastRenderedStyleId,
873 out,
874 )
875 ? out
876 : undefined
877}
878
879/**
880 * Write cell data into an existing Cell object to avoid allocation.

Callers

nothing calls this directly

Calls 1

visibleCellAtIndexIntoFunction · 0.85

Tested by

no test coverage detected