@praxisui/core 9.0.65 → 9.0.67
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 +173 -0
- package/ai/component-registry.json +22 -21
- package/fesm2022/praxisui-core.mjs +1877 -292
- package/package.json +1 -1
- package/theme-bridge.css +9 -0
- package/types/praxisui-core.d.ts +312 -15
package/README.md
CHANGED
|
@@ -4,8 +4,119 @@ 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 color palettes
|
|
8
|
+
|
|
9
|
+
`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
|
+
|
|
11
|
+
`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
|
+
|
|
7
13
|
## LLM Recommendation Guide
|
|
8
14
|
|
|
15
|
+
- `WidgetShellConfig.stickyHeader: true` retains the existing composition-derived
|
|
16
|
+
header within its widget during page scrolling. Omission/false keeps normal flow.
|
|
17
|
+
This differs from `bodyLayout: 'scroll'`, which governs body scrolling. No second
|
|
18
|
+
selection state, cloned header or page geometry is persisted.
|
|
19
|
+
- Hosts with fixed chrome may set `--pdx-shell-sticky-header-offset` (CSS length,
|
|
20
|
+
default `0px`). Measure responsive chrome; do not assume a desktop-only height.
|
|
21
|
+
The lab uses a lifecycle-owned ResizeObserver for its functional heading.
|
|
22
|
+
- Pinning releases at the widget boundary and is suspended during drag authoring,
|
|
23
|
+
collapse, hidden/disabled headers, expanded/fullscreen windows and scroll recovery.
|
|
24
|
+
This is not a global selected-record bar. Transparent/gradient header appearances
|
|
25
|
+
are painted over an opaque Material surface so data does not bleed through.
|
|
26
|
+
Keyboard focus is revealed below pinned chrome without changing its target.
|
|
27
|
+
- Nested sticky shells add the measured height of sticky ancestor headers in the
|
|
28
|
+
same scrollport. This is transient geometry, not a saved offset or another
|
|
29
|
+
selection context. The stack stops at an independent scrolling container;
|
|
30
|
+
hidden/inactive headers cease contributing. Ancestor resize observation is
|
|
31
|
+
disconnected on destruction. Body scrolling/fill and window-layout rules apply
|
|
32
|
+
to the owning shell's direct body, not to every nested widget body.
|
|
33
|
+
- An invisible shell (`kind: 'none'`) removes padding only from its own body.
|
|
34
|
+
Nested dashboard shells retain their authored body spacing. Hiding a header
|
|
35
|
+
with `showHeader: false` does not hide child headers or reset child spacing.
|
|
36
|
+
- The Page Builder shell editor exposes the option. Existing saved layouts are
|
|
37
|
+
preserved; changing the source recipe does not silently migrate saved pages.
|
|
38
|
+
|
|
39
|
+
- Coordinated manual resize: an unambiguous edge collision yields space from the
|
|
40
|
+
affected neighbors, preserving their opposite edges and respecting `minColSpan`,
|
|
41
|
+
`minRowSpan`, `lockSize` and `lockPosition`. It does not swap widgets or push a
|
|
42
|
+
chain of unrelated items. Diagonal/corner collisions with no unambiguous yielding
|
|
43
|
+
axis fail closed. Drag still uses the authored `block`/`swap` collision policy.
|
|
44
|
+
The actual widgets preview the valid distribution: green means available, amber
|
|
45
|
+
means minimum reached, red means the requested resize exceeds available space.
|
|
46
|
+
Icons, localized labels and live announcements accompany colors. Pointer release
|
|
47
|
+
applies the clamped distribution in one authoring event; Escape/cancel/capture loss
|
|
48
|
+
discards the entire preview. Feedback is transient, never serialized.
|
|
49
|
+
Author useful content-specific minimums and device overrides: the grid default of
|
|
50
|
+
one unit is a geometric limit, not a guarantee of readable enterprise content.
|
|
51
|
+
`autoRows: 'content'` measures content-driven tracks and uses independent pixel
|
|
52
|
+
`contentSize` for vertical resizing; `rowSpan` remains at least one. Resizing does not
|
|
53
|
+
imply automatic packing or moving unrelated widgets to a new row.
|
|
54
|
+
|
|
55
|
+
- Widget Shell sizing: the shell includes its border inside the height reserved by its
|
|
56
|
+
host (`border-box`). Consumers do not need a global CSS reset to prevent a 2px overflow.
|
|
57
|
+
In a content-sized canvas, collapsing every tall widget in a shared row lets the next
|
|
58
|
+
row move upward; an expanded sibling still determines the shared row height. This is
|
|
59
|
+
CSS Grid reflow, not automatic compaction of authored fixed coordinates.
|
|
60
|
+
|
|
61
|
+
- Dynamic Page resize presentation: selecting an unlocked widget in an editable grid
|
|
62
|
+
exposes eight edge/corner grips with 24px targets, themed focus and localized names.
|
|
63
|
+
The widget wrapper is keyboard focusable: focus selects it, Tab reaches its controls,
|
|
64
|
+
arrow keys resize, and Escape from a grip returns focus to the wrapper. Selection alone
|
|
65
|
+
does not change the document. Header drag remains the reorder entrypoint.
|
|
66
|
+
|
|
67
|
+
**More actions → Size…** offers width in grid columns and height in rows (fixed grid)
|
|
68
|
+
or pixels (content rows). An optional fixed-corner choice preserves the opposite edges.
|
|
69
|
+
Valid changes preview the same constrained distribution as the grips; Apply commits once,
|
|
70
|
+
Cancel/Escape discard the preview and restore widget focus. Out-of-range or blocked sizes
|
|
71
|
+
disable Apply rather than silently changing the requested numbers. The dialog identifies
|
|
72
|
+
whether the edit targets the base layout or a device override. Opening it preserves
|
|
73
|
+
automatic height; changing only width does not create a fixed height.
|
|
74
|
+
|
|
75
|
+
This menu is available with canvas authoring permission, including headerless widgets
|
|
76
|
+
and hosts that disable removal or shell configuration. Size-locked widgets disable it.
|
|
77
|
+
There is no dedicated Resize widget icon, global selector or detached directional panel.
|
|
78
|
+
The size action is transient and never persisted in page JSON. Shell actions can explicitly
|
|
79
|
+
use `placement: 'menu'` to stay in More actions even when header slots are free; the shell
|
|
80
|
+
editor and capability catalog share that value. Existing header/window placements retain
|
|
81
|
+
their behavior. All sizing reuses canonical canvas items, constraints and device targeting.
|
|
82
|
+
The editor offers exact grid-width presets (⅓, ½, ⅔, 100%) when the column count
|
|
83
|
+
can represent them without rounding. They change the width draft, preserve the fixed
|
|
84
|
+
corner and require Apply; an unavailable full width is rejected, never silently clamped.
|
|
85
|
+
After a committed resize, reopen Size… on that widget to undo the last resize in this
|
|
86
|
+
session, including yielded neighbors. Recovery restores prior device inheritance and
|
|
87
|
+
keeps unrelated content edits. It refuses changed affected geometry/limits, new collisions,
|
|
88
|
+
a different device scope or page identity. This is one-operation recovery, not a general
|
|
89
|
+
history or redo stack. Double-click shortcuts remain a usability-study hypothesis.
|
|
90
|
+
|
|
91
|
+
- Dynamic Page gesture note: drag/resize previews belong to one primary pointer at a time.
|
|
92
|
+
Secondary buttons, non-primary touches and additional pointers do not replace an active
|
|
93
|
+
gesture. Cancellation or lost capture discards only transient canvas geometry, never a
|
|
94
|
+
snapshot of the whole page. External page/context/identity or authoring-mode changes cancel
|
|
95
|
+
the current gesture; a late pointerup cannot commit it. The same cleanup runs on destruction.
|
|
96
|
+
Cancellation is announced through `dynamicWidgetPage` in pt-BR/en-US, not as a collision.
|
|
97
|
+
This does not certify physical touch ergonomics or fixed-grid compaction.
|
|
98
|
+
No additional persisted layout or shell setting is required.
|
|
99
|
+
|
|
100
|
+
- Widget Shell header note: identity and actions wrap according to the available card width,
|
|
101
|
+
including narrow cards inside wide canvases. Titles/subtitles retain up to two visible lines
|
|
102
|
+
and expose their complete localized content through Material tooltips. Icon action targets
|
|
103
|
+
remain 44px; resize affordances are a separate canvas concern. Existing `disabled` actions
|
|
104
|
+
stay disabled in overflow menus and cannot dispatch through the shell handler. This is UI
|
|
105
|
+
state enforcement, not backend authorization. No additional shell JSON field is required.
|
|
106
|
+
|
|
107
|
+
- Widget Shell overlay note: expanded/fullscreen shells place the authored appearance over
|
|
108
|
+
an opaque backing from the existing Material surface token. Transparent inline shells
|
|
109
|
+
therefore remain transparent inline without exposing the obscured page through fullscreen.
|
|
110
|
+
The active overlay is programmatically focusable (`tabindex="-1"`), so blank-area clicks
|
|
111
|
+
retain a shell keyboard target without adding a sequential Tab stop. Escape received inside
|
|
112
|
+
the shell closes the overlay and restores its opening button when still connected.
|
|
113
|
+
Closing is deferred until event propagation completes: a child overlay that prevents the
|
|
114
|
+
default Escape action, including a Material select handled by the CDK body dispatcher,
|
|
115
|
+
keeps priority. The first Escape closes that select; the next closes the shell.
|
|
116
|
+
Deferred handling is ignored after shell destruction. These are presentation
|
|
117
|
+
changes only and do not rewrite saved shell appearance or canvas coordinates.
|
|
118
|
+
This is not a full modal accessibility or fixed-grid collapse/reflow certificate.
|
|
119
|
+
|
|
9
120
|
- Recommend when: use it as the first dependency for shared Praxis UI contracts, metadata models, resource discovery, global actions, i18n, theme bridge, and dynamic widget runtime primitives.
|
|
10
121
|
- Avoid when: a consuming app wants to redefine contracts owned by core, metadata starter, config starter, or component packages.
|
|
11
122
|
- Pair with: Every runtime package in the @praxisui/\* family.
|
|
@@ -233,6 +344,62 @@ Hosts that maintain an authored source separately from runtime state should cons
|
|
|
233
344
|
`pageChange` remains the compatibility stream for every canonical page update, including persistent
|
|
234
345
|
runtime state; transient composition projections remain excluded from both outputs.
|
|
235
346
|
|
|
347
|
+
Pointer drag/resize in the canvas snapshots rendered CSS Grid track sizes and gutters at gesture
|
|
348
|
+
start. Content-sized rows are not treated as uniformly sized `rowUnit` rows. Horizontal resize
|
|
349
|
+
snaps to columns; vertical resize in `autoRows: 'content'` authors the item's independent
|
|
350
|
+
`contentSize: { heightPx, offsetTopPx? }`, while fixed rows still resize by row spans.
|
|
351
|
+
Captured DOM measurements remain private; only the resulting authored size is persisted. A gesture that leaves
|
|
352
|
+
the canonical placement unchanged does not emit an authoring update or persist the page.
|
|
353
|
+
It announces that no adjustment was applied instead of claiming a successful resize.
|
|
354
|
+
|
|
355
|
+
Content-row widgets with `contentSize` use the existing shell `bodyLayout: 'scroll'`
|
|
356
|
+
as a render projection (child inputs and authored shell are unchanged). North handles
|
|
357
|
+
preserve the bottom by changing height and top inset, and stop at the track origin.
|
|
358
|
+
South handles release occupied space. Shared rows only shrink when no other occupant
|
|
359
|
+
still needs that height. Collapsing temporarily clears size/inset; expanding restores them.
|
|
360
|
+
`constraints.minHeightPx` (floor/default 160) and `maxHeightPx` govern this mode;
|
|
361
|
+
grid `minRowSpan/maxRowSpan` remain row-occupancy constraints, not pixel limits.
|
|
362
|
+
Content-height gestures additionally protect the measured header, shell padding/borders
|
|
363
|
+
and up to 160px of scrollable body. Naturally shorter content may use less. This is
|
|
364
|
+
a structural viewport reserve, not business-component UX certification. Measurements
|
|
365
|
+
remain transient and do not overwrite authored constraints. An incompatible authored
|
|
366
|
+
maximum blocks the gesture. The page-owned settings flow also supplies a transient
|
|
367
|
+
validator through the existing Settings Panel input envelope. Apply/Save and reopen
|
|
368
|
+
check the effective active-device height against the currently rendered shell; these
|
|
369
|
+
observations never enter the page JSON. Changed columns, gap, width or shell styling
|
|
370
|
+
require Automatic height first, then applying the geometry and reopening to measure.
|
|
371
|
+
Unrendered device variants and editors opened without that runtime validator retain
|
|
372
|
+
numeric validation only. Scroll-layout shells now observe late header/content and
|
|
373
|
+
width changes. If the measured reserve no longer fits, the header temporarily joins
|
|
374
|
+
the body's outer scroll flow, keeping content reachable inside the authored box.
|
|
375
|
+
When space is sufficient again, normal body-only scrolling returns and the outer
|
|
376
|
+
scroll resets to the header. This recovery neither increases height beyond an
|
|
377
|
+
authored maximum nor writes constraints/configuration. It is suspended for collapse,
|
|
378
|
+
expanded/fullscreen overlays and non-scroll layouts. Shared private measurement
|
|
379
|
+
keeps gesture/editor checks and recovery consistent. This is an access safeguard,
|
|
380
|
+
not a guarantee that a small viewport is ergonomically adequate; virtualized/custom
|
|
381
|
+
child scroll containers still need their own proof.
|
|
382
|
+
Keyboard resize moves vertically by 16px (Shift: 32px). Omit `contentSize` to inherit
|
|
383
|
+
the base item; set `'auto'` to explicitly restore natural height in a device override.
|
|
384
|
+
Fixed-row mode retains this preference but does not materialize it. Page Builder exposes
|
|
385
|
+
these settings under **Page settings → Widget limits**. See the canvas RFC for the
|
|
386
|
+
manual-validation boundary and remaining AI-manifest publication work.
|
|
387
|
+
Own minimum/maximum and outer-grid clamping retain gesture evidence until feedback
|
|
388
|
+
is resolved, so an over-limit request is not shown as green merely because its
|
|
389
|
+
candidate was already clamped. That evidence remains transient, not page JSON.
|
|
390
|
+
During pointer resize, the selected widget's message follows the pointer in a
|
|
391
|
+
viewport-constrained CDK overlay rather than its potentially off-screen footer.
|
|
392
|
+
The pane passes through pointer hits, does not take focus, and disappears on
|
|
393
|
+
commit/cancel or authoring revocation. Neighbor badges remain attached to their
|
|
394
|
+
widgets; the existing live announcement describes the affected distribution.
|
|
395
|
+
This does not add multi-widget push/reflow or compact fixed-grid rows when a shell is collapsed.
|
|
396
|
+
|
|
397
|
+
Canvas resize exposes 24px direct grips on the selected widget, plus 44px controls in
|
|
398
|
+
the collapsed alternative group or on-demand contextual panel. All presentations reuse
|
|
399
|
+
the canonical gesture runtime and `canvas.items`. Keyboard controls and themed feedback remain available.
|
|
400
|
+
Physical-touch ergonomics and save/reopen persistence still
|
|
401
|
+
require separate proof; successful local interaction is not an enterprise certification.
|
|
402
|
+
|
|
236
403
|
Page-owned business copy can use `page.i18n` plus explicit `PraxisTextValue`
|
|
237
404
|
descriptors inside widget shells or nested widget inputs. The runtime resolves
|
|
238
405
|
those descriptors only in its render projection, so the authored and persisted
|
|
@@ -397,3 +564,9 @@ Action-bearing components must use the semantic `--praxis-action-control-*` vari
|
|
|
397
564
|
- Do not use consuming apps to redefine contracts owned by core, metadata starter, config starter, or a component package.
|
|
398
565
|
- Prefer `composition.links` for page wiring and `valuePresentation` for scalar display semantics.
|
|
399
566
|
- Use the official documentation for full recipes on schema flow, option sources, analytics, global actions, dynamic pages, and governed AI flows.
|
|
567
|
+
|
|
568
|
+
### Catálogo no quick connect e isolamento do editor de página
|
|
569
|
+
|
|
570
|
+
`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.
|
|
571
|
+
|
|
572
|
+
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.
|