@rxap/ngx-theme 19.0.4-dev.0 → 19.1.0-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +85 -0
  3. package/compodoc/changelog.html +5 -0
  4. package/compodoc/dependencies.html +4 -4
  5. package/compodoc/index.html +69 -1
  6. package/compodoc/injectables/ThemeModeService.html +1256 -0
  7. package/compodoc/injectables/ThemeService.html +82 -265
  8. package/compodoc/interfaces/ColorPaletteConfig.html +6 -71
  9. package/compodoc/interfaces/ColorPaletteConfigWithName.html +6 -71
  10. package/compodoc/interfaces/ThemeConfig.html +6 -71
  11. package/compodoc/js/menu-wc.js +6 -0
  12. package/compodoc/js/menu-wc_es5.js +1 -1
  13. package/compodoc/js/search/search_index.js +2 -2
  14. package/compodoc/miscellaneous/typealiases.html +235 -0
  15. package/compodoc/miscellaneous/variables.html +32 -0
  16. package/compodoc/overview.html +1 -1
  17. package/compodoc/properties.html +1 -1
  18. package/docs/documentation.json +1672 -532
  19. package/docs/html/assets/hierarchy.js +1 -1
  20. package/docs/html/assets/highlight.css +28 -0
  21. package/docs/html/assets/navigation.js +1 -1
  22. package/docs/html/assets/search.js +1 -1
  23. package/docs/html/classes/ThemeModeService.html +35 -0
  24. package/docs/html/classes/ThemeService.html +4 -6
  25. package/docs/html/enums/ColorPaletteAlgorithm.html +2 -2
  26. package/docs/html/functions/ComputeColorPalette.html +1 -1
  27. package/docs/html/functions/ObserveCurrentThemeDensity.html +1 -1
  28. package/docs/html/functions/provideTheme.html +1 -1
  29. package/docs/html/hierarchy.html +1 -1
  30. package/docs/html/index.html +60 -2
  31. package/docs/html/interfaces/ColorPalette.html +2 -2
  32. package/docs/html/interfaces/ColorPaletteConfig.html +2 -2
  33. package/docs/html/interfaces/ColorPaletteConfigWithName.html +2 -2
  34. package/docs/html/interfaces/ThemeConfig.html +2 -2
  35. package/docs/html/modules.html +1 -1
  36. package/docs/html/types/ActiveTheme.html +1 -0
  37. package/docs/html/types/ThemeSetting.html +1 -0
  38. package/docs/html/variables/THEME_SETTING_KEY.html +1 -0
  39. package/docs/markdown/README.md +86 -1
  40. package/docs/markdown/classes/ThemeModeService.md +282 -0
  41. package/docs/markdown/classes/ThemeService.md +39 -69
  42. package/docs/markdown/enumerations/ColorPaletteAlgorithm.md +4 -4
  43. package/docs/markdown/functions/ComputeColorPalette.md +2 -2
  44. package/docs/markdown/functions/ObserveCurrentThemeDensity.md +2 -2
  45. package/docs/markdown/functions/provideTheme.md +2 -2
  46. package/docs/markdown/globals.md +12 -2
  47. package/docs/markdown/interfaces/ColorPalette.md +16 -16
  48. package/docs/markdown/interfaces/ColorPaletteConfig.md +5 -5
  49. package/docs/markdown/interfaces/ColorPaletteConfigWithName.md +6 -6
  50. package/docs/markdown/interfaces/ThemeConfig.md +7 -7
  51. package/docs/markdown/type-aliases/ActiveTheme.md +11 -0
  52. package/docs/markdown/type-aliases/ThemeSetting.md +11 -0
  53. package/docs/markdown/variables/THEME_SETTING_KEY.md +11 -0
  54. package/docs/wiki/Class.ThemeModeService.md +278 -0
  55. package/docs/wiki/Class.ThemeService.md +38 -68
  56. package/docs/wiki/Enumeration.ColorPaletteAlgorithm.md +3 -3
  57. package/docs/wiki/Function.ComputeColorPalette.md +1 -1
  58. package/docs/wiki/Function.ObserveCurrentThemeDensity.md +1 -1
  59. package/docs/wiki/Function.provideTheme.md +1 -1
  60. package/docs/wiki/Home.md +85 -0
  61. package/docs/wiki/Interface.ColorPalette.md +15 -15
  62. package/docs/wiki/Interface.ColorPaletteConfig.md +4 -4
  63. package/docs/wiki/Interface.ColorPaletteConfigWithName.md +5 -5
  64. package/docs/wiki/Interface.ThemeConfig.md +6 -6
  65. package/docs/wiki/TypeAlias.ActiveTheme.md +7 -0
  66. package/docs/wiki/TypeAlias.ThemeSetting.md +7 -0
  67. package/docs/wiki/Variable.THEME_SETTING_KEY.md +7 -0
  68. package/docs/wiki/_Sidebar.md +10 -0
  69. package/docs/wiki/globals.md +11 -1
  70. package/fesm2022/rxap-ngx-theme.mjs +142 -61
  71. package/fesm2022/rxap-ngx-theme.mjs.map +1 -1
  72. package/index.d.ts +1 -0
  73. package/lib/theme-mode.service.d.ts +61 -0
  74. package/lib/theme.service.d.ts +3 -5
  75. package/package.json +12 -12
