@rxap/ngx-theme 21.0.1-dev.0 → 21.0.1-dev.1

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 (62) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/compodoc/changelog.html +17 -0
  3. package/compodoc/dependencies.html +4 -4
  4. package/compodoc/injectables/ThemeModeService.html +94 -83
  5. package/compodoc/injectables/ThemeService.html +58 -83
  6. package/compodoc/interfaces/ColorPaletteConfig.html +8 -3
  7. package/compodoc/interfaces/ColorPaletteConfigWithName.html +8 -3
  8. package/compodoc/interfaces/ThemeConfig.html +8 -3
  9. package/compodoc/js/search/search_index.js +2 -2
  10. package/compodoc/properties.html +1 -1
  11. package/docs/documentation.json +479 -541
  12. package/docs/html/assets/hierarchy.js +1 -1
  13. package/docs/html/assets/search.js +1 -1
  14. package/docs/html/classes/ThemeModeService.html +6 -6
  15. package/docs/html/classes/ThemeService.html +2 -2
  16. package/docs/html/enums/ColorPaletteAlgorithm.html +2 -2
  17. package/docs/html/functions/ComputeColorPalette.html +1 -1
  18. package/docs/html/functions/ObserveCurrentThemeDensity.html +1 -1
  19. package/docs/html/functions/provideTheme.html +1 -1
  20. package/docs/html/hierarchy.html +1 -1
  21. package/docs/html/index.html +2 -2
  22. package/docs/html/interfaces/ColorPalette.html +2 -2
  23. package/docs/html/interfaces/ColorPaletteConfig.html +2 -2
  24. package/docs/html/interfaces/ColorPaletteConfigWithName.html +2 -2
  25. package/docs/html/interfaces/ThemeConfig.html +2 -2
  26. package/docs/html/modules.html +1 -1
  27. package/docs/html/types/ActiveTheme.html +1 -1
  28. package/docs/html/types/ThemeSetting.html +1 -1
  29. package/docs/html/variables/THEME_SETTING_KEY.html +1 -1
  30. package/docs/markdown/README.md +1 -1
  31. package/docs/markdown/classes/ThemeModeService.md +23 -33
  32. package/docs/markdown/classes/ThemeService.md +32 -38
  33. package/docs/markdown/enumerations/ColorPaletteAlgorithm.md +4 -4
  34. package/docs/markdown/functions/ComputeColorPalette.md +2 -2
  35. package/docs/markdown/functions/ObserveCurrentThemeDensity.md +2 -2
  36. package/docs/markdown/functions/provideTheme.md +2 -2
  37. package/docs/markdown/globals.md +2 -2
  38. package/docs/markdown/interfaces/ColorPalette.md +16 -16
  39. package/docs/markdown/interfaces/ColorPaletteConfig.md +5 -5
  40. package/docs/markdown/interfaces/ColorPaletteConfigWithName.md +6 -6
  41. package/docs/markdown/interfaces/ThemeConfig.md +7 -7
  42. package/docs/markdown/type-aliases/ActiveTheme.md +2 -2
  43. package/docs/markdown/type-aliases/ThemeSetting.md +2 -2
  44. package/docs/markdown/variables/THEME_SETTING_KEY.md +2 -2
  45. package/docs/wiki/Class.ThemeModeService.md +22 -32
  46. package/docs/wiki/Class.ThemeService.md +31 -37
  47. package/docs/wiki/Enumeration.ColorPaletteAlgorithm.md +3 -3
  48. package/docs/wiki/Function.ComputeColorPalette.md +1 -1
  49. package/docs/wiki/Function.ObserveCurrentThemeDensity.md +1 -1
  50. package/docs/wiki/Function.provideTheme.md +1 -1
  51. package/docs/wiki/Interface.ColorPalette.md +15 -15
  52. package/docs/wiki/Interface.ColorPaletteConfig.md +4 -4
  53. package/docs/wiki/Interface.ColorPaletteConfigWithName.md +5 -5
  54. package/docs/wiki/Interface.ThemeConfig.md +6 -6
  55. package/docs/wiki/TypeAlias.ActiveTheme.md +1 -1
  56. package/docs/wiki/TypeAlias.ThemeSetting.md +1 -1
  57. package/docs/wiki/Variable.THEME_SETTING_KEY.md +1 -1
  58. package/docs/wiki/globals.md +1 -1
  59. package/fesm2022/rxap-ngx-theme.mjs +18 -16
  60. package/fesm2022/rxap-ngx-theme.mjs.map +1 -1
  61. package/package.json +10 -10
  62. package/types/rxap-ngx-theme.d.ts +2 -2
