velocity-ui
    Preparing search index...

    Class ThemeManager

    Index

    Constructors

    Methods

    • Add or update a custom theme

      Parameters

      • themeName: string

        Name for the new theme

      • variables: ThemeVariables

        Theme variables

      Returns void

    • Apply a theme by name (must match folder name in /themes/)

      Parameters

      • themeName: string

        Theme name (e.g., 'default', 'dark')

      • themePath: string = '../themes/'

        Optional base path for themes

      Returns Promise<void>

      Promise that resolves when theme is applied

    • Get all available theme names

      Returns string[]

      Array of available theme names

    • Get the currently applied theme name

      Returns null | string

      Current theme name or null if none applied

    • Get theme variables for a specific theme

      Parameters

      • themeName: string

        Theme name

      Returns undefined | ThemeVariables

      Theme variables object or undefined if theme doesn't exist

    • Get a CSS variable's current value

      Parameters

      • varName: string

        Variable name (e.g., '--primary-color')

      Returns string

      CSS variable value

    • Check if a theme exists in the predefined themes

      Parameters

      • themeName: string

        Theme name to check

      Returns boolean

      True if theme exists

    • Remove a custom theme

      Parameters

      • themeName: string

        Name of the theme to remove

      Returns boolean

      True if theme was removed, false if it didn't exist

    • Alias for applyTheme method

      Parameters

      • themeName: string

        Theme name to apply

      • themePath: string = '../themes/'

        Optional base path for themes

      Returns Promise<void>

      Promise that resolves when theme is applied

    • Set theme variables from predefined themes

      Parameters

      • themeName: string

        Theme name to apply variables from

      Returns void

    • Update a single CSS variable globally

      Parameters

      • varName: string

        Variable name (e.g., '--primary-color')

      • value: string

        CSS value (e.g., '#00aaff')

      Returns void

    • Set multiple CSS variables at once

      Parameters

      • variables: ThemeVariables = {}

        Object of variable name-value pairs

      Returns void