ttabs-svelte
Version:
A flexible layout management system with draggable, resizable tiles and tabs for Svelte applications
26 lines (23 loc) • 607 B
text/typescript
import type { Tile } from '../types/tile-types';
/**
* Storage adapter interface for Ttabs
*/
export interface TtabsStorageAdapter {
/**
* Save ttabs state
* @param state The tiles state
*/
save(state: Record<string, Tile>): Promise<void> | void;
/**
* Load ttabs state
* @returns Promise resolving to state object or null if no state exists
*/
load(): Promise<TtabsStorageData | null> | TtabsStorageData | null;
}
/**
* Storage data structure containing tiles and focused tab
*/
export interface TtabsStorageData {
tiles: Record<string, Tile>;
focusedTab?: string;
}