@@ -284,45 +284,15 @@
284
284
  <tbody>
285
285
  <tr>
286
286
  <td class="col-md-4">
287
- <code>constructor(mediaMatcher: MediaMatcher)</code>
287
+ <code>constructor()</code>
288
288
  </td>
289
289
  </tr>
290
290
  <tr>
291
291
  <td class="col-md-4">
292
- <div class="io-line">Defined in <a href="" data-line="59" class="link-to-prism">src/lib/theme.service.ts:59</a></div>
292
+ <div class="io-line">Defined in <a href="" data-line="61" class="link-to-prism">src/lib/theme.service.ts:61</a></div>
293
293
  </td>
294
294
  </tr>
295
295
 
296
- <tr>
297
- <td class="col-md-4">
298
- <div>
299
- <b>Parameters :</b>
300
- <table class="params">
301
- <thead>
302
- <tr>
303
- <td>Name</td>
304
- <td>Type</td>
305
- <td>Optional</td>
306
- </tr>
307
- </thead>
308
- <tbody>
309
- <tr>
310
- <td>mediaMatcher</td>
311
-
312
- <td>
313
- <code>MediaMatcher</code>
314
- </td>
315
-
316
- <td>
317
- No
318
- </td>
319
-
320
- </tr>
321
- </tbody>
322
- </table>
323
- </div>
324
- </td>
325
- </tr>
326
296
  </tbody>
327
297
  </table>
328
298
  </section>
@@ -354,8 +324,8 @@
354
324
 
355
325
  <tr>
356
326
  <td class="col-md-4">
357
- <div class="io-line">Defined in <a href="" data-line="209"
358
- class="link-to-prism">src/lib/theme.service.ts:209</a></div>
327
+ <div class="io-line">Defined in <a href="" data-line="211"
328
+ class="link-to-prism">src/lib/theme.service.ts:211</a></div>
359
329
  </td>
360
330
  </tr>
361
331
 
@@ -423,8 +393,8 @@
423
393
 
424
394
  <tr>
425
395
  <td class="col-md-4">
426
- <div class="io-line">Defined in <a href="" data-line="220"
427
- class="link-to-prism">src/lib/theme.service.ts:220</a></div>
396
+ <div class="io-line">Defined in <a href="" data-line="222"
397
+ class="link-to-prism">src/lib/theme.service.ts:222</a></div>
428
398
  </td>
429
399
  </tr>
430
400
 
@@ -492,8 +462,8 @@
492
462
 
493
463
  <tr>
494
464
  <td class="col-md-4">
495
- <div class="io-line">Defined in <a href="" data-line="216"
496
- class="link-to-prism">src/lib/theme.service.ts:216</a></div>
465
+ <div class="io-line">Defined in <a href="" data-line="218"
466
+ class="link-to-prism">src/lib/theme.service.ts:218</a></div>
497
467
  </td>
498
468
  </tr>
499
469
 
@@ -561,8 +531,8 @@
561
531
 
562
532
  <tr>
563
533
  <td class="col-md-4">
564
- <div class="io-line">Defined in <a href="" data-line="283"
565
- class="link-to-prism">src/lib/theme.service.ts:283</a></div>
534
+ <div class="io-line">Defined in <a href="" data-line="285"
535
+ class="link-to-prism">src/lib/theme.service.ts:285</a></div>
566
536
  </td>
567
537
  </tr>
568
538
 
@@ -600,8 +570,8 @@
600
570
 
601
571
  <tr>
602
572
  <td class="col-md-4">
603
- <div class="io-line">Defined in <a href="" data-line="293"
604
- class="link-to-prism">src/lib/theme.service.ts:293</a></div>
573
+ <div class="io-line">Defined in <a href="" data-line="295"
574
+ class="link-to-prism">src/lib/theme.service.ts:295</a></div>
605
575
  </td>
