/** * Seed data a theme supplies (`themes//seed/*.json`). * * A demo theme only reads as a demo with content that matches it: a fashion * storefront needs fashion products, a bakery needs cakes. Core's seed data is * one generic catalogue, so every theme looked wrong on a freshly seeded store, * and the collections a theme's widgets name (`linen`, `gift-boxes`) existed * nowhere. * * A theme therefore supplies its own copies, with the SAME shape as core's * `bin/seed/data/*.json`. Rules, all deliberate: * * - **Only `evershop seed` reads them.** `theme:active` still creates nothing; * seeding stays a separate, explicit, opt-in command (The Nguyen, 2026-09-14). * - **Per file, replace not merge.** A theme that ships `products.json` replaces * core's products entirely and still inherits core's `attributes.json`. * Merging a fashion catalogue into a ceramics one is worse than either. * - **Said out loud.** The command reports every file it took from the theme, * because the same command producing different data depending on the active * theme is otherwise a surprise. */ export type SeedDataFile = 'attributes' | 'categories' | 'collections' | 'products' | 'pages' | 'blog'; export interface SeedDataSource { /** Absolute path of the file that was read. */ file: string; /** Where it came from — reported by the CLI. */ origin: 'theme' | 'core'; themeName?: string; } /** `themes//seed/.json`, or null when there is no theme or no file. */ export declare function themeSeedFile(name: SeedDataFile): string | null; /** * The file a seeder should read for `name`: the active theme's copy when it has * one, otherwise core's. `coreDir` is the caller's own `data/` directory, so * this works the same from `src` and from `dist`. */ export declare function resolveSeedData(name: SeedDataFile, coreDir: string): { data: T; source: SeedDataSource; }; /** One line per seeder, so it is never a mystery whose data was used. */ export declare function reportSeedSource(name: SeedDataFile, source: SeedDataSource): void; /** * Resolve an image reference in seed data. A theme ships its photos in its own * `public/` folder — the same place `theme.json` assets come from — so its seed * data names them relatively (`demo/product-01.jpg`) instead of pointing at a * URL. Core's data keeps using absolute URLs, which still download. * * Returns an absolute path when the image is a local theme file, or null when * the reference is a URL the caller should download. */ export declare function resolveSeedImage(url: string): string | null;