/** * Builds the editing subsystem for one grid. * * A single factory rather than six `new` calls scattered through `GridCore`: * the wiring between resolver, registry, adapters, validation, host, keyboard * and manager is a fact about *this module*, not about the grid, and keeping it * here means `GridCore` asks for an editing system and receives one. * * @packageDocumentation */ import type { GridStore } from '../core/grid-store'; import type { EventBus } from '../event-bus/event-bus'; import { EditorRegistry } from './registry/editor-registry'; import { EditorAdapterRegistry } from './registry/editor-adapter-registry'; import { EditorResolver } from './registry/default-editor-resolver'; import { ValidationEngine } from './validation/validation-engine'; import { type InvalidReporter } from './services/editor-host'; import { KeyboardManager } from './services/keyboard-manager'; import { EditorManager } from './session/editor-manager'; /** What {@link createEditingServices} needs from the grid. */ export interface EditingServicesDeps { readonly store: GridStore; readonly eventBus: EventBus; /** Supplies the live `GridApi`, which does not exist yet at construction time. */ readonly getApi: () => unknown; /** * Surfaces a rejected value to the user — pointed at the grid's * `ToastService` by `GridCore`. * * Optional so the editing system stays constructible on its own (tests, a * headless embedding); without it a failure still flashes the cell and is * announced to assistive technology, and only the toast is skipped. */ readonly reportInvalid?: InvalidReporter; } /** The editing subsystem, as handed to `GridContext`. */ export interface EditingServices { readonly editorRegistry: EditorRegistry; readonly editorAdapters: EditorAdapterRegistry; readonly editorResolver: EditorResolver; readonly validationEngine: ValidationEngine; readonly editorManager: EditorManager; readonly keyboardManager: KeyboardManager; } /** * Constructs and wires every editing service. * * The registry is seeded with the built-in editors; the adapter registry starts * empty, because a vanilla grid has no framework to adapt and a wrapper * registers its own during setup. */ export declare function createEditingServices(deps: EditingServicesDeps): EditingServices; //# sourceMappingURL=create-editing-services.d.ts.map