606
576
  </tr>
607
577
 
@@ -639,8 +609,8 @@
639
609
 
640
610
  <tr>
641
611
  <td class="col-md-4">
642
- <div class="io-line">Defined in <a href="" data-line="303"
643
- class="link-to-prism">src/lib/theme.service.ts:303</a></div>
612
+ <div class="io-line">Defined in <a href="" data-line="305"
613
+ class="link-to-prism">src/lib/theme.service.ts:305</a></div>
644
614
  </td>
645
615
  </tr>
646
616
 
@@ -678,8 +648,8 @@
678
648
 
679
649
  <tr>
680
650
  <td class="col-md-4">
681
- <div class="io-line">Defined in <a href="" data-line="322"
682
- class="link-to-prism">src/lib/theme.service.ts:322</a></div>
651
+ <div class="io-line">Defined in <a href="" data-line="324"
652
+ class="link-to-prism">src/lib/theme.service.ts:324</a></div>
683
653
  </td>
684
654
  </tr>
685
655
 
@@ -747,8 +717,8 @@
747
717
 
748
718
  <tr>
749
719
  <td class="col-md-4">
750
- <div class="io-line">Defined in <a href="" data-line="255"
751
- class="link-to-prism">src/lib/theme.service.ts:255</a></div>
720
+ <div class="io-line">Defined in <a href="" data-line="257"
721
+ class="link-to-prism">src/lib/theme.service.ts:257</a></div>
752
722
  </td>
753
723
  </tr>
754
724
 
@@ -786,8 +756,8 @@
786
756
 
787
757
  <tr>
788
758
  <td class="col-md-4">
789
- <div class="io-line">Defined in <a href="" data-line="275"
790
- class="link-to-prism">src/lib/theme.service.ts:275</a></div>
759
+ <div class="io-line">Defined in <a href="" data-line="277"
760
+ class="link-to-prism">src/lib/theme.service.ts:277</a></div>
791
761
  </td>
792
762
  </tr>
793
763
 
@@ -825,8 +795,8 @@
825
795
 
826
796
  <tr>
827
797
  <td class="col-md-4">
828
- <div class="io-line">Defined in <a href="" data-line="266"
829
- class="link-to-prism">src/lib/theme.service.ts:266</a></div>
798
+ <div class="io-line">Defined in <a href="" data-line="268"
799
+ class="link-to-prism">src/lib/theme.service.ts:268</a></div>
830
800
  </td>
831
801
  </tr>
832
802
 
@@ -864,8 +834,8 @@
864
834
 
865
835
  <tr>
866
836
  <td class="col-md-4">
867
- <div class="io-line">Defined in <a href="" data-line="67"
868
- class="link-to-prism">src/lib/theme.service.ts:67</a></div>
837
+ <div class="io-line">Defined in <a href="" data-line="69"
838
+ class="link-to-prism">src/lib/theme.service.ts:69</a></div>
869
839
  </td>
870
840
  </tr>
871
841
 
@@ -903,8 +873,8 @@
903
873
 
904
874
  <tr>
905
875
  <td class="col-md-4">
906
- <div class="io-line">Defined in <a href="" data-line="140"
907
- class="link-to-prism">src/lib/theme.service.ts:140</a></div>
876
+ <div class="io-line">Defined in <a href="" data-line="142"
877
+ class="link-to-prism">src/lib/theme.service.ts:142</a></div>
908
878
  </td>
909
879
  </tr>
910
880
 
@@ -942,8 +912,8 @@
942
912
 
943
913
  <tr>
944
914
  <td class="col-md-4">
945
- <div class="io-line">Defined in <a href="" data-line="79"
946
- class="link-to-prism">src/lib/theme.service.ts:79</a></div>
915
+ <div class="io-line">Defined in <a href="" data-line="81"
916
+ class="link-to-prism">src/lib/theme.service.ts:81</a></div>
947
917
  </td>
948
918
  </tr>
949
919
 
@@ -981,8 +951,8 @@
981
951
 
982
952
  <tr>
983
953
  <td class="col-md-4">
