@sheetwrite/svelteinterface
Immutable state and guarded completion callbacks for one mounted editor.
- Package
@sheetwrite/svelte- Source
packages/core/dist/types/grid.d.ts#L21
Members 12
grid
readonly 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 →;address
readonly address: Readonly<CellAddressinterface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interface CellAddress {
sheet: SheetId;
row: number;
col: number;
}Zero-based address of one cell on a stable sheet ID.API reference →>;viewAddress
readonly viewAddress: Readonly<CellAddressinterface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interface CellAddress {
sheet: SheetId;
row: number;
col: number;
}Zero-based address of one cell on a stable sheet ID.API reference →>;column
readonly column: Readonly<Columninterface Column {
key: string;
header: string;
width: number;
type: CellFormat;
numberFormat?: string;
numberLocale?: string;
headerStyle?: CellStyle;
cellStyle?: CellStyle;
visible?: boolean;
renderer?: string;
editor?: string;
}interface Column {
key: string;
header: string;
width: number;
type: CellFormat;
numberFormat?: string;
numberLocale?: string;
headerStyle?: CellStyle;
cellStyle?: CellStyle;
visible?: boolean;
renderer?: string;
editor?: string;
}interface Column {
key: string;
header: string;
width: number;
type: CellFormat;
numberFormat?: string;
numberLocale?: string;
headerStyle?: CellStyle;
cellStyle?: CellStyle;
visible?: boolean;
renderer?: string;
editor?: string;
}Schema and default presentation for one workbook column.API reference →>;value
readonly value: CellScalartype CellScalar = string | number | boolean | null;type CellScalar = string | number | boolean | null;type CellScalar =
| string
| number
| boolean
| null;A scalar that can be displayed directly.API reference →;text
readonly text: string;initialInput
readonly initialInput: string | undefined;selectAll
readonly selectAll: boolean;label
readonly label: string;signal
readonly signal: AbortSignal;commit
commit(value: string, navigation?: CellEditorNavigationtype CellEditorNavigation = "down" | "right" | "left" | "none";type CellEditorNavigation = "down" | "right" | "left" | "none";type CellEditorNavigation =
| "down"
| "right"
| "left"
| "none";Selection movement applied after a successful editor commit.API reference →): void;cancel
cancel(): void;Declaration
View full TypeScript declaration
export interface CellEditorContext { readonly 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 →; readonly address: Readonly<CellAddressinterface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interface CellAddress {
sheet: SheetId;
row: number;
col: number;
}Zero-based address of one cell on a stable sheet ID.API reference →>; readonly viewAddress: Readonly<CellAddressinterface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interface CellAddress {
sheet: SheetId;
row: number;
col: number;
}Zero-based address of one cell on a stable sheet ID.API reference →>; readonly column: Readonly<Columninterface Column {
key: string;
header: string;
width: number;
type: CellFormat;
numberFormat?: string;
numberLocale?: string;
headerStyle?: CellStyle;
cellStyle?: CellStyle;
visible?: boolean;
renderer?: string;
editor?: string;
}interface Column {
key: string;
header: string;
width: number;
type: CellFormat;
numberFormat?: string;
numberLocale?: string;
headerStyle?: CellStyle;
cellStyle?: CellStyle;
visible?: boolean;
renderer?: string;
editor?: string;
}interface Column {
key: string;
header: string;
width: number;
type: CellFormat;
numberFormat?: string;
numberLocale?: string;
headerStyle?: CellStyle;
cellStyle?: CellStyle;
visible?: boolean;
renderer?: string;
editor?: string;
}Schema and default presentation for one workbook column.API reference →>; readonly value: CellScalartype CellScalar = string | number | boolean | null;type CellScalar = string | number | boolean | null;type CellScalar =
| string
| number
| boolean
| null;A scalar that can be displayed directly.API reference →; readonly text: string; readonly initialInput: string | undefined; readonly selectAll: boolean; readonly label: string; readonly signal: AbortSignal; commit(value: string, navigation?: CellEditorNavigationtype CellEditorNavigation = "down" | "right" | "left" | "none";type CellEditorNavigation = "down" | "right" | "left" | "none";type CellEditorNavigation =
| "down"
| "right"
| "left"
| "none";Selection movement applied after a successful editor commit.API reference →): void; cancel(): void;}