@breadstone/mosaik-elements-angular 0.0.228 → 0.0.229

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 0.0.229 (2026-03-03)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **theme:** update theme configuration and add theme mode initialization ([ad71335818](https://github.com/RueDeRennes/mosaik/commit/ad71335818))
6
+
7
+ ### 🩹 Fixes
8
+
9
+ - **config:** update languageId in cspell configuration and increment release version ([ac1296c847](https://github.com/RueDeRennes/mosaik/commit/ac1296c847))
10
+
1
11
  ## 0.0.228 (2026-03-02)
2
12
 
3
13
  ### 🩹 Fixes
@@ -15674,17 +15674,6 @@ function provideTimeUpdates() {
15674
15674
  ]);
15675
15675
  }
15676
15676
 
15677
- // #region Imports
15678
- // #endregion
15679
- /**
15680
- * @public
15681
- */
15682
- const THEME = new InjectionToken('MOSAIK_THEME');
15683
- /**
15684
- * @public
15685
- */
15686
- const THEME_MODE = new InjectionToken('MOSAIK_THEME_MODE');
15687
-
15688
15677
  /**
15689
15678
  * @internal
15690
15679
  */
@@ -15710,13 +15699,25 @@ function deepMerge(target, source) {
15710
15699
  // #region Imports
15711
15700
  // #endregion
15712
15701
  /**
15713
- * The `Name` class.
15702
+ * @public
15703
+ */
15704
+ const THEME = new InjectionToken('MOSAIK_THEME');
15705
+ /**
15706
+ * @public
15707
+ */
15708
+ const THEME_MODE = new InjectionToken('MOSAIK_THEME_MODE');
15709
+
15710
+ // #region Imports
15711
+ // #endregion
15712
+ /**
15713
+ * The `ThemeService` class.
15714
15714
  *
15715
15715
  * @public
15716
15716
  */
15717
15717
  class ThemeService {
15718
15718
  // #region Fields
15719
15719
  _theme;
15720
+ _themeMode;
15720
15721
  _themeObserver;
15721
15722
  // #endregion
15722
15723
  // #region Ctor
@@ -15725,8 +15726,9 @@ class ThemeService {
15725
15726
  *
15726
15727
  * @public
15727
15728
  */
15728
- constructor(theme = inject(THEME), themeObserver = inject(ThemeObserver)) {
15729
+ constructor(theme = inject(THEME), themeMode = inject(THEME_MODE), themeObserver = inject(ThemeObserver)) {
15729
15730
  this._theme = theme;
15731
+ this._themeMode = themeMode;
15730
15732
  this._themeObserver = themeObserver;
15731
15733
  }
15732
15734
  // #endregion
@@ -15739,6 +15741,9 @@ class ThemeService {
15739
15741
  }
15740
15742
  // #endregion
15741
15743
  // #region Methods
15744
+ initialize() {
15745
+ this._themeObserver.applyTheme(this._theme().name, this._themeMode());
15746
+ }
15742
15747
  applyTheme(mode) {
15743
15748
  this._themeObserver.applyTheme(this._theme().name, mode);
15744
15749
  }
@@ -15765,11 +15770,11 @@ function provideTheme(config) {
15765
15770
  useFactory: () => ThemeGeneratorServiceLocator.current
15766
15771
  }, {
15767
15772
  provide: ThemeObserver,
15768
- useFactory: () => {
15769
- ThemeObserverServiceLocator.current.applyTheme(config.theme.name, config.mode);
15770
- return ThemeObserverServiceLocator.current;
15771
- }
15772
- }]);
15773
+ useFactory: () => ThemeObserverServiceLocator.current
15774
+ }, provideEnvironmentInitializer(() => {
15775
+ const themeService = inject(ThemeService);
15776
+ themeService.initialize();
15777
+ })]);
15773
15778
  }
15774
15779
 
15775
15780
  // #region Imports