984
- <div class="io-line">Defined in <a href="" data-line="124"
985
- class="link-to-prism">src/lib/theme.service.ts:124</a></div>
954
+ <div class="io-line">Defined in <a href="" data-line="126"
955
+ class="link-to-prism">src/lib/theme.service.ts:126</a></div>
986
956
  </td>
987
957
  </tr>
988
958
 
@@ -1020,8 +990,8 @@
1020
990
 
1021
991
  <tr>
1022
992
  <td class="col-md-4">
1023
- <div class="io-line">Defined in <a href="" data-line="132"
1024
- class="link-to-prism">src/lib/theme.service.ts:132</a></div>
993
+ <div class="io-line">Defined in <a href="" data-line="134"
994
+ class="link-to-prism">src/lib/theme.service.ts:134</a></div>
1025
995
  </td>
1026
996
  </tr>
1027
997
 
@@ -1059,8 +1029,8 @@
1059
1029
 
1060
1030
  <tr>
1061
1031
  <td class="col-md-4">
1062
- <div class="io-line">Defined in <a href="" data-line="160"
1063
- class="link-to-prism">src/lib/theme.service.ts:160</a></div>
1032
+ <div class="io-line">Defined in <a href="" data-line="162"
1033
+ class="link-to-prism">src/lib/theme.service.ts:162</a></div>
1064
1034
  </td>
1065
1035
  </tr>
1066
1036
 
@@ -1159,8 +1129,8 @@
1159
1129
 
1160
1130
  <tr>
1161
1131
  <td class="col-md-4">
1162
- <div class="io-line">Defined in <a href="" data-line="164"
1163
- class="link-to-prism">src/lib/theme.service.ts:164</a></div>
1132
+ <div class="io-line">Defined in <a href="" data-line="166"
1133
+ class="link-to-prism">src/lib/theme.service.ts:166</a></div>
1164
1134
  </td>
1165
1135
  </tr>
1166
1136
 
@@ -1259,8 +1229,8 @@
1259
1229
 
1260
1230
  <tr>
1261
1231
  <td class="col-md-4">
1262
- <div class="io-line">Defined in <a href="" data-line="190"
1263
- class="link-to-prism">src/lib/theme.service.ts:190</a></div>
1232
+ <div class="io-line">Defined in <a href="" data-line="192"
1233
+ class="link-to-prism">src/lib/theme.service.ts:192</a></div>
1264
1234
  </td>
1265
1235
  </tr>
1266
1236
 
@@ -1359,8 +1329,8 @@
1359
1329
 
1360
1330
  <tr>
1361
1331
  <td class="col-md-4">
1362
- <div class="io-line">Defined in <a href="" data-line="177"
1363
- class="link-to-prism">src/lib/theme.service.ts:177</a></div>
1332
+ <div class="io-line">Defined in <a href="" data-line="179"
1333
+ class="link-to-prism">src/lib/theme.service.ts:179</a></div>
1364
1334
  </td>
1365
1335
  </tr>
1366
1336
 
@@ -1459,8 +1429,8 @@
1459
1429
 
1460
1430
  <tr>
1461
1431
  <td class="col-md-4">
1462
- <div class="io-line">Defined in <a href="" data-line="154"
1463
- class="link-to-prism">src/lib/theme.service.ts:154</a></div>
1432
+ <div class="io-line">Defined in <a href="" data-line="156"
1433
+ class="link-to-prism">src/lib/theme.service.ts:156</a></div>
1464
1434
  </td>
1465
1435
  </tr>
1466
1436
 
@@ -1502,7 +1472,7 @@
1502
1472
  </tr>
1503
1473
  <tr>
1504
1474
  <td class="col-md-4">
1505
- <div class="io-line">Defined in <a href="" data-line="49" class="link-to-prism">src/lib/theme.service.ts:49</a></div>
1475
+ <div class="io-line">Defined in <a href="" data-line="51" class="link-to-prism">src/lib/theme.service.ts:51</a></div>
1506
1476
  </td>
1507
1477
  </tr>
1508
1478
 
@@ -1529,7 +1499,7 @@
1529
1499
  </tr>
1530
1500
  <tr>
1531
1501
  <td class="col-md-4">
