Praxis Core Providers Bootstrap
Use this skill for shared @praxisui/core provider and token wiring. Treat core providers as platform infrastructure, not as convenience snippets to duplicate inside vertical libraries or host apps.
Source Audit
Before editing code or guidance, inspect:
projects/praxis-core/AGENTS.mdprojects/praxis-core/README.mdprojects/praxis-core/src/public-api.tsprojects/praxis-core/src/lib/tokens/**projects/praxis-core/src/lib/providers/**projects/praxis-core/src/lib/tokens/api-url.token.tsprojects/praxis-core/src/lib/tokens/global-config.providers.tsprojects/praxis-core/src/lib/tokens/global-config.token.tsprojects/praxis-core/src/lib/tokens/enterprise-runtime-context.token.tsprojects/praxis-core/src/lib/tokens/collection-export.token.tsprojects/praxis-core/src/lib/tokens/field-selector-registry.token.tsprojects/praxis-core/src/lib/tokens/loading-renderer.token.tsprojects/praxis-core/src/lib/tokens/loading-context.token.tsprojects/praxis-core/src/lib/services/global-config.service.tsprojects/praxis-core/src/lib/services/config-storage.service.tsprojects/praxis-core/src/lib/services/component-metadata-registry.service.tsprojects/praxis-core/src/lib/services/field-selector-registry.service.tsprojects/praxis-core/src/lib/services/loading-orchestrator.service.tsprojects/praxis-core/src/lib/services/collection-export.service.tsprojects/praxis-core/src/lib/services/enterprise-runtime-context.service.ts- focused provider/token/service specs and direct consumer imports
- For icon-family behavior, also inspect
components/icon/praxis-icon.directive.ts,components/icon-button/praxis-icon-button.component.tsand their focused specs in the exact installed or candidate version.
Canonical Boundary
@praxisui/core owns shared Angular tokens, provider factories, registries, bootstrap services, global config, API URL contracts, loading renderer/orchestrator contracts, collection export providers, icon providers, field selector registry defaults, component metadata registry, and enterprise runtime context.
Vertical packages may register their package metadata or package defaults through core providers, but they should not redefine core token shapes or expose transitively owned core contracts as local public APIs.
Provider Rules
- Use exported core provider factories and tokens instead of host-local injection tokens.
- Keep provider defaults centralized in core when multiple
@praxisui/*packages consume the behavior. - Avoid root
public-apireexports from a vertical lib when the contract owner is core; import from@praxisui/coredirectly unless an intentional stable facade is reviewed. - Keep multi providers multi when the token is additive, such as i18n config, action catalogs, or registry entries.
- Preserve bootstrap order when global config, API URL, headers, loading, logging, i18n, and metadata registry providers interact.
- Treat provider installation as the canonical proof that a host opted into a platform capability. Importing a component class, referencing a selector, or seeing a package in
package.jsondoes not prove thatENVIRONMENT_INITIALIZER,APP_INITIALIZER, registry providers, interceptors, i18n catalogs, or default tokens ran. - Vertical metadata providers such as
providePraxis*Metadata()install component registry facts; aggregate package providers such asprovidePraxisDynamicFields()may also install i18n, field selector registry defaults, logger bridges, styles, preloading, or HTTP defaults. Keep these capability bundles explicit and documented instead of recreating partial host-local provider arrays. - If a capability is absent at runtime, fail closed to a missing-provider diagnostic and identify the canonical provider to install. Do not synthesize registry entries, local tokens, prompt-only catalogs, selector switches, or ad hoc fallback defaults to hide an uninstalled provider.
- Before adding a new token or provider, classify the gap as
ja-suportado-so-ux,ja-suportado-mal-nomeado-ou-mal-materializado,suportado-parcialmente, orlacuna-real-de-contrato. - For real public contract gaps, map direct consumers and derived docs before editing.
Icon family and bootstrap
providePraxisIconDefaults() registers Material font aliases and selects Symbols Outlined by default; its existing defaultFontSetClass option selects another configured default. The host must load the corresponding font resources. Inspect the actual provider initialization and the rendered mat-icon family before changing styles or prefixes; a provider import alone does not prove initialization or font availability.
For versions where PraxisIconButtonComponent implements registry-default inheritance, unprefixed button icons follow the configured Symbols family (outlined, rounded or sharp); without a configured Symbols default they retain classic Material Icons. Explicit mi:, ms:/mso:, msr: and mss: prefixes override the default. Do not generalize this rule to the standalone PraxisIconDirective, whose own unprefixed fallback is Symbols Outlined. Check the exact package version and component source first: older IconButton implementations force classic icons for unprefixed names. Do not mask a mismatch with global font-class overrides or rewrite explicit prefixes in consumers.
For an icon-family change, run the focused provider and IconButton specs. Prove the unprefixed fallback without the provider, provider defaults and configured rounded/sharp variants, explicit prefixes, and absence of competing family classes. Preserve auxiliary defaultFontSetClass entries such as tenant styling and mat-ligature-font while resolving the family. Check the actual font resource and a direct consumer's rendered icon. Distinguish a source candidate from a released package when reporting adoption.
Lazy host catalog and injector custody
Before moving providers to a lazy route, map each provider's owner, lifetime, initializer, dictionaries and consumers. A metadata factory may import concrete runtime components; a package aggregate can also install its engine, inline renderers and i18n. A lazy editor loader alone does not guarantee a separate physical chunk when root barrels or other eager consumers retain that graph. Measure the normal production build; preserve budgets and intentional public exports. Initial-chunk reduction does not prove lower total first-navigation cost.
Use one persistent route scope for a composition that needs the complete widget catalog. Keep application-owned auth, HTTP, global config, registries, stateful panel services and root-consumed authoring options in their original lifetime. A child metadata initializer can register with the root registry, but dictionaries installed only in the child are not automatically visible to a registry that captured root i18n. Compare resolved descriptor text and locale before/after; retain the canonical dictionary provider in root when required, rather than copying private constants or creating another registry.
Use existing Settings Panel/Drawer bridges and their content-parent injector contract. A bridge installed in the route may capture that injector while opening through the same root panel service. Audit the actual injected interface before patching an owner: a bridge call already carrying its injector needs no redundant component change. Prove service identity, child engine/token visibility in a real preview, editor Apply/Save/reopen/Cancel and overlay lifecycle. Never re-provide a stateful root service merely to make child tokens visible to it.
Validation
Use the smallest reliable proof:
- global config, config storage, and global config provider defaults:
npm run test:core -- --include=projects/praxis-core/src/lib/services/global-config.service.spec.ts --include=projects/praxis-core/src/lib/services/config-storage.service.spec.ts --include=projects/praxis-core/src/lib/tokens/global-config.providers.spec.ts
- loading providers/orchestrator/renderer and visual tokens:
npm run test:core -- --include=projects/praxis-core/src/lib/providers/loading.providers.spec.ts --include=projects/praxis-core/src/lib/services/default-loading-renderer.service.spec.ts --include=projects/praxis-core/src/lib/tokens/layer-scale.token.spec.ts --include=projects/praxis-core/src/lib/tokens/theme-surface.token.spec.ts
- icon providers, field selector registry, collection export, enterprise runtime context, and component metadata registry:
npm run test:core -- --include=projects/praxis-core/src/lib/providers/icon.providers.spec.ts --include=projects/praxis-core/src/lib/components/icon-picker/icon-picker.component.spec.ts --include=projects/praxis-core/src/lib/services/field-selector-registry.service.spec.ts --include=projects/praxis-core/src/lib/services/collection-export.service.spec.ts --include=projects/praxis-core/src/lib/services/http-collection-export.provider.spec.ts --include=projects/praxis-core/src/lib/models/collection-export.model.spec.ts --include=projects/praxis-core/src/lib/services/enterprise-runtime-context.service.spec.ts --include=projects/praxis-core/src/lib/services/component-metadata-registry.service.spec.ts
API_URLor fetch/header contract changes require at least one direct consumer proof selected by actual imports, commonly:
npm run ng -- test praxis-charts --watch=false --progress=false --include=projects/praxis-charts/src/lib/services/chart-stats-api.service.spec.ts
npm run test:form -- --include=projects/praxis-dynamic-form/src/lib/praxis-dynamic-form.external-config-hydration.spec.ts
npm run ng -- test praxis-ai --watch=false --progress=false --include=projects/praxis-ai/src/lib/core/services/ai-backend-api.service.spec.ts
npm run build:praxis-corewhen exports or provider contracts change- direct consumer build for at least one package that imports the provider/token
praxis-angular-public-api-governancechecks whensrc/public-api.tschangespraxis-angular-validation-gatesfor scoped command selection
Report direct consumers, skipped consumers, and whether public API artifacts/docs were reviewed.
Companion Skills
- Use
praxis-core-runtime-contractsfor shared core models, public exports, i18n, logging, and services. - Use
praxis-core-resource-runtimeforGenericCrudService, resource discovery, schema metadata, actions, surfaces, and capabilities. - Use
praxis-core-widget-observationsfor dynamic widget providers and runtime observation registry. - Use
praxis-angular-public-api-governanceandpraxis-angular-validation-gateswhenever provider changes affect public API or cross-lib validation.