@praxisui/core 9.0.0-beta.9 → 9.0.0-rc.1
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 +110 -1
- package/ai/component-registry.json +4342 -0
- package/fesm2022/praxisui-core.mjs +6763 -1159
- package/package.json +19 -12
- package/theme-bridge.css +11 -0
- package/types/praxisui-core.d.ts +1521 -104
package/README.md
CHANGED
|
@@ -58,6 +58,95 @@ export class IconsComponent {}
|
|
|
58
58
|
|
|
59
59
|
Hosts should load the icon fonts they use. Without the classic Material Icons font, ligature names such as `clear` can render as visible text.
|
|
60
60
|
|
|
61
|
+
Use `PraxisIconButtonComponent` for icon-only actions. It keeps the native
|
|
62
|
+
`button` contract, centers the glyph, and preserves a 44px pointer target even
|
|
63
|
+
when the visible surface is compact. It accepts the same `mi:`, `mso:`, `msr:`
|
|
64
|
+
and `mss:` icon-family prefixes as `PraxisIconDirective`; unprefixed names keep
|
|
65
|
+
the legacy Material Icons behavior.
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
import { Component, signal } from '@angular/core';
|
|
69
|
+
import { PraxisIconButtonComponent } from '@praxisui/core';
|
|
70
|
+
|
|
71
|
+
@Component({
|
|
72
|
+
imports: [PraxisIconButtonComponent],
|
|
73
|
+
template: `
|
|
74
|
+
<button
|
|
75
|
+
type="button"
|
|
76
|
+
[praxisIconButton]="'mic'"
|
|
77
|
+
size="compact"
|
|
78
|
+
[pressed]="isListening()"
|
|
79
|
+
aria-label="Ditar pedido"
|
|
80
|
+
></button>
|
|
81
|
+
`,
|
|
82
|
+
})
|
|
83
|
+
export class ComposerActionsComponent {
|
|
84
|
+
readonly isListening = signal(false);
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Public inputs:
|
|
89
|
+
|
|
90
|
+
| Input | Values | Default | Purpose |
|
|
91
|
+
| --- | --- | --- | --- |
|
|
92
|
+
| `praxisIconButton` | icon name or canonical family-prefixed icon | required | Glyph materialized inside the button |
|
|
93
|
+
| `size` | `dense`, `compact`, `standard` | `standard` | Governed target, visible surface and glyph density |
|
|
94
|
+
| `appearance` | `plain`, `filled` | `plain` | Transparent or emphasized action surface |
|
|
95
|
+
| `presentation` | `icon`, `projected` | `icon` | Uses the named glyph or host-projected governed presentation |
|
|
96
|
+
| `pressed` | `true`, `false`, `null` | `null` | Persistent toggle/listening state and native `aria-pressed`; `null` omits the attribute |
|
|
97
|
+
| `busy` | boolean | `false` | Replaces the glyph with the canonical progress indicator and publishes `aria-busy` |
|
|
98
|
+
|
|
99
|
+
The component defaults the native host to `type="button"`; an explicit host
|
|
100
|
+
attribute still documents intent and prevents accidental form submission in
|
|
101
|
+
templates that are later refactored. Every icon-only action must have an
|
|
102
|
+
accessible name, normally `aria-label`, supplied by the host or its i18n layer.
|
|
103
|
+
The consumer remains responsible for `[disabled]` while busy when repeated
|
|
104
|
+
activation must be blocked.
|
|
105
|
+
Use `presentation="projected"` when an icon-only action is presented by a
|
|
106
|
+
governed component such as `PraxisRichContent`; the canonical button continues
|
|
107
|
+
to own interaction geometry while the projected renderer owns content semantics.
|
|
108
|
+
|
|
109
|
+
The component owns target, surface and glyph alignment. Consumers may set
|
|
110
|
+
`--praxis-icon-button-filled-background` and
|
|
111
|
+
`--praxis-icon-button-filled-foreground` to materialize a governed semantic
|
|
112
|
+
tone, but should not override the target, surface or icon size variables.
|
|
113
|
+
Hosts must load the font family selected by the icon prefix and provide the
|
|
114
|
+
Praxis Material 3 semantic color tokens.
|
|
115
|
+
|
|
116
|
+
Governed density matrix:
|
|
117
|
+
|
|
118
|
+
| Size | Pointer target | Visible surface | Glyph | Intended use |
|
|
119
|
+
| --- | ---: | ---: | ---: | --- |
|
|
120
|
+
| `standard` | 44px | 40px | 22px | Primary and standalone icon actions |
|
|
121
|
+
| `compact` | 44px | 36px | 20px | Composers, headers and frequent application actions |
|
|
122
|
+
| `dense` | 36px | 32px | 18px | Secondary actions inside constrained editorial toolbars |
|
|
123
|
+
|
|
124
|
+
On coarse pointers, `dense` automatically restores a 44px pointer target while
|
|
125
|
+
keeping its 32px visible surface. Do not use `dense` for a primary action, an
|
|
126
|
+
isolated destructive action, pagination, or a control that must remain easy to
|
|
127
|
+
acquire under operational pressure. Density changes presentation only; it must
|
|
128
|
+
not encode authorization, importance or business state.
|
|
129
|
+
|
|
130
|
+
Migration from `mat-icon-button` should remove local MDC/Material internal
|
|
131
|
+
variables and local width, height, padding or icon-margin fixes. Keep
|
|
132
|
+
domain-specific state, labels and action authorization in the owning component;
|
|
133
|
+
the Core primitive owns presentation and native interaction only.
|
|
134
|
+
|
|
135
|
+
### Semantic theme surfaces
|
|
136
|
+
|
|
137
|
+
`PraxisThemeSurfaceTokens` is the public semantic bridge for runtime surfaces. It deliberately avoids Material or MDC selectors, so a host can theme Praxis overlays, borders and focus states without patching component internals.
|
|
138
|
+
|
|
139
|
+
```ts
|
|
140
|
+
import { buildPraxisThemeSurfaceCss } from '@praxisui/core';
|
|
141
|
+
|
|
142
|
+
const themeCss = buildPraxisThemeSurfaceCss({
|
|
143
|
+
surfaceOverlay: 'var(--app-overlay-surface)',
|
|
144
|
+
focusOutline: 'var(--app-focus-ring)',
|
|
145
|
+
});
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Apply the generated variables in the host stylesheet or define the `--praxis-theme-*` variables directly. Runtime libraries consume these roles with Material-token fallbacks while their existing component-specific tokens remain supported.
|
|
149
|
+
|
|
61
150
|
## Component Metadata
|
|
62
151
|
|
|
63
152
|
`ComponentMetadataRegistry` is the shared registry used by builders and runtime loaders to resolve component metadata.
|
|
@@ -121,6 +210,13 @@ Use `page.composition.links` for persisted wiring. `page.connections` is legacy/
|
|
|
121
210
|
|
|
122
211
|
If the problem is URL or HTTP execution, start with `resourcePath`. If the problem is semantic discovery, surface/action context, or stable runtime identity, start with `resourceKey`.
|
|
123
212
|
|
|
213
|
+
`ResourceCapabilitySnapshot.canonicalOperations` preserves structural support only.
|
|
214
|
+
`operations` carries the current operation contract and availability for CRUD, query,
|
|
215
|
+
options, stats, and export. The core keeps unknown operation IDs for forward compatibility;
|
|
216
|
+
it must not infer authorization from a `canonicalOperations` boolean or discard denial metadata.
|
|
217
|
+
|
|
218
|
+
`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.
|
|
219
|
+
|
|
124
220
|
## Schema And Metadata
|
|
125
221
|
|
|
126
222
|
Core exports schema and metadata infrastructure used by form, table, list, chart, CRUD, and page-builder packages:
|
|
@@ -132,10 +228,16 @@ Core exports schema and metadata infrastructure used by form, table, list, chart
|
|
|
132
228
|
- `x-ui.optionSource` models and serializers
|
|
133
229
|
- `x-ui.analytics` models and `AnalyticsSchemaContractService`
|
|
134
230
|
- `valuePresentation` models and resolver
|
|
231
|
+
- `FieldPresentationConfig` for semantic read-only/list/table-cell presentation
|
|
135
232
|
- form layout item models
|
|
136
233
|
- JSON Logic models and runtime service
|
|
137
234
|
|
|
235
|
+
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.
|
|
236
|
+
|
|
138
237
|
`valuePresentation` is the shared display contract for scalar read-only values such as currency, number, date, datetime, time, percentage, and boolean.
|
|
238
|
+
`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.
|
|
239
|
+
|
|
240
|
+
`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.
|
|
139
241
|
|
|
140
242
|
## Global Actions
|
|
141
243
|
|
|
@@ -177,6 +279,12 @@ Without an HTTP provider, local CSV/JSON export uses loaded items. With the HTTP
|
|
|
177
279
|
|
|
178
280
|
Core also exports shared AI authoring types, capability types, dynamic-page context packs, and domain catalog context packs used by component packages.
|
|
179
281
|
|
|
282
|
+
## Component Config Authoring
|
|
283
|
+
|
|
284
|
+
`DynamicWidgetPageComponent` treats the editor declared by `ComponentDocMeta.configEditor` as the canonical authoring surface for the **Configurar conteúdo** action. When the Settings Panel bridge is available, the host resolves any transient `contextResolver` evidence and opens that metadata-owned editor even if the live widget also exposes an internal settings shortcut. This keeps the action deterministic across widget loading states.
|
|
285
|
+
|
|
286
|
+
Widget-local settings dispatch remains only a fallback when the canonical Settings Panel/editor is unavailable. Transient context and diagnostics are passed separately to the editor and must not be copied into persisted `definition.inputs`; the editor result owns the persisted `{ inputs }` round-trip.
|
|
287
|
+
|
|
180
288
|
## Domain Governance
|
|
181
289
|
|
|
182
290
|
`DomainKnowledgeService` and `DomainRuleService` are shared clients for governed semantic decision flows exposed by `praxis-config-starter`. Runtime surfaces should treat materializations as derived projections of backend-governed decisions, not as frontend-owned business rules.
|
|
@@ -186,11 +294,12 @@ Core also exports shared AI authoring types, capability types, dynamic-page cont
|
|
|
186
294
|
Core exports:
|
|
187
295
|
|
|
188
296
|
- shared services such as `GenericCrudService`, `GlobalConfigService`, `GlobalActionService`, `ResourceDiscoveryService`, `ComponentMetadataRegistry`, `PraxisJsonLogicService`, `LoadingOrchestratorService`
|
|
297
|
+
- governed submit-error normalization through `ErrorMessageService`, preserving public `code`, `target`, `category`, and safe messages while keeping transport details out of UI fallbacks
|
|
189
298
|
- tokens and providers for API URLs, global config, global actions, loading, i18n, settings panel bridge, surface drawer bridge, collection export, field selector registry, and overlay/layer scale
|
|
190
299
|
- 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
|
|
191
300
|
- helpers for schema ids, ETag fetch, field mapping, config merge, validation, IDs, inline filter controls, global action refs, and form hooks
|
|
192
301
|
- dynamic widget/page runtime components and metadata
|
|
193
|
-
- UI helpers such as icon picker, empty state card, resource quick connect, schema viewer, and `
|
|
302
|
+
- UI helpers such as icon picker, empty state card, resource quick connect, schema viewer, `PraxisIconDirective`, and `PraxisIconButtonComponent`
|
|
194
303
|
|
|
195
304
|
See the package `public-api.ts` for the full export list.
|
|
196
305
|
|