1532
- <div class="io-line">Defined in <a href="" data-line="54" class="link-to-prism">src/lib/theme.service.ts:54</a></div>
1502
+ <div class="io-line">Defined in <a href="" data-line="56" class="link-to-prism">src/lib/theme.service.ts:56</a></div>
1533
1503
  </td>
1534
1504
  </tr>
1535
1505
 
@@ -1557,7 +1527,7 @@
1557
1527
  </tr>
1558
1528
  <tr>
1559
1529
  <td class="col-md-4">
1560
- <div class="io-line">Defined in <a href="" data-line="56" class="link-to-prism">src/lib/theme.service.ts:56</a></div>
1530
+ <div class="io-line">Defined in <a href="" data-line="58" class="link-to-prism">src/lib/theme.service.ts:58</a></div>
1561
1531
  </td>
1562
1532
  </tr>
1563
1533
 
@@ -1584,7 +1554,7 @@
1584
1554
  </tr>
1585
1555
  <tr>
1586
1556
  <td class="col-md-4">
1587
- <div class="io-line">Defined in <a href="" data-line="50" class="link-to-prism">src/lib/theme.service.ts:50</a></div>
1557
+ <div class="io-line">Defined in <a href="" data-line="52" class="link-to-prism">src/lib/theme.service.ts:52</a></div>
1588
1558
  </td>
1589
1559
  </tr>
1590
1560
 
@@ -1612,7 +1582,7 @@
1612
1582
  </tr>
1613
1583
  <tr>
1614
1584
  <td class="col-md-4">
1615
- <div class="io-line">Defined in <a href="" data-line="59" class="link-to-prism">src/lib/theme.service.ts:59</a></div>
1585
+ <div class="io-line">Defined in <a href="" data-line="61" class="link-to-prism">src/lib/theme.service.ts:61</a></div>
1616
1586
  </td>
1617
1587
  </tr>
1618
1588
 
@@ -1639,7 +1609,7 @@
1639
1609
  </tr>
1640
1610
  <tr>
1641
1611
  <td class="col-md-4">
1642
- <div class="io-line">Defined in <a href="" data-line="52" class="link-to-prism">src/lib/theme.service.ts:52</a></div>
1612
+ <div class="io-line">Defined in <a href="" data-line="54" class="link-to-prism">src/lib/theme.service.ts:54</a></div>
1643
1613
  </td>
1644
1614
  </tr>
1645
1615
 
@@ -1667,7 +1637,7 @@
1667
1637
  </tr>
1668
1638
  <tr>
1669
1639
  <td class="col-md-4">
1670
- <div class="io-line">Defined in <a href="" data-line="55" class="link-to-prism">src/lib/theme.service.ts:55</a></div>
1640
+ <div class="io-line">Defined in <a href="" data-line="57" class="link-to-prism">src/lib/theme.service.ts:57</a></div>
1671
1641
  </td>
1672
1642
  </tr>
1673
1643
 
@@ -1695,7 +1665,7 @@
1695
1665
  </tr>
1696
1666
  <tr>
1697
1667
  <td class="col-md-4">
1698
- <div class="io-line">Defined in <a href="" data-line="57" class="link-to-prism">src/lib/theme.service.ts:57</a></div>
1668
+ <div class="io-line">Defined in <a href="" data-line="59" class="link-to-prism">src/lib/theme.service.ts:59</a></div>
1699
1669
  </td>
1700
1670
  </tr>
1701
1671
 
