@praxisui/core 9.0.68-rc.3 → 10.0.0-rc.10
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 +146 -1
- package/ai/component-registry.json +12 -5
- package/fesm2022/praxisui-core-schema.mjs +2946 -0
- package/fesm2022/praxisui-core.mjs +4442 -239
- package/package.json +14 -2
- package/theme-bridge.css +22 -3
- package/theming/README.md +63 -0
- package/theming/_theming.scss +543 -0
- package/theming/index.scss +1 -0
- package/theming/theming.scss +1 -0
- package/types/praxisui-core-schema.d.ts +4442 -0
- package/types/praxisui-core.d.ts +6341 -4857
package/README.md
CHANGED
|
@@ -4,6 +4,80 @@ 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
|
+
## Governed bulk client: basic synchronous slice
|
|
8
|
+
|
|
9
|
+
`BulkOperationClientService` consumes the Metadata published `BulkExecutionContract`
|
|
10
|
+
from an action or CRUD capability. `discoverAction` and `discoverCapability` use the
|
|
11
|
+
existing resource discovery surface; operation paths and filtered schema URLs come
|
|
12
|
+
from that descriptor. `evaluationSchema` loads the backend's filtered request schema
|
|
13
|
+
for a caller to render the operation's form. The client admits only `SYNC`,
|
|
14
|
+
`EXPLICIT` and `PER_ITEM` in this first Angular slice. A descriptor that also
|
|
15
|
+
advertises query selection is usable only with an explicit target request here.
|
|
16
|
+
|
|
17
|
+
The Quickstart candidate migrates its existing uniform update operation to an
|
|
18
|
+
`ASYNC`-only profile; that host adoption is still being validated. BASIC omits
|
|
19
|
+
an `ASYNC`-only operation without a `SYNC` fallback. Angular ASYNC support needs
|
|
20
|
+
its own consumer implementation and acceptance; this note does not establish a
|
|
21
|
+
Render deployment or an ASYNC UI journey.
|
|
22
|
+
|
|
23
|
+
Provide the exact wire ID and opaque resource `expectedVersion` for every selected
|
|
24
|
+
target. In particular, int64/Long IDs remain decimal strings; do not convert them
|
|
25
|
+
through JavaScript numbers. Evaluate first, review the returned READY or BLOCKED
|
|
26
|
+
proposal and its authorized paged results, then confirm a READY proposal using
|
|
27
|
+
only `{ proposalId }` and one `Idempotency-Key`. `BulkSyncStateService.createSession`
|
|
28
|
+
keeps that key fixed across a retry of the same confirmation. A new intention gets
|
|
29
|
+
a new session. The key and proposal live only in that session; it makes no claim
|
|
30
|
+
of recovery across a page reload.
|
|
31
|
+
|
|
32
|
+
For a selected collection row that publishes a `self` link,
|
|
33
|
+
`readTargetVersion(row._links, wireId, identityPath, options)` reads that exact
|
|
34
|
+
item, verifies its returned identity and returns the original strong quoted ETag
|
|
35
|
+
as `expectedVersion`. It rejects absent/weak ETags, foreign origins and mismatched
|
|
36
|
+
IDs. Callers should bound concurrent reads and cancel them when their resource
|
|
37
|
+
context closes. A row value, schema ETag or locally inferred URL is not a resource
|
|
38
|
+
version.
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
const contract = await firstValueFrom(bulkClient.discoverCapability(resourceResponse, operationId));
|
|
42
|
+
const session = bulkState.createSession(contract);
|
|
43
|
+
const proposal = await session.evaluate(explicitSyncRequest);
|
|
44
|
+
const preview = await firstValueFrom(bulkClient.readProposalResults(contract, proposal.proposalId));
|
|
45
|
+
// Present proposal and preview to the person; a BLOCKED proposal cannot be confirmed.
|
|
46
|
+
|
|
47
|
+
// In a separate, explicit confirmation action for a READY proposal:
|
|
48
|
+
await session.confirm(idempotencyKeyForThisIntent);
|
|
49
|
+
// On an uncertain HTTP failure, retain this session and retry with the same key.
|
|
50
|
+
// The host schedules further authorized readbacks for an accepted nonterminal execution.
|
|
51
|
+
if (!session.isTerminal()) await session.refreshExecution();
|
|
52
|
+
if (session.isTerminal()) {
|
|
53
|
+
const results = await session.readResults();
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`resourceResponse`, `operationId`, the explicit request and the key come from the
|
|
58
|
+
caller's governed selection and form flow; the client resolves operation URLs from
|
|
59
|
+
the descriptor. The caller controls when to read status again and presents each
|
|
60
|
+
authorized page of results. This example is a service integration sketch, not a
|
|
61
|
+
ready visual workflow or a deployment claim.
|
|
62
|
+
|
|
63
|
+
The backend is the authority on proposal expiry. A client clock hint must not
|
|
64
|
+
block a same-key replay after an uncertain confirmation; the backend may return
|
|
65
|
+
409 or 410 and the host must explain that state without inventing a new intent.
|
|
66
|
+
|
|
67
|
+
HTTP 202, `RUNNING`, `CANCEL_REQUESTED` and `RECONCILIATION_REQUIRED` are not
|
|
68
|
+
business success. Read the authorized execution until its reconciled terminal
|
|
69
|
+
state and use the paged result reader for each item outcome. Preserve backend
|
|
70
|
+
errors (including 409, 410, 429 and 503) for the host's governed UX mapping;
|
|
71
|
+
do not turn them into a new submission with a new key. The backend continues to
|
|
72
|
+
own authorization, policy, identity, idempotency, limits and the domain transaction.
|
|
73
|
+
The table library has a candidate visual path for a published CRUD
|
|
74
|
+
`bulk-update` capability in `UNIFORM_UPDATE` mode. It uses this client and a
|
|
75
|
+
separate review/confirmation surface; it does not add a second backend contract.
|
|
76
|
+
The service also supports typed command and per-item requests, but that table
|
|
77
|
+
surface does not advertise them. Query selection, ASYNC jobs and ATOMIC mode are
|
|
78
|
+
outside this Angular slice. This is not a claim that the reference host or full
|
|
79
|
+
backend B7 acceptance is complete.
|
|
80
|
+
|
|
7
81
|
## Governed color palettes
|
|
8
82
|
|
|
9
83
|
`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.
|
|
@@ -211,7 +285,37 @@ Peer dependencies:
|
|
|
211
285
|
|
|
212
286
|
## Theme And Icons
|
|
213
287
|
|
|
214
|
-
|
|
288
|
+
### Canonical SCSS Theming (Recommended)
|
|
289
|
+
|
|
290
|
+
Import the canonical theming mixins to bridge host design tokens (OKLCH, Material 3, Tailwind, etc.) to Praxis components:
|
|
291
|
+
|
|
292
|
+
```scss
|
|
293
|
+
@use "@angular/cdk/overlay-prebuilt.css";
|
|
294
|
+
@use "@praxisui/core/theming" as praxis;
|
|
295
|
+
|
|
296
|
+
// Option A: Bundle light theme, dark mode overrides, widget shell, and tooltip enhancements
|
|
297
|
+
@include praxis.praxis-theme-bundle();
|
|
298
|
+
|
|
299
|
+
// Option B: Granular configuration with custom design tokens
|
|
300
|
+
:root {
|
|
301
|
+
@include praxis.define-praxis-theme((
|
|
302
|
+
'primary': var(--primary),
|
|
303
|
+
'surface': var(--card),
|
|
304
|
+
'border': var(--border)
|
|
305
|
+
));
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.dark {
|
|
309
|
+
@include praxis.praxis-dark-theme-overrides();
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
@include praxis.praxis-shell-styles();
|
|
313
|
+
@include praxis.praxis-tooltip-styles();
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### Static Theme Bridge (Legacy)
|
|
317
|
+
|
|
318
|
+
For simple or static setups, you can still import the prebuilt CSS bridge directly:
|
|
215
319
|
|
|
216
320
|
```scss
|
|
217
321
|
@import "@angular/cdk/overlay-prebuilt.css";
|
|
@@ -421,6 +525,20 @@ Hosts that maintain an authored source separately from runtime state should cons
|
|
|
421
525
|
`pageChange` remains the compatibility stream for every canonical page update, including persistent
|
|
422
526
|
runtime state; transient composition projections remain excluded from both outputs.
|
|
423
527
|
|
|
528
|
+
With `autoPersist` enabled, pass a stable `pageIdentity` to scope the document and
|
|
529
|
+
listen to `persistenceChange: WidgetPagePersistenceState` for `loading`, `saving`,
|
|
530
|
+
`saved`, `resetting`, `idle` or `error`. `savedAt` is emitted only after the
|
|
531
|
+
storage confirms a save. An empty `{ widgets: [] }` document is a valid customized
|
|
532
|
+
page; absence of a stored document falls back to the host's page. The runtime
|
|
533
|
+
serializes save and reset operations for the identity so each storage call uses
|
|
534
|
+
the latest provider ETag. A 409/412 conflict blocks later writes until the host
|
|
535
|
+
explicitly calls `reloadPersistedPage(defaultPage)`, which discards the current
|
|
536
|
+
draft. `resetPersistedPage(defaultPage)` clears storage and applies the factory
|
|
537
|
+
page only after acknowledgement. `persistCurrentPage(page?)` requests an
|
|
538
|
+
explicit save or retries a recoverable save failure; callers can pass the exact
|
|
539
|
+
authored snapshot they want saved. Completion without a storage value reports
|
|
540
|
+
`errorKind: 'unacknowledged'` rather than claiming success.
|
|
541
|
+
|
|
424
542
|
Pointer drag/resize in the canvas snapshots rendered CSS Grid track sizes and gutters at gesture
|
|
425
543
|
start. Content-sized rows are not treated as uniformly sized `rowUnit` rows. Horizontal resize
|
|
426
544
|
snaps to columns; vertical resize in `autoRows: 'content'` authors the item's independent
|
|
@@ -1034,3 +1152,30 @@ Nested shells isolate their material CSS properties: an outer thick/dashed borde
|
|
|
1034
1152
|
blur does not become an inner widget's default. Intentional inheritance through
|
|
1035
1153
|
`context.ui.shell.preset/presets` remains supported. This isolation does not remove
|
|
1036
1154
|
the host's shared theme tokens.
|
|
1155
|
+
|
|
1156
|
+
## App shell: host appearance
|
|
1157
|
+
|
|
1158
|
+
`PraxisAppShellComponent` materializes the host theme for both the sidebar and
|
|
1159
|
+
header. The existing theme roles `--sidebar` (falling back to `--card`),
|
|
1160
|
+
`--surface-gradient` (falling back to `--card`), `--command-gradient`,
|
|
1161
|
+
`--sidebar-foreground`, `--sidebar-primary`, `--sidebar-accent`,
|
|
1162
|
+
`--sidebar-accent-foreground`, `--primary-deep`, `--primary-foreground`,
|
|
1163
|
+
`--accent`, `--secondary`, `--overlay`
|
|
1164
|
+
and `--shadow-panel` apply to the native chrome and brand icon. Navigation,
|
|
1165
|
+
loading and mobile behavior do not change when these colors change. Without host
|
|
1166
|
+
theme tokens, the brand uses a dark blue fallback with a white icon; custom host
|
|
1167
|
+
colors should always supply their corresponding foreground roles.
|
|
1168
|
+
|
|
1169
|
+
Semantic badges use tinted surfaces with the host's foreground. Success,
|
|
1170
|
+
warning and info consume `--praxis-success`, `--praxis-warning` and
|
|
1171
|
+
`--praxis-info`; the established `--ready`/`--warning` variables and bounded
|
|
1172
|
+
fallbacks remain available. Error consumes `--destructive`. Hosts should use
|
|
1173
|
+
these existing roles rather than overriding private shell selectors. No new
|
|
1174
|
+
shell input, saved layout field or theme-specific component is required.
|
|
1175
|
+
|
|
1176
|
+
<!-- praxis-npm-catalog-links:start -->
|
|
1177
|
+
## Official documentation and examples
|
|
1178
|
+
|
|
1179
|
+
- [Canonical technical overview: Overview](https://praxisui.dev/docs/components/praxis-core)
|
|
1180
|
+
- [Praxis Angular public catalog](https://praxisui.dev/angular)
|
|
1181
|
+
<!-- praxis-npm-catalog-links:end -->
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-
|
|
3
|
+
"generatedAt": "2026-10-13T14:47:21.726Z",
|
|
4
4
|
"packageName": "@praxisui/core",
|
|
5
|
-
"packageVersion": "
|
|
5
|
+
"packageVersion": "10.0.0-rc.10",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 4,
|
|
@@ -530,6 +530,12 @@
|
|
|
530
530
|
"required": false,
|
|
531
531
|
"description": "Emitido quando a página canônica muda por authoring ou por estado runtime persistente; projeções transitórias permanecem somente no runtime."
|
|
532
532
|
},
|
|
533
|
+
{
|
|
534
|
+
"name": "persistenceChange",
|
|
535
|
+
"type": "WidgetPagePersistenceState",
|
|
536
|
+
"required": false,
|
|
537
|
+
"description": "Estado da carga, gravação ou reset da página após resposta do storage, incluindo customized, savedAt e falhas de conflito ou ausência de confirmação."
|
|
538
|
+
},
|
|
533
539
|
{
|
|
534
540
|
"name": "pageAuthoringChange",
|
|
535
541
|
"type": "WidgetPageDefinition",
|
|
@@ -1414,7 +1420,8 @@
|
|
|
1414
1420
|
"valueKind": "enum",
|
|
1415
1421
|
"allowedValues": [
|
|
1416
1422
|
"block",
|
|
1417
|
-
"swap"
|
|
1423
|
+
"swap",
|
|
1424
|
+
"push-down"
|
|
1418
1425
|
],
|
|
1419
1426
|
"description": "Politica de colisao do canvas espacial."
|
|
1420
1427
|
},
|
|
@@ -3085,9 +3092,9 @@
|
|
|
3085
3092
|
{
|
|
3086
3093
|
"chunkIndex": 0,
|
|
3087
3094
|
"chunkKind": "summary",
|
|
3088
|
-
"content": "Component ID: praxis-dynamic-page\nSelector: praxis-dynamic-page\nFriendly Name: Dynamic Page\nDescription: Página dinâmica com widgets e composition.links em layout responsivo, incluindo mediação runtime para rich-content hospedado.\nCategory: page\nLib/Package: @praxisui/core\nTags: widget, page, dynamic, layout\nInputs:\n - page (WidgetPageDefinition)\n - context (Record<string, any>)\n - strictValidation (boolean)\n - enableCustomization (boolean)\n - authoringCapabilities (WidgetPageAuthoringCapabilities)\n - showPageSettingsButton (boolean)\n - shellEditorComponent (Type<any>)\n - pageEditorComponent (Type<any>)\n - autoPersist (boolean)\n - pageIdentity (PageIdentity)\n - componentInstanceId (string)\nOutputs:\n - pageChange (WidgetPageDefinition)\n - pageAuthoringChange (WidgetPageDefinition)\n - widgetEvent (WidgetEventEnvelope)\n - widgetDiagnosticsChange (Record<string, WidgetResolutionDiagnostic>)\n",
|
|
3095
|
+
"content": "Component ID: praxis-dynamic-page\nSelector: praxis-dynamic-page\nFriendly Name: Dynamic Page\nDescription: Página dinâmica com widgets e composition.links em layout responsivo, incluindo mediação runtime para rich-content hospedado.\nCategory: page\nLib/Package: @praxisui/core\nTags: widget, page, dynamic, layout\nInputs:\n - page (WidgetPageDefinition)\n - context (Record<string, any>)\n - strictValidation (boolean)\n - enableCustomization (boolean)\n - authoringCapabilities (WidgetPageAuthoringCapabilities)\n - showPageSettingsButton (boolean)\n - shellEditorComponent (Type<any>)\n - pageEditorComponent (Type<any>)\n - autoPersist (boolean)\n - pageIdentity (PageIdentity)\n - componentInstanceId (string)\nOutputs:\n - pageChange (WidgetPageDefinition)\n - persistenceChange (WidgetPagePersistenceState)\n - pageAuthoringChange (WidgetPageDefinition)\n - widgetEvent (WidgetEventEnvelope)\n - widgetDiagnosticsChange (Record<string, WidgetResolutionDiagnostic>)\n",
|
|
3089
3096
|
"sourcePointer": "projects/praxis-core/src/lib/widgets/dynamic-widget-page.metadata.ts",
|
|
3090
|
-
"contentHash": "
|
|
3097
|
+
"contentHash": "d16589daf72efcc199d385b1147bf0764f30a33343d9fe16486fdc2836a15d78",
|
|
3091
3098
|
"sourceKind": "component_definition",
|
|
3092
3099
|
"sourceId": "praxis-dynamic-page",
|
|
3093
3100
|
"corpusVersion": "1.0.0"
|