@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;
getRuntimeResourceSnapshot(
operation: RuntimeResourceOperation,
phase: RuntimeResourcePhase,
runtime?: RuntimeMemoryObservation,
): RuntimeResourceSnapshot;
getCommandState(command: GridCommandName): GridCommandState;
setActiveSheet(id: SheetId): void;
scrollToCell(addr: CellAddress): void;
getCellAtPoint(
clientX: number,
clientY: number,
): CellAddress | null;
// … 120 more lines — see the API reference
}interface Grid {
readonly store: Store;
readonly actions: GridActions;
getRuntimeResourceSnapshot(
operation: RuntimeResourceOperation,
phase: RuntimeResourcePhase,
runtime?: RuntimeMemoryObservation,
): RuntimeResourceSnapshot;
getCommandState(command: GridCommandName): GridCommandState;
setActiveSheet(id: SheetId): void;
scrollToCell(addr: CellAddress): void;
getCellAtPoint(
clientX: number,
clientY: number,
): CellAddress | null;
// … 120 more lines — see the API reference
}interface Grid {
readonly store: Store;
readonly actions: GridActions;
getRuntimeResourceSnapshot(
operation: RuntimeResourceOperation,
phase: RuntimeResourcePhase,
runtime?: RuntimeMemoryObservation,
): RuntimeResourceSnapshot;
getCommandState(
command: GridCommandName,
): GridCommandState;
setActiveSheet(
id: SheetId,
): void;
scrollToCell(
addr: CellAddress,
): void;
getCellAtPoint(
clientX: number,
// … 255 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 →