@praxisui/page-builder 9.0.66 → 9.0.68-rc.0

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
@@ -6,6 +6,23 @@ Use this package when an application must let users compose governed operational
6
6
 
7
7
  ## Widget shell editor integrity
8
8
 
9
+ The shell editor exposes **Keep header visible while scrolling the page**
10
+ (`widget.shell.stickyHeader`). It retains the current title/subtitle rather than
11
+ copying record state into the host. Apply/save/reopen/reset use the same shell
12
+ document and the existing identity-authoring capability governs the option.
13
+ Pinning is visible in presentation mode, not while dragging/editing the canvas;
14
+ hidden headers, collapsed/overlay widgets and scroll recovery retain their own
15
+ behavior. Hosts with a fixed heading provide the Core CSS length
16
+ `--pdx-shell-sticky-header-offset`. The default remains normal flow.
17
+
18
+ The page editor keeps Material tab pagination/keyboard navigation with wrapped labels
19
+ for narrow panels. Its configuration summary is progressively disclosed; when hosted
20
+ in Settings Panel it does not repeat the shell's title, reset action or dirty status.
21
+ The selected widget/layout remains visible while scrolling the limits inspector.
22
+ Rendered-height diagnostics appear at the visible height field only; diagnostics for
23
+ another target or a hidden height field remain in the section summary. The validity
24
+ and apply/save protocol are unchanged.
25
+
9
26
  Dynamic Page height validation follows viewport resize and Angular render completion
10
27
  while the editor remains open. It reuses the runtime's transient validator and updates
11
28
  the existing field diagnostics/Apply/Save gates only when the diagnostic changes.
@@ -29,16 +46,13 @@ Existing accepted JSON paths and the AI authoring manifest remain unchanged.
29
46
  The appearance/action editor adapts to narrow panels, and validation messages reserve their
30
47
  own space. The archetype lab now exposes a local edit toggle at narrow breakpoints, where
31
48
  the demo's global toggle is hidden. This is a tested entrypoint, not full mobile certification.
32
- Read the
33
- [lab certification record](../../src/app/features/dynamic-page-lab/ERGON_ARCHETYPE_CERTIFICATION.md)
34
- for the exact tested scope and remaining corporate gates.
35
49
 
36
50
  ## Direct canvas manipulation
37
51
 
38
52
  The builder consumes the shared Core canvas: select a widget to expose eight direct resize
39
53
  grips, drag its header to move it, or use the focused grip's arrow keys to change size.
40
54
  The global widget selector/directional controls are collapsed as an alternative. The
41
- contextual **Resize widget** action retains larger 44px controls. These access paths share
55
+ contextual **Size** shortcut opens the **Size** tab in Widget Settings, with larger 44px directional controls. These access paths share
42
56
  one geometry, constraints, collision, preview and cancellation implementation; they add no
43
57
  Page Builder settings, persistence flags or AI operations. `widget.moveResize` continues
44
58
  to address the existing canonical `canvas.items` document.
@@ -51,6 +65,22 @@ content-aware minimums remain important, including in restored layouts; changing
51
65
  recipe does not silently rewrite a saved user page. Auto-content rows still do not
52
66
  provide pixel-continuous vertical shrinking of a one-row widget.
53
67
 
68
+ ### Device composition
69
+
70
+ **Page settings → Responsiveness** opens on Mobile and shows one device at a time.
71
+ **Stack widgets** prepares a single-column variant in the base canvas's visual reading
72
+ order, with natural content height. It replaces positions and width bounds only for
73
+ that device, preserves hidden widgets and other overrides, and leaves the base and
74
+ other device layouts unchanged. Apply/Save materializes the existing
75
+ `deviceLayouts[device].canvas` contract; Reset restores the original draft.
76
+ Advanced JSON overrides remain available under **Advanced overrides**.
77
+
78
+ Reducing a device's column count also reflows inherited base positions in Core.
79
+ Explicit device positions remain authoritative. With no device variant the base
80
+ canvas is still inherited; the editor does not silently apply a mobile template.
81
+ Grouping settings are preserved for flow layouts; canvas geometry currently takes
82
+ precedence over grouping. The editor explains this distinction in the Grouping tab.
83
+
54
84
  ### Visual widget limits
55
85
 
56
86
  Open **Page settings → Widget limits** in the default Dynamic Page editor to set
@@ -234,7 +264,7 @@ Bind the grant with `[authoringCapabilities]="presentationAuthoring"`. Use
234
264
  It emits:
235
265
 
236
266
  - `pageChange`: every canonical `WidgetPageDefinition` update, including persistent runtime state
