use-vibes
Version:
Transform any DOM element into an AI-powered micro-app
45 lines (44 loc) • 1.22 kB
TypeScript
import { ImageDocument } from '../../hooks/image-gen/types';
export interface EnhancedVersionInfo {
id: string;
created?: number;
promptKey?: string;
prompt?: string;
}
type VersionInfoResult = {
versions: EnhancedVersionInfo[];
currentVersion: number;
};
/**
* Get version information from document or create defaults
*/
export declare function getVersionInfo(document: ImageDocument & {
_id: string;
}): VersionInfoResult;
/**
* Get prompt information from the document
* @param document The image document
* @param versionIndex Optional index of the version to get prompt for
*/
export declare function getPromptInfo(document: ImageDocument & {
_id: string;
}, versionIndex?: number): {
currentPrompt: string;
prompts: Record<string, import("../../hooks/image-gen/types").PromptEntry>;
currentPromptKey: string;
} | {
currentPrompt: string;
prompts: {
legacy: {
text: string;
};
};
currentPromptKey: string;
};
/**
* Get the current version file key
*/
export declare function getCurrentFileKey(document: ImageDocument & {
_id: string;
}, versionIndex: number, versions: EnhancedVersionInfo[]): string | null;
export {};