{"version":3,"file":"rb-mwindh-ngx-theme-manager.mjs","sources":["../../../projects/ngx-theme-manager/src/lib/internal/storage.service.ts","../../../projects/ngx-theme-manager/src/lib/internal/theme-registry.service.ts","../../../projects/ngx-theme-manager/src/lib/internal/theme-tracking.service.ts","../../../projects/ngx-theme-manager/src/lib/internal/theme-style-manager.service.ts","../../../projects/ngx-theme-manager/src/lib/theme.service.ts","../../../projects/ngx-theme-manager/src/rb-mwindh-ngx-theme-manager.ts"],"sourcesContent":["import { DOCUMENT } from \"@angular/common\";\nimport { inject, Injectable, OnDestroy } from \"@angular/core\";\nimport { share, Subject, takeUntil } from \"rxjs\";\n\n/**\n * StorageChangeEvent represents the change event of the storage.\n *\n * @interface\n * @group Public API\n */\nexport interface StorageChangeEvent {\n  /**\n   * The key of the item that was changed.\n   */\n  key: string;\n\n  /**\n   * The value of the item before the change.\n   */\n  oldValue: string | null;\n\n  /**\n   * The value of the item after the change.\n   */\n  newValue: string | null;\n}\n\n/**\n * RbStorageService is a service that provides an observable stream of storage change events.\n *\n * @internal\n * @group Services\n */\n@Injectable({ providedIn: 'root' })\nexport class StorageService implements OnDestroy {\n  private readonly document = inject(DOCUMENT);\n\n  readonly #destroy$ = new Subject<void>();\n\n  /**\n   * The browser's local storage object.\n   *\n   * @readonly\n   * @private\n   */\n  readonly #storage: Storage;\n\n  /**\n   * The browser's window object.\n   *\n   * @readonly\n   * @private\n   */\n  readonly #window: Window;\n\n  /**\n   * The Subject receiving the storage change events.\n   *\n   * @readonly\n   * @private\n   */\n  readonly #changes$ = new Subject<StorageChangeEvent>();\n\n  /**\n   * The observable stream of storage change events, shared among subscribers.\n   *\n   * @readonly\n   */\n  public readonly changes$ = this.#changes$.pipe(\n    share(),\n    takeUntil(this.#destroy$),\n  );\n\n  /**\n   * Creates an instance of RbStorageService.\n   *\n   * @param {Document} document - the document object provided by Angular's DI.\n   */\n  public constructor() {\n    this.#window = (this.document as any).parentWindow || this.document.defaultView;\n    this.#storage = this.#window.localStorage;\n    this.#window.addEventListener(\n      'storage',\n      this.#storageEventListener.bind(this),\n    );\n  }\n\n  /**\n   * An Angular lifecycle hook that removes the storage event listener.\n   *\n   * @internal\n   */\n  ngOnDestroy() {\n    this.#window.removeEventListener(\n      'storage',\n      this.#storageEventListener.bind(this),\n    );\n    this.#destroy$.next();\n    this.#destroy$.complete();\n  }\n\n  /**\n   * Sets a key-value pair in the local storage and emits a change event.\n   *\n   * @param {string} key - The key to set\n   * @param {string} newValue - The value to set\n   */\n  public setItem(key: string, newValue: string): void {\n    const oldValue = this.#storage.getItem(key);\n    this.#storage.setItem(key, newValue);\n    this.#changes$.next({ key, oldValue, newValue });\n  }\n\n  /**\n   * Gets the value of a key in the local storage.\n   *\n   * @param {string} key - The key to get the value of\n   * @returns {(string | null)} The value of the key or null if it does not exist\n   */\n  public getItem(key: string): string | null {\n    return this.#storage.getItem(key);\n  }\n\n  /**\n   * Removes the value of a key from the local storage and emits a change event.\n   *\n   * @param {string} key - The key to remove\n   */\n  public removeItem(key: string): void {\n    const oldValue = this.#storage.getItem(key);\n    this.#storage.removeItem(key);\n    this.#changes$.next({ key, oldValue, newValue: null });\n  }\n\n  /**\n   * Clears all keys from the local storage and emits a change event for each removed key.\n   */\n  public clear(): void {\n    const changes: StorageChangeEvent[] = [];\n    for (let i = 0; i < this.#storage.length; i++) {\n      const key = this.#storage.key(i)!; // I'm sure it's never null!\n      const oldValue = this.#storage.getItem(key);\n      changes.push({ key, oldValue, newValue: null });\n    }\n    this.#storage.clear();\n    changes.forEach((change) => this.#changes$.next(change));\n  }\n\n  /**\n   * The storage event handler that takes a native StorageEvent and emits a {@link StorageChangeEvent}.\n   *\n   * @param {StorageEvent} event - The native event to handle\n   * @private\n   */\n  #storageEventListener(event: StorageEvent): void {\n    if (event.storageArea != this.#storage) {\n      return;\n    }\n\n    const key = event.key!;\n    const { oldValue, newValue } = event;\n    this.#changes$.next({ key, oldValue, newValue });\n  }\n}\n","import { Injectable } from '@angular/core';\nimport { share, Subject } from 'rxjs';\nimport { Theme } from '../theme';\n\n/**\n * RbThemeRegistryService is an injectable service that allows for\n * registering and unregistering themes, as well as providing access\n * to the currently registered themes.\n * It also provides an observable of themes that can be used\n * to notify subscribers of changes to the registered themes.\n *\n * @internal\n * @group Services\n */\n@Injectable({ providedIn: 'root' })\nexport class ThemeRegistryService {\n  /**\n   * The internal dictionary that holds the registered themes.\n   *\n   * @private\n   */\n  readonly #dictionary = new Map<string, Theme>();\n\n  /**\n   * The subject that emits an updated array of registered themes whenever a change occurs.\n   *\n   * @private\n   */\n  readonly #themes$ = new Subject<Theme[]>();\n\n  /**\n   * The observable that emits the collection of registered themes when it changes.\n   */\n  readonly themes$ = this.#themes$.pipe(share());\n\n  /**\n   * Registers a new theme and emits the changed collection of themes.\n   *\n   * If a theme with the same ID is already registered,\n   * the registered theme will be merged with the new one.\n   *\n   * Themes without ID will be ignored.\n   *\n   * @param {Theme | undefined | null} theme - The new theme to register\n   */\n  register(theme: Theme | undefined | null): void {\n    if (!theme?.id) {\n      return;\n    }\n    const oldValue = this.#dictionary.get(theme.id) || {};\n    this.#dictionary.set(theme.id, { ...oldValue, ...theme });\n    this.#themes$.next([...this.#dictionary.values()]);\n  }\n\n  /**\n   * Removes the provided theme from the registry and emits the changed collection of themes.\n   *\n   * @param {Theme} theme - The theme to remove.\n   */\n  unregister(theme: Theme): void {\n    if (this.#dictionary.delete(theme?.id)) {\n      this.#themes$.next([...this.#dictionary.values()]);\n    }\n  }\n\n  /**\n   * Returns the collection of registered themes.\n   *\n   * @returns {Theme[]} A new array with all currently registered themes\n   * @remarks A new array is created every time this getter is called.\n   */\n  get themes(): Theme[] {\n    return [...this.#dictionary.values()];\n  }\n\n  /**\n   * Returns the theme with the given ID, or null if no such theme is registered.\n   *\n   * @param {string | null} id - The ID of the theme to retrieve\n   */\n  get(id: string | null): Theme | null {\n    return this.#dictionary.get(id!) || null;\n  }\n\n  /**\n   * Returns whether a theme with the given ID is currently registered.\n   *\n   * @param {string | null} id - The ID of the theme to check.\n   */\n  has(id: string | null): boolean {\n    return this.#dictionary.has(id!);\n  }\n}\n","import { Injectable } from '@angular/core';\nimport { distinctUntilChanged, share, Subject, tap } from 'rxjs';\n\n/**\n * A service to track the currently active theme.\n *\n * @internal\n * @group Services\n */\n@Injectable({ providedIn: 'root' })\nexport class ThemeTrackingService {\n  /**\n   * The subject that emits the next value set through {@link currentTheme}.\n   *\n   * @private\n   */\n  readonly #currentTheme$ = new Subject<string | null>();\n\n  /**\n   * A private property to hold the current theme value.\n   *\n   * @private\n   */\n  #currentTheme: string | null = null;\n\n  /**\n   * The observable that emits the current theme, shared among subscribers.\n   * This observable prevents emitting the same value twice in a row.\n   * It also updates the private #currentTheme property.\n   */\n  readonly currentTheme$ = this.#currentTheme$.pipe(\n    distinctUntilChanged(),\n    tap((theme) => (this.#currentTheme = theme)),\n    share(),\n  );\n\n  /**\n   * Set the current theme.\n   *\n   * @param {string | null} arg\n   */\n  set currentTheme(arg: string | null) {\n    this.#currentTheme$.next(arg);\n  }\n\n  /**\n   * Get the current theme.\n   *\n   * @returns {string | null} The current theme\n   */\n  get currentTheme(): string | null {\n    return this.#currentTheme;\n  }\n}\n","import { ContentObserver } from \"@angular/cdk/observers\";\nimport { DOCUMENT } from \"@angular/common\";\nimport { inject, Injectable } from \"@angular/core\";\nimport { filter, map, timer } from \"rxjs\";\nimport { Theme } from \"../theme\";\nimport { ThemeRegistryService } from \"./theme-registry.service\";\n\n/**\n * A service that manages the activation and deactivation of themes.\n *\n * The service uses the `ContentObserver` service to observe changes in the `<head>` element\n * and updates the {@link ThemeRegistryService internal theme registry}\n * when new `<style>` elements are added to the DOM.\n *\n * Themes are identified by the `data-theme` attribute on the `<style>` element.\n *\n * The service provides a method `use` to activate a theme with a given ID\n * and deactivate all other themes.\n *\n * @internal\n * @group Services\n */\n@Injectable({\n  providedIn: 'root',\n})\nexport class ThemeStyleManagerService {\n  private readonly observer = inject( ContentObserver);\n  private readonly themeRegistry = inject( ThemeRegistryService);\n  private readonly document = inject(DOCUMENT);\n\n  /**\n   * Creates a new instance.\n   *\n   * Subscribes to the `ContentObserver` to listen for new `<style>` elements\n   * added to the document head. If a new `<style>` element is added, the\n   * `#updateRegistry()` method is called.\n   */\n  constructor() {\n    this.observer\n      .observe(document.head)\n      .pipe(\n        map((mutations) =>\n          mutations.some((mutation) =>\n            Array.from(mutation.addedNodes).some(\n              (node) => node.nodeName === 'STYLE',\n            ),\n          ),\n        ),\n        filter((newStyles) => !!newStyles),\n      )\n      .subscribe(() => this.#updateRegistry());\n  }\n\n  /**\n   * Activates the theme with the given ID and deactivates all other themes.\n   *\n   * @param {string} theme - The theme to activate\n   * @see turnOn\n   * @see turnOff\n   * @remarks A theme may consist of 1 or more `<style>` elements.\n   */\n  use(theme: string): void {\n    // INFO: [author: NWD8FE, since: 2023/01/26]\n    //  running asynchronously, to give #updateRegistries\n    //  the chance to run first.\n    timer(0).subscribe(() => {\n      const styles = this.#getAllThemeStyles();\n      styles.forEach((el) => {\n        const id = el.getAttribute('data-theme');\n        (theme === id ? turnOn : turnOff)(el);\n      });\n    });\n  }\n\n  /**\n   * Get all theme `<style>` elements in the document head.\n   *\n   * @private\n   */\n  #getAllThemeStyles(): HTMLStyleElement[] {\n    return Array.from(\n      this.document.head.querySelectorAll('style[data-theme]'),\n    );\n  }\n\n  /**\n   * Updates the internal theme registry.\n   *\n   * Identifies all `<style>` elements without the `data-no-theme` and `data-theme` attributes.\n   * Extracts the theme annotations from the elements' text content and applies the\n   * `data-theme` or `data-no-theme` attribute depending on the discovered theme id.\n   *\n   * @private\n   * @see extractThemeAnnotations\n   * @see applyThemeIdentifier\n   */\n  #updateRegistry() {\n    Array.from(\n      this.document.head.querySelectorAll<HTMLStyleElement>(\n        'style:not([data-no-theme]):not([data-theme])',\n      ),\n    )\n      .map((el) => ({ el, meta: extractThemeAnnotations(el.textContent) }))\n      .forEach(({ el, meta }) => {\n        if (applyThemeIdentifier(el, meta?.id)) {\n          turnOff(el);\n          this.themeRegistry.register(meta);\n        }\n      });\n  }\n}\n\n/**\n * Applies a theme identifier to a `<style>` element.\n *\n * If the provided `id` is truthy, the element receives the attribute\n * `data-theme` set to the given `id`. Otherwise, the element\n * will get the attribute `data-no-theme` without any value.\n *\n * @param {HTMLStyleElement} el - The `<style>` element to apply the identifier to\n * @param {string | undefined} id - The theme identifier\n * @returns {boolean} true, if the style element belongs to a theme\n * @group Functions\n * @internal\n */\nexport function applyThemeIdentifier(\n  el: HTMLStyleElement,\n  id?: string,\n): boolean {\n  if (!!id) {\n    el.setAttribute('data-theme', id);\n    return true;\n  } else {\n    el.toggleAttribute('data-no-theme', true);\n    return false;\n  }\n}\n\n/**\n * Turn off a style element by setting its `media` attribute to `none`.\n *\n * @param {HTMLStyleElement} el - The style element to turn off.\n * @group Functions\n * @internal\n */\nexport function turnOff(el: HTMLStyleElement): void {\n  el.media = 'none';\n}\n\n/**\n * Turn on a style element by removing its `media` attribute.\n *\n * @param {HTMLStyleElement} el - The style element to turn on.\n * @group Functions\n * @internal\n */\nexport function turnOn(el: HTMLStyleElement): void {\n  el.removeAttribute('media');\n}\n\n/**\n * Extracts theme annotations from a given string.\n *\n * **Format:** `@@<annotationName> value` (until end of line)\n *\n * Possible annotation names:\n * - `id`: a unique identifier for the theme\n * - `displayName`: a human-readable name for the theme\n * - `description`: a short description of the theme\n * - `defaultTheme`: a boolean flag indicating if this is the default theme\n *\n * @param {string} s The string to extract annotations from.\n * @returns {Theme | null} An object containing the extracted annotations, or null if no annotations were found.\n * @group Functions\n * @internal\n */\nexport function extractThemeAnnotations(\n  s: undefined | null | string,\n): Theme | null {\n  if (!s) {\n    return null;\n  }\n  const id = unwrap(/@@id\\s+([^\\r\\n]+)$/m.exec(s));\n  if (!id) {\n    return null;\n  }\n  const displayName = unwrap(/@@displayName\\s+([^\\r\\n]+)$/m.exec(s)) || id;\n  const description = unwrap(/@@description\\s+([^\\r\\n]+)$/m.exec(s));\n  const defaultTheme = /@@default/m.test(s);\n  return { id, displayName, description, defaultTheme };\n}\n\n/**\n * Unwrap a match from a regular expression, returning the first captured group as a string.\n *\n * @param {RegExpExecArray} match - The match to unwrap.\n * @group Functions\n * @internal\n */\nexport function unwrap(match: RegExpExecArray | null): string | undefined {\n  return (match && match[1] && match[1].trim()) || undefined;\n}\n","import { inject, Injectable, InjectionToken, OnDestroy } from \"@angular/core\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { debounceTime, filter, map, skipWhile, Subject, take, takeUntil, takeWhile, tap } from \"rxjs\";\nimport { StorageService, ThemeRegistryService, ThemeStyleManagerService, ThemeTrackingService } from \"./internal\";\n\nconst PREFIX = 'ngx-theme-manager';\n\n/**\n * @group InjectionToken\n */\nexport const STORAGE_KEY = new InjectionToken<string>(\n  `${PREFIX}/STORAGE_KEY`,\n  {\n    factory: () => `${PREFIX}/current-theme`,\n  },\n);\n\n/**\n * @group InjectionToken\n */\nexport const QUERY_PARAM = new InjectionToken<string>(\n  `${PREFIX}/QUERY_PARAM`,\n  {\n    factory: () => `theme`,\n  },\n);\n\n/**\n * Service for managing and switching between different themes in an application.\n *\n * @group Services\n * @group Public API\n */\n@Injectable({ providedIn: 'root' })\nexport class ThemeService implements OnDestroy {\n\n  private readonly registry = inject(ThemeRegistryService);\n  private readonly tracker = inject(ThemeTrackingService);\n  private readonly manager = inject(ThemeStyleManagerService);\n  private readonly storage = inject(StorageService);\n  private readonly activatedRoute = inject(ActivatedRoute);\n  private readonly router = inject(Router);\n  private readonly storageKey = inject(STORAGE_KEY);\n  private readonly queryParam = inject(QUERY_PARAM);\n\n  /**\n   * Subject for triggering cleanup on service destruction.\n   *\n   * @private\n   */\n  readonly #destroyed = new Subject<void>();\n\n  /**\n   * Observable stream that emits the currently active theme.\n   */\n  public readonly themes$ = this.registry.themes$;\n\n  /**\n   * Observable stream of all registered themes.\n   */\n  public readonly currentTheme$ = this.tracker.currentTheme$;\n\n  constructor() {\n    // update the current route, the browser storage and the style elements' media attribute,\n    // when the currently selected theme changes\n    this.tracker.currentTheme$\n      .pipe(\n        filter(isNotNull),\n        tap((theme) => this.#updateRouteParam(theme)),\n        tap((theme) => this.#updateStoredTheme(theme)),\n        tap((theme) => this.manager.use(theme)),\n        takeUntil(this.#destroyed),\n      )\n      .subscribe();\n\n    // calculate the initially selected theme\n    this.registry.themes$\n      .pipe(\n        debounceTime(1),\n        takeWhile(() => !this.tracker.currentTheme),\n        map(\n          (themes) =>\n            themes.find((theme) => theme.defaultTheme) || themes[0],\n        ),\n        map((defaultTheme) => ({\n          fromRoute: this.#themeFromRoute,\n          fromStorage: this.#themeFromStorage,\n          defaultTheme: defaultTheme?.id,\n        })),\n        map(\n          ({ fromRoute, fromStorage, defaultTheme }) =>\n            fromRoute || fromStorage || defaultTheme,\n        ),\n        tap((initialTheme) => {\n          if (!this.tracker.currentTheme) {\n            this.tracker.currentTheme = initialTheme;\n          }\n        }),\n        take(1),\n      )\n      .subscribe();\n\n    // if we got a storage key, update current theme on storage changes\n    if (!!this.storageKey) {\n      this.storage.changes$\n        .pipe(\n          skipWhile(() => !this.tracker.currentTheme),\n          filter(({ key }) => key === this.storageKey),\n          map(({ newValue }) => newValue),\n          tap((theme) => (this.tracker.currentTheme = theme)),\n          takeUntil(this.#destroyed),\n        )\n        .subscribe();\n    }\n\n    // if we got a query param, update the current theme on route param changes\n    if (!!this.queryParam) {\n      this.activatedRoute.queryParamMap\n        .pipe(\n          skipWhile(() => !this.tracker.currentTheme),\n          filter((map) => map.has(this.queryParam!)),\n          map((map) => map.get(this.queryParam!)),\n          tap((theme) => (this.tracker.currentTheme = theme)),\n          takeUntil(this.#destroyed),\n        )\n        .subscribe();\n    }\n  }\n\n  /**\n   * Cleanup logic to be executed when the service is destroyed.\n   *\n   * @internal\n   */\n  ngOnDestroy() {\n    this.#destroyed.next();\n    this.#destroyed.complete();\n  }\n\n  /**\n   * Select the theme to be used\n   *\n   * @param {string} theme\n   */\n  selectTheme(theme: string) {\n    this.tracker.currentTheme = theme;\n  }\n\n  /**\n   * Gets the theme from the browser's storage.\n   *\n   * @returns {string | null} - The stored theme or null if the storage key is not provided\n   * @private\n   */\n  get #themeFromStorage(): string | null {\n    if (!this.storageKey) {\n      return null;\n    }\n    return this.storage.getItem(this.storageKey);\n  }\n\n  /**\n   * Gets the theme from the current route's query.\n   *\n   * @returns {string | null} - The current theme or null if the query param is not provided\n   * @private\n   */\n  get #themeFromRoute(): string | null {\n    if (!this.queryParam) {\n      return null;\n    }\n    return this.activatedRoute.snapshot.queryParamMap.get(this.queryParam);\n  }\n\n  /**\n   * Updates the browser's url query params with the given theme ID.\n   *\n   * Does nothing if the query param is not provided.\n   *\n   * @param {string} theme - The theme ID to update in the browser's url query params\n   * @private\n   */\n  #updateRouteParam(theme: string) {\n    if (!this.queryParam) {\n      return;\n    }\n    this.router.navigate([], {\n      relativeTo: this.activatedRoute,\n      queryParams: theme ? { [this.queryParam]: theme } : {},\n      queryParamsHandling: 'merge',\n      preserveFragment: true,\n    });\n  }\n\n  /**\n   * Updates the theme ID in the browser's storage.\n   *\n   * Does nothing if the storage key is not provided.\n   *\n   * @param {string} theme - The theme ID to save in the browser's storage\n   * @private\n   */\n  #updateStoredTheme(theme: string) {\n    if (!this.storageKey) {\n      return;\n    }\n    this.storage.setItem(this.storageKey, theme);\n  }\n}\n\n/**\n * Type guard.\n *\n * @param {T | null]} arg - The argument to guard\n * @internal\n */\nfunction isNotNull<T>(arg: T | null): arg is T {\n  return arg !== null;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AA2BA;;;;;AAKG;MAEU,cAAc,CAAA;AAGhB,IAAA,SAAS;AAElB;;;;;AAKG;AACM,IAAA,QAAQ;AAEjB;;;;;AAKG;AACM,IAAA,OAAO;AAEhB;;;;;AAKG;AACM,IAAA,SAAS;AAYlB;;;;AAIG;AACH,IAAA,WAAA,GAAA;AA3CiB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;A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