@praxisui/page-builder
Visual page and dashboard builder for Praxis UI applications.
Use this package when an application must let users compose governed operational pages from registered widgets, visual layout, shell settings, component editors, composition.links, and optional AI-assisted authoring.
Widget shell editor integrity
The shell editor exposes Keep header visible while scrolling the page
(widget.shell.stickyHeader). It retains the current title/subtitle rather than
copying record state into the host. Apply/save/reopen/reset use the same shell
document and the existing identity-authoring capability governs the option.
Pinning is visible in presentation mode, not while dragging/editing the canvas;
hidden headers, collapsed/overlay widgets and scroll recovery retain their own
behavior. Hosts with a fixed heading provide the Core CSS length
--pdx-shell-sticky-header-offset. The default remains normal flow.
The page editor keeps Material tab pagination/keyboard navigation with wrapped labels
for narrow panels. Its configuration summary is progressively disclosed; when hosted
in Settings Panel it does not repeat the shell's title, reset action or dirty status.
The selected widget/layout remains visible while scrolling the limits inspector.
Rendered-height diagnostics appear at the visible height field only; diagnostics for
another target or a hidden height field remain in the section summary. The validity
and apply/save protocol are unchanged.
Dynamic Page height validation follows viewport resize and Angular render completion
while the editor remains open. It reuses the runtime's transient validator and updates
the existing field diagnostics/Apply/Save gates only when the diagnostic changes.
The entered height and dirty baseline are preserved; rendered measurements never become
constraints or persisted page fields. Final value production also revalidates, so a late
failure must remain an invalid, open draft in Settings Panel.
This validates the active rendered geometry, not all possible devices, virtualized
contents or future CSS-only changes without a render/resize notification.
The shell editor validates non-empty appearance overrides with the browser CSS parser for
their actual property: backgrounds, colors, radius, shadow, padding and typography. Empty
overrides remain valid; tokens, gradients and CSS expressions are preserved, not resolved
into host-specific values. Invalid editable values block Apply/Save and the settings-value
provider. Hidden appearance fields in permission-limited editors remain preserved.
This is browser syntax validation, not URL sanitization, token-resolution verification or
backend authorization. SSR has no interactive CSS parser and defers this check to the browser.
Existing accepted JSON paths and the AI authoring manifest remain unchanged.
The appearance/action editor adapts to narrow panels, and validation messages reserve their
own space. The archetype lab now exposes a local edit toggle at narrow breakpoints, where
the demo's global toggle is hidden. This is a tested entrypoint, not full mobile certification.
Read the
lab certification record
for the exact tested scope and remaining corporate gates.
Direct canvas manipulation
The builder consumes the shared Core canvas: select a widget to expose eight direct resize
grips, drag its header to move it, or use the focused grip's arrow keys to change size.
The global widget selector/directional controls are collapsed as an alternative. The
contextual Resize widget action retains larger 44px controls. These access paths share
one geometry, constraints, collision, preview and cancellation implementation; they add no
Page Builder settings, persistence flags or AI operations. widget.moveResize continues
to address the existing canonical canvas.items document.
Manual resize now previews coordinated space redistribution in Core, with green
availability, amber minimum-size feedback and red exceeded-limit feedback on the
affected widgets. Release commits the valid distribution atomically; Escape cancels
all affected items. This is not automatic repacking or a new AI operation. Explicit
content-aware minimums remain important, including in restored layouts; changing a
recipe does not silently rewrite a saved user page. Auto-content rows still do not
provide pixel-continuous vertical shrinking of a one-row widget.
Device composition
Page settings → Responsiveness opens on Mobile and shows one device at a time.
Stack widgets prepares a single-column variant in the base canvas's visual reading
order, with natural content height. It replaces positions and width bounds only for
that device, preserves hidden widgets and other overrides, and leaves the base and
other device layouts unchanged. Apply/Save materializes the existing
deviceLayouts[device].canvas contract; Reset restores the original draft.
Advanced JSON overrides remain available under Advanced overrides.
Reducing a device's column count also reflows inherited base positions in Core.
Explicit device positions remain authoritative. With no device variant the base
canvas is still inherited; the editor does not silently apply a mobile template.
Grouping settings are preserved for flow layouts; canvas geometry currently takes
precedence over grouping. The editor explains this distinction in the Grouping tab.
Visual widget limits
Open Page settings → Widget limits in the default Dynamic Page editor to set
minimum/maximum width (columns) and height (rows). Choose the base canvas or a
desktop, tablet or mobile override, without closing the editor. Blank base fields use Core defaults (minimum one,
maximum grid width/unbounded row span); blank device fields inherit base limits.
An untouched device target does not create an override in the document. Validation
uses the final draft, including device layouts created in Responsiveness during the same session.
The editor writes existing canvas.items[key].constraints and
deviceLayouts[device].canvas.items[key].constraints, preserving locks, geometry,
unknown fields and untouched overrides. It rejects non-positive/non-integer
values, reversed or inherited conflicting ranges, minimums wider than the grid,
and newly authored limits that would change the current effective size. Existing
documents already clamped by Core remain valid on opening: declared spans need
not equal rendered spans. Invalid inherited bounds can be corrected in the same
draft. The editor does not rewrite geometry to satisfy newly authored bounds.
Dynamic title expressions are
identified by stable widget key, not evaluated in the editor.
Apply previews the same document returned by Save; Reset reloads the input baseline.
Pending changes are tracked independently of validity, including edits to an
already-invalid input document. Invalid limit fields expose Material errors and
accessible invalid/described-by state; correcting them clears their error state.
Closing after Apply may ask to discard the unsaved editor draft: the applied
preview remains active, as the shared Settings Panel explicitly explains.
Remote user/tenant persistence is unchanged. In autoRows: 'content', the same editor
also exposes Default / Automatic / Adjustable height, pixel height, top inset,
and pixel minimum/maximum. It writes Core canvas.items[key].contentSize and its
device override, plus constraints.minHeightPx/maxHeightPx. Default removes an
override, Automatic writes 'auto' (including when base height is bounded), and
Adjustable writes { heightPx, offsetTopPx }. Minimum height is 160px; invalid
sizes/inherited ranges block Apply/Save with a field error. No child inputs are changed.
North grips preserve the bottom through the inset; Automatic clears both dimensions.
The 160px editor floor measures the outer box, not usable body space. Core resize
gestures also protect the rendered header and a body reserve. When opened by Dynamic
Page, the editor receives transient runtime validation through SETTINGS_PANEL_DATA:
Apply/Save and reopen check the current active-device geometry and report the minimum
beside the height field. The callback and observed dimensions never enter the document.
Changed columns, gap, width or shell styling require Automatic height, Apply, then
reopening before choosing a measured height. Other device variants must be checked
on their corresponding device. Standalone/custom hosts without this runtime context
retain numeric validation only. Core's scroll-layout shell now recovers access after
late header/content growth by temporarily scrolling the header and body together
inside the unchanged box. Normal body-only scrolling returns when space recovers.
That runtime safeguard does not approve an insufficient editor height, write measured
constraints, or certify every device/child component's usable-height ergonomics.
The AI manifest was reviewed: canvas.configure.items and widget.add.canvasItem
do not currently provide a concrete nested schema proving these new pixel fields.
This cut certifies manual runtime/editor behavior only, not agentic height authoring.
Do not infer AI support from broad affected paths. Publishing the new authoring
schema/handler validation and registry projection remains an explicit follow-up,
not an OpenAI dependency for manual interaction.
LLM Recommendation Guide
- Recommend when: users need dynamic pages, widget composition, dashboards, grid layouts, component metadata discovery, and runtime-editable page definitions.
- Avoid when: for a fixed marketing page or static Angular layout with no runtime widget composition.
- Pair with: @praxisui/core plus component packages such as table, dynamic-form, charts, rich-content, list, tabs, and stepper.
Official Links
Install
npm i @praxisui/page-builder@rc
Peer dependencies:
@angular/common, @angular/core, @angular/forms, @angular/cdk, @angular/material ^21.0.0
@praxisui/ai, @praxisui/core, @praxisui/settings-panel ^9.0.0-beta.12
rxjs ~7.8.0
Quick Start
import { Component } from '@angular/core';
import { DynamicPageBuilderComponent } from '@praxisui/page-builder';
import { WidgetPageDefinition } from '@praxisui/core';
@Component({
standalone: true,
selector: 'app-page-authoring',
imports: [DynamicPageBuilderComponent],
template: `
<praxis-dynamic-page-builder
[page]="page"
[enableCustomization]="true"
(pageAuthoringChange)="page = $event"
(pageSaveRequested)="save($event)">
</praxis-dynamic-page-builder>
`,
})
export class PageAuthoringComponent {
page: WidgetPageDefinition = {
id: 'operations-dashboard',
title: 'Operations Dashboard',
widgets: [],
composition: { links: [] },
};
save(page: WidgetPageDefinition): void {
this.page = page;
}
}
The persisted document remains WidgetPageDefinition from @praxisui/core. Page Builder edits that canonical document; it does not introduce a separate page DSL.
For a page created by governed AI authoring, reopen the complete
ConfigDocument<WidgetPageDefinition> returned by
ApiConfigStorage.loadConfigDocument() and bind it through
[authoringDocument]. This preserves payload, strong ETag and the server-attested
UiCompositionPlan in one revision. The builder verifies both canonical hashes
before using the plan as semantic context for another turn; a stale or tampered
source fails closed.
Runtime Contract
praxis-dynamic-page-builder accepts:
page: WidgetPageDefinition | string
authoringDocument: canonical Config response containing payload, ETag and optional semantic source; takes precedence over page
context: runtime context shared with widgets and composition links
enableCustomization: enables builder and child authoring affordances; when false, the same
runtime remains mounted in presentation mode without editing chrome
authoringCapabilities: optional host-only PageBuilderAuthoringCapabilities grant that limits
the authoring operations exposed by the builder while keeping the runtime mounted
pageIdentity: persistence identity used by governed config flows
componentInstanceId: stable component instance id
componentPaletteAllowedWidgetIds, componentPaletteAllowedWidgetTags, componentPaletteAllowedPresetIds
enableAgenticAuthoring, agenticAuthoringProvider, agenticAuthoringModel, agenticAuthoringScope
agenticAuthoringIncludeLlmDiagnostics, agenticAuthoringEnableStreaming, agenticAuthoringContextHints
showPageLifecycleActions, canDeleteSavedPage, pageLifecycleBusy
All omitted authoringCapabilities entries remain enabled for backward compatibility. The grant is
never written to WidgetPageDefinition and does not authorize AI operations; manifests, backend
policy, target resolution and validation remain authoritative.
childCustomization is a host grant, not a bulk enable switch. A nested component receives
enableCustomization=true only while the builder is in authoring mode, the host grant is enabled,
and that widget explicitly declares definition.inputs.enableCustomization=true. Widgets with an
absent or false authored opt-in remain presentation-only.
For example, a host that should expose only canvas and shell-identity authoring can declare:
import type { PageBuilderAuthoringCapabilities } from '@praxisui/page-builder';
readonly presentationAuthoring: PageBuilderAuthoringCapabilities = {
canvas: true,
pageSettings: false,
widgetShell: {
identity: true,
appearance: false,
actions: false,
pagePreset: false,
},
widgetInputs: false,
widgetRemoval: false,
childCustomization: false,
insertWidgets: false,
connections: false,
save: false,
preview: true,
agentic: false,
pageLifecycle: false,
};
Bind the grant with [authoringCapabilities]="presentationAuthoring". Use
[enableCustomization]="false" when no authoring affordance should be exposed at all.
It emits:
pageChange: every canonical WidgetPageDefinition update, including persistent runtime state
pageAuthoringChange: explicit visual authoring updates only; use this when the host keeps source/draft separate from runtime state
widgetEvent: runtime widget event envelope
pageSaveRequested: save intent for the current page
agenticAuthoringApplied: AI preview/apply result
agenticAuthoringSharedRuleHandoff: governed shared-rule continuation handoff
pageRestart, savedPageDeleteRequested
Do not use Angular two-way binding [(page)] for an authoring draft unless the
host intentionally wants runtime state to become part of that draft.
pageChange includes runtime composition updates. Bind [page] and feed only
pageAuthoringChange back into the source document when persisted authoring and
runtime projections must remain separate.
Governed page persistence
Page Builder owns the authoring lifecycle but the host owns persistence. Keep
WidgetPageDefinition as the saved payload, derive a stable key from
pageIdentity plus componentInstanceId, and handle pageSaveRequested,
pageRestart, and savedPageDeleteRequested against the canonical
/api/praxis/config/ui boundary.
Use ApiConfigStorage from @praxisui/core when the host adopts that boundary.
It maps dynamic-page:* keys to componentType=praxis-dynamic-page, reuses a
weak response-header validator for If-None-Match, and preserves the strong
etag returned in the response body for If-Match. A stale save or delete
propagates 412 Precondition Failed; the host must preserve the draft and offer
a reload/reconcile action instead of overwriting the newer document.
autoPersist stays disabled inside Page Builder because an emitted save intent
is not equivalent to backend acknowledgement. After a confirmed restart,
reopen, or delete, increment pageLifecycleResetRevision so pending agentic
preview/session state is discarded together with the old draft.
Composition Links
Widget wiring is stored in page.composition.links.