@@ -1 +1 @@
1
- {"version":3,"file":"rxap-ngx-theme.mjs","sources":["../../../../../packages/angular/theme/src/lib/compute-color-palette.ts","../../../../../packages/angular/theme/src/lib/observe-current-theme-density.ts","../../../../../packages/angular/theme/src/lib/theme.service.ts","../../../../../packages/angular/theme/src/lib/provide.ts","../../../../../packages/angular/theme/src/index.ts","../../../../../packages/angular/theme/src/rxap-ngx-theme.ts"],"sourcesContent":["import {\n ColorInput,\n Numberify,\n RGBA,\n TinyColor,\n} from '@ctrl/tinycolor';\n\nexport interface ColorPalette {\n 50: string;\n 100: string;\n 200: string;\n 300: string;\n 400: string;\n 500: string;\n 600: string;\n 700: string;\n 800: string;\n 900: string;\n A100: string;\n A200: string;\n A400: string;\n A700: string;\n}\n\nexport enum ColorPaletteAlgorithm {\n CONSTANTIN = 'constantin',\n BUCKNER = 'buckner',\n}\n\nexport function ComputeColorPalette(\n color: ColorInput,\n colorPalette: Partial<ColorPalette> = {},\n algorithm?: ColorPaletteAlgorithm | string,\n): ColorPalette {\n colorPalette = { ...colorPalette };\n\n const baseLight = new TinyColor('#ffffff');\n const baseDark = multiply(new TinyColor(color).toRgb(), new TinyColor(color).toRgb());\n const baseTriad = new TinyColor(color).tetrad();\n\n switch (algorithm) {\n\n case ColorPaletteAlgorithm.CONSTANTIN:\n colorPalette[50] ??= baseLight.mix(color, 12).toHexString();\n colorPalette[100] ??= baseLight.mix(color, 30).toHexString();\n colorPalette[200] ??= baseLight.mix(color, 50).toHexString();\n colorPalette[300] ??= baseLight.mix(color, 70).toHexString();\n colorPalette[400] ??= baseLight.mix(color, 85).toHexString();\n colorPalette[500] ??= baseLight.mix(color, 100).toHexString();\n colorPalette[600] ??= baseDark.mix(color, 87).toHexString();\n colorPalette[700] ??= baseDark.mix(color, 70).toHexString();\n colorPalette[800] ??= baseDark.mix(color, 54).toHexString();\n colorPalette[900] ??= baseDark.mix(color, 25).toHexString();\n colorPalette.A100 ??= baseDark.mix(baseTriad[4], 15).saturate(80).lighten(65).toHexString();\n colorPalette.A200 ??= baseDark.mix(baseTriad[4], 15).saturate(80).lighten(55).toHexString();\n colorPalette.A400 ??= baseDark.mix(baseTriad[4], 15).saturate(100).lighten(45).toHexString();\n colorPalette.A700 ??= baseDark.mix(baseTriad[4], 15).saturate(100).lighten(40).toHexString();\n break;\n\n case ColorPaletteAlgorithm.BUCKNER:\n colorPalette[50] ??= baseLight.mix(color, 12).toHexString();\n colorPalette[100] ??= baseLight.mix(color, 30).toHexString();\n colorPalette[200] ??= baseLight.mix(color, 50).toHexString();\n colorPalette[300] ??= baseLight.mix(color, 70).toHexString();\n colorPalette[400] ??= baseLight.mix(color, 85).toHexString();\n colorPalette[500] ??= baseLight.mix(color, 100).toHexString();\n colorPalette[600] ??= baseDark.mix(color, 87).toHexString();\n colorPalette[700] ??= baseDark.mix(color, 70).toHexString();\n colorPalette[800] ??= baseDark.mix(color, 54).toHexString();\n colorPalette[900] ??= baseDark.mix(color, 25).toHexString();\n colorPalette.A100 ??= baseDark.mix(baseTriad[3], 15).saturate(80).lighten(48).toHexString();\n colorPalette.A200 ??= baseDark.mix(baseTriad[3], 15).saturate(80).lighten(36).toHexString();\n colorPalette.A400 ??= baseDark.mix(baseTriad[3], 15).saturate(100).lighten(31).toHexString();\n colorPalette.A700 ??= baseDark.mix(baseTriad[3], 15).saturate(100).lighten(28).toHexString();\n break;\n\n default:\n colorPalette[50] ??= new TinyColor(color).lighten(52).toHexString();\n colorPalette[100] ??= new TinyColor(color).lighten(37).toHexString();\n colorPalette[200] ??= new TinyColor(color).lighten(26).toHexString();\n colorPalette[300] ??= new TinyColor(color).lighten(12).toHexString();\n colorPalette[400] ??= new TinyColor(color).lighten(6).toHexString();\n colorPalette[500] ??= new TinyColor(color).toHexString();\n colorPalette[600] ??= new TinyColor(color).darken(6).toHexString();\n colorPalette[700] ??= new TinyColor(color).darken(12).toHexString();\n colorPalette[800] ??= new TinyColor(color).darken(18).toHexString();\n colorPalette[900] ??= new TinyColor(color).darken(24).toHexString();\n colorPalette.A100 ??= new TinyColor(color).lighten(50).saturate(30).toHexString();\n colorPalette.A200 ??= new TinyColor(color).lighten(30).saturate(30).toHexString();\n colorPalette.A400 ??= new TinyColor(color).lighten(10).saturate(15).toHexString();\n colorPalette.A700 ??= new TinyColor(color).lighten(5).saturate(5).toHexString();\n break;\n\n }\n\n return colorPalette as ColorPalette;\n}\n\nfunction multiply(rgb1: Numberify<RGBA>, rgb2: Numberify<RGBA>) {\n rgb1.b = Math.floor(rgb1.b * rgb2.b / 255);\n rgb1.g = Math.floor(rgb1.g * rgb2.g / 255);\n rgb1.r = Math.floor(rgb1.r * rgb2.r / 255);\n return new TinyColor('rgb ' + rgb1.r + ' ' + rgb1.g + ' ' + rgb1.b);\n}\n","import { ThemeDensity } from '@rxap/utilities';\nimport { Observable } from 'rxjs';\n\nexport function ObserveCurrentThemeDensity(): Observable<ThemeDensity> {\n return new Observable((subscriber) => {\n\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.type === 'attributes' && mutation.attributeName === 'class') {\n const classList = (mutation.target as HTMLElement).classList;\n const matchingClasses = Array.from(classList).filter((className) =>\n /density-\\d/.test(className),\n );\n if (matchingClasses.length > 0) {\n const match = matchingClasses[0].match(/density-(\\d)/);\n if (match) {\n subscriber.next(Number(match[1]) * -1 as ThemeDensity);\n }\n } else {\n subscriber.next(0);\n }\n }\n });\n });\n\n subscriber.add(() => observer.disconnect());\n\n observer.observe(document.body, {\n attributes: true,\n attributeFilter: [ 'class' ],\n });\n\n });\n}\n","import { MediaMatcher } from '@angular/cdk/layout';\nimport {\n inject,\n Injectable,\n isDevMode,\n signal,\n WritableSignal,\n} from '@angular/core';\nimport { ConfigService } from '@rxap/config';\nimport {\n PubSubService,\n RXAP_TOPICS,\n} from '@rxap/ngx-pub-sub';\nimport { isDefined } from '@rxap/rxjs';\nimport { ThemeDensity } from '@rxap/utilities';\nimport {\n debounceTime,\n map,\n Subscription,\n tap,\n} from 'rxjs';\nimport {\n ColorPalette,\n ComputeColorPalette,\n} from './compute-color-palette';\n\nexport interface ColorPaletteConfigWithName extends ColorPaletteConfig {\n name?: string;\n}\n\nexport interface ThemeConfig {\n primaryColor?: ColorPaletteConfigWithName;\n accentColor?: ColorPaletteConfigWithName;\n warnColor?: ColorPaletteConfigWithName;\n density?: ThemeDensity;\n typography?: string;\n}\n\nexport interface ColorPaletteConfig {\n algorithm?: string;\n base?: string;\n color?: Partial<ColorPalette>;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ThemeService {\n\n public readonly config = inject(ConfigService);\n public readonly pubSub = inject(PubSubService);\n\n public readonly darkMode: WritableSignal<boolean>;\n public readonly themeName: WritableSignal<string>;\n public readonly density: WritableSignal<ThemeDensity>;\n public readonly typography: WritableSignal<string>;\n\n protected readonly darkModeMediaQuery: MediaQueryList;\n\n protected syncSubscription?: Subscription;\n\n constructor(private readonly mediaMatcher: MediaMatcher) {\n this.darkModeMediaQuery = this.mediaMatcher.matchMedia('(prefers-color-scheme: dark)');\n this.darkMode = signal(this.darkModeMediaQuery.matches);\n this.themeName = signal(this.getTheme());\n this.density = signal(this.getDensity());\n this.typography = signal(this.getTypography());\n this.darkModeMediaQuery.addEventListener('change', (event) => {\n this.setDarkTheme(event.matches, true);\n });\n }\n\n public restore() {\n if (isDevMode()) {\n console.log('Restore theme settings from local storage');\n }\n // region restore dark mode\n let darkMode = this.restoreDarkMode();\n // if the dark/light mode is not restored from the local storage\n if (darkMode === null) {\n // set the dark mode based on the media query\n darkMode = this.darkModeMediaQuery.matches;\n this.setDarkTheme(darkMode, true);\n }\n // endregion\n\n this.restoreThemeName();\n this.restoreDensity();\n this.restoreTypography();\n\n this.restoreFromPubSub();\n }\n\n protected restoreFromPubSub() {\n if (this.syncSubscription) {\n return;\n }\n this.syncSubscription = new Subscription();\n this.syncSubscription.add(this.pubSub.subscribe<ThemeDensity>(RXAP_TOPICS.theme.density.restore).pipe(\n debounceTime(1000),\n map(event => event.data),\n isDefined(),\n tap(data => this.setDensity(data, false, false))\n ).subscribe());\n this.syncSubscription.add(this.pubSub.subscribe<string>(RXAP_TOPICS.theme.preset.restore).pipe(\n debounceTime(1000),\n map(event => event.data),\n isDefined(),\n tap(data => this.setTheme(data, false, false))\n ).subscribe());\n this.syncSubscription.add(this.pubSub.subscribe<string>(RXAP_TOPICS.theme.typography.restore).pipe(\n debounceTime(1000),\n map(event => event.data),\n isDefined(),\n tap(data => this.setTypography(data, false, false))\n ).subscribe());\n this.syncSubscription.add(this.pubSub.subscribe<boolean>(RXAP_TOPICS.theme.darkMode.restore).pipe(\n debounceTime(1000),\n map(event => event.data),\n isDefined(),\n tap(data => this.setDarkTheme(data, false, false))\n ).subscribe());\n }\n\n private get darkModeLocalStorageKey() {\n return (\n window as any\n )?.['__rxap__']?.['ngx']?.['theme']?.['darkMode']?.['key'] ?? `rxap-dark-mode`;\n }\n\n private get themeNameLocalStorageKey() {\n return (\n window as any\n )?.['__rxap__']?.['ngx']?.['theme']?.['name']?.['key'] ?? `rxap-theme-name`;\n }\n\n private get densityLocalStorageKey() {\n return (\n window as any\n )?.['__rxap__']?.['ngx']?.['theme']?.['density']?.['key'] ?? `rxap-theme-density`;\n }\n\n private get typographyLocalStorageKey() {\n return (\n window as any\n )?.['__rxap__']?.['ngx']?.['theme']?.['typography']?.['key'] ?? `rxap-theme-typography`;\n }\n\n // region restore\n\n public restoreDarkMode() {\n let darkMode: boolean | null = null;\n const darkModeCached = localStorage.getItem(this.darkModeLocalStorageKey);\n if (darkModeCached === 'true') {\n darkMode = true;\n }\n if (darkModeCached === 'false') {\n darkMode = false;\n }\n if (darkMode !== null) {\n this.setDarkTheme(darkMode, true);\n }\n return darkMode;\n }\n\n public restoreThemeName() {\n const themeName = localStorage.getItem(this.themeNameLocalStorageKey);\n if (themeName) {\n this.setTheme(themeName, true);\n }\n return themeName;\n }\n\n public restoreTypography() {\n const typography = localStorage.getItem(this.typographyLocalStorageKey);\n if (typography) {\n this.setTypography(typography, true);\n }\n return typography;\n }\n\n public restoreDensity() {\n const density = localStorage.getItem('rxap-theme-density');\n if (density) {\n const value = Number(density) as ThemeDensity;\n if (value <= 0 && value >= -3) {\n this.setDensity(Number(density) as ThemeDensity, true);\n return value;\n }\n }\n return null;\n }\n\n // endregion\n\n public toggleDarkTheme(): void {\n this.setDarkTheme(!this.darkMode());\n }\n\n // region set theme configuration state\n\n public setDarkTheme(darkMode: boolean, silent = false, publish = true): void {\n this.applyDarkMode(darkMode);\n if (this.darkMode() !== darkMode) {\n this.darkMode.set(darkMode);\n if (!silent) {\n localStorage.setItem(this.darkModeLocalStorageKey, String(darkMode));\n if (publish) {\n this.pubSub.publish(RXAP_TOPICS.theme.darkMode.changed, darkMode);\n }\n }\n }\n }\n\n public setDensity(density: ThemeDensity, silent = false, publish = true): void {\n this.applyDensity(density);\n if (this.density() !== density) {\n this.density.set(density);\n if (!silent) {\n localStorage.setItem(this.densityLocalStorageKey, String(density));\n if (publish) {\n this.pubSub.publish(RXAP_TOPICS.theme.density.changed, density);\n }\n }\n }\n }\n\n public setTypography(typography: string, silent = false, publish = true): void {\n this.applyTypography(typography);\n if (this.typography() !== typography) {\n this.typography.set(typography);\n if (!silent) {\n localStorage.setItem(this.typographyLocalStorageKey, typography);\n if (publish) {\n this.pubSub.publish(RXAP_TOPICS.theme.typography.changed, typography);\n }\n }\n }\n }\n\n public setTheme(themeName: string, silent = false, publish = true) {\n this.applyTheme(themeName);\n this.density.set(this.getDensity());\n this.typography.set(this.getTypography());\n if (this.themeName() !== themeName) {\n this.themeName.set(themeName);\n if (!silent) {\n localStorage.setItem(this.themeNameLocalStorageKey, themeName);\n if (publish) {\n this.pubSub.publish(RXAP_TOPICS.theme.preset.changed, themeName);\n }\n }\n }\n }\n\n // endregion\n\n // region apply theme configuration state\n\n public applyDarkMode(darkMode: boolean): void {\n if (darkMode) {\n // region deprecated\n document.body.classList.add('dark-theme');\n localStorage.removeItem('rxap-light-theme');\n // endregion\n document.body.classList.add('dark');\n } else {\n // region deprecated\n document.body.classList.remove('dark-theme');\n localStorage.setItem('rxap-light-theme', 'true');\n // endregion\n document.body.classList.remove('dark');\n }\n }\n\n public applyDensity(density: ThemeDensity): void {\n document.body.classList.remove('density-0', 'density-1', 'density-2', 'density-3');\n if (density < 0) {\n document.body.classList.add(`density${ density }`);\n }\n }\n\n public applyTypography(typography: string): void {\n document.body.style.setProperty('--font-family', `var(--font-family-${ typography })`);\n }\n\n public applyTheme(themeName: string): void {\n if (themeName === 'default') {\n this.resetToDefaultTheme();\n return;\n }\n\n const theme = this.getThemeConfig(themeName);\n\n if (theme.primaryColor?.color) {\n this.setCssColorVariables('primary', theme.primaryColor.color);\n }\n\n if (theme.accentColor?.color) {\n this.setCssColorVariables('accent', theme.accentColor.color);\n }\n\n if (theme.warnColor?.color) {\n this.setCssColorVariables('warn', theme.warnColor.color);\n }\n\n if (theme.density !== undefined) {\n this.applyDensity(theme.density);\n }\n\n if (theme.typography) {\n this.applyTypography(theme.typography);\n }\n\n document.body.style.setProperty(`--theme-name`, themeName);\n }\n\n // endregion\n\n // region get theme configuration state\n\n public getDensity(): ThemeDensity {\n let density = 0;\n document.body.classList.forEach((className) => {\n const match = className.match(/density-([123])/);\n if (match) {\n density = Number(match[1]) * -1;\n }\n });\n return density as ThemeDensity;\n }\n\n public getTypography(): string {\n const variable = document.body.style.getPropertyValue('--font-family');\n const match = variable.match(/var\\(--font-family-(.*)\\)/);\n if (match) {\n return match[1];\n }\n return 'default';\n }\n\n public getTheme() {\n return document.body.style.getPropertyValue('--theme-name') || 'default';\n }\n\n // endregion\n\n // region get available\n\n public getAvailableColorPalettes(): string[] | null {\n const colorPalettesConfigs: Record<string, unknown> | boolean = this.config.get('colorPalettes', false);\n if (!colorPalettesConfigs) {\n return null;\n }\n const availableColorPalettes: string[] = Object.keys(colorPalettesConfigs);\n availableColorPalettes.unshift('default');\n return availableColorPalettes;\n }\n\n public getAvailableThemes(): string[] | null {\n const themeConfigs: Record<string, unknown> | boolean = this.config.get('themes', false);\n if (!themeConfigs) {\n return null;\n }\n const availableThemes: string[] = Object.keys(themeConfigs);\n availableThemes.unshift('default');\n return availableThemes;\n }\n\n public getAvailableTypographies(): string[] | null {\n const availableTypographies = this.config.get('typographies', false);\n if (!availableTypographies) {\n return null;\n }\n return Array\n .from(document.styleSheets)\n .filter(sheet => sheet.href === null || sheet.href.startsWith(window.location.origin))\n .flatMap(sheet => Array.from(sheet.cssRules || []))\n .filter((rule: any) => rule.selectorText === ':root')\n .flatMap((rule: any) => Array.from(rule.style))\n .filter((prop: any) => prop.startsWith('--'))\n .filter((prop: any) => prop.startsWith('--font-family-'))\n .map((prop: any) => prop.replace('--font-family-', ''))\n .sort();\n }\n\n // endregion\n\n public getColorPalette(colorPaletteName: string): Partial<ColorPalette> {\n const colorPaletteConfig = this.config.getOrThrow<ColorPaletteConfig>(`colorPalettes.${ colorPaletteName }`);\n return this.coerceColorPalette(colorPaletteConfig);\n }\n\n // region utility\n\n private coerceColorPalette(colorPaletteConfig: ColorPaletteConfig): Partial<ColorPalette> {\n let colorPalette: Partial<ColorPalette> = {};\n\n if (colorPaletteConfig.color) {\n if (Object.keys(colorPaletteConfig.color).length !== 14) {\n // the color palette is not complete\n if (colorPaletteConfig.base) {\n colorPalette =\n ComputeColorPalette(colorPaletteConfig.base, colorPaletteConfig.color, colorPaletteConfig.algorithm);\n }\n }\n colorPalette = colorPaletteConfig.color;\n } else if (colorPaletteConfig.base) {\n colorPalette = ComputeColorPalette(colorPaletteConfig.base, {}, colorPaletteConfig.algorithm);\n }\n\n if (Object.keys(colorPalette).length === 0) {\n throw new Error('FATAL: The color palette has neither a base nor a color property');\n }\n\n return colorPalette;\n }\n\n private getThemeConfig(themeName: string): ThemeConfig {\n const themeConfig = this.config.getOrThrow<ThemeConfig>(`themes.${ themeName }`);\n\n if (themeConfig.accentColor) {\n themeConfig.accentColor.color = this.coerceColorPalette(themeConfig.accentColor);\n }\n\n if (themeConfig.primaryColor) {\n themeConfig.primaryColor.color = this.coerceColorPalette(themeConfig.primaryColor);\n }\n\n if (themeConfig.warnColor) {\n themeConfig.warnColor.color = this.coerceColorPalette(themeConfig.warnColor);\n }\n\n return themeConfig;\n }\n\n private setCssColorVariables(name: string, colorPalette: Partial<ColorPalette>): void {\n this.clearCssColorVariables(name);\n for (const [ index, color ] of Object.entries(colorPalette)) {\n document.body.style.setProperty(`--${ name }-${ index }`, color);\n }\n }\n\n private clearCssColorVariables(name: string): void {\n document.body.style.removeProperty(`--${ name }-50`);\n for (let index = 100; index <= 900; index += 100) {\n document.body.style.removeProperty(`--${ name }-${ index }`);\n }\n document.body.style.removeProperty(`--${ name }-a100`);\n document.body.style.removeProperty(`--${ name }-a200`);\n document.body.style.removeProperty(`--${ name }-a400`);\n document.body.style.removeProperty(`--${ name }-a700`);\n }\n\n private resetToDefaultTheme() {\n this.clearCssColorVariables('primary');\n this.clearCssColorVariables('accent');\n this.clearCssColorVariables('warn');\n this.setDensity(0);\n this.setTypography('default');\n document.body.style.removeProperty(`--theme-name`);\n localStorage.removeItem(this.themeNameLocalStorageKey);\n localStorage.removeItem(this.densityLocalStorageKey);\n localStorage.removeItem(this.typographyLocalStorageKey);\n }\n\n // endregion\n\n}\n","import {\n inject,\n provideAppInitializer,\n} from '@angular/core';\nimport { ThemeService } from './theme.service';\n\nexport function provideTheme() {\n return [\n provideAppInitializer(() => {\n const initializerFn = ((themeService: ThemeService) => () => themeService.restore())(inject(ThemeService));\n return initializerFn();\n })\n ];\n}\n","// region \nexport * from './lib/compute-color-palette';\nexport * from './lib/observe-current-theme-density';\nexport * from './lib/provide';\nexport * from './lib/theme.service';\n// endregion\n","/**\n * Generated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AA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAZ,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cADC,MAAM,EAAA,CAAA,CAAA;;2FACnB,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;SCtClB,YAAY,GAAA;IAC1B,OAAO;QACL,qBAAqB,CAAC,MAAK;YACvB,MAAM,aAAa,GAAG,CAAC,CAAC,YAA0B,KAAK,MAAM,YAAY,CAAC,OAAO,EAAE,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;YAC1G,OAAO,aAAa,EAAE;AACxB,SAAC;KACJ;AACH;;ACbA;AAKA;;ACLA;;AAEG;;;;"}
1
+ {"version":3,"file":"rxap-ngx-theme.mjs","sources":["../../../../../packages/angular/theme/src/lib/compute-color-palette.ts","../../../../../packages/angular/theme/src/lib/observe-current-theme-density.ts","../../../../../packages/angular/theme/src/lib/theme-mode.service.ts","../../../../../packages/angular/theme/src/lib/theme.service.ts","../../../../../packages/angular/theme/src/lib/provide.ts","../../../../../packages/angular/theme/src/index.ts","../../../../../packages/angular/theme/src/rxap-ngx-theme.ts"],"sourcesContent":["import {\n ColorInput,\n Numberify,\n RGBA,\n TinyColor,\n} from '@ctrl/tinycolor';\n\nexport interface ColorPalette {\n 50: string;\n 100: string;\n 200: string;\n 300: string;\n 400: string;\n 500: string;\n 600: string;\n 700: string;\n 800: string;\n 900: string;\n A100: string;\n A200: string;\n A400: string;\n A700: string;\n}\n\nexport enum ColorPaletteAlgorithm {\n CONSTANTIN = 'constantin',\n BUCKNER = 'buckner',\n}\n\nexport function ComputeColorPalette(\n color: ColorInput,\n colorPalette: Partial<ColorPalette> = {},\n algorithm?: ColorPaletteAlgorithm | string,\n): ColorPalette {\n colorPalette = { ...colorPalette };\n\n const baseLight = new TinyColor('#ffffff');\n const baseDark = multiply(new TinyColor(color).toRgb(), new TinyColor(color).toRgb());\n const baseTriad = new TinyColor(color).tetrad();\n\n switch (algorithm) {\n\n case ColorPaletteAlgorithm.CONSTANTIN:\n colorPalette[50] ??= baseLight.mix(color, 12).toHexString();\n colorPalette[100] ??= baseLight.mix(color, 30).toHexString();\n colorPalette[200] ??= baseLight.mix(color, 50).toHexString();\n colorPalette[300] ??= baseLight.mix(color, 70).toHexString();\n colorPalette[400] ??= baseLight.mix(color, 85).toHexString();\n colorPalette[500] ??= baseLight.mix(color, 100).toHexString();\n colorPalette[600] ??= baseDark.mix(color, 87).toHexString();\n colorPalette[700] ??= baseDark.mix(color, 70).toHexString();\n colorPalette[800] ??= baseDark.mix(color, 54).toHexString();\n colorPalette[900] ??= baseDark.mix(color, 25).toHexString();\n colorPalette.A100 ??= baseDark.mix(baseTriad[4], 15).saturate(80).lighten(65).toHexString();\n colorPalette.A200 ??= baseDark.mix(baseTriad[4], 15).saturate(80).lighten(55).toHexString();\n colorPalette.A400 ??= baseDark.mix(baseTriad[4], 15).saturate(100).lighten(45).toHexString();\n colorPalette.A700 ??= baseDark.mix(baseTriad[4], 15).saturate(100).lighten(40).toHexString();\n break;\n\n case ColorPaletteAlgorithm.BUCKNER:\n colorPalette[50] ??= baseLight.mix(color, 12).toHexString();\n colorPalette[100] ??= baseLight.mix(color, 30).toHexString();\n colorPalette[200] ??= baseLight.mix(color, 50).toHexString();\n colorPalette[300] ??= baseLight.mix(color, 70).toHexString();\n colorPalette[400] ??= baseLight.mix(color, 85).toHexString();\n colorPalette[500] ??= baseLight.mix(color, 100).toHexString();\n colorPalette[600] ??= baseDark.mix(color, 87).toHexString();\n colorPalette[700] ??= baseDark.mix(color, 70).toHexString();\n colorPalette[800] ??= baseDark.mix(color, 54).toHexString();\n colorPalette[900] ??= baseDark.mix(color, 25).toHexString();\n colorPalette.A100 ??= baseDark.mix(baseTriad[3], 15).saturate(80).lighten(48).toHexString();\n colorPalette.A200 ??= baseDark.mix(baseTriad[3], 15).saturate(80).lighten(36).toHexString();\n colorPalette.A400 ??= baseDark.mix(baseTriad[3], 15).saturate(100).lighten(31).toHexString();\n colorPalette.A700 ??= baseDark.mix(baseTriad[3], 15).saturate(100).lighten(28).toHexString();\n break;\n\n default:\n colorPalette[50] ??= new TinyColor(color).lighten(52).toHexString();\n colorPalette[100] ??= new TinyColor(color).lighten(37).toHexString();\n colorPalette[200] ??= new TinyColor(color).lighten(26).toHexString();\n colorPalette[300] ??= new TinyColor(color).lighten(12).toHexString();\n colorPalette[400] ??= new TinyColor(color).lighten(6).toHexString();\n colorPalette[500] ??= new TinyColor(color).toHexString();\n colorPalette[600] ??= new TinyColor(color).darken(6).toHexString();\n colorPalette[700] ??= new TinyColor(color).darken(12).toHexString();\n colorPalette[800] ??= new TinyColor(color).darken(18).toHexString();\n colorPalette[900] ??= new TinyColor(color).darken(24).toHexString();\n colorPalette.A100 ??= new TinyColor(color).lighten(50).saturate(30).toHexString();\n colorPalette.A200 ??= new TinyColor(color).lighten(30).saturate(30).toHexString();\n colorPalette.A400 ??= new TinyColor(color).lighten(10).saturate(15).toHexString();\n colorPalette.A700 ??= new TinyColor(color).lighten(5).saturate(5).toHexString();\n break;\n\n }\n\n return colorPalette as ColorPalette;\n}\n\nfunction multiply(rgb1: Numberify<RGBA>, rgb2: Numberify<RGBA>) {\n rgb1.b = Math.floor(rgb1.b * rgb2.b / 255);\n rgb1.g = Math.floor(rgb1.g * rgb2.g / 255);\n rgb1.r = Math.floor(rgb1.r * rgb2.r / 255);\n return new TinyColor('rgb ' + rgb1.r + ' ' + rgb1.g + ' ' + rgb1.b);\n}\n","import { ThemeDensity } from '@rxap/utilities';\nimport { Observable } from 'rxjs';\n\nexport function ObserveCurrentThemeDensity(): Observable<ThemeDensity> {\n return new Observable((subscriber) => {\n\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.type === 'attributes' && mutation.attributeName === 'class') {\n const classList = (mutation.target as HTMLElement).classList;\n const matchingClasses = Array.from(classList).filter((className) =>\n /density-\\d/.test(className),\n );\n if (matchingClasses.length > 0) {\n const match = matchingClasses[0].match(/density-(\\d)/);\n if (match) {\n subscriber.next(Number(match[1]) * -1 as ThemeDensity);\n }\n } else {\n subscriber.next(0);\n }\n }\n });\n });\n\n subscriber.add(() => observer.disconnect());\n\n observer.observe(document.body, {\n attributes: true,\n attributeFilter: [ 'class' ],\n });\n\n });\n}\n","import { MediaMatcher } from '@angular/cdk/layout';\nimport { DOCUMENT } from '@angular/common';\nimport {\n computed,\n effect,\n inject,\n Inject,\n Injectable,\n OnDestroy,\n Renderer2,\n signal,\n WritableSignal,\n} from '@angular/core';\nimport { ConfigService } from '@rxap/config';\nimport {\n PubSubService,\n RXAP_TOPICS,\n} from '@rxap/ngx-pub-sub';\nimport { isDefined } from '@rxap/rxjs';\nimport {\n debounceTime,\n map,\n Subscription,\n tap,\n} from 'rxjs';\n\n// Represents the user's preference setting ('system', 'light', or 'dark')\nexport type ThemeSetting = 'system' | 'light' | 'dark';\n// Represents the currently active theme ('light' or 'dark')\nexport type ActiveTheme = 'light' | 'dark';\n\nexport const THEME_SETTING_KEY = 'rxap_theme_settings';\n\n/**\n * Service to manage theme mode (light/dark/system) for the application.\n * It provides functionality to handle theme preferences, persist them, and synchronize changes.\n *\n * This service integrates with media queries to detect system-level theme changes and allows the user\n * or application logic to toggle or set a specific theme.\n *\n * It utilizes dependency injection to access various required services and the document object.\n * Additionally, it publishes theme-related events for other parts of the application to react to\n * theme changes.\n */\n@Injectable({ providedIn: 'root' })\nexport class ThemeModeService implements OnDestroy {\n\n public readonly config = inject(ConfigService);\n public readonly pubSub = inject(PubSubService);\n\n public readonly activeTheme: WritableSignal<ActiveTheme>;\n public readonly themeSetting: WritableSignal<ThemeSetting>;\n public readonly darkMode = computed(() => this.activeTheme() === 'dark');\n\n protected readonly darkColorSchemaMediaQuery: MediaQueryList;\n\n protected readonly subscriptions: Subscription | null = null;\n protected readonly mediaQueryListener: (this: MediaQueryList, ev: MediaQueryListEventMap['change']) => any;\n\n protected syncSubscription?: Subscription;\n\n constructor(\n protected readonly mediaMatcher: MediaMatcher,\n @Inject(DOCUMENT) protected readonly document: Document,\n ) {\n this.darkColorSchemaMediaQuery = this.mediaMatcher.matchMedia('(prefers-color-scheme: dark)');\n this.themeSetting = signal(this.restoreThemeSetting());\n let activeTheme: ActiveTheme;\n const themeSetting = this.themeSetting();\n switch (themeSetting) {\n case 'system':\n activeTheme = this.darkColorSchemaMediaQuery.matches ? 'dark' : 'light';\n break;\n case 'light':\n activeTheme = 'light';\n break;\n case 'dark':\n activeTheme = 'dark';\n break;\n default:\n activeTheme = this.config.get('theme.active', 'light');\n break;\n }\n this.activeTheme = signal(activeTheme);\n effect(() => {\n const setting = this.themeSetting();\n this.storeThemeSetting(setting);\n });\n effect(() => {\n const active = this.activeTheme();\n this.setThemeClasses(active);\n });\n this.mediaQueryListener = (event: MediaQueryListEventMap['change']) => {\n if (this.themeSetting() === 'system') {\n this.activeTheme.set(event.matches ? 'dark' : 'light');\n }\n };\n this.darkColorSchemaMediaQuery.addEventListener('change', this.mediaQueryListener);\n this.restoreFromPubSub();\n }\n\n private get darkModeLocalStorageKey() {\n return (\n window as any\n )?.['__rxap__']?.['ngx']?.['theme']?.['darkMode']?.['key'] ?? THEME_SETTING_KEY;\n }\n\n protected restoreFromPubSub() {\n if (this.syncSubscription) {\n return;\n }\n this.syncSubscription = new Subscription();\n this.syncSubscription.add(this.pubSub.subscribe<boolean>(RXAP_TOPICS.theme.darkMode.restore).pipe(\n debounceTime(1000),\n map(event => event.data),\n isDefined(),\n tap(data => {\n const active = data ? 'dark' : 'light';\n this.themeSetting.set(active);\n this.activeTheme.set(active);\n })\n ).subscribe());\n }\n\n /**\n * Cleans up subscriptions and event listeners when the service is destroyed.\n */\n ngOnDestroy(): void {\n // Remove the media query listener if it exists.\n this.darkColorSchemaMediaQuery.removeEventListener('change', this.mediaQueryListener);\n // Unsubscribe from all RxJS subscriptions.\n this.subscriptions?.unsubscribe();\n this.syncSubscription?.unsubscribe();\n }\n\n protected restoreThemeSetting() {\n const setting = localStorage.getItem(this.darkModeLocalStorageKey) ?? this.config.get('theme.setting', 'system');\n if (setting && ['system', 'dark', 'light'].includes(setting)) {\n return setting as ThemeSetting;\n }\n return 'system';\n }\n\n protected storeThemeSetting(setting: ThemeSetting) {\n localStorage.setItem(this.darkModeLocalStorageKey, setting);\n }\n\n protected removeThemeClasses() {\n this.document.body.classList.remove('light');\n this.document.body.classList.remove('dark');\n }\n\n protected setThemeClasses(active: ActiveTheme) {\n this.document.body.classList.remove(active === 'light' ? 'dark' : 'light');\n this.document.body.classList.add(active);\n }\n\n /**\n * Toggles the application theme between 'light' and 'dark' modes.\n * It checks the currently active theme and switches to the opposite mode.\n *\n * @return {void} Does not return a value.\n */\n public toggleTheme(): void {\n const currentActive = this.activeTheme();\n // Determine the new setting based on the *currently active* theme.\n const newActive = currentActive === 'light' ? 'dark' : 'light';\n this.themeSetting.set(newActive);\n this.activeTheme.set(newActive);\n }\n\n /**\n * Sets the active theme for the application and optionally publishes the change.\n *\n * @param {ActiveTheme} active - The theme to be set as active.\n * @param {boolean} [publish=true] - Indicates whether to publish the theme change event.\n * @return {void}\n */\n public setTheme(active: ActiveTheme, publish = true) {\n this.themeSetting.set(active);\n this.activeTheme.set(active);\n if (publish) {\n this.pubSub.publish(RXAP_TOPICS.theme.darkMode.changed, this.darkMode());\n }\n }\n\n}\n","import { MediaMatcher } from '@angular/cdk/layout';\nimport {\n inject,\n Injectable,\n isDevMode,\n signal,\n WritableSignal,\n} from '@angular/core';\nimport { ConfigService } from '@rxap/config';\nimport {\n PubSubService,\n RXAP_TOPICS,\n} from '@rxap/ngx-pub-sub';\nimport { isDefined } from '@rxap/rxjs';\nimport { ThemeDensity } from '@rxap/utilities';\nimport {\n debounceTime,\n map,\n Subscription,\n tap,\n} from 'rxjs';\nimport {\n ColorPalette,\n ComputeColorPalette,\n} from './compute-color-palette';\nimport { ThemeModeService } from './theme-mode.service';\n\nexport interface ColorPaletteConfigWithName extends ColorPaletteConfig {\n name?: string;\n}\n\nexport interface ThemeConfig {\n primaryColor?: ColorPaletteConfigWithName;\n accentColor?: ColorPaletteConfigWithName;\n warnColor?: ColorPaletteConfigWithName;\n density?: ThemeDensity;\n typography?: string;\n}\n\nexport interface ColorPaletteConfig {\n algorithm?: string;\n base?: string;\n color?: Partial<ColorPalette>;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ThemeService {\n\n public readonly config = inject(ConfigService);\n public readonly pubSub = inject(PubSubService);\n\n public readonly themeModeService = inject(ThemeModeService);\n\n public readonly darkMode = this.themeModeService.darkMode;\n public readonly themeName: WritableSignal<string>;\n public readonly density: WritableSignal<ThemeDensity>;\n public readonly typography: WritableSignal<string>;\n\n protected syncSubscription?: Subscription;\n\n constructor(private readonly mediaMatcher: MediaMatcher) {\n this.themeName = signal(this.getTheme());\n this.density = signal(this.getDensity());\n this.typography = signal(this.getTypography());\n }\n\n public restore() {\n if (isDevMode()) {\n console.log('Restore theme settings from local storage');\n }\n\n this.restoreThemeName();\n this.restoreDensity();\n this.restoreTypography();\n\n this.restoreFromPubSub();\n }\n\n protected restoreFromPubSub() {\n if (this.syncSubscription) {\n return;\n }\n this.syncSubscription = new Subscription();\n this.syncSubscription.add(this.pubSub.subscribe<ThemeDensity>(RXAP_TOPICS.theme.density.restore).pipe(\n debounceTime(1000),\n map(event => event.data),\n isDefined(),\n tap(data => this.setDensity(data, false, false))\n ).subscribe());\n this.syncSubscription.add(this.pubSub.subscribe<string>(RXAP_TOPICS.theme.preset.restore).pipe(\n debounceTime(1000),\n map(event => event.data),\n isDefined(),\n tap(data => this.setTheme(data, false, false))\n ).subscribe());\n this.syncSubscription.add(this.pubSub.subscribe<string>(RXAP_TOPICS.theme.typography.restore).pipe(\n debounceTime(1000),\n map(event => event.data),\n isDefined(),\n tap(data => this.setTypography(data, false, false))\n ).subscribe());\n }\n\n private get themeNameLocalStorageKey() {\n return (\n window as any\n )?.['__rxap__']?.['ngx']?.['theme']?.['name']?.['key'] ?? `rxap-theme-name`;\n }\n\n private get densityLocalStorageKey() {\n return (\n window as any\n )?.['__rxap__']?.['ngx']?.['theme']?.['density']?.['key'] ?? `rxap-theme-density`;\n }\n\n private get typographyLocalStorageKey() {\n return (\n window as any\n )?.['__rxap__']?.['ngx']?.['theme']?.['typography']?.['key'] ?? `rxap-theme-typography`;\n }\n\n // region restore\n\n public restoreThemeName() {\n const themeName = localStorage.getItem(this.themeNameLocalStorageKey);\n if (themeName) {\n this.setTheme(themeName, true);\n }\n return themeName;\n }\n\n public restoreTypography() {\n const typography = localStorage.getItem(this.typographyLocalStorageKey);\n if (typography) {\n this.setTypography(typography, true);\n }\n return typography;\n }\n\n public restoreDensity() {\n const density = localStorage.getItem('rxap-theme-density');\n if (density) {\n const value = Number(density) as ThemeDensity;\n if (value <= 0 && value >= -3) {\n this.setDensity(Number(density) as ThemeDensity, true);\n return value;\n }\n }\n return null;\n }\n\n // endregion\n\n public toggleDarkTheme(): void {\n this.themeModeService.toggleTheme();\n }\n\n // region set theme configuration state\n\n public setDarkTheme(darkMode: boolean, silent = false, publish = true): void {\n this.themeModeService.setTheme(darkMode ? 'dark' : 'light', publish);\n }\n\n public setDensity(density: ThemeDensity, silent = false, publish = true): void {\n this.applyDensity(density);\n if (this.density() !== density) {\n this.density.set(density);\n if (!silent) {\n localStorage.setItem(this.densityLocalStorageKey, String(density));\n if (publish) {\n this.pubSub.publish(RXAP_TOPICS.theme.density.changed, density);\n }\n }\n }\n }\n\n public setTypography(typography: string, silent = false, publish = true): void {\n this.applyTypography(typography);\n if (this.typography() !== typography) {\n this.typography.set(typography);\n if (!silent) {\n localStorage.setItem(this.typographyLocalStorageKey, typography);\n if (publish) {\n this.pubSub.publish(RXAP_TOPICS.theme.typography.changed, typography);\n }\n }\n }\n }\n\n public setTheme(themeName: string, silent = false, publish = true) {\n this.applyTheme(themeName);\n this.density.set(this.getDensity());\n this.typography.set(this.getTypography());\n if (this.themeName() !== themeName) {\n this.themeName.set(themeName);\n if (!silent) {\n localStorage.setItem(this.themeNameLocalStorageKey, themeName);\n if (publish) {\n this.pubSub.publish(RXAP_TOPICS.theme.preset.changed, themeName);\n }\n }\n }\n }\n\n // endregion\n\n // region apply theme configuration state\n\n public applyDensity(density: ThemeDensity): void {\n document.body.classList.remove('density-0', 'density-1', 'density-2', 'density-3');\n if (density < 0) {\n document.body.classList.add(`density${ density }`);\n }\n }\n\n public applyTypography(typography: string): void {\n document.body.style.setProperty('--font-family', `var(--font-family-${ typography })`);\n }\n\n public applyTheme(themeName: string): void {\n if (themeName === 'default') {\n this.resetToDefaultTheme();\n return;\n }\n\n const theme = this.getThemeConfig(themeName);\n\n if (theme.primaryColor?.color) {\n this.setCssColorVariables('primary', theme.primaryColor.color);\n }\n\n if (theme.accentColor?.color) {\n this.setCssColorVariables('accent', theme.accentColor.color);\n }\n\n if (theme.warnColor?.color) {\n this.setCssColorVariables('warn', theme.warnColor.color);\n }\n\n if (theme.density !== undefined) {\n this.applyDensity(theme.density);\n }\n\n if (theme.typography) {\n this.applyTypography(theme.typography);\n }\n\n document.body.style.setProperty(`--theme-name`, themeName);\n }\n\n // endregion\n\n // region get theme configuration state\n\n public getDensity(): ThemeDensity {\n let density = 0;\n document.body.classList.forEach((className) => {\n const match = className.match(/density-([123])/);\n if (match) {\n density = Number(match[1]) * -1;\n }\n });\n return density as ThemeDensity;\n }\n\n public getTypography(): string {\n const variable = document.body.style.getPropertyValue('--font-family');\n const match = variable.match(/var\\(--font-family-(.*)\\)/);\n if (match) {\n return match[1];\n }\n return 'default';\n }\n\n public getTheme() {\n return document.body.style.getPropertyValue('--theme-name') || 'default';\n }\n\n // endregion\n\n // region get available\n\n public getAvailableColorPalettes(): string[] | null {\n const colorPalettesConfigs: Record<string, unknown> | boolean = this.config.get('colorPalettes', false);\n if (!colorPalettesConfigs) {\n return null;\n }\n const availableColorPalettes: string[] = Object.keys(colorPalettesConfigs);\n availableColorPalettes.unshift('default');\n return availableColorPalettes;\n }\n\n public getAvailableThemes(): string[] | null {\n const themeConfigs: Record<string, unknown> | boolean = this.config.get('themes', false);\n if (!themeConfigs) {\n return null;\n }\n const availableThemes: string[] = Object.keys(themeConfigs);\n availableThemes.unshift('default');\n return availableThemes;\n }\n\n public getAvailableTypographies(): string[] | null {\n const availableTypographies = this.config.get('typographies', false);\n if (!availableTypographies) {\n return null;\n }\n return Array\n .from(document.styleSheets)\n .filter(sheet => sheet.href === null || sheet.href.startsWith(window.location.origin))\n .flatMap(sheet => Array.from(sheet.cssRules || []))\n .filter((rule: any) => rule.selectorText === ':root')\n .flatMap((rule: any) => Array.from(rule.style))\n .filter((prop: any) => prop.startsWith('--'))\n .filter((prop: any) => prop.startsWith('--font-family-'))\n .map((prop: any) => prop.replace('--font-family-', ''))\n .sort();\n }\n\n // endregion\n\n public getColorPalette(colorPaletteName: string): Partial<ColorPalette> {\n const colorPaletteConfig = this.config.getOrThrow<ColorPaletteConfig>(`colorPalettes.${ colorPaletteName }`);\n return this.coerceColorPalette(colorPaletteConfig);\n }\n\n // region utility\n\n private coerceColorPalette(colorPaletteConfig: ColorPaletteConfig): Partial<ColorPalette> {\n let colorPalette: Partial<ColorPalette> = {};\n\n if (colorPaletteConfig.color) {\n if (Object.keys(colorPaletteConfig.color).length !== 14) {\n // the color palette is not complete\n if (colorPaletteConfig.base) {\n colorPalette =\n ComputeColorPalette(colorPaletteConfig.base, colorPaletteConfig.color, colorPaletteConfig.algorithm);\n }\n }\n colorPalette = colorPaletteConfig.color;\n } else if (colorPaletteConfig.base) {\n colorPalette = ComputeColorPalette(colorPaletteConfig.base, {}, colorPaletteConfig.algorithm);\n }\n\n if (Object.keys(colorPalette).length === 0) {\n throw new Error('FATAL: The color palette has neither a base nor a color property');\n }\n\n return colorPalette;\n }\n\n private getThemeConfig(themeName: string): ThemeConfig {\n const themeConfig = this.config.getOrThrow<ThemeConfig>(`themes.${ themeName }`);\n\n if (themeConfig.accentColor) {\n themeConfig.accentColor.color = this.coerceColorPalette(themeConfig.accentColor);\n }\n\n if (themeConfig.primaryColor) {\n themeConfig.primaryColor.color = this.coerceColorPalette(themeConfig.primaryColor);\n }\n\n if (themeConfig.warnColor) {\n themeConfig.warnColor.color = this.coerceColorPalette(themeConfig.warnColor);\n }\n\n return themeConfig;\n }\n\n private setCssColorVariables(name: string, colorPalette: Partial<ColorPalette>): void {\n this.clearCssColorVariables(name);\n for (const [ index, color ] of Object.entries(colorPalette)) {\n document.body.style.setProperty(`--${ name }-${ index }`, color);\n }\n }\n\n private clearCssColorVariables(name: string): void {\n document.body.style.removeProperty(`--${ name }-50`);\n for (let index = 100; index <= 900; index += 100) {\n document.body.style.removeProperty(`--${ name }-${ index }`);\n }\n document.body.style.removeProperty(`--${ name }-a100`);\n document.body.style.removeProperty(`--${ name }-a200`);\n document.body.style.removeProperty(`--${ name }-a400`);\n document.body.style.removeProperty(`--${ name }-a700`);\n }\n\n private resetToDefaultTheme() {\n this.clearCssColorVariables('primary');\n this.clearCssColorVariables('accent');\n this.clearCssColorVariables('warn');\n this.setDensity(0);\n this.setTypography('default');\n document.body.style.removeProperty(`--theme-name`);\n localStorage.removeItem(this.themeNameLocalStorageKey);\n localStorage.removeItem(this.densityLocalStorageKey);\n localStorage.removeItem(this.typographyLocalStorageKey);\n }\n\n // endregion\n\n}\n","import {\n inject,\n provideAppInitializer,\n} from '@angular/core';\nimport { ThemeService } from './theme.service';\n\nexport function provideTheme() {\n return [\n provideAppInitializer(() => {\n const initializerFn = ((themeService: ThemeService) => () => themeService.restore())(inject(ThemeService));\n return initializerFn();\n })\n ];\n}\n","// region \nexport * from './lib/compute-color-palette';\nexport * from './lib/observe-current-theme-density';\nexport * from './lib/provide';\nexport * from './lib/theme-mode.service';\nexport * from './lib/theme.service';\n// endregion\n","/**\n * Generated bundle index.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CAAC,UAAU,CAAC,IAAI,CAAC,sBAAsB,CAAC;AACpD,QAAA,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,yBAAyB,CAAC;;8GA9V9C,YAAY,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAZ,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cADC,MAAM,EAAA,CAAA,CAAA;;2FACnB,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;SCvClB,YAAY,GAAA;IAC1B,OAAO;QACL,qBAAqB,CAAC,MAAK;YACvB,MAAM,aAAa,GAAG,CAAC,CAAC,YAA0B,KAAK,MAAM,YAAY,CAAC,OAAO,EAAE,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;YAC1G,OAAO,aAAa,EAAE;AACxB,SAAC;KACJ;AACH;;ACbA;AAMA;;ACNA;;AAEG;;;;"}
package/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './lib/compute-color-palette';
2
2
  export * from './lib/observe-current-theme-density';
3
3
  export * from './lib/provide';
4
+ export * from './lib/theme-mode.service';
4
5
  export * from './lib/theme.service';
@@ -0,0 +1,61 @@
1
+ import { MediaMatcher } from '@angular/cdk/layout';
2
+ import { OnDestroy, WritableSignal } from '@angular/core';
3
+ import { ConfigService } from '@rxap/config';
4
+ import { PubSubService } from '@rxap/ngx-pub-sub';
5
+ import { Subscription } from 'rxjs';
6
+ import * as i0 from "@angular/core";
7
+ export type ThemeSetting = 'system' | 'light' | 'dark';
8
+ export type ActiveTheme = 'light' | 'dark';
9
+ export declare const THEME_SETTING_KEY = "rxap_theme_settings";
10
+ /**
11
+ * Service to manage theme mode (light/dark/system) for the application.
12
+ * It provides functionality to handle theme preferences, persist them, and synchronize changes.
13
+ *
14
+ * This service integrates with media queries to detect system-level theme changes and allows the user
15
+ * or application logic to toggle or set a specific theme.
16
+ *
17
+ * It utilizes dependency injection to access various required services and the document object.
18
+ * Additionally, it publishes theme-related events for other parts of the application to react to
19
+ * theme changes.
20
+ */
21
+ export declare class ThemeModeService implements OnDestroy {
22
+ protected readonly mediaMatcher: MediaMatcher;
23
+ protected readonly document: Document;
24
+ readonly config: ConfigService<any>;
25
+ readonly pubSub: PubSubService;
26
+ readonly activeTheme: WritableSignal<ActiveTheme>;
27
+ readonly themeSetting: WritableSignal<ThemeSetting>;
28
+ readonly darkMode: import("@angular/core").Signal<boolean>;
29
+ protected readonly darkColorSchemaMediaQuery: MediaQueryList;
30
+ protected readonly subscriptions: Subscription | null;
31
+ protected readonly mediaQueryListener: (this: MediaQueryList, ev: MediaQueryListEventMap['change']) => any;
32
+ protected syncSubscription?: Subscription;
33
+ constructor(mediaMatcher: MediaMatcher, document: Document);
34
+ private get darkModeLocalStorageKey();
35
+ protected restoreFromPubSub(): void;
36
+ /**
37
+ * Cleans up subscriptions and event listeners when the service is destroyed.
38
+ */
39
+ ngOnDestroy(): void;
40
+ protected restoreThemeSetting(): ThemeSetting;
41
+ protected storeThemeSetting(setting: ThemeSetting): void;
42
+ protected removeThemeClasses(): void;
43
+ protected setThemeClasses(active: ActiveTheme): void;
44
+ /**
45
+ * Toggles the application theme between 'light' and 'dark' modes.
46
+ * It checks the currently active theme and switches to the opposite mode.
47
+ *
48
+ * @return {void} Does not return a value.
49
+ */
50
+ toggleTheme(): void;
51
+ /**
52
+ * Sets the active theme for the application and optionally publishes the change.
53
+ *
54
+ * @param {ActiveTheme} active - The theme to be set as active.
55
+ * @param {boolean} [publish=true] - Indicates whether to publish the theme change event.
56
+ * @return {void}
57
+ */
58
+ setTheme(active: ActiveTheme, publish?: boolean): void;
59
+ static ɵfac: i0.ɵɵFactoryDeclaration<ThemeModeService, never>;
60
+ static ɵprov: i0.ɵɵInjectableDeclaration<ThemeModeService>;
61
+ }
@@ -5,6 +5,7 @@ import { PubSubService } from '@rxap/ngx-pub-sub';
5
5
  import { ThemeDensity } from '@rxap/utilities';
6
6
  import { Subscription } from 'rxjs';
7
7
  import { ColorPalette } from './compute-color-palette';
8
+ import { ThemeModeService } from './theme-mode.service';
8
9
  import * as i0 from "@angular/core";
9
10
  export interface ColorPaletteConfigWithName extends ColorPaletteConfig {
10
11
  name?: string;
@@ -25,20 +26,18 @@ export declare class ThemeService {
25
26
  private readonly mediaMatcher;
26
27
  readonly config: ConfigService<any>;
27
28
  readonly pubSub: PubSubService;
28
- readonly darkMode: WritableSignal<boolean>;
29
+ readonly themeModeService: ThemeModeService;
30
+ readonly darkMode: import("@angular/core").Signal<boolean>;
29
31
  readonly themeName: WritableSignal<string>;
30
32
  readonly density: WritableSignal<ThemeDensity>;
31
33
  readonly typography: WritableSignal<string>;
32
- protected readonly darkModeMediaQuery: MediaQueryList;
33
34
  protected syncSubscription?: Subscription;
34
35
  constructor(mediaMatcher: MediaMatcher);
35
36
  restore(): void;
36
37
  protected restoreFromPubSub(): void;
37
- private get darkModeLocalStorageKey();
38
38
  private get themeNameLocalStorageKey();
39
39
  private get densityLocalStorageKey();
40
40
  private get typographyLocalStorageKey();
41
- restoreDarkMode(): boolean | null;
42
41
  restoreThemeName(): string | null;
43
42
  restoreTypography(): string | null;
44
43
  restoreDensity(): ThemeDensity | null;
@@ -47,7 +46,6 @@ export declare class ThemeService {
47
46
  setDensity(density: ThemeDensity, silent?: boolean, publish?: boolean): void;
48
47
  setTypography(typography: string, silent?: boolean, publish?: boolean): void;
49
48
  setTheme(themeName: string, silent?: boolean, publish?: boolean): void;
50
- applyDarkMode(darkMode: boolean): void;
51
49
  applyDensity(density: ThemeDensity): void;
52
50
  applyTypography(typography: string): void;
53
51
  applyTheme(themeName: string): void;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "19.0.4-dev.0",
2
+ "version": "19.1.0-dev.0",
3
3
  "name": "@rxap/ngx-theme",
4
4
  "description": "This package provides an Angular theme service that allows you to manage and customize the look and feel of your application. It includes features such as dark mode support, theme density control, typography settings, and color palette management. The service also provides utilities for computing color palettes and observing theme density changes.\n",
5
5
  "license": "GPL-3.0-or-later",
@@ -11,10 +11,10 @@
11
11
  "peerDependencies": {
12
12
  "@angular/cdk": "^19.1.1",
13
13
  "@angular/core": "^19.2.1",
14
- "@rxap/config": "^19.0.3",
15
- "@rxap/ngx-pub-sub": "^19.0.3",
16
- "@rxap/rxjs": "^1.1.15",
17
- "@rxap/utilities": "^16.4.3",
14
+ "@rxap/config": "^19.0.4-dev.0",
15
+ "@rxap/ngx-pub-sub": "^19.0.4-dev.0",
16
+ "@rxap/rxjs": "^1.1.16-dev.0",
17
+ "@rxap/utilities": "^16.4.4-dev.0",
18
18
  "rxjs": "^7.8.1"
19
19
  },
20
20
  "author": {
@@ -39,7 +39,7 @@
39
39
  "packageGroup": [
40
40
  {
41
41
  "package": "@angular/cdk",
42
- "version": "19.1.1"
42
+ "version": "19.2.2"
43
43
  },
44
44
  {
45
45
  "package": "@angular/common",
@@ -51,23 +51,23 @@
51
51
  },
52
52
  {
53
53
  "package": "@rxap/config",
54
- "version": "19.0.3"
54
+ "version": "19.0.4-dev.0"
55
55
  },
56
56
  {
57
57
  "package": "@rxap/environment",
58
- "version": "19.0.3"
58
+ "version": "19.0.4-dev.0"
59
59
  },
60
60
  {
61
61
  "package": "@rxap/ngx-pub-sub",
62
- "version": "19.0.3"
62
+ "version": "19.0.4-dev.0"
63
63
  },
64
64
  {
65
65
  "package": "@rxap/rxjs",
66
- "version": "1.1.15"
66
+ "version": "1.1.16-dev.0"
67
67
  },
68
68
  {
69
69
  "package": "@rxap/utilities",
70
- "version": "16.4.3"
70
+ "version": "16.4.4-dev.0"
71
71
  }
72
72
  ]
73
73
  },
@@ -82,7 +82,7 @@
82
82
  },
83
83
  "schematics": "./generators.json",
84
84
  "sideEffects": false,
85
- "gitHead": "e4552670b179901abc7ce57cc3ff490ac705b867",
85
+ "gitHead": "b32f110144dafee760d535d217a2855e77f154a5",
86
86
  "module": "fesm2022/rxap-ngx-theme.mjs",
87
87
  "typings": "index.d.ts",
88
88
  "exports": {