export declare function getDefaultStoragePath(): string; export declare const SUBDIRS: readonly ["decks", "themes", "plugins"]; export declare function ensureStorageDirectories(storagePath: string): Promise; export declare function getDecksPath(storagePath: string): string; export declare function getThemesPath(storagePath: string): string; export declare function getPluginsPath(storagePath: string): string; export interface ResolvedDeck { filePath: string; deckDir: string; isSubdir: boolean; } /** Derive the stem (directory/slug name) from a deck filename */ export declare function deckStem(filename: string): string; /** * Resolve a deck filename to its on-disk location. * Checks new-style subdirectory first, then legacy flat file. */ export declare function resolveDeckPath(decksPath: string, filename: string): Promise; /** Return the client-facing asset base path for a deck */ export declare function getDeckAssetBase(filename: string, isSubdir: boolean): string; export interface ResolvedTheme { cssPath: string; themeDir: string; isSubdir: boolean; } /** * Resolve a theme name to its on-disk CSS path. * Checks new-style subdirectory first, then legacy flat file. */ export declare function resolveThemePath(themesPath: string, name: string): Promise; /** * Like resolveThemePath but returns null instead of throwing when neither layout exists. */ export declare function tryResolveThemePath(themesPath: string, name: string): Promise; /** Return the asset URL base for a theme (used for serving fonts/images via /theme-assets). */ export declare function getThemeAssetBase(name: string, isSubdir: boolean): string; export interface LoadedTheme { name: string; css: string; isSubdir: boolean; } /** * Read every custom theme's CSS, supporting both flat (themes/foo.css) and * subdir (themes/foo/foo.css) layouts. Failed reads are skipped silently * so one broken theme doesn't break rendering for others. For flat themes * the name comes from the `/* @theme name *\/` directive; for subdir themes * it's the directory name. */ export declare function loadCustomThemes(themesPath: string): Promise; /** * Rewrite relative `url(...)` references in a theme's CSS to absolute * `/theme-assets/{name}/...` paths so they resolve correctly regardless of * the iframe's (which is set to the *deck's* asset base in the * editor preview, and is absent in the deck-list thumbnail). * * Skips absolute URLs (http://, //, /), data: URIs, and fragment refs. */ export declare function rewriteThemeRelativeUrls(css: string, themeName: string): string;