Update editor, themes, menus, backgrounds, and release tooling
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
export interface BackgroundFrame {
|
||||
url: string;
|
||||
blurredUrl?: string;
|
||||
overlay: number;
|
||||
position: 'center' | 'top left' | 'top' | 'top right' | 'left' | 'right' | 'bottom left' | 'bottom' | 'bottom right';
|
||||
size: 'cover' | 'contain' | 'auto';
|
||||
previous?: Omit<BackgroundFrame, 'previous' | 'transitionMs'>;
|
||||
transitionMs?: number;
|
||||
}
|
||||
|
||||
export interface BackgroundApi {
|
||||
readonly version: 1;
|
||||
chooseFolder(): Promise<string | null>;
|
||||
defaultFolder?(): Promise<string>;
|
||||
list(folder: string): Promise<{ name: string }[]>;
|
||||
read(folder: string, name: string): Promise<Uint8Array>;
|
||||
readImageSettings?(folder: string): Promise<string | null>;
|
||||
writeImageSettings?(folder: string, contents: string, expected: string | null): Promise<void>;
|
||||
set(target: string, frame: BackgroundFrame | null): void;
|
||||
get(target: string): BackgroundFrame | null;
|
||||
subscribe(listener: (target: string) => void): () => void;
|
||||
}
|
||||
|
||||
export type BackgroundFiles = Pick<BackgroundApi, 'chooseFolder' | 'defaultFolder' | 'list' | 'read' | 'readImageSettings' | 'writeImageSettings'>;
|
||||
Reference in New Issue
Block a user