@atlaskit/editor-common
Version:
A package that contains common classes and components for editor and renderer
14 lines (13 loc) • 530 B
TypeScript
import type { ExperienceState } from './types';
/**
* State transition map defining valid state transitions.
*/
export declare const EXPERIENCE_STATE_TRANSITIONS: Record<ExperienceState, ExperienceState[]>;
/**
* Validates whether a state transition is allowed.
*
* @param fromState - The current state
* @param toState - The target state to transition to
* @returns true if the transition is valid, false otherwise
*/
export declare const canTransition: (fromState: ExperienceState, toState: ExperienceState) => boolean;