237
- - `pageAuthoringChange`: explicit visual authoring updates only; use this when the host keeps source/draft separate from runtime state
267
+ - `pageAuthoringChange`: explicit visual authoring updates only; use this when the host keeps source/draft separate from runtime state; includes accepted native-editor `inputPatch` events, even after an equivalent legacy `configChange`
238
268
  - `widgetEvent`: runtime widget event envelope
239
269
  - `pageSaveRequested`: save intent for the current page
240
270
  - `agenticAuthoringApplied`: AI preview/apply result
@@ -300,18 +330,37 @@ Feedback cycles are validated before authoring and runtime delivery. Direct or i
300
330
 
301
331
  The visual connection editor is an authoring surface over the saved `composition.links` document. It does not create a parallel graph DSL.
302
332
 
333
+ Invalid JSON in an embedded Surface editor starts or retains the connection draft
334
+ and blocks Apply. Correcting that text still respects the other connection
335
+ diagnostics; Cancel discards the transient text without publishing a page change.
336
+
303
337
  Current capabilities include:
304
338
 
305
- - inspecting persisted links, endpoints, intent, condition, transform and policy;
339
+ - inspecting persisted links, endpoints, intent, condition, transform and policy through the on-demand **Inspector**; opening it from the toolbar, canvas, link list, **Locate**, or port catalogue brings focus to the inspector header; catalogue and inspector are mutually exclusive. Dismissal restores the initiating catalogue, selected port and connection when applicable, including its internal scroll position; Escape closes one inspection layer at a time. Other entries restore their initiating control, with the editor as fallback when a canvas target is offscreen;
340
+ - keeping the initial canvas full width, with the link list in the bottom **Links** dock; at 640px or less of stage width, or below 400px of available stage height, a scrollable component/relationship list replaces the unreadable miniature map while retaining the same inspector and port catalogue;
341
+ - reserving a scrollable area for the expanded link list on narrow screens, with its collapse control always visible; **Locate** uses the same readable endpoints as the inspector;
342
+ - naming page information directly in the inspector: **Name page information** edits the existing state description, updates its labels across connections, and supports Cancel, Undo and Redo. Endpoint paths and stored values remain intact; use the page's Save action to persist the authored name;
343
+ - selecting a node to pin theme-aware port details outside the zoom layer, with scrolling, full names and keyboard actions; opening the catalogue moves focus inside, and dismissal returns to the initiating control; choosing a port explains its use and lists existing connections; **Create connection with this port** explicitly starts the cancellable draft;
344
+ - explaining visible connection categories with a compact legend and distinct terminal geometry; the radial layout grows with node count to give captions more room;
345
+ - assigning stable per-widget color accents while retaining icons and readable names; hosts can override the internal `--pce-node-accent` color;
346
+ - allocating separate visual perimeter terminals for each connection incidence, including shared state paths, without duplicating canonical ports or changing the saved document;
347
+ - placing node captions above, below, left or right using neighbouring bodies, caption collisions and connection corridors; incidence terminals and routing consume the same caption geometry, so moving a name frees its former entry corridor; long names retain their full accessible name and title while displaying up to two lines;
348
+ - navigating the overview with pointer coordinates that match its aspect-preserving SVG projection; zoom-out uses the same lower bound as fitting the map and keeps keyboard focus when a zoom limit is reached;
349
+ - keeping caption sides, connection terminals and routes stable during zoom; fitting the map establishes label geometry independently of the previous zoom; visible captions cap their text at 16 screen pixels and shrink toward the node inside the unchanged routing reservation;
350
+ - separating zoom/history controls, the category legend and overview into a strip outside the clipped drawing region, so neither captions nor radial shapes intercept the main toolbar; the map clips without native scrolling, keeping movement owned by pan/zoom while catalogues and compact lists retain their own scrolling; trace source selection remains available in compact layouts and exposes its active state to assistive technology;
351
+ - routing polylines around inflated widget bodies and the chosen caption regions using a deterministic visibility graph, with routes cached by the editor's graph derivation; overlapping manually positioned nodes can still prevent a clear route;
352
+ - displaying connection hover information in a theme-aware stage overlay above the radial canvas, outside its zoom transform; the tooltip remains pointer-transparent so it does not block selection;
353
+ - **Organize connections** resets positions/rotations and recomputes segment order together; **Reorganize segments** uses the current displayed node positions;
306
354
  - highlighting widget, state and global-action flows in the same graph;
307
355
  - creating connections with **New connection** or by dragging a port; both open the same draft for source, destination, value and missing-value review;