@@ -1755,6 +1725,8 @@ export interface ColorPaletteConfig {
1755
1725
 
1756
1726
  @Injectable({ providedIn: &#x27;root&#x27; })
1757
1727
  export class ThemeService {
1728
+ private readonly mediaMatcher &#x3D; inject(MediaMatcher);
1729
+
1758
1730
 
1759
1731
  public readonly config &#x3D; inject(ConfigService);
1760
1732
  public readonly pubSub &#x3D; inject(PubSubService);
@@ -1768,7 +1740,7 @@ export class ThemeService {
1768
1740
 
1769
1741
  protected syncSubscription?: Subscription;
1770
1742
 
1771
- constructor(private readonly mediaMatcher: MediaMatcher) {
1743
+ constructor() {
1772
1744
  this.themeName &#x3D; signal(this.getTheme());
1773
1745
  this.density &#x3D; signal(this.getDensity());
1774
1746
  this.typography &#x3D; signal(this.getTypography());
@@ -1848,7 +1820,7 @@ export class ThemeService {
1848
1820
  }
1849
1821
 
1850
1822
  public restoreDensity() {
1851
- const density &#x3D; localStorage.getItem(&#x27;rxap-theme-density&#x27;);
1823
+ const density &#x3D; localStorage.getItem(this.densityLocalStorageKey);
1852
1824
  if (density) {
1853
1825
  const value &#x3D; Number(density) as ThemeDensity;
1854
1826
  if (value &lt;&#x3D; 0 &amp;&amp; value &gt;&#x3D; -3) {
@@ -2045,9 +2017,12 @@ export class ThemeService {
2045
2017
  if (colorPaletteConfig.base) {
2046
2018
  colorPalette &#x3D;
2047
2019
  ComputeColorPalette(colorPaletteConfig.base, colorPaletteConfig.color, colorPaletteConfig.algorithm);
2020
+ } else {
2021
+ colorPalette &#x3D; colorPaletteConfig.color;
2048
2022
  }
2023
+ } else {
2024
+ colorPalette &#x3D; colorPaletteConfig.color;
2049
2025
  }
2050
- colorPalette &#x3D; colorPaletteConfig.color;
2051
2026
  } else if (colorPaletteConfig.base) {
2052
2027
  colorPalette &#x3D; ComputeColorPalette(colorPaletteConfig.base, {}, colorPaletteConfig.algorithm);
2053
2028
  }
@@ -338,6 +338,8 @@ export interface ColorPaletteConfig {
338
338
 
339
339
  @Injectable({ providedIn: &#x27;root&#x27; })
340
340
  export class ThemeService {
341
+ private readonly mediaMatcher &#x3D; inject(MediaMatcher);
342
+
341
343
 
342
344
  public readonly config &#x3D; inject(ConfigService);
343
345
  public readonly pubSub &#x3D; inject(PubSubService);
@@ -351,7 +353,7 @@ export class ThemeService {
351
353
 
352
354
  protected syncSubscription?: Subscription;
353
355
 
354
- constructor(private readonly mediaMatcher: MediaMatcher) {
356
+ constructor() {
355
357
  this.themeName &#x3D; signal(this.getTheme());
356
358
  this.density &#x3D; signal(this.getDensity());
357
359
  this.typography &#x3D; signal(this.getTypography());
@@ -431,7 +433,7 @@ export class ThemeService {
431
433
  }
432
434
 
433
435
  public restoreDensity() {
434
- const density &#x3D; localStorage.getItem(&#x27;rxap-theme-density&#x27;);
436
+ const density &#x3D; localStorage.getItem(this.densityLocalStorageKey);
435
437
  if (density) {
436
438
  const value &#x3D; Number(density) as ThemeDensity;
437
439
  if (value &lt;&#x3D; 0 &amp;&amp; value &gt;&#x3D; -3) {
@@ -628,9 +630,12 @@ export class ThemeService {
628
630
  if (colorPaletteConfig.base) {
629
631
  colorPalette &#x3D;
630
632
  ComputeColorPalette(colorPaletteConfig.base, colorPaletteConfig.color, colorPaletteConfig.algorithm);
633
+ } else {
634
+ colorPalette &#x3D; colorPaletteConfig.color;
631
635
  }
636
+ } else {
637
+ colorPalette &#x3D; colorPaletteConfig.color;
632
638
  }
633
- colorPalette &#x3D; colorPaletteConfig.color;
634
639
  } else if (colorPaletteConfig.base) {
635
640
  colorPalette &#x3D; ComputeColorPalette(colorPaletteConfig.base, {}, colorPaletteConfig.algorithm);
636
641
  }
@@ -254,6 +254,8 @@ export interface ColorPaletteConfig {
254
254
 
255
255
  @Injectable({ providedIn: &#x27;root&#x27; })
256
256
  export class ThemeService {
257
+ private readonly mediaMatcher &#x3D; inject(MediaMatcher);
258
+
257
259
 
258
260
  public readonly config &#x3D; inject(ConfigService);
259
261
  public readonly pubSub &#x3D; inject(PubSubService);
@@ -267,7 +269,7 @@ export class ThemeService {
267
269
 
268
270
  protected syncSubscription?: Subscription;
269
271
 
270
- constructor(private readonly mediaMatcher: MediaMatcher) {
272
+ constructor() {
271
273
  this.themeName &#x3D; signal(this.getTheme());
272
274
  this.density &#x3D; signal(this.getDensity());
273
275
  this.typography &#x3D; signal(this.getTypography());
@@ -347,7 +349,7 @@ export class ThemeService {
347
349
  }
348
350
 
349
351
  public restoreDensity() {
350
- const density &#x3D; localStorage.getItem(&#x27;rxap-theme-density&#x27;);
352
+ const density &#x3D; localStorage.getItem(this.densityLocalStorageKey);
351
353
  if (density) {
352
354
  const value &#x3D; Number(density) as ThemeDensity;
353
355
  if (value &lt;&#x3D; 0 &amp;&amp; value &gt;&#x3D; -3) {
@@ -544,9 +546,12 @@ export class ThemeService {
544
546
  if (colorPaletteConfig.base) {
545
547
  colorPalette &#x3D;
546
548
  ComputeColorPalette(colorPaletteConfig.base, colorPaletteConfig.color, colorPaletteConfig.algorithm);
549
+ } else {
550
+ colorPalette &#x3D; colorPaletteConfig.color;
547
551
  }
552
+ } else {
553
+ colorPalette &#x3D; colorPaletteConfig.color;
548
554
  }
549
- colorPalette &#x3D; colorPaletteConfig.color;
550
555
  } else if (colorPaletteConfig.base) {
551
556
  colorPalette &#x3D; ComputeColorPalette(colorPaletteConfig.base, {}, colorPaletteConfig.algorithm);
552
557
  }
@@ -428,6 +428,8 @@ export interface ColorPaletteConfig {
428
428
 
429
429
  @Injectable({ providedIn: &#x27;root&#x27; })
430
430
  export class ThemeService {
431
+ private readonly mediaMatcher &#x3D; inject(MediaMatcher);
432
+
431
433
 
432
434
  public readonly config &#x3D; inject(ConfigService);
433
435
  public readonly pubSub &#x3D; inject(PubSubService);
@@ -441,7 +443,7 @@ export class ThemeService {
441
443
 
442
444
  protected syncSubscription?: Subscription;
443
445
 
444
- constructor(private readonly mediaMatcher: MediaMatcher) {
446
+ constructor() {
445
447
  this.themeName &#x3D; signal(this.getTheme());
446
448
  this.density &#x3D; signal(this.getDensity());
447
449
  this.typography &#x3D; signal(this.getTypography());
@@ -521,7 +523,7 @@ export class ThemeService {
521
523
  }
522
524
 
523
525
  public restoreDensity() {
524
- const density &#x3D; localStorage.getItem(&#x27;rxap-theme-density&#x27;);
526
+ const density &#x3D; localStorage.getItem(this.densityLocalStorageKey);
525
527
  if (density) {
526
528
  const value &#x3D; Number(density) as ThemeDensity;
527
529
  if (value &lt;&#x3D; 0 &amp;&amp; value &gt;&#x3D; -3) {
@@ -718,9 +720,12 @@ export class ThemeService {
718
720
  if (colorPaletteConfig.base) {
719
721
  colorPalette &#x3D;
720
722
  ComputeColorPalette(colorPaletteConfig.base, colorPaletteConfig.color, colorPaletteConfig.algorithm);
723
+ } else {
724
+ colorPalette &#x3D; colorPaletteConfig.color;
721
725
  }
726
+ } else {
727
+ colorPalette &#x3D; colorPaletteConfig.color;
722
728
  }
723
- colorPalette &#x3D; colorPaletteConfig.color;
724
729
  } else if (colorPaletteConfig.base) {
725
730
  colorPalette &#x3D; ComputeColorPalette(colorPaletteConfig.base, {}, colorPaletteConfig.algorithm);
726
731
  }