@praxisui/page-builder 9.0.45 → 9.0.46
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 +12 -0
- package/ai/component-registry.json +124 -63
- package/fesm2022/praxisui-page-builder.mjs +40 -22
- package/package.json +4 -4
- package/types/praxisui-page-builder.d.ts +9 -3
|
@@ -13133,7 +13133,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
13133
13133
|
* Capabilities catalog for the canonical dynamic page builder/runtime.
|
|
13134
13134
|
*/
|
|
13135
13135
|
const PAGE_BUILDER_AI_CAPABILITIES = {
|
|
13136
|
-
version: 'v1.
|
|
13136
|
+
version: 'v1.5',
|
|
13137
13137
|
enums: {},
|
|
13138
13138
|
targets: [
|
|
13139
13139
|
'page-builder',
|
|
@@ -13143,7 +13143,7 @@ const PAGE_BUILDER_AI_CAPABILITIES = {
|
|
|
13143
13143
|
'praxis-dynamic-page-builder',
|
|
13144
13144
|
],
|
|
13145
13145
|
notes: [
|
|
13146
|
-
'page segue o modelo canonico WidgetPageDefinition (widgets, composition.links, context e state opcional); composition.links
|
|
13146
|
+
'page segue o modelo canonico WidgetPageDefinition (widgets, composition.links, context e state opcional); composition.links pode despachar actions globais via to.kind = global-action e receber continuations exatas via from.kind = global-action.',
|
|
13147
13147
|
'Conteudo editorial rico deve ser modelado como widget praxis-rich-content com definition.inputs.document: RichContentDocument, nao como DSL local do page-builder.',
|
|
13148
13148
|
'Quando definition.id = praxis-rich-content em uma pagina dinamica, definition.inputs.document continua sendo o contrato persistido; hostCapabilities e mediado em runtime pelo host praxis-dynamic-page e nao deve ser serializado no JSON da pagina.',
|
|
13149
13149
|
'Edicao visual de inputs de widget deve usar ComponentDocMeta.configEditor ou ComponentDocMeta.authoringManifestRef publicado pela lib dona do componente; nao criar editor local no page-builder para semantica de outro pacote.',
|
|
@@ -13185,7 +13185,8 @@ const PAGE_BUILDER_AI_CAPABILITIES = {
|
|
|
13185
13185
|
{ path: 'uiCompositionPlan.contextScopes[].targets', category: 'context', valueKind: 'array', description: 'Destinos explicitos do escopo, identificados por widget owner e nestedPath canonico opcional.' },
|
|
13186
13186
|
{ path: 'uiCompositionPlan.bindings', category: 'connections', valueKind: 'array', description: 'Bindings declarativos que serao compilados para page.composition.links.' },
|
|
13187
13187
|
{ path: 'uiCompositionPlan.bindings[].id', category: 'connections', valueKind: 'string', description: 'Identificador estavel do binding planejado.' },
|
|
13188
|
-
{ path: 'uiCompositionPlan.bindings[].from', category: 'connections', valueKind: 'object', description: 'Endpoint de origem: component-port ou
|
|
13188
|
+
{ path: 'uiCompositionPlan.bindings[].from', category: 'connections', valueKind: 'object', description: 'Endpoint de origem: component-port, state ou global-action. Uma origem global-action identifica a continuation somente por actionId; o payload vem do dispatch runtime.' },
|
|
13189
|
+
{ path: 'uiCompositionPlan.bindings[].from.[actionId]', category: 'connections', valueKind: 'string', description: 'ID exato da continuation quando uiCompositionPlan.bindings[].from.kind = global-action. Campos de payload ou metadata nao sao executaveis na origem.' },
|
|
13189
13190
|
{ path: 'uiCompositionPlan.bindings[].to', category: 'connections', valueKind: 'object', description: 'Endpoint de destino: component-port, state ou global-action.' },
|
|
13190
13191
|
{ path: 'uiCompositionPlan.bindings[].to.[actionId]', category: 'connections', valueKind: 'string', description: 'ID da action global quando uiCompositionPlan.bindings[].to.kind = global-action.' },
|
|
13191
13192
|
{ path: 'uiCompositionPlan.bindings[].to.payload', category: 'connections', valueKind: 'object', description: 'Payload literal opcional para destino global-action planejado.' },
|
|
@@ -14146,13 +14147,29 @@ const globalActionEndpointSchema = {
|
|
|
14146
14147
|
},
|
|
14147
14148
|
},
|
|
14148
14149
|
};
|
|
14150
|
+
const globalActionSourceEndpointSchema = {
|
|
14151
|
+
type: 'object',
|
|
14152
|
+
required: ['kind', 'ref'],
|
|
14153
|
+
additionalProperties: false,
|
|
14154
|
+
properties: {
|
|
14155
|
+
kind: { enum: ['global-action'] },
|
|
14156
|
+
ref: {
|
|
14157
|
+
type: 'object',
|
|
14158
|
+
required: ['actionId'],
|
|
14159
|
+
additionalProperties: false,
|
|
14160
|
+
properties: {
|
|
14161
|
+
actionId: { type: 'string' },
|
|
14162
|
+
},
|
|
14163
|
+
},
|
|
14164
|
+
},
|
|
14165
|
+
};
|
|
14149
14166
|
const compositionLinkSchema = {
|
|
14150
14167
|
type: 'object',
|
|
14151
14168
|
required: ['id', 'from', 'to', 'intent'],
|
|
14152
14169
|
additionalProperties: false,
|
|
14153
14170
|
properties: {
|
|
14154
14171
|
id: { type: 'string' },
|
|
14155
|
-
from: { oneOf: [componentPortEndpointSchema, stateEndpointSchema] },
|
|
14172
|
+
from: { oneOf: [componentPortEndpointSchema, stateEndpointSchema, globalActionSourceEndpointSchema] },
|
|
14156
14173
|
to: { oneOf: [componentPortEndpointSchema, stateEndpointSchema, globalActionEndpointSchema] },
|
|
14157
14174
|
intent: { enum: linkIntentValues },
|
|
14158
14175
|
condition: { type: 'object' },
|
|
@@ -14178,7 +14195,7 @@ const PRAXIS_PAGE_BUILDER_AUTHORING_MANIFEST = {
|
|
|
14178
14195
|
componentId: 'praxis-page-builder',
|
|
14179
14196
|
ownerPackage: '@praxisui/page-builder',
|
|
14180
14197
|
configSchemaId: 'WidgetPageDefinition',
|
|
14181
|
-
manifestVersion: '1.
|
|
14198
|
+
manifestVersion: '1.3.0',
|
|
14182
14199
|
runtimeInputs: [
|
|
14183
14200
|
{ name: 'page', type: 'WidgetPageDefinition', description: 'Canonical renderable page document consumed by praxis-dynamic-page.' },
|
|
14184
14201
|
{ name: 'pageIdentity', type: 'PageIdentity | null', description: 'Persistence identity for ui_user_config save/apply flows; not persisted inside page.' },
|
|
@@ -14514,6 +14531,7 @@ const PRAXIS_PAGE_BUILDER_AUTHORING_MANIFEST = {
|
|
|
14514
14531
|
'UiCompositionPlan.i18n, context and layout compile into the corresponding WidgetPageDefinition fields so a complete page never depends on host-only enrichment. A key-only PraxisTextValue receives text from the fallbackLocale dictionary when available.',
|
|
14515
14532
|
'UiCompositionPlan.selectionSyncs is an authoring shorthand that compiles into explicit canonical page.composition.links and is never persisted in WidgetPageDefinition.',
|
|
14516
14533
|
'UiCompositionPlan.contextScopes compiles constants and state.initial into explicit widget inputs, and state context into explicit page.composition.links; runtime inheritance is never ambient.',
|
|
14534
|
+
'UiCompositionPlan global-action sources declare only actionId; dynamicPage.composition.dispatch supplies the runtime payload, and target-only payload fields fail closed on sources.',
|
|
14517
14535
|
'Widget keys and composition link ids are stable identities; array indexes are never canonical identities.',
|
|
14518
14536
|
'Persisted wiring uses page.composition.links and must not write legacy connections.',
|
|
14519
14537
|
'Nested component ports use component-port refs with nestedPath ending in a stable widget key.',
|
|
@@ -15210,8 +15228,8 @@ function validateUiCompositionPlan(plan) {
|
|
|
15210
15228
|
}
|
|
15211
15229
|
}
|
|
15212
15230
|
for (const [index, binding] of (plan.bindings ?? []).entries()) {
|
|
15213
|
-
validateEndpoint(binding.from, widgetKeys, diagnostics, `bindings.${index}.from`,
|
|
15214
|
-
validateEndpoint(binding.to, widgetKeys, diagnostics, `bindings.${index}.to`,
|
|
15231
|
+
validateEndpoint(binding.from, widgetKeys, diagnostics, `bindings.${index}.from`, 'source');
|
|
15232
|
+
validateEndpoint(binding.to, widgetKeys, diagnostics, `bindings.${index}.to`, 'target');
|
|
15215
15233
|
if (!binding.id?.trim()) {
|
|
15216
15234
|
diagnostics.push({
|
|
15217
15235
|
code: 'binding-id-required',
|
|
@@ -15264,7 +15282,7 @@ function validateSelectionSync(selectionSync, widgetKeys, diagnostics, path) {
|
|
|
15264
15282
|
});
|
|
15265
15283
|
}
|
|
15266
15284
|
for (const [sourceIndex, source] of (selectionSync.sources ?? []).entries()) {
|
|
15267
|
-
validateEndpoint(source, widgetKeys, diagnostics, `${path}.sources.${sourceIndex}`,
|
|
15285
|
+
validateEndpoint(source, widgetKeys, diagnostics, `${path}.sources.${sourceIndex}`, 'source');
|
|
15268
15286
|
if (source?.kind !== 'component-port') {
|
|
15269
15287
|
diagnostics.push({
|
|
15270
15288
|
code: 'selection-sync-source-component-port-required',
|
|
@@ -15288,7 +15306,7 @@ function validateSelectionSync(selectionSync, widgetKeys, diagnostics, path) {
|
|
|
15288
15306
|
});
|
|
15289
15307
|
}
|
|
15290
15308
|
else {
|
|
15291
|
-
validateEndpoint(selectionSync.target, widgetKeys, diagnostics, `${path}.target`,
|
|
15309
|
+
validateEndpoint(selectionSync.target, widgetKeys, diagnostics, `${path}.target`, 'target');
|
|
15292
15310
|
}
|
|
15293
15311
|
const mappings = Object.entries(selectionSync.mapping ?? {});
|
|
15294
15312
|
if (!mappings.length) {
|
|
@@ -15523,7 +15541,7 @@ function validateGrouping(grouping, widgetKeys, diagnostics) {
|
|
|
15523
15541
|
});
|
|
15524
15542
|
});
|
|
15525
15543
|
}
|
|
15526
|
-
function validateEndpoint(endpoint, widgetKeys, diagnostics, path,
|
|
15544
|
+
function validateEndpoint(endpoint, widgetKeys, diagnostics, path, role) {
|
|
15527
15545
|
if (!endpoint || typeof endpoint !== 'object') {
|
|
15528
15546
|
diagnostics.push({
|
|
15529
15547
|
code: 'endpoint-required',
|
|
@@ -15561,21 +15579,23 @@ function validateEndpoint(endpoint, widgetKeys, diagnostics, path, allowGlobalAc
|
|
|
15561
15579
|
return;
|
|
15562
15580
|
}
|
|
15563
15581
|
if (endpoint.kind === 'global-action') {
|
|
15564
|
-
if (!allowGlobalAction) {
|
|
15565
|
-
diagnostics.push({
|
|
15566
|
-
code: 'endpoint-global-action-source-unsupported',
|
|
15567
|
-
message: 'Global-action endpoints are supported only as binding targets.',
|
|
15568
|
-
path: `${path}.kind`,
|
|
15569
|
-
});
|
|
15570
|
-
return;
|
|
15571
|
-
}
|
|
15572
15582
|
if (!endpoint.actionId?.trim()) {
|
|
15573
15583
|
diagnostics.push({
|
|
15574
15584
|
code: 'endpoint-global-action-id-required',
|
|
15575
|
-
message: 'Global-action
|
|
15585
|
+
message: 'Global-action endpoint must declare an actionId.',
|
|
15576
15586
|
path: `${path}.actionId`,
|
|
15577
15587
|
});
|
|
15578
15588
|
}
|
|
15589
|
+
if (role === 'source') {
|
|
15590
|
+
for (const field of Object.keys(endpoint).filter((candidate) => candidate !== 'kind' && candidate !== 'actionId')) {
|
|
15591
|
+
diagnostics.push({
|
|
15592
|
+
code: 'endpoint-global-action-source-field-unsupported',
|
|
15593
|
+
message: `Global-action source field "${field}" is not executable; runtime dispatch supplies the payload.`,
|
|
15594
|
+
path: `${path}.${field}`,
|
|
15595
|
+
});
|
|
15596
|
+
}
|
|
15597
|
+
return;
|
|
15598
|
+
}
|
|
15579
15599
|
if (endpoint.payloadExpr !== undefined && typeof endpoint.payloadExpr !== 'string') {
|
|
15580
15600
|
diagnostics.push({
|
|
15581
15601
|
code: 'endpoint-global-action-payload-expr-invalid',
|
|
@@ -15587,9 +15607,7 @@ function validateEndpoint(endpoint, widgetKeys, diagnostics, path, allowGlobalAc
|
|
|
15587
15607
|
}
|
|
15588
15608
|
diagnostics.push({
|
|
15589
15609
|
code: 'endpoint-kind-unsupported',
|
|
15590
|
-
message:
|
|
15591
|
-
? 'Endpoint kind must be "component-port", "state" or "global-action".'
|
|
15592
|
-
: 'Endpoint kind must be "component-port" or "state".',
|
|
15610
|
+
message: 'Endpoint kind must be "component-port", "state" or "global-action".',
|
|
15593
15611
|
path: `${path}.kind`,
|
|
15594
15612
|
});
|
|
15595
15613
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/page-builder",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.46",
|
|
4
4
|
"description": "Page and widget builder utilities for Praxis UI (grid, dynamic widgets, editors).",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^21.0.0",
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"@angular/forms": "^21.0.0",
|
|
9
9
|
"@angular/cdk": "^21.0.0",
|
|
10
10
|
"@angular/material": "^21.0.0",
|
|
11
|
-
"@praxisui/ai": "^9.0.
|
|
12
|
-
"@praxisui/core": "^9.0.
|
|
13
|
-
"@praxisui/settings-panel": "^9.0.
|
|
11
|
+
"@praxisui/ai": "^9.0.46",
|
|
12
|
+
"@praxisui/core": "^9.0.46",
|
|
13
|
+
"@praxisui/settings-panel": "^9.0.46",
|
|
14
14
|
"rxjs": "~7.8.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
@@ -1551,8 +1551,14 @@ type UiCompositionPlanGlobalActionEndpoint = {
|
|
|
1551
1551
|
payloadExpr?: string;
|
|
1552
1552
|
meta?: Record<string, unknown>;
|
|
1553
1553
|
};
|
|
1554
|
-
|
|
1555
|
-
|
|
1554
|
+
/**
|
|
1555
|
+
* A runtime event source emitted through `dynamicPage.composition.dispatch`.
|
|
1556
|
+
* Only actionId participates in canonical endpoint matching; payload is always
|
|
1557
|
+
* supplied by the runtime dispatch event.
|
|
1558
|
+
*/
|
|
1559
|
+
type UiCompositionPlanGlobalActionSourceEndpoint = Pick<UiCompositionPlanGlobalActionEndpoint, 'kind' | 'actionId'>;
|
|
1560
|
+
type UiCompositionPlanSourceEndpoint = UiCompositionPlanComponentPortEndpoint | UiCompositionPlanStateEndpoint | UiCompositionPlanGlobalActionSourceEndpoint;
|
|
1561
|
+
type UiCompositionPlanTargetEndpoint = UiCompositionPlanComponentPortEndpoint | UiCompositionPlanStateEndpoint | UiCompositionPlanGlobalActionEndpoint;
|
|
1556
1562
|
type UiCompositionPlanEndpoint = UiCompositionPlanTargetEndpoint;
|
|
1557
1563
|
type UiCompositionPlanTransform = {
|
|
1558
1564
|
kind: 'pick-path';
|
|
@@ -2267,4 +2273,4 @@ declare const PRAXIS_PAGE_BUILDER_COMPONENT_METADATA: ComponentDocMeta;
|
|
|
2267
2273
|
declare function providePraxisPageBuilderMetadata(): Provider;
|
|
2268
2274
|
|
|
2269
2275
|
export { ComponentPaletteDialogComponent, ConfirmDialogComponent, ConnectionEditorComponent, DynamicPageBuilderComponent, DynamicPageConfigEditorComponent, FloatingToolbarComponent, PAGE_BUILDER_AGENTIC_AUTHORING_OPTIONS, PAGE_BUILDER_AI_CAPABILITIES, PAGE_BUILDER_COMPONENT_CONTEXT_PACK, PAGE_BUILDER_WIDGET_AI_CATALOGS, PLACEHOLDER, PRAXIS_PAGE_BUILDER_AUTHORING_MANIFEST, PRAXIS_PAGE_BUILDER_COMPONENT_METADATA, PageBuilderAgenticAuthoringService, PageConfigEditorComponent, TileToolbarComponent, WidgetShellEditorComponent, clearWidgetAiCatalogs, compileUiCompositionPlan, getPageAiCatalog, getWidgetAiCapabilities, preflightUiCompositionPlan, providePageBuilderWidgetAiCatalogs, providePraxisPageBuilderMetadata, registerWidgetAiCatalog, registerWidgetAiCatalogs, resolveUiCompositionPlanTemplate, validateUiCompositionPlan };
|
|
2270
|
-
export type { Capability, CapabilityCatalog, CapabilityCategory, ComponentPaletteData, ComponentPaletteSelection, ConfirmDialogData, PageBuilderAgenticAuthoringAttachmentSummary, PageBuilderAgenticAuthoringCandidate, PageBuilderAgenticAuthoringComponentCapabilitiesResult, PageBuilderAgenticAuthoringComponentCapability, PageBuilderAgenticAuthoringComponentCapabilityCatalog, PageBuilderAgenticAuthoringComponentCapabilityExample, PageBuilderAgenticAuthoringComponentFieldAlias, PageBuilderAgenticAuthoringConversationMessage, PageBuilderAgenticAuthoringGateResult, PageBuilderAgenticAuthoringIntentResolutionRequest, PageBuilderAgenticAuthoringIntentResolutionResult, PageBuilderAgenticAuthoringOptions, PageBuilderAgenticAuthoringPendingClarification, PageBuilderAgenticAuthoringPromptRequest, PageBuilderAgenticAuthoringProvider, PageBuilderAgenticAuthoringQuickReply, PageBuilderAgenticAuthoringResourceCandidatesRequest, PageBuilderAgenticAuthoringResourceCandidatesResult, PageBuilderAgenticAuthoringSharedRuleHandoff, PageBuilderAgenticAuthoringTarget, PageBuilderAgenticAuthoringTurnStreamConnectionError, PageBuilderAgenticAuthoringTurnStreamEvent, PageBuilderAgenticAuthoringTurnStreamRequest, PageBuilderAgenticAuthoringTurnStreamStartResponse, PageBuilderApplyRequest, PageBuilderApplyResult, PageBuilderAuthoringCapabilities, PageBuilderCompiledFormPatch, PageBuilderMinimalFormPlanResult, PageBuilderPreviewDiagnostics, PageBuilderPreviewResult, PageBuilderProjectKnowledgeAudit, UiCompositionPlan, UiCompositionPlanAuthoringInput, UiCompositionPlanBinding, UiCompositionPlanCompileResult, UiCompositionPlanComponentPortEndpoint, UiCompositionPlanContextScope, UiCompositionPlanContextScopeTarget, UiCompositionPlanContextValue, UiCompositionPlanDiagnostic, UiCompositionPlanEndpoint, UiCompositionPlanGlobalActionEndpoint, UiCompositionPlanInputSource, UiCompositionPlanPreflightResult, UiCompositionPlanSelectionSync, UiCompositionPlanSelectionSyncMapping, UiCompositionPlanSourceEndpoint, UiCompositionPlanStateEndpoint, UiCompositionPlanTargetEndpoint, UiCompositionPlanTemplateMaterialization, UiCompositionPlanTemplateRef, UiCompositionPlanTemplateReference, UiCompositionPlanTemplateResolutionResult, UiCompositionPlanTemplateRevision, UiCompositionPlanTransform, UiCompositionPlanWidget, ValueKind };
|
|
2276
|
+
export type { Capability, CapabilityCatalog, CapabilityCategory, ComponentPaletteData, ComponentPaletteSelection, ConfirmDialogData, PageBuilderAgenticAuthoringAttachmentSummary, PageBuilderAgenticAuthoringCandidate, PageBuilderAgenticAuthoringComponentCapabilitiesResult, PageBuilderAgenticAuthoringComponentCapability, PageBuilderAgenticAuthoringComponentCapabilityCatalog, PageBuilderAgenticAuthoringComponentCapabilityExample, PageBuilderAgenticAuthoringComponentFieldAlias, PageBuilderAgenticAuthoringConversationMessage, PageBuilderAgenticAuthoringGateResult, PageBuilderAgenticAuthoringIntentResolutionRequest, PageBuilderAgenticAuthoringIntentResolutionResult, PageBuilderAgenticAuthoringOptions, PageBuilderAgenticAuthoringPendingClarification, PageBuilderAgenticAuthoringPromptRequest, PageBuilderAgenticAuthoringProvider, PageBuilderAgenticAuthoringQuickReply, PageBuilderAgenticAuthoringResourceCandidatesRequest, PageBuilderAgenticAuthoringResourceCandidatesResult, PageBuilderAgenticAuthoringSharedRuleHandoff, PageBuilderAgenticAuthoringTarget, PageBuilderAgenticAuthoringTurnStreamConnectionError, PageBuilderAgenticAuthoringTurnStreamEvent, PageBuilderAgenticAuthoringTurnStreamRequest, PageBuilderAgenticAuthoringTurnStreamStartResponse, PageBuilderApplyRequest, PageBuilderApplyResult, PageBuilderAuthoringCapabilities, PageBuilderCompiledFormPatch, PageBuilderMinimalFormPlanResult, PageBuilderPreviewDiagnostics, PageBuilderPreviewResult, PageBuilderProjectKnowledgeAudit, UiCompositionPlan, UiCompositionPlanAuthoringInput, UiCompositionPlanBinding, UiCompositionPlanCompileResult, UiCompositionPlanComponentPortEndpoint, UiCompositionPlanContextScope, UiCompositionPlanContextScopeTarget, UiCompositionPlanContextValue, UiCompositionPlanDiagnostic, UiCompositionPlanEndpoint, UiCompositionPlanGlobalActionEndpoint, UiCompositionPlanGlobalActionSourceEndpoint, UiCompositionPlanInputSource, UiCompositionPlanPreflightResult, UiCompositionPlanSelectionSync, UiCompositionPlanSelectionSyncMapping, UiCompositionPlanSourceEndpoint, UiCompositionPlanStateEndpoint, UiCompositionPlanTargetEndpoint, UiCompositionPlanTemplateMaterialization, UiCompositionPlanTemplateRef, UiCompositionPlanTemplateReference, UiCompositionPlanTemplateResolutionResult, UiCompositionPlanTemplateRevision, UiCompositionPlanTransform, UiCompositionPlanWidget, ValueKind };
|