308
356
  - editing a selected link with **Edit connection**, preserving its ID, nested ownership and existing transform/condition/policy;
357
+ - warning when a new draft uses endpoints that are already connected, with an explicit discard-and-inspect action; distinct delivery rules remain authorable;
309
358
  - validating drafts with Core `CompositionValidatorService` and the host `ComponentMetadataRegistry` before **Apply connection**; cancel leaves the page unchanged, apply creates one undo entry, and an external page change blocks a stale draft;
310
359
  - presenting the same radial diagram with larger readable node captions, directional wires and a **Present diagram** mode;
311
360
  - offering the existing table-to-detail shortcut only for its exact ports and an unwired destination, without keyword-based ranking or claims of AI recommendation; `rowClick` projects `payload.row.id`, while `selectionChange` projects `payload.selectedRows.0.id` with pipeline `fallbackValue: null` so deselection clears the destination;
312
361
  - explaining nested component ports by showing the `nestedPath` while preserving the top-level widget as the canonical endpoint owner.
313
362
 
314
- **Apply connection** changes the builder page; **Save page** persists it through the host. Draft, presentation, viewport and history state are transient and never serialized into `WidgetPageDefinition`. **Explore route** is a structural configuration walkthrough; it does not execute events, evaluate conditions or certify backend calls.
363
+ **Apply connection** changes the builder page; **Save page** persists it through the host. Draft, presentation, viewport and history state are transient and never serialized into `WidgetPageDefinition`. **Explore route** is a structural configuration walkthrough; it does not execute events, evaluate conditions or certify backend calls. Its primary navigation shows each reachable connection once, keeps technical operations under disclosure, and remains outside the transformed canvas. Reading order is explicitly not a claim of execution order between consumers. Advancing reveals the active step and its highlighted relationship in the compact list without moving keyboard focus. Navigation remains focusable at route boundaries with an unavailable state; closing the inspector by Escape or its close button restores the initiating control, including relationships opened from the destination component.
315
364
 
316
365
  For nested components, keep `ref.widget` pointed at the top-level host widget and describe the internal target with `ref.nestedPath`. The editor should make that ownership visible instead of flattening child widgets into a second page-level widget namespace.
317
366
 
@@ -331,7 +380,7 @@ providers: [
331
380
  ];
