@reforgium/presentia 2.1.0 → 2.1.2

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,163 +1,177 @@
1
- ## [2.1.0]: 05.04.2026
2
- ### Refactor:
3
- - replaced presentia-specific persistence adapter behavior with storage contracts and strategies backed by `@reforgium/internal`
4
- - `LangService` and `ThemeService` now persist through storage interface bindings instead of direct localStorage-specific adapter semantics
5
-
6
- ### Feat:
7
- - added grouped `storage` / `persistence` options for `providePresentia(...)` theme and lang config
8
- - kept `persistenceAdapter` as a compatibility alias during the transition to storage-based persistence
9
-
10
- ### Fix:
11
- - aligned `persistence: 'none'` with a real no-op storage instead of pseudo-persistent in-memory behavior
12
- - preserved raw `lang` / `theme` browser storage keys while moving persistence onto shared storage contracts
13
-
14
- ### Test:
15
- - updated provider and theme tests for the storage-based persistence contract
16
- - verified `presentia` typecheck, Vitest suite, and Angular package build after the persistence migration
17
-
18
- ---
19
-
20
- ## [2.0.0]: 04.04.2026
21
- ### Feat:
22
- - added grouped `providePresentia(...)` v2 entry point and marked `provideReInit(...)` as legacy in dev mode
23
- - extended `ThemeService` with DOM strategies, theme registry validation, and configurable persistence adapter support
24
- - extended `AdaptiveService` with named breakpoint helpers (`breakpoint`, `is`, `isAtLeast`, `isBetween`, `isMobile`, `isTablet`, `isDesktopSmall`)
25
- - extended `IfDeviceDirective` with `reIfDeviceAtLeast` and `reIfDeviceBetween`
26
- - extended `RouteWatcher` with `deepestParams`, `mergedData`, `routePattern`, `selectParam`, and path matching helpers
27
- - aligned `SeoRouteListener` with merged route data and normalized route-tree path resolution
28
-
29
- ### Docs:
30
- - documented grouped v2 config, theme DOM/persistence options, and adaptive breakpoint helpers
31
- - documented recommended v2 setup, extended route watcher state, and adaptive range directives
32
- - promoted `V2-MIGRATION.md` from draft to working migration guide and refreshed `V2-CONFIG.md` / `ROADMAP-2.0.0.md`
33
- - moved compatibility-only surface out of primary README export lists and into explicit legacy notes
34
-
35
- ### Test:
36
- - added provider and runtime coverage for grouped theme config, persistence adapters, theme registry constraints, and adaptive helper methods
37
- - added route watcher coverage for merged/deepest selectors and adaptive directive coverage for range-based rendering
38
- - added SEO listener regression coverage for merged route-data application and canonical path normalization
39
-
40
- ---
41
-
42
- ## [1.6.0]: 03.04.2026
43
- ### Feat:
44
- - added route-aware namespace preload via `LocaleConfig.routeNamespacePreload` with `blocking` / `lazy` modes
45
- - added strict preload failure handling via `routeNamespacePreload.onError = 'throw'`
46
- - added route namespace generator CLI `presentia-gen-namespaces`
47
- - added generator report mode (`--report`, `--print-report`) for unresolved lazy imports and unsupported static-analysis cases
48
- - extended generator extraction for route data namespaces, `reLangAttrs`, object-style `reLang`, standalone imports, `loadComponent`, and `loadChildren`
49
- - added route preload diagnostics for late namespace loads after navigation
50
- - added batch namespace diagnostics and `maxBatchSize` chunking in `LangService.loadNamespaces(...)`
51
-
52
- ### Docs:
53
- - documented route preload modes, manifest generation, report mode, and consumer CLI defaults in `README`
54
- - clarified `LangPipe.placeholder` as the loading-time value while `LocaleConfig.defaultValue` remains a missing-key fallback
55
-
56
- ### Test:
57
- - added integration coverage for real router navigation with route preload
58
- - added regression coverage for custom `dataKey`, `mergeStrategy: 'replace'`, manifest parent/child merge, strict preload failures, batch diagnostics, and `maxBatchSize`
59
- - extended generator smoke coverage for report output, `reLangAttrs`, and const-based `presentiaNamespaces`
60
-
61
- ---
62
-
63
- ## [1.5.0]: 16.03.2026
64
- ### Fix:
65
- - `SeoRouteListener.init(...)` no longer duplicates router subscriptions on repeated calls and now reuses normalized `baseUrl`
66
- - `ThemeService` now normalizes persisted/requested theme values before switching
67
- - `LangPipe` now warns once in dev mode when a namespace is loaded but the requested key is unresolved
68
-
69
- ### Feat:
70
- - added `LangService.has(...)` for explicit translation key existence checks
71
- - `SeoService` is now provided in root
72
-
73
- ### Refactor:
74
- - removed lightweight `rxjs` usage from `AdaptiveService` resize listener and route event listeners (`RouteWatcher`, `SeoRouteListener`) in favor of native subscriptions/cleanup
75
- - tightened `provideReInit(...)` factories for `CHANGE_LANG` / `CHANGE_THEME`
76
- - improved presentia package metadata and test setup for storage-backed specs
77
-
78
- ### Test:
79
- - added regression coverage for repeated `SeoRouteListener.init(...)`, `ThemeService` contract behavior, init provider wiring, and unresolved lang key warnings
80
- - kept adaptive/seo regression coverage green after the refactor
81
-
82
- ---
83
-
84
- ## [1.4.4]: 05.03.2026
85
- ### Fix:
86
- - improved `RouteWatcher.params` to merge params from `pathFromRoot` (parent to deepest child), not only from deepest snapshot
87
-
88
- ### Test:
89
- - added a regression test for parent-child params inheritance in nested routes with parent component
90
-
91
- ---
92
-
93
- ## [1.4.3]: 27.02.2026
94
- ### Fix:
95
- - fixed `RouteWatcher.url` to build a full path from `pathFromRoot` instead of only deepest snapshot segments
96
-
97
- ### Test:
98
- - added a regression test for nested route URL composition (`/orgs/:orgId/users/:id`)
99
-
100
- ---
101
-
102
- ## [1.4.2]: 16.02.2026
103
- ### Fix:
104
- - fixed `LangService.getChainedValue` deep lookup for keys with flat namespace prefix (e.g. `common.some-key.sub-key.target`)
105
-
106
- ### Test:
107
- - added a regression test for nested translation resolution via flat namespace prefix key
108
-
109
- ---
110
-
111
- ## [1.4.0]: 15.02.2026
112
- ### Feat:
113
- - added `LocaleConfig.requestBuilder` and `LocaleConfig.responseAdapter` for custom API url/payload mapping
114
- - added `LocaleConfig.requestOptionsFactory` to pass `HttpClient` options (`headers`, `params`, `withCredentials`, `responseType`, `context`, `transferCache`)
115
- - added batch namespace loading support: `loadNamespaces`, `batchRequestBuilder`, `batchResponseAdapter`
116
- - added namespace cache controls: `namespaceCache.maxNamespaces`, `namespaceCache.ttlMs`
117
- - added `LangService.evictNamespace` and `LangService.clearNamespaceCache`
118
- - added typed lang key extension point (`LangKeyRegistry`, `LangKey`) for `LangService.get/observe`
119
- - added package CLI `presentia-gen-lang-keys` for generating key unions from locale json
120
-
121
- ### Test:
122
- - added integration test for language switch across multiple namespaces without page reload
123
- - added smoke test for CLI generator output
124
- - extended `LangService` tests for request options, batch mode, stale response protection, and namespace cache policies
125
-
126
- ### Docs:
127
- - updated README for new `LocaleConfig` options, service methods, typed keys, and CLI usage
128
-
129
- ---
130
-
131
- ## [1.2.0]: 16.01.2026
132
- ### Feat:
133
- - added implementation providers: `CHANGE_LANG` and `CHANGE_THEME`
134
-
135
- ---
136
-
137
- ## [1.1.1]: 14.01.2026
138
-
139
- ### Feat:
140
- - added `translate` method to `LangDirective`
141
-
142
- ### Fix:
143
- - fixed `reIfDevice` directive name
144
-
145
- ---
146
-
147
- ## [1.1.0]: 14.01.2026
148
-
149
- ### Feat:
150
- - added `LangDirective`, auto translate
151
-
152
- ---
153
-
154
- ## [1.0.1]: 11.01.2026
155
-
156
- ### Chore:
157
- - updated docs
158
-
159
- ---
160
-
161
- ## [1.0.0]: 26.12.2025
162
-
163
- - Init
1
+ ## [2.1.2]: 14.04.2026
2
+ ### Fix:
3
+ - fixed `presentia-gen-namespaces` skipping spread (`...someRoutes`) and bare-reference (`someRoutes`) items in route arrays — generator now resolves them via imports and recurses into their exports
4
+ - fixed `presentia-gen-namespaces` not handling single-object route exports (`export const route: AppRoute = { ... }`) added object-literal fallback in `parseRoutesFromExport` alongside the existing array-literal path
5
+ - fixed `LangPipe` NG0100 in Angular dev mode: cache-hit path was returning `existing.value()` directly, bypassing the namespace-loaded guard that cache-miss applied — both paths now go through a shared `applyNamespaceGuard` method
6
+
7
+ ---
8
+
9
+ ## [2.1.1]: 07.04.2026
10
+ ### Fix:
11
+ - fixed `presentia-gen-namespaces` tsconfig loading to parse commented `tsconfig` files instead of failing on raw `JSON.parse(...)`
12
+
13
+ ---
14
+
15
+ ## [2.1.0]: 05.04.2026
16
+ ### Refactor:
17
+ - replaced presentia-specific persistence adapter behavior with storage contracts and strategies backed by `@reforgium/internal`
18
+ - `LangService` and `ThemeService` now persist through storage interface bindings instead of direct localStorage-specific adapter semantics
19
+
20
+ ### Feat:
21
+ - added grouped `storage` / `persistence` options for `providePresentia(...)` theme and lang config
22
+ - kept `persistenceAdapter` as a compatibility alias during the transition to storage-based persistence
23
+
24
+ ### Fix:
25
+ - aligned `persistence: 'none'` with a real no-op storage instead of pseudo-persistent in-memory behavior
26
+ - preserved raw `lang` / `theme` browser storage keys while moving persistence onto shared storage contracts
27
+
28
+ ### Test:
29
+ - updated provider and theme tests for the storage-based persistence contract
30
+ - verified `presentia` typecheck, Vitest suite, and Angular package build after the persistence migration
31
+
32
+ ---
33
+
34
+ ## [2.0.0]: 04.04.2026
35
+ ### Feat:
36
+ - added grouped `providePresentia(...)` v2 entry point and marked `provideReInit(...)` as legacy in dev mode
37
+ - extended `ThemeService` with DOM strategies, theme registry validation, and configurable persistence adapter support
38
+ - extended `AdaptiveService` with named breakpoint helpers (`breakpoint`, `is`, `isAtLeast`, `isBetween`, `isMobile`, `isTablet`, `isDesktopSmall`)
39
+ - extended `IfDeviceDirective` with `reIfDeviceAtLeast` and `reIfDeviceBetween`
40
+ - extended `RouteWatcher` with `deepestParams`, `mergedData`, `routePattern`, `selectParam`, and path matching helpers
41
+ - aligned `SeoRouteListener` with merged route data and normalized route-tree path resolution
42
+
43
+ ### Docs:
44
+ - documented grouped v2 config, theme DOM/persistence options, and adaptive breakpoint helpers
45
+ - documented recommended v2 setup, extended route watcher state, and adaptive range directives
46
+ - promoted `V2-MIGRATION.md` from draft to working migration guide and refreshed `V2-CONFIG.md` / `ROADMAP-2.0.0.md`
47
+ - moved compatibility-only surface out of primary README export lists and into explicit legacy notes
48
+
49
+ ### Test:
50
+ - added provider and runtime coverage for grouped theme config, persistence adapters, theme registry constraints, and adaptive helper methods
51
+ - added route watcher coverage for merged/deepest selectors and adaptive directive coverage for range-based rendering
52
+ - added SEO listener regression coverage for merged route-data application and canonical path normalization
53
+
54
+ ---
55
+
56
+ ## [1.6.0]: 03.04.2026
57
+ ### Feat:
58
+ - added route-aware namespace preload via `LocaleConfig.routeNamespacePreload` with `blocking` / `lazy` modes
59
+ - added strict preload failure handling via `routeNamespacePreload.onError = 'throw'`
60
+ - added route namespace generator CLI `presentia-gen-namespaces`
61
+ - added generator report mode (`--report`, `--print-report`) for unresolved lazy imports and unsupported static-analysis cases
62
+ - extended generator extraction for route data namespaces, `reLangAttrs`, object-style `reLang`, standalone imports, `loadComponent`, and `loadChildren`
63
+ - added route preload diagnostics for late namespace loads after navigation
64
+ - added batch namespace diagnostics and `maxBatchSize` chunking in `LangService.loadNamespaces(...)`
65
+
66
+ ### Docs:
67
+ - documented route preload modes, manifest generation, report mode, and consumer CLI defaults in `README`
68
+ - clarified `LangPipe.placeholder` as the loading-time value while `LocaleConfig.defaultValue` remains a missing-key fallback
69
+
70
+ ### Test:
71
+ - added integration coverage for real router navigation with route preload
72
+ - added regression coverage for custom `dataKey`, `mergeStrategy: 'replace'`, manifest parent/child merge, strict preload failures, batch diagnostics, and `maxBatchSize`
73
+ - extended generator smoke coverage for report output, `reLangAttrs`, and const-based `presentiaNamespaces`
74
+
75
+ ---
76
+
77
+ ## [1.5.0]: 16.03.2026
78
+ ### Fix:
79
+ - `SeoRouteListener.init(...)` no longer duplicates router subscriptions on repeated calls and now reuses normalized `baseUrl`
80
+ - `ThemeService` now normalizes persisted/requested theme values before switching
81
+ - `LangPipe` now warns once in dev mode when a namespace is loaded but the requested key is unresolved
82
+
83
+ ### Feat:
84
+ - added `LangService.has(...)` for explicit translation key existence checks
85
+ - `SeoService` is now provided in root
86
+
87
+ ### Refactor:
88
+ - removed lightweight `rxjs` usage from `AdaptiveService` resize listener and route event listeners (`RouteWatcher`, `SeoRouteListener`) in favor of native subscriptions/cleanup
89
+ - tightened `provideReInit(...)` factories for `CHANGE_LANG` / `CHANGE_THEME`
90
+ - improved presentia package metadata and test setup for storage-backed specs
91
+
92
+ ### Test:
93
+ - added regression coverage for repeated `SeoRouteListener.init(...)`, `ThemeService` contract behavior, init provider wiring, and unresolved lang key warnings
94
+ - kept adaptive/seo regression coverage green after the refactor
95
+
96
+ ---
97
+
98
+ ## [1.4.4]: 05.03.2026
99
+ ### Fix:
100
+ - improved `RouteWatcher.params` to merge params from `pathFromRoot` (parent to deepest child), not only from deepest snapshot
101
+
102
+ ### Test:
103
+ - added a regression test for parent-child params inheritance in nested routes with parent component
104
+
105
+ ---
106
+
107
+ ## [1.4.3]: 27.02.2026
108
+ ### Fix:
109
+ - fixed `RouteWatcher.url` to build a full path from `pathFromRoot` instead of only deepest snapshot segments
110
+
111
+ ### Test:
112
+ - added a regression test for nested route URL composition (`/orgs/:orgId/users/:id`)
113
+
114
+ ---
115
+
116
+ ## [1.4.2]: 16.02.2026
117
+ ### Fix:
118
+ - fixed `LangService.getChainedValue` deep lookup for keys with flat namespace prefix (e.g. `common.some-key.sub-key.target`)
119
+
120
+ ### Test:
121
+ - added a regression test for nested translation resolution via flat namespace prefix key
122
+
123
+ ---
124
+
125
+ ## [1.4.0]: 15.02.2026
126
+ ### Feat:
127
+ - added `LocaleConfig.requestBuilder` and `LocaleConfig.responseAdapter` for custom API url/payload mapping
128
+ - added `LocaleConfig.requestOptionsFactory` to pass `HttpClient` options (`headers`, `params`, `withCredentials`, `responseType`, `context`, `transferCache`)
129
+ - added batch namespace loading support: `loadNamespaces`, `batchRequestBuilder`, `batchResponseAdapter`
130
+ - added namespace cache controls: `namespaceCache.maxNamespaces`, `namespaceCache.ttlMs`
131
+ - added `LangService.evictNamespace` and `LangService.clearNamespaceCache`
132
+ - added typed lang key extension point (`LangKeyRegistry`, `LangKey`) for `LangService.get/observe`
133
+ - added package CLI `presentia-gen-lang-keys` for generating key unions from locale json
134
+
135
+ ### Test:
136
+ - added integration test for language switch across multiple namespaces without page reload
137
+ - added smoke test for CLI generator output
138
+ - extended `LangService` tests for request options, batch mode, stale response protection, and namespace cache policies
139
+
140
+ ### Docs:
141
+ - updated README for new `LocaleConfig` options, service methods, typed keys, and CLI usage
142
+
143
+ ---
144
+
145
+ ## [1.2.0]: 16.01.2026
146
+ ### Feat:
147
+ - added implementation providers: `CHANGE_LANG` and `CHANGE_THEME`
148
+
149
+ ---
150
+
151
+ ## [1.1.1]: 14.01.2026
152
+
153
+ ### Feat:
154
+ - added `translate` method to `LangDirective`
155
+
156
+ ### Fix:
157
+ - fixed `reIfDevice` directive name
158
+
159
+ ---
160
+
161
+ ## [1.1.0]: 14.01.2026
162
+
163
+ ### Feat:
164
+ - added `LangDirective`, auto translate
165
+
166
+ ---
167
+
168
+ ## [1.0.1]: 11.01.2026
169
+
170
+ ### Chore:
171
+ - updated docs
172
+
173
+ ---
174
+
175
+ ## [1.0.0]: 26.12.2025
176
+
177
+ - Init
package/README.md CHANGED
@@ -122,7 +122,7 @@ providePresentia({
122
122
  });
123
123
  ```
124
124
 
125
- For a fuller mapping see [`V2-MIGRATION.md`](./V2-MIGRATION.md).
125
+ For a fuller mapping see [`V2-MIGRATION.md`](./V2-MIGRATION.md).
126
126
 
127
127
  Localization exports:
128
128
  - `LangService`