import { type Operation } from 'ot-json0'; import { type PropControllerMessage } from '../../prop-controllers/instances'; import { type APIResource, APIResourceLocale } from '../../api/types'; import { BuilderEditMode } from '../modules/builder-edit-mode'; import { type Point } from '../modules/read-write/pointer'; import { type SharedAction } from '../shared-api'; import { HostActionTypes } from './action-types'; type InitAction = { type: typeof HostActionTypes.INIT; }; type CleanUpAction = { type: typeof HostActionTypes.CLEAN_UP; }; type ChangeDocumentAction = { type: typeof HostActionTypes.CHANGE_DOCUMENT; payload: { documentKey: string; operation: Operation; }; }; type ChangeDocumentElementScrollTopAction = { type: typeof HostActionTypes.CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP; payload: { scrollTop: number; }; }; type ScrollDocumentElementAction = { type: typeof HostActionTypes.SCROLL_DOCUMENT_ELEMENT; payload: { scrollTopDelta: number; }; }; type MessageHostPropControllerAction = { type: typeof HostActionTypes.MESSAGE_HOST_PROP_CONTROLLER; payload: { documentKey: string; elementKey: string; propName: string; message: T; }; }; type ChangeAPIResourceAction = { type: typeof HostActionTypes.CHANGE_API_RESOURCE; payload: { resource: APIResource; locale?: string | null; }; }; type EvictAPIResourceAction = { type: typeof HostActionTypes.EVICT_API_RESOURCE; payload: { id: string; locale?: string | null; }; }; type SetBuilderEditModeAction = { type: typeof HostActionTypes.SET_BUILDER_EDIT_MODE; payload: { editMode: BuilderEditMode; }; }; type SetLocalizedResourceIdAction = { type: typeof HostActionTypes.SET_LOCALIZED_RESOURCE_ID; payload: { locale?: string; resourceId: string; localizedResourceId: string | null; }; }; type BuilderPointerMoveAction = { type: typeof HostActionTypes.BUILDER_POINTER_MOVE; payload: { pointer: Point | null; }; }; export type HostAction = SharedAction | InitAction | CleanUpAction | ChangeDocumentAction | ChangeDocumentElementScrollTopAction | ScrollDocumentElementAction | MessageHostPropControllerAction | ChangeAPIResourceAction | EvictAPIResourceAction | SetBuilderEditModeAction | SetLocalizedResourceIdAction | BuilderPointerMoveAction; export declare function init(): InitAction; export declare function cleanUp(): CleanUpAction; export declare function changeDocument(documentKey: string, operation: Operation): ChangeDocumentAction; export declare function changeDocumentElementScrollTop(scrollTop: number): ChangeDocumentElementScrollTopAction; export declare function scrollDocumentElement(scrollTopDelta: number): ScrollDocumentElementAction; export declare function messageHostPropController(documentKey: string, elementKey: string, propName: string, message: T): MessageHostPropControllerAction; export declare function changeApiResource(resource: R, locale?: APIResourceLocale): ChangeAPIResourceAction; export declare function evictApiResource(id: string, locale?: string | null): EvictAPIResourceAction; export declare function setBuilderEditMode(editMode: BuilderEditMode): SetBuilderEditModeAction; export declare function setLocalizedResourceId({ resourceId, localizedResourceId, locale, }: { resourceId: string; localizedResourceId: string | null; locale?: string; }): SetLocalizedResourceIdAction; export declare function builderPointerMove(pointer: Point | null): BuilderPointerMoveAction; export declare function isHostAction(action: unknown): action is HostAction; export {}; //# sourceMappingURL=actions.d.ts.map