import { ActorSystem, ActionFunction, CancelAction, PromiseActorLogic, EventObject } from 'xstate'; import { Snapshot, SyncOp, EditorActorContext, EditorActorEvent, EditorActorEmitedEvent } from './types'; import { HotkeyActorLogic } from './hotkey'; import type * as t from '@likec4/core/types'; export declare function makeSnapshot(system: ActorSystem): Snapshot; type LayoutChanges = t.ViewChange.ResetManualLayout | t.ViewChange.SaveViewSnapshot; export declare const isLayoutChange: (change: t.ViewChange) => change is LayoutChanges; export declare const isLayoutChangeOp: (op: T) => op is Extract; export declare const withoutSnapshotChanges: (data: t.ViewChange[]) => (t.ViewChange.ChangeElementStyle | t.ViewChange.ChangeAutoLayout | t.ViewChange.ChangeProperty)[]; export declare const scheduleSync: (delay?: number) => ActionFunction; export declare const cancelSync: () => CancelAction; /** * Save the state before editing starts */ export declare const saveBeforeEditing: () => ActionFunction; id: string | undefined; } | { src: "executeChange"; logic: PromiseActorLogic; id: string | undefined; } | { src: "applySemanticLayout"; logic: PromiseActorLogic; id: string | undefined; }, never, never, never, never>; /** * When editing finishes, push the "beforeEditing" state to the history stack */ export declare const pushHistory: () => ActionFunction; id: string | undefined; } | { src: "executeChange"; logic: PromiseActorLogic; id: string | undefined; } | { src: "applySemanticLayout"; logic: PromiseActorLogic; id: string | undefined; }, never, { type: "has pending"; params: unknown; } | { type: "can undo"; params: unknown; } | { type: "can redo"; params: unknown; }, "500ms" | "wait-after-edit", EditorActorEmitedEvent>; export declare const reschedule: (delay?: number) => ActionFunction; export declare const undo: () => ActionFunction; id: string | undefined; } | { src: "executeChange"; logic: PromiseActorLogic; id: string | undefined; } | { src: "applySemanticLayout"; logic: PromiseActorLogic; id: string | undefined; }, never, { type: "has pending"; params: unknown; } | { type: "can undo"; params: unknown; } | { type: "can redo"; params: unknown; }, "500ms" | "wait-after-edit", EditorActorEmitedEvent>; export declare const redo: () => ActionFunction; id: string | undefined; } | { src: "executeChange"; logic: PromiseActorLogic; id: string | undefined; } | { src: "applySemanticLayout"; logic: PromiseActorLogic; id: string | undefined; }, never, { type: "has pending"; params: unknown; } | { type: "can undo"; params: unknown; } | { type: "can redo"; params: unknown; }, "500ms" | "wait-after-edit", EditorActorEmitedEvent>; export declare const deleteNodesAndEdges: () => ActionFunction; id: string | undefined; } | { src: "executeChange"; logic: PromiseActorLogic; id: string | undefined; } | { src: "applySemanticLayout"; logic: PromiseActorLogic; id: string | undefined; }, never, { type: "has pending"; params: unknown; } | { type: "can undo"; params: unknown; } | { type: "can redo"; params: unknown; }, "500ms" | "wait-after-edit", EditorActorEmitedEvent>; export declare const pushToSyncQueue: () => ActionFunction; id: string | undefined; } | { src: "executeChange"; logic: PromiseActorLogic; id: string | undefined; } | { src: "applySemanticLayout"; logic: PromiseActorLogic; id: string | undefined; }, never, never, never, never>; export declare const clearQueue: () => ActionFunction; id: string | undefined; } | { src: "executeChange"; logic: PromiseActorLogic; id: string | undefined; } | { src: "applySemanticLayout"; logic: PromiseActorLogic; id: string | undefined; }, never, never, never, never>; export {};