UNPKG

@yotoplay/twee2yoto

Version:

Convert Twine/Twee JSON to Yoto format

105 lines 2.15 kB
export interface TweeJSON { metadata: Metadata; variables: { [key: string]: any; }; passages: Passage[]; } export interface Metadata { title: string | undefined; init: Init | null; data?: StoryData | null; } export interface Init { [key: string]: any; } export interface StoryData { start: string; ifid: string; zoom?: number; creator?: string; format: string; 'format-version': string; 'tag-colors'?: { [key: string]: string; }; } export interface Passage { name: string; metadata: Metadata | null; content: string; choices: Choice[]; comments?: string[]; variables?: { [key: string]: any; }; tags?: string[]; } export interface Choice { text: string; link: string; } export interface YotoJSON { title?: string; cardId?: string; userId?: string; slug: string; sortkey: string; metadata: YotoMetadata; updatedAt: string; content: YotoContent; skipMediaFileCheck?: boolean; } interface YotoMetadata { author: string; category: string; cover: YotoCover; description: string; media?: YotoMedia; } interface YotoCover { imageL: string; } interface YotoMedia { duration: number; fileSize: number; hasStreams: boolean; } interface YotoContent { cover: YotoCover; editSettings: Record<string, unknown>; config: Record<string, unknown>; chapters: Chapter[]; playbackType: string | 'interactive'; } export interface Chapter { title: string; key: string; display: Display; tracks: Track[]; } interface Track { key: string; title: string; type: string; format: string; trackUrl: string; events: Record<string, TrackEvent | undefined>; } export interface TrackEvent { cmd: string; params?: Record<string, string>; } interface Display { icon16x16: string; } export interface AutoGeneratedAudio extends GeneratedAudio { content: string; } export interface GeneratedAudio { key: string; contentAudioUrl: string; choices: Choice[]; } export {}; //# sourceMappingURL=types.d.ts.map