Package Profiles and v3 Migration
Batoi UIF 3 keeps its focused, dependency-free packages and adds curated profiles that group namespaces by application purpose. A profile does not initialize a second runtime, duplicate component registration, or weaken the underlying package boundaries.
Curated Profiles
| Profile | Entry point | Intended use |
|---|---|---|
| All | @batoi/uif-profiles/all | Tooling or applications that intentionally need the complete namespace surface |
| RAD | @batoi/uif-profiles/rad | Server-rendered forms, tables, editors, routing, actions, and partial updates |
| Dashboard | @batoi/uif-profiles/dashboard | Charts, tables, state, widgets, and realtime operational views |
| Mobile | @batoi/uif-profiles/mobile | Mobile shells, PWA lifecycle, push, offline status, and realtime |
| Desktop | @batoi/uif-profiles/desktop | Desktop workspaces, resilient preferences, PWA behavior, and realtime |
| Agent | @batoi/uif-profiles/agent | Provider-neutral assistant UI and governed tool review |
Use a profile when it communicates application intent. Import individual packages when they provide the smallest production graph.
import { core, forms, radAdapter, table } from '@batoi/uif-profiles/rad';
core.configureCompatibility({ mode: 'v3' });
radAdapter.bindRadActions(document);
table.initDeclarativeFilters(document);
forms.initForm(document.querySelector('form[data-uif="form"]'));Migration Path
The compatibility profile keeps v2 behavior active while reporting constructs that strict v3 mode rejects.
import { core, components } from '@batoi/uif-profiles/compatibility';
core.configureDiagnostics({
enabled: true,
handle(diagnostic) {
console.warn(diagnostic.code, diagnostic.component, diagnostic.phase);
},
});After the application has resolved the reported issues, enable strict mode explicitly:
import { configureCompatibility } from '@batoi/uif-core';
configureCompatibility({ mode: 'v3' });Migration Checklist
- Replace semicolon-delimited
data-uif-optionswith JSON objects. - Replace pipe-delimited typed-text strings with JSON arrays.
- Register exact origin and path capabilities for intentional cross-origin requests; markup cannot grant a capability.
- Configure application, tenant, and principal storage partitions before persisting preferences or Micro App state.
- Clear the active principal partition during sign-out.
- Configure locale hooks and verify logical-direction layouts in LTR and RTL.
- Treat unknown Agent Interaction Envelope versions and incomplete tool reviews as unavailable and refresh them from the governed server.
- Move production imports to the smallest individual package or curated profile that expresses the application purpose.
No v2 API is removed by the diagnostic build. Complete browser, accessibility, security, and server-integration verification before adopting strict mode in production.