@praxisui/core 10.0.0-rc.61 → 10.0.0-rc.62
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/README.md +2 -2
- package/ai/component-registry.json +1 -1
- package/fesm2022/praxisui-core.mjs +25 -7
- package/package.json +1 -1
- package/types/praxisui-core.d.ts +1 -0
package/README.md
CHANGED
|
@@ -831,7 +831,7 @@ promise failures produced after a host/global-action adapter accepts a delivery.
|
|
|
831
831
|
|
|
832
832
|
If the problem is URL or HTTP execution, start with `resourcePath`. If the problem is semantic discovery, surface/action context, or stable runtime identity, start with `resourceKey`.
|
|
833
833
|
|
|
834
|
-
Use `normalizePraxisResourcePath(raw, styleOrOptions?)`, `extractPraxisApiPathPrefix(baseUrl)`, and `resolvePraxisSchemasFilteredUrl(apiBaseUrl, resourcePath, options?)` from `@praxisui/core` whenever components or services normalize `resourcePath` inputs. Calling these shared utilities ensures equivalent inputs such as `'/workforce/employees'`, `'workforce/employees'`, `'workforce/employees/'`, and `'/api/workforce/employees'` produce identical CRUD, `/schemas/filtered`, `/options/*`, `/stats/*`, and `/capabilities` URLs without double `/api/api/` prefixes or relative `baseUrl` failures.
|
|
834
|
+
Use `normalizePraxisResourcePath(raw, styleOrOptions?)`, `extractPraxisApiPathPrefix(baseUrl)`, and `resolvePraxisSchemasFilteredUrl(apiBaseUrl, resourcePath, options?)` from `@praxisui/core` whenever components or services normalize `resourcePath` inputs. Calling these shared utilities ensures equivalent inputs such as `'/workforce/employees'`, `'workforce/employees'`, `'workforce/employees/'`, and `'/api/workforce/employees'` produce identical CRUD, `/schemas/filtered`, `/options/*`, `/stats/*`, and `/capabilities` URLs without double `/api/api/` prefixes or relative `baseUrl` failures. Pass `stripOperationalSuffix: false` to `resolvePraxisSchemasFilteredUrl(...)` for analytics or projection endpoints where trailing path segments belong to the target route (default `true`); portable configuration descriptors such as `PraxisCrudComponent`'s `advancedFilters.schemaUrl` keep the normalized relative `'/schemas/filtered?path=...'` format without embedding host origins or altering `{id}` templates.
|
|
835
835
|
|
|
836
836
|
`ResourceCapabilitySnapshot.canonicalOperations` preserves structural support only.
|
|
837
837
|
`operations` carries the current operation contract and availability for CRUD, query,
|
|
@@ -1007,7 +1007,7 @@ What `providePraxisTestingDefaults()` configures:
|
|
|
1007
1007
|
|
|
1008
1008
|
- **`CONFIG_STORAGE` & `ASYNC_CONFIG_STORAGE`:** both bound to the same `InMemoryConfigStore` via `InMemoryConfigStorage` and `InMemoryAsyncConfigStorage` (with strong-ack `of(void 0)` emissions on save/clear and zero `localStorage` access).
|
|
1009
1009
|
- **`EnterpriseRuntimeContextService`:** replaced with `InMemoryEnterpriseRuntimeContextService` (zero `HttpClient` dependency, zero calls to `/api/praxis/runtime/**`, supports `adoptConfirmedContext`, `choices`, `tenants`, `navigation`, and `applyHeaders`).
|
|
1010
|
-
- **Bootstrap initializers:** overrides `PRAXIS_GLOBAL_CONFIG_BOOTSTRAP_OPTIONS`, `PRAXIS_GLOBAL_CONFIG_BOOTSTRAP_READY`, and `
|
|
1010
|
+
- **Bootstrap initializers:** overrides `PRAXIS_GLOBAL_CONFIG_BOOTSTRAP_OPTIONS`, `PRAXIS_GLOBAL_CONFIG_BOOTSTRAP_READY`, `PRAXIS_ENTERPRISE_RUNTIME_CONTEXT_READY`, and `PRAXIS_ENTERPRISE_RUNTIME_CONTEXT_OPTIONS` (`includeGlobalFetchHeaders: false`, `blocking: false`, `errorPolicy: 'ignore'`) so `ApplicationInitStatus.donePromise` resolves immediately without triggering runtime-context HTTP/fetch calls.
|
|
1011
1011
|
- **`API_URL` & caches:** defaults `API_URL` to `{ default: { baseUrl: '/api' } }` (unless `apiUrl: false`), sets `cache.disableSchemaCache: true` so `GenericCrudService` uses `MemoryCacheAdapter`, disables visibility `fetch` revalidation on `PraxisSessionTransportService`, disables `localStorage` writes in `PraxisThemeService`, and installs a silent `PRAXIS_TELEMETRY_TRANSPORT`.
|
|
1012
1012
|
- **Optional defensive interceptor:** `createPraxisTestingNoopHttpInterceptor()` can be passed to `withInterceptors([...])` when a spec uses `provideHttpClient()` without `provideHttpClientTesting()`.
|
|
1013
1013
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
3
|
"generatedAt": "2026-11-24T14:00:56.078Z",
|
|
4
4
|
"packageName": "@praxisui/core",
|
|
5
|
-
"packageVersion": "10.0.0-rc.
|
|
5
|
+
"packageVersion": "10.0.0-rc.62",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 4,
|
|
@@ -37927,11 +37927,19 @@ class PraxisThemeService {
|
|
|
37927
37927
|
this.storageKey = scopeByRealm ? scopeKeyByTenantRealm(prefix, realmSlug, 'portal') : prefix;
|
|
37928
37928
|
const initial = this.readInitialTheme();
|
|
37929
37929
|
this.apply(initial, { persist: false });
|
|
37930
|
+
const browser = this.doc?.defaultView;
|
|
37931
|
+
if (browser) {
|
|
37932
|
+
const syncFromStorage = (event) => {
|
|
37933
|
+
if (event.key === this.storageKey || event.key === null) {
|
|
37934
|
+
this.apply(event.newValue, { persist: false });
|
|
37935
|
+
}
|
|
37936
|
+
};
|
|
37937
|
+
browser.addEventListener('storage', syncFromStorage);
|
|
37938
|
+
inject(DestroyRef).onDestroy(() => browser.removeEventListener('storage', syncFromStorage));
|
|
37939
|
+
}
|
|
37930
37940
|
}
|
|
37931
37941
|
apply(candidate, options = {}) {
|
|
37932
|
-
const resolved =
|
|
37933
|
-
? candidate
|
|
37934
|
-
: this.defaultTheme;
|
|
37942
|
+
const resolved = this.normalizeCandidate(candidate) ?? this.defaultTheme;
|
|
37935
37943
|
if (resolved !== 'dark-tech') {
|
|
37936
37944
|
this.lastLightTheme = resolved;
|
|
37937
37945
|
}
|
|
@@ -37940,6 +37948,7 @@ class PraxisThemeService {
|
|
|
37940
37948
|
const rootEl = this.doc?.documentElement;
|
|
37941
37949
|
if (rootEl) {
|
|
37942
37950
|
rootEl.setAttribute('data-theme', resolved);
|
|
37951
|
+
rootEl.classList.toggle('dark', scheme === 'dark');
|
|
37943
37952
|
rootEl.style.colorScheme = scheme;
|
|
37944
37953
|
}
|
|
37945
37954
|
this.syncColorSchemeMeta(scheme);
|
|
@@ -37975,16 +37984,25 @@ class PraxisThemeService {
|
|
|
37975
37984
|
return this.apply(this.defaultTheme, { persist: false });
|
|
37976
37985
|
}
|
|
37977
37986
|
readInitialTheme() {
|
|
37978
|
-
const stored = this.readStoredTheme();
|
|
37979
|
-
if (
|
|
37987
|
+
const stored = this.normalizeCandidate(this.readStoredTheme());
|
|
37988
|
+
if (stored) {
|
|
37980
37989
|
return stored;
|
|
37981
37990
|
}
|
|
37982
|
-
const domAttr = this.doc?.documentElement?.getAttribute('data-theme');
|
|
37983
|
-
if (
|
|
37991
|
+
const domAttr = this.normalizeCandidate(this.doc?.documentElement?.getAttribute('data-theme'));
|
|
37992
|
+
if (domAttr) {
|
|
37984
37993
|
return domAttr;
|
|
37985
37994
|
}
|
|
37986
37995
|
return this.defaultTheme;
|
|
37987
37996
|
}
|
|
37997
|
+
normalizeCandidate(candidate) {
|
|
37998
|
+
if (candidate === 'light') {
|
|
37999
|
+
return 'classic';
|
|
38000
|
+
}
|
|
38001
|
+
if (candidate === 'dark') {
|
|
38002
|
+
return 'dark-tech';
|
|
38003
|
+
}
|
|
38004
|
+
return isPraxisWorkspaceThemeId(candidate) ? candidate : null;
|
|
38005
|
+
}
|
|
37988
38006
|
readStoredTheme() {
|
|
37989
38007
|
if (typeof localStorage === 'undefined')
|
|
37990
38008
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/core",
|
|
3
|
-
"version": "10.0.0-rc.
|
|
3
|
+
"version": "10.0.0-rc.62",
|
|
4
4
|
"description": "Core library for Praxis UI Workspace: types, tokens, services and utilities shared across @praxisui/* packages.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/cdk": "^21.0.0",
|
package/types/praxisui-core.d.ts
CHANGED
|
@@ -18129,6 +18129,7 @@ declare class PraxisThemeService {
|
|
|
18129
18129
|
toggleDark(): PraxisWorkspaceThemeId;
|
|
18130
18130
|
reset(): PraxisWorkspaceThemeId;
|
|
18131
18131
|
private readInitialTheme;
|
|
18132
|
+
private normalizeCandidate;
|
|
18132
18133
|
private readStoredTheme;
|
|
18133
18134
|
private writeStoredTheme;
|
|
18134
18135
|
private removeStoredTheme;
|