@praxisui/core 10.0.0-rc.5 → 10.0.0-rc.50

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 CHANGED
@@ -4,12 +4,214 @@ Shared contracts, tokens, services, metadata models, widget runtime primitives,
4
4
 
5
5
  Use this package directly when a host application or library needs Praxis UI types, global actions, metadata registries, schema clients, resource discovery, i18n, theme bridge, dynamic widget contracts, or shared runtime services.
6
6
 
7
+ `DomainRuleSnapshotGovernanceState` includes `WITHDRAWN`. A withdrawn head is
8
+ not executable (`executionReady=false`); its last selected snapshot key and
9
+ current ETag/revision are audit and concurrency information. Consumers must not
10
+ infer activation from the presence of that key. `DomainRuleService.withdrawSnapshotHead`
11
+ (`POST /api/praxis/config/domain-rules/snapshots/withdrawals`) submits a strong
12
+ `If-Match` precondition and an auditable `reason` (`1..1000` characters) to
13
+ record a tombstone head (`DomainRuleSnapshotWithdrawalResponse`), while
14
+ `DomainRuleService.getSnapshotHeadSet` (`GET /api/praxis/config/domain-rules/snapshots/head-set`)
15
+ reads a consistent, non-withdrawn multi-operation head bundle (`1..64` unique
16
+ `operationKeys`). Reentry after withdrawal requires the backend's governed
17
+ `REQUIRED` rollout (`createRollout` with the withdrawn head's `If-Match`) and
18
+ fresh preload quorum (`DomainRuleCandidateProbeResponse`).
19
+
20
+ ## Global dynamic pages defaults (`GlobalConfig.pages`)
21
+
22
+ `GlobalConfigService` supports `pages.defaults` (`GlobalDynamicPagesDefaultsConfig`) through `provideGlobalConfig` and runtime overrides:
23
+
24
+ - `layoutPreset`: Optional default `WidgetPageLayoutPresetId` when a page omits an explicit `layoutPreset`
25
+ - `themePreset`: Default `WidgetPageThemePresetId` (`operational-command`, `executive-clarity`, `editorial-canvas`)
26
+ - `shellPreset`: Default widget shell preset (`default`, `minimal`, `borderless`, `outlined`, `elevated`, `compact`, `spacious`)
27
+ - `columns` (1–24), `gap`, `paddingInline`, and `autoRows` (`fixed` | `content`)
28
+
29
+ `DynamicWidgetPageComponent` resolves page presentation with strict precedence:
30
+ `authored page property > GlobalConfig.pages.defaults > builtin preset/component fallback`, without polluting persisted canonical page documents with global defaults.
31
+
32
+ ## Closed page authoring profile
33
+
34
+ The additive page codec validates and preserves the Config-owned publication
35
+ profile, copies typed widget/link identities and materializes stable route/child
36
+ identities. Structural success is distinct from native validation and server
37
+ admission. See [the codec contract](https://github.com/codexrodrigues/praxis-ui-angular/blob/main/projects/praxis-core/docs/page-publication-codec.md) for APIs,
38
+ limits, examples and evidence scope. This API alone does not activate publication.
39
+
40
+ ## Context-bound runtime navigation
41
+
42
+ `EnterpriseRuntimeContextService.navigation({ parentRef?, cursor?, pageSize? })`
43
+ reads one page from the host's existing `/api/praxis/runtime/navigation` endpoint.
44
+ It waits for a confirmed ready context and sends its `X-Praxis-Context-Version`
45
+ with the existing authenticated host headers. `pageSize` defaults to 50 (1–100);
46
+ `parentRef` is a canonical group UUID and the opaque cursor is bounded to 4096
47
+ characters. Omit `parentRef` for roots; use a returned group ID for its children.
48
+ The server remains responsible for current authorization, cursor admission,
49
+ ordering and the complete authorized projection.
50
+
51
+ The response uses `praxis-enterprise-runtime-navigation.v1` and requires `nodes`,
52
+ `capabilities`, `contextVersion`, `receiptEtag`, `headReceipts`, `nextCursor` and
53
+ `resolvedAt`; empty arrays and a null `nextCursor` are valid. Nodes can carry an
54
+ admitted icon identifier, and `children: null` denotes on-demand loading. Head
55
+ receipts use Core's existing `UiLayoutReleaseHeadReceipt`. The semantic read
56
+ receipt is distinct from each strong write `headEtag`; Core does not introduce
57
+ navigation caching or send `If-None-Match` in this slice.
58
+
59
+ The service captures the local context generation before awaiting readiness and
60
+ rejects stale success/error responses with `EnterpriseRuntimeContextObsoleteError`,
61
+ including A → B → A and a response confirming another context. An unconfirmed
62
+ context fails before navigation dispatch. HTTP errors in the current generation
63
+ remain HTTP errors; callers must handle unavailable or stale continuations rather
64
+ than silently restarting or combining pages. A cursor never grants access.
65
+
66
+ This is the Core wire/transport slice of [Config's frozen P3-B design](https://github.com/codexrodrigues/praxis-config-starter/blob/c161609f14ffcdc39024e66a886a1bd5df471fc8/docs/ai/contracts/page-publication-p0/P3B-DESIGN.md).
67
+ It does not install a host navigation provider. An absent provider remains
68
+ `503 RUNTIME_PROVIDER_UNAVAILABLE`. Shell rendering, published-page routes and
69
+ their visual E2E remain P4; real host HTTP proof remains P3-C. A service HTTP spec
70
+ and a direct-consumer build do not establish those later integrations.
71
+
72
+ ## Contextual table defaults
73
+
74
+ `createDefaultTableConfig()` leaves `pagination.strategy` and `sorting.strategy`
75
+ unset. These shared contracts cannot choose a data source: `@praxisui/table`
76
+ infers server processing for remote data and client processing for local data.
77
+ Explicit `client` or `server` choices remain authored choices. Optional strategy
78
+ properties allow sparse metadata and editor resets to preserve contextual
79
+ resolution; `auto` is not a public serialized value.
80
+
81
+ ## Governed bulk client: basic synchronous slice
82
+
83
+ `requestCancellation(contract, executionId)` follows the published cancel binding.
84
+ Cancellation is cooperative: the returned server state is authoritative, including
85
+ an execution that already completed. It does not undo confirmed items. Use
86
+ `readExecution` and `readResults` to resume observation from a retained execution ID.
87
+
88
+ `BulkOperationClientService` consumes the Metadata published `BulkExecutionContract`
89
+ from an action or CRUD capability. `discoverAction` and `discoverCapability` use the
90
+ existing resource discovery surface; operation paths and filtered schema URLs come
91
+ from that descriptor. `evaluationSchema` loads the backend's filtered request schema
92
+ for a caller to render the operation's form. The client admits only `SYNC`,
93
+ `EXPLICIT` and `PER_ITEM` in this first Angular slice. A descriptor that also
94
+ advertises query selection is usable only with an explicit target request here.
95
+
96
+ The Quickstart candidate migrates its existing uniform update operation to an
97
+ `ASYNC`-only profile; that host adoption is still being validated. BASIC omits
98
+ an `ASYNC`-only operation without a `SYNC` fallback. Angular ASYNC support needs
99
+ its own consumer implementation and acceptance; this note does not establish a
100
+ Render deployment or an ASYNC UI journey.
101
+
102
+ Provide the exact wire ID and opaque resource `expectedVersion` for every selected
103
+ target. In particular, int64/Long IDs remain decimal strings; do not convert them
104
+ through JavaScript numbers. Evaluate first, review the returned READY or BLOCKED
105
+ proposal and its authorized paged results, then confirm a READY proposal using
106
+ only `{ proposalId }` and one `Idempotency-Key`. `BulkSyncStateService.createSession`
107
+ keeps that key fixed across a retry of the same confirmation. A new intention gets
108
+ a new session. The key and proposal live only in that session; it makes no claim
109
+ of recovery across a page reload.
110
+
111
+ For a selected collection row that publishes a `self` link,
112
+ `readTargetVersion(row._links, wireId, identityPath, options)` reads that exact
113
+ item, verifies its returned identity and returns the original strong quoted ETag
114
+ as `expectedVersion`. It rejects absent/weak ETags, foreign origins and mismatched
115
+ IDs. Callers should bound concurrent reads and cancel them when their resource
116
+ context closes. A row value, schema ETag or locally inferred URL is not a resource
117
+ version.
118
+
119
+ ```ts
120
+ const contract = await firstValueFrom(bulkClient.discoverCapability(resourceResponse, operationId));
121
+ const session = bulkState.createSession(contract);
122
+ const proposal = await session.evaluate(explicitSyncRequest);
123
+ const preview = await firstValueFrom(bulkClient.readProposalResults(contract, proposal.proposalId));
124
+ // Present proposal and preview to the person; a BLOCKED proposal cannot be confirmed.
125
+
126
+ // In a separate, explicit confirmation action for a READY proposal:
127
+ await session.confirm(idempotencyKeyForThisIntent);
128
+ // On an uncertain HTTP failure, retain this session and retry with the same key.
129
+ // The host schedules further authorized readbacks for an accepted nonterminal execution.
130
+ const reads = new AbortController(); // This view owns GET lifetime, not confirmation custody.
131
+ if (!session.isTerminal()) await session.refreshExecution(reads.signal);
132
+ if (session.isTerminal()) {
133
+ const results = await session.readResults(200, undefined, reads.signal);
134
+ }
135
+ ```
136
+
137
+ `resourceResponse`, `operationId`, the explicit request and the key come from the
138
+ caller's governed selection and form flow; the client resolves operation URLs from
139
+ the descriptor. The caller controls when to read status again and presents each
140
+ authorized page of results. This example is a service integration sketch, not a
141
+ ready visual workflow or a deployment claim.
142
+
143
+ `refreshExecution(signal?)` and `readResults(size?, after?, signal?)` retain their
144
+ Promise API and optionally accept a standard `AbortSignal`. An already aborted
145
+ signal dispatches no GET; abort unsubscribes the actual HTTP request, releases the
146
+ read slot, and prevents a late Promise continuation from updating the session.
147
+ Abort listeners are removed on success, failure and cancellation. A cancelled GET
148
+ keeps the original proposal, confirmation key and accepted execution; it does not
149
+ mark that execution terminal or prove rollback. A new authorized read may observe
150
+ the same execution. Overlapping execution refreshes remain rejected, while an
151
+ aborted generation cannot release the slot of its successor.
152
+
153
+ The caller owns GET cancellation and its observation budget; the Core session does
154
+ not invent a global read timeout. Use a fresh read lifetime for a fresh consultation
155
+ and abort reads when the owning view closes. Do not race a Promise with a timer:
156
+ connect the signal to the read itself so the HTTP subscription is torn down.
157
+ `evaluate` and `confirm` do not accept this signal: a dispatched POST and its original
158
+ key stay in intent custody across view teardown. GET failure/cancellation must never
159
+ start a new evaluation or confirmation automatically.
160
+
161
+ The backend is the authority on proposal expiry. A client clock hint must not
162
+ block a same-key replay after an uncertain confirmation; the backend may return
163
+ 409 or 410 and the host must explain that state without inventing a new intent.
164
+
165
+ HTTP 202, `RUNNING`, `CANCEL_REQUESTED` and `RECONCILIATION_REQUIRED` are not
166
+ business success. Read the authorized execution until its reconciled terminal
167
+ state and use the paged result reader for each item outcome. Preserve backend
168
+ errors (including 409, 410, 429 and 503) for the host's governed UX mapping;
169
+ do not turn them into a new submission with a new key. The backend continues to
170
+ own authorization, policy, identity, idempotency, limits and the domain transaction.
171
+ The table library has a candidate visual path for a published CRUD
172
+ `bulk-update` capability in `UNIFORM_UPDATE` mode. It uses this client and a
173
+ separate review/confirmation surface; it does not add a second backend contract.
174
+ The service also supports typed command and per-item requests, but that table
175
+ surface does not advertise them. Query selection, ASYNC jobs and ATOMIC mode are
176
+ outside this Angular slice. This is not a claim that the reference host or full
177
+ backend B7 acceptance is complete.
178
+
179
+ ## Published asynchronous execution tracking
180
+
181
+ `PraxisBulkClientService.waitForExecution` is separate from the BASIC client
182
+ above. Use its published execution operation only when that operation actually
183
+ supports the asynchronous profile; an enum member does not enable a backend
184
+ profile. The Observable emits one canonical terminal snapshot, preserving
185
+ `COMPLETED`, `COMPLETED_WITH_ERRORS`, `CANCELLED`, `STOPPED` and
186
+ `RECONCILIATION_REQUIRED`. `CANCEL_REQUESTED` remains pending.
187
+
188
+ Each subscription starts its own strict overall deadline. At most one GET is in
189
+ flight: interval ticks do not abort a useful slow read or queue overlapping reads.
190
+ Pending responses do not renew the deadline, which also bounds a GET that never
191
+ responds. Terminal completion, transport error, deadline and unsubscribe release
192
+ the active read and polling timers; a late response cannot revive an expired
193
+ subscription. Stopping a GET does not reverse server effects or cancel a POST.
194
+
195
+ A read failure means the outcome is unknown. Explicitly resume reads for the same
196
+ execution and preserve the original proposal and confirmation key; do not confirm
197
+ or evaluate again to restore progress. This transport does not provide custody
198
+ across closing/reopening a dialog, reload recovery or operational ASYNC acceptance.
199
+
7
200
  ## Governed color palettes
8
201
 
9
202
  `materializeGovernedPaletteEntries(palette, purposes)` returns `MaterializedGovernedColorToken[]`, pairing each original `entry` with its resolved `color`. It preserves distinct token IDs even when CSS references/colors match, applies purpose filtering, and resolves fallback dependencies against the complete palette. Use this projection for identified swatches; do not zip color arrays to entries or infer identity from color equality. `materializeGovernedPaletteColors` remains the string-only projection of the same resolver.
10
203
 
11
204
  `GovernedColorPaletteService` is the canonical Angular client for color-palette projections published by Praxis Config. Published palettes carry a stable `familyKey`, an explicit `variant` identity and token-level `displayName`/`aliases`; incomplete legacy projections are rejected before caching. The service supports list/read/capabilities/preview, exact `list(familyKey)` queries, tenant/environment-isolated caching, conditional ETag revalidation and deterministic `version`/`etag` pins. Consumers may use names and aliases for presentation and discovery only: `paletteKey` and `tokenId` remain the persisted identities, and local metadata must not become a second source of governance. `GovernedColorTokenSelection` carries the exact palette/version/ETag/token observation beside the existing CSS-string field value; applications persist it only through an explicit domain field or mapping.
12
205
 
206
+ ## Declarative Page DataSources (`page.dataSources`)
207
+
208
+ `WidgetPageDefinition.dataSources` and `WidgetPageDataSourceRuntimeService` allow dynamic pages and dashboards to fetch backend KPIs, group-by aggregations, and time-series metrics without imperative host `HttpClient` orchestration:
209
+
210
+ - **Endpoint resolution (`endpointKey` + `resourcePath`)**: resolves URLs through the `API_URL` token using `endpointKey` (falling back to `'default'`) so multi-service enterprise hosts route each DataSource to its target microservice.
211
+ - **Transform presets & JsonLogic**: supports `{ kind: 'path', path }`, `{ kind: 'group-by-map', mappings, totalField }` (initializing declared keys with `0` for sparse buckets), `{ kind: 'timeseries-last', mappings }`, or arbitrary JsonLogic expressions.
212
+ - **Transient state overlay (`targetStatePath`)**: merges resolved payloads into a non-persisted runtime overlay over `page.state.values[targetStatePath]` and coalesces concurrent emissions via microtask batching before re-evaluating `page.state.derived` and `composition.links`. Live runtime payloads never dirty `authoredPageDefinition` or trigger `autoPersist` writes.
213
+ - **Resilience & visibility-aware polling**: `errorPolicy` (`'fallback' | 'silent' | 'propagate'`) applies `fallbackValue` only before the first successful response so transient network errors during polling (`refreshIntervalMs`) never overwrite live data with static fallbacks. Subsequent poll ticks pause while `document.visibilityState === 'hidden'` and resume immediately on `visibilitychange`.
214
+
13
215
  ## LLM Recommendation Guide
14
216
 
15
217
  - `BUILTIN_WIDGET_SHELL_PRESETS` is the canonical catalog for reusable shell
@@ -31,6 +233,9 @@ Use this package directly when a host application or library needs Praxis UI typ
31
233
  through `context.ui.shell.presets`, then widget-specific `appearance`; use CSS
32
234
  variables there for corporate theming. The `dark-glass` and `graphite` material palettes remain dark by default;
33
235
  adaptive finishes follow the host Material tokens. Do not mutate either exported catalog to configure an application.
236
+ Shell titles use the host Material title-medium weight by default, including
237
+ expanded and fullscreen states; `appearance.typography.titleWeight` remains
238
+ the more specific widget-authored override at desktop and narrow viewports.
34
239
  The deliberate `frameless` inset improvement differs from 9.0.67: persist
35
240
  `appearance.body.padding: "0"` when the original edge-to-edge layout is required.
36
241
  - `WidgetShellConfig.stickyHeader: true` retains the existing composition-derived
@@ -209,6 +414,12 @@ Peer dependencies:
209
414
  - `@angular/common`, `@angular/core`, `@angular/forms`, `@angular/material`, `@angular/platform-browser`, `@angular/router` `^21.0.0`
210
415
  - `rxjs` `~7.8.0`
211
416
 
417
+ ## Resource HTTP responses and revision custody
418
+
419
+ `GenericCrudService.getByIdHttpResponse(id, options?)` and `updateHttpResponse(id, entity, options?)` expose the original `HttpResponse<RestApiResponse<T>>`, pairing a representation with its response headers. Existing `getById`, `getByIdResponse`, `update` and `updateResponse` keep their original DTO/envelope return shapes.
420
+
421
+ `CrudOperationOptions.resourceVersion` overrides a write's shared item cache: a strong quoted ETag supplies the exact `If-Match`, `null` intentionally omits that precondition, and `undefined` preserves existing cache → DTO `resourceVersion` fallback (or the configured header when neither is present). Consumers that edit a captured representation must provide its original revision, rather than a revision obtained by another read. `readStrongResourceEtag` validates a single strong tag without normalizing its bytes; weak, unquoted and multi-valued headers cannot stand in for a write revision. An explicitly invalid/weak response header clears the previous cached token. When the header is absent, the existing Core cache can capture DTO `resourceVersion`; this legacy/manual fallback does not authorize an automatic Form snapshot. Explicit overrides never fall back to cached, DTO or configured tokens.
422
+
212
423
  ## Theme And Icons
213
424
 
214
425
  ### Canonical SCSS Theming (Recommended)
@@ -272,8 +483,11 @@ Hosts should load the icon fonts they use. Without the classic Material Icons fo
272
483
  Use `PraxisIconButtonComponent` for icon-only actions. It keeps the native
273
484
  `button` contract, centers the glyph, and preserves a 44px pointer target even
274
485
  when the visible surface is compact. It accepts the same `mi:`, `mso:`, `msr:`
275
- and `mss:` icon-family prefixes as `PraxisIconDirective`; unprefixed names keep
276
- the legacy Material Icons behavior.
486
+ and `mss:` icon-family prefixes as `PraxisIconDirective`; explicit prefixes
487
+ always select their named family. Unprefixed names follow the configured
488
+ `MatIconRegistry` default for Material Icons or Symbols (outlined, rounded, or
489
+ sharp). Without a configured Symbols default, they retain legacy Material Icons
490
+ behavior; `providePraxisIconDefaults()` selects Symbols Outlined.
277
491
 
278
492
  ```ts
279
493
  import { Component, signal } from "@angular/core";
@@ -451,6 +665,20 @@ Hosts that maintain an authored source separately from runtime state should cons
451
665
  `pageChange` remains the compatibility stream for every canonical page update, including persistent
452
666
  runtime state; transient composition projections remain excluded from both outputs.
453
667
 
668
+ With `autoPersist` enabled, pass a stable `pageIdentity` to scope the document and
669
+ listen to `persistenceChange: WidgetPagePersistenceState` for `loading`, `saving`,
670
+ `saved`, `resetting`, `idle` or `error`. `savedAt` is emitted only after the
671
+ storage confirms a save. An empty `{ widgets: [] }` document is a valid customized
672
+ page; absence of a stored document falls back to the host's page. The runtime
673
+ serializes save and reset operations for the identity so each storage call uses
674
+ the latest provider ETag. A 409/412 conflict blocks later writes until the host
675
+ explicitly calls `reloadPersistedPage(defaultPage)`, which discards the current
676
+ draft. `resetPersistedPage(defaultPage)` clears storage and applies the factory
677
+ page only after acknowledgement. `persistCurrentPage(page?)` requests an
678
+ explicit save or retries a recoverable save failure; callers can pass the exact
679
+ authored snapshot they want saved. Completion without a storage value reports
680
+ `errorKind: 'unacknowledged'` rather than claiming success.
681
+
454
682
  Pointer drag/resize in the canvas snapshots rendered CSS Grid track sizes and gutters at gesture
455
683
  start. Content-sized rows are not treated as uniformly sized `rowUnit` rows. Horizontal resize
456
684
  snaps to columns; vertical resize in `autoRows: 'content'` authors the item's independent
@@ -585,6 +813,8 @@ it must not infer authorization from a `canonicalOperations` boolean or discard
585
813
 
586
814
  `ResourceRecordOpenService` materializes the minimal `ResourceRecordOpenRef` published by governed analytics. It resolves the target resource catalog, loads the real item, follows its HATEOAS `surfaces` relation, requires the exact item surface to be available for the current context, and only then delegates to `ResourceSurfaceOpenAdapterService`. Consumers must not replace this flow with `${item.id}`, a copied surface path, a label match, or a prebuilt `surface.open` payload.
587
815
 
816
+ When a readable item surface (`VIEW` or `READ_PROJECTION` with `scope === 'ITEM'` and no `relatedResource` of its own) is materialized from a contextual surface catalog, `ResourceSurfaceOpenAdapterService.extractRelatedSurfaces` filters the sibling `ITEM` surfaces that are authorized (`availability.allowed === true`) and publish a complete `relatedResource` contract (`childResourceKey`, `childResourcePath`, `childParentField`), sorted by `order`, and attaches them to `payload.context.relatedSurfaces`. `PraxisSurfaceHostComponent` automatically composes a `[data-testid="surface-related-resources"]` section containing `<praxis-related-resource-outlet>` cards in `mode="open-action"` (`compact: true`) by default so opening a 360° dossier with multiple `1:N` child collections never triggers an N-table HTTP prefetch storm. Activating any card dispatches `surface.open` with the parent `surfaceRuntime`, pushing the child `<praxis-table>` onto the `SurfaceDrawerComponent` navigation stack (`pushFrame`/`backFrame`). Callers may opt into inline tables (`context.relatedResourcesMode = 'inline'`) or suppress the section (`context.relatedResourcesMode = 'off'`).
817
+
588
818
  When a discovered item surface publishes `relatedResource`, `ResourceSurfaceOpenAdapterService` delegates to `RelatedResourceSurfaceResolverService`. The resulting table targets the canonical child resource and receives the parent identity through `queryContext.filters`; it does not prefetch the item projection and rebuild a host-local table before opening. When the child surface publishes `childParentField`, related create actions seed that field through `actions[].form.initialValue`, and both create/update command policies project it into `groupedCommand.contextFields`. The field therefore remains in the schema-backed form and submit payload without rendering a redundant lookup for context the dossier already established. The generated related-resource empty state is informational: CREATE remains the stable, capability-governed toolbar action instead of being duplicated inside the empty state. An explicit host `emptyState.actions` declaration is preserved when the product journey intentionally needs a different contextual action. The materializer declares `openMode: "drawer"` but does not redefine drawer geometry: positioning, viewport height, focus, and close behavior remain owned by `@praxisui/crud`. This keeps the drawer responsive and preserves child operations, empty states, endpoint routing, and resource identity from the backend contract.
589
819
 
590
820
  The outlet's `ComponentDocMeta.configEditor` intentionally owns presentation only: `title`, `subtitle`, `icon`, `mode`, `presentation`, `compact`, and the closed copy/layout subset of `emptyState`. Opening it does not resolve runtime/materialized inputs. Apply and Save preserve every other persisted input opaquely, including Table-owned `tableConfig` and behavior-bearing empty-state fields. The relationship path, parent field/id, operation, filters, query context, surface and runtime state remain metadata/runtime-owned and cannot be authored by this editor or its AI manifest.
@@ -604,12 +834,37 @@ Core exports schema and metadata infrastructure used by form, table, list, chart
604
834
  - form layout item models
605
835
  - JSON Logic models and runtime service
606
836
 
837
+ `SchemaNormalizerService` expands `x-ui.customFieldsContainer: true` into child
838
+ fields such as `customFields.numero_calcado`, preserving each child's label,
839
+ control type, group, order, validators and option source. It also recognizes an
840
+ object named `customFields` with inline `properties`. `FieldDefinition` and
841
+ `FieldMetadata` retain `customField`, `customFieldKey` and `customFieldScope`;
842
+ the container itself does not become a control. See [schema flow](https://github.com/codexrodrigues/praxis-ui-angular/blob/feat/custom-fields-runtime/projects/praxis-core/docs/schema-flow.md#custom-fields)
843
+ for the value path and identity defaults.
844
+
845
+ For scalar arrays, `FieldDefinition.items` and `FieldMetadata.items` preserve the
846
+ operation schema's `FieldScalarItemsSchema` (`type`, optional `format` and `enum`).
847
+ This is distinct from `array.itemSchema.fields` for object collections.
848
+ `normalizeScalarArrayValue` is the shared Core projection for UI tokens: it admits
849
+ only declared scalar types and the finite enum after conversion, rejects invalid
850
+ items without partial output, and does not infer types from labels or value shape.
851
+ Consumers must apply it at validation and query/submit boundaries; saved metadata
852
+ cannot widen the server's `items` or `enumValues` constraints.
853
+
854
+ Expansion does not make arbitrary property names safe Angular controls or turn
855
+ read-only into automatic omission. The canonical Metadata key policy rejects
856
+ reserved control names, and its command request projection excludes read-only
857
+ custom fields. Consumers must use that operation schema rather than merge a
858
+ response schema into a command. See the
859
+ [enterprise adoption review](https://github.com/codexrodrigues/praxis-ui-angular/pull/658)
860
+ for contract blockers, context/freshness limits and the exact proof boundary.
861
+
607
862
  For governed analytics cross-filtering, `bindings.primaryDimension.keyFilterField` is the public request field that receives the raw `bucket.key`. Consumers must preserve its type, verify the target request schema, and must not infer this field from the dimension name, display label, or backend property paths.
608
863
 
609
864
  `valuePresentation` is the shared display contract for scalar read-only values such as currency, number, date, datetime, time, percentage, and boolean.
610
865
  `presentation` is the shared semantic wrapper contract for presentation-capable consumers. It can request chip, badge, status or iconValue rendering while preserving the raw value used for filtering, sorting and export.
611
866
 
612
- `FieldPresentationConfig` is the shared semantic presentation contract for read-only surfaces that need a visual primitive around the value, such as `chip`, `badge`, `status`, `iconValue`, or `microVisualization`. It keeps business data in the original field and lets consumers map `tone`, `appearance`, `icon`, `tooltip`, and optional fixed `label` values to their own renderer and theme tokens.
867
+ `FieldPresentationConfig` is the shared semantic presentation contract for read-only surfaces that need a visual primitive around the value, such as `chip`, `badge`, `status`, `iconValue`, or `microVisualization`. It keeps business data in the original field and lets consumers map `tone`, `appearance`, `icon`, `tooltip`, and optional fixed `label` values to their own renderer and theme tokens. For `microVisualization` (`PraxisPresentationVisualizationConfig`), `@praxisui/core` also publishes canonical normalization (`title`, `legend`, `targetLabel`, over-capacity `>100%` readouts, deterministic per-instance SVG gradient IDs) and `PraxisMicroTooltipOverlayService`, a `document.body` / HTML Top Layer singleton portal that renders unclipped floating telemetry readouts (`data-micro-readout`) across tables, cards, dynamic fields, and analytical drawers.
613
868
 
614
869
  ## Global Actions
615
870
 
@@ -692,12 +947,18 @@ contracts are unchanged.
692
947
 
693
948
  `DomainKnowledgeService` and `DomainRuleService` are shared clients for governed semantic decision flows exposed by `praxis-config-starter`. `browseDefinitionCatalog` exposes the bounded, redacted and server-scoped decision catalog; consumers then use `getDefinition` with the exact returned definition id instead of downloading every rule body or joining versions by key. `getDefinitionFacts` projects the same definition's versioned fact vocabulary, including type, localized meaning, provider evidence, sensitivity and redaction policy; Angular must not reconstruct that vocabulary from JSON Logic or host-specific fixtures. `getDefinitionCapabilities` returns the authenticated principal's server-scoped `CREATE_NEW_VERSION` action per definition; consumers must not treat projection metadata such as editor support as authorization. For change workspaces, `getChangeWorkspaceCapabilities` returns the authenticated principal's `availableActions` and stable blockers; consumers must not infer submit, review or promotion authority from lifecycle status. `DomainRuleService` also exposes the safe RuleSet version catalog, active head/status, redacted execution summary, aggregate host alignment, forward activation and rollback protected by the current head ETag. The same client projects immutable rollout-policy versions, their independent anti-ABA head, maker-checker approval, activation and append-only timeline; policy authority and lifecycle validation remain server-owned. It also exposes the two-phase operational rollout through a recoverable human catalog, redacted readiness, create/cancel commands and candidate activation bound to the rollout identity. Consumers must obey the Config-owned `availableActions`; they must not recalculate quorum or head validity. Execution summaries contain only aggregate outcome counts, distinct-host count and observation timestamps for an immutable snapshot. Host-status summaries contain only aligned, snapshot-drifted, runtime-incompatible, unavailable and stale counts derived against the active head and its approved compatibility coordinates; facts and host identities remain outside Angular. Runtime surfaces should treat materializations as derived projections of backend-governed decisions, not as frontend-owned business rules.
694
949
 
950
+ `getDefinitionParameters` reads the same immutable definition's Engine-owned parameter template and typed constraints, together with declared/default/effective values. An absent `defaultValue` or `declaredValue` property differs from explicit JSON null; `origin` identifies the declared/default source. Consumers edit only workspace `parameters.parameterValues`, preserve other parameter metadata, and let Config derive the structural condition. Template identity, read-only flags, constraints, workspace ETags and publication through the governed snapshot lifecycle remain server-owned.
951
+
952
+ An intact historical snapshot with a different runtime compatibility is `RUNTIME_INCOMPATIBLE`, remains available for authorized audit, and is not executable (`executionReady=false`). All non-`READY` versions expose `availableAction=UNAVAILABLE`, including an incompatible version still referenced by the active head. Consumers must preserve that historical identity without offering activation, rollback or rollout; `READY` still requires the current compiler and implementation catalog. Historical readability never authorizes execution.
953
+
954
+ Snapshot publication returns `DomainRuleSnapshotStored` (immutable content/hash), without selecting or refreshing an active head. Before a first activation, a server-published `CREATE_ROLLOUT` version action may authorize starting the staged flow together with the rollout catalog action. `createRollout` and `activateSnapshotCandidate` accept an explicit null head token for verified absence and send only `If-None-Match: *`; existing tokens send only `If-Match`. Candidate activation retains the actual rollout ID. The nullable expected snapshot/head pair records bootstrap absence; clients must never replace it with a content hash, fabricated head or local readiness calculation.
955
+
695
956
  ## Public API Areas
696
957
 
697
958
  Core exports:
698
959
 
699
960
  - shared services such as `GenericCrudService`, `GlobalConfigService`, `GlobalActionService`, `ResourceDiscoveryService`, `ComponentMetadataRegistry`, `PraxisJsonLogicService`, `LoadingOrchestratorService`
700
- - governed submit-error normalization through `ErrorMessageService`, preserving public `code`, `target`, `category`, and safe messages while keeping transport details out of UI fallbacks
961
+ - governed submit-error normalization through `ErrorMessageService`, preserving public `code`, `target`, `category`, `decision`, and safe messages while keeping transport details out of UI fallbacks; unknown decisions retain safe summary copy without implying a field correction
701
962
  - tokens and providers for API URLs, global config, global actions, loading, i18n, settings panel bridge, surface drawer bridge, collection export, field selector registry, overlay/layer scale, the shared collection-search visual contract (`PRAXIS_COLLECTION_SEARCH_DEFAULTS`, `PRAXIS_COLLECTION_SEARCH_VARS`, `buildPraxisCollectionSearchCss`), and the shared action-control geometry contract (`PRAXIS_ACTION_CONTROL_DEFAULTS`, `PRAXIS_ACTION_CONTROL_VARS`, `buildPraxisActionControlCss`)
702
963
  - models for table config, fields, forms, rich content, editorial content, widget pages, global actions, resource discovery, domain knowledge/rules, analytics, query context, loading, and collection export
703
964
  - helpers for schema ids, ETag fetch, field mapping, config merge, validation, IDs, inline filter controls, global action refs, and form hooks
@@ -719,7 +980,9 @@ Action-bearing components must use the semantic `--praxis-action-control-*` vari
719
980
 
720
981
  ### Catálogo no quick connect e isolamento do editor de página
721
982
 
722
- `ResourceQuickConnectComponent` apresenta recursos publicados em `/schemas/catalog` usando o seletor `pdx-material-select` registrado em `ComponentMetadataRegistry`. O host deve registrar os descritores oficiais de DynamicFields. O controle é inicializado pelo protocolo `setInputMetadata` e ControlValueAccessor; Core não importa a biblioteca de campos. A conexão avançada por rota continua disponível.
983
+ `ResourceQuickConnectComponent` apresenta recursos publicados em `/schemas/catalog` usando o seletor `pdx-material-select` registrado em `ComponentMetadataRegistry`. O host deve registrar os descritores oficiais de DynamicFields. O controle é inicializado pelo protocolo `setInputMetadata` e `ControlValueAccessor`; Core não importa a biblioteca de campos. A conexão avançada por rota continua disponível (com `<datalist>` de sugestões do catálogo e abertura automática da seção avançada quando o seletor dinâmico não está disponível ou quando o recurso atual é uma rota customizada fora do catálogo).
984
+
985
+ O componente expõe `[resourcePath]`, `(resourcePathChange)`, `[endpointKey]`, `[apiUrlEntry]`, `[intent]`, `ControlValueAccessor` (`ngModel` / `formControl`) e os hooks `reset()` / `acceptAppliedValue()` de `SettingsValueProvider`. A projeção e reconciliação de opções do catálogo são centralizadas em `ResourceDiscoveryService.getDiscoveredResources()`, `loadDiscoveredResources()`, `projectSchemaCatalogResources()` e `resolveCatalogResourceOptionValue()`, deduplicando chamadas concorrentes a `/schemas/catalog` por URL, consumindo `resourcePath`, `resourceReadOnly` e `resourceCapabilities` publicados pelo backend para eliminar falsos-positivos de capacidades (como endpoints herdados `/stats/*` desabilitados) e sinalizando recursos somente leitura no subtítulo do seletor. `ResourceDiscoveryService` reutiliza a instância do injetor ancestral quando um componente standalone cria injetor filho sem override local de `API_URL`.
723
986
 
724
987
  O editor de configurações da página recebe uma cópia da definição autoral. Dados carregados e entradas transitórias dos widgets não devem virar configuração ao alterar o layout.
725
988
 
@@ -829,7 +1092,7 @@ interpolation does not add date masks, CPF masks or an expression language. Lite
829
1092
  separators remain when both bound fields are empty.
830
1093
  The canonical link pipeline now supports explicit `format-value` for civil dates,
831
1094
  digit masks and numeric presentation.
832
- The [complete identity recipe](../../examples/ai-recipes/praxis-dynamic-page.widget-selection-identity.json)
1095
+ The complete identity recipe (`examples/ai-recipes/praxis-dynamic-page.widget-selection-identity.json`)
833
1096
  resets the transient identity before formatting and composes only available subtitle
834
1097
  parts. The lab and Core integration test consume the same executable page artifact.
835
1098
 
@@ -899,10 +1162,17 @@ widget appearance/size, or registered content editor session. It uses the existi
899
1162
  `owner` option; no session identity is persisted in the page document.
900
1163
 
901
1164
  The session is cancelled when its panel closes, the page is destroyed, or an external
902
- page/context/identity/authoring input change invalidates it. A page-only acknowledgement
903
- identical to the current authored document keeps the session alive for subsequent
904
- Apply/Save. This is deliberately conservative: a different external document cancels
905
- open editors even when a particular widget happens to be unchanged.
1165
+ page/context/identity/authoring input change invalidates it. An acknowledgement identical
1166
+ to the current authored page keeps the session alive for subsequent Apply/Save, including
1167
+ when the host resends an equivalent `pageIdentity` object. After the first input change,
1168
+ identity equivalence means strict equality of its five fields: `appId`, `tenantId`,
1169
+ `userId`, `routePath` and `locale`; whitespace, delimiters and missing values are not
1170
+ normalized. Core retains a private snapshot of those accepted primitive values, so
1171
+ mutating the host's previous object before resending a clone still changes the scope.
1172
+ Resending only that equivalent identity also preserves data-source overlays,
1173
+ composition and persistence scope. Context, instance and authoring capability changes
1174
+ remain invalidating. A different external document cancels open editors even when a
1175
+ particular widget happens to be unchanged. This does not confirm an HTTP save.
906
1176
 
907
1177
  Confirmed widget removal cancels sessions targeting that key, plus page-wide settings
908
1178
  that could restore the removed widget. Asynchronous editor results cannot open a panel
@@ -1065,6 +1335,125 @@ blur does not become an inner widget's default. Intentional inheritance through
1065
1335
  `context.ui.shell.preset/presets` remains supported. This isolation does not remove
1066
1336
  the host's shared theme tokens.
1067
1337
 
1338
+ ## App shell: host appearance
1339
+
1340
+ `PraxisAppShellComponent` materializes the host theme for both the sidebar and
1341
+ header. The existing theme roles `--sidebar` (falling back to `--card`),
1342
+ `--surface-gradient` (falling back to `--card`), `--command-gradient`,
1343
+ `--sidebar-foreground`, `--sidebar-primary`, `--sidebar-accent`,
1344
+ `--sidebar-accent-foreground`, `--primary-deep`, `--primary-foreground`,
1345
+ `--accent`, `--secondary`, `--overlay`
1346
+ and `--shadow-panel` apply to the native chrome and brand icon. Navigation,
1347
+ loading and mobile behavior do not change when these colors change. Without host
1348
+ theme tokens, the brand uses a dark blue fallback with a white icon; custom host
1349
+ colors should always supply their corresponding foreground roles.
1350
+
1351
+ Semantic badges use tinted surfaces with the host's foreground. Success,
1352
+ warning and info consume `--praxis-success`, `--praxis-warning` and
1353
+ `--praxis-info`; the established `--ready`/`--warning` variables and bounded
1354
+ fallbacks remain available. Error consumes `--destructive`. Hosts should use
1355
+ these existing roles rather than overriding private shell selectors. No new
1356
+ shell input, saved layout field or theme-specific component is required.
1357
+
1358
+ ## Governed Resource Quick View
1359
+
1360
+ `ResourceQuickViewBinding`, `PraxisQuickViewTriggerDirective` (`[praxisQuickView]`),
1361
+ `ResourceQuickViewService` and `PraxisQuickViewOverlayComponent` provide the
1362
+ canonical hover/focus/click contextual dossier across `@praxisui/table`,
1363
+ `@praxisui/list`, `@praxisui/dynamic-fields`, `@praxisui/dynamic-form`,
1364
+ `@praxisui/rich-content`, `@praxisui/charts`, `@praxisui/stepper` and
1365
+ `@praxisui/ai`:
1366
+
1367
+ - **Metadata synthesis (`resolveFieldQuickViewBinding` & `reconcileFieldQuickViewBinding`)**:
1368
+ Synthesizes `ResourceQuickViewBinding` from explicit `field.quickView`,
1369
+ backend `x-ui.resourceReference` (`@ResourceReference`) or
1370
+ `x-ui.optionSource.detail` when it declares a `resourceKey`. The binding reuses
1371
+ `recordOpen.sourceIdentityField` and `recordOpen.target.resourceKey/surfaceId`;
1372
+ `previewSurfaceId` can select a separate read projection. Persisted presentation
1373
+ preferences must preserve the server-owned record target and identity field.
1374
+ - **Context resolution (`resolveResourceQuickViewTarget`)**:
1375
+ Resolves `recordOpen.sourceIdentityField` from direct records or nested `row`,
1376
+ `item` and `values` envelopes, including dotted field paths, and extracts
1377
+ scalar IDs (`id`, `value`, `key`) when a form control holds an entity-lookup
1378
+ selection object.
1379
+ - **Enterprise security and request lifetime**:
1380
+ `ResourceQuickViewService` coalesces matching in-flight projections and invalidates
1381
+ the active generation on context changes; it does not retain a completed-record
1382
+ LRU cache. Every fresh open resolves the current item surface. Surface, action,
1383
+ capability and schema discovery share requests within the current runtime context
1384
+ generation. A context change cancels the whole record opening and invalidates
1385
+ late discovery responses, including a return to the same context. The hover trigger
1386
+ waits 280 ms by default; explicit activation starts immediately. Discovery reads
1387
+ the resource catalog, the item and its contextual surfaces before resolving the
1388
+ filtered response schema and projection. A pending HTTP request can therefore
1389
+ outlive dismissal even though its obsolete result cannot update that popover.
1390
+ Fields restricted by `x-ui.fieldAccess` are filtered or masked (`•••`) before
1391
+ rendering, and `recordOpen` actions are validated against the item's
1392
+ authorized `_links` / `surfaces` / `actions` snapshot.
1393
+ - **Metadata presentation**:
1394
+ Summary labels come from normalized domain metadata (`x-ui.label`), not field-name
1395
+ humanization. Explicit numeric `valuePresentation` uses the shared resolver and
1396
+ formatter for `currency`, `number` and `percentage`, including `currency.code`,
1397
+ zero precision and fractional `digitsInfo`. A presentation-level value config
1398
+ takes precedence over the field config. Existing field currency/decimal defaults
1399
+ remain the fallback when the explicit config omits them. Options, masking and
1400
+ presentation affixes retain their precedence. This numeric correction does not
1401
+ add support for compact notation or change the existing date/time formatting path.
1402
+
1403
+ Hosts must install `providePraxisQuickViewDialogPresenter()` from `@praxisui/dialog`.
1404
+ Bindings with `contentRef` also require the rich-content body renderer; the standard
1405
+ summary does not. Source changes require publication and consumer adoption before
1406
+ they can be claimed for an installed package.
1407
+
1408
+ ### Optional editing highlight
1409
+
1410
+ This feature was added in source after `10.0.0-rc.36`; it is not yet part of a published package release.
1411
+
1412
+ `WidgetShellConfig.appearance.card.interactionHighlight` selects `standard` or
1413
+ `gradient`. Omit it to inherit the shell preset; the final default is `standard`.
1414
+ An explicit `standard` overrides a gradient preset. This is editing chrome: it
1415
+ appears on selection or keyboard focus while customization is enabled, never as a
1416
+ permanent border in the published page. Focusing a child control does not change selection; the highlight itself does not emit selection.
1417
+ The gradient uses the current primary, tertiary and secondary theme tokens. Resize
1418
+ grips follow the same choice. Internal control focus indicators remain intact;
1419
+ blocked canvas operations retain the error indicator and forced colors use a solid
1420
+ system-color outline. The highlight follows the resolved card radius (square for
1421
+ content-only shells).
1422
+
1423
+ ```json
1424
+ {"shell":{"kind":"dashboard-card","appearance":{"card":{"interactionHighlight":"gradient"}}}}
1425
+ ```
1426
+
1427
+ In Widget settings → Appearance, choose Inherit, Standard or Gradient and inspect
1428
+ its preview. Apply updates the local draft; the host controls remote persistence.
1429
+ Saving the settings panel alone is not proof of a server write: the reference Page
1430
+ Builder host requires Save page. Reopening and Reset preserve the distinction between
1431
+ an omitted value and an explicit override. Editing appearance on a widget without a
1432
+ shell preserves content-only presentation (`kind: 'none'`); a card requires an explicit
1433
+ choice. The option does not change child component inputs or enable customization.
1434
+
1435
+ This preference controls editing appearance; it grants no authorization and carries
1436
+ no business selection state. The host integrates persistence, identity and tenant
1437
+ scope through the canonical configuration infrastructure, including its ETag
1438
+ contract; this option requires no separate ETag implementation in the host. Editing only this preference must preserve unrelated
1439
+ shell settings, including `bodyLayout`, `windowActions` and action `pressed` values.
1440
+ Local editor round-trip tests do not prove remote tenant isolation or ETag behavior.
1441
+
1442
+ The existing AI operation `widget.shell.configure` merges partial shell input.
1443
+ Omitting `interactionHighlight` from that input preserves an existing override; it
1444
+ does not perform the visual editor's Inherit action, which removes the field from
1445
+ the complete saved document. Explicit `standard` disables the gradient but remains
1446
+ an override. Resetting an existing override to inherited styling through this AI
1447
+ operation remains unsupported; this option does not imply full editor/AI parity.
1448
+
1449
+
1450
+
1451
+ ### Domain Rules: identidade explícita de operação (candidato G3)
1452
+
1453
+ As leituras `listSnapshotVersions`, `getSnapshotHeadStatus`, `getSnapshotHead`, `getSnapshotHostStatusSummary` e `getRolloutCatalog` exigem `operationKey` após `ruleSetKey`. A inspeção de lifecycle recebe `{ ruleSetKey, operationKey }` quando incluir snapshots. Nenhum método escolhe o primeiro perfil. As projeções de versão, head, rollout, status e publicação preservam essa identidade retornada pelo servidor.
1454
+
1455
+ O consumidor deve invalidar cache, requisições tardias e confirmações ao mudar de operação. Políticas de rollout permanecem familiares. Preparação neutra de candidato continua limitada ao endpoint host que resolve uma única operação registrada; não inventar um campo ou capacidade no cliente para compor famílias múltiplas. O corte público exige release coordenado do Core, bibliotecas dependentes e consumidores, seguido de instalação a partir do registry; tarball local só comprova candidato.
1456
+
1068
1457
  <!-- praxis-npm-catalog-links:start -->
1069
1458
  ## Official documentation and examples
1070
1459