import type { ArkmeSourceKind } from '../types.js'; import type { ReactionHistoryContext, ReactionRequest, ReactionSnapshot, ReactionExpression, ReactionActorPage, ReactionGroupPage, ReactionTargetRef, ReactionActor } from '../reaction-contract.js'; import { type ReactionLibraryStore } from './reaction-library.js'; export type ReactionPreviewTarget = ReactionTargetRef & { source: string; sourceKind?: ArkmeSourceKind; text: string; sourceKey?: string | undefined; itemUid?: string; resolveActor?: (actor: ReactionActor) => ReactionActor | undefined; }; export interface ReactionPreviewEvent extends ReactionHistoryContext { id: string; eventId?: string; expression?: ReactionExpression; restricted?: boolean; source: string; sourceKind?: ArkmeSourceKind; text: string; label: string; added: boolean; at: number; } type Transport = (input: ReactionRequest, signal?: AbortSignal) => Promise; /** Server-owned state. Poll mounted targets only; retain at most 400 recent inactive snapshots in this account/window. */ export declare class ReactionPreviewStore { private readonly transport; private readonly library; private readonly pollMillis; private scope; private controller; private targets; private states; private inactive; private actorRefreshAt; private knownTargets; private failures; private listeners; private revision; private reading; private refreshing; private timer; private timerDue; private refreshAgain; private retryMillis; private pending; private writing; constructor(transport?: Transport, library?: ReactionLibraryStore, pollMillis?: number); readonly subscribe: (listener: () => void) => () => void; readonly getSnapshot: () => number; isScope(scope: string): boolean; setScope(scope?: string): void; watch(scope: string, target: ReactionPreviewTarget): () => void; private retainInactive; prepare(scope: string, targets: ReactionPreviewTarget[], signal: AbortSignal, force?: boolean): Promise; prepareNotifications(scope: string, messages: readonly { sourceKey: string; itemUid: string; }[], signal: AbortSignal): Promise; updateTarget(scope: string, target: ReactionPreviewTarget): void; private visibility; private stop; private schedule; snapshot(id: string): ReactionSnapshot | undefined; busy(_id: string): boolean; error(id: string): string | undefined; selections(id: string): readonly string[]; refresh(): Promise; toggle(scope: string, target: ReactionPreviewTarget, label: string, expression?: ReactionExpression): Promise; private applyConfirmedState; actors(scope: string, target: ReactionPreviewTarget, key: string, after?: number, signal?: AbortSignal): Promise; groups(scope: string, target: ReactionPreviewTarget, after: string, signal?: AbortSignal): Promise; private publish; } export declare const reactionPreview: ReactionPreviewStore; export {}; //# sourceMappingURL=reaction-preview-store.d.ts.map