Provides reactive observation of the Foundry core theme applied to document.body. There are several stores available to receive updates when the theme changes.

Constructors

Accessors

  • get stores(): Readonly<
        {
            theme: Readonly<any>;
            themeDark: Readonly<any>;
            themeLight: Readonly<any>;
        },
    >
  • Returns Readonly<
        {
            theme: Readonly<any>;
            themeDark: Readonly<any>;
            themeLight: Readonly<any>;
        },
    >

    Current core theme stores.

  • get theme(): "theme-dark" | "theme-light"
  • Returns "theme-dark" | "theme-light"

    Current core theme.

  • get themeDark(): boolean
  • Returns boolean

    Is the core theme dark.

  • get themeLight(): boolean
  • Returns boolean

    Is the core theme light.

Methods

  • Helper to apply current core theme to a given SvelteApp optional classes.

    Parameters

    • application: SvelteApp

      Svelte application.

    • Optionaloptions: { hasThemed?: boolean }

      Options.

      • OptionalhasThemed?: boolean

        Verify that the original application default options contains the themed class otherwise do not add the core theme classes.

    Returns string

    App classes CSS string with current core theme applied.

  • Initialize document.body theme observation.

    Returns void