@sheetwrite/core/shellfunction
A1 jump box: shows the focused cell's reference and navigates on Enter.
Invalid or out-of-bounds references set aria-invalid and make no grid
calls; Escape restores the displayed reference.
- Package
@sheetwrite/core/shell- Source
packages/core/src/shell/formula-controls.ts#L31
Declaration
function createNameBox( host: HTMLElement, grid: Gridinterface Grid {
readonly store: Store;
readonly actions: GridActions;
setActiveSheet(id: SheetId): void;
scrollToCell(addr: CellAddress): void;
getCellAtPoint(
clientX: number,
clientY: number,
): CellAddress | null;
getActiveSheet(): SheetId;
getCellInput(row: number, col: number): CellInputSnapshot | null;
getSelection(): Selection | null;
setSelection(sel: Selection | null): void;
setTheme(theme: Partial<Theme>): void;
replaceTheme(theme: Partial<Theme> | undefined): void;
// … 106 more lines — see the API reference
}interface Grid {
readonly store: Store;
readonly actions: GridActions;
setActiveSheet(id: SheetId): void;
scrollToCell(addr: CellAddress): void;
getCellAtPoint(
clientX: number,
clientY: number,
): CellAddress | null;
getActiveSheet(): SheetId;
getCellInput(row: number, col: number): CellInputSnapshot | null;
getSelection(): Selection | null;
setSelection(sel: Selection | null): void;
setTheme(theme: Partial<Theme>): void;
replaceTheme(theme: Partial<Theme> | undefined): void;
// … 106 more lines — see the API reference
}interface Grid {
readonly store: Store;
readonly actions: GridActions;
setActiveSheet(
id: SheetId,
): void;
scrollToCell(
addr: CellAddress,
): void;
getCellAtPoint(
clientX: number,
clientY: number,
): CellAddress | null;
getActiveSheet(): SheetId;
getCellInput(
row: number,
col: number,
): CellInputSnapshot | null;
getSelection(): Selection | null;
// … 229 more lines — see the API reference
}Imperative grid handle for document commands, events, rendering, and teardown.API reference →, options?: NameBoxOptionsinterface NameBoxOptions {
focusGrid?: () => void;
label?: string;
}interface NameBoxOptions {
focusGrid?: () => void;
label?: string;
}interface NameBoxOptions {
focusGrid?: () => void;
label?: string;
}Host elements and callbacks used to bind a name box to a Grid.API reference →,): ShellPieceinterface ShellPiece {
readonly element: HTMLElement;
destroy(): void;
}interface ShellPiece {
readonly element: HTMLElement;
destroy(): void;
}interface ShellPiece {
readonly element: HTMLElement;
destroy(): void;
}A mounted shell piece: its root element plus an idempotent teardown.API reference →