332
381
  ```
333
382
 
334
- Component input editors belong to the component owner. Page Builder discovers `ComponentDocMeta.configEditor` and hosts the published editor instead of redefining table, form, chart, list, upload, stepper, tab, expansion, CRUD, or rich-content configuration locally.
383
+ Component input editors belong to the component owner. Page Builder discovers `ComponentDocMeta.configEditor` and hosts either its eager `component` or owner-controlled `loadComponent()` result instead of redefining table, form, chart, list, upload, stepper, tab, expansion, CRUD, or rich-content configuration locally.
335
384
 
336
385
  ## Page Settings Presets
337
386
 
@@ -497,6 +546,13 @@ transient; it must not become the page's durable semantic source across runtime
497
546
  recomposition. The People Operations certification scenario applies this rule to
498
547
  `state.activeFilter` and verifies the complete fan-out in the browser.
499
548
 
549
+ Shell authoring reads `BUILTIN_WIDGET_SHELL_PRESETS` from `@praxisui/core` for
550
+ both widget and page settings. The widget editor presents the descriptors as
551
+ visual choices and keeps raw CSS overrides in the advanced appearance section.
552
+ Selecting no widget preset inherits the page treatment; selecting a preset pins
553
+ that treatment to the widget. Page themes and explicit page shell defaults remain
554
+ lower-precedence projections than an explicit widget preset.
555
+
500
556
  When a preview contains both `uiCompositionPlan` and `compiledFormPatch`, the semantic plan is the attested source for local preview. Persistence rebuilds `patch.page` from that locally materialized page so a backend patch cannot bypass the registry-aware gate. Provider readiness in this cut means that the target registry contains owner metadata with a materializable Angular component type; uniform certification of the owner providers and bootstrap recipes remains tracked by issue #392 and is not inferred through Page Builder heuristics.
501
557
 
502
558
  Streaming apply is fail-closed. A preview is persistable only when it is the unchanged payload of an applicable terminal `result` event and its diagnostics carry the matching `streamId`, `threadId`, `turnId`, and `resultEventId`. A locally regenerated or normalized preview remains available for review, but it cannot reuse an older terminal reference or call `page-apply`; the backend must issue a new terminal result for the new patch.
@@ -527,3 +583,292 @@ Main exports:
527
583
  - Use component-owned config editors through metadata instead of duplicating widget-specific editors in Page Builder.
528
584
  - Keep diagnostics and streaming opt-in for hosts that need auditability or richer authoring feedback.
529
585
  - Use the official documentation for extended recipes, playground routes, and advanced AI authoring flows.
586
+
587
+ ### Montagem manual de master detail a partir de uma página vazia
588
+
589
+ 1. Insira Filter, Table e Dynamic Form e conecte-os ao recurso pelo catálogo.
590
+ 2. No filtro, carregue o schema e selecione os campos sempre visíveis.
591
+ 3. Na tabela, habilite seleção única por clique e escolha paginação no servidor para APIs paginadas; no formulário, escolha modo `view`.
592
+ 4. Crie as conexões `Filter.change → Table.queryContext` e `Table.selectionChange → Dynamic Form.resourceId`. O editor usa os contratos públicos das portas para propor as transformações do filtro e do identificador.
593
+ 5. Configure a grade, salve a página e reabra para conferir filtro, seleção e detalhe.
594
+
595
+ Ao converter uma página sem posições em grade, o editor acrescenta posições para todos os widgets e usa altura de conteúdo como padrão. Isso garante visibilidade; a distribuição lado a lado continua sendo uma decisão de layout do autor. O diagrama radial mantém os modos de edição e apresentação.
596
+
597
+ ### Menu de ações e tamanho preciso
598
+
599
+ No host `/page-builder-ia`, a edição é controlada pelo toggle global do aplicativo. O host não acrescenta título de sandbox nem botão de edição à composição; título e subtítulo de negócio pertencem ao documento autorado. Feedback de reinício e diagnóstico de modelo aparecem apenas em edição.
600
+
601
+ O editor de shell aceita `placement: 'menu'` para manter uma ação em Mais ações mesmo
602
+ com espaço livre no cabeçalho. **Configurar widget** reúne as abas **Aparência** e **Tamanho**
603
+ no SettingsPanel. `Mais ações → Tamanho…` é um atalho para essa mesma aba,
604
+ com largura em colunas e altura em linhas ou pixels conforme `autoRows`. O ajuste usa
605
+ as restrições e o layout de dispositivo canônicos, com prévia e aplicação explícita.
606
+ O painel tem um único rodapé: Aplicar/Salvar validam o conjunto das duas abas; Cancelar
607
+ descarta o rascunho não aplicado, preservando um Aplicar anterior. O mapa direcional 3×3
608
+ corresponde às oito alças e oferece preenchimento sem mover vizinhos. **Avançado** reúne
609
+ reorganização explícita, canto fixo e linhas ocupadas. Desfazer dentro da aba prepara
610
+ uma prévia inversa para confirmação no rodapé.
611
+ Com altura de conteúdo, **Linhas ocupadas na grade** controla separadamente quantas
612
+ linhas o widget acompanha. Por exemplo: tabela na linha 2, contatos na linha 3 e
613
+ ficha na linha 2 ocupando duas linhas. Esse controle usa `canvas.items[key].rowSpan`
614
+ e preserva a altura automática ou em pixels já escolhida. Não exige editar JSON.
615
+ Selecionar o widget continua expondo suas alças; o ícone dedicado e os painéis de setas
616
+ separados foram removidos. O editor oferece presets exatos de largura e recuperação do último resize da sessão,
617
+ incluindo vizinhos. Duplo clique nas alças laterais preenche o espaço livre até o primeiro
618
+ vizinho ou limite, sem alterar altura nem vizinhos. A mesma operação está em
619
+ `Tamanho… → Preencher à esquerda/à direita`, com prévia e Aplicar/Cancelar.
620
+ Repetir o atalho no limite não reorganiza widgets. A seção
621
+ `Tamanho… → Expandir até a borda e reorganizar` oferece esquerda/direita com prévia dos
622
+ vizinhos que serão movidos para baixo, Aplicar/Cancelar e desfazer do conjunto.
623
+ Posições bloqueadas ou limites que impeçam alcançar a borda bloqueiam a operação inteira;
624
+ um layout alterado depois da prévia exige nova revisão. Dimensões configuradas e herança
625
+ de dispositivo são preservadas; alturas automáticas continuam acompanhando o conteúdo.
626
+ A âncora central superior também oferece duplo clique e `Tamanho… → Preencher acima`.
627
+ Em linhas rígidas, preenche até o obstáculo acima ou limite, preservando a borda inferior.
628
+ Em altura pelo conteúdo, consome somente o recuo superior existente, mantendo altura mais
629
+ recuo constantes e preservando as linhas compartilhadas. Respeita limites e bloqueios;
630
+ altura automática sem recuo permanece automática. Trilhas CSS flexíveis não oferecem essa
631
+ expansão.
632
+ A âncora central inferior oferece duplo clique e `Tamanho… → Preencher abaixo`, preservando
633
+ o topo e os vizinhos. Em linhas rígidas, ocupa o espaço até o próximo obstáculo ou o fim
634
+ lógico dos itens, respeitando o limite de altura e sem criar linhas adicionais. Em altura
635
+ pelo conteúdo, exige alvo e referência com alturas explícitas na mesma linha, sem qualquer
636
+ item atravessando essa linha por múltiplas linhas. O alvo cresce até a borda inferior
637
+ sustentada pela referência, mantendo seu recuo. A geometria renderizada precisa corresponder
638
+ ao canvas; casos automáticos ou sem referência segura ficam indisponíveis com explicação.
639
+ O bloqueio de tamanho impede a expansão inferior; o bloqueio de posição permite crescer
640
+ sem mudar coordenadas. Prévia, Aplicar/Cancelar e Desfazer seguem o mesmo fluxo dos outros
641
+ lados. Os quatro cantos também oferecem duplo clique e `Tamanho… → Preencher pelos cantos`.
642
+ O canto oposto permanece fixo e o preenchimento não desloca vizinhos. Em grade rígida,
643
+ escolhe a maior área em colunas × linhas, com desempate pela largura; pode crescer somente
644
+ em um eixo. Em conteúdo, exige altura explícita, uma linha sem spans cruzados e validação
645
+ da geometria renderizada na largura final. Norte consome o recuo; sul usa referência
646
+ independente. Sem espaço vertical, pode preencher apenas a largura. Alvos automáticos e
647
+ geometrias que não possam ser certificadas ficam indisponíveis. A prévia, confirmação e
648
+ inversa do desfazer verificam o canto fixo, os mínimos e os retângulos dos irmãos.
649
+ Reorganização inferior, histórico geral e redo seguem fora desta etapa.
650
+
651
+ ### Revalidating edited pages
652
+
653
+ `UiCompositionResourcePreflightService.preflight(plan)` validates an initial
654
+ `UiCompositionPlan`. After visual authoring, use `preflightPage(page)` with the
655
+ current `WidgetPageDefinition`; it shares the semantic composition validator and
656
+ HTTP-backed resource schema checks. The service validates a cloned snapshot and
657
+ never rebuilds the original plan or mutates the supplied page. Hosts must expire
658
+ older evidence when inputs or links change and ignore out-of-order results.
659
+
660
+ Page preflight rechecks components, links, runtime profiles and declared fields
661
+ on every invocation. Only HTTP schema responses are reused: up to 64 entries per
662
+ service instance for five minutes, keyed by the resolved API scope and resource
663
+ schema request. Layout-only edits reuse those schemas while returning the current
664
+ page snapshot. Failures and missing schemas are not retained across validations.
665
+ Use `preflightPage(page, registry, { refreshSchemas: true })` for explicit retry
666
+ or Save; this expires cached evidence before checking the current document. The
667
+ Dynamic Page Lab uses this refresh for both actions. Plan-based preflight keeps
668
+ its existing fresh-evidence behavior. This cache is not authorization evidence.
669
+
670
+ The Dynamic Page Lab persists normal Save Page requests through its configured
671
+ `ASYNC_CONFIG_STORAGE` using `dynamic-page:${buildPageKey(pageIdentity)}` and
672
+ loads that key before mounting its Builder. The separate certification action
673
+ uses a temporary key and does not delete the durable page. A failed validation
674
+ blocks saving while retaining the editor and draft for correction; it does not
675
+ certify or authorize the draft's live runtime effects. Backend access controls
676
+ remain authoritative. Local storage is the default adapter unless the host
677
+ provides another storage implementation.
678
+
679
+ ### Margem lateral compartilhada da página
680
+
681
+ `WidgetPageDefinition.layout.paddingInline` define o respiro lateral compartilhado por
682
+ cabeçalho, tabela, formulário e demais widgets. É uma medida CSS (`24px`, `1.5rem`)
683
+ ou referência a token (`var(--app-page-inset, 24px)`). O valor `0px` desliga o inset;
684
+ a omissão herda o token público `--pdx-page-padding-inline` do host, cujo default é `0px`.
685
+ O host pode definir esse token em `praxis-dynamic-page` ou em um ancestral.
686
+
687
+ A precedência é `deviceLayouts[device].layout.paddingInline` → `layout.paddingInline`
688
+ → token do host → `0px`. Defaults do preset participam da resolução do layout base;
689
+ um valor autorado na página ou variante tem precedência sobre esse default.
690
+ A margem é aplicada no wrapper com `box-sizing: border-box`,
691
+ fora do canvas, preservando a origem dos cálculos de arraste e redimensionamento.
692
+ O espaço de segurança dos controles no modo edição permanece separado. Não se trata
693
+ do `gap` entre widgets, do padding interno do formulário ou do padding das células da tabela.
694
+
695
+ ```json
696
+ {
697
+ "layout": { "paddingInline": "24px", "gap": "16px" },
698
+ "deviceLayouts": { "mobile": { "layout": { "paddingInline": "16px" } } }
699
+ }
700
+ ```
701
+
702
+ Nos editores de página, **Margem lateral da página** permite definir e limpar o valor
703
+ sem alterar os widgets. Vazio na variante herda o layout base; vazio no layout base
704
+ retorna ao default do preset, quando definido; caso contrário, ao token do host. Referências CSS são preservadas ao aplicar, salvar e reabrir.
705
+
706
+ Connection inspector UX: one summary uses available port-contract labels and descriptions; raw endpoints remain in technical details. Close dismisses the inspector, and the full-path action opens the existing configuration trace from the selected source. The hover card is suppressed while inspecting. Missing localized contract labels remain a content limitation; no labels are inferred from endpoint identifiers.
707
+
708
+ Editorial endpoint copy is resolved through `ComponentMetadataRegistry.resolveEditorial`, with port-contract copy as fallback. Page-state endpoints use the authored `state.schema[path].description` or derived-state description when present. These are presentation values; link identities and payloads are unchanged. The People Operations plan supplies descriptions for its filter values, filter presentation context and decision result.
709
+
710
+
711
+ O percurso por origem acompanha as leituras de cada caminho/camada de estado escrito, na ordem da fila do runtime, sem repetir links em ciclos. Não presume que receber uma entrada dispara uma saída do componente. Condições e transformações aparecem como etapas da configuração; não são evidência de execução. O editor usa a mesma resolução editorial no catálogo, seletores, lista de links e percurso. IDs de links ficam nos detalhes técnicos ou na densidade técnica da lista.
712
+
713
+ A ação de acompanhar uma conexão inicia no endpoint exato (incluindo identidade aninhada ou caminho/camada de estado), preservando ramificações dessa mesma origem. Escolher um componente no seletor de origens continua sendo uma visão agregada explícita do componente. Inspecionar um vínculo não altera o escopo nem a etapa do percurso ativo. Descrições de estado são resolvidas na camada do endpoint; estados transitórios não herdam descrições primárias ou derivadas.
714
+
715
+
716
+ Widget settings UX: identity and ready-made styles precede advanced CSS. Size includes a
717
+ before/after occupancy map of the current container; row heights in this diagram are
718
+ illustrative, not a pixel-accurate content preview. The map reads canonical canvas items
719
+ and transient placements and never writes page geometry. Applying a size-only draft clears
720
+ the draft but keeps Save available; Save obtains the current page rather than replaying
721
+ the previous resize request. Backend persistence still follows the host configuration.
722
+
723
+ Escape dispensa detalhes e seleção sem apagar a origem ou o progresso de um percurso ativo. **Encerrar percurso** finaliza a exploração, limpa a origem e volta à visão geral; uma nova exploração começa na primeira etapa. Essa ação não é uma pausa e não altera a página.
724
+
725
+
726
+ ### Applied widget settings and live result
727
+
728
+ The combined Appearance/Size editor refreshes its appearance baseline only after the
729
+ Core confirms the application. Reset discards a later draft to that applied baseline;
730
+ resize Undo remains explicit. View result temporarily reveals the live widget through
731
+ SettingsPanel while retaining the form, tab and draft. Return or Escape resumes editing;
732
+ viewing the result does not apply or save. The optional provider acknowledgement and
733
+ preview target are transient authoring capabilities, not persisted widget properties.
734
+
735
+ ### Widget appearance sample
736
+
737
+ The appearance editor renders its illustrative sample with the canonical
738
+ `WidgetShellComponent`, including preset resolution and runtime header actions.
739
+ Sample window interactions do not modify the saved editor payload. Custom appearance
740
+ adjustments are counted; **Use style only** clears those adjustments while preserving
741
+ the chosen preset, identity and actions. The sample illustrates the shell, not the
742
+ widget's real content or dimensions.
743
+
744
+ The local Dynamic Page Lab includes an appearance studio comparing the six built-in
745
+ presets with identical metric, trend or exception-list content. Its data is illustrative;
746
+ the trend is a static visual specimen, not a ChartDocument integration example.
747
+
748
+
749
+ The shell editor gives the active topic the available editing width. Its illustrative sample follows
750
+ the fields in a native keyboard-accessible disclosure, initially closed. Opening or closing it does
751
+ not discard the draft or reserve a permanent second column. Field columns respond to the available
752
+ inspector width rather than the width of the browser window.
753
+
754
+
755
+ Widget action editing is organized around choosing a published component action,
756
+ configuring its button text/style/placement, and editing the technical connection only
757
+ when needed. The catalog search filters existing governed candidates; it does not
758
+ route user intent. Usage-context filters expose their active count and empty results
759
+ explain how to recover. Selection-dependent actions keep their warning visible.
760
+ IDs, events, commands and sent data remain available in advanced disclosures; an
761
+ invalid custom-action ID opens its connection fields and blocks Apply/Save. Renaming
762
+ a button preserves its command and payload. Custom actions and component-property
763
+ buttons remain explicit advanced tasks; creating a button does not create business
764
+ behavior. Incoming component action labels continue to come from component metadata.
765
+
766
+
767
+ The initial action-catalog filter includes widget, general-use and toolbar actions;
768
+ selection-dependent actions remain opt-in through the context filter. This prevents
769
+ components whose published actions belong to the toolbar from appearing empty on
770
+ first open, while retaining explicit selection-context review.
771
+
772
+ ## Employee avatar and transient header bindings
773
+
774
+ In **Configure widget → Appearance**, enable **Show avatar beside the title**.
775
+ Enter a photo URL or `${transient.employee.avatarUrl}`, the accessible name (for
776
+ example `${transient.employee.nomeCompleto}`), and optional fallback initials.
777
+ The editor explains missing-photo behavior and uses a labeled illustrative identity
778
+ for unresolved avatar bindings in its sample. Apply/save/reopen/reset preserve the
779
+ same `WidgetShellConfig.avatar` fields; disabling the option removes that object.
780
+ The existing identity-authoring capability controls these fields.
781
+
782
+ For selection-driven headers, author the existing `composition.links` state-write
783
+ from table `selectionChange` to `employee` in layer `transient`, selecting
784
+ `payload.selectedRows.0`. Bind title and subtitle through `${transient.employee...}`.
785
+ The connections editor preserves that layer when displaying/reconnecting ports,
786
+ separates identical paths in distinct layers, and explains temporary data in the
787
+ inspector. The shared visual state location is separate from each link endpoint:
788
+ `writable:false` on one endpoint does not become a global restriction on other links.
789
+ Inspecting/reconstructing a connection preserves its exact authored endpoint. That
790
+ endpoint cannot receive writes if it is explicitly read-only; the `derived` layer
791
+ always rejects writes.
792
+ Creating a new state path/layer still belongs to canonical page/AI authoring; the
793
+ connection canvas does not introduce a parallel state-definition form. There is no
794
+ new shell input port or avatar-specific link kind. Existing ID-to-detail links remain
795
+ independent. Clearing selection must be propagated, not filtered out.
796
+
797
+ The public `widget.shell.configure` operation and Core capability catalog describe
798
+ `avatar.imageSrc`, `avatar.name` and `avatar.initials`. The shell binding grammar
799
+ remains the existing path interpolation; the explicit `transient` root is runtime-only.
800
+ See the Core package's “Selection-driven widget headers” example for the full shape
801
+ and formatting/field-access boundaries.
802
+
803
+ The existing `/dynamic-page-lab` includes a lazy “Widget identity from selection”
804
+ proof using the real Table and Dynamic Page with fictional records and local images.
805
+ It exercises image load, missing image, selection switch/clear and JSON serialization
806
+ followed by a fresh runtime mount. The corresponding `widget-shell-selection` browser
807
+ spec also injects a browser network outage and proves same-URL recovery. It does not
808
+ mock Praxis endpoints or certify remote persistence/LLM authoring.
809
+
810
+ Remote persistence is covered separately by `widget-shell-persistence.playwright.spec.ts`
811
+ with `PRAXIS_REAL_BACKEND_E2E=true`, using the existing remote persistence lab and
812
+ an exclusive UUID record. It checks `If-Match`, unchanged authored bindings after
813
+ selection, reload without selected data, and conditional cleanup.
814
+ Check the target backend's active registry for other environments; neither a local
815
+ editor preview nor a deterministic persistence test proves a live LLM authoring gate.
816
+
817
+
818
+ ### Action and preset integrity
819
+
820
+ The editor preserves the complete authored `WidgetShellAction` and replaces only the
821
+ fields it edits. Toggle state, ARIA relationships and explicit `payload: null` survive
822
+ rename/reset/apply. Transient runtime actions are not added to the authored document.
823
+
824
+ Action IDs are trimmed and validated for emptiness, sibling uniqueness and reserved
825
+ shell controls through Core's `getWidgetShellActionIdError`. The settings application
826
+ boundary also rejects these identities. Invalid drafts stay editable; users must repair
827
+ old invalid IDs before applying widget settings. This is not validation of every JSON/AI
828
+ import path or backend authorization.
829
+
830
+ The catalog initially shows entries declaring `command`. Event-only entries require
831
+ **Incluir eventos para conexão — avançado** and explain that they emit a notification,
832
+ not execute the operation described. `payloadSchema.example` remains reference material;
833
+ adding an entry never copies it into the button payload. Existing authored payloads are
834
+ preserved. Declaring a command does not prove its handler, required context or authorization:
835
+ those need component-specific execution tests before enterprise certification.
836
+
837
+ Page-defined presets override built-in presets of the same ID. The selector presents
838
+ one option per ID using that same precedence, matching the preview.
839
+
840
+ Charts handles its existing `openConfigEditor`
841
+ command and guards customization at execution time, including pending context resolution.
842
+ Event-only entries in Table/List/CRUD/Tabs remain notifications, not proven operations.
843
+
844
+
845
+ ### Action availability in the current widget
846
+
847
+ The shell catalog consults the live component through Core. For assessed commands it shows
848
+ availability or the owner's localized reason; unavailable entries cannot be added. An
849
+ existing selection can still be removed. For unassessed commands it explicitly says that
850
+ availability has not been verified. This does not infer operations from names, execute
851
+ commands, or copy transient `disabled`/`tooltip` into authored buttons. Availability may
852
+ change after saving; runtime guards and backend authorization remain necessary.
853
+
854
+ ### Formatação explícita em conexões
855
+
856
+ O inspetor de conexões oferece **Adicionar formatação**. Escolha data civil,
857
+ máscara de dígitos ou formato numérico; localidade, máscara e moeda são
858
+ configurações declarativas do Core. Configuração incompleta bloqueia Aplicar e
859
+ a edição é preservada ao serializar/reabrir a página.
860
+ Esta superfície usa `page.composition.links[].transform`; não amplia o shorthand
861
+ `UiCompositionPlanTransform`.
862
+
863
+ ### Abas especializadas de configurações do widget
864
+
865
+ O editor publica Cabeçalho, Estilos, Avatar, Vínculos de dados, Comportamento, Personalizar aparência e Ações pelo protocolo de assuntos de `SettingsValueProvider`. O host do Core reúne esses assuntos com Tamanho em uma única navegação, sem a aba intermediária Widget. A navegação permanece acessível durante a rolagem: abas fixas em painéis largos e um seletor compacto de assuntos em painéis estreitos. A troca de assunto revela o início da seção, preservando o foco e o rascunho. O formulário continua montado ao navegar; erros identificam a aba responsável e oferecem um atalho para correção.
866
+
867
+ Vínculos de dados edita os mesmos controles canônicos de título, descrição e avatar, sem persistir um documento paralelo. As conexões recebidas em `compositionLinks` são uma projeção de consulta de `page.composition.links`, nunca parte do resultado do editor. Origens, propagação, condições e transformações continuam pertencendo ao editor de conexões da página. A amostra começa recolhida abaixo dos campos e não ocupa uma coluna fixa. Aplicar/Salvar/Redefinir mantêm o protocolo existente.
868
+
869
+ As miniaturas de estilos projetam as cores de título/ícone do cabeçalho e o fundo/cor do corpo a partir do preset canônico. A opção selecionada usa borda e marcador visual, mantendo `aria-pressed` para tecnologia assistiva. A miniatura continua esquemática: dimensões, conteúdo real e ajustes individuais devem ser conferidos na amostra e em Ver resultado.
870
+
871
+ O modo **Somente conteúdo** altera apenas `shell.kind`: título, descrição, avatar, estilo,
872
+ aparência e ações continuam sendo editados e preservados em Aplicar/Salvar/Redefinir e na
873
+ reabertura. Ocultar a moldura no runtime não autoriza descartar o rascunho dos demais campos.
874
+ Os campos de aparência mantêm rótulos flutuantes visíveis mesmo quando estão vazios.