@ecodev/natural 66.0.14 → 66.0.15
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/fesm2022/ecodev-natural.mjs +22 -9
- package/fesm2022/ecodev-natural.mjs.map +1 -1
- package/index.d.ts +15 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injector, InjectionToken, DestroyRef, OnInit, Type, EnvironmentProviders,
|
|
2
|
+
import { Injector, InjectionToken, DestroyRef, OnInit, Type, EnvironmentProviders, OnChanges, SimpleChanges, AfterViewInit, PipeTransform, Provider, OnDestroy, EmbeddedViewRef, ComponentRef, StaticProvider, TemplateRef, DoCheck, ErrorHandler, ApplicationConfig } from '@angular/core';
|
|
3
3
|
import { ValidatorFn, AsyncValidatorFn, AbstractControl, UntypedFormGroup, UntypedFormArray, ValidationErrors, FormControl, FormGroup, FormGroupDirective, NgForm, ControlValueAccessor, NgControl } from '@angular/forms';
|
|
4
4
|
import * as _angular_router from '@angular/router';
|
|
5
5
|
import { ActivatedRoute, ResolveData, UrlSegment, Router, NavigationExtras, RouterLink, Data as Data$1, NavigationEnd, UrlMatcher, Params, QueryParamsHandling, UrlTree } from '@angular/router';
|
|
@@ -1822,17 +1822,29 @@ declare class NaturalEnumService {
|
|
|
1822
1822
|
}
|
|
1823
1823
|
|
|
1824
1824
|
type AllThemes = [string, ...string[]];
|
|
1825
|
-
|
|
1825
|
+
/**
|
|
1826
|
+
* If you are using themes, or color scheme, then you must provide themes at the application level.
|
|
1827
|
+
*
|
|
1828
|
+
* If there is a only one theme, you still need to provide a name for it (eg: "my-app"), even if
|
|
1829
|
+
* it is not used in the SCSS.
|
|
1830
|
+
*/
|
|
1831
|
+
declare function provideThemes(config: AllThemes): EnvironmentProviders;
|
|
1826
1832
|
declare enum ColorScheme {
|
|
1827
1833
|
Light = "light",
|
|
1828
1834
|
Dark = "dark",
|
|
1829
1835
|
Auto = "auto"
|
|
1830
1836
|
}
|
|
1837
|
+
/**
|
|
1838
|
+
* The source of truth is the DOM. And thus the index.html (or equivalent) must use vanilla JavaScript
|
|
1839
|
+
* to restore `data-color-scheme` and `data-theme` attributes on the `<html>` element (eg: from
|
|
1840
|
+
* local storage, or from DB).
|
|
1841
|
+
*/
|
|
1831
1842
|
declare class NaturalThemeService {
|
|
1832
1843
|
private readonly allThemes;
|
|
1833
1844
|
private readonly storage;
|
|
1834
1845
|
private readonly platformId;
|
|
1835
1846
|
protected readonly document: Document;
|
|
1847
|
+
private readonly htmlElement;
|
|
1836
1848
|
private readonly isDarkSystem;
|
|
1837
1849
|
private readonly isDark;
|
|
1838
1850
|
private readonly _theme;
|
|
@@ -1847,7 +1859,7 @@ declare class NaturalThemeService {
|
|
|
1847
1859
|
readonly colorScheme: i0.Signal<ColorScheme>;
|
|
1848
1860
|
constructor();
|
|
1849
1861
|
/**
|
|
1850
|
-
* Set theme in memory
|
|
1862
|
+
* Set theme in memory and dom
|
|
1851
1863
|
*/
|
|
1852
1864
|
setTheme(theme: string): void;
|
|
1853
1865
|
/**
|