@reforgium/presentia 2.1.0 → 2.1.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.
@@ -73,10 +73,10 @@ const DEVICE_BREAKPOINTS = new InjectionToken('RE_DEVICE_BREAKPOINTS', {
73
73
  */
74
74
  class AdaptiveService {
75
75
  /** @internal Signal of the current device type. */
76
- #device = signal('desktop', ...(ngDevMode ? [{ debugName: "#device" }] : /* istanbul ignore next */ []));
76
+ #device = signal('desktop', ...(ngDevMode ? [{ debugName: "#device" }] : []));
77
77
  /** @internal Signals of the current window width and height. */
78
- #width = signal(0, ...(ngDevMode ? [{ debugName: "#width" }] : /* istanbul ignore next */ []));
79
- #height = signal(0, ...(ngDevMode ? [{ debugName: "#height" }] : /* istanbul ignore next */ []));
78
+ #width = signal(0, ...(ngDevMode ? [{ debugName: "#width" }] : []));
79
+ #height = signal(0, ...(ngDevMode ? [{ debugName: "#height" }] : []));
80
80
  /**
81
81
  * Current device type (reactive signal).
82
82
  * Possible values: `'desktop' | 'tablet' | 'mobile'`.
@@ -99,15 +99,15 @@ class AdaptiveService {
99
99
  * Computed signal indicating whether the current device is a desktop.
100
100
  * Used for conditional rendering or layout configuration.
101
101
  */
102
- isDesktop = computed(() => this.#device() === 'desktop', ...(ngDevMode ? [{ debugName: "isDesktop" }] : /* istanbul ignore next */ []));
103
- isMobile = computed(() => this.#device() === 'mobile', ...(ngDevMode ? [{ debugName: "isMobile" }] : /* istanbul ignore next */ []));
104
- isTablet = computed(() => this.#device() === 'tablet', ...(ngDevMode ? [{ debugName: "isTablet" }] : /* istanbul ignore next */ []));
105
- isDesktopSmall = computed(() => this.#device() === 'desktop-s', ...(ngDevMode ? [{ debugName: "isDesktopSmall" }] : /* istanbul ignore next */ []));
102
+ isDesktop = computed(() => this.#device() === 'desktop', ...(ngDevMode ? [{ debugName: "isDesktop" }] : []));
103
+ isMobile = computed(() => this.#device() === 'mobile', ...(ngDevMode ? [{ debugName: "isMobile" }] : []));
104
+ isTablet = computed(() => this.#device() === 'tablet', ...(ngDevMode ? [{ debugName: "isTablet" }] : []));
105
+ isDesktopSmall = computed(() => this.#device() === 'desktop-s', ...(ngDevMode ? [{ debugName: "isDesktopSmall" }] : []));
106
106
  /**
107
107
  * Computed signal determining whether the screen is in portrait orientation.
108
108
  * Returns `true` if window height is greater than width.
109
109
  */
110
- isPortrait = computed(() => this.#height() > this.#width(), ...(ngDevMode ? [{ debugName: "isPortrait" }] : /* istanbul ignore next */ []));
110
+ isPortrait = computed(() => this.#height() > this.#width(), ...(ngDevMode ? [{ debugName: "isPortrait" }] : []));
111
111
  deviceBreakpoints = inject(DEVICE_BREAKPOINTS);
112
112
  devicePriority = Object.keys(this.deviceBreakpoints);
113
113
  destroyRef = inject(DestroyRef);
@@ -200,10 +200,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
200
200
  * the template is automatically added or removed from the DOM.
201
201
  */
202
202
  class IfDeviceDirective {
203
- deviceInput = signal(undefined, ...(ngDevMode ? [{ debugName: "deviceInput" }] : /* istanbul ignore next */ []));
204
- atLeastInput = signal(undefined, ...(ngDevMode ? [{ debugName: "atLeastInput" }] : /* istanbul ignore next */ []));
205
- betweenInput = signal(undefined, ...(ngDevMode ? [{ debugName: "betweenInput" }] : /* istanbul ignore next */ []));
206
- inverseInput = signal(false, ...(ngDevMode ? [{ debugName: "inverseInput" }] : /* istanbul ignore next */ []));
203
+ deviceInput = signal(undefined, ...(ngDevMode ? [{ debugName: "deviceInput" }] : []));
204
+ atLeastInput = signal(undefined, ...(ngDevMode ? [{ debugName: "atLeastInput" }] : []));
205
+ betweenInput = signal(undefined, ...(ngDevMode ? [{ debugName: "betweenInput" }] : []));
206
+ inverseInput = signal(false, ...(ngDevMode ? [{ debugName: "inverseInput" }] : []));
207
207
  tpl = inject(TemplateRef);
208
208
  vcr = inject(ViewContainerRef);
209
209
  adaptive = inject(AdaptiveService);
@@ -435,14 +435,14 @@ function extractRouteParamKeys(path) {
435
435
  class RouteWatcher {
436
436
  router = inject(Router);
437
437
  destroyRef = inject(DestroyRef);
438
- #params = signal({}, ...(ngDevMode ? [{ debugName: "#params" }] : /* istanbul ignore next */ []));
439
- #deepestParams = signal({}, ...(ngDevMode ? [{ debugName: "#deepestParams" }] : /* istanbul ignore next */ []));
440
- #query = signal({}, ...(ngDevMode ? [{ debugName: "#query" }] : /* istanbul ignore next */ []));
441
- #data = signal({}, ...(ngDevMode ? [{ debugName: "#data" }] : /* istanbul ignore next */ []));
442
- #mergedData = signal({}, ...(ngDevMode ? [{ debugName: "#mergedData" }] : /* istanbul ignore next */ []));
443
- #url = signal('', ...(ngDevMode ? [{ debugName: "#url" }] : /* istanbul ignore next */ []));
444
- #routePattern = signal('', ...(ngDevMode ? [{ debugName: "#routePattern" }] : /* istanbul ignore next */ []));
445
- #fragment = signal(null, ...(ngDevMode ? [{ debugName: "#fragment" }] : /* istanbul ignore next */ []));
438
+ #params = signal({}, ...(ngDevMode ? [{ debugName: "#params" }] : []));
439
+ #deepestParams = signal({}, ...(ngDevMode ? [{ debugName: "#deepestParams" }] : []));
440
+ #query = signal({}, ...(ngDevMode ? [{ debugName: "#query" }] : []));
441
+ #data = signal({}, ...(ngDevMode ? [{ debugName: "#data" }] : []));
442
+ #mergedData = signal({}, ...(ngDevMode ? [{ debugName: "#mergedData" }] : []));
443
+ #url = signal('', ...(ngDevMode ? [{ debugName: "#url" }] : []));
444
+ #routePattern = signal('', ...(ngDevMode ? [{ debugName: "#routePattern" }] : []));
445
+ #fragment = signal(null, ...(ngDevMode ? [{ debugName: "#fragment" }] : []));
446
446
  /** Params merged from root to deepest route. */
447
447
  params = this.#params.asReadonly();
448
448
  /** Params declared on the deepest route only. */
@@ -469,7 +469,7 @@ class RouteWatcher {
469
469
  url: this.#url(),
470
470
  routePattern: this.#routePattern(),
471
471
  fragment: this.#fragment(),
472
- }), ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
472
+ }), ...(ngDevMode ? [{ debugName: "state" }] : []));
473
473
  constructor() {
474
474
  const read = () => {
475
475
  const snapshot = this.deepestSnapshot();
@@ -725,8 +725,8 @@ class LangService {
725
725
  ...LangService.BUILTIN_LANGS,
726
726
  ...this.normalizeSupportedLangs(this.config.supportedLangs ?? []),
727
727
  ]);
728
- #lang = signal(this.getStoredLang(), ...(ngDevMode ? [{ debugName: "#lang" }] : /* istanbul ignore next */ []));
729
- #cache = signal({}, ...(ngDevMode ? [{ debugName: "#cache" }] : /* istanbul ignore next */ []));
728
+ #lang = signal(this.getStoredLang(), ...(ngDevMode ? [{ debugName: "#lang" }] : []));
729
+ #cache = signal({}, ...(ngDevMode ? [{ debugName: "#cache" }] : []));
730
730
  #loadedNamespaces = new Set();
731
731
  #pendingLoads = new Map();
732
732
  #pendingBatchLoads = new Map();
@@ -743,7 +743,7 @@ class LangService {
743
743
  currentLang = computed(() => {
744
744
  const lang = this.#lang();
745
745
  return lang === 'kg' ? (this.config?.kgValue ?? 'kg') : lang;
746
- }, ...(ngDevMode ? [{ debugName: "currentLang" }] : /* istanbul ignore next */ []));
746
+ }, ...(ngDevMode ? [{ debugName: "currentLang" }] : []));
747
747
  /**
748
748
  * Extracts readonly value from private property `#lang` and assigns it to `innerLangVal`.
749
749
  * Expected that property `#lang` has `asReadonly` method that returns immutable representation.
@@ -1186,19 +1186,19 @@ class LangDirective {
1186
1186
  * Localization mode: defines which parts of the element will be translated.
1187
1187
  * @default 'all'
1188
1188
  */
1189
- lang = input('all', { ...(ngDevMode ? { debugName: "lang" } : /* istanbul ignore next */ {}), alias: 'reLang' });
1189
+ lang = input('all', { ...(ngDevMode ? { debugName: "lang" } : {}), alias: 'reLang' });
1190
1190
  /**
1191
1191
  * Explicit key for text content translation.
1192
1192
  */
1193
- reLangKeySig = signal(undefined, ...(ngDevMode ? [{ debugName: "reLangKeySig" }] : /* istanbul ignore next */ []));
1193
+ reLangKeySig = signal(undefined, ...(ngDevMode ? [{ debugName: "reLangKeySig" }] : []));
1194
1194
  /**
1195
1195
  * Explicit attribute-to-key map for translation.
1196
1196
  */
1197
- reLangAttrsSig = signal(undefined, ...(ngDevMode ? [{ debugName: "reLangAttrsSig" }] : /* istanbul ignore next */ []));
1197
+ reLangAttrsSig = signal(undefined, ...(ngDevMode ? [{ debugName: "reLangAttrsSig" }] : []));
1198
1198
  /**
1199
1199
  * Name of an additional attribute to localize (besides standard `title`, `label`, `placeholder`).
1200
1200
  */
1201
- langForAttr = input(...(ngDevMode ? [undefined, { debugName: "langForAttr" }] : /* istanbul ignore next */ []));
1201
+ langForAttr = input(...(ngDevMode ? [undefined, { debugName: "langForAttr" }] : []));
1202
1202
  el = inject(ElementRef);
1203
1203
  renderer = inject(Renderer2);
1204
1204
  service = inject(LangService);
@@ -1608,7 +1608,7 @@ class ThemeService {
1608
1608
  persistence = inject(THEME_PERSISTENCE_ADAPTER);
1609
1609
  isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
1610
1610
  document = inject(DOCUMENT);
1611
- #theme = signal(this.themeDefault, ...(ngDevMode ? [{ debugName: "#theme" }] : /* istanbul ignore next */ []));
1611
+ #theme = signal(this.themeDefault, ...(ngDevMode ? [{ debugName: "#theme" }] : []));
1612
1612
  /**
1613
1613
  * Current active theme (`light` or `dark`).
1614
1614
  *
@@ -1618,13 +1618,13 @@ class ThemeService {
1618
1618
  * <div [class]="themeService.theme()"></div>
1619
1619
  * ```
1620
1620
  */
1621
- theme = computed(() => this.#theme(), ...(ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []));
1621
+ theme = computed(() => this.#theme(), ...(ngDevMode ? [{ debugName: "theme" }] : []));
1622
1622
  /**
1623
1623
  * Convenient flag returning `true` if the light theme is active.
1624
1624
  * Suitable for conditional style application or resource selection.
1625
1625
  */
1626
- isLight = computed(() => this.#theme() === themes.light, ...(ngDevMode ? [{ debugName: "isLight" }] : /* istanbul ignore next */ []));
1627
- isDark = computed(() => this.#theme() === themes.dark, ...(ngDevMode ? [{ debugName: "isDark" }] : /* istanbul ignore next */ []));
1626
+ isLight = computed(() => this.#theme() === themes.light, ...(ngDevMode ? [{ debugName: "isLight" }] : []));
1627
+ isDark = computed(() => this.#theme() === themes.dark, ...(ngDevMode ? [{ debugName: "isDark" }] : []));
1628
1628
  constructor() {
1629
1629
  effect(() => {
1630
1630
  if (!this.isBrowser) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.1.0",
2
+ "version": "2.1.1",
3
3
  "name": "@reforgium/presentia",
4
4
  "description": "Angular infrastructure library for i18n, route-aware namespace preload, theming, adaptive breakpoints, route state, and SEO",
5
5
  "author": "rtommievich",