@cartridge-engine/theme
    Preparing search index...

    Interface ThemeContextValue

    Value provided by ThemeProvider via React context. Accessed via the useTheme hook.

    interface ThemeContextValue {
        addThemes: (paths: string[]) => void;
        color: (key: string) => string | undefined;
        mergeTheme: (paths: string[]) => void;
        setTheme: (id: string) => void;
        style: (key: string) => boolean | undefined;
        themeId: string;
        themes: string[];
    }
    Index
    addThemes: (paths: string[]) => void

    Add new themes from one or more directory paths.

    Unlike mergeTheme, this adds new themes to the pool.

    • Same filename across paths → later overwrites earlier.
    • Same id as existing base theme → throws immediately.
    • Same id across different filenames within the batch → throws.
    • Missing or extra keys vs. existing themes → throws.
    color: (key: string) => string | undefined

    Get a color value from the current theme (returns the raw string or undefined).

    mergeTheme: (paths: string[]) => void

    Merge additional theme files from one or more directory paths. Later paths override earlier paths for matching keys. Only themes whose id already exists are merged; new ids are ignored.

    setTheme: (id: string) => void

    Switch to a different theme by id.

    style: (key: string) => boolean | undefined

    Get a style value (boolean) from the current theme (returns undefined if not set).

    themeId: string

    Currently active theme id.

    themes: string[]

    List of all available theme ids.